config

package
v0.0.0-...-8336b8e Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2023 License: MIT Imports: 4 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 {
	*Server      `mapstructure:"server"`
	*Mysql       `mapstructure:"mysql"`
	*Redis       `mapstructure:"redis"`
	*JWTConfig   `mapstructure:"jwt"`
	*EmailConfig `mapstructure:"email"`
}

func GetConfig

func GetConfig() *Config

type EmailConfig

type EmailConfig struct {
	Host     string `mapstructure:"host"`
	Port     int    `mapstructure:"port"`
	Username string `mapstructure:"username"`
	Password string `mapstructure:"password"`
	From     string `mapstructure:"from"`
}

type JWTConfig

type JWTConfig struct {
	SigningKey  string `mapstructure:"signing_key"`
	ExpireTime  int    `mapstructure:"expire_time"`
	RefreshTime int    `mapstructure:"refresh_time"`
}

type Mysql

type Mysql struct {
	Username string `mapstructure:"username"`
	Password string `mapstructure:"password"`
	Host     string `mapstructure:"host"`
	Port     string `mapstructure:"port"`
	Database string `mapstructure:"database"`
}

type Redis

type Redis struct {
	Username string `mapstructure:"username"`
	Password string `mapstructure:"password"`
	Host     string `mapstructure:"host"`
	Port     string `mapstructure:"port"`
	Database int    `mapstructure:"database"`
}

type Server

type Server struct {
	Host string `mapstructure:"host"`
	Port string `mapstructure:"port"`
}

Jump to

Keyboard shortcuts

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