sentry

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2026 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultBaseURL = "https://sentry.io"

	ResourceTypeProject     = "project"
	ResourceTypeTeam        = "team"
	ResourceTypeIssue       = "issue"
	ResourceTypeAssignee    = "assignee"
	ResourceTypeAlert       = "alert"
	ResourceTypeAlertTarget = "alert-target"
	ResourceTypeRelease     = "release"

	SentryPersonalTokensURL = "https://sentry.io/settings/account/api/auth-tokens/"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AlertNotificationConfiguration

type AlertNotificationConfiguration struct {
	TargetType       string `json:"targetType" mapstructure:"targetType"`
	TargetIdentifier string `json:"targetIdentifier" mapstructure:"targetIdentifier"`
}

type AlertRuleNodeMetadata

type AlertRuleNodeMetadata struct {
	Project   *ProjectSummary `json:"project,omitempty" mapstructure:"project"`
	AlertName string          `json:"alertName,omitempty" mapstructure:"alertName"`
}

type AlertThresholdConfiguration

type AlertThresholdConfiguration struct {
	Threshold        *float64                       `json:"threshold" mapstructure:"threshold"`
	ResolveThreshold *float64                       `json:"resolveThreshold" mapstructure:"resolveThreshold"`
	Notification     AlertNotificationConfiguration `json:"notification" mapstructure:"notification"`
}

type AssigneeResource

type AssigneeResource struct {
	ID   string
	Name string
}

type AuthIdentity

type AuthIdentity struct {
	ID       string `json:"id" mapstructure:"id"`
	Name     string `json:"name" mapstructure:"name"`
	Username string `json:"username" mapstructure:"username"`
	Email    string `json:"email" mapstructure:"email"`
}

type Client

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

func NewAPIClient

func NewAPIClient(httpContext core.HTTPContext, baseURL, userToken string) *Client

func NewClient

func NewClient(httpContext core.HTTPContext, integration core.IntegrationContext) (*Client, error)

func (*Client) CreateAlertRule

func (c *Client) CreateAlertRule(request CreateOrUpdateMetricAlertRuleRequest) (*MetricAlertRule, error)

func (*Client) CreateDeploy

func (c *Client) CreateDeploy(version string, request CreateDeployRequest) (*Deploy, error)

func (*Client) CreateRelease

func (c *Client) CreateRelease(request CreateReleaseRequest) (*Release, error)

func (*Client) DeleteAlertRule

func (c *Client) DeleteAlertRule(alertRuleID string) error

func (*Client) GetAlertRule

func (c *Client) GetAlertRule(alertRuleID string) (*MetricAlertRule, error)

func (*Client) GetAuthIdentity

func (c *Client) GetAuthIdentity() (*AuthIdentity, error)

func (*Client) GetIssue

func (c *Client) GetIssue(issueID string) (*Issue, error)

func (*Client) GetOrganization

func (c *Client) GetOrganization() (*Organization, error)

func (*Client) ListAlertRules

func (c *Client) ListAlertRules() ([]MetricAlertRule, error)

func (*Client) ListIssueEvents

func (c *Client) ListIssueEvents(issueID string) ([]IssueEvent, error)

func (*Client) ListIssues

func (c *Client) ListIssues() ([]Issue, error)

func (*Client) ListOrganizations

func (c *Client) ListOrganizations() ([]Organization, error)

func (*Client) ListProjectAssignees

func (c *Client) ListProjectAssignees(projectSlug string) ([]AssigneeResource, error)

func (*Client) ListProjectMembers

func (c *Client) ListProjectMembers(projectSlug string) ([]ProjectMember, error)

func (*Client) ListProjectTeams

func (c *Client) ListProjectTeams(projectSlug string) ([]Team, error)

func (*Client) ListProjects

func (c *Client) ListProjects() ([]ProjectSummary, error)

func (*Client) ListReleases

func (c *Client) ListReleases() ([]Release, error)

func (*Client) ListSentryApps

func (c *Client) ListSentryApps(orgSlug string) ([]SentryApp, error)

func (*Client) ListTeams

func (c *Client) ListTeams() ([]TeamSummary, error)

func (*Client) UpdateAlertRule

func (c *Client) UpdateAlertRule(alertRuleID string, request CreateOrUpdateMetricAlertRuleRequest) (*MetricAlertRule, error)

func (*Client) UpdateIssue

func (c *Client) UpdateIssue(issueID string, request UpdateIssueRequest) (*Issue, error)

func (*Client) UpdateSentryApp

func (c *Client) UpdateSentryApp(appSlug string, request UpdateSentryAppRequest) (*SentryApp, error)

func (*Client) ValidateReleaseAccess

func (c *Client) ValidateReleaseAccess() error

type Configuration

type Configuration struct {
	BaseURL         string `json:"baseUrl" mapstructure:"baseUrl"`
	IntegrationName string `json:"integrationName" mapstructure:"integrationName"`
	UserToken       string `json:"userToken" mapstructure:"userToken"`
	ClientSecret    string `json:"clientSecret" mapstructure:"clientSecret"`
}

type CreateAlert

type CreateAlert struct{}

func (*CreateAlert) Actions

func (c *CreateAlert) Actions() []core.Action

func (*CreateAlert) Cancel

func (c *CreateAlert) Cancel(ctx core.ExecutionContext) error

func (*CreateAlert) Cleanup

func (c *CreateAlert) Cleanup(ctx core.SetupContext) error

func (*CreateAlert) Color

func (c *CreateAlert) Color() string

func (*CreateAlert) Configuration

func (c *CreateAlert) Configuration() []configuration.Field

func (*CreateAlert) Description

func (c *CreateAlert) Description() string

func (*CreateAlert) Documentation

func (c *CreateAlert) Documentation() string

func (*CreateAlert) ExampleOutput

func (c *CreateAlert) ExampleOutput() map[string]any

func (*CreateAlert) Execute

func (c *CreateAlert) Execute(ctx core.ExecutionContext) error

