Documentation
¶
Overview ¶
Package alerts provides requests and response structures to achieve Alert API actions.
Index ¶
- type AcknowledgeAlertRequest
- type AcknowledgeAlertResponse
- type AddDetailsAlertRequest
- type AddDetailsAlertResponse
- type AddNoteAlertRequest
- type AddNoteAlertResponse
- type AddRecipientAlertRequest
- type AddRecipientAlertResponse
- type AddTagsAlertRequest
- type AddTagsAlertResponse
- type AddTeamAlertRequest
- type AddTeamAlertResponse
- type AssignOwnerAlertRequest
- type AssignOwnerAlertResponse
- type AttachFileAlertRequest
- type AttachFileAlertResponse
- type CloseAlertRequest
- type CloseAlertResponse
- type CountAlertRequest
- type CountAlertResponse
- type CreateAlertRequest
- type CreateAlertResponse
- type DeleteAlertRequest
- type DeleteAlertResponse
- type EscalateToNextAlertRequest
- type EscalateToNextAlertResponse
- type ExecuteActionAlertRequest
- type ExecuteActionAlertResponse
- type GetAlertRequest
- type GetAlertResponse
- func (res *GetAlertResponse) AckTime() uint64
- func (res *GetAlertResponse) AcknowledgedBy() string
- func (res *GetAlertResponse) CloseTime() uint64
- func (res *GetAlertResponse) ClosedBy() string
- func (res *GetAlertResponse) IntegrationID() string
- func (res *GetAlertResponse) IntegrationName() string
- func (res *GetAlertResponse) IntegrationType() string
- type ListAlertLogsRequest
- type ListAlertLogsResponse
- type ListAlertNotesRequest
- type ListAlertNotesResponse
- type ListAlertRecipientsRequest
- type ListAlertRecipientsResponse
- type ListAlertsRequest
- type ListAlertsResponse
- type RemoveDetailsAlertRequest
- type RemoveDetailsAlertResponse
- type RemoveTagsAlertRequest
- type RemoveTagsAlertResponse
- type RenotifyAlertRequest
- type RenotifyAlertResponse
- type SnoozeAlertRequest
- type SnoozeAlertResponse
- type TakeOwnershipAlertRequest
- type TakeOwnershipAlertResponse
- type UnAcknowledgeAlertRequest
- type UnAcknowledgeAlertResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AcknowledgeAlertRequest ¶
type AcknowledgeAlertRequest struct {
APIKey string `json:"apiKey,omitempty"`
ID string `json:"id,omitempty"`
Alias string `json:"alias,omitempty"`
User string `json:"user,omitempty"`
Note string `json:"note,omitempty"`
Source string `json:"source,omitempty"`
}
AcknowledgeAlertRequest provides necessary parameter structure to Acknowledge an alert at OpsGenie.
type AcknowledgeAlertResponse ¶
AcknowledgeAlertResponse holds the result data of the AcknowledgeAlertRequest.
type AddDetailsAlertRequest ¶
type AddDetailsAlertRequest struct {
APIKey string `json:"apiKey,omitempty"`
ID string `json:"id,omitempty"`
Alias string `json:"alias,omitempty"`
Details map[string]string `json:"details,omitempty"`
User string `json:"user,omitempty"`
Note string `json:"note,omitempty"`
Source string `json:"source,omitempty"`
}
AddDetailsAlertRequest provides necessary parameter structure to Add Details to an alert at OpsGenie.
type AddDetailsAlertResponse ¶
AddDetailsAlertResponse holds the result data of the AddDetailsAlertRequest
type AddNoteAlertRequest ¶
type AddNoteAlertRequest struct {
APIKey string `json:"apiKey,omitempty"`
ID string `json:"id,omitempty"`
Alias string `json:"alias,omitempty"`
Note string `json:"note,omitempty"`
User string `json:"user,omitempty"`
Source string `json:"source,omitempty"`
}
AddNoteAlertRequest provides necessary parameter structure to Add Note to an alert at OpsGenie.
type AddNoteAlertResponse ¶
AddNoteAlertResponse holds the result data of the AddNoteAlertRequest.
type AddRecipientAlertRequest ¶
type AddRecipientAlertRequest struct {
APIKey string `json:"apiKey,omitempty"`
ID string `json:"id,omitempty"`
Alias string `json:"alias,omitempty"`
Recipient string `json:"recipient,omitempty"`
User string `json:"user,omitempty"`
Note string `json:"note,omitempty"`
Source string `json:"source,omitempty"`
}
AddRecipientAlertRequest provides necessary parameter structure to Add Recipient to an alert at OpsGenie.
type AddRecipientAlertResponse ¶
AddRecipientAlertResponse holds the result data of the AddRecipientAlertRequest.
type AddTagsAlertRequest ¶
type AddTagsAlertRequest struct {
APIKey string `json:"apiKey,omitempty"`
ID string `json:"id,omitempty"`
Alias string `json:"alias,omitempty"`
Tags []string `json:"tags,omitempty"`
User string `json:"user,omitempty"`
Note string `json:"note,omitempty"`
Source string `json:"source,omitempty"`
}
AddTagsAlertRequest provides necessary parameter structure to Add Tags to an alert at OpsGenie.
type AddTagsAlertResponse ¶
AddTagsAlertResponse holds the result data of the AddTagsAlertRequest.
type AddTeamAlertRequest ¶
type AddTeamAlertRequest struct {
APIKey string `json:"apiKey,omitempty"`
ID string `json:"id,omitempty"`
Alias string `json:"alias,omitempty"`
Team string `json:"team,omitempty"`
User string `json:"user,omitempty"`
Note string `json:"note,omitempty"`
Source string `json:"source,omitempty"`
}
AddTeamAlertRequest provides necessary parameter structure to Add Team to an alert at OpsGenie.
type AddTeamAlertResponse ¶
AddTeamAlertResponse holds the result data of the AddTeamAlertRequest.
type AssignOwnerAlertRequest ¶
type AssignOwnerAlertRequest struct {
APIKey string `json:"apiKey,omitempty"`
ID string `json:"id,omitempty"`
Alias string `json:"alias,omitempty"`
Owner string `json:"owner,omitempty"`
User string `json:"user,omitempty"`
Note string `json:"note,omitempty"`
Source string `json:"source,omitempty"`
}
AssignOwnerAlertRequest provides necessary parameter structure to Assign a User as Owner to an alert at OpsGenie.
type AssignOwnerAlertResponse ¶
AssignOwnerAlertResponse holds the result data of the AssignOwnerAlertRequest.
type AttachFileAlertRequest ¶
type AttachFileAlertRequest struct {
APIKey string `json:"apiKey,omitempty"`
ID string `json:"id,omitempty"`
Alias string `json:"alias,omitempty"`
Attachment *os.File `json:"attachment,omitempty"`
User string `json:"user,omitempty"`
Source string `json:"source,omitempty"`
IndexFile string `json:"indexFile,omitempty"`
Note string `json:"note,omitempty"`
}
AttachFileAlertRequest provides necessary parameter structure to Attach File to an alert at OpsGenie.
type AttachFileAlertResponse ¶
AttachFileAlertResponse holds the result data of the AttachFileAlertRequest.
type CloseAlertRequest ¶
type CloseAlertRequest struct {
APIKey string `json:"apiKey,omitempty"`
ID string `json:"id,omitempty"`
Alias string `json:"alias,omitempty"`
User string `json:"user,omitempty"`
Note string `json:"note,omitempty"`
Notify []string `json:"notify,omitempty"`
Source string `json:"source,omitempty"`
}
CloseAlertRequest provides necessary parameter structure to Close an alert at OpsGenie.
type CloseAlertResponse ¶
CloseAlertResponse holds the result data of the CloseAlertRequest
type CountAlertRequest ¶
type CountAlertRequest struct {
APIKey string `url:"apiKey,omitempty"`
CreatedAfter uint64 `url:"createdAfter,omitempty"`
CreatedBefore uint64 `url:"createdBefore,omitempty"`
UpdatedAfter uint64 `url:"updatedAfter,omitempty"`
UpdatedBefore uint64 `url:"updatedBefore,omitempty"`
Limit uint64 `url:"limit,omitempty"`
Status string `url:"status,omitempty"`
Tags []string `url:"tags,omitempty"`
TagsOperator string `url:"tagsOperator,omitempty"`
}
CountAlertRequest counts the alerts at OpsGenie.
type CountAlertResponse ¶
type CountAlertResponse struct {
Count int `json:"count"`
}
CountAlertResponse holds the result data of the CountAlertRequest
type CreateAlertRequest ¶
type CreateAlertRequest struct {
APIKey string `json:"apiKey,omitempty"`
Message string `json:"message,omitempty"`
Teams []string `json:"teams,omitempty"`
Alias string `json:"alias,omitempty"`
Description string `json:"description,omitempty"`
Recipients []string `json:"recipients,omitempty"`
Actions []string `json:"actions,omitempty"`
Source string `json:"source,omitempty"`
Tags []string `json:"tags,omitempty"`
Details map[string]string `json:"details,omitempty"`
Entity string `json:"entity,omitempty"`
User string `json:"user,omitempty"`
Note string `json:"note,omitempty"`
}
CreateAlertRequest provides necessary parameter structure to Create an alert at OpsGenie.
type CreateAlertResponse ¶
type CreateAlertResponse struct {
Message string `json:"message"`
AlertID string `json:"alertId"`
Status string `json:"status"`
Code int `json:"code"`
}
CreateAlertResponse holds the result data of the CreateAlertRequest
type DeleteAlertRequest ¶
type DeleteAlertRequest struct {
APIKey string `url:"apiKey,omitempty"`
ID string `url:"id,omitempty"`
Alias string `url:"alias,omitempty"`
User string `url:"user,omitempty"`
Source string `url:"source,omitempty"`
}
DeleteAlertRequest provides necessary parameter structure to Delete an alert from OpsGenie.
type DeleteAlertResponse ¶
DeleteAlertResponse holds the result data of the DeleteAlertRequest
type EscalateToNextAlertRequest ¶
type EscalateToNextAlertRequest struct {
APIKey string `json:"apiKey,omitempty"`
ID string `json:"id,omitempty"`
Alias string `json:"alias,omitempty"`
EscalationID string `json:"escalationId,omitempty"`
EscalationName string `json:"escalationName,omitempty"`
User string `json:"user,omitempty"`
Note string `json:"note,omitempty"`
Source string `json:"source,omitempty"`
}
EscalateToNextAlertRequest provides necessary parameter structure to Escalate To Next for and alert at OpsGenie.
type EscalateToNextAlertResponse ¶
EscalateToNextAlertResponse holds the result data of the EscalateToNextAlertRequest
type ExecuteActionAlertRequest ¶
type ExecuteActionAlertRequest struct {
APIKey string `json:"apiKey,omitempty"`
ID string `json:"id,omitempty"`
Alias string `json:"alias,omitempty"`
Action string `json:"action,omitempty"`
User string `json:"user,omitempty"`
Source string `json:"source,omitempty"`
Note string `json:"note,omitempty"`
}
ExecuteActionAlertRequest provides necessary parameter structure to Execute Custom Actions on an alert at OpsGenie.
type ExecuteActionAlertResponse ¶
ExecuteActionAlertResponse holds the result data of the ExecuteActionAlertRequest.
type GetAlertRequest ¶
type GetAlertRequest struct {
APIKey string `url:"apiKey,omitempty"`
ID string `url:"id,omitempty"`
Alias string `url:"alias,omitempty"`
TinyID string `url:"tinyId,omitempty"`
}
GetAlertRequest provides necessary parameter structure to Retrieve an alert details from OpsGenie.
type GetAlertResponse ¶
type GetAlertResponse struct {
Tags []string `json:"tags"`
Count int `json:"count"`
Status string `json:"status"`
Teams []string `json:"teams"`
Recipients []string `json:"recipients"`
TinyID string `json:"tinyId"`
Alias string `json:"alias"`
Entity string `json:"entity"`
ID string `json:"id"`
UpdatedAt uint64 `json:"updatedAt"`
Message string `json:"message"`
Details map[string]string `json:"details"`
Source string `json:"source"`
Description string `json:"description"`
CreatedAt uint64 `json:"createdAt"`
IsSeen bool `json:"isSeen"`
Acknowledged bool `json:"acknowledged"`
Owner string `json:"owner"`
Actions []string `json:"actions"`
SystemData map[string]interface{} `json:"systemData"`
}
GetAlertResponse holds the result data of the GetAlertRequest.
func (*GetAlertResponse) AckTime ¶
func (res *GetAlertResponse) AckTime() uint64
AckTime returns extracted "ackTime" data from the retrieved alert' SystemData property.
func (*GetAlertResponse) AcknowledgedBy ¶
func (res *GetAlertResponse) AcknowledgedBy() string
AcknowledgedBy returns extracted "acknowledgedBy" data from the retrieved alert' SystemData property.
func (*GetAlertResponse) CloseTime ¶
func (res *GetAlertResponse) CloseTime() uint64
CloseTime returns extracted "closeTime" data from the retrieved alert' SystemData property.
func (*GetAlertResponse) ClosedBy ¶
func (res *GetAlertResponse) ClosedBy() string
ClosedBy returns extracted "closedBy" data from the retrieved alert' SystemData property.
func (*GetAlertResponse) IntegrationID ¶
func (res *GetAlertResponse) IntegrationID() string
IntegrationID returns extracted "integrationId" data from the retrieved alert' SystemData property.
func (*GetAlertResponse) IntegrationName ¶
func (res *GetAlertResponse) IntegrationName() string
IntegrationName returns extracted "integrationName" data from the retrieved alert' SystemData property.
func (*GetAlertResponse) IntegrationType ¶
func (res *GetAlertResponse) IntegrationType() string
IntegrationType returns extracted "integrationType" data from the retrieved alert' SystemData property.
type ListAlertLogsRequest ¶
type ListAlertLogsRequest struct {
APIKey string `url:"apiKey,omitempty"`
ID string `url:"id,omitempty"`
Alias string `url:"alias,omitempty"`
Limit uint64 `url:"limit,omitempty"`
Order string `url:"order,omitempty"`
LastKey string `url:"lastKey,omitempty"`
}
ListAlertLogsRequest provides necessary parameter structure to Retrieve activity logs of an alert from OpsGenie.
type ListAlertLogsResponse ¶
type ListAlertLogsResponse struct {
LastKey string `json:"lastKey"`
Logs []struct {
Log string `json:"log"`
LogType string `json:"logType"`
Owner string `json:"owner"`
CreatedAt uint64 `json:"createdAt"`
} `json:"logs"`
}
ListAlertLogsResponse holds the result data of the ListAlertLogsRequest
type ListAlertNotesRequest ¶
type ListAlertNotesRequest struct {
APIKey string `url:"apiKey,omitempty"`
ID string `url:"id,omitempty"`
Alias string `url:"alias,omitempty"`
Limit uint64 `url:"limit,omitempty"`
Order string `url:"order,omitempty"`
LastKey string `url:"lastKey,omitempty"`
}
ListAlertNotesRequest provides necessary parameter structure to Retrieve notes of an alert from OpsGenie.
type ListAlertNotesResponse ¶
type ListAlertNotesResponse struct {
Took int `json:"took"`
LastKey string `json:"lastKey"`
Notes []struct {
Note string `json:"note"`
Owner string `json:"owner"`
CreatedAt uint64 `json:"createdAt"`
} `json:"notes"`
}
ListAlertNotesResponse holds the result data of the ListAlertNotesRequest
type ListAlertRecipientsRequest ¶
type ListAlertRecipientsRequest struct {
APIKey string `url:"apiKey,omitempty"`
ID string `url:"id,omitempty"`
Alias string `url:"alias,omitempty"`
}
ListAlertRecipientsRequest provides necessary parameter structure to Retrieve recipients of an alert from OpsGenie.
type ListAlertRecipientsResponse ¶
type ListAlertRecipientsResponse struct {
Users []struct {
Username string `json:"username"`
State string `json:"state"`
Method string `json:"method"`
StateChangedAt uint64 `json:"stateChangedAt"`
} `json:"users"`
Groups map[string][]struct {
Username string `json:"username"`
State string `json:"state"`
Method string `json:"method"`
StateChangedAt uint64 `json:"stateChangedAt"`
} `json:"groups"`
}
ListAlertRecipientsResponse holds the result data of the ListAlertRecipientsRequest.
type ListAlertsRequest ¶
type ListAlertsRequest struct {
APIKey string `url:"apiKey,omitempty"`
CreatedAfter uint64 `url:"createdAfter,omitempty"`
CreatedBefore uint64 `url:"createdBefore,omitempty"`
UpdatedAfter uint64 `url:"updatedAfter,omitempty"`
UpdatedBefore uint64 `url:"updatedBefore,omitempty"`
Limit uint64 `url:"limit,omitempty"`
Status string `url:"status,omitempty"`
SortBy string `url:"sortBy,omitempty"`
Order string `url:"order,omitempty"`
Teams []string `url:"teams,omitempty"`
Tags []string `url:"tags,omitempty"`
TagsOperator string `url:"tagsOperator,omitempty"`
}
ListAlertsRequest provides necessary parameter structure to Retrieve alerts from OpsGenie.
type ListAlertsResponse ¶
type ListAlertsResponse struct {
Alerts []struct {
ID string `json:"id"`
Alias string `json:"alias"`
Message string `json:"message"`
Status string `json:"status"`
IsSeen bool `json:"isSeen"`
Acknowledged bool `json:"acknowledged"`
CreatedAt uint64 `json:"createdAt"`
UpdatedAt uint64 `json:"updatedAt"`
TinyID string `json:"tinyId"`
Owner string `json:"owner"`
} `json:"alerts"`
}
ListAlertsResponse holds the result data of the ListAlertsRequest
type RemoveDetailsAlertRequest ¶
type RemoveDetailsAlertRequest struct {
APIKey string `url:"apiKey,omitempty"`
ID string `url:"id,omitempty"`
Alias string `url:"alias,omitempty"`
Keys []string `url:"keys,omitempty"`
User string `url:"user,omitempty"`
Note string `url:"note,omitempty"`
Source string `url:"source,omitempty"`
}
RemoveDetailsAlertRequest provides necessary parameter structure to Remove Details from an alert at OpsGenie.
type RemoveDetailsAlertResponse ¶
RemoveDetailsAlertResponse holds the result data of the RemoveDetailsAlertRequest
type RemoveTagsAlertRequest ¶
type RemoveTagsAlertRequest struct {
APIKey string `url:"apiKey,omitempty"`
ID string `url:"id,omitempty"`
Alias string `url:"alias,omitempty"`
Tags []string `url:"tags,omitempty"`
User string `url:"user,omitempty"`
Note string `url:"note,omitempty"`
Source string `url:"source,omitempty"`
}
RemoveTagsAlertRequest provides necessary parameter structure to Remove Tags from an alert at OpsGenie.
type RemoveTagsAlertResponse ¶
RemoveTagsAlertResponse holds the result data of the RemoveTagsAlertRequest
type RenotifyAlertRequest ¶
type RenotifyAlertRequest struct {
APIKey string `json:"apiKey,omitempty"`
ID string `json:"id,omitempty"`
Alias string `json:"alias,omitempty"`
Recipients []string `json:"recipients,omitempty"`
User string `json:"user,omitempty"`
Note string `json:"note,omitempty"`
Source string `json:"source,omitempty"`
}
RenotifyAlertRequest provides necessary parameter structure to Re-notify recipients at OpsGenie.
type RenotifyAlertResponse ¶
RenotifyAlertResponse holds the result data of the RenotifyAlertRequest.
type SnoozeAlertRequest ¶
type SnoozeAlertRequest struct {
APIKey string `json:"apiKey,omitempty"`
ID string `json:"id,omitempty"`
Alias string `json:"alias,omitempty"`
EndDate string `json:"endDate,omitempty"`
User string `json:"user,omitempty"`
Note string `json:"note,omitempty"`
Source string `json:"source,omitempty"`
TimeZone string `json:"timezone,omitempty"`
}
SnoozeAlertRequest provides necessary parameter structure to Snooze an alert at OpsGenie.
type SnoozeAlertResponse ¶
SnoozeAlertResponse holds the result data of the SnoozeAlertRequest
type TakeOwnershipAlertRequest ¶
type TakeOwnershipAlertRequest struct {
APIKey string `json:"apiKey,omitempty"`
ID string `json:"id,omitempty"`
Alias string `json:"alias,omitempty"`
User string `json:"user,omitempty"`
Note string `json:"note,omitempty"`
Source string `json:"source,omitempty"`
}
TakeOwnershipAlertRequest provides necessary parameter structure to Become the Owner of an alert at OpsGenie.
type TakeOwnershipAlertResponse ¶
TakeOwnershipAlertResponse holds the result data of the TakeOwnershipAlertRequest.
type UnAcknowledgeAlertRequest ¶
type UnAcknowledgeAlertRequest struct {
APIKey string `json:"apiKey,omitempty"`
ID string `json:"id,omitempty"`
Alias string `json:"alias,omitempty"`
User string `json:"user,omitempty"`
Note string `json:"note,omitempty"`
Source string `json:"source,omitempty"`
}
UnAcknowledgeAlertRequest provides necessary parameter structure to Unacknowledge an alert at OpsGenie.
type UnAcknowledgeAlertResponse ¶
type UnAcknowledgeAlertResponse struct {
Status string `json:"status"`
Code int `json:"code"`
Took int `json:"took"`
}
UnAcknowledgeAlertResponse holds the result data of the UnAcknowledgeAlertRequest