Documentation ¶
Index ¶
- Constants
- Variables
- func Action(v types.EventActionType) predicate.Event
- func ActionEQ(v types.EventActionType) predicate.Event
- func ActionGT(v types.EventActionType) predicate.Event
- func ActionGTE(v types.EventActionType) predicate.Event
- func ActionIn(vs ...types.EventActionType) predicate.Event
- func ActionLT(v types.EventActionType) predicate.Event
- func ActionLTE(v types.EventActionType) predicate.Event
- func ActionNEQ(v types.EventActionType) predicate.Event
- func ActionNotIn(vs ...types.EventActionType) predicate.Event
- func And(predicates ...predicate.Event) predicate.Event
- func CreatedAt(v time.Time) predicate.Event
- func CreatedAtEQ(v time.Time) predicate.Event
- func CreatedAtGT(v time.Time) predicate.Event
- func CreatedAtGTE(v time.Time) predicate.Event
- func CreatedAtIn(vs ...time.Time) predicate.Event
- func CreatedAtLT(v time.Time) predicate.Event
- func CreatedAtLTE(v time.Time) predicate.Event
- func CreatedAtNEQ(v time.Time) predicate.Event
- func CreatedAtNotIn(vs ...time.Time) predicate.Event
- func DeletedAt(v time.Time) predicate.Event
- func DeletedAtEQ(v time.Time) predicate.Event
- func DeletedAtGT(v time.Time) predicate.Event
- func DeletedAtGTE(v time.Time) predicate.Event
- func DeletedAtIn(vs ...time.Time) predicate.Event
- func DeletedAtIsNil() predicate.Event
- func DeletedAtLT(v time.Time) predicate.Event
- func DeletedAtLTE(v time.Time) predicate.Event
- func DeletedAtNEQ(v time.Time) predicate.Event
- func DeletedAtNotIn(vs ...time.Time) predicate.Event
- func DeletedAtNotNil() predicate.Event
- func Duration(v string) predicate.Event
- func DurationContains(v string) predicate.Event
- func DurationContainsFold(v string) predicate.Event
- func DurationEQ(v string) predicate.Event
- func DurationEqualFold(v string) predicate.Event
- func DurationGT(v string) predicate.Event
- func DurationGTE(v string) predicate.Event
- func DurationHasPrefix(v string) predicate.Event
- func DurationHasSuffix(v string) predicate.Event
- func DurationIn(vs ...string) predicate.Event
- func DurationLT(v string) predicate.Event
- func DurationLTE(v string) predicate.Event
- func DurationNEQ(v string) predicate.Event
- func DurationNotIn(vs ...string) predicate.Event
- func FileID(v int) predicate.Event
- func FileIDEQ(v int) predicate.Event
- func FileIDIn(vs ...int) predicate.Event
- func FileIDIsNil() predicate.Event
- func FileIDNEQ(v int) predicate.Event
- func FileIDNotIn(vs ...int) predicate.Event
- func FileIDNotNil() predicate.Event
- func HasDiff(v bool) predicate.Event
- func HasDiffEQ(v bool) predicate.Event
- func HasDiffNEQ(v bool) predicate.Event
- func HasFile() predicate.Event
- func HasFileWith(preds ...predicate.File) predicate.Event
- func ID(id int) predicate.Event
- func IDEQ(id int) predicate.Event
- func IDGT(id int) predicate.Event
- func IDGTE(id int) predicate.Event
- func IDIn(ids ...int) predicate.Event
- func IDLT(id int) predicate.Event
- func IDLTE(id int) predicate.Event
- func IDNEQ(id int) predicate.Event
- func IDNotIn(ids ...int) predicate.Event
- func Message(v string) predicate.Event
- func MessageContains(v string) predicate.Event
- func MessageContainsFold(v string) predicate.Event
- func MessageEQ(v string) predicate.Event
- func MessageEqualFold(v string) predicate.Event
- func MessageGT(v string) predicate.Event
- func MessageGTE(v string) predicate.Event
- func MessageHasPrefix(v string) predicate.Event
- func MessageHasSuffix(v string) predicate.Event
- func MessageIn(vs ...string) predicate.Event
- func MessageLT(v string) predicate.Event
- func MessageLTE(v string) predicate.Event
- func MessageNEQ(v string) predicate.Event
- func MessageNotIn(vs ...string) predicate.Event
- func New(v string) predicate.Event
- func NewContains(v string) predicate.Event
- func NewContainsFold(v string) predicate.Event
- func NewEQ(v string) predicate.Event
- func NewEqualFold(v string) predicate.Event
- func NewGT(v string) predicate.Event
- func NewGTE(v string) predicate.Event
- func NewHasPrefix(v string) predicate.Event
- func NewHasSuffix(v string) predicate.Event
- func NewIn(vs ...string) predicate.Event
- func NewIsNil() predicate.Event
- func NewLT(v string) predicate.Event
- func NewLTE(v string) predicate.Event
- func NewNEQ(v string) predicate.Event
- func NewNotIn(vs ...string) predicate.Event
- func NewNotNil() predicate.Event
- func Not(p predicate.Event) predicate.Event
- func Old(v string) predicate.Event
- func OldContains(v string) predicate.Event
- func OldContainsFold(v string) predicate.Event
- func OldEQ(v string) predicate.Event
- func OldEqualFold(v string) predicate.Event
- func OldGT(v string) predicate.Event
- func OldGTE(v string) predicate.Event
- func OldHasPrefix(v string) predicate.Event
- func OldHasSuffix(v string) predicate.Event
- func OldIn(vs ...string) predicate.Event
- func OldIsNil() predicate.Event
- func OldLT(v string) predicate.Event
- func OldLTE(v string) predicate.Event
- func OldNEQ(v string) predicate.Event
- func OldNotIn(vs ...string) predicate.Event
- func OldNotNil() predicate.Event
- func Or(predicates ...predicate.Event) predicate.Event
- func UpdatedAt(v time.Time) predicate.Event
- func UpdatedAtEQ(v time.Time) predicate.Event
- func UpdatedAtGT(v time.Time) predicate.Event
- func UpdatedAtGTE(v time.Time) predicate.Event
- func UpdatedAtIn(vs ...time.Time) predicate.Event
- func UpdatedAtLT(v time.Time) predicate.Event
- func UpdatedAtLTE(v time.Time) predicate.Event
- func UpdatedAtNEQ(v time.Time) predicate.Event
- func UpdatedAtNotIn(vs ...time.Time) predicate.Event
- func Username(v string) predicate.Event
- func UsernameContains(v string) predicate.Event
- func UsernameContainsFold(v string) predicate.Event
- func UsernameEQ(v string) predicate.Event
- func UsernameEqualFold(v string) predicate.Event
- func UsernameGT(v string) predicate.Event
- func UsernameGTE(v string) predicate.Event
- func UsernameHasPrefix(v string) predicate.Event
- func UsernameHasSuffix(v string) predicate.Event
- func UsernameIn(vs ...string) predicate.Event
- func UsernameLT(v string) predicate.Event
- func UsernameLTE(v string) predicate.Event
- func UsernameNEQ(v string) predicate.Event
- func UsernameNotIn(vs ...string) predicate.Event
- func ValidColumn(column string) bool
- type OrderOption
- func ByAction(opts ...sql.OrderTermOption) OrderOption
- func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption
- func ByDeletedAt(opts ...sql.OrderTermOption) OrderOption
- func ByDuration(opts ...sql.OrderTermOption) OrderOption
- func ByFileField(field string, opts ...sql.OrderTermOption) OrderOption
- func ByFileID(opts ...sql.OrderTermOption) OrderOption
- func ByHasDiff(opts ...sql.OrderTermOption) OrderOption
- func ByID(opts ...sql.OrderTermOption) OrderOption
- func ByMessage(opts ...sql.OrderTermOption) OrderOption
- func ByNew(opts ...sql.OrderTermOption) OrderOption
- func ByOld(opts ...sql.OrderTermOption) OrderOption
- func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption
- func ByUsername(opts ...sql.OrderTermOption) OrderOption
Constants ¶
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 ¶
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"
var Columns = []string{ FieldID, FieldCreatedAt, FieldUpdatedAt, FieldDeletedAt, FieldAction, FieldUsername, FieldMessage, FieldOld, FieldNew, FieldHasDiff, FieldDuration, FieldFileID, }
Columns holds all SQL columns for event fields.
Functions ¶
func Action ¶
func Action(v types.EventActionType) predicate.Event
Action applies equality check predicate on the "action" field. It's identical to ActionEQ.
func ActionEQ ¶
func ActionEQ(v types.EventActionType) predicate.Event
ActionEQ applies the EQ predicate on the "action" field.
func ActionGT ¶
func ActionGT(v types.EventActionType) predicate.Event
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 ¶
func ActionLT(v types.EventActionType) predicate.Event
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 CreatedAt ¶
CreatedAt applies equality check predicate on the "created_at" field. It's identical to CreatedAtEQ.
func CreatedAtEQ ¶
CreatedAtEQ applies the EQ predicate on the "created_at" field.
func CreatedAtGT ¶
CreatedAtGT applies the GT predicate on the "created_at" field.
func CreatedAtGTE ¶
CreatedAtGTE applies the GTE predicate on the "created_at" field.
func CreatedAtIn ¶
CreatedAtIn applies the In predicate on the "created_at" field.
func CreatedAtLT ¶
CreatedAtLT applies the LT predicate on the "created_at" field.
func CreatedAtLTE ¶
CreatedAtLTE applies the LTE predicate on the "created_at" field.
func CreatedAtNEQ ¶
CreatedAtNEQ applies the NEQ predicate on the "created_at" field.
func CreatedAtNotIn ¶
CreatedAtNotIn applies the NotIn predicate on the "created_at" field.
func DeletedAt ¶
DeletedAt applies equality check predicate on the "deleted_at" field. It's identical to DeletedAtEQ.
func DeletedAtEQ ¶
DeletedAtEQ applies the EQ predicate on the "deleted_at" field.
func DeletedAtGT ¶
DeletedAtGT applies the GT predicate on the "deleted_at" field.
func DeletedAtGTE ¶
DeletedAtGTE applies the GTE predicate on the "deleted_at" field.
func DeletedAtIn ¶
DeletedAtIn applies the In predicate on the "deleted_at" field.
func DeletedAtIsNil ¶
DeletedAtIsNil applies the IsNil predicate on the "deleted_at" field.
func DeletedAtLT ¶
DeletedAtLT applies the LT predicate on the "deleted_at" field.
func DeletedAtLTE ¶
DeletedAtLTE applies the LTE predicate on the "deleted_at" field.
func DeletedAtNEQ ¶
DeletedAtNEQ applies the NEQ predicate on the "deleted_at" field.
func DeletedAtNotIn ¶
DeletedAtNotIn applies the NotIn predicate on the "deleted_at" field.
func DeletedAtNotNil ¶
DeletedAtNotNil applies the NotNil predicate on the "deleted_at" field.
func Duration ¶
Duration applies equality check predicate on the "duration" field. It's identical to DurationEQ.
func DurationContains ¶
DurationContains applies the Contains predicate on the "duration" field.
func DurationContainsFold ¶
DurationContainsFold applies the ContainsFold predicate on the "duration" field.
func DurationEQ ¶
DurationEQ applies the EQ predicate on the "duration" field.
func DurationEqualFold ¶
DurationEqualFold applies the EqualFold predicate on the "duration" field.
func DurationGT ¶
DurationGT applies the GT predicate on the "duration" field.
func DurationGTE ¶
DurationGTE applies the GTE predicate on the "duration" field.
func DurationHasPrefix ¶
DurationHasPrefix applies the HasPrefix predicate on the "duration" field.
func DurationHasSuffix ¶
DurationHasSuffix applies the HasSuffix predicate on the "duration" field.
func DurationIn ¶
DurationIn applies the In predicate on the "duration" field.
func DurationLT ¶
DurationLT applies the LT predicate on the "duration" field.
func DurationLTE ¶
DurationLTE applies the LTE predicate on the "duration" field.
func DurationNEQ ¶
DurationNEQ applies the NEQ predicate on the "duration" field.
func DurationNotIn ¶
DurationNotIn applies the NotIn predicate on the "duration" field.
func FileID ¶
FileID applies equality check predicate on the "file_id" field. It's identical to FileIDEQ.
func FileIDIsNil ¶
FileIDIsNil applies the IsNil predicate on the "file_id" field.
func FileIDNotIn ¶
FileIDNotIn applies the NotIn predicate on the "file_id" field.
func FileIDNotNil ¶
FileIDNotNil applies the NotNil predicate on the "file_id" field.
func HasDiff ¶
HasDiff applies equality check predicate on the "has_diff" field. It's identical to HasDiffEQ.
func HasDiffNEQ ¶
HasDiffNEQ applies the NEQ predicate on the "has_diff" field.
func HasFileWith ¶
HasFileWith applies the HasEdge predicate on the "file" edge with a given conditions (other predicates).
func Message ¶
Message applies equality check predicate on the "message" field. It's identical to MessageEQ.
func MessageContains ¶
MessageContains applies the Contains predicate on the "message" field.
func MessageContainsFold ¶
MessageContainsFold applies the ContainsFold predicate on the "message" field.
func MessageEqualFold ¶
MessageEqualFold applies the EqualFold predicate on the "message" field.
func MessageGTE ¶
MessageGTE applies the GTE predicate on the "message" field.
func MessageHasPrefix ¶
MessageHasPrefix applies the HasPrefix predicate on the "message" field.
func MessageHasSuffix ¶
MessageHasSuffix applies the HasSuffix predicate on the "message" field.
func MessageLTE ¶
MessageLTE applies the LTE predicate on the "message" field.
func MessageNEQ ¶
MessageNEQ applies the NEQ predicate on the "message" field.
func MessageNotIn ¶
MessageNotIn applies the NotIn predicate on the "message" field.
func NewContains ¶
NewContains applies the Contains predicate on the "new" field.
func NewContainsFold ¶
NewContainsFold applies the ContainsFold predicate on the "new" field.
func NewEqualFold ¶
NewEqualFold applies the EqualFold predicate on the "new" field.
func NewHasPrefix ¶
NewHasPrefix applies the HasPrefix predicate on the "new" field.
func NewHasSuffix ¶
NewHasSuffix applies the HasSuffix predicate on the "new" field.
func OldContains ¶
OldContains applies the Contains predicate on the "old" field.
func OldContainsFold ¶
OldContainsFold applies the ContainsFold predicate on the "old" field.
func OldEqualFold ¶
OldEqualFold applies the EqualFold predicate on the "old" field.
func OldHasPrefix ¶
OldHasPrefix applies the HasPrefix predicate on the "old" field.
func OldHasSuffix ¶
OldHasSuffix applies the HasSuffix predicate on the "old" field.
func UpdatedAt ¶
UpdatedAt applies equality check predicate on the "updated_at" field. It's identical to UpdatedAtEQ.
func UpdatedAtEQ ¶
UpdatedAtEQ applies the EQ predicate on the "updated_at" field.
func UpdatedAtGT ¶
UpdatedAtGT applies the GT predicate on the "updated_at" field.
func UpdatedAtGTE ¶
UpdatedAtGTE applies the GTE predicate on the "updated_at" field.
func UpdatedAtIn ¶
UpdatedAtIn applies the In predicate on the "updated_at" field.
func UpdatedAtLT ¶
UpdatedAtLT applies the LT predicate on the "updated_at" field.
func UpdatedAtLTE ¶
UpdatedAtLTE applies the LTE predicate on the "updated_at" field.
func UpdatedAtNEQ ¶
UpdatedAtNEQ applies the NEQ predicate on the "updated_at" field.
func UpdatedAtNotIn ¶
UpdatedAtNotIn applies the NotIn predicate on the "updated_at" field.
func Username ¶
Username applies equality check predicate on the "username" field. It's identical to UsernameEQ.
func UsernameContains ¶
UsernameContains applies the Contains predicate on the "username" field.
func UsernameContainsFold ¶
UsernameContainsFold applies the ContainsFold predicate on the "username" field.
func UsernameEQ ¶
UsernameEQ applies the EQ predicate on the "username" field.
func UsernameEqualFold ¶
UsernameEqualFold applies the EqualFold predicate on the "username" field.
func UsernameGT ¶
UsernameGT applies the GT predicate on the "username" field.
func UsernameGTE ¶
UsernameGTE applies the GTE predicate on the "username" field.
func UsernameHasPrefix ¶
UsernameHasPrefix applies the HasPrefix predicate on the "username" field.
func UsernameHasSuffix ¶
UsernameHasSuffix applies the HasSuffix predicate on the "username" field.
func UsernameIn ¶
UsernameIn applies the In predicate on the "username" field.
func UsernameLT ¶
UsernameLT applies the LT predicate on the "username" field.
func UsernameLTE ¶
UsernameLTE applies the LTE predicate on the "username" field.
func UsernameNEQ ¶
UsernameNEQ applies the NEQ predicate on the "username" field.
func UsernameNotIn ¶
UsernameNotIn applies the NotIn predicate on the "username" field.
func ValidColumn ¶
ValidColumn reports if the column name is valid (part of the table columns).
Types ¶
type OrderOption ¶
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.