tenant

package
v0.0.0-...-166cf9e Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the tenant type in the database.
	Label = "tenant"
	// FieldID holds the string denoting the id field in the database.
	FieldID = "id"
	// FieldName holds the string denoting the name field in the database.
	FieldName = "name"
	// FieldNamespace holds the string denoting the namespace field in the database.
	FieldNamespace = "namespace"
	// FieldMaxFunctions holds the string denoting the max_functions field in the database.
	FieldMaxFunctions = "max_functions"
	// FieldMaxConcurrent holds the string denoting the max_concurrent field in the database.
	FieldMaxConcurrent = "max_concurrent"
	// FieldMaxMemoryMB holds the string denoting the max_memory_mb field in the database.
	FieldMaxMemoryMB = "max_memory_mb"
	// FieldMaxStorageMB holds the string denoting the max_storage_mb field in the database.
	FieldMaxStorageMB = "max_storage_mb"
	// FieldMetadata holds the string denoting the metadata field in the database.
	FieldMetadata = "metadata"
	// FieldCreatedAt holds the string denoting the created_at field in the database.
	FieldCreatedAt = "created_at"
	// FieldUpdatedAt holds the string denoting the updated_at field in the database.
	FieldUpdatedAt = "updated_at"
	// EdgeFunctions holds the string denoting the functions edge name in mutations.
	EdgeFunctions = "functions"
	// EdgeExecutions holds the string denoting the executions edge name in mutations.
	EdgeExecutions = "executions"
	// Table holds the table name of the tenant in the database.
	Table = "tenants"
	// FunctionsTable is the table that holds the functions relation/edge.
	FunctionsTable = "functions"
	// FunctionsInverseTable is the table name for the Function entity.
	// It exists in this package in order to avoid circular dependency with the "function" package.
	FunctionsInverseTable = "functions"
	// FunctionsColumn is the table column denoting the functions relation/edge.
	FunctionsColumn = "tenant_id"
	// ExecutionsTable is the table that holds the executions relation/edge.
	ExecutionsTable = "executions"
	// ExecutionsInverseTable is the table name for the Execution entity.
	// It exists in this package in order to avoid circular dependency with the "execution" package.
	ExecutionsInverseTable = "executions"
	// ExecutionsColumn is the table column denoting the executions relation/edge.
	ExecutionsColumn = "tenant_id"
)

Variables

View Source
var (
	// NameValidator is a validator for the "name" field. It is called by the builders before save.
	NameValidator func(string) error
	// NamespaceValidator is a validator for the "namespace" field. It is called by the builders before save.
	NamespaceValidator func(string) error
	// DefaultMaxFunctions holds the default value on creation for the "max_functions" field.
	DefaultMaxFunctions int
	// MaxFunctionsValidator is a validator for the "max_functions" field. It is called by the builders before save.
	MaxFunctionsValidator func(int) error
	// DefaultMaxConcurrent holds the default value on creation for the "max_concurrent" field.
	DefaultMaxConcurrent int
	// MaxConcurrentValidator is a validator for the "max_concurrent" field. It is called by the builders before save.
	MaxConcurrentValidator func(int) error
	// DefaultMaxMemoryMB holds the default value on creation for the "max_memory_mb" field.
	DefaultMaxMemoryMB int
	// MaxMemoryMBValidator is a validator for the "max_memory_mb" field. It is called by the builders before save.
	MaxMemoryMBValidator func(int) error
	// DefaultMaxStorageMB holds the default value on creation for the "max_storage_mb" field.
	DefaultMaxStorageMB int
	// MaxStorageMBValidator is a validator for the "max_storage_mb" field. It is called by the builders before save.
	MaxStorageMBValidator func(int) error
	// DefaultCreatedAt holds the default value on creation for the "created_at" field.
	DefaultCreatedAt func() time.Time
	// DefaultUpdatedAt holds the default value on creation for the "updated_at" field.
	DefaultUpdatedAt func() time.Time
	// UpdateDefaultUpdatedAt holds the default value on update for the "updated_at" field.
	UpdateDefaultUpdatedAt func() time.Time
	// DefaultID holds the default value on creation for the "id" field.
	DefaultID func() uuid.UUID
)

