Documentation
¶
Index ¶
- Constants
- func EnableHostedInstallBind(encryptor crypto.Encryptor)
- func FetchedIssueDescription(client *Client, issue any, logger warningLogger) string
- func ForgetKnownHostedInstallation(installationUUID string) error
- func HostedAppConfigured() bool
- func HostedAppExternalInstallURL(slug string) string
- func HostedAppInstallURL(baseURL, state string) string
- func HostedAppSetupURL(baseURL string) string
- func HostedAppWebhookURL(webhooksBaseURL string) string
- func IsRetryableAPIError(err error) bool
- func IssueDescription(issue any, event *IssueEventDetail) string
- func IssueHasWorkOrder(tx *gorm.DB, factory *models.Factory, issueID string) (bool, error)
- func IssueIDFromEventData(eventData any) (string, bool)
- func IssueIDFromURL(rawURL string) (string, bool)
- func IssueStatusIsSettled(status string) bool
- func IssueURLFragment(issueID string) string
- func LockIssueWorkOrder(tx *gorm.DB, factory *models.Factory, issueID string) error
- func ParseInstallationDeletedUUID(resource string, body []byte) (string, bool)
- func PreferHostedInstall(integrationName string, configuration map[string]any) bool
- func ReceiptIDFromEventData(eventData any) (uuid.UUID, bool)
- func RememberHostedInstallGrant(httpCtx core.HTTPContext, app HostedApp, grant InstallationGrant) error
- func StatusCode(err error) (int, bool)
- func StatusError(statusCode int) error
- func UseHostedApp() bool
- func VerifyWebhookSignature(signature string, body, secret []byte) error
- func WantsPrivateApp(integrationName string, configuration map[string]any) bool
- func WithHostedSentryWebhookLogged(ctx context.Context) context.Context
- type AlertNotificationConfiguration
- type AlertRuleNodeMetadata
- type AlertThresholdConfiguration
- type AssigneeResource
- type AuthIdentity
- type Client
- func (c *Client) CreateAlertRule(request CreateOrUpdateMetricAlertRuleRequest) (*MetricAlertRule, error)
- func (c *Client) CreateDeploy(version string, request CreateDeployRequest) (*Deploy, error)
- func (c *Client) CreateRelease(request CreateReleaseRequest) (*Release, error)
- func (c *Client) DeleteAlertRule(alertRuleID string) error
- func (c *Client) GetAlertRule(alertRuleID string) (*MetricAlertRule, error)
- func (c *Client) GetAuthIdentity() (*AuthIdentity, error)
- func (c *Client) GetIssue(issueID string) (*Issue, error)
- func (c *Client) GetIssueEvent(issueID, eventID string) (*IssueEventDetail, error)
- func (c *Client) GetOrganization() (*Organization, error)
- func (c *Client) GetPreferredIssueEvent(issueID string) (*IssueEventDetail, error)
- func (c *Client) GetSentryApp(appSlug string) (*SentryApp, error)
- func (c *Client) LinkExternalIssue(issueID, integrationID string, request LinkExternalIssueRequest) (*ExternalIssueLink, error)
- func (c *Client) ListAlertRules() ([]MetricAlertRule, error)
- func (c *Client) ListIssueEvents(issueID string) ([]IssueEvent, error)
- func (c *Client) ListIssues() ([]Issue, error)
- func (c *Client) ListNewestUnresolvedIssues(project string, limit int) ([]Issue, error)
- func (c *Client) ListOrganizationIntegrations(providerKey string) ([]OrganizationIntegration, error)
- func (c *Client) ListOrganizations() ([]Organization, error)
- func (c *Client) ListProjectAssignees(projectSlug string) ([]AssigneeResource, error)
- func (c *Client) ListProjectMembers(projectSlug string) ([]ProjectMember, error)
- func (c *Client) ListProjectTeams(projectSlug string) ([]Team, error)
- func (c *Client) ListProjects() ([]ProjectSummary, error)
- func (c *Client) ListReleases() ([]Release, error)
- func (c *Client) ListSentryApps(orgSlug string) ([]SentryApp, error)
- func (c *Client) ListTeams() ([]TeamSummary, error)
- func (c *Client) SearchUnresolvedIssues(project, query string, limit int) ([]Issue, error)
- func (c *Client) UpdateAlertRule(alertRuleID string, request CreateOrUpdateMetricAlertRuleRequest) (*MetricAlertRule, error)
- func (c *Client) UpdateIssue(issueID string, request UpdateIssueRequest) (*Issue, error)
- func (c *Client) UpdateSentryApp(appSlug string, request UpdateSentryAppRequest) (*SentryApp, error)
- func (c *Client) ValidateReleaseAccess() error
- type Configuration
- type CreateAlert
- func (c *CreateAlert) Cancel(ctx core.ExecutionContext) error
- func (c *CreateAlert) Cleanup(ctx core.SetupContext) error
- func (c *CreateAlert) Color() string
- func (c *CreateAlert) Configuration() []configuration.Field
- func (c *CreateAlert) Description() string
- func (c *CreateAlert) Documentation() string
- func (c *CreateAlert) ExampleOutput() map[string]any
- func (c *CreateAlert) Execute(ctx core.ExecutionContext) error
- func (c *CreateAlert) HandleHook(ctx core.ActionHookContext) error
- func (c *CreateAlert) HandleWebhook(ctx core.WebhookRequestContext) (int, *core.WebhookResponseBody, error)
- func (c *CreateAlert) Hooks() []core.Hook
- func (c *CreateAlert) Icon() string
- func (c *CreateAlert) Label() string
- func (c *CreateAlert) Name() string
- func (c *CreateAlert) OutputChannels(configuration any) []core.OutputChannel
- func (c *CreateAlert) Setup(ctx core.SetupContext) error
- type CreateAlertConfiguration
- type CreateDeploy
- func (c *CreateDeploy) Cancel(ctx core.ExecutionContext) error
- func (c *CreateDeploy) Cleanup(ctx core.SetupContext) error
- func (c *CreateDeploy) Color() string
- func (c *CreateDeploy) Configuration() []configuration.Field
- func (c *CreateDeploy) Description() string
- func (c *CreateDeploy) Documentation() string
- func (c *CreateDeploy) ExampleOutput() map[string]any
- func (c *CreateDeploy) Execute(ctx core.ExecutionContext) error
- func (c *CreateDeploy) HandleHook(ctx core.ActionHookContext) error
- func (c *CreateDeploy) HandleWebhook(ctx core.WebhookRequestContext) (int, *core.WebhookResponseBody, error)
- func (c *CreateDeploy) Hooks() []core.Hook
- func (c *CreateDeploy) Icon() string
- func (c *CreateDeploy) Label() string
- func (c *CreateDeploy) Name() string
- func (c *CreateDeploy) OutputChannels(configuration any) []core.OutputChannel
- func (c *CreateDeploy) Setup(ctx core.SetupContext) error
- type CreateDeployConfiguration
- type CreateDeployNodeMetadata
- type CreateDeployRequest
- type CreateOrUpdateMetricAlertRuleRequest
- type CreateRelease
- func (c *CreateRelease) Cancel(ctx core.ExecutionContext) error
- func (c *CreateRelease) Cleanup(ctx core.SetupContext) error
- func (c *CreateRelease) Color() string
- func (c *CreateRelease) Configuration() []configuration.Field
- func (c *CreateRelease) Description() string
- func (c *CreateRelease) Documentation() string
- func (c *CreateRelease) ExampleOutput() map[string]any
- func (c *CreateRelease) Execute(ctx core.ExecutionContext) error
- func (c *CreateRelease) HandleHook(ctx core.ActionHookContext) error
- func (c *CreateRelease) HandleWebhook(ctx core.WebhookRequestContext) (int, *core.WebhookResponseBody, error)
- func (c *CreateRelease) Hooks() []core.Hook
- func (c *CreateRelease) Icon() string
- func (c *CreateRelease) Label() string
- func (c *CreateRelease) Name() string
- func (c *CreateRelease) OutputChannels(configuration any) []core.OutputChannel
- func (c *CreateRelease) Setup(ctx core.SetupContext) error
- type CreateReleaseCommitConfiguration
- type CreateReleaseConfiguration
- type CreateReleaseNodeMetadata
- type CreateReleaseRefConfiguration
- type CreateReleaseRequest
- type DeleteAlert
- func (c *DeleteAlert) Cancel(ctx core.ExecutionContext) error
- func (c *DeleteAlert) Cleanup(ctx core.SetupContext) error
- func (c *DeleteAlert) Color() string
- func (c *DeleteAlert) Configuration() []configuration.Field
- func (c *DeleteAlert) Description() string
- func (c *DeleteAlert) Documentation() string
- func (c *DeleteAlert) ExampleOutput() map[string]any
- func (c *DeleteAlert) Execute(ctx core.ExecutionContext) error
- func (c *DeleteAlert) HandleHook(ctx core.ActionHookContext) error
- func (c *DeleteAlert) HandleWebhook(ctx core.WebhookRequestContext) (int, *core.WebhookResponseBody, error)
- func (c *DeleteAlert) Hooks() []core.Hook
- func (c *DeleteAlert) Icon() string
- func (c *DeleteAlert) Label() string
- func (c *DeleteAlert) Name() string
- func (c *DeleteAlert) OutputChannels(configuration any) []core.OutputChannel
- func (c *DeleteAlert) Setup(ctx core.SetupContext) error
- type DeleteAlertConfiguration
- type DeleteAlertOutput
- type Deploy
- type ExternalIssueLink
- type GetAlert
- func (c *GetAlert) Cancel(ctx core.ExecutionContext) error
- func (c *GetAlert) Cleanup(ctx core.SetupContext) error
- func (c *GetAlert) Color() string
- func (c *GetAlert) Configuration() []configuration.Field
- func (c *GetAlert) Description() string
- func (c *GetAlert) Documentation() string
- func (c *GetAlert) ExampleOutput() map[string]any
- func (c *GetAlert) Execute(ctx core.ExecutionContext) error
- func (c *GetAlert) HandleHook(ctx core.ActionHookContext) error
- func (c *GetAlert) HandleWebhook(ctx core.WebhookRequestContext) (int, *core.WebhookResponseBody, error)
- func (c *GetAlert) Hooks() []core.Hook
- func (c *GetAlert) Icon() string
- func (c *GetAlert) Label() string
- func (c *GetAlert) Name() string
- func (c *GetAlert) OutputChannels(configuration any) []core.OutputChannel
- func (c *GetAlert) Setup(ctx core.SetupContext) error
- type GetAlertConfiguration
- type GetAlertNodeMetadata
- type GetIssue
- func (c *GetIssue) Cancel(ctx core.ExecutionContext) error
- func (c *GetIssue) Cleanup(ctx core.SetupContext) error
- func (c *GetIssue) Color() string
- func (c *GetIssue) Configuration() []configuration.Field
- func (c *GetIssue) Description() string
- func (c *GetIssue) Documentation() string
- func (c *GetIssue) ExampleOutput() map[string]any
- func (c *GetIssue) Execute(ctx core.ExecutionContext) error
- func (c *GetIssue) HandleHook(ctx core.ActionHookContext) error
- func (c *GetIssue) HandleWebhook(ctx core.WebhookRequestContext) (int, *core.WebhookResponseBody, error)
- func (c *GetIssue) Hooks() []core.Hook
- func (c *GetIssue) Icon() string
- func (c *GetIssue) Label() string
- func (c *GetIssue) Name() string
- func (c *GetIssue) OutputChannels(configuration any) []core.OutputChannel
- func (c *GetIssue) Setup(ctx core.SetupContext) error
- type GetIssueConfiguration
- type GetIssueNodeMetadata
- type HostedApp
- type InstallationGrant
- type Issue
- type IssueAssignee
- type IssueEvent
- type IssueEventDetail
- type IssueEventEntry
- type IssueEventRelease
- type IssueProject
- type IssueTag
- type LinkExternalIssueRequest
- type LinkGitHubIssue
- func (c *LinkGitHubIssue) Cancel(ctx core.ExecutionContext) error
- func (c *LinkGitHubIssue) Cleanup(ctx core.SetupContext) error
- func (c *LinkGitHubIssue) Color() string
- func (c *LinkGitHubIssue) Configuration() []configuration.Field
- func (c *LinkGitHubIssue) Description() string
- func (c *LinkGitHubIssue) Documentation() string
- func (c *LinkGitHubIssue) ExampleOutput() map[string]any
- func (c *LinkGitHubIssue) Execute(ctx core.ExecutionContext) error
- func (c *LinkGitHubIssue) HandleHook(ctx core.ActionHookContext) error
- func (c *LinkGitHubIssue) HandleWebhook(ctx core.WebhookRequestContext) (int, *core.WebhookResponseBody, error)
- func (c *LinkGitHubIssue) Hooks() []core.Hook
- func (c *LinkGitHubIssue) Icon() string
- func (c *LinkGitHubIssue) Label() string
- func (c *LinkGitHubIssue) Name() string
- func (c *LinkGitHubIssue) OutputChannels(configuration any) []core.OutputChannel
- func (c *LinkGitHubIssue) Setup(ctx core.SetupContext) error
- type LinkGitHubIssueConfiguration
- type LinkGitHubIssueNodeMetadata
- type ListAlerts
- func (c *ListAlerts) Cancel(ctx core.ExecutionContext) error
- func (c *ListAlerts) Cleanup(ctx core.SetupContext) error
- func (c *ListAlerts) Color() string
- func (c *ListAlerts) Configuration() []configuration.Field
- func (c *ListAlerts) Description() string
- func (c *ListAlerts) Documentation() string
- func (c *ListAlerts) ExampleOutput() map[string]any
- func (c *ListAlerts) Execute(ctx core.ExecutionContext) error
- func (c *ListAlerts) HandleHook(ctx core.ActionHookContext) error
- func (c *ListAlerts) HandleWebhook(ctx core.WebhookRequestContext) (int, *core.WebhookResponseBody, error)
- func (c *ListAlerts) Hooks() []core.Hook
- func (c *ListAlerts) Icon() string
- func (c *ListAlerts) Label() string
- func (c *ListAlerts) Name() string
- func (c *ListAlerts) OutputChannels(configuration any) []core.OutputChannel
- func (c *ListAlerts) Setup(ctx core.SetupContext) error
- type ListAlertsConfiguration
- type ListAlertsNodeMetadata
- type ListAlertsOutput
- type Metadata
- type MetricAlertAction
- type MetricAlertActionInput
- type MetricAlertRule
- type MetricAlertRuleCreatedBy
- type MetricAlertTrigger
- type MetricAlertTriggerInput
- type OnIssue
- func (t *OnIssue) Cleanup(ctx core.TriggerContext) error
- func (t *OnIssue) Color() string
- func (t *OnIssue) Configuration() []configuration.Field
- func (t *OnIssue) Description() string
- func (t *OnIssue) Documentation() string
- func (t *OnIssue) ExampleData() map[string]any
- func (t *OnIssue) HandleHook(ctx core.TriggerHookContext) (map[string]any, error)
- func (t *OnIssue) HandleWebhook(ctx core.WebhookRequestContext) (int, *core.WebhookResponseBody, error)
- func (t *OnIssue) Hooks() []core.Hook
- func (t *OnIssue) Icon() string
- func (t *OnIssue) Label() string
- func (t *OnIssue) Name() string
- func (t *OnIssue) OnIntegrationMessage(ctx core.IntegrationMessageContext) error
- func (t *OnIssue) Setup(ctx core.TriggerContext) error
- type OnIssueConfiguration
- type OnIssueMetadata
- type Organization
- type OrganizationIntegration
- type OrganizationSummary
- type Project
- type ProjectMember
- type ProjectSummary
- type Release
- type ReleaseCommit
- type ReleaseProject
- type ReleaseRef
- type Sentry
- func (s *Sentry) Actions() []core.Action
- func (s *Sentry) Cleanup(ctx core.IntegrationCleanupContext) error
- func (s *Sentry) Configuration() []configuration.Field
- func (s *Sentry) Description() string
- func (s *Sentry) HandleHook(ctx core.IntegrationHookContext) error
- func (s *Sentry) HandleRequest(ctx core.HTTPRequestContext)
- func (s *Sentry) Hooks() []core.Hook
- func (s *Sentry) Icon() string
- func (s *Sentry) Instructions() string
- func (s *Sentry) Label() string
- func (s *Sentry) ListResources(resourceType string, ctx core.ListResourcesContext) ([]core.IntegrationResource, error)
- func (s *Sentry) Name() string
- func (s *Sentry) Sync(ctx core.SyncContext) error
- func (s *Sentry) Triggers() []core.Trigger
- type SentryApp
- type SubscriptionConfiguration
- type Team
- type TeamSummary
- type UpdateAlert
- func (c *UpdateAlert) Cancel(ctx core.ExecutionContext) error
- func (c *UpdateAlert) Cleanup(ctx core.SetupContext) error
- func (c *UpdateAlert) Color() string
- func (c *UpdateAlert) Configuration() []configuration.Field
- func (c *UpdateAlert) Description() string
- func (c *UpdateAlert) Documentation() string
- func (c *UpdateAlert) ExampleOutput() map[string]any
- func (c *UpdateAlert) Execute(ctx core.ExecutionContext) error
- func (c *UpdateAlert) HandleHook(ctx core.ActionHookContext) error
- func (c *UpdateAlert) HandleWebhook(ctx core.WebhookRequestContext) (int, *core.WebhookResponseBody, error)
- func (c *UpdateAlert) Hooks() []core.Hook
- func (c *UpdateAlert) Icon() string
- func (c *UpdateAlert) Label() string
- func (c *UpdateAlert) Name() string
- func (c *UpdateAlert) OutputChannels(configuration any) []core.OutputChannel
- func (c *UpdateAlert) Setup(ctx core.SetupContext) error
- type UpdateAlertConfiguration
- type UpdateIssue
- func (c *UpdateIssue) Cancel(ctx core.ExecutionContext) error
- func (c *UpdateIssue) Cleanup(ctx core.SetupContext) error
- func (c *UpdateIssue) Color() string
- func (c *UpdateIssue) Configuration() []configuration.Field
- func (c *UpdateIssue) Description() string
- func (c *UpdateIssue) Documentation() string
- func (c *UpdateIssue) ExampleOutput() map[string]any
- func (c *UpdateIssue) Execute(ctx core.ExecutionContext) error
- func (c *UpdateIssue) HandleHook(ctx core.ActionHookContext) error
- func (c *UpdateIssue) HandleWebhook(ctx core.WebhookRequestContext) (int, *core.WebhookResponseBody, error)
- func (c *UpdateIssue) Hooks() []core.Hook
- func (c *UpdateIssue) Icon() string
- func (c *UpdateIssue) Label() string
- func (c *UpdateIssue) Name() string
- func (c *UpdateIssue) OutputChannels(configuration any) []core.OutputChannel
- func (c *UpdateIssue) Setup(ctx core.SetupContext) error
- type UpdateIssueConfiguration
- type UpdateIssueNodeMetadata
- type UpdateIssueRequest
- type UpdateSentryAppRequest
- type WebhookInstallation
- type WebhookMessage
- type WebhookSummary
Constants ¶
const ( IssueEventLatest = "latest" IssueEventRecommended = "recommended" )
const ( SecretAccessToken = "accessToken" SecretRefreshToken = "refreshToken" )
const ( IssueStatusUnresolved = "unresolved" IssueStatusResolved = "resolved" IssueStatusResolvedInNextRelease = "resolvedInNextRelease" IssueStatusIgnored = "ignored" )
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/" )
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" )
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 ¶
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 ¶
FetchedIssueDescription loads the issue and preferred event, then renders IssueDescription. API failures keep the webhook issue and omit the event.
func ForgetKnownHostedInstallation ¶
ForgetKnownHostedInstallation drops a Sentry install grant after Sentry reports that the organization uninstalled the app.
func HostedAppConfigured ¶
func HostedAppConfigured() bool
func HostedAppInstallURL ¶
func HostedAppSetupURL ¶
func HostedAppWebhookURL ¶
func IsRetryableAPIError ¶
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 ¶
IssueHasWorkOrder reports whether this factory already has a work order for the Sentry issue. Matching covers every work-order state.
func IssueIDFromEventData ¶
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 ¶
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 ¶
IssueStatusIsSettled reports whether SuperPlane should leave the Sentry issue alone. A completed task only needs to resolve an open issue.
func IssueURLFragment ¶
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 ¶
LockIssueWorkOrder serializes work-order creation for one Sentry issue in this factory. The lock is held until the caller commits tx.
func ParseInstallationDeletedUUID ¶
ParseInstallationDeletedUUID reads the installation UUID Sentry sends on installation.deleted.
func PreferHostedInstall ¶
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 ¶
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 StatusError ¶
func UseHostedApp ¶
func UseHostedApp() bool
func VerifyWebhookSignature ¶
func WantsPrivateApp ¶
Types ¶
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 AuthIdentity ¶
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 (*Client) GetAlertRule ¶
func (c *Client) GetAlertRule(alertRuleID string) (*MetricAlertRule, error)
func (*Client) GetAuthIdentity ¶
func (c *Client) GetAuthIdentity() (*AuthIdentity, 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) 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 (*Client) ListNewestUnresolvedIssues ¶
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 (*Client) ListProjects ¶
func (c *Client) ListProjects() ([]ProjectSummary, error)
func (*Client) ListReleases ¶
func (*Client) ListSentryApps ¶
func (*Client) ListTeams ¶
func (c *Client) ListTeams() ([]TeamSummary, error)
func (*Client) SearchUnresolvedIssues ¶
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 ¶
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 (c *CreateAlert) HandleWebhook(ctx core.WebhookRequestContext) (int, *core.WebhookResponseBody, error)
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 (c *CreateDeploy) HandleWebhook(ctx core.WebhookRequestContext) (int, *core.WebhookResponseBody, error)
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 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 (c *CreateRelease) HandleWebhook(ctx core.WebhookRequestContext) (int, *core.WebhookResponseBody, error)
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 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 (c *DeleteAlert) HandleWebhook(ctx core.WebhookRequestContext) (int, *core.WebhookResponseBody, error)
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 DeleteAlertOutput ¶
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 ¶ added in v0.28.0
type GetAlert ¶
type GetAlert struct{}
func (*GetAlert) Configuration ¶
func (c *GetAlert) Configuration() []configuration.Field
func (*GetAlert) Description ¶
func (*GetAlert) Documentation ¶
func (*GetAlert) ExampleOutput ¶
func (*GetAlert) HandleHook ¶ added in v0.18.0
func (c *GetAlert) HandleHook(ctx core.ActionHookContext) error
func (*GetAlert) HandleWebhook ¶
func (c *GetAlert) HandleWebhook(ctx core.WebhookRequestContext) (int, *core.WebhookResponseBody, error)
func (*GetAlert) OutputChannels ¶
func (c *GetAlert) OutputChannels(configuration any) []core.OutputChannel
type GetAlertConfiguration ¶
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) Configuration ¶
func (c *GetIssue) Configuration() []configuration.Field
func (*GetIssue) Description ¶
func (*GetIssue) Documentation ¶
func (*GetIssue) ExampleOutput ¶
func (*GetIssue) HandleHook ¶ added in v0.18.0
func (c *GetIssue) HandleHook(ctx core.ActionHookContext) error
func (*GetIssue) HandleWebhook ¶
func (c *GetIssue) HandleWebhook(ctx core.WebhookRequestContext) (int, *core.WebhookResponseBody, error)
func (*GetIssue) OutputChannels ¶
func (c *GetIssue) OutputChannels(configuration any) []core.OutputChannel
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 ¶
HostedApp is SuperPlane Cloud's public Sentry app. The process holds the credentials. New integrations store the installation UUID and tokens.
func HostedAppFromEnv ¶
HostedAppFromEnv returns the public Sentry app when Cloud holds complete credentials. Self-hosted leaves them empty.
type InstallationGrant ¶
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 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 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 LinkExternalIssueRequest ¶ added in v0.28.0
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 (c *LinkGitHubIssue) HandleWebhook(ctx core.WebhookRequestContext) (int, *core.WebhookResponseBody, error)
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 (c *ListAlerts) HandleWebhook(ctx core.WebhookRequestContext) (int, *core.WebhookResponseBody, error)
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 ¶
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 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) Configuration ¶
func (t *OnIssue) Configuration() []configuration.Field
func (*OnIssue) Description ¶
func (*OnIssue) Documentation ¶
func (*OnIssue) ExampleData ¶
func (*OnIssue) HandleHook ¶ added in v0.18.0
func (*OnIssue) HandleWebhook ¶
func (t *OnIssue) HandleWebhook(ctx core.WebhookRequestContext) (int, *core.WebhookResponseBody, error)
func (*OnIssue) OnIntegrationMessage ¶
func (t *OnIssue) OnIntegrationMessage(ctx core.IntegrationMessageContext) error
type OnIssueConfiguration ¶
type OnIssueMetadata ¶
type OnIssueMetadata struct {
AppSubscriptionID *string `json:"appSubscriptionID,omitempty" mapstructure:"appSubscriptionID,omitempty"`
Project *ProjectSummary `json:"project,omitempty" mapstructure:"project,omitempty"`
}
type Organization ¶
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 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 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 ReleaseRef ¶
type Sentry ¶
type Sentry struct{}
func (*Sentry) Configuration ¶
func (s *Sentry) Configuration() []configuration.Field
func (*Sentry) Description ¶
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) Instructions ¶
func (*Sentry) ListResources ¶
func (s *Sentry) ListResources(resourceType string, ctx core.ListResourcesContext) ([]core.IntegrationResource, error)
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 TeamSummary ¶
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 (c *UpdateAlert) HandleWebhook(ctx core.WebhookRequestContext) (int, *core.WebhookResponseBody, error)
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 (c *UpdateIssue) HandleWebhook(ctx core.WebhookRequestContext) (int, *core.WebhookResponseBody, error)
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 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
Source Files
¶
- alert_rule_common.go
- client.go
- create_alert.go
- create_deploy.go
- create_release.go
- delete_alert.go
- example.go
- get_alert.go
- get_issue.go
- hosted_app.go
- hosted_bind.go
- hosted_grants.go
- hosted_oauth.go
- issue_description.go
- issue_ref.go
- issue_work_order.go
- link_github_issue.go
- list_alerts.go
- on_issue.go
- sentry.go
- update_alert.go
- update_issue.go
- webhook_summary.go