env

package
v0.0.0-...-4367a76 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrEmpty                = errors.New("can't be empty")
	ErrRead                 = errors.New("couldn't be read")
	ErrNotChecked           = errors.New("couldn't be checked")
	ErrInvalid              = errors.New("is invalid")
	ErrInvalidOrUnsupported = errors.New("is invalid or unsupported")
	ErrNullOrNegative       = errors.New("can't be null or negative")
	ErrSuperior             = errors.New("can't be superior to")
	ErrInferior             = errors.New("can't be inferior to")
)

Define all the errors for the env package.

Functions

This section is empty.

Types

type Env

type Env struct {
	PortStr                string
	InstanceName           string
	InstanceURL            string
	DBType                 string
	DBURL                  string
	ContactEmail           string
	TimeBetweenCleanups    int
	DefaultLength          int
	DefaultMaxLength       int
	DefaultMaxCustomLength int
	DefaultExpiryTime      int
}

Env defines a structure for the env variables.

func GetEnv

func GetEnv(envFile string) Env

GetEnv gets the env variables from given .env.

func (Env) EnvCheck

func (env Env) EnvCheck() error

EnvCheck checks the values of the Env struct.

Jump to

Keyboard shortcuts

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