grantedpermission

package
v0.0.0-...-e59a564 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 24, 2024 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
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

View Source
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
)

Columns holds all SQL columns for grantedpermission fields.

View Source
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

ActionEQ applies the EQ predicate on the "action" field.

func ActionIn

ActionIn applies the In predicate on the "action" field.

func ActionNEQ

ActionNEQ applies the NEQ predicate on the "action" field.

func ActionNotIn

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

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

ID filters vertices based on their ID field.

func IDEQ

IDEQ applies the EQ predicate on the ID field.

func IDGT

IDGT applies the GT predicate on the ID field.

func IDGTE

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

IDLT applies the LT predicate on the ID field.

func IDLTE

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

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

Not applies the not operator on the given predicate.

func ObjectID

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

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

func ValidColumn(column string) bool

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

type OrderOption func(*sql.Selector)

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL