schemaDataRepo

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2023 License: AGPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PROPERTY_TYPE = "property_type"
)

Variables

This section is empty.

Functions

func ToEventData

func ToEventData(db map[string]any) *msgThing.EventData

func ToPropertyData

func ToPropertyData(id string, db map[string]any) *msgThing.PropertyData

Types

type SchemaDataRepo

type SchemaDataRepo struct {
	store.SchemaStore
	// contains filtered or unexported fields
}

func NewSchemaDataRepo

func NewSchemaDataRepo(dataSource string, getSchemaModel schema.GetSchemaModel) *SchemaDataRepo

func (*SchemaDataRepo) GetEventCountByFilter

func (d *SchemaDataRepo) GetEventCountByFilter(
	ctx context.Context,
	filter msgThing.FilterOpt) (int64, error)

func (*SchemaDataRepo) GetEventDataByFilter

func (d *SchemaDataRepo) GetEventDataByFilter(
	ctx context.Context,
	filter msgThing.FilterOpt) ([]*msgThing.EventData, error)

func (*SchemaDataRepo) GetPropertyCountByID

func (d *SchemaDataRepo) GetPropertyCountByID(
	ctx context.Context,
	filter msgThing.FilterOpt) (int64, error)

func (*SchemaDataRepo) GetPropertyDataByID

func (d *SchemaDataRepo) GetPropertyDataByID(
	ctx context.Context,
	filter msgThing.FilterOpt) ([]*msgThing.PropertyData, error)

func (*SchemaDataRepo) InsertEventData

func (d *SchemaDataRepo) InsertEventData(ctx context.Context, productID string,
	deviceName string, event *msgThing.EventData) error

func (*SchemaDataRepo) InsertPropertiesData

func (d *SchemaDataRepo) InsertPropertiesData(ctx context.Context, t *schema.Model, productID string, deviceName string, params map[string]any, timestamp time.Time) error

func (*SchemaDataRepo) InsertPropertyData

func (d *SchemaDataRepo) InsertPropertyData(ctx context.Context, t *schema.Model, productID string, deviceName string, property *msgThing.PropertyData) error

Jump to

Keyboard shortcuts

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