task

package
v0.0.0-...-52fa7fc Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2025 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the task type in the database.
	Label = "task"
	// FieldID holds the string denoting the id field in the database.
	FieldID = "id"
	// FieldCommandID holds the string denoting the command_id field in the database.
	FieldCommandID = "command_id"
	// FieldAgentID holds the string denoting the agent_id field in the database.
	FieldAgentID = "agent_id"
	// FieldCreatedAt holds the string denoting the created_at field in the database.
	FieldCreatedAt = "created_at"
	// FieldPushedAt holds the string denoting the pushed_at field in the database.
	FieldPushedAt = "pushed_at"
	// FieldDoneAt holds the string denoting the done_at field in the database.
	FieldDoneAt = "done_at"
	// FieldStatus holds the string denoting the status field in the database.
	FieldStatus = "status"
	// FieldCap holds the string denoting the cap field in the database.
	FieldCap = "cap"
	// FieldArgsID holds the string denoting the args_id field in the database.
	FieldArgsID = "args_id"
	// FieldOutputID holds the string denoting the output_id field in the database.
	FieldOutputID = "output_id"
	// FieldOutputBig holds the string denoting the output_big field in the database.
	FieldOutputBig = "output_big"
	// EdgeCommand holds the string denoting the command edge name in mutations.
	EdgeCommand = "command"
	// EdgeAgent holds the string denoting the agent edge name in mutations.
	EdgeAgent = "agent"
	// EdgeBlobberArgs holds the string denoting the blobber_args edge name in mutations.
	EdgeBlobberArgs = "blobber_args"
	// EdgeBlobberOutput holds the string denoting the blobber_output edge name in mutations.
	EdgeBlobberOutput = "blobber_output"
	// Table holds the table name of the task in the database.
	Table = "task"
	// CommandTable is the table that holds the command relation/edge.
	CommandTable = "task"
	// CommandInverseTable is the table name for the Command entity.
	// It exists in this package in order to avoid circular dependency with the "command" package.
	CommandInverseTable = "command"
	// CommandColumn is the table column denoting the command relation/edge.
	CommandColumn = "command_id"
	// AgentTable is the table that holds the agent relation/edge.
	AgentTable = "task"
	// AgentInverseTable is the table name for the Agent entity.
	// It exists in this package in order to avoid circular dependency with the "agent" package.
	AgentInverseTable = "agent"
	// AgentColumn is the table column denoting the agent relation/edge.
	AgentColumn = "agent_id"
	// BlobberArgsTable is the table that holds the blobber_args relation/edge.
	BlobberArgsTable = "task"
	// BlobberArgsInverseTable is the table name for the Blobber entity.
	// It exists in this package in order to avoid circular dependency with the "blobber" package.
	BlobberArgsInverseTable = "blobber"
	// BlobberArgsColumn is the table column denoting the blobber_args relation/edge.
	BlobberArgsColumn = "args_id"
	// BlobberOutputTable is the table that holds the blobber_output relation/edge.
	BlobberOutputTable = "task"
	// BlobberOutputInverseTable is the table name for the Blobber entity.
	// It exists in this package in order to avoid circular dependency with the "blobber" package.
	BlobberOutputInverseTable = "blobber"
	// BlobberOutputColumn is the table column denoting the blobber_output relation/edge.
	BlobberOutputColumn = "output_id"
)

Variables

Columns holds all SQL columns for task fields.

View Source
var (
	// DefaultCreatedAt holds the default value on creation for the "created_at" field.
	DefaultCreatedAt func() time.Time
)

Functions

func AgentID

func AgentID(v uint32) predicate.Task

AgentID applies equality check predicate on the "agent_id" field. It's identical to AgentIDEQ.

func AgentIDEQ

func AgentIDEQ(v uint32) predicate.Task

AgentIDEQ applies the EQ predicate on the "agent_id" field.

func AgentIDIn

func AgentIDIn(vs ...uint32) predicate.Task

AgentIDIn applies the In predicate on the "agent_id" field.

func AgentIDNEQ

func AgentIDNEQ(v uint32) predicate.Task

