Versions in this module Expand all Collapse all v1 v1.0.35 May 24, 2024 v1.0.34 May 9, 2024 v1.0.33 Mar 6, 2024 v1.0.32 Nov 28, 2023 Changes in this version + const HTTPContentTypeHAPJson + const HTTPContentTypePairingTLV8 + const JsonStatusInsufficientPrivileges + const JsonStatusInvalidValueInRequest + const JsonStatusNotificationNotSupported + const JsonStatusOperationTimedOut + const JsonStatusOutOfResource + const JsonStatusReadOnlyCharacteristic + const JsonStatusResourceBusy + const JsonStatusResourceDoesNotExist + const JsonStatusServiceCommunicationFailure + const JsonStatusSuccess + const JsonStatusWriteOnlyCharacteristic + const M1 + const M2 + const M3 + const M4 + const M5 + const M6 + const MethodAddPairing + const MethodDeletePairing + const MethodListPairings + const MethodPair + const MethodPairMFi + const MethodVerifyPair + const PermissionAdmin + const PermissionUser + const TlvErrorAuthentication + const TlvErrorBackoff + const TlvErrorBusy + const TlvErrorInvalidRequest + const TlvErrorMaxPeers + const TlvErrorMaxTries + const TlvErrorUnavailable + const TlvErrorUnknown + const TlvErrorUnknownPeer + var InvalidPins = map[string]bool + func JsonError(res http.ResponseWriter, status int) error + func JsonMultiStatus(res http.ResponseWriter, body interface{}) error + func JsonOK(res http.ResponseWriter, body interface{}) error + func NewChunkedWriter(wr io.Writer, chunk int) io.Writer + type KeyPair struct + Private []byte + Public []byte + type Pairing struct + Name string + Permission byte + PublicKey []byte + type ServeMux interface + Handle func(pattern string, handler http.Handler) + HandleFunc func(pattern string, handler http.HandlerFunc) + Mount func(pattern string, handler http.Handler) + type Server struct + Addr string + Ifaces []string + Key KeyPair + MfiCompliant bool + Pin string + Protocol string + SetupId string + func NewServer(store Store, a *accessory.A, as ...*accessory.A) (*Server, error) + func (s *Server) DelTimedWrite(request *http.Request) + func (s *Server) IsAuthorized(request *http.Request) bool + func (s *Server) IsPaired() bool + func (s *Server) ListenAndServe(ctx context.Context) error + func (s *Server) ServeMux() ServeMux + func (s *Server) SetTimedWrite(ttl, pid uint64, request *http.Request) + func (s *Server) TimedWrite(request *http.Request) *TimedWrite + type Store interface + Delete func(key string) error + Get func(key string) ([]byte, error) + KeysWithSuffix func(suffix string) ([]string, error) + Set func(key string, value []byte) error + func NewFsStore(dir string) Store + func NewMemStore() Store + type TimedWrite struct