user

package
v0.0.0-...-a7b145a Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2022 License: BSD-2-Clause Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the user type in the database.
	Label = "user"
	// FieldID holds the string denoting the id field in the database.
	FieldID = "id"
	// FieldUsername holds the string denoting the username field in the database.
	FieldUsername = "username"
	// FieldTenantName holds the string denoting the tenant_name field in the database.
	FieldTenantName = "tenant_name"
	// FieldPasswd holds the string denoting the passwd field in the database.
	FieldPasswd = "passwd"
	// FieldPhone holds the string denoting the phone field in the database.
	FieldPhone = "phone"
	// FieldEmail holds the string denoting the email field in the database.
	FieldEmail = "email"
	// FieldStatus holds the string denoting the status field in the database.
	FieldStatus = "status"
	// FieldCreateTime holds the string denoting the create_time field in the database.
	FieldCreateTime = "create_time"
	// FieldUpdateTime holds the string denoting the update_time field in the database.
	FieldUpdateTime = "update_time"
	// EdgePolicys holds the string denoting the policys edge name in mutations.
	EdgePolicys = "policys"
	// EdgeRoles holds the string denoting the roles edge name in mutations.
	EdgeRoles = "roles"
	// EdgeBelong holds the string denoting the belong edge name in mutations.
	EdgeBelong = "belong"
	// Table holds the table name of the user in the database.
	Table = "users"
	// PolicysTable is the table that holds the policys relation/edge.
	PolicysTable = "authz_policies"
	// PolicysInverseTable is the table name for the AuthzPolicy entity.
	// It exists in this package in order to avoid circular dependency with the "authzpolicy" package.
	PolicysInverseTable = "authz_policies"
	// PolicysColumn is the table column denoting the policys relation/edge.
	PolicysColumn = "user_policys"
	// RolesTable is the table that holds the roles relation/edge. The primary key declared below.
	RolesTable = "user_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"
	// BelongTable is the table that holds the belong relation/edge.
	BelongTable = "users"
	// BelongInverseTable is the table name for the Tenant entity.
	// It exists in this package in order to avoid circular dependency with the "tenant" package.
	BelongInverseTable = "tenants"
	// BelongColumn is the table column denoting the belong relation/edge.
	BelongColumn = "tenant_users"
)

Variables

View Source
var (
	// UsernameValidator is a validator for the "username" field. It is called by the builders before save.
	UsernameValidator func(string) error
	// PasswdValidator is a validator for the "passwd" field. It is called by the builders before save.
	PasswdValidator func(string) error
	// PhoneValidator is a validator for the "phone" field. It is called by the builders before save.
	PhoneValidator func(string) error
	// EmailValidator is a validator for the "email" field. It is called by the builders before save.
	EmailValidator func(string) error
	// StatusValidator is a validator for the "status" field. It is called by the builders before save.
	StatusValidator func(string) error
	// DefaultCreateTime holds the default value on creation for the "create_time" field.
	DefaultCreateTime func() time.Time
)

Columns holds all SQL columns for user fields.

View Source
var ForeignKeys = []string{
	"tenant_users",
}

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

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

Functions

func And

func And(predicates ...predicate.User) predicate.User

And groups predicates with the AND operator between them.

func CreateTime

func CreateTime(v time.Time) predicate.User

CreateTime applies equality check predicate on the "create_time" field. It's identical to CreateTimeEQ.

func CreateTimeEQ

func CreateTimeEQ(v time.Time) predicate.User

CreateTimeEQ applies the EQ predicate on the "create_time" field.

func CreateTimeGT

func CreateTimeGT(v time.Time) predicate.User

CreateTimeGT applies the GT predicate on the "create_time" field.

func CreateTimeGTE

func CreateTimeGTE(v time.Time) predicate.User

CreateTimeGTE applies the GTE predicate on the "create_time" field.

func CreateTimeIn

func CreateTimeIn(vs ...time.Time) predicate.User

CreateTimeIn applies the In predicate on the "create_time" field.

func CreateTimeLT

func CreateTimeLT(v time.Time) predicate.User

CreateTimeLT applies the LT predicate on the "create_time" field.

func CreateTimeLTE

func CreateTimeLTE(v time.Time) predicate.User

CreateTimeLTE applies the LTE predicate on the "create_time" field.

func CreateTimeNEQ

func CreateTimeNEQ(v time.Time) predicate.User

CreateTimeNEQ applies the NEQ predicate on the "create_time" field.

func CreateTimeNotIn

func CreateTimeNotIn(vs ...time.Time) predicate.User

CreateTimeNotIn applies the NotIn predicate on the "create_time" field.

func Email

func Email(v string) predicate.User

Email applies equality check predicate on the "email" field. It's identical to EmailEQ.

