job

package
v0.0.0-...-f2052de Latest Latest
Warning

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

Go to latest
Published: May 26, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the job type in the database.
	Label = "job"
	// FieldID holds the string denoting the id field in the database.
	FieldID = "id"
	// FieldCreatedAt holds the string denoting the created_at field in the database.
	FieldCreatedAt = "created_at"
	// FieldUpdatedAt holds the string denoting the updated_at field in the database.
	FieldUpdatedAt = "updated_at"
	// FieldStatus holds the string denoting the status field in the database.
	FieldStatus = "status"
	// FieldQueueName holds the string denoting the queue_name field in the database.
	FieldQueueName = "queue_name"
	// FieldRefID holds the string denoting the ref_id field in the database.
	FieldRefID = "ref_id"
	// FieldPriority holds the string denoting the priority field in the database.
	FieldPriority = "priority"
	// FieldRetryTimes holds the string denoting the retry_times field in the database.
	FieldRetryTimes = "retry_times"
	// FieldBody holds the string denoting the body field in the database.
	FieldBody = "body"
	// FieldError holds the string denoting the error field in the database.
	FieldError = "error"
	// FieldScheduledAt holds the string denoting the scheduled_at field in the database.
	FieldScheduledAt = "scheduled_at"
	// FieldFinishedAt holds the string denoting the finished_at field in the database.
	FieldFinishedAt = "finished_at"
	// Table holds the table name of the job in the database.
	Table = "sssq_scheduled_jobs"
)
View Source
const DefaultStatus = StatusInit

StatusInit is the default value of the Status enum.

Variables

View Source
var (
	// DefaultCreatedAt holds the default value on creation for the "created_at" field.
	DefaultCreatedAt func() time.Time
	// DefaultUpdatedAt holds the default value on creation for the "updated_at" field.
	DefaultUpdatedAt func() time.Time
	// UpdateDefaultUpdatedAt holds the default value on update for the "updated_at" field.
	UpdateDefaultUpdatedAt func() time.Time
	// DefaultQueueName holds the default value on creation for the "queue_name" field.
	DefaultQueueName string
	// DefaultRefID holds the default value on creation for the "ref_id" field.
	DefaultRefID func() string
	// DefaultPriority holds the default value on creation for the "priority" field.
	DefaultPriority uint
	// DefaultRetryTimes holds the default value on creation for the "retry_times" field.
	DefaultRetryTimes uint
	// DefaultScheduledAt holds the default value on creation for the "scheduled_at" field.
	DefaultScheduledAt func() time.Time
)

Columns holds all SQL columns for job fields.

Functions

func And

func And(predicates ...predicate.Job) predicate.Job

And groups predicates with the AND operator between them.

func Body

func Body(v string) predicate.Job

Body applies equality check predicate on the "body" field. It's identical to BodyEQ.

func BodyContains

func BodyContains(v string) predicate.Job

BodyContains applies the Contains predicate on the "body" field.

func BodyContainsFold

func BodyContainsFold(v string) predicate.Job

BodyContainsFold applies the ContainsFold predicate on the "body" field.

func BodyEQ

func BodyEQ(v string) predicate.Job

BodyEQ applies the EQ predicate on the "body" field.

func BodyEqualFold

func BodyEqualFold(v string) predicate.Job

BodyEqualFold applies the EqualFold predicate on the "body" field.

func BodyGT

func BodyGT(v string) predicate.Job

BodyGT applies the GT predicate on the "body" field.

func BodyGTE

func BodyGTE(v string) predicate.Job

BodyGTE applies the GTE predicate on the "body" field.

func BodyHasPrefix

func BodyHasPrefix(v string) predicate.Job

BodyHasPrefix applies the HasPrefix predicate on the "body" field.

func BodyHasSuffix

func BodyHasSuffix(v string) predicate.Job

BodyHasSuffix applies the HasSuffix predicate on the "body" field.

func BodyIn

func BodyIn(vs ...string) predicate.Job

