JsonConfig

package
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Initialize

func Initialize()

配置文件初始化

Types

type AWSConfig

type AWSConfig struct {
	BucketName string `json:"bucket"`
	Folder     string `json:"folder"`
	Region     string `json:"region"`
	AWSKey     string `json:"aws_access_key_id"`
	AWSSkey    string `json:"aws_secret_access_key"`
	AWSToken   string `json:"aws_session_token"`
}

type ActivityServerConfig

type ActivityServerConfig struct {
	Host string `json:"host"`
	Port uint32 `json:"port"`
}

type BasicConfig

type BasicConfig struct {
	DebugFlag bool   `json:"debug_flag"`
	Manual    bool   `json:"manual"`
	UUID      string `json:"uuid"`
	ServerID  uint32 `json:"server_id"`

	ServerName               string `json:"server_name"`
	ServerHost               string `json:"server_host"`
	Port                     uint32 `json:"port"`
	EnableGM                 bool   `json:"enable_gm"`
	EnablePanicOnLockTimeout bool   `json:"enable_panic_on_lock_timeout"`
	ServerUrl                string `json:"server_url"`
	ServerInitTime           uint64 `json:"server_inittime"`
	CanMoveInto              bool   `json:"canmoveinto"`
	RpcPort                  uint32 `json:"rpc_port"`
	UseGzip                  bool   `json:"useGzip"`
	GzipMinSize              int32  `json:"GzipMinSize"`
	NotCheckUid              bool   `json:"not_check_uid"`
	PprofPort                string `json:"pprof_port"`
	Compensation             bool   `json:"compensation"`
	Version                  string `json:"version"`
	Chat_AppKey              string `json:"Chat_AppKey"`
	Chat_Secret              string `json:"Chat_Secret"`
}

基本配置

type CenterServerConfig

type CenterServerConfig struct {
	Host string `json:"host"`
	Port uint32 `json:"port"`
}

中心服务器配置

type Config

type Config struct {
	Basic            BasicConfig            `json:"basic"`
	Log              LogConfig              `json:"log"`
	OSS              OSSConfig              `json:"oss"`
	TranslateService TranslateServiceConfig `json:"translate_service"`
	PushService      PushServiceConfig      `json:"push_service"`
	CenterServer     CenterServerConfig     `json:"center_server"`
	UniqueServer     UniqueServerConfig     `json:"unique_server"`
	ActivityServer   ActivityServerConfig   `json:"activity_server"`
	DB               DBConfig               `json:"db"`
	AWS              AWSConfig              `json:"aws"`
	SSData           SSDataConf             `json:"ssdata"`
	LoginServer      LoginServerConf        `json:"login_server"`
	MailServer       MailServerConf         `json:"mail_server"`
	GlobalServer     GlobalServerConf       `json:"global_server"`
}

所有配置

var (
	GlobalConfig *Config
)

type DBConfig

type DBConfig struct {
	ConnectionString string `json:"connection_string"`
	DBName           string `json:"db_name"`
}

数据库配置

type GlobalServerConf

type GlobalServerConf struct {
	Host string `json:"host"`
	Port uint32 `json:"port"`
}

type LogConfig

type LogConfig struct {
	LogLevel uint32 `json:"log_level"`
	ToSTD    bool   `json:"to_std"`
}

日志配置

type LoginServerConf

type LoginServerConf struct {
	Url  string `json:"url"`
	Host string `json:"host"`
	Port uint32 `json:"port"`
}

type MailServerConf

type MailServerConf struct {
	Host string `json:"host"`
	Port uint32 `json:"port"`
}

type OSSConfig

type OSSConfig struct {
	Enable  bool   `json:"enable"`
	Host    string `json:"host"`
	Port    uint32 `json:"port"`
	Region  string `json:"region"`
	Channel string `json:"channel"`
}

OSS配置

type PushServiceConfig

type PushServiceConfig struct {
	Enable      bool   `json:"enable"`
	URL         string `json:"url"`
	PopActivity string `json:"pop_activity"`
}

推送配置

type SSDataConf

type SSDataConf struct {
	Enable bool   `json:"enable"`
	Url    string `json:"url"`
	Debug  bool   `json:"debug"`
	AppId  string `json:"appid"`
}

type TranslateServiceConfig

type TranslateServiceConfig struct {
	URL  string `json:"url"`
	Host string `json:"host"`
	Port uint32 `json:"port"`
}

翻译配置

type UniqueServerConfig

type UniqueServerConfig struct {
	Host string `json:"host"`
	Port uint32 `json:"port"`
	DB   string `json:"db"`
}

Jump to

Keyboard shortcuts

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