Documentation
¶
Index ¶
- Constants
- Variables
- func And(predicates ...predicate.Tool) predicate.Tool
- func HasDocuments() predicate.Tool
- func HasDocumentsWith(preds ...predicate.Document) predicate.Tool
- func HasMetadata() predicate.Tool
- func HasMetadataWith(preds ...predicate.Metadata) predicate.Tool
- func ID(id uuid.UUID) predicate.Tool
- func IDEQ(id uuid.UUID) predicate.Tool
- func IDGT(id uuid.UUID) predicate.Tool
- func IDGTE(id uuid.UUID) predicate.Tool
- func IDIn(ids ...uuid.UUID) predicate.Tool
- func IDLT(id uuid.UUID) predicate.Tool
- func IDLTE(id uuid.UUID) predicate.Tool
- func IDNEQ(id uuid.UUID) predicate.Tool
- func IDNotIn(ids ...uuid.UUID) predicate.Tool
- func Name(v string) predicate.Tool
- func NameContains(v string) predicate.Tool
- func NameContainsFold(v string) predicate.Tool
- func NameEQ(v string) predicate.Tool
- func NameEqualFold(v string) predicate.Tool
- func NameGT(v string) predicate.Tool
- func NameGTE(v string) predicate.Tool
- func NameHasPrefix(v string) predicate.Tool
- func NameHasSuffix(v string) predicate.Tool
- func NameIn(vs ...string) predicate.Tool
- func NameLT(v string) predicate.Tool
- func NameLTE(v string) predicate.Tool
- func NameNEQ(v string) predicate.Tool
- func NameNotIn(vs ...string) predicate.Tool
- func Not(p predicate.Tool) predicate.Tool
- func Or(predicates ...predicate.Tool) predicate.Tool
- func ProtoMessage(v *sbom.Tool) predicate.Tool
- func ProtoMessageEQ(v *sbom.Tool) predicate.Tool
- func ProtoMessageGT(v *sbom.Tool) predicate.Tool
- func ProtoMessageGTE(v *sbom.Tool) predicate.Tool
- func ProtoMessageIn(vs ...*sbom.Tool) predicate.Tool
- func ProtoMessageLT(v *sbom.Tool) predicate.Tool
- func ProtoMessageLTE(v *sbom.Tool) predicate.Tool
- func ProtoMessageNEQ(v *sbom.Tool) predicate.Tool
- func ProtoMessageNotIn(vs ...*sbom.Tool) predicate.Tool
- func ValidColumn(column string) bool
- func Vendor(v string) predicate.Tool
- func VendorContains(v string) predicate.Tool
- func VendorContainsFold(v string) predicate.Tool
- func VendorEQ(v string) predicate.Tool
- func VendorEqualFold(v string) predicate.Tool
- func VendorGT(v string) predicate.Tool
- func VendorGTE(v string) predicate.Tool
- func VendorHasPrefix(v string) predicate.Tool
- func VendorHasSuffix(v string) predicate.Tool
- func VendorIn(vs ...string) predicate.Tool
- func VendorLT(v string) predicate.Tool
- func VendorLTE(v string) predicate.Tool
- func VendorNEQ(v string) predicate.Tool
- func VendorNotIn(vs ...string) predicate.Tool
- func Version(v string) predicate.Tool
- func VersionContains(v string) predicate.Tool
- func VersionContainsFold(v string) predicate.Tool
- func VersionEQ(v string) predicate.Tool
- func VersionEqualFold(v string) predicate.Tool
- func VersionGT(v string) predicate.Tool
- func VersionGTE(v string) predicate.Tool
- func VersionHasPrefix(v string) predicate.Tool
- func VersionHasSuffix(v string) predicate.Tool
- func VersionIn(vs ...string) predicate.Tool
- func VersionLT(v string) predicate.Tool
- func VersionLTE(v string) predicate.Tool
- func VersionNEQ(v string) predicate.Tool
- func VersionNotIn(vs ...string) predicate.Tool
- type OrderOption
- func ByDocuments(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func ByDocumentsCount(opts ...sql.OrderTermOption) OrderOption
- func ByID(opts ...sql.OrderTermOption) OrderOption
- func ByMetadata(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func ByMetadataCount(opts ...sql.OrderTermOption) OrderOption
- func ByName(opts ...sql.OrderTermOption) OrderOption
- func ByVendor(opts ...sql.OrderTermOption) OrderOption
- func ByVersion(opts ...sql.OrderTermOption) OrderOption
Constants ¶
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 ¶
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"} )
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"
var Columns = []string{ FieldID, FieldProtoMessage, FieldName, FieldVersion, FieldVendor, }
Columns holds all SQL columns for tool fields.
Functions ¶
func HasDocuments ¶ added in v0.2.0
HasDocuments applies the HasEdge predicate on the "documents" edge.
func HasDocumentsWith ¶ added in v0.2.0
HasDocumentsWith applies the HasEdge predicate on the "documents" edge with a given conditions (other predicates).
func HasMetadata ¶
HasMetadata applies the HasEdge predicate on the "metadata" edge.
func HasMetadataWith ¶
HasMetadataWith applies the HasEdge predicate on the "metadata" edge with a given conditions (other predicates).
func NameContains ¶
NameContains applies the Contains predicate on the "name" field.
func NameContainsFold ¶
NameContainsFold applies the ContainsFold predicate on the "name" field.
func NameEqualFold ¶
NameEqualFold applies the EqualFold predicate on the "name" field.
func NameHasPrefix ¶
NameHasPrefix applies the HasPrefix predicate on the "name" field.
func NameHasSuffix ¶
NameHasSuffix applies the HasSuffix predicate on the "name" field.
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
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
ProtoMessageNotIn applies the NotIn predicate on the "proto_message" field.
func ValidColumn ¶
ValidColumn reports if the column name is valid (part of the table columns).
func Vendor ¶
Vendor applies equality check predicate on the "vendor" field. It's identical to VendorEQ.
func VendorContains ¶
VendorContains applies the Contains predicate on the "vendor" field.
func VendorContainsFold ¶
VendorContainsFold applies the ContainsFold predicate on the "vendor" field.
func VendorEqualFold ¶
VendorEqualFold applies the EqualFold predicate on the "vendor" field.
func VendorHasPrefix ¶
VendorHasPrefix applies the HasPrefix predicate on the "vendor" field.
func VendorHasSuffix ¶
VendorHasSuffix applies the HasSuffix predicate on the "vendor" field.
func VendorNotIn ¶
VendorNotIn applies the NotIn predicate on the "vendor" field.
func Version ¶
Version applies equality check predicate on the "version" field. It's identical to VersionEQ.
func VersionContains ¶
VersionContains applies the Contains predicate on the "version" field.
func VersionContainsFold ¶
VersionContainsFold applies the ContainsFold predicate on the "version" field.
func VersionEqualFold ¶
VersionEqualFold applies the EqualFold predicate on the "version" field.
func VersionGTE ¶
VersionGTE applies the GTE predicate on the "version" field.
func VersionHasPrefix ¶
VersionHasPrefix applies the HasPrefix predicate on the "version" field.
func VersionHasSuffix ¶
VersionHasSuffix applies the HasSuffix predicate on the "version" field.
func VersionLTE ¶
VersionLTE applies the LTE predicate on the "version" field.
func VersionNEQ ¶
VersionNEQ applies the NEQ predicate on the "version" field.
func VersionNotIn ¶
VersionNotIn applies the NotIn predicate on the "version" field.
Types ¶
type OrderOption ¶
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.