persistence

package
v0.0.0-...-c94490f Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2019 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const GATEWAY_NONE = ""

Variables

This section is empty.

Functions

func IndexTags

func IndexTags(tags []string) (result map[string]string)

Types

type Persistence

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

func New

func New() *Persistence

func (*Persistence) CheckClearGateway

func (this *Persistence) CheckClearGateway(id string) error

func (*Persistence) CheckDeviceTypeMaintenance

func (this *Persistence) CheckDeviceTypeMaintenance(maintenance string) (result bool, err error)

func (*Persistence) CheckValueTypeDelete

func (this *Persistence) CheckValueTypeDelete(id string) (err error)

func (*Persistence) CreateDeviceClass

func (this *Persistence) CreateDeviceClass(element model.DeviceClass) (id string, err error)

func (*Persistence) CreateProtocol

func (this *Persistence) CreateProtocol(element model.Protocol) (id string, err error)

func (*Persistence) CreateValueType

func (this *Persistence) CreateValueType(element model.ValueType) (err error)

func (*Persistence) CreateVendor

func (this *Persistence) CreateVendor(element model.Vendor) (id string, err error)

func (*Persistence) DeleteDeviceClass

func (this *Persistence) DeleteDeviceClass(id string) error

func (*Persistence) DeleteDeviceInstance

func (this *Persistence) DeleteDeviceInstance(id string) (err error)

func (*Persistence) DeleteDeviceType

func (this *Persistence) DeleteDeviceType(id string) (err error)

func (*Persistence) DeleteEndpoints

func (this *Persistence) DeleteEndpoints(deviceid string) (err error)

func (*Persistence) DeleteGateway

func (this *Persistence) DeleteGateway(id string) error

func (*Persistence) DeleteValueType

func (this *Persistence) DeleteValueType(id string) (err error)

func (*Persistence) DeleteVendor

func (this *Persistence) DeleteVendor(id string) error

func (*Persistence) DeviceInstanceIdExists

func (this *Persistence) DeviceInstanceIdExists(id string) (exists bool)

func (*Persistence) DeviceInstanceIsConsistent

func (this *Persistence) DeviceInstanceIsConsistent(deviceInstance model.DeviceInstance) (ok bool, inconsistencies string)

func (*Persistence) DeviceTypeIdExists

func (this *Persistence) DeviceTypeIdExists(id string) (exists bool)

func (*Persistence) DeviceTypeIsConsistent

func (this *Persistence) DeviceTypeIsConsistent(deviceType model.DeviceType) (ok bool, inconsistencies string)

func (*Persistence) DeviceTypeQuery

func (this *Persistence) DeviceTypeQuery(deviceType model.DeviceType) (exists bool, id string, err error)

func (*Persistence) EndpointCollision

func (this *Persistence) EndpointCollision(endpoint string) (collisions []model.Endpoint, err error)

func (*Persistence) FlushDevices

func (this *Persistence) FlushDevices()

func (*Persistence) FlushDevicetypes

func (this *Persistence) FlushDevicetypes()

func (*Persistence) FlushGateways

func (this *Persistence) FlushGateways()

func (*Persistence) FlushValueTypes

func (this *Persistence) FlushValueTypes()

func (*Persistence) GatewayCheckCommit

func (this *Persistence) GatewayCheckCommit(id string, ref model.GatewayRef) (err error)

func (*Persistence) GetAllDeviceInstanceUsingDeviceTypes

func (this *Persistence) GetAllDeviceInstanceUsingDeviceTypes(deviceType string) (deviceInstanceIds []string, err error)

func (*Persistence) GetAllowedValues

func (this *Persistence) GetAllowedValues() (result model.AllowedValues)

func (*Persistence) GetDeepDeviceTypeById

func (this *Persistence) GetDeepDeviceTypeById(id string) (deviceType model.DeviceType, err error)

func (*Persistence) GetDeviceClass

func (this *Persistence) GetDeviceClass(id string) (result model.DeviceClass, err error)

func (*Persistence) GetDeviceInstanceById

func (this *Persistence) GetDeviceInstanceById(id string) (deviceInstance model.DeviceInstance, err error)

func (*Persistence) GetDeviceServiceEntity

func (this *Persistence) GetDeviceServiceEntity(deviceid string) (result model.DeviceServiceEntity, err error)

func (*Persistence) GetDeviceTypeById

func (this *Persistence) GetDeviceTypeById(id string, depth int) (deviceType model.DeviceType, err error)

