alert

package
v1.2.22 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 18, 2023 License: Apache-2.0 Imports: 11 Imported by: 43

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidatePriority

func ValidatePriority(priority Priority) error

Types

type AcknowledgeAlertRequest

type AcknowledgeAlertRequest struct {
	client.BaseRequest
	IdentifierType  AlertIdentifier
	IdentifierValue string
	User            string `json:"user,omitempty"`
	Source          string `json:"source,omitempty"`
	Note            string `json:"note,omitempty"`
}

func (*AcknowledgeAlertRequest) Method

func (r *AcknowledgeAlertRequest) Method() string

func (*AcknowledgeAlertRequest) RequestParams

func (r *AcknowledgeAlertRequest) RequestParams() map[string]string

func (*AcknowledgeAlertRequest) ResourcePath

func (r *AcknowledgeAlertRequest) ResourcePath() string

func (*AcknowledgeAlertRequest) Validate

func (r *AcknowledgeAlertRequest) Validate() error

type AddDetailsRequest

type AddDetailsRequest struct {
	client.BaseRequest
	IdentifierType  AlertIdentifier
	IdentifierValue string
	Details         map[string]string `json:"details,omitempty"`
	User            string            `json:"user,omitempty"`
	Source          string            `json:"source,omitempty"`
	Note            string            `json:"note,omitempty"`
}

func (*AddDetailsRequest) Method

func (r *AddDetailsRequest) Method() string

func (*AddDetailsRequest) RequestParams

func (r *AddDetailsRequest) RequestParams() map[string]string

func (*AddDetailsRequest) ResourcePath

func (r *AddDetailsRequest) ResourcePath() string

func (*AddDetailsRequest) Validate

func (r *AddDetailsRequest) Validate() error

type AddNoteRequest

type AddNoteRequest struct {
	client.BaseRequest
	IdentifierType  AlertIdentifier
	IdentifierValue string
	User            string `json:"user,omitempty"`
	Source          string `json:"source,omitempty"`
	Note            string `json:"note,omitempty"`
}

func (*AddNoteRequest) Method

func (r *AddNoteRequest) Method() string

func (*AddNoteRequest) RequestParams

func (r *AddNoteRequest) RequestParams() map[string]string

func (*AddNoteRequest) ResourcePath

func (r *AddNoteRequest) ResourcePath() string

func (*AddNoteRequest) Validate

func (r *AddNoteRequest) Validate() error

type AddResponderRequest

type AddResponderRequest struct {
	client.BaseRequest
	IdentifierType  AlertIdentifier
	IdentifierValue string
	Responder       Responder `json:"responder,omitempty"`
	User            string    `json:"user,omitempty"`
	Source          string    `json:"source,omitempty"`
	Note            string    `json:"note,omitempty"`
}

func (*AddResponderRequest) Method

func (r *AddResponderRequest) Method() string

func (*AddResponderRequest) RequestParams

func (r *AddResponderRequest) RequestParams() map[string]string

func (*AddResponderRequest) ResourcePath

func (r *AddResponderRequest) ResourcePath() string

func (*AddResponderRequest) Validate

func (r *AddResponderRequest) Validate() error

type AddTagsRequest

type AddTagsRequest struct {
	client.BaseRequest
	IdentifierType  AlertIdentifier
	IdentifierValue string
	Tags            []string `json:"tags,omitempty"`
	User            string   `json:"user,omitempty"`
	Source          string   `json:"source,omitempty"`
	Note            string   `json:"note,omitempty"`
}

func (*AddTagsRequest) Method

func (r *AddTagsRequest) Method() string

func (*AddTagsRequest) RequestParams

func (r *AddTagsRequest) RequestParams() map[string]string

func (*AddTagsRequest) ResourcePath

func (r *AddTagsRequest) ResourcePath() string

func (*AddTagsRequest) Validate

func (r *AddTagsRequest) Validate() error

type AddTeamRequest

type AddTeamRequest struct {
	client.BaseRequest
	IdentifierType  AlertIdentifier
	IdentifierValue string
	Team            Team   `json:"team,omitempty"`
	User            string `json:"user,omitempty"`
	Source          string `json:"source,omitempty"`
	Note            string `json:"note,omitempty"`
}

func (*AddTeamRequest) Method

func (r *AddTeamRequest) Method() string

func (*AddTeamRequest) RequestParams

func (r *AddTeamRequest) RequestParams() map[string]string

func (*AddTeamRequest) ResourcePath

func (r *AddTeamRequest) ResourcePath() string

func (*AddTeamRequest) Validate

func (r *AddTeamRequest) Validate() error

type Alert

