30 lines
602 B
Go
30 lines
602 B
Go
package config
|
|
|
|
import "github.com/zeromicro/go-zero/rest"
|
|
|
|
type Config struct {
|
|
rest.RestConf
|
|
Database DatabaseConfig
|
|
S3 S3Config
|
|
JWT JWTConfig
|
|
}
|
|
|
|
type DatabaseConfig struct {
|
|
DSN string
|
|
}
|
|
|
|
type S3Config struct {
|
|
Region string
|
|
Bucket string
|
|
AccessKeyID string
|
|
SecretAccessKey string
|
|
Endpoint string `json:",optional"` // Optional: for S3-compatible services
|
|
PresignedURLExpiration int64 `json:",default=3600"` // Default 1 hour
|
|
}
|
|
|
|
type JWTConfig struct {
|
|
Secret string
|
|
Issuer string
|
|
ExpiresIn int64
|
|
}
|