event

package
v0.4.4 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2022 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the event type in the database.
	Label = "event"
	// FieldID holds the string denoting the id field in the database.
	FieldID = "id"
	// FieldCreationTime holds the string denoting the creationtime field in the database.
	FieldCreationTime = "creation_time"
	// FieldKind holds the string denoting the kind field in the database.
	FieldKind = "kind"
	// EdgeJob holds the string denoting the job edge name in mutations.
	EdgeJob = "job"
	// EdgeFile holds the string denoting the file edge name in mutations.
	EdgeFile = "file"
	// EdgeCredential holds the string denoting the credential edge name in mutations.
	EdgeCredential = "credential"
	// EdgeLink holds the string denoting the link edge name in mutations.
	EdgeLink = "link"
	// EdgeTag holds the string denoting the tag edge name in mutations.
	EdgeTag = "tag"
	// EdgeTarget holds the string denoting the target edge name in mutations.
	EdgeTarget = "target"
	// EdgeTask holds the string denoting the task edge name in mutations.
	EdgeTask = "task"
	// EdgeUser holds the string denoting the user edge name in mutations.
	EdgeUser = "user"
	// EdgeEvent holds the string denoting the event edge name in mutations.
	EdgeEvent = "event"
	// EdgeService holds the string denoting the service edge name in mutations.
	EdgeService = "service"
	// EdgeLikers holds the string denoting the likers edge name in mutations.
	EdgeLikers = "likers"
	// EdgeOwner holds the string denoting the owner edge name in mutations.
	EdgeOwner = "owner"
	// EdgeSvcOwner holds the string denoting the svcowner edge name in mutations.
	EdgeSvcOwner = "svcOwner"
	// Table holds the table name of the event in the database.
	Table = "events"
	// JobTable is the table that holds the job relation/edge.
	JobTable = "events"
	// JobInverseTable is the table name for the Job entity.
	// It exists in this package in order to avoid circular dependency with the "job" package.
	JobInverseTable = "jobs"
	// JobColumn is the table column denoting the job relation/edge.
	JobColumn = "event_job"
	// FileTable is the table that holds the file relation/edge.
	FileTable = "events"
	// FileInverseTable is the table name for the File entity.
	// It exists in this package in order to avoid circular dependency with the "file" package.
	FileInverseTable = "files"
	// FileColumn is the table column denoting the file relation/edge.
	FileColumn = "event_file"
	// CredentialTable is the table that holds the credential relation/edge.
	CredentialTable = "events"
	// CredentialInverseTable is the table name for the Credential entity.
	// It exists in this package in order to avoid circular dependency with the "credential" package.
	CredentialInverseTable = "credentials"
	// CredentialColumn is the table column denoting the credential relation/edge.
	CredentialColumn = "event_credential"
	// LinkTable is the table that holds the link relation/edge.
	LinkTable = "events"
	// LinkInverseTable is the table name for the Link entity.
	// It exists in this package in order to avoid circular dependency with the "link" package.
	LinkInverseTable = "links"
	// LinkColumn is the table column denoting the link relation/edge.
	LinkColumn = "event_link"
	// TagTable is the table that holds the tag relation/edge.
	TagTable = "events"
	// TagInverseTable is the table name for the Tag entity.
	// It exists in this package in order to avoid circular dependency with the "tag" package.
	TagInverseTable = "tags"
	// TagColumn is the table column denoting the tag relation/edge.
	TagColumn = "event_tag"
	// TargetTable is the table that holds the target relation/edge.
	TargetTable = "events"
	// TargetInverseTable is the table name for the Target entity.
	// It exists in this package in order to avoid circular dependency with the "target" package.
	TargetInverseTable = "targets"
	// TargetColumn is the table column denoting the target relation/edge.
	TargetColumn = "event_target"
	// TaskTable is the table that holds the task relation/edge.
	TaskTable = "events"
	// TaskInverseTable is the table name for the Task entity.
	// It exists in this package in order to avoid circular dependency with the "task" package.
	TaskInverseTable = "tasks"
	// TaskColumn is the table column denoting the task relation/edge.
	TaskColumn = "event_task"
	// UserTable is the table that holds the user relation/edge.
	UserTable = "events"
	// UserInverseTable is the table name for the User entity.
	// It exists in this package in order to avoid circular dependency with the "user" package.
	UserInverseTable = "users"
	// UserColumn is the table column denoting the user relation/edge.
	UserColumn = "event_user"
	// EventTable is the table that holds the event relation/edge.
	EventTable = "events"
	// EventColumn is the table column denoting the event relation/edge.
	EventColumn = "event_event"
	// ServiceTable is the table that holds the service relation/edge.
	ServiceTable = "events"
	// ServiceInverseTable is the table name for the Service entity.
	// It exists in this package in order to avoid circular dependency with the "service" package.
	ServiceInverseTable = "services"
	// ServiceColumn is the table column denoting the service relation/edge.
	ServiceColumn = "event_service"
	// LikersTable is the table that holds the likers relation/edge.
	LikersTable = "users"
	// LikersInverseTable is the table name for the User entity.
	// It exists in this package in order to avoid circular dependency with the "user" package.
	LikersInverseTable = "users"
	// LikersColumn is the table column denoting the likers relation/edge.
	LikersColumn = "event_likers"
	// OwnerTable is the table that holds the owner relation/edge.
	OwnerTable = "events"
	// OwnerInverseTable is the table name for the User entity.
	// It exists in this package in order to avoid circular dependency with the "user" package.
	OwnerInverseTable = "users"
	// OwnerColumn is the table column denoting the owner relation/edge.
	OwnerColumn = "user_events"
	// SvcOwnerTable is the table that holds the svcOwner relation/edge.
	SvcOwnerTable = "events"
	// SvcOwnerInverseTable is the table name for the Service entity.
	// It exists in this package in order to avoid circular dependency with the "service" package.
	SvcOwnerInverseTable = "services"
	// SvcOwnerColumn is the table column denoting the svcOwner relation/edge.
	SvcOwnerColumn = "service_events"
)

