webserver

package
v3.0.0-dev.31 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KeyValue

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

KeyValue stores the key value pair of the secret

type SecretData

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

SecretData the structure to store post secret requests

type Version

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

swagger:model

type WebServer

type WebServer struct {
	// contains filtered or unexported fields
}

WebServer handles the webserver configuration

func NewWebServer

func NewWebServer(dic *di.Container, router *mux.Router, serviceName string) *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 the default routes

func (*WebServer) SetCustomConfigInfo

func (webserver *WebServer) SetCustomConfigInfo(customConfig interfaces.UpdatableConfig)

SetCustomConfigInfo sets the custom configurations

func (*WebServer) SetupTriggerRoute

func (webserver *WebServer) SetupTriggerRoute(path string, handlerForTrigger func(http.ResponseWriter, *http.Request))

SetupTriggerRoute adds a route to handle trigger pipeline from REST request

func (*WebServer) StartWebServer

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