config

package
v0.0.10 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2024 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Config config

Functions

func InitConfigDefault

func InitConfigDefault()

func InitViper

func InitViper(filename string, fn func())

InitViper 初始化配置

Types

type DBConfig added in v0.0.9

type DBConfig struct {
	DriverName   string
	Enable       bool
	Database     string
	User         string
	Password     string
	Charset      string
	Host         string
	Port         int
	ShowSql      bool
	MaxIdleConns int
	MaxOpenConns int
	InitDbStruct bool
}

func (*DBConfig) Load added in v0.0.9

func (m *DBConfig) Load(prefix string)

Load 加载MySQL配置

func (*DBConfig) URL added in v0.0.9

func (m *DBConfig) URL() string

URL mysql连接字符串

type Eterm3

type Eterm3 struct {
	ServerIp   string
	Username   string
	Password   string
	CurIp      string
	Version    string
	VerifyCode string
	ServerPort int
}

func (*Eterm3) Load

func (e *Eterm3) Load(root, name string)

type Graylog

type Graylog struct {
	Host string
	Port int
}

Graylog graylog配置

func (*Graylog) Load

func (g *Graylog) Load(prefix string)

Load 加载Graylog配置

func (*Graylog) URL

func (g *Graylog) URL() string

URL graylog连接字符换

type Redis

type Redis struct {
	Host     string
	Port     int
	Password string
	DBNum    int
	Idlesec  int
}

Redis redis配置

func (*Redis) Load

func (r *Redis) Load(prefix string)

Load 加载Redis配置

func (*Redis) URL

func (r *Redis) URL() string

URL redis连接字符串

type TCP

type TCP struct {
	Port   int
	Enable bool
}

TCP TCP配置

func (*TCP) Load

func (t *TCP) Load()

Load 加载配置

Jump to

Keyboard shortcuts

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