schemas

package
v4.2.707+incompatible Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Column

type Column struct {
	Name       string
	Required   bool
	ColumnType ColumnType
	DataType   common.DataType
}

func NewColumn

func NewColumn() *Column

func (*Column) Parse

func (p *Column) Parse(column string) error

func (*Column) String

func (p *Column) String() string

type ColumnType

type ColumnType int
const (
	ColumnTypeUndefined ColumnType = iota
	Tag
	Field
)

Influxdb column type enumerator

type Measurement

type Measurement struct {
	Name       string
	MetricType MetricType
	Boundary   ResourceBoundary
	Quota      ResourceQuota
	Columns    []*Column
}

func NewMeasurement

func NewMeasurement(name string, metricType MetricType, boundary ResourceBoundary, quota ResourceQuota) *Measurement

func (*Measurement) AddColumn

func (p *Measurement) AddColumn(name string, required bool, columnType ColumnType, dataType common.DataType)

func (*Measurement) Initialize

func (p *Measurement) Initialize(columns string) error

func (*Measurement) String

func (p *Measurement) String() string

func (*Measurement) Validate

func (p *Measurement) Validate(columns []string) error

type MetricType

type MetricType int

type ResourceBoundary

type ResourceBoundary int

type ResourceQuota

type ResourceQuota int

type Schema

type Schema struct {
	SchemaMeta   *SchemaMeta
	Measurements []*Measurement
}

func NewSchema

func NewSchema(scope Scope, category, schemaType string) *Schema

func (*Schema) AddMeasurement

func (p *Schema) AddMeasurement(name string, metricType MetricType, boundary ResourceBoundary, quota ResourceQuota, columns string) error

func (*Schema) GetMeasurement

func (p *Schema) GetMeasurement(name string, metricType MetricType, boundary ResourceBoundary, quota ResourceQuota) *Measurement

func (*Schema) String

func (p *Schema) String() string

func (*Schema) Validate

func (p *Schema) Validate() error

type SchemaMeta

type SchemaMeta struct {
	Scope    Scope
	Category string
	Type     string
}

func NewSchemaMeta

func NewSchemaMeta(scope Scope, category, schemaType string) *SchemaMeta

type Scope

type Scope int

Jump to

Keyboard shortcuts

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