resource

package
v0.0.0-...-e59a564 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the resource type in the database.
	Label = "resource"
	// FieldID holds the string denoting the id field in the database.
	FieldID = "id"
	// 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"
	// FieldType holds the string denoting the type field in the database.
	FieldType = "type"
	// FieldKey holds the string denoting the key field in the database.
	FieldKey = "key"
	// FieldResourceType holds the string denoting the resource_type field in the database.
	FieldResourceType = "resource_type"
	// FieldFeatures holds the string denoting the features field in the database.
	FieldFeatures = "features"
	// FieldQuotaRequirements holds the string denoting the quota_requirements field in the database.
	FieldQuotaRequirements = "quota_requirements"
	// FieldObject holds the string denoting the object field in the database.
	FieldObject = "object"
	// EdgeBlueprint holds the string denoting the blueprint edge name in mutations.
	EdgeBlueprint = "blueprint"
	// EdgeDependsOn holds the string denoting the depends_on edge name in mutations.
	EdgeDependsOn = "depends_on"
	// EdgeRequiredBy holds the string denoting the required_by edge name in mutations.
	EdgeRequiredBy = "required_by"
	// Table holds the table name of the resource in the database.
	Table = "resources"
	// BlueprintTable is the table that holds the blueprint relation/edge.
	BlueprintTable = "resources"
	// BlueprintInverseTable is the table name for the Blueprint entity.
	// It exists in this package in order to avoid circular dependency with the "blueprint" package.
	BlueprintInverseTable = "blueprints"
	// BlueprintColumn is the table column denoting the blueprint relation/edge.
	BlueprintColumn = "resource_blueprint"
	// DependsOnTable is the table that holds the depends_on relation/edge. The primary key declared below.
	DependsOnTable = "resource_required_by"
	// RequiredByTable is the table that holds the required_by relation/edge. The primary key declared below.
	RequiredByTable = "resource_required_by"
)
View Source
const DefaultType = TypeResource

TypeResource is the default value of the Type enum.

Variables

View Source
var (
	// DependsOnPrimaryKey and DependsOnColumn2 are the table columns denoting the
	// primary key for the depends_on relation (M2M).
	DependsOnPrimaryKey = []string{"resource_id", "depends_on_id"}
	// RequiredByPrimaryKey and RequiredByColumn2 are the table columns denoting the
	// primary key for the required_by relation (M2M).
	RequiredByPrimaryKey = []string{"resource_id", "depends_on_id"}
)
View Source
var (
	// 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
	// DefaultFeatures holds the default value on creation for the "features" field.
	DefaultFeatures provider.Features
	// DefaultQuotaRequirements holds the default value on creation for the "quota_requirements" field.
	DefaultQuotaRequirements provider.QuotaRequirements
	// DefaultID holds the default value on creation for the "id" field.
	DefaultID func() uuid.UUID
)

Columns holds all SQL columns for resource fields.

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

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

Functions

func And

func And(predicates ...predicate.Resource) predicate.Resource

And groups predicates with the AND operator between them.

func CreatedAt

func CreatedAt(v time.Time) predicate.Resource

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

func CreatedAtEQ

func CreatedAtEQ(v time.Time) predicate.Resource

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

func CreatedAtGT

func CreatedAtGT(v time.Time) predicate.Resource

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

func CreatedAtGTE

func CreatedAtGTE(v time.Time) predicate.Resource

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

func CreatedAtIn

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

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

func CreatedAtLT

func CreatedAtLT(v time.Time) predicate.Resource

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

func CreatedAtLTE

func CreatedAtLTE(v time.Time) predicate.Resource

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

func CreatedAtNEQ

func CreatedAtNEQ(v time.Time) predicate.Resource

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

func CreatedAtNotIn

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

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

func FeaturesIsNil

func FeaturesIsNil() predicate.Resource

FeaturesIsNil applies the IsNil predicate on the "features" field.

func FeaturesNotNil

func FeaturesNotNil() predicate.Resource

FeaturesNotNil applies the NotNil predicate on the "features" field.

func HasBlueprint

func HasBlueprint() predicate.Resource

HasBlueprint applies the HasEdge predicate on the "blueprint" edge.

