Documentation
¶
Index ¶
- Constants
- Variables
- func EmailTypeStrings() []string
- type AccountDeletionArgs
- type DataSourceSchemaImportArgs
- type EmailRecipient
- type EmailSendArgs
- type EmailType
- type EventPruneArgs
- type EventRecordArgs
- type ExecutionRequestArgs
- type NotificationCandidateArgs
- type NotificationDeliveryArgs
- type PipelineCompletionDispatchArgs
- type PipelineGitDeleteFileArgs
- type PipelineGitPublishProposalArgs
- type PipelineGitRefreshProposalArgs
- type PipelineGitWriteFileArgs
- type PipelineRunExecutionArgs
- type PipelineScheduleDispatchArgs
- type PipelineScheduleFireExecutionArgs
- type PipelineTriggerRetryExecutionArgs
- type PipelineWebhookDeliveryArgs
- type ProofObservationMaintenanceArgs
- type ProofPublicationArgs
- type ProofWebhookArgs
Constants ¶
const DataSourceSchemaImportQueue = "data_source_schema_import"
const EmailQueue = "email"
const EventMaintenanceQueue = "event_maintenance"
const EventsQueue = "events"
const ExecutionQueue = "execution"
const NotificationDeliveryQueue = "notification_delivery"
const PipelineGitQueue = "pipeline_git"
const PipelineRetryQueue = "pipeline_retry"
const PipelineRunQueue = "pipeline_run"
const PipelineScheduleQueue = "pipeline_schedule"
Variables ¶
var ErrPipelineProposalAuthorityDenied = xerror.New( xerror.KindUnauthorized, "PIPELINE_PROPOSAL_AUTHORITY_DENIED", "pipeline proposal provider authority is unavailable or revoked", )
Functions ¶
func EmailTypeStrings ¶
func EmailTypeStrings() []string
EmailTypeStrings returns a slice of all String values of the enum
Types ¶
type AccountDeletionArgs ¶
func (AccountDeletionArgs) InsertOpts ¶
func (AccountDeletionArgs) InsertOpts() river.InsertOpts
func (AccountDeletionArgs) Kind ¶
func (AccountDeletionArgs) Kind() string
type DataSourceSchemaImportArgs ¶
type DataSourceSchemaImportArgs struct {
OrganizationSlug slug.Slug `json:"organization_slug" river:"unique"`
DataSourceSlug slug.Slug `json:"data_source_slug" river:"unique"`
AttemptID string `json:"attempt_id" river:"unique"`
RequestedAt time.Time `json:"requested_at"`
Actor model.EventActor `json:"actor"`
}
DataSourceSchemaImportArgs is the durable River payload for one schema import. Its unique args make enqueueing the same attempt idempotent; cross-request coalescing for a data source is handled before enqueue by StartImportByDataSourceSlug.
func (DataSourceSchemaImportArgs) InsertOpts ¶
func (DataSourceSchemaImportArgs) InsertOpts() river.InsertOpts
InsertOpts schedules data-source schema imports on their dedicated queue. UniqueOpts.ByArgs prevents reinserting the exact same attempt, not separate refresh requests.
func (DataSourceSchemaImportArgs) Kind ¶
func (DataSourceSchemaImportArgs) Kind() string
Kind returns the stable River job kind for data-source schema imports.
type EmailRecipient ¶
type EmailRecipient struct {
Slug slug.Slug `json:"slug"`
Email string `json:"email"`
FullName string `json:"full_name"`
Locale string `json:"locale"`
}
EmailRecipient is the minimal durable identity needed to deliver an email.
func NewEmailRecipient ¶
func NewEmailRecipient(user *model.User) EmailRecipient
NewEmailRecipient strips profile-only PII before an email job is persisted.
func (EmailRecipient) ToUser ¶
func (r EmailRecipient) ToUser() model.User
ToUser converts the recipient shape back to the email service contract.
type EmailSendArgs ¶
type EmailSendArgs struct {
Type EmailType `json:"type"`
User EmailRecipient `json:"user"`
Invitation model.MemberInvitationEmail `json:"invitation,omitempty"`
NotificationRecipient model.NotificationEmailRecipient `json:"notification_recipient,omitempty"`
Notification model.NotificationEmail `json:"notification,omitempty"`
OrganizationSlug slug.Slug `json:"organization_slug,omitempty"`
AlertDeliveryAttemptSlug slug.Slug `json:"alert_delivery_attempt_slug,omitempty"`
Link string `json:"link"`
EncryptedToken []byte `json:"encrypted_token,omitempty"`
EncryptedCode []byte `json:"encrypted_code,omitempty"`
Subject string `json:"subject,omitempty"`
Body string `json:"body,omitempty"`
}
EmailSendArgs is the durable River payload for sending outbound email.
func (EmailSendArgs) InsertOpts ¶
func (EmailSendArgs) InsertOpts() river.InsertOpts
func (EmailSendArgs) Kind ¶
func (EmailSendArgs) Kind() string
type EmailType ¶
type EmailType int
func EmailTypeString ¶
EmailTypeString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.
func EmailTypeValues ¶
func EmailTypeValues() []EmailType
EmailTypeValues returns all values of the enum
func (EmailType) IsAEmailType ¶
IsAEmailType returns "true" if the value is listed in the enum definition. "false" otherwise
func (EmailType) MarshalJSON ¶
MarshalJSON implements the json.Marshaler interface for EmailType
func (EmailType) MarshalText ¶
MarshalText implements the encoding.TextMarshaler interface for EmailType
func (*EmailType) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaler interface for EmailType
func (*EmailType) UnmarshalText ¶
UnmarshalText implements the encoding.TextUnmarshaler interface for EmailType
type EventPruneArgs ¶
type EventPruneArgs struct{}
func (EventPruneArgs) InsertOpts ¶
func (EventPruneArgs) InsertOpts() river.InsertOpts
func (EventPruneArgs) Kind ¶
func (EventPruneArgs) Kind() string
type EventRecordArgs ¶
type EventRecordArgs struct {
OrgSlug slug.Slug `json:"org_slug"`
Slug slug.Slug `json:"slug"`
EventClass model.EventClass `json:"event_class"`
RequestID *string `json:"request_id,omitempty"`
SchemaVersion int `json:"schema_version"`
ActorType model.EventActorType `json:"actor_type"`
ActorSlug *slug.Slug `json:"actor_slug,omitempty"`
EntityType model.EventEntityType `json:"entity_type"`
EntitySlug *slug.Slug `json:"entity_slug,omitempty"`
Action model.EventAction `json:"action"`
OccurredAt time.Time `json:"occurred_at,omitempty"`
Metadata map[string]any `json:"metadata,omitempty"`
}
EventRecordArgs is the durable River payload for persisting a canonical durable event row after the source transaction commits.
func (EventRecordArgs) InsertOpts ¶
func (EventRecordArgs) InsertOpts() river.InsertOpts
func (EventRecordArgs) Kind ¶
func (EventRecordArgs) Kind() string
type ExecutionRequestArgs ¶
func (ExecutionRequestArgs) InsertOpts ¶
func (ExecutionRequestArgs) InsertOpts() river.InsertOpts
func (ExecutionRequestArgs) Kind ¶
func (ExecutionRequestArgs) Kind() string
type NotificationCandidateArgs ¶
type NotificationCandidateArgs struct {
OrganizationSlug slug.Slug `json:"organization_slug" river:"unique"`
ObservationSlug slug.Slug `json:"observation_slug" river:"unique"`
Candidate model.NotificationCandidate `json:"candidate"`
}
NotificationCandidateArgs carries only validated declaration identities and safe diagnostics. Rendered messages, credentials and provider data stay out.
func (NotificationCandidateArgs) InsertOpts ¶
func (NotificationCandidateArgs) InsertOpts() river.InsertOpts
func (NotificationCandidateArgs) Kind ¶
func (NotificationCandidateArgs) Kind() string
type NotificationDeliveryArgs ¶
type NotificationDeliveryArgs struct {
Test bool `json:"test,omitempty"`
OrganizationSlug slug.Slug `json:"organization_slug" river:"unique"`
RecordSlug slug.Slug `json:"record_slug" river:"unique"`
DestinationSlug slug.Slug `json:"destination_slug" river:"unique"`
AlertPolicySlug slug.Slug `json:"alert_policy_slug"`
}
NotificationDeliveryArgs is the durable River payload for one notification dispatch. It intentionally carries only slugs; renderable message data, recipients, provider responses, configs, and credentials stay out of River args.
func (NotificationDeliveryArgs) InsertOpts ¶
func (NotificationDeliveryArgs) InsertOpts() river.InsertOpts
InsertOpts routes dispatch jobs to the notification delivery queue and deduplicates the safe slug identity while jobs are in default unique states.
func (NotificationDeliveryArgs) Kind ¶
func (NotificationDeliveryArgs) Kind() string
Kind returns the stable River job kind for notification delivery.
type PipelineCompletionDispatchArgs ¶
type PipelineCompletionDispatchArgs struct{}
func (PipelineCompletionDispatchArgs) InsertOpts ¶
func (PipelineCompletionDispatchArgs) InsertOpts() river.InsertOpts
func (PipelineCompletionDispatchArgs) Kind ¶
func (PipelineCompletionDispatchArgs) Kind() string
type PipelineGitDeleteFileArgs ¶
type PipelineGitDeleteFileArgs struct {
InitiatingUserSlug slug.Slug `json:"initiating_user_slug,omitempty"`
OrganizationSlug slug.Slug `json:"organization_slug"`
DataSourceSlug slug.Slug `json:"data_source_slug"`
PipelineSlug slug.Slug `json:"pipeline_slug"`
Branch *string `json:"branch,omitempty"`
Path string `json:"path"`
CommitMessage string `json:"commit_message"`
}
PipelineGitDeleteFileArgs is the durable River payload for deleting a pipeline file.
func (PipelineGitDeleteFileArgs) InsertOpts ¶
func (PipelineGitDeleteFileArgs) InsertOpts() river.InsertOpts
func (PipelineGitDeleteFileArgs) Kind ¶
func (PipelineGitDeleteFileArgs) Kind() string
type PipelineGitPublishProposalArgs ¶
type PipelineGitPublishProposalArgs struct {
CreationSlug slug.Slug `json:"creation_slug,omitempty"`
OrganizationSlug slug.Slug `json:"organization_slug"`
ProjectSlug slug.Slug `json:"project_slug"`
DataSourceSlug slug.Slug `json:"data_source_slug"`
PipelineSlug slug.Slug `json:"pipeline_slug"`
MemberSlug slug.Slug `json:"member_slug"`
BaseRef *string `json:"base_ref,omitempty"`
BaseCommitSHA *string `json:"base_commit_sha,omitempty"`
ExpectedHeadSHA *string `json:"expected_head_sha,omitempty"`
BranchName string `json:"branch_name"`
Path string `json:"path"`
Content []byte `json:"content"`
CommitMessage string `json:"commit_message"`
ProposalTitle string `json:"proposal_title"`
ProposalBody string `json:"proposal_body"`
DraftSpecHash string `json:"draft_spec_hash"`
PublishAttemptID string `json:"publish_attempt_id" river:"unique"`
Authority model.PipelineProposalAuthorityPayload `json:"authority"`
}
PipelineGitPublishProposalArgs is the durable River payload for publishing a Git-authored draft proposal.
func (PipelineGitPublishProposalArgs) InsertOpts ¶
func (PipelineGitPublishProposalArgs) InsertOpts() river.InsertOpts
func (PipelineGitPublishProposalArgs) Kind ¶
func (PipelineGitPublishProposalArgs) Kind() string
type PipelineGitRefreshProposalArgs ¶
type PipelineGitRefreshProposalArgs struct {
OrganizationSlug slug.Slug `json:"organization_slug"`
ProjectSlug slug.Slug `json:"project_slug"`
DataSourceSlug slug.Slug `json:"data_source_slug"`
PipelineSlug slug.Slug `json:"pipeline_slug"`
MemberSlug slug.Slug `json:"member_slug"`
ProposalID string `json:"proposal_id"`
RefreshAttemptID string `json:"refresh_attempt_id"`
}
PipelineGitRefreshProposalArgs refreshes one exact provider PR/MR into member-scoped draft state.
func (PipelineGitRefreshProposalArgs) InsertOpts ¶
func (PipelineGitRefreshProposalArgs) InsertOpts() river.InsertOpts
func (PipelineGitRefreshProposalArgs) Kind ¶
func (PipelineGitRefreshProposalArgs) Kind() string
type PipelineGitWriteFileArgs ¶
type PipelineGitWriteFileArgs struct {
InitiatingUserSlug slug.Slug `json:"initiating_user_slug,omitempty"`
OrganizationSlug slug.Slug `json:"organization_slug"`
DataSourceSlug slug.Slug `json:"data_source_slug"`
PipelineSlug slug.Slug `json:"pipeline_slug"`
Branch *string `json:"branch,omitempty"`
Path string `json:"path"`
Content []byte `json:"content"`
CommitMessage string `json:"commit_message"`
FailIfExists bool `json:"fail_if_exists,omitempty"`
}
PipelineGitWriteFileArgs is the durable River payload for writing a pipeline file.
func (PipelineGitWriteFileArgs) InsertOpts ¶
func (PipelineGitWriteFileArgs) InsertOpts() river.InsertOpts
func (PipelineGitWriteFileArgs) Kind ¶
func (PipelineGitWriteFileArgs) Kind() string
type PipelineRunExecutionArgs ¶
type PipelineRunExecutionArgs struct {
CompletionSnapshotID int `json:"completion_snapshot_id,omitempty"`
ScheduledAt time.Time `json:"scheduled_at,omitempty"`
DeploymentResolutionDigest *string `json:"deployment_resolution_digest,omitempty"`
OrganizationSlug slug.Slug `json:"organization_slug" river:"unique"`
ProjectSlug slug.Slug `json:"project_slug" river:"unique"`
EnvironmentSlug slug.Slug `json:"environment_slug" river:"unique"`
PipelineSlug slug.Slug `json:"pipeline_slug" river:"unique"`
PipelineVersionHash string `json:"pipeline_version_hash" river:"unique"`
RunSlug slug.Slug `json:"run_slug" river:"unique"`
AcceptedAt time.Time `json:"accepted_at"`
Actor model.EventActor `json:"actor"`
Source pipelinerun.RunSourceSummary `json:"source"`
Incremental pipelinerun.IncrementalRunOptions `json:"incremental,omitempty"`
RuntimeInput pipelineruntime.Input `json:"runtime_input,omitempty"`
ProtectedEnvironment bool `json:"protected_environment"`
}
PipelineRunExecutionArgs is the durable River payload for one manually started run.
func (PipelineRunExecutionArgs) InsertOpts ¶
func (a PipelineRunExecutionArgs) InsertOpts() river.InsertOpts
InsertOpts schedules manual/API run work on the pipeline run queue.
func (PipelineRunExecutionArgs) Kind ¶
func (PipelineRunExecutionArgs) Kind() string
Kind returns the stable River job kind for manual pipeline run execution.
type PipelineScheduleDispatchArgs ¶
type PipelineScheduleDispatchArgs struct{}
PipelineScheduleDispatchArgs is the periodic River payload that scans due schedules.
func (PipelineScheduleDispatchArgs) InsertOpts ¶
func (PipelineScheduleDispatchArgs) InsertOpts() river.InsertOpts
func (PipelineScheduleDispatchArgs) Kind ¶
func (PipelineScheduleDispatchArgs) Kind() string
type PipelineScheduleFireExecutionArgs ¶
type PipelineScheduleFireExecutionArgs struct {
FinalizeOnly bool `json:"finalize_only,omitempty" river:"unique"`
OrganizationSlug slug.Slug `json:"organization_slug" river:"unique"`
ProjectSlug slug.Slug `json:"project_slug" river:"unique"`
EnvironmentSlug slug.Slug `json:"environment_slug" river:"unique"`
TriggerSlug slug.Slug `json:"trigger_slug" river:"unique"`
TriggerRevision int64 `json:"trigger_revision" river:"unique"`
ScheduledFireAt time.Time `json:"scheduled_fire_at" river:"unique"`
}
PipelineScheduleFireExecutionArgs is the durable River payload for executing one claimed scheduled fire.
func (PipelineScheduleFireExecutionArgs) InsertOpts ¶
func (PipelineScheduleFireExecutionArgs) InsertOpts() river.InsertOpts
func (PipelineScheduleFireExecutionArgs) Kind ¶
func (PipelineScheduleFireExecutionArgs) Kind() string
type PipelineTriggerRetryExecutionArgs ¶
type PipelineTriggerRetryExecutionArgs struct {
FinalizeOnly bool `json:"finalize_only,omitempty" river:"unique"`
OrganizationSlug slug.Slug `json:"organization_slug" river:"unique"`
ProjectSlug slug.Slug `json:"project_slug" river:"unique"`
EnvironmentSlug slug.Slug `json:"environment_slug" river:"unique"`
RetryAttemptSlug slug.Slug `json:"retry_attempt_slug" river:"unique"`
ScheduledAt time.Time `json:"scheduled_at"`
}
PipelineTriggerRetryExecutionArgs is the durable River payload for one trigger retry attempt.
func (PipelineTriggerRetryExecutionArgs) InsertOpts ¶
func (a PipelineTriggerRetryExecutionArgs) InsertOpts() river.InsertOpts
InsertOpts schedules retry work on the retry queue with argument-level uniqueness.
func (PipelineTriggerRetryExecutionArgs) Kind ¶
func (PipelineTriggerRetryExecutionArgs) Kind() string
Kind returns the stable River job kind for trigger retry execution.
type PipelineWebhookDeliveryArgs ¶
type PipelineWebhookDeliveryArgs struct {
FinalizeOnly bool `json:"finalize_only,omitempty" river:"unique"`
ReceiverID string `json:"receiver_id" river:"unique"`
DeliveryID string `json:"delivery_id" river:"unique"`
RunAttempt int `json:"run_attempt" river:"unique"`
Cleanup bool `json:"cleanup,omitempty" river:"unique"`
ScheduledAt time.Time `json:"scheduled_at"`
}
PipelineWebhookDeliveryArgs identifies one encrypted accepted delivery.
func (PipelineWebhookDeliveryArgs) InsertOpts ¶
func (a PipelineWebhookDeliveryArgs) InsertOpts() river.InsertOpts
func (PipelineWebhookDeliveryArgs) Kind ¶
func (PipelineWebhookDeliveryArgs) Kind() string
type ProofObservationMaintenanceArgs ¶
type ProofObservationMaintenanceArgs struct{}
func (ProofObservationMaintenanceArgs) InsertOpts ¶
func (ProofObservationMaintenanceArgs) InsertOpts() river.InsertOpts
func (ProofObservationMaintenanceArgs) Kind ¶
func (ProofObservationMaintenanceArgs) Kind() string
type ProofPublicationArgs ¶
type ProofPublicationArgs struct {
Organization slug.Slug `json:"organization"`
Project slug.Slug `json:"project"`
Environment slug.Slug `json:"environment"`
Receipt slug.Slug `json:"receipt"`
}
Only protected receipt selectors enter the queue, never evidence or provider credentials.
func (ProofPublicationArgs) InsertOpts ¶
func (ProofPublicationArgs) InsertOpts() river.InsertOpts
func (ProofPublicationArgs) Kind ¶
func (ProofPublicationArgs) Kind() string
type ProofWebhookArgs ¶
type ProofWebhookArgs struct {
DeliveryID string `json:"delivery_id" river:"unique"`
BodySHA256 string `json:"body_sha256"`
Action gitprovider.ChangeAction `json:"action"`
Provider repostore.Provider `json:"provider"`
OrganizationSlug slug.Slug `json:"organization_slug,omitempty"`
ProviderConnectionID string `json:"provider_connection_id"`
RepositoryID string `json:"repository_id"`
ChangeRequestID string `json:"change_request_id"`
HeadSHA string `json:"head_sha"`
SourceRef string `json:"source_ref"`
TargetRef string `json:"target_ref"`
}
func (ProofWebhookArgs) Event ¶
func (a ProofWebhookArgs) Event() gitprovider.VerifiedChangeEvent
func (ProofWebhookArgs) InsertOpts ¶
func (ProofWebhookArgs) InsertOpts() river.InsertOpts
func (ProofWebhookArgs) Kind ¶
func (ProofWebhookArgs) Kind() string