alertsv2

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2019 License: Apache-2.0, GPL-2.0 Imports: 5 Imported by: 15

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AcknowledgeRequest

type AcknowledgeRequest AlertActionRequest

func (*AcknowledgeRequest) GenerateUrl

func (r *AcknowledgeRequest) GenerateUrl() (string, url.Values, error)

func (*AcknowledgeRequest) GetApiKey

func (r *AcknowledgeRequest) GetApiKey() string

type AddAlertAttachmentRequest

type AddAlertAttachmentRequest struct {
	*AttachmentAlertIdentifier
	AttachmentFilePath    string `json:"alertfile,omitempty"`
	AttachmentFileContent []byte
	AttachmentFileName    string
	User                  string `json:"user,omitempty"`
	IndexFile             string `json:"indexFile,omitempty"`
	ApiKey                string `json:"-"`
}

func (*AddAlertAttachmentRequest) GenerateUrl

func (r *AddAlertAttachmentRequest) GenerateUrl() (string, url.Values, error)

func (*AddAlertAttachmentRequest) GetApiKey

func (r *AddAlertAttachmentRequest) GetApiKey() string

type AddAlertAttachmentResponse

type AddAlertAttachmentResponse struct {
	ResponseMeta
	Result string `json:"result"`
}

type AddDetailsRequest

type AddDetailsRequest struct {
	*Identifier
	Details map[string]string `json:"details,omitempty"`
	User    string            `json:"user,omitempty"`
	Source  string            `json:"source,omitempty"`
	Note    string            `json:"note,omitempty"`
	ApiKey  string            `json:"-"`
}

func (*AddDetailsRequest) GenerateUrl

func (r *AddDetailsRequest) GenerateUrl() (string, url.Values, error)

func (*AddDetailsRequest) GetApiKey

func (r *AddDetailsRequest) GetApiKey() string

type AddNoteRequest

type AddNoteRequest AlertActionRequest

func (*AddNoteRequest) GenerateUrl

func (r *AddNoteRequest) GenerateUrl() (string, url.Values, error)

func (*AddNoteRequest) GetApiKey

func (r *AddNoteRequest) GetApiKey() string

type AddTagsToAlertRequest

type AddTagsToAlertRequest struct {
	*Identifier
	Tags   []string `json:"tags,omitempty"`
	User   string   `json:"user,omitempty"`
	Source string   `json:"source,omitempty"`
	Note   string   `json:"note,omitempty"`
	ApiKey string   `json:"-"`
}

func (*AddTagsToAlertRequest) GenerateUrl

func (r *AddTagsToAlertRequest) GenerateUrl() (string, url.Values, error)

func (*AddTagsToAlertRequest) GetApiKey

func (r *AddTagsToAlertRequest) GetApiKey() string

type AddTeamToAlertRequest

type AddTeamToAlertRequest struct {
	*Identifier
	Team   Team   `json:"team,omitempty"`
	User   string `json:"user,omitempty"`
	Source string `json:"source,omitempty"`
	Note   string `json:"note,omitempty"`
	ApiKey string `json:"-"`
}

func (*AddTeamToAlertRequest) GenerateUrl

func (r *AddTeamToAlertRequest) GenerateUrl() (string, url.Values, error)

func (*AddTeamToAlertRequest) GetApiKey

func (r *AddTeamToAlertRequest) GetApiKey() string

type Alert

type Alert struct {
	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:"lastOccuredAt,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"`
	Teams          []TeamMeta  `json:"teams,omitempty"`
	Integration    Integration `json:"integration,omitempty"`
	Report         Report      `json:"report,omitempty"`
}

type AlertActionRequest

type AlertActionRequest struct {
	*Identifier
	User   string `json:"user,omitempty"`
	Source string `json:"source,omitempty"`
	Note   string `json:"note,omitempty"`
	ApiKey string `json:"-"`
}

func (*AlertActionRequest) GetApiKey

func (r *AlertActionRequest) GetApiKey() string

type AlertAttachmentMeta

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

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"`
	State     string    `json:"state,omitempty"`
	Method    string    `json:"method,omitempty"`
	CreatedAt time.Time `json:"createdAt,omitempty"`
	UpdatedAt time.Time `json:"updatedAt,omitempty"`
}

type AssignAlertRequest

