Documentation ¶
Index ¶
- func Home() http.HandlerFunc
- func NewOverviewHandler(cfgs *api.Configuration) func(w http.ResponseWriter, r *http.Request)
- func NewStatusHandler(cfgs *api.Configuration) func(w http.ResponseWriter, r *http.Request)
- func RedirectHTTPS(port int) http.HandlerFunc
- type APIHandler
- type Option
- type Server
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewOverviewHandler ¶
func NewOverviewHandler(cfgs *api.Configuration) func(w http.ResponseWriter, r *http.Request)
NewOverviewHandler creates instance of all status checks handler
func NewStatusHandler ¶
func NewStatusHandler(cfgs *api.Configuration) func(w http.ResponseWriter, r *http.Request)
NewStatusHandler creates instance of single proxy status check handler
func RedirectHTTPS ¶
func RedirectHTTPS(port int) http.HandlerFunc
RedirectHTTPS redirects an http request to https
Types ¶
type APIHandler ¶
type APIHandler struct { Cfgs *api.Configuration // contains filtered or unexported fields }
APIHandler is the api rest controller
func NewAPIHandler ¶
func NewAPIHandler(cfgChan chan<- api.ConfigurationMessage) *APIHandler
NewAPIHandler creates a new instance of Controller
func (*APIHandler) DeleteBy ¶
func (c *APIHandler) DeleteBy() http.HandlerFunc
DeleteBy is the delete handler
func (*APIHandler) GetBy ¶
func (c *APIHandler) GetBy() http.HandlerFunc
GetBy is the find by handler
func (*APIHandler) PutBy ¶
func (c *APIHandler) PutBy() http.HandlerFunc
PutBy is the update handler
type Option ¶
type Option func(*Server)
Option represents the available options
func WithConfigurations ¶
func WithConfigurations(cfgs *api.Configuration) Option
WithConfigurations sets the current configurations in memory
func WithCredentials ¶
func WithCredentials(cred config.Credentials) Option
WithCredentials sets the credentials for the server
func WithProfiler ¶
WithProfiler enables or disables profiler
type Server ¶
type Server struct { Port int Credentials config.Credentials TLS config.TLS ConfigurationChan chan api.ConfigurationMessage // contains filtered or unexported fields }
Server represents the web server
Click to show internal directories.
Click to hide internal directories.