Documentation
¶
Index ¶
- Constants
- Variables
- func And(predicates ...predicate.User) predicate.User
- func CreatedAt(v time.Time) predicate.User
- func CreatedAtEQ(v time.Time) predicate.User
- func CreatedAtGT(v time.Time) predicate.User
- func CreatedAtGTE(v time.Time) predicate.User
- func CreatedAtIn(vs ...time.Time) predicate.User
- func CreatedAtLT(v time.Time) predicate.User
- func CreatedAtLTE(v time.Time) predicate.User
- func CreatedAtNEQ(v time.Time) predicate.User
- func CreatedAtNotIn(vs ...time.Time) predicate.User
- func DeletedAt(v time.Time) predicate.User
- func DeletedAtEQ(v time.Time) predicate.User
- func DeletedAtGT(v time.Time) predicate.User
- func DeletedAtGTE(v time.Time) predicate.User
- func DeletedAtIn(vs ...time.Time) predicate.User
- func DeletedAtIsNil() predicate.User
- func DeletedAtLT(v time.Time) predicate.User
- func DeletedAtLTE(v time.Time) predicate.User
- func DeletedAtNEQ(v time.Time) predicate.User
- func DeletedAtNotIn(vs ...time.Time) predicate.User
- func DeletedAtNotNil() predicate.User
- func HasReadItems() predicate.User
- func HasReadItemsWith(preds ...predicate.Item) predicate.User
- func HasReads() predicate.User
- func HasReadsWith(preds ...predicate.Read) predicate.User
- func HasSubscribedFeeds() predicate.User
- func HasSubscribedFeedsWith(preds ...predicate.Feed) predicate.User
- func HasSubscriptions() predicate.User
- func HasSubscriptionsWith(preds ...predicate.Subscription) predicate.User
- func HasTokens() predicate.User
- func HasTokensWith(preds ...predicate.Token) predicate.User
- func ID(id uuid.UUID) predicate.User
- func IDEQ(id uuid.UUID) predicate.User
- func IDGT(id uuid.UUID) predicate.User
- func IDGTE(id uuid.UUID) predicate.User
- func IDIn(ids ...uuid.UUID) predicate.User
- func IDLT(id uuid.UUID) predicate.User
- func IDLTE(id uuid.UUID) predicate.User
- func IDNEQ(id uuid.UUID) predicate.User
- func IDNotIn(ids ...uuid.UUID) predicate.User
- func Not(p predicate.User) predicate.User
- func Or(predicates ...predicate.User) predicate.User
- func Password(v string) predicate.User
- func PasswordContains(v string) predicate.User
- func PasswordContainsFold(v string) predicate.User
- func PasswordEQ(v string) predicate.User
- func PasswordEqualFold(v string) predicate.User
- func PasswordGT(v string) predicate.User
- func PasswordGTE(v string) predicate.User
- func PasswordHasPrefix(v string) predicate.User
- func PasswordHasSuffix(v string) predicate.User
- func PasswordIn(vs ...string) predicate.User
- func PasswordLT(v string) predicate.User
- func PasswordLTE(v string) predicate.User
- func PasswordNEQ(v string) predicate.User
- func PasswordNotIn(vs ...string) predicate.User
- func Role(v string) predicate.User
- func RoleContains(v string) predicate.User
- func RoleContainsFold(v string) predicate.User
- func RoleEQ(v string) predicate.User
- func RoleEqualFold(v string) predicate.User
- func RoleGT(v string) predicate.User
- func RoleGTE(v string) predicate.User
- func RoleHasPrefix(v string) predicate.User
- func RoleHasSuffix(v string) predicate.User
- func RoleIn(vs ...string) predicate.User
- func RoleLT(v string) predicate.User
- func RoleLTE(v string) predicate.User
- func RoleNEQ(v string) predicate.User
- func RoleNotIn(vs ...string) predicate.User
- func UpdatedAt(v time.Time) predicate.User
- func UpdatedAtEQ(v time.Time) predicate.User
- func UpdatedAtGT(v time.Time) predicate.User
- func UpdatedAtGTE(v time.Time) predicate.User
- func UpdatedAtIn(vs ...time.Time) predicate.User
- func UpdatedAtLT(v time.Time) predicate.User
- func UpdatedAtLTE(v time.Time) predicate.User
- func UpdatedAtNEQ(v time.Time) predicate.User
- func UpdatedAtNotIn(vs ...time.Time) predicate.User
- func Username(v string) predicate.User
- func UsernameContains(v string) predicate.User
- func UsernameContainsFold(v string) predicate.User
- func UsernameEQ(v string) predicate.User
- func UsernameEqualFold(v string) predicate.User
- func UsernameGT(v string) predicate.User
- func UsernameGTE(v string) predicate.User
- func UsernameHasPrefix(v string) predicate.User
- func UsernameHasSuffix(v string) predicate.User
- func UsernameIn(vs ...string) predicate.User
- func UsernameLT(v string) predicate.User
- func UsernameLTE(v string) predicate.User
- func UsernameNEQ(v string) predicate.User
- func UsernameNotIn(vs ...string) predicate.User
- func ValidColumn(column string) bool
- type OrderOption
- func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption
- func ByDeletedAt(opts ...sql.OrderTermOption) OrderOption
- func ByID(opts ...sql.OrderTermOption) OrderOption
- func ByPassword(opts ...sql.OrderTermOption) OrderOption
- func ByReadItems(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func ByReadItemsCount(opts ...sql.OrderTermOption) OrderOption
- func ByReads(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func ByReadsCount(opts ...sql.OrderTermOption) OrderOption
- func ByRole(opts ...sql.OrderTermOption) OrderOption
- func BySubscribedFeeds(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func BySubscribedFeedsCount(opts ...sql.OrderTermOption) OrderOption
- func BySubscriptions(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func BySubscriptionsCount(opts ...sql.OrderTermOption) OrderOption
- func ByTokens(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func ByTokensCount(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 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" // FieldPassword holds the string denoting the password field in the database. FieldPassword = "password" // FieldRole holds the string denoting the role field in the database. FieldRole = "role" // 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" // FieldDeletedAt holds the string denoting the deleted_at field in the database. FieldDeletedAt = "deleted_at" // EdgeTokens holds the string denoting the tokens edge name in mutations. EdgeTokens = "tokens" // EdgeSubscribedFeeds holds the string denoting the subscribed_feeds edge name in mutations. EdgeSubscribedFeeds = "subscribed_feeds" // EdgeReadItems holds the string denoting the read_items edge name in mutations. EdgeReadItems = "read_items" // EdgeSubscriptions holds the string denoting the subscriptions edge name in mutations. EdgeSubscriptions = "subscriptions" // EdgeReads holds the string denoting the reads edge name in mutations. EdgeReads = "reads" // Table holds the table name of the user in the database. Table = "users" // TokensTable is the table that holds the tokens relation/edge. TokensTable = "tokens" // TokensInverseTable is the table name for the Token entity. // It exists in this package in order to avoid circular dependency with the "token" package. TokensInverseTable = "tokens" // TokensColumn is the table column denoting the tokens relation/edge. TokensColumn = "user_tokens" // SubscribedFeedsTable is the table that holds the subscribed_feeds relation/edge. The primary key declared below. SubscribedFeedsTable = "subscriptions" // SubscribedFeedsInverseTable is the table name for the Feed entity. // It exists in this package in order to avoid circular dependency with the "feed" package. SubscribedFeedsInverseTable = "feeds" // ReadItemsTable is the table that holds the read_items relation/edge. The primary key declared below. ReadItemsTable = "reads" // ReadItemsInverseTable is the table name for the Item entity. // It exists in this package in order to avoid circular dependency with the "item" package. ReadItemsInverseTable = "items" // SubscriptionsTable is the table that holds the subscriptions relation/edge. SubscriptionsTable = "subscriptions" // SubscriptionsInverseTable is the table name for the Subscription entity. // It exists in this package in order to avoid circular dependency with the "subscription" package. SubscriptionsInverseTable = "subscriptions" // SubscriptionsColumn is the table column denoting the subscriptions relation/edge. SubscriptionsColumn = "user_id" // ReadsTable is the table that holds the reads relation/edge. ReadsTable = "reads" // ReadsInverseTable is the table name for the Read entity. // It exists in this package in order to avoid circular dependency with the "read" package. ReadsInverseTable = "reads" // ReadsColumn is the table column denoting the reads relation/edge. ReadsColumn = "user_id" )
Variables ¶
var ( // SubscribedFeedsPrimaryKey and SubscribedFeedsColumn2 are the table columns denoting the // primary key for the subscribed_feeds relation (M2M). SubscribedFeedsPrimaryKey = []string{"user_id", "feed_id"} // ReadItemsPrimaryKey and ReadItemsColumn2 are the table columns denoting the // primary key for the read_items relation (M2M). ReadItemsPrimaryKey = []string{"user_id", "item_id"} )
var ( // UsernameValidator is a validator for the "username" field. It is called by the builders before save. UsernameValidator func(string) error // PasswordValidator is a validator for the "password" field. It is called by the builders before save. PasswordValidator func(string) error // DefaultRole holds the default value on creation for the "role" field. DefaultRole string // RoleValidator is a validator for the "role" field. It is called by the builders before save. RoleValidator func(string) error // 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 // DefaultID holds the default value on creation for the "id" field. DefaultID func() uuid.UUID )
var Columns = []string{ FieldID, FieldUsername, FieldPassword, FieldRole, FieldCreatedAt, FieldUpdatedAt, FieldDeletedAt, }
Columns holds all SQL columns for user fields.
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 DeletedAtIsNil ¶
DeletedAtIsNil applies the IsNil 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 DeletedAtNotNil ¶
DeletedAtNotNil applies the NotNil predicate on the "deleted_at" field.
func HasReadItems ¶
HasReadItems applies the HasEdge predicate on the "read_items" edge.
func HasReadItemsWith ¶
HasReadItemsWith applies the HasEdge predicate on the "read_items" edge with a given conditions (other predicates).
func HasReadsWith ¶
HasReadsWith applies the HasEdge predicate on the "reads" edge with a given conditions (other predicates).
func HasSubscribedFeeds ¶
HasSubscribedFeeds applies the HasEdge predicate on the "subscribed_feeds" edge.
func HasSubscribedFeedsWith ¶
HasSubscribedFeedsWith applies the HasEdge predicate on the "subscribed_feeds" edge with a given conditions (other predicates).
func HasSubscriptions ¶
HasSubscriptions applies the HasEdge predicate on the "subscriptions" edge.
func HasSubscriptionsWith ¶
func HasSubscriptionsWith(preds ...predicate.Subscription) predicate.User
HasSubscriptionsWith applies the HasEdge predicate on the "subscriptions" edge with a given conditions (other predicates).
func HasTokensWith ¶
HasTokensWith applies the HasEdge predicate on the "tokens" edge with a given conditions (other predicates).
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 RoleContains ¶
RoleContains applies the Contains predicate on the "role" field.
func RoleContainsFold ¶
RoleContainsFold applies the ContainsFold predicate on the "role" field.
func RoleEqualFold ¶
RoleEqualFold applies the EqualFold predicate on the "role" field.
func RoleHasPrefix ¶
RoleHasPrefix applies the HasPrefix predicate on the "role" field.
func RoleHasSuffix ¶
RoleHasSuffix applies the HasSuffix predicate on the "role" 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 ¶ added in v1.0.1
OrderOption defines the ordering options for the User queries.
func ByCreatedAt ¶ added in v1.0.1
func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption
ByCreatedAt orders the results by the created_at field.
func ByDeletedAt ¶ added in v1.0.1
func ByDeletedAt(opts ...sql.OrderTermOption) OrderOption
ByDeletedAt orders the results by the deleted_at field.
func ByID ¶ added in v1.0.1
func ByID(opts ...sql.OrderTermOption) OrderOption
ByID orders the results by the id field.
func ByPassword ¶ added in v1.0.1
func ByPassword(opts ...sql.OrderTermOption) OrderOption
ByPassword orders the results by the password field.
func ByReadItems ¶ added in v1.0.1
func ByReadItems(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
ByReadItems orders the results by read_items terms.
func ByReadItemsCount ¶ added in v1.0.1
func ByReadItemsCount(opts ...sql.OrderTermOption) OrderOption
ByReadItemsCount orders the results by read_items count.
func ByReads ¶ added in v1.0.1
func ByReads(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
ByReads orders the results by reads terms.
func ByReadsCount ¶ added in v1.0.1
func ByReadsCount(opts ...sql.OrderTermOption) OrderOption
ByReadsCount orders the results by reads count.
func ByRole ¶ added in v1.0.1
func ByRole(opts ...sql.OrderTermOption) OrderOption
ByRole orders the results by the role field.
func BySubscribedFeeds ¶ added in v1.0.1
func BySubscribedFeeds(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
BySubscribedFeeds orders the results by subscribed_feeds terms.
func BySubscribedFeedsCount ¶ added in v1.0.1
func BySubscribedFeedsCount(opts ...sql.OrderTermOption) OrderOption
BySubscribedFeedsCount orders the results by subscribed_feeds count.
func BySubscriptions ¶ added in v1.0.1
func BySubscriptions(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
BySubscriptions orders the results by subscriptions terms.
func BySubscriptionsCount ¶ added in v1.0.1
func BySubscriptionsCount(opts ...sql.OrderTermOption) OrderOption
BySubscriptionsCount orders the results by subscriptions count.
func ByTokens ¶ added in v1.0.1
func ByTokens(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
ByTokens orders the results by tokens terms.
func ByTokensCount ¶ added in v1.0.1
func ByTokensCount(opts ...sql.OrderTermOption) OrderOption
ByTokensCount orders the results by tokens count.
func ByUpdatedAt ¶ added in v1.0.1
func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption
ByUpdatedAt orders the results by the updated_at field.
func ByUsername ¶ added in v1.0.1
func ByUsername(opts ...sql.OrderTermOption) OrderOption
ByUsername orders the results by the username field.