identifiersentry

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the identifiersentry type in the database.
	Label = "identifiers_entry"
	// FieldID holds the string denoting the id field in the database.
	FieldID = "id"
	// FieldType holds the string denoting the type field in the database.
	FieldType = "type"
	// FieldValue holds the string denoting the value field in the database.
	FieldValue = "value"
	// EdgeDocuments holds the string denoting the documents edge name in mutations.
	EdgeDocuments = "documents"
	// EdgeNodes holds the string denoting the nodes edge name in mutations.
	EdgeNodes = "nodes"
	// Table holds the table name of the identifiersentry in the database.
	Table = "identifiers_entries"
	// DocumentsTable is the table that holds the documents relation/edge. The primary key declared below.
	DocumentsTable = "document_identifiers"
	// DocumentsInverseTable is the table name for the Document entity.
	// It exists in this package in order to avoid circular dependency with the "document" package.
	DocumentsInverseTable = "documents"
	// NodesTable is the table that holds the nodes relation/edge. The primary key declared below.
	NodesTable = "node_identifiers"
	// NodesInverseTable is the table name for the Node entity.
	// It exists in this package in order to avoid circular dependency with the "node" package.
	NodesInverseTable = "nodes"
)

Variables

View Source
var (
	// DocumentsPrimaryKey and DocumentsColumn2 are the table columns denoting the
	// primary key for the documents relation (M2M).
	DocumentsPrimaryKey = []string{"document_id", "identifiers_entry_id"}
	// NodesPrimaryKey and NodesColumn2 are the table columns denoting the
	// primary key for the nodes relation (M2M).
	NodesPrimaryKey = []string{"node_id", "identifier_entry_id"}
)
View Source
var (
	Hooks [1]ent.Hook
	// DefaultID holds the default value on creation for the "id" field.
	DefaultID func() uuid.UUID
)

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/protobom/storage/internal/backends/ent/runtime"

Columns holds all SQL columns for identifiersentry fields.

Functions

func And

And groups predicates with the AND operator between them.

func HasDocuments added in v0.2.0

func HasDocuments() predicate.IdentifiersEntry

HasDocuments applies the HasEdge predicate on the "documents" edge.

func HasDocumentsWith added in v0.2.0

func HasDocumentsWith(preds ...predicate.Document) predicate.IdentifiersEntry

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

func HasNodes added in v0.2.0

func HasNodes() predicate.IdentifiersEntry

HasNodes applies the HasEdge predicate on the "nodes" edge.

func HasNodesWith added in v0.2.0

func HasNodesWith(preds ...predicate.Node) predicate.IdentifiersEntry

HasNodesWith applies the HasEdge predicate on the "nodes" 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

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

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 ...uuid.UUID) predicate.IdentifiersEntry

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 TypeEQ added in v0.2.0

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

func TypeIn added in v0.2.0

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

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

func TypeNEQ added in v0.2.0

func TypeNEQ(v Type) predicate.IdentifiersEntry

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

func TypeNotIn added in v0.2.0

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

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

func TypeValidator added in v0.2.0

func TypeValidator(_type Type) error

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

func ValidColumn

func ValidColumn(column string) bool

ValidColumn reports if the column name is valid (part of the table columns).

func Value added in v0.2.0

Value applies equality check predicate on the "value" field. It's identical to ValueEQ.

func ValueContains added in v0.2.0

func ValueContains(v string) predicate.IdentifiersEntry

ValueContains applies the Contains predicate on the "value" field.

func ValueContainsFold added in v0.2.0

func ValueContainsFold(v string) predicate.IdentifiersEntry

ValueContainsFold applies the ContainsFold predicate on the "value" field.

func ValueEQ added in v0.2.0

ValueEQ applies the EQ predicate on the "value" field.

func ValueEqualFold added in v0.2.0

func ValueEqualFold(v string) predicate.IdentifiersEntry

ValueEqualFold applies the EqualFold predicate on the "value" field.

func ValueGT added in v0.2.0

ValueGT applies the GT predicate on the "value" field.

func ValueGTE added in v0.2.0

func ValueGTE(v string) predicate.IdentifiersEntry

ValueGTE applies the GTE predicate on the "value" field.

func ValueHasPrefix added in v0.2.0

func ValueHasPrefix(v string) predicate.IdentifiersEntry

ValueHasPrefix applies the HasPrefix predicate on the "value" field.

func ValueHasSuffix added in v0.2.0

func ValueHasSuffix(v string) predicate.IdentifiersEntry

ValueHasSuffix applies the HasSuffix predicate on the "value" field.

func ValueIn added in v0.2.0

func ValueIn(vs ...string) predicate.IdentifiersEntry

ValueIn applies the In predicate on the "value" field.

func ValueLT added in v0.2.0

ValueLT applies the LT predicate on the "value" field.

func ValueLTE added in v0.2.0

func ValueLTE(v string) predicate.IdentifiersEntry

ValueLTE applies the LTE predicate on the "value" field.

func ValueNEQ added in v0.2.0

func ValueNEQ(v string) predicate.IdentifiersEntry

ValueNEQ applies the NEQ predicate on the "value" field.

func ValueNotIn added in v0.2.0

func ValueNotIn(vs ...string) predicate.IdentifiersEntry

ValueNotIn applies the NotIn predicate on the "value" field.

Types

type OrderOption

type OrderOption func(*sql.Selector)

OrderOption defines the ordering options for the IdentifiersEntry queries.

func ByDocuments added in v0.2.0

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

ByDocuments orders the results by documents terms.

func ByDocumentsCount added in v0.2.0

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

ByDocumentsCount orders the results by documents count.

func ByID

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

ByID orders the results by the id field.

func ByNodes added in v0.2.0

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

ByNodes orders the results by nodes terms.

func ByNodesCount added in v0.2.0

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

ByNodesCount orders the results by nodes count.

func ByType added in v0.2.0

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

ByType orders the results by the type field.

func ByValue added in v0.2.0

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

ByValue orders the results by the value field.

type Type added in v0.2.0

type Type string

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

const (
	TypeUNKNOWN_IDENTIFIER_TYPE Type = "UNKNOWN_IDENTIFIER_TYPE"
	TypePURL                    Type = "PURL"
	TypeCPE22                   Type = "CPE22"
	TypeCPE23                   Type = "CPE23"
	TypeGITOID                  Type = "GITOID"
)

Type values.

func (Type) String added in v0.2.0

func (_type Type) String() string

Jump to

Keyboard shortcuts

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