Columns holds all SQL columns for tenant fields.

Functions

func And

func And(predicates ...predicate.Tenant) predicate.Tenant

And groups predicates with the AND operator between them.

func CreatedAt

func CreatedAt(v time.Time) predicate.Tenant

CreatedAt applies equality check predicate on the "created_at" field. It's identical to CreatedAtEQ.

func CreatedAtEQ

func CreatedAtEQ(v time.Time) predicate.Tenant

CreatedAtEQ applies the EQ predicate on the "created_at" field.

func CreatedAtGT

func CreatedAtGT(v time.Time) predicate.Tenant

CreatedAtGT applies the GT predicate on the "created_at" field.

func CreatedAtGTE

func CreatedAtGTE(v time.Time) predicate.Tenant

CreatedAtGTE applies the GTE predicate on the "created_at" field.

func CreatedAtIn

func CreatedAtIn(vs ...time.Time) predicate.Tenant

CreatedAtIn applies the In predicate on the "created_at" field.

func CreatedAtLT

func CreatedAtLT(v time.Time) predicate.Tenant

CreatedAtLT applies the LT predicate on the "created_at" field.

func CreatedAtLTE

func CreatedAtLTE(v time.Time) predicate.Tenant

CreatedAtLTE applies the LTE predicate on the "created_at" field.

func CreatedAtNEQ

func CreatedAtNEQ(v time.Time) predicate.Tenant

CreatedAtNEQ applies the NEQ predicate on the "created_at" field.

func CreatedAtNotIn

func CreatedAtNotIn(vs ...time.Time) predicate.Tenant

CreatedAtNotIn applies the NotIn predicate on the "created_at" field.

func HasExecutions

func HasExecutions() predicate.Tenant

HasExecutions applies the HasEdge predicate on the "executions" edge.

func HasExecutionsWith

func HasExecutionsWith(preds ...predicate.Execution) predicate.Tenant

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

func HasFunctions

func HasFunctions() predicate.Tenant

HasFunctions applies the HasEdge predicate on the "functions" edge.

func HasFunctionsWith

func HasFunctionsWith(preds ...predicate.Function) predicate.Tenant

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

func ID

func ID(id uuid.UUID) predicate.Tenant

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id uuid.UUID) predicate.Tenant

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id uuid.UUID) predicate.Tenant

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id uuid.UUID) predicate.Tenant

IDGTE applies the GTE predicate on the ID field.

func IDIn

func IDIn(ids ...uuid.UUID) predicate.Tenant

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id uuid.UUID) predicate.Tenant

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id uuid.UUID) predicate.Tenant

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id uuid.UUID) predicate.Tenant

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

func IDNotIn(ids ...uuid.UUID) predicate.Tenant

IDNotIn applies the NotIn predicate on the ID field.

func MaxConcurrent

func MaxConcurrent(v int) predicate.Tenant

MaxConcurrent applies equality check predicate on the "max_concurrent" field. It's identical to MaxConcurrentEQ.

func MaxConcurrentEQ

func MaxConcurrentEQ(v int) predicate.Tenant

MaxConcurrentEQ applies the EQ predicate on the "max_concurrent" field.

func MaxConcurrentGT

func MaxConcurrentGT(v int) predicate.Tenant

MaxConcurrentGT applies the GT predicate on the "max_concurrent" field.

func MaxConcurrentGTE

func MaxConcurrentGTE(v int) predicate.Tenant

MaxConcurrentGTE applies the GTE predicate on the "max_concurrent" field.

func MaxConcurrentIn

func MaxConcurrentIn(vs ...int) predicate.Tenant

MaxConcurrentIn applies the In predicate on the "max_concurrent" field.

func MaxConcurrentLT

func MaxConcurrentLT(v int) predicate.Tenant

MaxConcurrentLT applies the LT predicate on the "max_concurrent" field.

func MaxConcurrentLTE

func MaxConcurrentLTE(v int) predicate.Tenant

MaxConcurrentLTE applies the LTE predicate on the "max_concurrent" field.

func MaxConcurrentNEQ

