[WIP]
This commit is contained in:
@@ -1,15 +1,61 @@
|
||||
package models
|
||||
|
||||
type EmailConfig struct {
|
||||
FromEmail string
|
||||
Username string
|
||||
Password string
|
||||
Server string
|
||||
FromEmail string `yaml:"from_email"`
|
||||
Username string `yaml:"username"`
|
||||
Password string `yaml:"password"`
|
||||
Server string `yaml:"server"`
|
||||
}
|
||||
|
||||
type SigningConfig struct {
|
||||
Key string `yaml:"key"`
|
||||
Algorithm string `yaml:"algorithm"`
|
||||
}
|
||||
|
||||
type MongoDBConfig struct {
|
||||
Url string `yaml:"url"`
|
||||
Username string `yaml:"username"`
|
||||
Password string `yaml:"password"`
|
||||
Database string `yaml:"database"`
|
||||
Collection string `yaml:"collection"`
|
||||
}
|
||||
|
||||
type OidcAuthConfig struct {
|
||||
IssuerUrl string `yaml:"issuer_url"`
|
||||
ClientId string `yaml:"client_id"`
|
||||
ClientSecret string `yaml:"client_secret"`
|
||||
}
|
||||
|
||||
type UserPassAuthConfig struct {
|
||||
HashingAlgorithm string `yaml:"hashing_algorithm"`
|
||||
Salt string `yaml:"salt"`
|
||||
}
|
||||
|
||||
type AuthorizationConfig struct {
|
||||
Type string `yaml:"type"`
|
||||
Oidc OidcAuthConfig `yaml:"oidc"`
|
||||
UserPass UserPassAuthConfig `yaml:"user_pass"`
|
||||
}
|
||||
|
||||
type AuthentikDBConfig struct {
|
||||
}
|
||||
|
||||
type ServersDatabaseConfig struct {
|
||||
Type string `yaml:"type"`
|
||||
Mongo *MongoDBConfig `yaml:"mongo"`
|
||||
}
|
||||
|
||||
type UsersDatabaseConfig struct {
|
||||
Type string `yaml:"type"`
|
||||
Mongo *MongoDBConfig `yaml:"mongo"`
|
||||
Authentik *AuthentikDBConfig `yaml:"authentik"`
|
||||
}
|
||||
|
||||
type GlobalConfig struct {
|
||||
Email EmailConfig
|
||||
Key string
|
||||
Algorithm string
|
||||
Domain string
|
||||
Email EmailConfig `yaml:"email"`
|
||||
Signing SigningConfig `yaml:"signing"`
|
||||
ServersDatabase ServersDatabaseConfig `yaml:"servers_database"`
|
||||
UsersDatabase UsersDatabaseConfig `yaml:"users_database"`
|
||||
Domain string `yaml:"domain"`
|
||||
Auth AuthorizationConfig `yaml:"auth"`
|
||||
}
|
||||
|
@@ -1,9 +1,8 @@
|
||||
package models
|
||||
|
||||
type User struct {
|
||||
Username string `json:"username"`
|
||||
Email string `json:"email"`
|
||||
MaxOwnedServers int `json:"maxed_owned_servers"`
|
||||
Permissions Permission `json:"permissions"`
|
||||
HashedPass string `json:"hashedPass"`
|
||||
Username string `json:"username"`
|
||||
Nickname string `json:"nickname"`
|
||||
Email string `json:"email"`
|
||||
MaxOwnedServers int `json:"maxed_owned_servers"`
|
||||
}
|
||||
|
Reference in New Issue
Block a user