user

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2021 License: Apache-2.0 Imports: 6 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 user_name field in the database.
	FieldUserName = "user_name"
	// FieldJoined holds the string denoting the joined field in the database.
	FieldJoined = "joined"
	// FieldPoints holds the string denoting the points field in the database.
	FieldPoints = "points"
	// FieldExp holds the string denoting the exp field in the database.
	FieldExp = "exp"
	// FieldStatus holds the string denoting the status field in the database.
	FieldStatus = "status"
	// FieldExternalID holds the string denoting the external_id field in the database.
	FieldExternalID = "external_id"
	// FieldCrmID holds the string denoting the crm_id field in the database.
	FieldCrmID = "crm_id"
	// FieldBanned holds the string denoting the banned field in the database.
	FieldBanned = "banned"
	// FieldCustomPb holds the string denoting the custom_pb field in the database.
	FieldCustomPb = "custom_pb"
	// FieldOptNum holds the string denoting the opt_num field in the database.
	FieldOptNum = "opt_num"
	// FieldOptStr holds the string denoting the opt_str field in the database.
	FieldOptStr = "opt_str"
	// FieldOptBool holds the string denoting the opt_bool field in the database.
	FieldOptBool = "opt_bool"
	// EdgeGroup holds the string denoting the group edge name in mutations.
	EdgeGroup = "group"
	// EdgeAttachment holds the string denoting the attachment edge name in mutations.
	EdgeAttachment = "attachment"
	// EdgeReceived holds the string denoting the received edge name in mutations.
	EdgeReceived = "received"
	// Table holds the table name of the user in the database.
	Table = "users"
	// GroupTable is the table the holds the group relation/edge.
	GroupTable = "users"
	// GroupInverseTable is the table name for the Group entity.
	// It exists in this package in order to avoid circular dependency with the "group" package.
	GroupInverseTable = "groups"
	// GroupColumn is the table column denoting the group relation/edge.
	GroupColumn = "user_group"
	// AttachmentTable is the table the holds the attachment relation/edge.
	AttachmentTable = "attachments"
	// AttachmentInverseTable is the table name for the Attachment entity.
	// It exists in this package in order to avoid circular dependency with the "attachment" package.
	AttachmentInverseTable = "attachments"
	// AttachmentColumn is the table column denoting the attachment relation/edge.
	AttachmentColumn = "user_attachment"
	// ReceivedTable is the table the holds the received relation/edge. The primary key declared below.
	ReceivedTable = "attachment_recipients"
	// ReceivedInverseTable is the table name for the Attachment entity.
	// It exists in this package in order to avoid circular dependency with the "attachment" package.
	ReceivedInverseTable = "attachments"
)

Variables

Columns holds all SQL columns for user fields.

View Source
var (
	// DefaultBanned holds the default value on creation for the "banned" field.
	DefaultBanned bool
)
View Source
var ForeignKeys = []string{
	"user_group",
}

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 (
	// ReceivedPrimaryKey and ReceivedColumn2 are the table columns denoting the
	// primary key for the received relation (M2M).
	ReceivedPrimaryKey = []string{"attachment_id", "user_id"}
)

Functions

func And

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

And groups predicates with the AND operator between them.

func Banned

func Banned(v bool) predicate.User

Banned applies equality check predicate on the "banned" field. It's identical to BannedEQ.

func BannedEQ

func BannedEQ(v bool) predicate.User

BannedEQ applies the EQ predicate on the "banned" field.

func BannedNEQ

func BannedNEQ(v bool) predicate.User

BannedNEQ applies the NEQ predicate on the "banned" field.

func CrmID

func CrmID(v uuid.UUID) predicate.User

CrmID applies equality check predicate on the "crm_id" field. It's identical to CrmIDEQ.

func CrmIDEQ

func CrmIDEQ(v uuid.UUID) predicate.User

CrmIDEQ applies the EQ predicate on the "crm_id" field.

func CrmIDGT

func CrmIDGT(v uuid.UUID) predicate.User

CrmIDGT applies the GT predicate on the "crm_id" field.

func CrmIDGTE

func CrmIDGTE(v uuid.UUID) predicate.User

CrmIDGTE applies the GTE predicate on the "crm_id" field.

func CrmIDIn

func CrmIDIn(vs ...uuid.UUID) predicate.User

CrmIDIn applies the In predicate on the "crm_id" field.

func CrmIDLT

func CrmIDLT(v uuid.UUID) predicate.User

CrmIDLT applies the LT predicate on the "crm_id" field.

func CrmIDLTE

func CrmIDLTE(v uuid.UUID) predicate.User

CrmIDLTE applies the LTE predicate on the "crm_id" field.

func CrmIDNEQ

func CrmIDNEQ(v uuid.UUID) predicate.User