AgentIDNEQ applies the NEQ predicate on the "agent_id" field.

func AgentIDNotIn

func AgentIDNotIn(vs ...uint32) predicate.Task

AgentIDNotIn applies the NotIn predicate on the "agent_id" field.

func And

func And(predicates ...predicate.Task) predicate.Task

And groups predicates with the AND operator between them.

func ArgsID

func ArgsID(v int) predicate.Task

ArgsID applies equality check predicate on the "args_id" field. It's identical to ArgsIDEQ.

func ArgsIDEQ

func ArgsIDEQ(v int) predicate.Task

ArgsIDEQ applies the EQ predicate on the "args_id" field.

func ArgsIDIn

func ArgsIDIn(vs ...int) predicate.Task

ArgsIDIn applies the In predicate on the "args_id" field.

func ArgsIDNEQ

func ArgsIDNEQ(v int) predicate.Task

ArgsIDNEQ applies the NEQ predicate on the "args_id" field.

func ArgsIDNotIn

func ArgsIDNotIn(vs ...int) predicate.Task

ArgsIDNotIn applies the NotIn predicate on the "args_id" field.

func CapEQ

CapEQ applies the EQ predicate on the "cap" field.

func CapIn

func CapIn(vs ...shared.Capability) predicate.Task

CapIn applies the In predicate on the "cap" field.

func CapNEQ

func CapNEQ(v shared.Capability) predicate.Task

CapNEQ applies the NEQ predicate on the "cap" field.

func CapNotIn

func CapNotIn(vs ...shared.Capability) predicate.Task

CapNotIn applies the NotIn predicate on the "cap" field.

func CapValidator

func CapValidator(c shared.Capability) error

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

func CommandID

func CommandID(v int64) predicate.Task

CommandID applies equality check predicate on the "command_id" field. It's identical to CommandIDEQ.

func CommandIDEQ

func CommandIDEQ(v int64) predicate.Task

CommandIDEQ applies the EQ predicate on the "command_id" field.

func CommandIDIn

func CommandIDIn(vs ...int64) predicate.Task

CommandIDIn applies the In predicate on the "command_id" field.

func CommandIDNEQ

func CommandIDNEQ(v int64) predicate.Task

CommandIDNEQ applies the NEQ predicate on the "command_id" field.

func CommandIDNotIn

func CommandIDNotIn(vs ...int64) predicate.Task

CommandIDNotIn applies the NotIn predicate on the "command_id" field.

func CreatedAt

func CreatedAt(v time.Time) predicate.Task

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

func CreatedAtEQ

func CreatedAtEQ(v time.Time) predicate.Task

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

func CreatedAtGT

func CreatedAtGT(v time.Time) predicate.Task

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

func CreatedAtGTE

func CreatedAtGTE(v time.Time) predicate.Task

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

func CreatedAtIn

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

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

func CreatedAtLT

func CreatedAtLT(v time.Time) predicate.Task

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

func CreatedAtLTE

func CreatedAtLTE(v time.Time) predicate.Task

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

func CreatedAtNEQ

func CreatedAtNEQ(v time.Time) predicate.Task

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

func CreatedAtNotIn

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

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

func DoneAt

func DoneAt(v time.Time) predicate.Task

DoneAt applies equality check predicate on the "done_at" field. It's identical to DoneAtEQ.

func DoneAtEQ

func DoneAtEQ(v time.Time) predicate.Task

DoneAtEQ applies the EQ predicate on the "done_at" field.

func DoneAtGT

func DoneAtGT(v time.Time) predicate.Task

DoneAtGT applies the GT predicate on the "done_at" field.

func DoneAtGTE

func DoneAtGTE(v time.Time) predicate.Task

DoneAtGTE applies the GTE predicate on the "done_at" field.

func DoneAtIn

func DoneAtIn(vs ...time.Time) predicate.Task

DoneAtIn applies the In predicate on the "done_at" field.

func DoneAtIsNil

func DoneAtIsNil() predicate.Task

DoneAtIsNil applies the IsNil predicate on the "done_at" field.

func DoneAtLT

func DoneAtLT(v time.Time) predicate.Task

DoneAtLT applies the LT predicate on the "done_at" field.

func DoneAtLTE

func DoneAtLTE(v time.Time) predicate.Task

DoneAtLTE applies the LTE predicate on the "done_at" field.

func DoneAtNEQ

func DoneAtNEQ(v time.Time) predicate.Task

DoneAtNEQ applies the NEQ predicate on the "done_at" field.

func DoneAtNotIn

func DoneAtNotIn(vs ...time.Time) predicate.Task

DoneAtNotIn applies the NotIn predicate on the "done_at" field.

func DoneAtNotNil

func DoneAtNotNil() predicate.Task

DoneAtNotNil applies the NotNil predicate on the "done_at" field.

func HasAgent

func HasAgent() predicate.Task

HasAgent applies the HasEdge predicate on the "agent" edge.

func HasAgentWith

func HasAgentWith(preds ...predicate.Agent) predicate.Task

HasAgentWith applies the HasEdge predicate on the "agent" edge with a given conditions (other predicates).

func HasBlobberArgs

func HasBlobberArgs() predicate.Task

HasBlobberArgs applies the HasEdge predicate on the "blobber_args" edge.

func HasBlobberArgsWith

func HasBlobberArgsWith(preds ...predicate.Blobber) predicate.Task

HasBlobberArgsWith applies the HasEdge predicate on the "blobber_args" edge with a given conditions (other predicates).

func HasBlobberOutput

func HasBlobberOutput() predicate.Task

HasBlobberOutput applies the HasEdge predicate on the "blobber_output" edge.

func HasBlobberOutputWith

func HasBlobberOutputWith(preds ...predicate.Blobber) predicate.Task

HasBlobberOutputWith applies the HasEdge predicate on the "blobber_output" edge with a given conditions (other predicates).

func HasCommand

func HasCommand() predicate.Task

HasCommand applies the HasEdge predicate on the "command" edge.

func HasCommandWith

func HasCommandWith(preds ...predicate.Command) predicate.Task

HasCommandWith applies the HasEdge predicate on the "command" edge with a given conditions (other predicates).

func ID

func ID(id int64) predicate.Task

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id int64) predicate.Task

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id int64) predicate.Task

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id int64) predicate.Task

IDGTE applies the GTE predicate on the ID field.

func IDIn

func IDIn(ids ...int64) predicate.Task

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id int64) predicate.Task

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id int64) predicate.Task

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id int64) predicate.Task

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

func IDNotIn(ids ...int64) predicate.Task

IDNotIn applies the NotIn predicate on the ID field.

func Not

Not applies the not operator on the given predicate.

func Or

func Or(predicates ...predicate.Task) predicate.Task

Or groups predicates with the OR operator between them.

func OutputBig

func OutputBig(v bool) predicate.Task

OutputBig applies equality check predicate on the "output_big" field. It's identical to OutputBigEQ.

func OutputBigEQ

func OutputBigEQ(v bool) predicate.Task

OutputBigEQ applies the EQ predicate on the "output_big" field.

func OutputBigIsNil

func OutputBigIsNil() predicate.Task

OutputBigIsNil applies the IsNil predicate on the "output_big" field.

func OutputBigNEQ

func OutputBigNEQ(v bool) predicate.Task

OutputBigNEQ applies the NEQ predicate on the "output_big" field.

func OutputBigNotNil

func OutputBigNotNil() predicate.Task

OutputBigNotNil applies the NotNil predicate on the "output_big" field.

func OutputID

func OutputID(v int) predicate.Task

OutputID applies equality check predicate on the "output_id" field. It's identical to OutputIDEQ.

func OutputIDEQ

func OutputIDEQ(v int) predicate.Task

OutputIDEQ applies the EQ predicate on the "output_id" field.

func OutputIDIn

func OutputIDIn(vs ...int) predicate.Task

OutputIDIn applies the In predicate on the "output_id" field.

func OutputIDIsNil

func OutputIDIsNil() predicate.Task

OutputIDIsNil applies the IsNil predicate on the "output_id" field.

