Module Gemini.Cfg

val create_config_dir : unit -> unit Async_kernel__Deferred.t
val host : env:string -> string
val version_1 : string
module type S = sig ... end

Gemini configuration. These values are the only necessary parameters and secrets to connect to an endpoint.

val api_key : ?default:string -> env:string -> unit -> string
val api_secret : ?default:string -> env:string -> unit -> string
val make : string -> (module S)

Makes a configuration module given a desired Gemini environment. It then infers the values from environment variables.

Any required fields not specified will generate a runtime error.

module Sandbox () : sig ... end

Creates a configuration module for the sandbox environment. Will query the unix environment for the necessary parameters.

module Production () : sig ... end

Creates a configuration module for the production environment. Will query the unix environment for the necessary parameters.

val of_string : string -> (module S)

Produces a configuration module given a string environment name which should be one of "production" or "sandbox".

val arg_type : (module S) Async.Command.Arg_type.t
val param : (module S) Base.option Async.Command.Param.t
val or_default : (module S) option -> (module S)

Ensures a configuration chosen given an optional configuration module, usually provided from the command line. If the module is provided, it returns it unwrapped. Otherwise the unix environment is queried to produce a module, defaulting to sandbox if no environment variables exist.