feat: make server options a struct (#615)
Former-commit-id: a54bc7c8a0fb700d4f90f78c54d6cb028e8acea7 [formerly a0946a1d5b82ce5681684bc0f871bd892c4d6c3f] [formerly 6b23b0abbe5cde6a6348f982975d15a1161359de [formerly 0e7abaa7fb4b293e933d233750cf057c48b298bf]] Former-commit-id: cf9ea1110bcb8b5eb30ecd25db1928659ecea922 [formerly 38cebeff1f9e6b03760f7b277a3941f7bd733fb5] Former-commit-id: db44c1d5ff8fed361849b5bf1fe48e04c75d7ce7
This commit is contained in:
@@ -8,8 +8,6 @@ type AuthMethod string
|
||||
// Settings contain the main settings of the application.
|
||||
type Settings struct {
|
||||
Key []byte `json:"key"`
|
||||
BaseURL string `json:"baseURL"`
|
||||
Root string `json:"root"`
|
||||
Signup bool `json:"signup"`
|
||||
Defaults UserDefaults `json:"defaults"`
|
||||
AuthMethod AuthMethod `json:"authMethod"`
|
||||
@@ -19,6 +17,17 @@ type Settings struct {
|
||||
Rules []rules.Rule `json:"rules"`
|
||||
}
|
||||
|
||||
// Server specific settings.
|
||||
type Server struct {
|
||||
Root string `json:"root"`
|
||||
BaseURL string `json:"baseURL"`
|
||||
TLSKey string `json:"tlsKey"`
|
||||
TLSCert string `json:"tlsCert"`
|
||||
Port string `json:"port"`
|
||||
Address string `json:"address"`
|
||||
Log string `json:"log"`
|
||||
}
|
||||
|
||||
// GetRules implements rules.Provider.
|
||||
func (s *Settings) GetRules() []rules.Rule {
|
||||
return s.Rules
|
||||
|
||||
Reference in New Issue
Block a user