func OutputIDNEQ

func OutputIDNEQ(v int) predicate.Task

OutputIDNEQ applies the NEQ predicate on the "output_id" field.

func OutputIDNotIn

func OutputIDNotIn(vs ...int) predicate.Task

OutputIDNotIn applies the NotIn predicate on the "output_id" field.

func OutputIDNotNil

func OutputIDNotNil() predicate.Task

OutputIDNotNil applies the NotNil predicate on the "output_id" field.

func PushedAt

func PushedAt(v time.Time) predicate.Task

PushedAt applies equality check predicate on the "pushed_at" field. It's identical to PushedAtEQ.

func PushedAtEQ

func PushedAtEQ(v time.Time) predicate.Task

PushedAtEQ applies the EQ predicate on the "pushed_at" field.

func PushedAtGT

func PushedAtGT(v time.Time) predicate.Task

PushedAtGT applies the GT predicate on the "pushed_at" field.

func PushedAtGTE

func PushedAtGTE(v time.Time) predicate.Task

PushedAtGTE applies the GTE predicate on the "pushed_at" field.

func PushedAtIn

func PushedAtIn(vs ...time.Time) predicate.Task

PushedAtIn applies the In predicate on the "pushed_at" field.

func PushedAtIsNil

func PushedAtIsNil() predicate.Task

PushedAtIsNil applies the IsNil predicate on the "pushed_at" field.

func PushedAtLT

func PushedAtLT(v time.Time) predicate.Task

PushedAtLT applies the LT predicate on the "pushed_at" field.

func PushedAtLTE

func PushedAtLTE(v time.Time) predicate.Task

PushedAtLTE applies the LTE predicate on the "pushed_at" field.

func PushedAtNEQ

func PushedAtNEQ(v time.Time) predicate.Task

PushedAtNEQ applies the NEQ predicate on the "pushed_at" field.

func PushedAtNotIn

func PushedAtNotIn(vs ...time.Time) predicate.Task

PushedAtNotIn applies the NotIn predicate on the "pushed_at" field.

func PushedAtNotNil

func PushedAtNotNil() predicate.Task

PushedAtNotNil applies the NotNil predicate on the "pushed_at" field.

func StatusEQ

func StatusEQ(v shared.TaskStatus) predicate.Task

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

func StatusIn

func StatusIn(vs ...shared.TaskStatus) predicate.Task

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

func StatusNEQ

func StatusNEQ(v shared.TaskStatus) predicate.Task

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

func StatusNotIn

func StatusNotIn(vs ...shared.TaskStatus) predicate.Task

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

func StatusValidator

func StatusValidator(s shared.TaskStatus) error

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

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 Task queries.

func ByAgentField

func ByAgentField(field string, opts ...sql.OrderTermOption) OrderOption

ByAgentField orders the results by agent field.

func ByAgentID

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

ByAgentID orders the results by the agent_id field.

func ByArgsID

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

ByArgsID orders the results by the args_id field.

func ByBlobberArgsField

func ByBlobberArgsField(field string, opts ...sql.OrderTermOption) OrderOption

ByBlobberArgsField orders the results by blobber_args field.

func ByBlobberOutputField

func ByBlobberOutputField(field string, opts ...sql.OrderTermOption) OrderOption

ByBlobberOutputField orders the results by blobber_output field.

func ByCap

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

ByCap orders the results by the cap field.

func ByCommandField

func ByCommandField(field string, opts ...sql.OrderTermOption) OrderOption

ByCommandField orders the results by command field.

func ByCommandID

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

ByCommandID orders the results by the command_id field.

func ByCreatedAt

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

ByCreatedAt orders the results by the created_at field.

func ByDoneAt

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

ByDoneAt orders the results by the done_at field.

func ByID

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

ByID orders the results by the id field.

func ByOutputBig

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

ByOutputBig orders the results by the output_big field.

func ByOutputID

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

ByOutputID orders the results by the output_id field.

func ByPushedAt

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

ByPushedAt orders the results by the pushed_at field.

func ByStatus

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

ByStatus orders the results by the status field.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