calcinator v5.0.0 Calcinator.View behaviour View Source
A view for Calcinator.Resources
Link to this section Summary
Types
pagination or nil if no pagination
The raw request params that need to be parsed for view options
Resource(s) related to resource through a relationship
The subject that must be authorized to view the individual attributes in the view
A module that implements the Calcinator.View behaviour
Callbacks
Rendered related 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
Renders the show iodata for the given struct and optional params and subject (for view-level authorization of
individual attributes)
Renders the relationship iodata for the given related
Link to this section 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.
A module that implements the Calcinator.View behaviour.
Link to this section 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.
Renders the show iodata for the given struct and optional params and subject (for view-level authorization of
individual attributes).
Renders the relationship iodata for the given related.