Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateRouterAndStartServing ¶
func CreateRouterAndStartServing(log zerolog.Logger, messenger MessagingContext, db database.Datastore)
CreateRouterAndStartServing sets up the NGSI-LD router and starts serving incoming requests
Types ¶
type MessagingContext ¶
type MessagingContext interface { PublishOnTopic(message messaging.TopicMessage) error SendCommandTo(command messaging.CommandMessage, key string) error }
MessagingContext is an interface that allows mocking of messaging.Context parameters
type RequestRouter ¶
type RequestRouter struct {
// contains filtered or unexported fields
}
RequestRouter needs a comment
func (*RequestRouter) Get ¶
func (router *RequestRouter) Get(pattern string, handlerFn http.HandlerFunc)
Get accepts a pattern that should be routed to the handlerFn on a GET request
func (*RequestRouter) Patch ¶
func (router *RequestRouter) Patch(pattern string, handlerFn http.HandlerFunc)
Patch accepts a pattern that should be routed to the handlerFn on a PATCH request
func (*RequestRouter) Post ¶
func (router *RequestRouter) Post(pattern string, handlerFn http.HandlerFunc)
Post accepts a pattern that should be routed to the handlerFn on a POST request
Click to show internal directories.
Click to hide internal directories.