Documentation
¶
Index ¶
- Variables
- type AcknowledgeRecordParams
- type AlertDeliveryAttempt
- type AlertDestination
- type AlertPolicy
- type BindAlertPolicyDestinationParams
- type ClaimConnectionDeliveryParams
- type ConnectionDeliveryClaim
- type CreateAlertDeliveryAttemptParams
- type CreateAlertDestinationParams
- type CreateAlertPolicyParams
- type DeliveryTarget
- type DeliveryWork
- type FindDeliveryWorkParams
- type FinishConnectionDeliveryParams
- type ListRecordFilters
- type MarkAlertDeliveryAttemptFailedParams
- type MarkAlertDeliveryAttemptSentParams
- type Record
- type Repository
- type ResolveRecordParams
- type UpdateAlertDestinationParams
- type UpdateAlertPolicyParams
- type UpdateRecordDispatchSummaryParams
- type UpsertRecordParams
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrDestinationNotFound = xerror.NotFound(xerror.AlertDestination) ErrDestinationSlugTaken = xerror.AlreadyExists(xerror.AlertDestination) ErrDestinationInvalidInput = xerror.InvalidInput(xerror.AlertDestination) ErrAlertPolicyNotFound = xerror.NotFound(xerror.AlertPolicy) ErrAlertPolicySlugTaken = xerror.AlreadyExists(xerror.AlertPolicy) ErrAlertPolicyInvalidInput = xerror.InvalidInput(xerror.AlertPolicy) ErrRecordNotFound = xerror.NotFound(xerror.Notification) ErrRecordSlugTaken = xerror.AlreadyExists(xerror.Notification) ErrRecordInvalidInput = xerror.InvalidInput(xerror.Notification) ErrDeliveryNotFound = xerror.NotFound(xerror.Notification) ErrDeliveryInvalidInput = xerror.InvalidInput(xerror.Notification) )
Functions ¶
This section is empty.
Types ¶
type AcknowledgeRecordParams ¶
type AlertDeliveryAttempt ¶
type AlertDeliveryAttempt struct {
OrgSlug slug.Slug
Slug slug.Slug
NotificationRecordSlug slug.Slug
AlertPolicySlug *slug.Slug
DestinationSlug *slug.Slug
DestinationName *string
DestinationType model.AlertDestinationType
Status model.AlertDeliveryAttemptStatus
ProviderAttempt int
JobKind string
JobQueue string
JobState string
ProviderResponseMetadata json.RawMessage
ErrorCategory *string
ErrorMessage *string
QueuedAt time.Time
SentAt *time.Time
FailedAt *time.Time
CreatedAt time.Time
UpdatedAt time.Time
}
type AlertDestination ¶
type AlertPolicy ¶
type AlertPolicy struct {
OrgSlug slug.Slug
Slug slug.Slug
Name string
Scope model.AlertPolicyScope
ProjectSlug *slug.Slug
EnvironmentSlug *slug.Slug
NotificationType *model.NotificationType
Severity *model.NotificationSeverity
LifecycleState *model.NotificationLifecycleState
SourceKind *model.EventEntityType
SourceAction *model.EventAction
SourceRef *slug.Slug
DestinationSlugs []slug.Slug
Enabled bool
CreatedAt time.Time
UpdatedAt time.Time
}
type ConnectionDeliveryClaim ¶
type CreateAlertDeliveryAttemptParams ¶
type CreateAlertDeliveryAttemptParams struct {
OrgSlug slug.Slug
Slug slug.Slug
NotificationRecordSlug slug.Slug
AlertPolicySlug slug.Slug
DestinationSlug slug.Slug
DestinationType model.AlertDestinationType
Status model.AlertDeliveryAttemptStatus
ProviderAttempt int
JobKind string
JobQueue string
JobState string
ProviderResponseMetadata json.RawMessage
QueuedAt time.Time
}
type CreateAlertDestinationParams ¶
type CreateAlertDestinationParams struct {
OrgSlug slug.Slug
Slug slug.Slug
Name string
Type model.AlertDestinationType
NonSecretConfig json.RawMessage
Enabled bool
}
type CreateAlertPolicyParams ¶
type CreateAlertPolicyParams struct {
OrgSlug slug.Slug
Slug slug.Slug
Name string
Scope model.AlertPolicyScope
ProjectSlug *slug.Slug
EnvironmentSlug *slug.Slug
NotificationType *model.NotificationType
Severity *model.NotificationSeverity
LifecycleState *model.NotificationLifecycleState
SourceKind *model.EventEntityType
SourceAction *model.EventAction
SourceRef *slug.Slug
Enabled bool
}
type DeliveryTarget ¶
type DeliveryTarget struct {
OrgSlug slug.Slug
OrganizationName string
RecordSlug slug.Slug
AlertPolicySlug slug.Slug
DestinationSlug slug.Slug
DestinationName string
DestinationType model.AlertDestinationType
NonSecretConfig json.RawMessage
NotificationType model.NotificationType
Severity model.NotificationSeverity
SourceEntityType model.EventEntityType
SourceAction model.EventAction
SourceRefs json.RawMessage
SafeMetadata json.RawMessage
OccurrenceCount int
}
type DeliveryWork ¶
type DeliveryWork struct {
OrganizationName string
OrgSlug slug.Slug
RecordSlug slug.Slug
AlertPolicySlug slug.Slug
DestinationSlug slug.Slug
DestinationName string
DestinationType model.AlertDestinationType
NonSecretConfig json.RawMessage
NotificationType model.NotificationType
Severity model.NotificationSeverity
SourceEntityType model.EventEntityType
SourceAction model.EventAction
SourceRefs json.RawMessage
SafeMetadata json.RawMessage
OccurrenceCount int
}
type FindDeliveryWorkParams ¶
type ListRecordFilters ¶
type ListRecordFilters struct {
LifecycleState *model.NotificationLifecycleState
NotificationType *model.NotificationType
Severity *model.NotificationSeverity
SourceKind *model.EventEntityType
SourceAction *model.EventAction
SourceRef *slug.Slug
IncludeResolved bool
}
type Record ¶
type Record struct {
OrgSlug slug.Slug
Slug slug.Slug
ProjectSlug *slug.Slug
EnvironmentSlug *slug.Slug
NotificationType model.NotificationType
Severity model.NotificationSeverity
LifecycleState model.NotificationLifecycleState
DedupeFingerprint string
SourceEventSlug *slug.Slug
SourceEntityType model.EventEntityType
SourceAction model.EventAction
SourceRefs json.RawMessage
SafeMetadata json.RawMessage
FirstSeenAt time.Time
LastSeenAt time.Time
OccurrenceCount int
LastOccurrenceAt time.Time
DispatchSummary json.RawMessage
AcknowledgedAt *time.Time
ResolvedAt *time.Time
CreatedAt time.Time
UpdatedAt time.Time
}
type Repository ¶
type Repository interface {
ClaimConnectionDelivery(context.Context, postgres.DBTX, ClaimConnectionDeliveryParams) (ConnectionDeliveryClaim, error)
FinishConnectionDelivery(context.Context, postgres.DBTX, FinishConnectionDeliveryParams) error
CreateAlertDestination(
ctx context.Context,
tx postgres.DBTX,
params CreateAlertDestinationParams,
) (*AlertDestination, error)
ListAlertDestinationsByOrganization(
ctx context.Context,
tx postgres.DBTX,
orgSlug slug.Slug,
req model.ListRequest,
) ([]*AlertDestination, error)
FindAlertDestinationBySlug(
ctx context.Context,
tx postgres.DBTX,
orgSlug slug.Slug,
destinationSlug slug.Slug,
) (*AlertDestination, error)
UpdateAlertDestination(
ctx context.Context,
tx postgres.DBTX,
params UpdateAlertDestinationParams,
) (*AlertDestination, error)
DeleteAlertDestination(ctx context.Context, tx postgres.DBTX, orgSlug, destinationSlug slug.Slug) error
CreateAlertPolicy(ctx context.Context, tx postgres.DBTX, params CreateAlertPolicyParams) (*AlertPolicy, error)
ListAlertPoliciesByOrganization(
ctx context.Context,
tx postgres.DBTX,
orgSlug slug.Slug,
req model.ListRequest,
) ([]*AlertPolicy, error)
FindAlertPolicyBySlug(
ctx context.Context,
tx postgres.DBTX,
orgSlug slug.Slug,
policySlug slug.Slug,
) (*AlertPolicy, error)
UpdateAlertPolicy(ctx context.Context, tx postgres.DBTX, params UpdateAlertPolicyParams) (*AlertPolicy, error)
ClearAlertPolicyDestinations(ctx context.Context, tx postgres.DBTX, orgSlug, policySlug slug.Slug) error
BindAlertPolicyDestination(ctx context.Context, tx postgres.DBTX, params BindAlertPolicyDestinationParams) error
DeleteAlertPolicy(ctx context.Context, tx postgres.DBTX, orgSlug, policySlug slug.Slug) error
UpsertRecord(ctx context.Context, tx postgres.DBTX, params UpsertRecordParams) (*Record, error)
ListRecordsByOrganization(
ctx context.Context,
tx postgres.DBTX,
orgSlug slug.Slug,
filters ListRecordFilters,
req model.ListRequest,
) ([]*Record, error)
FindRecordBySlug(
ctx context.Context,
tx postgres.DBTX,
orgSlug slug.Slug,
recordSlug slug.Slug,
) (*Record, error)
AcknowledgeRecord(ctx context.Context, tx postgres.DBTX, params AcknowledgeRecordParams) (*Record, error)
ResolveRecord(ctx context.Context, tx postgres.DBTX, params ResolveRecordParams) (*Record, error)
ListDeliveryTargetsForRecord(
ctx context.Context,
tx postgres.DBTX,
orgSlug slug.Slug,
recordSlug slug.Slug,
) ([]DeliveryTarget, error)
FindDeliveryWork(
ctx context.Context,
tx postgres.DBTX,
params FindDeliveryWorkParams,
) (*DeliveryWork, error)
CreateAlertDeliveryAttempt(
ctx context.Context,
tx postgres.DBTX,
params CreateAlertDeliveryAttemptParams,
) (*AlertDeliveryAttempt, error)
ListAlertDeliveryAttemptsForRecord(
ctx context.Context,
tx postgres.DBTX,
orgSlug slug.Slug,
recordSlug slug.Slug,
req model.ListRequest,
) ([]*AlertDeliveryAttempt, error)
ListRecentAlertDeliveryAttemptsForRecords(
ctx context.Context,
tx postgres.DBTX,
orgSlug slug.Slug,
recordSlugs []slug.Slug,
limitPerRecord int,
) ([]*AlertDeliveryAttempt, error)
MarkAlertDeliveryAttemptSent(
ctx context.Context,
tx postgres.DBTX,
params MarkAlertDeliveryAttemptSentParams,
) (*AlertDeliveryAttempt, error)
MarkAlertDeliveryAttemptFailed(
ctx context.Context,
tx postgres.DBTX,
params MarkAlertDeliveryAttemptFailedParams,
) (*AlertDeliveryAttempt, error)
UpdateRecordDispatchSummary(
ctx context.Context,
tx postgres.DBTX,
params UpdateRecordDispatchSummaryParams,
) (*Record, error)
}
type ResolveRecordParams ¶
type UpdateAlertDestinationParams ¶
type UpdateAlertDestinationParams struct {
OrgSlug slug.Slug
Slug slug.Slug
Name string
Type model.AlertDestinationType
NonSecretConfig json.RawMessage
Enabled bool
}
type UpdateAlertPolicyParams ¶
type UpdateAlertPolicyParams struct {
OrgSlug slug.Slug
Slug slug.Slug
Name string
Scope model.AlertPolicyScope
ProjectSlug *slug.Slug
EnvironmentSlug *slug.Slug
NotificationType *model.NotificationType
Severity *model.NotificationSeverity
LifecycleState *model.NotificationLifecycleState
SourceKind *model.EventEntityType
SourceAction *model.EventAction
SourceRef *slug.Slug
Enabled bool
}
type UpsertRecordParams ¶
type UpsertRecordParams struct {
OrgSlug slug.Slug
Slug slug.Slug
ProjectSlug *slug.Slug
EnvironmentSlug *slug.Slug
NotificationType model.NotificationType
Severity model.NotificationSeverity
LifecycleState model.NotificationLifecycleState
DedupeFingerprint string
SourceEventSlug *slug.Slug
SourceEntityType model.EventEntityType
SourceAction model.EventAction
SourceRefs json.RawMessage
SafeMetadata json.RawMessage
ObservedAt time.Time
}
Click to show internal directories.
Click to hide internal directories.