plugin

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2022 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrorMessageInvalidJSON       = errors.New("could not parse json")
	ErrorMessageInvalidServerName = errors.New("invalid server name. Either empty or not set")
	ErrorMessageInvalidPort       = errors.New("invalid port")
	ErrorMessageInvalidUserName   = errors.New("username is either empty or not set")
	ErrorMessageInvalidPassword   = errors.New("password is either empty or not set")
	ErrorInvalidClientCertificate = errors.New("tls: failed to find any PEM data in certificate input")
	ErrorInvalidCACertificate     = errors.New("failed to parse TLS CA PEM certificate")
)

Functions

This section is empty.

Types

type Clickhouse

type Clickhouse struct{}

Clickhouse defines how to connect to a Clickhouse datasource

func (*Clickhouse) Connect

func (h *Clickhouse) Connect(config backend.DataSourceInstanceSettings, message json.RawMessage) (*sql.DB, error)

Connect opens a sql.DB connection using datasource settings

func (*Clickhouse) Converters

func (h *Clickhouse) Converters() []sqlutil.Converter

Converters defines list of data type converters

func (*Clickhouse) Macros

func (h *Clickhouse) Macros() sqlds.Macros

Macros returns list of macro functions convert the macros of raw query

func (*Clickhouse) Settings added in v1.1.0

func (h *Clickhouse) Settings(backend.DataSourceInstanceSettings) sqlds.DriverSettings

type Settings

type Settings struct {
	Server             string `json:"server,omitempty"`
	Port               int64  `json:"port,omitempty"`
	Username           string `json:"username,omitempty"`
	DefaultDatabase    string `json:"defaultDatabase,omitempty"`
	InsecureSkipVerify bool   `json:"tlsSkipVerify,omitempty"`
	TlsClientAuth      bool   `json:"tlsAuth,omitempty"`
	TlsAuthWithCACert  bool   `json:"tlsAuthWithCACert,omitempty"`
	Password           string `json:"-,omitempty"`
	TlsCACert          string
	TlsClientCert      string
	TlsClientKey       string
	Secure             bool   `json:"secure,omitempty"`
	Timeout            string `json:"timeout,omitempty"`
}

Settings - data loaded from grafana settings database

func LoadSettings

func LoadSettings(config backend.DataSourceInstanceSettings) (settings Settings, err error)

LoadSettings will read and validate Settings from the DataSourceConfig

Jump to

Keyboard shortcuts

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