Documentation ¶
Index ¶
- Variables
- type Config
- type Device
- type DeviceConfigMapping
- type Flow
- type FlowFlowSetMapping
- type FlowSet
- type Module
- type Storage
- type StorageImpl
- func (self *StorageImpl) AddConfigToDevice(ctx context.Context, dev_id, cfg_id string) error
- func (self *StorageImpl) AddFlowToFlowSet(ctx context.Context, flwst_id, flw_id string) error
- func (self *StorageImpl) CreateConfig(ctx context.Context, cfg *Config) (*Config, error)
- func (self *StorageImpl) CreateDevice(ctx context.Context, dev *Device) (*Device, error)
- func (self *StorageImpl) CreateFlow(ctx context.Context, flw *Flow) (*Flow, error)
- func (self *StorageImpl) CreateFlowSet(ctx context.Context, flwst *FlowSet) (*FlowSet, error)
- func (self *StorageImpl) CreateModule(ctx context.Context, mdl *Module) (*Module, error)
- func (self *StorageImpl) DeleteConfig(ctx context.Context, id string) error
- func (self *StorageImpl) DeleteDevice(ctx context.Context, id string) error
- func (self *StorageImpl) DeleteFlow(ctx context.Context, id string) error
- func (self *StorageImpl) DeleteFlowSet(ctx context.Context, id string) error
- func (self *StorageImpl) DeleteModule(ctx context.Context, id string) error
- func (self *StorageImpl) GetConfig(ctx context.Context, id string) (*Config, error)
- func (self *StorageImpl) GetDBConn(ctx context.Context) *gorm.DB
- func (self *StorageImpl) GetDevice(ctx context.Context, id string) (*Device, error)
- func (self *StorageImpl) GetDeviceByModuleId(ctx context.Context, id string) (*Device, error)
- func (self *StorageImpl) GetFlow(ctx context.Context, id string) (*Flow, error)
- func (self *StorageImpl) GetFlowSet(ctx context.Context, id string) (*FlowSet, error)
- func (self *StorageImpl) GetModule(ctx context.Context, id string) (*Module, error)
- func (self *StorageImpl) GetRootDBConn() *gorm.DB
- func (self *StorageImpl) ListConfigs(ctx context.Context, cfg *Config) ([]*Config, error)
- func (self *StorageImpl) ListConfigsByDeviceId(ctx context.Context, id string) ([]*Config, error)
- func (self *StorageImpl) ListDevices(ctx context.Context, dev *Device) ([]*Device, error)
- func (self *StorageImpl) ListFlowSets(ctx context.Context, flwst *FlowSet) ([]*FlowSet, error)
- func (self *StorageImpl) ListFlows(ctx context.Context, flw *Flow) ([]*Flow, error)
- func (self *StorageImpl) ListModules(ctx context.Context, mdl *Module) ([]*Module, error)
- func (self *StorageImpl) ListViewFlowSetsByFlowId(ctx context.Context, id string) ([]*FlowSet, error)
- func (self *StorageImpl) PatchConfig(ctx context.Context, id string, config *Config) (*Config, error)
- func (self *StorageImpl) PatchDevice(ctx context.Context, id string, device *Device) (*Device, error)
- func (self *StorageImpl) PatchFlow(ctx context.Context, id string, flw *Flow) (*Flow, error)
- func (self *StorageImpl) PatchFlowSet(ctx context.Context, id string, flwst *FlowSet) (*FlowSet, error)
- func (self *StorageImpl) PatchModule(ctx context.Context, id string, mdl *Module) (*Module, error)
- func (self *StorageImpl) RemoveConfigFromDevice(ctx context.Context, dev_id, cfg_id string) error
- func (self *StorageImpl) RemoveConfigFromDeviceByConfigId(ctx context.Context, cfg_id string) error
- func (self *StorageImpl) RemoveFlowFromFlowSet(ctx context.Context, flwst_id, flw_id string) error
- type StorageImplOption
- type TracedStorage
- func (s *TracedStorage) AddConfigToDevice(ctx context.Context, dev_id, cfg_id string) error
- func (s *TracedStorage) AddFlowToFlowSet(ctx context.Context, flwst_id, flw_id string) error
- func (s *TracedStorage) CreateConfig(ctx context.Context, cfg *Config) (*Config, error)
- func (s *TracedStorage) CreateDevice(ctx context.Context, dev *Device) (*Device, error)
- func (s *TracedStorage) CreateFlow(ctx context.Context, flw *Flow) (*Flow, error)
- func (s *TracedStorage) CreateFlowSet(ctx context.Context, flwst *FlowSet) (*FlowSet, error)
- func (s *TracedStorage) CreateModule(ctx context.Context, dev *Module) (*Module, error)
- func (s *TracedStorage) DeleteConfig(ctx context.Context, id string) error
- func (s *TracedStorage) DeleteDevice(ctx context.Context, id string) error
- func (s *TracedStorage) DeleteFlow(ctx context.Context, id string) error
- func (s *TracedStorage) DeleteFlowSet(ctx context.Context, id string) error
- func (s *TracedStorage) DeleteModule(ctx context.Context, id string) error
- func (s *TracedStorage) GetConfig(ctx context.Context, id string) (*Config, error)
- func (s *TracedStorage) GetDevice(ctx context.Context, id string) (*Device, error)
- func (s *TracedStorage) GetDeviceByModuleId(ctx context.Context, id string) (*Device, error)
- func (s *TracedStorage) GetFlow(ctx context.Context, id string) (*Flow, error)
- func (s *TracedStorage) GetFlowSet(ctx context.Context, id string) (*FlowSet, error)
- func (s *TracedStorage) GetModule(ctx context.Context, id string) (*Module, error)
- func (s *TracedStorage) ListConfigs(ctx context.Context, cfg *Config) ([]*Config, error)
- func (s *TracedStorage) ListConfigsByDeviceId(ctx context.Context, dev_id string) ([]*Config, error)
- func (s *TracedStorage) ListDevices(ctx context.Context, dev *Device) ([]*Device, error)
- func (s *TracedStorage) ListFlowSets(ctx context.Context, flwsts *FlowSet) ([]*FlowSet, error)
- func (s *TracedStorage) ListFlows(ctx context.Context, flw *Flow) ([]*Flow, error)
- func (s *TracedStorage) ListModules(ctx context.Context, mdl *Module) ([]*Module, error)
- func (s *TracedStorage) PatchConfig(ctx context.Context, id string, cfg *Config) (*Config, error)
- func (s *TracedStorage) PatchDevice(ctx context.Context, id string, device *Device) (*Device, error)
- func (s *TracedStorage) PatchFlow(ctx context.Context, id string, flow *Flow) (*Flow, error)
- func (s *TracedStorage) PatchFlowSet(ctx context.Context, id string, flwst *FlowSet) (*FlowSet, error)
- func (s *TracedStorage) PatchModule(ctx context.Context, id string, module *Module) (*Module, error)
- func (s *TracedStorage) RemoveConfigFromDevice(ctx context.Context, dev_id, cfg_id string) error
- func (s *TracedStorage) RemoveConfigFromDeviceByConfigId(ctx context.Context, cfg_id string) error
- func (s *TracedStorage) RemoveFlowFromFlowSet(ctx context.Context, flwst_id, flw_id string) error
Constants ¶
This section is empty.
Variables ¶
View Source
var (
InvalidArgument = errors.New("invalid argument")
)
Functions ¶
This section is empty.
Types ¶
type Device ¶
type Device struct { Id *string CreatedAt time.Time UpdatedAt time.Time HeartbeatAt *time.Time Kind *string `gorm:"column:kind"` State *string `gorm:"column:state"` Name *string `gorm:"column:name"` Alias *string `gorm:"column:alias"` Extra *string `gorm:"column:extra"` Modules []*Module `gorm:"-"` Flows []*Flow `gorm:"-"` Configs []*Config `gorm:"-"` ExtraHelper map[string]string `gorm:"-"` }
type DeviceConfigMapping ¶ added in v1.1.27
type FlowFlowSetMapping ¶ added in v1.1.23
type Module ¶
type Module struct { Id *string CreatedAt time.Time UpdatedAt time.Time HeartbeatAt *time.Time State *string `gorm:"column:state"` DeviceId *string `gorm:"column:device_id"` Endpoint *string `gorm:"column:endpoint"` Component *string `gorm:"column:component"` Name *string `gorm:"column:name"` Alias *string `gorm:"column:alias"` Device *Device `gorm:"-"` }
type Storage ¶
type Storage interface { CreateDevice(context.Context, *Device) (*Device, error) DeleteDevice(ctx context.Context, id string) error PatchDevice(ctx context.Context, id string, device *Device) (*Device, error) GetDevice(ctx context.Context, id string) (*Device, error) ListDevices(context.Context, *Device) ([]*Device, error) GetDeviceByModuleId(ctx context.Context, id string) (*Device, error) CreateConfig(context.Context, *Config) (*Config, error) DeleteConfig(ctx context.Context, id string) error PatchConfig(ctx context.Context, id string, cfg *Config) (*Config, error) GetConfig(ctx context.Context, id string) (*Config, error) ListConfigs(context.Context, *Config) ([]*Config, error) AddConfigToDevice(ctx context.Context, dev_id, cfg_id string) error RemoveConfigFromDevice(ctx context.Context, dev_id, cfg_id string) error RemoveConfigFromDeviceByConfigId(ctx context.Context, cfg_id string) error ListConfigsByDeviceId(ctx context.Context, dev_id string) ([]*Config, error) CreateModule(context.Context, *Module) (*Module, error) DeleteModule(ctx context.Context, id string) error PatchModule(ctx context.Context, id string, module *Module) (*Module, error) GetModule(ctx context.Context, id string) (*Module, error) ListModules(context.Context, *Module) ([]*Module, error) CreateFlow(context.Context, *Flow) (*Flow, error) DeleteFlow(ctx context.Context, id string) error PatchFlow(ctx context.Context, id string, flow *Flow) (*Flow, error) GetFlow(ctx context.Context, id string) (*Flow, error) ListFlows(context.Context, *Flow) ([]*Flow, error) CreateFlowSet(context.Context, *FlowSet) (*FlowSet, error) DeleteFlowSet(ctx context.Context, id string) error PatchFlowSet(ctx context.Context, id string, flow_set *FlowSet) (*FlowSet, error) GetFlowSet(ctx context.Context, id string) (*FlowSet, error) ListFlowSets(context.Context, *FlowSet) ([]*FlowSet, error) ListViewFlowSetsByFlowId(ctx context.Context, id string) ([]*FlowSet, error) AddFlowToFlowSet(ctx context.Context, flow_set_id, flow_id string) error RemoveFlowFromFlowSet(ctx context.Context, flow_set_id, flow_id string) error }
func NewStorage ¶
func NewStorageImpl ¶
func NewTracedStorage ¶ added in v1.1.18
func NewTracedStorage(s Storage, getter opentracing_storage_helper.RootDBConnGetter) (Storage, error)
type StorageImpl ¶
type StorageImpl struct {
// contains filtered or unexported fields
}
func (*StorageImpl) AddConfigToDevice ¶ added in v1.1.27
func (self *StorageImpl) AddConfigToDevice(ctx context.Context, dev_id, cfg_id string) error
func (*StorageImpl) AddFlowToFlowSet ¶ added in v1.1.23
func (self *StorageImpl) AddFlowToFlowSet(ctx context.Context, flwst_id, flw_id string) error
func (*StorageImpl) CreateConfig ¶ added in v1.1.27
func (*StorageImpl) CreateDevice ¶
func (*StorageImpl) CreateFlow ¶
func (*StorageImpl) CreateFlowSet ¶ added in v1.1.23
func (*StorageImpl) CreateModule ¶
func (*StorageImpl) DeleteConfig ¶ added in v1.1.27
func (self *StorageImpl) DeleteConfig(ctx context.Context, id string) error
func (*StorageImpl) DeleteDevice ¶
func (self *StorageImpl) DeleteDevice(ctx context.Context, id string) error
func (*StorageImpl) DeleteFlow ¶
func (self *StorageImpl) DeleteFlow(ctx context.Context, id string) error
func (*StorageImpl) DeleteFlowSet ¶ added in v1.1.23
func (self *StorageImpl) DeleteFlowSet(ctx context.Context, id string) error
func (*StorageImpl) DeleteModule ¶
func (self *StorageImpl) DeleteModule(ctx context.Context, id string) error
func (*StorageImpl) GetDBConn ¶ added in v1.1.18
func (self *StorageImpl) GetDBConn(ctx context.Context) *gorm.DB
func (*StorageImpl) GetDeviceByModuleId ¶ added in v0.100.0
func (*StorageImpl) GetFlowSet ¶ added in v1.1.23
func (*StorageImpl) GetRootDBConn ¶ added in v1.1.18
func (self *StorageImpl) GetRootDBConn() *gorm.DB
func (*StorageImpl) ListConfigs ¶ added in v1.1.27
func (*StorageImpl) ListConfigsByDeviceId ¶ added in v1.1.27
func (*StorageImpl) ListDevices ¶
func (*StorageImpl) ListFlowSets ¶ added in v1.1.23
func (*StorageImpl) ListModules ¶
func (*StorageImpl) ListViewFlowSetsByFlowId ¶ added in v1.1.23
func (*StorageImpl) PatchConfig ¶ added in v1.1.27
func (*StorageImpl) PatchDevice ¶
func (*StorageImpl) PatchFlowSet ¶ added in v1.1.23
func (*StorageImpl) PatchModule ¶
func (*StorageImpl) RemoveConfigFromDevice ¶ added in v1.1.27
func (self *StorageImpl) RemoveConfigFromDevice(ctx context.Context, dev_id, cfg_id string) error
func (*StorageImpl) RemoveConfigFromDeviceByConfigId ¶ added in v1.1.27
func (self *StorageImpl) RemoveConfigFromDeviceByConfigId(ctx context.Context, cfg_id string) error
func (*StorageImpl) RemoveFlowFromFlowSet ¶ added in v1.1.23
func (self *StorageImpl) RemoveFlowFromFlowSet(ctx context.Context, flwst_id, flw_id string) error
type StorageImplOption ¶ added in v1.1.18
type StorageImplOption struct {
IsTraced bool
}
type TracedStorage ¶ added in v1.1.18
type TracedStorage struct { *opentracing_storage_helper.BaseTracedStorage Storage }
func (*TracedStorage) AddConfigToDevice ¶ added in v1.1.27
func (s *TracedStorage) AddConfigToDevice(ctx context.Context, dev_id, cfg_id string) error
func (*TracedStorage) AddFlowToFlowSet ¶ added in v1.1.23
func (s *TracedStorage) AddFlowToFlowSet(ctx context.Context, flwst_id, flw_id string) error
func (*TracedStorage) CreateConfig ¶ added in v1.1.27
func (*TracedStorage) CreateDevice ¶ added in v1.1.18
func (*TracedStorage) CreateFlow ¶ added in v1.1.18
func (*TracedStorage) CreateFlowSet ¶ added in v1.1.23
func (*TracedStorage) CreateModule ¶ added in v1.1.18
func (*TracedStorage) DeleteConfig ¶ added in v1.1.27
func (s *TracedStorage) DeleteConfig(ctx context.Context, id string) error
func (*TracedStorage) DeleteDevice ¶ added in v1.1.18
func (s *TracedStorage) DeleteDevice(ctx context.Context, id string) error
func (*TracedStorage) DeleteFlow ¶ added in v1.1.18
func (s *TracedStorage) DeleteFlow(ctx context.Context, id string) error
func (*TracedStorage) DeleteFlowSet ¶ added in v1.1.23
func (s *TracedStorage) DeleteFlowSet(ctx context.Context, id string) error
func (*TracedStorage) DeleteModule ¶ added in v1.1.18
func (s *TracedStorage) DeleteModule(ctx context.Context, id string) error
func (*TracedStorage) GetDeviceByModuleId ¶ added in v1.1.18
func (*TracedStorage) GetFlowSet ¶ added in v1.1.23
func (*TracedStorage) ListConfigs ¶ added in v1.1.27
func (*TracedStorage) ListConfigsByDeviceId ¶ added in v1.1.27
func (*TracedStorage) ListDevices ¶ added in v1.1.18
func (*TracedStorage) ListFlowSets ¶ added in v1.1.23
func (*TracedStorage) ListModules ¶ added in v1.1.18
func (*TracedStorage) PatchConfig ¶ added in v1.1.27
func (*TracedStorage) PatchDevice ¶ added in v1.1.18
func (*TracedStorage) PatchFlowSet ¶ added in v1.1.23
func (*TracedStorage) PatchModule ¶ added in v1.1.18
func (*TracedStorage) RemoveConfigFromDevice ¶ added in v1.1.27
func (s *TracedStorage) RemoveConfigFromDevice(ctx context.Context, dev_id, cfg_id string) error
func (*TracedStorage) RemoveConfigFromDeviceByConfigId ¶ added in v1.1.27
func (s *TracedStorage) RemoveConfigFromDeviceByConfigId(ctx context.Context, cfg_id string) error
func (*TracedStorage) RemoveFlowFromFlowSet ¶ added in v1.1.23
func (s *TracedStorage) RemoveFlowFromFlowSet(ctx context.Context, flwst_id, flw_id string) error
Click to show internal directories.
Click to hide internal directories.