BodyIn applies the In predicate on the "body" field.

func BodyIsNil

func BodyIsNil() predicate.Job

BodyIsNil applies the IsNil predicate on the "body" field.

func BodyLT

func BodyLT(v string) predicate.Job

BodyLT applies the LT predicate on the "body" field.

func BodyLTE

func BodyLTE(v string) predicate.Job

BodyLTE applies the LTE predicate on the "body" field.

func BodyNEQ

func BodyNEQ(v string) predicate.Job

BodyNEQ applies the NEQ predicate on the "body" field.

func BodyNotIn

func BodyNotIn(vs ...string) predicate.Job

BodyNotIn applies the NotIn predicate on the "body" field.

func BodyNotNil

func BodyNotNil() predicate.Job

BodyNotNil applies the NotNil predicate on the "body" field.

func CreatedAt

func CreatedAt(v time.Time) predicate.Job

CreatedAt applies equality check predicate on the "created_at" field. It's identical to CreatedAtEQ.

func CreatedAtEQ

func CreatedAtEQ(v time.Time) predicate.Job

CreatedAtEQ applies the EQ predicate on the "created_at" field.

func CreatedAtGT

func CreatedAtGT(v time.Time) predicate.Job

CreatedAtGT applies the GT predicate on the "created_at" field.

func CreatedAtGTE

func CreatedAtGTE(v time.Time) predicate.Job

CreatedAtGTE applies the GTE predicate on the "created_at" field.

func CreatedAtIn

func CreatedAtIn(vs ...time.Time) predicate.Job

CreatedAtIn applies the In predicate on the "created_at" field.

func CreatedAtLT

func CreatedAtLT(v time.Time) predicate.Job

CreatedAtLT applies the LT predicate on the "created_at" field.

func CreatedAtLTE

func CreatedAtLTE(v time.Time) predicate.Job

CreatedAtLTE applies the LTE predicate on the "created_at" field.

func CreatedAtNEQ

func CreatedAtNEQ(v time.Time) predicate.Job

CreatedAtNEQ applies the NEQ predicate on the "created_at" field.

func CreatedAtNotIn

func CreatedAtNotIn(vs ...time.Time) predicate.Job

CreatedAtNotIn applies the NotIn predicate on the "created_at" field.

func Error

func Error(v string) predicate.Job

Error applies equality check predicate on the "error" field. It's identical to ErrorEQ.

func ErrorContains

func ErrorContains(v string) predicate.Job

ErrorContains applies the Contains predicate on the "error" field.

func ErrorContainsFold

func ErrorContainsFold(v string) predicate.Job

ErrorContainsFold applies the ContainsFold predicate on the "error" field.

func ErrorEQ

func ErrorEQ(v string) predicate.Job

ErrorEQ applies the EQ predicate on the "error" field.

func ErrorEqualFold

func ErrorEqualFold(v string) predicate.Job

ErrorEqualFold applies the EqualFold predicate on the "error" field.

func ErrorGT

func ErrorGT(v string) predicate.Job

ErrorGT applies the GT predicate on the "error" field.

func ErrorGTE

func ErrorGTE(v string) predicate.Job

ErrorGTE applies the GTE predicate on the "error" field.

func ErrorHasPrefix

func ErrorHasPrefix(v string) predicate.Job

ErrorHasPrefix applies the HasPrefix predicate on the "error" field.

func ErrorHasSuffix

func ErrorHasSuffix(v string) predicate.Job

ErrorHasSuffix applies the HasSuffix predicate on the "error" field.

func ErrorIn

func ErrorIn(vs ...string) predicate.Job

ErrorIn applies the In predicate on the "error" field.

func ErrorIsNil

func ErrorIsNil() predicate.Job

ErrorIsNil applies the IsNil predicate on the "error" field.

func ErrorLT

func ErrorLT(v string) predicate.Job

ErrorLT applies the LT predicate on the "error" field.

func ErrorLTE