func MaxConcurrentNEQ(v int) predicate.Tenant

MaxConcurrentNEQ applies the NEQ predicate on the "max_concurrent" field.

func MaxConcurrentNotIn

func MaxConcurrentNotIn(vs ...int) predicate.Tenant

MaxConcurrentNotIn applies the NotIn predicate on the "max_concurrent" field.

func MaxFunctions

func MaxFunctions(v int) predicate.Tenant

MaxFunctions applies equality check predicate on the "max_functions" field. It's identical to MaxFunctionsEQ.

func MaxFunctionsEQ

func MaxFunctionsEQ(v int) predicate.Tenant

MaxFunctionsEQ applies the EQ predicate on the "max_functions" field.

func MaxFunctionsGT

func MaxFunctionsGT(v int) predicate.Tenant

MaxFunctionsGT applies the GT predicate on the "max_functions" field.

func MaxFunctionsGTE

func MaxFunctionsGTE(v int) predicate.Tenant

MaxFunctionsGTE applies the GTE predicate on the "max_functions" field.

func MaxFunctionsIn

func MaxFunctionsIn(vs ...int) predicate.Tenant

MaxFunctionsIn applies the In predicate on the "max_functions" field.

func MaxFunctionsLT

func MaxFunctionsLT(v int) predicate.Tenant

MaxFunctionsLT applies the LT predicate on the "max_functions" field.

func MaxFunctionsLTE

func MaxFunctionsLTE(v int) predicate.Tenant

MaxFunctionsLTE applies the LTE predicate on the "max_functions" field.

func MaxFunctionsNEQ

func MaxFunctionsNEQ(v int) predicate.Tenant

MaxFunctionsNEQ applies the NEQ predicate on the "max_functions" field.

func MaxFunctionsNotIn

func MaxFunctionsNotIn(vs ...int) predicate.Tenant

MaxFunctionsNotIn applies the NotIn predicate on the "max_functions" field.

func MaxMemoryMB

func MaxMemoryMB(v int) predicate.Tenant

MaxMemoryMB applies equality check predicate on the "max_memory_mb" field. It's identical to MaxMemoryMBEQ.

func MaxMemoryMBEQ

func MaxMemoryMBEQ(v int) predicate.Tenant

MaxMemoryMBEQ applies the EQ predicate on the "max_memory_mb" field.

func MaxMemoryMBGT

func MaxMemoryMBGT(v int) predicate.Tenant

MaxMemoryMBGT applies the GT predicate on the "max_memory_mb" field.

func MaxMemoryMBGTE

func MaxMemoryMBGTE(v int) predicate.Tenant

MaxMemoryMBGTE applies the GTE predicate on the "max_memory_mb" field.

func MaxMemoryMBIn

func MaxMemoryMBIn(vs ...int) predicate.Tenant

MaxMemoryMBIn applies the In predicate on the "max_memory_mb" field.

func MaxMemoryMBLT

func MaxMemoryMBLT(v int) predicate.Tenant

MaxMemoryMBLT applies the LT predicate on the "max_memory_mb" field.

func MaxMemoryMBLTE

func MaxMemoryMBLTE(v int) predicate.Tenant

MaxMemoryMBLTE applies the LTE predicate on the "max_memory_mb" field.

func MaxMemoryMBNEQ

func MaxMemoryMBNEQ(v int) predicate.Tenant

MaxMemoryMBNEQ applies the NEQ predicate on the "max_memory_mb" field.

func MaxMemoryMBNotIn

func MaxMemoryMBNotIn(vs ...int) predicate.Tenant

MaxMemoryMBNotIn applies the NotIn predicate on the "max_memory_mb" field.

func MaxStorageMB

func MaxStorageMB(v int) predicate.Tenant

MaxStorageMB applies equality check predicate on the "max_storage_mb" field. It's identical to MaxStorageMBEQ.

func MaxStorageMBEQ

func MaxStorageMBEQ(v int) predicate.Tenant

MaxStorageMBEQ applies the EQ predicate on the "max_storage_mb" field.

func MaxStorageMBGT

func MaxStorageMBGT(v int) predicate.Tenant

