Documentation ¶
Index ¶
- Variables
- type App
- type Config
- type Handler
- type Server
- func (s *Server) Authenticate(next http.Handler) http.Handler
- func (s *Server) HandleHealthCheck(w http.ResponseWriter, r *http.Request)
- func (s *Server) HandleWebhook(w http.ResponseWriter, r *http.Request)
- func (s *Server) LoadEvent(next http.Handler) http.Handler
- func (s *Server) Start()
- func (s *Server) Validate(next http.Handler) http.Handler
- func (s *Server) WithEventChannel(eventChan chan<- models.EventData) *Server
Constants ¶
This section is empty.
Variables ¶
View Source
var ContextEvent eventContext = "mopsos.event"
View Source
var ContextRecord eventContext = "mopsos.record"
View Source
var ContextUsername eventContext = "mopsos.username"
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { DBProvider string DBDSN string DBMigrate bool HttpListener string BasicAuthUsers map[string]string EnableTracing bool TracingTarget string }
Config type for config
type Server ¶
Server is the main webserver struct
func (*Server) Authenticate ¶ added in v0.3.3
Authenticate middleware handles checking credentials
func (*Server) HandleHealthCheck ¶ added in v0.3.3
func (s *Server) HandleHealthCheck(w http.ResponseWriter, r *http.Request)
func (*Server) HandleWebhook ¶ added in v0.3.3
func (s *Server) HandleWebhook(w http.ResponseWriter, r *http.Request)
func (*Server) Start ¶
func (s *Server) Start()
Start starts the server and listens for incoming events
Click to show internal directories.
Click to hide internal directories.