Module Credentials.Env

type 'a t = ('a, Awskit.Error.t) Stdlib.Result.t

A result type for environment operations.

type getenv = string -> string option

Environment lookup function used by injectable providers.

module Let_syntax : sig ... end
val required : ?getenv:getenv -> string -> string t

Read a required environment variable. Returns an error if missing or empty.

val optional : ?getenv:getenv -> string -> string option t

Read an optional environment variable. Returns None if unset and a validation error if set to the empty string.