func (*CreateAlert) HandleAction

func (c *CreateAlert) HandleAction(ctx core.ActionContext) error

func (*CreateAlert) HandleWebhook

func (*CreateAlert) Icon

func (c *CreateAlert) Icon() string

func (*CreateAlert) Label

func (c *CreateAlert) Label() string

func (*CreateAlert) Name

func (c *CreateAlert) Name() string

func (*CreateAlert) OutputChannels

func (c *CreateAlert) OutputChannels(configuration any) []core.OutputChannel

func (*CreateAlert) ProcessQueueItem

func (c *CreateAlert) ProcessQueueItem(ctx core.ProcessQueueContext) (*uuid.UUID, error)

func (*CreateAlert) Setup

func (c *CreateAlert) Setup(ctx core.SetupContext) error

type CreateAlertConfiguration

type CreateAlertConfiguration struct {
	Project       string                      `json:"project" mapstructure:"project"`
	Name          string                      `json:"name" mapstructure:"name"`
	Aggregate     string                      `json:"aggregate" mapstructure:"aggregate"`
	Query         string                      `json:"query" mapstructure:"query"`
	TimeWindow    float64                     `json:"timeWindow" mapstructure:"timeWindow"`
	ThresholdType string                      `json:"thresholdType" mapstructure:"thresholdType"`
	Environment   string                      `json:"environment" mapstructure:"environment"`
	EventTypes    []string                    `json:"eventTypes" mapstructure:"eventTypes"`
	Critical      AlertThresholdConfiguration `json:"critical" mapstructure:"critical"`
	Warning       AlertThresholdConfiguration `json:"warning" mapstructure:"warning"`
}

type CreateDeploy

type CreateDeploy struct{}

func (*CreateDeploy) Actions

func (c *CreateDeploy) Actions() []core.Action

func (*CreateDeploy) Cancel

func (c *CreateDeploy) Cancel(ctx core.ExecutionContext) error

func (*CreateDeploy) Cleanup

func (c *CreateDeploy) Cleanup(ctx core.SetupContext) error

func (*CreateDeploy) Color

func (c *CreateDeploy) Color() string

func (*CreateDeploy) Configuration

func (c *CreateDeploy) Configuration() []configuration.Field

func (*CreateDeploy) Description

func (c *CreateDeploy) Description() string

func (*CreateDeploy) Documentation

func (c *CreateDeploy) Documentation() string

func (*CreateDeploy) ExampleOutput

func (c *CreateDeploy) ExampleOutput() map[string]any

func (*CreateDeploy) Execute

func (c *CreateDeploy) Execute(ctx core.ExecutionContext) error

func (*CreateDeploy) HandleAction

func (c *CreateDeploy) HandleAction(ctx core.ActionContext) error

func (*CreateDeploy) HandleWebhook

func (*CreateDeploy) Icon

func (c *CreateDeploy) Icon() string

func (*CreateDeploy) Label

func (c *CreateDeploy) Label() string

func (*CreateDeploy) Name

func (c *CreateDeploy) Name() string

func (*CreateDeploy) OutputChannels

func (c *CreateDeploy) OutputChannels(configuration any) []core.OutputChannel

func (*CreateDeploy) ProcessQueueItem

func (c *CreateDeploy) ProcessQueueItem(ctx core.ProcessQueueContext) (*uuid.UUID, error)

func (*CreateDeploy) Setup

func (c *CreateDeploy) Setup(ctx core.SetupContext) error

type CreateDeployConfiguration

type CreateDeployConfiguration struct {
	Project        string `json:"project" mapstructure:"project"`
	ReleaseVersion string `json:"releaseVersion" mapstructure:"releaseVersion"`
	Environment    string `json:"environment" mapstructure:"environment"`
	Name           string `json:"name" mapstructure:"name"`
	URL            string `json:"url" mapstructure:"url"`
	DateStarted    string `json:"dateStarted" mapstructure:"dateStarted"`
	DateFinished   string `json:"dateFinished" mapstructure:"dateFinished"`
}

type CreateDeployNodeMetadata

type CreateDeployNodeMetadata struct {
	Project *ProjectSummary `json:"project,omitempty" mapstructure:"project"`
}

type CreateDeployRequest

type CreateDeployRequest struct {
	Environment  string   `json:"environment"`
	Name         string   `json:"name,omitempty"`
	URL          string   `json:"url,omitempty"`
	Projects     []string `json:"projects,omitempty"`
	DateStarted  string   `json:"dateStarted,omitempty"`
	DateFinished string   `json:"dateFinished,omitempty"`
}

type CreateOrUpdateMetricAlertRuleRequest

type CreateOrUpdateMetricAlertRuleRequest struct {
	Name             string                    `json:"name"`
	Aggregate        string                    `json:"aggregate"`
	TimeWindow       int                       `json:"timeWindow"`
	Projects         []string                  `json:"projects"`
	Query            string                    `json:"query"`
	ThresholdType    int                       `json:"thresholdType"`
	Triggers         []MetricAlertTriggerInput `json:"triggers"`
	Environment      string                    `json:"environment,omitempty"`
	Dataset          string                    `json:"dataset,omitempty"`
	QueryType        *int                      `json:"queryType,omitempty"`
	EventTypes       []string                  `json:"eventTypes,omitempty"`
	ComparisonDelta  *int                      `json:"comparisonDelta,omitempty"`
	ResolveThreshold *float64                  `json:"resolveThreshold,omitempty"`
	Owner            string                    `json:"owner,omitempty"`
}

type CreateRelease

type CreateRelease struct{}

func (*CreateRelease) Actions

func (c *CreateRelease) Actions() []core.Action

func (*CreateRelease) Cancel

func (c *CreateRelease) Cancel(ctx core.ExecutionContext) error

func (*CreateRelease) Cleanup

func (c *CreateRelease) Cleanup(ctx core.SetupContext) error

func (*CreateRelease) Color