func ErrorLTE(v string) predicate.Job

ErrorLTE applies the LTE predicate on the "error" field.

func ErrorNEQ

func ErrorNEQ(v string) predicate.Job

ErrorNEQ applies the NEQ predicate on the "error" field.

func ErrorNotIn

func ErrorNotIn(vs ...string) predicate.Job

ErrorNotIn applies the NotIn predicate on the "error" field.

func ErrorNotNil

func ErrorNotNil() predicate.Job

ErrorNotNil applies the NotNil predicate on the "error" field.

func FinishedAt

func FinishedAt(v time.Time) predicate.Job

FinishedAt applies equality check predicate on the "finished_at" field. It's identical to FinishedAtEQ.

func FinishedAtEQ

func FinishedAtEQ(v time.Time) predicate.Job

FinishedAtEQ applies the EQ predicate on the "finished_at" field.

func FinishedAtGT

func FinishedAtGT(v time.Time) predicate.Job

FinishedAtGT applies the GT predicate on the "finished_at" field.

func FinishedAtGTE

func FinishedAtGTE(v time.Time) predicate.Job

FinishedAtGTE applies the GTE predicate on the "finished_at" field.

func FinishedAtIn

func FinishedAtIn(vs ...time.Time) predicate.Job

FinishedAtIn applies the In predicate on the "finished_at" field.

func FinishedAtIsNil

func FinishedAtIsNil() predicate.Job

FinishedAtIsNil applies the IsNil predicate on the "finished_at" field.

func FinishedAtLT

func FinishedAtLT(v time.Time) predicate.Job

FinishedAtLT applies the LT predicate on the "finished_at" field.

func FinishedAtLTE

func FinishedAtLTE(v time.Time) predicate.Job

FinishedAtLTE applies the LTE predicate on the "finished_at" field.

func FinishedAtNEQ

func FinishedAtNEQ(v time.Time) predicate.Job

FinishedAtNEQ applies the NEQ predicate on the "finished_at" field.

func FinishedAtNotIn

func FinishedAtNotIn(vs ...time.Time) predicate.Job

FinishedAtNotIn applies the NotIn predicate on the "finished_at" field.

func FinishedAtNotNil

func FinishedAtNotNil() predicate.Job

FinishedAtNotNil applies the NotNil predicate on the "finished_at" field.

func ID

func ID(id uint64) predicate.Job

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id uint64) predicate.Job

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id uint64) predicate.Job

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id uint64) predicate.Job

IDGTE applies the GTE predicate on the ID field.

func IDIn

func IDIn(ids ...uint64) predicate.Job

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id uint64) predicate.Job

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id uint64) predicate.Job

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id uint64) predicate.Job

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

func IDNotIn(ids ...uint64) predicate.Job

IDNotIn applies the NotIn predicate on the ID field.

func Not

func Not(p predicate.Job) predicate.Job

Not applies the not operator on the given predicate.

func Or

func Or(predicates ...predicate.Job) predicate.Job

Or groups predicates with the OR operator between them.

func Priority

func Priority(v uint) predicate.Job

Priority applies equality check predicate on the "priority" field. It's identical to PriorityEQ.

func PriorityEQ

func PriorityEQ(v uint) predicate.Job

PriorityEQ applies the EQ predicate on the "priority" field.

func PriorityGT

func PriorityGT(v uint) predicate.Job

PriorityGT applies the GT predicate on the "priority" field.

func PriorityGTE

func PriorityGTE(v uint) predicate.Job

PriorityGTE applies the GTE predicate on the "priority" field.

func PriorityIn

func PriorityIn(vs ...uint) predicate.Job

PriorityIn applies the In predicate on the "priority" field.

func PriorityLT

func PriorityLT(v uint) predicate.Job

PriorityLT applies the LT predicate on the "priority" field.

func PriorityLTE

func PriorityLTE(v uint) predicate.Job

PriorityLTE applies the LTE predicate on the "priority" field.

func PriorityNEQ

