authroles

package
v0.0.0-...-6fd8457 Latest Latest
Warning

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

Go to latest
Published: May 23, 2024 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the authroles type in the database.
	Label = "auth_roles"
	// FieldID holds the string denoting the id field in the database.
	FieldID = "id"
	// FieldRole holds the string denoting the role field in the database.
	FieldRole = "role"
	// EdgeToken holds the string denoting the token edge name in mutations.
	EdgeToken = "token"
	// Table holds the table name of the authroles in the database.
	Table = "auth_roles"
	// TokenTable is the table that holds the token relation/edge.
	TokenTable = "auth_roles"
	// TokenInverseTable is the table name for the AuthTokens entity.
	// It exists in this package in order to avoid circular dependency with the "authtokens" package.
	TokenInverseTable = "auth_tokens"
	// TokenColumn is the table column denoting the token relation/edge.
	TokenColumn = "auth_tokens_roles"
)
View Source
const DefaultRole = RoleUser

RoleUser is the default value of the Role enum.

Variables

View Source
var Columns = []string{
	FieldID,
	FieldRole,
}

Columns holds all SQL columns for authroles fields.

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

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

Functions

func And

func And(predicates ...predicate.AuthRoles) predicate.AuthRoles

And groups predicates with the AND operator between them.

func HasToken

func HasToken() predicate.AuthRoles

HasToken applies the HasEdge predicate on the "token" edge.

func HasTokenWith

func HasTokenWith(preds ...predicate.AuthTokens) predicate.AuthRoles

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

func ID

func ID(id int) predicate.AuthRoles

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id int) predicate.AuthRoles

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id int) predicate.AuthRoles

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id int) predicate.AuthRoles

IDGTE applies the GTE predicate on the ID field.

func IDIn

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

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id int) predicate.AuthRoles

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id int) predicate.AuthRoles

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id int) predicate.AuthRoles

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

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

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

Or groups predicates with the OR operator between them.

func RoleEQ

func RoleEQ(v Role) predicate.AuthRoles

RoleEQ applies the EQ predicate on the "role" field.

func RoleIn

func RoleIn(vs ...Role) predicate.AuthRoles

RoleIn applies the In predicate on the "role" field.

func RoleNEQ

func RoleNEQ(v Role) predicate.AuthRoles

RoleNEQ applies the NEQ predicate on the "role" field.

func RoleNotIn

func RoleNotIn(vs ...Role) predicate.AuthRoles

RoleNotIn applies the NotIn predicate on the "role" field.

func RoleValidator

func RoleValidator(r Role) error

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

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 AuthRoles queries.

func ByID

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

ByID orders the results by the id field.

func ByRole

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

ByRole orders the results by the role field.

func ByTokenField

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

ByTokenField orders the results by token field.

type Role

type Role string

Role defines the type for the "role" enum field.

const (
	RoleAdmin       Role = "admin"
	RoleUser        Role = "user"
	RoleAttachments Role = "attachments"
)

Role values.

func (Role) String

func (r Role) String() string

Jump to

Keyboard shortcuts

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