Documentation ¶
Overview ¶
Package chissy package is intended for quick web service development.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RedirectToHTTPS ¶
func Static ¶
func Static(r chi.Router, path string, root http.FileSystem)
Static conveniently sets up a http.FileServer handler to serve static files from a http.FileSystem.
Types ¶
type Config ¶
type Config struct { ProductionMode bool `env:"PROD"` LocalhostDomain string `env:"LOCALHOST_DOMAIN" validate:"required_if=ProductionMode false"` SSL SSL `validate:"required_if=ProductionMode true"` Port uint16 `env:"PORT" validate:"min=80,max=65535"` ReadTimeout time.Duration `env:"READ_TIMEOUT" default:"1m"` ReadHeaderTimeout time.Duration `env:"READ_HEADER_TIMEOUT" default:"15s"` WriteTimeout time.Duration `env:"WRITE_TIMEOUT" default:"1m"` // contains filtered or unexported fields }
Config - http service configuration compatible to settings package. https://github.com/kaatinga/settings
func (*Config) Launch ¶
func (c *Config) Launch(setupHandlers SetUpHandlers) error
Launch enables the configured web server with the handlers that announced in a function matched with SetUpHandlers type.
Click to show internal directories.
Click to hide internal directories.