func PriorityNEQ(v uint) predicate.Job

PriorityNEQ applies the NEQ predicate on the "priority" field.

func PriorityNotIn

func PriorityNotIn(vs ...uint) predicate.Job

PriorityNotIn applies the NotIn predicate on the "priority" field.

func QueueName

func QueueName(v string) predicate.Job

QueueName applies equality check predicate on the "queue_name" field. It's identical to QueueNameEQ.

func QueueNameContains

func QueueNameContains(v string) predicate.Job

QueueNameContains applies the Contains predicate on the "queue_name" field.

func QueueNameContainsFold

func QueueNameContainsFold(v string) predicate.Job

QueueNameContainsFold applies the ContainsFold predicate on the "queue_name" field.

func QueueNameEQ

func QueueNameEQ(v string) predicate.Job

QueueNameEQ applies the EQ predicate on the "queue_name" field.

func QueueNameEqualFold

func QueueNameEqualFold(v string) predicate.Job

QueueNameEqualFold applies the EqualFold predicate on the "queue_name" field.

func QueueNameGT

func QueueNameGT(v string) predicate.Job

QueueNameGT applies the GT predicate on the "queue_name" field.

func QueueNameGTE

func QueueNameGTE(v string) predicate.Job

QueueNameGTE applies the GTE predicate on the "queue_name" field.

func QueueNameHasPrefix

func QueueNameHasPrefix(v string) predicate.Job

QueueNameHasPrefix applies the HasPrefix predicate on the "queue_name" field.

func QueueNameHasSuffix

func QueueNameHasSuffix(v string) predicate.Job

QueueNameHasSuffix applies the HasSuffix predicate on the "queue_name" field.

func QueueNameIn

func QueueNameIn(vs ...string) predicate.Job

QueueNameIn applies the In predicate on the "queue_name" field.

func QueueNameLT

func QueueNameLT(v string) predicate.Job

QueueNameLT applies the LT predicate on the "queue_name" field.

func QueueNameLTE

func QueueNameLTE(v string) predicate.Job

QueueNameLTE applies the LTE predicate on the "queue_name" field.

func QueueNameNEQ

func QueueNameNEQ(v string) predicate.Job

QueueNameNEQ applies the NEQ predicate on the "queue_name" field.

func QueueNameNotIn

func QueueNameNotIn(vs ...string) predicate.Job

QueueNameNotIn applies the NotIn predicate on the "queue_name" field.

func RefID

func RefID(v string) predicate.Job

RefID applies equality check predicate on the "ref_id" field. It's identical to RefIDEQ.

func RefIDContains

func RefIDContains(v string) predicate.Job

RefIDContains applies the Contains predicate on the "ref_id" field.

func RefIDContainsFold

func RefIDContainsFold(v string) predicate.Job

RefIDContainsFold applies the ContainsFold predicate on the "ref_id" field.

func RefIDEQ

func RefIDEQ(v string) predicate.Job

RefIDEQ applies the EQ predicate on the "ref_id" field.

func RefIDEqualFold

func RefIDEqualFold(v string) predicate.Job

RefIDEqualFold applies the EqualFold predicate on the "ref_id" field.

func RefIDGT

func RefIDGT(v string) predicate.Job

RefIDGT applies the GT predicate on the "ref_id" field.

func RefIDGTE

func RefIDGTE(v string) predicate.Job

RefIDGTE applies the GTE predicate on the "ref_id" field.

func RefIDHasPrefix

func RefIDHasPrefix(v string) predicate.Job

RefIDHasPrefix applies the HasPrefix predicate on the "ref_id" field.

func RefIDHasSuffix

func RefIDHasSuffix(v string) predicate.Job

RefIDHasSuffix applies the HasSuffix predicate on the "ref_id" field.

func RefIDIn

func RefIDIn(vs ...string) predicate.Job

RefIDIn applies the In predicate on the "ref_id" field.

func RefIDLT

func RefIDLT(v string) predicate.Job