CrmIDNEQ applies the NEQ predicate on the "crm_id" field.

func CrmIDNotIn

func CrmIDNotIn(vs ...uuid.UUID) predicate.User

CrmIDNotIn applies the NotIn predicate on the "crm_id" field.

func CustomPb

func CustomPb(v uint8) predicate.User

CustomPb applies equality check predicate on the "custom_pb" field. It's identical to CustomPbEQ.

func CustomPbEQ

func CustomPbEQ(v uint8) predicate.User

CustomPbEQ applies the EQ predicate on the "custom_pb" field.

func CustomPbGT

func CustomPbGT(v uint8) predicate.User

CustomPbGT applies the GT predicate on the "custom_pb" field.

func CustomPbGTE

func CustomPbGTE(v uint8) predicate.User

CustomPbGTE applies the GTE predicate on the "custom_pb" field.

func CustomPbIn

func CustomPbIn(vs ...uint8) predicate.User

CustomPbIn applies the In predicate on the "custom_pb" field.

func CustomPbLT

func CustomPbLT(v uint8) predicate.User

CustomPbLT applies the LT predicate on the "custom_pb" field.

func CustomPbLTE

func CustomPbLTE(v uint8) predicate.User

CustomPbLTE applies the LTE predicate on the "custom_pb" field.

func CustomPbNEQ

func CustomPbNEQ(v uint8) predicate.User

CustomPbNEQ applies the NEQ predicate on the "custom_pb" field.

func CustomPbNotIn

func CustomPbNotIn(vs ...uint8) predicate.User

CustomPbNotIn applies the NotIn predicate on the "custom_pb" field.

func Exp

func Exp(v uint64) predicate.User

Exp applies equality check predicate on the "exp" field. It's identical to ExpEQ.

func ExpEQ

func ExpEQ(v uint64) predicate.User

ExpEQ applies the EQ predicate on the "exp" field.

func ExpGT

func ExpGT(v uint64) predicate.User

ExpGT applies the GT predicate on the "exp" field.

func ExpGTE

func ExpGTE(v uint64) predicate.User

ExpGTE applies the GTE predicate on the "exp" field.

func ExpIn

func ExpIn(vs ...uint64) predicate.User

ExpIn applies the In predicate on the "exp" field.

func ExpLT

func ExpLT(v uint64) predicate.User

ExpLT applies the LT predicate on the "exp" field.

func ExpLTE

func ExpLTE(v uint64) predicate.User

ExpLTE applies the LTE predicate on the "exp" field.

func ExpNEQ

func ExpNEQ(v uint64) predicate.User

ExpNEQ applies the NEQ predicate on the "exp" field.

func ExpNotIn

func ExpNotIn(vs ...uint64) predicate.User

ExpNotIn applies the NotIn predicate on the "exp" field.

func ExternalID

func ExternalID(v int) predicate.User

ExternalID applies equality check predicate on the "external_id" field. It's identical to ExternalIDEQ.

func ExternalIDEQ

func ExternalIDEQ(v int) predicate.User

ExternalIDEQ applies the EQ predicate on the "external_id" field.

func ExternalIDGT

func ExternalIDGT(v int) predicate.User

ExternalIDGT applies the GT predicate on the "external_id" field.

func ExternalIDGTE

func ExternalIDGTE(v int) predicate.User

ExternalIDGTE applies the GTE predicate on the "external_id" field.

func ExternalIDIn

func ExternalIDIn(vs ...int) predicate.User

ExternalIDIn applies the In predicate on the "external_id" field.

func ExternalIDLT

func ExternalIDLT(v int) predicate.User

ExternalIDLT applies the LT predicate on the "external_id" field.

func ExternalIDLTE

func ExternalIDLTE(v int) predicate.User

ExternalIDLTE applies the LTE predicate on the "external_id" field.

func ExternalIDNEQ

func ExternalIDNEQ(v int) predicate.User

ExternalIDNEQ applies the NEQ predicate on the "external_id" field.

func ExternalIDNotIn

func ExternalIDNotIn(vs ...int) predicate.User

ExternalIDNotIn applies the NotIn predicate on the "external_id" field.

func HasAttachment

func HasAttachment() predicate.User

HasAttachment applies the HasEdge predicate on the "attachment" edge.

func HasAttachmentWith

func HasAttachmentWith(preds ...predicate.Attachment) predicate.User

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

func HasGroup

func HasGroup() predicate.User

HasGroup applies the HasEdge predicate on the "group" edge.

func HasGroupWith

func HasGroupWith(preds ...predicate.Group) predicate.User

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

func HasReceived

func HasReceived() predicate.User

HasReceived applies the HasEdge predicate on the "received" edge.

func HasReceivedWith

