Documentation ¶
Index ¶
- type KeyValue
- type SecretData
- type Version
- type WebServer
- func (webserver *WebServer) AddRoute(routePath string, handler func(http.ResponseWriter, *http.Request), ...) error
- func (webserver *WebServer) ConfigureStandardRoutes()
- func (webserver *WebServer) SetupTriggerRoute(path string, handlerForTrigger func(http.ResponseWriter, *http.Request))
- func (webserver *WebServer) StartWebServer(errChannel chan error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SecretData ¶
SecretData the structure to store post secret requests
type WebServer ¶
type WebServer struct { Config *common.ConfigurationStruct LoggingClient logger.LoggingClient // contains filtered or unexported fields }
WebServer handles the webserver configuration
func NewWebServer ¶
func NewWebServer(config *common.ConfigurationStruct, secretProvider security.SecretProvider, lc logger.LoggingClient, router *mux.Router) *WebServer
NewWebserver returns a new instance of *WebServer
func (*WebServer) AddRoute ¶
func (webserver *WebServer) AddRoute(routePath string, handler func(http.ResponseWriter, *http.Request), methods ...string) error
AddRoute enables support to leverage the existing webserver to add routes.
func (*WebServer) ConfigureStandardRoutes ¶
func (webserver *WebServer) ConfigureStandardRoutes()
ConfigureStandardRoutes loads up some default routes
func (*WebServer) SetupTriggerRoute ¶
func (webserver *WebServer) SetupTriggerRoute(path string, handlerForTrigger func(http.ResponseWriter, *http.Request))
SetupTriggerRoute adds a route to handle trigger pipeline from HTTP request swagger:operation POST /trigger Trigger Trigger
Trigger ¶
Available when HTTPTrigger is specified as the binding in configuration. This API provides a way to initiate and start processing the defined pipeline using the data submitted.
--- produces: - application/json consumes: - application/json parameters:
- in: body name: Data Event description: | This is the data that will processed the configured pipeline. Typically this is an EdgeX event as described below, however, it can ingest other forms of data if a custom Target Type (https://github.com/migelankodra/app-functions-sdk-go/blob/master/README.md#target-type) is being used. required: true schema: "$ref": "#/definitions/Event"
Responses:
'200': description: Get current version schema: "$ref": "#/definitions/Version"
func (*WebServer) StartWebServer ¶
StartWebServer starts the web server