metadata

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 metadata type in the database.
	Label = "metadata"
	// 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"
	// FieldSourceDataID holds the string denoting the source_data_id field in the database.
	FieldSourceDataID = "source_data_id"
	// FieldNativeID holds the string denoting the native_id field in the database.
	FieldNativeID = "native_id"
	// FieldVersion holds the string denoting the version field in the database.
	FieldVersion = "version"
	// FieldName holds the string denoting the name field in the database.
	FieldName = "name"
	// FieldDate holds the string denoting the date field in the database.
	FieldDate = "date"
	// FieldComment holds the string denoting the comment field in the database.
	FieldComment = "comment"
	// EdgeTools holds the string denoting the tools edge name in mutations.
	EdgeTools = "tools"
	// EdgeAuthors holds the string denoting the authors edge name in mutations.
	EdgeAuthors = "authors"
	// EdgeDocumentTypes holds the string denoting the document_types edge name in mutations.
	EdgeDocumentTypes = "document_types"
	// EdgeSourceData holds the string denoting the source_data edge name in mutations.
	EdgeSourceData = "source_data"
	// EdgeDocuments holds the string denoting the documents edge name in mutations.
	EdgeDocuments = "documents"
	// Table holds the table name of the metadata in the database.
	Table = "metadata"
	// ToolsTable is the table that holds the tools relation/edge. The primary key declared below.
	ToolsTable = "metadata_tools"
	// ToolsInverseTable is the table name for the Tool entity.
	// It exists in this package in order to avoid circular dependency with the "tool" package.
	ToolsInverseTable = "tools"
	// AuthorsTable is the table that holds the authors relation/edge. The primary key declared below.
	AuthorsTable = "metadata_authors"
	// AuthorsInverseTable is the table name for the Person entity.
	// It exists in this package in order to avoid circular dependency with the "person" package.
	AuthorsInverseTable = "persons"
	// DocumentTypesTable is the table that holds the document_types relation/edge. The primary key declared below.
	DocumentTypesTable = "metadata_document_types"
	// DocumentTypesInverseTable is the table name for the DocumentType entity.
	// It exists in this package in order to avoid circular dependency with the "documenttype" package.
	DocumentTypesInverseTable = "document_types"
	// SourceDataTable is the table that holds the source_data relation/edge.
	SourceDataTable = "metadata"
	// SourceDataInverseTable is the table name for the SourceData entity.
	// It exists in this package in order to avoid circular dependency with the "sourcedata" package.
	SourceDataInverseTable = "source_data"
	// SourceDataColumn is the table column denoting the source_data relation/edge.
	SourceDataColumn = "source_data_id"
	// DocumentsTable is the table that holds the documents relation/edge.
	DocumentsTable = "documents"
	// 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"
	// DocumentsColumn is the table column denoting the documents relation/edge.
	DocumentsColumn = "metadata_id"
)

Variables

View Source
var (
	// ToolsPrimaryKey and ToolsColumn2 are the table columns denoting the
	// primary key for the tools relation (M2M).
	ToolsPrimaryKey = []string{"metadata_id", "tool_id"}
	// AuthorsPrimaryKey and AuthorsColumn2 are the table columns denoting the
	// primary key for the authors relation (M2M).
	AuthorsPrimaryKey = []string{"metadata_id", "person_id"}
	// DocumentTypesPrimaryKey and DocumentTypesColumn2 are the table columns denoting the
	// primary key for the document_types relation (M2M).
	DocumentTypesPrimaryKey = []string{"metadata_id", "document_type_id"}
)
View Source
var (
	Hooks [1]ent.Hook
	// NativeIDValidator is a validator for the "native_id" field. It is called by the builders before save.
	NativeIDValidator func(string) error
	// 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 metadata fields.

Functions

func And

func And(predicates ...predicate.Metadata) predicate.Metadata

And groups predicates with the AND operator between them.

func Comment

func Comment(v string) predicate.Metadata

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

func CommentContains

func CommentContains(v string) predicate.Metadata

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

func CommentContainsFold

func CommentContainsFold(v string) predicate.Metadata

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

func CommentEQ

func CommentEQ(v string) predicate.Metadata

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

func CommentEqualFold

func CommentEqualFold(v string) predicate.Metadata

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

func CommentGT

func CommentGT(v string) predicate.Metadata

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

func CommentGTE

func CommentGTE(v string) predicate.Metadata

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

func CommentHasPrefix

func CommentHasPrefix(v string) predicate.Metadata

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

func CommentHasSuffix

func CommentHasSuffix(v string) predicate.Metadata

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

func CommentIn

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

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

func CommentLT

func CommentLT(v string) predicate.Metadata

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

func CommentLTE

func CommentLTE(v string) predicate.Metadata

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

func CommentNEQ

func CommentNEQ(v string) predicate.Metadata

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

func CommentNotIn

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

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

func Date

func Date(v time.Time) predicate.Metadata

Date applies equality check predicate on the "date" field. It's identical to DateEQ.

func DateEQ

func DateEQ(v time.Time) predicate.Metadata

DateEQ applies the EQ predicate on the "date" field.

func DateGT

func DateGT(v time.Time) predicate.Metadata

DateGT applies the GT predicate on the "date" field.

func DateGTE

func DateGTE(v time.Time) predicate.Metadata

DateGTE applies the GTE predicate on the "date" field.

func DateIn

func DateIn(vs ...time.Time) predicate.Metadata

DateIn applies the In predicate on the "date" field.

func DateLT

func DateLT(v time.Time) predicate.Metadata

DateLT applies the LT predicate on the "date" field.

func DateLTE

func DateLTE(v time.Time) predicate.Metadata

DateLTE applies the LTE predicate on the "date" field.

func DateNEQ

func DateNEQ(v time.Time) predicate.Metadata

DateNEQ applies the NEQ predicate on the "date" field.

func DateNotIn

func DateNotIn(vs ...time.Time) predicate.Metadata

DateNotIn applies the NotIn predicate on the "date" field.

func HasAuthors

func HasAuthors() predicate.Metadata

HasAuthors applies the HasEdge predicate on the "authors" edge.

func HasAuthorsWith

func HasAuthorsWith(preds ...predicate.Person) predicate.Metadata

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

func HasDocumentTypes

func HasDocumentTypes() predicate.Metadata

HasDocumentTypes applies the HasEdge predicate on the "document_types" edge.

func HasDocumentTypesWith

func HasDocumentTypesWith(preds ...predicate.DocumentType) predicate.Metadata

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

func HasDocuments added in v0.2.0

func HasDocuments() predicate.Metadata

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

func HasDocumentsWith added in v0.2.0

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

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

func HasSourceData added in v0.2.0

func HasSourceData() predicate.Metadata

HasSourceData applies the HasEdge predicate on the "source_data" edge.

func HasSourceDataWith added in v0.2.0

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

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

func HasTools

func HasTools() predicate.Metadata

HasTools applies the HasEdge predicate on the "tools" edge.

func HasToolsWith

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

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

func ID

func ID(id uuid.UUID) predicate.Metadata

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id uuid.UUID) predicate.Metadata

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id uuid.UUID) predicate.Metadata

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id uuid.UUID) predicate.Metadata

