Documentation
¶
Index ¶
- type AddOutputInput
- type AddOutputOutput
- type AlertOutput
- type AsanaConfig
- type DefaultOutputs
- type DeleteOutputInput
- type GetOutputInput
- type GetOutputOutput
- type GetOutputsInput
- type GetOutputsOutput
- type GithubConfig
- type JiraConfig
- type LambdaInput
- type MsTeamsConfig
- type OpsgenieConfig
- type OutputConfig
- type PagerDutyConfig
- type SlackConfig
- type SnsConfig
- type SqsConfig
- type UpdateOutputInput
- type UpdateOutputOutput
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddOutputInput ¶
type AddOutputInput struct {
UserID *string `json:"userId" validate:"required,uuid4"`
DisplayName *string `json:"displayName" validate:"required,min=1,excludesall='<>&\""`
OutputConfig *OutputConfig `json:"outputConfig" validate:"required"`
DefaultForSeverity []*string `json:"defaultForSeverity"`
}
AddOutputInput adds a new encrypted alert output to DynamoDB.
Example:
{
"addOutput": {
"displayName": "alert-channel",
"userId": "f6cfad0a-9bb0-4681-9503-02c54cc979c7",
"slack": {
"webhookURL": "https://hooks.slack.com/services/..."
}
}
}
type AddOutputOutput ¶
type AddOutputOutput = AlertOutput
AddOutputOutput returns a randomly generated UUID for the output.
Example:
{
"displayName": "alert-channel",
"outputId": "7d1c5854-f3ea-491c-8a52-0aa0d58cb456",
"outputType": "slack"
}
type AlertOutput ¶
type AlertOutput struct {
// The user ID of the user that created the alert output
CreatedBy *string `json:"createdBy"`
// The time in epoch seconds when the alert output was created
CreationTime *string `json:"creationTime"`
// DisplayName is the user-provided name, e.g. "alert-channel".
DisplayName *string `json:"displayName"`
// The user ID of the user that last modified the alert output last
LastModifiedBy *string `json:"lastModifiedBy"`
// The time in epoch seconds when the alert output was last modified
LastModifiedTime *string `json:"lastModifiedTime"`
// Identifies uniquely an alert output (table sort key)
OutputID *string `json:"outputId"`
// OutputType is the output class, e.g. "slack", "sns".
// ("type" is a reserved Dynamo keyword, so we use "OutputType" instead)
OutputType *string `json:"outputType"`
// OutputConfig contains the configuration for this output
OutputConfig *OutputConfig `json:"outputConfig"`
// DefaultForSeverity defines the alert severities that will be forwarded through this output
DefaultForSeverity []*string `json:"defaultForSeverity"`
}
AlertOutput contains the information for alert output configuration
type AsanaConfig ¶ added in v0.2.0
type AsanaConfig struct {
PersonalAccessToken *string `json:"personalAccessToken" validate:"required,min=1"`
ProjectGids []*string `json:"projectGids" validate:"required,min=1,dive,required"`
}
AsanaConfig defines options for each Asana output
type DefaultOutputs ¶
type DefaultOutputs struct {
Severity *string `json:"severity"`
OutputIDs []*string `json:"outputIds"`
}
DefaultOutputs is the structure holding the information about default outputs for severity
type DeleteOutputInput ¶
type DeleteOutputInput struct {
OutputID *string `json:"outputId" validate:"required,uuid4"`
}
DeleteOutputInput permanently deletes output credentials.
Example:
{
"deleteOutput": {
"outputId": "7d1c5854-f3ea-491c-8a52-0aa0d58cb456"
}
}
type GetOutputInput ¶
type GetOutputInput struct {
OutputID *string `json:"outputId" validate:"required,uuid4"`
}
GetOutputInput fetches the configuration for a specific alert output id of an organization
type GetOutputOutput ¶
type GetOutputOutput = AlertOutput
GetOutputOutput contains the configuration for an alert
type GetOutputsInput ¶ added in v0.1.1
type GetOutputsInput struct {
}
GetOrganizationOutputsInput fetches all alert output configuration for one organization
Example:
{
"getOutputs": {
}
}
type GetOutputsOutput ¶ added in v0.1.1
type GetOutputsOutput = []*AlertOutput
GetOrganizationOutputsOutput returns all the alert outputs for one organization
Example:
{
"displayName": "alert-channel",
"outputId": "7d1c5854-f3ea-491c-8a52-0aa0d58cb456",
"outputType": "slack"
}
type GithubConfig ¶
type GithubConfig struct {
RepoName *string `json:"repoName" validate:"required"`
Token *string `json:"token" validate:"required"`
}
GithubConfig defines options for each Github output
type JiraConfig ¶
type JiraConfig struct {
OrgDomain *string `json:"orgDomain" validate:"required"`
ProjectKey *string `json:"projectKey" validate:"required"`
UserName *string `json:"userName" validate:"required"`
APIKey *string `json:"apiKey" validate:"required"`
AssigneeID *string `json:"assigneeId"`
Type *string `json:"issueType"`
}
JiraConfig defines options for each Jira output
type LambdaInput ¶
type LambdaInput struct {
AddOutput *AddOutputInput `json:"addOutput"`
UpdateOutput *UpdateOutputInput `json:"updateOutput"`
GetOutput *GetOutputInput `json:"getOutput"`
DeleteOutput *DeleteOutputInput `json:"deleteOutput"`
GetOutputs *GetOutputsInput `json:"getOutputs"`
}
LambdaInput is the invocation event expected by the Lambda function.
Exactly one action must be specified.
type MsTeamsConfig ¶
type MsTeamsConfig struct {
WebhookURL *string `json:"webhookURL" validate:"required,url"`
}
MsTeamsConfig defines options for each MsTeamsConfig output
type OpsgenieConfig ¶
type OpsgenieConfig struct {
APIKey *string `json:"apiKey" validate:"required"`
}
OpsgenieConfig defines options for each Opsgenie output
type OutputConfig ¶
type OutputConfig struct {
// SlackConfig contains the configuration for Slack alert output
Slack *SlackConfig `json:"slack,omitempty"`
// SnsConfig contains the configuration for SNS alert output
Sns *SnsConfig `json:"sns,omitempty"`
// PagerDuty contains the configuration for PagerDuty alert output
PagerDuty *PagerDutyConfig `json:"pagerDuty,omitempty"`
// Github contains the configuration for Github alert output
Github *GithubConfig `json:"github,omitempty"`
// Jira contains the configuration for Jira alert output
Jira *JiraConfig `json:"jira,omitempty"`
// Opsgenie contains the configuration for Opsgenie alert output
Opsgenie *OpsgenieConfig `json:"opsgenie,omitempty"`
// MsTeams contains the configuration for MsTeams alert output
MsTeams *MsTeamsConfig `json:"msTeams,omitempty"`
// SqsConfig contains the configuration for SQS alert output
Sqs *SqsConfig `json:"sqs,omitempty"`
// AsanaConfig contains the configuration for Asana alert output
Asana *AsanaConfig `json:"asana,omitempty"`
}
OutputConfig contains the configuration for the output
type PagerDutyConfig ¶
type PagerDutyConfig struct {
IntegrationKey *string `json:"integrationKey" validate:"required,hexadecimal,len=32"`
}
PagerDutyConfig defines options for each PagerDuty output
type SlackConfig ¶
type SlackConfig struct {
WebhookURL *string `json:"webhookURL" validate:"required,url"` // https://hooks.slack.com/services/...
}
SlackConfig defines options for each Slack output.
type SnsConfig ¶
type SnsConfig struct {
TopicArn *string `json:"topicArn" validate:"required,snsArn"`
}
SnsConfig defines options for each SNS topic output
type SqsConfig ¶
type SqsConfig struct {
QueueURL *string `json:"queueUrl" validate:"required,url"`
}
SqsConfig defines options for each Sqs topic output
type UpdateOutputInput ¶
type UpdateOutputInput struct {
UserID *string `json:"userId" validate:"required,uuid4"`
DisplayName *string `json:"displayName" validate:"required,min=1,excludesall='<>&\""`
OutputID *string `json:"outputId" validate:"required,uuid4"`
OutputConfig *OutputConfig `json:"outputConfig" validate:"required"`
DefaultForSeverity []*string `json:"defaultForSeverity"`
}
UpdateOutputInput updates an alert output configuration.
Example:
{
"updateOutput": {
"userId": "9d1c5854-f3ea-491c-8a52-0aa0d58cb456",
"outputId": "7d1c5854-f3ea-491c-8a52-0aa0d58cb456"
}
}
type UpdateOutputOutput ¶
type UpdateOutputOutput = AlertOutput
UpdateOutputOutput returns the new updated output
Example:
{
"displayName": "alert-channel",
"outputId": "7d1c5854-f3ea-491c-8a52-0aa0d58cb456",
"outputType": "slack"
}