forked from nixcn/nixcn-cms
58 lines
1.4 KiB
Go
58 lines
1.4 KiB
Go
package config
|
|
|
|
type config struct {
|
|
Server server `yaml:"server"`
|
|
Database database `yaml:"database"`
|
|
Cache cache `yaml:"cache"`
|
|
Search search `yaml:"search"`
|
|
Email email `yaml:"email"`
|
|
Secrets secrets `yaml:"secrets"`
|
|
TTL ttl `yaml:"ttl"`
|
|
}
|
|
|
|
type server struct {
|
|
Application string `yaml:"application"`
|
|
Address string `yaml:"address"`
|
|
DebugMode string `yaml:"debug_mode"`
|
|
FileLogger string `yaml:"file_logger"`
|
|
JwtSecret string `yaml:"jwt_secret"`
|
|
}
|
|
|
|
type database struct {
|
|
Type string `yaml:"type"`
|
|
Host string `yaml:"host"`
|
|
Name string `yaml:"name"`
|
|
Username string `yaml:"username"`
|
|
Password string `yaml:"password"`
|
|
}
|
|
|
|
type cache struct {
|
|
Hosts []string `yaml:"hosts"`
|
|
Master string `yaml:"master"`
|
|
Username string `yaml:"username"`
|
|
Password string `yaml:"passowrd"`
|
|
DB int `yaml:"db"`
|
|
}
|
|
|
|
type search struct {
|
|
Host string `yaml:"host"`
|
|
ApiKey string `yaml:"api_key"`
|
|
}
|
|
|
|
type email struct {
|
|
ResendApiKey string `yaml:"resend_api_key"`
|
|
From string `yaml:"from"`
|
|
}
|
|
|
|
type secrets struct {
|
|
JwtSecret string `yaml:"jwt_secret"`
|
|
TurnstileSecret string `yaml:"turnstile_secret"`
|
|
}
|
|
|
|
type ttl struct {
|
|
MagicLinkTTL string `yaml:"magic_link_ttl"`
|
|
AccessTTL string `yaml:"access_ttl"`
|
|
RefreshTTL string `yaml:"refresh_ttl"`
|
|
CheckinCodeTTL string `yaml:"checkin_code_ttl"`
|
|
}
|