Documentation
¶
Index ¶
- Constants
- Variables
- func And(predicates ...predicate.AuthRoles) predicate.AuthRoles
- func HasToken() predicate.AuthRoles
- func HasTokenWith(preds ...predicate.AuthTokens) predicate.AuthRoles
- func ID(id int) predicate.AuthRoles
- func IDEQ(id int) predicate.AuthRoles
- func IDGT(id int) predicate.AuthRoles
- func IDGTE(id int) predicate.AuthRoles
- func IDIn(ids ...int) predicate.AuthRoles
- func IDLT(id int) predicate.AuthRoles
- func IDLTE(id int) predicate.AuthRoles
- func IDNEQ(id int) predicate.AuthRoles
- func IDNotIn(ids ...int) predicate.AuthRoles
- func Not(p predicate.AuthRoles) predicate.AuthRoles
- func Or(predicates ...predicate.AuthRoles) predicate.AuthRoles
- func RoleEQ(v Role) predicate.AuthRoles
- func RoleIn(vs ...Role) predicate.AuthRoles
- func RoleNEQ(v Role) predicate.AuthRoles
- func RoleNotIn(vs ...Role) predicate.AuthRoles
- func RoleValidator(r Role) error
- func ValidColumn(column string) bool
- type OrderOption
- type Role
Constants ¶
const ( // Label holds the string label denoting the authroles type in the database. Label = "auth_roles" // FieldID holds the string denoting the id field in the database. FieldID = "id" // FieldRole holds the string denoting the role field in the database. FieldRole = "role" // EdgeToken holds the string denoting the token edge name in mutations. EdgeToken = "token" // Table holds the table name of the authroles in the database. Table = "auth_roles" // TokenTable is the table that holds the token relation/edge. TokenTable = "auth_roles" // TokenInverseTable is the table name for the AuthTokens entity. // It exists in this package in order to avoid circular dependency with the "authtokens" package. TokenInverseTable = "auth_tokens" // TokenColumn is the table column denoting the token relation/edge. TokenColumn = "auth_tokens_roles" )
const DefaultRole = RoleUser
RoleUser is the default value of the Role enum.
Variables ¶
var Columns = []string{ FieldID, FieldRole, }
Columns holds all SQL columns for authroles fields.
var ForeignKeys = []string{
"auth_tokens_roles",
}
ForeignKeys holds the SQL foreign-keys that are owned by the "auth_roles" table and are not defined as standalone fields in the schema.
Functions ¶
func HasTokenWith ¶
func HasTokenWith(preds ...predicate.AuthTokens) predicate.AuthRoles
HasTokenWith applies the HasEdge predicate on the "token" edge with a given conditions (other predicates).
func RoleValidator ¶
RoleValidator is a validator for the "role" field enum values. It is called by the builders before save.
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 AuthRoles queries.
func ByID ¶
func ByID(opts ...sql.OrderTermOption) OrderOption
ByID orders the results by the id field.
func ByRole ¶
func ByRole(opts ...sql.OrderTermOption) OrderOption
ByRole orders the results by the role field.
func ByTokenField ¶
func ByTokenField(field string, opts ...sql.OrderTermOption) OrderOption
ByTokenField orders the results by token field.