sentry

package
v1.0.0-rc2 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2026 License: Apache-2.0 Imports: 34 Imported by: 0

Documentation

Index

Constants

View Source
const (
	IssueEventLatest      = "latest"
	IssueEventRecommended = "recommended"
)
View Source
const (
	SecretAccessToken  = "accessToken"
	SecretRefreshToken = "refreshToken"
)
View Source
const (
	IssueStatusUnresolved            = "unresolved"
	IssueStatusResolved              = "resolved"
	IssueStatusResolvedInNextRelease = "resolvedInNextRelease"
	IssueStatusIgnored               = "ignored"
)
View Source
const (
	DefaultBaseURL = "https://sentry.io"

	ResourceTypeProject           = "project"
	ResourceTypeTeam              = "team"
	ResourceTypeIssue             = "issue"
	ResourceTypeAssignee          = "assignee"
	ResourceTypeAlert             = "alert"
	ResourceTypeAlertTarget       = "alert-target"
	ResourceTypeRelease           = "release"
	ResourceTypeGitHubIntegration = "github-integration"
	ResourceTypeUnresolvedIssue   = "unresolved-issue"

	SentryPersonalTokensURL = "https://sentry.io/settings/account/api/auth-tokens/"
)
View Source
const (
	// HeaderWebhookReceipt carries the stored receipt ID from the public
	// webhook handler into the integration message. It is not a Sentry header.
	HeaderWebhookReceipt = "X-Superplane-Sentry-Receipt"
	// SuperplaneReceiptField is the canvas payload key for that receipt ID.
	SuperplaneReceiptField = "superplaneReceiptId"
)
View Source
const IssuePayloadType = "sentry.issue"

IssuePayloadType is the canvas event type emitted by sentry.onIssue and by Sentry intake seeding.

Variables

This section is empty.

Functions

func EnableHostedInstallBind

func EnableHostedInstallBind(encryptor crypto.Encryptor)

EnableHostedInstallBind lets Sync reuse a ready hosted Sentry connection in the same SuperPlane organization instead of opening Sentry again. The encryptor also protects the install grants that the installation webhook stores for the setup callback.

func FetchedIssueDescription

func FetchedIssueDescription(client *Client, issue any, logger warningLogger) string

FetchedIssueDescription loads the issue and preferred event, then renders IssueDescription. API failures keep the webhook issue and omit the event.

func ForgetKnownHostedInstallation

func ForgetKnownHostedInstallation(installationUUID string) error

ForgetKnownHostedInstallation drops a Sentry install grant after Sentry reports that the organization uninstalled the app.

func HostedAppConfigured

func HostedAppConfigured() bool

func HostedAppExternalInstallURL

func HostedAppExternalInstallURL(slug string) string

func HostedAppInstallURL

func HostedAppInstallURL(baseURL, state string) string

func HostedAppSetupURL

func HostedAppSetupURL(baseURL string) string

func HostedAppWebhookURL

func HostedAppWebhookURL(webhooksBaseURL string) string

func IsRetryableAPIError

func IsRetryableAPIError(err error) bool

IsRetryableAPIError reports whether the consumer should nack the message so Tackle redelivers it. Rate limits, request timeouts, server errors, and transport failures retry. Client errors such as 401, 403, and 404 do not.

func IssueDescription

func IssueDescription(issue any, event *IssueEventDetail) string

IssueDescription renders a Sentry issue and optional full event as a task body. Empty sections are omitted. It does not dump JSON.

func IssueHasWorkOrder

func IssueHasWorkOrder(tx *gorm.DB, factory *models.Factory, issueID string) (bool, error)

IssueHasWorkOrder reports whether this factory already has a work order for the Sentry issue. Matching covers every work-order state.

func IssueIDFromEventData

func IssueIDFromEventData(eventData any) (string, bool)

IssueIDFromEventData reads the Sentry numeric issue ID from a canvas root event envelope. The envelope looks like:

{ "type": "sentry.issue", "data": { "data": { "issue": { "id": "123" } } } }

