permission

package
v0.0.0-...-04b2c92 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
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"
	// FieldCreatedBy holds the string denoting the created_by field in the database.
	FieldCreatedBy = "created_by"
	// FieldCreatedAt holds the string denoting the created_at field in the database.
	FieldCreatedAt = "created_at"
	// FieldUpdatedBy holds the string denoting the updated_by field in the database.
	FieldUpdatedBy = "updated_by"
	// FieldUpdatedAt holds the string denoting the updated_at field in the database.
	FieldUpdatedAt = "updated_at"
	// FieldOrgID holds the string denoting the org_id field in the database.
	FieldOrgID = "org_id"
	// FieldPrincipalKind holds the string denoting the principal_kind field in the database.
	FieldPrincipalKind = "principal_kind"
	// FieldUserID holds the string denoting the user_id field in the database.
	FieldUserID = "user_id"
	// FieldRoleID holds the string denoting the role_id field in the database.
	FieldRoleID = "role_id"
	// FieldOrgPolicyID holds the string denoting the org_policy_id field in the database.
	FieldOrgPolicyID = "org_policy_id"
	// FieldStartAt holds the string denoting the start_at field in the database.
	FieldStartAt = "start_at"
	// FieldEndAt holds the string denoting the end_at field in the database.
	FieldEndAt = "end_at"
	// FieldStatus holds the string denoting the status field in the database.
	FieldStatus = "status"
	// EdgeOrg holds the string denoting the org edge name in mutations.
	EdgeOrg = "org"
	// EdgeUser holds the string denoting the user edge name in mutations.
	EdgeUser = "user"
	// EdgeRole holds the string denoting the role edge name in mutations.
	EdgeRole = "role"
	// EdgeOrgPolicy holds the string denoting the org_policy edge name in mutations.
	EdgeOrgPolicy = "org_policy"
	// Table holds the table name of the permission in the database.
	Table = "permission"
	// OrgTable is the table that holds the org relation/edge.
	OrgTable = "permission"
	// OrgInverseTable is the table name for the Org entity.
	// It exists in this package in order to avoid circular dependency with the "org" package.
	OrgInverseTable = "org"
	// OrgColumn is the table column denoting the org relation/edge.
	OrgColumn = "org_id"
	// UserTable is the table that holds the user relation/edge.
	UserTable = "permission"
	// 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 = "user"
	// UserColumn is the table column denoting the user relation/edge.
	UserColumn = "user_id"
	// RoleTable is the table that holds the role relation/edge.
	RoleTable = "permission"
	// RoleInverseTable is the table name for the OrgRole entity.
	// It exists in this package in order to avoid circular dependency with the "orgrole" package.
	RoleInverseTable = "org_role"
	// RoleColumn is the table column denoting the role relation/edge.
	RoleColumn = "role_id"
	// OrgPolicyTable is the table that holds the org_policy relation/edge.
	OrgPolicyTable = "permission"
	// OrgPolicyInverseTable is the table name for the OrgPolicy entity.
	// It exists in this package in order to avoid circular dependency with the "orgpolicy" package.
	OrgPolicyInverseTable = "org_policy"
	// OrgPolicyColumn is the table column denoting the org_policy relation/edge.
	OrgPolicyColumn = "org_policy_id"
)

Variables

View Source
var (
	Hooks [2]ent.Hook
	// DefaultCreatedAt holds the default value on creation for the "created_at" field.
	DefaultCreatedAt func() time.Time
	// DefaultID holds the default value on creation for the "id" field.
	DefaultID func() int
)

Note that the variables below are initialized by the runtime package on the initialization of the application. Therefore, it should be imported in the main as follows:

import _ "github.com/woocoos/knockout/ent/runtime"

Columns holds all SQL columns for permission fields.

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 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 CreatedBy

func CreatedBy(v int) predicate.Permission

CreatedBy applies equality check predicate on the "created_by" field. It's identical to CreatedByEQ.

func CreatedByEQ

func CreatedByEQ(v int) predicate.Permission

CreatedByEQ applies the EQ predicate on the "created_by" field.

func CreatedByGT

func CreatedByGT(v int) predicate.Permission

CreatedByGT applies the GT predicate on the "created_by" field.

func CreatedByGTE

func CreatedByGTE(v int) predicate.Permission

CreatedByGTE applies the GTE predicate on the "created_by" field.

func CreatedByIn

func CreatedByIn(vs ...int) predicate.Permission

CreatedByIn applies the In predicate on the "created_by" field.

func CreatedByLT

func CreatedByLT(v int) predicate.Permission

CreatedByLT applies the LT predicate on the "created_by" field.

func CreatedByLTE

func CreatedByLTE(v int) predicate.Permission

CreatedByLTE applies the LTE predicate on the "created_by" field.

func CreatedByNEQ

func CreatedByNEQ(v int) predicate.Permission

CreatedByNEQ applies the NEQ predicate on the "created_by" field.

func CreatedByNotIn

func CreatedByNotIn(vs ...int) predicate.Permission

CreatedByNotIn applies the NotIn predicate on the "created_by" field.

func EndAt

func EndAt(v time.Time) predicate.Permission

EndAt applies equality check predicate on the "end_at" field. It's identical to EndAtEQ.

func EndAtEQ

func EndAtEQ(v time.Time) predicate.Permission

EndAtEQ applies the EQ predicate on the "end_at" field.

func EndAtGT

func EndAtGT(v time.Time) predicate.Permission

EndAtGT applies the GT predicate on the "end_at" field.

func EndAtGTE

func EndAtGTE(v time.Time) predicate.Permission

EndAtGTE applies the GTE predicate on the "end_at" field.

func EndAtIn

func EndAtIn(vs ...time.Time) predicate.Permission

EndAtIn applies the In predicate on the "end_at" field.

func EndAtIsNil

func EndAtIsNil() predicate.Permission

EndAtIsNil applies the IsNil predicate on the "end_at" field.

func EndAtLT

func EndAtLT(v time.Time) predicate.Permission

EndAtLT applies the LT predicate on the "end_at" field.

func EndAtLTE

func EndAtLTE(v time.Time) predicate.Permission

EndAtLTE applies the LTE predicate on the "end_at" field.

func EndAtNEQ

func EndAtNEQ(v time.Time) predicate.Permission

EndAtNEQ applies the NEQ predicate on the "end_at" field.

func EndAtNotIn

func EndAtNotIn(vs ...time.Time) predicate.Permission

EndAtNotIn applies the NotIn predicate on the "end_at" field.

func EndAtNotNil

func EndAtNotNil() predicate.Permission

EndAtNotNil applies the NotNil predicate on the "end_at" field.

func HasOrg

func HasOrg() predicate.Permission

HasOrg applies the HasEdge predicate on the "org" edge.

func HasOrgPolicy

func HasOrgPolicy() predicate.Permission

HasOrgPolicy applies the HasEdge predicate on the "org_policy" edge.

func HasOrgPolicyWith

func HasOrgPolicyWith(preds ...predicate.OrgPolicy) predicate.Permission

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

func HasOrgWith

func HasOrgWith(preds ...predicate.Org) predicate.Permission

HasOrgWith applies the HasEdge predicate on the "org" 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.OrgRole) predicate.Permission

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

func HasUser

func HasUser() predicate.Permission

HasUser applies the HasEdge predicate on the "user" edge.

func HasUserWith

func HasUserWith(preds ...predicate.User) predicate.Permission

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

func ID

func ID(id int) predicate.Permission

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id int) predicate.Permission

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id int) predicate.Permission

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id int) predicate.Permission

IDGTE applies the GTE predicate on the ID field.

func IDIn

func IDIn(ids ...int) predicate.Permission

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id int) predicate.Permission

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id int) predicate.Permission

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id int) predicate.Permission

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

func IDNotIn(ids ...int) predicate.Permission

IDNotIn applies the NotIn predicate on the ID field.

func Not

Not applies the not operator on the given predicate.

func Or

func Or(predicates ...predicate.Permission) predicate.Permission

Or groups predicates with the OR operator between them.

func OrgID

func OrgID(v int) predicate.Permission

OrgID applies equality check predicate on the "org_id" field. It's identical to OrgIDEQ.

func OrgIDEQ

func OrgIDEQ(v int) predicate.Permission

OrgIDEQ applies the EQ predicate on the "org_id" field.

func OrgIDIn

func OrgIDIn(vs ...int) predicate.Permission

OrgIDIn applies the In predicate on the "org_id" field.

func OrgIDNEQ

func OrgIDNEQ(v int) predicate.Permission

OrgIDNEQ applies the NEQ predicate on the "org_id" field.

func OrgIDNotIn

func OrgIDNotIn(vs ...int) predicate.Permission

OrgIDNotIn applies the NotIn predicate on the "org_id" field.

func OrgPolicyID

func OrgPolicyID(v int) predicate.Permission

OrgPolicyID applies equality check predicate on the "org_policy_id" field. It's identical to OrgPolicyIDEQ.

func OrgPolicyIDEQ

func OrgPolicyIDEQ(v int) predicate.Permission

OrgPolicyIDEQ applies the EQ predicate on the "org_policy_id" field.

func OrgPolicyIDIn

func OrgPolicyIDIn(vs ...int) predicate.Permission

OrgPolicyIDIn applies the In predicate on the "org_policy_id" field.