type Alert struct {
	Seen           bool        `json:"seen,omitempty"`
	Id             string      `json:"id,omitempty"`
	TinyID         string      `json:"tinyId,omitempty"`
	Alias          string      `json:"alias,omitempty"`
	Message        string      `json:"message,omitempty"`
	Status         string      `json:"status,omitempty"`
	Acknowledged   bool        `json:"acknowledged,omitempty"`
	IsSeen         bool        `json:"isSeen,omitempty"`
	Tags           []string    `json:"tags,omitempty"`
	Snoozed        bool        `json:"snoozed,omitempty"`
	SnoozedUntil   time.Time   `json:"snoozedUntil,omitempty"`
	Count          int         `json:"count,omitempty"`
	LastOccurredAt time.Time   `json:"lastOccurredAt,omitempty"`
	CreatedAt      time.Time   `json:"createdAt,omitempty"`
	UpdatedAt      time.Time   `json:"updatedAt,omitempty"`
	Source         string      `json:"source,omitempty"`
	Owner          string      `json:"owner,omitempty"`
	Priority       Priority    `json:"priority,omitempty"`
	Responders     []Responder `json:"responders"`
	Integration    Integration `json:"integration,omitempty"`
	Report         Report      `json:"report,omitempty"`
	OwnerTeamID    string      `json:"ownerTeamId,omitempty"`
}

type AlertIdentifier

type AlertIdentifier uint32
const (
	ALERTID AlertIdentifier = iota
	ALIAS
	TINYID
)

type AlertLog

type AlertLog struct {
	Log       string    `json:"log,omitempty"`
	Type      string    `json:"type,omitempty"`
	Owner     string    `json:"owner,omitempty"`
	CreatedAt time.Time `json:"createdAt,omitempty"`
	Offset    string    `json:"offset,omitempty"`
}

type AlertNote

type AlertNote struct {
	Note      string    `json:"note,omitempty"`
	Owner     string    `json:"owner,omitempty"`
	CreatedAt time.Time `json:"createdAt,omitempty"`
	Offset    string    `json:"offset,omitempty"`
}

type AlertRecipient

type AlertRecipient struct {
	User      User      `json:"user,omitempty"`
	CreatedAt time.Time `json:"createdAt,omitempty"`
	UpdatedAt time.Time `json:"updatedAt,omitempty"`
	State     string    `json:"state,omitempty"`
	Method    string    `json:"method,omitempty"`
}

type AssignRequest

type AssignRequest struct {
	client.BaseRequest
	IdentifierType  AlertIdentifier
	IdentifierValue string
	Owner           User   `json:"owner,omitempty"`
	User            string `json:"user,omitempty"`
	Source          string `json:"source,omitempty"`
	Note            string `json:"note,omitempty"`
}

func (*AssignRequest) Method

func (r *AssignRequest) Method() string

func (*AssignRequest) RequestParams

func (r *AssignRequest) RequestParams() map[string]string

func (*AssignRequest) ResourcePath

func (r *AssignRequest) ResourcePath() string

func (*AssignRequest) Validate

func (r *AssignRequest) Validate() error

type AsyncAlertResult

type AsyncAlertResult struct {
	client.ResultMetadata
	Result string `json:"result,omitempty"`
	// contains filtered or unexported fields
}

func (*AsyncAlertResult) RetrieveStatus

func (ar *AsyncAlertResult) RetrieveStatus(ctx context.Context) (*RequestStatusResult, error)

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(config *client.Config) (*Client, error)

func (*Client) Acknowledge

func (c *Client) Acknowledge(ctx context.Context, req *AcknowledgeAlertRequest) (*AsyncAlertResult, error)

func (*Client) AddDetails

func (c *Client) AddDetails(ctx context.Context, req *AddDetailsRequest) (*AsyncAlertResult, error)

func (*Client) AddNote

func (c *Client) AddNote(ctx context.Context, req *AddNoteRequest) (*AsyncAlertResult, error)

func (*Client) AddResponder

func (c *Client) AddResponder(ctx context.Context, req *AddResponderRequest) (*AsyncAlertResult, error)

func (*Client) AddTags

func (c *Client) AddTags(ctx context.Context, req *AddTagsRequest) (*AsyncAlertResult, error)

func (*Client) AddTeam

func (c *Client) AddTeam(ctx context.Context, req *AddTeamRequest) (*AsyncAlertResult, error)

func (*Client) AssignAlert

func (c *Client) AssignAlert(ctx context.Context, req *AssignRequest) (*AsyncAlertResult, error)

func (*Client) Close

func (*Client) CountAlerts

func (c *Client) CountAlerts(ctx context.Context, req *CountAlertsRequest) (*CountAlertResult, error)

func (*Client) Create

func (*Client) CreateAlertAttachments

func (c *Client) CreateAlertAttachments(ctx context.Context, req *CreateAlertAttachmentRequest) (*CreateAlertAttachmentsResult, error)

func (*Client) CreateSavedSearch

func (c *Client) CreateSavedSearch(ctx context.Context, req *CreateSavedSearchRequest) (*SavedSearchResult, error)

func (*Client) Delete

func (*Client) DeleteAlertAttachment

func (c *Client) DeleteAlertAttachment(ctx context.Context, req *DeleteAttachmentRequest) (*DeleteAlertAttachmentResult, error)

func (*Client) DeleteSavedSearch

