config

package
v0.0.0-...-dc61bab Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const EnvPrefix = "URL_SHRTNR"

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Environment Environment              `mapstructure:"environment"`
	HTTP        httpserver.Config        `mapstructure:"http"`
	Database    repository.Config        `mapstructure:"database"`
	Logger      log.Config               `mapstructure:"logger"`
	Redis       redis.Config             `mapstructure:"redis"`
	Hasher      hash.Config              `mapstructure:"hasher"`
	JWT         service.JWTServiceConfig `mapstructure:"jwt"`
}

Config -.

func Read

func Read(dir string) (Config, error)

Read -.

type Environment

type Environment string
const (
	OmitEnvironment        Environment = ""
	TestingEnvironment     Environment = "testing"
	DevelopmentEnvironment Environment = "development"
	ProductionEnvironment  Environment = "production"
)

func (Environment) ConfigName

func (env Environment) ConfigName() string

func (Environment) Validate

func (env Environment) Validate() error

Jump to

Keyboard shortcuts

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