func EmailContains

func EmailContains(v string) predicate.User

EmailContains applies the Contains predicate on the "email" field.

func EmailContainsFold

func EmailContainsFold(v string) predicate.User

EmailContainsFold applies the ContainsFold predicate on the "email" field.

func EmailEQ

func EmailEQ(v string) predicate.User

EmailEQ applies the EQ predicate on the "email" field.

func EmailEqualFold

func EmailEqualFold(v string) predicate.User

EmailEqualFold applies the EqualFold predicate on the "email" field.

func EmailGT

func EmailGT(v string) predicate.User

EmailGT applies the GT predicate on the "email" field.

func EmailGTE

func EmailGTE(v string) predicate.User

EmailGTE applies the GTE predicate on the "email" field.

func EmailHasPrefix

func EmailHasPrefix(v string) predicate.User

EmailHasPrefix applies the HasPrefix predicate on the "email" field.

func EmailHasSuffix

func EmailHasSuffix(v string) predicate.User

EmailHasSuffix applies the HasSuffix predicate on the "email" field.

func EmailIn

func EmailIn(vs ...string) predicate.User

EmailIn applies the In predicate on the "email" field.

func EmailIsNil

func EmailIsNil() predicate.User

EmailIsNil applies the IsNil predicate on the "email" field.

func EmailLT

func EmailLT(v string) predicate.User

EmailLT applies the LT predicate on the "email" field.

func EmailLTE

func EmailLTE(v string) predicate.User

EmailLTE applies the LTE predicate on the "email" field.

func EmailNEQ

func EmailNEQ(v string) predicate.User

EmailNEQ applies the NEQ predicate on the "email" field.

func EmailNotIn

func EmailNotIn(vs ...string) predicate.User

EmailNotIn applies the NotIn predicate on the "email" field.

func EmailNotNil

func EmailNotNil() predicate.User

EmailNotNil applies the NotNil predicate on the "email" field.

func HasBelong

func HasBelong() predicate.User

HasBelong applies the HasEdge predicate on the "belong" edge.

func HasBelongWith

func HasBelongWith(preds ...predicate.Tenant) predicate.User

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

func HasPolicys

func HasPolicys() predicate.User

HasPolicys applies the HasEdge predicate on the "policys" edge.

func HasPolicysWith

func HasPolicysWith(preds ...predicate.AuthzPolicy) predicate.User

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

func HasRoles

func HasRoles() predicate.User

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

func HasRolesWith

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

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

func ID

func ID(id int) predicate.User

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id int) predicate.User

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id int) predicate.User

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id int) predicate.User

IDGTE applies the GTE predicate on the ID field.

func IDIn

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

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id int) predicate.User

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id int) predicate.User

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id int) predicate.User

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

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

IDNotIn applies the NotIn predicate on the ID field.

func Not

Not applies the not operator on the given predicate.

func Or

func Or(predicates ...predicate.User) predicate.User

Or groups predicates with the OR operator between them.

func Passwd

func Passwd(v string) predicate.User

Passwd applies equality check predicate on the "passwd" field. It's identical to PasswdEQ.

func PasswdContains

func PasswdContains(v string) predicate.User

PasswdContains applies the Contains predicate on the "passwd" field.

func PasswdContainsFold

func PasswdContainsFold(v string) predicate.User

PasswdContainsFold applies the ContainsFold predicate on the "passwd" field.

func PasswdEQ

func PasswdEQ(v string) predicate.User

PasswdEQ applies the EQ predicate on the "passwd" field.

func PasswdEqualFold

func PasswdEqualFold(v string) predicate.User

PasswdEqualFold applies the EqualFold predicate on the "passwd" field.

func PasswdGT

func PasswdGT(v string) predicate.User

PasswdGT applies the GT predicate on the "passwd" field.

func PasswdGTE

func PasswdGTE(v string) predicate.User

PasswdGTE applies the GTE predicate on the "passwd" field.

func PasswdHasPrefix

func PasswdHasPrefix(v string) predicate.User

PasswdHasPrefix applies the HasPrefix predicate on the "passwd" field.

func PasswdHasSuffix

func PasswdHasSuffix(v string) predicate.User

PasswdHasSuffix applies the HasSuffix predicate on the "passwd" field.

func PasswdIn

func PasswdIn(vs ...string) predicate.User

PasswdIn applies the In predicate on the "passwd" field.

func PasswdLT

func PasswdLT(v string) predicate.User

PasswdLT applies the LT predicate on the "passwd" field.

func PasswdLTE

func PasswdLTE(v string) predicate.User

PasswdLTE applies the LTE predicate on the "passwd" field.

func PasswdNEQ

func PasswdNEQ(v string) predicate.User