func IssueIDFromURL

func IssueIDFromURL(rawURL string) (string, bool)

IssueIDFromURL reads the numeric Sentry issue ID from an issue page URL. It accepts `/issues/<id>/` and `/organizations/<org>/issues/<id>/` on sentry.io and on self-hosted instances, with or without a trailing slash or query string. GitHub-style `/owner/repo/issues/<id>` paths are ignored.

func IssueStatusIsSettled

func IssueStatusIsSettled(status string) bool

IssueStatusIsSettled reports whether SuperPlane should leave the Sentry issue alone. A completed task only needs to resolve an open issue.

func IssueURLFragment

func IssueURLFragment(issueID string) string

IssueURLFragment is the origin-URL substring that identifies a Sentry issue. Callers use it for a coarse lookup, then confirm with IssueIDFromURL so `/issues/12` cannot match `/issues/123`.

func LockIssueWorkOrder

func LockIssueWorkOrder(tx *gorm.DB, factory *models.Factory, issueID string) error

LockIssueWorkOrder serializes work-order creation for one Sentry issue in this factory. The lock is held until the caller commits tx.

func ParseInstallationDeletedUUID

func ParseInstallationDeletedUUID(resource string, body []byte) (string, bool)

ParseInstallationDeletedUUID reads the installation UUID Sentry sends on installation.deleted.

func PreferHostedInstall

func PreferHostedInstall(integrationName string, configuration map[string]any) bool

PreferHostedInstall is the default Sentry create path when Cloud holds the public app. A privateApp configuration flag opts out and uses a personal token plus an internal integration.

func ReceiptIDFromEventData

func ReceiptIDFromEventData(eventData any) (uuid.UUID, bool)

ReceiptIDFromEventData reads the SuperPlane webhook receipt ID stored on a sentry.issue canvas event. Sentry does not send this field.

func RememberHostedInstallGrant

func RememberHostedInstallGrant(httpCtx core.HTTPContext, app HostedApp, grant InstallationGrant) error

RememberHostedInstallGrant exchanges a webhook grant and stores tokens until the authenticated setup callback presents the same code.

func StatusCode

func StatusCode(err error) (int, bool)

func StatusError

func StatusError(statusCode int) error

func UseHostedApp

func UseHostedApp() bool

func VerifyWebhookSignature

func VerifyWebhookSignature(signature string, body, secret []byte) error

func WantsPrivateApp

func WantsPrivateApp(integrationName string, configuration map[string]any) bool

func WithHostedSentryWebhookLogged

func WithHostedSentryWebhookLogged(ctx context.Context) context.Context

WithHostedSentryWebhookLogged marks a request the public Sentry app handler already logged. A client cannot set this mark with a header.

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) GetIssueEvent

func (c *Client) GetIssueEvent(issueID, eventID string) (*IssueEventDetail, error)

func (*Client) GetOrganization

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

func (*Client) GetPreferredIssueEvent

func (c *Client) GetPreferredIssueEvent(issueID string) (*IssueEventDetail, error)

GetPreferredIssueEvent returns the latest event, then recommended when latest has no stack and recommended has a stack or more entries.

func (*Client) GetSentryApp

func (c *Client) GetSentryApp(appSlug string) (*SentryApp, error)

func (*Client) LinkExternalIssue added in v0.28.0

func (c *Client) LinkExternalIssue(issueID, integrationID string, request LinkExternalIssueRequest) (*ExternalIssueLink, 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) ListNewestUnresolvedIssues

func (c *Client) ListNewestUnresolvedIssues(project string, limit int) ([]Issue, error)

func (*Client) ListOrganizationIntegrations added in v0.28.0

func (c *Client) ListOrganizationIntegrations(providerKey string) ([]OrganizationIntegration, 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) SearchUnresolvedIssues

func (c *Client) SearchUnresolvedIssues(project, query string, limit int) ([]Issue, error)

