configs

package
v0.0.0-...-03b02e1 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2024 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ViperTomlConfigurationType = "toml"
	ViperConfigurationName     = "config"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	AppName  string         `mapstructure:"APP_NAME"`
	WebPort  string         `mapstructure:"WEB_PORT"`
	Database ConfigDatabase `mapstructure:"DATABASE"`
	Cache    ConfigCache    `mapstructure:"CACHE"`
	Bcrypt   ConfigBcrypt   `mapstructure:"BCRYPT"`
	Jwt      ConfigJwt      `mapstructure:"JWT"`
}

type ConfigBcrypt

type ConfigBcrypt struct {
	Round int `mapstructure:"ROUND"`
}

type ConfigCache

type ConfigCache struct {
	DriverName string      `mapstructure:"DRIVER_NAME"`
	Redis      ConfigRedis `mapstructure:"REDIS"`
}

type ConfigDatabase

type ConfigDatabase struct {
	DriverName       string `mapstructure:"DRIVER_NAME"`
	ConnectionSource string `mapstructure:"CONNECTION_SOURCE"`
}

type ConfigJwt

type ConfigJwt struct {
	Algorithm string `mapstructure:"ALGORITHM"`
	KeySecret string `mapstructure:"KEY_SECRET"`
	Duration  int    `mapstructure:"DURATION"`
}

type ConfigRedis

type ConfigRedis struct {
	Host   string `mapstructure:"HOST"`
	Port   int    `mapstructure:"PORT"`
	DB     int    `mapstructure:"DB"`
	Pass   string `mapstructure:"PASS"`
	Prefix string `mapstructure:"PREFIX"`
}

Jump to

Keyboard shortcuts

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