transformpipe

package
v0.0.0-...-1046bf0 Latest Latest
Warning

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

Go to latest
Published: May 9, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AggregatorPipe

type AggregatorPipe struct {
	/*
		Duration of windows.
		Calendar months and years
		every supports all valid duration units, including calendar months (1mo) and years (1y).

		Aggregate by week
		When aggregating by week (1w), weeks are determined using the Unix epoch (1970-01-01T00:00:00Z UTC). The Unix epoch was on a Thursday, so all calculated weeks begin on Thursday.
	*/
	Every Duration

	/*
		period
		Duration of the window. Period is the length of each interval. The period can be negative, indicating the start and stop boundaries are reversed. Defaults to every value.
	*/
	Period *Duration

	/*
		column
		The column on which to operate. Defaults to "_value".
	*/
	Column *string

	TimeSrc *string

	TimeDst *string

	CreateEmpty *bool

	Offset *Duration

	Fn TransformFn
}

func (*AggregatorPipe) Pipe

func (a *AggregatorPipe) Pipe() (string, error)

type BottomPipe

type BottomPipe struct {
	N       int
	Columns []string
}

func (*BottomPipe) Pipe

func (a *BottomPipe) Pipe() (string, error)

type CountPipe

type CountPipe struct {
	Column *string
}

func (*CountPipe) Pipe

func (a *CountPipe) Pipe() (string, error)

type CumulativeSumPipe

type CumulativeSumPipe struct {
	Columns []string
}

func (*CumulativeSumPipe) Pipe

func (a *CumulativeSumPipe) Pipe() (string, error)

type DerivativePipe

type DerivativePipe struct {
	Unit        *Duration
	NonNegative *bool
	Columns     []string
	TimeColumn  *string
}

func (*DerivativePipe) Pipe

func (a *DerivativePipe) Pipe() (string, error)

type DifferencePipe

type DifferencePipe struct {
	NonNegative *bool
	Columns     []string
	KeepFirst   *bool
	InitialZero *bool
}

func (*DifferencePipe) Pipe

func (a *DifferencePipe) Pipe() (string, error)

type DistinctPipe

type DistinctPipe struct {
	Column *string
}

func (*DistinctPipe) Pipe

func (a *DistinctPipe) Pipe() (string, error)

type DoubleEMAPipe

type DoubleEMAPipe struct {
	N int
}

func (*DoubleEMAPipe) Pipe

func (a *DoubleEMAPipe) Pipe() (string, error)

type DropPipe

type DropPipe struct {
	Columns []string
}

func (*DropPipe) Pipe

func (a *DropPipe) Pipe() (string, error)

type Duration

type Duration string

func (Duration) Error

func (d Duration) Error() error

type ElapsedPipe

type ElapsedPipe struct {
	Unit       *Duration
	ColumnName *string
	TimeColumn *string
}

func (*ElapsedPipe) Pipe

func (a *ElapsedPipe) Pipe() (string, error)

type Estimate

type Estimate string
const (
	EstimateTdigest  Estimate = "estimate_tdigest"
	EstimateMean     Estimate = "exact_mean"
	EstimateSelector Estimate = "estimate_selector"
)

type ExponentialMovingAveragePipe

type ExponentialMovingAveragePipe struct {
	N int
}

func (*ExponentialMovingAveragePipe) Pipe

type FillPipe

type FillPipe struct {
	Value       interface{}
	Column      *string
	UsePrevious *bool
}

func (*FillPipe) Pipe

func (a *FillPipe) Pipe() (string, error)

type FilterPipe

type FilterPipe struct {
	Fn string
}

func (*FilterPipe) Pipe

func (a *FilterPipe) Pipe() (string, error)

type FirstPipe

type FirstPipe struct{}

func (*FirstPipe) Pipe

func (a *FirstPipe) Pipe() (string, error)

type GroupPipe

type GroupPipe struct {
	Mode    *string
	Columns []string
}

func (*GroupPipe) Pipe

func (a *GroupPipe) Pipe() (string, error)

type IncreasePipe

type IncreasePipe struct {
	Columns []string
}

func (*IncreasePipe) Pipe

func (a *IncreasePipe) Pipe() (string, error)

type IntegralPipe

type IntegralPipe struct {
	Unit        Duration
	Column      *string
	TimeColumn  *string
	Interpolate *string
}