func (c *Client) DeleteSavedSearch(ctx context.Context, req *DeleteSavedSearchRequest) (*AsyncAlertResult, error)

func (*Client) EscalateToNext

func (c *Client) EscalateToNext(ctx context.Context, req *EscalateToNextRequest) (*AsyncAlertResult, error)

func (*Client) ExecuteCustomAction

func (c *Client) ExecuteCustomAction(ctx context.Context, req *ExecuteCustomActionAlertRequest) (*AsyncAlertResult, error)

func (*Client) Get

func (c *Client) Get(ctx context.Context, req *GetAlertRequest) (*GetAlertResult, error)

func (*Client) GetAlertAttachment

func (c *Client) GetAlertAttachment(ctx context.Context, req *GetAttachmentRequest) (*GetAttachmentResult, error)

func (*Client) GetRequestStatus

func (c *Client) GetRequestStatus(ctx context.Context, req *GetRequestStatusRequest) (*RequestStatusResult, error)

func (*Client) GetSavedSearch

func (c *Client) GetSavedSearch(ctx context.Context, req *GetSavedSearchRequest) (*GetSavedSearchResult, error)

func (*Client) List

func (*Client) ListAlertLogs

func (c *Client) ListAlertLogs(ctx context.Context, req *ListAlertLogsRequest) (*ListAlertLogsResult, error)

func (*Client) ListAlertNotes

func (c *Client) ListAlertNotes(ctx context.Context, req *ListAlertNotesRequest) (*ListAlertNotesResult, error)

func (*Client) ListAlertRecipients

func (c *Client) ListAlertRecipients(ctx context.Context, req *ListAlertRecipientRequest) (*ListAlertRecipientResult, error)

func (*Client) ListAlertsAttachments

func (c *Client) ListAlertsAttachments(ctx context.Context, req *ListAttachmentsRequest) (*ListAttachmentsResult, error)

func (*Client) ListSavedSearches

func (c *Client) ListSavedSearches(ctx context.Context, req *ListSavedSearchRequest) (*SavedSearchResult, error)

func (*Client) RemoveDetails

func (c *Client) RemoveDetails(ctx context.Context, req *RemoveDetailsRequest) (*AsyncAlertResult, error)

func (*Client) RemoveTags

func (c *Client) RemoveTags(ctx context.Context, req *RemoveTagsRequest) (*AsyncAlertResult, error)

func (*Client) Snooze

func (*Client) Unacknowledge

func (c *Client) Unacknowledge(ctx context.Context, req *UnacknowledgeAlertRequest) (*AsyncAlertResult, error)

func (*Client) UpdateDescription

func (c *Client) UpdateDescription(ctx context.Context, req *UpdateDescriptionRequest) (*AsyncAlertResult, error)

func (*Client) UpdateMessage

func (c *Client) UpdateMessage(ctx context.Context, req *UpdateMessageRequest) (*AsyncAlertResult, error)

func (*Client) UpdatePriority

func (c *Client) UpdatePriority(ctx context.Context, req *UpdatePriorityRequest) (*AsyncAlertResult, error)

func (*Client) UpdateSavedSearch

func (c *Client) UpdateSavedSearch(ctx context.Context, req *UpdateSavedSearchRequest) (*SavedSearchResult, error)

type CloseAlertRequest

type CloseAlertRequest struct {
	client.BaseRequest
	IdentifierType  AlertIdentifier
	IdentifierValue string
	User            string `json:"user,omitempty"`
	Source          string `json:"source,omitempty"`
	Note            string `json:"note,omitempty"`
}

func (*CloseAlertRequest) Method

func (r *CloseAlertRequest) Method() string

func (*CloseAlertRequest) RequestParams

func (r *CloseAlertRequest) RequestParams() map[string]string

func (*CloseAlertRequest) ResourcePath

func (r *CloseAlertRequest) ResourcePath() string

func (*CloseAlertRequest) Validate

func (r *CloseAlertRequest) Validate() error

type CountAlertResult

type CountAlertResult struct {
	client.ResultMetadata
	Count int `json:"count,omitempty"`
}

type CountAlertsRequest

type CountAlertsRequest struct {
	client.BaseRequest
	Query                string
	SearchIdentifier     string
	SearchIdentifierType SearchIdentifierType
}

func (*CountAlertsRequest) Method

func (r *CountAlertsRequest) Method() string

func (*CountAlertsRequest) RequestParams

func (r *CountAlertsRequest) RequestParams() map[string]string

func (*CountAlertsRequest) ResourcePath

func (r *CountAlertsRequest) ResourcePath() string

func (*CountAlertsRequest) Validate

func (r *CountAlertsRequest) Validate() error

type CreateAlertAttachmentRequest

type CreateAlertAttachmentRequest struct {
	client.BaseRequest
	IdentifierType  AlertIdentifier
	IdentifierValue string
	FileName        string
	FilePath        string
	User            string
	IndexFile       string
}

func (*CreateAlertAttachmentRequest) Metadata

func (r *CreateAlertAttachmentRequest) Metadata(ar client.ApiRequest) map[string]interface{}

