cache

package
v1.2.1-dev.5 Latest Latest
Warning

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

Go to latest
Published: May 12, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitCache

func InitCache()

Init basic state for cache

Types

type DeviceCache

type DeviceCache interface {
	ForName(name string) (contract.Device, bool)
	ForId(id string) (contract.Device, bool)
	All() []contract.Device
	Add(device contract.Device) error
	Update(device contract.Device) error
	Remove(id string) error
	RemoveByName(name string) error
	UpdateAdminState(id string, state contract.AdminState) error
}

func Devices

func Devices() DeviceCache

type ProfileCache

type ProfileCache interface {
	ForName(name string) (contract.DeviceProfile, bool)
	ForId(id string) (contract.DeviceProfile, bool)
	All() []contract.DeviceProfile
	Add(profile contract.DeviceProfile) error
	Update(profile contract.DeviceProfile) error
	Remove(id string) error
	RemoveByName(name string) error
	DeviceResource(profileName string, resourceName string) (contract.DeviceResource, bool)
	CommandExists(profileName string, cmd string, method string) (bool, error)
	ResourceOperations(profileName string, cmd string, method string) ([]contract.ResourceOperation, error)
	ResourceOperation(profileName string, deviceResource string, method string) (contract.ResourceOperation, error)
}

func Profiles

func Profiles() ProfileCache

type ProvisionWatcherCache added in v1.2.0

type ProvisionWatcherCache interface {
	ForName(name string) (contract.ProvisionWatcher, bool)
	ForId(id string) (contract.ProvisionWatcher, bool)
	All() []contract.ProvisionWatcher
	Add(device contract.ProvisionWatcher) error
	Update(device contract.ProvisionWatcher) error
	Remove(id string) error
	RemoveByName(name string) error
	UpdateAdminState(id string, state contract.AdminState) error
}

func ProvisionWatchers added in v1.2.0

func ProvisionWatchers() ProvisionWatcherCache

type ValueDescriptorCache

type ValueDescriptorCache interface {
	ForName(name string) (contract.ValueDescriptor, bool)
	All() []contract.ValueDescriptor
	Add(descriptor contract.ValueDescriptor) error
	Update(descriptor contract.ValueDescriptor) error
	Remove(id string) error
	RemoveByName(name string) error
}

func ValueDescriptors

func ValueDescriptors() ValueDescriptorCache

Jump to

Keyboard shortcuts

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