envie/dotenv
Types
pub type DotenvSource {
Override(path: String)
Optional(path: String)
Required(path: String)
}
Constructors
-
Override(path: String) -
Optional(path: String) -
Required(path: String)
pub type LoadSchemaError {
LoadError(error.LoadError)
ConfigError(error.Error)
}
Constructors
-
LoadError(error.LoadError) -
ConfigError(error.Error)
Values
pub fn load(
sources: List(DotenvSource),
) -> Result(Nil, error.LoadError)
pub fn load_schema(
source: DotenvSource,
schema: schema.Schema(a),
) -> Result(a, LoadSchemaError)
pub fn load_schema_from(
sources: List(DotenvSource),
schema: schema.Schema(a),
) -> Result(a, LoadSchemaError)
pub fn optional(path: String) -> DotenvSource
pub fn override(path: String) -> DotenvSource
pub fn parse(
content: String,
) -> Result(List(#(String, String)), List(error.ParseError))
pub fn parse_file(
path: String,
) -> Result(List(#(String, String)), error.LoadError)
pub fn required(path: String) -> DotenvSource