v1

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const Prefix = "/v1"
View Source
const XModifiedAt = "X-Modified-At"

Variables

View Source
var (
	ErrDeviceNotRegistered      = errors.New("device not found in account and there was no share code")
	ErrAccountShareCodeMismatch = errors.New("the provided share code did not belong to the provided account")
)
View Source
var ErrAccountForVerifyingDeviceNotPresent = errors.New("account for verifying device id is not present")
View Source
var ErrNoDeviceAccessWithoutAccount = echo.NewHTTPError(http.StatusForbidden,
	errors.New("devices cannot be accessed without an account"))

Functions

func New

func New(_ context.Context, engine *echo.Echo, config *config.Config)

Types

type API

func (*API) CreateModule

func (api *API) CreateModule(ctx echo.Context, name REST.ModuleName, params REST.CreateModuleParams) error

func (*API) DeleteModules

func (api *API) DeleteModules(ctx echo.Context, params REST.DeleteModulesParams) error

func (*API) GetDevices

func (api *API) GetDevices(ctx echo.Context, _ REST.GetDevicesParams) error

func (*API) GetModule

func (api *API) GetModule(ctx echo.Context, name REST.ModuleName, params REST.GetModuleParams) error

func (*API) IsHealthy

func (api *API) IsHealthy(ctx echo.Context) error

func (*API) IsReady

func (api *API) IsReady(ctx echo.Context) error

func (*API) Register

func (api *API) Register(ctx echo.Context, params REST.RegisterParams) error

func (*API) Share

func (api *API) Share(ctx echo.Context, _ REST.ShareParams) error

type OpenAPIHandler

type OpenAPIHandler struct {
	OpenAPI *openapi3.T
	*zerolog.Logger
	// contains filtered or unexported fields
}

func NewOpenAPIHandler

func NewOpenAPIHandler(openAPI *openapi3.T, logger *zerolog.Logger) *OpenAPIHandler

func (*OpenAPIHandler) ServeOpenAPI

func (h *OpenAPIHandler) ServeOpenAPI(ctx echo.Context) error

Directories

Path Synopsis
Package REST provides primitives to interact with the openapi HTTP API.
Package REST provides primitives to interact with the openapi HTTP API.

Jump to

Keyboard shortcuts

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