func HasReceivedWith(preds ...predicate.Attachment) predicate.User

HasReceivedWith applies the HasEdge predicate on the "received" 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 Joined

func Joined(v time.Time) predicate.User

Joined applies equality check predicate on the "joined" field. It's identical to JoinedEQ.

func JoinedEQ

func JoinedEQ(v time.Time) predicate.User

JoinedEQ applies the EQ predicate on the "joined" field.

func JoinedGT

func JoinedGT(v time.Time) predicate.User

JoinedGT applies the GT predicate on the "joined" field.

func JoinedGTE

func JoinedGTE(v time.Time) predicate.User

JoinedGTE applies the GTE predicate on the "joined" field.

func JoinedIn

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

JoinedIn applies the In predicate on the "joined" field.

func JoinedLT

func JoinedLT(v time.Time) predicate.User

JoinedLT applies the LT predicate on the "joined" field.

func JoinedLTE

func JoinedLTE(v time.Time) predicate.User

JoinedLTE applies the LTE predicate on the "joined" field.

func JoinedNEQ

func JoinedNEQ(v time.Time) predicate.User

JoinedNEQ applies the NEQ predicate on the "joined" field.

func JoinedNotIn

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

JoinedNotIn applies the NotIn predicate on the "joined" field.

func Not

Not applies the not operator on the given predicate.

func OptBool

func OptBool(v bool) predicate.User

OptBool applies equality check predicate on the "opt_bool" field. It's identical to OptBoolEQ.

func OptBoolEQ

func OptBoolEQ(v bool) predicate.User

OptBoolEQ applies the EQ predicate on the "opt_bool" field.

func OptBoolIsNil

func OptBoolIsNil() predicate.User

OptBoolIsNil applies the IsNil predicate on the "opt_bool" field.

func OptBoolNEQ

func OptBoolNEQ(v bool) predicate.User

OptBoolNEQ applies the NEQ predicate on the "opt_bool" field.

func OptBoolNotNil

func OptBoolNotNil() predicate.User

OptBoolNotNil applies the NotNil predicate on the "opt_bool" field.

func OptNum

func OptNum(v int) predicate.User

OptNum applies equality check predicate on the "opt_num" field. It's identical to OptNumEQ.

func OptNumEQ

func OptNumEQ(v int) predicate.User

OptNumEQ applies the EQ predicate on the "opt_num" field.

func OptNumGT

func OptNumGT(v int) predicate.User

OptNumGT applies the GT predicate on the "opt_num" field.

func OptNumGTE

func OptNumGTE(v int) predicate.User

OptNumGTE applies the GTE predicate on the "opt_num" field.

func OptNumIn

func OptNumIn(vs ...int) predicate.User

OptNumIn applies the In predicate on the "opt_num" field.

func OptNumIsNil

func OptNumIsNil() predicate.User

OptNumIsNil applies the IsNil predicate on the "opt_num" field.

func OptNumLT

func OptNumLT(v int) predicate.User

OptNumLT applies the LT predicate on the "opt_num" field.

func OptNumLTE

func OptNumLTE(v int) predicate.User

OptNumLTE applies the LTE predicate on the "opt_num" field.

func OptNumNEQ

func OptNumNEQ(v int) predicate.User

OptNumNEQ applies the NEQ predicate on the "opt_num" field.

func OptNumNotIn

func OptNumNotIn(vs ...int) predicate.User

OptNumNotIn applies the NotIn predicate on the "opt_num" field.

func OptNumNotNil

func OptNumNotNil() predicate.User

OptNumNotNil applies the NotNil predicate on the "opt_num" field.

func OptStr

func OptStr(v string) predicate.User

OptStr applies equality check predicate on the "opt_str" field. It's identical to OptStrEQ.

func OptStrContains

func OptStrContains(v string) predicate.User

OptStrContains applies the Contains predicate on the "opt_str" field.

func OptStrContainsFold

func OptStrContainsFold(v string) predicate.User

OptStrContainsFold applies the ContainsFold predicate on the "opt_str" field.

func OptStrEQ

func OptStrEQ(v string) predicate.User

OptStrEQ applies the EQ predicate on the "opt_str" field.

func OptStrEqualFold

func OptStrEqualFold(v string) predicate.User

OptStrEqualFold applies the EqualFold predicate on the "opt_str" field.

func OptStrGT

func OptStrGT(v string) predicate.User

OptStrGT applies the GT predicate on the "opt_str" field.

func OptStrGTE

func OptStrGTE(v string) predicate.User

OptStrGTE applies the GTE predicate on the "opt_str" field.

func OptStrHasPrefix

func OptStrHasPrefix(v string) predicate.User

OptStrHasPrefix applies the HasPrefix predicate on the "opt_str" field.

func OptStrHasSuffix

