Files
cms-server/config/types.go
Asai Neko 39f555b780
All checks were successful
Client CMS Check Build (NixCN CMS) TeamCity build finished
Backend Check Build (NixCN CMS) TeamCity build finished
Remove search engine, add event list api
Signed-off-by: Asai Neko <sugar@sne.moe>
2026-01-30 11:54:13 +08:00

73 lines
2.1 KiB
Go

package config
type config struct {
Server server `yaml:"server"`
Database database `yaml:"database"`
Cache cache `yaml:"cache"`
Email email `yaml:"email"`
Secrets secrets `yaml:"secrets"`
TTL ttl `yaml:"ttl"`
KYC kyc `yaml:"kyc"`
Tracer tracer `yaml:"tracer"`
}
type server struct {
Application string `yaml:"application"`
Address string `yaml:"address"`
ExternalUrl string `yaml:"external_url"`
DebugMode string `yaml:"debug_mode"`
LogLevel string `yaml:"log_level"`
ServiceName string `yaml:"service_name"`
}
type database struct {
Type string `yaml:"type"`
Host string `yaml:"host"`
Name string `yaml:"name"`
Username string `yaml:"username"`
Password string `yaml:"password"`
ServiceName string `yaml:"service_name"`
}
type cache struct {
Hosts []string `yaml:"hosts"`
Master string `yaml:"master"`
Username string `yaml:"username"`
Password string `yaml:"passowrd"`
DB int `yaml:"db"`
ServiceName string `yaml:"service_name"`
}
type email struct {
Host string `yaml:"host"`
Port string `yaml:"port"`
Username string `yaml:"username"`
Password string `yaml:"password"`
Security string `yaml:"security"`
InsecureSkipVerify bool `yaml:"insecure_skip_verify"`
}
type secrets struct {
TurnstileSecret string `yaml:"turnstile_secret"`
ClientSecretKey string `yaml:"client_secret_key"`
KycInfoKey string `yaml:"kyc_info_key"`
}
type ttl struct {
AuthCodeTTL string `yaml:"auth_code_ttl"`
AccessTTL string `yaml:"access_ttl"`
RefreshTTL string `yaml:"refresh_ttl"`
CheckinCodeTTL string `yaml:"checkin_code_ttl"`
}
type kyc struct {
AliAccessKeyId string `yaml:"ali_access_key_id"`
AliAccessKeySecret string `yaml:"ali_access_key_secret"`
PassportReaderPublicKey string `yaml:"passport_reader_public_key"`
PassportReaderSecret string `yaml:"passport_reader_secret"`
}
type tracer struct {
OtelControllerEndpoint string `yaml:"otel_controller_endpoint"`
}