86 lines
2.5 KiB
Go
86 lines
2.5 KiB
Go
package models
|
|
|
|
type EmailConfig struct {
|
|
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 {
|
|
Type DatabaseType `yaml:"type"`
|
|
Mongo *MongoDBConfig `yaml:"mongo"`
|
|
}
|
|
|
|
type AuthenticationConfig struct {
|
|
Type AuthMode `yaml:"type"`
|
|
Oidc OidcAuthConfig `yaml:"oidc"`
|
|
UserPass UserPassAuthConfig `yaml:"user_pass"`
|
|
}
|
|
|
|
type UsersDatabaseConfig struct {
|
|
Type DatabaseType `yaml:"type"`
|
|
Mongo *MongoDBConfig `yaml:"mongo"`
|
|
}
|
|
|
|
type FileBrowserConfig struct {
|
|
Image Image `yaml:"image"`
|
|
Command string `yaml:"command"`
|
|
Network string `yaml:"network"`
|
|
}
|
|
|
|
type DockerInstanceManagerConfig struct {
|
|
GamesDomain string `yaml:"games_domain"`
|
|
BrowsersDomain string `yaml:"browsers_domain"`
|
|
CertificateResolver string `yaml:"certificate_resolver"`
|
|
FileBrowser FileBrowserConfig `yaml:"file_browser"`
|
|
}
|
|
|
|
type InstanceManagerConfig struct {
|
|
Type InstanceManagerType `yaml:"type"`
|
|
Docker DockerInstanceManagerConfig `yaml:"docker"`
|
|
}
|
|
|
|
type ServersDatabaseConfig struct {
|
|
Type DatabaseType `yaml:"type"`
|
|
Mongo *MongoDBConfig `yaml:"mongo"`
|
|
}
|
|
|
|
type ServersAuthorizationDatabaseConfig struct {
|
|
Type DatabaseType `yaml:"type"`
|
|
Mongo *MongoDBConfig `yaml:"mongo"`
|
|
}
|
|
|
|
type GlobalConfig struct {
|
|
// Features Configs
|
|
Email EmailConfig `yaml:"email"`
|
|
Domain string `yaml:"domain"`
|
|
Signing SigningConfig `yaml:"signing"`
|
|
Authentication AuthenticationConfig `yaml:"authentication"`
|
|
InstanceManager InstanceManagerConfig `yaml:"instance_manager"`
|
|
|
|
// Database Configs
|
|
ServersDatabase ServersDatabaseConfig `yaml:"servers_database"`
|
|
UsersDatabase UsersDatabaseConfig `yaml:"users_database"`
|
|
ServersAuthorizationDatabase ServersAuthorizationDatabaseConfig `yaml:"servers_authorization_database"`
|
|
}
|