Documentation
¶
Index ¶
- type Cache
- func (c *Cache) Change(deviceID string, changeFn func(*ipc.Device) error, changeFn2 func(*gbs.Device)) error
- func (c *Cache) Channel() ipc.ChannelStorer
- func (c *Cache) Device() ipc.DeviceStorer
- func (c *Cache) GetChannel(deviceID string, channelID string) (*gbs.Channel, bool)
- func (c *Cache) Load(deviceID string) (*gbs.Device, bool)
- func (c *Cache) LoadDeviceToMemory(conn sip.Connection)
- func (c *Cache) LoadOrStore(deviceID string, value *gbs.Device)
- func (c *Cache) RangeDevices(fn func(key string, value *gbs.Device) bool)
- func (c *Cache) Store(deviceID string, value *gbs.Device)
- type Channel
- func (c *Channel) BatchEdit(ctx context.Context, field string, value any, opts ...orm.QueryOption) error
- func (c *Channel) Create(ctx context.Context, ch *ipc.Channel) error
- func (c *Channel) Delete(ctx context.Context, ch *ipc.Channel, opts ...orm.QueryOption) error
- func (c *Channel) EditGB28181Config(ctx context.Context, ch *ipc.Channel) error
- func (c *Channel) Get(ctx context.Context, ch *ipc.Channel, opts ...orm.QueryOption) error
- func (c *Channel) List(ctx context.Context, chs *[]*ipc.Channel, pager orm.Pager, ...) (int64, error)
- func (c *Channel) Session(ctx context.Context, changeFns ...func(*gorm.DB) error) error
- func (c *Channel) Update(ctx context.Context, ch *ipc.Channel, changeFn func(*ipc.Channel) error, ...) error
- type Device
- func (d *Device) Create(ctx context.Context, dev *ipc.Device) error
- func (d *Device) Delete(ctx context.Context, dev *ipc.Device, opts ...orm.QueryOption) error
- func (d *Device) Get(ctx context.Context, dev *ipc.Device, opts ...orm.QueryOption) error
- func (d *Device) List(ctx context.Context, devs *[]*ipc.Device, pager orm.Pager, ...) (int64, error)
- func (d *Device) Session(ctx context.Context, changeFns ...func(*gorm.DB) error) error
- func (d *Device) Update(ctx context.Context, dev *ipc.Device, changeFn func(*ipc.Device) error, ...) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cache ¶
func (*Cache) Change ¶
func (c *Cache) Change(deviceID string, changeFn func(*ipc.Device) error, changeFn2 func(*gbs.Device)) error
Change implements gbs.MemoryStorer.
func (*Cache) Channel ¶
func (c *Cache) Channel() ipc.ChannelStorer
func (*Cache) Device ¶
func (c *Cache) Device() ipc.DeviceStorer
func (*Cache) GetChannel ¶
GetChannel implements gbs.MemoryStorer.
func (*Cache) LoadDeviceToMemory ¶
func (c *Cache) LoadDeviceToMemory(conn sip.Connection)
LoadDeviceToMemory implements gbs.MemoryStorer.
func (*Cache) LoadOrStore ¶
LoadOrStore implements gbs.MemoryStorer.
func (*Cache) RangeDevices ¶
RangeDevices implements gbs.MemoryStorer.
type Channel ¶
type Channel Cache
func (*Channel) BatchEdit ¶
func (c *Channel) BatchEdit(ctx context.Context, field string, value any, opts ...orm.QueryOption) error
BatchEdit implements ipc.ChannelStorer.
func (*Channel) EditGB28181Config ¶ added in v1.4.0
EditGB28181Config implements ipc.ChannelStorer.
func (*Channel) List ¶ added in v1.4.21
func (c *Channel) List(ctx context.Context, chs *[]*ipc.Channel, pager orm.Pager, opts ...orm.QueryOption) (int64, error)
List implements ipc.ChannelStorer.
type Device ¶
type Device = Cache
func (*Device) List ¶ added in v1.4.21
func (d *Device) List(ctx context.Context, devs *[]*ipc.Device, pager orm.Pager, opts ...orm.QueryOption) (int64, error)
List implements ipc.DeviceStorer.
Click to show internal directories.
Click to hide internal directories.