event

package
v5.0.7 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2024 License: AGPL-3.0 Imports: 6 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"
	// 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"
	// FieldDeletedAt holds the string denoting the deleted_at field in the database.
	FieldDeletedAt = "deleted_at"
	// FieldAction holds the string denoting the action field in the database.
	FieldAction = "action"
	// FieldUsername holds the string denoting the username field in the database.
	FieldUsername = "username"
	// FieldMessage holds the string denoting the message field in the database.
	FieldMessage = "message"
	// FieldOld holds the string denoting the old field in the database.
	FieldOld = "old"
	// FieldNew holds the string denoting the new field in the database.
	FieldNew = "new"
	// FieldHasDiff holds the string denoting the has_diff field in the database.
	FieldHasDiff = "has_diff"
	// FieldDuration holds the string denoting the duration field in the database.
	FieldDuration = "duration"
	// FieldFileID holds the string denoting the file_id field in the database.
	FieldFileID = "file_id"
	// EdgeFile holds the string denoting the file edge name in mutations.
	EdgeFile = "file"
	// Table holds the table name of the event in the database.
	Table = "events"
	// 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 = "file_id"
)

Variables

View Source
var (
	Hooks        [1]ent.Hook
	Interceptors [1]ent.Interceptor
	// 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
	// DefaultAction holds the default value on creation for the "action" field.
	DefaultAction types.EventActionType
	// DefaultUsername holds the default value on creation for the "username" field.
	DefaultUsername string
	// UsernameValidator is a validator for the "username" field. It is called by the builders before save.
	UsernameValidator func(string) error
	// DefaultMessage holds the default value on creation for the "message" field.
	DefaultMessage string
	// MessageValidator is a validator for the "message" field. It is called by the builders before save.
	MessageValidator func(string) error
	// DefaultHasDiff holds the default value on creation for the "has_diff" field.
	DefaultHasDiff bool
	// DefaultDuration holds the default value on creation for the "duration" field.
	DefaultDuration string
)

Note that the variables below are initialized by the runtime package on the initialization of the application. Therefore, it should be imported in the main as follows:

import _ "github.com/duc-cnzj/mars/v5/internal/ent/runtime"

Columns holds all SQL columns for event fields.

Functions

func Action

Action applies equality check predicate on the "action" field. It's identical to ActionEQ.

func ActionEQ

ActionEQ applies the EQ predicate on the "action" field.

func ActionGT

ActionGT applies the GT predicate on the "action" field.

func ActionGTE

func ActionGTE(v types.EventActionType) predicate.Event

ActionGTE applies the GTE predicate on the "action" field.

func ActionIn

func ActionIn(vs ...types.EventActionType) predicate.Event

ActionIn applies the In predicate on the "action" field.

func ActionLT

ActionLT applies the LT predicate on the "action" field.

func ActionLTE

func ActionLTE(v types.EventActionType) predicate.Event

ActionLTE applies the LTE predicate on the "action" field.

func ActionNEQ

func ActionNEQ(v types.EventActionType) predicate.Event

ActionNEQ applies the NEQ predicate on the "action" field.

func ActionNotIn

func ActionNotIn(vs ...types.EventActionType) predicate.Event

ActionNotIn applies the NotIn predicate on the "action" field.

func And

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

And groups predicates with the AND operator between them.

func CreatedAt

func CreatedAt(v time.Time) predicate.Event

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

func CreatedAtEQ

func CreatedAtEQ(v time.Time) predicate.Event

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

func CreatedAtGT

func CreatedAtGT(v time.Time) predicate.Event

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

func CreatedAtGTE

func CreatedAtGTE(v time.Time) predicate.Event

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

func CreatedAtIn

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

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

func CreatedAtLT

func CreatedAtLT(v time.Time) predicate.Event

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

func CreatedAtLTE

func CreatedAtLTE(v time.Time) predicate.Event

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

func CreatedAtNEQ

func CreatedAtNEQ(v time.Time) predicate.Event

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

func CreatedAtNotIn

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

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

func DeletedAt

func DeletedAt(v time.Time) predicate.Event

DeletedAt applies equality check predicate on the "deleted_at" field. It's identical to DeletedAtEQ.

func DeletedAtEQ

func DeletedAtEQ(v time.Time) predicate.Event

DeletedAtEQ applies the EQ predicate on the "deleted_at" field.

func DeletedAtGT

func DeletedAtGT(v time.Time) predicate.Event

DeletedAtGT applies the GT predicate on the "deleted_at" field.

func DeletedAtGTE

func DeletedAtGTE(v time.Time) predicate.Event

