subjectrolerelationship

package
v0.4.1-rc3 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the subjectrolerelationship type in the database.
	Label = "subject_role_relationship"
	// 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"
	// FieldProjectID holds the string denoting the project_id field in the database.
	FieldProjectID = "project_id"
	// FieldSubjectID holds the string denoting the subject_id field in the database.
	FieldSubjectID = "subject_id"
	// FieldRoleID holds the string denoting the role_id field in the database.
	FieldRoleID = "role_id"
	// EdgeProject holds the string denoting the project edge name in mutations.
	EdgeProject = "project"
	// EdgeSubject holds the string denoting the subject edge name in mutations.
	EdgeSubject = "subject"
	// EdgeRole holds the string denoting the role edge name in mutations.
	EdgeRole = "role"
	// Table holds the table name of the subjectrolerelationship in the database.
	Table = "subject_role_relationships"
	// ProjectTable is the table that holds the project relation/edge.
	ProjectTable = "subject_role_relationships"
	// ProjectInverseTable is the table name for the Project entity.
	// It exists in this package in order to avoid circular dependency with the "project" package.
	ProjectInverseTable = "projects"
	// ProjectColumn is the table column denoting the project relation/edge.
	ProjectColumn = "project_id"
	// SubjectTable is the table that holds the subject relation/edge.
	SubjectTable = "subject_role_relationships"
	// SubjectInverseTable is the table name for the Subject entity.
	// It exists in this package in order to avoid circular dependency with the "subject" package.
	SubjectInverseTable = "subjects"
	// SubjectColumn is the table column denoting the subject relation/edge.
	SubjectColumn = "subject_id"
	// RoleTable is the table that holds the role relation/edge.
	RoleTable = "subject_role_relationships"
	// RoleInverseTable is the table name for the Role entity.
	// It exists in this package in order to avoid circular dependency with the "role" package.
	RoleInverseTable = "roles"
	// RoleColumn is the table column denoting the role relation/edge.
	RoleColumn = "role_id"
)

Variables

