admin

package
v0.0.0-...-857c71f Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the admin type in the database.
	Label = "admin"
	// 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"
	// FieldIsEnable holds the string denoting the is_enable field in the database.
	FieldIsEnable = "is_enable"
	// FieldDeletedAt holds the string denoting the deleted_at field in the database.
	FieldDeletedAt = "deleted_at"
	// FieldUsername holds the string denoting the username field in the database.
	FieldUsername = "username"
	// FieldPassword holds the string denoting the password field in the database.
	FieldPassword = "password"
	// FieldWhitelistIps holds the string denoting the whitelist_ips field in the database.
	FieldWhitelistIps = "whitelist_ips"
	// FieldDisplayName holds the string denoting the display_name field in the database.
	FieldDisplayName = "display_name"
	// EdgeRoles holds the string denoting the roles edge name in mutations.
	EdgeRoles = "roles"
	// Table holds the table name of the admin in the database.
	Table = "admins"
	// RolesTable is the table that holds the roles relation/edge. The primary key declared below.
	RolesTable = "admin_roles"
	// RolesInverseTable is the table name for the Role entity.
	// It exists in this package in order to avoid circular dependency with the "role" package.
	RolesInverseTable = "roles"
)

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
	// DefaultIsEnable holds the default value on creation for the "is_enable" field.
	DefaultIsEnable bool
	// DefaultDeletedAt holds the default value on creation for the "deleted_at" field.
	DefaultDeletedAt int
)

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/kimchhung/gva/extra/internal/ent/runtime"

Columns holds all SQL columns for admin fields.

View Source
var (
	// RolesPrimaryKey and RolesColumn2 are the table columns denoting the
	// primary key for the roles relation (M2M).
	RolesPrimaryKey = []string{"admin_id", "role_id"}
)

Functions

func And

func And(predicates ...predicate.Admin) predicate.Admin

And groups predicates with the AND operator between them.

func CreatedAt

func CreatedAt(v time.Time) predicate.Admin

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

func CreatedAtEQ

func CreatedAtEQ(v time.Time) predicate.Admin

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

func CreatedAtGT

func CreatedAtGT(v time.Time) predicate.Admin

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

func CreatedAtGTE

func CreatedAtGTE(v time.Time) predicate.Admin

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

func CreatedAtIn

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

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

func CreatedAtLT

func CreatedAtLT(v time.Time) predicate.Admin

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

func CreatedAtLTE

func CreatedAtLTE(v time.Time) predicate.Admin

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

func CreatedAtNEQ

func CreatedAtNEQ(v time.Time) predicate.Admin

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

func CreatedAtNotIn

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

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

func DeletedAt

func DeletedAt(v int) predicate.Admin

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

func DeletedAtEQ

func DeletedAtEQ(v int) predicate.Admin

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

func DeletedAtGT

func DeletedAtGT(v int) predicate.Admin

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

func DeletedAtGTE

func DeletedAtGTE(v int) predicate.Admin

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

func DeletedAtIn

func DeletedAtIn(vs ...int) predicate.Admin

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

func DeletedAtLT

func DeletedAtLT(v int) predicate.Admin

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

func DeletedAtLTE

func DeletedAtLTE(v int) predicate.Admin

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

func DeletedAtNEQ

func DeletedAtNEQ(v int) predicate.Admin

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

func DeletedAtNotIn

func DeletedAtNotIn(vs ...int) predicate.Admin

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

func DisplayName

func DisplayName(v string) predicate.Admin

DisplayName applies equality check predicate on the "display_name" field. It's identical to DisplayNameEQ.

func DisplayNameContains

func DisplayNameContains(v string) predicate.Admin

DisplayNameContains applies the Contains predicate on the "display_name" field.

func DisplayNameContainsFold

func DisplayNameContainsFold(v string) predicate.Admin

DisplayNameContainsFold applies the ContainsFold predicate on the "display_name" field.

func DisplayNameEQ

func DisplayNameEQ(v string) predicate.Admin

DisplayNameEQ applies the EQ predicate on the "display_name" field.

func DisplayNameEqualFold

func DisplayNameEqualFold(v string) predicate.Admin

DisplayNameEqualFold applies the EqualFold predicate on the "display_name" field.

func DisplayNameGT

func DisplayNameGT(v string) predicate.Admin

DisplayNameGT applies the GT predicate on the "display_name" field.

func DisplayNameGTE

func DisplayNameGTE(v string) predicate.Admin

DisplayNameGTE applies the GTE predicate on the "display_name" field.

func DisplayNameHasPrefix

func DisplayNameHasPrefix(v string) predicate.Admin

DisplayNameHasPrefix applies the HasPrefix predicate on the "display_name" field.

func DisplayNameHasSuffix

func DisplayNameHasSuffix(v string) predicate.Admin

DisplayNameHasSuffix applies the HasSuffix predicate on the "display_name" field.

func DisplayNameIn

func DisplayNameIn(vs ...string) predicate.Admin

DisplayNameIn applies the In predicate on the "display_name" field.

func DisplayNameIsNil

func DisplayNameIsNil() predicate.Admin

DisplayNameIsNil applies the IsNil predicate on the "display_name" field.

func DisplayNameLT

func DisplayNameLT(v string) predicate.Admin

DisplayNameLT applies the LT predicate on the "display_name" field.

func DisplayNameLTE

func DisplayNameLTE(v string) predicate.Admin

DisplayNameLTE applies the LTE predicate on the "display_name" field.

func DisplayNameNEQ

func DisplayNameNEQ(v string) predicate.Admin

DisplayNameNEQ applies the NEQ predicate on the "display_name" field.

func DisplayNameNotIn

