resourcerelationship

package
v0.5.0-rc3 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the resourcerelationship type in the database.
	Label = "resource_relationship"
	// FieldID holds the string denoting the id field in the database.
	FieldID = "id"
	// FieldCreateTime holds the string denoting the create_time field in the database.
	FieldCreateTime = "create_time"
	// FieldResourceID holds the string denoting the resource_id field in the database.
	FieldResourceID = "resource_id"
	// FieldDependencyID holds the string denoting the dependency_id field in the database.
	FieldDependencyID = "dependency_id"
	// FieldPath holds the string denoting the path field in the database.
	FieldPath = "path"
	// FieldType holds the string denoting the type field in the database.
	FieldType = "type"
	// EdgeResource holds the string denoting the resource edge name in mutations.
	EdgeResource = "resource"
	// EdgeDependency holds the string denoting the dependency edge name in mutations.
	EdgeDependency = "dependency"
	// Table holds the table name of the resourcerelationship in the database.
	Table = "resource_relationships"
	// ResourceTable is the table that holds the resource relation/edge.
	ResourceTable = "resource_relationships"
	// 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"
	// ResourceColumn is the table column denoting the resource relation/edge.
	ResourceColumn = "resource_id"
	// DependencyTable is the table that holds the dependency relation/edge.
	DependencyTable = "resource_relationships"
	// DependencyInverseTable is the table name for the Resource entity.
	// It exists in this package in order to avoid circular dependency with the "resource" package.
	DependencyInverseTable = "resources"
	// DependencyColumn is the table column denoting the dependency relation/edge.
	DependencyColumn = "dependency_id"
)

Variables

View Source
var (
	Hooks [1]ent.Hook
	// DefaultCreateTime holds the default value on creation for the "create_time" field.
	DefaultCreateTime func() time.Time
	// ResourceIDValidator is a validator for the "resource_id" field. It is called by the builders before save.
	ResourceIDValidator func(string) error
	// DependencyIDValidator is a validator for the "dependency_id" field. It is called by the builders before save.
	DependencyIDValidator func(string) error
	// DefaultPath holds the default value on creation for the "path" field.
	DefaultPath []object.ID
	// TypeValidator is a validator for the "type" field. It is called by the builders before save.
	TypeValidator func(string) error
)

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

Functions

func And

And groups predicates with the AND operator between them.

func CreateTime

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

func CreateTimeEQ

func CreateTimeEQ(v time.Time) predicate.ResourceRelationship

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

func CreateTimeGT

func CreateTimeGT(v time.Time) predicate.ResourceRelationship

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

func CreateTimeGTE

func CreateTimeGTE(v time.Time) predicate.ResourceRelationship

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

func CreateTimeIn

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

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

func CreateTimeLT

func CreateTimeLT(v time.Time) predicate.ResourceRelationship

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

func CreateTimeLTE

func CreateTimeLTE(v time.Time) predicate.ResourceRelationship

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

func CreateTimeNEQ

func CreateTimeNEQ(v time.Time) predicate.ResourceRelationship

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

func CreateTimeNotIn

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

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

func DependencyID

func DependencyID(v object.ID) predicate.ResourceRelationship

DependencyID applies equality check predicate on the "dependency_id" field. It's identical to DependencyIDEQ.

func DependencyIDContains

func DependencyIDContains(v object.ID) predicate.ResourceRelationship

DependencyIDContains applies the Contains predicate on the "dependency_id" field.

func DependencyIDContainsFold

func DependencyIDContainsFold(v object.ID) predicate.ResourceRelationship

DependencyIDContainsFold applies the ContainsFold predicate on the "dependency_id" field.

func DependencyIDEQ

func DependencyIDEQ(v object.ID) predicate.ResourceRelationship

DependencyIDEQ applies the EQ predicate on the "dependency_id" field.

func DependencyIDEqualFold

func DependencyIDEqualFold(v object.ID) predicate.ResourceRelationship

DependencyIDEqualFold applies the EqualFold predicate on the "dependency_id" field.

func DependencyIDGT

func DependencyIDGT(v object.ID) predicate.ResourceRelationship

DependencyIDGT applies the GT predicate on the "dependency_id" field.

func DependencyIDGTE

func DependencyIDGTE(v object.ID) predicate.ResourceRelationship

DependencyIDGTE applies the GTE predicate on the "dependency_id" field.

func DependencyIDHasPrefix

func DependencyIDHasPrefix(v object.ID) predicate.ResourceRelationship

DependencyIDHasPrefix applies the HasPrefix predicate on the "dependency_id" field.

func DependencyIDHasSuffix

func DependencyIDHasSuffix(v object.ID) predicate.ResourceRelationship

DependencyIDHasSuffix applies the HasSuffix predicate on the "dependency_id" field.

func DependencyIDIn

func DependencyIDIn(vs ...object.ID) predicate.ResourceRelationship

