persistence

package
v2.4.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 26, 2022 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthorizedDevice

type AuthorizedDevice struct {
	DeviceID string `db:"device_id"`
	Owner    string `db:"owner"`
}

AuthorizedDevice comprises device's authorization details.

type Iterator

type Iterator interface {
	Err() error
	Next(v *AuthorizedDevice) bool
	Close()
}

type PersistenceTx

type PersistenceTx interface {
	Retrieve(deviceID, owner string) (_ *AuthorizedDevice, ok bool, err error)
	RetrieveByDevice(deviceID string) (_ *AuthorizedDevice, ok bool, err error)
	RetrieveByOwner(owner string) Iterator
	RetrieveAll() Iterator
	Persist(d *AuthorizedDevice) error
	Delete(deviceID, owner string) error
	Close()
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL