role

package
v0.4.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the role type in the database.
	Label = "role"
	// FieldID holds the string denoting the id field in the database.
	FieldID = "id"
	// FieldCreateTime holds the string denoting the create_time field in the database.
	FieldCreateTime = "create_time"
	// FieldUpdateTime holds the string denoting the update_time field in the database.
	FieldUpdateTime = "update_time"
	// FieldKind holds the string denoting the kind field in the database.
	FieldKind = "kind"
	// FieldDescription holds the string denoting the description field in the database.
	FieldDescription = "description"
	// FieldPolicies holds the string denoting the policies field in the database.
	FieldPolicies = "policies"
	// FieldApplicableEnvironmentTypes holds the string denoting the applicable_environment_types field in the database.
	FieldApplicableEnvironmentTypes = "applicable_environment_types"
	// FieldSession holds the string denoting the session field in the database.
	FieldSession = "session"
	// FieldBuiltin holds the string denoting the builtin field in the database.
	FieldBuiltin = "builtin"
	// EdgeSubjects holds the string denoting the subjects edge name in mutations.
	EdgeSubjects = "subjects"
	// Table holds the table name of the role in the database.
	Table = "roles"
	// SubjectsTable is the table that holds the subjects relation/edge.
	SubjectsTable = "subject_role_relationships"
	// SubjectsInverseTable is the table name for the SubjectRoleRelationship entity.
	// It exists in this package in order to avoid circular dependency with the "subjectrolerelationship" package.
	SubjectsInverseTable = "subject_role_relationships"
	// SubjectsColumn is the table column denoting the subjects relation/edge.
	SubjectsColumn = "role_id"
)

Variables

View Source
var (
	Hooks [1]ent.Hook
	// DefaultCreateTime holds the default value on creation for the "create_time" field.
	DefaultCreateTime func() time.Time
	// DefaultUpdateTime holds the default value on creation for the "update_time" field.
	DefaultUpdateTime func() time.Time
	// UpdateDefaultUpdateTime holds the default value on update for the "update_time" field.
	UpdateDefaultUpdateTime func() time.Time
	// DefaultKind holds the default value on creation for the "kind" field.
	DefaultKind string
	// DefaultPolicies holds the default value on creation for the "policies" field.
	DefaultPolicies types.RolePolicies
	// DefaultApplicableEnvironmentTypes holds the default value on creation for the "applicable_environment_types" field.
	DefaultApplicableEnvironmentTypes []string
	// DefaultSession holds the default value on creation for the "session" field.
	DefaultSession bool
	// DefaultBuiltin holds the default value on creation for the "builtin" field.
	DefaultBuiltin bool
	// IDValidator is a validator for the "id" field. It is called by the builders before save.
	IDValidator func(string) error
)

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/seal-io/walrus/pkg/dao/model/runtime"

Columns holds all SQL columns for role fields.

Functions

func And

func And(predicates ...predicate.Role) predicate.Role

And groups predicates with the AND operator between them.

func ApplicableEnvironmentTypesIsNil added in v0.4.0

func ApplicableEnvironmentTypesIsNil() predicate.Role

ApplicableEnvironmentTypesIsNil applies the IsNil predicate on the "applicable_environment_types" field.

func ApplicableEnvironmentTypesNotNil added in v0.4.0

func ApplicableEnvironmentTypesNotNil() predicate.Role

ApplicableEnvironmentTypesNotNil applies the NotNil predicate on the "applicable_environment_types" field.

func Builtin

func Builtin(v bool) predicate.Role

Builtin applies equality check predicate on the "builtin" field. It's identical to BuiltinEQ.

func BuiltinEQ

func BuiltinEQ(v bool) predicate.Role

BuiltinEQ applies the EQ predicate on the "builtin" field.

func BuiltinNEQ

func BuiltinNEQ(v bool) predicate.Role

BuiltinNEQ applies the NEQ predicate on the "builtin" field.

func CreateTime

func CreateTime(v time.Time) predicate.Role

CreateTime applies equality check predicate on the "create_time" field. It's identical to CreateTimeEQ.

func CreateTimeEQ

func CreateTimeEQ(v time.Time) predicate.Role

CreateTimeEQ applies the EQ predicate on the "create_time" field.

func CreateTimeGT

func CreateTimeGT(v time.Time) predicate.Role

CreateTimeGT applies the GT predicate on the "create_time" field.

func CreateTimeGTE

func CreateTimeGTE(v time.Time) predicate.Role

CreateTimeGTE applies the GTE predicate on the "create_time" field.

