Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Err404 = errors.New("Resource not found")
Err404 is a standard 404 error response
Functions ¶
Types ¶
type Config ¶
type Config struct { ReadTimeout string `json:"readTimeout"` WriteTimeout string `json:"writeTimeout"` MaxHeaderBytes int `json:"maxHeaderBytes"` MinTLSVersion uint16 `json:"minTLSVersion"` CertFile string `json:"certFile"` KeyFile string `json:"keyFile"` Address string `json:"address"` MaxUploadMemoryMB int `json:"maxUploadMemoryMB"` DevMode bool `json:"-"` DemoMode bool `json:"-"` Zopfli bool `json:"-"` SubDomain string `json:"-"` // contains filtered or unexported fields }
Config are the config values for starting up the webserver
func DefaultConfig ¶
func DefaultConfig() *Config
DefaultConfig returns the default configuration for the server layer
type JSend ¶
type JSend struct { Status string `json:"status"` Data interface{} `json:"data,omitempty"` Message string `json:"message,omitempty"` Failures []error `json:"failures,omitempty"` More bool `json:"more,omitempty"` // more data exists for this request }
JSend is the standard format for a response from townsourced
Source Files ¶
Click to show internal directories.
Click to hide internal directories.