Documentation
¶
Index ¶
- func PrintPolicyTree(policy alerting.NotificationPolicy, depth int)
- type Client
- func (c *Client) AddNestedPolicy(newNotificationPolicy alerting.NotificationPolicy) error
- func (c *Client) CreateOrUpdateContactPoint(contactPoint alerting.ContactPoint) error
- func (c *Client) DeleteAlertRule(uid string) (DeleteAlertRuleResponse, *resty.Response, error)
- func (c *Client) DeleteContactPoint(uid string) (DeleteContactPointResponse, *resty.Response, error)
- func (c *Client) DeleteDashboardByUID(uid string) (*resty.Response, error)
- func (c *Client) DeleteNestedPolicy(newNotificationPolicy alerting.NotificationPolicy) error
- func (c *Client) DeleteNotificationPolicy() (DeleteNotificationPolicyResponse, *resty.Response, error)
- func (c *Client) DeleteNotificationTemplate(name string) (DeleteNotificationTemplateResponse, *resty.Response, error)
- func (c *Client) FindOrCreateFolder(name string) (*Folder, error)
- func (c *Client) GetAlertRules() (GetAllAlertRulesResponse, *resty.Response, error)
- func (c *Client) GetAlertRulesByDashboardUID(dashboardUID string) (GetAllAlertRulesResponse, error)
- func (c *Client) GetAlertRulesByFolderUIDAndGroupName(folderUID string, ruleGroupName string) (GetAllAlertRulesResponse, error)
- func (c *Client) GetContactPointByName(name string) (*alerting.ContactPoint, error)
- func (c *Client) GetContactPoints() (GetContactPointsResponse, *resty.Response, error)
- func (c *Client) GetDashboardByName(name string) (GetDashboardResponse, *resty.Response, error)
- func (c *Client) GetDataSourceByName(name string) (*Datasource, *resty.Response, error)
- func (c *Client) GetFolderByTitle(title string) (*Folder, error)
- func (c *Client) GetFolders() (GetAllFoldersResponse, *resty.Response, error)
- func (c *Client) GetNotificationPolicy() (GetNotificationPolicyResponse, *resty.Response, error)
- func (c *Client) PostAlertRule(alertRule alerting.Rule) (PostAlertRuleResponse, *resty.Response, error)
- func (c *Client) PostContactPoint(contactPoint alerting.ContactPoint) (PostContactPointResponse, *resty.Response, error)
- func (c *Client) PostDashboard(dashboard PostDashboardRequest) (PostDashboardResponse, *resty.Response, error)
- func (c *Client) PostFolder(name string) (*Folder, *resty.Response, error)
- func (c *Client) PutContactPoint(uid string, contactPoint alerting.ContactPoint) (PutContactPointResponse, *resty.Response, error)
- func (c *Client) PutNotificationPolicy(notificationPolicy alerting.NotificationPolicy) (PutNotificationPolicyResponse, *resty.Response, error)
- func (c *Client) PutNotificationTemplate(notificationTemplate alerting.NotificationTemplate) (PutNotificationPolicyResponse, *resty.Response, error)
- func (c *Client) UpdateAlertRule(uid string, alertRule alerting.Rule) (UpdateAlertRuleResponse, *resty.Response, error)
- func (c *Client) UpdateAlertRuleGroup(folderUID string, alertRuleGroup alerting.RuleGroup) (UpdateAlertRuleGroupResponse, *resty.Response, error)
- type Datasource
- type DeleteAlertRuleResponse
- type DeleteContactPointResponse
- type DeleteNotificationPolicyResponse
- type DeleteNotificationTemplateResponse
- type Folder
- type GetAllAlertRulesResponse
- type GetAllFoldersResponse
- type GetContactPointsResponse
- type GetDashboardResponse
- type GetNotificationPolicyResponse
- type PostAlertRuleResponse
- type PostContactPointResponse
- type PostDashboardRequest
- type PostDashboardResponse
- type PutContactPointResponse
- type PutNotificationPolicyResponse
- type PutNotificationTemplateResponse
- type UpdateAlertRuleGroupResponse
- type UpdateAlertRuleResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PrintPolicyTree ¶
func PrintPolicyTree(policy alerting.NotificationPolicy, depth int)
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) AddNestedPolicy ¶
func (c *Client) AddNestedPolicy(newNotificationPolicy alerting.NotificationPolicy) error
AddNestedPolicy Add Nested Policy to Notification Policy Tree
func (*Client) CreateOrUpdateContactPoint ¶
func (c *Client) CreateOrUpdateContactPoint(contactPoint alerting.ContactPoint) error
CreateOrUpdateContactPoint create or update a contact point
func (*Client) DeleteAlertRule ¶
func (c *Client) DeleteAlertRule(uid string) (DeleteAlertRuleResponse, *resty.Response, error)
DeleteAlertRule Delete a specific alert rule by UID
func (*Client) DeleteContactPoint ¶
func (c *Client) DeleteContactPoint(uid string) (DeleteContactPointResponse, *resty.Response, error)
DeleteContactPoint Delete a contact point
func (*Client) DeleteDashboardByUID ¶
func (*Client) DeleteNestedPolicy ¶
func (c *Client) DeleteNestedPolicy(newNotificationPolicy alerting.NotificationPolicy) error
DeleteNestedPolicy Delete Nested Policy from Notification Policy Tree
func (*Client) DeleteNotificationPolicy ¶
func (c *Client) DeleteNotificationPolicy() (DeleteNotificationPolicyResponse, *resty.Response, error)
DeleteNotificationPolicy Clears the notification policy tree
func (*Client) DeleteNotificationTemplate ¶
func (c *Client) DeleteNotificationTemplate(name string) (DeleteNotificationTemplateResponse, *resty.Response, error)
func (*Client) FindOrCreateFolder ¶
FindOrCreateFolder returns the folder by its name or creates it if it doesn't exist
func (*Client) GetAlertRules ¶
func (c *Client) GetAlertRules() (GetAllAlertRulesResponse, *resty.Response, error)
GetAlertRules Get all alert rules
func (*Client) GetAlertRulesByDashboardUID ¶
func (c *Client) GetAlertRulesByDashboardUID(dashboardUID string) (GetAllAlertRulesResponse, error)
GetAlertRulesByDashboardUID Get alert rules by dashboard UID
func (*Client) GetAlertRulesByFolderUIDAndGroupName ¶
func (c *Client) GetAlertRulesByFolderUIDAndGroupName(folderUID string, ruleGroupName string) (GetAllAlertRulesResponse, error)
GetAlertRulesByFolderUIDAndGroupName Get alert rules by folder UID and GroupName
func (*Client) GetContactPointByName ¶
func (c *Client) GetContactPointByName(name string) (*alerting.ContactPoint, error)
GetContactPointByName Get a contact point by name
func (*Client) GetContactPoints ¶
func (c *Client) GetContactPoints() (GetContactPointsResponse, *resty.Response, error)
GetContactPoints Get all the contact points
func (*Client) GetDashboardByName ¶
func (c *Client) GetDashboardByName(name string) (GetDashboardResponse, *resty.Response, error)
func (*Client) GetDataSourceByName ¶
func (c *Client) GetDataSourceByName(name string) (*Datasource, *resty.Response, error)
GetDataSourceByName Get a datasource by name
func (*Client) GetFolderByTitle ¶
GetFolderByTitle Get a folder by title
func (*Client) GetFolders ¶
func (c *Client) GetFolders() (GetAllFoldersResponse, *resty.Response, error)
GetFolders Get all folders
func (*Client) GetNotificationPolicy ¶
func (c *Client) GetNotificationPolicy() (GetNotificationPolicyResponse, *resty.Response, error)
GetNotificationPolicy Get the notification policy tree
func (*Client) PostAlertRule ¶
func (c *Client) PostAlertRule(alertRule alerting.Rule) (PostAlertRuleResponse, *resty.Response, error)
PostAlertRule Create a new alert rule
func (*Client) PostContactPoint ¶
func (c *Client) PostContactPoint(contactPoint alerting.ContactPoint) (PostContactPointResponse, *resty.Response, error)
PostContactPoint Create a new contact point
func (*Client) PostDashboard ¶
func (c *Client) PostDashboard(dashboard PostDashboardRequest) (PostDashboardResponse, *resty.Response, error)
func (*Client) PostFolder ¶
PostFolder Create a new folder
func (*Client) PutContactPoint ¶
func (c *Client) PutContactPoint(uid string, contactPoint alerting.ContactPoint) (PutContactPointResponse, *resty.Response, error)
PutContactPoint Update an existing contact point
func (*Client) PutNotificationPolicy ¶
func (c *Client) PutNotificationPolicy(notificationPolicy alerting.NotificationPolicy) (PutNotificationPolicyResponse, *resty.Response, error)
PutNotificationPolicy Sets the notification policy tree
func (*Client) PutNotificationTemplate ¶
func (c *Client) PutNotificationTemplate(notificationTemplate alerting.NotificationTemplate) (PutNotificationPolicyResponse, *resty.Response, error)
PutNotificationTemplate Create or update a notification template
func (*Client) UpdateAlertRule ¶
func (c *Client) UpdateAlertRule(uid string, alertRule alerting.Rule) (UpdateAlertRuleResponse, *resty.Response, error)
UpdateAlertRule Update a specific alert rule by UID
func (*Client) UpdateAlertRuleGroup ¶
func (c *Client) UpdateAlertRuleGroup(folderUID string, alertRuleGroup alerting.RuleGroup) (UpdateAlertRuleGroupResponse, *resty.Response, error)
UpdateAlertRuleGroup Update a specific alert rule group
type Datasource ¶
type DeleteAlertRuleResponse ¶
type DeleteAlertRuleResponse struct{}
type DeleteContactPointResponse ¶
type DeleteContactPointResponse struct{}
type DeleteNotificationPolicyResponse ¶
type DeleteNotificationPolicyResponse struct{}
type DeleteNotificationTemplateResponse ¶
type DeleteNotificationTemplateResponse struct{}
type GetAllFoldersResponse ¶
type GetAllFoldersResponse []Folder
type GetContactPointsResponse ¶
type GetContactPointsResponse []alerting.ContactPoint
type GetDashboardResponse ¶
type GetNotificationPolicyResponse ¶
type GetNotificationPolicyResponse alerting.NotificationPolicy
type PostAlertRuleResponse ¶
type PostAlertRuleResponse struct{}
type PostContactPointResponse ¶
type PostContactPointResponse struct{}
type PostDashboardRequest ¶
type PostDashboardResponse ¶
type PutContactPointResponse ¶
type PutContactPointResponse struct{}
type PutNotificationPolicyResponse ¶
type PutNotificationPolicyResponse struct{}
type PutNotificationTemplateResponse ¶
type PutNotificationTemplateResponse struct{}
type UpdateAlertRuleGroupResponse ¶
type UpdateAlertRuleGroupResponse struct{}
type UpdateAlertRuleResponse ¶
type UpdateAlertRuleResponse struct{}