resourcedefinition

package
v0.4.0-rc3 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the resourcedefinition type in the database.
	Label = "resource_definition"
	// 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"
	// FieldDescription holds the string denoting the description field in the database.
	FieldDescription = "description"
	// FieldLabels holds the string denoting the labels field in the database.
	FieldLabels = "labels"
	// FieldAnnotations holds the string denoting the annotations field in the database.
	FieldAnnotations = "annotations"
	// FieldCreateTime holds the string denoting the create_time field in the database.
	FieldCreateTime = "create_time"
	// FieldUpdateTime holds the string denoting the update_time field in the database.
	FieldUpdateTime = "update_time"
	// FieldType holds the string denoting the type field in the database.
	FieldType = "type"
	// FieldSchema holds the string denoting the schema field in the database.
	FieldSchema = "schema"
	// FieldUiSchema holds the string denoting the uischema field in the database.
	FieldUiSchema = "ui_schema"
	// EdgeMatchingRules holds the string denoting the matching_rules edge name in mutations.
	EdgeMatchingRules = "matching_rules"
	// EdgeResources holds the string denoting the resources edge name in mutations.
	EdgeResources = "resources"
	// Table holds the table name of the resourcedefinition in the database.
	Table = "resource_definitions"
	// MatchingRulesTable is the table that holds the matching_rules relation/edge.
	MatchingRulesTable = "resource_definition_matching_rules"
	// MatchingRulesInverseTable is the table name for the ResourceDefinitionMatchingRule entity.
	// It exists in this package in order to avoid circular dependency with the "resourcedefinitionmatchingrule" package.
	MatchingRulesInverseTable = "resource_definition_matching_rules"
	// MatchingRulesColumn is the table column denoting the matching_rules relation/edge.
	MatchingRulesColumn = "resource_definition_id"
	// ResourcesTable is the table that holds the resources relation/edge.
	ResourcesTable = "resources"
	// ResourcesInverseTable is the table name for the Resource entity.
	// It exists in this package in order to avoid circular dependency with the "resource" package.
	ResourcesInverseTable = "resources"
	// ResourcesColumn is the table column denoting the resources relation/edge.
	ResourcesColumn = "resource_definition_id"
)

Variables

View Source
var (
	Hooks [1]ent.Hook
	// NameValidator is a validator for the "name" field. It is called by the builders before save.
	NameValidator func(string) error
	// DefaultLabels holds the default value on creation for the "labels" field.
	DefaultLabels map[string]string
	// DefaultAnnotations holds the default value on creation for the "annotations" field.
	DefaultAnnotations map[string]string
	// DefaultCreateTime holds the default value on creation for the "create_time" field.
	DefaultCreateTime func() time.Time
	// DefaultUpdateTime holds the default value on creation for the "update_time" field.
	DefaultUpdateTime func() time.Time
	// UpdateDefaultUpdateTime holds the default value on update for the "update_time" field.
	UpdateDefaultUpdateTime func() time.Time
	// DefaultSchema holds the default value on creation for the "schema" field.
	DefaultSchema types.Schema
	// DefaultUiSchema holds the default value on creation for the "uiSchema" field.
	DefaultUiSchema *types.UISchema
)

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 resourcedefinition fields.

Functions

func And

And groups predicates with the AND operator between them.

func AnnotationsIsNil

func AnnotationsIsNil() predicate.ResourceDefinition

AnnotationsIsNil applies the IsNil predicate on the "annotations" field.

func AnnotationsNotNil

func AnnotationsNotNil() predicate.ResourceDefinition

AnnotationsNotNil applies the NotNil predicate on the "annotations" field.

func CreateTime

func CreateTime(v time.Time) predicate.ResourceDefinition

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

func CreateTimeEQ

func CreateTimeEQ(v time.Time) predicate.ResourceDefinition

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

func CreateTimeGT

func CreateTimeGT(v time.Time) predicate.ResourceDefinition

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

func CreateTimeGTE

func CreateTimeGTE(v time.Time) predicate.ResourceDefinition

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

func CreateTimeIn

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

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

func CreateTimeLT

func CreateTimeLT(v time.Time) predicate.ResourceDefinition

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

func CreateTimeLTE

func CreateTimeLTE(v time.Time) predicate.ResourceDefinition

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

