models

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DatasourceSettings added in v1.0.0

type DatasourceSettings struct {
	AuthType string `json:"authType"` // jwt | key
	APIKey   string `json:"apiKey"`
	JWT      string `json:"jwt"`
}

DatasourceSettings contains Google Sheets API authentication properties.

func LoadSettings added in v1.0.0

func LoadSettings(ctx backend.PluginContext) (*DatasourceSettings, error)

LoadSettings gets the relevant settings from the plugin context

type QueryModel

type QueryModel struct {
	Spreadsheet          string `json:"spreadsheet"`
	Range                string `json:"range"`
	CacheDurationSeconds int    `json:"cacheDurationSeconds"`
	UseTimeFilter        bool   `json:"useTimeFilter"`

	// Not from JSON
	TimeRange     backend.TimeRange `json:"-"`
	MaxDataPoints int64             `json:"-"`
}

QueryModel represents a spreadsheet query.

func GetQueryModel added in v1.0.0

func GetQueryModel(query backend.DataQuery) (*QueryModel, error)

GetQueryModel returns the well typed query model

Jump to

Keyboard shortcuts

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