storage

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2020 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseStore

type BaseStore struct {
	// contains filtered or unexported fields
}

func NewBaseStore

func NewBaseStore(thingDescPath string) *BaseStore

func (*BaseStore) DeleteThingDescriptor

func (b *BaseStore) DeleteThingDescriptor(address string) error

func (*BaseStore) GetThingDescriptor

func (b *BaseStore) GetThingDescriptor(address string) error

func (*BaseStore) SaveThingDescriptor

func (b *BaseStore) SaveThingDescriptor(address string, inclusionReport interface{}) error

type LocalRegistryStore

type LocalRegistryStore struct {
	// contains filtered or unexported fields
}

func (*LocalRegistryStore) ClearAll

func (st *LocalRegistryStore) ClearAll() error

func (*LocalRegistryStore) Connect

func (st *LocalRegistryStore) Connect() error

func (*LocalRegistryStore) DeleteLocation

func (st *LocalRegistryStore) DeleteLocation(id model.ID) error

func (*LocalRegistryStore) DeleteService

func (st *LocalRegistryStore) DeleteService(id model.ID) error

func (*LocalRegistryStore) DeleteThing

func (st *LocalRegistryStore) DeleteThing(id model.ID) error

func (*LocalRegistryStore) Disconnect

func (st *LocalRegistryStore) Disconnect()

func (*LocalRegistryStore) ExtendThingsWithLocation

func (st *LocalRegistryStore) ExtendThingsWithLocation(things []model.Thing) []model.ThingWithLocationView

func (*LocalRegistryStore) GetAllDevices

func (st *LocalRegistryStore) GetAllDevices() ([]model.Device, error)

func (*LocalRegistryStore) GetAllLocations

func (st *LocalRegistryStore) GetAllLocations() ([]model.Location, error)

func (*LocalRegistryStore) GetAllServices

func (st *LocalRegistryStore) GetAllServices() ([]model.Service, error)

func (*LocalRegistryStore) GetAllThings

func (st *LocalRegistryStore) GetAllThings() ([]model.Thing, error)

func (*LocalRegistryStore) GetBackendName

func (st *LocalRegistryStore) GetBackendName() string

func (*LocalRegistryStore) GetConnection

func (st *LocalRegistryStore) GetConnection() interface{}

func (*LocalRegistryStore) GetDeviceById

func (st *LocalRegistryStore) GetDeviceById(Id model.ID) (*model.DeviceExtendedView, error)

func (*LocalRegistryStore) GetDeviceByIntegrationId

func (st *LocalRegistryStore) GetDeviceByIntegrationId(id string) (*model.Device, error)

func (*LocalRegistryStore) GetDeviceByLocationId

func (st *LocalRegistryStore) GetDeviceByLocationId(locationId model.ID) ([]model.Device, error)

func (*LocalRegistryStore) GetDevicesByLocationId

func (st *LocalRegistryStore) GetDevicesByLocationId(locationId model.ID) ([]model.Device, error)

func (*LocalRegistryStore) GetDevicesByThingId

func (st *LocalRegistryStore) GetDevicesByThingId(locationId model.ID) ([]model.Device, error)

func (*LocalRegistryStore) GetExtendedDevices

func (st *LocalRegistryStore) GetExtendedDevices() ([]model.DeviceExtendedView, error)

func (*LocalRegistryStore) GetExtendedServices

func (st *LocalRegistryStore) GetExtendedServices(serviceNameFilter string, filterWithoutAlias bool, thingIdFilter model.ID, locationIdFilter model.ID) ([]model.ServiceExtendedView, error)

GetExtendedServices return services enhanced with location Alias

func (*LocalRegistryStore) GetLocationById

func (st *LocalRegistryStore) GetLocationById(Id model.ID) (*model.Location, error)

func (*LocalRegistryStore) GetLocationByIntegrationId

func (st *LocalRegistryStore) GetLocationByIntegrationId(id string) (*model.Location, error)

func (*LocalRegistryStore) GetServiceByAddress

func (st *LocalRegistryStore) GetServiceByAddress(serviceName string, serviceAddress string) (*model.Service, error)

func (*LocalRegistryStore) GetServiceByFullAddress

func (st *LocalRegistryStore) GetServiceByFullAddress(address string) (*model.ServiceExtendedView, error)

func (*LocalRegistryStore) GetServiceById

func (st *LocalRegistryStore) GetServiceById(Id model.ID) (*model.Service, error)

func (*LocalRegistryStore) GetState

func (st *LocalRegistryStore) GetState() string

func (*LocalRegistryStore) GetThingByAddress

func (st *LocalRegistryStore) GetThingByAddress(technology string, address string) (*model.Thing, error)

func (*LocalRegistryStore) GetThingById

func (st *LocalRegistryStore) GetThingById(Id model.ID) (*model.Thing, error)

func (*LocalRegistryStore) GetThingByIntegrationId