func (*CreateAlertAttachmentRequest) Method

func (*CreateAlertAttachmentRequest) RequestParams

func (r *CreateAlertAttachmentRequest) RequestParams() map[string]string

func (*CreateAlertAttachmentRequest) ResourcePath

func (r *CreateAlertAttachmentRequest) ResourcePath() string

func (*CreateAlertAttachmentRequest) Validate

func (r *CreateAlertAttachmentRequest) Validate() error

type CreateAlertAttachmentsResult

type CreateAlertAttachmentsResult struct {
	client.ResultMetadata
	Result     string            `json:"result,omitempty"`
	Attachment CreatedAttachment `json:"data,omitempty"`
}

type CreateAlertRequest

type CreateAlertRequest struct {
	client.BaseRequest
	Message     string            `json:"message"`
	Alias       string            `json:"alias,omitempty"`
	Description string            `json:"description,omitempty"`
	Responders  []Responder       `json:"responders,omitempty"`
	VisibleTo   []Responder       `json:"visibleTo,omitempty"`
	Actions     []string          `json:"actions,omitempty"`
	Tags        []string          `json:"tags,omitempty"`
	Details     map[string]string `json:"details,omitempty"`
	Entity      string            `json:"entity,omitempty"`
	Source      string            `json:"source,omitempty"`
	Priority    Priority          `json:"priority,omitempty"`
	User        string            `json:"user,omitempty"`
	Note        string            `json:"note,omitempty"`
}

func (*CreateAlertRequest) Method

func (r *CreateAlertRequest) Method() string

func (*CreateAlertRequest) ResourcePath

func (r *CreateAlertRequest) ResourcePath() string

func (*CreateAlertRequest) Validate

func (r *CreateAlertRequest) Validate() error

type CreateSavedSearchRequest

type CreateSavedSearchRequest struct {
	client.BaseRequest
	Name        string `json:"name,omitempty"`
	Query       string `json:"query,omitempty"`
	Owner       User   `json:"owner,omitempty"`
	Description string `json:"description,omitempty"`
	Teams       []Team `json:"teams,omitempty"`
}

func (*CreateSavedSearchRequest) Method

func (r *CreateSavedSearchRequest) Method() string

func (*CreateSavedSearchRequest) ResourcePath

func (r *CreateSavedSearchRequest) ResourcePath() string

func (*CreateSavedSearchRequest) Validate

func (r *CreateSavedSearchRequest) Validate() error

type CreatedAttachment

type CreatedAttachment struct {
	Id string `json:"id,omitempty"`
}

type DeleteAlertAttachmentResult

type DeleteAlertAttachmentResult struct {
	client.ResultMetadata
	Result string `json:"result,omitempty"`
}

type DeleteAlertRequest

type DeleteAlertRequest struct {
	client.BaseRequest
	IdentifierType  AlertIdentifier
	IdentifierValue string
	Source          string
}

func (*DeleteAlertRequest) Method

func (r *DeleteAlertRequest) Method() string

func (*DeleteAlertRequest) RequestParams

func (r *DeleteAlertRequest) RequestParams() map[string]string

func (*DeleteAlertRequest) ResourcePath

func (r *DeleteAlertRequest) ResourcePath() string

func (*DeleteAlertRequest) Validate

func (r *DeleteAlertRequest) Validate() error

type DeleteAttachmentRequest

type DeleteAttachmentRequest struct {
	client.BaseRequest
	IdentifierType  AlertIdentifier
	IdentifierValue string
	AttachmentId    string
	User            string
}

func (*DeleteAttachmentRequest) Method

func (r *DeleteAttachmentRequest) Method() string

func (*DeleteAttachmentRequest) RequestParams

func (r *DeleteAttachmentRequest) RequestParams() map[string]string

func (*DeleteAttachmentRequest) ResourcePath

func (r *DeleteAttachmentRequest) ResourcePath() string

func (*DeleteAttachmentRequest) Validate

func (r *DeleteAttachmentRequest) Validate() error

type DeleteSavedSearchRequest

type DeleteSavedSearchRequest struct {
	client.BaseRequest
	IdentifierType  SearchIdentifierType
	IdentifierValue string
}

func (*DeleteSavedSearchRequest) Method

func (r *DeleteSavedSearchRequest) Method() string

func (*DeleteSavedSearchRequest) RequestParams

func (r *DeleteSavedSearchRequest) RequestParams() map[string]string

func (*DeleteSavedSearchRequest) ResourcePath

func (r *DeleteSavedSearchRequest) ResourcePath() string

func (*DeleteSavedSearchRequest) Validate

func (r *DeleteSavedSearchRequest) Validate() error

type EscalateToNextRequest

type EscalateToNextRequest struct {
	client.BaseRequest
	IdentifierType  AlertIdentifier
	IdentifierValue string
	Escalation      Escalation `json:"escalation,omitempty"`
	User            string     `json:"user,omitempty"`
	Source          string     `json:"source,omitempty"`
	Note            string     `json:"note,omitempty"`
}