DeletedAtGTE applies the GTE predicate on the "deleted_at" field.

func DeletedAtIn

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

DeletedAtIn applies the In predicate on the "deleted_at" field.

func DeletedAtIsNil

func DeletedAtIsNil() predicate.Event

DeletedAtIsNil applies the IsNil predicate on the "deleted_at" field.

func DeletedAtLT

func DeletedAtLT(v time.Time) predicate.Event

DeletedAtLT applies the LT predicate on the "deleted_at" field.

func DeletedAtLTE

func DeletedAtLTE(v time.Time) predicate.Event

DeletedAtLTE applies the LTE predicate on the "deleted_at" field.

func DeletedAtNEQ

func DeletedAtNEQ(v time.Time) predicate.Event

DeletedAtNEQ applies the NEQ predicate on the "deleted_at" field.

func DeletedAtNotIn

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

DeletedAtNotIn applies the NotIn predicate on the "deleted_at" field.

func DeletedAtNotNil

func DeletedAtNotNil() predicate.Event

DeletedAtNotNil applies the NotNil predicate on the "deleted_at" field.

func Duration

func Duration(v string) predicate.Event

Duration applies equality check predicate on the "duration" field. It's identical to DurationEQ.

func DurationContains

func DurationContains(v string) predicate.Event

DurationContains applies the Contains predicate on the "duration" field.

func DurationContainsFold

func DurationContainsFold(v string) predicate.Event

DurationContainsFold applies the ContainsFold predicate on the "duration" field.

func DurationEQ

func DurationEQ(v string) predicate.Event

DurationEQ applies the EQ predicate on the "duration" field.

func DurationEqualFold

func DurationEqualFold(v string) predicate.Event

DurationEqualFold applies the EqualFold predicate on the "duration" field.

func DurationGT

func DurationGT(v string) predicate.Event

DurationGT applies the GT predicate on the "duration" field.

func DurationGTE

func DurationGTE(v string) predicate.Event

DurationGTE applies the GTE predicate on the "duration" field.

func DurationHasPrefix

func DurationHasPrefix(v string) predicate.Event

DurationHasPrefix applies the HasPrefix predicate on the "duration" field.

func DurationHasSuffix

func DurationHasSuffix(v string) predicate.Event

DurationHasSuffix applies the HasSuffix predicate on the "duration" field.

func DurationIn

func DurationIn(vs ...string) predicate.Event

DurationIn applies the In predicate on the "duration" field.

func DurationLT

func DurationLT(v string) predicate.Event

DurationLT applies the LT predicate on the "duration" field.

func DurationLTE

func DurationLTE(v string) predicate.Event

DurationLTE applies the LTE predicate on the "duration" field.

func DurationNEQ

func DurationNEQ(v string) predicate.Event

DurationNEQ applies the NEQ predicate on the "duration" field.

func DurationNotIn

func DurationNotIn(vs ...string) predicate.Event

DurationNotIn applies the NotIn predicate on the "duration" field.

func FileID

func FileID(v int) predicate.Event

FileID applies equality check predicate on the "file_id" field. It's identical to FileIDEQ.

func FileIDEQ

func FileIDEQ(v int) predicate.Event

FileIDEQ applies the EQ predicate on the "file_id" field.

func FileIDIn

func FileIDIn(vs ...int) predicate.Event

FileIDIn applies the In predicate on the "file_id" field.

func FileIDIsNil

func FileIDIsNil() predicate.Event

FileIDIsNil applies the IsNil predicate on the "file_id" field.

func FileIDNEQ

func FileIDNEQ(v int) predicate.Event

FileIDNEQ applies the NEQ predicate on the "file_id" field.

func FileIDNotIn

func FileIDNotIn(vs ...int) predicate.Event

FileIDNotIn applies the NotIn predicate on the "file_id" field.

func FileIDNotNil

func FileIDNotNil() predicate.Event

FileIDNotNil applies the NotNil predicate on the "file_id" field.

func HasDiff

func HasDiff(v bool) predicate.Event

HasDiff applies equality check predicate on the "has_diff" field. It's identical to HasDiffEQ.

func HasDiffEQ

func HasDiffEQ(v bool) predicate.Event

HasDiffEQ applies the EQ predicate on the "has_diff" field.

func HasDiffNEQ

func HasDiffNEQ(v bool) predicate.Event

HasDiffNEQ applies the NEQ predicate on the "has_diff" field.

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 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 Message

func Message(v string) predicate.Event

Message applies equality check predicate on the "message" field. It's identical to MessageEQ.

func MessageContains

func MessageContains(v string) predicate.Event

MessageContains applies the Contains predicate on the "message" field.