func HasBlueprintWith

func HasBlueprintWith(preds ...predicate.Blueprint) predicate.Resource

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

func HasDependsOn

func HasDependsOn() predicate.Resource

HasDependsOn applies the HasEdge predicate on the "depends_on" edge.

func HasDependsOnWith

func HasDependsOnWith(preds ...predicate.Resource) predicate.Resource

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

func HasRequiredBy

func HasRequiredBy() predicate.Resource

HasRequiredBy applies the HasEdge predicate on the "required_by" edge.

func HasRequiredByWith

func HasRequiredByWith(preds ...predicate.Resource) predicate.Resource

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

func ID

func ID(id uuid.UUID) predicate.Resource

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id uuid.UUID) predicate.Resource

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id uuid.UUID) predicate.Resource

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id uuid.UUID) predicate.Resource

IDGTE applies the GTE predicate on the ID field.

func IDIn

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

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id uuid.UUID) predicate.Resource

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id uuid.UUID) predicate.Resource

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id uuid.UUID) predicate.Resource

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

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

IDNotIn applies the NotIn predicate on the ID field.

func Key

func Key(v string) predicate.Resource

Key applies equality check predicate on the "key" field. It's identical to KeyEQ.

func KeyContains

func KeyContains(v string) predicate.Resource

KeyContains applies the Contains predicate on the "key" field.

func KeyContainsFold

func KeyContainsFold(v string) predicate.Resource

KeyContainsFold applies the ContainsFold predicate on the "key" field.

func KeyEQ

func KeyEQ(v string) predicate.Resource

KeyEQ applies the EQ predicate on the "key" field.

func KeyEqualFold

func KeyEqualFold(v string) predicate.Resource

KeyEqualFold applies the EqualFold predicate on the "key" field.

func KeyGT

func KeyGT(v string) predicate.Resource

KeyGT applies the GT predicate on the "key" field.

func KeyGTE

func KeyGTE(v string) predicate.Resource

KeyGTE applies the GTE predicate on the "key" field.

func KeyHasPrefix

func KeyHasPrefix(v string) predicate.Resource

KeyHasPrefix applies the HasPrefix predicate on the "key" field.

func KeyHasSuffix

func KeyHasSuffix(v string) predicate.Resource

KeyHasSuffix applies the HasSuffix predicate on the "key" field.

func KeyIn

func KeyIn(vs ...string) predicate.Resource

KeyIn applies the In predicate on the "key" field.

func KeyLT

func KeyLT(v string) predicate.Resource

KeyLT applies the LT predicate on the "key" field.

func KeyLTE

func KeyLTE(v string) predicate.Resource

KeyLTE applies the LTE predicate on the "key" field.

func KeyNEQ

func KeyNEQ(v string) predicate.Resource

KeyNEQ applies the NEQ predicate on the "key" field.

func KeyNotIn

func KeyNotIn(vs ...string) predicate.Resource

KeyNotIn applies the NotIn predicate on the "key" field.

func Not

Not applies the not operator on the given predicate.

func Or

func Or(predicates ...predicate.Resource) predicate.Resource

Or groups predicates with the OR operator between them.

func QuotaRequirementsIsNil

func QuotaRequirementsIsNil() predicate.Resource

QuotaRequirementsIsNil applies the IsNil predicate on the "quota_requirements" field.

func QuotaRequirementsNotNil

func QuotaRequirementsNotNil() predicate.Resource

QuotaRequirementsNotNil applies the NotNil predicate on the "quota_requirements" field.

func ResourceType

func ResourceType(v string) predicate.Resource

ResourceType applies equality check predicate on the "resource_type" field. It's identical to ResourceTypeEQ.

func ResourceTypeContains

func ResourceTypeContains(v string) predicate.Resource

ResourceTypeContains applies the Contains predicate on the "resource_type" field.

func ResourceTypeContainsFold

func ResourceTypeContainsFold(v string) predicate.Resource

ResourceTypeContainsFold applies the ContainsFold predicate on the "resource_type" field.

func ResourceTypeEQ

func ResourceTypeEQ(v string) predicate.Resource

ResourceTypeEQ applies the EQ predicate on the "resource_type" field.

