Documentation ¶
Index ¶
- Constants
- Variables
- func New(_ context.Context, engine *echo.Echo, config *config.Config)
- type API
- func (api *API) CreateModule(ctx echo.Context, name REST.ModuleName, params REST.CreateModuleParams) error
- func (api *API) DeleteModules(ctx echo.Context, params REST.DeleteModulesParams) error
- func (api *API) GetDevices(ctx echo.Context, _ REST.GetDevicesParams) error
- func (api *API) GetModule(ctx echo.Context, name REST.ModuleName, params REST.GetModuleParams) error
- func (api *API) IsHealthy(ctx echo.Context) error
- func (api *API) IsReady(ctx echo.Context) error
- func (api *API) Register(ctx echo.Context, params REST.RegisterParams) error
- func (api *API) Share(ctx echo.Context, _ REST.ShareParams) error
- type OpenAPIHandler
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") )
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 ¶
Types ¶
type API ¶
type API struct { service.Accounts service.Sharing service.Devices service.Modules service.MetadataProvider password.PasswordGenerator service.UsernameGenerator }
func (*API) CreateModule ¶
func (api *API) CreateModule(ctx echo.Context, name REST.ModuleName, params REST.CreateModuleParams) error
func (*API) DeleteModules ¶ added in v0.4.0
func (api *API) DeleteModules(ctx echo.Context, params REST.DeleteModulesParams) error
func (*API) GetDevices ¶ added in v0.1.7
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
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
Source Files ¶
Click to show internal directories.
Click to hide internal directories.