func (c *CreateRelease) Color() string

func (*CreateRelease) Configuration

func (c *CreateRelease) Configuration() []configuration.Field

func (*CreateRelease) Description

func (c *CreateRelease) Description() string

func (*CreateRelease) Documentation

func (c *CreateRelease) Documentation() string

func (*CreateRelease) ExampleOutput

func (c *CreateRelease) ExampleOutput() map[string]any

func (*CreateRelease) Execute

func (c *CreateRelease) Execute(ctx core.ExecutionContext) error

func (*CreateRelease) HandleAction

func (c *CreateRelease) HandleAction(ctx core.ActionContext) error

func (*CreateRelease) HandleWebhook

func (*CreateRelease) Icon

func (c *CreateRelease) Icon() string

func (*CreateRelease) Label

func (c *CreateRelease) Label() string

func (*CreateRelease) Name

func (c *CreateRelease) Name() string

func (*CreateRelease) OutputChannels

func (c *CreateRelease) OutputChannels(configuration any) []core.OutputChannel

func (*CreateRelease) ProcessQueueItem

func (c *CreateRelease) ProcessQueueItem(ctx core.ProcessQueueContext) (*uuid.UUID, error)

func (*CreateRelease) Setup

func (c *CreateRelease) Setup(ctx core.SetupContext) error

type CreateReleaseCommitConfiguration

type CreateReleaseCommitConfiguration struct {
	ID          string `json:"id" mapstructure:"id"`
	Repository  string `json:"repository" mapstructure:"repository"`
	Message     string `json:"message" mapstructure:"message"`
	AuthorName  string `json:"authorName" mapstructure:"authorName"`
	AuthorEmail string `json:"authorEmail" mapstructure:"authorEmail"`
	Timestamp   string `json:"timestamp" mapstructure:"timestamp"`
}

type CreateReleaseConfiguration

type CreateReleaseConfiguration struct {
	Project string                             `json:"project" mapstructure:"project"`
	Version string                             `json:"version" mapstructure:"version"`
	Ref     string                             `json:"ref" mapstructure:"ref"`
	URL     string                             `json:"url" mapstructure:"url"`
	Commits []CreateReleaseCommitConfiguration `json:"commits" mapstructure:"commits"`
	Refs    []CreateReleaseRefConfiguration    `json:"refs" mapstructure:"refs"`
}

type CreateReleaseNodeMetadata

type CreateReleaseNodeMetadata struct {
	Project *ProjectSummary `json:"project,omitempty" mapstructure:"project"`
}

type CreateReleaseRefConfiguration

type CreateReleaseRefConfiguration struct {
	Repository     string `json:"repository" mapstructure:"repository"`
	Commit         string `json:"commit" mapstructure:"commit"`
	PreviousCommit string `json:"previousCommit" mapstructure:"previousCommit"`
}

type CreateReleaseRequest

type CreateReleaseRequest struct {
	Version      string          `json:"version"`
	Projects     []string        `json:"projects"`
	Ref          string          `json:"ref,omitempty"`
	URL          string          `json:"url,omitempty"`
	DateReleased string          `json:"dateReleased,omitempty"`
	Commits      []ReleaseCommit `json:"commits,omitempty"`
	Refs         []ReleaseRef    `json:"refs,omitempty"`
}

type DeleteAlert

type DeleteAlert struct{}

func (*DeleteAlert) Actions

func (c *DeleteAlert) Actions() []core.Action

func (*DeleteAlert) Cancel

func (c *DeleteAlert) Cancel(ctx core.ExecutionContext) error

func (*DeleteAlert) Cleanup

func (c *DeleteAlert) Cleanup(ctx core.SetupContext) error

func (*DeleteAlert) Color

func (c *DeleteAlert) Color() string

func (*DeleteAlert) Configuration

func (c *DeleteAlert) Configuration() []configuration.Field

func (*DeleteAlert) Description

func (c *DeleteAlert) Description() string

func (*DeleteAlert) Documentation

func (c *DeleteAlert) Documentation() string

func (*DeleteAlert) ExampleOutput

func (c *DeleteAlert) ExampleOutput() map[string]any

func (*DeleteAlert) Execute

func (c *DeleteAlert) Execute(ctx core.ExecutionContext) error

func (*DeleteAlert) HandleAction

func (c *DeleteAlert) HandleAction(ctx core.ActionContext) error

func (*DeleteAlert) HandleWebhook

func (*DeleteAlert) Icon

func (c *DeleteAlert) Icon() string

func (*DeleteAlert) Label

func (c *DeleteAlert) Label() string

func (*DeleteAlert) Name

func (c *DeleteAlert) Name() string

func (*DeleteAlert) OutputChannels

func (c *DeleteAlert) OutputChannels(configuration any) []core.OutputChannel

func (*DeleteAlert) ProcessQueueItem

func (c *DeleteAlert) ProcessQueueItem(ctx core.ProcessQueueContext) (*uuid.UUID, error)

func (*DeleteAlert) Setup

func (c *DeleteAlert) Setup(ctx core.SetupContext) error

type DeleteAlertConfiguration

type DeleteAlertConfiguration struct {
	Project string `json:"project" mapstructure:"project"`
	AlertID string `json:"alertId" mapstructure:"alertId"`
}

type DeleteAlertOutput

type DeleteAlertOutput struct {
	ID      string `json:"id" mapstructure:"id"`
	Name    string `json:"name" mapstructure:"name"`
	Deleted bool   `json:"deleted" mapstructure:"deleted"`
}

type Deploy

type Deploy struct {
	ID             string   `json:"id" mapstructure:"id"`
	Environment    string   `json:"environment" mapstructure:"environment"`
	Name           string   `json:"name" mapstructure:"name"`
	URL            string   `json:"url" mapstructure:"url"`
	DateStarted    string   `json:"dateStarted" mapstructure:"dateStarted"`
	DateFinished   string   `json:"dateFinished" mapstructure:"dateFinished"`
	ReleaseVersion string   `json:"releaseVersion,omitempty" mapstructure:"releaseVersion"`
	Projects       []string `json:"projects,omitempty" mapstructure:"projects"`
}

