user

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2022 License: Apache-2.0 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 user_name field in the database.
	FieldUserName = "user_name"
	// FieldStatus holds the string denoting the status field in the database.
	FieldStatus = "status"
	// FieldUnnecessary holds the string denoting the unnecessary field in the database.
	FieldUnnecessary = "unnecessary"
	// EdgeBlogPosts holds the string denoting the blog_posts edge name in mutations.
	EdgeBlogPosts = "blog_posts"
	// EdgeProfilePic holds the string denoting the profile_pic edge name in mutations.
	EdgeProfilePic = "profile_pic"
	// EdgeSkipEdge holds the string denoting the skip_edge edge name in mutations.
	EdgeSkipEdge = "skip_edge"
	// Table holds the table name of the user in the database.
	Table = "users"
	// BlogPostsTable is the table that holds the blog_posts relation/edge.
	BlogPostsTable = "blog_posts"
	// BlogPostsInverseTable is the table name for the BlogPost entity.
	// It exists in this package in order to avoid circular dependency with the "blogpost" package.
	BlogPostsInverseTable = "blog_posts"
	// BlogPostsColumn is the table column denoting the blog_posts relation/edge.
	BlogPostsColumn = "blog_post_author"
	// ProfilePicTable is the table that holds the profile_pic relation/edge.
	ProfilePicTable = "users"
	// ProfilePicInverseTable is the table name for the Image entity.
	// It exists in this package in order to avoid circular dependency with the "image" package.
	ProfilePicInverseTable = "images"
	// ProfilePicColumn is the table column denoting the profile_pic relation/edge.
	ProfilePicColumn = "user_profile_pic"
	// SkipEdgeTable is the table that holds the skip_edge relation/edge.
	SkipEdgeTable = "skip_edge_examples"
	// SkipEdgeInverseTable is the table name for the SkipEdgeExample entity.
	// It exists in this package in order to avoid circular dependency with the "skipedgeexample" package.
	SkipEdgeInverseTable = "skip_edge_examples"
	// SkipEdgeColumn is the table column denoting the skip_edge relation/edge.
	SkipEdgeColumn = "user_skip_edge"
)

Variables

Columns holds all SQL columns for user fields.

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

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

Functions

func And

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

And groups predicates with the AND operator between them.

func HasBlogPosts

func HasBlogPosts() predicate.User

HasBlogPosts applies the HasEdge predicate on the "blog_posts" edge.

func HasBlogPostsWith

func HasBlogPostsWith(preds ...predicate.BlogPost) predicate.User

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

func HasProfilePic

func HasProfilePic() predicate.User

HasProfilePic applies the HasEdge predicate on the "profile_pic" edge.

func HasProfilePicWith

func HasProfilePicWith(preds ...predicate.Image) predicate.User

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

func HasSkipEdge

func HasSkipEdge() predicate.User

HasSkipEdge applies the HasEdge predicate on the "skip_edge" edge.

func HasSkipEdgeWith

func HasSkipEdgeWith(preds ...predicate.SkipEdgeExample) predicate.User

HasSkipEdgeWith applies the HasEdge predicate on the "skip_edge" 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 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 Unnecessary

func Unnecessary(v string) predicate.User

Unnecessary applies equality check predicate on the "unnecessary" field. It's identical to UnnecessaryEQ.

func UnnecessaryContains

func UnnecessaryContains(v string) predicate.User

UnnecessaryContains applies the Contains predicate on the "unnecessary" field.

func UnnecessaryContainsFold

func UnnecessaryContainsFold(v string) predicate.User

UnnecessaryContainsFold applies the ContainsFold predicate on the "unnecessary" field.

func UnnecessaryEQ

func UnnecessaryEQ(v string) predicate.User

UnnecessaryEQ applies the EQ predicate on the "unnecessary" field.

func UnnecessaryEqualFold

func UnnecessaryEqualFold(v string) predicate.User

UnnecessaryEqualFold applies the EqualFold predicate on the "unnecessary" field.

func UnnecessaryGT

func UnnecessaryGT(v string) predicate.User

UnnecessaryGT applies the GT predicate on the "unnecessary" field.

func UnnecessaryGTE

func UnnecessaryGTE(v string) predicate.User

UnnecessaryGTE applies the GTE predicate on the "unnecessary" field.

func UnnecessaryHasPrefix

func UnnecessaryHasPrefix(v string) predicate.User

UnnecessaryHasPrefix applies the HasPrefix predicate on the "unnecessary" field.

func UnnecessaryHasSuffix

func UnnecessaryHasSuffix(v string) predicate.User

UnnecessaryHasSuffix applies the HasSuffix predicate on the "unnecessary" field.

func UnnecessaryIn

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

UnnecessaryIn applies the In predicate on the "unnecessary" field.

func UnnecessaryIsNil

func UnnecessaryIsNil() predicate.User

UnnecessaryIsNil applies the IsNil predicate on the "unnecessary" field.

func UnnecessaryLT

func UnnecessaryLT(v string) predicate.User

UnnecessaryLT applies the LT predicate on the "unnecessary" field.

func UnnecessaryLTE

func UnnecessaryLTE(v string) predicate.User

UnnecessaryLTE applies the LTE predicate on the "unnecessary" field.

func UnnecessaryNEQ

func UnnecessaryNEQ(v string) predicate.User

UnnecessaryNEQ applies the NEQ predicate on the "unnecessary" field.

func UnnecessaryNotIn

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

UnnecessaryNotIn applies the NotIn predicate on the "unnecessary" field.

func UnnecessaryNotNil

func UnnecessaryNotNil() predicate.User

UnnecessaryNotNil applies the NotNil predicate on the "unnecessary" field.

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