Documentation ¶
Index ¶
- Constants
- Variables
- func ActionEQ(v actions.PermissionAction) predicate.GrantedPermission
- func ActionIn(vs ...actions.PermissionAction) predicate.GrantedPermission
- func ActionNEQ(v actions.PermissionAction) predicate.GrantedPermission
- func ActionNotIn(vs ...actions.PermissionAction) predicate.GrantedPermission
- func ActionValidator(a actions.PermissionAction) error
- func And(predicates ...predicate.GrantedPermission) predicate.GrantedPermission
- func CreatedAt(v time.Time) predicate.GrantedPermission
- func CreatedAtEQ(v time.Time) predicate.GrantedPermission
- func CreatedAtGT(v time.Time) predicate.GrantedPermission
- func CreatedAtGTE(v time.Time) predicate.GrantedPermission
- func CreatedAtIn(vs ...time.Time) predicate.GrantedPermission
- func CreatedAtLT(v time.Time) predicate.GrantedPermission
- func CreatedAtLTE(v time.Time) predicate.GrantedPermission
- func CreatedAtNEQ(v time.Time) predicate.GrantedPermission
- func CreatedAtNotIn(vs ...time.Time) predicate.GrantedPermission
- func HasGroup() predicate.GrantedPermission
- func HasGroupWith(preds ...predicate.Group) predicate.GrantedPermission
- func HasUser() predicate.GrantedPermission
- func HasUserWith(preds ...predicate.User) predicate.GrantedPermission
- func ID(id uuid.UUID) predicate.GrantedPermission
- func IDEQ(id uuid.UUID) predicate.GrantedPermission
- func IDGT(id uuid.UUID) predicate.GrantedPermission
- func IDGTE(id uuid.UUID) predicate.GrantedPermission
- func IDIn(ids ...uuid.UUID) predicate.GrantedPermission
- func IDLT(id uuid.UUID) predicate.GrantedPermission
- func IDLTE(id uuid.UUID) predicate.GrantedPermission
- func IDNEQ(id uuid.UUID) predicate.GrantedPermission
- func IDNotIn(ids ...uuid.UUID) predicate.GrantedPermission
- func Not(p predicate.GrantedPermission) predicate.GrantedPermission
- func ObjectID(v uuid.UUID) predicate.GrantedPermission
- func ObjectIDEQ(v uuid.UUID) predicate.GrantedPermission
- func ObjectIDGT(v uuid.UUID) predicate.GrantedPermission
- func ObjectIDGTE(v uuid.UUID) predicate.GrantedPermission
- func ObjectIDIn(vs ...uuid.UUID) predicate.GrantedPermission
- func ObjectIDLT(v uuid.UUID) predicate.GrantedPermission
- func ObjectIDLTE(v uuid.UUID) predicate.GrantedPermission
- func ObjectIDNEQ(v uuid.UUID) predicate.GrantedPermission
- func ObjectIDNotIn(vs ...uuid.UUID) predicate.GrantedPermission
- func ObjectTypeEQ(v ObjectType) predicate.GrantedPermission
- func ObjectTypeIn(vs ...ObjectType) predicate.GrantedPermission
- func ObjectTypeNEQ(v ObjectType) predicate.GrantedPermission
- func ObjectTypeNotIn(vs ...ObjectType) predicate.GrantedPermission
- func ObjectTypeValidator(ot ObjectType) error
- func Or(predicates ...predicate.GrantedPermission) predicate.GrantedPermission
- func SubjectID(v uuid.UUID) predicate.GrantedPermission
- func SubjectIDEQ(v uuid.UUID) predicate.GrantedPermission
- func SubjectIDGT(v uuid.UUID) predicate.GrantedPermission
- func SubjectIDGTE(v uuid.UUID) predicate.GrantedPermission
- func SubjectIDIn(vs ...uuid.UUID) predicate.GrantedPermission
- func SubjectIDLT(v uuid.UUID) predicate.GrantedPermission
- func SubjectIDLTE(v uuid.UUID) predicate.GrantedPermission
- func SubjectIDNEQ(v uuid.UUID) predicate.GrantedPermission
- func SubjectIDNotIn(vs ...uuid.UUID) predicate.GrantedPermission
- func SubjectTypeEQ(v SubjectType) predicate.GrantedPermission
- func SubjectTypeIn(vs ...SubjectType) predicate.GrantedPermission
- func SubjectTypeNEQ(v SubjectType) predicate.GrantedPermission
- func SubjectTypeNotIn(vs ...SubjectType) predicate.GrantedPermission
- func SubjectTypeValidator(st SubjectType) error
- func UpdatedAt(v time.Time) predicate.GrantedPermission
- func UpdatedAtEQ(v time.Time) predicate.GrantedPermission
- func UpdatedAtGT(v time.Time) predicate.GrantedPermission
- func UpdatedAtGTE(v time.Time) predicate.GrantedPermission
- func UpdatedAtIn(vs ...time.Time) predicate.GrantedPermission
- func UpdatedAtLT(v time.Time) predicate.GrantedPermission
- func UpdatedAtLTE(v time.Time) predicate.GrantedPermission
- func UpdatedAtNEQ(v time.Time) predicate.GrantedPermission
- func UpdatedAtNotIn(vs ...time.Time) predicate.GrantedPermission
- func ValidColumn(column string) bool
- type ObjectType
- type OrderOption
- func ByAction(opts ...sql.OrderTermOption) OrderOption
- func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption
- func ByGroupField(field string, opts ...sql.OrderTermOption) OrderOption
- func ByID(opts ...sql.OrderTermOption) OrderOption
- func ByObjectID(opts ...sql.OrderTermOption) OrderOption
- func ByObjectType(opts ...sql.OrderTermOption) OrderOption
- func BySubjectID(opts ...sql.OrderTermOption) OrderOption
- func BySubjectType(opts ...sql.OrderTermOption) OrderOption
- func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption
- func ByUserField(field string, opts ...sql.OrderTermOption) OrderOption
- type SubjectType
Constants ¶
const ( // Label holds the string label denoting the grantedpermission type in the database. Label = "granted_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" // FieldSubjectType holds the string denoting the subject_type field in the database. FieldSubjectType = "subject_type" // FieldSubjectID holds the string denoting the subject_id field in the database. FieldSubjectID = "subject_id" // FieldObjectType holds the string denoting the object_type field in the database. FieldObjectType = "object_type" // FieldObjectID holds the string denoting the object_id field in the database. FieldObjectID = "object_id" // FieldAction holds the string denoting the action field in the database. FieldAction = "action" // EdgeUser holds the string denoting the user edge name in mutations. EdgeUser = "user" // EdgeGroup holds the string denoting the group edge name in mutations. EdgeGroup = "group" // Table holds the table name of the grantedpermission in the database. Table = "granted_permissions" // UserTable is the table that holds the user relation/edge. UserTable = "granted_permissions" // 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" // UserColumn is the table column denoting the user relation/edge. UserColumn = "granted_permission_user" // GroupTable is the table that holds the group relation/edge. GroupTable = "granted_permissions" // GroupInverseTable is the table name for the Group entity. // It exists in this package in order to avoid circular dependency with the "group" package. GroupInverseTable = "groups" // GroupColumn is the table column denoting the group relation/edge. GroupColumn = "granted_permission_group" )
Variables ¶
var ( // 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, FieldCreatedAt, FieldUpdatedAt, FieldSubjectType, FieldSubjectID, FieldObjectType, FieldObjectID, FieldAction, }
Columns holds all SQL columns for grantedpermission fields.
var ForeignKeys = []string{
"granted_permission_user",
"granted_permission_group",
}
ForeignKeys holds the SQL foreign-keys that are owned by the "granted_permissions" table and are not defined as standalone fields in the schema.
Functions ¶
func ActionEQ ¶
func ActionEQ(v actions.PermissionAction) predicate.GrantedPermission
ActionEQ applies the EQ predicate on the "action" field.
func ActionIn ¶
func ActionIn(vs ...actions.PermissionAction) predicate.GrantedPermission
ActionIn applies the In predicate on the "action" field.
func ActionNEQ ¶
func ActionNEQ(v actions.PermissionAction) predicate.GrantedPermission
ActionNEQ applies the NEQ predicate on the "action" field.
func ActionNotIn ¶
func ActionNotIn(vs ...actions.PermissionAction) predicate.GrantedPermission
ActionNotIn applies the NotIn predicate on the "action" field.
func ActionValidator ¶
func ActionValidator(a actions.PermissionAction) error
ActionValidator is a validator for the "action" field enum values. It is called by the builders before save.
func And ¶
func And(predicates ...predicate.GrantedPermission) predicate.GrantedPermission
And groups predicates with the AND operator between them.
func CreatedAt ¶
func CreatedAt(v time.Time) predicate.GrantedPermission
CreatedAt applies equality check predicate on the "created_at" field. It's identical to CreatedAtEQ.
func CreatedAtEQ ¶
func CreatedAtEQ(v time.Time) predicate.GrantedPermission
CreatedAtEQ applies the EQ predicate on the "created_at" field.
func CreatedAtGT ¶
func CreatedAtGT(v time.Time) predicate.GrantedPermission
CreatedAtGT applies the GT predicate on the "created_at" field.
func CreatedAtGTE ¶
func CreatedAtGTE(v time.Time) predicate.GrantedPermission
CreatedAtGTE applies the GTE predicate on the "created_at" field.
func CreatedAtIn ¶
func CreatedAtIn(vs ...time.Time) predicate.GrantedPermission
CreatedAtIn applies the In predicate on the "created_at" field.
func CreatedAtLT ¶
func CreatedAtLT(v time.Time) predicate.GrantedPermission
CreatedAtLT applies the LT predicate on the "created_at" field.
func CreatedAtLTE ¶
func CreatedAtLTE(v time.Time) predicate.GrantedPermission
CreatedAtLTE applies the LTE predicate on the "created_at" field.
func CreatedAtNEQ ¶
func CreatedAtNEQ(v time.Time) predicate.GrantedPermission
CreatedAtNEQ applies the NEQ predicate on the "created_at" field.
func CreatedAtNotIn ¶
func CreatedAtNotIn(vs ...time.Time) predicate.GrantedPermission
CreatedAtNotIn applies the NotIn predicate on the "created_at" field.
func HasGroup ¶
func HasGroup() predicate.GrantedPermission
HasGroup applies the HasEdge predicate on the "group" edge.
func HasGroupWith ¶
func HasGroupWith(preds ...predicate.Group) predicate.GrantedPermission
HasGroupWith applies the HasEdge predicate on the "group" edge with a given conditions (other predicates).
func HasUser ¶
func HasUser() predicate.GrantedPermission
HasUser applies the HasEdge predicate on the "user" edge.
func HasUserWith ¶
func HasUserWith(preds ...predicate.User) predicate.GrantedPermission
HasUserWith applies the HasEdge predicate on the "user" edge with a given conditions (other predicates).
func ID ¶
func ID(id uuid.UUID) predicate.GrantedPermission
ID filters vertices based on their ID field.
func IDEQ ¶
func IDEQ(id uuid.UUID) predicate.GrantedPermission
IDEQ applies the EQ predicate on the ID field.
func IDGT ¶
func IDGT(id uuid.UUID) predicate.GrantedPermission
IDGT applies the GT predicate on the ID field.
func IDGTE ¶
func IDGTE(id uuid.UUID) predicate.GrantedPermission
IDGTE applies the GTE predicate on the ID field.
func IDIn ¶
func IDIn(ids ...uuid.UUID) predicate.GrantedPermission
IDIn applies the In predicate on the ID field.
func IDLT ¶
func IDLT(id uuid.UUID) predicate.GrantedPermission
IDLT applies the LT predicate on the ID field.
func IDLTE ¶
func IDLTE(id uuid.UUID) predicate.GrantedPermission
IDLTE applies the LTE predicate on the ID field.
func IDNEQ ¶
func IDNEQ(id uuid.UUID) predicate.GrantedPermission
IDNEQ applies the NEQ predicate on the ID field.
func IDNotIn ¶
func IDNotIn(ids ...uuid.UUID) predicate.GrantedPermission
IDNotIn applies the NotIn predicate on the ID field.
func Not ¶
func Not(p predicate.GrantedPermission) predicate.GrantedPermission
Not applies the not operator on the given predicate.
func ObjectID ¶
func ObjectID(v uuid.UUID) predicate.GrantedPermission
ObjectID applies equality check predicate on the "object_id" field. It's identical to ObjectIDEQ.
func ObjectIDEQ ¶
func ObjectIDEQ(v uuid.UUID) predicate.GrantedPermission
ObjectIDEQ applies the EQ predicate on the "object_id" field.
func ObjectIDGT ¶
func ObjectIDGT(v uuid.UUID) predicate.GrantedPermission
ObjectIDGT applies the GT predicate on the "object_id" field.
func ObjectIDGTE ¶
func ObjectIDGTE(v uuid.UUID) predicate.GrantedPermission
ObjectIDGTE applies the GTE predicate on the "object_id" field.
func ObjectIDIn ¶
func ObjectIDIn(vs ...uuid.UUID) predicate.GrantedPermission
ObjectIDIn applies the In predicate on the "object_id" field.
func ObjectIDLT ¶
func ObjectIDLT(v uuid.UUID) predicate.GrantedPermission
ObjectIDLT applies the LT predicate on the "object_id" field.
func ObjectIDLTE ¶
func ObjectIDLTE(v uuid.UUID) predicate.GrantedPermission
ObjectIDLTE applies the LTE predicate on the "object_id" field.
func ObjectIDNEQ ¶
func ObjectIDNEQ(v uuid.UUID) predicate.GrantedPermission
ObjectIDNEQ applies the NEQ predicate on the "object_id" field.
func ObjectIDNotIn ¶
func ObjectIDNotIn(vs ...uuid.UUID) predicate.GrantedPermission
ObjectIDNotIn applies the NotIn predicate on the "object_id" field.
func ObjectTypeEQ ¶
func ObjectTypeEQ(v ObjectType) predicate.GrantedPermission
ObjectTypeEQ applies the EQ predicate on the "object_type" field.
func ObjectTypeIn ¶
func ObjectTypeIn(vs ...ObjectType) predicate.GrantedPermission
ObjectTypeIn applies the In predicate on the "object_type" field.
func ObjectTypeNEQ ¶
func ObjectTypeNEQ(v ObjectType) predicate.GrantedPermission
ObjectTypeNEQ applies the NEQ predicate on the "object_type" field.
func ObjectTypeNotIn ¶
func ObjectTypeNotIn(vs ...ObjectType) predicate.GrantedPermission
ObjectTypeNotIn applies the NotIn predicate on the "object_type" field.
func ObjectTypeValidator ¶
func ObjectTypeValidator(ot ObjectType) error
ObjectTypeValidator is a validator for the "object_type" field enum values. It is called by the builders before save.
func Or ¶
func Or(predicates ...predicate.GrantedPermission) predicate.GrantedPermission
Or groups predicates with the OR operator between them.
func SubjectID ¶
func SubjectID(v uuid.UUID) predicate.GrantedPermission
SubjectID applies equality check predicate on the "subject_id" field. It's identical to SubjectIDEQ.
func SubjectIDEQ ¶
func SubjectIDEQ(v uuid.UUID) predicate.GrantedPermission
SubjectIDEQ applies the EQ predicate on the "subject_id" field.
func SubjectIDGT ¶
func SubjectIDGT(v uuid.UUID) predicate.GrantedPermission
SubjectIDGT applies the GT predicate on the "subject_id" field.
func SubjectIDGTE ¶
func SubjectIDGTE(v uuid.UUID) predicate.GrantedPermission
SubjectIDGTE applies the GTE predicate on the "subject_id" field.
func SubjectIDIn ¶
func SubjectIDIn(vs ...uuid.UUID) predicate.GrantedPermission
SubjectIDIn applies the In predicate on the "subject_id" field.
func SubjectIDLT ¶
func SubjectIDLT(v uuid.UUID) predicate.GrantedPermission
SubjectIDLT applies the LT predicate on the "subject_id" field.
func SubjectIDLTE ¶
func SubjectIDLTE(v uuid.UUID) predicate.GrantedPermission
SubjectIDLTE applies the LTE predicate on the "subject_id" field.
func SubjectIDNEQ ¶
func SubjectIDNEQ(v uuid.UUID) predicate.GrantedPermission
SubjectIDNEQ applies the NEQ predicate on the "subject_id" field.
func SubjectIDNotIn ¶
func SubjectIDNotIn(vs ...uuid.UUID) predicate.GrantedPermission
SubjectIDNotIn applies the NotIn predicate on the "subject_id" field.
func SubjectTypeEQ ¶
func SubjectTypeEQ(v SubjectType) predicate.GrantedPermission
SubjectTypeEQ applies the EQ predicate on the "subject_type" field.
func SubjectTypeIn ¶
func SubjectTypeIn(vs ...SubjectType) predicate.GrantedPermission
SubjectTypeIn applies the In predicate on the "subject_type" field.
func SubjectTypeNEQ ¶
func SubjectTypeNEQ(v SubjectType) predicate.GrantedPermission
SubjectTypeNEQ applies the NEQ predicate on the "subject_type" field.
func SubjectTypeNotIn ¶
func SubjectTypeNotIn(vs ...SubjectType) predicate.GrantedPermission
SubjectTypeNotIn applies the NotIn predicate on the "subject_type" field.
func SubjectTypeValidator ¶
func SubjectTypeValidator(st SubjectType) error
SubjectTypeValidator is a validator for the "subject_type" field enum values. It is called by the builders before save.
func UpdatedAt ¶
func UpdatedAt(v time.Time) predicate.GrantedPermission
UpdatedAt applies equality check predicate on the "updated_at" field. It's identical to UpdatedAtEQ.
func UpdatedAtEQ ¶
func UpdatedAtEQ(v time.Time) predicate.GrantedPermission
UpdatedAtEQ applies the EQ predicate on the "updated_at" field.
func UpdatedAtGT ¶
func UpdatedAtGT(v time.Time) predicate.GrantedPermission
UpdatedAtGT applies the GT predicate on the "updated_at" field.
func UpdatedAtGTE ¶
func UpdatedAtGTE(v time.Time) predicate.GrantedPermission
UpdatedAtGTE applies the GTE predicate on the "updated_at" field.
func UpdatedAtIn ¶
func UpdatedAtIn(vs ...time.Time) predicate.GrantedPermission
UpdatedAtIn applies the In predicate on the "updated_at" field.
func UpdatedAtLT ¶
func UpdatedAtLT(v time.Time) predicate.GrantedPermission
UpdatedAtLT applies the LT predicate on the "updated_at" field.
func UpdatedAtLTE ¶
func UpdatedAtLTE(v time.Time) predicate.GrantedPermission
UpdatedAtLTE applies the LTE predicate on the "updated_at" field.
func UpdatedAtNEQ ¶
func UpdatedAtNEQ(v time.Time) predicate.GrantedPermission
UpdatedAtNEQ applies the NEQ predicate on the "updated_at" field.
func UpdatedAtNotIn ¶
func UpdatedAtNotIn(vs ...time.Time) predicate.GrantedPermission
UpdatedAtNotIn applies the NotIn predicate on the "updated_at" field.
func ValidColumn ¶
ValidColumn reports if the column name is valid (part of the table columns).
Types ¶
type ObjectType ¶
type ObjectType string
ObjectType defines the type for the "object_type" enum field.
const ( ObjectTypeBlueprint ObjectType = "blueprint" ObjectTypeDeployment ObjectType = "deployment" ObjectTypeGroup ObjectType = "group" ObjectTypePermission ObjectType = "permission" ObjectTypeProject ObjectType = "project" ObjectTypeProvider ObjectType = "provider" ObjectTypeUser ObjectType = "user" )
ObjectType values.
func (ObjectType) String ¶
func (ot ObjectType) String() string
type OrderOption ¶
OrderOption defines the ordering options for the GrantedPermission queries.
func ByAction ¶
func ByAction(opts ...sql.OrderTermOption) OrderOption
ByAction orders the results by the action field.
func ByCreatedAt ¶
func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption
ByCreatedAt orders the results by the created_at field.
func ByGroupField ¶
func ByGroupField(field string, opts ...sql.OrderTermOption) OrderOption
ByGroupField orders the results by group field.
func ByID ¶
func ByID(opts ...sql.OrderTermOption) OrderOption
ByID orders the results by the id field.
func ByObjectID ¶
func ByObjectID(opts ...sql.OrderTermOption) OrderOption
ByObjectID orders the results by the object_id field.
func ByObjectType ¶
func ByObjectType(opts ...sql.OrderTermOption) OrderOption
ByObjectType orders the results by the object_type field.
func BySubjectID ¶
func BySubjectID(opts ...sql.OrderTermOption) OrderOption
BySubjectID orders the results by the subject_id field.
func BySubjectType ¶
func BySubjectType(opts ...sql.OrderTermOption) OrderOption
BySubjectType orders the results by the subject_type field.
func ByUpdatedAt ¶
func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption
ByUpdatedAt orders the results by the updated_at field.
func ByUserField ¶
func ByUserField(field string, opts ...sql.OrderTermOption) OrderOption
ByUserField orders the results by user field.
type SubjectType ¶
type SubjectType string
SubjectType defines the type for the "subject_type" enum field.
const ( SubjectTypeUser SubjectType = "user" SubjectTypeGroup SubjectType = "group" )
SubjectType values.
func (SubjectType) String ¶
func (st SubjectType) String() string