type GetAlert

type GetAlert struct{}

func (*GetAlert) Actions

func (c *GetAlert) Actions() []core.Action

func (*GetAlert) Cancel

func (c *GetAlert) Cancel(ctx core.ExecutionContext) error

func (*GetAlert) Cleanup

func (c *GetAlert) Cleanup(ctx core.SetupContext) error

func (*GetAlert) Color

func (c *GetAlert) Color() string

func (*GetAlert) Configuration

func (c *GetAlert) Configuration() []configuration.Field

func (*GetAlert) Description

func (c *GetAlert) Description() string

func (*GetAlert) Documentation

func (c *GetAlert) Documentation() string

func (*GetAlert) ExampleOutput

func (c *GetAlert) ExampleOutput() map[string]any

func (*GetAlert) Execute

func (c *GetAlert) Execute(ctx core.ExecutionContext) error

func (*GetAlert) HandleAction

func (c *GetAlert) HandleAction(ctx core.ActionContext) error

func (*GetAlert) HandleWebhook

func (*GetAlert) Icon

func (c *GetAlert) Icon() string

func (*GetAlert) Label

func (c *GetAlert) Label() string

func (*GetAlert) Name

func (c *GetAlert) Name() string

func (*GetAlert) OutputChannels

func (c *GetAlert) OutputChannels(configuration any) []core.OutputChannel

func (*GetAlert) ProcessQueueItem

func (c *GetAlert) ProcessQueueItem(ctx core.ProcessQueueContext) (*uuid.UUID, error)

func (*GetAlert) Setup

func (c *GetAlert) Setup(ctx core.SetupContext) error

type GetAlertConfiguration

type GetAlertConfiguration struct {
	Project string `json:"project" mapstructure:"project"`
	AlertID string `json:"alertId" mapstructure:"alertId"`
}

type GetAlertNodeMetadata

type GetAlertNodeMetadata struct {
	Project   *ProjectSummary `json:"project,omitempty" mapstructure:"project"`
	AlertName string          `json:"alertName,omitempty" mapstructure:"alertName"`
}

type GetIssue

type GetIssue struct{}

func (*GetIssue) Actions

func (c *GetIssue) Actions() []core.Action

func (*GetIssue) Cancel

func (c *GetIssue) Cancel(ctx core.ExecutionContext) error

func (*GetIssue) Cleanup

func (c *GetIssue) Cleanup(ctx core.SetupContext) error

func (*GetIssue) Color

func (c *GetIssue) Color() string

func (*GetIssue) Configuration

func (c *GetIssue) Configuration() []configuration.Field

func (*GetIssue) Description

func (c *GetIssue) Description() string

func (*GetIssue) Documentation

func (c *GetIssue) Documentation() string

func (*GetIssue) ExampleOutput

func (c *GetIssue) ExampleOutput() map[string]any

func (*GetIssue) Execute

func (c *GetIssue) Execute(ctx core.ExecutionContext) error

func (*GetIssue) HandleAction

func (c *GetIssue) HandleAction(ctx core.ActionContext) error

func (*GetIssue) HandleWebhook

func (*GetIssue) Icon

func (c *GetIssue) Icon() string

func (*GetIssue) Label

func (c *GetIssue) Label() string

func (*GetIssue) Name

func (c *GetIssue) Name() string

func (*GetIssue) OutputChannels

func (c *GetIssue) OutputChannels(configuration any) []core.OutputChannel

func (*GetIssue) ProcessQueueItem

func (c *GetIssue) ProcessQueueItem(ctx core.ProcessQueueContext) (*uuid.UUID, error)

func (*GetIssue) Setup

func (c *GetIssue) Setup(ctx core.SetupContext) error

type GetIssueConfiguration

type GetIssueConfiguration struct {
	IssueID string `json:"issueId" mapstructure:"issueId"`
}

type GetIssueNodeMetadata

type GetIssueNodeMetadata struct {
	IssueTitle string `json:"issueTitle,omitempty" mapstructure:"issueTitle"`
}

type Issue

type Issue struct {
	ID            string         `json:"id" mapstructure:"id"`
	ShortID       string         `json:"shortId" mapstructure:"shortId"`
	Title         string         `json:"title" mapstructure:"title"`
	Count         string         `json:"count" mapstructure:"count"`
	Status        string         `json:"status" mapstructure:"status"`
	Priority      string         `json:"priority" mapstructure:"priority"`
	HasSeen       bool           `json:"hasSeen" mapstructure:"hasSeen"`
	IsPublic      bool           `json:"isPublic" mapstructure:"isPublic"`
	IsSubscribed  bool           `json:"isSubscribed" mapstructure:"isSubscribed"`
	StatusDetails any            `json:"statusDetails" mapstructure:"statusDetails"`
	NumComments   int            `json:"numComments" mapstructure:"numComments"`
	UserCount     int            `json:"userCount" mapstructure:"userCount"`
	Permalink     string         `json:"permalink" mapstructure:"permalink"`
	WebURL        string         `json:"web_url" mapstructure:"web_url"`
	Metadata      map[string]any `json:"metadata" mapstructure:"metadata"`
	Tags          []IssueTag     `json:"tags" mapstructure:"tags"`
	Stats         map[string]any `json:"stats" mapstructure:"stats"`
	Events        []IssueEvent   `json:"events,omitempty" mapstructure:"events"`
	AssignedTo    *IssueAssignee `json:"assignedTo" mapstructure:"assignedTo"`
	Project       *IssueProject  `json:"project" mapstructure:"project"`
}

type IssueAssignee

type IssueAssignee struct {
	Type  string `json:"type" mapstructure:"type"`
	ID    string `json:"id" mapstructure:"id"`
	Name  string `json:"name" mapstructure:"name"`
	Email string `json:"email" mapstructure:"email"`
}