Variables

Columns holds all SQL columns for event fields.

View Source
var (
	// DefaultCreationTime holds the default value on creation for the "CreationTime" field.
	DefaultCreationTime func() time.Time
)
View Source
var ForeignKeys = []string{
	"event_job",
	"event_file",
	"event_credential",
	"event_link",
	"event_tag",
	"event_target",
	"event_task",
	"event_user",
	"event_event",
	"event_service",
	"service_events",
	"user_events",
}

ForeignKeys holds the SQL foreign-keys that are owned by the "events" table and are not defined as standalone fields in the schema.

Functions

func And

func And(predicates ...predicate.Event) predicate.Event

And groups predicates with the AND operator between them.

func CreationTime

func CreationTime(v time.Time) predicate.Event

CreationTime applies equality check predicate on the "CreationTime" field. It's identical to CreationTimeEQ.

func CreationTimeEQ

func CreationTimeEQ(v time.Time) predicate.Event

CreationTimeEQ applies the EQ predicate on the "CreationTime" field.

func CreationTimeGT

func CreationTimeGT(v time.Time) predicate.Event

CreationTimeGT applies the GT predicate on the "CreationTime" field.

func CreationTimeGTE

func CreationTimeGTE(v time.Time) predicate.Event

CreationTimeGTE applies the GTE predicate on the "CreationTime" field.

func CreationTimeIn

func CreationTimeIn(vs ...time.Time) predicate.Event

CreationTimeIn applies the In predicate on the "CreationTime" field.

func CreationTimeLT

func CreationTimeLT(v time.Time) predicate.Event

CreationTimeLT applies the LT predicate on the "CreationTime" field.

func CreationTimeLTE

func CreationTimeLTE(v time.Time) predicate.Event

CreationTimeLTE applies the LTE predicate on the "CreationTime" field.

func CreationTimeNEQ

func CreationTimeNEQ(v time.Time) predicate.Event

CreationTimeNEQ applies the NEQ predicate on the "CreationTime" field.

func CreationTimeNotIn

func CreationTimeNotIn(vs ...time.Time) predicate.Event

CreationTimeNotIn applies the NotIn predicate on the "CreationTime" field.

func HasCredential

func HasCredential() predicate.Event

HasCredential applies the HasEdge predicate on the "credential" edge.

func HasCredentialWith

func HasCredentialWith(preds ...predicate.Credential) predicate.Event

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

func HasEvent

func HasEvent() predicate.Event

HasEvent applies the HasEdge predicate on the "event" edge.

func HasEventWith

func HasEventWith(preds ...predicate.Event) predicate.Event

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

func HasFile

func HasFile() predicate.Event

HasFile applies the HasEdge predicate on the "file" edge.

func HasFileWith

func HasFileWith(preds ...predicate.File) predicate.Event

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

func HasJob

func HasJob() predicate.Event

HasJob applies the HasEdge predicate on the "job" edge.

func HasJobWith

func HasJobWith(preds ...predicate.Job) predicate.Event

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

func HasLikers

func HasLikers() predicate.Event

HasLikers applies the HasEdge predicate on the "likers" edge.

func HasLikersWith

func HasLikersWith(preds ...predicate.User) predicate.Event

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

func HasLink() predicate.Event

HasLink applies the HasEdge predicate on the "link" edge.

func HasLinkWith

func HasLinkWith(preds ...predicate.Link) predicate.Event

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

func HasOwner

func HasOwner() predicate.Event

HasOwner applies the HasEdge predicate on the "owner" edge.

func HasOwnerWith

func HasOwnerWith(preds ...predicate.User) predicate.Event

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