type AssignAlertRequest struct {
	*Identifier
	Owner  User   `json:"owner,omitempty"`
	User   string `json:"user,omitempty"`
	Source string `json:"source,omitempty"`
	Note   string `json:"note,omitempty"`
	ApiKey string `json:"-"`
}

func (*AssignAlertRequest) GenerateUrl

func (r *AssignAlertRequest) GenerateUrl() (string, url.Values, error)

func (*AssignAlertRequest) GetApiKey

func (r *AssignAlertRequest) GetApiKey() string

type AttachmentAlertIdentifier

type AttachmentAlertIdentifier struct {
	ID     string `json:"-"`
	Alias  string `json:"-"`
	TinyID string `json:"-"`
}

func (*AttachmentAlertIdentifier) GenerateUrl

func (request *AttachmentAlertIdentifier) GenerateUrl() (string, url.Values, error)

type AttachmentResponse

type AttachmentResponse struct {
	Name         string `json:"name,omitempty"`
	DownloadLink string `json:"url,omitempty"`
}

type CloseRequest

type CloseRequest AlertActionRequest

func (*CloseRequest) GenerateUrl

func (r *CloseRequest) GenerateUrl() (string, url.Values, error)

func (*CloseRequest) GetApiKey

func (r *CloseRequest) GetApiKey() string

type CreateAlertRequest

type CreateAlertRequest struct {
	Message     string            `json:"message,omitempty"`
	Alias       string            `json:"alias,omitempty"`
	Description string            `json:"description,omitempty"`
	Teams       []TeamRecipient   `json:"teams,omitempty"`
	VisibleTo   []Recipient       `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"`
	ApiKey      string            `json:"-"`
}

func (*CreateAlertRequest) GenerateUrl

func (r *CreateAlertRequest) GenerateUrl() (string, url.Values, error)

func (*CreateAlertRequest) GetApiKey

func (r *CreateAlertRequest) GetApiKey() string

func (*CreateAlertRequest) Init

func (r *CreateAlertRequest) Init()

type DeleteAlertAttachmentRequest

type DeleteAlertAttachmentRequest struct {
	*AttachmentAlertIdentifier
	AttachmentId string
	ApiKey       string
}

func (*DeleteAlertAttachmentRequest) GenerateUrl

func (r *DeleteAlertAttachmentRequest) GenerateUrl() (string, url.Values, error)

func (*DeleteAlertAttachmentRequest) GetApiKey

func (r *DeleteAlertAttachmentRequest) GetApiKey() string

type DeleteAlertAttachmentResponse

type DeleteAlertAttachmentResponse struct {
	ResponseMeta
	Result string `json:"result"`
}

type DeleteAlertRequest

type DeleteAlertRequest struct {
	*Identifier
	User   string
	Source string
	ApiKey string
}

func (*DeleteAlertRequest) GenerateUrl

func (r *DeleteAlertRequest) GenerateUrl() (string, url.Values, error)

func (*DeleteAlertRequest) GetApiKey

func (r *DeleteAlertRequest) GetApiKey() string

type DetailedAlert

type DetailedAlert struct {
	*Alert
	Actions     []string          `json:"actions,omitempty"`
	Entity      string            `json:"entity,omitempty"`
	Description string            `json:"description,omitempty"`
	Details     map[string]string `json:"details,omitempty"`
}

type DetailedAlertResponse

type DetailedAlertResponse struct {
	ResponseMeta
	Alert DetailedAlert `json:"data"`
}

type Direction

type Direction string
const (
	Next Direction = "next"
	Prev Direction = "prev"
)

type EscalateToNextRequest

type EscalateToNextRequest struct {
	*Identifier
	Escalation Escalation `json:"escalation,omitempty"`
	User       string     `json:"user,omitempty"`
	Source     string     `json:"source,omitempty"`
	Note       string     `json:"note,omitempty"`
	ApiKey     string     `json:"-"`
}

func (*EscalateToNextRequest) GenerateUrl

func (r *EscalateToNextRequest) GenerateUrl() (string, url.Values, error)

func (*EscalateToNextRequest) GetApiKey

func (r *EscalateToNextRequest) GetApiKey() string

type Escalation

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

type ExecuteCustomActionRequest

