Documentation ¶
Index ¶
- Constants
- type APIBasedIntegrationRequest
- type APIBasedIntegrationResult
- type AcknowledgeAction
- type ActionType
- type ActionsResult
- type AddNoteAction
- type AuthenticateIntegrationRequest
- type AuthenticateResult
- type Client
- func (c *Client) Authenticate(context context.Context, request *AuthenticateIntegrationRequest) (*AuthenticateResult, error)
- func (c *Client) CreateActions(context context.Context, request *CreateIntegrationActionsRequest) (*ActionsResult, error)
- func (c *Client) CreateApiBased(context context.Context, request *APIBasedIntegrationRequest) (*APIBasedIntegrationResult, error)
- func (c *Client) CreateEmailBased(context context.Context, request *EmailBasedIntegrationRequest) (*EmailBasedIntegrationResult, error)
- func (c *Client) CreateWebhook(context context.Context, request *WebhookIntegrationRequest) (*WebhookIntegrationResult, error)
- func (c *Client) Delete(context context.Context, request *DeleteIntegrationRequest) (*DeleteResult, error)
- func (c *Client) Disable(context context.Context, request *DisableIntegrationRequest) (*DisableResult, error)
- func (c *Client) Enable(context context.Context, request *EnableIntegrationRequest) (*EnableResult, error)
- func (c *Client) ForceUpdateAllFields(context context.Context, request *UpdateIntegrationRequest) (*UpdateResult, error)
- func (c *Client) Get(context context.Context, request *GetRequest) (*GetResult, error)
- func (c *Client) GetActions(context context.Context, request *GetIntegrationActionsRequest) (*ActionsResult, error)
- func (c *Client) List(context context.Context) (*ListResult, error)
- func (c *Client) UpdateAllActions(context context.Context, request *UpdateAllIntegrationActionsRequest) (*ActionsResult, error)
- type CloseAction
- type ConditionResult
- type CreateAction
- type CreateIntegrationActionsRequest
- type DeleteIntegrationRequest
- type DeleteResult
- type DisableIntegrationRequest
- type DisableResult
- type EmailBasedIntegrationRequest
- type EmailBasedIntegrationResult
- type EnableIntegrationRequest
- type EnableResult
- type Filter
- type FilterResult
- type GenericActionFields
- type GenericFields
- type GetIntegrationActionsRequest
- type GetRequest
- type GetResult
- type IgnoreAction
- type IntegrationAction
- type ListResult
- type OtherFields
- type ParentIntegration
- type Responder
- type ResponderType
- type UpdateAllIntegrationActionsRequest
- type UpdateIntegrationRequest
- type UpdateResult
- type WebhookIntegrationRequest
- type WebhookIntegrationResult
Constants ¶
View Source
const ( User ResponderType = "user" Team ResponderType = "team" Escalation ResponderType = "escalation" Schedule ResponderType = "schedule" Create ActionType = "create" Close ActionType = "close" Acknowledge ActionType = "acknowledge" AddNote ActionType = "AddNote" Ignore ActionType = "ignore" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIBasedIntegrationRequest ¶
type APIBasedIntegrationRequest struct { client.BaseRequest Name string `json:"name"` Type string `json:"type"` AllowWriteAccess *bool `json:"allowWriteAccess"` IgnoreRespondersFromPayload *bool `json:"ignoreRespondersFromPayload"` SuppressNotifications *bool `json:"suppressNotifications"` OwnerTeam *og.OwnerTeam `json:"ownerTeam,omitempty"` Responders []Responder `json:"responders,omitempty"` }
func (*APIBasedIntegrationRequest) Method ¶
func (r *APIBasedIntegrationRequest) Method() string
func (*APIBasedIntegrationRequest) ResourcePath ¶
func (r *APIBasedIntegrationRequest) ResourcePath() string
func (*APIBasedIntegrationRequest) Validate ¶
func (r *APIBasedIntegrationRequest) Validate() error
type APIBasedIntegrationResult ¶
type APIBasedIntegrationResult struct { client.ResultMetadata GenericFields ApiKey string `json:"apiKey"` }
type AcknowledgeAction ¶
type AcknowledgeAction struct { GenericActionFields User string `json:"user"` Note string `json:"note"` Alias string `json:"alias"` }
type ActionType ¶
type ActionType string
type ActionsResult ¶
type ActionsResult struct { client.ResultMetadata Parent ParentIntegration `json:"_parent"` Ignore []IntegrationAction `json:"ignore"` Create []IntegrationAction `json:"create"` Close []IntegrationAction `json:"close"` Acknowledge []IntegrationAction `json:"acknowledge"` AddNote []IntegrationAction `json:"addNote"` }
type AddNoteAction ¶
type AddNoteAction struct { GenericActionFields User string `json:"user"` Note string `json:"note"` Alias string `json:"alias"` }
type AuthenticateIntegrationRequest ¶
type AuthenticateIntegrationRequest struct { client.BaseRequest Type string `json:"type"` }
func (*AuthenticateIntegrationRequest) Method ¶
func (r *AuthenticateIntegrationRequest) Method() string
func (*AuthenticateIntegrationRequest) ResourcePath ¶
func (r *AuthenticateIntegrationRequest) ResourcePath() string
func (*AuthenticateIntegrationRequest) Validate ¶
func (r *AuthenticateIntegrationRequest) Validate() error
type AuthenticateResult ¶
type AuthenticateResult struct { client.ResultMetadata Result string `json:"result"` }
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) Authenticate ¶
func (c *Client) Authenticate(context context.Context, request *AuthenticateIntegrationRequest) (*AuthenticateResult, error)
func (*Client) CreateActions ¶
func (c *Client) CreateActions(context context.Context, request *CreateIntegrationActionsRequest) (*ActionsResult, error)
func (*Client) CreateApiBased ¶
func (c *Client) CreateApiBased(context context.Context, request *APIBasedIntegrationRequest) (*APIBasedIntegrationResult, error)
func (*Client) CreateEmailBased ¶
func (c *Client) CreateEmailBased(context context.Context, request *EmailBasedIntegrationRequest) (*EmailBasedIntegrationResult, error)
func (*Client) CreateWebhook ¶
func (c *Client) CreateWebhook(context context.Context, request *WebhookIntegrationRequest) (*WebhookIntegrationResult, error)
func (*Client) Delete ¶
func (c *Client) Delete(context context.Context, request *DeleteIntegrationRequest) (*DeleteResult, error)
func (*Client) Disable ¶
func (c *Client) Disable(context context.Context, request *DisableIntegrationRequest) (*DisableResult, error)
func (*Client) Enable ¶
func (c *Client) Enable(context context.Context, request *EnableIntegrationRequest) (*EnableResult, error)
func (*Client) ForceUpdateAllFields ¶
func (c *Client) ForceUpdateAllFields(context context.Context, request *UpdateIntegrationRequest) (*UpdateResult, error)
func (*Client) GetActions ¶
func (c *Client) GetActions(context context.Context, request *GetIntegrationActionsRequest) (*ActionsResult, error)
func (*Client) UpdateAllActions ¶
func (c *Client) UpdateAllActions(context context.Context, request *UpdateAllIntegrationActionsRequest) (*ActionsResult, error)
type CloseAction ¶
type CloseAction struct { GenericActionFields User string `json:"user"` Note string `json:"note"` Alias string `json:"alias"` }
type ConditionResult ¶
type ConditionResult struct { Field og.ConditionFieldType `json:"field,omitempty"` IsNot bool `json:"not,omitempty"` Operation og.ConditionOperation `json:"operation,omitempty"` ExpectedValue string `json:"expectedValue,omitempty"` Key string `json:"key,omitempty"` Order *int `json:"order,omitempty"` }
type CreateAction ¶
type CreateAction struct { GenericActionFields User string `json:"user"` Note string `json:"note"` Alias string `json:"alias"` Source string `json:"source"` Message string `json:"message"` Description string `json:"description"` Entity string `json:"entity"` AppendAttachments bool `json:"appendAttachments"` IgnoreAlertActionsFromPayload bool `json:"ignoreAlertActionsFromPayload"` IgnoreRespondersFromPayload bool `json:"ignoreRespondersFromPayload"` IgnoreTagsFromPayload bool `json:"ignoreTagsFromPayload"` IgnoreExtraPropertiesFromPayload bool `json:"ignoreExtraPropertiesFromPayload"` AlertActions []string `json:"alertActions"` Responders []Responder `json:"responders"` Tags []string `json:"tags"` ExtraProperties map[string]string `json:"extraProperties"` }
type CreateIntegrationActionsRequest ¶
type CreateIntegrationActionsRequest struct { client.BaseRequest Id string Type ActionType `json:"type"` Name string `json:"name"` Alias string `json:"alias"` Order int `json:"order,omitempty"` User string `json:"user,omitempty"` Note string `json:"note,omitempty"` Filter *Filter `json:"filter,omitempty"` Source string `json:"source,omitempty"` Message string `json:"message,omitempty"` Description string `json:"description,omitempty"` Entity string `json:"entity,omitempty"` AppendAttachments *bool `json:"appendAttachments,omitempty"` AlertActions []string `json:"alertActions,omitempty"` IgnoreAlertActionsFromPayload *bool `json:"ignoreAlertActionsFromPayload,omitempty"` IgnoreRespondersFromPayload *bool `json:"ignoreRespondersFromPayload,omitempty"` IgnoreTagsFromPayload *bool `json:"ignoreTagsFromPayload,omitempty"` IgnoreExtraPropertiesFromPayload *bool `json:"ignoreExtraPropertiesFromPayload,omitempty"` Responders []Responder `json:"responders,omitempty"` Tags []string `json:"tags,omitempty"` ExtraProperties map[string]string `json:"extraProperties,omitempty"` }
func (*CreateIntegrationActionsRequest) Method ¶
func (r *CreateIntegrationActionsRequest) Method() string
func (*CreateIntegrationActionsRequest) ResourcePath ¶
func (r *CreateIntegrationActionsRequest) ResourcePath() string
func (*CreateIntegrationActionsRequest) Validate ¶
func (r *CreateIntegrationActionsRequest) Validate() error
type DeleteIntegrationRequest ¶
type DeleteIntegrationRequest struct { client.BaseRequest Id string }
func (*DeleteIntegrationRequest) Method ¶
func (r *DeleteIntegrationRequest) Method() string
func (*DeleteIntegrationRequest) ResourcePath ¶
func (r *DeleteIntegrationRequest) ResourcePath() string
func (*DeleteIntegrationRequest) Validate ¶
func (r *DeleteIntegrationRequest) Validate() error
type DeleteResult ¶
type DeleteResult struct { client.ResultMetadata Result string `json:"result"` }
type DisableIntegrationRequest ¶
type DisableIntegrationRequest struct { client.BaseRequest Id string }
func (*DisableIntegrationRequest) Method ¶
func (r *DisableIntegrationRequest) Method() string
func (*DisableIntegrationRequest) ResourcePath ¶
func (r *DisableIntegrationRequest) ResourcePath() string
func (*DisableIntegrationRequest) Validate ¶
func (r *DisableIntegrationRequest) Validate() error
type DisableResult ¶
type DisableResult struct { client.ResultMetadata GenericFields }
type EmailBasedIntegrationRequest ¶
type EmailBasedIntegrationRequest struct { client.BaseRequest Name string `json:"name"` Type string `json:"type"` EmailUsername string `json:"emailUsername"` IgnoreRespondersFromPayload *bool `json:"ignoreRespondersFromPayload,omitempty"` SuppressNotifications *bool `json:"suppressNotifications,omitempty"` OwnerTeam *og.OwnerTeam `json:"ownerTeam,omitempty"` Responders []Responder `json:"responders,omitempty"` }
func (*EmailBasedIntegrationRequest) Method ¶
func (r *EmailBasedIntegrationRequest) Method() string
func (*EmailBasedIntegrationRequest) ResourcePath ¶
func (r *EmailBasedIntegrationRequest) ResourcePath() string
func (*EmailBasedIntegrationRequest) Validate ¶
func (r *EmailBasedIntegrationRequest) Validate() error
type EmailBasedIntegrationResult ¶
type EmailBasedIntegrationResult struct { client.ResultMetadata GenericFields EmailAddress string `json:"emailAddress"` }
type EnableIntegrationRequest ¶
type EnableIntegrationRequest struct { client.BaseRequest Id string }
func (*EnableIntegrationRequest) Method ¶
func (r *EnableIntegrationRequest) Method() string
func (*EnableIntegrationRequest) ResourcePath ¶
func (r *EnableIntegrationRequest) ResourcePath() string
func (*EnableIntegrationRequest) Validate ¶
func (r *EnableIntegrationRequest) Validate() error
type EnableResult ¶
type EnableResult struct { client.ResultMetadata GenericFields }
type Filter ¶
type Filter struct { ConditionMatchType og.ConditionMatchType `json:"conditionMatchType,omitempty"` Conditions []og.Condition `json:"conditions,omitempty"` }
type FilterResult ¶
type FilterResult struct { ConditionMatchType og.ConditionMatchType `json:"conditionMatchType,omitempty"` Conditions []ConditionResult `json:"conditions,omitempty"` }
type GenericActionFields ¶
type GenericActionFields struct { Type string `json:"type"` Name string `json:"name"` Order int `json:"order"` Filter FilterResult `json:"filter"` }
type GenericFields ¶
type GetIntegrationActionsRequest ¶
type GetIntegrationActionsRequest struct { client.BaseRequest Id string }
func (*GetIntegrationActionsRequest) Method ¶
func (r *GetIntegrationActionsRequest) Method() string
func (*GetIntegrationActionsRequest) ResourcePath ¶
func (r *GetIntegrationActionsRequest) ResourcePath() string
func (*GetIntegrationActionsRequest) Validate ¶
func (r *GetIntegrationActionsRequest) Validate() error
type GetRequest ¶
type GetRequest struct { client.BaseRequest Id string }
func (*GetRequest) Method ¶
func (r *GetRequest) Method() string
func (*GetRequest) ResourcePath ¶
func (r *GetRequest) ResourcePath() string
func (*GetRequest) Validate ¶
func (r *GetRequest) Validate() error
type GetResult ¶
type GetResult struct { client.ResultMetadata Data map[string]interface{} `json:"data"` }
type IgnoreAction ¶
type IgnoreAction struct {
GenericActionFields
}
type IntegrationAction ¶
type IntegrationAction struct { Type ActionType `json:"type"` Name string `json:"name"` Alias string `json:"alias"` Order int `json:"order,omitempty"` User string `json:"user,omitempty"` Note string `json:"note,omitempty"` Filter *Filter `json:"filter,omitempty"` Source string `json:"source,omitempty"` Message string `json:"message,omitempty"` Description string `json:"description,omitempty"` Entity string `json:"entity,omitempty"` Priority string `json:"priority,omitempty"` CustomPriority string `json:"customPriority,omitempty"` AppendAttachments *bool `json:"appendAttachments,omitempty"` AlertActions []string `json:"alertActions,omitempty"` IgnoreAlertActionsFromPayload *bool `json:"ignoreAlertActionsFromPayload,omitempty"` IgnoreRespondersFromPayload *bool `json:"ignoreRespondersFromPayload,omitempty"` IgnoreTagsFromPayload *bool `json:"ignoreTagsFromPayload,omitempty"` IgnoreExtraPropertiesFromPayload *bool `json:"ignoreExtraPropertiesFromPayload,omitempty"` Responders []Responder `json:"responders,omitempty"` Tags []string `json:"tags,omitempty"` ExtraProperties map[string]string `json:"extraProperties,omitempty"` Recipients []Responder `json:"recipients,omitempty"` }
type ListResult ¶
type ListResult struct { client.ResultMetadata Integrations []GenericFields `json:"data"` }
type OtherFields ¶
type OtherFields map[string]interface{}
func (OtherFields) Metadata ¶
func (r OtherFields) Metadata(apiRequest client.ApiRequest) map[string]interface{}
func (OtherFields) Method ¶
func (r OtherFields) Method() string
func (OtherFields) RequestParams ¶
func (r OtherFields) RequestParams() map[string]string
func (OtherFields) ResourcePath ¶
func (r OtherFields) ResourcePath() string
func (OtherFields) Validate ¶
func (r OtherFields) Validate() error
type ParentIntegration ¶
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
type UpdateAllIntegrationActionsRequest ¶
type UpdateAllIntegrationActionsRequest struct { client.BaseRequest Id string Create []IntegrationAction `json:"create"` Close []IntegrationAction `json:"close"` Acknowledge []IntegrationAction `json:"acknowledge"` AddNote []IntegrationAction `json:"addNote"` Ignore []IntegrationAction `json:"ignore"` }
func (*UpdateAllIntegrationActionsRequest) Method ¶
func (r *UpdateAllIntegrationActionsRequest) Method() string
func (*UpdateAllIntegrationActionsRequest) ResourcePath ¶
func (r *UpdateAllIntegrationActionsRequest) ResourcePath() string
func (*UpdateAllIntegrationActionsRequest) Validate ¶
func (r *UpdateAllIntegrationActionsRequest) Validate() error
type UpdateIntegrationRequest ¶
type UpdateIntegrationRequest struct { client.BaseRequest Id string Name string Type string EmailUsername string WebhookUrl string Enabled *bool IgnoreRespondersFromPayload *bool SuppressNotifications *bool Responders []Responder AddAlertDescription *bool AddAlertDetails *bool OwnerTeam *og.OwnerTeam `json:"ownerTeam,omitempty"` Headers map[string]string OtherFields }
type UpdateResult ¶
type UpdateResult struct { client.ResultMetadata Data map[string]interface{} `json:"data"` }
type WebhookIntegrationRequest ¶
type WebhookIntegrationRequest struct { client.BaseRequest Name string `json:"name"` Type string `json:"type"` AllowWriteAccess *bool `json:"allowWriteAccess"` SuppressNotifications *bool `json:"suppressNotifications"` OwnerTeam *og.OwnerTeam `json:"ownerTeam,omitempty"` Responders []Responder `json:"responders,omitempty"` WebhookUrl string `json:"url"` AddAlertDescription *bool `json:"addAlertDescription"` AddAlertDetails *bool `json:"addAlertDetails"` Headers map[string]string `json:"headers,omitempty"` }
func (*WebhookIntegrationRequest) Method ¶
func (r *WebhookIntegrationRequest) Method() string
func (*WebhookIntegrationRequest) ResourcePath ¶
func (r *WebhookIntegrationRequest) ResourcePath() string
func (*WebhookIntegrationRequest) Validate ¶
func (r *WebhookIntegrationRequest) Validate() error
type WebhookIntegrationResult ¶
type WebhookIntegrationResult struct { client.ResultMetadata GenericFields ApiKey string `json:"apiKey"` }
Click to show internal directories.
Click to hide internal directories.