configs

package
v0.0.0-...-23aae7a Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2025 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	App struct {
		Name string `mapstructure:"name"`
		Mode string `mapstructure:"mode"` // debug or release
		Host string `mapstructure:"host"`
		Port uint32 `mapstructure:"port"`
	} `mapstructure:"app"`

	Postgres struct {
		Address  string `mapstructure:"address"`
		Name     string `mapstructure:"name"`
		User     string `mapstructure:"user"`
		Password string `mapstructure:"password"`
		Port     uint32 `mapstructure:"port"`
		SSLMode  string `mapstructure:"sslmode"`
		Timezone string `mapstructure:"timezone"`

		Base struct {
			MaxOpenConn     int           `mapstructure:"max-open-conn"`
			MaxIdleConn     int           `mapstructure:"max-idle-conn"`
			ConnMaxLifeTime time.Duration `mapstructure:"conn-max-life-time"`
			ConnMaxIdleTime time.Duration `mapstructure:"conn-max-idle-time"`
		} `mapstructure:"base"`
	} `mapstructure:"postgres"`

	Password struct {
		Pepper string `mapstructure:"pepper"`

		Argon2 struct {
			Memory      uint32 `mapstructure:"memory"`
			Iterations  uint32 `mapstructure:"iterations"`
			Parallelism uint8  `mapstructure:"parallelism"`
			SaltLength  uint32 `mapstructure:"salt-length"`
			KeyLength   uint32 `mapstructure:"key-length"`
		} `mapstructure:"argon2"`
	} `mapstructure:"password"`

	JWT struct {
		PubKeyPath  string `mapstructure:"pub-key-path"`
		PrivKeyPath string `mapstructure:"priv-key-path"`
	} `mapstructure:"jwt"`
}

func Get

func Get() Config

Jump to

Keyboard shortcuts

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