Documentation ¶
Index ¶
- Constants
- Variables
- func And(predicates ...predicate.Admin) predicate.Admin
- func CreatedAt(v time.Time) predicate.Admin
- func CreatedAtEQ(v time.Time) predicate.Admin
- func CreatedAtGT(v time.Time) predicate.Admin
- func CreatedAtGTE(v time.Time) predicate.Admin
- func CreatedAtIn(vs ...time.Time) predicate.Admin
- func CreatedAtLT(v time.Time) predicate.Admin
- func CreatedAtLTE(v time.Time) predicate.Admin
- func CreatedAtNEQ(v time.Time) predicate.Admin
- func CreatedAtNotIn(vs ...time.Time) predicate.Admin
- func DeletedAt(v int) predicate.Admin
- func DeletedAtEQ(v int) predicate.Admin
- func DeletedAtGT(v int) predicate.Admin
- func DeletedAtGTE(v int) predicate.Admin
- func DeletedAtIn(vs ...int) predicate.Admin
- func DeletedAtLT(v int) predicate.Admin
- func DeletedAtLTE(v int) predicate.Admin
- func DeletedAtNEQ(v int) predicate.Admin
- func DeletedAtNotIn(vs ...int) predicate.Admin
- func DisplayName(v string) predicate.Admin
- func DisplayNameContains(v string) predicate.Admin
- func DisplayNameContainsFold(v string) predicate.Admin
- func DisplayNameEQ(v string) predicate.Admin
- func DisplayNameEqualFold(v string) predicate.Admin
- func DisplayNameGT(v string) predicate.Admin
- func DisplayNameGTE(v string) predicate.Admin
- func DisplayNameHasPrefix(v string) predicate.Admin
- func DisplayNameHasSuffix(v string) predicate.Admin
- func DisplayNameIn(vs ...string) predicate.Admin
- func DisplayNameIsNil() predicate.Admin
- func DisplayNameLT(v string) predicate.Admin
- func DisplayNameLTE(v string) predicate.Admin
- func DisplayNameNEQ(v string) predicate.Admin
- func DisplayNameNotIn(vs ...string) predicate.Admin
- func DisplayNameNotNil() predicate.Admin
- func HasRoles() predicate.Admin
- func HasRolesWith(preds ...predicate.Role) predicate.Admin
- func ID(id int) predicate.Admin
- func IDEQ(id int) predicate.Admin
- func IDGT(id int) predicate.Admin
- func IDGTE(id int) predicate.Admin
- func IDIn(ids ...int) predicate.Admin
- func IDLT(id int) predicate.Admin
- func IDLTE(id int) predicate.Admin
- func IDNEQ(id int) predicate.Admin
- func IDNotIn(ids ...int) predicate.Admin
- func IsEnable(v bool) predicate.Admin
- func IsEnableEQ(v bool) predicate.Admin
- func IsEnableNEQ(v bool) predicate.Admin
- func Not(p predicate.Admin) predicate.Admin
- func Or(predicates ...predicate.Admin) predicate.Admin
- func Password(v string) predicate.Admin
- func PasswordContains(v string) predicate.Admin
- func PasswordContainsFold(v string) predicate.Admin
- func PasswordEQ(v string) predicate.Admin
- func PasswordEqualFold(v string) predicate.Admin
- func PasswordGT(v string) predicate.Admin
- func PasswordGTE(v string) predicate.Admin
- func PasswordHasPrefix(v string) predicate.Admin
- func PasswordHasSuffix(v string) predicate.Admin
- func PasswordIn(vs ...string) predicate.Admin
- func PasswordLT(v string) predicate.Admin
- func PasswordLTE(v string) predicate.Admin
- func PasswordNEQ(v string) predicate.Admin
- func PasswordNotIn(vs ...string) predicate.Admin
- func UpdatedAt(v time.Time) predicate.Admin
- func UpdatedAtEQ(v time.Time) predicate.Admin
- func UpdatedAtGT(v time.Time) predicate.Admin
- func UpdatedAtGTE(v time.Time) predicate.Admin
- func UpdatedAtIn(vs ...time.Time) predicate.Admin
- func UpdatedAtLT(v time.Time) predicate.Admin
- func UpdatedAtLTE(v time.Time) predicate.Admin
- func UpdatedAtNEQ(v time.Time) predicate.Admin
- func UpdatedAtNotIn(vs ...time.Time) predicate.Admin
- func Username(v string) predicate.Admin
- func UsernameContains(v string) predicate.Admin
- func UsernameContainsFold(v string) predicate.Admin
- func UsernameEQ(v string) predicate.Admin
- func UsernameEqualFold(v string) predicate.Admin
- func UsernameGT(v string) predicate.Admin
- func UsernameGTE(v string) predicate.Admin
- func UsernameHasPrefix(v string) predicate.Admin
- func UsernameHasSuffix(v string) predicate.Admin
- func UsernameIn(vs ...string) predicate.Admin
- func UsernameLT(v string) predicate.Admin
- func UsernameLTE(v string) predicate.Admin
- func UsernameNEQ(v string) predicate.Admin
- func UsernameNotIn(vs ...string) predicate.Admin
- func ValidColumn(column string) bool
- type OrderOption
- func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption
- func ByDeletedAt(opts ...sql.OrderTermOption) OrderOption
- func ByDisplayName(opts ...sql.OrderTermOption) OrderOption
- func ByID(opts ...sql.OrderTermOption) OrderOption
- func ByIsEnable(opts ...sql.OrderTermOption) OrderOption
- func ByPassword(opts ...sql.OrderTermOption) OrderOption
- func ByRoles(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func ByRolesCount(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 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 ¶
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"
var Columns = []string{ FieldID, FieldCreatedAt, FieldUpdatedAt, FieldIsEnable, FieldDeletedAt, FieldUsername, FieldPassword, FieldWhitelistIps, FieldDisplayName, }
Columns holds all SQL columns for admin fields.
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 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 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 DisplayName ¶
DisplayName applies equality check predicate on the "display_name" field. It's identical to DisplayNameEQ.
func DisplayNameContains ¶
DisplayNameContains applies the Contains predicate on the "display_name" field.
func DisplayNameContainsFold ¶
DisplayNameContainsFold applies the ContainsFold predicate on the "display_name" field.
func DisplayNameEQ ¶
DisplayNameEQ applies the EQ predicate on the "display_name" field.
func DisplayNameEqualFold ¶
DisplayNameEqualFold applies the EqualFold predicate on the "display_name" field.
func DisplayNameGT ¶
DisplayNameGT applies the GT predicate on the "display_name" field.
func DisplayNameGTE ¶
DisplayNameGTE applies the GTE predicate on the "display_name" field.
func DisplayNameHasPrefix ¶
DisplayNameHasPrefix applies the HasPrefix predicate on the "display_name" field.
func DisplayNameHasSuffix ¶
DisplayNameHasSuffix applies the HasSuffix predicate on the "display_name" field.
func DisplayNameIn ¶
DisplayNameIn applies the In predicate on the "display_name" field.
func DisplayNameIsNil ¶
DisplayNameIsNil applies the IsNil predicate on the "display_name" field.
func DisplayNameLT ¶
DisplayNameLT applies the LT predicate on the "display_name" field.
func DisplayNameLTE ¶
DisplayNameLTE applies the LTE predicate on the "display_name" field.
func DisplayNameNEQ ¶
DisplayNameNEQ applies the NEQ predicate on the "display_name" field.
func DisplayNameNotIn ¶
DisplayNameNotIn applies the NotIn predicate on the "display_name" field.
func DisplayNameNotNil ¶
DisplayNameNotNil applies the NotNil predicate on the "display_name" field.
func HasRolesWith ¶
HasRolesWith applies the HasEdge predicate on the "roles" edge with a given conditions (other predicates).
func IsEnable ¶
IsEnable applies equality check predicate on the "is_enable" field. It's identical to IsEnableEQ.
func IsEnableEQ ¶
IsEnableEQ applies the EQ predicate on the "is_enable" field.
func IsEnableNEQ ¶
IsEnableNEQ applies the NEQ predicate on the "is_enable" field.
func Password ¶
Password applies equality check predicate on the "password" field. It's identical to PasswordEQ.
func PasswordContains ¶
PasswordContains applies the Contains predicate on the "password" field.
func PasswordContainsFold ¶
PasswordContainsFold applies the ContainsFold predicate on the "password" field.
func PasswordEQ ¶
PasswordEQ applies the EQ predicate on the "password" field.
func PasswordEqualFold ¶
PasswordEqualFold applies the EqualFold predicate on the "password" field.
func PasswordGT ¶
PasswordGT applies the GT predicate on the "password" field.
func PasswordGTE ¶
PasswordGTE applies the GTE predicate on the "password" field.
func PasswordHasPrefix ¶
PasswordHasPrefix applies the HasPrefix predicate on the "password" field.
func PasswordHasSuffix ¶
PasswordHasSuffix applies the HasSuffix predicate on the "password" field.
func PasswordIn ¶
PasswordIn applies the In predicate on the "password" field.
func PasswordLT ¶
PasswordLT applies the LT predicate on the "password" field.
func PasswordLTE ¶
PasswordLTE applies the LTE predicate on the "password" field.
func PasswordNEQ ¶
PasswordNEQ applies the NEQ predicate on the "password" field.
func PasswordNotIn ¶
PasswordNotIn applies the NotIn predicate on the "password" 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 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.