Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Context ¶
type Context struct { AuthDb *datastores.AuthDatastore StorageDb *datastores.StorageDatastore Queue *queues.RabbitMQConnection JSONTrackingEventValidator *validators.JSONEventTrackingValidator Logger *logrus.Logger }
Context a context that holds database and queue connections
func NewContext ¶
func NewContext(a *datastores.AuthDatastore, s *datastores.StorageDatastore, q *queues.RabbitMQConnection, jtv *validators.JSONEventTrackingValidator, env string) *Context
NewContext returns a new context from arguments
type FinalHandler ¶
type FinalHandler struct { Context *Context Payload []byte Handle func(*Context, []byte, http.ResponseWriter, *http.Request) }
FinalHandler a final http handler that holds the request's payload
func NewFinalHandler ¶
func NewFinalHandler(c *Context, p []byte, f func(c *Context, p []byte, w http.ResponseWriter, r *http.Request)) *FinalHandler
NewFinalHandler returns a new FinalHandler from arguments
func (FinalHandler) ServeHTTP ¶
func (fh FinalHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
type Handler ¶
Handler an http handler that holds the application context
func NewHandler ¶
NewHandler returns a new Handler from arguments
Click to show internal directories.
Click to hide internal directories.