func (*EscalateToNextRequest) Method

func (r *EscalateToNextRequest) Method() string

func (*EscalateToNextRequest) RequestParams

func (r *EscalateToNextRequest) RequestParams() map[string]string

func (*EscalateToNextRequest) ResourcePath

func (r *EscalateToNextRequest) ResourcePath() string

func (*EscalateToNextRequest) Validate

func (r *EscalateToNextRequest) Validate() error

type Escalation

type Escalation struct {
	ID   string `json:"id,omitempty"`
	Name string `json:"name,omitempty"`
}

type ExecuteCustomActionAlertRequest

type ExecuteCustomActionAlertRequest struct {
	client.BaseRequest
	IdentifierType  AlertIdentifier
	IdentifierValue string
	Action          string
	User            string `json:"user,omitempty"`
	Source          string `json:"source,omitempty"`
	Note            string `json:"note,omitempty"`
}

func (*ExecuteCustomActionAlertRequest) Method

func (*ExecuteCustomActionAlertRequest) RequestParams

func (r *ExecuteCustomActionAlertRequest) RequestParams() map[string]string

func (*ExecuteCustomActionAlertRequest) ResourcePath

func (r *ExecuteCustomActionAlertRequest) ResourcePath() string

func (*ExecuteCustomActionAlertRequest) Validate

func (r *ExecuteCustomActionAlertRequest) Validate() error

type GetAlertRequest

type GetAlertRequest struct {
	client.BaseRequest
	IdentifierType  AlertIdentifier
	IdentifierValue string
}

func (*GetAlertRequest) Method

func (r *GetAlertRequest) Method() string

func (*GetAlertRequest) RequestParams

func (r *GetAlertRequest) RequestParams() map[string]string

func (*GetAlertRequest) ResourcePath

func (r *GetAlertRequest) ResourcePath() string

func (*GetAlertRequest) Validate

func (r *GetAlertRequest) Validate() error

type GetAlertResult

type GetAlertResult struct {
	client.ResultMetadata
	Id             string            `json:"id,omitempty"`
	TinyId         string            `json:"tinyId,omitempty"`
	Alias          string            `json:"alias,omitempty"`
	Message        string            `json:"message,omitempty"`
	Status         string            `json:"status,omitempty"`
	Acknowledged   bool              `json:"acknowledged,omitempty"`
	IsSeen         bool              `json:"isSeen,omitempty"`
	Tags           []string          `json:"tags,omitempty"`
	Snoozed        bool              `json:"snoozed,omitempty"`
	SnoozedUntil   time.Time         `json:"snoozedUntil,omitempty"`
	Count          int               `json:"count,omitempty"`
	LastOccurredAt time.Time         `json:"lastOccurredAt,omitempty"`
	CreatedAt      time.Time         `json:"createdAt,omitempty"`
	UpdatedAt      time.Time         `json:"updatedAt,omitempty"`
	Source         string            `json:"source,omitempty"`
	Owner          string            `json:"owner,omitempty"`
	Priority       Priority          `json:"priority,omitempty"`
	Responders     []Responder       `json:"responders,omitempty"`
	Integration    Integration       `json:"integration,omitempty"`
	Report         Report            `json:"report,omitempty"`
	Actions        []string          `json:"actions,omitempty"`
	Entity         string            `json:"entity,omitempty"`
	Description    string            `json:"description,omitempty"`
	Details        map[string]string `json:"details,omitempty"`
}

type GetAttachmentRequest

type GetAttachmentRequest struct {
	client.BaseRequest
	IdentifierType  AlertIdentifier
	IdentifierValue string
	AttachmentId    string
}

func (*GetAttachmentRequest) Method

func (r *GetAttachmentRequest) Method() string

func (*GetAttachmentRequest) RequestParams

func (r *GetAttachmentRequest) RequestParams() map[string]string

func (*GetAttachmentRequest) ResourcePath

func (r *GetAttachmentRequest) ResourcePath() string

func (*GetAttachmentRequest) Validate

func (r *GetAttachmentRequest) Validate() error

type GetAttachmentResult

type GetAttachmentResult struct {
	client.ResultMetadata
	Name string `json:"name,omitempty"`
	Url  string `json:"url,omitempty"`
}

type GetRequestStatusRequest

type GetRequestStatusRequest struct {
	client.BaseRequest
	RequestId string `json:"requestId,omitempty"`
}

func (*GetRequestStatusRequest) Method

func (r *GetRequestStatusRequest) Method() string

func (*GetRequestStatusRequest) ResourcePath

func (r *GetRequestStatusRequest) ResourcePath() string

func (*GetRequestStatusRequest) Validate

func (r *GetRequestStatusRequest) Validate() error

type GetSavedSearchRequest

type GetSavedSearchRequest struct {
	client.BaseRequest
	IdentifierType  SearchIdentifierType
	IdentifierValue string
}

func (*GetSavedSearchRequest) Method

func (r *GetSavedSearchRequest) Method() string

func (*GetSavedSearchRequest) RequestParams

