config.go 839 B

12345678910111213141516171819202122
  1. package guerrilla
  2. // AppConfig is the holder of the configuration of the app
  3. type AppConfig struct {
  4. Servers []ServerConfig `json:"servers"`
  5. AllowedHosts []string `json:"allowed_hosts"`
  6. }
  7. // ServerConfig specifies config options for a single server
  8. type ServerConfig struct {
  9. IsEnabled bool `json:"is_enabled"`
  10. Hostname string `json:"host_name"`
  11. AllowedHosts []string `json:"allowed_hosts"`
  12. MaxSize int64 `json:"max_size"`
  13. PrivateKeyFile string `json:"private_key_file"`
  14. PublicKeyFile string `json:"public_key_file"`
  15. Timeout int `json:"timeout"`
  16. ListenInterface string `json:"listen_interface"`
  17. StartTLSOn bool `json:"start_tls_on,omitempty"`
  18. TLSAlwaysOn bool `json:"tls_always_on,omitempty"`
  19. MaxClients int `json:"max_clients"`
  20. }