Documentation ¶
Index ¶
- Constants
- Variables
- func And(predicates ...predicate.Statement) predicate.Statement
- func HasAttestationCollections() predicate.Statement
- func HasAttestationCollectionsWith(preds ...predicate.AttestationCollection) predicate.Statement
- func HasDsse() predicate.Statement
- func HasDsseWith(preds ...predicate.Dsse) predicate.Statement
- func HasPolicy() predicate.Statement
- func HasPolicyWith(preds ...predicate.AttestationPolicy) predicate.Statement
- func HasSubjects() predicate.Statement
- func HasSubjectsWith(preds ...predicate.Subject) predicate.Statement
- func ID(id uuid.UUID) predicate.Statement
- func IDEQ(id uuid.UUID) predicate.Statement
- func IDGT(id uuid.UUID) predicate.Statement
- func IDGTE(id uuid.UUID) predicate.Statement
- func IDIn(ids ...uuid.UUID) predicate.Statement
- func IDLT(id uuid.UUID) predicate.Statement
- func IDLTE(id uuid.UUID) predicate.Statement
- func IDNEQ(id uuid.UUID) predicate.Statement
- func IDNotIn(ids ...uuid.UUID) predicate.Statement
- func Not(p predicate.Statement) predicate.Statement
- func Or(predicates ...predicate.Statement) predicate.Statement
- func Predicate(v string) predicate.Statement
- func PredicateContains(v string) predicate.Statement
- func PredicateContainsFold(v string) predicate.Statement
- func PredicateEQ(v string) predicate.Statement
- func PredicateEqualFold(v string) predicate.Statement
- func PredicateGT(v string) predicate.Statement
- func PredicateGTE(v string) predicate.Statement
- func PredicateHasPrefix(v string) predicate.Statement
- func PredicateHasSuffix(v string) predicate.Statement
- func PredicateIn(vs ...string) predicate.Statement
- func PredicateLT(v string) predicate.Statement
- func PredicateLTE(v string) predicate.Statement
- func PredicateNEQ(v string) predicate.Statement
- func PredicateNotIn(vs ...string) predicate.Statement
- func ValidColumn(column string) bool
- type OrderOption
- func ByAttestationCollectionsField(field string, opts ...sql.OrderTermOption) OrderOption
- func ByDsse(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func ByDsseCount(opts ...sql.OrderTermOption) OrderOption
- func ByID(opts ...sql.OrderTermOption) OrderOption
- func ByPolicyField(field string, opts ...sql.OrderTermOption) OrderOption
- func ByPredicate(opts ...sql.OrderTermOption) OrderOption
- func BySubjects(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func BySubjectsCount(opts ...sql.OrderTermOption) OrderOption
Constants ¶
const ( // Label holds the string label denoting the statement type in the database. Label = "statement" // FieldID holds the string denoting the id field in the database. FieldID = "id" // FieldPredicate holds the string denoting the predicate field in the database. FieldPredicate = "predicate" // EdgeSubjects holds the string denoting the subjects edge name in mutations. EdgeSubjects = "subjects" // EdgePolicy holds the string denoting the policy edge name in mutations. EdgePolicy = "policy" // EdgeAttestationCollections holds the string denoting the attestation_collections edge name in mutations. EdgeAttestationCollections = "attestation_collections" // EdgeDsse holds the string denoting the dsse edge name in mutations. EdgeDsse = "dsse" // Table holds the table name of the statement in the database. Table = "statements" // SubjectsTable is the table that holds the subjects relation/edge. SubjectsTable = "subjects" // SubjectsInverseTable is the table name for the Subject entity. // It exists in this package in order to avoid circular dependency with the "subject" package. SubjectsInverseTable = "subjects" // SubjectsColumn is the table column denoting the subjects relation/edge. SubjectsColumn = "statement_subjects" // PolicyTable is the table that holds the policy relation/edge. PolicyTable = "attestation_policies" // PolicyInverseTable is the table name for the AttestationPolicy entity. // It exists in this package in order to avoid circular dependency with the "attestationpolicy" package. PolicyInverseTable = "attestation_policies" // PolicyColumn is the table column denoting the policy relation/edge. PolicyColumn = "statement_policy" // AttestationCollectionsTable is the table that holds the attestation_collections relation/edge. AttestationCollectionsTable = "attestation_collections" // AttestationCollectionsInverseTable is the table name for the AttestationCollection entity. // It exists in this package in order to avoid circular dependency with the "attestationcollection" package. AttestationCollectionsInverseTable = "attestation_collections" // AttestationCollectionsColumn is the table column denoting the attestation_collections relation/edge. AttestationCollectionsColumn = "statement_attestation_collections" // DsseTable is the table that holds the dsse relation/edge. DsseTable = "dsses" // DsseInverseTable is the table name for the Dsse entity. // It exists in this package in order to avoid circular dependency with the "dsse" package. DsseInverseTable = "dsses" // DsseColumn is the table column denoting the dsse relation/edge. DsseColumn = "dsse_statement" )
Variables ¶
var ( // PredicateValidator is a validator for the "predicate" field. It is called by the builders before save. PredicateValidator func(string) error // DefaultID holds the default value on creation for the "id" field. DefaultID func() uuid.UUID )
var Columns = []string{ FieldID, FieldPredicate, }
Columns holds all SQL columns for statement fields.
Functions ¶
func HasAttestationCollections ¶
HasAttestationCollections applies the HasEdge predicate on the "attestation_collections" edge.
func HasAttestationCollectionsWith ¶
func HasAttestationCollectionsWith(preds ...predicate.AttestationCollection) predicate.Statement
HasAttestationCollectionsWith applies the HasEdge predicate on the "attestation_collections" edge with a given conditions (other predicates).
func HasDsseWith ¶
HasDsseWith applies the HasEdge predicate on the "dsse" edge with a given conditions (other predicates).
func HasPolicyWith ¶ added in v0.5.0
func HasPolicyWith(preds ...predicate.AttestationPolicy) predicate.Statement
HasPolicyWith applies the HasEdge predicate on the "policy" edge with a given conditions (other predicates).
func HasSubjects ¶
HasSubjects applies the HasEdge predicate on the "subjects" edge.
func HasSubjectsWith ¶
HasSubjectsWith applies the HasEdge predicate on the "subjects" edge with a given conditions (other predicates).
func Predicate ¶
Predicate applies equality check predicate on the "predicate" field. It's identical to PredicateEQ.
func PredicateContains ¶
PredicateContains applies the Contains predicate on the "predicate" field.
func PredicateContainsFold ¶
PredicateContainsFold applies the ContainsFold predicate on the "predicate" field.
func PredicateEQ ¶
PredicateEQ applies the EQ predicate on the "predicate" field.
func PredicateEqualFold ¶
PredicateEqualFold applies the EqualFold predicate on the "predicate" field.
func PredicateGT ¶
PredicateGT applies the GT predicate on the "predicate" field.
func PredicateGTE ¶
PredicateGTE applies the GTE predicate on the "predicate" field.
func PredicateHasPrefix ¶
PredicateHasPrefix applies the HasPrefix predicate on the "predicate" field.
func PredicateHasSuffix ¶
PredicateHasSuffix applies the HasSuffix predicate on the "predicate" field.
func PredicateIn ¶
PredicateIn applies the In predicate on the "predicate" field.
func PredicateLT ¶
PredicateLT applies the LT predicate on the "predicate" field.
func PredicateLTE ¶
PredicateLTE applies the LTE predicate on the "predicate" field.
func PredicateNEQ ¶
PredicateNEQ applies the NEQ predicate on the "predicate" field.
func PredicateNotIn ¶
PredicateNotIn applies the NotIn predicate on the "predicate" field.
func ValidColumn ¶
ValidColumn reports if the column name is valid (part of the table columns).
Types ¶
type OrderOption ¶
OrderOption defines the ordering options for the Statement queries.
func ByAttestationCollectionsField ¶
func ByAttestationCollectionsField(field string, opts ...sql.OrderTermOption) OrderOption
ByAttestationCollectionsField orders the results by attestation_collections field.
func ByDsse ¶
func ByDsse(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
ByDsse orders the results by dsse terms.
func ByDsseCount ¶
func ByDsseCount(opts ...sql.OrderTermOption) OrderOption
ByDsseCount orders the results by dsse count.
func ByID ¶
func ByID(opts ...sql.OrderTermOption) OrderOption
ByID orders the results by the id field.
func ByPolicyField ¶ added in v0.5.0
func ByPolicyField(field string, opts ...sql.OrderTermOption) OrderOption
ByPolicyField orders the results by policy field.
func ByPredicate ¶
func ByPredicate(opts ...sql.OrderTermOption) OrderOption
ByPredicate orders the results by the predicate field.
func BySubjects ¶
func BySubjects(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
BySubjects orders the results by subjects terms.
func BySubjectsCount ¶
func BySubjectsCount(opts ...sql.OrderTermOption) OrderOption
BySubjectsCount orders the results by subjects count.