Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CBOR ¶
type CBOR struct{}
CBOR is a type that allows for encoding and decoding of arbitrary types to and from CBOR
type Compressor ¶
type Compressor struct {
// contains filtered or unexported fields
}
Compressor implements go-coap.Compressor
func NewCompressor ¶
func NewCompressor(mapsDir string, mapFiles []string, cborStruct *CBOR) (*Compressor, error)
NewCompressor returns a new instance of the Compressor struct with its dictionary initialised from the given files. Returns an error if the files couldn't be parsed or read.
func (*Compressor) CompressPayload ¶
func (c *Compressor) CompressPayload(j []byte) ([]byte, error)
CompressPayload compresses a given byte array
func (*Compressor) CompressTransaction ¶
func (c *Compressor) CompressTransaction(val interface{}) interface{}
CompressTransaction is a function that compresses PDU bodies and destination tables held inside a federation transaction.
func (*Compressor) DecompressPayload ¶
func (c *Compressor) DecompressPayload(j []byte) ([]byte, error)
DecompressPayload decompresses a given byte array
func (*Compressor) DecompressTransaction ¶
func (c *Compressor) DecompressTransaction(val interface{}) interface{}
DecompressTransaction is a function that compresses a transaction for federation traffic.
type InMemoryKeyStore ¶
type InMemoryKeyStore struct {
// contains filtered or unexported fields
}
InMemoryKeyStore is a struct containing remote and local Diffie Hellman keys implemented by the noise protocol library.
func NewKeyStore ¶
func NewKeyStore() *InMemoryKeyStore
NewKeyStore is a function that creates a new InMemoryKeyStore instance
func (*InMemoryKeyStore) GetLocalKey ¶
func (ks *InMemoryKeyStore) GetLocalKey() (noise.DHKey, error)
GetLocalKey is a function that returns a static local key from the InMemoryKeyStore
func (*InMemoryKeyStore) GetRemoteKey ¶
func (ks *InMemoryKeyStore) GetRemoteKey(addr net.Addr) ([]byte, error)
GetRemoteKey is a function that returns a remote key from the InMemoryKeyStore
func (*InMemoryKeyStore) SetLocalKey ¶
func (ks *InMemoryKeyStore) SetLocalKey(key noise.DHKey) error
SetLocalKey is a function that takes in a DHKey and inserts it into the InMemoryKeyStore
func (*InMemoryKeyStore) SetRemoteKey ¶
func (ks *InMemoryKeyStore) SetRemoteKey(addr net.Addr, key []byte) error
SetRemoteKey is a function that takes in a remote key and the address it is associated with and inserts/updates it in the InMemoryKeyStore