type IssueEvent

type IssueEvent struct {
	ID          string         `json:"id" mapstructure:"id"`
	EventID     string         `json:"eventID" mapstructure:"eventID"`
	Title       string         `json:"title" mapstructure:"title"`
	Message     string         `json:"message" mapstructure:"message"`
	DateCreated string         `json:"dateCreated" mapstructure:"dateCreated"`
	Platform    string         `json:"platform" mapstructure:"platform"`
	Location    string         `json:"location" mapstructure:"location"`
	Culprit     string         `json:"culprit" mapstructure:"culprit"`
	Tags        []IssueTag     `json:"tags" mapstructure:"tags"`
	User        map[string]any `json:"user" mapstructure:"user"`
}

type IssueProject

type IssueProject struct {
	ID   string `json:"id" mapstructure:"id"`
	Name string `json:"name" mapstructure:"name"`
	Slug string `json:"slug" mapstructure:"slug"`
}

type IssueTag

type IssueTag struct {
	Key   string `json:"key" mapstructure:"key"`
	Value string `json:"value" mapstructure:"value"`
}

type ListAlerts

type ListAlerts struct{}

func (*ListAlerts) Actions

func (c *ListAlerts) Actions() []core.Action

func (*ListAlerts) Cancel

func (c *ListAlerts) Cancel(ctx core.ExecutionContext) error

func (*ListAlerts) Cleanup

func (c *ListAlerts) Cleanup(ctx core.SetupContext) error

func (*ListAlerts) Color

func (c *ListAlerts) Color() string

func (*ListAlerts) Configuration

func (c *ListAlerts) Configuration() []configuration.Field

func (*ListAlerts) Description

func (c *ListAlerts) Description() string

func (*ListAlerts) Documentation

func (c *ListAlerts) Documentation() string

func (*ListAlerts) ExampleOutput

func (c *ListAlerts) ExampleOutput() map[string]any

func (*ListAlerts) Execute

func (c *ListAlerts) Execute(ctx core.ExecutionContext) error

func (*ListAlerts) HandleAction

func (c *ListAlerts) HandleAction(ctx core.ActionContext) error

func (*ListAlerts) HandleWebhook

func (*ListAlerts) Icon

func (c *ListAlerts) Icon() string

func (*ListAlerts) Label

func (c *ListAlerts) Label() string

func (*ListAlerts) Name

func (c *ListAlerts) Name() string

func (*ListAlerts) OutputChannels

func (c *ListAlerts) OutputChannels(configuration any) []core.OutputChannel

func (*ListAlerts) ProcessQueueItem

func (c *ListAlerts) ProcessQueueItem(ctx core.ProcessQueueContext) (*uuid.UUID, error)

func (*ListAlerts) Setup

func (c *ListAlerts) Setup(ctx core.SetupContext) error

type ListAlertsConfiguration

type ListAlertsConfiguration struct {
	Project string `json:"project" mapstructure:"project"`
}

type ListAlertsNodeMetadata

type ListAlertsNodeMetadata struct {
	Project *ProjectSummary `json:"project,omitempty" mapstructure:"project"`
}

type ListAlertsOutput

type ListAlertsOutput struct {
	Alerts []MetricAlertRule `json:"alerts" mapstructure:"alerts"`
}

type Metadata

type Metadata struct {
	AppSlug      string               `json:"appSlug" mapstructure:"appSlug"`
	Organization *OrganizationSummary `json:"organization,omitempty" mapstructure:"organization,omitempty"`
	Projects     []ProjectSummary     `json:"projects" mapstructure:"projects"`
	Teams        []TeamSummary        `json:"teams" mapstructure:"teams"`
}

type MetricAlertAction

type MetricAlertAction struct {
	ID                 string  `json:"id" mapstructure:"id"`
	AlertRuleTriggerID string  `json:"alertRuleTriggerId" mapstructure:"alertRuleTriggerId"`
	Type               string  `json:"type" mapstructure:"type"`
	TargetType         string  `json:"targetType" mapstructure:"targetType"`
	TargetIdentifier   string  `json:"targetIdentifier" mapstructure:"targetIdentifier"`
	InputChannelID     *string `json:"inputChannelId" mapstructure:"inputChannelId"`
	IntegrationID      *string `json:"integrationId" mapstructure:"integrationId"`
	SentryAppID        any     `json:"sentryAppId" mapstructure:"sentryAppId"`
	Priority           *string `json:"priority" mapstructure:"priority"`
	DateCreated        string  `json:"dateCreated" mapstructure:"dateCreated"`
}

type MetricAlertActionInput

type MetricAlertActionInput struct {
	Type             string  `json:"type"`
	TargetType       string  `json:"targetType"`
	TargetIdentifier string  `json:"targetIdentifier"`
	InputChannelID   *string `json:"inputChannelId,omitempty"`
	IntegrationID    *string `json:"integrationId,omitempty"`
	SentryAppID      *string `json:"sentryAppId,omitempty"`
	Priority         *string `json:"priority,omitempty"`
}

type MetricAlertRule