func ResourceTypeEqualFold

func ResourceTypeEqualFold(v string) predicate.Resource

ResourceTypeEqualFold applies the EqualFold predicate on the "resource_type" field.

func ResourceTypeGT

func ResourceTypeGT(v string) predicate.Resource

ResourceTypeGT applies the GT predicate on the "resource_type" field.

func ResourceTypeGTE

func ResourceTypeGTE(v string) predicate.Resource

ResourceTypeGTE applies the GTE predicate on the "resource_type" field.

func ResourceTypeHasPrefix

func ResourceTypeHasPrefix(v string) predicate.Resource

ResourceTypeHasPrefix applies the HasPrefix predicate on the "resource_type" field.

func ResourceTypeHasSuffix

func ResourceTypeHasSuffix(v string) predicate.Resource

ResourceTypeHasSuffix applies the HasSuffix predicate on the "resource_type" field.

func ResourceTypeIn

func ResourceTypeIn(vs ...string) predicate.Resource

ResourceTypeIn applies the In predicate on the "resource_type" field.

func ResourceTypeLT

func ResourceTypeLT(v string) predicate.Resource

ResourceTypeLT applies the LT predicate on the "resource_type" field.

func ResourceTypeLTE

func ResourceTypeLTE(v string) predicate.Resource

ResourceTypeLTE applies the LTE predicate on the "resource_type" field.

func ResourceTypeNEQ

func ResourceTypeNEQ(v string) predicate.Resource

ResourceTypeNEQ applies the NEQ predicate on the "resource_type" field.

func ResourceTypeNotIn

func ResourceTypeNotIn(vs ...string) predicate.Resource

ResourceTypeNotIn applies the NotIn predicate on the "resource_type" field.

func TypeEQ

func TypeEQ(v Type) predicate.Resource

TypeEQ applies the EQ predicate on the "type" field.

func TypeIn

func TypeIn(vs ...Type) predicate.Resource

TypeIn applies the In predicate on the "type" field.

func TypeNEQ

func TypeNEQ(v Type) predicate.Resource

TypeNEQ applies the NEQ predicate on the "type" field.

func TypeNotIn

func TypeNotIn(vs ...Type) predicate.Resource

TypeNotIn applies the NotIn predicate on the "type" field.

func TypeValidator

func TypeValidator(_type Type) error

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

func UpdatedAt

func UpdatedAt(v time.Time) predicate.Resource

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

func UpdatedAtEQ

func UpdatedAtEQ(v time.Time) predicate.Resource

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

func UpdatedAtGT

func UpdatedAtGT(v time.Time) predicate.Resource

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

func UpdatedAtGTE

func UpdatedAtGTE(v time.Time) predicate.Resource

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

func UpdatedAtIn

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

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

func UpdatedAtLT

func UpdatedAtLT(v time.Time) predicate.Resource

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

func UpdatedAtLTE

func UpdatedAtLTE(v time.Time) predicate.Resource

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

func UpdatedAtNEQ

func UpdatedAtNEQ(v time.Time) predicate.Resource

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

func UpdatedAtNotIn

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

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

func ByBlueprintField

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

ByBlueprintField orders the results by blueprint field.

func ByCreatedAt

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

ByCreatedAt orders the results by the created_at field.

func ByDependsOn

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

ByDependsOn orders the results by depends_on terms.

func ByDependsOnCount

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

ByDependsOnCount orders the results by depends_on count.

func ByID

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

ByID orders the results by the id field.

func ByKey

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

ByKey orders the results by the key field.

func ByRequiredBy

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

ByRequiredBy orders the results by required_by terms.

func ByRequiredByCount

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

ByRequiredByCount orders the results by required_by count.

func ByResourceType

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

ByResourceType orders the results by the resource_type field.

func ByType

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

ByType orders the results by the type field.

func ByUpdatedAt

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

ByUpdatedAt orders the results by the updated_at field.

type Type

type Type string

Type defines the type for the "type" enum field.

const (
	TypeResource Type = "resource"
	TypeData     Type = "data"
)

Type values.

func (Type) String

func (_type Type) String() string

Jump to

Keyboard shortcuts

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