code.pfad.fr/gohmekit@v0.2.1/pairing/database.go (about)

     1  package pairing
     2  
     3  // Database interface for the accessory to store its state.
     4  type Database interface {
     5  	IsPaired() bool
     6  	GetLongTermPublicKey([]byte) ([]byte, error)
     7  	AddLongTermPublicKey(Controller) error
     8  	RemoveLongTermPublicKey(id []byte) error
     9  	ListLongTermPublicKey() ([]Controller, error)
    10  }
    11  
    12  // Controller is used to store the devices in the Database.
    13  type Controller struct {
    14  	PairingID         []byte
    15  	LongTermPublicKey []byte
    16  }