DependencyIDIn applies the In predicate on the "dependency_id" field.

func DependencyIDLT

func DependencyIDLT(v object.ID) predicate.ResourceRelationship

DependencyIDLT applies the LT predicate on the "dependency_id" field.

func DependencyIDLTE

func DependencyIDLTE(v object.ID) predicate.ResourceRelationship

DependencyIDLTE applies the LTE predicate on the "dependency_id" field.

func DependencyIDNEQ

func DependencyIDNEQ(v object.ID) predicate.ResourceRelationship

DependencyIDNEQ applies the NEQ predicate on the "dependency_id" field.

func DependencyIDNotIn

func DependencyIDNotIn(vs ...object.ID) predicate.ResourceRelationship

DependencyIDNotIn applies the NotIn predicate on the "dependency_id" field.

func HasDependency

func HasDependency() predicate.ResourceRelationship

HasDependency applies the HasEdge predicate on the "dependency" edge.

func HasDependencyWith

func HasDependencyWith(preds ...predicate.Resource) predicate.ResourceRelationship

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

func HasResource

func HasResource() predicate.ResourceRelationship

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

func HasResourceWith

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

HasResourceWith applies the HasEdge predicate on the "resource" 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.ResourceRelationship

IDNotIn applies the NotIn predicate on the ID field.

func Not

Not applies the not operator on the given predicate.

func Or

Or groups predicates with the OR operator between them.

func ResourceID

ResourceID applies equality check predicate on the "resource_id" field. It's identical to ResourceIDEQ.

func ResourceIDContains

func ResourceIDContains(v object.ID) predicate.ResourceRelationship

ResourceIDContains applies the Contains predicate on the "resource_id" field.

func ResourceIDContainsFold

func ResourceIDContainsFold(v object.ID) predicate.ResourceRelationship

ResourceIDContainsFold applies the ContainsFold predicate on the "resource_id" field.

func ResourceIDEQ

func ResourceIDEQ(v object.ID) predicate.ResourceRelationship

ResourceIDEQ applies the EQ predicate on the "resource_id" field.

func ResourceIDEqualFold

func ResourceIDEqualFold(v object.ID) predicate.ResourceRelationship

ResourceIDEqualFold applies the EqualFold predicate on the "resource_id" field.

func ResourceIDGT

func ResourceIDGT(v object.ID) predicate.ResourceRelationship

ResourceIDGT applies the GT predicate on the "resource_id" field.

func ResourceIDGTE

func ResourceIDGTE(v object.ID) predicate.ResourceRelationship

ResourceIDGTE applies the GTE predicate on the "resource_id" field.

func ResourceIDHasPrefix

func ResourceIDHasPrefix(v object.ID) predicate.ResourceRelationship

ResourceIDHasPrefix applies the HasPrefix predicate on the "resource_id" field.

func ResourceIDHasSuffix

func ResourceIDHasSuffix(v object.ID) predicate.ResourceRelationship

ResourceIDHasSuffix applies the HasSuffix predicate on the "resource_id" field.

func ResourceIDIn

func ResourceIDIn(vs ...object.ID) predicate.ResourceRelationship

ResourceIDIn applies the In predicate on the "resource_id" field.

func ResourceIDLT

func ResourceIDLT(v object.ID) predicate.ResourceRelationship

ResourceIDLT applies the LT predicate on the "resource_id" field.

func ResourceIDLTE

func ResourceIDLTE(v object.ID) predicate.ResourceRelationship

ResourceIDLTE applies the LTE predicate on the "resource_id" field.

func ResourceIDNEQ

func ResourceIDNEQ(v object.ID) predicate.ResourceRelationship

ResourceIDNEQ applies the NEQ predicate on the "resource_id" field.

func ResourceIDNotIn

func ResourceIDNotIn(vs ...object.ID) predicate.ResourceRelationship

ResourceIDNotIn applies the NotIn predicate on the "resource_id" field.

func Type

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

func TypeContains

func TypeContains(v string) predicate.ResourceRelationship

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

func TypeContainsFold

func TypeContainsFold(v string) predicate.ResourceRelationship

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.ResourceRelationship

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.ResourceRelationship

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

func TypeHasSuffix

func TypeHasSuffix(v string) predicate.ResourceRelationship

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

func TypeIn

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.ResourceRelationship

TypeNotIn applies the NotIn predicate on the "type" 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 ResourceRelationship queries.

func ByCreateTime

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

ByCreateTime orders the results by the create_time field.

func ByDependencyField

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

ByDependencyField orders the results by dependency field.

func ByDependencyID

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

ByDependencyID orders the results by the dependency_id field.

func ByID

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

ByID orders the results by the id field.

func ByResourceField

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

ByResourceField orders the results by resource field.

func ByResourceID

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

ByResourceID orders the results by the resource_id field.

func ByType

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

ByType orders the results by the type field.

Jump to

Keyboard shortcuts

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