61 lines
1.4 KiB
Go
61 lines
1.4 KiB
Go
package controller
|
|
|
|
type SourceConfig struct {
|
|
DefaultEnabled bool `yaml:"defaultEnabled"`
|
|
}
|
|
|
|
type SourceDefinition struct {
|
|
Path string `yaml:"path"`
|
|
Config SourceConfig `yaml:"config"`
|
|
}
|
|
|
|
type ServerConfig struct {
|
|
Port int `yaml:"port"`
|
|
BaseUrl string `yaml:"baseURL"`
|
|
Sources []SourceDefinition `yaml:"sources"`
|
|
}
|
|
|
|
type UserDefaultPermissionConfig struct {
|
|
Modify bool `yaml:"modify"`
|
|
Share bool `yaml:"share"`
|
|
Realtime bool `yaml:"realtime"`
|
|
Create bool `yaml:"create"`
|
|
Delete bool `yaml:"delete"`
|
|
Api bool `yaml:"api"`
|
|
}
|
|
|
|
type UserDefaultsConfig struct {
|
|
Permissions UserDefaultPermissionConfig `yaml:"permissions"`
|
|
}
|
|
|
|
type AuthPasswordMethodConfig struct {
|
|
Enabled bool `yaml:"enabled"`
|
|
MinLength int `yaml:"minLength"`
|
|
}
|
|
|
|
type AuthProxyMethodConfig struct {
|
|
Enabled bool `yaml:"enabled"`
|
|
Header string `yaml:"header"`
|
|
}
|
|
|
|
type AuthMethodsConfig struct {
|
|
Password AuthPasswordMethodConfig `yaml:"password"`
|
|
Proxy AuthProxyMethodConfig `yaml:"proxy"`
|
|
}
|
|
|
|
type AuthConfig struct {
|
|
AdminUsername string `yaml:"adminUsername"`
|
|
Methods AuthMethodsConfig `yaml:"methods"`
|
|
}
|
|
|
|
type FrontendConfig struct {
|
|
Name string `yaml:"name"`
|
|
}
|
|
|
|
type FileBrowserConfig struct {
|
|
Server ServerConfig `yaml:"server"`
|
|
Auth AuthConfig `yaml:"auth"`
|
|
Frontend FrontendConfig `yaml:"frontend"`
|
|
UserDefaults UserDefaultsConfig `yaml:"userDefaults"`
|
|
}
|