role

package
v0.0.0-...-1cc1a95 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2023 License: Apache-2.0 Imports: 3 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"
	// FieldRoleName holds the string denoting the role_name field in the database.
	FieldRoleName = "role_name"
	// FieldRoleValue holds the string denoting the role_value field in the database.
	FieldRoleValue = "role_value"
	// EdgeResource holds the string denoting the resource edge name in mutations.
	EdgeResource = "resource"
	// EdgeUser holds the string denoting the user edge name in mutations.
	EdgeUser = "user"
	// Table holds the table name of the role in the database.
	Table = "roles"
	// ResourceTable is the table that holds the resource relation/edge. The primary key declared below.
	ResourceTable = "role_resource"
	// ResourceInverseTable is the table name for the Resource entity.
	// It exists in this package in order to avoid circular dependency with the "resource" package.
	ResourceInverseTable = "resources"
	// UserTable is the table that holds the user relation/edge. The primary key declared below.
	UserTable = "user_role"
	// 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"
)

Variables

View Source
var (
	// ResourcePrimaryKey and ResourceColumn2 are the table columns denoting the
	// primary key for the resource relation (M2M).
	ResourcePrimaryKey = []string{"role_id", "resource_id"}
	// UserPrimaryKey and UserColumn2 are the table columns denoting the
	// primary key for the user relation (M2M).
	UserPrimaryKey = []string{"user_id", "role_id"}
)
View Source
var (
	// RoleNameValidator is a validator for the "role_name" field. It is called by the builders before save.
	RoleNameValidator func(string) error
	// RoleValueValidator is a validator for the "role_value" field. It is called by the builders before save.
	RoleValueValidator func(string) error
)

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 HasResource

func HasResource() predicate.Role

HasResource applies the HasEdge predicate on the "resource" edge.

func HasResourceWith

func HasResourceWith(preds ...predicate.Resource) predicate.Role

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

func HasUser

func HasUser() predicate.Role

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

func HasUserWith

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

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

func ID

func ID(id int) predicate.Role

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id int) predicate.Role

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id int) predicate.Role

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id int) predicate.Role

IDGTE applies the GTE predicate on the ID field.

func IDIn

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

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id int) predicate.Role

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id int) predicate.Role

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id int) predicate.Role

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

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

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.Role) predicate.Role

Or groups predicates with the OR operator between them.

func RoleName

func RoleName(v string) predicate.Role

RoleName applies equality check predicate on the "role_name" field. It's identical to RoleNameEQ.

func RoleNameContains

func RoleNameContains(v string) predicate.Role

RoleNameContains applies the Contains predicate on the "role_name" field.

func RoleNameContainsFold

func RoleNameContainsFold(v string) predicate.Role

RoleNameContainsFold applies the ContainsFold predicate on the "role_name" field.

func RoleNameEQ

func RoleNameEQ(v string) predicate.Role

RoleNameEQ applies the EQ predicate on the "role_name" field.

func RoleNameEqualFold

func RoleNameEqualFold(v string) predicate.Role

RoleNameEqualFold applies the EqualFold predicate on the "role_name" field.

func RoleNameGT

func RoleNameGT(v string) predicate.Role

RoleNameGT applies the GT predicate on the "role_name" field.

func RoleNameGTE

func RoleNameGTE(v string) predicate.Role

RoleNameGTE applies the GTE predicate on the "role_name" field.

func RoleNameHasPrefix

func RoleNameHasPrefix(v string) predicate.Role

RoleNameHasPrefix applies the HasPrefix predicate on the "role_name" field.

func RoleNameHasSuffix

func RoleNameHasSuffix(v string) predicate.Role

RoleNameHasSuffix applies the HasSuffix predicate on the "role_name" field.

func RoleNameIn

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

RoleNameIn applies the In predicate on the "role_name" field.

func RoleNameLT

func RoleNameLT(v string) predicate.Role

RoleNameLT applies the LT predicate on the "role_name" field.

func RoleNameLTE

func RoleNameLTE(v string) predicate.Role

RoleNameLTE applies the LTE predicate on the "role_name" field.

func RoleNameNEQ

func RoleNameNEQ(v string) predicate.Role

RoleNameNEQ applies the NEQ predicate on the "role_name" field.

func RoleNameNotIn

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

RoleNameNotIn applies the NotIn predicate on the "role_name" field.

func RoleValue

func RoleValue(v string) predicate.Role

RoleValue applies equality check predicate on the "role_value" field. It's identical to RoleValueEQ.

func RoleValueContains

func RoleValueContains(v string) predicate.Role

RoleValueContains applies the Contains predicate on the "role_value" field.

func RoleValueContainsFold

func RoleValueContainsFold(v string) predicate.Role

RoleValueContainsFold applies the ContainsFold predicate on the "role_value" field.

func RoleValueEQ

func RoleValueEQ(v string) predicate.Role

RoleValueEQ applies the EQ predicate on the "role_value" field.

func RoleValueEqualFold

func RoleValueEqualFold(v string) predicate.Role

RoleValueEqualFold applies the EqualFold predicate on the "role_value" field.

func RoleValueGT

func RoleValueGT(v string) predicate.Role

RoleValueGT applies the GT predicate on the "role_value" field.

func RoleValueGTE

func RoleValueGTE(v string) predicate.Role

RoleValueGTE applies the GTE predicate on the "role_value" field.

func RoleValueHasPrefix

func RoleValueHasPrefix(v string) predicate.Role

RoleValueHasPrefix applies the HasPrefix predicate on the "role_value" field.

func RoleValueHasSuffix

func RoleValueHasSuffix(v string) predicate.Role

RoleValueHasSuffix applies the HasSuffix predicate on the "role_value" field.

func RoleValueIn

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

RoleValueIn applies the In predicate on the "role_value" field.

func RoleValueLT

func RoleValueLT(v string) predicate.Role

RoleValueLT applies the LT predicate on the "role_value" field.

func RoleValueLTE

func RoleValueLTE(v string) predicate.Role

RoleValueLTE applies the LTE predicate on the "role_value" field.

func RoleValueNEQ

func RoleValueNEQ(v string) predicate.Role

RoleValueNEQ applies the NEQ predicate on the "role_value" field.

func RoleValueNotIn

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

RoleValueNotIn applies the NotIn predicate on the "role_value" field.

func ValidColumn

func ValidColumn(column string) bool

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

Types

This section is empty.

Jump to

Keyboard shortcuts

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