jobspec

package
v1.0.9 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package jobspec contains job specifications for various background jobs used throughout the application.

Index

Constants

View Source
const (
	// QueueDefault holds jobs that have not been put in any specific queue
	QueueDefault = "default"
	// QueueCompliance is the queue for compliance jobs.
	QueueCompliance = "compliance"
	// QueueTrustcenter is the queue for trust center jobs.
	QueueTrustcenter = "trustcenter"
	// QueueNotification is the queue for notification jobs.
	QueueNotification = "notifications"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AttestNDARequestArgs added in v1.0.6

type AttestNDARequestArgs struct {
	// NDARequestID is the id of the request
	NDARequestID string `json:"nda_request_id"`

	// TrustCenterNDAFullURL is the url to access the private document
	TrustCenterNDAFullURL string `json:"trust_center_nda_full_url"`
}

AttestNDARequestArgs for the worker to process the signed nda pdf

func (AttestNDARequestArgs) InsertOpts added in v1.0.6

func (AttestNDARequestArgs) InsertOpts() river.InsertOpts

InsertOpts provides the default configuration when processing this job.

func (AttestNDARequestArgs) Kind added in v1.0.6

Kind satisfies the river.Job interface

type CampaignDispatchAction added in v1.0.7

type CampaignDispatchAction string

CampaignDispatchAction identifies which campaign dispatch workflow should run.

const (
	// CampaignDispatchActionLaunch dispatches the initial campaign launch.
	CampaignDispatchActionLaunch CampaignDispatchAction = "launch"
	// CampaignDispatchActionResend dispatches a resend to previously-sent targets.
	CampaignDispatchActionResend CampaignDispatchAction = "resend"
	// CampaignDispatchActionResendIncomplete dispatches a resend to incomplete targets.
	CampaignDispatchActionResendIncomplete CampaignDispatchAction = "resend_incomplete"
)

CampaignDispatchActions defines the supported dispatch actions for campaigns.

type CampaignDispatchArgs added in v1.0.7

type CampaignDispatchArgs struct {
	// CampaignID is the campaign to dispatch (required).
	CampaignID string `json:"campaign_id" river:"unique"`
	// Action identifies the dispatch behavior (required).
	Action CampaignDispatchAction `json:"action" river:"unique"`
	// ScheduledAt is the requested schedule time (optional).
	ScheduledAt *time.Time `json:"scheduled_at,omitempty" river:"unique"`
	// RequestedBy is the user that requested the dispatch (optional).
	RequestedBy string `json:"requested_by,omitempty"`
}

CampaignDispatchArgs schedules or dispatches campaign notifications.

func (CampaignDispatchArgs) InsertOpts added in v1.0.7

func (CampaignDispatchArgs) InsertOpts() river.InsertOpts

InsertOpts provides the default configuration when scheduling this job.

func (CampaignDispatchArgs) Kind added in v1.0.7

Kind satisfies the river.Job interface.

type ClearTrustCenterCacheArgs

type ClearTrustCenterCacheArgs struct {
	// CustomDomain is the custom domain for the trust center
	// If provided, will clear cache for this custom domain
	CustomDomain string `json:"custom_domain,omitempty"`

	// TrustCenterSlug is the slug for the trust center
	// Used with default domain: trust.theopenlane.net/<trust center slug>
	// If CustomDomain is not provided, this will be used
	TrustCenterSlug string `json:"trust_center_slug,omitempty"`
}

ClearTrustCenterCacheArgs for the worker to clear trust center cache

func (ClearTrustCenterCacheArgs) InsertOpts added in v1.0.3

InsertOpts provides the default configuration when processing this job.

func (ClearTrustCenterCacheArgs) Kind

Kind satisfies the river.Job interface

type CreateCustomDomainArgs

type CreateCustomDomainArgs struct {
	// ID of the custom domain in our system
	CustomDomainID string `json:"custom_domain_id"`
}

CreateCustomDomainArgs for the worker to process the custom domain

func (CreateCustomDomainArgs) InsertOpts added in v1.0.3

InsertOpts provides the default configuration when processing this job.

func (CreateCustomDomainArgs) Kind

Kind satisfies the river.Job interface

type CreatePirschDomainArgs

type CreatePirschDomainArgs struct {
	// TrustCenterID is the ID of the trust center to create a Pirsch domain for
	TrustCenterID string `json:"trust_center_id"`
}

CreatePirschDomainArgs for the worker to process the pirsch domain creation

func (CreatePirschDomainArgs) InsertOpts added in v1.0.3

InsertOpts provides the default configuration when processing this job.

func (CreatePirschDomainArgs) Kind

Kind satisfies the river.Job interface

type CreatePreviewDomainArgs

type CreatePreviewDomainArgs struct {
	// TrustCenterID is the ID of the trust center to create a preview domain for
	TrustCenterID string `json:"trust_center_id"`
	// TrustCenterPreviewZoneID is the cloudflare zone id for the trust center preview domain
	TrustCenterPreviewZoneID string `json:"trust_center_preview_zone_id"`
	// TrustCenterCnameTarget is the cname target for the trust center
	TrustCenterCnameTarget string `json:"trust_center_cname_target"`
}

CreatePreviewDomainArgs for the worker to process the preview domain creation

func (CreatePreviewDomainArgs) InsertOpts added in v1.0.3

InsertOpts provides the default configuration when processing this job.

func (CreatePreviewDomainArgs) Kind

Kind satisfies the river.Job interface

type CreateTaskArgs

type CreateTaskArgs struct {
	// OrganizationID is the organization that owns the task (required)
	OrganizationID string `json:"organization_id"`

	// Title of the task (required)
	Title string `json:"title"`

	// Description/details of the task (required)
	Description string `json:"description"`

	// Category of the task (optional) - e.g. "Policy Review", "Evidence Upload", "Onboarding"
	Category *string `json:"category,omitempty"`

	// AssigneeID is the user to assign the task to (optional)
	AssigneeID *string `json:"assignee_id,omitempty"`

	// AssignerID is the user who created/assigned the task (optional)
	AssignerID *string `json:"assigner_id,omitempty"`

	// DueDate for the task (optional)
	DueDate *models.DateTime `json:"due_date,omitempty"`

	// InternalPolicyIDs to link the task to internal policies (optional)
	InternalPolicyIDs []string `json:"internal_policy_ids,omitempty"`

	// Tags associated with the task (optional)
	Tags []string `json:"tags,omitempty"`

	// ScheduledAt allows scheduling the job for a future time (optional)
	ScheduledAt *time.Time `json:"scheduled_at,omitempty"`
}

CreateTaskArgs for the worker to process This is a generic task creation job that accepts pre-built task details. External systems (schedulers, triggers, polling jobs) should handle business logic like fetching policies, selecting assignees, building descriptions, etc.

func (CreateTaskArgs) InsertOpts added in v1.0.3

func (CreateTaskArgs) InsertOpts() river.InsertOpts

InsertOpts provides the default configuration when processing this job.

func (CreateTaskArgs) Kind

func (CreateTaskArgs) Kind() string

Kind satisfies the river.Job interface

type DeleteCustomDomainArgs

type DeleteCustomDomainArgs struct {
	// CustomDomainID of the id of the custom domain in the system
	CustomDomainID string `json:"custom_domain_id"`
	// DNSVerificationID of the dns verification id in the system
	DNSVerificationID string `json:"dns_verification_id"`
	// CloudflareCustomHostnameID of the cloudflare custom hostname id to delete
	CloudflareCustomHostnameID string `json:"cloudflare_custom_hostname_id"`
	// CloudflareZoneID of the cloudflare zone id where the custom domain is located
	CloudflareZoneID string `json:"cloudflare_zone_id"`
}

DeleteCustomDomainArgs for the worker to process the custom domain

func (DeleteCustomDomainArgs) InsertOpts added in v1.0.3

InsertOpts provides the default configuration when processing this job.

func (DeleteCustomDomainArgs) Kind

Kind satisfies the river.Job interface

type DeletePirschDomainArgs

type DeletePirschDomainArgs struct {
	// PirschDomainID is the ID of the Pirsch domain to delete
	PirschDomainID string `json:"pirsch_domain_id"`
}

DeletePirschDomainArgs for the worker to delete a Pirsch domain

func (DeletePirschDomainArgs) InsertOpts added in v1.0.3

InsertOpts provides the default configuration when processing this job.

func (DeletePirschDomainArgs) Kind

Kind satisfies the river.Job interface

type DeletePreviewDomainArgs

type DeletePreviewDomainArgs struct {
	// CustomDomainID is the ID of the custom domain to delete
	CustomDomainID string `json:"custom_domain_id"`
	// TrustCenterPreviewZoneID is the cloudflare zone id for the trust center preview domain
	TrustCenterPreviewZoneID string `json:"trust_center_preview_zone_id"`
}

DeletePreviewDomainArgs for the worker to process the preview domain deletion

func (DeletePreviewDomainArgs) InsertOpts added in v1.0.3

InsertOpts provides the default configuration when processing this job.

func (DeletePreviewDomainArgs) Kind

Kind satisfies the river.Job interface

type ExportContentArgs

type ExportContentArgs struct {
	// ExportID is the ID of the export job
	ExportID string `json:"export_id,omitempty"`
	// UserID of the user who requested the export (for system admin context)
	UserID string `json:"user_id,omitempty"`
	// OrganizationID of the organization context for the export
	OrganizationID string `json:"organization_id,omitempty"`
}

ExportContentArgs for the worker to process and update the record for the updated content

func (ExportContentArgs) InsertOpts added in v1.0.3

func (ExportContentArgs) InsertOpts() river.InsertOpts

InsertOpts provides the default configuration when processing this job.

func (ExportContentArgs) Kind

func (ExportContentArgs) Kind() string

Kind satisfies the river.Job interface

type UpdatePirschDomainArgs

type UpdatePirschDomainArgs struct {
	// TrustCenterID is the ID of the trust center to update the Pirsch domain for
	TrustCenterID string `json:"trust_center_id"`
}

UpdatePirschDomainArgs for the worker to update the pirsch domain

func (UpdatePirschDomainArgs) InsertOpts added in v1.0.3

InsertOpts provides the default configuration when processing this job.

func (UpdatePirschDomainArgs) Kind

Kind satisfies the river.Job interface

type ValidateCustomDomainArgs

type ValidateCustomDomainArgs struct {
	CustomDomainID string `json:"custom_domain_id"`
}

ValidateCustomDomainArgs for the worker to process the custom domain

func (ValidateCustomDomainArgs) InsertOpts added in v1.0.3

InsertOpts provides the default configuration when processing this job.

func (ValidateCustomDomainArgs) Kind

Kind satisfies the river.Job interface

type ValidatePreviewDomainArgs

type ValidatePreviewDomainArgs struct {
	// TrustCenterID is the ID of the trust center to validate the preview domain for
	TrustCenterID string `json:"trust_center_id"`
	// TrustCenterPreviewZoneID is the cloudflare zone id for the trust center preview domain
	TrustCenterPreviewZoneID string `json:"trust_center_preview_zone_id"`
}

ValidatePreviewDomainArgs for the worker to process the preview domain creation

func (ValidatePreviewDomainArgs) InsertOpts added in v1.0.3

InsertOpts provides the default configuration when processing this job.

func (ValidatePreviewDomainArgs) Kind

Kind satisfies the river.Job interface

type WatermarkDocArgs

type WatermarkDocArgs struct {
	// TrustCenterDocumentID is the ID of the trust center document to watermark
	TrustCenterDocumentID string `json:"trust_center_document_id"`
}

WatermarkDocArgs for the worker to process watermarking of a document

func (WatermarkDocArgs) InsertOpts added in v1.0.3

func (WatermarkDocArgs) InsertOpts() river.InsertOpts

InsertOpts provides the default configuration when processing this job.

func (WatermarkDocArgs) Kind

func (WatermarkDocArgs) Kind() string

Kind satisfies the river.Job interface

Jump to

Keyboard shortcuts

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