type MetricAlertRule struct {
	ID               string                    `json:"id" mapstructure:"id"`
	Name             string                    `json:"name" mapstructure:"name"`
	OrganizationID   string                    `json:"organizationId" mapstructure:"organizationId"`
	QueryType        int                       `json:"queryType" mapstructure:"queryType"`
	Dataset          string                    `json:"dataset" mapstructure:"dataset"`
	Query            string                    `json:"query" mapstructure:"query"`
	Aggregate        string                    `json:"aggregate" mapstructure:"aggregate"`
	ThresholdType    int                       `json:"thresholdType" mapstructure:"thresholdType"`
	ResolveThreshold any                       `json:"resolveThreshold" mapstructure:"resolveThreshold"`
	TimeWindow       float64                   `json:"timeWindow" mapstructure:"timeWindow"`
	Environment      any                       `json:"environment" mapstructure:"environment"`
	Projects         []string                  `json:"projects" mapstructure:"projects"`
	Owner            *string                   `json:"owner" mapstructure:"owner"`
	OriginalRuleID   any                       `json:"originalAlertRuleId" mapstructure:"originalAlertRuleId"`
	ComparisonDelta  any                       `json:"comparisonDelta" mapstructure:"comparisonDelta"`
	DateModified     string                    `json:"dateModified" mapstructure:"dateModified"`
	DateCreated      string                    `json:"dateCreated" mapstructure:"dateCreated"`
	CreatedBy        *MetricAlertRuleCreatedBy `json:"createdBy" mapstructure:"createdBy"`
	EventTypes       []string                  `json:"eventTypes" mapstructure:"eventTypes"`
	Triggers         []MetricAlertTrigger      `json:"triggers" mapstructure:"triggers"`
}

type MetricAlertRuleCreatedBy

type MetricAlertRuleCreatedBy struct {
	ID    any    `json:"id" mapstructure:"id"`
	Name  string `json:"name" mapstructure:"name"`
	Email string `json:"email" mapstructure:"email"`
}

type MetricAlertTrigger

type MetricAlertTrigger struct {
	ID               string              `json:"id" mapstructure:"id"`
	AlertRuleID      string              `json:"alertRuleId" mapstructure:"alertRuleId"`
	Label            string              `json:"label" mapstructure:"label"`
	ThresholdType    int                 `json:"thresholdType" mapstructure:"thresholdType"`
	AlertThreshold   any                 `json:"alertThreshold" mapstructure:"alertThreshold"`
	ResolveThreshold any                 `json:"resolveThreshold" mapstructure:"resolveThreshold"`
	DateCreated      string              `json:"dateCreated" mapstructure:"dateCreated"`
	Actions          []MetricAlertAction `json:"actions" mapstructure:"actions"`
}

type MetricAlertTriggerInput

type MetricAlertTriggerInput struct {
	Label            string                   `json:"label"`
	AlertThreshold   float64                  `json:"alertThreshold"`
	ResolveThreshold *float64                 `json:"resolveThreshold,omitempty"`
	Actions          []MetricAlertActionInput `json:"actions"`
}

type OnIssue

type OnIssue struct{}

func (*OnIssue) Actions

func (t *OnIssue) Actions() []core.Action

func (*OnIssue) Cleanup

func (t *OnIssue) Cleanup(ctx core.TriggerContext) error

func (*OnIssue) Color

func (t *OnIssue) Color() string

func (*OnIssue) Configuration

func (t *OnIssue) Configuration() []configuration.Field

func (*OnIssue) Description

func (t *OnIssue) Description() string

func (*OnIssue) Documentation

func (t *OnIssue) Documentation() string

func (*OnIssue) ExampleData

func (t *OnIssue) ExampleData() map[string]any

func (*OnIssue) HandleAction

func (t *OnIssue) HandleAction(ctx core.TriggerActionContext) (map[string]any, error)

func (*OnIssue) HandleWebhook

func (t *OnIssue) HandleWebhook(ctx core.WebhookRequestContext) (int, *core.WebhookResponseBody, error)

func (*OnIssue) Icon

func (t *OnIssue) Icon() string

func (*OnIssue) Label

func (t *OnIssue) Label() string

func (*OnIssue) Name

func (t *OnIssue) Name() string

func (*OnIssue) OnIntegrationMessage

func (t *OnIssue) OnIntegrationMessage(ctx core.IntegrationMessageContext) error

func (*OnIssue) Setup

func (t *OnIssue) Setup(ctx core.TriggerContext) error

type OnIssueConfiguration

type OnIssueConfiguration struct {
	Project string   `json:"project" mapstructure:"project"`
	Actions []string `json:"actions" mapstructure:"actions"`
}

type OnIssueMetadata

type OnIssueMetadata struct {
	AppSubscriptionID *string         `json:"appSubscriptionID,omitempty" mapstructure:"appSubscriptionID,omitempty"`
	Project           *ProjectSummary `json:"project,omitempty" mapstructure:"project,omitempty"`
}

type Organization

type Organization struct {
	ID   string `json:"id" mapstructure:"id"`
	Slug string `json:"slug" mapstructure:"slug"`
	Name string `json:"name" mapstructure:"name"`
}

type OrganizationSummary

type OrganizationSummary struct {
	ID   string `json:"id" mapstructure:"id"`
	Slug string `json:"slug" mapstructure:"slug"`
	Name string `json:"name" mapstructure:"name"`
}

type Project

type Project struct {
	ID   string `json:"id" mapstructure:"id"`
	Slug string `json:"slug" mapstructure:"slug"`
	Name string `json:"name" mapstructure:"name"`
}

type ProjectMember

type ProjectMember struct {
	ID    string `json:"id" mapstructure:"id"`
	Name  string `json:"name" mapstructure:"name"`
	Email string `json:"email" mapstructure:"email"`
	User  *struct {
		ID       string `json:"id" mapstructure:"id"`
		Name     string `json:"name" mapstructure:"name"`
		Username string `json:"username" mapstructure:"username"`
		Email    string `json:"email" mapstructure:"email"`
	} `json:"user" mapstructure:"user"`
}

type ProjectSummary

type ProjectSummary struct {
	ID   string `json:"id" mapstructure:"id"`
	Slug string `json:"slug" mapstructure:"slug"`
	Name string `json:"name" mapstructure:"name"`
}

type Release