func OptStrHasSuffix(v string) predicate.User

OptStrHasSuffix applies the HasSuffix predicate on the "opt_str" field.

func OptStrIn

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

OptStrIn applies the In predicate on the "opt_str" field.

func OptStrIsNil

func OptStrIsNil() predicate.User

OptStrIsNil applies the IsNil predicate on the "opt_str" field.

func OptStrLT

func OptStrLT(v string) predicate.User

OptStrLT applies the LT predicate on the "opt_str" field.

func OptStrLTE

func OptStrLTE(v string) predicate.User

OptStrLTE applies the LTE predicate on the "opt_str" field.

func OptStrNEQ

func OptStrNEQ(v string) predicate.User

OptStrNEQ applies the NEQ predicate on the "opt_str" field.

func OptStrNotIn

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

OptStrNotIn applies the NotIn predicate on the "opt_str" field.

func OptStrNotNil

func OptStrNotNil() predicate.User

OptStrNotNil applies the NotNil predicate on the "opt_str" field.

func Or

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

Or groups predicates with the OR operator between them.

func Points

func Points(v uint) predicate.User

Points applies equality check predicate on the "points" field. It's identical to PointsEQ.

func PointsEQ

func PointsEQ(v uint) predicate.User

PointsEQ applies the EQ predicate on the "points" field.

func PointsGT

func PointsGT(v uint) predicate.User

PointsGT applies the GT predicate on the "points" field.

func PointsGTE

func PointsGTE(v uint) predicate.User

PointsGTE applies the GTE predicate on the "points" field.

func PointsIn

func PointsIn(vs ...uint) predicate.User

PointsIn applies the In predicate on the "points" field.

func PointsLT

func PointsLT(v uint) predicate.User

PointsLT applies the LT predicate on the "points" field.

func PointsLTE

func PointsLTE(v uint) predicate.User

PointsLTE applies the LTE predicate on the "points" field.

func PointsNEQ

func PointsNEQ(v uint) predicate.User

PointsNEQ applies the NEQ predicate on the "points" field.

func PointsNotIn

func PointsNotIn(vs ...uint) predicate.User

PointsNotIn applies the NotIn predicate on the "points" field.

func StatusEQ

func StatusEQ(v Status) predicate.User

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

func StatusIn

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

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

func StatusNEQ

func StatusNEQ(v Status) predicate.User

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

func StatusNotIn

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

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

func StatusValidator

func StatusValidator(s Status) error

StatusValidator is a validator for the "status" field enum values. It is called by the builders before save.

func UserName

func UserName(v string) predicate.User

UserName applies equality check predicate on the "user_name" field. It's identical to UserNameEQ.

func UserNameContains

func UserNameContains(v string) predicate.User

UserNameContains applies the Contains predicate on the "user_name" field.

func UserNameContainsFold

func UserNameContainsFold(v string) predicate.User

UserNameContainsFold applies the ContainsFold predicate on the "user_name" field.

func UserNameEQ

func UserNameEQ(v string) predicate.User

UserNameEQ applies the EQ predicate on the "user_name" field.

func UserNameEqualFold

func UserNameEqualFold(v string) predicate.User

UserNameEqualFold applies the EqualFold predicate on the "user_name" field.

func UserNameGT

func UserNameGT(v string) predicate.User

UserNameGT applies the GT predicate on the "user_name" field.

func UserNameGTE

func UserNameGTE(v string) predicate.User

UserNameGTE applies the GTE predicate on the "user_name" field.

func UserNameHasPrefix

func UserNameHasPrefix(v string) predicate.User

UserNameHasPrefix applies the HasPrefix predicate on the "user_name" field.

func UserNameHasSuffix

func UserNameHasSuffix(v string) predicate.User

UserNameHasSuffix applies the HasSuffix predicate on the "user_name" field.

func UserNameIn

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

UserNameIn applies the In predicate on the "user_name" field.

func UserNameLT

func UserNameLT(v string) predicate.User

UserNameLT applies the LT predicate on the "user_name" field.

func UserNameLTE

func UserNameLTE(v string) predicate.User

UserNameLTE applies the LTE predicate on the "user_name" field.

func UserNameNEQ

func UserNameNEQ(v string) predicate.User

UserNameNEQ applies the NEQ predicate on the "user_name" field.

func UserNameNotIn

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

UserNameNotIn applies the NotIn predicate on the "user_name" field.

func ValidColumn

func ValidColumn(column string) bool

ValidColumn reports if the column name is valid (part of the table columns).

Types

type Status

type Status string

Status defines the type for the "status" enum field.

const (
	StatusPending Status = "pending"
	StatusActive  Status = "active"
)

Status values.

func (Status) String

func (s Status) String() string

Jump to

Keyboard shortcuts

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