Documentation ¶
Index ¶
- Constants
- func Connect() (*mongo.Client, error)
- func ConnectCache(addr string, timeout time.Duration) (*redis.Client, error)
- type CfgInstance
- type CfgParamNode
- type DevType
- type DmCommand
- type DmEvent
- type DmObject
- type DmParam
- type Instance
- type Param
- type UspDb
- func (u *UspDb) DeleteCfgInstance(dev *DevType, path string, key string) error
- func (u *UspDb) DeleteCfgInstancesByDevType(dev *DevType) error
- func (u *UspDb) DeleteCfgInstancesByRegex(dev *DevType, path string) error
- func (u *UspDb) DeleteCfgParamNode(dev *DevType, path string) error
- func (u *UspDb) DeleteCfgParamNodesByRegex(dev *DevType, path string) error
- func (u *UspDb) DeleteCollection(collName string) error
- func (u *UspDb) DeleteDmObjectManyFromDb(epId string, path string) error
- func (u *UspDb) DeleteInstanceByUniqueKey(epId string, key string, value string) error
- func (u *UspDb) DeleteInstanceFromDb(epId string, path string) error
- func (u *UspDb) DeleteInstancesByRegex(epId string, path string) error
- func (u *UspDb) DeleteParamManyFromDb(epId string, path string) error
- func (u *UspDb) GetAllEndpoints() ([]string, error)
- func (u *UspDb) GetCfgInstances(dev *DevType) ([]*CfgInstance, error)
- func (u *UspDb) GetCfgInstancesByPath(dev *DevType, path string) ([]*CfgInstance, error)
- func (u *UspDb) GetCfgInstancesByRegex(dev *DevType, path string) ([]*CfgInstance, error)
- func (u *UspDb) GetCfgParamNodes(dev *DevType) ([]*CfgParamNode, error)
- func (u *UspDb) GetCfgParams(dev *DevType, path string) (map[string]string, error)
- func (u *UspDb) GetCfgParamsByRegex(dev *DevType, path string) ([]*CfgParamNode, error)
- func (u *UspDb) GetDm(epId string, path string) (*DmObject, error)
- func (u *UspDb) GetDmByRegex(epId string, path string) ([]*DmObject, error)
- func (u *UspDb) GetInstances(epId string, path string) ([]*Instance, error)
- func (u *UspDb) GetInstancesByRegex(epId string, path string) ([]*Instance, error)
- func (u *UspDb) GetInstancesByUniqueKeys(epId string, key string, value string) (*Instance, error)
- func (u *UspDb) GetParamObjByValue(epId string, path string, name string, value string) ([]*Param, error)
- func (u *UspDb) GetParams(epId string, path string) ([]*Param, error)
- func (u *UspDb) GetParamsByRegex(epId string, path string) ([]*Param, error)
- func (u *UspDb) Init(client *mongo.Client) error
- func (u *UspDb) WriteCfgInstance(inst *CfgInstance) error
- func (u *UspDb) WriteCfgParamNode(p *CfgParamNode) error
- func (u *UspDb) WriteDmObjectToDb(dm *DmObject) error
- func (u *UspDb) WriteInstanceToDb(inst Instance) error
- func (u *UspDb) WriteParamToDb(p *Param) error
Constants ¶
View Source
const ( UspParamCollection = "params" UspDmCollection = "datamodel" UspInstanceCollection = "instances" UspCfgInstanceCollection = "cfginstances" // DefaultConfig Instance collection UspCfgParamCollection = "cfgparams" // DefaultConfig Param collection )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CfgInstance ¶
type CfgParamNode ¶
Node is for single instance objects for which path for each device is unique, e.g. IP
type DmObject ¶
type DmObject struct { EndpointId string `json:"endpoint_id" bson:"endpoint_id"` Path string `json:"path" bson:"path"` MultiInstance bool `json:"multi_instance" bson:"multi_instance"` Access string `json:"access" bson:"access"` Params []DmParam `json:"params" bson:"params"` Events []DmEvent `json:"events" bson:"events"` Cmds []DmCommand `json:"cmds" bson:"cmds"` }
type UspDb ¶
type UspDb struct {
// contains filtered or unexported fields
}
func (*UspDb) DeleteCfgInstance ¶
func (*UspDb) DeleteCfgInstancesByDevType ¶
func (*UspDb) DeleteCfgInstancesByRegex ¶
func (*UspDb) DeleteCfgParamNode ¶
func (*UspDb) DeleteCfgParamNodesByRegex ¶
func (*UspDb) DeleteCollection ¶
func (*UspDb) DeleteDmObjectManyFromDb ¶
func (*UspDb) DeleteInstanceByUniqueKey ¶
func (*UspDb) DeleteInstanceFromDb ¶
func (*UspDb) DeleteInstancesByRegex ¶
func (*UspDb) DeleteParamManyFromDb ¶
func (*UspDb) GetAllEndpoints ¶
func (*UspDb) GetCfgInstances ¶
func (u *UspDb) GetCfgInstances(dev *DevType) ([]*CfgInstance, error)
func (*UspDb) GetCfgInstancesByPath ¶
func (u *UspDb) GetCfgInstancesByPath(dev *DevType, path string) ([]*CfgInstance, error)
func (*UspDb) GetCfgInstancesByRegex ¶
func (u *UspDb) GetCfgInstancesByRegex(dev *DevType, path string) ([]*CfgInstance, error)
func (*UspDb) GetCfgParamNodes ¶
func (u *UspDb) GetCfgParamNodes(dev *DevType) ([]*CfgParamNode, error)
func (*UspDb) GetCfgParams ¶
func (*UspDb) GetCfgParamsByRegex ¶
func (u *UspDb) GetCfgParamsByRegex(dev *DevType, path string) ([]*CfgParamNode, error)
func (*UspDb) GetDmByRegex ¶
func (*UspDb) GetInstances ¶
func (*UspDb) GetInstancesByRegex ¶
func (*UspDb) GetInstancesByUniqueKeys ¶
func (*UspDb) GetParamObjByValue ¶
func (*UspDb) GetParamsByRegex ¶
func (*UspDb) WriteCfgInstance ¶
func (u *UspDb) WriteCfgInstance(inst *CfgInstance) error
func (*UspDb) WriteCfgParamNode ¶
func (u *UspDb) WriteCfgParamNode(p *CfgParamNode) error
func (*UspDb) WriteDmObjectToDb ¶
func (*UspDb) WriteInstanceToDb ¶
func (*UspDb) WriteParamToDb ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.