SearchUnresolvedIssues lists unresolved issues newest first. A non-empty query is appended to the Sentry search, which matches the issue title, message, and culprit.

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"`
	PrivateApp      bool   `json:"privateApp" mapstructure:"privateApp"`
	SetupReturnPath string `json:"setupReturnPath" mapstructure:"setupReturnPath"`
}

type CreateAlert

type CreateAlert struct{}

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) HandleHook added in v0.18.0

func (c *CreateAlert) HandleHook(ctx core.ActionHookContext) error

func (*CreateAlert) HandleWebhook

func (*CreateAlert) Hooks added in v0.18.0

func (c *CreateAlert) Hooks() []core.Hook

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) 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) 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) HandleHook added in v0.18.0

func (c *CreateDeploy) HandleHook(ctx core.ActionHookContext) error

func (*CreateDeploy) HandleWebhook

func (*CreateDeploy) Hooks added in v0.18.0

func (c *CreateDeploy) Hooks() []core.Hook

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) 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) 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) HandleHook added in v0.18.0

func (c *CreateRelease) HandleHook(ctx core.ActionHookContext) error

func (*CreateRelease) HandleWebhook

func (*CreateRelease) Hooks added in v0.18.0

func (c *CreateRelease) Hooks() []core.Hook

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) 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) 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) HandleHook added in v0.18.0

func (c *DeleteAlert) HandleHook(ctx core.ActionHookContext) error

func (*DeleteAlert) HandleWebhook

func (*DeleteAlert) Hooks added in v0.18.0

func (c *DeleteAlert) Hooks() []core.Hook

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) 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 ExternalIssueLink struct {
	ID            any    `json:"id" mapstructure:"id"`
	Key           string `json:"key" mapstructure:"key"`
	URL           string `json:"url" mapstructure:"url"`
	IntegrationID any    `json:"integrationId" mapstructure:"integrationId"`
	DisplayName   string `json:"displayName" mapstructure:"displayName"`
}

type GetAlert

type GetAlert struct{}

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) HandleHook added in v0.18.0

func (c *GetAlert) HandleHook(ctx core.ActionHookContext) error

func (*GetAlert) HandleWebhook

func (*GetAlert) Hooks added in v0.18.0

func (c *GetAlert) Hooks() []core.Hook

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) 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) 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) HandleHook added in v0.18.0

func (c *GetIssue) HandleHook(ctx core.ActionHookContext) error

func (*GetIssue) HandleWebhook

func (*GetIssue) Hooks added in v0.18.0

func (c *GetIssue) Hooks() []core.Hook

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) 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 HostedApp

type HostedApp struct {
	Slug         string
	ClientID     string
	ClientSecret string
	APIToken     string
}

HostedApp is SuperPlane Cloud's public Sentry app. The process holds the credentials. New integrations store the installation UUID and tokens.

func HostedAppFromEnv

func HostedAppFromEnv() (HostedApp, bool)

HostedAppFromEnv returns the public Sentry app when Cloud holds complete credentials. Self-hosted leaves them empty.

type InstallationGrant

type InstallationGrant struct {
	Code    string
	UUID    string
	OrgSlug string
	OrgID   string
}

InstallationGrant is the one-time install payload Sentry sends on installation.created and on the Redirect URL.

func ParseInstallationCreatedGrant

func ParseInstallationCreatedGrant(resource string, body []byte) (InstallationGrant, bool)

ParseInstallationCreatedGrant reads the grant Sentry sends on installation.created. SuperPlane uses it when the browser Redirect URL never completed.

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"`
	Substatus     string         `json:"substatus" mapstructure:"substatus"`
	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"`
	FirstSeen     string         `json:"firstSeen" mapstructure:"firstSeen"`
	LastSeen      string         `json:"lastSeen" mapstructure:"lastSeen"`
	Culprit       string         `json:"culprit" mapstructure:"culprit"`
	Level         string         `json:"level" mapstructure:"level"`
	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 IssueEventDetail

