refactor: use dependency injection

This commit is contained in:
Stavros
2025-01-21 18:41:06 +02:00
parent 2988b5f22f
commit 5e73d06fcc
6 changed files with 113 additions and 42 deletions

View File

@@ -14,9 +14,7 @@ type User struct {
Password string
}
type UserList struct {
Users []User
}
type Users []User
type Config struct {
Port int `validate:"number" mapstructure:"port"`
@@ -31,4 +29,12 @@ type Config struct {
type UserContext struct {
Username string
IsLoggedIn bool
}
type APIConfig struct {
Port int
Address string
Secret string
AppURL string
CookieSecure bool
}