Documentation
¶
Index ¶
- Constants
- Variables
- func And(predicates ...predicate.HashesEntry) predicate.HashesEntry
- func HasDocuments() predicate.HashesEntry
- func HasDocumentsWith(preds ...predicate.Document) predicate.HashesEntry
- func HasExternalReferences() predicate.HashesEntry
- func HasExternalReferencesWith(preds ...predicate.ExternalReference) predicate.HashesEntry
- func HasNodes() predicate.HashesEntry
- func HasNodesWith(preds ...predicate.Node) predicate.HashesEntry
- func HasSourceData() predicate.HashesEntry
- func HasSourceDataWith(preds ...predicate.SourceData) predicate.HashesEntry
- func HashAlgorithmEQ(v HashAlgorithm) predicate.HashesEntry
- func HashAlgorithmIn(vs ...HashAlgorithm) predicate.HashesEntry
- func HashAlgorithmNEQ(v HashAlgorithm) predicate.HashesEntry
- func HashAlgorithmNotIn(vs ...HashAlgorithm) predicate.HashesEntry
- func HashAlgorithmValidator(ha HashAlgorithm) error
- func HashData(v string) predicate.HashesEntry
- func HashDataContains(v string) predicate.HashesEntry
- func HashDataContainsFold(v string) predicate.HashesEntry
- func HashDataEQ(v string) predicate.HashesEntry
- func HashDataEqualFold(v string) predicate.HashesEntry
- func HashDataGT(v string) predicate.HashesEntry
- func HashDataGTE(v string) predicate.HashesEntry
- func HashDataHasPrefix(v string) predicate.HashesEntry
- func HashDataHasSuffix(v string) predicate.HashesEntry
- func HashDataIn(vs ...string) predicate.HashesEntry
- func HashDataLT(v string) predicate.HashesEntry
- func HashDataLTE(v string) predicate.HashesEntry
- func HashDataNEQ(v string) predicate.HashesEntry
- func HashDataNotIn(vs ...string) predicate.HashesEntry
- func ID(id uuid.UUID) predicate.HashesEntry
- func IDEQ(id uuid.UUID) predicate.HashesEntry
- func IDGT(id uuid.UUID) predicate.HashesEntry
- func IDGTE(id uuid.UUID) predicate.HashesEntry
- func IDIn(ids ...uuid.UUID) predicate.HashesEntry
- func IDLT(id uuid.UUID) predicate.HashesEntry
- func IDLTE(id uuid.UUID) predicate.HashesEntry
- func IDNEQ(id uuid.UUID) predicate.HashesEntry
- func IDNotIn(ids ...uuid.UUID) predicate.HashesEntry
- func Not(p predicate.HashesEntry) predicate.HashesEntry
- func Or(predicates ...predicate.HashesEntry) predicate.HashesEntry
- func ValidColumn(column string) bool
- type HashAlgorithm
- type OrderOption
- func ByDocuments(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func ByDocumentsCount(opts ...sql.OrderTermOption) OrderOption
- func ByExternalReferences(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func ByExternalReferencesCount(opts ...sql.OrderTermOption) OrderOption
- func ByHashAlgorithm(opts ...sql.OrderTermOption) OrderOption
- func ByHashData(opts ...sql.OrderTermOption) OrderOption
- func ByID(opts ...sql.OrderTermOption) OrderOption
- func ByNodes(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func ByNodesCount(opts ...sql.OrderTermOption) OrderOption
- func BySourceData(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func BySourceDataCount(opts ...sql.OrderTermOption) OrderOption
Constants ¶
const ( // Label holds the string label denoting the hashesentry type in the database. Label = "hashes_entry" // FieldID holds the string denoting the id field in the database. FieldID = "id" // FieldHashAlgorithm holds the string denoting the hash_algorithm field in the database. FieldHashAlgorithm = "hash_algorithm" // FieldHashData holds the string denoting the hash_data field in the database. FieldHashData = "hash_data" // EdgeDocuments holds the string denoting the documents edge name in mutations. EdgeDocuments = "documents" // EdgeExternalReferences holds the string denoting the external_references edge name in mutations. EdgeExternalReferences = "external_references" // EdgeNodes holds the string denoting the nodes edge name in mutations. EdgeNodes = "nodes" // EdgeSourceData holds the string denoting the source_data edge name in mutations. EdgeSourceData = "source_data" // Table holds the table name of the hashesentry in the database. Table = "hashes_entries" // DocumentsTable is the table that holds the documents relation/edge. The primary key declared below. DocumentsTable = "document_hashes" // 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" // ExternalReferencesTable is the table that holds the external_references relation/edge. The primary key declared below. ExternalReferencesTable = "ext_ref_hashes" // ExternalReferencesInverseTable is the table name for the ExternalReference entity. // It exists in this package in order to avoid circular dependency with the "externalreference" package. ExternalReferencesInverseTable = "external_references" // NodesTable is the table that holds the nodes relation/edge. The primary key declared below. NodesTable = "node_hashes" // 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" // SourceDataTable is the table that holds the source_data relation/edge. The primary key declared below. SourceDataTable = "source_data_hashes" // 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" )
Variables ¶
var ( // DocumentsPrimaryKey and DocumentsColumn2 are the table columns denoting the // primary key for the documents relation (M2M). DocumentsPrimaryKey = []string{"document_id", "hashes_entry_id"} // ExternalReferencesPrimaryKey and ExternalReferencesColumn2 are the table columns denoting the // primary key for the external_references relation (M2M). ExternalReferencesPrimaryKey = []string{"ext_ref_id", "hash_entry_id"} // NodesPrimaryKey and NodesColumn2 are the table columns denoting the // primary key for the nodes relation (M2M). NodesPrimaryKey = []string{"node_id", "hash_entry_id"} // SourceDataPrimaryKey and SourceDataColumn2 are the table columns denoting the // primary key for the source_data relation (M2M). SourceDataPrimaryKey = []string{"source_data_id", "hash_entry_id"} )
var ( Hooks [2]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, FieldHashAlgorithm, FieldHashData, }
Columns holds all SQL columns for hashesentry fields.
Functions ¶
func And ¶
func And(predicates ...predicate.HashesEntry) predicate.HashesEntry
And groups predicates with the AND operator between them.
func HasDocuments ¶ added in v0.2.0
func HasDocuments() predicate.HashesEntry
HasDocuments applies the HasEdge predicate on the "documents" edge.
func HasDocumentsWith ¶ added in v0.2.0
func HasDocumentsWith(preds ...predicate.Document) predicate.HashesEntry
HasDocumentsWith applies the HasEdge predicate on the "documents" edge with a given conditions (other predicates).
func HasExternalReferences ¶ added in v0.2.0
func HasExternalReferences() predicate.HashesEntry
HasExternalReferences applies the HasEdge predicate on the "external_references" edge.
func HasExternalReferencesWith ¶ added in v0.2.0
func HasExternalReferencesWith(preds ...predicate.ExternalReference) predicate.HashesEntry
HasExternalReferencesWith applies the HasEdge predicate on the "external_references" edge with a given conditions (other predicates).
func HasNodes ¶ added in v0.2.0
func HasNodes() predicate.HashesEntry
HasNodes applies the HasEdge predicate on the "nodes" edge.
func HasNodesWith ¶ added in v0.2.0
func HasNodesWith(preds ...predicate.Node) predicate.HashesEntry
HasNodesWith applies the HasEdge predicate on the "nodes" edge with a given conditions (other predicates).
func HasSourceData ¶ added in v0.2.0
func HasSourceData() predicate.HashesEntry
HasSourceData applies the HasEdge predicate on the "source_data" edge.
func HasSourceDataWith ¶ added in v0.2.0
func HasSourceDataWith(preds ...predicate.SourceData) predicate.HashesEntry
HasSourceDataWith applies the HasEdge predicate on the "source_data" edge with a given conditions (other predicates).
func HashAlgorithmEQ ¶ added in v0.2.0
func HashAlgorithmEQ(v HashAlgorithm) predicate.HashesEntry
HashAlgorithmEQ applies the EQ predicate on the "hash_algorithm" field.
func HashAlgorithmIn ¶ added in v0.2.0
func HashAlgorithmIn(vs ...HashAlgorithm) predicate.HashesEntry
HashAlgorithmIn applies the In predicate on the "hash_algorithm" field.
func HashAlgorithmNEQ ¶ added in v0.2.0
func HashAlgorithmNEQ(v HashAlgorithm) predicate.HashesEntry
HashAlgorithmNEQ applies the NEQ predicate on the "hash_algorithm" field.
func HashAlgorithmNotIn ¶ added in v0.2.0
func HashAlgorithmNotIn(vs ...HashAlgorithm) predicate.HashesEntry
HashAlgorithmNotIn applies the NotIn predicate on the "hash_algorithm" field.
func HashAlgorithmValidator ¶ added in v0.2.0
func HashAlgorithmValidator(ha HashAlgorithm) error
HashAlgorithmValidator is a validator for the "hash_algorithm" field enum values. It is called by the builders before save.
func HashData ¶
func HashData(v string) predicate.HashesEntry
HashData applies equality check predicate on the "hash_data" field. It's identical to HashDataEQ.
func HashDataContains ¶
func HashDataContains(v string) predicate.HashesEntry
HashDataContains applies the Contains predicate on the "hash_data" field.
func HashDataContainsFold ¶
func HashDataContainsFold(v string) predicate.HashesEntry
HashDataContainsFold applies the ContainsFold predicate on the "hash_data" field.
func HashDataEQ ¶
func HashDataEQ(v string) predicate.HashesEntry
HashDataEQ applies the EQ predicate on the "hash_data" field.
func HashDataEqualFold ¶
func HashDataEqualFold(v string) predicate.HashesEntry
HashDataEqualFold applies the EqualFold predicate on the "hash_data" field.
func HashDataGT ¶
func HashDataGT(v string) predicate.HashesEntry
HashDataGT applies the GT predicate on the "hash_data" field.
func HashDataGTE ¶
func HashDataGTE(v string) predicate.HashesEntry
HashDataGTE applies the GTE predicate on the "hash_data" field.
func HashDataHasPrefix ¶
func HashDataHasPrefix(v string) predicate.HashesEntry
HashDataHasPrefix applies the HasPrefix predicate on the "hash_data" field.
func HashDataHasSuffix ¶
func HashDataHasSuffix(v string) predicate.HashesEntry
HashDataHasSuffix applies the HasSuffix predicate on the "hash_data" field.
func HashDataIn ¶
func HashDataIn(vs ...string) predicate.HashesEntry
HashDataIn applies the In predicate on the "hash_data" field.
func HashDataLT ¶
func HashDataLT(v string) predicate.HashesEntry
HashDataLT applies the LT predicate on the "hash_data" field.
func HashDataLTE ¶
func HashDataLTE(v string) predicate.HashesEntry
HashDataLTE applies the LTE predicate on the "hash_data" field.
func HashDataNEQ ¶
func HashDataNEQ(v string) predicate.HashesEntry
HashDataNEQ applies the NEQ predicate on the "hash_data" field.
func HashDataNotIn ¶
func HashDataNotIn(vs ...string) predicate.HashesEntry
HashDataNotIn applies the NotIn predicate on the "hash_data" field.
func IDEQ ¶
func IDEQ(id uuid.UUID) predicate.HashesEntry
IDEQ applies the EQ predicate on the ID field.
func IDGT ¶
func IDGT(id uuid.UUID) predicate.HashesEntry
IDGT applies the GT predicate on the ID field.
func IDGTE ¶
func IDGTE(id uuid.UUID) predicate.HashesEntry
IDGTE applies the GTE predicate on the ID field.
func IDIn ¶
func IDIn(ids ...uuid.UUID) predicate.HashesEntry
IDIn applies the In predicate on the ID field.
func IDLT ¶
func IDLT(id uuid.UUID) predicate.HashesEntry
IDLT applies the LT predicate on the ID field.
func IDLTE ¶
func IDLTE(id uuid.UUID) predicate.HashesEntry
IDLTE applies the LTE predicate on the ID field.
func IDNEQ ¶
func IDNEQ(id uuid.UUID) predicate.HashesEntry
IDNEQ applies the NEQ predicate on the ID field.
func IDNotIn ¶
func IDNotIn(ids ...uuid.UUID) predicate.HashesEntry
IDNotIn applies the NotIn predicate on the ID field.
func Not ¶
func Not(p predicate.HashesEntry) predicate.HashesEntry
Not applies the not operator on the given predicate.
func Or ¶
func Or(predicates ...predicate.HashesEntry) predicate.HashesEntry
Or groups predicates with the OR operator between them.
func ValidColumn ¶
ValidColumn reports if the column name is valid (part of the table columns).
Types ¶
type HashAlgorithm ¶ added in v0.2.0
type HashAlgorithm string
HashAlgorithm defines the type for the "hash_algorithm" enum field.
const ( HashAlgorithmUNKNOWN HashAlgorithm = "UNKNOWN" HashAlgorithmMD5 HashAlgorithm = "MD5" HashAlgorithmSHA1 HashAlgorithm = "SHA1" HashAlgorithmSHA256 HashAlgorithm = "SHA256" HashAlgorithmSHA384 HashAlgorithm = "SHA384" HashAlgorithmSHA512 HashAlgorithm = "SHA512" HashAlgorithmSHA3_256 HashAlgorithm = "SHA3_256" HashAlgorithmSHA3_384 HashAlgorithm = "SHA3_384" HashAlgorithmSHA3_512 HashAlgorithm = "SHA3_512" HashAlgorithmBLAKE2B_256 HashAlgorithm = "BLAKE2B_256" HashAlgorithmBLAKE2B_384 HashAlgorithm = "BLAKE2B_384" HashAlgorithmBLAKE2B_512 HashAlgorithm = "BLAKE2B_512" HashAlgorithmBLAKE3 HashAlgorithm = "BLAKE3" HashAlgorithmMD2 HashAlgorithm = "MD2" HashAlgorithmADLER32 HashAlgorithm = "ADLER32" HashAlgorithmMD4 HashAlgorithm = "MD4" HashAlgorithmMD6 HashAlgorithm = "MD6" HashAlgorithmSHA224 HashAlgorithm = "SHA224" )
HashAlgorithm values.
func (HashAlgorithm) String ¶ added in v0.2.0
func (ha HashAlgorithm) String() string
type OrderOption ¶
OrderOption defines the ordering options for the HashesEntry 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 ByExternalReferences ¶ added in v0.2.0
func ByExternalReferences(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
ByExternalReferences orders the results by external_references terms.
func ByExternalReferencesCount ¶ added in v0.2.0
func ByExternalReferencesCount(opts ...sql.OrderTermOption) OrderOption
ByExternalReferencesCount orders the results by external_references count.
func ByHashAlgorithm ¶ added in v0.2.0
func ByHashAlgorithm(opts ...sql.OrderTermOption) OrderOption
ByHashAlgorithm orders the results by the hash_algorithm field.
func ByHashData ¶
func ByHashData(opts ...sql.OrderTermOption) OrderOption
ByHashData orders the results by the hash_data field.
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 BySourceData ¶ added in v0.2.0
func BySourceData(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
BySourceData orders the results by source_data terms.
func BySourceDataCount ¶ added in v0.2.0
func BySourceDataCount(opts ...sql.OrderTermOption) OrderOption
BySourceDataCount orders the results by source_data count.