func (st *LocalRegistryStore) GetThingByIntegrationId(id string) (*model.Thing, error)

func (*LocalRegistryStore) GetThingExtendedViewByAddress

func (st *LocalRegistryStore) GetThingExtendedViewByAddress(technology string, address string) (*model.ThingExtendedView, error)

func (*LocalRegistryStore) GetThingExtendedViewById

func (st *LocalRegistryStore) GetThingExtendedViewById(Id model.ID) (*model.ThingExtendedView, error)

GetThingExtendedViewById return thing enhanced with linked services and location Alias

func (*LocalRegistryStore) GetThingsByLocationId

func (st *LocalRegistryStore) GetThingsByLocationId(locationId model.ID) ([]model.Thing, error)

func (*LocalRegistryStore) Init

func (st *LocalRegistryStore) Init() error

func (*LocalRegistryStore) LoadConfig

func (st *LocalRegistryStore) LoadConfig(config interface{}) error

func (*LocalRegistryStore) ReindexAll

func (st *LocalRegistryStore) ReindexAll() error

func (*LocalRegistryStore) Stop

func (st *LocalRegistryStore) Stop()

func (*LocalRegistryStore) Sync

func (st *LocalRegistryStore) Sync() error

func (*LocalRegistryStore) UpsertLocation

func (st *LocalRegistryStore) UpsertLocation(location *model.Location) (model.ID, error)

func (*LocalRegistryStore) UpsertService

func (st *LocalRegistryStore) UpsertService(service *model.Service) (model.ID, error)

func (*LocalRegistryStore) UpsertThing

func (st *LocalRegistryStore) UpsertThing(thing *model.Thing) (model.ID, error)

type RegistryStorage

type RegistryStorage interface {
	Connect() error
	Disconnect()
	GetBackendName() string
	GetServiceById(Id model.ID) (*model.Service, error)
	GetServiceByFullAddress(address string) (*model.ServiceExtendedView, error)
	GetLocationById(Id model.ID) (*model.Location, error)
	GetAllThings() ([]model.Thing, error)
	ExtendThingsWithLocation(things []model.Thing) []model.ThingWithLocationView
	GetAllServices() ([]model.Service, error)
	GetThingExtendedViewById(Id model.ID) (*model.ThingExtendedView, error)
	GetServiceByAddress(serviceName string, serviceAddress string) (*model.Service, error)
	GetExtendedServices(serviceNameFilter string, filterWithoutAlias bool, thingIdFilter model.ID, locationIdFilter model.ID) ([]model.ServiceExtendedView, error)
	GetAllLocations() ([]model.Location, error)
	GetThingById(Id model.ID) (*model.Thing, error)
	GetThingByAddress(technology string, address string) (*model.Thing, error)
	GetThingExtendedViewByAddress(technology string, address string) (*model.ThingExtendedView, error)
	GetThingsByLocationId(locationId model.ID) ([]model.Thing, error)
	GetThingByIntegrationId(id string) (*model.Thing, error)
	GetAllDevices() ([]model.Device, error)
	GetExtendedDevices() ([]model.DeviceExtendedView, error)
	GetDeviceById(Id model.ID) (*model.DeviceExtendedView, error)
	GetDevicesByLocationId(locationId model.ID) ([]model.Device, error)
	GetDevicesByThingId(locationId model.ID) ([]model.Device, error)
	GetDeviceByIntegrationId(id string) (*model.Device, error)
	GetLocationByIntegrationId(id string) (*model.Location, error)
	UpsertThing(thing *model.Thing) (model.ID, error)
	UpsertService(service *model.Service) (model.ID, error)
	UpsertLocation(location *model.Location) (model.ID, error)
	DeleteThing(id model.ID) error
	DeleteService(id model.ID) error
	DeleteLocation(id model.ID) error
	ReindexAll() error
	ClearAll() error
	Sync() error

	LoadConfig(config interface{}) error
	Init() error
	Stop()
	GetConnection() interface{}
	GetState() string
}

func NewThingRegistryStore

func NewThingRegistryStore(storeFile string) RegistryStorage

func NewVinculumRegistryStore

func NewVinculumRegistryStore(config *tpflow.Configs) RegistryStorage

type VinculumRegistryStore

type VinculumRegistryStore struct {
	// contains filtered or unexported fields
}

func (VinculumRegistryStore) ClearAll

func (VinculumRegistryStore) ClearAll() error

func (*VinculumRegistryStore) Connect

func (r *VinculumRegistryStore) Connect() error

func (VinculumRegistryStore) DeleteLocation

func (VinculumRegistryStore) DeleteLocation(id model.ID) error

func (VinculumRegistryStore) DeleteService

func (VinculumRegistryStore) DeleteService(id model.ID) error

func (VinculumRegistryStore) DeleteThing

func (VinculumRegistryStore) DeleteThing(id model.ID) error

func (*VinculumRegistryStore) Disconnect

func (r *VinculumRegistryStore) Disconnect()

func (*VinculumRegistryStore) ExtendThingsWithLocation

func (r *VinculumRegistryStore) ExtendThingsWithLocation(things []model.Thing) []model.ThingWithLocationView

func (*VinculumRegistryStore) GetAllDevices

func (r *VinculumRegistryStore) GetAllDevices() ([]model.Device, error)

func (*VinculumRegistryStore) GetAllLocations

func (r *VinculumRegistryStore) GetAllLocations() ([]model.Location, error)

func (*VinculumRegistryStore) GetAllServices

func (r *VinculumRegistryStore) GetAllServices() ([]model.Service, error)

func (*VinculumRegistryStore) GetAllThings

func (r *VinculumRegistryStore) GetAllThings() ([]model.Thing, error)

func (*VinculumRegistryStore) GetBackendName

func (r *VinculumRegistryStore) GetBackendName() string

func (*VinculumRegistryStore) GetConnection

func (r *VinculumRegistryStore) GetConnection() interface{}

func (VinculumRegistryStore) GetDeviceById

func (VinculumRegistryStore) GetDeviceByIntegrationId

func (VinculumRegistryStore) GetDeviceByIntegrationId(id string) (*model.Device, error)

func (VinculumRegistryStore) GetDevicesByLocationId

func (VinculumRegistryStore) GetDevicesByLocationId(locationId model.ID) ([]model.Device, error)

func (*VinculumRegistryStore) GetDevicesByThingId

func (r *VinculumRegistryStore) GetDevicesByThingId(locationId model.ID) ([]model.Device, error)

func (*VinculumRegistryStore) GetExtendedDevices

func (r *VinculumRegistryStore) GetExtendedDevices() ([]model.DeviceExtendedView, error)

func (VinculumRegistryStore) GetExtendedServices

func (VinculumRegistryStore) GetExtendedServices(serviceNameFilter string, filterWithoutAlias bool, thingIdFilter model.ID, locationIdFilter model.ID) ([]model.ServiceExtendedView, error)

func (*VinculumRegistryStore) GetLocationById

func (r *VinculumRegistryStore) GetLocationById(Id model.ID) (*model.Location, error)

func (VinculumRegistryStore) GetLocationByIntegrationId

func (VinculumRegistryStore) GetLocationByIntegrationId(id string) (*model.Location, error)

func (VinculumRegistryStore) GetServiceByAddress

func (VinculumRegistryStore) GetServiceByAddress(serviceName string, serviceAddress string) (*model.Service, error)

func (VinculumRegistryStore) GetServiceByFullAddress

func (VinculumRegistryStore) GetServiceByFullAddress(address string) (*model.ServiceExtendedView, error)

func (VinculumRegistryStore) GetServiceById

func (VinculumRegistryStore) GetServiceById(Id model.ID) (*model.Service, error)

func (VinculumRegistryStore) GetState

func (VinculumRegistryStore) GetState() string

func (VinculumRegistryStore) GetThingByAddress

func (VinculumRegistryStore) GetThingByAddress(technology string, address string) (*model.Thing, error)

func (VinculumRegistryStore) GetThingById

func (VinculumRegistryStore) GetThingById(Id model.ID) (*model.Thing, error)

func (VinculumRegistryStore) GetThingByIntegrationId

func (VinculumRegistryStore) GetThingByIntegrationId(id string) (*model.Thing, error)

func (VinculumRegistryStore) GetThingExtendedViewByAddress

func (VinculumRegistryStore) GetThingExtendedViewByAddress(technology string, address string) (*model.ThingExtendedView, error)

func (VinculumRegistryStore) GetThingExtendedViewById

func (VinculumRegistryStore) GetThingExtendedViewById(Id model.ID) (*model.ThingExtendedView, error)

func (*VinculumRegistryStore) GetThingsByLocationId

func (r *VinculumRegistryStore) GetThingsByLocationId(locationId model.ID) ([]model.Thing, error)

func (*VinculumRegistryStore) Init

func (r *VinculumRegistryStore) Init() error

func (*VinculumRegistryStore) LoadConfig

func (r *VinculumRegistryStore) LoadConfig(config interface{}) error

func (VinculumRegistryStore) ReindexAll

func (VinculumRegistryStore) ReindexAll() error

func (*VinculumRegistryStore) Stop

func (r *VinculumRegistryStore) Stop()

func (*VinculumRegistryStore) Sync

func (r *VinculumRegistryStore) Sync() error

func (VinculumRegistryStore) UpsertLocation

func (VinculumRegistryStore) UpsertLocation(location *model.Location) (model.ID, error)

func (VinculumRegistryStore) UpsertService

func (VinculumRegistryStore) UpsertService(service *model.Service) (model.ID, error)

func (VinculumRegistryStore) UpsertThing

func (VinculumRegistryStore) UpsertThing(thing *model.Thing) (model.ID, error)

Jump to

Keyboard shortcuts

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