tool

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 tool type in the database.
	Label = "tool"
	// FieldID holds the string denoting the id field in the database.
	FieldID = "id"
	// FieldProtoMessage holds the string denoting the proto_message field in the database.
	FieldProtoMessage = "proto_message"
	// FieldName holds the string denoting the name field in the database.
	FieldName = "name"
	// FieldVersion holds the string denoting the version field in the database.
	FieldVersion = "version"
	// FieldVendor holds the string denoting the vendor field in the database.
	FieldVendor = "vendor"
	// EdgeDocuments holds the string denoting the documents edge name in mutations.
	EdgeDocuments = "documents"
	// EdgeMetadata holds the string denoting the metadata edge name in mutations.
	EdgeMetadata = "metadata"
	// Table holds the table name of the tool in the database.
	Table = "tools"
	// DocumentsTable is the table that holds the documents relation/edge. The primary key declared below.
	DocumentsTable = "document_tools"
	// 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"
	// MetadataTable is the table that holds the metadata relation/edge. The primary key declared below.
	MetadataTable = "metadata_tools"
	// MetadataInverseTable is the table name for the Metadata entity.
	// It exists in this package in order to avoid circular dependency with the "metadata" package.
	MetadataInverseTable = "metadata"
)

Variables

View Source
var (
	// DocumentsPrimaryKey and DocumentsColumn2 are the table columns denoting the
	// primary key for the documents relation (M2M).
	DocumentsPrimaryKey = []string{"document_id", "tool_id"}
	// MetadataPrimaryKey and MetadataColumn2 are the table columns denoting the
	// primary key for the metadata relation (M2M).
	MetadataPrimaryKey = []string{"metadata_id", "tool_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 tool fields.

Functions

func And

func And(predicates ...predicate.Tool) predicate.Tool

And groups predicates with the AND operator between them.

func HasDocuments added in v0.2.0

func HasDocuments() predicate.Tool

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

func HasDocumentsWith added in v0.2.0

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

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

func HasMetadata

func HasMetadata() predicate.Tool

HasMetadata applies the HasEdge predicate on the "metadata" edge.

func HasMetadataWith

func HasMetadataWith(preds ...predicate.Metadata) predicate.Tool

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

func ID

func ID(id uuid.UUID) predicate.Tool

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id uuid.UUID) predicate.Tool

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id uuid.UUID) predicate.Tool

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id uuid.UUID) predicate.Tool

IDGTE applies the GTE predicate on the ID field.

func IDIn

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

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id uuid.UUID) predicate.Tool

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id uuid.UUID) predicate.Tool

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id uuid.UUID) predicate.Tool

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

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

IDNotIn applies the NotIn predicate on the ID field.

func Name

func Name(v string) predicate.Tool

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

func NameContains

func NameContains(v string) predicate.Tool

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

func NameContainsFold

func NameContainsFold(v string) predicate.Tool

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

func NameEQ

func NameEQ(v string) predicate.Tool

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

func NameEqualFold

func NameEqualFold(v string) predicate.Tool

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

func NameGT

func NameGT(v string) predicate.Tool

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

func NameGTE

func NameGTE(v string) predicate.Tool

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

func NameHasPrefix

func NameHasPrefix(v string) predicate.Tool

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

func NameHasSuffix

func NameHasSuffix(v string) predicate.Tool

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

func NameIn

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

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

func NameLT

func NameLT(v string) predicate.Tool

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

func NameLTE

func NameLTE(v string) predicate.Tool

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

func NameNEQ

func NameNEQ(v string) predicate.Tool

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

func NameNotIn

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

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

func Not

Not applies the not operator on the given predicate.

func Or

func Or(predicates ...predicate.Tool) predicate.Tool

Or groups predicates with the OR operator between them.

func ProtoMessage added in v0.2.0

func ProtoMessage(v *sbom.Tool) predicate.Tool

ProtoMessage applies equality check predicate on the "proto_message" field. It's identical to ProtoMessageEQ.

func ProtoMessageEQ added in v0.2.0

func ProtoMessageEQ(v *sbom.Tool) predicate.Tool

ProtoMessageEQ applies the EQ predicate on the "proto_message" field.

func ProtoMessageGT added in v0.2.0

func ProtoMessageGT(v *sbom.Tool) predicate.Tool

ProtoMessageGT applies the GT predicate on the "proto_message" field.

func ProtoMessageGTE added in v0.2.0

func ProtoMessageGTE(v *sbom.Tool) predicate.Tool

ProtoMessageGTE applies the GTE predicate on the "proto_message" field.

func ProtoMessageIn added in v0.2.0

func ProtoMessageIn(vs ...*sbom.Tool) predicate.Tool

ProtoMessageIn applies the In predicate on the "proto_message" field.

func ProtoMessageLT added in v0.2.0

func ProtoMessageLT(v *sbom.Tool) predicate.Tool

ProtoMessageLT applies the LT predicate on the "proto_message" field.

func ProtoMessageLTE added in v0.2.0

