package config import ( "github.com/zeromicro/go-zero/core/stores/cache" "github.com/zeromicro/go-zero/rest" "github.com/zeromicro/go-zero/zrpc" ) type CacheRedisConf struct { Nodes cache.CacheConf KeyPrefix string `json:",optional"` } type CapjsConf struct { Enable int64 `json:",optional"` // 1 启用,0 或未配置则禁用 EndpointURL string `json:",optional"` // cap.js 服务地址,如 https://cap.example.com Key string `json:",optional"` // cap.js site key Secret string `json:",optional"` // cap.js site secret(用于服务端 siteverify) } type MinioFileTypeConf struct { Bucket string Dir string AllowedContentTypes []string `json:",optional"` } type MinioConf struct { Name string AccessKeyId string AccessKeySecret string Endpoint string Domain string UseSSL bool `json:",default=false"` FileType map[string]MinioFileTypeConf `json:",optional"` } type Config struct { rest.RestConf RpcServerConf zrpc.RpcServerConf MySQL struct { DataSource string } CacheRedis CacheRedisConf Auth struct { AccessSecret string AccessExpire int64 RefreshSecret string RefreshExpire int64 ManagementKey string } Capjs CapjsConf `json:",optional"` Minio MinioConf `json:",optional"` BehindProxy bool `json:",optional"` }