func CreateTimeNEQ

func CreateTimeNEQ(v time.Time) predicate.ResourceDefinition

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

func CreateTimeNotIn

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

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

func Description

func Description(v string) predicate.ResourceDefinition

Description applies equality check predicate on the "description" field. It's identical to DescriptionEQ.

func DescriptionContains

func DescriptionContains(v string) predicate.ResourceDefinition

DescriptionContains applies the Contains predicate on the "description" field.

func DescriptionContainsFold

func DescriptionContainsFold(v string) predicate.ResourceDefinition

DescriptionContainsFold applies the ContainsFold predicate on the "description" field.

func DescriptionEQ

func DescriptionEQ(v string) predicate.ResourceDefinition

DescriptionEQ applies the EQ predicate on the "description" field.

func DescriptionEqualFold

func DescriptionEqualFold(v string) predicate.ResourceDefinition

DescriptionEqualFold applies the EqualFold predicate on the "description" field.

func DescriptionGT

func DescriptionGT(v string) predicate.ResourceDefinition

DescriptionGT applies the GT predicate on the "description" field.

func DescriptionGTE

func DescriptionGTE(v string) predicate.ResourceDefinition

DescriptionGTE applies the GTE predicate on the "description" field.

func DescriptionHasPrefix

func DescriptionHasPrefix(v string) predicate.ResourceDefinition

DescriptionHasPrefix applies the HasPrefix predicate on the "description" field.

func DescriptionHasSuffix

func DescriptionHasSuffix(v string) predicate.ResourceDefinition

DescriptionHasSuffix applies the HasSuffix predicate on the "description" field.

func DescriptionIn

func DescriptionIn(vs ...string) predicate.ResourceDefinition

DescriptionIn applies the In predicate on the "description" field.

func DescriptionIsNil

func DescriptionIsNil() predicate.ResourceDefinition

DescriptionIsNil applies the IsNil predicate on the "description" field.

func DescriptionLT

func DescriptionLT(v string) predicate.ResourceDefinition

DescriptionLT applies the LT predicate on the "description" field.

func DescriptionLTE

func DescriptionLTE(v string) predicate.ResourceDefinition

DescriptionLTE applies the LTE predicate on the "description" field.

func DescriptionNEQ

func DescriptionNEQ(v string) predicate.ResourceDefinition

DescriptionNEQ applies the NEQ predicate on the "description" field.

func DescriptionNotIn

func DescriptionNotIn(vs ...string) predicate.ResourceDefinition

DescriptionNotIn applies the NotIn predicate on the "description" field.

func DescriptionNotNil

func DescriptionNotNil() predicate.ResourceDefinition

DescriptionNotNil applies the NotNil predicate on the "description" field.

func HasMatchingRules

func HasMatchingRules() predicate.ResourceDefinition

HasMatchingRules applies the HasEdge predicate on the "matching_rules" edge.

func HasMatchingRulesWith

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

func HasResources

func HasResources() predicate.ResourceDefinition

HasResources applies the HasEdge predicate on the "resources" edge.

func HasResourcesWith

func HasResourcesWith(preds ...predicate.Resource) predicate.ResourceDefinition

HasResourcesWith applies the HasEdge predicate on the "resources" 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

func IDNotIn(ids ...object.ID) predicate.ResourceDefinition

IDNotIn applies the NotIn predicate on the ID field.

func LabelsIsNil

func LabelsIsNil() predicate.ResourceDefinition

LabelsIsNil applies the IsNil predicate on the "labels" field.

func LabelsNotNil

func LabelsNotNil() predicate.ResourceDefinition

LabelsNotNil applies the NotNil predicate on the "labels" field.

func Name

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

func NameContains

func NameContains(v string) predicate.ResourceDefinition

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

func NameContainsFold

func NameContainsFold(v string) predicate.ResourceDefinition

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

func NameEQ

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

func NameEqualFold

func NameEqualFold(v string) predicate.ResourceDefinition

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

func NameGT

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

func NameGTE

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

func NameHasPrefix

func NameHasPrefix(v string) predicate.ResourceDefinition

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

func NameHasSuffix

func NameHasSuffix(v string) predicate.ResourceDefinition

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

func NameIn

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

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

func NameLT

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

func NameLTE

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

func NameNEQ

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

