forage v0.2.0 Forage.Codec.Encoder
Functionality to encode a Forage.Plan
into a Phoenix param
map
for use with the ApplicationWeb.Router.Helpers
.
Link to this section Summary
Functions
Encodes a forage plan into a params map
Encode the “pagination” part of a forage plan. Returns a map
Encode the “search” part of a forage plan. Returns a map
Encode the “sort” part of a forage plan. Returns a map
Link to this section Functions
Link to this function
encode(plan)
Encodes a forage plan into a params map.
This function doesn’t need to take the schema as an argument because it will never have to convert a string into an atom (the params map contains only strings and never atoms)
Link to this function
encode_pagination(plan)
Encode the “pagination” part of a forage plan. Returns a map.
Link to this function
encode_search(plan)
Encode the “search” part of a forage plan. Returns a map.
Link to this function
encode_sort(plan)
Encode the “sort” part of a forage plan. Returns a map.