PasswdNEQ applies the NEQ predicate on the "passwd" field.

func PasswdNotIn

func PasswdNotIn(vs ...string) predicate.User

PasswdNotIn applies the NotIn predicate on the "passwd" field.

func Phone

func Phone(v string) predicate.User

Phone applies equality check predicate on the "phone" field. It's identical to PhoneEQ.

func PhoneContains

func PhoneContains(v string) predicate.User

PhoneContains applies the Contains predicate on the "phone" field.

func PhoneContainsFold

func PhoneContainsFold(v string) predicate.User

PhoneContainsFold applies the ContainsFold predicate on the "phone" field.

func PhoneEQ

func PhoneEQ(v string) predicate.User

PhoneEQ applies the EQ predicate on the "phone" field.

func PhoneEqualFold

func PhoneEqualFold(v string) predicate.User

PhoneEqualFold applies the EqualFold predicate on the "phone" field.

func PhoneGT

func PhoneGT(v string) predicate.User

PhoneGT applies the GT predicate on the "phone" field.

func PhoneGTE

func PhoneGTE(v string) predicate.User

PhoneGTE applies the GTE predicate on the "phone" field.

func PhoneHasPrefix

func PhoneHasPrefix(v string) predicate.User

PhoneHasPrefix applies the HasPrefix predicate on the "phone" field.

func PhoneHasSuffix

func PhoneHasSuffix(v string) predicate.User

PhoneHasSuffix applies the HasSuffix predicate on the "phone" field.

func PhoneIn

func PhoneIn(vs ...string) predicate.User

PhoneIn applies the In predicate on the "phone" field.

func PhoneIsNil

func PhoneIsNil() predicate.User

PhoneIsNil applies the IsNil predicate on the "phone" field.

func PhoneLT

func PhoneLT(v string) predicate.User

PhoneLT applies the LT predicate on the "phone" field.

func PhoneLTE

func PhoneLTE(v string) predicate.User

PhoneLTE applies the LTE predicate on the "phone" field.

func PhoneNEQ

func PhoneNEQ(v string) predicate.User

PhoneNEQ applies the NEQ predicate on the "phone" field.

func PhoneNotIn

func PhoneNotIn(vs ...string) predicate.User

PhoneNotIn applies the NotIn predicate on the "phone" field.

func PhoneNotNil

func PhoneNotNil() predicate.User

PhoneNotNil applies the NotNil predicate on the "phone" field.

func Status

func Status(v string) predicate.User

Status applies equality check predicate on the "status" field. It's identical to StatusEQ.

func StatusContains

func StatusContains(v string) predicate.User

StatusContains applies the Contains predicate on the "status" field.

func StatusContainsFold

func StatusContainsFold(v string) predicate.User

StatusContainsFold applies the ContainsFold predicate on the "status" field.

func StatusEQ

func StatusEQ(v string) predicate.User

StatusEQ applies the EQ predicate on the "status" field.

func StatusEqualFold

func StatusEqualFold(v string) predicate.User

StatusEqualFold applies the EqualFold predicate on the "status" field.

func StatusGT

func StatusGT(v string) predicate.User

StatusGT applies the GT predicate on the "status" field.

func StatusGTE

func StatusGTE(v string) predicate.User

StatusGTE applies the GTE predicate on the "status" field.

func StatusHasPrefix

func StatusHasPrefix(v string) predicate.User

StatusHasPrefix applies the HasPrefix predicate on the "status" field.

func StatusHasSuffix

func StatusHasSuffix(v string) predicate.User

StatusHasSuffix applies the HasSuffix predicate on the "status" field.

func StatusIn

func StatusIn(vs ...string) predicate.User

StatusIn applies the In predicate on the "status" field.

func StatusLT

func StatusLT(v string) predicate.User

StatusLT applies the LT predicate on the "status" field.

func StatusLTE

func StatusLTE(v string) predicate.User

StatusLTE applies the LTE predicate on the "status" field.

func StatusNEQ

func StatusNEQ(v string) predicate.User

StatusNEQ applies the NEQ predicate on the "status" field.

func StatusNotIn

func StatusNotIn(vs ...string) predicate.User

StatusNotIn applies the NotIn predicate on the "status" field.

func TenantName

func TenantName(v string) predicate.User

TenantName applies equality check predicate on the "tenant_name" field. It's identical to TenantNameEQ.

func TenantNameContains

func TenantNameContains(v string) predicate.User

TenantNameContains applies the Contains predicate on the "tenant_name" field.

func TenantNameContainsFold

func TenantNameContainsFold(v string) predicate.User

TenantNameContainsFold applies the ContainsFold predicate on the "tenant_name" field.

func TenantNameEQ

func TenantNameEQ(v string) predicate.User

