Versions in this module Expand all Collapse all v0 v0.3.2 Feb 10, 2022 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) AddDatasourcePermission(id int64, item *DatasourcePermissionAddPayload) 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) CreateAPIKey(request CreateAPIKeyRequest) (CreateAPIKeyResponse, 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) DashboardsByIDs(ids []int64) ([]FolderDashboardSearchResponse, error) + func (c *Client) DataSource(id int64) (*DataSource, error) + func (c *Client) DatasourcePermissions(id int64) (*DatasourcePermissionsResponse, error) + func (c *Client) DeleteAPIKey(id int64) (DeleteAPIKeyResponse, 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) DeleteLibraryPanel(uid string) (*LibraryPanelDeleteResponse, error) + func (c *Client) DeleteOrg(id int64) error + func (c *Client) DeletePlaylist(id int) error + func (c *Client) DeleteReport(id int64) error + func (c *Client) DeleteRole(uid string, global bool) error + func (c *Client) DeleteStack(stackSlug string) 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) DisableDatasourcePermissions(id int64) error + func (c *Client) EnableDatasourcePermissions(id int64) error + func (c *Client) Folder(id int64) (*Folder, error) + func (c *Client) FolderByUID(uid string) (*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) GetAPIKeys(includeExpired bool) ([]*GetAPIKeysResponse, error) + func (c *Client) GetBuiltInRoleAssignments() (map[string][]*Role, error) + func (c *Client) GetRole(uid string) (*Role, error) + func (c *Client) LibraryPanelByName(name string) (*LibraryPanel, error) + func (c *Client) LibraryPanelByUID(uid string) (*LibraryPanel, error) + func (c *Client) LibraryPanelConnectedDashboards(uid string) ([]FolderDashboardSearchResponse, error) + func (c *Client) LibraryPanelConnections(uid string) (*[]LibraryPanelConnection, error) + func (c *Client) LibraryPanels() ([]LibraryPanel, 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) NewLibraryPanel(panel LibraryPanel) (*LibraryPanel, error) + func (c *Client) NewOrg(name string) (int64, error) + func (c *Client) NewPlaylist(playlist Playlist) (int, error) + func (c *Client) NewReport(report Report) (int64, error) + func (c *Client) NewRole(role Role) (*Role, error) + func (c *Client) NewSnapshot(snapshot Snapshot) (*SnapshotCreateResponse, error) + func (c *Client) NewStack(stack *CreateStackInput) (int64, 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) OrgUsersCurrent() ([]OrgUser, error) + func (c *Client) Orgs() ([]Org, error) + func (c *Client) PatchAnnotation(id int64, a *Annotation) (string, error) + func (c *Client) PatchLibraryPanel(uid string, panel LibraryPanel) (*LibraryPanel, 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) RemoveDatasourcePermission(id, permissionID int64) error + func (c *Client) RemoveMemberFromTeam(id int64, userID int64) error + func (c *Client) RemoveOrgUser(orgID, userID int64) error + func (c *Client) Report(id int64) (*Report, error) + func (c *Client) SaveDashboard(model map[string]interface{}, overwrite bool) (*DashboardSaveResponse, error) + func (c *Client) SearchTeam(query string) (*SearchTeam, error) + func (c *Client) StackByID(id int64) (Stack, error) + func (c *Client) StackBySlug(slug string) (Stack, error) + func (c *Client) Stacks() (StackItems, 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) UpdateReport(report Report) error + func (c *Client) UpdateRole(role Role) error + func (c *Client) UpdateStack(id int64, stack *UpdateStackInput) 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 + HTTPHeaders map[string]string + NumRetries int + OrgID int64 + type CreateAPIKeyRequest struct + Name string + Role string + SecondsToLive int64 + type CreateAPIKeyResponse struct + ID int64 + Key string + Name string + type CreateStackInput struct + Description string + Name string + Region string + Slug string + URL string + type Dashboard struct + Folder int64 + Message string + 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 + HTTPHeaders map[string]string + ID int64 + IsDefault bool + JSONData JSONData + Name string + OrgID int64 + Password string + SecureJSONData SecureJSONData + Type string + UID string + URL string + User string + func (ds *DataSource) MarshalJSON() ([]byte, error) + func (ds *DataSource) UnmarshalJSON(b []byte) (err error) + type DatasourcePermission struct + DatasourceID int64 + ID int64 + Permission DatasourcePermissionType + PermissionName string + TeamID int64 + UserEmail string + UserID int64 + type DatasourcePermissionAddPayload struct + Permission DatasourcePermissionType + TeamID int64 + UserID int64 + type DatasourcePermissionType int + const DatasourcePermissionQuery + type DatasourcePermissionsResponse struct + DatasourceID int64 + Enabled bool + Permissions []*DatasourcePermission + type DeleteAPIKeyResponse struct + Message 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 GetAPIKeysResponse struct + Expiration time.Time + ID int64 + Name string + Role string + type GraphiteAnnotation struct + Data string + Tags []string + What string + When int64 + type JSONData struct + AlertmanagerUID string + AssumeRoleArn string + AuthType string + AuthenticationType string + Catalog string + ClientEmail string + ConnMaxLifetime int64 + CustomMetricsNamespaces string + Database string + DefaultBucket string + DefaultProject string + DefaultRegion string + Encrypt string + Endpoint string + EsVersion string + ExternalID string + GitHubURL string + GraphiteVersion string + HTTPMethod string + Implementation string + Interval string + LogLevelField string + LogMessageField string + ManageAlerts bool + MaxConcurrentShardRequests int64 + MaxIdleConns int64 + MaxOpenConns int64 + OrgSlug string + Organization string + OutputLocation string + PostgresVersion int64 + Profile string + QueryTimeout string + SigV4AssumeRoleArn string + SigV4Auth bool + SigV4AuthType string + SigV4ExternalID string + SigV4Profile string + SigV4Region string + Sslmode string + TLSAuth bool + TLSAuthWithCACert bool + TLSSkipVerify bool + TimeField string + TimeInterval string + Timescaledb bool + TokenURI string + TsdbResolution string + TsdbVersion string + URL string + Version string + Workgroup string + func (jd *JSONData) UnmarshalJSON(b []byte) (err error) + func (jd JSONData) MarshalJSON() ([]byte, error) + type LibraryPanel struct + Description string + Folder int64 + ID int64 + Kind int64 + Meta LibraryPanelMeta + Model map[string]interface{} + Name string + OrgID int64 + Type string + UID string + Version int64 + type LibraryPanelConnection struct + Created time.Time + CreatedBy LibraryPanelMetaUser + DashboardID int64 + ID int64 + Kind int64 + PanelID int64 + type LibraryPanelCreateResponse struct + Result LibraryPanel + type LibraryPanelDeleteResponse struct + ID int64 + Message string + type LibraryPanelGetAllResponse struct + Elements []LibraryPanel + Page int64 + PerPage int64 + TotalCount int64 + type LibraryPanelMeta struct + ConnectedDashboards int64 + Created time.Time + CreatedBy LibraryPanelMetaUser + FolderName string + FolderUID string + Updated time.Time + UpdatedBy LibraryPanelMetaUser + type LibraryPanelMetaUser struct + AvatarURL string + ID int64 + Name 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 Report struct + DashboardID int64 + DashboardUID string + EnableCSV bool + EnableDashboardURL bool + ID int64 + Message string + Name string + Options ReportOptions + OrgID int64 + Recipients string + ReplyTo string + Schedule ReportSchedule + State string + UserID int64 + type ReportOptions struct + Layout string + Orientation string + TimeRange ReportTimeRange + type ReportSchedule struct + EndDate *time.Time + Frequency string + IntervalAmount int64 + IntervalFrequency string + StartDate *time.Time + TimeZone string + WorkdaysOnly bool + type ReportTimeRange struct + From string + To 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 + AccessToken string + AuthToken string + BasicAuthPassword string + Password string + PrivateKey string + SecretKey string + SigV4AccessKey string + SigV4SecretKey string + TLSCACert string + TLSClientCert string + TLSClientKey string + Token string + func (sjd SecureJSONData) MarshalJSON() ([]byte, error) + type Snapshot struct + Expires int64 + Model map[string]interface{} + type SnapshotCreateResponse struct + DeleteKey string + DeleteURL string + ID int64 + Key string + URL string + type Stack struct + AlertQuota int + AmInstanceGeneratorURL string + AmInstanceID int + AmInstanceName string + AmInstanceStatus string + AmInstanceURL string + BillableUserCnt int + BillingActiveUsers int + BillingEndDate time.Time + BillingStartDate time.Time + ClusterID int + ClusterName string + ClusterSlug string + CreatedAt time.Time + CreatedBy string + CurrentActiveAdminUsers int + CurrentActiveEditorUsers int + CurrentActiveUsers int + CurrentActiveViewerUsers int + CustomAuth bool + CustomDomain bool + DailyAdminCnt int + DailyEditorCnt int + DailyUserCnt int + DailyViewerCnt int + DashboardCnt int + DashboardQuota int + DatasourceCnts struct{} + Description string + Gateway string + HlInstanceCurrentUsage int + HlInstanceID int + HlInstanceName string + HlInstanceStatus string + HlInstanceURL string + HmInstanceGraphiteCurrentUsage int + HmInstanceGraphiteID int + HmInstanceGraphiteName string + HmInstanceGraphiteStatus string + HmInstanceGraphiteType string + HmInstanceGraphiteURL string + HmInstancePromCurrentActiveSeries int + HmInstancePromCurrentUsage int + HmInstancePromID int + HmInstancePromName string + HmInstancePromStatus string + HmInstancePromURL string + HtInstanceID int + HtInstanceName string + HtInstanceStatus string + HtInstanceURL string + ID int64 + Links []struct{ ... } + MachineLearning int + Name string + OrgID int64 + OrgName string + OrgSlug string + Plan string + PlanName string + RegionID int + RegionSlug string + RunningVersion string + Slug string + Ssl bool + Status string + Support bool + Trial int + TrialExpiresAt time.Time + URL string + UpdatedAt time.Time + UpdatedBy string + UserQuota int + Version string + type StackItems struct + Items []*Stack + 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 UpdateStackInput struct + Description string + Name string + Slug string + 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