func ProtoMessageLTE(v *sbom.Tool) predicate.Tool

ProtoMessageLTE applies the LTE predicate on the "proto_message" field.

func ProtoMessageNEQ added in v0.2.0

func ProtoMessageNEQ(v *sbom.Tool) predicate.Tool

ProtoMessageNEQ applies the NEQ predicate on the "proto_message" field.

func ProtoMessageNotIn added in v0.2.0

func ProtoMessageNotIn(vs ...*sbom.Tool) predicate.Tool

ProtoMessageNotIn applies the NotIn predicate on the "proto_message" field.

func ValidColumn

func ValidColumn(column string) bool

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

func Vendor

func Vendor(v string) predicate.Tool

Vendor applies equality check predicate on the "vendor" field. It's identical to VendorEQ.

func VendorContains

func VendorContains(v string) predicate.Tool

VendorContains applies the Contains predicate on the "vendor" field.

func VendorContainsFold

func VendorContainsFold(v string) predicate.Tool

VendorContainsFold applies the ContainsFold predicate on the "vendor" field.

func VendorEQ

func VendorEQ(v string) predicate.Tool

VendorEQ applies the EQ predicate on the "vendor" field.

func VendorEqualFold

func VendorEqualFold(v string) predicate.Tool

VendorEqualFold applies the EqualFold predicate on the "vendor" field.

func VendorGT

func VendorGT(v string) predicate.Tool

VendorGT applies the GT predicate on the "vendor" field.

func VendorGTE

func VendorGTE(v string) predicate.Tool

VendorGTE applies the GTE predicate on the "vendor" field.

func VendorHasPrefix

func VendorHasPrefix(v string) predicate.Tool

VendorHasPrefix applies the HasPrefix predicate on the "vendor" field.

func VendorHasSuffix

func VendorHasSuffix(v string) predicate.Tool

VendorHasSuffix applies the HasSuffix predicate on the "vendor" field.

func VendorIn

func VendorIn(vs ...string) predicate.Tool

VendorIn applies the In predicate on the "vendor" field.

func VendorLT

func VendorLT(v string) predicate.Tool

VendorLT applies the LT predicate on the "vendor" field.

func VendorLTE

func VendorLTE(v string) predicate.Tool

VendorLTE applies the LTE predicate on the "vendor" field.

func VendorNEQ

func VendorNEQ(v string) predicate.Tool

VendorNEQ applies the NEQ predicate on the "vendor" field.

func VendorNotIn

func VendorNotIn(vs ...string) predicate.Tool

VendorNotIn applies the NotIn predicate on the "vendor" field.

func Version

func Version(v string) predicate.Tool

Version applies equality check predicate on the "version" field. It's identical to VersionEQ.

func VersionContains

func VersionContains(v string) predicate.Tool

VersionContains applies the Contains predicate on the "version" field.

func VersionContainsFold

func VersionContainsFold(v string) predicate.Tool

VersionContainsFold applies the ContainsFold predicate on the "version" field.

func VersionEQ

func VersionEQ(v string) predicate.Tool

VersionEQ applies the EQ predicate on the "version" field.

func VersionEqualFold

func VersionEqualFold(v string) predicate.Tool

VersionEqualFold applies the EqualFold predicate on the "version" field.

func VersionGT

func VersionGT(v string) predicate.Tool

VersionGT applies the GT predicate on the "version" field.

func VersionGTE

func VersionGTE(v string) predicate.Tool

VersionGTE applies the GTE predicate on the "version" field.

func VersionHasPrefix

func VersionHasPrefix(v string) predicate.Tool

VersionHasPrefix applies the HasPrefix predicate on the "version" field.

func VersionHasSuffix

func VersionHasSuffix(v string) predicate.Tool

VersionHasSuffix applies the HasSuffix predicate on the "version" field.

func VersionIn

func VersionIn(vs ...string) predicate.Tool

VersionIn applies the In predicate on the "version" field.

func VersionLT

func VersionLT(v string) predicate.Tool

VersionLT applies the LT predicate on the "version" field.

func VersionLTE

func VersionLTE(v string) predicate.Tool

VersionLTE applies the LTE predicate on the "version" field.

func VersionNEQ

func VersionNEQ(v string) predicate.Tool

VersionNEQ applies the NEQ predicate on the "version" field.

func VersionNotIn

func VersionNotIn(vs ...string) predicate.Tool

VersionNotIn applies the NotIn predicate on the "version" field.

Types

type OrderOption

type OrderOption func(*sql.Selector)

OrderOption defines the ordering options for the Tool 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 ByMetadata added in v0.2.0

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

ByMetadata orders the results by metadata terms.

func ByMetadataCount added in v0.2.0

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

ByMetadataCount orders the results by metadata count.

func ByName

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

ByName orders the results by the name field.

func ByVendor

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

ByVendor orders the results by the vendor field.

func ByVersion

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

ByVersion orders the results by the version field.

Jump to

Keyboard shortcuts

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