models

package
v1.2.13 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2024 License: Apache-2.0 Imports: 4 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 {
	InstanceSettings   backend.DataSourceInstanceSettings
	AuthType           string `json:"authType"` // jwt | key | gce
	APIKey             string `json:"apiKey"`
	DefaultProject     string `json:"defaultProject"`
	JWT                string `json:"jwt"`
	ClientEmail        string `json:"clientEmail"`
	TokenURI           string `json:"tokenUri"`
	AuthenticationType string `json:"authenticationType"`
	PrivateKeyPath     string `json:"privateKeyPath"`

	// Saved in secure JSON
	PrivateKey string `json:"-"`
}

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