RefIDLT applies the LT predicate on the "ref_id" field.

func RefIDLTE

func RefIDLTE(v string) predicate.Job

RefIDLTE applies the LTE predicate on the "ref_id" field.

func RefIDNEQ

func RefIDNEQ(v string) predicate.Job

RefIDNEQ applies the NEQ predicate on the "ref_id" field.

func RefIDNotIn

func RefIDNotIn(vs ...string) predicate.Job

RefIDNotIn applies the NotIn predicate on the "ref_id" field.

func RetryTimes

func RetryTimes(v uint) predicate.Job

RetryTimes applies equality check predicate on the "retry_times" field. It's identical to RetryTimesEQ.

func RetryTimesEQ

func RetryTimesEQ(v uint) predicate.Job

RetryTimesEQ applies the EQ predicate on the "retry_times" field.

func RetryTimesGT

func RetryTimesGT(v uint) predicate.Job

RetryTimesGT applies the GT predicate on the "retry_times" field.

func RetryTimesGTE

func RetryTimesGTE(v uint) predicate.Job

RetryTimesGTE applies the GTE predicate on the "retry_times" field.

func RetryTimesIn

func RetryTimesIn(vs ...uint) predicate.Job

RetryTimesIn applies the In predicate on the "retry_times" field.

func RetryTimesLT

func RetryTimesLT(v uint) predicate.Job

RetryTimesLT applies the LT predicate on the "retry_times" field.

func RetryTimesLTE

func RetryTimesLTE(v uint) predicate.Job

RetryTimesLTE applies the LTE predicate on the "retry_times" field.

func RetryTimesNEQ

func RetryTimesNEQ(v uint) predicate.Job

RetryTimesNEQ applies the NEQ predicate on the "retry_times" field.

func RetryTimesNotIn

func RetryTimesNotIn(vs ...uint) predicate.Job

RetryTimesNotIn applies the NotIn predicate on the "retry_times" field.

func ScheduledAt

func ScheduledAt(v time.Time) predicate.Job

ScheduledAt applies equality check predicate on the "scheduled_at" field. It's identical to ScheduledAtEQ.

func ScheduledAtEQ

func ScheduledAtEQ(v time.Time) predicate.Job

ScheduledAtEQ applies the EQ predicate on the "scheduled_at" field.

func ScheduledAtGT

func ScheduledAtGT(v time.Time) predicate.Job

ScheduledAtGT applies the GT predicate on the "scheduled_at" field.

func ScheduledAtGTE

func ScheduledAtGTE(v time.Time) predicate.Job

ScheduledAtGTE applies the GTE predicate on the "scheduled_at" field.

func ScheduledAtIn

func ScheduledAtIn(vs ...time.Time) predicate.Job

ScheduledAtIn applies the In predicate on the "scheduled_at" field.

func ScheduledAtLT

func ScheduledAtLT(v time.Time) predicate.Job

ScheduledAtLT applies the LT predicate on the "scheduled_at" field.

func ScheduledAtLTE

func ScheduledAtLTE(v time.Time) predicate.Job

ScheduledAtLTE applies the LTE predicate on the "scheduled_at" field.

func ScheduledAtNEQ

func ScheduledAtNEQ(v time.Time) predicate.Job

ScheduledAtNEQ applies the NEQ predicate on the "scheduled_at" field.

func ScheduledAtNotIn

func ScheduledAtNotIn(vs ...time.Time) predicate.Job

ScheduledAtNotIn applies the NotIn predicate on the "scheduled_at" field.

func StatusEQ

func StatusEQ(v Status) predicate.Job

StatusEQ applies the EQ predicate on the "status" field.

func StatusIn

func StatusIn(vs ...Status) predicate.Job

StatusIn applies the In predicate on the "status" field.

func StatusNEQ

func StatusNEQ(v Status) predicate.Job

StatusNEQ applies the NEQ predicate on the "status" field.

func StatusNotIn