TenantNameEQ applies the EQ predicate on the "tenant_name" field.

func TenantNameEqualFold

func TenantNameEqualFold(v string) predicate.User

TenantNameEqualFold applies the EqualFold predicate on the "tenant_name" field.

func TenantNameGT

func TenantNameGT(v string) predicate.User

TenantNameGT applies the GT predicate on the "tenant_name" field.

func TenantNameGTE

func TenantNameGTE(v string) predicate.User

TenantNameGTE applies the GTE predicate on the "tenant_name" field.

func TenantNameHasPrefix

func TenantNameHasPrefix(v string) predicate.User

TenantNameHasPrefix applies the HasPrefix predicate on the "tenant_name" field.

func TenantNameHasSuffix

func TenantNameHasSuffix(v string) predicate.User

TenantNameHasSuffix applies the HasSuffix predicate on the "tenant_name" field.

func TenantNameIn

func TenantNameIn(vs ...string) predicate.User

TenantNameIn applies the In predicate on the "tenant_name" field.

func TenantNameIsNil

func TenantNameIsNil() predicate.User

TenantNameIsNil applies the IsNil predicate on the "tenant_name" field.

func TenantNameLT

func TenantNameLT(v string) predicate.User

TenantNameLT applies the LT predicate on the "tenant_name" field.

func TenantNameLTE

func TenantNameLTE(v string) predicate.User

TenantNameLTE applies the LTE predicate on the "tenant_name" field.

func TenantNameNEQ

func TenantNameNEQ(v string) predicate.User

TenantNameNEQ applies the NEQ predicate on the "tenant_name" field.

func TenantNameNotIn

func TenantNameNotIn(vs ...string) predicate.User

TenantNameNotIn applies the NotIn predicate on the "tenant_name" field.

func TenantNameNotNil

func TenantNameNotNil() predicate.User

TenantNameNotNil applies the NotNil predicate on the "tenant_name" field.

func UpdateTime

func UpdateTime(v time.Time) predicate.User

UpdateTime applies equality check predicate on the "update_time" field. It's identical to UpdateTimeEQ.

func UpdateTimeEQ

func UpdateTimeEQ(v time.Time) predicate.User

UpdateTimeEQ applies the EQ predicate on the "update_time" field.

func UpdateTimeGT

func UpdateTimeGT(v time.Time) predicate.User

UpdateTimeGT applies the GT predicate on the "update_time" field.

func UpdateTimeGTE

func UpdateTimeGTE(v time.Time) predicate.User

UpdateTimeGTE applies the GTE predicate on the "update_time" field.

func UpdateTimeIn

func UpdateTimeIn(vs ...time.Time) predicate.User

UpdateTimeIn applies the In predicate on the "update_time" field.

func UpdateTimeIsNil

func UpdateTimeIsNil() predicate.User

UpdateTimeIsNil applies the IsNil predicate on the "update_time" field.

func UpdateTimeLT

func UpdateTimeLT(v time.Time) predicate.User

UpdateTimeLT applies the LT predicate on the "update_time" field.

func UpdateTimeLTE

func UpdateTimeLTE(v time.Time) predicate.User

UpdateTimeLTE applies the LTE predicate on the "update_time" field.

func UpdateTimeNEQ

func UpdateTimeNEQ(v time.Time) predicate.User

UpdateTimeNEQ applies the NEQ predicate on the "update_time" field.

func UpdateTimeNotIn

func UpdateTimeNotIn(vs ...time.Time) predicate.User

UpdateTimeNotIn applies the NotIn predicate on the "update_time" field.

func UpdateTimeNotNil

func UpdateTimeNotNil() predicate.User

UpdateTimeNotNil applies the NotNil predicate on the "update_time" field.

func Username

func Username(v string) predicate.User

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

func UsernameContains

func UsernameContains(v string) predicate.User

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

func UsernameContainsFold

func UsernameContainsFold(v string) predicate.User

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

func UsernameEQ

func UsernameEQ(v string) predicate.User

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

func UsernameEqualFold

func UsernameEqualFold(v string) predicate.User

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

func UsernameGT

func UsernameGT(v string) predicate.User

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

func UsernameGTE

func UsernameGTE(v string) predicate.User

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

func UsernameHasPrefix

func UsernameHasPrefix(v string) predicate.User

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

func UsernameHasSuffix

func UsernameHasSuffix(v string) predicate.User

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

func UsernameIn

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

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

func UsernameLT

func UsernameLT(v string) predicate.User

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

func UsernameLTE

func UsernameLTE(v string) predicate.User

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

func UsernameNEQ

func UsernameNEQ(v string) predicate.User

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

func UsernameNotIn

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

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

This section is empty.

Jump to

Keyboard shortcuts

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