func MessageContainsFold

func MessageContainsFold(v string) predicate.Event

MessageContainsFold applies the ContainsFold predicate on the "message" field.

func MessageEQ

func MessageEQ(v string) predicate.Event

MessageEQ applies the EQ predicate on the "message" field.

func MessageEqualFold

func MessageEqualFold(v string) predicate.Event

MessageEqualFold applies the EqualFold predicate on the "message" field.

func MessageGT

func MessageGT(v string) predicate.Event

MessageGT applies the GT predicate on the "message" field.

func MessageGTE

func MessageGTE(v string) predicate.Event

MessageGTE applies the GTE predicate on the "message" field.

func MessageHasPrefix

func MessageHasPrefix(v string) predicate.Event

MessageHasPrefix applies the HasPrefix predicate on the "message" field.

func MessageHasSuffix

func MessageHasSuffix(v string) predicate.Event

MessageHasSuffix applies the HasSuffix predicate on the "message" field.

func MessageIn

func MessageIn(vs ...string) predicate.Event

MessageIn applies the In predicate on the "message" field.

func MessageLT

func MessageLT(v string) predicate.Event

MessageLT applies the LT predicate on the "message" field.

func MessageLTE

func MessageLTE(v string) predicate.Event

MessageLTE applies the LTE predicate on the "message" field.

func MessageNEQ

func MessageNEQ(v string) predicate.Event

MessageNEQ applies the NEQ predicate on the "message" field.

func MessageNotIn

func MessageNotIn(vs ...string) predicate.Event

MessageNotIn applies the NotIn predicate on the "message" field.

func New

func New(v string) predicate.Event

New applies equality check predicate on the "new" field. It's identical to NewEQ.

func NewContains

func NewContains(v string) predicate.Event

NewContains applies the Contains predicate on the "new" field.

func NewContainsFold

func NewContainsFold(v string) predicate.Event

NewContainsFold applies the ContainsFold predicate on the "new" field.

func NewEQ

func NewEQ(v string) predicate.Event

NewEQ applies the EQ predicate on the "new" field.

func NewEqualFold

func NewEqualFold(v string) predicate.Event

NewEqualFold applies the EqualFold predicate on the "new" field.

func NewGT

func NewGT(v string) predicate.Event

NewGT applies the GT predicate on the "new" field.

func NewGTE

func NewGTE(v string) predicate.Event

NewGTE applies the GTE predicate on the "new" field.

func NewHasPrefix

func NewHasPrefix(v string) predicate.Event

NewHasPrefix applies the HasPrefix predicate on the "new" field.

func NewHasSuffix

func NewHasSuffix(v string) predicate.Event

NewHasSuffix applies the HasSuffix predicate on the "new" field.

func NewIn

func NewIn(vs ...string) predicate.Event

NewIn applies the In predicate on the "new" field.

func NewIsNil

func NewIsNil() predicate.Event

NewIsNil applies the IsNil predicate on the "new" field.

func NewLT

func NewLT(v string) predicate.Event

NewLT applies the LT predicate on the "new" field.

func NewLTE

func NewLTE(v string) predicate.Event

NewLTE applies the LTE predicate on the "new" field.

func NewNEQ

func NewNEQ(v string) predicate.Event

NewNEQ applies the NEQ predicate on the "new" field.

func NewNotIn

func NewNotIn(vs ...string) predicate.Event

NewNotIn applies the NotIn predicate on the "new" field.

func NewNotNil

func NewNotNil() predicate.Event

NewNotNil applies the NotNil predicate on the "new" field.

func Not

Not applies the not operator on the given predicate.

func Old

func Old(v string) predicate.Event

Old applies equality check predicate on the "old" field. It's identical to OldEQ.

func OldContains

func OldContains(v string) predicate.Event

OldContains applies the Contains predicate on the "old" field.

func OldContainsFold

func OldContainsFold(v string) predicate.Event

OldContainsFold applies the ContainsFold predicate on the "old" field.

func OldEQ

func OldEQ(v string) predicate.Event

OldEQ applies the EQ predicate on the "old" field.

func OldEqualFold

func OldEqualFold(v string) predicate.Event

OldEqualFold applies the EqualFold predicate on the "old" field.

func OldGT

func OldGT(v string) predicate.Event

OldGT applies the GT predicate on the "old" field.

func OldGTE

func OldGTE(v string) predicate.Event

OldGTE applies the GTE predicate on the "old" field.

func OldHasPrefix

func OldHasPrefix(v string) predicate.Event

OldHasPrefix applies the HasPrefix predicate on the "old" field.

