Liking cljdoc? Tell your friends :D

pronto.core


->kebab-caseclj

(->kebab-case s)

Converts s, assumed to be in snake_case, to kebab-case

Converts `s`, assumed to be in snake_case, to kebab-case
sourceraw docstring

assoc-ifclj

(assoc-if m k v)
source

bytes->proto-mapcljmacro

(bytes->proto-map mapper clazz bytes)

Deserializes bytes into a proto-map for the given clazz

Deserializes `bytes` into a proto-map for the given `clazz`
sourceraw docstring

clear-fieldclj

(clear-field m k)
source

clear-field!clj

(clear-field! m k)
source

clj-map->proto-mapcljmacro

(clj-map->proto-map mapper clazz m)

Translate a map to a proto-map for the supplied class using mapper m. The converted map must not violate the class schema, i.e, it must have matching keyword names as well as value types.

Translate a map to a proto-map for the supplied class using mapper `m`.
The converted map must not violate the class schema, i.e, it must have matching
keyword names as well as value types.
sourceraw docstring

defmappercljmacro

(defmapper name classes & opts)

Define a new proto mapper for the supplied classes using the supplied options.

Supported options: :key-name-fn - a function that maps a field name, default identity

:enum-value-fn - a function that maps enum values, default identity

:iter-xf - a transducer for key-value map pairs

:encoders - encoders map, {class->{:from-proto fn, :to-proto fn}}

Define a new proto mapper for the supplied classes using the supplied options.

Supported options:
:key-name-fn - a function that maps a field name, default `identity`

:enum-value-fn - a function that maps enum values, default `identity`

:iter-xf - a transducer for key-value map pairs

:encoders - encoders map, `{class->{:from-proto fn, :to-proto fn}}`
sourceraw docstring

dependenciesclj

(dependencies clazz)

Return class dependencies for clazz.

Return class dependencies for `clazz`.
sourceraw docstring

depends-on?clj

(depends-on? dependent dependency)
source

has-field?clj

(has-field? m k)
source

one-ofclj

(one-of m k)
source

p->cljmacro

(p-> x & forms)

Like -> but meant to be used where the initial expression evaluates to a proto-map. Under the hood, p-> will operate on a transient version of the proto-map and persistent! it back when done. Expressions will be pipelined as much as possible (but never reordered) such that (p-> person-proto (assoc-in [:pet :name] "patch") (assoc-in [:pet :kind] :cat)) will only generate a single instance of a pet transient map to which both operations will be applied in succession.

Like `->` but meant to be used where the initial expression evaluates to a proto-map. Under the hood, `p->` will operate on a transient version of the proto-map and `persistent!` it back when done. Expressions will be pipelined as much as possible (but never reordered) such that `(p-> person-proto (assoc-in [:pet :name] "patch") (assoc-in [:pet :kind] :cat))` will only generate a single instance of a pet transient map to which both operations will be applied in succession.
sourceraw docstring

pcond->cljmacro

(pcond-> expr & clauses)

Equivalent to cond->. See p->

Equivalent to cond->. See `p->`
sourceraw docstring

proto->proto-mapclj

(proto->proto-map mapper proto)

Wraps a new proto-map around proto, a POJO.

Wraps a new proto-map around `proto`, a POJO.
sourceraw docstring

proto-mapcljmacro

(proto-map mapper clazz & kvs)

Returns a new proto-map for the supplied class, via mapper, initialized to the optionally supplied key-value pairs.

Returns a new proto-map for the supplied class, via `mapper`, initialized
to the optionally supplied key-value pairs.
sourceraw docstring

proto-map->bytesclj

(proto-map->bytes proto-map)

Serializes proto-map to protobuf binary

Serializes `proto-map` to protobuf binary
sourceraw docstring

proto-map->clj-mapclj

(proto-map->clj-map proto-map)
(proto-map->clj-map proto-map xform)

Recursively converts a proto-map to a regular Clojure map.

Recursively converts a proto-map to a regular Clojure map.
sourceraw docstring

proto-map->protoclj

(proto-map->proto m)

Returns the protobuf instance associated with the proto-map

Returns the protobuf instance associated with the proto-map
sourceraw docstring

proto-map?clj

(proto-map? m)
source

remapclj

(remap mapper proto-map)

Remaps proto-map using mapper. The returned proto-map is subject to the configuration of the new mapper.

Remaps `proto-map` using `mapper`.
The returned proto-map is subject to the configuration of the new mapper.
sourceraw docstring

remove-default-values-xfclj

source

which-one-ofclj

(which-one-of m k)
source

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

× close