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) (*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) FillMode ¶
func (h *Clickhouse) FillMode() *data.FillMissing
FillMode defines how to fill null values
func (*Clickhouse) Macros ¶
func (h *Clickhouse) Macros() sqlds.Macros
Macros returns list of macro functions convert the macros of raw query
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"`
}
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
Click to show internal directories.
Click to hide internal directories.