resourcestate

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the resourcestate type in the database.
	Label = "resource_state"
	// FieldID holds the string denoting the id field in the database.
	FieldID = "id"
	// FieldData holds the string denoting the data field in the database.
	FieldData = "data"
	// FieldResourceID holds the string denoting the resource_id field in the database.
	FieldResourceID = "resource_id"
	// EdgeResource holds the string denoting the resource edge name in mutations.
	EdgeResource = "resource"
	// Table holds the table name of the resourcestate in the database.
	Table = "resource_states"
	// ResourceTable is the table that holds the resource relation/edge.
	ResourceTable = "resource_states"
	// 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"
)

Variables

View Source
var (
	Hooks [1]ent.Hook
	// DefaultData holds the default value on creation for the "data" field.
	DefaultData string
	// ResourceIDValidator is a validator for the "resource_id" field. It is called by the builders before save.
	ResourceIDValidator 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 resourcestate fields.

Functions

func And

And groups predicates with the AND operator between them.

func Data

Data applies equality check predicate on the "data" field. It's identical to DataEQ.

func DataContains

func DataContains(v string) predicate.ResourceState

DataContains applies the Contains predicate on the "data" field.

func DataContainsFold

func DataContainsFold(v string) predicate.ResourceState

DataContainsFold applies the ContainsFold predicate on the "data" field.

func DataEQ

func DataEQ(v string) predicate.ResourceState

DataEQ applies the EQ predicate on the "data" field.

func DataEqualFold

func DataEqualFold(v string) predicate.ResourceState

DataEqualFold applies the EqualFold predicate on the "data" field.

func DataGT

func DataGT(v string) predicate.ResourceState

DataGT applies the GT predicate on the "data" field.

func DataGTE

func DataGTE(v string) predicate.ResourceState

DataGTE applies the GTE predicate on the "data" field.

func DataHasPrefix

func DataHasPrefix(v string) predicate.ResourceState

DataHasPrefix applies the HasPrefix predicate on the "data" field.

func DataHasSuffix

func DataHasSuffix(v string) predicate.ResourceState

DataHasSuffix applies the HasSuffix predicate on the "data" field.

func DataIn

func DataIn(vs ...string) predicate.ResourceState

DataIn applies the In predicate on the "data" field.

func DataLT

func DataLT(v string) predicate.ResourceState

DataLT applies the LT predicate on the "data" field.

func DataLTE

func DataLTE(v string) predicate.ResourceState

DataLTE applies the LTE predicate on the "data" field.

func DataNEQ

func DataNEQ(v string) predicate.ResourceState

DataNEQ applies the NEQ predicate on the "data" field.

func DataNotIn

func DataNotIn(vs ...string) predicate.ResourceState

DataNotIn applies the NotIn predicate on the "data" field.

func HasResource

func HasResource() predicate.ResourceState

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

func HasResourceWith

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

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

func IDGTE(id object.ID) predicate.ResourceState

IDGTE applies the GTE predicate on the ID field.

func IDIn

func IDIn(ids ...object.ID) predicate.ResourceState

IDIn applies the In predicate on the ID field.

func IDLT

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id object.ID) predicate.ResourceState

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id object.ID) predicate.ResourceState

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

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

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

func ResourceID(v object.ID) predicate.ResourceState

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

func ResourceIDContains

func ResourceIDContains(v object.ID) predicate.ResourceState

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

func ResourceIDContainsFold

func ResourceIDContainsFold(v object.ID) predicate.ResourceState

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

func ResourceIDEQ

func ResourceIDEQ(v object.ID) predicate.ResourceState

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

func ResourceIDEqualFold

func ResourceIDEqualFold(v object.ID) predicate.ResourceState

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

func ResourceIDGT

func ResourceIDGT(v object.ID) predicate.ResourceState

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

func ResourceIDGTE

func ResourceIDGTE(v object.ID) predicate.ResourceState

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

func ResourceIDHasPrefix

func ResourceIDHasPrefix(v object.ID) predicate.ResourceState

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

func ResourceIDHasSuffix

func ResourceIDHasSuffix(v object.ID) predicate.ResourceState

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

func ResourceIDIn

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

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

func ResourceIDLT

func ResourceIDLT(v object.ID) predicate.ResourceState

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

func ResourceIDLTE

func ResourceIDLTE(v object.ID) predicate.ResourceState

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

func ResourceIDNEQ

func ResourceIDNEQ(v object.ID) predicate.ResourceState

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

func ResourceIDNotIn

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

ResourceIDNotIn applies the NotIn predicate on the "resource_id" 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 ResourceState queries.

func ByData

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

ByData orders the results by the data 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.

Jump to

Keyboard shortcuts

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