dasql

package
v0.0.0-...-fd40de8 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2024 License: MIT Imports: 12 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidateDASQuerySpecs

func ValidateDASQuerySpecs(dasquery DASQuery) error

ValidateDASQuerySpecs validates given das query against patterns

Types

type DASQuery

type DASQuery struct {
	Query       string              `json:"query"`
	Qhash       string              `json:"hash"`
	Spec        bson.M              `json:"spec"`
	Fields      []string            `json:"fields"`
	Pipe        string              `json:"pipe"`
	Instance    string              `json:"instance"`
	Detail      bool                `json:"detail"`
	System      string              `json:"system"`
	Filters     map[string][]string `json:"filters"`
	Aggregators [][]string          `json:"aggregators"`
	Error       string              `json:"error"`
	Time        int64               `json:"tstamp"`
	// contains filtered or unexported fields
}

DASQuery provides basic structure to hold DAS query record

func Parse

func Parse(query, inst string, daskeys []string) (DASQuery, string, string)

Parse method provides DAS query parser

func (DASQuery) Marshall

func (q DASQuery) Marshall() string

Marshall method return query representation in JSON format

func (DASQuery) String

func (q DASQuery) String() string

String method implements own formatter using DASQuery rather then *DASQuery, since former will be invoked on both pointer and values and therefore used by fmt/log http://stackoverflow.com/questions/16976523/in-go-why-isnt-my-stringer-interface-method-getting-invoked-when-using-fmt-pr

Jump to

Keyboard shortcuts

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