sourcedata

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 sourcedata type in the database.
	Label = "source_data"
	// 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"
	// FieldFormat holds the string denoting the format field in the database.
	FieldFormat = "format"
	// FieldSize holds the string denoting the size field in the database.
	FieldSize = "size"
	// FieldURI holds the string denoting the uri field in the database.
	FieldURI = "uri"
	// 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"
	// EdgeMetadata holds the string denoting the metadata edge name in mutations.
	EdgeMetadata = "metadata"
	// Table holds the table name of the sourcedata in the database.
	Table = "source_data"
	// HashesTable is the table that holds the hashes relation/edge. The primary key declared below.
	HashesTable = "source_data_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_source_data"
	// 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.
	MetadataTable = "metadata"
	// 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"
	// MetadataColumn is the table column denoting the metadata relation/edge.
	MetadataColumn = "source_data_id"
)

Variables

View Source
var (
	// HashesPrimaryKey and HashesColumn2 are the table columns denoting the
	// primary key for the hashes relation (M2M).
	HashesPrimaryKey = []string{"source_data_id", "hash_entry_id"}
	// DocumentsPrimaryKey and DocumentsColumn2 are the table columns denoting the
	// primary key for the documents relation (M2M).
	DocumentsPrimaryKey = []string{"document_id", "source_data_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 sourcedata fields.

Functions

func And

func And(predicates ...predicate.SourceData) predicate.SourceData

And groups predicates with the AND operator between them.

func Format

func Format(v string) predicate.SourceData

Format applies equality check predicate on the "format" field. It's identical to FormatEQ.

func FormatContains

func FormatContains(v string) predicate.SourceData

FormatContains applies the Contains predicate on the "format" field.

func FormatContainsFold

func FormatContainsFold(v string) predicate.SourceData

FormatContainsFold applies the ContainsFold predicate on the "format" field.

func FormatEQ

func FormatEQ(v string) predicate.SourceData

FormatEQ applies the EQ predicate on the "format" field.

func FormatEqualFold

func FormatEqualFold(v string) predicate.SourceData

FormatEqualFold applies the EqualFold predicate on the "format" field.

func FormatGT

func FormatGT(v string) predicate.SourceData

FormatGT applies the GT predicate on the "format" field.

func FormatGTE

func FormatGTE(v string) predicate.SourceData

FormatGTE applies the GTE predicate on the "format" field.

func FormatHasPrefix

func FormatHasPrefix(v string) predicate.SourceData

FormatHasPrefix applies the HasPrefix predicate on the "format" field.

func FormatHasSuffix

func FormatHasSuffix(v string) predicate.SourceData

FormatHasSuffix applies the HasSuffix predicate on the "format" field.

func FormatIn

func FormatIn(vs ...string) predicate.SourceData

FormatIn applies the In predicate on the "format" field.

func FormatLT

func FormatLT(v string) predicate.SourceData

FormatLT applies the LT predicate on the "format" field.

func FormatLTE

func FormatLTE(v string) predicate.SourceData

FormatLTE applies the LTE predicate on the "format" field.

func FormatNEQ

func FormatNEQ(v string) predicate.SourceData

FormatNEQ applies the NEQ predicate on the "format" field.

func FormatNotIn

func FormatNotIn(vs ...string) predicate.SourceData

FormatNotIn applies the NotIn predicate on the "format" field.

func HasDocuments

func HasDocuments() predicate.SourceData

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

func HasDocumentsWith

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

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

func HasHashes

func HasHashes() predicate.SourceData

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

func HasHashesWith

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

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

func HasMetadata

func HasMetadata() predicate.SourceData

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

func HasMetadataWith

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

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

func ID

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id uuid.UUID) predicate.SourceData

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id uuid.UUID) predicate.SourceData

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id uuid.UUID) predicate.SourceData

IDGTE applies the GTE predicate on the ID field.

func IDIn

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

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id uuid.UUID) predicate.SourceData

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id uuid.UUID) predicate.SourceData

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id uuid.UUID) predicate.SourceData

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

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

IDNotIn applies the NotIn predicate on the ID field.

func Not

Not applies the not operator on the given predicate.

func Or

