permissionpolicy

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2024 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the permissionpolicy type in the database.
	Label = "permission_policy"
	// 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"
	// FieldType holds the string denoting the type field in the database.
	FieldType = "type"
	// FieldIsInherited holds the string denoting the is_inherited field in the database.
	FieldIsInherited = "is_inherited"
	// EdgePermission holds the string denoting the permission edge name in mutations.
	EdgePermission = "permission"
	// EdgeGroup holds the string denoting the group edge name in mutations.
	EdgeGroup = "group"
	// Table holds the table name of the permissionpolicy in the database.
	Table = "permission_policies"
	// PermissionTable is the table that holds the permission relation/edge.
	PermissionTable = "permission_policies"
	// PermissionInverseTable is the table name for the Permission entity.
	// It exists in this package in order to avoid circular dependency with the "permission" package.
	PermissionInverseTable = "permissions"
	// PermissionColumn is the table column denoting the permission relation/edge.
	PermissionColumn = "permission_policy_permission"
	// GroupTable is the table that holds the group relation/edge.
	GroupTable = "permission_policies"
	// 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 = "permission_policy_group"
)
View Source
const DefaultType = TypeALLOW

TypeALLOW is the default value of the Type enum.

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
	// DefaultIsInherited holds the default value on creation for the "is_inherited" field.
	DefaultIsInherited bool
	// DefaultID holds the default value on creation for the "id" field.
	DefaultID func() uuid.UUID
)

Columns holds all SQL columns for permissionpolicy fields.

View Source
var ForeignKeys = []string{
	"permission_policy_permission",
	"permission_policy_group",
}

ForeignKeys holds the SQL foreign-keys that are owned by the "permission_policies" table and are not defined as standalone fields in the schema.

Functions

func And

And groups predicates with the AND operator between them.

func CreatedAt

func CreatedAt(v time.Time) predicate.PermissionPolicy

CreatedAt applies equality check predicate on the "created_at" field. It's identical to CreatedAtEQ.

func CreatedAtEQ

func CreatedAtEQ(v time.Time) predicate.PermissionPolicy

CreatedAtEQ applies the EQ predicate on the "created_at" field.

func CreatedAtGT

func CreatedAtGT(v time.Time) predicate.PermissionPolicy

CreatedAtGT applies the GT predicate on the "created_at" field.

func CreatedAtGTE

func CreatedAtGTE(v time.Time) predicate.PermissionPolicy

CreatedAtGTE applies the GTE predicate on the "created_at" field.

func CreatedAtIn

func CreatedAtIn(vs ...time.Time) predicate.PermissionPolicy

CreatedAtIn applies the In predicate on the "created_at" field.

func CreatedAtLT

func CreatedAtLT(v time.Time) predicate.PermissionPolicy

CreatedAtLT applies the LT predicate on the "created_at" field.

func CreatedAtLTE

func CreatedAtLTE(v time.Time) predicate.PermissionPolicy

CreatedAtLTE applies the LTE predicate on the "created_at" field.

func CreatedAtNEQ

func CreatedAtNEQ(v time.Time) predicate.PermissionPolicy

CreatedAtNEQ applies the NEQ predicate on the "created_at" field.

func CreatedAtNotIn

func CreatedAtNotIn(vs ...time.Time) predicate.PermissionPolicy

CreatedAtNotIn applies the NotIn predicate on the "created_at" field.

func HasGroup

func HasGroup() predicate.PermissionPolicy

HasGroup applies the HasEdge predicate on the "group" edge.

func HasGroupWith

func HasGroupWith(preds ...predicate.Group) predicate.PermissionPolicy

HasGroupWith applies the HasEdge predicate on the "group" edge with a given conditions (other predicates).

func HasPermission

func HasPermission() predicate.PermissionPolicy

HasPermission applies the HasEdge predicate on the "permission" edge.

func HasPermissionWith

func HasPermissionWith(preds ...predicate.Permission) predicate.PermissionPolicy

HasPermissionWith applies the HasEdge predicate on the "permission" 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.PermissionPolicy

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.PermissionPolicy

IDNotIn applies the NotIn predicate on the ID field.

func IsInherited

func IsInherited(v bool) predicate.PermissionPolicy

IsInherited applies equality check predicate on the "is_inherited" field. It's identical to IsInheritedEQ.

