Liking cljdoc? Tell your friends :D

hara.data.pipeline.allow


wrap-attr-model-allowclj

(wrap-attr-model-allow f)

wrapper function for only allowing values defined to be included

(pipeline/normalise {:account {:name "Chris" :age 10}} {:schema (schema/schema examples/account-name-age-sex) :pipeline {:allow {:account {:name :checked}}}} wrappers) => throws

wrapper function for only allowing values defined to be included

(pipeline/normalise {:account {:name "Chris"
                               :age 10}}
                    {:schema (schema/schema examples/account-name-age-sex)
                     :pipeline {:allow {:account {:name :checked}}}}
                    *wrappers*)
=> throws
raw docstring

wrap-branch-model-allowclj

(wrap-branch-model-allow f)

Works together with wrap-attr-model-allow to control access to data (pipeline/normalise {:account/name "Chris"} {:schema (schema/schema examples/account-name-age-sex) :pipeline {:allow {}}} wrappers) => (throws-info {:data {:name "Chris"} :key-path [:account] :normalise true :not-allowed true :nsv [:account]})

(pipeline/normalise {:account/name "Chris"} {:schema (schema/schema examples/account-name-age-sex) :pipeline {:allow {:account {:name :checked}}}} wrappers) => {:account {:name "Chris"}}

Works together with wrap-attr-model-allow to control access to data
(pipeline/normalise {:account/name "Chris"}
                     {:schema (schema/schema examples/account-name-age-sex)
                      :pipeline {:allow {}}}
                     *wrappers*)
=> (throws-info {:data {:name "Chris"}
                 :key-path [:account]
                 :normalise true
                 :not-allowed true
                 :nsv [:account]})

(pipeline/normalise {:account/name "Chris"}
                     {:schema (schema/schema examples/account-name-age-sex)
                      :pipeline {:allow {:account {:name :checked}}}}
                     *wrappers*)
=> {:account {:name "Chris"}}
raw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close