river

package
v0.51.2 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2024 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(ctx context.Context, dsn string, adm *admin.Service) (jobs.Client, error)

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func (*Client) CancelJob

func (c *Client) CancelJob(ctx context.Context, jobID int64) error

func (*Client) Close

func (c *Client) Close(ctx context.Context) error

func (*Client) CustomerAddressUpdated added in v0.50.0

func (c *Client) CustomerAddressUpdated(ctx context.Context, paymentCustomerID string, eventTime time.Time) (*jobs.InsertResult, error)

func (*Client) InitOrgBilling added in v0.50.0

func (c *Client) InitOrgBilling(ctx context.Context, orgID string) (*jobs.InsertResult, error)

func (*Client) PaymentFailed added in v0.50.0

func (c *Client) PaymentFailed(ctx context.Context, billingCustomerID, invoiceID, invoiceNumber, invoiceURL, amount, currency string, dueDate, failedAt time.Time) (*jobs.InsertResult, error)

func (*Client) PaymentMethodAdded added in v0.50.0

func (c *Client) PaymentMethodAdded(ctx context.Context, paymentMethodID, paymentCustomerID, paymentType string, eventTime time.Time) (*jobs.InsertResult, error)

func (*Client) PaymentMethodRemoved added in v0.50.0

func (c *Client) PaymentMethodRemoved(ctx context.Context, paymentMethodID, paymentCustomerID string, eventTime time.Time) (*jobs.InsertResult, error)

func (*Client) PaymentSuccess added in v0.50.0

func (c *Client) PaymentSuccess(ctx context.Context, billingCustomerID, invoiceID string) (*jobs.InsertResult, error)

func (*Client) PurgeOrg added in v0.50.0

func (c *Client) PurgeOrg(ctx context.Context, orgID string) (*jobs.InsertResult, error)

func (*Client) RepairOrgBilling added in v0.50.0

func (c *Client) RepairOrgBilling(ctx context.Context, orgID string) (*jobs.InsertResult, error)

func (*Client) ResetAllDeployments

func (c *Client) ResetAllDeployments(ctx context.Context) (*jobs.InsertResult, error)

NOTE: Add new job trigger functions here

func (*Client) StartOrgTrial added in v0.50.0

func (c *Client) StartOrgTrial(ctx context.Context, orgID string) (*jobs.InsertResult, error)

func (*Client) Work

func (c *Client) Work(ctx context.Context) error

type CustomerAddressUpdatedArgs added in v0.50.0

type CustomerAddressUpdatedArgs struct {
	PaymentCustomerID string
	EventTime         time.Time
}

func (CustomerAddressUpdatedArgs) Kind added in v0.50.0

type CustomerAddressUpdatedWorker added in v0.50.0

type CustomerAddressUpdatedWorker struct {
	river.WorkerDefaults[CustomerAddressUpdatedArgs]
	// contains filtered or unexported fields
}

func (*CustomerAddressUpdatedWorker) Work added in v0.50.0

type ErrorHandler

type ErrorHandler struct {
	// contains filtered or unexported fields
}

func (*ErrorHandler) HandleError

func (h *ErrorHandler) HandleError(ctx context.Context, job *rivertype.JobRow, err error) *river.ErrorHandlerResult

func (*ErrorHandler) HandlePanic

func (h *ErrorHandler) HandlePanic(ctx context.Context, job *rivertype.JobRow, panicVal any, trace string) *river.ErrorHandlerResult

type InitOrgBillingArgs added in v0.50.0

type InitOrgBillingArgs struct {
	OrgID string
}

func (InitOrgBillingArgs) Kind added in v0.50.0

func (InitOrgBillingArgs) Kind() string

type InitOrgBillingWorker added in v0.50.0

type InitOrgBillingWorker struct {
	river.WorkerDefaults[InitOrgBillingArgs]
	// contains filtered or unexported fields
}

func (*InitOrgBillingWorker) Work added in v0.50.0

Work This worker initializes the billing for an organization

type PaymentFailedArgs added in v0.50.0

type PaymentFailedArgs struct {
	BillingCustomerID string
	InvoiceID         string
	InvoiceNumber     string
	InvoiceURL        string
	Amount            string
	Currency          string
	DueDate           time.Time
	FailedAt          time.Time
}

func (PaymentFailedArgs) Kind added in v0.50.0

func (PaymentFailedArgs) Kind() string

type PaymentFailedGracePeriodCheckArgs added in v0.50.0

type PaymentFailedGracePeriodCheckArgs struct{}

func (PaymentFailedGracePeriodCheckArgs) Kind added in v0.50.0

type PaymentFailedGracePeriodCheckWorker added in v0.50.0

type PaymentFailedGracePeriodCheckWorker struct {
	river.WorkerDefaults[PaymentFailedGracePeriodCheckArgs]
	// contains filtered or unexported fields
}

func (*PaymentFailedGracePeriodCheckWorker) Work added in v0.50.0

type PaymentFailedWorker added in v0.50.0

type PaymentFailedWorker struct {
	river.WorkerDefaults[PaymentFailedArgs]
	// contains filtered or unexported fields
}

func (*PaymentFailedWorker) Work added in v0.50.0

type PaymentMethodAddedArgs added in v0.50.0

type PaymentMethodAddedArgs struct {
	PaymentMethodID   string
	PaymentCustomerID string
	PaymentType       string
	EventTime         time.Time
}

func (PaymentMethodAddedArgs) Kind added in v0.50.0

type PaymentMethodAddedWorker added in v0.50.0