func CreateTimeIn

func CreateTimeIn(vs ...time.Time) predicate.Role

CreateTimeIn applies the In predicate on the "create_time" field.

func CreateTimeLT

func CreateTimeLT(v time.Time) predicate.Role

CreateTimeLT applies the LT predicate on the "create_time" field.

func CreateTimeLTE

func CreateTimeLTE(v time.Time) predicate.Role

CreateTimeLTE applies the LTE predicate on the "create_time" field.

func CreateTimeNEQ

func CreateTimeNEQ(v time.Time) predicate.Role

CreateTimeNEQ applies the NEQ predicate on the "create_time" field.

func CreateTimeNotIn

func CreateTimeNotIn(vs ...time.Time) predicate.Role

CreateTimeNotIn applies the NotIn predicate on the "create_time" field.

func Description

func Description(v string) predicate.Role

Description applies equality check predicate on the "description" field. It's identical to DescriptionEQ.

func DescriptionContains

func DescriptionContains(v string) predicate.Role

DescriptionContains applies the Contains predicate on the "description" field.

func DescriptionContainsFold

func DescriptionContainsFold(v string) predicate.Role

DescriptionContainsFold applies the ContainsFold predicate on the "description" field.

func DescriptionEQ

func DescriptionEQ(v string) predicate.Role

DescriptionEQ applies the EQ predicate on the "description" field.

func DescriptionEqualFold

func DescriptionEqualFold(v string) predicate.Role

DescriptionEqualFold applies the EqualFold predicate on the "description" field.

func DescriptionGT

func DescriptionGT(v string) predicate.Role

DescriptionGT applies the GT predicate on the "description" field.

func DescriptionGTE

func DescriptionGTE(v string) predicate.Role

DescriptionGTE applies the GTE predicate on the "description" field.

func DescriptionHasPrefix

func DescriptionHasPrefix(v string) predicate.Role

DescriptionHasPrefix applies the HasPrefix predicate on the "description" field.

func DescriptionHasSuffix

func DescriptionHasSuffix(v string) predicate.Role

DescriptionHasSuffix applies the HasSuffix predicate on the "description" field.

func DescriptionIn

func DescriptionIn(vs ...string) predicate.Role

DescriptionIn applies the In predicate on the "description" field.

func DescriptionIsNil

func DescriptionIsNil() predicate.Role

DescriptionIsNil applies the IsNil predicate on the "description" field.

func DescriptionLT

func DescriptionLT(v string) predicate.Role

DescriptionLT applies the LT predicate on the "description" field.

func DescriptionLTE

func DescriptionLTE(v string) predicate.Role

DescriptionLTE applies the LTE predicate on the "description" field.

func DescriptionNEQ

func DescriptionNEQ(v string) predicate.Role

DescriptionNEQ applies the NEQ predicate on the "description" field.

func DescriptionNotIn

func DescriptionNotIn(vs ...string) predicate.Role

DescriptionNotIn applies the NotIn predicate on the "description" field.

func DescriptionNotNil

func DescriptionNotNil() predicate.Role

DescriptionNotNil applies the NotNil predicate on the "description" field.

func HasSubjects

func HasSubjects() predicate.Role

HasSubjects applies the HasEdge predicate on the "subjects" edge.

func HasSubjectsWith

func HasSubjectsWith(preds ...predicate.SubjectRoleRelationship) predicate.Role

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

func ID

func ID(id string) predicate.Role

ID filters vertices based on their ID field.

func IDContainsFold

func IDContainsFold(id string) predicate.Role

IDContainsFold applies the ContainsFold predicate on the ID field.

func IDEQ

func IDEQ(id string) predicate.Role

IDEQ applies the EQ predicate on the ID field.

func IDEqualFold

func IDEqualFold(id string) predicate.Role

IDEqualFold applies the EqualFold predicate on the ID field.

func IDGT

func IDGT(id string) predicate.Role

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id string) predicate.Role

IDGTE applies the GTE predicate on the ID field.

func IDIn

func IDIn(ids ...string) predicate.Role

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id string) predicate.Role

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id string) predicate.Role

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id string) predicate.Role

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

func IDNotIn(ids ...string) predicate.Role

IDNotIn applies the NotIn predicate on the ID field.

func Kind

func Kind(v string) predicate.Role

Kind applies equality check predicate on the "kind" field. It's identical to KindEQ.

func KindContains

func KindContains(v string) predicate.Role

KindContains applies the Contains predicate on the "kind" field.

func KindContainsFold

func KindContainsFold(v string) predicate.Role