func OrgPolicyIDNEQ

func OrgPolicyIDNEQ(v int) predicate.Permission

OrgPolicyIDNEQ applies the NEQ predicate on the "org_policy_id" field.

func OrgPolicyIDNotIn

func OrgPolicyIDNotIn(vs ...int) predicate.Permission

OrgPolicyIDNotIn applies the NotIn predicate on the "org_policy_id" field.

func PrincipalKindEQ

func PrincipalKindEQ(v PrincipalKind) predicate.Permission

PrincipalKindEQ applies the EQ predicate on the "principal_kind" field.

func PrincipalKindIn

func PrincipalKindIn(vs ...PrincipalKind) predicate.Permission

PrincipalKindIn applies the In predicate on the "principal_kind" field.

func PrincipalKindNEQ

func PrincipalKindNEQ(v PrincipalKind) predicate.Permission

PrincipalKindNEQ applies the NEQ predicate on the "principal_kind" field.

func PrincipalKindNotIn

func PrincipalKindNotIn(vs ...PrincipalKind) predicate.Permission

PrincipalKindNotIn applies the NotIn predicate on the "principal_kind" field.

func PrincipalKindValidator

func PrincipalKindValidator(pk PrincipalKind) error

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

func RoleID

func RoleID(v int) predicate.Permission

RoleID applies equality check predicate on the "role_id" field. It's identical to RoleIDEQ.

func RoleIDEQ

func RoleIDEQ(v int) predicate.Permission

RoleIDEQ applies the EQ predicate on the "role_id" field.

func RoleIDIn

func RoleIDIn(vs ...int) predicate.Permission

RoleIDIn applies the In predicate on the "role_id" field.

func RoleIDIsNil

func RoleIDIsNil() predicate.Permission

RoleIDIsNil applies the IsNil predicate on the "role_id" field.

func RoleIDNEQ

func RoleIDNEQ(v int) predicate.Permission

RoleIDNEQ applies the NEQ predicate on the "role_id" field.

func RoleIDNotIn

func RoleIDNotIn(vs ...int) predicate.Permission

RoleIDNotIn applies the NotIn predicate on the "role_id" field.

func RoleIDNotNil

func RoleIDNotNil() predicate.Permission

RoleIDNotNil applies the NotNil predicate on the "role_id" field.

func StartAt

func StartAt(v time.Time) predicate.Permission

StartAt applies equality check predicate on the "start_at" field. It's identical to StartAtEQ.

func StartAtEQ

func StartAtEQ(v time.Time) predicate.Permission

StartAtEQ applies the EQ predicate on the "start_at" field.

func StartAtGT

func StartAtGT(v time.Time) predicate.Permission

StartAtGT applies the GT predicate on the "start_at" field.

func StartAtGTE

func StartAtGTE(v time.Time) predicate.Permission

StartAtGTE applies the GTE predicate on the "start_at" field.

func StartAtIn

func StartAtIn(vs ...time.Time) predicate.Permission

StartAtIn applies the In predicate on the "start_at" field.

func StartAtIsNil

func StartAtIsNil() predicate.Permission

StartAtIsNil applies the IsNil predicate on the "start_at" field.

func StartAtLT

func StartAtLT(v time.Time) predicate.Permission

StartAtLT applies the LT predicate on the "start_at" field.

func StartAtLTE

func StartAtLTE(v time.Time) predicate.Permission

StartAtLTE applies the LTE predicate on the "start_at" field.

func StartAtNEQ

func StartAtNEQ(v time.Time) predicate.Permission

StartAtNEQ applies the NEQ predicate on the "start_at" field.

func StartAtNotIn

func StartAtNotIn(vs ...time.Time) predicate.Permission

StartAtNotIn applies the NotIn predicate on the "start_at" field.

func StartAtNotNil

func StartAtNotNil() predicate.Permission

StartAtNotNil applies the NotNil predicate on the "start_at" field.

func StatusEQ

StatusEQ applies the EQ predicate on the "status" field.

func StatusIn

func StatusIn(vs ...typex.SimpleStatus) predicate.Permission

StatusIn applies the In predicate on the "status" field.

func StatusIsNil

func StatusIsNil() predicate.Permission

StatusIsNil applies the IsNil predicate on the "status" field.

func StatusNEQ

StatusNEQ applies the NEQ predicate on the "status" field.

func StatusNotIn

func StatusNotIn(vs ...typex.SimpleStatus) predicate.Permission

StatusNotIn applies the NotIn predicate on the "status" field.

func StatusNotNil

func StatusNotNil() predicate.Permission

StatusNotNil applies the NotNil predicate on the "status" field.

func StatusValidator

func StatusValidator(s typex.SimpleStatus) error

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

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 UpdatedBy

