Liking cljdoc? Tell your friends :D
Clojure only.

com.timezynk.domain.mask

Implementation of DTC property masks.

A property is redacted from the document if the following conditions are met:

  • property has been annotated with a :mask f attribute
  • f is a function
  • (f dtc doc action property-name) is truthy at the time of deferral

Example: (defn mf "Property :y is read-only, disable writing!" [dtc doc action property-name] (not= :read action))

(def dtc (dom-type-collection :name :qwerty :properties {:x (s/string) :y (s/string :mask mf) :z (s/string)}))

Implementation of DTC property masks.

A property is redacted from the document if the following conditions are met:
 * property has been annotated with a :mask f attribute
 * f is a function
 * (f dtc doc action property-name) is truthy at the time of deferral

Example:
(defn mf
  "Property :y is read-only, disable writing!"
  [dtc doc action property-name]
  (not= :read action))

(def dtc
  (dom-type-collection :name :qwerty
                       :properties {:x (s/string)
                                    :y (s/string :mask mf)
                                    :z (s/string)}))
raw docstring

build-stationclj

(build-station action)

Builds a station which redacts from doc those properties, which:

  • have been marked for masking
  • pass the mask test
Builds a station which redacts from doc those properties, which:
* have been marked for masking
* pass the mask test
sourceraw docstring

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

× close