mirror of
https://github.com/filebrowser/filebrowser.git
synced 2025-05-08 11:22:10 +00:00

Former-commit-id: 6560b8172709c5e8809b734eaf82139635c24905 [formerly c172a284c4c2bce5d7f82a13dda7cdc78d5c7d66] [formerly b75b0b28ef23b9e341628054252f32eb08f9933c [formerly c830b80269f1cc04886e916b840937e4436f72ca]] Former-commit-id: b482c5c90f95166aaf3c368d136f23c67531d6a7 [formerly 52b0e3434d83a82f55aa6a0157a35578494b5aa0] Former-commit-id: d1e5d7262a89f20f80274be277c9e388af56f20e
35 lines
1.0 KiB
Go
35 lines
1.0 KiB
Go
package settings
|
|
|
|
import "github.com/filebrowser/filebrowser/v2/rules"
|
|
|
|
// AuthMethod describes an authentication method.
|
|
type AuthMethod string
|
|
|
|
// Settings contain the main settings of the application.
|
|
type Settings struct {
|
|
Key []byte `json:"key"`
|
|
BaseURL string `json:"baseURL"`
|
|
Log string `json:"log"`
|
|
Server Server `json:"server"`
|
|
Signup bool `json:"signup"`
|
|
Defaults UserDefaults `json:"defaults"`
|
|
AuthMethod AuthMethod `json:"authMethod"`
|
|
Branding Branding `json:"branding"`
|
|
Commands map[string][]string `json:"commands"`
|
|
Shell []string `json:"shell"`
|
|
Rules []rules.Rule `json:"rules"`
|
|
}
|
|
|
|
// Server settings.
|
|
type Server struct {
|
|
Port int `json:"port"`
|
|
Address string `json:"address"`
|
|
TLSCert string `json:"tlsCert"`
|
|
TLSKey string `json:"tlsKey"`
|
|
}
|
|
|
|
// GetRules implements rules.Provider.
|
|
func (s *Settings) GetRules() []rules.Rule {
|
|
return s.Rules
|
|
}
|