CrossClj

0.1.0 docs

SourceDocs



RECENT
    VARS
    ->CoercionError
    ->ParameterCoercion
    coerce!
    coerce-request
    coerce-response
    coercers-not-compiled!
    Coercion
    compile-request-coercers
    encode-error
    error?
    map->CoercionError
    map->ParameterCoercion
    request-coercer
    request-coercers
    request-coercion-failed!
    response-coercer
    response-coercers
    response-coercion-failed!
    ring-parameter-coercion

    « Index of all namespaces of this project

    (->CoercionError)
    Positional factory function for class reitit.coercion.CoercionError.
    
    (->ParameterCoercion in style keywordize? open?)
    Positional factory function for class reitit.coercion.ParameterCoercion.
    
    (coerce! match)
    Returns a map of coerced input parameters using pre-compiled
    coercers under :result (provided by [[compile-request-coercers]].
    If coercion or parameters are not defined, return nil
    (coerce-request coercers request)
    (coerce-response coercers request response)
    Private
    (coercers-not-compiled! match)
    protocol
    Pluggable coercion protocol
    
    (-compile-model this model name)
    Compiles a model
    
    (-encode-error this error)
    Converts error in to a serializable format
    
    (-get-apidocs this model data)
    ???
    
    (-get-name this)
    Keyword name for the coercion
    
    (-get-options this)
    Coercion options
    
    (-open-model this model)
    Returns a new model which allows extra keys in maps
    
    (-request-coercer this type model)
    Returns a `value format => value` request coercion function
    
    (-response-coercer this model)
    Returns a `value format => value` response coercion function
    
    (compile-request-coercers [_ {:keys [parameters coercion]}] opts)
    A router :compile implementation which reads the :parameters
    and :coercion data to create compiled coercers into Match under
    `:result. A pre-requisite to use [[coerce!]].
    (encode-error data)
    (map->CoercionError m__7585__auto__)
    Factory function for class reitit.coercion.CoercionError, taking a map of keywords to field values.
    
    (map->ParameterCoercion m__7585__auto__)
    Factory function for class reitit.coercion.ParameterCoercion, taking a map of keywords to field values.
    
    (request-coercer coercion type model {:keys [extract-request-format], :or {extract-request-format (constantly nil)}})
    (request-coercers coercion parameters opts)
    (request-coercion-failed! result coercion value in request)
    (response-coercer coercion body {:keys [extract-response-format], :or {extract-response-format (constantly nil)}})
    (response-coercers coercion responses opts)
    (response-coercion-failed! result coercion value request response)