Documentation ¶
Index ¶
- Constants
- Variables
- func And(predicates ...predicate.Resource) predicate.Resource
- func HasAuthorization() predicate.Resource
- func HasAuthorizationWith(preds ...predicate.Authorization) predicate.Resource
- func HasRole() predicate.Resource
- func HasRoleWith(preds ...predicate.Role) predicate.Resource
- func HasUser() predicate.Resource
- func HasUserWith(preds ...predicate.User) predicate.Resource
- func ID(id int) predicate.Resource
- func IDEQ(id int) predicate.Resource
- func IDGT(id int) predicate.Resource
- func IDGTE(id int) predicate.Resource
- func IDIn(ids ...int) predicate.Resource
- func IDLT(id int) predicate.Resource
- func IDLTE(id int) predicate.Resource
- func IDNEQ(id int) predicate.Resource
- func IDNotIn(ids ...int) predicate.Resource
- func Not(p predicate.Resource) predicate.Resource
- func Or(predicates ...predicate.Resource) predicate.Resource
- func ResourceName(v string) predicate.Resource
- func ResourceNameContains(v string) predicate.Resource
- func ResourceNameContainsFold(v string) predicate.Resource
- func ResourceNameEQ(v string) predicate.Resource
- func ResourceNameEqualFold(v string) predicate.Resource
- func ResourceNameGT(v string) predicate.Resource
- func ResourceNameGTE(v string) predicate.Resource
- func ResourceNameHasPrefix(v string) predicate.Resource
- func ResourceNameHasSuffix(v string) predicate.Resource
- func ResourceNameIn(vs ...string) predicate.Resource
- func ResourceNameLT(v string) predicate.Resource
- func ResourceNameLTE(v string) predicate.Resource
- func ResourceNameNEQ(v string) predicate.Resource
- func ResourceNameNotIn(vs ...string) predicate.Resource
- func ResourceValue(v string) predicate.Resource
- func ResourceValueContains(v string) predicate.Resource
- func ResourceValueContainsFold(v string) predicate.Resource
- func ResourceValueEQ(v string) predicate.Resource
- func ResourceValueEqualFold(v string) predicate.Resource
- func ResourceValueGT(v string) predicate.Resource
- func ResourceValueGTE(v string) predicate.Resource
- func ResourceValueHasPrefix(v string) predicate.Resource
- func ResourceValueHasSuffix(v string) predicate.Resource
- func ResourceValueIn(vs ...string) predicate.Resource
- func ResourceValueLT(v string) predicate.Resource
- func ResourceValueLTE(v string) predicate.Resource
- func ResourceValueNEQ(v string) predicate.Resource
- func ResourceValueNotIn(vs ...string) predicate.Resource
- func ValidColumn(column string) bool
Constants ¶
const ( // Label holds the string label denoting the resource type in the database. Label = "resource" // FieldID holds the string denoting the id field in the database. FieldID = "id" // FieldResourceName holds the string denoting the resource_name field in the database. FieldResourceName = "resource_name" // FieldResourceValue holds the string denoting the resource_value field in the database. FieldResourceValue = "resource_value" // EdgeRole holds the string denoting the role edge name in mutations. EdgeRole = "role" // EdgeUser holds the string denoting the user edge name in mutations. EdgeUser = "user" // EdgeAuthorization holds the string denoting the authorization edge name in mutations. EdgeAuthorization = "authorization" // Table holds the table name of the resource in the database. Table = "resources" // RoleTable is the table that holds the role relation/edge. The primary key declared below. RoleTable = "role_resource" // RoleInverseTable is the table name for the Role entity. // It exists in this package in order to avoid circular dependency with the "role" package. RoleInverseTable = "roles" // UserTable is the table that holds the user relation/edge. The primary key declared below. UserTable = "user_resource" // UserInverseTable is the table name for the User entity. // It exists in this package in order to avoid circular dependency with the "user" package. UserInverseTable = "users" // AuthorizationTable is the table that holds the authorization relation/edge. The primary key declared below. AuthorizationTable = "authorization_resource" // AuthorizationInverseTable is the table name for the Authorization entity. // It exists in this package in order to avoid circular dependency with the "authorization" package. AuthorizationInverseTable = "authorizations" )
Variables ¶
var ( // RolePrimaryKey and RoleColumn2 are the table columns denoting the // primary key for the role relation (M2M). RolePrimaryKey = []string{"role_id", "resource_id"} // UserPrimaryKey and UserColumn2 are the table columns denoting the // primary key for the user relation (M2M). UserPrimaryKey = []string{"user_id", "resource_id"} // AuthorizationPrimaryKey and AuthorizationColumn2 are the table columns denoting the // primary key for the authorization relation (M2M). AuthorizationPrimaryKey = []string{"authorization_id", "resource_id"} )
var ( // ResourceNameValidator is a validator for the "resource_name" field. It is called by the builders before save. ResourceNameValidator func(string) error // ResourceValueValidator is a validator for the "resource_value" field. It is called by the builders before save. ResourceValueValidator func(string) error )
var Columns = []string{ FieldID, FieldResourceName, FieldResourceValue, }
Columns holds all SQL columns for resource fields.
Functions ¶
func HasAuthorization ¶
HasAuthorization applies the HasEdge predicate on the "authorization" edge.
func HasAuthorizationWith ¶
func HasAuthorizationWith(preds ...predicate.Authorization) predicate.Resource
HasAuthorizationWith applies the HasEdge predicate on the "authorization" edge with a given conditions (other predicates).
func HasRoleWith ¶
HasRoleWith applies the HasEdge predicate on the "role" edge with a given conditions (other predicates).
func HasUserWith ¶
HasUserWith applies the HasEdge predicate on the "user" edge with a given conditions (other predicates).
func ResourceName ¶
ResourceName applies equality check predicate on the "resource_name" field. It's identical to ResourceNameEQ.
func ResourceNameContains ¶
ResourceNameContains applies the Contains predicate on the "resource_name" field.
func ResourceNameContainsFold ¶
ResourceNameContainsFold applies the ContainsFold predicate on the "resource_name" field.
func ResourceNameEQ ¶
ResourceNameEQ applies the EQ predicate on the "resource_name" field.
func ResourceNameEqualFold ¶
ResourceNameEqualFold applies the EqualFold predicate on the "resource_name" field.
func ResourceNameGT ¶
ResourceNameGT applies the GT predicate on the "resource_name" field.
func ResourceNameGTE ¶
ResourceNameGTE applies the GTE predicate on the "resource_name" field.
func ResourceNameHasPrefix ¶
ResourceNameHasPrefix applies the HasPrefix predicate on the "resource_name" field.
func ResourceNameHasSuffix ¶
ResourceNameHasSuffix applies the HasSuffix predicate on the "resource_name" field.
func ResourceNameIn ¶
ResourceNameIn applies the In predicate on the "resource_name" field.
func ResourceNameLT ¶
ResourceNameLT applies the LT predicate on the "resource_name" field.
func ResourceNameLTE ¶
ResourceNameLTE applies the LTE predicate on the "resource_name" field.
func ResourceNameNEQ ¶
ResourceNameNEQ applies the NEQ predicate on the "resource_name" field.
func ResourceNameNotIn ¶
ResourceNameNotIn applies the NotIn predicate on the "resource_name" field.
func ResourceValue ¶
ResourceValue applies equality check predicate on the "resource_value" field. It's identical to ResourceValueEQ.
func ResourceValueContains ¶
ResourceValueContains applies the Contains predicate on the "resource_value" field.
func ResourceValueContainsFold ¶
ResourceValueContainsFold applies the ContainsFold predicate on the "resource_value" field.
func ResourceValueEQ ¶
ResourceValueEQ applies the EQ predicate on the "resource_value" field.
func ResourceValueEqualFold ¶
ResourceValueEqualFold applies the EqualFold predicate on the "resource_value" field.
func ResourceValueGT ¶
ResourceValueGT applies the GT predicate on the "resource_value" field.
func ResourceValueGTE ¶
ResourceValueGTE applies the GTE predicate on the "resource_value" field.
func ResourceValueHasPrefix ¶
ResourceValueHasPrefix applies the HasPrefix predicate on the "resource_value" field.
func ResourceValueHasSuffix ¶
ResourceValueHasSuffix applies the HasSuffix predicate on the "resource_value" field.
func ResourceValueIn ¶
ResourceValueIn applies the In predicate on the "resource_value" field.
func ResourceValueLT ¶
ResourceValueLT applies the LT predicate on the "resource_value" field.
func ResourceValueLTE ¶
ResourceValueLTE applies the LTE predicate on the "resource_value" field.
func ResourceValueNEQ ¶
ResourceValueNEQ applies the NEQ predicate on the "resource_value" field.
func ResourceValueNotIn ¶
ResourceValueNotIn applies the NotIn predicate on the "resource_value" field.
func ValidColumn ¶
ValidColumn reports if the column name is valid (part of the table columns).
Types ¶
This section is empty.