Discover Packages
github.com/fhy/utils-golang
config
package
Version:
v0.0.6-alpha
Opens a new window with list of versions in this module.
Published: Sep 24, 2023
License: BSD-2-Clause
Opens a new window with license information.
Imports: 6
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
func FormatConfig(config interface{})
type Aliyun struct {
AccessKeyId string `yaml:"id"`
AccessKeySecret string `yaml:"secret"`
RegionId string `yaml:"region"`
}
type CookieConfig struct {
Domain string `yaml:"domain"`
AgeMax int `yaml:"age"`
}
type DingTalkConfig struct {
AppKey string `yaml:"id"`
AppSecret string `yaml:"secret"`
}
type Jwt struct {
Issuer string `yaml:"issuer"`
PubKeyPath string `yaml:"pubkey"`
PrivKeyPath string `yaml:"privkey"`
Secret string `yaml:"secret"`
}
jwt
type LogConfig struct {
Path string `yaml:"path"`
RotationCount int `yaml:"rotation_count"`
Level string `yaml:"level"`
}
type MiniProgramConfig struct {
AppID string `yaml:"appID"`
AppSecret string `yaml:"appSecret"`
}
type MongoDBConfig struct {
Host string `yaml:"host"`
Port int `yaml:"port"`
Username string `yaml:"username"`
Password string `yaml:"password"`
DB string `yaml:"db"`
Timeout int `yaml:"timeout"`
LogLevel options .LogLevel `yaml:"logLevel"`
}
type OfficialAccountConfig struct {
AppID string `yaml:"appID"`
AppSecret string `yaml:"appSecret"`
Token string `yaml:"token"`
EncodingAESKey string `yaml:"encodingAESKey"`
}
type Oss struct {
AccessKeyId string `yaml:"id"`
AccessKeySecret string `yaml:"secret"`
Endpoint string `yaml:"endpoint"`
Bucket string `yaml:"bucket"`
Prefix string `yaml:"prefix"`
}
type RedisConfig struct {
Host string `yaml:"host"`
Port int `yaml:"port"`
Password string `yaml:"password"`
MaxActive int `yaml:"maxActive"`
MaxIdle int `yaml:"maxIdle"`
IdleTimeout int `yaml:"idleTimeout"`
DB int `yaml:"db"`
}
type RocketMQConfig struct {
Host string `yaml:"host"`
Port int `yaml:"port"`
AccessKey string `yaml:"access"`
SecretKey string `yaml:"secret"`
}
type Server struct {
IP string `yaml:"ip"`
Port int `yaml:"port"`
ReadTimeout int `yaml:"readtimeout"`
WriteTimeout int `yaml:"writetimeout"`
}
type SqliteConfig struct {
DbFile string `yaml:"dbfile"`
}
type WechatPayConfig struct {
AppID string `yaml:"app_id"`
MchID string `yaml:"mch_id"`
Key string `yaml:"key"`
NotifyURL string `yaml:"notify_url"`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.