webserver

package
v1.3.1-dev.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 10, 2020 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KeyValue added in v1.1.0

type KeyValue struct {
	Key   string `json:"key"`
	Value string `json:"value"`
}

KeyValue stores the key value pair of the secret

type SecretData added in v1.1.0

type SecretData struct {
	Path    string     `json:"path"`
	Secrets []KeyValue `json:"secrets"`
}

SecretData the structure to store post secret requests

type Version added in v1.0.0

type Version struct {
	Version    string `json:"version"`
	SDKVersion string `json:"sdk_version"`
}

swagger:model

type WebServer

type WebServer struct {
	Config        *common.ConfigurationStruct
	LoggingClient logger.LoggingClient
	// contains filtered or unexported fields
}

WebServer handles the webserver configuration

func NewWebServer added in v1.0.0

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 added in v1.0.0

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:

Responses:

'200':
  description: Get current version
  schema:
    "$ref": "#/definitions/Version"

func (*WebServer) StartWebServer added in v1.1.0

func (webserver *WebServer) StartWebServer(errChannel chan error)

StartWebServer starts the web server

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL