feat: make app configurable

This commit is contained in:
Stavros
2025-01-19 15:04:46 +02:00
parent c0e085ea10
commit 6eccb6d835
11 changed files with 299 additions and 40 deletions

View File

@@ -5,6 +5,24 @@ type LoginQuery struct {
}
type LoginRequest struct {
Email string `json:"email"`
Username string `json:"username"`
Password string `json:"password"`
}
type User struct {
Username string
Password string
}
type UserList struct {
Users []User
}
type Config struct {
Port int `validate:"number" mapstructure:"port"`
Address string `mapstructure:"address, ip4_addr"`
Secret string `validate:"required,len=32" mapstructure:"secret"`
RootURL string `validate:"required,url" mapstructure:"root-url"`
AppURL string `validate:"required,url" mapstructure:"app-url"`
Users string `validate:"required" mapstructure:"users"`
}