config

package
v0.0.0-...-dd08621 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ProviderSet = wire.NewSet(LoadConfig)

Functions

This section is empty.

Types

type Config

type Config struct {
	Environment          string        `mapstructure:"environment"`
	DBDriver             string        `mapstructure:"db_driver"`
	DBSource             string        `mapstructure:"db_source"`
	RedisAddress         string        `mapstructure:"redis_address"`
	HTTPServerAddress    string        `mapstructure:"http_server_address"`
	GRPCServerAddress    string        `mapstructure:"grpc_server_address"`
	TokenSymmetricKey    string        `mapstructure:"token_symmetric_key"`
	AccessTokenDuration  time.Duration `mapstructure:"access_token_duration"`
	RefreshTokenDuration time.Duration `mapstructure:"refresh_token_duration"`
}

Config stores all configuration of the application. The values are read by viper from a config file or environment variable.

func LoadConfig

func LoadConfig(path Path) (config *Config, err error)

LoadConfig reads configuration from file or environment variables.

type Path

type Path string

Jump to

Keyboard shortcuts

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