type Release struct {
	ID           int              `json:"id" mapstructure:"id"`
	Version      string           `json:"version" mapstructure:"version"`
	ShortVersion string           `json:"shortVersion" mapstructure:"shortVersion"`
	Ref          string           `json:"ref" mapstructure:"ref"`
	URL          string           `json:"url" mapstructure:"url"`
	DateCreated  string           `json:"dateCreated" mapstructure:"dateCreated"`
	DateReleased string           `json:"dateReleased" mapstructure:"dateReleased"`
	CommitCount  int              `json:"commitCount" mapstructure:"commitCount"`
	DeployCount  int              `json:"deployCount" mapstructure:"deployCount"`
	NewGroups    int              `json:"newGroups" mapstructure:"newGroups"`
	Projects     []ReleaseProject `json:"projects" mapstructure:"projects"`
	LastDeploy   *Deploy          `json:"lastDeploy,omitempty" mapstructure:"lastDeploy"`
}

type ReleaseCommit

type ReleaseCommit struct {
	ID          string `json:"id" mapstructure:"id"`
	Repository  string `json:"repository,omitempty" mapstructure:"repository"`
	Message     string `json:"message,omitempty" mapstructure:"message"`
	AuthorName  string `json:"author_name,omitempty" mapstructure:"author_name"`
	AuthorEmail string `json:"author_email,omitempty" mapstructure:"author_email"`
	Timestamp   string `json:"timestamp,omitempty" mapstructure:"timestamp"`
}

type ReleaseProject

type ReleaseProject struct {
	Name string `json:"name" mapstructure:"name"`
	Slug string `json:"slug" mapstructure:"slug"`
}

type ReleaseRef

type ReleaseRef struct {
	Repository     string `json:"repository" mapstructure:"repository"`
	Commit         string `json:"commit" mapstructure:"commit"`
	PreviousCommit string `json:"previousCommit,omitempty" mapstructure:"previousCommit"`
}

type Sentry

type Sentry struct{}

func (*Sentry) Actions

func (s *Sentry) Actions() []core.Action

func (*Sentry) Cleanup

func (s *Sentry) Cleanup(ctx core.IntegrationCleanupContext) error

func (*Sentry) Components

func (s *Sentry) Components() []core.Component

func (*Sentry) Configuration

func (s *Sentry) Configuration() []configuration.Field

func (*Sentry) Description

func (s *Sentry) Description() string

func (*Sentry) HandleAction

func (s *Sentry) HandleAction(ctx core.IntegrationActionContext) error

func (*Sentry) HandleRequest

func (s *Sentry) HandleRequest(ctx core.HTTPRequestContext)

func (*Sentry) Icon

func (s *Sentry) Icon() string

func (*Sentry) Instructions

func (s *Sentry) Instructions() string

func (*Sentry) Label

func (s *Sentry) Label() string

func (*Sentry) ListResources

func (s *Sentry) ListResources(resourceType string, ctx core.ListResourcesContext) ([]core.IntegrationResource, error)

func (*Sentry) Name

func (s *Sentry) Name() string

func (*Sentry) Sync

func (s *Sentry) Sync(ctx core.SyncContext) error

func (*Sentry) Triggers

func (s *Sentry) Triggers() []core.Trigger

type SentryApp

type SentryApp struct {
	Name           string   `json:"name" mapstructure:"name"`
	Slug           string   `json:"slug" mapstructure:"slug"`
	Scopes         []string `json:"scopes" mapstructure:"scopes"`
	Events         []string `json:"events" mapstructure:"events"`
	WebhookURL     string   `json:"webhookUrl" mapstructure:"webhookUrl"`
	RedirectURL    *string  `json:"redirectUrl" mapstructure:"redirectUrl"`
	IsInternal     bool     `json:"isInternal" mapstructure:"isInternal"`
	IsAlertable    bool     `json:"isAlertable" mapstructure:"isAlertable"`
	Overview       *string  `json:"overview" mapstructure:"overview"`
	VerifyInstall  bool     `json:"verifyInstall" mapstructure:"verifyInstall"`
	AllowedOrigins []string `json:"allowedOrigins" mapstructure:"allowedOrigins"`
	Author         string   `json:"author" mapstructure:"author"`
	Schema         any      `json:"schema" mapstructure:"schema"`
	ClientSecret   string   `json:"clientSecret" mapstructure:"clientSecret"`
}

type SubscriptionConfiguration

type SubscriptionConfiguration struct {
	Resources []string `json:"resources" mapstructure:"resources"`
}

type Team

type Team struct {
	ID   string `json:"id" mapstructure:"id"`
	Slug string `json:"slug" mapstructure:"slug"`
	Name string `json:"name" mapstructure:"name"`
}

type TeamSummary

type TeamSummary struct {
	ID   string `json:"id" mapstructure:"id"`
	Slug string `json:"slug" mapstructure:"slug"`
	Name string `json:"name" mapstructure:"name"`
}

type UpdateAlert

type UpdateAlert struct{}

func (*UpdateAlert) Actions

func (c *UpdateAlert) Actions() []core.Action

func (*UpdateAlert) Cancel

func (c *UpdateAlert) Cancel(ctx core.ExecutionContext) error

func (*UpdateAlert) Cleanup

func (c *UpdateAlert) Cleanup(ctx core.SetupContext) error

func (*UpdateAlert) Color

func (c *UpdateAlert) Color() string

func (*UpdateAlert) Configuration

func (c *UpdateAlert) Configuration() []configuration.Field

func (*UpdateAlert) Description

func (c *UpdateAlert) Description() string

func (*UpdateAlert) Documentation

func (c *UpdateAlert) Documentation() string

func (*UpdateAlert) ExampleOutput

func (c *UpdateAlert) ExampleOutput() map[string]any

func (*UpdateAlert) Execute

func (c *UpdateAlert) Execute(ctx core.ExecutionContext) error

func (*UpdateAlert) HandleAction

func (c *UpdateAlert) HandleAction(ctx core.ActionContext) error

func (*UpdateAlert) HandleWebhook

func (*UpdateAlert) Icon

func (c *UpdateAlert) Icon() string

func (*UpdateAlert) Label

func (c *UpdateAlert) Label() string

func (*UpdateAlert) Name

func (c *UpdateAlert) Name() string

func (*UpdateAlert) OutputChannels

