env

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2024 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	EnvironmentVariableNotFoundError      = "environment variable not found: %v"
	FailedToLoadEnvironmentVariablesError = errors.New("failed to load environment variables")
	InvalidDurationError                  = "invalid key '%v' duration value: %v"
)

Functions

func LoadDurationVariable added in v0.2.0

func LoadDurationVariable(key string) (duration time.Duration, err error)

LoadDurationVariable load duration variable from environment variables

func LoadSecondsVariable added in v0.2.0

func LoadSecondsVariable(key string) (seconds float64, err error)

LoadSecondsVariable load duration variable in seconds from environment variables

func LoadVariable

func LoadVariable(key string) (uri string, err error)

LoadVariable load variable from environment variables

Types

type Logger

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

Logger is the environment logger

func NewLogger

func NewLogger(logger gologger.Logger) (*Logger, error)

NewLogger creates a new environment logger

func (*Logger) EnvironmentVariableLoaded

func (l *Logger) EnvironmentVariableLoaded(variablesName ...string)

EnvironmentVariableLoaded logs a message when an environment variable is loaded

Jump to

Keyboard shortcuts

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