func StatusNotIn(vs ...Status) predicate.Job

StatusNotIn applies the NotIn predicate on the "status" field.

func StatusValidator

func StatusValidator(s Status) error

StatusValidator is a validator for the "status" field enum values. It is called by the builders before save.

func UpdatedAt

func UpdatedAt(v time.Time) predicate.Job

UpdatedAt applies equality check predicate on the "updated_at" field. It's identical to UpdatedAtEQ.

func UpdatedAtEQ

func UpdatedAtEQ(v time.Time) predicate.Job

UpdatedAtEQ applies the EQ predicate on the "updated_at" field.

func UpdatedAtGT

func UpdatedAtGT(v time.Time) predicate.Job

UpdatedAtGT applies the GT predicate on the "updated_at" field.

func UpdatedAtGTE

func UpdatedAtGTE(v time.Time) predicate.Job

UpdatedAtGTE applies the GTE predicate on the "updated_at" field.

func UpdatedAtIn

func UpdatedAtIn(vs ...time.Time) predicate.Job

UpdatedAtIn applies the In predicate on the "updated_at" field.

func UpdatedAtLT

func UpdatedAtLT(v time.Time) predicate.Job

UpdatedAtLT applies the LT predicate on the "updated_at" field.

func UpdatedAtLTE

func UpdatedAtLTE(v time.Time) predicate.Job

UpdatedAtLTE applies the LTE predicate on the "updated_at" field.

func UpdatedAtNEQ

func UpdatedAtNEQ(v time.Time) predicate.Job

UpdatedAtNEQ applies the NEQ predicate on the "updated_at" field.

func UpdatedAtNotIn

func UpdatedAtNotIn(vs ...time.Time) predicate.Job

UpdatedAtNotIn applies the NotIn predicate on the "updated_at" field.

func ValidColumn

func ValidColumn(column string) bool

ValidColumn reports if the column name is valid (part of the table columns).

Types

type OrderOption

type OrderOption func(*sql.Selector)

OrderOption defines the ordering options for the Job queries.

func ByBody

func ByBody(opts ...sql.OrderTermOption) OrderOption

ByBody orders the results by the body field.

func ByCreatedAt

func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption

ByCreatedAt orders the results by the created_at field.

func ByError

func ByError(opts ...sql.OrderTermOption) OrderOption

ByError orders the results by the error field.

func ByFinishedAt

func ByFinishedAt(opts ...sql.OrderTermOption) OrderOption

ByFinishedAt orders the results by the finished_at field.

func ByID

func ByID(opts ...sql.OrderTermOption) OrderOption

ByID orders the results by the id field.

func ByPriority

func ByPriority(opts ...sql.OrderTermOption) OrderOption

ByPriority orders the results by the priority field.

func ByQueueName

func ByQueueName(opts ...sql.OrderTermOption) OrderOption

ByQueueName orders the results by the queue_name field.

func ByRefID

func ByRefID(opts ...sql.OrderTermOption) OrderOption

ByRefID orders the results by the ref_id field.

func ByRetryTimes

func ByRetryTimes(opts ...sql.OrderTermOption) OrderOption

ByRetryTimes orders the results by the retry_times field.

func ByScheduledAt

func ByScheduledAt(opts ...sql.OrderTermOption) OrderOption

ByScheduledAt orders the results by the scheduled_at field.

func ByStatus

func ByStatus(opts ...sql.OrderTermOption) OrderOption

ByStatus orders the results by the status field.

func ByUpdatedAt

func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption

ByUpdatedAt orders the results by the updated_at field.

type Status

type Status string

Status defines the type for the "status" enum field.

const (
	StatusInit       Status = "Init"
	StatusProcessing Status = "Processing"
	StatusSuccessful Status = "Successful"
	StatusFailed     Status = "Failed"
	StatusWaitRetry  Status = "WaitRetry"
)

Status values.

func (Status) String

func (s Status) String() string

Jump to

Keyboard shortcuts

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