func OldHasSuffix

func OldHasSuffix(v string) predicate.Event

OldHasSuffix applies the HasSuffix predicate on the "old" field.

func OldIn

func OldIn(vs ...string) predicate.Event

OldIn applies the In predicate on the "old" field.

func OldIsNil

func OldIsNil() predicate.Event

OldIsNil applies the IsNil predicate on the "old" field.

func OldLT

func OldLT(v string) predicate.Event

OldLT applies the LT predicate on the "old" field.

func OldLTE

func OldLTE(v string) predicate.Event

OldLTE applies the LTE predicate on the "old" field.

func OldNEQ

func OldNEQ(v string) predicate.Event

OldNEQ applies the NEQ predicate on the "old" field.

func OldNotIn

func OldNotIn(vs ...string) predicate.Event

OldNotIn applies the NotIn predicate on the "old" field.

func OldNotNil

func OldNotNil() predicate.Event

OldNotNil applies the NotNil predicate on the "old" field.

func Or

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

Or groups predicates with the OR operator between them.

func UpdatedAt

func UpdatedAt(v time.Time) predicate.Event

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

func UpdatedAtEQ

func UpdatedAtEQ(v time.Time) predicate.Event

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

func UpdatedAtGT

func UpdatedAtGT(v time.Time) predicate.Event

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

func UpdatedAtGTE

func UpdatedAtGTE(v time.Time) predicate.Event

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

func UpdatedAtIn

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

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

func UpdatedAtLT

func UpdatedAtLT(v time.Time) predicate.Event

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

func UpdatedAtLTE

func UpdatedAtLTE(v time.Time) predicate.Event

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

func UpdatedAtNEQ

func UpdatedAtNEQ(v time.Time) predicate.Event

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

func UpdatedAtNotIn

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

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

func Username

func Username(v string) predicate.Event

Username applies equality check predicate on the "username" field. It's identical to UsernameEQ.

func UsernameContains

func UsernameContains(v string) predicate.Event

UsernameContains applies the Contains predicate on the "username" field.

func UsernameContainsFold

func UsernameContainsFold(v string) predicate.Event

UsernameContainsFold applies the ContainsFold predicate on the "username" field.

func UsernameEQ

func UsernameEQ(v string) predicate.Event

UsernameEQ applies the EQ predicate on the "username" field.

func UsernameEqualFold

func UsernameEqualFold(v string) predicate.Event

UsernameEqualFold applies the EqualFold predicate on the "username" field.

func UsernameGT

func UsernameGT(v string) predicate.Event

UsernameGT applies the GT predicate on the "username" field.

func UsernameGTE

func UsernameGTE(v string) predicate.Event

UsernameGTE applies the GTE predicate on the "username" field.

func UsernameHasPrefix

func UsernameHasPrefix(v string) predicate.Event

UsernameHasPrefix applies the HasPrefix predicate on the "username" field.

func UsernameHasSuffix

func UsernameHasSuffix(v string) predicate.Event

UsernameHasSuffix applies the HasSuffix predicate on the "username" field.

func UsernameIn

func UsernameIn(vs ...string) predicate.Event

UsernameIn applies the In predicate on the "username" field.

func UsernameLT

func UsernameLT(v string) predicate.Event

UsernameLT applies the LT predicate on the "username" field.

func UsernameLTE

func UsernameLTE(v string) predicate.Event

UsernameLTE applies the LTE predicate on the "username" field.

func UsernameNEQ

func UsernameNEQ(v string) predicate.Event

UsernameNEQ applies the NEQ predicate on the "username" field.

func UsernameNotIn

func UsernameNotIn(vs ...string) predicate.Event

UsernameNotIn applies the NotIn predicate on the "username" 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 Event queries.

func ByAction

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

ByAction orders the results by the action field.

func ByCreatedAt

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

ByCreatedAt orders the results by the created_at field.

func ByDeletedAt

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

ByDeletedAt orders the results by the deleted_at field.

func ByDuration

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

ByDuration orders the results by the duration field.

func ByFileField

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

ByFileField orders the results by file field.

func ByFileID

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

ByFileID orders the results by the file_id field.

func ByHasDiff

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

ByHasDiff orders the results by the has_diff field.

func ByID

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

ByID orders the results by the id field.

func ByMessage

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

ByMessage orders the results by the message field.

func ByNew

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

ByNew orders the results by the new field.

func ByOld

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

ByOld orders the results by the old field.

func ByUpdatedAt

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

ByUpdatedAt orders the results by the updated_at field.

func ByUsername

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

ByUsername orders the results by the username field.

Jump to

Keyboard shortcuts

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