func HasService

func HasService() predicate.Event

HasService applies the HasEdge predicate on the "service" edge.

func HasServiceWith

func HasServiceWith(preds ...predicate.Service) predicate.Event

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

func HasSvcOwner

func HasSvcOwner() predicate.Event

HasSvcOwner applies the HasEdge predicate on the "svcOwner" edge.

func HasSvcOwnerWith

func HasSvcOwnerWith(preds ...predicate.Service) predicate.Event

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

func HasTag

func HasTag() predicate.Event

HasTag applies the HasEdge predicate on the "tag" edge.

func HasTagWith

func HasTagWith(preds ...predicate.Tag) predicate.Event

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

func HasTarget

func HasTarget() predicate.Event

HasTarget applies the HasEdge predicate on the "target" edge.

func HasTargetWith

func HasTargetWith(preds ...predicate.Target) predicate.Event

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

func HasTask

func HasTask() predicate.Event

HasTask applies the HasEdge predicate on the "task" edge.

func HasTaskWith

func HasTaskWith(preds ...predicate.Task) predicate.Event

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

func HasUser

func HasUser() predicate.Event

HasUser applies the HasEdge predicate on the "user" edge.

func HasUserWith

func HasUserWith(preds ...predicate.User) predicate.Event

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

func ID

func ID(id int) predicate.Event

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id int) predicate.Event

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id int) predicate.Event

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id int) predicate.Event

IDGTE applies the GTE predicate on the ID field.

func IDIn

func IDIn(ids ...int) predicate.Event

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id int) predicate.Event

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id int) predicate.Event

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id int) predicate.Event

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

func IDNotIn(ids ...int) predicate.Event

IDNotIn applies the NotIn predicate on the ID field.

func KindEQ

func KindEQ(v Kind) predicate.Event

KindEQ applies the EQ predicate on the "Kind" field.

func KindIn

func KindIn(vs ...Kind) predicate.Event

KindIn applies the In predicate on the "Kind" field.

func KindNEQ

func KindNEQ(v Kind) predicate.Event

KindNEQ applies the NEQ predicate on the "Kind" field.

func KindNotIn

func KindNotIn(vs ...Kind) predicate.Event

KindNotIn applies the NotIn predicate on the "Kind" field.

func KindValidator

func KindValidator(_kind Kind) error

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

func Not

Not applies the not operator on the given predicate.

func Or

func Or(predicates ...predicate.Event) predicate.Event

Or groups predicates with the OR operator between them.

func ValidColumn added in v0.4.3

func ValidColumn(column string) bool

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

Types

type Kind

type Kind string

Kind defines the type for the "Kind" enum field.

const (
	KindCREATE_JOB                Kind = "CREATE_JOB"
	KindCREATE_TAG                Kind = "CREATE_TAG"
	KindAPPLY_TAG_TO_TASK         Kind = "APPLY_TAG_TO_TASK"
	KindAPPLY_TAG_TO_TARGET       Kind = "APPLY_TAG_TO_TARGET"
	KindAPPLY_TAG_TO_JOB          Kind = "APPLY_TAG_TO_JOB"
	KindREMOVE_TAG_FROM_TASK      Kind = "REMOVE_TAG_FROM_TASK"
	KindREMOVE_TAG_FROM_TARGET    Kind = "REMOVE_TAG_FROM_TARGET"
	KindREMOVE_TAG_FROM_JOB       Kind = "REMOVE_TAG_FROM_JOB"
	KindCREATE_TARGET             Kind = "CREATE_TARGET"
	KindSET_TARGET_FIELDS         Kind = "SET_TARGET_FIELDS"
	KindDELETE_TARGET             Kind = "DELETE_TARGET"
	KindADD_CREDENTIAL_FOR_TARGET Kind = "ADD_CREDENTIAL_FOR_TARGET"
	KindUPLOAD_FILE               Kind = "UPLOAD_FILE"
	KindCREATE_LINK               Kind = "CREATE_LINK"
	KindSET_LINK_FIELDS           Kind = "SET_LINK_FIELDS"
	KindACTIVATE_USER             Kind = "ACTIVATE_USER"
	KindCREATE_USER               Kind = "CREATE_USER"
	KindMAKE_ADMIN                Kind = "MAKE_ADMIN"
	KindREMOVE_ADMIN              Kind = "REMOVE_ADMIN"
	KindCHANGE_NAME               Kind = "CHANGE_NAME"
	KindACTIVATE_SERVICE          Kind = "ACTIVATE_SERVICE"
	KindCREATE_SERVICE            Kind = "CREATE_SERVICE"
	KindLIKE_EVENT                Kind = "LIKE_EVENT"
	KindOTHER                     Kind = "OTHER"
)

Kind values.

func (Kind) String

func (_kind Kind) String() string

Jump to

Keyboard shortcuts

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