config

package
v0.0.0-...-9dfc967 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2020 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BucketConfig

type BucketConfig struct {
	Name                    string `envvar:"NAME"`
	DefaultDownloadLinkTime int    `envvar:"DEFAULT_DOWNLOAD_LINK_TIME" default:"60"`
}

type DBConfig

type DBConfig struct {
	Address  string `envvar:"ADDRESS"`
	Port     int    `envvar:"PORT"`
	DBName   string `envvar:"NAME"`
	User     string `envvar:"USER"`
	Password string `envvar:"PASSWORD"`
}

type EnvVars

type EnvVars struct {
	DBConfig     DBConfig     `envvar:"DB_"`
	MinioConfig  MinioConfig  `envvar:"MINIO_"`
	BucketConfig BucketConfig `envvar:"BUCKET_"`
	ServerPort   int          `envvar:"PORT" default:"3000"`
	Environment  string       `envvar:"ENVIRONMENT" default:"local"`
}

func LoadEnvVars

func LoadEnvVars() (*EnvVars, error)

type MinioConfig

type MinioConfig struct {
	Endpoint  string `envvar:"ENDPOINT"`
	AccessKey string `envvar:"ACCESS_KEY"`
	SecretKey string `envvar:"SECRET_KEY"`
	SSL       bool   `envvar:"SSL"`
}

Jump to

Keyboard shortcuts

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