func DisplayNameNotIn(vs ...string) predicate.Admin

DisplayNameNotIn applies the NotIn predicate on the "display_name" field.

func DisplayNameNotNil

func DisplayNameNotNil() predicate.Admin

DisplayNameNotNil applies the NotNil predicate on the "display_name" field.

func HasRoles

func HasRoles() predicate.Admin

HasRoles applies the HasEdge predicate on the "roles" edge.

func HasRolesWith

func HasRolesWith(preds ...predicate.Role) predicate.Admin

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

func ID

func ID(id int) predicate.Admin

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id int) predicate.Admin

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id int) predicate.Admin

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id int) predicate.Admin

IDGTE applies the GTE predicate on the ID field.

func IDIn

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

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id int) predicate.Admin

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id int) predicate.Admin

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id int) predicate.Admin

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

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

IDNotIn applies the NotIn predicate on the ID field.

func IsEnable

func IsEnable(v bool) predicate.Admin

IsEnable applies equality check predicate on the "is_enable" field. It's identical to IsEnableEQ.

func IsEnableEQ

func IsEnableEQ(v bool) predicate.Admin

IsEnableEQ applies the EQ predicate on the "is_enable" field.

func IsEnableNEQ

func IsEnableNEQ(v bool) predicate.Admin

IsEnableNEQ applies the NEQ predicate on the "is_enable" field.

func Not

Not applies the not operator on the given predicate.

func Or

func Or(predicates ...predicate.Admin) predicate.Admin

Or groups predicates with the OR operator between them.

func Password

func Password(v string) predicate.Admin

Password applies equality check predicate on the "password" field. It's identical to PasswordEQ.

func PasswordContains

func PasswordContains(v string) predicate.Admin

PasswordContains applies the Contains predicate on the "password" field.

func PasswordContainsFold

func PasswordContainsFold(v string) predicate.Admin

PasswordContainsFold applies the ContainsFold predicate on the "password" field.

func PasswordEQ

func PasswordEQ(v string) predicate.Admin

PasswordEQ applies the EQ predicate on the "password" field.

func PasswordEqualFold

func PasswordEqualFold(v string) predicate.Admin

PasswordEqualFold applies the EqualFold predicate on the "password" field.

func PasswordGT

func PasswordGT(v string) predicate.Admin

PasswordGT applies the GT predicate on the "password" field.

func PasswordGTE

func PasswordGTE(v string) predicate.Admin

PasswordGTE applies the GTE predicate on the "password" field.

func PasswordHasPrefix

func PasswordHasPrefix(v string) predicate.Admin

PasswordHasPrefix applies the HasPrefix predicate on the "password" field.

func PasswordHasSuffix

func PasswordHasSuffix(v string) predicate.Admin

PasswordHasSuffix applies the HasSuffix predicate on the "password" field.

func PasswordIn

func PasswordIn(vs ...string) predicate.Admin

PasswordIn applies the In predicate on the "password" field.

func PasswordLT

func PasswordLT(v string) predicate.Admin

PasswordLT applies the LT predicate on the "password" field.

func PasswordLTE

func PasswordLTE(v string) predicate.Admin

PasswordLTE applies the LTE predicate on the "password" field.

func PasswordNEQ

func PasswordNEQ(v string) predicate.Admin

PasswordNEQ applies the NEQ predicate on the "password" field.

func PasswordNotIn

func PasswordNotIn(vs ...string) predicate.Admin

PasswordNotIn applies the NotIn predicate on the "password" field.

func UpdatedAt

func UpdatedAt(v time.Time) predicate.Admin

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

func UpdatedAtEQ

func UpdatedAtEQ(v time.Time) predicate.Admin

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

func UpdatedAtGT

func UpdatedAtGT(v time.Time) predicate.Admin

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

func UpdatedAtGTE

func UpdatedAtGTE(v time.Time) predicate.Admin

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

func UpdatedAtIn

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

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

func UpdatedAtLT

func UpdatedAtLT(v time.Time) predicate.Admin

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

func UpdatedAtLTE

func UpdatedAtLTE(v time.Time) predicate.Admin

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

func UpdatedAtNEQ

func UpdatedAtNEQ(v time.Time) predicate.Admin

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

func UpdatedAtNotIn

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

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

func Username

func Username(v string) predicate.Admin

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

func UsernameContains

func UsernameContains(v string) predicate.Admin

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

func UsernameContainsFold

func UsernameContainsFold(v string) predicate.Admin

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

func UsernameEQ

func UsernameEQ(v string) predicate.Admin

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

func UsernameEqualFold

func UsernameEqualFold(v string) predicate.Admin

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

func UsernameGT

func UsernameGT(v string) predicate.Admin

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

func UsernameGTE

func UsernameGTE(v string) predicate.Admin

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

func UsernameHasPrefix

func UsernameHasPrefix(v string) predicate.Admin

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

func UsernameHasSuffix

func UsernameHasSuffix(v string) predicate.Admin

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

func UsernameIn

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

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

func UsernameLT

func UsernameLT(v string) predicate.Admin

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

func UsernameLTE

func UsernameLTE(v string) predicate.Admin

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

func UsernameNEQ

func UsernameNEQ(v string) predicate.Admin

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

func UsernameNotIn

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

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

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 ByDisplayName

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

ByDisplayName orders the results by the display_name field.

func ByID

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

ByID orders the results by the id field.

func ByIsEnable

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

ByIsEnable orders the results by the is_enable field.

func ByPassword

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

ByPassword orders the results by the password field.

func ByRoles

func ByRoles(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption

ByRoles orders the results by roles terms.

func ByRolesCount

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

ByRolesCount orders the results by roles count.

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