IDGTE applies the GTE predicate on the ID field.

func IDIn

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

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id uuid.UUID) predicate.Metadata

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id uuid.UUID) predicate.Metadata

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id uuid.UUID) predicate.Metadata

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

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

IDNotIn applies the NotIn predicate on the ID field.

func Name

func Name(v string) predicate.Metadata

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

func NameContains

func NameContains(v string) predicate.Metadata

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

func NameContainsFold

func NameContainsFold(v string) predicate.Metadata

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

func NameEQ

func NameEQ(v string) predicate.Metadata

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

func NameEqualFold

func NameEqualFold(v string) predicate.Metadata

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

func NameGT

func NameGT(v string) predicate.Metadata

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

func NameGTE

func NameGTE(v string) predicate.Metadata

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

func NameHasPrefix

func NameHasPrefix(v string) predicate.Metadata

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

func NameHasSuffix

func NameHasSuffix(v string) predicate.Metadata

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

func NameIn

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

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

func NameLT

func NameLT(v string) predicate.Metadata

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

func NameLTE

func NameLTE(v string) predicate.Metadata

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

func NameNEQ

func NameNEQ(v string) predicate.Metadata

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

func NameNotIn

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

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

func NativeID added in v0.2.0

func NativeID(v string) predicate.Metadata

NativeID applies equality check predicate on the "native_id" field. It's identical to NativeIDEQ.

func NativeIDContains added in v0.2.0

func NativeIDContains(v string) predicate.Metadata

NativeIDContains applies the Contains predicate on the "native_id" field.

func NativeIDContainsFold added in v0.2.0

func NativeIDContainsFold(v string) predicate.Metadata

NativeIDContainsFold applies the ContainsFold predicate on the "native_id" field.

func NativeIDEQ added in v0.2.0

func NativeIDEQ(v string) predicate.Metadata

NativeIDEQ applies the EQ predicate on the "native_id" field.

func NativeIDEqualFold added in v0.2.0

func NativeIDEqualFold(v string) predicate.Metadata

NativeIDEqualFold applies the EqualFold predicate on the "native_id" field.

func NativeIDGT added in v0.2.0

func NativeIDGT(v string) predicate.Metadata

NativeIDGT applies the GT predicate on the "native_id" field.

func NativeIDGTE added in v0.2.0

func NativeIDGTE(v string) predicate.Metadata

NativeIDGTE applies the GTE predicate on the "native_id" field.

func NativeIDHasPrefix added in v0.2.0

func NativeIDHasPrefix(v string) predicate.Metadata

NativeIDHasPrefix applies the HasPrefix predicate on the "native_id" field.

func NativeIDHasSuffix added in v0.2.0

func NativeIDHasSuffix(v string) predicate.Metadata

NativeIDHasSuffix applies the HasSuffix predicate on the "native_id" field.

func NativeIDIn added in v0.2.0

