Documentation ¶
Overview ¶
Package endpoint implements the HAP endpoints.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Accessories ¶
Accessories handles the /accessories endpoint and returns all accessories as JSON
This endpoint is not session based and the same for all connections because the encryption/decryption is handled by the connection automatically.
func NewAccessories ¶
func NewAccessories(c hap.AccessoriesHandler, mutex *sync.Mutex) *Accessories
NewAccessories returns a new handler for accessories endpoint
func (*Accessories) ServeHTTP ¶
func (handler *Accessories) ServeHTTP(response http.ResponseWriter, request *http.Request)
type Characteristics ¶
Characteristics handles the /characteristics endpoint
This endpoint is not session based and the same for all connections because the encryption/decryption is handled by the connection automatically.
func NewCharacteristics ¶
func NewCharacteristics(context hap.Context, c hap.CharacteristicsHandler, mutex *sync.Mutex) *Characteristics
NewCharacteristics returns a new handler for characteristics endpoint
func (*Characteristics) ServeHTTP ¶
func (handler *Characteristics) ServeHTTP(response http.ResponseWriter, request *http.Request)
type Identify ¶
Identify handles the unencrypted /identify endpoint by calling IdentifyAccessory() on the IdentifyHandler
func NewIdentify ¶
func NewIdentify(h hap.IdentifyHandler) *Identify
NewIdentify returns an object which serves the /identify endpoint
type ImageRequest ¶
type PairSetup ¶
PairSetup handles the /pair-setup endpoint and returns TLV8 encoded data.
This endoint is session based and handles requests based on their connections. Which means that there is one pair setup controller for every connection. This is required to support simultaneous pairing connections.
When pairing finished, the DevicePaired event is sent using an event emitter.
type PairVerify ¶
PairVerify handles the /pair-verify endpoint and returns TLV8 encoded data
This endoint is session based and handles requests based on their connections. Which means that there is one pair verify controller for every connection. This is required to support simultaneous verification connections.
func NewPairVerify ¶
func NewPairVerify(context hap.Context, database db.Database) *PairVerify
NewPairVerify returns a new endpoint for pair verify endpoint
func (*PairVerify) ServeHTTP ¶
func (endpoint *PairVerify) ServeHTTP(response http.ResponseWriter, request *http.Request)
type Pairing ¶
Pairing handles the /pairings endpoint.
This endpoint is not session based and the same for all connections.
func NewPairing ¶
func NewPairing(controller *pair.PairingController, emitter event.Emitter) *Pairing
NewPairing returns a new handler for pairing enpdoint
type Resource ¶
Resource handles the /resource endpoint
func NewResource ¶
func NewResource(context hap.Context, imgFn GetImageFunc) *Resource
NewResource returns a new handler for resource requests