func (c *UpdateAlert) OutputChannels(configuration any) []core.OutputChannel

func (*UpdateAlert) ProcessQueueItem

func (c *UpdateAlert) ProcessQueueItem(ctx core.ProcessQueueContext) (*uuid.UUID, error)

func (*UpdateAlert) Setup

func (c *UpdateAlert) Setup(ctx core.SetupContext) error

type UpdateAlertConfiguration

type UpdateAlertConfiguration struct {
	Project       string                      `json:"project" mapstructure:"project"`
	AlertID       string                      `json:"alertId" mapstructure:"alertId"`
	Name          string                      `json:"name" mapstructure:"name"`
	Aggregate     string                      `json:"aggregate" mapstructure:"aggregate"`
	Query         string                      `json:"query" mapstructure:"query"`
	TimeWindow    *float64                    `json:"timeWindow" mapstructure:"timeWindow"`
	ThresholdType string                      `json:"thresholdType" mapstructure:"thresholdType"`
	Environment   string                      `json:"environment" mapstructure:"environment"`
	EventTypes    []string                    `json:"eventTypes" mapstructure:"eventTypes"`
	Critical      AlertThresholdConfiguration `json:"critical" mapstructure:"critical"`
	Warning       AlertThresholdConfiguration `json:"warning" mapstructure:"warning"`
}

type UpdateIssue

type UpdateIssue struct{}

func (*UpdateIssue) Actions

func (c *UpdateIssue) Actions() []core.Action

func (*UpdateIssue) Cancel

func (c *UpdateIssue) Cancel(ctx core.ExecutionContext) error

func (*UpdateIssue) Cleanup

func (c *UpdateIssue) Cleanup(ctx core.SetupContext) error

func (*UpdateIssue) Color

func (c *UpdateIssue) Color() string

func (*UpdateIssue) Configuration

func (c *UpdateIssue) Configuration() []configuration.Field

func (*UpdateIssue) Description

func (c *UpdateIssue) Description() string

func (*UpdateIssue) Documentation

func (c *UpdateIssue) Documentation() string

func (*UpdateIssue) ExampleOutput

func (c *UpdateIssue) ExampleOutput() map[string]any

func (*UpdateIssue) Execute

func (c *UpdateIssue) Execute(ctx core.ExecutionContext) error

func (*UpdateIssue) HandleAction

func (c *UpdateIssue) HandleAction(ctx core.ActionContext) error

func (*UpdateIssue) HandleWebhook

func (*UpdateIssue) Icon

func (c *UpdateIssue) Icon() string

func (*UpdateIssue) Label

func (c *UpdateIssue) Label() string

func (*UpdateIssue) Name

func (c *UpdateIssue) Name() string

func (*UpdateIssue) OutputChannels

func (c *UpdateIssue) OutputChannels(configuration any) []core.OutputChannel

func (*UpdateIssue) ProcessQueueItem

func (c *UpdateIssue) ProcessQueueItem(ctx core.ProcessQueueContext) (*uuid.UUID, error)

func (*UpdateIssue) Setup

func (c *UpdateIssue) Setup(ctx core.SetupContext) error

type UpdateIssueConfiguration

type UpdateIssueConfiguration struct {
	IssueID      string `json:"issueId" mapstructure:"issueId"`
	Status       string `json:"status" mapstructure:"status"`
	Priority     string `json:"priority" mapstructure:"priority"`
	AssignedTo   string `json:"assignedTo" mapstructure:"assignedTo"`
	HasSeen      *bool  `json:"hasSeen,omitempty" mapstructure:"hasSeen"`
	IsPublic     *bool  `json:"isPublic,omitempty" mapstructure:"isPublic"`
	IsSubscribed *bool  `json:"isSubscribed,omitempty" mapstructure:"isSubscribed"`
}

type UpdateIssueNodeMetadata

type UpdateIssueNodeMetadata struct {
	IssueTitle    string `json:"issueTitle,omitempty" mapstructure:"issueTitle"`
	AssigneeLabel string `json:"assigneeLabel,omitempty" mapstructure:"assigneeLabel"`
}

type UpdateIssueRequest

type UpdateIssueRequest struct {
	Status       string `json:"status,omitempty"`
	AssignedTo   string `json:"assignedTo,omitempty"`
	Priority     string `json:"priority,omitempty"`
	HasSeen      *bool  `json:"hasSeen,omitempty"`
	IsPublic     *bool  `json:"isPublic,omitempty"`
	IsSubscribed *bool  `json:"isSubscribed,omitempty"`
}

type UpdateSentryAppRequest

type UpdateSentryAppRequest struct {
	Name           string   `json:"name"`
	Scopes         []string `json:"scopes"`
	Events         []string `json:"events,omitempty"`
	WebhookURL     string   `json:"webhookUrl,omitempty"`
	RedirectURL    *string  `json:"redirectUrl,omitempty"`
	IsInternal     bool     `json:"isInternal"`
	IsAlertable    bool     `json:"isAlertable"`
	Overview       *string  `json:"overview,omitempty"`
	VerifyInstall  bool     `json:"verifyInstall"`
	AllowedOrigins []string `json:"allowedOrigins,omitempty"`
	Author         string   `json:"author,omitempty"`
	Schema         any      `json:"schema,omitempty"`
}

type WebhookInstallation

type WebhookInstallation struct {
	UUID string `json:"uuid" mapstructure:"uuid"`
}

type WebhookMessage

type WebhookMessage struct {
	Resource     string              `json:"resource" mapstructure:"resource"`
	Action       string              `json:"action" mapstructure:"action"`
	Timestamp    string              `json:"timestamp,omitempty" mapstructure:"timestamp,omitempty"`
	Installation WebhookInstallation `json:"installation" mapstructure:"installation"`
	Data         map[string]any      `json:"data" mapstructure:"data"`
	Actor        map[string]any      `json:"actor,omitempty" mapstructure:"actor,omitempty"`
}

Jump to

Keyboard shortcuts

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