func (r *GetSavedSearchRequest) RequestParams() map[string]string

func (*GetSavedSearchRequest) ResourcePath

func (r *GetSavedSearchRequest) ResourcePath() string

func (*GetSavedSearchRequest) Validate

func (r *GetSavedSearchRequest) Validate() error

type GetSavedSearchResult

type GetSavedSearchResult struct {
	client.ResultMetadata
	Id          string    `json:"id,omitempty"`
	Name        string    `json:"name,omitempty"`
	CreatedAt   time.Time `json:"createdAt,omitempty"`
	UpdatedAt   time.Time `json:"updatedAt,omitempty"`
	Teams       []Team    `json:"teams,omitempty"`
	Description string    `json:"description,omitempty"`
	Query       string    `json:"query,omitempty"`
}

type Integration

type Integration struct {
	Id   string `json:"id,omitempty"`
	Name string `json:"name,omitempty"`
	Type string `json:"type,omitempty"`
}

type ListAlertLogsRequest

type ListAlertLogsRequest struct {
	client.BaseRequest
	IdentifierType  AlertIdentifier
	IdentifierValue string
	Offset          string
	Direction       RequestDirection
	Order           Order
	Limit           uint32
}

func (*ListAlertLogsRequest) Method

func (r *ListAlertLogsRequest) Method() string

func (*ListAlertLogsRequest) RequestParams

func (r *ListAlertLogsRequest) RequestParams() map[string]string

func (*ListAlertLogsRequest) ResourcePath

func (r *ListAlertLogsRequest) ResourcePath() string

func (*ListAlertLogsRequest) Validate

func (r *ListAlertLogsRequest) Validate() error

type ListAlertLogsResult

type ListAlertLogsResult struct {
	client.ResultMetadata
	AlertLog []AlertLog        `json:"data"`
	Paging   map[string]string `json:"paging,omitempty"`
}

type ListAlertNotesRequest

type ListAlertNotesRequest struct {
	client.BaseRequest
	IdentifierType  AlertIdentifier
	IdentifierValue string
	Offset          string
	Direction       RequestDirection
	Order           Order
	Limit           uint32
}

func (*ListAlertNotesRequest) Method

func (r *ListAlertNotesRequest) Method() string

func (*ListAlertNotesRequest) RequestParams

func (r *ListAlertNotesRequest) RequestParams() map[string]string

func (*ListAlertNotesRequest) ResourcePath

func (r *ListAlertNotesRequest) ResourcePath() string

func (*ListAlertNotesRequest) Validate

func (r *ListAlertNotesRequest) Validate() error

type ListAlertNotesResult

type ListAlertNotesResult struct {
	client.ResultMetadata
	AlertLog []AlertNote       `json:"data"`
	Paging   map[string]string `json:"paging,omitempty"`
}

type ListAlertRecipientRequest

type ListAlertRecipientRequest struct {
	client.BaseRequest
	IdentifierType  AlertIdentifier
	IdentifierValue string
}

func (*ListAlertRecipientRequest) Method

func (r *ListAlertRecipientRequest) Method() string

func (*ListAlertRecipientRequest) RequestParams

func (r *ListAlertRecipientRequest) RequestParams() map[string]string

func (*ListAlertRecipientRequest) ResourcePath

func (r *ListAlertRecipientRequest) ResourcePath() string

func (*ListAlertRecipientRequest) Validate

func (r *ListAlertRecipientRequest) Validate() error

type ListAlertRecipientResult

type ListAlertRecipientResult struct {
	client.ResultMetadata
	AlertRecipients []AlertRecipient `json:"data"`
}

type ListAlertRequest

type ListAlertRequest struct {
	client.BaseRequest
	Limit                int
	Sort                 SortField
	Offset               int
	Order                Order
	Query                string
	SearchIdentifier     string
	SearchIdentifierType SearchIdentifierType
}

func (*ListAlertRequest) Method

func (r *ListAlertRequest) Method() string

func (*ListAlertRequest) RequestParams

func (r *ListAlertRequest) RequestParams() map[string]string

func (*ListAlertRequest) ResourcePath

func (r *ListAlertRequest) ResourcePath() string

func (*ListAlertRequest) Validate

func (r *ListAlertRequest) Validate() error

type ListAlertResult

type ListAlertResult struct {
	client.ResultMetadata
	Alerts []Alert `json:"data"`
}

type ListAttachmentsRequest

type ListAttachmentsRequest struct {
	client.BaseRequest
	IdentifierType  AlertIdentifier
	IdentifierValue string
}

func (*ListAttachmentsRequest) Method

func (r *ListAttachmentsRequest) Method() string

func (*ListAttachmentsRequest) RequestParams

func (r *ListAttachmentsRequest) RequestParams() map[string]string

func (*ListAttachmentsRequest) ResourcePath

func (r *ListAttachmentsRequest) ResourcePath() string

func (*ListAttachmentsRequest) Validate

func (r *ListAttachmentsRequest) Validate() error

type ListAttachmentsResult