func NativeIDIn(vs ...string) predicate.Metadata

NativeIDIn applies the In predicate on the "native_id" field.

func NativeIDLT added in v0.2.0

func NativeIDLT(v string) predicate.Metadata

NativeIDLT applies the LT predicate on the "native_id" field.

func NativeIDLTE added in v0.2.0

func NativeIDLTE(v string) predicate.Metadata

NativeIDLTE applies the LTE predicate on the "native_id" field.

func NativeIDNEQ added in v0.2.0

func NativeIDNEQ(v string) predicate.Metadata

NativeIDNEQ applies the NEQ predicate on the "native_id" field.

func NativeIDNotIn added in v0.2.0

func NativeIDNotIn(vs ...string) predicate.Metadata

NativeIDNotIn applies the NotIn predicate on the "native_id" field.

func Not

Not applies the not operator on the given predicate.

func Or

func Or(predicates ...predicate.Metadata) predicate.Metadata

Or groups predicates with the OR operator between them.

func ProtoMessage added in v0.2.0

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

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.Metadata) predicate.Metadata

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

func ProtoMessageGT added in v0.2.0

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

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

func ProtoMessageGTE added in v0.2.0

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

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

func ProtoMessageIn added in v0.2.0

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

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

func ProtoMessageLT added in v0.2.0

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

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

func ProtoMessageLTE added in v0.2.0

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

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

func ProtoMessageNEQ added in v0.2.0

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

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

func ProtoMessageNotIn added in v0.2.0

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

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

func SourceDataID added in v0.2.0

func SourceDataID(v uuid.UUID) predicate.Metadata

SourceDataID applies equality check predicate on the "source_data_id" field. It's identical to SourceDataIDEQ.

func SourceDataIDEQ added in v0.2.0

func SourceDataIDEQ(v uuid.UUID) predicate.Metadata

SourceDataIDEQ applies the EQ predicate on the "source_data_id" field.

func SourceDataIDIn added in v0.2.0

func SourceDataIDIn(vs ...uuid.UUID) predicate.Metadata

SourceDataIDIn applies the In predicate on the "source_data_id" field.

func SourceDataIDIsNil added in v0.2.0

func SourceDataIDIsNil() predicate.Metadata

SourceDataIDIsNil applies the IsNil predicate on the "source_data_id" field.

func SourceDataIDNEQ added in v0.2.0

func SourceDataIDNEQ(v uuid.UUID) predicate.Metadata

SourceDataIDNEQ applies the NEQ predicate on the "source_data_id" field.

func SourceDataIDNotIn added in v0.2.0

func SourceDataIDNotIn(vs ...uuid.UUID) predicate.Metadata

SourceDataIDNotIn applies the NotIn predicate on the "source_data_id" field.

func SourceDataIDNotNil added in v0.2.0

func SourceDataIDNotNil() predicate.Metadata

SourceDataIDNotNil applies the NotNil predicate on the "source_data_id" field.

func ValidColumn

func ValidColumn(column string) bool

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

func Version

func Version(v string) predicate.Metadata

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

func VersionContains

func VersionContains(v string) predicate.Metadata

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

func VersionContainsFold

func VersionContainsFold(v string) predicate.Metadata

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

func VersionEQ

func VersionEQ(v string) predicate.Metadata

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

func VersionEqualFold

func VersionEqualFold(v string) predicate.Metadata

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

func VersionGT

func VersionGT(v string) predicate.Metadata

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

func VersionGTE

func VersionGTE(v string) predicate.Metadata

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

func VersionHasPrefix

func VersionHasPrefix(v string) predicate.Metadata

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

func VersionHasSuffix

func VersionHasSuffix(v string) predicate.Metadata

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

func VersionIn

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

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

func VersionLT

func VersionLT(v string) predicate.Metadata

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

func VersionLTE

func VersionLTE(v string) predicate.Metadata

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

func VersionNEQ

func VersionNEQ(v string) predicate.Metadata

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

func VersionNotIn

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

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

Types

type OrderOption

type OrderOption func(*sql.Selector)

OrderOption defines the ordering options for the Metadata queries.

func ByAuthors

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

ByAuthors orders the results by authors terms.

func ByAuthorsCount

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

ByAuthorsCount orders the results by authors count.

func ByComment

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

ByComment orders the results by the comment field.

func ByDate

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

ByDate orders the results by the date field.

func ByDocumentTypes

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

ByDocumentTypes orders the results by document_types terms.

func ByDocumentTypesCount

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

ByDocumentTypesCount orders the results by document_types count.

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 ByName

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

ByName orders the results by the name field.

func ByNativeID added in v0.2.0

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

ByNativeID orders the results by the native_id field.

func BySourceDataField added in v0.2.0

func BySourceDataField(field string, opts ...sql.OrderTermOption) OrderOption

BySourceDataField orders the results by source_data field.

func BySourceDataID added in v0.2.0

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

BySourceDataID orders the results by the source_data_id field.

func ByTools

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

ByTools orders the results by tools terms.

func ByToolsCount

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

ByToolsCount orders the results by tools count.

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