Documentation ¶
Index ¶
- func FixedError(err error) ent.Hook
- func If(hk ent.Hook, cond Condition) ent.Hook
- func On(hk ent.Hook, op ent.Op) ent.Hook
- func Reject(op ent.Op) ent.Hook
- func Unless(hk ent.Hook, op ent.Op) ent.Hook
- type ArtifactFunc
- type BillOfMaterialsFunc
- type BuilderFunc
- type CertificationFunc
- type CertifyLegalFunc
- type CertifyScorecardFunc
- type CertifyVexFunc
- type CertifyVulnFunc
- type Chain
- type Condition
- func And(first, second Condition, rest ...Condition) Condition
- func HasAddedFields(field string, fields ...string) Condition
- func HasClearedFields(field string, fields ...string) Condition
- func HasFields(field string, fields ...string) Condition
- func HasOp(op ent.Op) Condition
- func Not(cond Condition) Condition
- func Or(first, second Condition, rest ...Condition) Condition
- type DependencyFunc
- type HasMetadataFunc
- type HasSourceAtFunc
- type HashEqualFunc
- type IsVulnerabilityFunc
- type LicenseFunc
- type OccurrenceFunc
- type PackageNameFunc
- type PackageNamespaceFunc
- type PackageTypeFunc
- type PackageVersionFunc
- type PkgEqualFunc
- type PointOfContactFunc
- type SLSAAttestationFunc
- type ScorecardFunc
- type SourceNameFunc
- type SourceNamespaceFunc
- type SourceTypeFunc
- type VulnEqualFunc
- type VulnerabilityIDFunc
- type VulnerabilityMetadataFunc
- type VulnerabilityTypeFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func If ¶
If executes the given hook under condition.
hook.If(ComputeAverage, And(HasFields(...), HasAddedFields(...)))
func On ¶
On executes the given hook only for the given operation.
hook.On(Log, ent.Delete|ent.Create)
Types ¶
type ArtifactFunc ¶
The ArtifactFunc type is an adapter to allow the use of ordinary function as Artifact mutator.
type BillOfMaterialsFunc ¶
The BillOfMaterialsFunc type is an adapter to allow the use of ordinary function as BillOfMaterials mutator.
type BuilderFunc ¶
The BuilderFunc type is an adapter to allow the use of ordinary function as Builder mutator.
type CertificationFunc ¶
The CertificationFunc type is an adapter to allow the use of ordinary function as Certification mutator.
type CertifyLegalFunc ¶
The CertifyLegalFunc type is an adapter to allow the use of ordinary function as CertifyLegal mutator.
type CertifyScorecardFunc ¶
The CertifyScorecardFunc type is an adapter to allow the use of ordinary function as CertifyScorecard mutator.
type CertifyVexFunc ¶
The CertifyVexFunc type is an adapter to allow the use of ordinary function as CertifyVex mutator.
type CertifyVulnFunc ¶
The CertifyVulnFunc type is an adapter to allow the use of ordinary function as CertifyVuln mutator.
type Chain ¶
type Chain struct {
// contains filtered or unexported fields
}
Chain acts as a list of hooks and is effectively immutable. Once created, it will always hold the same set of hooks in the same order.
func (Chain) Append ¶
Append extends a chain, adding the specified hook as the last ones in the mutation flow.
type Condition ¶
Condition is a hook condition function.
func HasAddedFields ¶
HasAddedFields is a condition validating `.AddedField` on fields.
func HasClearedFields ¶
HasClearedFields is a condition validating `.FieldCleared` on fields.
type DependencyFunc ¶
The DependencyFunc type is an adapter to allow the use of ordinary function as Dependency mutator.
type HasMetadataFunc ¶ added in v0.2.1
The HasMetadataFunc type is an adapter to allow the use of ordinary function as HasMetadata mutator.
type HasSourceAtFunc ¶
The HasSourceAtFunc type is an adapter to allow the use of ordinary function as HasSourceAt mutator.
type HashEqualFunc ¶
The HashEqualFunc type is an adapter to allow the use of ordinary function as HashEqual mutator.
type IsVulnerabilityFunc ¶
The IsVulnerabilityFunc type is an adapter to allow the use of ordinary function as IsVulnerability mutator.
type LicenseFunc ¶
The LicenseFunc type is an adapter to allow the use of ordinary function as License mutator.
type OccurrenceFunc ¶
The OccurrenceFunc type is an adapter to allow the use of ordinary function as Occurrence mutator.
type PackageNameFunc ¶
The PackageNameFunc type is an adapter to allow the use of ordinary function as PackageName mutator.
type PackageNamespaceFunc ¶
The PackageNamespaceFunc type is an adapter to allow the use of ordinary function as PackageNamespace mutator.
type PackageTypeFunc ¶
The PackageTypeFunc type is an adapter to allow the use of ordinary function as PackageType mutator.
type PackageVersionFunc ¶
The PackageVersionFunc type is an adapter to allow the use of ordinary function as PackageVersion mutator.
type PkgEqualFunc ¶
The PkgEqualFunc type is an adapter to allow the use of ordinary function as PkgEqual mutator.
type PointOfContactFunc ¶ added in v0.2.1
The PointOfContactFunc type is an adapter to allow the use of ordinary function as PointOfContact mutator.
type SLSAAttestationFunc ¶
The SLSAAttestationFunc type is an adapter to allow the use of ordinary function as SLSAAttestation mutator.
type ScorecardFunc ¶
The ScorecardFunc type is an adapter to allow the use of ordinary function as Scorecard mutator.
type SourceNameFunc ¶
The SourceNameFunc type is an adapter to allow the use of ordinary function as SourceName mutator.
type SourceNamespaceFunc ¶
The SourceNamespaceFunc type is an adapter to allow the use of ordinary function as SourceNamespace mutator.
type SourceTypeFunc ¶
The SourceTypeFunc type is an adapter to allow the use of ordinary function as SourceType mutator.
type VulnEqualFunc ¶
The VulnEqualFunc type is an adapter to allow the use of ordinary function as VulnEqual mutator.
type VulnerabilityIDFunc ¶
The VulnerabilityIDFunc type is an adapter to allow the use of ordinary function as VulnerabilityID mutator.
type VulnerabilityMetadataFunc ¶ added in v0.4.0
type VulnerabilityMetadataFunc func(context.Context, *ent.VulnerabilityMetadataMutation) (ent.Value, error)
The VulnerabilityMetadataFunc type is an adapter to allow the use of ordinary function as VulnerabilityMetadata mutator.
type VulnerabilityTypeFunc ¶
The VulnerabilityTypeFunc type is an adapter to allow the use of ordinary function as VulnerabilityType mutator.