MaxStorageMBGT applies the GT predicate on the "max_storage_mb" field.

func MaxStorageMBGTE

func MaxStorageMBGTE(v int) predicate.Tenant

MaxStorageMBGTE applies the GTE predicate on the "max_storage_mb" field.

func MaxStorageMBIn

func MaxStorageMBIn(vs ...int) predicate.Tenant

MaxStorageMBIn applies the In predicate on the "max_storage_mb" field.

func MaxStorageMBLT

func MaxStorageMBLT(v int) predicate.Tenant

MaxStorageMBLT applies the LT predicate on the "max_storage_mb" field.

func MaxStorageMBLTE

func MaxStorageMBLTE(v int) predicate.Tenant

MaxStorageMBLTE applies the LTE predicate on the "max_storage_mb" field.

func MaxStorageMBNEQ

func MaxStorageMBNEQ(v int) predicate.Tenant

MaxStorageMBNEQ applies the NEQ predicate on the "max_storage_mb" field.

func MaxStorageMBNotIn

func MaxStorageMBNotIn(vs ...int) predicate.Tenant

MaxStorageMBNotIn applies the NotIn predicate on the "max_storage_mb" field.

func MetadataIsNil

func MetadataIsNil() predicate.Tenant

MetadataIsNil applies the IsNil predicate on the "metadata" field.

func MetadataNotNil

func MetadataNotNil() predicate.Tenant

MetadataNotNil applies the NotNil predicate on the "metadata" field.

func Name

func Name(v string) predicate.Tenant

Name applies equality check predicate on the "name" field. It's identical to NameEQ.

func NameContains

func NameContains(v string) predicate.Tenant

NameContains applies the Contains predicate on the "name" field.

func NameContainsFold

func NameContainsFold(v string) predicate.Tenant

NameContainsFold applies the ContainsFold predicate on the "name" field.

func NameEQ

func NameEQ(v string) predicate.Tenant

NameEQ applies the EQ predicate on the "name" field.

func NameEqualFold

func NameEqualFold(v string) predicate.Tenant

NameEqualFold applies the EqualFold predicate on the "name" field.

func NameGT

func NameGT(v string) predicate.Tenant

NameGT applies the GT predicate on the "name" field.

func NameGTE

func NameGTE(v string) predicate.Tenant

NameGTE applies the GTE predicate on the "name" field.

func NameHasPrefix

func NameHasPrefix(v string) predicate.Tenant

NameHasPrefix applies the HasPrefix predicate on the "name" field.

func NameHasSuffix

func NameHasSuffix(v string) predicate.Tenant

NameHasSuffix applies the HasSuffix predicate on the "name" field.

func NameIn

func NameIn(vs ...string) predicate.Tenant

NameIn applies the In predicate on the "name" field.

func NameLT

func NameLT(v string) predicate.Tenant

NameLT applies the LT predicate on the "name" field.

func NameLTE

func NameLTE(v string) predicate.Tenant

NameLTE applies the LTE predicate on the "name" field.

func NameNEQ

func NameNEQ(v string) predicate.Tenant

NameNEQ applies the NEQ predicate on the "name" field.

func NameNotIn

func NameNotIn(vs ...string) predicate.Tenant

NameNotIn applies the NotIn predicate on the "name" field.

func Namespace

func Namespace(v string) predicate.Tenant

Namespace applies equality check predicate on the "namespace" field. It's identical to NamespaceEQ.

func NamespaceContains

func NamespaceContains(v string) predicate.Tenant

NamespaceContains applies the Contains predicate on the "namespace" field.

func NamespaceContainsFold

func NamespaceContainsFold(v string) predicate.Tenant

NamespaceContainsFold applies the ContainsFold predicate on the "namespace" field.

func NamespaceEQ

func NamespaceEQ(v string) predicate.Tenant

NamespaceEQ applies the EQ predicate on the "namespace" field.

func NamespaceEqualFold

func NamespaceEqualFold(v string) predicate.Tenant

NamespaceEqualFold applies the EqualFold predicate on the "namespace" field.

func NamespaceGT

func NamespaceGT(v string) predicate.Tenant

NamespaceGT applies the GT predicate on the "namespace" field.