View Source
var (
	Hooks        [1]ent.Hook
	Interceptors [1]ent.Interceptor
	// DefaultCreateTime holds the default value on creation for the "create_time" field.
	DefaultCreateTime func() time.Time
	// SubjectIDValidator is a validator for the "subject_id" field. It is called by the builders before save.
	SubjectIDValidator func(string) error
	// RoleIDValidator is a validator for the "role_id" field. It is called by the builders before save.
	RoleIDValidator 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 subjectrolerelationship fields.

Functions

func And

And groups predicates with the AND operator between them.

func CreateTime

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

func CreateTimeEQ

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

func CreateTimeGT

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

func CreateTimeGTE

func CreateTimeGTE(v time.Time) predicate.SubjectRoleRelationship

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

func CreateTimeIn

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

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

func CreateTimeLT

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

func CreateTimeLTE

func CreateTimeLTE(v time.Time) predicate.SubjectRoleRelationship

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

func CreateTimeNEQ

func CreateTimeNEQ(v time.Time) predicate.SubjectRoleRelationship

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

func CreateTimeNotIn

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

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

func HasProject

HasProject applies the HasEdge predicate on the "project" edge.

func HasProjectWith

func HasProjectWith(preds ...predicate.Project) predicate.SubjectRoleRelationship

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

func HasRole

HasRole applies the HasEdge predicate on the "role" edge.

func HasRoleWith

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

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

func HasSubject

HasSubject applies the HasEdge predicate on the "subject" edge.

func HasSubjectWith

func HasSubjectWith(preds ...predicate.Subject) predicate.SubjectRoleRelationship

HasSubjectWith applies the HasEdge predicate on the "subject" 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

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

IDNotIn applies the NotIn predicate on the ID field.

func Not

Not applies the not operator on the given predicate.

func Or

Or groups predicates with the OR operator between them.

func ProjectID

ProjectID applies equality check predicate on the "project_id" field. It's identical to ProjectIDEQ.

func ProjectIDContains

func ProjectIDContains(v object.ID) predicate.SubjectRoleRelationship

ProjectIDContains applies the Contains predicate on the "project_id" field.

func ProjectIDContainsFold

func ProjectIDContainsFold(v object.ID) predicate.SubjectRoleRelationship

ProjectIDContainsFold applies the ContainsFold predicate on the "project_id" field.

func ProjectIDEQ

ProjectIDEQ applies the EQ predicate on the "project_id" field.

func ProjectIDEqualFold

func ProjectIDEqualFold(v object.ID) predicate.SubjectRoleRelationship

ProjectIDEqualFold applies the EqualFold predicate on the "project_id" field.

func ProjectIDGT

ProjectIDGT applies the GT predicate on the "project_id" field.

func ProjectIDGTE

ProjectIDGTE applies the GTE predicate on the "project_id" field.

func ProjectIDHasPrefix

func ProjectIDHasPrefix(v object.ID) predicate.SubjectRoleRelationship

ProjectIDHasPrefix applies the HasPrefix predicate on the "project_id" field.

func ProjectIDHasSuffix

func ProjectIDHasSuffix(v object.ID) predicate.SubjectRoleRelationship

ProjectIDHasSuffix applies the HasSuffix predicate on the "project_id" field.

func ProjectIDIn

func ProjectIDIn(vs ...object.ID) predicate.SubjectRoleRelationship

ProjectIDIn applies the In predicate on the "project_id" field.

func ProjectIDIsNil

func ProjectIDIsNil() predicate.SubjectRoleRelationship

ProjectIDIsNil applies the IsNil predicate on the "project_id" field.

func ProjectIDLT

ProjectIDLT applies the LT predicate on the "project_id" field.

func ProjectIDLTE

ProjectIDLTE applies the LTE predicate on the "project_id" field.

func ProjectIDNEQ

ProjectIDNEQ applies the NEQ predicate on the "project_id" field.

func ProjectIDNotIn

func ProjectIDNotIn(vs ...object.ID) predicate.SubjectRoleRelationship

ProjectIDNotIn applies the NotIn predicate on the "project_id" field.

func ProjectIDNotNil

func ProjectIDNotNil() predicate.SubjectRoleRelationship

ProjectIDNotNil applies the NotNil predicate on the "project_id" field.

func RoleID

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

func RoleIDContains

func RoleIDContains(v string) predicate.SubjectRoleRelationship

RoleIDContains applies the Contains predicate on the "role_id" field.

func RoleIDContainsFold

func RoleIDContainsFold(v string) predicate.SubjectRoleRelationship

RoleIDContainsFold applies the ContainsFold predicate on the "role_id" field.

func RoleIDEQ

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

func RoleIDEqualFold

func RoleIDEqualFold(v string) predicate.SubjectRoleRelationship

RoleIDEqualFold applies the EqualFold predicate on the "role_id" field.

func RoleIDGT

RoleIDGT applies the GT predicate on the "role_id" field.

func RoleIDGTE

RoleIDGTE applies the GTE predicate on the "role_id" field.

func RoleIDHasPrefix

func RoleIDHasPrefix(v string) predicate.SubjectRoleRelationship

RoleIDHasPrefix applies the HasPrefix predicate on the "role_id" field.

func RoleIDHasSuffix

func RoleIDHasSuffix(v string) predicate.SubjectRoleRelationship

RoleIDHasSuffix applies the HasSuffix predicate on the "role_id" field.

func RoleIDIn

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

func RoleIDLT

RoleIDLT applies the LT predicate on the "role_id" field.

func RoleIDLTE

RoleIDLTE applies the LTE predicate on the "role_id" field.

func RoleIDNEQ

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

func RoleIDNotIn

func RoleIDNotIn(vs ...string) predicate.SubjectRoleRelationship

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

func SubjectID

SubjectID applies equality check predicate on the "subject_id" field. It's identical to SubjectIDEQ.

func SubjectIDContains

func SubjectIDContains(v object.ID) predicate.SubjectRoleRelationship

SubjectIDContains applies the Contains predicate on the "subject_id" field.

func SubjectIDContainsFold

func SubjectIDContainsFold(v object.ID) predicate.SubjectRoleRelationship

SubjectIDContainsFold applies the ContainsFold predicate on the "subject_id" field.

func SubjectIDEQ

SubjectIDEQ applies the EQ predicate on the "subject_id" field.

func SubjectIDEqualFold

func SubjectIDEqualFold(v object.ID) predicate.SubjectRoleRelationship

SubjectIDEqualFold applies the EqualFold predicate on the "subject_id" field.

func SubjectIDGT

SubjectIDGT applies the GT predicate on the "subject_id" field.

func SubjectIDGTE

SubjectIDGTE applies the GTE predicate on the "subject_id" field.

func SubjectIDHasPrefix

func SubjectIDHasPrefix(v object.ID) predicate.SubjectRoleRelationship

SubjectIDHasPrefix applies the HasPrefix predicate on the "subject_id" field.

func SubjectIDHasSuffix

func SubjectIDHasSuffix(v object.ID) predicate.SubjectRoleRelationship

SubjectIDHasSuffix applies the HasSuffix predicate on the "subject_id" field.

func SubjectIDIn

func SubjectIDIn(vs ...object.ID) predicate.SubjectRoleRelationship

SubjectIDIn applies the In predicate on the "subject_id" field.

func SubjectIDLT

SubjectIDLT applies the LT predicate on the "subject_id" field.

func SubjectIDLTE

SubjectIDLTE applies the LTE predicate on the "subject_id" field.

func SubjectIDNEQ

SubjectIDNEQ applies the NEQ predicate on the "subject_id" field.

func SubjectIDNotIn

func SubjectIDNotIn(vs ...object.ID) predicate.SubjectRoleRelationship

SubjectIDNotIn applies the NotIn predicate on the "subject_id" 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 SubjectRoleRelationship queries.

func ByCreateTime

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

ByCreateTime orders the results by the create_time field.

func ByID

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

ByID orders the results by the id field.

func ByProjectField

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

ByProjectField orders the results by project field.

func ByProjectID

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

ByProjectID orders the results by the project_id 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 BySubjectField

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

BySubjectField orders the results by subject field.

func BySubjectID

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

BySubjectID orders the results by the subject_id field.

Jump to

Keyboard shortcuts

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