Documentation ¶
Index ¶
- Constants
- func GetSecrets(config backend.DataSourceInstanceSettings, secretType string, ...) map[string]string
- func InterPolateMacros(queryString string, timeRange backend.TimeRange, ...) (string, error)
- type AWSAuthType
- type AWSSettings
- type InfinityCSVOptions
- type InfinityColumn
- type InfinityDataOverride
- type InfinityFilter
- type InfinityJSONOptions
- type InfinityParser
- type InfinitySettings
- type InfinitySettingsJson
- type OAuth2Settings
- type Query
- type QueryType
- type RefData
- type URLOptionKeyValuePair
- type URLOptions
Constants ¶
View Source
const ( AuthenticationMethodNone = "none" AuthenticationMethodBasic = "basicAuth" AuthenticationMethodApiKey = "apiKey" AuthenticationMethodBearerToken = "bearerToken" AuthenticationMethodForwardOauth = "oauthPassThru" AuthenticationMethodDigestAuth = "digestAuth" AuthenticationMethodOAuth = "oauth2" AuthenticationMethodAWS = "aws" )
View Source
const ( AuthOAuthTypeClientCredentials = "client_credentials" AuthOAuthJWT = "jwt" AuthOAuthOthers = "others" )
View Source
const ( ApiKeyTypeHeader = "header" ApiKeyTypeQuery = "query" )
Variables ¶
This section is empty.
Functions ¶
func GetSecrets ¶
func InterPolateMacros ¶
func InterPolateMacros(queryString string, timeRange backend.TimeRange, pluginContext backend.PluginContext) (string, error)
InterPolateMacros interpolate macros on a given string
Types ¶
type AWSSettings ¶
type AWSSettings struct { AuthType AWSAuthType `json:"authType"` Region string `json:"region"` Service string `json:"service"` }
type InfinityCSVOptions ¶
type InfinityColumn ¶
type InfinityDataOverride ¶
type InfinityFilter ¶
type InfinityJSONOptions ¶
type InfinityParser ¶
type InfinityParser string
const ( InfinityParserSimple InfinityParser = "simple" InfinityParserBackend InfinityParser = "backend" InfinityParserSQLite InfinityParser = "sqlite" InfinityParserUQL InfinityParser = "uql" InfinityParserGROQ InfinityParser = "groq" )
type InfinitySettings ¶
type InfinitySettings struct { AuthenticationMethod string OAuth2Settings OAuth2Settings BearerToken string ApiKeyKey string ApiKeyType string ApiKeyValue string AWSSettings AWSSettings AWSAccessKey string AWSSecretKey string URL string BasicAuthEnabled bool UserName string Password string ForwardOauthIdentity bool CustomHeaders map[string]string SecureQueryFields map[string]string InsecureSkipVerify bool ServerName string TimeoutInSeconds int64 TLSClientAuth bool TLSAuthWithCACert bool TLSCACert string TLSClientCert string TLSClientKey string AllowedHosts []string EnableOpenAPI bool OpenAPIVersion string OpenAPIUrl string OpenAPIBaseUrl string ReferenceData []RefData }
func LoadSettings ¶
func LoadSettings(config backend.DataSourceInstanceSettings) (settings InfinitySettings, err error)
func (*InfinitySettings) HaveSecureHeaders ¶
func (s *InfinitySettings) HaveSecureHeaders() bool
func (*InfinitySettings) Validate ¶
func (s *InfinitySettings) Validate() error
type InfinitySettingsJson ¶
type InfinitySettingsJson struct { AuthenticationMethod string `json:"auth_method,omitempty"` APIKeyKey string `json:"apiKeyKey,omitempty"` APIKeyType string `json:"apiKeyType,omitempty"` OAuth2Settings OAuth2Settings `json:"oauth2,omitempty"` AWSSettings AWSSettings `json:"aws,omitempty"` ForwardOauthIdentity bool `json:"oauthPassThru,omitempty"` InsecureSkipVerify bool `json:"tlsSkipVerify,omitempty"` ServerName string `json:"serverName,omitempty"` TLSClientAuth bool `json:"tlsAuth,omitempty"` TLSAuthWithCACert bool `json:"tlsAuthWithCACert,omitempty"` TimeoutInSeconds int64 `json:"timeoutInSeconds,omitempty"` AllowedHosts []string `json:"allowedHosts,omitempty"` EnableOpenAPI bool `json:"enableOpenApi,omitempty"` OpenAPIVersion string `json:"openApiVersion,omitempty"` OpenAPIUrl string `json:"openApiUrl,omitempty"` OpenAPIBaseUrl string `json:"openAPIBaseURL,omitempty"` ReferenceData []RefData `json:"refData,omitempty"` }
type OAuth2Settings ¶
type OAuth2Settings struct { OAuth2Type string `json:"oauth2_type,omitempty"` ClientID string `json:"client_id,omitempty"` TokenURL string `json:"token_url,omitempty"` Email string `json:"email,omitempty"` PrivateKeyID string `json:"private_key_id,omitempty"` Subject string `json:"subject,omitempty"` Scopes []string `json:"scopes,omitempty"` ClientSecret string PrivateKey string EndpointParams map[string]string }
type Query ¶
type Query struct { RefID string `json:"refId"` Type QueryType `json:"type"` // 'json' | 'json-backend' | 'csv' | 'tsv' | 'xml' | 'graphql' | 'html' | 'uql' | 'groq' | 'series' | 'global' | 'google-sheets' Format string `json:"format"` // 'table' | 'timeseries' | 'dataframe' | 'as-is' | 'node-graph-nodes' | 'node-graph-edges' Source string `json:"source"` // 'url' | 'inline' | 'reference' | 'random-walk' | 'expression' RefName string `json:"referenceName,omitempty"` URL string `json:"url"` URLOptions URLOptions `json:"url_options"` Data string `json:"data"` Parser InfinityParser `json:"parser"` // 'simple' | 'backend' | 'sqlite' | 'uql' | 'groq' FilterExpression string `json:"filterExpression"` SummarizeExpression string `json:"summarizeExpression"` SummarizeBy string `json:"summarizeBy"` UQL string `json:"uql"` GROQ string `json:"groq"` SQLiteQuery string `json:"sqlite_query"` CSVOptions InfinityCSVOptions `json:"csv_options"` JSONOptions InfinityJSONOptions `json:"json_options"` RootSelector string `json:"root_selector"` Columns []InfinityColumn `json:"columns"` ComputedColumns []InfinityColumn `json:"computed_columns"` Filters []InfinityFilter `json:"filters"` SeriesCount int64 `json:"seriesCount"` Expression string `json:"expression"` Alias string `json:"alias"` DataOverrides []InfinityDataOverride `json:"dataOverrides"` GlobalQueryID string `json:"global_query_id"` QueryMode string `json:"query_mode"` Spreadsheet string `json:"spreadsheet,omitempty"` SheetName string `json:"sheetName,omitempty"` SheetRange string `json:"range,omitempty"` }
type QueryType ¶
type QueryType string
const ( QueryTypeJSON QueryType = "json" QueryTypeCSV QueryType = "csv" QueryTypeTSV QueryType = "tsv" QueryTypeXML QueryType = "xml" QueryTypeGraphQL QueryType = "graphql" QueryTypeHTML QueryType = "html" QueryTypeUQL QueryType = "uql" QueryTypeGROQ QueryType = "groq" QueryTypeGSheets QueryType = "google-sheets" )
type URLOptionKeyValuePair ¶
type URLOptions ¶
type URLOptions struct { Method string `json:"method"` // 'GET' | 'POST' Params []URLOptionKeyValuePair `json:"params"` Headers []URLOptionKeyValuePair `json:"headers"` Body string `json:"data"` BodyType string `json:"body_type"` BodyContentType string `json:"body_content_type"` BodyForm []URLOptionKeyValuePair `json:"body_form"` BodyGraphQLQuery string `json:"body_graphql_query"` }
Click to show internal directories.
Click to hide internal directories.