env

package
v0.0.0-...-d9433bb Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Get

func GetBoolean

func GetBoolean(e EnvironmentVariable) (bool, error)

func GetBooleanOr

func GetBooleanOr(e EnvironmentVariable, fallback bool) bool

func GetDuration

func GetDuration(e EnvironmentVariable) (time.Duration, error)

func GetDurationOr

func GetDurationOr(e EnvironmentVariable, fallback time.Duration) (time.Duration, error)

func GetEmail

func GetEmail(e EnvironmentVariable) (string, error)

func GetInt

func GetInt(e EnvironmentVariable) (int, error)

func GetOr

func GetOr(e EnvironmentVariable, fallback string) string

func GetUUID

func GetUUID(e EnvironmentVariable) (id uuid.UUID, err error)

func GetUint

func GetUint(e EnvironmentVariable) (uint, error)

Types

type EnvironmentVariable

type EnvironmentVariable string
const (
	LogLevel   EnvironmentVariable = "LOG_LEVEL"
	RedisURL   EnvironmentVariable = "REDIS_URL"
	APIPort    EnvironmentVariable = "API_PORT"
	APIVer     EnvironmentVariable = "API_VER"
	APIBase    EnvironmentVariable = "API_BASE"
	Stage      EnvironmentVariable = "STAGE"
	AppName    EnvironmentVariable = "APP_NAME"
	AppSecret  EnvironmentVariable = "APP_SECRET"
	AdminEmail EnvironmentVariable = "ADMIN_EMAIL"
	AdminPass  EnvironmentVariable = "ADMIN_PASSWORD"
)

func (EnvironmentVariable) String

func (e EnvironmentVariable) String() string

Jump to

Keyboard shortcuts

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