ql

package
v0.2.8 Latest Latest
Warning

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

Go to latest
Published: May 20, 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

func QLKeys added in v0.2.8

func QLKeys(qlKey string) ([]string, error)

QLKeys return list of ql keys

Types

type QLKey added in v0.2.8

type QLKey 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"`
}

QLKey defines structure of QL key

func (*QLKey) String added in v0.2.8

func (qlKey *QLKey) String() string

String returns string representation of ql key

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 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