func NamespaceGTE

func NamespaceGTE(v string) predicate.Tenant

NamespaceGTE applies the GTE predicate on the "namespace" field.

func NamespaceHasPrefix

func NamespaceHasPrefix(v string) predicate.Tenant

NamespaceHasPrefix applies the HasPrefix predicate on the "namespace" field.

func NamespaceHasSuffix

func NamespaceHasSuffix(v string) predicate.Tenant

NamespaceHasSuffix applies the HasSuffix predicate on the "namespace" field.

func NamespaceIn

func NamespaceIn(vs ...string) predicate.Tenant

NamespaceIn applies the In predicate on the "namespace" field.

func NamespaceLT

func NamespaceLT(v string) predicate.Tenant

NamespaceLT applies the LT predicate on the "namespace" field.

func NamespaceLTE

func NamespaceLTE(v string) predicate.Tenant

NamespaceLTE applies the LTE predicate on the "namespace" field.

func NamespaceNEQ

func NamespaceNEQ(v string) predicate.Tenant

NamespaceNEQ applies the NEQ predicate on the "namespace" field.

func NamespaceNotIn

func NamespaceNotIn(vs ...string) predicate.Tenant

NamespaceNotIn applies the NotIn predicate on the "namespace" field.

func Not

Not applies the not operator on the given predicate.

func Or

func Or(predicates ...predicate.Tenant) predicate.Tenant

Or groups predicates with the OR operator between them.

func UpdatedAt

func UpdatedAt(v time.Time) predicate.Tenant

UpdatedAt applies equality check predicate on the "updated_at" field. It's identical to UpdatedAtEQ.

func UpdatedAtEQ

func UpdatedAtEQ(v time.Time) predicate.Tenant

UpdatedAtEQ applies the EQ predicate on the "updated_at" field.

func UpdatedAtGT

func UpdatedAtGT(v time.Time) predicate.Tenant

UpdatedAtGT applies the GT predicate on the "updated_at" field.

func UpdatedAtGTE

func UpdatedAtGTE(v time.Time) predicate.Tenant

UpdatedAtGTE applies the GTE predicate on the "updated_at" field.

func UpdatedAtIn

func UpdatedAtIn(vs ...time.Time) predicate.Tenant

UpdatedAtIn applies the In predicate on the "updated_at" field.

func UpdatedAtLT

func UpdatedAtLT(v time.Time) predicate.Tenant

UpdatedAtLT applies the LT predicate on the "updated_at" field.

func UpdatedAtLTE

func UpdatedAtLTE(v time.Time) predicate.Tenant

UpdatedAtLTE applies the LTE predicate on the "updated_at" field.

func UpdatedAtNEQ

func UpdatedAtNEQ(v time.Time) predicate.Tenant

UpdatedAtNEQ applies the NEQ predicate on the "updated_at" field.

func UpdatedAtNotIn

func UpdatedAtNotIn(vs ...time.Time) predicate.Tenant

UpdatedAtNotIn applies the NotIn predicate on the "updated_at" 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 Tenant queries.

func ByCreatedAt

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

ByCreatedAt orders the results by the created_at field.

func ByExecutions

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

ByExecutions orders the results by executions terms.

func ByExecutionsCount

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

ByExecutionsCount orders the results by executions count.

func ByFunctions

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

ByFunctions orders the results by functions terms.

func ByFunctionsCount

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

ByFunctionsCount orders the results by functions count.

func ByID

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

ByID orders the results by the id field.

func ByMaxConcurrent

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

ByMaxConcurrent orders the results by the max_concurrent field.

func ByMaxFunctions

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

ByMaxFunctions orders the results by the max_functions field.

func ByMaxMemoryMB

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

ByMaxMemoryMB orders the results by the max_memory_mb field.

func ByMaxStorageMB

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

ByMaxStorageMB orders the results by the max_storage_mb field.

func ByName

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

ByName orders the results by the name field.

func ByNamespace

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

ByNamespace orders the results by the namespace field.

func ByUpdatedAt

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

ByUpdatedAt orders the results by the updated_at field.

Jump to

Keyboard shortcuts

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