func (*IntegralPipe) Pipe

func (a *IntegralPipe) Pipe() (string, error)

type KaufmansAMAPipe

type KaufmansAMAPipe struct {
	N      int
	Column *string
}

func (*KaufmansAMAPipe) Pipe

func (a *KaufmansAMAPipe) Pipe() (string, error)

type KaufmansERPipe

type KaufmansERPipe struct {
	N int
}

func (*KaufmansERPipe) Pipe

func (a *KaufmansERPipe) Pipe() (string, error)

type KeepPipe

type KeepPipe struct {
	Columns []string
}

func (*KeepPipe) Pipe

func (a *KeepPipe) Pipe() (string, error)

type LastPipe

type LastPipe struct{}

func (*LastPipe) Pipe

func (a *LastPipe) Pipe() (string, error)

type LimitPipe

type LimitPipe struct {
	N      int
	Offset *int
}

func (*LimitPipe) Pipe

func (a *LimitPipe) Pipe() (string, error)

type MaxPipe

type MaxPipe struct {
	Column *string
}

func (*MaxPipe) Pipe

func (a *MaxPipe) Pipe() (string, error)

type MeanPipe

type MeanPipe struct {
	Column *string
}

func (*MeanPipe) Pipe

func (a *MeanPipe) Pipe() (string, error)

type MedianPipe

type MedianPipe struct {
	Column      *string
	Method      *Estimate
	Compression *float64
}

func (*MedianPipe) Pipe

func (a *MedianPipe) Pipe() (string, error)

type MinPipe

type MinPipe struct {
	Column *string
}

func (*MinPipe) Pipe

func (a *MinPipe) Pipe() (string, error)

type ModePipe

type ModePipe struct {
	Column *string
}

func (*ModePipe) Pipe

func (a *ModePipe) Pipe() (string, error)

type MovingAveragePipe

type MovingAveragePipe struct {
	N int
}

func (*MovingAveragePipe) Pipe

func (a *MovingAveragePipe) Pipe() (string, error)

type QuantilePipe

type QuantilePipe struct {
	Q           float64
	Column      *string
	Method      *Estimate
	Compression *float64
}

func (*QuantilePipe) Pipe

func (a *QuantilePipe) Pipe() (string, error)

type RelativeStrengthIndexPipe

type RelativeStrengthIndexPipe struct {
	N       int
	Columns []string
}

func (*RelativeStrengthIndexPipe) Pipe

func (a *RelativeStrengthIndexPipe) Pipe() (string, error)

type SkewPipe

type SkewPipe struct {
	Column *string
}

func (*SkewPipe) Pipe

func (a *SkewPipe) Pipe() (string, error)

type SortPipe

type SortPipe struct {
	Columns []string
	Desc    *bool
}

func (*SortPipe) Pipe

func (a *SortPipe) Pipe() (string, error)

type SpreadPipe

type SpreadPipe struct {
	Column *string
}

func (*SpreadPipe) Pipe

func (a *SpreadPipe) Pipe() (string, error)

type StateCountPipe

type StateCountPipe struct {
	Column *string
	Fn     string
}

func (*StateCountPipe) Pipe

func (a *StateCountPipe) Pipe() (string, error)

type StateDurationPipe

type StateDurationPipe struct {
	Column *string
	Fn     string
	Unit   *Duration
}

func (*StateDurationPipe) Pipe

func (a *StateDurationPipe) Pipe() (string, error)

type StateTrackingPipe

type StateTrackingPipe struct {
	CountColumn    *string
	DurationColumn *string
	Fn             string
	DurationUnit   *Duration
}

func (*StateTrackingPipe) Pipe

func (a *StateTrackingPipe) Pipe() (string, error)

type StddevMode

type StddevMode string // "population" or "sample"
const (
	StddevModePopulation StddevMode = "population"
	StddevModeSample     StddevMode = "sample"
)

type StddevPipe

type StddevPipe struct {
	Column *string
	Mode   *StddevMode
}

func (*StddevPipe) Pipe

func (a *StddevPipe) Pipe() (string, error)

type SumPipe

type SumPipe struct {
	Column *string
}

func (*SumPipe) Pipe

func (a *SumPipe) Pipe() (string, error)

type TailPipe

type TailPipe struct {
	N      int
	Offset *int
}

