Versions in this module Expand all Collapse all v1 v1.0.1 Jul 15, 2021 Changes in this version + type Alert struct + DashboardID int64 + DashboardSlug string + DashboardUID string + EvalDate string + ExecutionError string + ID int64 + Name string + NewStateDate string + PanelID int64 + State string + URL string + type AlertNotification struct + DisableResolveMessage bool + Frequency string + ID int64 + IsDefault bool + Name string + SecureFields interface{} + SecureSettings interface{} + SendReminder bool + Settings interface{} + Type string + UID string + type Annotation struct + AlertID int64 + DashboardID int64 + ID int64 + IsRegion bool + Metric string + NewState string + PanelID int64 + PrevState string + RegionID int64 + Tags []string + Text string + Time int64 + TimeEnd int64 + Type string + UserID int64 + UserName string + type BuiltInRoleAssignment struct + BuiltinRole string + Global bool + RoleUID string + type Client struct + func New(baseURL string, cfg Config) (*Client, error) + func (c *Client) AddOrgUser(orgID int64, user, role string) error + func (c *Client) AddTeam(name string, email string) (int64, error) + func (c *Client) AddTeamMember(id int64, userID int64) error + func (c *Client) Alert(id int64) (Alert, error) + func (c *Client) AlertNotification(id int64) (*AlertNotification, error) + func (c *Client) AlertNotifications() ([]AlertNotification, error) + func (c *Client) Alerts(params url.Values) ([]Alert, error) + func (c *Client) Annotations(params url.Values) ([]Annotation, error) + func (c *Client) CreateUser(user User) (int64, error) + func (c *Client) Dashboard(slug string) (*Dashboard, error) + func (c *Client) DashboardByUID(uid string) (*Dashboard, error) + func (c *Client) DashboardPermissions(id int64) ([]*DashboardPermission, error) + func (c *Client) Dashboards() ([]FolderDashboardSearchResponse, error) + func (c *Client) DataSource(id int64) (*DataSource, error) + func (c *Client) DeleteAlertNotification(id int64) error + func (c *Client) DeleteAnnotation(id int64) (string, error) + func (c *Client) DeleteAnnotationByRegionID(id int64) (string, error) + func (c *Client) DeleteBuiltInRoleAssignment(builtInRole BuiltInRoleAssignment) error + func (c *Client) DeleteDashboard(slug string) error + func (c *Client) DeleteDashboardByUID(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) DeletePlaylist(id int) error + func (c *Client) DeleteRole(uid string, global bool) error + func (c *Client) DeleteTeam(id int64) error + func (c *Client) DeleteTeamGroup(id int64, groupID string) error + func (c *Client) DeleteUser(id int64) error + func (c *Client) Folder(id int64) (*Folder, error) + func (c *Client) FolderDashboardSearch(params map[string]string) (resp []FolderDashboardSearchResponse, err error) + func (c *Client) FolderPermissions(fid string) ([]*FolderPermission, error) + func (c *Client) Folders() ([]Folder, error) + func (c *Client) GetBuiltInRoleAssignments() (map[string][]*Role, error) + func (c *Client) GetRole(uid string) (*Role, error) + func (c *Client) NewAlertNotification(a *AlertNotification) (int64, error) + func (c *Client) NewAnnotation(a *Annotation) (int64, error) + func (c *Client) NewBuiltInRoleAssignment(builtInRoleAssignment BuiltInRoleAssignment) (*BuiltInRoleAssignment, 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) NewGraphiteAnnotation(gfa *GraphiteAnnotation) (int64, error) + func (c *Client) NewOrg(name string) (int64, error) + func (c *Client) NewPlaylist(playlist Playlist) (int, error) + func (c *Client) NewRole(role Role) (*Role, error) + func (c *Client) NewTeamGroup(id int64, groupID string) 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) PatchAnnotation(id int64, a *Annotation) (string, error) + func (c *Client) PauseAlert(id int64) (PauseAlertResponse, error) + func (c *Client) PauseAllAlerts() (PauseAllAlertsResponse, error) + func (c *Client) Playlist(id int) (*Playlist, error) + func (c *Client) RemoveMemberFromTeam(id int64, userID int64) error + func (c *Client) RemoveOrgUser(orgID, userID int64) error + func (c *Client) SaveDashboard(model map[string]interface{}, overwrite bool) (*DashboardSaveResponse, error) + func (c *Client) SearchTeam(query string) (*SearchTeam, error) + func (c *Client) Team(id int64) (*Team, error) + func (c *Client) TeamGroups(id int64) ([]TeamGroup, error) + func (c *Client) TeamMembers(id int64) ([]*TeamMember, error) + func (c *Client) TeamPreferences(id int64) (*Preferences, error) + func (c *Client) UpdateAlertNotification(a *AlertNotification) error + func (c *Client) UpdateAnnotation(id int64, a *Annotation) (string, error) + func (c *Client) UpdateDashboardPermissions(id int64, items *PermissionItems) error + func (c *Client) UpdateDataSource(s *DataSource) error + func (c *Client) UpdateFolder(id string, name string) error + func (c *Client) UpdateFolderPermissions(fid string, items *PermissionItems) error + func (c *Client) UpdateOrg(id int64, name string) error + func (c *Client) UpdateOrgUser(orgID, userID int64, role string) error + func (c *Client) UpdatePlaylist(playlist Playlist) error + func (c *Client) UpdateRole(role Role) error + func (c *Client) UpdateTeam(id int64, name string, email string) error + func (c *Client) UpdateTeamPreferences(id int64, preferences Preferences) error + func (c *Client) UpdateUserPassword(id int64, password string) error + func (c *Client) UpdateUserPermissions(id int64, isAdmin bool) error + func (c *Client) User(id int64) (user User, err error) + func (c *Client) UserByEmail(email string) (user User, err error) + func (c *Client) UserUpdate(u User) error + func (c *Client) Users() (users []UserSearch, err error) + type Config struct + APIKey string + BasicAuth *url.Userinfo + Client *http.Client + OrgID int64 + type Dashboard struct + Folder int64 + Meta DashboardMeta + Model map[string]interface{} + Overwrite bool + type DashboardMeta struct + Folder int64 + IsStarred bool + Slug string + type DashboardPermission struct + DashboardID int64 + DashboardUID string + Inherited bool + IsFolder bool + Permission int64 + PermissionName string + Role string + TeamID int64 + UserID int64 + type DashboardSaveResponse struct + ID int64 + Slug string + Status string + UID string + Version int64 + type DataSource struct + Access string + BasicAuth bool + BasicAuthPassword string + BasicAuthUser string + Database string + ID int64 + IsDefault bool + JSONData JSONData + Name string + OrgID int64 + Password string + SecureJSONData SecureJSONData + Type string + URL string + User string + type Folder struct + ID int64 + Title string + UID string + type FolderDashboardSearchResponse struct + FolderID uint + FolderTitle string + FolderUID string + FolderURL string + ID uint + IsStarred bool + Slug string + Tags []string + Title string + Type string + UID string + URI string + URL string + type FolderPermission struct + DashboardID int64 + FolderID int64 + FolderUID string + ID int64 + IsFolder bool + Permission int64 + PermissionName string + Role string + TeamID int64 + UserID int64 + type GraphiteAnnotation struct + Data string + Tags []string + What string + When int64 + type JSONData struct + AssumeRoleArn string + AuthType string + AuthenticationType string + ClientEmail string + ConnMaxLifetime int64 + CustomMetricsNamespaces string + DefaultProject string + DefaultRegion string + Encrypt string + EsVersion int64 + GraphiteVersion string + HTTPMethod string + Interval string + LogLevelField string + LogMessageField string + MaxConcurrentShardRequests int64 + MaxIdleConns int64 + MaxOpenConns int64 + PostgresVersion int64 + Profile string + QueryTimeout string + Sslmode string + TLSAuth bool + TLSAuthWithCACert bool + TLSSkipVerify bool + TimeField string + TimeInterval string + Timescaledb bool + TokenURI string + TsdbResolution string + TsdbVersion string + type Org struct + ID int64 + Name string + type OrgUser struct + Email string + Login string + OrgID int64 + Role string + UserID int64 + type PauseAlertRequest struct + Paused bool + type PauseAlertResponse struct + AlertID int64 + Message string + State string + type PauseAllAlertsResponse struct + AlertsAffected int64 + Message string + State string + type Permission struct + Action string + Scope string + type PermissionItem struct + Permission int64 + Role string + TeamID int64 + UserID int64 + type PermissionItems struct + Items []*PermissionItem + type Playlist struct + ID int + Interval string + Items []PlaylistItem + Name string + type PlaylistItem struct + Order int + Title string + Type string + Value string + type Preferences struct + HomeDashboardID int64 + Theme string + Timezone string + type Role struct + Description string + Global bool + Name string + Permissions []Permission + UID string + Version int64 + type SearchTeam struct + Page int64 + PerPage int64 + Teams []*Team + TotalCount int64 + type SecureJSONData struct + AccessKey string + BasicAuthPassword string + Password string + PrivateKey string + SecretKey string + TLSCACert string + TLSClientCert string + TLSClientKey string + type Team struct + AvatarURL string + Email string + ID int64 + MemberCount int64 + Name string + OrgID int64 + Permission int64 + type TeamGroup struct + GroupID string + OrgID int64 + TeamID int64 + type TeamMember struct + AvatarURL string + Email string + Login string + OrgID int64 + Permission int64 + TeamID int64 + UserID int64 + type User struct + AuthLabels []string + AvatarURL string + CreatedAt time.Time + Email string + ID int64 + IsAdmin bool + IsDisabled bool + IsExternal bool + Login string + Name string + OrgID int64 + Password string + Theme string + UpdatedAt time.Time + type UserSearch struct + AuthLabels []string + AvatarURL string + Email string + ID int64 + IsAdmin bool + IsDisabled bool + LastSeenAt time.Time + LastSeenAtAge string + Login string + Name string