KindContainsFold applies the ContainsFold predicate on the "kind" field.

func KindEQ

func KindEQ(v string) predicate.Role

KindEQ applies the EQ predicate on the "kind" field.

func KindEqualFold

func KindEqualFold(v string) predicate.Role

KindEqualFold applies the EqualFold predicate on the "kind" field.

func KindGT

func KindGT(v string) predicate.Role

KindGT applies the GT predicate on the "kind" field.

func KindGTE

func KindGTE(v string) predicate.Role

KindGTE applies the GTE predicate on the "kind" field.

func KindHasPrefix

func KindHasPrefix(v string) predicate.Role

KindHasPrefix applies the HasPrefix predicate on the "kind" field.

func KindHasSuffix

func KindHasSuffix(v string) predicate.Role

KindHasSuffix applies the HasSuffix predicate on the "kind" field.

func KindIn

func KindIn(vs ...string) predicate.Role

KindIn applies the In predicate on the "kind" field.

func KindLT

func KindLT(v string) predicate.Role

KindLT applies the LT predicate on the "kind" field.

func KindLTE

func KindLTE(v string) predicate.Role

KindLTE applies the LTE predicate on the "kind" field.

func KindNEQ

func KindNEQ(v string) predicate.Role

KindNEQ applies the NEQ predicate on the "kind" field.

func KindNotIn

func KindNotIn(vs ...string) predicate.Role

KindNotIn applies the NotIn predicate on the "kind" field.

func Not

Not applies the not operator on the given predicate.

func Or

func Or(predicates ...predicate.Role) predicate.Role

Or groups predicates with the OR operator between them.

func Session

func Session(v bool) predicate.Role

Session applies equality check predicate on the "session" field. It's identical to SessionEQ.

func SessionEQ

func SessionEQ(v bool) predicate.Role

SessionEQ applies the EQ predicate on the "session" field.

func SessionNEQ

func SessionNEQ(v bool) predicate.Role

SessionNEQ applies the NEQ predicate on the "session" field.

func UpdateTime

func UpdateTime(v time.Time) predicate.Role

UpdateTime applies equality check predicate on the "update_time" field. It's identical to UpdateTimeEQ.

func UpdateTimeEQ

func UpdateTimeEQ(v time.Time) predicate.Role

UpdateTimeEQ applies the EQ predicate on the "update_time" field.

func UpdateTimeGT

func UpdateTimeGT(v time.Time) predicate.Role

UpdateTimeGT applies the GT predicate on the "update_time" field.

func UpdateTimeGTE

func UpdateTimeGTE(v time.Time) predicate.Role

UpdateTimeGTE applies the GTE predicate on the "update_time" field.

func UpdateTimeIn

func UpdateTimeIn(vs ...time.Time) predicate.Role

UpdateTimeIn applies the In predicate on the "update_time" field.

func UpdateTimeLT

func UpdateTimeLT(v time.Time) predicate.Role

UpdateTimeLT applies the LT predicate on the "update_time" field.

func UpdateTimeLTE

func UpdateTimeLTE(v time.Time) predicate.Role

UpdateTimeLTE applies the LTE predicate on the "update_time" field.

func UpdateTimeNEQ

func UpdateTimeNEQ(v time.Time) predicate.Role

UpdateTimeNEQ applies the NEQ predicate on the "update_time" field.

func UpdateTimeNotIn

func UpdateTimeNotIn(vs ...time.Time) predicate.Role

UpdateTimeNotIn applies the NotIn predicate on the "update_time" field.

func ValidColumn

func ValidColumn(column string) bool

ValidColumn reports if the column name is valid (part of the table columns).

func WithoutFields

func WithoutFields(ignores ...string) []string

WithoutFields returns the fields ignored the given list.

Types

type OrderOption

type OrderOption func(*sql.Selector)

OrderOption defines the ordering options for the Role queries.

func ByBuiltin

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

ByBuiltin orders the results by the builtin field.

func ByCreateTime

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

ByCreateTime orders the results by the create_time field.

func ByDescription

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

ByDescription orders the results by the description field.

func ByID

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

ByID orders the results by the id field.

func ByKind

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

ByKind orders the results by the kind field.

func BySession

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

BySession orders the results by the session field.

func BySubjects

func BySubjects(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption

BySubjects orders the results by subjects terms.

func BySubjectsCount

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

BySubjectsCount orders the results by subjects count.

func ByUpdateTime

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

ByUpdateTime orders the results by the update_time field.

Jump to

Keyboard shortcuts

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