type IssueEventDetail 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"`
	Type        string            `json:"type" mapstructure:"type"`
	WebURL      string            `json:"web_url" mapstructure:"web_url"`
	Release     IssueEventRelease `json:"release" mapstructure:"release"`
	Tags        []IssueTag        `json:"tags" mapstructure:"tags"`
	User        map[string]any    `json:"user" mapstructure:"user"`
	Contexts    map[string]any    `json:"contexts" mapstructure:"contexts"`
	Context     map[string]any    `json:"context" mapstructure:"context"`
	Extra       map[string]any    `json:"extra" mapstructure:"extra"`
	SDK         map[string]any    `json:"sdk" mapstructure:"sdk"`
	Entries     []IssueEventEntry `json:"entries" mapstructure:"entries"`
}

IssueEventDetail is the full event body from GET .../events/{latest|recommended|id}/. ListIssueEvents returns summaries without entries or stack frames.

func (*IssueEventDetail) EntryCount

func (e *IssueEventDetail) EntryCount() int

func (*IssueEventDetail) HasStack

func (e *IssueEventDetail) HasStack() bool

type IssueEventEntry

type IssueEventEntry struct {
	Type string         `json:"type" mapstructure:"type"`
	Data map[string]any `json:"data" mapstructure:"data"`
}

type IssueEventRelease

type IssueEventRelease struct {
	Version string
}

IssueEventRelease is a Sentry event release. GET .../events/{id}/ returns either a version string or a release object. A type mismatch must not fail the whole event decode.

func (IssueEventRelease) String

func (r IssueEventRelease) String() string

func (*IssueEventRelease) UnmarshalJSON

func (r *IssueEventRelease) UnmarshalJSON(data []byte) error

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 LinkExternalIssueRequest added in v0.28.0

type LinkExternalIssueRequest struct {
	Repo          string `json:"repo"`
	ExternalIssue any    `json:"externalIssue"`
	Comment       string `json:"comment,omitempty"`
}

type LinkGitHubIssue added in v0.28.0

type LinkGitHubIssue struct{}

func (*LinkGitHubIssue) Cancel added in v0.28.0

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

func (*LinkGitHubIssue) Cleanup added in v0.28.0

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

func (*LinkGitHubIssue) Color added in v0.28.0

func (c *LinkGitHubIssue) Color() string

func (*LinkGitHubIssue) Configuration added in v0.28.0

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

func (*LinkGitHubIssue) Description added in v0.28.0

func (c *LinkGitHubIssue) Description() string

func (*LinkGitHubIssue) Documentation added in v0.28.0

func (c *LinkGitHubIssue) Documentation() string

func (*LinkGitHubIssue) ExampleOutput added in v0.28.0

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

func (*LinkGitHubIssue) Execute added in v0.28.0

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

func (*LinkGitHubIssue) HandleHook added in v0.28.0

func (c *LinkGitHubIssue) HandleHook(ctx core.ActionHookContext) error

func (*LinkGitHubIssue) HandleWebhook added in v0.28.0

func (*LinkGitHubIssue) Hooks added in v0.28.0

func (c *LinkGitHubIssue) Hooks() []core.Hook

func (*LinkGitHubIssue) Icon added in v0.28.0

func (c *LinkGitHubIssue) Icon() string

func (*LinkGitHubIssue) Label added in v0.28.0

func (c *LinkGitHubIssue) Label() string

func (*LinkGitHubIssue) Name added in v0.28.0

func (c *LinkGitHubIssue) Name() string

func (*LinkGitHubIssue) OutputChannels added in v0.28.0

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

func (*LinkGitHubIssue) Setup added in v0.28.0

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

type LinkGitHubIssueConfiguration added in v0.28.0

type LinkGitHubIssueConfiguration struct {
	IssueID             string `json:"issueId" mapstructure:"issueId"`
	GitHubIntegrationID string `json:"githubIntegrationId" mapstructure:"githubIntegrationId"`
	Repo                string `json:"repo" mapstructure:"repo"`
	ExternalIssue       string `json:"externalIssue" mapstructure:"externalIssue"`
	Comment             string `json:"comment" mapstructure:"comment"`
}

