config.go (610B)
1 package server 2 3 import "time" 4 5 type Config struct { 6 // CertPath is the path to the x509 certificate. 7 CertPath string `json:"certPath"` 8 9 // KeyPath is the path to the x509 key. 10 KeyPath string `json:"keyPath"` 11 12 MaxHeaderBytes int `json:"maxHeaderBytes"` 13 Ports Ports `json:"ports"` 14 Timeouts Timeouts `json:"timeouts"` 15 } 16 17 type Ports struct { 18 HTTP string `json:"http"` 19 HTTPS string `json:"https"` 20 } 21 22 type Timeouts struct { 23 Idle time.Duration `json:"idle"` 24 Read time.Duration `json:"read"` 25 Shutdown time.Duration `json:"shutdown"` 26 Write time.Duration `json:"write"` 27 }