优化
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
package dto
|
||||
|
||||
import "kra/internal/conf"
|
||||
import "encoding/json"
|
||||
|
||||
type SecurityConfigRequest struct {
|
||||
ID uint `json:"ID"`
|
||||
@@ -26,84 +26,5 @@ type SecurityConfigRequest struct {
|
||||
}
|
||||
|
||||
type SetSystemConfigRequest struct {
|
||||
Config struct {
|
||||
Data *struct {
|
||||
Database *struct {
|
||||
Driver string `json:"driver"`
|
||||
Source string `json:"source"`
|
||||
Host string `json:"host"`
|
||||
Port string `json:"port"`
|
||||
User string `json:"user"`
|
||||
Password string `json:"password"`
|
||||
Name string `json:"name"`
|
||||
Config string `json:"config"`
|
||||
Path string `json:"path"`
|
||||
Prefix string `json:"prefix"`
|
||||
Engine string `json:"engine"`
|
||||
LogMode string `json:"log_mode"`
|
||||
MaxIdleConns int32 `json:"max_idle_conns"`
|
||||
MaxOpenConns int32 `json:"max_open_conns"`
|
||||
ConnMaxLifetime int32 `json:"conn_max_lifetime"`
|
||||
Singular bool `json:"singular"`
|
||||
} `json:"database"`
|
||||
Redis *struct {
|
||||
Network string `json:"network"`
|
||||
Addr string `json:"addr"`
|
||||
ReadTimeout string `json:"read_timeout"`
|
||||
WriteTimeout string `json:"write_timeout"`
|
||||
Name string `json:"name"`
|
||||
Password string `json:"password"`
|
||||
DB int32 `json:"db"`
|
||||
UseCluster bool `json:"use_cluster"`
|
||||
ClusterAddrs []string `json:"cluster_addrs"`
|
||||
} `json:"redis"`
|
||||
DatabaseList []*conf.Data_Database `json:"database_list"`
|
||||
RedisList []*conf.Data_Redis `json:"redis_list"`
|
||||
Mongo *conf.Data_Mongo `json:"mongo"`
|
||||
} `json:"data"`
|
||||
Admin struct {
|
||||
RouterPrefix string `json:"routerPrefix"`
|
||||
System struct {
|
||||
UseRedis bool `json:"useRedis"`
|
||||
UseMultipoint bool `json:"useMultipoint"`
|
||||
UseStrictAuth bool `json:"useStrictAuth"`
|
||||
DisableAutoMigrate bool `json:"disableAutoMigrate"`
|
||||
UseMongo bool `json:"useMongo"`
|
||||
} `json:"system"`
|
||||
JWT struct {
|
||||
SigningKey string `json:"signingKey"`
|
||||
ExpiresTime string `json:"expiresTime"`
|
||||
BufferTime string `json:"bufferTime"`
|
||||
Issuer string `json:"issuer"`
|
||||
} `json:"jwt"`
|
||||
Captcha struct {
|
||||
KeyLong int32 `json:"keyLong"`
|
||||
ImgWidth int32 `json:"imgWidth"`
|
||||
ImgHeight int32 `json:"imgHeight"`
|
||||
StoreExpiration string `json:"storeExpiration"`
|
||||
} `json:"captcha"`
|
||||
Local struct {
|
||||
StorePath string `json:"storePath"`
|
||||
PathPrefix string `json:"pathPrefix"`
|
||||
} `json:"local"`
|
||||
Media struct {
|
||||
SessionTTL int32 `json:"sessionTtl"`
|
||||
MaxFileSize int64 `json:"maxFileSize"`
|
||||
} `json:"media"`
|
||||
Storage *conf.AdminBackend_Storage `json:"storage"`
|
||||
Zap *conf.AdminBackend_Zap `json:"zap"`
|
||||
Cors *conf.AdminBackend_CORS `json:"cors"`
|
||||
App *conf.AdminBackend_App `json:"app"`
|
||||
} `json:"admin"`
|
||||
Email *struct {
|
||||
To string `json:"to"`
|
||||
From string `json:"from"`
|
||||
Host string `json:"host"`
|
||||
Secret string `json:"secret"`
|
||||
Nickname string `json:"nickname"`
|
||||
Port int32 `json:"port"`
|
||||
IsSSL bool `json:"is-ssl"`
|
||||
IsLoginAuth bool `json:"is-loginauth"`
|
||||
} `json:"email"`
|
||||
} `json:"config"`
|
||||
Config json.RawMessage `json:"config"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user