Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Basic ¶ added in v0.1.1
type Basic struct { // required Identify func(bool) error // required Manufacturer, Model, Name, SerialNumber, FirmwareRevision string // optional HardwareRevision string AccessoryFlags *characteristic.Updatable[uint32] // HAPProtocolVersion will be added as "HAP Protocol Information" service to the services if not empty HAPProtocolVersion string // Additional services provided by this accessory AdditionalServices []hapip.Service }
Basic implements a basic accessory.
func (Basic) Service ¶ added in v0.1.1
func (i Basic) Service() characteristic.Service
func (Basic) WithResourceHandler ¶ added in v0.1.1
func (i Basic) WithResourceHandler(handler func(rw http.ResponseWriter, typ string, width, height int) error) WithResource
type WithResource ¶ added in v0.1.1
type WithResource struct { Basic ResourceHandler func(rw http.ResponseWriter, typ string, width, height int) error }
WithResource implements an accessory with a /resource handler.
func (WithResource) Resource ¶ added in v0.1.1
func (i WithResource) Resource(rw http.ResponseWriter, typ string, width, height int) error
Click to show internal directories.
Click to hide internal directories.