grafana

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2019 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	GetAllDatasources() ([]*DataSource, error)
}

func NewRestClientFn

func NewRestClientFn(config ClientConfig) (Client, error)

type ClientConfig

type ClientConfig struct {
	Host string
	Key  string
}

type DataSource

type DataSource struct {
	Id                int64                  `json:"id" yaml:"-"`
	OrgId             int64                  `json:"orgId" yaml:"orgId,omitempty"`
	Version           int                    `json:"version" yaml:"version,omitempty"`
	Name              string                 `json:"name" yaml:"name"`
	Type              string                 `json:"type" yaml:"type"`
	Access            string                 `json:"access" yaml:"access"`
	Url               string                 `json:"url" yaml:"url,omitempty"`
	Password          string                 `json:"password" yaml:"password,omitempty"`
	User              string                 `json:"user" yaml:"user,omitempty"`
	Database          string                 `json:"database" yaml:"database,omitempty"`
	BasicAuth         bool                   `json:"basicAuth" yaml:"basicAuth,omitempty"`
	BasicAuthUser     string                 `json:"basicAuthUser" yaml:"basicAuthUser,omitempty"`
	BasicAuthPassword string                 `json:"basicAuthPassword" yaml:"basicAuthPassword,omitempty"`
	WithCredentials   bool                   `json:"withCredentials" yaml:"withCredentials,omitempty"`
	IsDefault         bool                   `json:"isDefault" yaml:"isDefault,omitempty"`
	JsonData          map[string]interface{} `json:"jsonData" yaml:"jsonData,omitempty"`
	SecureJsonFields  map[string]bool        `json:"secureJsonFields" yaml:"-"`
	SecureJsonData    map[string]string      `json:"secureJsonData" yaml:"secureJsonData,omitempty"`
	Editable          bool                   `json:"editable" yaml:"editable,omitempty"`
	ReadOnly          bool                   `json:"readOnly" yaml:"-"`
}

type DataSourceProvisioning

type DataSourceProvisioning struct {
	ApiVersion  int64         `yaml:"apiVersion"`
	Datasources []*DataSource `yaml:"datasources"`
}

func (*DataSourceProvisioning) WriteTo

func (dsp *DataSourceProvisioning) WriteTo(out io.Writer) error

type NewClientFn

type NewClientFn = func(ClientConfig) (Client, error)

type RestClient

type RestClient struct {
	// contains filtered or unexported fields
}

func (*RestClient) Get

func (r *RestClient) Get(query string, params url.Values) ([]byte, int, error)

func (*RestClient) GetAllDatasources

func (r *RestClient) GetAllDatasources() ([]*DataSource, error)

func (*RestClient) GetDatasource

func (r *RestClient) GetDatasource(id int64) (DataSource, error)

Jump to

Keyboard shortcuts

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