Add authentication function

Signed-off-by: Asai Neko <sugar@sne.moe>
This commit is contained in:
2025-12-24 20:43:19 +08:00
parent fd4da4f1a1
commit cd2bcd597c
11 changed files with 290 additions and 13 deletions

View File

@@ -3,6 +3,9 @@ package config
type config struct {
Server server `yaml:"server"`
Database database `yaml:"database"`
Email email `yaml:"email"`
Secrets secrets `yaml:"secrets"`
TTL ttl `yaml:"ttl"`
}
type server struct {
@@ -19,3 +22,17 @@ type database struct {
Username string `yaml:"username"`
Password string `yaml:"password"`
}
type email struct {
ResendApiKey string `yaml:"resend_api_key"`
From string `yaml:"from"`
}
type secrets struct {
jwt string `yaml:"jwt"`
turnstile string `yaml:"turnstile"`
}
type ttl struct {
magic_token string `yaml:"magin_token"`
}