raw

package module
v0.0.0-...-42803cc Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2020 License: MIT Imports: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrUnmarshalling - unmarshalling error
	ErrUnmarshalling error = errors.New("error unmarshalling data")

	// ErrMissingMandatoryFields - mandatory fields are missing
	ErrMissingMandatoryFields error = errors.New("mandatory fields are missing")
)

Functions

This section is empty.

Types

type Metadata

type Metadata struct {
	Metric string            `json:"metric"`
	Tags   map[string]string `json:"tags"`
}

Metadata - the raw data (metric and tags only)

type NumberPoint

type NumberPoint struct {
	Timestamp int64   `json:"timestamp"`
	Value     float64 `json:"value"`
}

NumberPoint - represents a raw number point result

type NumberPoints

type NumberPoints struct {
	Metadata Metadata      `json:"metadata"`
	Values   []NumberPoint `json:"points"`
}

NumberPoints - the metadata and value results

type NumberQueryResults

type NumberQueryResults struct {
	Results []NumberPoints `json:"results"`
	Total   int            `json:"total"`
}

NumberQueryResults - the final raw query number results

type Query

type Query struct {
	Metadata
	Type         string `json:"type"`
	Since        string `json:"since"`
	Until        string `json:"until"`
	EstimateSize bool   `json:"estimateSize"`
}

Query - the raw data query JSON

func (*Query) Parse

func (dq *Query) Parse(data []byte) error

Parse - parses the bytes tol JSON

type TextPoint

type TextPoint struct {
	Timestamp int64  `json:"timestamp"`
	Text      string `json:"text"`
}

TextPoint - represents a raw text point result

type TextPoints

type TextPoints struct {
	Metadata Metadata    `json:"metadata"`
	Texts    []TextPoint `json:"points"`
}

TextPoints - the metadata and text results

type TextQueryResults

type TextQueryResults struct {
	Results []TextPoints `json:"results"`
	Total   int          `json:"total"`
}

TextQueryResults - the final raw query text results

Jump to

Keyboard shortcuts

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