package octez-internal-libs
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=ddfb5076eeb0b32ac21c1eed44e8fc86a6743ef18ab23fff02d36e365bb73d61
sha512=d22a827df5146e0aa274df48bc2150b098177ff7e5eab52c6109e867eb0a1f0ec63e6bfbb0e3645a6c2112de3877c91a17df32ccbff301891ce4ba630c997a65
doc/octez-internal-libs.irmin/Irmin/Backend/Conf/index.html
Module Backend.ConfSource
Backend configuration.
A backend configuration is a set of keys mapping to typed values. Backends define their own keys.
Configuration converters
A configuration converter transforms a string value to an OCaml value and vice-versa.
Keys
The type for configuration keys whose lookup value is 'a.
val key :
?docs:string ->
?docv:string ->
?doc:string ->
?allow_duplicate:bool ->
spec:Spec.t ->
string ->
'a Type.t ->
'a ->
'a keykey ~docs ~docv ~doc ~spec name conv default is a configuration key named name that maps to value default by default. It will be associated with the config grouping spec. conv is used to convert key values provided by end users.
docs is the title of a documentation section under which the key is documented. doc is a short documentation string for the key, this should be a single sentence or paragraph starting with a capital letter and ending with a dot. docv is a meta-variable for representing the values of the key (e.g. "BOOL" for a boolean).
Configurations
The type for configurations.
equal is the equality for configuration values. Two values are equal if they have the same pp representation.
singleton spec k v is the configuration where k maps to v.
get c k is k's mapping in c.
Raises. Not_found if k is not bound in d.
verify t is an identity function that ensures all keys match the spec
Raises. Invalid_argument if t contains invalid keys
Built-in value converters
uri converts values with Uri.of_string.