type PaymentMethodAddedWorker struct {
	river.WorkerDefaults[PaymentMethodAddedArgs]
	// contains filtered or unexported fields
}

func (*PaymentMethodAddedWorker) Work added in v0.50.0

type PaymentMethodRemovedArgs added in v0.50.0

type PaymentMethodRemovedArgs struct {
	PaymentMethodID   string
	PaymentCustomerID string
	EventTime         time.Time
}

func (PaymentMethodRemovedArgs) Kind added in v0.50.0

type PaymentMethodRemovedWorker added in v0.50.0

type PaymentMethodRemovedWorker struct {
	river.WorkerDefaults[PaymentMethodRemovedArgs]
	// contains filtered or unexported fields
}

func (*PaymentMethodRemovedWorker) Work added in v0.50.0

type PaymentSuccessArgs added in v0.50.0

type PaymentSuccessArgs struct {
	BillingCustomerID string
	InvoiceID         string
}

func (PaymentSuccessArgs) Kind added in v0.50.0

func (PaymentSuccessArgs) Kind() string

type PaymentSuccessWorker added in v0.50.0

type PaymentSuccessWorker struct {
	river.WorkerDefaults[PaymentSuccessArgs]
	// contains filtered or unexported fields
}

func (*PaymentSuccessWorker) Work added in v0.50.0

type PurgeOrgArgs added in v0.50.0

type PurgeOrgArgs struct {
	OrgID string
}

func (PurgeOrgArgs) Kind added in v0.50.0

func (PurgeOrgArgs) Kind() string

type PurgeOrgWorker added in v0.50.0

type PurgeOrgWorker struct {
	river.WorkerDefaults[PurgeOrgArgs]
	// contains filtered or unexported fields
}

func (*PurgeOrgWorker) Work added in v0.50.0

Work This worker handles the deletion of an organization and all its associated data

type RepairOrgBillingArgs added in v0.50.0

type RepairOrgBillingArgs struct {
	OrgID string
}

func (RepairOrgBillingArgs) Kind added in v0.50.0

type RepairOrgBillingWorker added in v0.50.0

type RepairOrgBillingWorker struct {
	river.WorkerDefaults[RepairOrgBillingArgs]
	// contains filtered or unexported fields
}

func (*RepairOrgBillingWorker) Work added in v0.50.0

Work This worker repairs the billing for an organization

type ResetAllDeploymentsArgs

type ResetAllDeploymentsArgs struct{}

func (ResetAllDeploymentsArgs) Kind

type ResetAllDeploymentsWorker

type ResetAllDeploymentsWorker struct {
	river.WorkerDefaults[ResetAllDeploymentsArgs]
	// contains filtered or unexported fields
}

func (*ResetAllDeploymentsWorker) Work

type StartTrialArgs added in v0.50.0

type StartTrialArgs struct {
	OrgID string
}

func (StartTrialArgs) Kind added in v0.50.0

func (StartTrialArgs) Kind() string

type StartTrialWorker added in v0.50.0

type StartTrialWorker struct {
	river.WorkerDefaults[StartTrialArgs]
	// contains filtered or unexported fields
}

func (*StartTrialWorker) Work added in v0.50.0

Work This worker starts the trial for an organization

type SubscriptionCancellationCheckArgs added in v0.50.0

type SubscriptionCancellationCheckArgs struct{}

func (SubscriptionCancellationCheckArgs) Kind added in v0.50.0

type SubscriptionCancellationCheckWorker added in v0.50.0

type SubscriptionCancellationCheckWorker struct {
	river.WorkerDefaults[SubscriptionCancellationCheckArgs]
	// contains filtered or unexported fields
}

func (*SubscriptionCancellationCheckWorker) Work added in v0.50.0

Work This worker runs at end of the current subscription term after subscription cancellation

type TrialEndCheckArgs added in v0.50.0

type TrialEndCheckArgs struct{}

func (TrialEndCheckArgs) Kind added in v0.50.0

func (TrialEndCheckArgs) Kind() string

type TrialEndCheckWorker added in v0.50.0

type TrialEndCheckWorker struct {
	river.WorkerDefaults[TrialEndCheckArgs]
	// contains filtered or unexported fields
}

func (*TrialEndCheckWorker) Work added in v0.50.0

type TrialEndingSoonArgs added in v0.50.0

type TrialEndingSoonArgs struct{}

func (TrialEndingSoonArgs) Kind added in v0.50.0

func (TrialEndingSoonArgs) Kind() string

type TrialEndingSoonWorker added in v0.50.0

type TrialEndingSoonWorker struct {
	river.WorkerDefaults[TrialEndingSoonArgs]
	// contains filtered or unexported fields
}

func (*TrialEndingSoonWorker) Work added in v0.50.0

type TrialGracePeriodCheckArgs added in v0.50.0

type TrialGracePeriodCheckArgs struct{}

func (TrialGracePeriodCheckArgs) Kind added in v0.50.0

type TrialGracePeriodCheckWorker added in v0.50.0

type TrialGracePeriodCheckWorker struct {
	river.WorkerDefaults[TrialGracePeriodCheckArgs]
	// contains filtered or unexported fields
}

func (*TrialGracePeriodCheckWorker) Work added in v0.50.0

type ValidateDeploymentsArgs

type ValidateDeploymentsArgs struct{}

func (ValidateDeploymentsArgs) Kind

type ValidateDeploymentsWorker

type ValidateDeploymentsWorker struct {
	river.WorkerDefaults[ValidateDeploymentsArgs]
	// contains filtered or unexported fields
}

func (*ValidateDeploymentsWorker) Work

Jump to

Keyboard shortcuts

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