Documentation ¶
Index ¶
- func ToDeviceLog(db map[string]any) *deviceLog.Status
- type StatusLogRepo
- func (s *StatusLogRepo) DeleteDevice(ctx context.Context, productID string, deviceName string) error
- func (s *StatusLogRepo) DeleteProduct(ctx context.Context, productID string) error
- func (s *StatusLogRepo) GetCountLog(ctx context.Context, filter deviceLog.StatusFilter, page def.PageInfo2) (int64, error)
- func (s *StatusLogRepo) GetDeviceLog(ctx context.Context, filter deviceLog.StatusFilter, page def.PageInfo2) ([]*deviceLog.Status, error)
- func (s *StatusLogRepo) GetLogStableName() string
- func (s *StatusLogRepo) GetLogTableName(productID, deviceName string) string
- func (s *StatusLogRepo) InitDevice(ctx context.Context, device devices.Info) error
- func (s *StatusLogRepo) InitProduct(ctx context.Context, productID string) (err error)
- func (s *StatusLogRepo) Insert(ctx context.Context, data *deviceLog.Status) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type StatusLogRepo ¶
type StatusLogRepo struct {
// contains filtered or unexported fields
}
func NewStatusLogRepo ¶
func NewStatusLogRepo(dataSource conf.TSDB) *StatusLogRepo
func (*StatusLogRepo) DeleteDevice ¶
func (*StatusLogRepo) DeleteProduct ¶
func (s *StatusLogRepo) DeleteProduct(ctx context.Context, productID string) error
func (*StatusLogRepo) GetCountLog ¶
func (s *StatusLogRepo) GetCountLog(ctx context.Context, filter deviceLog.StatusFilter, page def.PageInfo2) (int64, error)
func (*StatusLogRepo) GetDeviceLog ¶
func (s *StatusLogRepo) GetDeviceLog(ctx context.Context, filter deviceLog.StatusFilter, page def.PageInfo2) ( []*deviceLog.Status, error)
func (*StatusLogRepo) GetLogStableName ¶
func (s *StatusLogRepo) GetLogStableName() string
func (*StatusLogRepo) GetLogTableName ¶
func (s *StatusLogRepo) GetLogTableName(productID, deviceName string) string
func (*StatusLogRepo) InitDevice ¶
func (*StatusLogRepo) InitProduct ¶
func (s *StatusLogRepo) InitProduct(ctx context.Context, productID string) (err error)
Click to show internal directories.
Click to hide internal directories.