jobs

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2026 License: Apache-2.0 Imports: 15 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const DataSourceSchemaImportQueue = "data_source_schema_import"
View Source
const EmailQueue = "email"
View Source
const EventMaintenanceQueue = "event_maintenance"
View Source
const EventsQueue = "events"
View Source
const ExecutionQueue = "execution"
View Source
const NotificationDeliveryQueue = "notification_delivery"
View Source
const PipelineGitQueue = "pipeline_git"
View Source
const PipelineRetryQueue = "pipeline_retry"
View Source
const PipelineRunQueue = "pipeline_run"
View Source
const PipelineScheduleQueue = "pipeline_schedule"

Variables

View Source
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

type AccountDeletionArgs struct {
	Request slug.Slug `json:"request"`
}

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

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

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
const (
	EmailTypeUnknown       EmailType = iota // unknown
	EmailTypeVerification                   // verification
	EmailTypePasswordReset                  // password_reset
	EmailTypeSessionMFA                     // session_mfa
	EmailTypeInvitation                     // invitation
	EmailTypeNotification                   // notification
	EmailTypeMessage                        // message
)

func EmailTypeString

func EmailTypeString(s string) (EmailType, error)

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

func (i EmailType) IsAEmailType() bool

IsAEmailType returns "true" if the value is listed in the enum definition. "false" otherwise

func (EmailType) MarshalJSON

func (i EmailType) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler interface for EmailType

func (EmailType) MarshalText

func (i EmailType) MarshalText() ([]byte, error)

MarshalText implements the encoding.TextMarshaler interface for EmailType

func (EmailType) String

func (i EmailType) String() string

func (*EmailType) UnmarshalJSON

func (i *EmailType) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for EmailType

func (*EmailType) UnmarshalText

func (i *EmailType) UnmarshalText(text []byte) error

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

type ExecutionRequestArgs struct {
	RequestID uuid.UUID `json:"request_id" river:"unique"`
}

func (ExecutionRequestArgs) InsertOpts

func (ExecutionRequestArgs) InsertOpts() river.InsertOpts

func (ExecutionRequestArgs) Kind

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

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

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

Kind returns the stable River job kind for notification delivery.

type PipelineCompletionDispatchArgs

type PipelineCompletionDispatchArgs struct{}

func (PipelineCompletionDispatchArgs) InsertOpts

func (PipelineCompletionDispatchArgs) Kind

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

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

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

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

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

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

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

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

InsertOpts schedules retry work on the retry queue with argument-level uniqueness.

func (PipelineTriggerRetryExecutionArgs) Kind

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 (PipelineWebhookDeliveryArgs) Kind

type ProofObservationMaintenanceArgs

type ProofObservationMaintenanceArgs struct{}

func (ProofObservationMaintenanceArgs) InsertOpts

func (ProofObservationMaintenanceArgs) Kind

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

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 (ProofWebhookArgs) InsertOpts

func (ProofWebhookArgs) InsertOpts() river.InsertOpts

func (ProofWebhookArgs) Kind

func (ProofWebhookArgs) Kind() string

Jump to

Keyboard shortcuts

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