added more stuff including some of docker support
This commit is contained in:
@@ -27,35 +27,44 @@ type OidcAuthConfig struct {
|
||||
}
|
||||
|
||||
type UserPassAuthConfig struct {
|
||||
HashingAlgorithm string `yaml:"hashing_algorithm"`
|
||||
Salt string `yaml:"salt"`
|
||||
Type DatabaseType `yaml:"type"`
|
||||
Mongo *MongoDBConfig `yaml:"mongo"`
|
||||
}
|
||||
|
||||
type AuthorizationConfig struct {
|
||||
Type string `yaml:"type"`
|
||||
type AuthenticationConfig struct {
|
||||
Type AuthMode `yaml:"type"`
|
||||
Oidc OidcAuthConfig `yaml:"oidc"`
|
||||
UserPass UserPassAuthConfig `yaml:"user_pass"`
|
||||
}
|
||||
|
||||
type AuthentikDBConfig struct {
|
||||
}
|
||||
|
||||
type ServersDatabaseConfig struct {
|
||||
Type string `yaml:"type"`
|
||||
type UsersDatabaseConfig struct {
|
||||
Type DatabaseType `yaml:"type"`
|
||||
Mongo *MongoDBConfig `yaml:"mongo"`
|
||||
}
|
||||
|
||||
type UsersDatabaseConfig struct {
|
||||
Type string `yaml:"type"`
|
||||
Mongo *MongoDBConfig `yaml:"mongo"`
|
||||
Authentik *AuthentikDBConfig `yaml:"authentik"`
|
||||
type ServersInstanceManagerConfig struct {
|
||||
Type InstanceManagerType
|
||||
}
|
||||
|
||||
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 {
|
||||
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"`
|
||||
// Features Configs
|
||||
Email EmailConfig `yaml:"email"`
|
||||
Domain string `yaml:"domain"`
|
||||
Signing SigningConfig `yaml:"signing"`
|
||||
Authentication AuthenticationConfig `yaml:"authentication"`
|
||||
|
||||
// Database Configs
|
||||
ServersDatabase ServersDatabaseConfig `yaml:"servers_database"`
|
||||
UsersDatabase UsersDatabaseConfig `yaml:"users_database"`
|
||||
ServersAuthorizationDatabase ServersAuthorizationDatabaseConfig `yaml:"servers_authorization_database"`
|
||||
}
|
||||
|
@@ -1,41 +1,24 @@
|
||||
package models
|
||||
|
||||
type PortProtocol string
|
||||
|
||||
const (
|
||||
TCP PortProtocol = "TCP"
|
||||
UDP = "UDP"
|
||||
)
|
||||
|
||||
type Port struct {
|
||||
Protocol string
|
||||
Number int
|
||||
Protocol PortProtocol
|
||||
PublicPort uint16
|
||||
ContainerPort uint16
|
||||
}
|
||||
|
||||
type ImageInfo struct {
|
||||
Name string
|
||||
Version string
|
||||
Ports []Port
|
||||
type Image struct {
|
||||
Registry string
|
||||
Tag string
|
||||
}
|
||||
|
||||
type ServerInfo struct {
|
||||
Id string
|
||||
OwnerId string
|
||||
DefaultCommand string
|
||||
Image ImageInfo
|
||||
On bool
|
||||
Nickname string
|
||||
Ports []Port
|
||||
Domain string
|
||||
}
|
||||
|
||||
type FileBrowserInfo struct {
|
||||
Id string
|
||||
OwnerId string
|
||||
ConnectedTo ServerInfo
|
||||
Url string
|
||||
}
|
||||
|
||||
type ServerData struct {
|
||||
Id string `bson:"Id"`
|
||||
OwnerId string `bson:"OwnerId"`
|
||||
Image string `bson:"Image"`
|
||||
VolumeId string `bson:"VolumeId"`
|
||||
Nickname string `bson:"Nickname"`
|
||||
UserPermissions map[string]Permission `bson:"UserPermissions"`
|
||||
DefaultCommand string `bson:"DefaultCommand"`
|
||||
DefaultPorts []Port `bson:"DefaultPorts"`
|
||||
type FileBrowser struct {
|
||||
Id string
|
||||
Url string
|
||||
}
|
||||
|
14
models/types.go
Normal file
14
models/types.go
Normal file
@@ -0,0 +1,14 @@
|
||||
package models
|
||||
|
||||
type DatabaseType string
|
||||
|
||||
const (
|
||||
MONGO DatabaseType = "mongo"
|
||||
)
|
||||
|
||||
type InstanceManagerType string
|
||||
|
||||
const (
|
||||
KUBERNETES InstanceManagerType = "kubernetes"
|
||||
DOCKER InstanceManagerType = "docker"
|
||||
)
|
Reference in New Issue
Block a user