calcinator v1.0.0 Calcinator.View behaviour
A view for Calcinator.Resources
Summary
Types
pagination
or nil
if no pagination
The raw request params that need to be parsed for view options
The subject that must be authorized to view the individual attributes in the view
Callbacks
Renders list of struct
with optional pagination, params, and subject (for view-level authorization of individual
attributes). base_uri
is required when pagination
is present
Renders the show iodata for the given struct
and optional params and subject (for view-level authorization of
individual attributes)
Types
pagination
or nil
if no pagination
The raw request params that need to be parsed for view options
Callbacks
index([struct], %{optional(:base_uri) => URI.t, optional(:pagination) => maybe_pagination, optional(:params) => params, optional(:subject) => subject}) :: iodata
Renders list of struct
with optional pagination, params, and subject (for view-level authorization of individual
attributes). base_uri
is required when pagination
is present.