Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateRouterAndStartServing ¶
func CreateRouterAndStartServing(messenger MessagingContext, db database.Datastore)
CreateRouterAndStartServing creates a request router, registers all handlers and starts serving requests.
Types ¶
type MessagingContext ¶
type MessagingContext interface { PublishOnTopic(message messaging.TopicMessage) error NoteToSelf(message messaging.CommandMessage) error }
MessagingContext is an interface that allows mocking of messaging.Context parameters
type RequestRouter ¶
type RequestRouter struct {
// contains filtered or unexported fields
}
RequestRouter wraps the concrete router implementation
func (*RequestRouter) Get ¶
func (router *RequestRouter) Get(pattern string, handlerFn http.HandlerFunc)
func (*RequestRouter) Patch ¶
func (router *RequestRouter) Patch(pattern string, handlerFn http.HandlerFunc)
func (*RequestRouter) Post ¶
func (router *RequestRouter) Post(pattern string, handlerFn http.HandlerFunc)
Click to show internal directories.
Click to hide internal directories.