model

package
v0.0.0-...-0e7d11b Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChannelRepo

type ChannelRepo struct {
	Data *data.Data
}

func (*ChannelRepo) Create

func (this *ChannelRepo) Create(ctx context.Context, data *domain.Channel) (err error)

新增

func (*ChannelRepo) GetByDeviceId

func (this *ChannelRepo) GetByDeviceId(ctx context.Context, deviceId string, channelId string) (data *domain.Channel, err error)

获取详情

func (*ChannelRepo) List

func (this *ChannelRepo) List(ctx context.Context, deviceId string) (list []domain.Channel, total int64, err error)

列表

func (*ChannelRepo) Save

func (this *ChannelRepo) Save(ctx context.Context, data *domain.Channel) (err error)

插入或更新

type DeviceRepo

type DeviceRepo struct {
	Data *data.Data
}

func (*DeviceRepo) Create

func (this *DeviceRepo) Create(ctx context.Context, data *domain.Device) (err error)

新增

func (*DeviceRepo) GetByDeviceId

func (this *DeviceRepo) GetByDeviceId(ctx context.Context, deviceId string) (data *domain.Device, err error)

获取详情

func (*DeviceRepo) List

func (this *DeviceRepo) List(ctx context.Context) (list []domain.Device, total int64, err error)

设备列表

func (*DeviceRepo) Save

func (this *DeviceRepo) Save(ctx context.Context, data *domain.Device) (err error)

插入或更新

type Repo

type Repo struct {
	Device  domain2.IDeviceRepo
	Channel domain2.IChannelRepo
	Stream  domain2.IStreamsRepo
}

type StreamRepo

type StreamRepo struct {
	Data *data.Data
}

func (*StreamRepo) Create

func (this *StreamRepo) Create(ctx context.Context, data *domain.Stream) (err error)

新增

func (*StreamRepo) GetByDeviceId

func (this *StreamRepo) GetByDeviceId(ctx context.Context, req *domain.ChannelQuery) (data *domain.Stream, err error)

获取详情

func (*StreamRepo) List

func (this *StreamRepo) List(ctx context.Context) (list []domain.Stream, total int64, err error)

列表

func (*StreamRepo) Update

func (this *StreamRepo) Update(ctx context.Context, data *domain.Stream) (err error)

更新

Jump to

Keyboard shortcuts

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