conf

package
v0.0.0-...-66c47ec Latest Latest
Warning

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

Go to latest
Published: May 30, 2024 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

This section is empty.

Types

type AppConfig

type AppConfig struct {
	Name          string `mapstructure:"name"`
	Mode          string `mapstructure:"mode"`
	Port          int    `mapstructure:"port"`
	Version       string `mapstructure:"version"`
	StartTime     string `mapstructure:"start_time"`
	MachineId     uint16 `mapstructure:"machine_id"`
	JwtKey        string `mapstructure:"jwt_key"`
	*MysqlConfig  `mapstructure:"mysql"`
	*RedisConfig  `mapstructure:"redis"`
	*EtcdConfig   `mapstructure:"etcd"`
	*LogConfig    `mapstructure:"log"`
	*ServerConfig `mapstructure:"server"`
}

type EtcdConfig

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

type LogConfig

type LogConfig struct {
	Level      string `mapstructure:"level"`
	Filename   string `mapstructure:"filename"`
	MaxSize    int    `mapstructure:"max_size"`
	MaxBackups int    `mapstructure:"max_backups"`
	MaxAge     int    `mapstructure:"max_age"`
	LocalTime  bool   `mapstructure:"local_time"`
}

type MysqlConfig

type MysqlConfig struct {
	Host         string `mapstructure:"host"`
	User         string `mapstructure:"user"`
	Password     string `mapstructure:"password"`
	DB           string `mapstructure:"dbname"`
	Port         int    `mapstructure:"port"`
	SSLMode      string `mapstructure:"sslmode"`
	MaxOpenConns int    `mapstructure:"max_open_conns"`
	MaxIdleConns int    `mapstructure:"max_idle_conns"`
	TimeZone     string `mapstructure:"time_zone"`
}

type RedisConfig

type RedisConfig struct {
	Host          string `mapstructure:"host"`
	Password      string `mapstructure:"password"`
	Port          int    `mapstructure:"port"`
	DB            int    `mapstructure:"db"`
	PoolSize      int    `mapstructure:"pool_size"`
	MinIdleConns  int    `mapstructure:"min_idle_conns"`
	ConnectType   string `mapstructure:"connect_type"`
	SSHRemoteHost string `mapstructure:"ssh_remote_host"`
	SSHFile       string `mapstructure:"ssh_file"`
}

type ServerConfig

type ServerConfig struct {
	UserSrvAddress string `mapstructure:"user_srv_address"`
	PdfSrvAddress  string `mapstructure:"pdf_srv_address"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