Documentation ¶
Index ¶
- func Get(ctx context.Context, pattern string, def ...interface{}) (*gvar.Var, error)
- func GetBool(ctx context.Context, pattern string, def ...interface{}) (bool, error)
- func GetInt(ctx context.Context, pattern string, def ...interface{}) int
- func GetMapStrStr(ctx context.Context, pattern string, def ...interface{}) map[string]string
- func GetString(ctx context.Context, pattern string, def ...interface{}) string
- type App
- type Config
- type CosSystem
- type Email
- type Filesystem
- type Http
- type Jwt
- type LocalSystem
- type OssSystem
- type QiniuSystem
- type Vip
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetMapStrStr ¶
Types ¶
type Config ¶
type Config struct { App *App `json:"app"` Jwt *Jwt `json:"jwt"` Filesystem *Filesystem `json:"filesystem"` Email *Email `json:"email"` Http *Http `json:"http"` Vip *Vip `json:"vip"` // contains filtered or unexported fields }
配置信息
var Cfg *Config
type CosSystem ¶
type CosSystem struct { SecretId string `json:"secret_id"` SecretKey string `json:"secret_key"` Bucket string `json:"bucket"` Region string `json:"region"` }
腾讯云 COS 文件存储
type Email ¶
type Email struct { Host string `json:"host"` // smtp.xxx.com Port int `json:"port"` // 端口号 UserName string `json:"username"` // 登录账号 Password string `json:"password"` // 登录密码 FromName string `json:"fromname"` // 发送人名称 }
邮件配置信息
type Filesystem ¶
type Filesystem struct { Default string `json:"default"` Local LocalSystem `json:"local"` Oss OssSystem `json:"oss"` Qiniu QiniuSystem `json:"qiniu"` Cos CosSystem `json:"cos"` }
type Jwt ¶
type Jwt struct { Secret string `json:"secret"` // Jwt 秘钥 ExpiresTime int64 `json:"expires_time"` // 过期时间(单位秒) BufferTime int64 `json:"buffer_time"` // 缓冲时间(单位秒) }
Jwt相关配置信息
type LocalSystem ¶
本地存储
type OssSystem ¶
type OssSystem struct { AccessID string `json:"access_id"` AccessSecret string `json:"access_secret"` Bucket string `json:"bucket"` Endpoint string `json:"endpoint"` }
阿里云 OSS 文件存储
Click to show internal directories.
Click to hide internal directories.