File: configuration.mli

package info (click to toggle)
marionnet 0.90.6+bzr508-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 9,532 kB
  • sloc: ml: 18,130; sh: 5,384; xml: 1,152; makefile: 1,003; ansic: 275
file content (24 lines) | stat: -rw-r--r-- 1,338 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
type varname = string

val extract_string_variable_or :
  ?k:(string -> string) ->               (** An optional continuation *)
  ?unsuitable_value:(string -> bool) ->  (** Filter unsuitable values *)
  default:string ->                      (** The default value, if the variable is undeclared or its value unsuitable *)
  varname -> string                      (** The name of the variable *)

val extract_bool_variable_or :
  default:bool ->                        (** The default value, if the variable is undeclared or its value unsuitable *)
  varname -> bool                        (** The name of the variable *)

val get_string_variable :
  ?k:(string -> string option) ->        (** An optional continuation, applied with Option.bind *)
  ?unsuitable_value:(string -> bool) ->  (** Filter unsuitable values *)
  varname -> string option               (** The name of the variable *)

type source = [ `Filename of string | `Environment ] (* = Configuration_files.source *)

val get_string_variable_with_source :
  ?k:(string * source -> (string * source) option) ->  (** An optional continuation, applied with Option.bind *)
  ?unsuitable_value:(string * source -> bool) ->       (** Filter unsuitable values *)
  varname ->                                           (** The name of the variable *)
    (string * source) option