func IsInheritedEQ

func IsInheritedEQ(v bool) predicate.PermissionPolicy

IsInheritedEQ applies the EQ predicate on the "is_inherited" field.

func IsInheritedIsNil

func IsInheritedIsNil() predicate.PermissionPolicy

IsInheritedIsNil applies the IsNil predicate on the "is_inherited" field.

func IsInheritedNEQ

func IsInheritedNEQ(v bool) predicate.PermissionPolicy

IsInheritedNEQ applies the NEQ predicate on the "is_inherited" field.

func IsInheritedNotNil

func IsInheritedNotNil() predicate.PermissionPolicy

IsInheritedNotNil applies the NotNil predicate on the "is_inherited" field.

func Not

Not applies the not operator on the given predicate.

func Or

Or groups predicates with the OR operator between them.

func TypeEQ

TypeEQ applies the EQ predicate on the "type" field.

func TypeIn

func TypeIn(vs ...Type) predicate.PermissionPolicy

TypeIn applies the In predicate on the "type" field.

func TypeIsNil

func TypeIsNil() predicate.PermissionPolicy

TypeIsNil applies the IsNil predicate on the "type" field.

func TypeNEQ

func TypeNEQ(v Type) predicate.PermissionPolicy

TypeNEQ applies the NEQ predicate on the "type" field.

func TypeNotIn

func TypeNotIn(vs ...Type) predicate.PermissionPolicy

TypeNotIn applies the NotIn predicate on the "type" field.

func TypeNotNil

func TypeNotNil() predicate.PermissionPolicy

TypeNotNil applies the NotNil predicate on the "type" field.

func TypeValidator

func TypeValidator(_type Type) error

TypeValidator is a validator for the "type" field enum values. It is called by the builders before save.

func UpdatedAt

func UpdatedAt(v time.Time) predicate.PermissionPolicy

UpdatedAt applies equality check predicate on the "updated_at" field. It's identical to UpdatedAtEQ.

func UpdatedAtEQ

func UpdatedAtEQ(v time.Time) predicate.PermissionPolicy

UpdatedAtEQ applies the EQ predicate on the "updated_at" field.

func UpdatedAtGT

func UpdatedAtGT(v time.Time) predicate.PermissionPolicy

UpdatedAtGT applies the GT predicate on the "updated_at" field.

func UpdatedAtGTE

func UpdatedAtGTE(v time.Time) predicate.PermissionPolicy

UpdatedAtGTE applies the GTE predicate on the "updated_at" field.

func UpdatedAtIn

func UpdatedAtIn(vs ...time.Time) predicate.PermissionPolicy

UpdatedAtIn applies the In predicate on the "updated_at" field.

func UpdatedAtLT

func UpdatedAtLT(v time.Time) predicate.PermissionPolicy

UpdatedAtLT applies the LT predicate on the "updated_at" field.

func UpdatedAtLTE

func UpdatedAtLTE(v time.Time) predicate.PermissionPolicy

UpdatedAtLTE applies the LTE predicate on the "updated_at" field.

func UpdatedAtNEQ

func UpdatedAtNEQ(v time.Time) predicate.PermissionPolicy

UpdatedAtNEQ applies the NEQ predicate on the "updated_at" field.

func UpdatedAtNotIn

func UpdatedAtNotIn(vs ...time.Time) predicate.PermissionPolicy

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 OrderOption

type OrderOption func(*sql.Selector)

OrderOption defines the ordering options for the PermissionPolicy queries.

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 ByIsInherited

func ByIsInherited(opts ...sql.OrderTermOption) OrderOption

ByIsInherited orders the results by the is_inherited field.

func ByPermissionField

func ByPermissionField(field string, opts ...sql.OrderTermOption) OrderOption

ByPermissionField orders the results by permission field.

func ByType

func ByType(opts ...sql.OrderTermOption) OrderOption

ByType orders the results by the type field.

func ByUpdatedAt

func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption

ByUpdatedAt orders the results by the updated_at field.

type Type

type Type string

Type defines the type for the "type" enum field.

const (
	TypeALLOW Type = "ALLOW"
	TypeDENY  Type = "DENY"
)

Type values.

func (Type) String

func (_type Type) String() string

Jump to

Keyboard shortcuts

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