func (*Persistence) GetDeviceTypeIdByServiceId

func (this *Persistence) GetDeviceTypeIdByServiceId(serviceId string) (deviceTypeId string, err error)

func (*Persistence) GetDeviceTypeList

func (this *Persistence) GetDeviceTypeList(limit int, offset int) (deviceTypes []model.DeviceType, err error)

func (*Persistence) GetEndpointByDeviceAndService

func (this *Persistence) GetEndpointByDeviceAndService(deviceId string, serviceId string) (result model.Endpoint, err error)

func (*Persistence) GetEndpoints

func (this *Persistence) GetEndpoints(endpoint string, protocolHandler string) (result []model.Endpoint, err error)

func (*Persistence) GetEndpointsList

func (this *Persistence) GetEndpointsList(limit, offset int) (result []model.Endpoint, err error)

func (*Persistence) GetGateway

func (this *Persistence) GetGateway(id string) (gateway model.Gateway, err error)

func (*Persistence) GetGatewayName

func (this *Persistence) GetGatewayName(id string) (name string, err error)

func (*Persistence) GetGatewayNameByDevice

func (this *Persistence) GetGatewayNameByDevice(id string) (name string, err error)

func (*Persistence) GetOrdf

func (this *Persistence) GetOrdf() ordf.Persistence

func (*Persistence) GetProtocolByUri

func (this *Persistence) GetProtocolByUri(uri string) (result model.Protocol, err error)

func (*Persistence) GetServiceById

func (this *Persistence) GetServiceById(id string) (service model.Service, err error)

func (*Persistence) GetValueTypeById

func (this *Persistence) GetValueTypeById(id string) (valueType model.ValueType, err error)

func (*Persistence) GetValueTypeList

func (this *Persistence) GetValueTypeList(limit int, offset int) (valueTypes []model.ValueType, err error)

func (*Persistence) GetVendor

func (this *Persistence) GetVendor(id string) (result model.Vendor, err error)

func (*Persistence) ListDeviceClass

func (this *Persistence) ListDeviceClass(limit int, offset int) (result []model.DeviceClass, err error)

func (*Persistence) ListVendor

func (this *Persistence) ListVendor(limit int, offset int) (result []model.Vendor, err error)

func (*Persistence) ProvideGateway

func (this *Persistence) ProvideGateway(id string, owner string) (gateway model.Gateway, isNew bool, err error)

func (*Persistence) QueryServiceDeviceType

func (this *Persistence) QueryServiceDeviceType(service model.Service) (typeIds []string, err error)

func (*Persistence) SearchProtocol

func (this *Persistence) SearchProtocol(query string, limit int, offset int) (protocols []model.Protocol, err error)

func (*Persistence) SearchText

func (this *Persistence) SearchText(resultList interface{}, queryStruct interface{}, limit int, offset int) (err error)

func (*Persistence) SearchValueType

func (this *Persistence) SearchValueType(query string, limit int, offset int) (valueTypes []model.ValueType, err error)

func (*Persistence) SetDeviceInstance

func (this *Persistence) SetDeviceInstance(deviceInstance model.DeviceInstance) (err error)

func (*Persistence) SetDeviceType

func (this *Persistence) SetDeviceType(deviceType model.DeviceType) (err error)

func (*Persistence) SetGatway

func (this *Persistence) SetGatway(id string, name string, hash string, devices []string) (err error)

func (*Persistence) SetId

func (this *Persistence) SetId(element interface{}) error

func (*Persistence) TypeAssignmentIsConsistent

func (this *Persistence) TypeAssignmentIsConsistent(assignment model.TypeAssignment) (ok bool, inconsistencies string)

func (*Persistence) UpdateDeviceEndpoints

func (this *Persistence) UpdateDeviceEndpoints(device model.DeviceInstance) error

func (*Persistence) UpdateDeviceTypeEndpoints

func (this *Persistence) UpdateDeviceTypeEndpoints(deviceType model.DeviceType) error

func (*Persistence) ValueTypeIdExists

func (this *Persistence) ValueTypeIdExists(id string) (exists bool, err error)

func (*Persistence) ValueTypeIsConsistent

func (this *Persistence) ValueTypeIsConsistent(valueType model.ValueType) (err error)

func (*Persistence) ValueTypeQuery

func (this *Persistence) ValueTypeQuery(valueType model.ValueType) (exists bool, id string, err error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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