config

package
v0.0.0-...-402233a Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2018 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadConfig

func LoadConfig(path string)

加载配置文件

Types

type Languges

type Languges struct {
	// contains filtered or unexported fields
}

语言包配置

func GetLanguge

func GetLanguge() *Languges

获取语言配置

func NewLanguges

func NewLanguges() *Languges

创建语言包

func (*Languges) Value

func (l *Languges) Value(code string, key string) string

获取配置

type Manager

type Manager struct {
	// contains filtered or unexported fields
}

配置管理器

type Serve

type Serve struct {
	Host              string  `yaml:"host"`                 // 主机地址
	Port              int     `yaml:"port"`                 // HTTP端口
	APIAccess         string  `yaml:"api_access"`           // API接入点
	SupportStaff      *int64  `yaml:"support_staff"`        // 电报客服ID
	SecretKey         string  `yaml:"secret_key"`           // 验证码密钥
	Token             string  `yaml:"token"`                // 机器人token
	Name              string  `yaml:"name"`                 // 资产名称
	Symbol            string  `yaml:"symbol"`               // 资产符号
	Precision         int     `yaml:"precision"`            // 资产精度
	WithdrawFee       float64 `yaml:"withdraw_fee"`         // 提现手续费
	BolTDBPath        string  `yaml:"boltdb_path"`          // BoltDB路径
	Languages         string  `yaml:"languages"`            // 语言配置路径
	Expire            uint32  `yaml:"expire"`               // 红包过期时间
	MaxMessageLen     int     `yaml:"max_message_len"`      // 最大留言长度
	MaxHistoryTextLen int     `yaml:"max_history_text_len"` // 历史文本长度
	ThumbURL          string  `yaml:"thumb_url"`            // 红包缩略图URL
}

服务配置

func GetServe

func GetServe() Serve

获取服务配置

Jump to

Keyboard shortcuts

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