Documentation
¶
Index ¶
- type AlertNotification
- type Client
- func (c *Client) AddOrgUser(orgId int64, user, role string) error
- func (c *Client) AlertNotification(id int64) (*AlertNotification, error)
- func (c *Client) CreateUser(user User) (int64, error)
- func (c *Client) Dashboard(uid string) (*Dashboard, error)
- func (c *Client) DataSource(id int64) (*DataSource, error)
- func (c *Client) DataSources() ([]DataSource, error)
- func (c *Client) DeleteAlertNotification(id int64) error
- func (c *Client) DeleteDashboard(uid string) error
- func (c *Client) DeleteDataSource(id int64) error
- func (c *Client) DeleteFolder(id string) error
- func (c *Client) DeleteOrg(id int64) error
- func (c *Client) DeleteUser(id int64) error
- func (c *Client) Folder(id int64) (*Folder, error)
- func (c *Client) Folders() ([]Folder, error)
- func (c *Client) NewAlertNotification(a *AlertNotification) (int64, error)
- func (c *Client) NewDashboard(dashboard Dashboard) (*DashboardSaveResponse, error)
- func (c *Client) NewDataSource(s *DataSource) (int64, error)
- func (c *Client) NewFolder(title string) (Folder, error)
- func (c *Client) NewOrg(name string) (int64, error)
- func (c *Client) Org(id int64) (Org, error)
- func (c *Client) OrgByName(name string) (Org, error)
- func (c *Client) OrgUsers(orgId int64) ([]OrgUser, error)
- func (c *Client) Orgs() ([]Org, error)
- func (c *Client) RemoveOrgUser(orgId, userId int64) error
- func (c *Client) SaveDashboard(model map[string]interface{}, overwrite bool) (*DashboardSaveResponse, error)deprecated
- func (c *Client) Search(params map[string]string) ([]SearchResult, error)
- func (c *Client) UpdateAlertNotification(a *AlertNotification) error
- func (c *Client) UpdateDataSource(s *DataSource) error
- func (c *Client) UpdateFolder(id string, name string) error
- func (c *Client) UpdateOrg(id int64, name string) error
- func (c *Client) UpdateOrgUser(orgId, userId int64, role string) error
- func (c *Client) UserByEmail(email string) (User, error)
- func (c *Client) Users() ([]User, error)
- type Dashboard
- type DashboardMeta
- type DashboardSaveResponse
- type DataSource
- type Folder
- type JSONData
- type Org
- type OrgUser
- type SearchResult
- type SecureJSONData
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AlertNotification ¶
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) AlertNotification ¶
func (c *Client) AlertNotification(id int64) (*AlertNotification, error)
func (*Client) DataSource ¶
func (c *Client) DataSource(id int64) (*DataSource, error)
func (*Client) DataSources ¶
func (c *Client) DataSources() ([]DataSource, error)
func (*Client) DeleteAlertNotification ¶
func (*Client) DeleteDashboard ¶
func (*Client) DeleteDataSource ¶
func (*Client) DeleteFolder ¶
func (*Client) DeleteUser ¶
func (*Client) NewAlertNotification ¶
func (c *Client) NewAlertNotification(a *AlertNotification) (int64, error)
func (*Client) NewDashboard ¶
func (c *Client) NewDashboard(dashboard Dashboard) (*DashboardSaveResponse, error)
func (*Client) NewDataSource ¶
func (c *Client) NewDataSource(s *DataSource) (int64, error)
func (*Client) RemoveOrgUser ¶
func (*Client) SaveDashboard
deprecated
func (c *Client) SaveDashboard(model map[string]interface{}, overwrite bool) (*DashboardSaveResponse, error)
Deprecated: use NewDashboard instead
func (*Client) UpdateAlertNotification ¶
func (c *Client) UpdateAlertNotification(a *AlertNotification) error
func (*Client) UpdateDataSource ¶
func (c *Client) UpdateDataSource(s *DataSource) error
func (*Client) UpdateOrgUser ¶
type Dashboard ¶
type Dashboard struct { Meta DashboardMeta `json:"meta"` Model map[string]interface{} `json:"dashboard"` Folder int64 `json:"folderId"` Overwrite bool `json:overwrite` }
type DashboardMeta ¶
type DashboardSaveResponse ¶
type DataSource ¶
type DataSource 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"` Password string `json:"password,omitempty"` OrgId int64 `json:"orgId,omitempty"` IsDefault bool `json:"isDefault"` BasicAuth bool `json:"basicAuth"` BasicAuthUser string `json:"basicAuthUser,omitempty"` BasicAuthPassword string `json:"basicAuthPassword,omitempty"` JSONData JSONData `json:"jsonData,omitempty"` SecureJSONData SecureJSONData `json:"secureJsonData,omitempty"` }
type JSONData ¶
type JSONData map[string]interface{}
JSONData is a representation of the datasource `jsonData` property
type SearchResult ¶
type SearchResult struct { Id int64 `json:"id"` Uid string `json:"uid"` Title string `json:"title"` Uri string `json:"uri` Url string `json:"url` Slug string `json:"slug` Type string `json:"type` Tags []string `json:"tags` IsStarred bool `json:"isStarred` FolderId int64 `json:"folderId,omitempty` FolderUid string `json:"folderUid,omitempty` FolderTitle string `json:"folderTitle,omitempty` FolderUrl string `json:"folderUrl,omitempty` }
type SecureJSONData ¶
type SecureJSONData map[string]interface{}
SecureJSONData is a representation of the datasource `secureJsonData` property
Click to show internal directories.
Click to hide internal directories.