http

package
v3.0.0-dev.66 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2023 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RestController

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

func NewRestController

func NewRestController(r *mux.Router, dic *di.Container, serviceName string) *RestController

func (*RestController) AddRoute

func (c *RestController) AddRoute(route string, handler func(http.ResponseWriter, *http.Request), methods ...string) errors.EdgeX

func (*RestController) Config

func (c *RestController) Config(writer http.ResponseWriter, request *http.Request)

Config handles the request to /config endpoint. Is used to request the service's configuration It returns a response as specified by the V2 API swagger in openapi/common

func (*RestController) Discovery

func (c *RestController) Discovery(writer http.ResponseWriter, request *http.Request)

func (*RestController) GetCommand

func (c *RestController) GetCommand(w http.ResponseWriter, r *http.Request)

func (*RestController) InitRestRoutes

func (c *RestController) InitRestRoutes()

func (*RestController) Ping

func (c *RestController) Ping(writer http.ResponseWriter, request *http.Request)

Ping handles the request to /ping endpoint. Is used to test if the service is working It returns a response as specified by the V2 API swagger in openapi/common

func (*RestController) Router

func (c *RestController) Router() *mux.Router

func (*RestController) Secret

func (c *RestController) Secret(writer http.ResponseWriter, request *http.Request)

Secret handles the request to add Device Service exclusive secret to the Secret Store It returns a response as specified by the V2 API swagger in openapi/common

func (*RestController) SetCommand

func (c *RestController) SetCommand(w http.ResponseWriter, r *http.Request)

func (*RestController) SetCustomConfigInfo

func (c *RestController) SetCustomConfigInfo(customConfig interfaces.UpdatableConfig)

SetCustomConfigInfo sets the custom configuration, which is used to include the service's custom config in the /config endpoint response.

func (*RestController) Version

func (c *RestController) Version(writer http.ResponseWriter, request *http.Request)

Version handles the request to /version endpoint. Is used to request the service's versions It returns a response as specified by the V2 API swagger in openapi/common

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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