environment

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EnvConfig

type EnvConfig struct {
	MinioEndpoint      string        `env:"MINIO_ENDPOINT"       envDefault:"localhost:9000"`
	MinioAccessKey     string        `env:"MINIO_ACCESS_KEY"`
	MinioAccessSecret  string        `env:"MINIO_ACCESS_SECRET"`
	MinioUseSSL        bool          `env:"MINIO_USE_SSL"        envDefault:"false"`
	MinioBucketName    string        `env:"MINIO_BUCKET_NAME"    envDefault:"minio-link"`
	MinioRegion        string        `env:"MINIO_REGION"         envDefault:"us-east-1"`
	MinioObjectLocking bool          `env:"MINIO_OBJECT_LOCKING" envDefault:"false"`
	MinioDefaultExpiry time.Duration `env:"MINIO_DEFAULT_EXPIRY" envDefault:"168h"`
	YourlsEndpoint     string        `env:"YOURLS_ENDPOINT"      envDefault:"http://localhost:8080"`
	YourlsSignatureKey string        `env:"YOURLS_SIGNATURE_KEY"`
}

EnvConfig is a struct that holds all the environment variables

func Load

func Load(envFiles ...string) (*EnvConfig, error)

Load loads the environment variables from environment or given files if specified

func (*EnvConfig) String

func (e *EnvConfig) String() string

Enables printing of config without sensitive data

Jump to

Keyboard shortcuts

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