func (*TailPipe) Pipe

func (a *TailPipe) Pipe() (string, error)

type TimeMovingAveragePipe

type TimeMovingAveragePipe struct {
	Every  Duration
	Period Duration
	Column *string
}

func (*TimeMovingAveragePipe) Pipe

func (a *TimeMovingAveragePipe) Pipe() (string, error)

type TimeShiftPipe

type TimeShiftPipe struct {
	Duration Duration
	Columns  []string
}

func (*TimeShiftPipe) Pipe

func (a *TimeShiftPipe) Pipe() (string, error)

type TimeWeightedAvgPipe

type TimeWeightedAvgPipe struct {
	Unit Duration
}

func (*TimeWeightedAvgPipe) Pipe

func (a *TimeWeightedAvgPipe) Pipe() (string, error)

type ToBoolPipe

type ToBoolPipe struct{}

func (*ToBoolPipe) Pipe

func (a *ToBoolPipe) Pipe() (string, error)

type ToFloatPipe

type ToFloatPipe struct{}

func (*ToFloatPipe) Pipe

func (a *ToFloatPipe) Pipe() (string, error)

type ToIntPipe

type ToIntPipe struct{}

func (*ToIntPipe) Pipe

func (a *ToIntPipe) Pipe() (string, error)

type ToStringPipe

type ToStringPipe struct{}

func (*ToStringPipe) Pipe

func (a *ToStringPipe) Pipe() (string, error)

type ToTimePipe

type ToTimePipe struct{}

func (*ToTimePipe) Pipe

func (a *ToTimePipe) Pipe() (string, error)

type ToUIntPipe

type ToUIntPipe struct{}

func (*ToUIntPipe) Pipe

func (a *ToUIntPipe) Pipe() (string, error)

type TopPipe

type TopPipe struct {
	N       int
	Columns []string
}

func (*TopPipe) Pipe

func (a *TopPipe) Pipe() (string, error)

type TransformFn

type TransformFn string
const (
	// Mean
	Mean TransformFn = "mean"
	// Min
	Min TransformFn = "min"
	// Max
	Max TransformFn = "max"
	// Sum
	Sum TransformFn = "sum"
	// Count
	Count TransformFn = "count"
	// Stddev
	Stddev TransformFn = "stddev"
	// Median
	Median TransformFn = "median"
	// First
	First TransformFn = "first"
	// Last
	Last TransformFn = "last"
	// Integral
	Integral TransformFn = "integral"
	// Mode
	Mode TransformFn = "mode"
	// Skew
	Skew TransformFn = "skew"
	// Spread
	Spread TransformFn = "spread"
	// Distinct
	Distinct TransformFn = "distinct"
	// Unique
	Unique TransformFn = "unique"
)

type TransformInput

type TransformInput struct {
	Fn     string                 `json:"fn"`
	Params map[string]interface{} `json:"params"`
}

func (*TransformInput) Transform

func (t *TransformInput) Transform() (TransformPipe, error)

type TransformPipe

type TransformPipe interface {
	Pipe() (string, error)
}

type TripleEMAPipe

type TripleEMAPipe struct {
	N int
}

func (*TripleEMAPipe) Pipe

func (a *TripleEMAPipe) Pipe() (string, error)

type TripleExponentialDerivativePipe

type TripleExponentialDerivativePipe struct {
	N int
}

func (*TripleExponentialDerivativePipe) Pipe

type TruncateTimeColumnPipe

type TruncateTimeColumnPipe struct {
	Unit Duration
}

func (*TruncateTimeColumnPipe) Pipe

func (a *TruncateTimeColumnPipe) Pipe() (string, error)

type UniquePipe

type UniquePipe struct {
	Column *string
}

func (*UniquePipe) Pipe

func (a *UniquePipe) Pipe() (string, error)

type WindowPipe

type WindowPipe struct {
	Every       *Duration
	Period      *Duration
	Offset      *Duration
	TimeColumn  *string
	StartColumn *string
	StopColumn  *string
	Location    *string
	CreateEmpty *bool
}

func (*WindowPipe) Pipe

func (a *WindowPipe) Pipe() (string, error)

type YieldPipe

type YieldPipe struct {
	Name *string
}

func (*YieldPipe) Pipe

func (a *YieldPipe) Pipe() (string, error)

Jump to

Keyboard shortcuts

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