You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

56 lines
1.2 KiB

// Code scaffolded by goctl. Safe to edit.
// goctl 1.9.2
package config
import "github.com/zeromicro/go-zero/rest"
type Config struct {
rest.RestConf
// MySQL 数据库配置
MySQL struct {
DSN string
}
// Casdoor SSO 配置
Casdoor struct {
Endpoint string // Casdoor 服务地址
ClientId string // 应用 Client ID
ClientSecret string // 应用 Client Secret
Organization string // 组织名
Application string // 应用名
RedirectUrl string // OAuth 回调地址
FrontendUrl string // 前端地址(SSO 回调后跳转)
}
// 文件存储配置
Storage StorageConfig
}
type StorageConfig struct {
Type string `json:",default=local"` // local, oss, minio
MaxSize int64 `json:",default=104857600"` // 100MB
Local LocalStorageConfig
OSS OSSStorageConfig
MinIO MinIOStorageConfig
}
type LocalStorageConfig struct {
RootDir string `json:",default=./uploads"`
}
type OSSStorageConfig struct {
Endpoint string
AccessKeyId string
AccessKeySecret string
Bucket string
}
type MinIOStorageConfig struct {
Endpoint string
AccessKeyId string
AccessKeySecret string
Bucket string
UseSSL bool
}