Structures

The following structures are available globally.

  • Represents a KEY=VALUE pair in a dotenv file.

    See more

    Declaration

    Swift

    public struct Line : CustomStringConvertible, Equatable
  • An environment variable loader.

    You can either read the file and then load it or load in one step.

    // read and then load
    let path: String
    var env = try DotEnv.read(path: path)
    env.lines // [Line] (key=value pairs)
    env.load()
    print(ProcessInfo.processInfo.environment["FOO"]) // BAR
    

    or

    // load it
    let path: String
    var env = try DotEnv.load(path: path)
    env.lines // [Line] (key=value pairs)
    print(ProcessInfo.processInfo.environment["FOO"]) // BAR
    
    See more

    Declaration

    Swift

    public struct DotEnv
  • Parse byte arrays, which are [UInt8]

    See more

    Declaration

    Swift

    internal struct ByteArrayParser : Parser
  • String parser wrapper around ByteArrayParser

    See more

    Declaration

    Swift

    internal struct StringParser : Parser
  • Parse swift-nio‘s ByteBuffer

    See more

    Declaration

    Swift

    internal struct ByteBufferParser : Parser