configMng

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ConfigPath           = "./configs/" // 路径写死
	DevPath              = "dev/"
	PdcPath              = "pdc/"
	AppConfigFileName    = "app.json"
	WechatConfigFileName = "wechat.json"
	MysqlConfigFileName  = "mysql.json"
	EsConfigFileName     = "es.json"
	RedisConfigFileName  = "redis.json"
	OssConfigFileName    = "oss.json"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AppConfig

type AppConfig struct {
	Debug    bool   `json:"debug"`
	HttpPort string `json:"http_port"`
}

func (AppConfig) MarshalEasyJSON

func (v AppConfig) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (AppConfig) MarshalJSON

func (v AppConfig) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*AppConfig) UnmarshalEasyJSON

func (v *AppConfig) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*AppConfig) UnmarshalJSON

func (v *AppConfig) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type ConfigMng

type ConfigMng struct{}

func (*ConfigMng) GetEs

func (*ConfigMng) GetEs() EsConfig

func (*ConfigMng) GetHttpPort

func (*ConfigMng) GetHttpPort() string

func (*ConfigMng) GetMysql

func (*ConfigMng) GetMysql() MysqlConfig

func (*ConfigMng) GetOss

func (*ConfigMng) GetOss() OssConfig

func (*ConfigMng) GetRedis

func (*ConfigMng) GetRedis() RedisConfig

func (*ConfigMng) GetWechat

func (*ConfigMng) GetWechat() WechatConfig

type EsConfig

type EsConfig struct {
	Host     string `json:"host"`
	Port     string `json:"port"`
	Username string `json:"username"`
	Password string `json:"password"`
}

func (EsConfig) MarshalEasyJSON

func (v EsConfig) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (EsConfig) MarshalJSON

func (v EsConfig) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*EsConfig) UnmarshalEasyJSON

func (v *EsConfig) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*EsConfig) UnmarshalJSON

func (v *EsConfig) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type MysqlConfig

type MysqlConfig struct {
	Host      string `json:"host"`
	Port      string `json:"port"`
	Username  string `json:"username"`
	Password  string `json:"password"`
	Collation string `json:"collation"`
	DbName    string `json:"db_name"`
	Charset   string `json:"charset"`
}

func (MysqlConfig) MarshalEasyJSON

func (v MysqlConfig) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (MysqlConfig) MarshalJSON

func (v MysqlConfig) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*MysqlConfig) UnmarshalEasyJSON

func (v *MysqlConfig) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*MysqlConfig) UnmarshalJSON

func (v *MysqlConfig) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type OssConfig

type OssConfig struct {
	AccessKeyID     string `json:"access_key_id"`
	AccessKeySecret string `json:"access_key_secret"`
	EndPoint        string `json:"end_point"`
	BucketName      string `json:"bucket_name"`
	UploadPath      string `json:"upload_path"`
	Host            string `json:"host"`
	CallBackUrl     string `json:"call_back_url"` //为上传回调服务器的URL,请将下面的IP和Port配置为您自己的真实信息。
	ExpireTime      int64  `json:"expire_time"`   // 上传策略Policy的失效时间,单位为秒。
}

func (OssConfig) MarshalEasyJSON

func (v OssConfig) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (OssConfig) MarshalJSON

func (v OssConfig) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*OssConfig) UnmarshalEasyJSON

func (v *OssConfig) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*OssConfig) UnmarshalJSON

func (v *OssConfig) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type RedisConfig

type RedisConfig struct {
	IP          string `json:"ip"`
	Port        string `json:"port"`
	Password    string `json:"password"`
	IdleTimeout int    `json:"idle_timeout"`
	Database    int    `json:"datebase"`
	MaxActive   int    `json:"max_active"`
	MaxIdle     int    `json:"max_idle"`
}

func (RedisConfig) MarshalEasyJSON

func (v RedisConfig) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (RedisConfig) MarshalJSON

func (v RedisConfig) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*RedisConfig) UnmarshalEasyJSON

func (v *RedisConfig) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*RedisConfig) UnmarshalJSON

func (v *RedisConfig) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type WechatConfig

type WechatConfig struct {
	AppID       string `json:"app_id"`
	AppSecret   string `json:"app_secret"`
	GrantType   string `json:"grant_type"`
	PayKey      string `json:"pay_key"`
	MechID      string `json:"mech_id"`
	NotifyUrl   string `json:"notify_url"`
	RefundUrl   string `json:"refund_url"`
	CertPath    string `json:"cert_path"`
	CertKeyPath string `json:"cert_key_path"`
}

func (WechatConfig) MarshalEasyJSON

func (v WechatConfig) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (WechatConfig) MarshalJSON

func (v WechatConfig) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*WechatConfig) UnmarshalEasyJSON

func (v *WechatConfig) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*WechatConfig) UnmarshalJSON

func (v *WechatConfig) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

Jump to

Keyboard shortcuts

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