configurator

package
v0.1.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 4, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Configurator

type Configurator struct {
	// contains filtered or unexported fields
}

func NewConfig

func NewConfig(opts ...Option) (*Configurator, error)

func (*Configurator) LoadEnv

func (cfg *Configurator) LoadEnv(output any) error

LoadEnv loads the environment variables into the struct

func (*Configurator) LoadEnvFromFile

func (cfg *Configurator) LoadEnvFromFile(output any) error

LoadEnvFromFile loads the environment variables into the struct

func (*Configurator) LoadSettings

func (cfg *Configurator) LoadSettings(environment string, settings any) error

type Option

type Option interface {
	// contains filtered or unexported methods
}

func WithConfigPath

func WithConfigPath(path string) Option

func WithEnvPath

func WithEnvPath(path string) Option

func WithOptionalEnv

func WithOptionalEnv(env string) Option

func WithRequiredEnv

func WithRequiredEnv(env string) Option

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL