observation_analyzer_request

package
v0.0.0-...-53f0542 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2022 License: ISC Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ObservationAnalyzerRequestInsertType = 1
	ObservationAnalyzerRequestDeleteType = 2
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ObservationAnalyzerRequest

type ObservationAnalyzerRequest struct {
	EntityID    uint64         `json:"entity_id"`   // ex: 1234
	UUID        string         `json:"uuid"`        // ex: xxxx-xxx-xxxx-xxxx
	Timestamp   time.Time      `json:"timestamp"`   // ex: 2022-10-09 15:57:52 -0400 -0400
	Type        int8           `json:"type"`        // ex: 1
	Observation *d.Observation `json:"observation"` // ex: { ... }
}

type ObservationAnalyzerRequestFilter

type ObservationAnalyzerRequestFilter struct {
	EntityIDs                   []uint64  `json:"entity_ids"`
	TimestampGreaterThen        time.Time `json:"timestamp_gt,omitempty"`
	TimestampGreaterThenOrEqual time.Time `json:"timestamp_gte,omitempty"`
	TimestampLessThen           time.Time `json:"timestamp_lt,omitempty"`
	TimestampLessThenOrEqual    time.Time `json:"timestamp_lte,omitempty"`
}

type Repository

type Repository interface {
	Insert(ctx context.Context, u *ObservationAnalyzerRequest) error
	GetByPrimaryKey(ctx context.Context, entityID uint64, uuid string) (*ObservationAnalyzerRequest, error)
	ListAll(ctx context.Context) ([]*ObservationAnalyzerRequest, error)
	DeleteByPrimaryKey(ctx context.Context, entityID uint64, uuid string) error
}

Jump to

Keyboard shortcuts

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