func Or(predicates ...predicate.SourceData) predicate.SourceData

Or groups predicates with the OR operator between them.

func ProtoMessage

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

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

func ProtoMessageEQ

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

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

func ProtoMessageGT

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

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

func ProtoMessageGTE

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

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

func ProtoMessageIn

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

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

func ProtoMessageLT

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

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

func ProtoMessageLTE

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

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

func ProtoMessageNEQ

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

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

func ProtoMessageNotIn

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

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

func Size

func Size(v int64) predicate.SourceData

Size applies equality check predicate on the "size" field. It's identical to SizeEQ.

func SizeEQ

func SizeEQ(v int64) predicate.SourceData

SizeEQ applies the EQ predicate on the "size" field.

func SizeGT

func SizeGT(v int64) predicate.SourceData

SizeGT applies the GT predicate on the "size" field.

func SizeGTE

func SizeGTE(v int64) predicate.SourceData

SizeGTE applies the GTE predicate on the "size" field.

func SizeIn

func SizeIn(vs ...int64) predicate.SourceData

SizeIn applies the In predicate on the "size" field.

func SizeLT

func SizeLT(v int64) predicate.SourceData

SizeLT applies the LT predicate on the "size" field.

func SizeLTE

func SizeLTE(v int64) predicate.SourceData

SizeLTE applies the LTE predicate on the "size" field.

func SizeNEQ

func SizeNEQ(v int64) predicate.SourceData

SizeNEQ applies the NEQ predicate on the "size" field.

func SizeNotIn

func SizeNotIn(vs ...int64) predicate.SourceData

SizeNotIn applies the NotIn predicate on the "size" field.

func URI

URI applies equality check predicate on the "uri" field. It's identical to URIEQ.

func URIContains

func URIContains(v string) predicate.SourceData

URIContains applies the Contains predicate on the "uri" field.

func URIContainsFold

func URIContainsFold(v string) predicate.SourceData

URIContainsFold applies the ContainsFold predicate on the "uri" field.

func URIEQ

func URIEQ(v string) predicate.SourceData

URIEQ applies the EQ predicate on the "uri" field.

func URIEqualFold

func URIEqualFold(v string) predicate.SourceData

URIEqualFold applies the EqualFold predicate on the "uri" field.

func URIGT

func URIGT(v string) predicate.SourceData

URIGT applies the GT predicate on the "uri" field.

func URIGTE

func URIGTE(v string) predicate.SourceData

URIGTE applies the GTE predicate on the "uri" field.

func URIHasPrefix

func URIHasPrefix(v string) predicate.SourceData

URIHasPrefix applies the HasPrefix predicate on the "uri" field.

func URIHasSuffix

func URIHasSuffix(v string) predicate.SourceData

URIHasSuffix applies the HasSuffix predicate on the "uri" field.

func URIIn

func URIIn(vs ...string) predicate.SourceData

URIIn applies the In predicate on the "uri" field.

func URIIsNil

func URIIsNil() predicate.SourceData

URIIsNil applies the IsNil predicate on the "uri" field.

func URILT

func URILT(v string) predicate.SourceData

URILT applies the LT predicate on the "uri" field.

func URILTE

func URILTE(v string) predicate.SourceData

URILTE applies the LTE predicate on the "uri" field.

func URINEQ

func URINEQ(v string) predicate.SourceData

URINEQ applies the NEQ predicate on the "uri" field.

func URINotIn

func URINotIn(vs ...string) predicate.SourceData

URINotIn applies the NotIn predicate on the "uri" field.

func URINotNil

func URINotNil() predicate.SourceData

URINotNil applies the NotNil predicate on the "uri" 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 SourceData queries.

func ByDocuments

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

ByDocuments orders the results by documents terms.

func ByDocumentsCount

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

ByDocumentsCount orders the results by documents count.

func ByFormat

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

ByFormat orders the results by the format field.

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 ByMetadata

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

ByMetadata orders the results by metadata terms.

func ByMetadataCount

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

ByMetadataCount orders the results by metadata count.

func BySize

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

BySize orders the results by the size field.

func ByURI

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

ByURI orders the results by the uri field.

Jump to

Keyboard shortcuts

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