configs

package
v0.0.0-...-a3e8f81 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	Addr string `yaml:"Addr"`
	Mode string `yaml:"Mode"`
}

type Config

type Config struct {
	App   App          `yaml:"App"`
	DB    DB           `yaml:"DB"`
	Redis Redis        `yaml:"Redis"`
	Log   xslog.Config `yaml:"Log"`
	Jwt   Jwt          `yaml:"Jwt"`
}

func InitConfig

func InitConfig() (*Config, error)

func (*Config) IsDebugMode

func (c *Config) IsDebugMode() bool

func (*Config) IsReleaseMode

func (c *Config) IsReleaseMode() bool

type DB

type DB struct {
	Dialect     string `yaml:"Dialect"`
	DSN         string `yaml:"DSN"`
	MaxIdle     int    `yaml:"MaxIdle"`
	MaxActive   int    `yaml:"MaxActive"`
	MaxLifetime int    `yaml:"MaxLifetime"`
	AutoMigrate bool   `yaml:"AutoMigrate"`
}

type Jwt

type Jwt struct {
	Secret string `yaml:"Secret"`
	Issuer string `yaml:"Issuer"`
}

type Redis

type Redis struct {
	Addr     string `yaml:"Addr"`
	DB       int    `yaml:"DB"`
	Password string `yaml:"Password"`
}

Jump to

Keyboard shortcuts

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