type LinkGitHubIssueNodeMetadata added in v0.28.0

type LinkGitHubIssueNodeMetadata struct {
	IssueTitle             string `json:"issueTitle,omitempty" mapstructure:"issueTitle"`
	GitHubIntegrationLabel string `json:"githubIntegrationLabel,omitempty" mapstructure:"githubIntegrationLabel"`
	ExternalIssueLabel     string `json:"externalIssueLabel,omitempty" mapstructure:"externalIssueLabel"`
}

type ListAlerts

type ListAlerts struct{}

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) HandleHook added in v0.18.0

func (c *ListAlerts) HandleHook(ctx core.ActionHookContext) error

func (*ListAlerts) HandleWebhook

func (*ListAlerts) Hooks added in v0.18.0

func (c *ListAlerts) Hooks() []core.Hook

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) 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"`
	HostedApp        bool                 `json:"hostedApp,omitempty" mapstructure:"hostedApp,omitempty"`
	State            string               `json:"state,omitempty" mapstructure:"state,omitempty"`
	InstallationUUID string               `json:"installationUUID,omitempty" mapstructure:"installationUUID,omitempty"`
	StartedByUserID  string               `json:"startedByUserID,omitempty" mapstructure:"startedByUserID,omitempty"`
	SetupReturnPath  string               `json:"setupReturnPath,omitempty" mapstructure:"setupReturnPath,omitempty"`
	TokenExpiresAt   string               `json:"tokenExpiresAt,omitempty" mapstructure:"tokenExpiresAt,omitempty"`
}

func (Metadata) AllowsStartedBy

func (m Metadata) AllowsStartedBy(userID string) bool

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) 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) HandleHook added in v0.18.0

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

func (*OnIssue) HandleWebhook

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

func (*OnIssue) Hooks added in v0.18.0

func (t *OnIssue) Hooks() []core.Hook

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 OrganizationIntegration added in v0.28.0

type OrganizationIntegration struct {
	ID       string `json:"id" mapstructure:"id"`
	Name     string `json:"name" mapstructure:"name"`
	Status   string `json:"status" mapstructure:"status"`
	Provider struct {
		Key  string `json:"key" mapstructure:"key"`
		Name string `json:"name" mapstructure:"name"`
	} `json:"provider" mapstructure:"provider"`
}

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) Configuration

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

func (*Sentry) Description

func (s *Sentry) Description() string

func (*Sentry) HandleHook added in v0.18.0

func (s *Sentry) HandleHook(ctx core.IntegrationHookContext) error

func (*Sentry) HandleRequest

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

func (*Sentry) Hooks added in v0.18.0

func (s *Sentry) Hooks() []core.Hook

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) 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) HandleHook added in v0.18.0

func (c *UpdateAlert) HandleHook(ctx core.ActionHookContext) error

func (*UpdateAlert) HandleWebhook

func (*UpdateAlert) Hooks added in v0.18.0

func (c *UpdateAlert) Hooks() []core.Hook

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) 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) 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) HandleHook added in v0.18.0

func (c *UpdateIssue) HandleHook(ctx core.ActionHookContext) error

func (*UpdateIssue) HandleWebhook

func (*UpdateIssue) Hooks added in v0.18.0

func (c *UpdateIssue) Hooks() []core.Hook

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) 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"`
	ReceiptID    string              `json:"superplaneReceiptId,omitempty" mapstructure:"superplaneReceiptId"`
}

type WebhookSummary

type WebhookSummary struct {
	Resource         string
	Action           string
	InstallationUUID string
	OrganizationSlug string
	ProjectSlug      string
	IssueID          string
	IssueShortID     string
}

WebhookSummary is the non-secret part of a Sentry webhook. It omits the payload, signature, tokens, and grant code.

func SummarizeWebhook

func SummarizeWebhook(resource string, body []byte) WebhookSummary

Jump to

Keyboard shortcuts

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