type ExecuteCustomActionRequest struct {
	*Identifier
	ActionName string `json:"-"`
	User       string `json:"user,omitempty"`
	Source     string `json:"source,omitempty"`
	Note       string `json:"note,omitempty"`
	ApiKey     string `json:"-"`
}

func (*ExecuteCustomActionRequest) GenerateUrl

func (r *ExecuteCustomActionRequest) GenerateUrl() (string, url.Values, error)

func (*ExecuteCustomActionRequest) GetApiKey

func (r *ExecuteCustomActionRequest) GetApiKey() string

type GetAlertAttachmentRequest

type GetAlertAttachmentRequest struct {
	*AttachmentAlertIdentifier
	AttachmentId string
	ApiKey       string
}

func (*GetAlertAttachmentRequest) GenerateUrl

func (r *GetAlertAttachmentRequest) GenerateUrl() (string, url.Values, error)

func (*GetAlertAttachmentRequest) GetApiKey

func (r *GetAlertAttachmentRequest) GetApiKey() string

type GetAlertAttachmentResponse

type GetAlertAttachmentResponse struct {
	ResponseMeta
	Attachment AttachmentResponse `json:"data"`
}

type GetAlertRequest

type GetAlertRequest struct {
	*Identifier
	ApiKey string
}

func (*GetAlertRequest) GetApiKey

func (r *GetAlertRequest) GetApiKey() string

type GetAsyncRequestStatusRequest

type GetAsyncRequestStatusRequest struct {
	RequestID string `json:"requestId,omitempty"`
	ApiKey    string
}

func (*GetAsyncRequestStatusRequest) GenerateUrl

func (r *GetAsyncRequestStatusRequest) GenerateUrl() (string, url.Values, error)

func (*GetAsyncRequestStatusRequest) GetApiKey

func (r *GetAsyncRequestStatusRequest) GetApiKey() string

type GetAsyncRequestStatusResponse

type GetAsyncRequestStatusResponse struct {
	ResponseMeta
	Status RequestStatus `json:"data"`
}

type Identifier

type Identifier struct {
	ID     string `json:"-"`
	Alias  string `json:"-"`
	TinyID string `json:"-"`
}

func (*Identifier) GenerateUrl

func (request *Identifier) GenerateUrl() (string, url.Values, error)

type Integration

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

type LisSavedSearchRequest

type LisSavedSearchRequest struct {
	ApiKey string
}

func (*LisSavedSearchRequest) GenerateUrl

func (r *LisSavedSearchRequest) GenerateUrl() (string, url.Values, error)

func (*LisSavedSearchRequest) GetApiKey

func (r *LisSavedSearchRequest) GetApiKey() string

type ListAlertAttachmentRequest

type ListAlertAttachmentRequest struct {
	*AttachmentAlertIdentifier
	ApiKey string
}

func (*ListAlertAttachmentRequest) GenerateUrl

func (r *ListAlertAttachmentRequest) GenerateUrl() (string, url.Values, error)

func (*ListAlertAttachmentRequest) GetApiKey

func (r *ListAlertAttachmentRequest) GetApiKey() string

type ListAlertAttachmentsResponse

type ListAlertAttachmentsResponse struct {
	ResponseMeta
	AlertAttachments []AlertAttachmentMeta `json:"data"`
}

type ListAlertLogsRequest

type ListAlertLogsRequest struct {
	*Identifier
	Offset    string
	Direction Direction
	Limit     int
	Order     Order
	ApiKey    string
}

func (*ListAlertLogsRequest) GenerateUrl

func (r *ListAlertLogsRequest) GenerateUrl() (string, url.Values, error)

func (*ListAlertLogsRequest) GetApiKey

func (r *ListAlertLogsRequest) GetApiKey() string

type ListAlertLogsResponse

type ListAlertLogsResponse struct {
	ResponseMeta
	AlertLogs []AlertLog `json:"data"`
}

type ListAlertNotesRequest

type ListAlertNotesRequest struct {
	*Identifier
	Offset    string
	Direction Direction
	Limit     int
	Order     Order
	ApiKey    string
}

func (*ListAlertNotesRequest) GenerateUrl

func (r *ListAlertNotesRequest) GenerateUrl() (string, url.Values, error)

func (*ListAlertNotesRequest) GetApiKey

func (r *ListAlertNotesRequest) GetApiKey() string

