Versions in this module Expand all Collapse all v0 v0.0.1 Feb 15, 2025 Changes in this version + type AddChannelInput struct + DeviceID string + Ext DeviceExt + IsOnline bool + Name string + PTZType int + type AddDeviceInput struct + DeviceID string + Name string + Password string + type Channel struct + ChannelID string + DeviceID string + Ext DeviceExt + ID string + IsOnline bool + Name string + PTZType int + func (*Channel) TableName() string + type ChannelStorer interface + Add func(context.Context, *Channel) error + Del func(context.Context, *Channel, ...orm.QueryOption) error + Edit func(context.Context, *Channel, func(*Channel), ...orm.QueryOption) error + Find func(context.Context, *[]*Channel, orm.Pager, ...orm.QueryOption) (int64, error) + Get func(context.Context, *Channel, ...orm.QueryOption) error + type Core struct + func NewCore(store Storer, uni uniqueid.Core) Core + func (c *Core) AddChannel(ctx context.Context, in *AddChannelInput) (*Channel, error) + func (c *Core) DelChannel(ctx context.Context, id string) (*Channel, error) + func (c *Core) EditChannel(ctx context.Context, in *EditChannelInput, id string) (*Channel, error) + func (c *Core) FindChannel(ctx context.Context, in *FindChannelInput) ([]*Channel, int64, error) + func (c *Core) GetChannel(ctx context.Context, id string) (*Channel, error) + func (c Core) AddDevice(ctx context.Context, in *AddDeviceInput) (*Device, error) + func (c Core) DelDevice(ctx context.Context, id string) (*Device, error) + func (c Core) EditDevice(ctx context.Context, in *EditDeviceInput, id string) (*Device, error) + func (c Core) FindDevice(ctx context.Context, in *FindDeviceInput) ([]*Device, int64, error) + func (c Core) GetDevice(ctx context.Context, id string) (*Device, error) + func (c Core) GetDeviceByDeviceID(ctx context.Context, deviceID string) (*Device, error) + type Device struct + Address string + Channels int + CreatedAt orm.Time + DeviceID string + Expires int + Ext DeviceExt + ID string + IP string + IsOnline bool + KeepaliveAt orm.Time + Keepalives int + Name string + Password string + Port int + RegisteredAt orm.Time + StreamMode int8 + Trasnport string + UpdatedAt orm.Time + func (*Device) TableName() string + func (d *Device) NetworkAddress() string + func (d Device) Check() error + type DeviceExt struct + Firmware string + Manufacturer string + Model string + Name string + func (i *DeviceExt) Scan(input interface{}) error + func (i DeviceExt) Value() (driver.Value, error) + type DeviceStorer interface + Add func(context.Context, *Device) error + Del func(context.Context, *Device, ...orm.QueryOption) error + Edit func(context.Context, *Device, func(*Device), ...orm.QueryOption) error + Find func(context.Context, *[]*Device, orm.Pager, ...orm.QueryOption) (int64, error) + Get func(context.Context, *Device, ...orm.QueryOption) error + type EditChannelInput struct + DeviceID string + Ext DeviceExt + IsOnline bool + Name string + PTZType int + type EditDeviceInput struct + DeviceID string + Name string + Password string + StreamMode int + type FindChannelInput struct + DeviceID string + IsOnline bool + Key string + type FindDeviceInput struct + Key string + type GB28181 struct + func NewGB28181(ds DeviceStorer, cs ChannelStorer, uni uniqueid.Core) GB28181 + func (g GB28181) Edit(deviceID string, changeFn func(*Device)) error + func (g GB28181) FindDevices(ctx context.Context) ([]*Device, error) + func (g GB28181) GetDeviceByDeviceID(deviceID string) (*Device, error) + func (g GB28181) Login(deviceID string, changeFn func(*Device)) error + func (g GB28181) Logout(deviceID string, changeFn func(*Device)) error + func (g GB28181) SaveChannels(channels []*Channel) error + type Storer interface + Channel func() ChannelStorer + Device func() DeviceStorer