models

package
v1.6.5 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2022 License: MIT Imports: 5 Imported by: 243

Documentation

Overview

Provides a set of structures for passing data around Kapacitor.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SortedFields

func SortedFields(fields Fields) []string

func SortedKeys

func SortedKeys(tags map[string]string) []string

Types

type Dimensions added in v0.11.0

type Dimensions struct {
	ByName   bool
	TagNames []string
}

func (Dimensions) Copy added in v0.11.0

func (d Dimensions) Copy() Dimensions

func (Dimensions) Equal added in v1.4.0

func (d Dimensions) Equal(o Dimensions) bool

func (Dimensions) ToSet added in v1.0.0

func (d Dimensions) ToSet() map[string]bool

type Fields

type Fields map[string]interface{}

func (Fields) Copy

func (f Fields) Copy() Fields

type GroupID

type GroupID string
const (
	NilGroup GroupID = ""
)

func ToGroupID added in v1.0.0

func ToGroupID(name string, tags map[string]string, dims Dimensions) GroupID

type Result added in v1.3.0

type Result struct {
	Series Rows  `json:"series"`
	Err    error `json:"error,omitempty"`
}

func (Result) String added in v1.3.0

func (r Result) String() string

func (*Result) UnmarshalJSON added in v1.4.0

func (r *Result) UnmarshalJSON(data []byte) error

type Row added in v1.3.0

type Row struct {
	Name    string            `json:"name,omitempty"`
	Tags    map[string]string `json:"tags,omitempty"`
	Columns []string          `json:"columns,omitempty"`
	Values  [][]interface{}   `json:"values,omitempty"`
}

Row represents a single row returned from the execution of a statement.

func (*Row) UnmarshalJSON added in v1.3.0

func (r *Row) UnmarshalJSON(data []byte) error

type Rows added in v1.3.0

type Rows []*Row

Rows represents a collection of rows. Rows implements sort.Interface.

type Tags

type Tags map[string]string

func (Tags) Copy added in v0.11.0

func (t Tags) Copy() Tags

Jump to

Keyboard shortcuts

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