type ListAttachmentsResult struct {
	client.ResultMetadata
	Attachment []ListedAttachment `json:"data"`
}

type ListSavedSearchRequest

type ListSavedSearchRequest struct {
	client.BaseRequest
}

func (*ListSavedSearchRequest) Method

func (r *ListSavedSearchRequest) Method() string

func (*ListSavedSearchRequest) ResourcePath

func (r *ListSavedSearchRequest) ResourcePath() string

func (*ListSavedSearchRequest) Validate

func (r *ListSavedSearchRequest) Validate() error

type ListedAttachment

type ListedAttachment struct {
	Id   int64  `json:"id,omitempty"`
	Name string `json:"name,omitempty"`
}

type Order

type Order string
const (
	Asc  Order = "asc"
	Desc Order = "desc"
)

type Priority

type Priority string
const (
	P1 Priority = "P1"
	P2 Priority = "P2"
	P3 Priority = "P3"
	P4 Priority = "P4"
	P5 Priority = "P5"
)

type RemoveDetailsRequest

type RemoveDetailsRequest struct {
	client.BaseRequest
	IdentifierType  AlertIdentifier
	IdentifierValue string
	Keys            string
	Source          string
	User            string
	Note            string
}

func (*RemoveDetailsRequest) Method

func (r *RemoveDetailsRequest) Method() string

func (*RemoveDetailsRequest) RequestParams

func (r *RemoveDetailsRequest) RequestParams() map[string]string

func (*RemoveDetailsRequest) ResourcePath

func (r *RemoveDetailsRequest) ResourcePath() string

func (*RemoveDetailsRequest) Validate

func (r *RemoveDetailsRequest) Validate() error

type RemoveTagsRequest

type RemoveTagsRequest struct {
	client.BaseRequest
	IdentifierType  AlertIdentifier
	IdentifierValue string
	Tags            string
	Source          string
	User            string
	Note            string
}

func (*RemoveTagsRequest) Method

func (r *RemoveTagsRequest) Method() string

func (*RemoveTagsRequest) RequestParams

func (r *RemoveTagsRequest) RequestParams() map[string]string

func (*RemoveTagsRequest) ResourcePath

func (r *RemoveTagsRequest) ResourcePath() string

func (*RemoveTagsRequest) Validate

func (r *RemoveTagsRequest) Validate() error

type Report

type Report struct {
	AckTime        int64  `json:"ackTime,omitempty"`
	CloseTime      int64  `json:"closeTime,omitempty"`
	AcknowledgedBy string `json:"acknowledgedBy,omitempty"`
	ClosedBy       string `json:"closedBy,omitempty"`
}

type RequestDirection

type RequestDirection string
const (
	NEXT RequestDirection = "next"
	PREV RequestDirection = "prev"
)

type RequestStatusResult

type RequestStatusResult struct {
	client.ResultMetadata
	IsSuccess     bool      `json:"isSuccess,omitempty"`
	Action        string    `json:"action,omitempty"`
	ProcessedAt   time.Time `json:"processedAt,omitempty"`
	IntegrationId string    `json:"integrationId,omitempty"`
	Status        string    `json:"status,omitempty"`
	AlertID       string    `json:"alertId,omitempty"`
	Alias         string    `json:"alias,omitempty"`
}

type Responder

type Responder struct {
	Type     ResponderType `json:"type, omitempty"`
	Name     string        `json:"name,omitempty"`
	Id       string        `json:"id,omitempty"`
	Username string        `json:"username, omitempty"`
}

type ResponderType

type ResponderType string
const (
	UserResponder       ResponderType = "user"
	TeamResponder       ResponderType = "team"
	EscalationResponder ResponderType = "escalation"
	ScheduleResponder   ResponderType = "schedule"
)

type SavedSearchResult

type SavedSearchResult struct {
	client.ResultMetadata
	Id   string `json:"id,omitempty"`
	Name string `json:"name,omitempty"`
}

type Schedule

type Schedule struct {
	ID   string `json:"id,omitempty"`
	Name string `json:"name,omitempty"`
}

func (*Schedule) SetID

func (s *Schedule) SetID(id string)

func (*Schedule) SetUsername

func (s *Schedule) SetUsername(name string)

type SearchIdentifierType

type SearchIdentifierType string
const (
	ID   SearchIdentifierType = "id"
	NAME SearchIdentifierType = "name"
)

type SnoozeAlertRequest

type SnoozeAlertRequest struct {
	client.BaseRequest
	IdentifierType  AlertIdentifier
	IdentifierValue string
	EndTime         time.Time `json:"endTime,omitempty"`
	User            string    `json:"user,omitempty"`
	Source          string    `json:"source,omitempty"`
	Note            string    `json:"note,omitempty"`
}

func (*SnoozeAlertRequest) Method

func (r *SnoozeAlertRequest) Method() string

func (*SnoozeAlertRequest) RequestParams

func (r *SnoozeAlertRequest) RequestParams() map[string]string

func (*SnoozeAlertRequest) ResourcePath

func (r *SnoozeAlertRequest) ResourcePath() string

