externalreference

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: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the externalreference type in the database.
	Label = "external_reference"
	// 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"
	// FieldURL holds the string denoting the url field in the database.
	FieldURL = "url"
	// FieldComment holds the string denoting the comment field in the database.
	FieldComment = "comment"
	// FieldAuthority holds the string denoting the authority field in the database.
	FieldAuthority = "authority"
	// FieldType holds the string denoting the type field in the database.
	FieldType = "type"
	// EdgeHashes holds the string denoting the hashes edge name in mutations.
	EdgeHashes = "hashes"
	// 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 externalreference in the database.
	Table = "external_references"
	// HashesTable is the table that holds the hashes relation/edge. The primary key declared below.
	HashesTable = "ext_ref_hashes"
	// HashesInverseTable is the table name for the HashesEntry entity.
	// It exists in this package in order to avoid circular dependency with the "hashesentry" package.
	HashesInverseTable = "hashes_entries"
	// DocumentsTable is the table that holds the documents relation/edge. The primary key declared below.
	DocumentsTable = "document_external_references"
	// 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_external_references"
	// 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 (
	// HashesPrimaryKey and HashesColumn2 are the table columns denoting the
	// primary key for the hashes relation (M2M).
	HashesPrimaryKey = []string{"ext_ref_id", "hash_entry_id"}
	// DocumentsPrimaryKey and DocumentsColumn2 are the table columns denoting the
	// primary key for the documents relation (M2M).
	DocumentsPrimaryKey = []string{"document_id", "external_reference_id"}
	// NodesPrimaryKey and NodesColumn2 are the table columns denoting the
	// primary key for the nodes relation (M2M).
	NodesPrimaryKey = []string{"node_id", "external_reference_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 externalreference fields.

Functions

func And

And groups predicates with the AND operator between them.

func Authority

func Authority(v string) predicate.ExternalReference

Authority applies equality check predicate on the "authority" field. It's identical to AuthorityEQ.

func AuthorityContains

func AuthorityContains(v string) predicate.ExternalReference

AuthorityContains applies the Contains predicate on the "authority" field.

func AuthorityContainsFold

func AuthorityContainsFold(v string) predicate.ExternalReference

AuthorityContainsFold applies the ContainsFold predicate on the "authority" field.

func AuthorityEQ

func AuthorityEQ(v string) predicate.ExternalReference

AuthorityEQ applies the EQ predicate on the "authority" field.

func AuthorityEqualFold

func AuthorityEqualFold(v string) predicate.ExternalReference

AuthorityEqualFold applies the EqualFold predicate on the "authority" field.

func AuthorityGT

func AuthorityGT(v string) predicate.ExternalReference

AuthorityGT applies the GT predicate on the "authority" field.

func AuthorityGTE

func AuthorityGTE(v string) predicate.ExternalReference

AuthorityGTE applies the GTE predicate on the "authority" field.

func AuthorityHasPrefix

func AuthorityHasPrefix(v string) predicate.ExternalReference

AuthorityHasPrefix applies the HasPrefix predicate on the "authority" field.

func AuthorityHasSuffix

func AuthorityHasSuffix(v string) predicate.ExternalReference

AuthorityHasSuffix applies the HasSuffix predicate on the "authority" field.

func AuthorityIn

func AuthorityIn(vs ...string) predicate.ExternalReference

AuthorityIn applies the In predicate on the "authority" field.

func AuthorityIsNil

func AuthorityIsNil() predicate.ExternalReference

AuthorityIsNil applies the IsNil predicate on the "authority" field.

func AuthorityLT

func AuthorityLT(v string) predicate.ExternalReference

AuthorityLT applies the LT predicate on the "authority" field.

func AuthorityLTE

func AuthorityLTE(v string) predicate.ExternalReference

AuthorityLTE applies the LTE predicate on the "authority" field.

func AuthorityNEQ

func AuthorityNEQ(v string) predicate.ExternalReference

AuthorityNEQ applies the NEQ predicate on the "authority" field.

func AuthorityNotIn

func AuthorityNotIn(vs ...string) predicate.ExternalReference

AuthorityNotIn applies the NotIn predicate on the "authority" field.

func AuthorityNotNil

func AuthorityNotNil() predicate.ExternalReference

AuthorityNotNil applies the NotNil predicate on the "authority" field.

func Comment

Comment applies equality check predicate on the "comment" field. It's identical to CommentEQ.

func CommentContains

func CommentContains(v string) predicate.ExternalReference

CommentContains applies the Contains predicate on the "comment" field.

func CommentContainsFold

func CommentContainsFold(v string) predicate.ExternalReference

CommentContainsFold applies the ContainsFold predicate on the "comment" field.

func CommentEQ

func CommentEQ(v string) predicate.ExternalReference

CommentEQ applies the EQ predicate on the "comment" field.

func CommentEqualFold

func CommentEqualFold(v string) predicate.ExternalReference

CommentEqualFold applies the EqualFold predicate on the "comment" field.

func CommentGT

func CommentGT(v string) predicate.ExternalReference

CommentGT applies the GT predicate on the "comment" field.

func CommentGTE

func CommentGTE(v string) predicate.ExternalReference

CommentGTE applies the GTE predicate on the "comment" field.

func CommentHasPrefix

func CommentHasPrefix(v string) predicate.ExternalReference

CommentHasPrefix applies the HasPrefix predicate on the "comment" field.

func CommentHasSuffix

func CommentHasSuffix(v string) predicate.ExternalReference

CommentHasSuffix applies the HasSuffix predicate on the "comment" field.

func CommentIn

func CommentIn(vs ...string) predicate.ExternalReference

CommentIn applies the In predicate on the "comment" field.

func CommentLT

func CommentLT(v string) predicate.ExternalReference

CommentLT applies the LT predicate on the "comment" field.

func CommentLTE

func CommentLTE(v string) predicate.ExternalReference

CommentLTE applies the LTE predicate on the "comment" field.

func CommentNEQ

func CommentNEQ(v string) predicate.ExternalReference

CommentNEQ applies the NEQ predicate on the "comment" field.

func CommentNotIn

func CommentNotIn(vs ...string) predicate.ExternalReference

CommentNotIn applies the NotIn predicate on the "comment" field.

func HasDocuments added in v0.2.0

func HasDocuments() predicate.ExternalReference

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

func HasDocumentsWith added in v0.2.0

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

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

func HasHashes

func HasHashes() predicate.ExternalReference

HasHashes applies the HasEdge predicate on the "hashes" edge.

func HasHashesWith

func HasHashesWith(preds ...predicate.HashesEntry) predicate.ExternalReference

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

func HasNodes added in v0.2.0

func HasNodes() predicate.ExternalReference

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

func HasNodesWith added in v0.2.0

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

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

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

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

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

func ProtoMessageEQ added in v0.2.0

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

func ProtoMessageGT added in v0.2.0

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

func ProtoMessageGTE added in v0.2.0

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

func ProtoMessageIn added in v0.2.0

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

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

func ProtoMessageLT added in v0.2.0

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

func ProtoMessageLTE added in v0.2.0

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

func ProtoMessageNEQ added in v0.2.0

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

func ProtoMessageNotIn added in v0.2.0

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

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

func TypeEQ

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

func TypeIn

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

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

func TypeNEQ

func TypeNEQ(v Type) predicate.ExternalReference

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

func TypeNotIn

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

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

func TypeValidator

func TypeValidator(_type Type) error

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

func URL

URL applies equality check predicate on the "url" field. It's identical to URLEQ.

func URLContains

func URLContains(v string) predicate.ExternalReference

URLContains applies the Contains predicate on the "url" field.

func URLContainsFold

func URLContainsFold(v string) predicate.ExternalReference

URLContainsFold applies the ContainsFold predicate on the "url" field.

func URLEQ

URLEQ applies the EQ predicate on the "url" field.

func URLEqualFold

func URLEqualFold(v string) predicate.ExternalReference

URLEqualFold applies the EqualFold predicate on the "url" field.

func URLGT

URLGT applies the GT predicate on the "url" field.

func URLGTE

URLGTE applies the GTE predicate on the "url" field.

func URLHasPrefix

func URLHasPrefix(v string) predicate.ExternalReference

URLHasPrefix applies the HasPrefix predicate on the "url" field.

func URLHasSuffix

func URLHasSuffix(v string) predicate.ExternalReference

URLHasSuffix applies the HasSuffix predicate on the "url" field.

func URLIn

func URLIn(vs ...string) predicate.ExternalReference

URLIn applies the In predicate on the "url" field.

func URLLT

URLLT applies the LT predicate on the "url" field.

func URLLTE

URLLTE applies the LTE predicate on the "url" field.

func URLNEQ

URLNEQ applies the NEQ predicate on the "url" field.

func URLNotIn

func URLNotIn(vs ...string) predicate.ExternalReference

URLNotIn applies the NotIn predicate on the "url" field.

func ValidColumn

func ValidColumn(column string) bool

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

Types

type OrderOption

type OrderOption func(*sql.Selector)

OrderOption defines the ordering options for the ExternalReference queries.

func ByAuthority

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

ByAuthority orders the results by the authority field.

func ByComment

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

ByComment orders the results by the comment field.

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 ByHashes

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

ByHashes orders the results by hashes terms.

func ByHashesCount

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

ByHashesCount orders the results by hashes 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

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

ByType orders the results by the type field.

func ByURL

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

ByURL orders the results by the url field.

type Type

type Type string

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

const (
	TypeUNKNOWN                                 Type = "UNKNOWN"
	TypeATTESTATION                             Type = "ATTESTATION"
	TypeBINARY                                  Type = "BINARY"
	TypeBOM                                     Type = "BOM"
	TypeBOWER                                   Type = "BOWER"
	TypeBUILD_META                              Type = "BUILD_META"
	TypeBUILD_SYSTEM                            Type = "BUILD_SYSTEM"
	TypeCERTIFICATION_REPORT                    Type = "CERTIFICATION_REPORT"
	TypeCHAT                                    Type = "CHAT"
	TypeCODIFIED_INFRASTRUCTURE                 Type = "CODIFIED_INFRASTRUCTURE"
	TypeCOMPONENT_ANALYSIS_REPORT               Type = "COMPONENT_ANALYSIS_REPORT"
	TypeCONFIGURATION                           Type = "CONFIGURATION"
	TypeDISTRIBUTION_INTAKE                     Type = "DISTRIBUTION_INTAKE"
	TypeDOCUMENTATION                           Type = "DOCUMENTATION"
	TypeDOWNLOAD                                Type = "DOWNLOAD"
	TypeDYNAMIC_ANALYSIS_REPORT                 Type = "DYNAMIC_ANALYSIS_REPORT"
	TypeEOL_NOTICE                              Type = "EOL_NOTICE"
	TypeEVIDENCE                                Type = "EVIDENCE"
	TypeEXPORT_CONTROL_ASSESSMENT               Type = "EXPORT_CONTROL_ASSESSMENT"
	TypeFORMULATION                             Type = "FORMULATION"
	TypeFUNDING                                 Type = "FUNDING"
	TypeISSUE_TRACKER                           Type = "ISSUE_TRACKER"
	TypeLICENSE                                 Type = "LICENSE"
	TypeLOG                                     Type = "LOG"
	TypeMAILING_LIST                            Type = "MAILING_LIST"
	TypeMATURITY_REPORT                         Type = "MATURITY_REPORT"
	TypeMAVEN_CENTRAL                           Type = "MAVEN_CENTRAL"
	TypeMETRICS                                 Type = "METRICS"
	TypeMODEL_CARD                              Type = "MODEL_CARD"
	TypeNPM                                     Type = "NPM"
	TypeNUGET                                   Type = "NUGET"
	TypeOTHER                                   Type = "OTHER"
	TypePOAM                                    Type = "POAM"
	TypePRIVACY_ASSESSMENT                      Type = "PRIVACY_ASSESSMENT"
	TypePRODUCT_METADATA                        Type = "PRODUCT_METADATA"
	TypePURCHASE_ORDER                          Type = "PURCHASE_ORDER"
	TypeQUALITY_ASSESSMENT_REPORT               Type = "QUALITY_ASSESSMENT_REPORT"
	TypeQUALITY_METRICS                         Type = "QUALITY_METRICS"
	TypeRELEASE_HISTORY                         Type = "RELEASE_HISTORY"
	TypeRELEASE_NOTES                           Type = "RELEASE_NOTES"
	TypeRISK_ASSESSMENT                         Type = "RISK_ASSESSMENT"
	TypeRUNTIME_ANALYSIS_REPORT                 Type = "RUNTIME_ANALYSIS_REPORT"
	TypeSECURE_SOFTWARE_ATTESTATION             Type = "SECURE_SOFTWARE_ATTESTATION"
	TypeSECURITY_ADVERSARY_MODEL                Type = "SECURITY_ADVERSARY_MODEL"
	TypeSECURITY_ADVISORY                       Type = "SECURITY_ADVISORY"
	TypeSECURITY_CONTACT                        Type = "SECURITY_CONTACT"
	TypeSECURITY_FIX                            Type = "SECURITY_FIX"
	TypeSECURITY_OTHER                          Type = "SECURITY_OTHER"
	TypeSECURITY_PENTEST_REPORT                 Type = "SECURITY_PENTEST_REPORT"
	TypeSECURITY_POLICY                         Type = "SECURITY_POLICY"
	TypeSECURITY_SWID                           Type = "SECURITY_SWID"
	TypeSECURITY_THREAT_MODEL                   Type = "SECURITY_THREAT_MODEL"
	TypeSOCIAL                                  Type = "SOCIAL"
	TypeSOURCE_ARTIFACT                         Type = "SOURCE_ARTIFACT"
	TypeSTATIC_ANALYSIS_REPORT                  Type = "STATIC_ANALYSIS_REPORT"
	TypeSUPPORT                                 Type = "SUPPORT"
	TypeVCS                                     Type = "VCS"
	TypeVULNERABILITY_ASSERTION                 Type = "VULNERABILITY_ASSERTION"
	TypeVULNERABILITY_DISCLOSURE_REPORT         Type = "VULNERABILITY_DISCLOSURE_REPORT"
	TypeVULNERABILITY_EXPLOITABILITY_ASSESSMENT Type = "VULNERABILITY_EXPLOITABILITY_ASSESSMENT"
	TypeWEBSITE                                 Type = "WEBSITE"
)

Type values.

func (Type) String

func (_type Type) String() string

Jump to

Keyboard shortcuts

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