func UpdatedBy(v int) predicate.Permission

UpdatedBy applies equality check predicate on the "updated_by" field. It's identical to UpdatedByEQ.

func UpdatedByEQ

func UpdatedByEQ(v int) predicate.Permission

UpdatedByEQ applies the EQ predicate on the "updated_by" field.

func UpdatedByGT

func UpdatedByGT(v int) predicate.Permission

UpdatedByGT applies the GT predicate on the "updated_by" field.

func UpdatedByGTE

func UpdatedByGTE(v int) predicate.Permission

UpdatedByGTE applies the GTE predicate on the "updated_by" field.

func UpdatedByIn

func UpdatedByIn(vs ...int) predicate.Permission

UpdatedByIn applies the In predicate on the "updated_by" field.

func UpdatedByIsNil

func UpdatedByIsNil() predicate.Permission

UpdatedByIsNil applies the IsNil predicate on the "updated_by" field.

func UpdatedByLT

func UpdatedByLT(v int) predicate.Permission

UpdatedByLT applies the LT predicate on the "updated_by" field.

func UpdatedByLTE

func UpdatedByLTE(v int) predicate.Permission

UpdatedByLTE applies the LTE predicate on the "updated_by" field.

func UpdatedByNEQ

func UpdatedByNEQ(v int) predicate.Permission

UpdatedByNEQ applies the NEQ predicate on the "updated_by" field.

func UpdatedByNotIn

func UpdatedByNotIn(vs ...int) predicate.Permission

UpdatedByNotIn applies the NotIn predicate on the "updated_by" field.

func UpdatedByNotNil

func UpdatedByNotNil() predicate.Permission

UpdatedByNotNil applies the NotNil predicate on the "updated_by" field.

func UserID

func UserID(v int) predicate.Permission

UserID applies equality check predicate on the "user_id" field. It's identical to UserIDEQ.

func UserIDEQ

func UserIDEQ(v int) predicate.Permission

UserIDEQ applies the EQ predicate on the "user_id" field.

func UserIDIn

func UserIDIn(vs ...int) predicate.Permission

UserIDIn applies the In predicate on the "user_id" field.

func UserIDIsNil

func UserIDIsNil() predicate.Permission

UserIDIsNil applies the IsNil predicate on the "user_id" field.

func UserIDNEQ

func UserIDNEQ(v int) predicate.Permission

UserIDNEQ applies the NEQ predicate on the "user_id" field.

func UserIDNotIn

func UserIDNotIn(vs ...int) predicate.Permission

UserIDNotIn applies the NotIn predicate on the "user_id" field.

func UserIDNotNil

func UserIDNotNil() predicate.Permission

UserIDNotNil applies the NotNil predicate on the "user_id" 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 Permission queries.

func ByCreatedAt

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

ByCreatedAt orders the results by the created_at field.

func ByCreatedBy

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

ByCreatedBy orders the results by the created_by field.

func ByEndAt

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

ByEndAt orders the results by the end_at field.

func ByID

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

ByID orders the results by the id field.

func ByOrgField

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

ByOrgField orders the results by org field.

func ByOrgID

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

ByOrgID orders the results by the org_id field.

func ByOrgPolicyField

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

ByOrgPolicyField orders the results by org_policy field.

func ByOrgPolicyID

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

ByOrgPolicyID orders the results by the org_policy_id field.

func ByPrincipalKind

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

ByPrincipalKind orders the results by the principal_kind field.

func ByRoleField

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

ByRoleField orders the results by role field.

func ByRoleID

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

ByRoleID orders the results by the role_id field.

func ByStartAt

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

ByStartAt orders the results by the start_at field.

func ByStatus

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

ByStatus orders the results by the status field.

func ByUpdatedAt

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

ByUpdatedAt orders the results by the updated_at field.

func ByUpdatedBy

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

ByUpdatedBy orders the results by the updated_by field.

func ByUserField

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

ByUserField orders the results by user field.

func ByUserID

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

ByUserID orders the results by the user_id field.

type PrincipalKind

type PrincipalKind string

PrincipalKind defines the type for the "principal_kind" enum field.

const (
	PrincipalKindUser PrincipalKind = "user"
	PrincipalKindRole PrincipalKind = "role"
)

PrincipalKind values.

func (PrincipalKind) MarshalGQL

func (e PrincipalKind) MarshalGQL(w io.Writer)

MarshalGQL implements graphql.Marshaler interface.

func (PrincipalKind) String

func (pk PrincipalKind) String() string

func (*PrincipalKind) UnmarshalGQL

func (e *PrincipalKind) UnmarshalGQL(val interface{}) error

UnmarshalGQL implements graphql.Unmarshaler interface.

Jump to

Keyboard shortcuts

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