func (*SnoozeAlertRequest) Validate

func (r *SnoozeAlertRequest) Validate() error

type SortField

type SortField string
const (
	CreatedAt       SortField = "createdAt"
	UpdatedAt       SortField = "updatedAt"
	TinyId          SortField = "tinyId"
	Alias           SortField = "alias"
	Message         SortField = "message"
	Status          SortField = "status"
	Acknowledged    SortField = "acknowledged"
	IsSeen          SortField = "isSeen"
	Snoozed         SortField = "snoozed"
	SnoozedUntil    SortField = "snoozedUntil"
	Count           SortField = "count"
	LastOccurredAt  SortField = "lastOccuredAt"
	Source          SortField = "source"
	Owner           SortField = "owner"
	IntegrationName SortField = "integration.name"
	IntegrationType SortField = "integration.type"
	AckTime         SortField = "report.ackTime"
	CloseTime       SortField = "report.closeTime"
	AcknowledgedBy  SortField = "report.acknowledgedBy"
	ClosedBy        SortField = "report.closedBy"
)

type Team

type Team struct {
	ID   string `json:"id,omitempty"`
	Name string `json:"name,omitempty"`
}

type UnacknowledgeAlertRequest

type UnacknowledgeAlertRequest struct {
	client.BaseRequest
	IdentifierType  AlertIdentifier
	IdentifierValue string
	User            string `json:"user,omitempty"`
	Source          string `json:"source,omitempty"`
	Note            string `json:"note,omitempty"`
}

func (*UnacknowledgeAlertRequest) Method

func (r *UnacknowledgeAlertRequest) Method() string

func (*UnacknowledgeAlertRequest) RequestParams

func (r *UnacknowledgeAlertRequest) RequestParams() map[string]string

func (*UnacknowledgeAlertRequest) ResourcePath

func (r *UnacknowledgeAlertRequest) ResourcePath() string

func (*UnacknowledgeAlertRequest) Validate

func (r *UnacknowledgeAlertRequest) Validate() error

type UpdateDescriptionRequest

type UpdateDescriptionRequest struct {
	client.BaseRequest
	IdentifierType  AlertIdentifier
	IdentifierValue string
	Description     string `json:"description,omitempty"`
}

func (*UpdateDescriptionRequest) Method

func (r *UpdateDescriptionRequest) Method() string

func (*UpdateDescriptionRequest) RequestParams

func (r *UpdateDescriptionRequest) RequestParams() map[string]string

func (*UpdateDescriptionRequest) ResourcePath

func (r *UpdateDescriptionRequest) ResourcePath() string

func (*UpdateDescriptionRequest) Validate

func (r *UpdateDescriptionRequest) Validate() error

type UpdateMessageRequest

type UpdateMessageRequest struct {
	client.BaseRequest
	IdentifierType  AlertIdentifier
	IdentifierValue string
	Message         string `json:"message,omitempty"`
}

func (*UpdateMessageRequest) Method

func (r *UpdateMessageRequest) Method() string

func (*UpdateMessageRequest) RequestParams

func (r *UpdateMessageRequest) RequestParams() map[string]string

func (*UpdateMessageRequest) ResourcePath

func (r *UpdateMessageRequest) ResourcePath() string

func (*UpdateMessageRequest) Validate

func (r *UpdateMessageRequest) Validate() error

type UpdatePriorityRequest

type UpdatePriorityRequest struct {
	client.BaseRequest
	IdentifierType  AlertIdentifier
	IdentifierValue string
	Priority        Priority `json:"priority,omitempty"`
}

func (*UpdatePriorityRequest) Method

func (r *UpdatePriorityRequest) Method() string

func (*UpdatePriorityRequest) RequestParams

func (r *UpdatePriorityRequest) RequestParams() map[string]string

func (*UpdatePriorityRequest) ResourcePath

func (r *UpdatePriorityRequest) ResourcePath() string

func (*UpdatePriorityRequest) Validate

func (r *UpdatePriorityRequest) Validate() error

type UpdateSavedSearchRequest

type UpdateSavedSearchRequest struct {
	client.BaseRequest
	IdentifierType  SearchIdentifierType
	IdentifierValue string
	NewName         string `json:"name,omitempty"`
	Query           string `json:"query,omitempty"`
	Owner           User   `json:"owner,omitempty"`
	Description     string `json:"description,omitempty"`
	Teams           []Team `json:"teams,omitempty"`
}

func (*UpdateSavedSearchRequest) Method

func (r *UpdateSavedSearchRequest) Method() string

func (*UpdateSavedSearchRequest) RequestParams

func (r *UpdateSavedSearchRequest) RequestParams() map[string]string

func (*UpdateSavedSearchRequest) ResourcePath

func (r *UpdateSavedSearchRequest) ResourcePath() string

func (*UpdateSavedSearchRequest) Validate

func (r *UpdateSavedSearchRequest) Validate() error

type User

type User struct {
	ID       string `json:"id,omitempty"`
	Username string `json:"username,omitempty"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL