ql

package
v0.2.9 Latest Latest
Warning

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

Go to latest
Published: May 24, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Separator = ":"

Separator defines FOXDEN query separator

View Source
var Verbose int

Verbose defines verbosity level for this module

Functions

func ParseQuery

func ParseQuery(query string) (bson.M, error)

ParseQuery function provides basic parser for user queries and return results in bson dictionary

Types

type QLManager added in v0.2.2

type QLManager struct {
	Map ServiceMap
}

QLManager represents QL manager

func (*QLManager) Init added in v0.2.2

func (q *QLManager) Init(fname string) error

Init function loads service map from given file name

func (*QLManager) Keys added in v0.2.2

func (q *QLManager) Keys(srv string) []string

Keys provides list of keys associated with FOXDEN service name

func (*QLManager) ServiceQueries added in v0.2.2

func (q *QLManager) ServiceQueries(query string) (map[string]bson.M, error)

ServiceQueries parses given query string into list of service queries

func (*QLManager) Services added in v0.2.2

func (q *QLManager) Services() []string

Services returns list of services known to QL manager

type QLRecord added in v0.2.9

type QLRecord struct {
	Key         string `json:"key"`
	Description string `json:"description,omitempty"`
	Service     string `json:"service"`
	Units       string `json:"units,omitempty"`
	Schema      string `json:"schema,omitempty"`
	DataType    string `json:"type"`
}

QLRecord defines structure of QL key

func QLRecords added in v0.2.9

func QLRecords(qlKey string) ([]QLRecord, error)

QLRecords return list of ql keys

func (*QLRecord) Details added in v0.2.9

func (q *QLRecord) Details(show string) string

Details function provides record representation

func (*QLRecord) FillEmpty added in v0.2.9

func (q *QLRecord) FillEmpty()

FillEmpty assign N/A to empty attributes

func (*QLRecord) String added in v0.2.9

func (q *QLRecord) String() string

String returns string representation of ql key

type SchemaKeys

type SchemaKeys map[string]string

SchemaKeys represents full collection of schema keys across all schemas

type ServiceMap

type ServiceMap map[string][]string

ServiceMap defines FOXDEN service QL mapping

Jump to

Keyboard shortcuts

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