func NameNotIn

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

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

func Not

Not applies the not operator on the given predicate.

func Or

Or groups predicates with the OR operator between them.

func Type

Type applies equality check predicate on the "type" field. It's identical to TypeEQ.

func TypeContains

func TypeContains(v string) predicate.ResourceDefinition

TypeContains applies the Contains predicate on the "type" field.

func TypeContainsFold

func TypeContainsFold(v string) predicate.ResourceDefinition

TypeContainsFold applies the ContainsFold predicate on the "type" field.

func TypeEQ

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

func TypeEqualFold

func TypeEqualFold(v string) predicate.ResourceDefinition

TypeEqualFold applies the EqualFold predicate on the "type" field.

func TypeGT

TypeGT applies the GT predicate on the "type" field.

func TypeGTE

TypeGTE applies the GTE predicate on the "type" field.

func TypeHasPrefix

func TypeHasPrefix(v string) predicate.ResourceDefinition

TypeHasPrefix applies the HasPrefix predicate on the "type" field.

func TypeHasSuffix

func TypeHasSuffix(v string) predicate.ResourceDefinition

TypeHasSuffix applies the HasSuffix predicate on the "type" field.

func TypeIn

func TypeIn(vs ...string) predicate.ResourceDefinition

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

func TypeLT

TypeLT applies the LT predicate on the "type" field.

func TypeLTE

TypeLTE applies the LTE predicate on the "type" field.

func TypeNEQ

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

func TypeNotIn

func TypeNotIn(vs ...string) predicate.ResourceDefinition

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

func UiSchemaIsNil

func UiSchemaIsNil() predicate.ResourceDefinition

UiSchemaIsNil applies the IsNil predicate on the "uiSchema" field.

func UiSchemaNotNil

func UiSchemaNotNil() predicate.ResourceDefinition

UiSchemaNotNil applies the NotNil predicate on the "uiSchema" field.

func UpdateTime

func UpdateTime(v time.Time) predicate.ResourceDefinition

UpdateTime applies equality check predicate on the "update_time" field. It's identical to UpdateTimeEQ.

func UpdateTimeEQ

func UpdateTimeEQ(v time.Time) predicate.ResourceDefinition

UpdateTimeEQ applies the EQ predicate on the "update_time" field.

func UpdateTimeGT

func UpdateTimeGT(v time.Time) predicate.ResourceDefinition

UpdateTimeGT applies the GT predicate on the "update_time" field.

func UpdateTimeGTE

func UpdateTimeGTE(v time.Time) predicate.ResourceDefinition

UpdateTimeGTE applies the GTE predicate on the "update_time" field.

func UpdateTimeIn

func UpdateTimeIn(vs ...time.Time) predicate.ResourceDefinition

UpdateTimeIn applies the In predicate on the "update_time" field.

func UpdateTimeLT

func UpdateTimeLT(v time.Time) predicate.ResourceDefinition

UpdateTimeLT applies the LT predicate on the "update_time" field.

func UpdateTimeLTE

func UpdateTimeLTE(v time.Time) predicate.ResourceDefinition

UpdateTimeLTE applies the LTE predicate on the "update_time" field.

func UpdateTimeNEQ

func UpdateTimeNEQ(v time.Time) predicate.ResourceDefinition

UpdateTimeNEQ applies the NEQ predicate on the "update_time" field.

func UpdateTimeNotIn

func UpdateTimeNotIn(vs ...time.Time) predicate.ResourceDefinition

UpdateTimeNotIn applies the NotIn predicate on the "update_time" 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 ResourceDefinition queries.

func ByCreateTime

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

ByCreateTime orders the results by the create_time field.

func ByDescription

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

ByDescription orders the results by the description field.

func ByID

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

ByID orders the results by the id field.

func ByMatchingRules

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

ByMatchingRules orders the results by matching_rules terms.

func ByMatchingRulesCount

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

ByMatchingRulesCount orders the results by matching_rules count.

func ByName

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

ByName orders the results by the name field.

func ByResources

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

ByResources orders the results by resources terms.

func ByResourcesCount

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

ByResourcesCount orders the results by resources count.

func ByType

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

ByType orders the results by the type field.

func ByUpdateTime

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

ByUpdateTime orders the results by the update_time field.

Jump to

Keyboard shortcuts

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