Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
func New ¶
New creates a new grafana client auth can be in user:pass format, or it can be an api key
func (*Client) DataSource ¶
func (c *Client) DataSource(id int64) (*DataSourceGeneric, error)
func (*Client) DeleteDataSource ¶
func (*Client) NewDataSource ¶
func (c *Client) NewDataSource(s *DataSourceGeneric) (int64, error)
func (*Client) UpdateDataSource ¶
func (c *Client) UpdateDataSource(s *DataSourceGeneric) error
type DataSourceGeneric ¶
type DataSourceGeneric struct { Id int64 `json:"id,omitempty"` Name string `json:"name"` Type string `json:"type"` URL string `json:"url"` Access string `json:"access"` Database string `json:"database,omitempty"` User string `json:"user,omitempty"` // Deprecated in favor of secureJsonData.password Password string `json:"password,omitempty"` OrgId int64 `json:"orgId,omitempty"` IsDefault bool `json:"isDefault"` BasicAuth bool `json:"basicAuth"` BasicAuthUser string `json:"basicAuthUser,omitempty"` // Deprecated in favor of secureJsonData.basicAuthPassword BasicAuthPassword string `json:"basicAuthPassword,omitempty"` JSONData JsonData `json:"jsonData,omitempty"` SecureJSONData JsonData `json:"secureJsonData,omitempty"` }
Click to show internal directories.
Click to hide internal directories.