Documentation
¶
Index ¶
- Constants
- Variables
- func And(predicates ...predicate.Permission) predicate.Permission
- func CreatedAt(v time.Time) predicate.Permission
- func CreatedAtEQ(v time.Time) predicate.Permission
- func CreatedAtGT(v time.Time) predicate.Permission
- func CreatedAtGTE(v time.Time) predicate.Permission
- func CreatedAtIn(vs ...time.Time) predicate.Permission
- func CreatedAtIsNil() predicate.Permission
- func CreatedAtLT(v time.Time) predicate.Permission
- func CreatedAtLTE(v time.Time) predicate.Permission
- func CreatedAtNEQ(v time.Time) predicate.Permission
- func CreatedAtNotIn(vs ...time.Time) predicate.Permission
- func CreatedAtNotNil() predicate.Permission
- func Entity(v string) predicate.Permission
- func EntityContains(v string) predicate.Permission
- func EntityContainsFold(v string) predicate.Permission
- func EntityEQ(v string) predicate.Permission
- func EntityEqualFold(v string) predicate.Permission
- func EntityGT(v string) predicate.Permission
- func EntityGTE(v string) predicate.Permission
- func EntityHasPrefix(v string) predicate.Permission
- func EntityHasSuffix(v string) predicate.Permission
- func EntityIn(vs ...string) predicate.Permission
- func EntityLT(v string) predicate.Permission
- func EntityLTE(v string) predicate.Permission
- func EntityNEQ(v string) predicate.Permission
- func EntityNotIn(vs ...string) predicate.Permission
- func HasAdminCreatedBy() predicate.Permission
- func HasAdminCreatedByWith(preds ...predicate.AdminUser) predicate.Permission
- func HasAdminUpdatedBy() predicate.Permission
- func HasAdminUpdatedByWith(preds ...predicate.AdminUser) predicate.Permission
- func HasRole() predicate.Permission
- func HasRoleWith(preds ...predicate.Role) predicate.Permission
- func ID(id string) predicate.Permission
- func IDContainsFold(id string) predicate.Permission
- func IDEQ(id string) predicate.Permission
- func IDEqualFold(id string) predicate.Permission
- func IDGT(id string) predicate.Permission
- func IDGTE(id string) predicate.Permission
- func IDIn(ids ...string) predicate.Permission
- func IDLT(id string) predicate.Permission
- func IDLTE(id string) predicate.Permission
- func IDNEQ(id string) predicate.Permission
- func IDNotIn(ids ...string) predicate.Permission
- func Not(p predicate.Permission) predicate.Permission
- func Operation(v string) predicate.Permission
- func OperationContains(v string) predicate.Permission
- func OperationContainsFold(v string) predicate.Permission
- func OperationEQ(v string) predicate.Permission
- func OperationEqualFold(v string) predicate.Permission
- func OperationGT(v string) predicate.Permission
- func OperationGTE(v string) predicate.Permission
- func OperationHasPrefix(v string) predicate.Permission
- func OperationHasSuffix(v string) predicate.Permission
- func OperationIn(vs ...string) predicate.Permission
- func OperationLT(v string) predicate.Permission
- func OperationLTE(v string) predicate.Permission
- func OperationNEQ(v string) predicate.Permission
- func OperationNotIn(vs ...string) predicate.Permission
- func Or(predicates ...predicate.Permission) predicate.Permission
- func UpdatedAt(v time.Time) predicate.Permission
- func UpdatedAtEQ(v time.Time) predicate.Permission
- func UpdatedAtGT(v time.Time) predicate.Permission
- func UpdatedAtGTE(v time.Time) predicate.Permission
- func UpdatedAtIn(vs ...time.Time) predicate.Permission
- func UpdatedAtIsNil() predicate.Permission
- func UpdatedAtLT(v time.Time) predicate.Permission
- func UpdatedAtLTE(v time.Time) predicate.Permission
- func UpdatedAtNEQ(v time.Time) predicate.Permission
- func UpdatedAtNotIn(vs ...time.Time) predicate.Permission
- func UpdatedAtNotNil() predicate.Permission
- func ValidColumn(column string) bool
- type OrderOption
- func ByAdminCreatedByField(field string, opts ...sql.OrderTermOption) OrderOption
- func ByAdminUpdatedByField(field string, opts ...sql.OrderTermOption) OrderOption
- func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption
- func ByEntity(opts ...sql.OrderTermOption) OrderOption
- func ByID(opts ...sql.OrderTermOption) OrderOption
- func ByOperation(opts ...sql.OrderTermOption) OrderOption
- func ByRoleField(field string, opts ...sql.OrderTermOption) OrderOption
- func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption
Constants ¶
const ( // Label holds the string label denoting the permission type in the database. Label = "permission" // FieldID holds the string denoting the id field in the database. FieldID = "id" // 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" // FieldEntity holds the string denoting the entity field in the database. FieldEntity = "entity" // FieldOperation holds the string denoting the operation field in the database. FieldOperation = "operation" // EdgeAdminCreatedBy holds the string denoting the admin_created_by edge name in mutations. EdgeAdminCreatedBy = "admin_created_by" // EdgeAdminUpdatedBy holds the string denoting the admin_updated_by edge name in mutations. EdgeAdminUpdatedBy = "admin_updated_by" // EdgeRole holds the string denoting the role edge name in mutations. EdgeRole = "role" // Table holds the table name of the permission in the database. Table = "permissions" // AdminCreatedByTable is the table that holds the admin_created_by relation/edge. AdminCreatedByTable = "permissions" // AdminCreatedByInverseTable is the table name for the AdminUser entity. // It exists in this package in order to avoid circular dependency with the "adminuser" package. AdminCreatedByInverseTable = "admin_users" // AdminCreatedByColumn is the table column denoting the admin_created_by relation/edge. AdminCreatedByColumn = "permission_admin_created_by" // AdminUpdatedByTable is the table that holds the admin_updated_by relation/edge. AdminUpdatedByTable = "permissions" // AdminUpdatedByInverseTable is the table name for the AdminUser entity. // It exists in this package in order to avoid circular dependency with the "adminuser" package. AdminUpdatedByInverseTable = "admin_users" // AdminUpdatedByColumn is the table column denoting the admin_updated_by relation/edge. AdminUpdatedByColumn = "permission_admin_updated_by" // RoleTable is the table that holds the role relation/edge. RoleTable = "permissions" // 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" // RoleColumn is the table column denoting the role relation/edge. RoleColumn = "permission_role" )
Variables ¶
var ( // DefaultCreatedAt holds the default value on creation for the "created_at" field. DefaultCreatedAt time.Time // DefaultUpdatedAt holds the default value on creation for the "updated_at" field. DefaultUpdatedAt time.Time // UpdateDefaultUpdatedAt holds the default value on update for the "updated_at" field. UpdateDefaultUpdatedAt func() time.Time // DefaultOperation holds the default value on creation for the "operation" field. DefaultOperation string // OperationValidator is a validator for the "operation" field. It is called by the builders before save. OperationValidator func(string) error // DefaultID holds the default value on creation for the "id" field. DefaultID func() string )
var Columns = []string{ FieldID, FieldCreatedAt, FieldUpdatedAt, FieldEntity, FieldOperation, }
Columns holds all SQL columns for permission fields.
var ForeignKeys = []string{
"permission_admin_created_by",
"permission_admin_updated_by",
"permission_role",
}
ForeignKeys holds the SQL foreign-keys that are owned by the "permissions" table and are not defined as standalone fields in the schema.
Functions ¶
func And ¶
func And(predicates ...predicate.Permission) predicate.Permission
And groups predicates with the AND operator between them.
func CreatedAt ¶
func CreatedAt(v time.Time) predicate.Permission
CreatedAt applies equality check predicate on the "created_at" field. It's identical to CreatedAtEQ.
func CreatedAtEQ ¶
func CreatedAtEQ(v time.Time) predicate.Permission
CreatedAtEQ applies the EQ predicate on the "created_at" field.
func CreatedAtGT ¶
func CreatedAtGT(v time.Time) predicate.Permission
CreatedAtGT applies the GT predicate on the "created_at" field.
func CreatedAtGTE ¶
func CreatedAtGTE(v time.Time) predicate.Permission
CreatedAtGTE applies the GTE predicate on the "created_at" field.
func CreatedAtIn ¶
func CreatedAtIn(vs ...time.Time) predicate.Permission
CreatedAtIn applies the In predicate on the "created_at" field.
func CreatedAtIsNil ¶
func CreatedAtIsNil() predicate.Permission
CreatedAtIsNil applies the IsNil predicate on the "created_at" field.
func CreatedAtLT ¶
func CreatedAtLT(v time.Time) predicate.Permission
CreatedAtLT applies the LT predicate on the "created_at" field.
func CreatedAtLTE ¶
func CreatedAtLTE(v time.Time) predicate.Permission
CreatedAtLTE applies the LTE predicate on the "created_at" field.
func CreatedAtNEQ ¶
func CreatedAtNEQ(v time.Time) predicate.Permission
CreatedAtNEQ applies the NEQ predicate on the "created_at" field.
func CreatedAtNotIn ¶
func CreatedAtNotIn(vs ...time.Time) predicate.Permission
CreatedAtNotIn applies the NotIn predicate on the "created_at" field.
func CreatedAtNotNil ¶
func CreatedAtNotNil() predicate.Permission
CreatedAtNotNil applies the NotNil predicate on the "created_at" field.
func Entity ¶
func Entity(v string) predicate.Permission
Entity applies equality check predicate on the "entity" field. It's identical to EntityEQ.
func EntityContains ¶
func EntityContains(v string) predicate.Permission
EntityContains applies the Contains predicate on the "entity" field.
func EntityContainsFold ¶
func EntityContainsFold(v string) predicate.Permission
EntityContainsFold applies the ContainsFold predicate on the "entity" field.
func EntityEQ ¶
func EntityEQ(v string) predicate.Permission
EntityEQ applies the EQ predicate on the "entity" field.
func EntityEqualFold ¶
func EntityEqualFold(v string) predicate.Permission
EntityEqualFold applies the EqualFold predicate on the "entity" field.
func EntityGT ¶
func EntityGT(v string) predicate.Permission
EntityGT applies the GT predicate on the "entity" field.
func EntityGTE ¶
func EntityGTE(v string) predicate.Permission
EntityGTE applies the GTE predicate on the "entity" field.
func EntityHasPrefix ¶
func EntityHasPrefix(v string) predicate.Permission
EntityHasPrefix applies the HasPrefix predicate on the "entity" field.
func EntityHasSuffix ¶
func EntityHasSuffix(v string) predicate.Permission
EntityHasSuffix applies the HasSuffix predicate on the "entity" field.
func EntityIn ¶
func EntityIn(vs ...string) predicate.Permission
EntityIn applies the In predicate on the "entity" field.
func EntityLT ¶
func EntityLT(v string) predicate.Permission
EntityLT applies the LT predicate on the "entity" field.
func EntityLTE ¶
func EntityLTE(v string) predicate.Permission
EntityLTE applies the LTE predicate on the "entity" field.
func EntityNEQ ¶
func EntityNEQ(v string) predicate.Permission
EntityNEQ applies the NEQ predicate on the "entity" field.
func EntityNotIn ¶
func EntityNotIn(vs ...string) predicate.Permission
EntityNotIn applies the NotIn predicate on the "entity" field.
func HasAdminCreatedBy ¶
func HasAdminCreatedBy() predicate.Permission
HasAdminCreatedBy applies the HasEdge predicate on the "admin_created_by" edge.
func HasAdminCreatedByWith ¶
func HasAdminCreatedByWith(preds ...predicate.AdminUser) predicate.Permission
HasAdminCreatedByWith applies the HasEdge predicate on the "admin_created_by" edge with a given conditions (other predicates).
func HasAdminUpdatedBy ¶
func HasAdminUpdatedBy() predicate.Permission
HasAdminUpdatedBy applies the HasEdge predicate on the "admin_updated_by" edge.
func HasAdminUpdatedByWith ¶
func HasAdminUpdatedByWith(preds ...predicate.AdminUser) predicate.Permission
HasAdminUpdatedByWith applies the HasEdge predicate on the "admin_updated_by" edge with a given conditions (other predicates).
func HasRole ¶
func HasRole() predicate.Permission
HasRole applies the HasEdge predicate on the "role" edge.
func HasRoleWith ¶
func HasRoleWith(preds ...predicate.Role) predicate.Permission
HasRoleWith applies the HasEdge predicate on the "role" edge with a given conditions (other predicates).
func IDContainsFold ¶
func IDContainsFold(id string) predicate.Permission
IDContainsFold applies the ContainsFold predicate on the ID field.
func IDEQ ¶
func IDEQ(id string) predicate.Permission
IDEQ applies the EQ predicate on the ID field.
func IDEqualFold ¶
func IDEqualFold(id string) predicate.Permission
IDEqualFold applies the EqualFold predicate on the ID field.
func IDGT ¶
func IDGT(id string) predicate.Permission
IDGT applies the GT predicate on the ID field.
func IDGTE ¶
func IDGTE(id string) predicate.Permission
IDGTE applies the GTE predicate on the ID field.
func IDIn ¶
func IDIn(ids ...string) predicate.Permission
IDIn applies the In predicate on the ID field.
func IDLT ¶
func IDLT(id string) predicate.Permission
IDLT applies the LT predicate on the ID field.
func IDLTE ¶
func IDLTE(id string) predicate.Permission
IDLTE applies the LTE predicate on the ID field.
func IDNEQ ¶
func IDNEQ(id string) predicate.Permission
IDNEQ applies the NEQ predicate on the ID field.
func IDNotIn ¶
func IDNotIn(ids ...string) predicate.Permission
IDNotIn applies the NotIn predicate on the ID field.
func Not ¶
func Not(p predicate.Permission) predicate.Permission
Not applies the not operator on the given predicate.
func Operation ¶
func Operation(v string) predicate.Permission
Operation applies equality check predicate on the "operation" field. It's identical to OperationEQ.
func OperationContains ¶
func OperationContains(v string) predicate.Permission
OperationContains applies the Contains predicate on the "operation" field.
func OperationContainsFold ¶
func OperationContainsFold(v string) predicate.Permission
OperationContainsFold applies the ContainsFold predicate on the "operation" field.
func OperationEQ ¶
func OperationEQ(v string) predicate.Permission
OperationEQ applies the EQ predicate on the "operation" field.
func OperationEqualFold ¶
func OperationEqualFold(v string) predicate.Permission
OperationEqualFold applies the EqualFold predicate on the "operation" field.
func OperationGT ¶
func OperationGT(v string) predicate.Permission
OperationGT applies the GT predicate on the "operation" field.
func OperationGTE ¶
func OperationGTE(v string) predicate.Permission
OperationGTE applies the GTE predicate on the "operation" field.
func OperationHasPrefix ¶
func OperationHasPrefix(v string) predicate.Permission
OperationHasPrefix applies the HasPrefix predicate on the "operation" field.
func OperationHasSuffix ¶
func OperationHasSuffix(v string) predicate.Permission
OperationHasSuffix applies the HasSuffix predicate on the "operation" field.
func OperationIn ¶
func OperationIn(vs ...string) predicate.Permission
OperationIn applies the In predicate on the "operation" field.
func OperationLT ¶
func OperationLT(v string) predicate.Permission
OperationLT applies the LT predicate on the "operation" field.
func OperationLTE ¶
func OperationLTE(v string) predicate.Permission
OperationLTE applies the LTE predicate on the "operation" field.
func OperationNEQ ¶
func OperationNEQ(v string) predicate.Permission
OperationNEQ applies the NEQ predicate on the "operation" field.
func OperationNotIn ¶
func OperationNotIn(vs ...string) predicate.Permission
OperationNotIn applies the NotIn predicate on the "operation" field.
func Or ¶
func Or(predicates ...predicate.Permission) predicate.Permission
Or groups predicates with the OR operator between them.
func UpdatedAt ¶
func UpdatedAt(v time.Time) predicate.Permission
UpdatedAt applies equality check predicate on the "updated_at" field. It's identical to UpdatedAtEQ.
func UpdatedAtEQ ¶
func UpdatedAtEQ(v time.Time) predicate.Permission
UpdatedAtEQ applies the EQ predicate on the "updated_at" field.
func UpdatedAtGT ¶
func UpdatedAtGT(v time.Time) predicate.Permission
UpdatedAtGT applies the GT predicate on the "updated_at" field.
func UpdatedAtGTE ¶
func UpdatedAtGTE(v time.Time) predicate.Permission
UpdatedAtGTE applies the GTE predicate on the "updated_at" field.
func UpdatedAtIn ¶
func UpdatedAtIn(vs ...time.Time) predicate.Permission
UpdatedAtIn applies the In predicate on the "updated_at" field.
func UpdatedAtIsNil ¶
func UpdatedAtIsNil() predicate.Permission
UpdatedAtIsNil applies the IsNil predicate on the "updated_at" field.
func UpdatedAtLT ¶
func UpdatedAtLT(v time.Time) predicate.Permission
UpdatedAtLT applies the LT predicate on the "updated_at" field.
func UpdatedAtLTE ¶
func UpdatedAtLTE(v time.Time) predicate.Permission
UpdatedAtLTE applies the LTE predicate on the "updated_at" field.
func UpdatedAtNEQ ¶
func UpdatedAtNEQ(v time.Time) predicate.Permission
UpdatedAtNEQ applies the NEQ predicate on the "updated_at" field.
func UpdatedAtNotIn ¶
func UpdatedAtNotIn(vs ...time.Time) predicate.Permission
UpdatedAtNotIn applies the NotIn predicate on the "updated_at" field.
func UpdatedAtNotNil ¶
func UpdatedAtNotNil() predicate.Permission
UpdatedAtNotNil applies the NotNil predicate on the "updated_at" field.
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 Permission queries.
func ByAdminCreatedByField ¶
func ByAdminCreatedByField(field string, opts ...sql.OrderTermOption) OrderOption
ByAdminCreatedByField orders the results by admin_created_by field.
func ByAdminUpdatedByField ¶
func ByAdminUpdatedByField(field string, opts ...sql.OrderTermOption) OrderOption
ByAdminUpdatedByField orders the results by admin_updated_by field.
func ByCreatedAt ¶
func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption
ByCreatedAt orders the results by the created_at field.
func ByEntity ¶
func ByEntity(opts ...sql.OrderTermOption) OrderOption
ByEntity orders the results by the entity field.
func ByID ¶
func ByID(opts ...sql.OrderTermOption) OrderOption
ByID orders the results by the id field.
func ByOperation ¶
func ByOperation(opts ...sql.OrderTermOption) OrderOption
ByOperation orders the results by the operation field.
func ByRoleField ¶
func ByRoleField(field string, opts ...sql.OrderTermOption) OrderOption
ByRoleField orders the results by role field.
func ByUpdatedAt ¶
func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption
ByUpdatedAt orders the results by the updated_at field.