Documentation ¶
Index ¶
- type Configuration
- type FiberWebserver
- func (w *FiberWebserver) AlertTriggerURL(alert models.Alert, message string) string
- func (w *FiberWebserver) InitializeWebserver() error
- func (w *FiberWebserver) Quit() error
- func (w *FiberWebserver) RegisterEndpoint(name string, endpoint endpoints.Endpoint)
- func (w *FiberWebserver) Run(wg *sync.WaitGroup) error
- type Webserver
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Configuration ¶
type Configuration struct { Domain string `env:"DOMAIN"` Port string `env:"PORT"` ViewDirectory string `env:"VIEW_DIR"` }
Configuration of the webservice
type FiberWebserver ¶
type FiberWebserver struct {
// contains filtered or unexported fields
}
FiberWebserver represents the fiber webinterface for this application
func (*FiberWebserver) AlertTriggerURL ¶
func (w *FiberWebserver) AlertTriggerURL(alert models.Alert, message string) string
AlertTriggerURL creates an URL to trigger the given alert
func (*FiberWebserver) InitializeWebserver ¶
func (w *FiberWebserver) InitializeWebserver() error
InitializeWebserver initializes the webserver
func (*FiberWebserver) RegisterEndpoint ¶
func (w *FiberWebserver) RegisterEndpoint(name string, endpoint endpoints.Endpoint)
RegisterEndpoint registers an endpoint to the webserver
type Webserver ¶
type Webserver interface { InitializeWebserver() error Run(wg *sync.WaitGroup) error Quit() error AlertTriggerURL(alert models.Alert, message string) string RegisterEndpoint(name string, endpoint endpoints.Endpoint) }
Webserver interface
func NewWebserver ¶
func NewWebserver(config *Configuration, log *logrus.Logger) Webserver
NewWebserver creates a new Webserver
Click to show internal directories.
Click to hide internal directories.