type ListAlertNotesResponse

type ListAlertNotesResponse struct {
	ResponseMeta
	AlertNotes []AlertNote `json:"data"`
}

type ListAlertRecipientsRequest

type ListAlertRecipientsRequest struct {
	*Identifier
	ApiKey string
}

func (*ListAlertRecipientsRequest) GenerateUrl

func (r *ListAlertRecipientsRequest) GenerateUrl() (string, url.Values, error)

func (*ListAlertRecipientsRequest) GetApiKey

func (r *ListAlertRecipientsRequest) GetApiKey() string

type ListAlertRecipientsResponse

type ListAlertRecipientsResponse struct {
	ResponseMeta
	Recipients []AlertRecipient `json:"data"`
}

type ListAlertRequest

type ListAlertRequest struct {
	Limit                int
	Sort                 SortField
	Offset               int
	Order                Order
	Query                string
	SearchIdentifier     string
	SearchIdentifierType SearchIdentifierType
	ApiKey               string
}

func (*ListAlertRequest) GenerateUrl

func (request *ListAlertRequest) GenerateUrl() (string, url.Values, error)

func (*ListAlertRequest) GetApiKey

func (r *ListAlertRequest) GetApiKey() string

type ListAlertResponse

type ListAlertResponse struct {
	ResponseMeta
	Alerts []Alert `json:"data"`
}

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 Recipient

type Recipient interface {
	SetID(id string)
}

type RecipientDTO

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

func (*RecipientDTO) SetID

func (r *RecipientDTO) SetID(id string)

func (*RecipientDTO) SetName

func (r *RecipientDTO) SetName(id string)

type RemoveDetailsRequest

type RemoveDetailsRequest struct {
	*Identifier
	Keys   []string
	User   string
	Source string
	Note   string
	ApiKey string
}

func (*RemoveDetailsRequest) GenerateUrl

func (r *RemoveDetailsRequest) GenerateUrl() (string, url.Values, error)

func (*RemoveDetailsRequest) GetApiKey

func (r *RemoveDetailsRequest) GetApiKey() string

type RemoveTagsRequest

type RemoveTagsRequest struct {
	*Identifier
	Tags   []string
	User   string
	Source string
	Note   string
	ApiKey string
}

func (*RemoveTagsRequest) GenerateUrl

func (r *RemoveTagsRequest) GenerateUrl() (string, url.Values, error)

func (*RemoveTagsRequest) GetApiKey

func (r *RemoveTagsRequest) GetApiKey() string

type Report

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

type RequestStatus

type RequestStatus struct {
	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 ResponseMeta

type ResponseMeta struct {
	RequestID      string
	ResponseTime   float32
	RateLimitState string
}

func (*ResponseMeta) SetRateLimitState

func (rm *ResponseMeta) SetRateLimitState(state string)

func (*ResponseMeta) SetRequestID

func (rm *ResponseMeta) SetRequestID(requestID string)

func (*ResponseMeta) SetResponseTime

func (rm *ResponseMeta) SetResponseTime(responseTime float32)

type SearchIdentifierType

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

type SnoozeRequest

type SnoozeRequest struct {
	AlertActionRequest
	EndTime time.Time `json:"endTime"`
}

func (*SnoozeRequest) GenerateUrl

func (r *SnoozeRequest) GenerateUrl() (string, url.Values, error)

func (*SnoozeRequest) GetApiKey

func (r *SnoozeRequest) GetApiKey() string

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"`
}

func (*Team) SetID

func (t *Team) SetID(id string)

func (*Team) SetName

func (t *Team) SetName(name string)

type TeamMeta

type TeamMeta struct {
	ID string `json:"id,omitempty"`
}

type TeamRecipient

type TeamRecipient interface {
	SetID(id string)
	SetName(name string)
	// contains filtered or unexported methods
}

type UnacknowledgeRequest

type UnacknowledgeRequest AlertActionRequest

func (*UnacknowledgeRequest) GenerateUrl

func (r *UnacknowledgeRequest) GenerateUrl() (string, url.Values, error)

func (*UnacknowledgeRequest) GetApiKey

func (r *UnacknowledgeRequest) GetApiKey() string

type User

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

func (*User) SetID

func (u *User) SetID(id string)

func (*User) SetUsername

func (u *User) SetUsername(username string)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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