Documentation
¶
Overview ¶
Package control exposes the live device control API under /api/:project_id/device/:device_id/...
Index ¶
Constants ¶
const LeaseHeader = "X-Device-Lease"
LeaseHeader carries the lease token for control calls.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AppResolver ¶
AppResolver returns the app parameters for an app bundle of the project.
type DeviceResolver ¶
DeviceResolver resolves the device addressed by the request. It writes the error response itself and returns false when the device can't be used.
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
func NewHandler ¶
func NewHandler(svc *hubcontrol.Service, resolveDevice DeviceResolver, resolveApp AppResolver, owner OwnerResolver, nodeURL string) *Handler
func (*Handler) Register ¶
func (h *Handler) Register(g *gin.RouterGroup)
Register adds the routes to a project scoped group.
func (*Handler) WithAllowedOrigins ¶
WithAllowedOrigins lets pages from these origins (e.g. the configured CORS origins) open the video websocket. Same-host pages are always allowed.
type OwnerResolver ¶
OwnerResolver names the caller, e.g. the user or access token name.