aggregate

package
v1.46.6 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2026 License: MIT Imports: 5 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var IgnoreFieldMismatch = datastore.IgnoreFieldMismatch

Functions

func Init

func Init(a *Aggregate, name string, t time.Time, freq Frequency)

func Query

Types

type Aggregate

type Aggregate struct {
	mixin.Model[Aggregate]

	Instance     string    `json:"instance"`
	Name         string    `json:"name"`
	Type         string    `json:"type"`
	BinTimestamp time.Time `json:"binTimestamp"`
	Value        int64     `json:"value"`
	VectorValue  []int64   `json:"vectorValue,omitempty" orm:"default:[]"`
}

func New

func New(db *datastore.Datastore) *Aggregate

func (*Aggregate) Load

func (a *Aggregate) Load(p []datastore.Property) (err error)

func (*Aggregate) Save

func (a *Aggregate) Save() (p []datastore.Property, err error)

type Frequency

type Frequency string
const (
	Hourly Frequency = "Hourly"
	Daily            = "Daily"
)

Jump to

Keyboard shortcuts

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