| 12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- 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 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"`
- BehindProxy bool `json:",optional"`
- }
|