jsonFramer

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2023 License: Apache-2.0 Imports: 10 Imported by: 1

README

JSON FRAMER

The package jsonFramer used to convert any json string to grafana frame object.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetRootData added in v0.0.8

func GetRootData(jsonString string, rootSelector string) (string, error)

func JsonStringToFrame

func JsonStringToFrame(jsonString string, options JSONFramerOptions) (frame *data.Frame, err error)

func QueryJSONUsingSQLite3 added in v0.0.5

func QueryJSONUsingSQLite3(jsonString string, query string, rootSelector string) (string, error)

Types

type ColumnSelector

type ColumnSelector struct {
	Selector   string
	Alias      string
	Type       string
	TimeFormat string
}

type FramerType added in v0.0.5

type FramerType string
const (
	FramerTypeGJSON   FramerType = "gjson"
	FramerTypeSQLite3 FramerType = "sqlite3"
)

type JSONFramerOptions

type JSONFramerOptions struct {
	FramerType   FramerType // `gjson` | `sqlite3`
	SQLite3Query string
	FrameName    string
	RootSelector string
	Columns      []ColumnSelector
}

Jump to

Keyboard shortcuts

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