package irmin
- Overview
- No Docs
You can search for identifiers within the package.
in-package search v0.2.0
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=95a87ecc3dc2b35eee56cb351c32d2bd78c8967180a4b028324d815bfce1a6ff
sha512=20faba561c80c5389e91993d7e2cc0cedd1330cf098b68f0456f5068cde369a5589a05cd2aeb0a701d65a7d1e1e6f4045ccfbf60349cbea2bfd02981d7bb244c
doc/irmin/Irmin/Backend/Conf/index.html
Module Backend.Conf
Source
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 ->
spec:Spec.t ->
string ->
'a Type.t ->
'a ->
'a key
key ~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).
Warning. No two keys should share the same name
as this may lead to difficulties in the UI.
Configurations
The type for configurations.
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
.