ent

package
v0.6.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 30, 2024 License: Apache-2.0 Imports: 50 Imported by: 0

README

Ent Backend

This contains the RDMS backend powered by Ent.

Developing

Adding new nodes:

go run -mod=mod entgo.io/ent/cmd/ent new --target pkg/assembler/backends/ent/schema <NodeName>

Generating the schema:

go generate pkg/assembler/backends/ent/generate.go

Testing

This package requires a real Postgres db to test against, so it is not included in the normal test suite. To run the tests, you must have a Postgres db running locally and set the ENT_TEST_DATABASE_URL environment variable to the connection string for that db, or use the default: postgresql://localhost/guac_test?sslmode=disable.

For example:

createdb guac_test
go test ./pkg/assembler/backends/ent/backend/

All tests run within a transaction, so they should not leave any data in the db, and each run should start with a clean slate.

Future Work

Supporting other databases

This backend uses Ent, which is compatible with a wide array of SQL database engines, including MySQL/Aurora, Sqlite, Postres, TiDB, etc.

This implementation is currently built against Postgres, but it should be possible to support other databases by adding support for their specific handling of indexes, and compiling in the necessary drivers. https://github.com/ivanvanderbyl/guac/blob/8fcfccf5bc4145a31fac6e8dc50e7e01e006292a/pkg/assembler/backends/ent/backend/backend.go#L12

Bulk Upserting Trees

Both Package and Source trees use multiple tables, which means it would be impossible to upsert using standard upsert semantics.

Here are a few ways we could solve this for performance:

  1. Denormalize the entire tree to single table with nulls for the columns that aren't present, allowing us to upsert all layers of the tree in a single upsert request. This has one limitation that we'd need to know the primary keys which is impossible to return using batch upserts.
  2. Do a presence query first before inserting the nodes that are missing. This isn't strictly an upsert since it's done at the application layer and would require locking other writers.
  3. Generate the primary keys client side using UUIDs (v7 preferrably) and upsert each layer of the tree using BulkCreate() — NOTE: This will break Global Unique IDs unless we prefix everything, which will further complicate DB Indexes. This is only strictly needed to Node/Nodes queries.

Option 3 is probably the easiest to adopt, but we'd need to make that schema change before merging this in, or drop the DB and recreate it with the new schema since there's really no simple way to migrate from ints to uuids.

Documentation

Index

Constants

View Source
const (
	// Operation types.
	OpCreate    = ent.OpCreate
	OpDelete    = ent.OpDelete
	OpDeleteOne = ent.OpDeleteOne
	OpUpdate    = ent.OpUpdate
	OpUpdateOne = ent.OpUpdateOne

	// Node types.
	TypeArtifact              = "Artifact"
	TypeBillOfMaterials       = "BillOfMaterials"
	TypeBuilder               = "Builder"
	TypeCertification         = "Certification"
	TypeCertifyLegal          = "CertifyLegal"
	TypeCertifyScorecard      = "CertifyScorecard"
	TypeCertifyVex            = "CertifyVex"
	TypeCertifyVuln           = "CertifyVuln"
	TypeDependency            = "Dependency"
	TypeHasMetadata           = "HasMetadata"
	TypeHasSourceAt           = "HasSourceAt"
	TypeHashEqual             = "HashEqual"
	TypeLicense               = "License"
	TypeOccurrence            = "Occurrence"
	TypePackageName           = "PackageName"
	TypePackageVersion        = "PackageVersion"
	TypePkgEqual              = "PkgEqual"
	TypePointOfContact        = "PointOfContact"
	TypeSLSAAttestation       = "SLSAAttestation"
	TypeSourceName            = "SourceName"
	TypeVulnEqual             = "VulnEqual"
	TypeVulnerabilityID       = "VulnerabilityID"
	TypeVulnerabilityMetadata = "VulnerabilityMetadata"
)

Variables

View Source
var DefaultArtifactOrder = &ArtifactOrder{
	Direction: entgql.OrderDirectionAsc,
	Field: &ArtifactOrderField{
		Value: func(a *Artifact) (ent.Value, error) {
			return a.ID, nil
		},
		column: artifact.FieldID,
		toTerm: artifact.ByID,
		toCursor: func(a *Artifact) Cursor {
			return Cursor{ID: a.ID}
		},
	},
}

DefaultArtifactOrder is the default ordering of Artifact.

View Source
var DefaultBillOfMaterialsOrder = &BillOfMaterialsOrder{
	Direction: entgql.OrderDirectionAsc,
	Field: &BillOfMaterialsOrderField{
		Value: func(bom *BillOfMaterials) (ent.Value, error) {
			return bom.ID, nil
		},
		column: billofmaterials.FieldID,
		toTerm: billofmaterials.ByID,
		toCursor: func(bom *BillOfMaterials) Cursor {
			return Cursor{ID: bom.ID}
		},
	},
}

DefaultBillOfMaterialsOrder is the default ordering of BillOfMaterials.

View Source
var DefaultBuilderOrder = &BuilderOrder{
	Direction: entgql.OrderDirectionAsc,
	Field: &BuilderOrderField{
		Value: func(b *Builder) (ent.Value, error) {
			return b.ID, nil
		},
		column: builder.FieldID,
		toTerm: builder.ByID,
		toCursor: func(b *Builder) Cursor {
			return Cursor{ID: b.ID}
		},
	},
}

DefaultBuilderOrder is the default ordering of Builder.

View Source
var DefaultCertificationOrder = &CertificationOrder{
	Direction: entgql.OrderDirectionAsc,
	Field: &CertificationOrderField{
		Value: func(c *Certification) (ent.Value, error) {
			return c.ID, nil
		},
		column: certification.FieldID,
		toTerm: certification.ByID,
		toCursor: func(c *Certification) Cursor {
			return Cursor{ID: c.ID}
		},
	},
}

DefaultCertificationOrder is the default ordering of Certification.

View Source
var DefaultCertifyLegalOrder = &CertifyLegalOrder{
	Direction: entgql.OrderDirectionAsc,
	Field: &CertifyLegalOrderField{
		Value: func(cl *CertifyLegal) (ent.Value, error) {
			return cl.ID, nil
		},
		column: certifylegal.FieldID,
		toTerm: certifylegal.ByID,
		toCursor: func(cl *CertifyLegal) Cursor {
			return Cursor{ID: cl.ID}
		},
	},
}

DefaultCertifyLegalOrder is the default ordering of CertifyLegal.

View Source
var DefaultCertifyScorecardOrder = &CertifyScorecardOrder{
	Direction: entgql.OrderDirectionAsc,
	Field: &CertifyScorecardOrderField{
		Value: func(cs *CertifyScorecard) (ent.Value, error) {
			return cs.ID, nil
		},
		column: certifyscorecard.FieldID,
		toTerm: certifyscorecard.ByID,
		toCursor: func(cs *CertifyScorecard) Cursor {
			return Cursor{ID: cs.ID}
		},
	},
}

DefaultCertifyScorecardOrder is the default ordering of CertifyScorecard.

View Source
var DefaultCertifyVexOrder = &CertifyVexOrder{
	Direction: entgql.OrderDirectionAsc,
	Field: &CertifyVexOrderField{
		Value: func(cv *CertifyVex) (ent.Value, error) {
			return cv.ID, nil
		},
		column: certifyvex.FieldID,
		toTerm: certifyvex.ByID,
		toCursor: func(cv *CertifyVex) Cursor {
			return Cursor{ID: cv.ID}
		},
	},
}

DefaultCertifyVexOrder is the default ordering of CertifyVex.

View Source
var DefaultCertifyVulnOrder = &CertifyVulnOrder{
	Direction: entgql.OrderDirectionAsc,
	Field: &CertifyVulnOrderField{
		Value: func(cv *CertifyVuln) (ent.Value, error) {
			return cv.ID, nil
		},
		column: certifyvuln.FieldID,
		toTerm: certifyvuln.ByID,
		toCursor: func(cv *CertifyVuln) Cursor {
			return Cursor{ID: cv.ID}
		},
	},
}

DefaultCertifyVulnOrder is the default ordering of CertifyVuln.

View Source
var DefaultDependencyOrder = &DependencyOrder{
	Direction: entgql.OrderDirectionAsc,
	Field: &DependencyOrderField{
		Value: func(d *Dependency) (ent.Value, error) {
			return d.ID, nil
		},
		column: dependency.FieldID,
		toTerm: dependency.ByID,
		toCursor: func(d *Dependency) Cursor {
			return Cursor{ID: d.ID}
		},
	},
}

DefaultDependencyOrder is the default ordering of Dependency.

View Source
var DefaultHasMetadataOrder = &HasMetadataOrder{
	Direction: entgql.OrderDirectionAsc,
	Field: &HasMetadataOrderField{
		Value: func(hm *HasMetadata) (ent.Value, error) {
			return hm.ID, nil
		},
		column: hasmetadata.FieldID,
		toTerm: hasmetadata.ByID,
		toCursor: func(hm *HasMetadata) Cursor {
			return Cursor{ID: hm.ID}
		},
	},
}

DefaultHasMetadataOrder is the default ordering of HasMetadata.

View Source
var DefaultHasSourceAtOrder = &HasSourceAtOrder{
	Direction: entgql.OrderDirectionAsc,
	Field: &HasSourceAtOrderField{
		Value: func(hsa *HasSourceAt) (ent.Value, error) {
			return hsa.ID, nil
		},
		column: hassourceat.FieldID,
		toTerm: hassourceat.ByID,
		toCursor: func(hsa *HasSourceAt) Cursor {
			return Cursor{ID: hsa.ID}
		},
	},
}

DefaultHasSourceAtOrder is the default ordering of HasSourceAt.

View Source
var DefaultHashEqualOrder = &HashEqualOrder{
	Direction: entgql.OrderDirectionAsc,
	Field: &HashEqualOrderField{
		Value: func(he *HashEqual) (ent.Value, error) {
			return he.ID, nil
		},
		column: hashequal.FieldID,
		toTerm: hashequal.ByID,
		toCursor: func(he *HashEqual) Cursor {
			return Cursor{ID: he.ID}
		},
	},
}

DefaultHashEqualOrder is the default ordering of HashEqual.

View Source
var DefaultLicenseOrder = &LicenseOrder{
	Direction: entgql.OrderDirectionAsc,
	Field: &LicenseOrderField{
		Value: func(l *License) (ent.Value, error) {
			return l.ID, nil
		},
		column: license.FieldID,
		toTerm: license.ByID,
		toCursor: func(l *License) Cursor {
			return Cursor{ID: l.ID}
		},
	},
}

DefaultLicenseOrder is the default ordering of License.

View Source
var DefaultOccurrenceOrder = &OccurrenceOrder{
	Direction: entgql.OrderDirectionAsc,
	Field: &OccurrenceOrderField{
		Value: func(o *Occurrence) (ent.Value, error) {
			return o.ID, nil
		},
		column: occurrence.FieldID,
		toTerm: occurrence.ByID,
		toCursor: func(o *Occurrence) Cursor {
			return Cursor{ID: o.ID}
		},
	},
}

DefaultOccurrenceOrder is the default ordering of Occurrence.

View Source
var DefaultPackageNameOrder = &PackageNameOrder{
	Direction: entgql.OrderDirectionAsc,
	Field: &PackageNameOrderField{
		Value: func(pn *PackageName) (ent.Value, error) {
			return pn.ID, nil
		},
		column: packagename.FieldID,
		toTerm: packagename.ByID,
		toCursor: func(pn *PackageName) Cursor {
			return Cursor{ID: pn.ID}
		},
	},
}

DefaultPackageNameOrder is the default ordering of PackageName.

View Source
var DefaultPackageVersionOrder = &PackageVersionOrder{
	Direction: entgql.OrderDirectionAsc,
	Field: &PackageVersionOrderField{
		Value: func(pv *PackageVersion) (ent.Value, error) {
			return pv.ID, nil
		},
		column: packageversion.FieldID,
		toTerm: packageversion.ByID,
		toCursor: func(pv *PackageVersion) Cursor {
			return Cursor{ID: pv.ID}
		},
	},
}

DefaultPackageVersionOrder is the default ordering of PackageVersion.

View Source
var DefaultPkgEqualOrder = &PkgEqualOrder{
	Direction: entgql.OrderDirectionAsc,
	Field: &PkgEqualOrderField{
		Value: func(pe *PkgEqual) (ent.Value, error) {
			return pe.ID, nil
		},
		column: pkgequal.FieldID,
		toTerm: pkgequal.ByID,
		toCursor: func(pe *PkgEqual) Cursor {
			return Cursor{ID: pe.ID}
		},
	},
}

DefaultPkgEqualOrder is the default ordering of PkgEqual.

View Source
var DefaultPointOfContactOrder = &PointOfContactOrder{
	Direction: entgql.OrderDirectionAsc,
	Field: &PointOfContactOrderField{
		Value: func(poc *PointOfContact) (ent.Value, error) {
			return poc.ID, nil
		},
		column: pointofcontact.FieldID,
		toTerm: pointofcontact.ByID,
		toCursor: func(poc *PointOfContact) Cursor {
			return Cursor{ID: poc.ID}
		},
	},
}

DefaultPointOfContactOrder is the default ordering of PointOfContact.

View Source
var DefaultSLSAAttestationOrder = &SLSAAttestationOrder{
	Direction: entgql.OrderDirectionAsc,
	Field: &SLSAAttestationOrderField{
		Value: func(sa *SLSAAttestation) (ent.Value, error) {
			return sa.ID, nil
		},
		column: slsaattestation.FieldID,
		toTerm: slsaattestation.ByID,
		toCursor: func(sa *SLSAAttestation) Cursor {
			return Cursor{ID: sa.ID}
		},
	},
}

DefaultSLSAAttestationOrder is the default ordering of SLSAAttestation.

View Source
var DefaultSourceNameOrder = &SourceNameOrder{
	Direction: entgql.OrderDirectionAsc,
	Field: &SourceNameOrderField{
		Value: func(sn *SourceName) (ent.Value, error) {
			return sn.ID, nil
		},
		column: sourcename.FieldID,
		toTerm: sourcename.ByID,
		toCursor: func(sn *SourceName) Cursor {
			return Cursor{ID: sn.ID}
		},
	},
}

DefaultSourceNameOrder is the default ordering of SourceName.

View Source
var DefaultVulnEqualOrder = &VulnEqualOrder{
	Direction: entgql.OrderDirectionAsc,
	Field: &VulnEqualOrderField{
		Value: func(ve *VulnEqual) (ent.Value, error) {
			return ve.ID, nil
		},
		column: vulnequal.FieldID,
		toTerm: vulnequal.ByID,
		toCursor: func(ve *VulnEqual) Cursor {
			return Cursor{ID: ve.ID}
		},
	},
}

DefaultVulnEqualOrder is the default ordering of VulnEqual.

View Source
var DefaultVulnerabilityIDOrder = &VulnerabilityIDOrder{
	Direction: entgql.OrderDirectionAsc,
	Field: &VulnerabilityIDOrderField{
		Value: func(vi *VulnerabilityID) (ent.Value, error) {
			return vi.ID, nil
		},
		column: vulnerabilityid.FieldID,
		toTerm: vulnerabilityid.ByID,
		toCursor: func(vi *VulnerabilityID) Cursor {
			return Cursor{ID: vi.ID}
		},
	},
}

DefaultVulnerabilityIDOrder is the default ordering of VulnerabilityID.

View Source
var DefaultVulnerabilityMetadataOrder = &VulnerabilityMetadataOrder{
	Direction: entgql.OrderDirectionAsc,
	Field: &VulnerabilityMetadataOrderField{
		Value: func(vm *VulnerabilityMetadata) (ent.Value, error) {
			return vm.ID, nil
		},
		column: vulnerabilitymetadata.FieldID,
		toTerm: vulnerabilitymetadata.ByID,
		toCursor: func(vm *VulnerabilityMetadata) Cursor {
			return Cursor{ID: vm.ID}
		},
	},
}

DefaultVulnerabilityMetadataOrder is the default ordering of VulnerabilityMetadata.

View Source
var ErrTxStarted = errors.New("ent: cannot start a transaction within a transaction")

ErrTxStarted is returned when trying to start a new transaction from a transactional client.

Functions

func Asc

func Asc(fields ...string) func(*sql.Selector)

Asc applies the given fields in ASC order.

func Desc

func Desc(fields ...string) func(*sql.Selector)

Desc applies the given fields in DESC order.

func IsConstraintError

func IsConstraintError(err error) bool

IsConstraintError returns a boolean indicating whether the error is a constraint failure.

func IsNotFound

func IsNotFound(err error) bool

IsNotFound returns a boolean indicating whether the error is a not found error.

func IsNotLoaded

func IsNotLoaded(err error) bool

IsNotLoaded returns a boolean indicating whether the error is a not loaded error.

func IsNotSingular

func IsNotSingular(err error) bool

IsNotSingular returns a boolean indicating whether the error is a not singular error.

func IsValidationError

func IsValidationError(err error) bool

IsValidationError returns a boolean indicating whether the error is a validation error.

func MaskNotFound

func MaskNotFound(err error) error

MaskNotFound masks not found error.

func NewContext

func NewContext(parent context.Context, c *Client) context.Context

NewContext returns a new context with the given Client attached.

func NewTxContext

func NewTxContext(parent context.Context, tx *Tx) context.Context

NewTxContext returns a new context with the given Tx attached.

func OpenTxFromContext

func OpenTxFromContext(ctx context.Context) (context.Context, driver.Tx, error)

OpenTxFromContext open transactions from client stored in context.

Types

type AggregateFunc

type AggregateFunc func(*sql.Selector) string

AggregateFunc applies an aggregation step on the group-by traversal/selector.

func As

As is a pseudo aggregation function for renaming another other functions with custom names. For example:

GroupBy(field1, field2).
Aggregate(ent.As(ent.Sum(field1), "sum_field1"), (ent.As(ent.Sum(field2), "sum_field2")).
Scan(ctx, &v)

func Count

func Count() AggregateFunc

Count applies the "count" aggregation function on each group.

func Max

func Max(field string) AggregateFunc

Max applies the "max" aggregation function on the given field of each group.

func Mean

func Mean(field string) AggregateFunc

Mean applies the "mean" aggregation function on the given field of each group.

func Min

func Min(field string) AggregateFunc

Min applies the "min" aggregation function on the given field of each group.

func Sum

func Sum(field string) AggregateFunc

Sum applies the "sum" aggregation function on the given field of each group.

type Artifact

type Artifact struct {

	// ID of the ent.
	ID uuid.UUID `json:"id,omitempty"`
	// Algorithm holds the value of the "algorithm" field.
	Algorithm string `json:"algorithm,omitempty"`
	// Digest holds the value of the "digest" field.
	Digest string `json:"digest,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the ArtifactQuery when eager-loading is set.
	Edges ArtifactEdges `json:"edges"`
	// contains filtered or unexported fields
}

Artifact is the model entity for the Artifact schema.

func (*Artifact) Attestations

func (a *Artifact) Attestations(ctx context.Context) (result []*SLSAAttestation, err error)

func (*Artifact) AttestationsSubject added in v0.6.0

func (a *Artifact) AttestationsSubject(ctx context.Context) (result []*SLSAAttestation, err error)

func (*Artifact) Certification added in v0.6.0

func (a *Artifact) Certification(ctx context.Context) (result []*Certification, err error)

func (*Artifact) HashEqualArtA added in v0.5.0

func (a *Artifact) HashEqualArtA(ctx context.Context) (result []*HashEqual, err error)

func (*Artifact) HashEqualArtB added in v0.5.0

func (a *Artifact) HashEqualArtB(ctx context.Context) (result []*HashEqual, err error)

func (*Artifact) IncludedInSboms added in v0.4.0

func (a *Artifact) IncludedInSboms(ctx context.Context) (result []*BillOfMaterials, err error)

func (*Artifact) IsNode

func (n *Artifact) IsNode()

IsNode implements the Node interface check for GQLGen.

func (*Artifact) Metadata added in v0.6.0

func (a *Artifact) Metadata(ctx context.Context) (result []*HasMetadata, err error)

func (*Artifact) NamedAttestations

func (a *Artifact) NamedAttestations(name string) ([]*SLSAAttestation, error)

NamedAttestations returns the Attestations named value or an error if the edge was not loaded in eager-loading with this name.

func (*Artifact) NamedAttestationsSubject added in v0.6.0

func (a *Artifact) NamedAttestationsSubject(name string) ([]*SLSAAttestation, error)

NamedAttestationsSubject returns the AttestationsSubject named value or an error if the edge was not loaded in eager-loading with this name.

func (*Artifact) NamedCertification added in v0.6.0

func (a *Artifact) NamedCertification(name string) ([]*Certification, error)

NamedCertification returns the Certification named value or an error if the edge was not loaded in eager-loading with this name.

func (*Artifact) NamedHashEqualArtA added in v0.5.0

func (a *Artifact) NamedHashEqualArtA(name string) ([]*HashEqual, error)

NamedHashEqualArtA returns the HashEqualArtA named value or an error if the edge was not loaded in eager-loading with this name.

func (*Artifact) NamedHashEqualArtB added in v0.5.0

func (a *Artifact) NamedHashEqualArtB(name string) ([]*HashEqual, error)

NamedHashEqualArtB returns the HashEqualArtB named value or an error if the edge was not loaded in eager-loading with this name.

func (*Artifact) NamedIncludedInSboms added in v0.4.0

func (a *Artifact) NamedIncludedInSboms(name string) ([]*BillOfMaterials, error)

NamedIncludedInSboms returns the IncludedInSboms named value or an error if the edge was not loaded in eager-loading with this name.

func (*Artifact) NamedMetadata added in v0.6.0

func (a *Artifact) NamedMetadata(name string) ([]*HasMetadata, error)

NamedMetadata returns the Metadata named value or an error if the edge was not loaded in eager-loading with this name.

func (*Artifact) NamedOccurrences

func (a *Artifact) NamedOccurrences(name string) ([]*Occurrence, error)

NamedOccurrences returns the Occurrences named value or an error if the edge was not loaded in eager-loading with this name.

func (*Artifact) NamedPoc added in v0.6.0

func (a *Artifact) NamedPoc(name string) ([]*PointOfContact, error)

NamedPoc returns the Poc named value or an error if the edge was not loaded in eager-loading with this name.

func (*Artifact) NamedSbom

func (a *Artifact) NamedSbom(name string) ([]*BillOfMaterials, error)

NamedSbom returns the Sbom named value or an error if the edge was not loaded in eager-loading with this name.

func (*Artifact) NamedVex added in v0.6.0

func (a *Artifact) NamedVex(name string) ([]*CertifyVex, error)

NamedVex returns the Vex named value or an error if the edge was not loaded in eager-loading with this name.

func (*Artifact) Occurrences

func (a *Artifact) Occurrences(ctx context.Context) (result []*Occurrence, err error)

func (*Artifact) Poc added in v0.6.0

func (a *Artifact) Poc(ctx context.Context) (result []*PointOfContact, err error)

func (*Artifact) QueryAttestations

func (a *Artifact) QueryAttestations() *SLSAAttestationQuery

QueryAttestations queries the "attestations" edge of the Artifact entity.

func (*Artifact) QueryAttestationsSubject added in v0.6.0

func (a *Artifact) QueryAttestationsSubject() *SLSAAttestationQuery

QueryAttestationsSubject queries the "attestations_subject" edge of the Artifact entity.

func (*Artifact) QueryCertification added in v0.6.0

func (a *Artifact) QueryCertification() *CertificationQuery

QueryCertification queries the "certification" edge of the Artifact entity.

func (*Artifact) QueryHashEqualArtA added in v0.5.0

func (a *Artifact) QueryHashEqualArtA() *HashEqualQuery

QueryHashEqualArtA queries the "hash_equal_art_a" edge of the Artifact entity.

func (*Artifact) QueryHashEqualArtB added in v0.5.0

func (a *Artifact) QueryHashEqualArtB() *HashEqualQuery

QueryHashEqualArtB queries the "hash_equal_art_b" edge of the Artifact entity.

func (*Artifact) QueryIncludedInSboms added in v0.4.0

func (a *Artifact) QueryIncludedInSboms() *BillOfMaterialsQuery

QueryIncludedInSboms queries the "included_in_sboms" edge of the Artifact entity.

func (*Artifact) QueryMetadata added in v0.6.0

func (a *Artifact) QueryMetadata() *HasMetadataQuery

QueryMetadata queries the "metadata" edge of the Artifact entity.

func (*Artifact) QueryOccurrences

func (a *Artifact) QueryOccurrences() *OccurrenceQuery

QueryOccurrences queries the "occurrences" edge of the Artifact entity.

func (*Artifact) QueryPoc added in v0.6.0

func (a *Artifact) QueryPoc() *PointOfContactQuery

QueryPoc queries the "poc" edge of the Artifact entity.

func (*Artifact) QuerySbom

func (a *Artifact) QuerySbom() *BillOfMaterialsQuery

QuerySbom queries the "sbom" edge of the Artifact entity.

func (*Artifact) QueryVex added in v0.6.0

func (a *Artifact) QueryVex() *CertifyVexQuery

QueryVex queries the "vex" edge of the Artifact entity.

func (*Artifact) Sbom

func (a *Artifact) Sbom(ctx context.Context) (result []*BillOfMaterials, err error)

func (*Artifact) String

func (a *Artifact) String() string

String implements the fmt.Stringer.

func (*Artifact) ToEdge

func (a *Artifact) ToEdge(order *ArtifactOrder) *ArtifactEdge

ToEdge converts Artifact into ArtifactEdge.

func (*Artifact) Unwrap

func (a *Artifact) Unwrap() *Artifact

Unwrap unwraps the Artifact entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.

func (*Artifact) Update

func (a *Artifact) Update() *ArtifactUpdateOne

Update returns a builder for updating this Artifact. Note that you need to call Artifact.Unwrap() before calling this method if this Artifact was returned from a transaction, and the transaction was committed or rolled back.

func (*Artifact) Value

func (a *Artifact) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the Artifact. This includes values selected through modifiers, order, etc.

func (*Artifact) Vex added in v0.6.0

func (a *Artifact) Vex(ctx context.Context) (result []*CertifyVex, err error)

type ArtifactClient

type ArtifactClient struct {
	// contains filtered or unexported fields
}

ArtifactClient is a client for the Artifact schema.

func NewArtifactClient

func NewArtifactClient(c config) *ArtifactClient

NewArtifactClient returns a client for the Artifact from the given config.

func (*ArtifactClient) Create

func (c *ArtifactClient) Create() *ArtifactCreate

Create returns a builder for creating a Artifact entity.

func (*ArtifactClient) CreateBulk

func (c *ArtifactClient) CreateBulk(builders ...*ArtifactCreate) *ArtifactCreateBulk

CreateBulk returns a builder for creating a bulk of Artifact entities.

func (*ArtifactClient) Delete

func (c *ArtifactClient) Delete() *ArtifactDelete

Delete returns a delete builder for Artifact.

func (*ArtifactClient) DeleteOne

func (c *ArtifactClient) DeleteOne(a *Artifact) *ArtifactDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*ArtifactClient) DeleteOneID

func (c *ArtifactClient) DeleteOneID(id uuid.UUID) *ArtifactDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*ArtifactClient) Get

func (c *ArtifactClient) Get(ctx context.Context, id uuid.UUID) (*Artifact, error)

Get returns a Artifact entity by its id.

func (*ArtifactClient) GetX

func (c *ArtifactClient) GetX(ctx context.Context, id uuid.UUID) *Artifact

GetX is like Get, but panics if an error occurs.

func (*ArtifactClient) Hooks

func (c *ArtifactClient) Hooks() []Hook

Hooks returns the client hooks.

func (*ArtifactClient) Intercept

func (c *ArtifactClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `artifact.Intercept(f(g(h())))`.

func (*ArtifactClient) Interceptors

func (c *ArtifactClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*ArtifactClient) MapCreateBulk

func (c *ArtifactClient) MapCreateBulk(slice any, setFunc func(*ArtifactCreate, int)) *ArtifactCreateBulk

MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.

func (*ArtifactClient) Query

func (c *ArtifactClient) Query() *ArtifactQuery

Query returns a query builder for Artifact.

func (*ArtifactClient) QueryAttestations

func (c *ArtifactClient) QueryAttestations(a *Artifact) *SLSAAttestationQuery

QueryAttestations queries the attestations edge of a Artifact.

func (*ArtifactClient) QueryAttestationsSubject added in v0.6.0

func (c *ArtifactClient) QueryAttestationsSubject(a *Artifact) *SLSAAttestationQuery

QueryAttestationsSubject queries the attestations_subject edge of a Artifact.

func (*ArtifactClient) QueryCertification added in v0.6.0

func (c *ArtifactClient) QueryCertification(a *Artifact) *CertificationQuery

QueryCertification queries the certification edge of a Artifact.

func (*ArtifactClient) QueryHashEqualArtA added in v0.5.0

func (c *ArtifactClient) QueryHashEqualArtA(a *Artifact) *HashEqualQuery

QueryHashEqualArtA queries the hash_equal_art_a edge of a Artifact.

func (*ArtifactClient) QueryHashEqualArtB added in v0.5.0

func (c *ArtifactClient) QueryHashEqualArtB(a *Artifact) *HashEqualQuery

QueryHashEqualArtB queries the hash_equal_art_b edge of a Artifact.

func (*ArtifactClient) QueryIncludedInSboms added in v0.4.0

func (c *ArtifactClient) QueryIncludedInSboms(a *Artifact) *BillOfMaterialsQuery

QueryIncludedInSboms queries the included_in_sboms edge of a Artifact.

func (*ArtifactClient) QueryMetadata added in v0.6.0

func (c *ArtifactClient) QueryMetadata(a *Artifact) *HasMetadataQuery

QueryMetadata queries the metadata edge of a Artifact.

func (*ArtifactClient) QueryOccurrences

func (c *ArtifactClient) QueryOccurrences(a *Artifact) *OccurrenceQuery

QueryOccurrences queries the occurrences edge of a Artifact.

func (*ArtifactClient) QueryPoc added in v0.6.0

func (c *ArtifactClient) QueryPoc(a *Artifact) *PointOfContactQuery

QueryPoc queries the poc edge of a Artifact.

func (*ArtifactClient) QuerySbom

func (c *ArtifactClient) QuerySbom(a *Artifact) *BillOfMaterialsQuery

QuerySbom queries the sbom edge of a Artifact.

func (*ArtifactClient) QueryVex added in v0.6.0

func (c *ArtifactClient) QueryVex(a *Artifact) *CertifyVexQuery

QueryVex queries the vex edge of a Artifact.

func (*ArtifactClient) Update

func (c *ArtifactClient) Update() *ArtifactUpdate

Update returns an update builder for Artifact.

func (*ArtifactClient) UpdateOne

func (c *ArtifactClient) UpdateOne(a *Artifact) *ArtifactUpdateOne

UpdateOne returns an update builder for the given entity.

func (*ArtifactClient) UpdateOneID

func (c *ArtifactClient) UpdateOneID(id uuid.UUID) *ArtifactUpdateOne

UpdateOneID returns an update builder for the given id.

func (*ArtifactClient) Use

func (c *ArtifactClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `artifact.Hooks(f(g(h())))`.

type ArtifactConnection

type ArtifactConnection struct {
	Edges      []*ArtifactEdge `json:"edges"`
	PageInfo   PageInfo        `json:"pageInfo"`
	TotalCount int             `json:"totalCount"`
}

ArtifactConnection is the connection containing edges to Artifact.

type ArtifactCreate

type ArtifactCreate struct {
	// contains filtered or unexported fields
}

ArtifactCreate is the builder for creating a Artifact entity.

func (*ArtifactCreate) AddAttestationIDs

func (ac *ArtifactCreate) AddAttestationIDs(ids ...uuid.UUID) *ArtifactCreate

AddAttestationIDs adds the "attestations" edge to the SLSAAttestation entity by IDs.

func (*ArtifactCreate) AddAttestations

func (ac *ArtifactCreate) AddAttestations(s ...*SLSAAttestation) *ArtifactCreate

AddAttestations adds the "attestations" edges to the SLSAAttestation entity.

func (*ArtifactCreate) AddAttestationsSubject added in v0.6.0

func (ac *ArtifactCreate) AddAttestationsSubject(s ...*SLSAAttestation) *ArtifactCreate

AddAttestationsSubject adds the "attestations_subject" edges to the SLSAAttestation entity.

func (*ArtifactCreate) AddAttestationsSubjectIDs added in v0.6.0

func (ac *ArtifactCreate) AddAttestationsSubjectIDs(ids ...uuid.UUID) *ArtifactCreate

AddAttestationsSubjectIDs adds the "attestations_subject" edge to the SLSAAttestation entity by IDs.

func (*ArtifactCreate) AddCertification added in v0.6.0

func (ac *ArtifactCreate) AddCertification(c ...*Certification) *ArtifactCreate

AddCertification adds the "certification" edges to the Certification entity.

func (*ArtifactCreate) AddCertificationIDs added in v0.6.0

func (ac *ArtifactCreate) AddCertificationIDs(ids ...uuid.UUID) *ArtifactCreate

AddCertificationIDs adds the "certification" edge to the Certification entity by IDs.

func (*ArtifactCreate) AddHashEqualArtA added in v0.5.0

func (ac *ArtifactCreate) AddHashEqualArtA(h ...*HashEqual) *ArtifactCreate

AddHashEqualArtA adds the "hash_equal_art_a" edges to the HashEqual entity.

func (*ArtifactCreate) AddHashEqualArtAIDs added in v0.5.0

func (ac *ArtifactCreate) AddHashEqualArtAIDs(ids ...uuid.UUID) *ArtifactCreate

AddHashEqualArtAIDs adds the "hash_equal_art_a" edge to the HashEqual entity by IDs.

func (*ArtifactCreate) AddHashEqualArtB added in v0.5.0

func (ac *ArtifactCreate) AddHashEqualArtB(h ...*HashEqual) *ArtifactCreate

AddHashEqualArtB adds the "hash_equal_art_b" edges to the HashEqual entity.

func (*ArtifactCreate) AddHashEqualArtBIDs added in v0.5.0

func (ac *ArtifactCreate) AddHashEqualArtBIDs(ids ...uuid.UUID) *ArtifactCreate

AddHashEqualArtBIDs adds the "hash_equal_art_b" edge to the HashEqual entity by IDs.

func (*ArtifactCreate) AddIncludedInSbomIDs added in v0.4.0

func (ac *ArtifactCreate) AddIncludedInSbomIDs(ids ...uuid.UUID) *ArtifactCreate

AddIncludedInSbomIDs adds the "included_in_sboms" edge to the BillOfMaterials entity by IDs.

func (*ArtifactCreate) AddIncludedInSboms added in v0.4.0

func (ac *ArtifactCreate) AddIncludedInSboms(b ...*BillOfMaterials) *ArtifactCreate

AddIncludedInSboms adds the "included_in_sboms" edges to the BillOfMaterials entity.

func (*ArtifactCreate) AddMetadata added in v0.6.0

func (ac *ArtifactCreate) AddMetadata(h ...*HasMetadata) *ArtifactCreate

AddMetadata adds the "metadata" edges to the HasMetadata entity.

func (*ArtifactCreate) AddMetadatumIDs added in v0.6.0

func (ac *ArtifactCreate) AddMetadatumIDs(ids ...uuid.UUID) *ArtifactCreate

AddMetadatumIDs adds the "metadata" edge to the HasMetadata entity by IDs.

func (*ArtifactCreate) AddOccurrenceIDs

func (ac *ArtifactCreate) AddOccurrenceIDs(ids ...uuid.UUID) *ArtifactCreate

AddOccurrenceIDs adds the "occurrences" edge to the Occurrence entity by IDs.

func (*ArtifactCreate) AddOccurrences

func (ac *ArtifactCreate) AddOccurrences(o ...*Occurrence) *ArtifactCreate

AddOccurrences adds the "occurrences" edges to the Occurrence entity.

func (*ArtifactCreate) AddPoc added in v0.6.0

func (ac *ArtifactCreate) AddPoc(p ...*PointOfContact) *ArtifactCreate

AddPoc adds the "poc" edges to the PointOfContact entity.

func (*ArtifactCreate) AddPocIDs added in v0.6.0

func (ac *ArtifactCreate) AddPocIDs(ids ...uuid.UUID) *ArtifactCreate

AddPocIDs adds the "poc" edge to the PointOfContact entity by IDs.

func (*ArtifactCreate) AddSbom

func (ac *ArtifactCreate) AddSbom(b ...*BillOfMaterials) *ArtifactCreate

AddSbom adds the "sbom" edges to the BillOfMaterials entity.

func (*ArtifactCreate) AddSbomIDs

func (ac *ArtifactCreate) AddSbomIDs(ids ...uuid.UUID) *ArtifactCreate

AddSbomIDs adds the "sbom" edge to the BillOfMaterials entity by IDs.

func (*ArtifactCreate) AddVex added in v0.6.0

func (ac *ArtifactCreate) AddVex(c ...*CertifyVex) *ArtifactCreate

AddVex adds the "vex" edges to the CertifyVex entity.

func (*ArtifactCreate) AddVexIDs added in v0.6.0

func (ac *ArtifactCreate) AddVexIDs(ids ...uuid.UUID) *ArtifactCreate

AddVexIDs adds the "vex" edge to the CertifyVex entity by IDs.

func (*ArtifactCreate) Exec

func (ac *ArtifactCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*ArtifactCreate) ExecX

func (ac *ArtifactCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ArtifactCreate) Mutation

func (ac *ArtifactCreate) Mutation() *ArtifactMutation

Mutation returns the ArtifactMutation object of the builder.

func (*ArtifactCreate) OnConflict

func (ac *ArtifactCreate) OnConflict(opts ...sql.ConflictOption) *ArtifactUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.Artifact.Create().
	SetAlgorithm(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.ArtifactUpsert) {
		SetAlgorithm(v+v).
	}).
	Exec(ctx)

func (*ArtifactCreate) OnConflictColumns

func (ac *ArtifactCreate) OnConflictColumns(columns ...string) *ArtifactUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.Artifact.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*ArtifactCreate) Save

func (ac *ArtifactCreate) Save(ctx context.Context) (*Artifact, error)

Save creates the Artifact in the database.

func (*ArtifactCreate) SaveX

func (ac *ArtifactCreate) SaveX(ctx context.Context) *Artifact

SaveX calls Save and panics if Save returns an error.

func (*ArtifactCreate) SetAlgorithm

func (ac *ArtifactCreate) SetAlgorithm(s string) *ArtifactCreate

SetAlgorithm sets the "algorithm" field.

func (*ArtifactCreate) SetDigest

func (ac *ArtifactCreate) SetDigest(s string) *ArtifactCreate

SetDigest sets the "digest" field.

func (*ArtifactCreate) SetID added in v0.5.0

func (ac *ArtifactCreate) SetID(u uuid.UUID) *ArtifactCreate

SetID sets the "id" field.

func (*ArtifactCreate) SetNillableID added in v0.5.0

func (ac *ArtifactCreate) SetNillableID(u *uuid.UUID) *ArtifactCreate

SetNillableID sets the "id" field if the given value is not nil.

type ArtifactCreateBulk

type ArtifactCreateBulk struct {
	// contains filtered or unexported fields
}

ArtifactCreateBulk is the builder for creating many Artifact entities in bulk.

func (*ArtifactCreateBulk) Exec

func (acb *ArtifactCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*ArtifactCreateBulk) ExecX

func (acb *ArtifactCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ArtifactCreateBulk) OnConflict

func (acb *ArtifactCreateBulk) OnConflict(opts ...sql.ConflictOption) *ArtifactUpsertBulk

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.Artifact.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.ArtifactUpsert) {
		SetAlgorithm(v+v).
	}).
	Exec(ctx)

func (*ArtifactCreateBulk) OnConflictColumns

func (acb *ArtifactCreateBulk) OnConflictColumns(columns ...string) *ArtifactUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.Artifact.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*ArtifactCreateBulk) Save

func (acb *ArtifactCreateBulk) Save(ctx context.Context) ([]*Artifact, error)

Save creates the Artifact entities in the database.

func (*ArtifactCreateBulk) SaveX

func (acb *ArtifactCreateBulk) SaveX(ctx context.Context) []*Artifact

SaveX is like Save, but panics if an error occurs.

type ArtifactDelete

type ArtifactDelete struct {
	// contains filtered or unexported fields
}

ArtifactDelete is the builder for deleting a Artifact entity.

func (*ArtifactDelete) Exec

func (ad *ArtifactDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*ArtifactDelete) ExecX

func (ad *ArtifactDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*ArtifactDelete) Where

func (ad *ArtifactDelete) Where(ps ...predicate.Artifact) *ArtifactDelete

Where appends a list predicates to the ArtifactDelete builder.

type ArtifactDeleteOne

type ArtifactDeleteOne struct {
	// contains filtered or unexported fields
}

ArtifactDeleteOne is the builder for deleting a single Artifact entity.

func (*ArtifactDeleteOne) Exec

func (ado *ArtifactDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*ArtifactDeleteOne) ExecX

func (ado *ArtifactDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ArtifactDeleteOne) Where

Where appends a list predicates to the ArtifactDelete builder.

type ArtifactEdge

type ArtifactEdge struct {
	Node   *Artifact `json:"node"`
	Cursor Cursor    `json:"cursor"`
}

ArtifactEdge is the edge representation of Artifact.

type ArtifactEdges

type ArtifactEdges struct {
	// Occurrences holds the value of the occurrences edge.
	Occurrences []*Occurrence `json:"occurrences,omitempty"`
	// Sbom holds the value of the sbom edge.
	Sbom []*BillOfMaterials `json:"sbom,omitempty"`
	// Attestations holds the value of the attestations edge.
	Attestations []*SLSAAttestation `json:"attestations,omitempty"`
	// AttestationsSubject holds the value of the attestations_subject edge.
	AttestationsSubject []*SLSAAttestation `json:"attestations_subject,omitempty"`
	// HashEqualArtA holds the value of the hash_equal_art_a edge.
	HashEqualArtA []*HashEqual `json:"hash_equal_art_a,omitempty"`
	// HashEqualArtB holds the value of the hash_equal_art_b edge.
	HashEqualArtB []*HashEqual `json:"hash_equal_art_b,omitempty"`
	// Vex holds the value of the vex edge.
	Vex []*CertifyVex `json:"vex,omitempty"`
	// Certification holds the value of the certification edge.
	Certification []*Certification `json:"certification,omitempty"`
	// Metadata holds the value of the metadata edge.
	Metadata []*HasMetadata `json:"metadata,omitempty"`
	// Poc holds the value of the poc edge.
	Poc []*PointOfContact `json:"poc,omitempty"`
	// IncludedInSboms holds the value of the included_in_sboms edge.
	IncludedInSboms []*BillOfMaterials `json:"included_in_sboms,omitempty"`
	// contains filtered or unexported fields
}

ArtifactEdges holds the relations/edges for other nodes in the graph.

func (ArtifactEdges) AttestationsOrErr

func (e ArtifactEdges) AttestationsOrErr() ([]*SLSAAttestation, error)

AttestationsOrErr returns the Attestations value or an error if the edge was not loaded in eager-loading.

func (ArtifactEdges) AttestationsSubjectOrErr added in v0.6.0

func (e ArtifactEdges) AttestationsSubjectOrErr() ([]*SLSAAttestation, error)

AttestationsSubjectOrErr returns the AttestationsSubject value or an error if the edge was not loaded in eager-loading.

func (ArtifactEdges) CertificationOrErr added in v0.6.0

func (e ArtifactEdges) CertificationOrErr() ([]*Certification, error)

CertificationOrErr returns the Certification value or an error if the edge was not loaded in eager-loading.

func (ArtifactEdges) HashEqualArtAOrErr added in v0.5.0

func (e ArtifactEdges) HashEqualArtAOrErr() ([]*HashEqual, error)

HashEqualArtAOrErr returns the HashEqualArtA value or an error if the edge was not loaded in eager-loading.

func (ArtifactEdges) HashEqualArtBOrErr added in v0.5.0

func (e ArtifactEdges) HashEqualArtBOrErr() ([]*HashEqual, error)

HashEqualArtBOrErr returns the HashEqualArtB value or an error if the edge was not loaded in eager-loading.

func (ArtifactEdges) IncludedInSbomsOrErr added in v0.4.0

func (e ArtifactEdges) IncludedInSbomsOrErr() ([]*BillOfMaterials, error)

IncludedInSbomsOrErr returns the IncludedInSboms value or an error if the edge was not loaded in eager-loading.

func (ArtifactEdges) MetadataOrErr added in v0.6.0

func (e ArtifactEdges) MetadataOrErr() ([]*HasMetadata, error)

MetadataOrErr returns the Metadata value or an error if the edge was not loaded in eager-loading.

func (ArtifactEdges) OccurrencesOrErr

func (e ArtifactEdges) OccurrencesOrErr() ([]*Occurrence, error)

OccurrencesOrErr returns the Occurrences value or an error if the edge was not loaded in eager-loading.

func (ArtifactEdges) PocOrErr added in v0.6.0

func (e ArtifactEdges) PocOrErr() ([]*PointOfContact, error)

PocOrErr returns the Poc value or an error if the edge was not loaded in eager-loading.

func (ArtifactEdges) SbomOrErr

func (e ArtifactEdges) SbomOrErr() ([]*BillOfMaterials, error)

SbomOrErr returns the Sbom value or an error if the edge was not loaded in eager-loading.

func (ArtifactEdges) VexOrErr added in v0.6.0

func (e ArtifactEdges) VexOrErr() ([]*CertifyVex, error)

VexOrErr returns the Vex value or an error if the edge was not loaded in eager-loading.

type ArtifactGroupBy

type ArtifactGroupBy struct {
	// contains filtered or unexported fields
}

ArtifactGroupBy is the group-by builder for Artifact entities.

func (*ArtifactGroupBy) Aggregate

func (agb *ArtifactGroupBy) Aggregate(fns ...AggregateFunc) *ArtifactGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*ArtifactGroupBy) Bool

func (s *ArtifactGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*ArtifactGroupBy) BoolX

func (s *ArtifactGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*ArtifactGroupBy) Bools

func (s *ArtifactGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*ArtifactGroupBy) BoolsX

func (s *ArtifactGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*ArtifactGroupBy) Float64

func (s *ArtifactGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*ArtifactGroupBy) Float64X

func (s *ArtifactGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*ArtifactGroupBy) Float64s

func (s *ArtifactGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*ArtifactGroupBy) Float64sX

func (s *ArtifactGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*ArtifactGroupBy) Int

func (s *ArtifactGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*ArtifactGroupBy) IntX

func (s *ArtifactGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*ArtifactGroupBy) Ints

func (s *ArtifactGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*ArtifactGroupBy) IntsX

func (s *ArtifactGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*ArtifactGroupBy) Scan

func (agb *ArtifactGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*ArtifactGroupBy) ScanX

func (s *ArtifactGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*ArtifactGroupBy) String

func (s *ArtifactGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*ArtifactGroupBy) StringX

func (s *ArtifactGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*ArtifactGroupBy) Strings

func (s *ArtifactGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*ArtifactGroupBy) StringsX

func (s *ArtifactGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type ArtifactMutation

type ArtifactMutation struct {
	// contains filtered or unexported fields
}

ArtifactMutation represents an operation that mutates the Artifact nodes in the graph.

func (*ArtifactMutation) AddAttestationIDs

func (m *ArtifactMutation) AddAttestationIDs(ids ...uuid.UUID)

AddAttestationIDs adds the "attestations" edge to the SLSAAttestation entity by ids.

func (*ArtifactMutation) AddAttestationsSubjectIDs added in v0.6.0

func (m *ArtifactMutation) AddAttestationsSubjectIDs(ids ...uuid.UUID)

AddAttestationsSubjectIDs adds the "attestations_subject" edge to the SLSAAttestation entity by ids.

func (*ArtifactMutation) AddCertificationIDs added in v0.6.0

func (m *ArtifactMutation) AddCertificationIDs(ids ...uuid.UUID)

AddCertificationIDs adds the "certification" edge to the Certification entity by ids.

func (*ArtifactMutation) AddField

func (m *ArtifactMutation) AddField(name string, value ent.Value) error

AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*ArtifactMutation) AddHashEqualArtAIDs added in v0.5.0

func (m *ArtifactMutation) AddHashEqualArtAIDs(ids ...uuid.UUID)

AddHashEqualArtAIDs adds the "hash_equal_art_a" edge to the HashEqual entity by ids.

func (*ArtifactMutation) AddHashEqualArtBIDs added in v0.5.0

func (m *ArtifactMutation) AddHashEqualArtBIDs(ids ...uuid.UUID)

AddHashEqualArtBIDs adds the "hash_equal_art_b" edge to the HashEqual entity by ids.

func (*ArtifactMutation) AddIncludedInSbomIDs added in v0.4.0

func (m *ArtifactMutation) AddIncludedInSbomIDs(ids ...uuid.UUID)

AddIncludedInSbomIDs adds the "included_in_sboms" edge to the BillOfMaterials entity by ids.

func (*ArtifactMutation) AddMetadatumIDs added in v0.6.0

func (m *ArtifactMutation) AddMetadatumIDs(ids ...uuid.UUID)

AddMetadatumIDs adds the "metadata" edge to the HasMetadata entity by ids.

func (*ArtifactMutation) AddOccurrenceIDs

func (m *ArtifactMutation) AddOccurrenceIDs(ids ...uuid.UUID)

AddOccurrenceIDs adds the "occurrences" edge to the Occurrence entity by ids.

func (*ArtifactMutation) AddPocIDs added in v0.6.0

func (m *ArtifactMutation) AddPocIDs(ids ...uuid.UUID)

AddPocIDs adds the "poc" edge to the PointOfContact entity by ids.

func (*ArtifactMutation) AddSbomIDs

func (m *ArtifactMutation) AddSbomIDs(ids ...uuid.UUID)

AddSbomIDs adds the "sbom" edge to the BillOfMaterials entity by ids.

func (*ArtifactMutation) AddVexIDs added in v0.6.0

func (m *ArtifactMutation) AddVexIDs(ids ...uuid.UUID)

AddVexIDs adds the "vex" edge to the CertifyVex entity by ids.

func (*ArtifactMutation) AddedEdges

func (m *ArtifactMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*ArtifactMutation) AddedField

func (m *ArtifactMutation) AddedField(name string) (ent.Value, bool)

AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*ArtifactMutation) AddedFields

func (m *ArtifactMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*ArtifactMutation) AddedIDs

func (m *ArtifactMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*ArtifactMutation) Algorithm

func (m *ArtifactMutation) Algorithm() (r string, exists bool)

Algorithm returns the value of the "algorithm" field in the mutation.

func (*ArtifactMutation) AttestationsCleared

func (m *ArtifactMutation) AttestationsCleared() bool

AttestationsCleared reports if the "attestations" edge to the SLSAAttestation entity was cleared.

func (*ArtifactMutation) AttestationsIDs

func (m *ArtifactMutation) AttestationsIDs() (ids []uuid.UUID)

AttestationsIDs returns the "attestations" edge IDs in the mutation.

func (*ArtifactMutation) AttestationsSubjectCleared added in v0.6.0

func (m *ArtifactMutation) AttestationsSubjectCleared() bool

AttestationsSubjectCleared reports if the "attestations_subject" edge to the SLSAAttestation entity was cleared.

func (*ArtifactMutation) AttestationsSubjectIDs added in v0.6.0

func (m *ArtifactMutation) AttestationsSubjectIDs() (ids []uuid.UUID)

AttestationsSubjectIDs returns the "attestations_subject" edge IDs in the mutation.

func (*ArtifactMutation) CertificationCleared added in v0.6.0

func (m *ArtifactMutation) CertificationCleared() bool

CertificationCleared reports if the "certification" edge to the Certification entity was cleared.

func (*ArtifactMutation) CertificationIDs added in v0.6.0

func (m *ArtifactMutation) CertificationIDs() (ids []uuid.UUID)

CertificationIDs returns the "certification" edge IDs in the mutation.

func (*ArtifactMutation) ClearAttestations

func (m *ArtifactMutation) ClearAttestations()

ClearAttestations clears the "attestations" edge to the SLSAAttestation entity.

func (*ArtifactMutation) ClearAttestationsSubject added in v0.6.0

func (m *ArtifactMutation) ClearAttestationsSubject()

ClearAttestationsSubject clears the "attestations_subject" edge to the SLSAAttestation entity.

func (*ArtifactMutation) ClearCertification added in v0.6.0

func (m *ArtifactMutation) ClearCertification()

ClearCertification clears the "certification" edge to the Certification entity.

func (*ArtifactMutation) ClearEdge

func (m *ArtifactMutation) ClearEdge(name string) error

ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.

func (*ArtifactMutation) ClearField

func (m *ArtifactMutation) ClearField(name string) error

ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.

func (*ArtifactMutation) ClearHashEqualArtA added in v0.5.0

func (m *ArtifactMutation) ClearHashEqualArtA()

ClearHashEqualArtA clears the "hash_equal_art_a" edge to the HashEqual entity.

func (*ArtifactMutation) ClearHashEqualArtB added in v0.5.0

func (m *ArtifactMutation) ClearHashEqualArtB()

ClearHashEqualArtB clears the "hash_equal_art_b" edge to the HashEqual entity.

func (*ArtifactMutation) ClearIncludedInSboms added in v0.4.0

func (m *ArtifactMutation) ClearIncludedInSboms()

ClearIncludedInSboms clears the "included_in_sboms" edge to the BillOfMaterials entity.

func (*ArtifactMutation) ClearMetadata added in v0.6.0

func (m *ArtifactMutation) ClearMetadata()

ClearMetadata clears the "metadata" edge to the HasMetadata entity.

func (*ArtifactMutation) ClearOccurrences

func (m *ArtifactMutation) ClearOccurrences()

ClearOccurrences clears the "occurrences" edge to the Occurrence entity.

func (*ArtifactMutation) ClearPoc added in v0.6.0

func (m *ArtifactMutation) ClearPoc()

ClearPoc clears the "poc" edge to the PointOfContact entity.

func (*ArtifactMutation) ClearSbom

func (m *ArtifactMutation) ClearSbom()

ClearSbom clears the "sbom" edge to the BillOfMaterials entity.

func (*ArtifactMutation) ClearVex added in v0.6.0

func (m *ArtifactMutation) ClearVex()

ClearVex clears the "vex" edge to the CertifyVex entity.

func (*ArtifactMutation) ClearedEdges

func (m *ArtifactMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*ArtifactMutation) ClearedFields

func (m *ArtifactMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (ArtifactMutation) Client

func (m ArtifactMutation) Client() *Client

Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.

func (*ArtifactMutation) Digest

func (m *ArtifactMutation) Digest() (r string, exists bool)

Digest returns the value of the "digest" field in the mutation.

func (*ArtifactMutation) EdgeCleared

func (m *ArtifactMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*ArtifactMutation) Field

func (m *ArtifactMutation) Field(name string) (ent.Value, bool)

Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*ArtifactMutation) FieldCleared

func (m *ArtifactMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*ArtifactMutation) Fields

func (m *ArtifactMutation) Fields() []string

Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().

func (*ArtifactMutation) HashEqualArtACleared added in v0.5.0

func (m *ArtifactMutation) HashEqualArtACleared() bool

HashEqualArtACleared reports if the "hash_equal_art_a" edge to the HashEqual entity was cleared.

func (*ArtifactMutation) HashEqualArtAIDs added in v0.5.0

func (m *ArtifactMutation) HashEqualArtAIDs() (ids []uuid.UUID)

HashEqualArtAIDs returns the "hash_equal_art_a" edge IDs in the mutation.

func (*ArtifactMutation) HashEqualArtBCleared added in v0.5.0

func (m *ArtifactMutation) HashEqualArtBCleared() bool

HashEqualArtBCleared reports if the "hash_equal_art_b" edge to the HashEqual entity was cleared.

func (*ArtifactMutation) HashEqualArtBIDs added in v0.5.0

func (m *ArtifactMutation) HashEqualArtBIDs() (ids []uuid.UUID)

HashEqualArtBIDs returns the "hash_equal_art_b" edge IDs in the mutation.

func (*ArtifactMutation) ID

func (m *ArtifactMutation) ID() (id uuid.UUID, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*ArtifactMutation) IDs

func (m *ArtifactMutation) IDs(ctx context.Context) ([]uuid.UUID, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*ArtifactMutation) IncludedInSbomsCleared added in v0.4.0

func (m *ArtifactMutation) IncludedInSbomsCleared() bool

IncludedInSbomsCleared reports if the "included_in_sboms" edge to the BillOfMaterials entity was cleared.

func (*ArtifactMutation) IncludedInSbomsIDs added in v0.4.0

func (m *ArtifactMutation) IncludedInSbomsIDs() (ids []uuid.UUID)

IncludedInSbomsIDs returns the "included_in_sboms" edge IDs in the mutation.

func (*ArtifactMutation) MetadataCleared added in v0.6.0

func (m *ArtifactMutation) MetadataCleared() bool

MetadataCleared reports if the "metadata" edge to the HasMetadata entity was cleared.

func (*ArtifactMutation) MetadataIDs added in v0.6.0

func (m *ArtifactMutation) MetadataIDs() (ids []uuid.UUID)

MetadataIDs returns the "metadata" edge IDs in the mutation.

func (*ArtifactMutation) OccurrencesCleared

func (m *ArtifactMutation) OccurrencesCleared() bool

OccurrencesCleared reports if the "occurrences" edge to the Occurrence entity was cleared.

func (*ArtifactMutation) OccurrencesIDs

func (m *ArtifactMutation) OccurrencesIDs() (ids []uuid.UUID)

OccurrencesIDs returns the "occurrences" edge IDs in the mutation.

func (*ArtifactMutation) OldAlgorithm

func (m *ArtifactMutation) OldAlgorithm(ctx context.Context) (v string, err error)

OldAlgorithm returns the old "algorithm" field's value of the Artifact entity. If the Artifact object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ArtifactMutation) OldDigest

func (m *ArtifactMutation) OldDigest(ctx context.Context) (v string, err error)

OldDigest returns the old "digest" field's value of the Artifact entity. If the Artifact object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ArtifactMutation) OldField

func (m *ArtifactMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*ArtifactMutation) Op

func (m *ArtifactMutation) Op() Op

Op returns the operation name.

func (*ArtifactMutation) PocCleared added in v0.6.0

func (m *ArtifactMutation) PocCleared() bool

PocCleared reports if the "poc" edge to the PointOfContact entity was cleared.

func (*ArtifactMutation) PocIDs added in v0.6.0

func (m *ArtifactMutation) PocIDs() (ids []uuid.UUID)

PocIDs returns the "poc" edge IDs in the mutation.

func (*ArtifactMutation) RemoveAttestationIDs

func (m *ArtifactMutation) RemoveAttestationIDs(ids ...uuid.UUID)

RemoveAttestationIDs removes the "attestations" edge to the SLSAAttestation entity by IDs.

func (*ArtifactMutation) RemoveAttestationsSubjectIDs added in v0.6.0

func (m *ArtifactMutation) RemoveAttestationsSubjectIDs(ids ...uuid.UUID)

RemoveAttestationsSubjectIDs removes the "attestations_subject" edge to the SLSAAttestation entity by IDs.

func (*ArtifactMutation) RemoveCertificationIDs added in v0.6.0

func (m *ArtifactMutation) RemoveCertificationIDs(ids ...uuid.UUID)

RemoveCertificationIDs removes the "certification" edge to the Certification entity by IDs.

func (*ArtifactMutation) RemoveHashEqualArtAIDs added in v0.5.0

func (m *ArtifactMutation) RemoveHashEqualArtAIDs(ids ...uuid.UUID)

RemoveHashEqualArtAIDs removes the "hash_equal_art_a" edge to the HashEqual entity by IDs.

func (*ArtifactMutation) RemoveHashEqualArtBIDs added in v0.5.0

func (m *ArtifactMutation) RemoveHashEqualArtBIDs(ids ...uuid.UUID)

RemoveHashEqualArtBIDs removes the "hash_equal_art_b" edge to the HashEqual entity by IDs.

func (*ArtifactMutation) RemoveIncludedInSbomIDs added in v0.4.0

func (m *ArtifactMutation) RemoveIncludedInSbomIDs(ids ...uuid.UUID)

RemoveIncludedInSbomIDs removes the "included_in_sboms" edge to the BillOfMaterials entity by IDs.

func (*ArtifactMutation) RemoveMetadatumIDs added in v0.6.0

func (m *ArtifactMutation) RemoveMetadatumIDs(ids ...uuid.UUID)

RemoveMetadatumIDs removes the "metadata" edge to the HasMetadata entity by IDs.

func (*ArtifactMutation) RemoveOccurrenceIDs

func (m *ArtifactMutation) RemoveOccurrenceIDs(ids ...uuid.UUID)

RemoveOccurrenceIDs removes the "occurrences" edge to the Occurrence entity by IDs.

func (*ArtifactMutation) RemovePocIDs added in v0.6.0

func (m *ArtifactMutation) RemovePocIDs(ids ...uuid.UUID)

RemovePocIDs removes the "poc" edge to the PointOfContact entity by IDs.

func (*ArtifactMutation) RemoveSbomIDs

func (m *ArtifactMutation) RemoveSbomIDs(ids ...uuid.UUID)

RemoveSbomIDs removes the "sbom" edge to the BillOfMaterials entity by IDs.

func (*ArtifactMutation) RemoveVexIDs added in v0.6.0

func (m *ArtifactMutation) RemoveVexIDs(ids ...uuid.UUID)

RemoveVexIDs removes the "vex" edge to the CertifyVex entity by IDs.

func (*ArtifactMutation) RemovedAttestationsIDs

func (m *ArtifactMutation) RemovedAttestationsIDs() (ids []uuid.UUID)

RemovedAttestations returns the removed IDs of the "attestations" edge to the SLSAAttestation entity.

func (*ArtifactMutation) RemovedAttestationsSubjectIDs added in v0.6.0

func (m *ArtifactMutation) RemovedAttestationsSubjectIDs() (ids []uuid.UUID)

RemovedAttestationsSubject returns the removed IDs of the "attestations_subject" edge to the SLSAAttestation entity.

func (*ArtifactMutation) RemovedCertificationIDs added in v0.6.0

func (m *ArtifactMutation) RemovedCertificationIDs() (ids []uuid.UUID)

RemovedCertification returns the removed IDs of the "certification" edge to the Certification entity.

func (*ArtifactMutation) RemovedEdges

func (m *ArtifactMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*ArtifactMutation) RemovedHashEqualArtAIDs added in v0.5.0

func (m *ArtifactMutation) RemovedHashEqualArtAIDs() (ids []uuid.UUID)

RemovedHashEqualArtA returns the removed IDs of the "hash_equal_art_a" edge to the HashEqual entity.

func (*ArtifactMutation) RemovedHashEqualArtBIDs added in v0.5.0

func (m *ArtifactMutation) RemovedHashEqualArtBIDs() (ids []uuid.UUID)

RemovedHashEqualArtB returns the removed IDs of the "hash_equal_art_b" edge to the HashEqual entity.

func (*ArtifactMutation) RemovedIDs

func (m *ArtifactMutation) RemovedIDs(name string) []ent.Value

RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.

func (*ArtifactMutation) RemovedIncludedInSbomsIDs added in v0.4.0

func (m *ArtifactMutation) RemovedIncludedInSbomsIDs() (ids []uuid.UUID)

RemovedIncludedInSboms returns the removed IDs of the "included_in_sboms" edge to the BillOfMaterials entity.

func (*ArtifactMutation) RemovedMetadataIDs added in v0.6.0

func (m *ArtifactMutation) RemovedMetadataIDs() (ids []uuid.UUID)

RemovedMetadata returns the removed IDs of the "metadata" edge to the HasMetadata entity.

func (*ArtifactMutation) RemovedOccurrencesIDs

func (m *ArtifactMutation) RemovedOccurrencesIDs() (ids []uuid.UUID)

RemovedOccurrences returns the removed IDs of the "occurrences" edge to the Occurrence entity.

func (*ArtifactMutation) RemovedPocIDs added in v0.6.0

func (m *ArtifactMutation) RemovedPocIDs() (ids []uuid.UUID)

RemovedPoc returns the removed IDs of the "poc" edge to the PointOfContact entity.

func (*ArtifactMutation) RemovedSbomIDs

func (m *ArtifactMutation) RemovedSbomIDs() (ids []uuid.UUID)

RemovedSbom returns the removed IDs of the "sbom" edge to the BillOfMaterials entity.

func (*ArtifactMutation) RemovedVexIDs added in v0.6.0

func (m *ArtifactMutation) RemovedVexIDs() (ids []uuid.UUID)

RemovedVex returns the removed IDs of the "vex" edge to the CertifyVex entity.

func (*ArtifactMutation) ResetAlgorithm

func (m *ArtifactMutation) ResetAlgorithm()

ResetAlgorithm resets all changes to the "algorithm" field.

func (*ArtifactMutation) ResetAttestations

func (m *ArtifactMutation) ResetAttestations()

ResetAttestations resets all changes to the "attestations" edge.

func (*ArtifactMutation) ResetAttestationsSubject added in v0.6.0

func (m *ArtifactMutation) ResetAttestationsSubject()

ResetAttestationsSubject resets all changes to the "attestations_subject" edge.

func (*ArtifactMutation) ResetCertification added in v0.6.0

func (m *ArtifactMutation) ResetCertification()

ResetCertification resets all changes to the "certification" edge.

func (*ArtifactMutation) ResetDigest

func (m *ArtifactMutation) ResetDigest()

ResetDigest resets all changes to the "digest" field.

func (*ArtifactMutation) ResetEdge

func (m *ArtifactMutation) ResetEdge(name string) error

ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.

func (*ArtifactMutation) ResetField

func (m *ArtifactMutation) ResetField(name string) error

ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.

func (*ArtifactMutation) ResetHashEqualArtA added in v0.5.0

func (m *ArtifactMutation) ResetHashEqualArtA()

ResetHashEqualArtA resets all changes to the "hash_equal_art_a" edge.

func (*ArtifactMutation) ResetHashEqualArtB added in v0.5.0

func (m *ArtifactMutation) ResetHashEqualArtB()

ResetHashEqualArtB resets all changes to the "hash_equal_art_b" edge.

func (*ArtifactMutation) ResetIncludedInSboms added in v0.4.0

func (m *ArtifactMutation) ResetIncludedInSboms()

ResetIncludedInSboms resets all changes to the "included_in_sboms" edge.

func (*ArtifactMutation) ResetMetadata added in v0.6.0

func (m *ArtifactMutation) ResetMetadata()

ResetMetadata resets all changes to the "metadata" edge.

func (*ArtifactMutation) ResetOccurrences

func (m *ArtifactMutation) ResetOccurrences()

ResetOccurrences resets all changes to the "occurrences" edge.

func (*ArtifactMutation) ResetPoc added in v0.6.0

func (m *ArtifactMutation) ResetPoc()

ResetPoc resets all changes to the "poc" edge.

func (*ArtifactMutation) ResetSbom

func (m *ArtifactMutation) ResetSbom()

ResetSbom resets all changes to the "sbom" edge.

func (*ArtifactMutation) ResetVex added in v0.6.0

func (m *ArtifactMutation) ResetVex()

ResetVex resets all changes to the "vex" edge.

func (*ArtifactMutation) SbomCleared

func (m *ArtifactMutation) SbomCleared() bool

SbomCleared reports if the "sbom" edge to the BillOfMaterials entity was cleared.

func (*ArtifactMutation) SbomIDs

func (m *ArtifactMutation) SbomIDs() (ids []uuid.UUID)

SbomIDs returns the "sbom" edge IDs in the mutation.

func (*ArtifactMutation) SetAlgorithm

func (m *ArtifactMutation) SetAlgorithm(s string)

SetAlgorithm sets the "algorithm" field.

func (*ArtifactMutation) SetDigest

func (m *ArtifactMutation) SetDigest(s string)

SetDigest sets the "digest" field.

func (*ArtifactMutation) SetField

func (m *ArtifactMutation) SetField(name string, value ent.Value) error

SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*ArtifactMutation) SetID added in v0.5.0

func (m *ArtifactMutation) SetID(id uuid.UUID)

SetID sets the value of the id field. Note that this operation is only accepted on creation of Artifact entities.

func (*ArtifactMutation) SetOp

func (m *ArtifactMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (ArtifactMutation) Tx

func (m ArtifactMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*ArtifactMutation) Type

func (m *ArtifactMutation) Type() string

Type returns the node type of this mutation (Artifact).

func (*ArtifactMutation) VexCleared added in v0.6.0

func (m *ArtifactMutation) VexCleared() bool

VexCleared reports if the "vex" edge to the CertifyVex entity was cleared.

func (*ArtifactMutation) VexIDs added in v0.6.0

func (m *ArtifactMutation) VexIDs() (ids []uuid.UUID)

VexIDs returns the "vex" edge IDs in the mutation.

func (*ArtifactMutation) Where

func (m *ArtifactMutation) Where(ps ...predicate.Artifact)

Where appends a list predicates to the ArtifactMutation builder.

func (*ArtifactMutation) WhereP

func (m *ArtifactMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the ArtifactMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type ArtifactOrder

type ArtifactOrder struct {
	Direction OrderDirection      `json:"direction"`
	Field     *ArtifactOrderField `json:"field"`
}

ArtifactOrder defines the ordering of Artifact.

type ArtifactOrderField

type ArtifactOrderField struct {
	// Value extracts the ordering value from the given Artifact.
	Value func(*Artifact) (ent.Value, error)
	// contains filtered or unexported fields
}

ArtifactOrderField defines the ordering field of Artifact.

type ArtifactPaginateOption

type ArtifactPaginateOption func(*artifactPager) error

ArtifactPaginateOption enables pagination customization.

func WithArtifactFilter

func WithArtifactFilter(filter func(*ArtifactQuery) (*ArtifactQuery, error)) ArtifactPaginateOption

WithArtifactFilter configures pagination filter.

func WithArtifactOrder

func WithArtifactOrder(order *ArtifactOrder) ArtifactPaginateOption

WithArtifactOrder configures pagination ordering.

type ArtifactQuery

type ArtifactQuery struct {
	// contains filtered or unexported fields
}

ArtifactQuery is the builder for querying Artifact entities.

func (*ArtifactQuery) Aggregate

func (aq *ArtifactQuery) Aggregate(fns ...AggregateFunc) *ArtifactSelect

Aggregate returns a ArtifactSelect configured with the given aggregations.

func (*ArtifactQuery) All

func (aq *ArtifactQuery) All(ctx context.Context) ([]*Artifact, error)

All executes the query and returns a list of Artifacts.

func (*ArtifactQuery) AllX

func (aq *ArtifactQuery) AllX(ctx context.Context) []*Artifact

AllX is like All, but panics if an error occurs.

func (*ArtifactQuery) Clone

func (aq *ArtifactQuery) Clone() *ArtifactQuery

Clone returns a duplicate of the ArtifactQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*ArtifactQuery) CollectFields

func (a *ArtifactQuery) CollectFields(ctx context.Context, satisfies ...string) (*ArtifactQuery, error)

CollectFields tells the query-builder to eagerly load connected nodes by resolver context.

func (*ArtifactQuery) Count

func (aq *ArtifactQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*ArtifactQuery) CountX

func (aq *ArtifactQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*ArtifactQuery) Exist

func (aq *ArtifactQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*ArtifactQuery) ExistX

func (aq *ArtifactQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*ArtifactQuery) First

func (aq *ArtifactQuery) First(ctx context.Context) (*Artifact, error)

First returns the first Artifact entity from the query. Returns a *NotFoundError when no Artifact was found.

func (*ArtifactQuery) FirstID

func (aq *ArtifactQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)

FirstID returns the first Artifact ID from the query. Returns a *NotFoundError when no Artifact ID was found.

func (*ArtifactQuery) FirstIDX

func (aq *ArtifactQuery) FirstIDX(ctx context.Context) uuid.UUID

FirstIDX is like FirstID, but panics if an error occurs.

func (*ArtifactQuery) FirstX

func (aq *ArtifactQuery) FirstX(ctx context.Context) *Artifact

FirstX is like First, but panics if an error occurs.

func (*ArtifactQuery) GroupBy

func (aq *ArtifactQuery) GroupBy(field string, fields ...string) *ArtifactGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	Algorithm string `json:"algorithm,omitempty"`
	Count int `json:"count,omitempty"`
}

client.Artifact.Query().
	GroupBy(artifact.FieldAlgorithm).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*ArtifactQuery) IDs

func (aq *ArtifactQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)

IDs executes the query and returns a list of Artifact IDs.

func (*ArtifactQuery) IDsX

func (aq *ArtifactQuery) IDsX(ctx context.Context) []uuid.UUID

IDsX is like IDs, but panics if an error occurs.

func (*ArtifactQuery) Limit

func (aq *ArtifactQuery) Limit(limit int) *ArtifactQuery

Limit the number of records to be returned by this query.

func (*ArtifactQuery) Offset

func (aq *ArtifactQuery) Offset(offset int) *ArtifactQuery

Offset to start from.

func (*ArtifactQuery) Only

func (aq *ArtifactQuery) Only(ctx context.Context) (*Artifact, error)

Only returns a single Artifact entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Artifact entity is found. Returns a *NotFoundError when no Artifact entities are found.

func (*ArtifactQuery) OnlyID

func (aq *ArtifactQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)

OnlyID is like Only, but returns the only Artifact ID in the query. Returns a *NotSingularError when more than one Artifact ID is found. Returns a *NotFoundError when no entities are found.

func (*ArtifactQuery) OnlyIDX

func (aq *ArtifactQuery) OnlyIDX(ctx context.Context) uuid.UUID

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*ArtifactQuery) OnlyX

func (aq *ArtifactQuery) OnlyX(ctx context.Context) *Artifact

OnlyX is like Only, but panics if an error occurs.

func (*ArtifactQuery) Order

Order specifies how the records should be ordered.

func (*ArtifactQuery) Paginate

func (a *ArtifactQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...ArtifactPaginateOption,
) (*ArtifactConnection, error)

Paginate executes the query and returns a relay based cursor connection to Artifact.

func (*ArtifactQuery) QueryAttestations

func (aq *ArtifactQuery) QueryAttestations() *SLSAAttestationQuery

QueryAttestations chains the current query on the "attestations" edge.

func (*ArtifactQuery) QueryAttestationsSubject added in v0.6.0

func (aq *ArtifactQuery) QueryAttestationsSubject() *SLSAAttestationQuery

QueryAttestationsSubject chains the current query on the "attestations_subject" edge.

func (*ArtifactQuery) QueryCertification added in v0.6.0

func (aq *ArtifactQuery) QueryCertification() *CertificationQuery

QueryCertification chains the current query on the "certification" edge.

func (*ArtifactQuery) QueryHashEqualArtA added in v0.5.0

func (aq *ArtifactQuery) QueryHashEqualArtA() *HashEqualQuery

QueryHashEqualArtA chains the current query on the "hash_equal_art_a" edge.

func (*ArtifactQuery) QueryHashEqualArtB added in v0.5.0

func (aq *ArtifactQuery) QueryHashEqualArtB() *HashEqualQuery

QueryHashEqualArtB chains the current query on the "hash_equal_art_b" edge.

func (*ArtifactQuery) QueryIncludedInSboms added in v0.4.0

func (aq *ArtifactQuery) QueryIncludedInSboms() *BillOfMaterialsQuery

QueryIncludedInSboms chains the current query on the "included_in_sboms" edge.

func (*ArtifactQuery) QueryMetadata added in v0.6.0

func (aq *ArtifactQuery) QueryMetadata() *HasMetadataQuery

QueryMetadata chains the current query on the "metadata" edge.

func (*ArtifactQuery) QueryOccurrences

func (aq *ArtifactQuery) QueryOccurrences() *OccurrenceQuery

QueryOccurrences chains the current query on the "occurrences" edge.

func (*ArtifactQuery) QueryPoc added in v0.6.0

func (aq *ArtifactQuery) QueryPoc() *PointOfContactQuery

QueryPoc chains the current query on the "poc" edge.

func (*ArtifactQuery) QuerySbom

func (aq *ArtifactQuery) QuerySbom() *BillOfMaterialsQuery

QuerySbom chains the current query on the "sbom" edge.

func (*ArtifactQuery) QueryVex added in v0.6.0

func (aq *ArtifactQuery) QueryVex() *CertifyVexQuery

QueryVex chains the current query on the "vex" edge.

func (*ArtifactQuery) Select

func (aq *ArtifactQuery) Select(fields ...string) *ArtifactSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	Algorithm string `json:"algorithm,omitempty"`
}

client.Artifact.Query().
	Select(artifact.FieldAlgorithm).
	Scan(ctx, &v)

func (*ArtifactQuery) Unique

func (aq *ArtifactQuery) Unique(unique bool) *ArtifactQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*ArtifactQuery) Where

func (aq *ArtifactQuery) Where(ps ...predicate.Artifact) *ArtifactQuery

Where adds a new predicate for the ArtifactQuery builder.

func (*ArtifactQuery) WithAttestations

func (aq *ArtifactQuery) WithAttestations(opts ...func(*SLSAAttestationQuery)) *ArtifactQuery

WithAttestations tells the query-builder to eager-load the nodes that are connected to the "attestations" edge. The optional arguments are used to configure the query builder of the edge.

func (*ArtifactQuery) WithAttestationsSubject added in v0.6.0

func (aq *ArtifactQuery) WithAttestationsSubject(opts ...func(*SLSAAttestationQuery)) *ArtifactQuery

WithAttestationsSubject tells the query-builder to eager-load the nodes that are connected to the "attestations_subject" edge. The optional arguments are used to configure the query builder of the edge.

func (*ArtifactQuery) WithCertification added in v0.6.0

func (aq *ArtifactQuery) WithCertification(opts ...func(*CertificationQuery)) *ArtifactQuery

WithCertification tells the query-builder to eager-load the nodes that are connected to the "certification" edge. The optional arguments are used to configure the query builder of the edge.

func (*ArtifactQuery) WithHashEqualArtA added in v0.5.0

func (aq *ArtifactQuery) WithHashEqualArtA(opts ...func(*HashEqualQuery)) *ArtifactQuery

WithHashEqualArtA tells the query-builder to eager-load the nodes that are connected to the "hash_equal_art_a" edge. The optional arguments are used to configure the query builder of the edge.

func (*ArtifactQuery) WithHashEqualArtB added in v0.5.0

func (aq *ArtifactQuery) WithHashEqualArtB(opts ...func(*HashEqualQuery)) *ArtifactQuery

WithHashEqualArtB tells the query-builder to eager-load the nodes that are connected to the "hash_equal_art_b" edge. The optional arguments are used to configure the query builder of the edge.

func (*ArtifactQuery) WithIncludedInSboms added in v0.4.0

func (aq *ArtifactQuery) WithIncludedInSboms(opts ...func(*BillOfMaterialsQuery)) *ArtifactQuery

WithIncludedInSboms tells the query-builder to eager-load the nodes that are connected to the "included_in_sboms" edge. The optional arguments are used to configure the query builder of the edge.

func (*ArtifactQuery) WithMetadata added in v0.6.0

func (aq *ArtifactQuery) WithMetadata(opts ...func(*HasMetadataQuery)) *ArtifactQuery

WithMetadata tells the query-builder to eager-load the nodes that are connected to the "metadata" edge. The optional arguments are used to configure the query builder of the edge.

func (*ArtifactQuery) WithNamedAttestations

func (aq *ArtifactQuery) WithNamedAttestations(name string, opts ...func(*SLSAAttestationQuery)) *ArtifactQuery

WithNamedAttestations tells the query-builder to eager-load the nodes that are connected to the "attestations" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*ArtifactQuery) WithNamedAttestationsSubject added in v0.6.0

func (aq *ArtifactQuery) WithNamedAttestationsSubject(name string, opts ...func(*SLSAAttestationQuery)) *ArtifactQuery

WithNamedAttestationsSubject tells the query-builder to eager-load the nodes that are connected to the "attestations_subject" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*ArtifactQuery) WithNamedCertification added in v0.6.0

func (aq *ArtifactQuery) WithNamedCertification(name string, opts ...func(*CertificationQuery)) *ArtifactQuery

WithNamedCertification tells the query-builder to eager-load the nodes that are connected to the "certification" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*ArtifactQuery) WithNamedHashEqualArtA added in v0.5.0

func (aq *ArtifactQuery) WithNamedHashEqualArtA(name string, opts ...func(*HashEqualQuery)) *ArtifactQuery

WithNamedHashEqualArtA tells the query-builder to eager-load the nodes that are connected to the "hash_equal_art_a" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*ArtifactQuery) WithNamedHashEqualArtB added in v0.5.0

func (aq *ArtifactQuery) WithNamedHashEqualArtB(name string, opts ...func(*HashEqualQuery)) *ArtifactQuery

WithNamedHashEqualArtB tells the query-builder to eager-load the nodes that are connected to the "hash_equal_art_b" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*ArtifactQuery) WithNamedIncludedInSboms added in v0.4.0

func (aq *ArtifactQuery) WithNamedIncludedInSboms(name string, opts ...func(*BillOfMaterialsQuery)) *ArtifactQuery

WithNamedIncludedInSboms tells the query-builder to eager-load the nodes that are connected to the "included_in_sboms" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*ArtifactQuery) WithNamedMetadata added in v0.6.0

func (aq *ArtifactQuery) WithNamedMetadata(name string, opts ...func(*HasMetadataQuery)) *ArtifactQuery

WithNamedMetadata tells the query-builder to eager-load the nodes that are connected to the "metadata" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*ArtifactQuery) WithNamedOccurrences

func (aq *ArtifactQuery) WithNamedOccurrences(name string, opts ...func(*OccurrenceQuery)) *ArtifactQuery

WithNamedOccurrences tells the query-builder to eager-load the nodes that are connected to the "occurrences" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*ArtifactQuery) WithNamedPoc added in v0.6.0

func (aq *ArtifactQuery) WithNamedPoc(name string, opts ...func(*PointOfContactQuery)) *ArtifactQuery

WithNamedPoc tells the query-builder to eager-load the nodes that are connected to the "poc" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*ArtifactQuery) WithNamedSbom

func (aq *ArtifactQuery) WithNamedSbom(name string, opts ...func(*BillOfMaterialsQuery)) *ArtifactQuery

WithNamedSbom tells the query-builder to eager-load the nodes that are connected to the "sbom" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*ArtifactQuery) WithNamedVex added in v0.6.0

func (aq *ArtifactQuery) WithNamedVex(name string, opts ...func(*CertifyVexQuery)) *ArtifactQuery

WithNamedVex tells the query-builder to eager-load the nodes that are connected to the "vex" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*ArtifactQuery) WithOccurrences

func (aq *ArtifactQuery) WithOccurrences(opts ...func(*OccurrenceQuery)) *ArtifactQuery

WithOccurrences tells the query-builder to eager-load the nodes that are connected to the "occurrences" edge. The optional arguments are used to configure the query builder of the edge.

func (*ArtifactQuery) WithPoc added in v0.6.0

func (aq *ArtifactQuery) WithPoc(opts ...func(*PointOfContactQuery)) *ArtifactQuery

WithPoc tells the query-builder to eager-load the nodes that are connected to the "poc" edge. The optional arguments are used to configure the query builder of the edge.

func (*ArtifactQuery) WithSbom

func (aq *ArtifactQuery) WithSbom(opts ...func(*BillOfMaterialsQuery)) *ArtifactQuery

WithSbom tells the query-builder to eager-load the nodes that are connected to the "sbom" edge. The optional arguments are used to configure the query builder of the edge.

func (*ArtifactQuery) WithVex added in v0.6.0

func (aq *ArtifactQuery) WithVex(opts ...func(*CertifyVexQuery)) *ArtifactQuery

WithVex tells the query-builder to eager-load the nodes that are connected to the "vex" edge. The optional arguments are used to configure the query builder of the edge.

type ArtifactSelect

type ArtifactSelect struct {
	*ArtifactQuery
	// contains filtered or unexported fields
}

ArtifactSelect is the builder for selecting fields of Artifact entities.

func (*ArtifactSelect) Aggregate

func (as *ArtifactSelect) Aggregate(fns ...AggregateFunc) *ArtifactSelect

Aggregate adds the given aggregation functions to the selector query.

func (*ArtifactSelect) Bool

func (s *ArtifactSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*ArtifactSelect) BoolX

func (s *ArtifactSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*ArtifactSelect) Bools

func (s *ArtifactSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*ArtifactSelect) BoolsX

func (s *ArtifactSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*ArtifactSelect) Float64

func (s *ArtifactSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*ArtifactSelect) Float64X

func (s *ArtifactSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*ArtifactSelect) Float64s

func (s *ArtifactSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*ArtifactSelect) Float64sX

func (s *ArtifactSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*ArtifactSelect) Int

func (s *ArtifactSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*ArtifactSelect) IntX

func (s *ArtifactSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*ArtifactSelect) Ints

func (s *ArtifactSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*ArtifactSelect) IntsX

func (s *ArtifactSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*ArtifactSelect) Scan

func (as *ArtifactSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*ArtifactSelect) ScanX

func (s *ArtifactSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*ArtifactSelect) String

func (s *ArtifactSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*ArtifactSelect) StringX

func (s *ArtifactSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*ArtifactSelect) Strings

func (s *ArtifactSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*ArtifactSelect) StringsX

func (s *ArtifactSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type ArtifactUpdate

type ArtifactUpdate struct {
	// contains filtered or unexported fields
}

ArtifactUpdate is the builder for updating Artifact entities.

func (*ArtifactUpdate) AddAttestationIDs

func (au *ArtifactUpdate) AddAttestationIDs(ids ...uuid.UUID) *ArtifactUpdate

AddAttestationIDs adds the "attestations" edge to the SLSAAttestation entity by IDs.

func (*ArtifactUpdate) AddAttestations

func (au *ArtifactUpdate) AddAttestations(s ...*SLSAAttestation) *ArtifactUpdate

AddAttestations adds the "attestations" edges to the SLSAAttestation entity.

func (*ArtifactUpdate) AddAttestationsSubject added in v0.6.0

func (au *ArtifactUpdate) AddAttestationsSubject(s ...*SLSAAttestation) *ArtifactUpdate

AddAttestationsSubject adds the "attestations_subject" edges to the SLSAAttestation entity.

func (*ArtifactUpdate) AddAttestationsSubjectIDs added in v0.6.0

func (au *ArtifactUpdate) AddAttestationsSubjectIDs(ids ...uuid.UUID) *ArtifactUpdate

AddAttestationsSubjectIDs adds the "attestations_subject" edge to the SLSAAttestation entity by IDs.

func (*ArtifactUpdate) AddCertification added in v0.6.0

func (au *ArtifactUpdate) AddCertification(c ...*Certification) *ArtifactUpdate

AddCertification adds the "certification" edges to the Certification entity.

func (*ArtifactUpdate) AddCertificationIDs added in v0.6.0

func (au *ArtifactUpdate) AddCertificationIDs(ids ...uuid.UUID) *ArtifactUpdate

AddCertificationIDs adds the "certification" edge to the Certification entity by IDs.

func (*ArtifactUpdate) AddHashEqualArtA added in v0.5.0

func (au *ArtifactUpdate) AddHashEqualArtA(h ...*HashEqual) *ArtifactUpdate

AddHashEqualArtA adds the "hash_equal_art_a" edges to the HashEqual entity.

func (*ArtifactUpdate) AddHashEqualArtAIDs added in v0.5.0

func (au *ArtifactUpdate) AddHashEqualArtAIDs(ids ...uuid.UUID) *ArtifactUpdate

AddHashEqualArtAIDs adds the "hash_equal_art_a" edge to the HashEqual entity by IDs.

func (*ArtifactUpdate) AddHashEqualArtB added in v0.5.0

func (au *ArtifactUpdate) AddHashEqualArtB(h ...*HashEqual) *ArtifactUpdate

AddHashEqualArtB adds the "hash_equal_art_b" edges to the HashEqual entity.

func (*ArtifactUpdate) AddHashEqualArtBIDs added in v0.5.0

func (au *ArtifactUpdate) AddHashEqualArtBIDs(ids ...uuid.UUID) *ArtifactUpdate

AddHashEqualArtBIDs adds the "hash_equal_art_b" edge to the HashEqual entity by IDs.

func (*ArtifactUpdate) AddIncludedInSbomIDs added in v0.4.0

func (au *ArtifactUpdate) AddIncludedInSbomIDs(ids ...uuid.UUID) *ArtifactUpdate

AddIncludedInSbomIDs adds the "included_in_sboms" edge to the BillOfMaterials entity by IDs.

func (*ArtifactUpdate) AddIncludedInSboms added in v0.4.0

func (au *ArtifactUpdate) AddIncludedInSboms(b ...*BillOfMaterials) *ArtifactUpdate

AddIncludedInSboms adds the "included_in_sboms" edges to the BillOfMaterials entity.

func (*ArtifactUpdate) AddMetadata added in v0.6.0

func (au *ArtifactUpdate) AddMetadata(h ...*HasMetadata) *ArtifactUpdate

AddMetadata adds the "metadata" edges to the HasMetadata entity.

func (*ArtifactUpdate) AddMetadatumIDs added in v0.6.0

func (au *ArtifactUpdate) AddMetadatumIDs(ids ...uuid.UUID) *ArtifactUpdate

AddMetadatumIDs adds the "metadata" edge to the HasMetadata entity by IDs.

func (*ArtifactUpdate) AddOccurrenceIDs

func (au *ArtifactUpdate) AddOccurrenceIDs(ids ...uuid.UUID) *ArtifactUpdate

AddOccurrenceIDs adds the "occurrences" edge to the Occurrence entity by IDs.

func (*ArtifactUpdate) AddOccurrences

func (au *ArtifactUpdate) AddOccurrences(o ...*Occurrence) *ArtifactUpdate

AddOccurrences adds the "occurrences" edges to the Occurrence entity.

func (*ArtifactUpdate) AddPoc added in v0.6.0

func (au *ArtifactUpdate) AddPoc(p ...*PointOfContact) *ArtifactUpdate

AddPoc adds the "poc" edges to the PointOfContact entity.

func (*ArtifactUpdate) AddPocIDs added in v0.6.0

func (au *ArtifactUpdate) AddPocIDs(ids ...uuid.UUID) *ArtifactUpdate

AddPocIDs adds the "poc" edge to the PointOfContact entity by IDs.

func (*ArtifactUpdate) AddSbom

func (au *ArtifactUpdate) AddSbom(b ...*BillOfMaterials) *ArtifactUpdate

AddSbom adds the "sbom" edges to the BillOfMaterials entity.

func (*ArtifactUpdate) AddSbomIDs

func (au *ArtifactUpdate) AddSbomIDs(ids ...uuid.UUID) *ArtifactUpdate

AddSbomIDs adds the "sbom" edge to the BillOfMaterials entity by IDs.

func (*ArtifactUpdate) AddVex added in v0.6.0

func (au *ArtifactUpdate) AddVex(c ...*CertifyVex) *ArtifactUpdate

AddVex adds the "vex" edges to the CertifyVex entity.

func (*ArtifactUpdate) AddVexIDs added in v0.6.0

func (au *ArtifactUpdate) AddVexIDs(ids ...uuid.UUID) *ArtifactUpdate

AddVexIDs adds the "vex" edge to the CertifyVex entity by IDs.

func (*ArtifactUpdate) ClearAttestations

func (au *ArtifactUpdate) ClearAttestations() *ArtifactUpdate

ClearAttestations clears all "attestations" edges to the SLSAAttestation entity.

func (*ArtifactUpdate) ClearAttestationsSubject added in v0.6.0

func (au *ArtifactUpdate) ClearAttestationsSubject() *ArtifactUpdate

ClearAttestationsSubject clears all "attestations_subject" edges to the SLSAAttestation entity.

func (*ArtifactUpdate) ClearCertification added in v0.6.0

func (au *ArtifactUpdate) ClearCertification() *ArtifactUpdate

ClearCertification clears all "certification" edges to the Certification entity.

func (*ArtifactUpdate) ClearHashEqualArtA added in v0.5.0

func (au *ArtifactUpdate) ClearHashEqualArtA() *ArtifactUpdate

ClearHashEqualArtA clears all "hash_equal_art_a" edges to the HashEqual entity.

func (*ArtifactUpdate) ClearHashEqualArtB added in v0.5.0

func (au *ArtifactUpdate) ClearHashEqualArtB() *ArtifactUpdate

ClearHashEqualArtB clears all "hash_equal_art_b" edges to the HashEqual entity.

func (*ArtifactUpdate) ClearIncludedInSboms added in v0.4.0

func (au *ArtifactUpdate) ClearIncludedInSboms() *ArtifactUpdate

ClearIncludedInSboms clears all "included_in_sboms" edges to the BillOfMaterials entity.

func (*ArtifactUpdate) ClearMetadata added in v0.6.0

func (au *ArtifactUpdate) ClearMetadata() *ArtifactUpdate

ClearMetadata clears all "metadata" edges to the HasMetadata entity.

func (*ArtifactUpdate) ClearOccurrences

func (au *ArtifactUpdate) ClearOccurrences() *ArtifactUpdate

ClearOccurrences clears all "occurrences" edges to the Occurrence entity.

func (*ArtifactUpdate) ClearPoc added in v0.6.0

func (au *ArtifactUpdate) ClearPoc() *ArtifactUpdate

ClearPoc clears all "poc" edges to the PointOfContact entity.

func (*ArtifactUpdate) ClearSbom

func (au *ArtifactUpdate) ClearSbom() *ArtifactUpdate

ClearSbom clears all "sbom" edges to the BillOfMaterials entity.

func (*ArtifactUpdate) ClearVex added in v0.6.0

func (au *ArtifactUpdate) ClearVex() *ArtifactUpdate

ClearVex clears all "vex" edges to the CertifyVex entity.

func (*ArtifactUpdate) Exec

func (au *ArtifactUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*ArtifactUpdate) ExecX

func (au *ArtifactUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ArtifactUpdate) Mutation

func (au *ArtifactUpdate) Mutation() *ArtifactMutation

Mutation returns the ArtifactMutation object of the builder.

func (*ArtifactUpdate) RemoveAttestationIDs

func (au *ArtifactUpdate) RemoveAttestationIDs(ids ...uuid.UUID) *ArtifactUpdate

RemoveAttestationIDs removes the "attestations" edge to SLSAAttestation entities by IDs.

func (*ArtifactUpdate) RemoveAttestations

func (au *ArtifactUpdate) RemoveAttestations(s ...*SLSAAttestation) *ArtifactUpdate

RemoveAttestations removes "attestations" edges to SLSAAttestation entities.

func (*ArtifactUpdate) RemoveAttestationsSubject added in v0.6.0

func (au *ArtifactUpdate) RemoveAttestationsSubject(s ...*SLSAAttestation) *ArtifactUpdate

RemoveAttestationsSubject removes "attestations_subject" edges to SLSAAttestation entities.

func (*ArtifactUpdate) RemoveAttestationsSubjectIDs added in v0.6.0

func (au *ArtifactUpdate) RemoveAttestationsSubjectIDs(ids ...uuid.UUID) *ArtifactUpdate

RemoveAttestationsSubjectIDs removes the "attestations_subject" edge to SLSAAttestation entities by IDs.

func (*ArtifactUpdate) RemoveCertification added in v0.6.0

func (au *ArtifactUpdate) RemoveCertification(c ...*Certification) *ArtifactUpdate

RemoveCertification removes "certification" edges to Certification entities.

func (*ArtifactUpdate) RemoveCertificationIDs added in v0.6.0

func (au *ArtifactUpdate) RemoveCertificationIDs(ids ...uuid.UUID) *ArtifactUpdate

RemoveCertificationIDs removes the "certification" edge to Certification entities by IDs.

func (*ArtifactUpdate) RemoveHashEqualArtA added in v0.5.0

func (au *ArtifactUpdate) RemoveHashEqualArtA(h ...*HashEqual) *ArtifactUpdate

RemoveHashEqualArtA removes "hash_equal_art_a" edges to HashEqual entities.

func (*ArtifactUpdate) RemoveHashEqualArtAIDs added in v0.5.0

func (au *ArtifactUpdate) RemoveHashEqualArtAIDs(ids ...uuid.UUID) *ArtifactUpdate

RemoveHashEqualArtAIDs removes the "hash_equal_art_a" edge to HashEqual entities by IDs.

func (*ArtifactUpdate) RemoveHashEqualArtB added in v0.5.0

func (au *ArtifactUpdate) RemoveHashEqualArtB(h ...*HashEqual) *ArtifactUpdate

RemoveHashEqualArtB removes "hash_equal_art_b" edges to HashEqual entities.

func (*ArtifactUpdate) RemoveHashEqualArtBIDs added in v0.5.0

func (au *ArtifactUpdate) RemoveHashEqualArtBIDs(ids ...uuid.UUID) *ArtifactUpdate

RemoveHashEqualArtBIDs removes the "hash_equal_art_b" edge to HashEqual entities by IDs.

func (*ArtifactUpdate) RemoveIncludedInSbomIDs added in v0.4.0

func (au *ArtifactUpdate) RemoveIncludedInSbomIDs(ids ...uuid.UUID) *ArtifactUpdate

RemoveIncludedInSbomIDs removes the "included_in_sboms" edge to BillOfMaterials entities by IDs.

func (*ArtifactUpdate) RemoveIncludedInSboms added in v0.4.0

func (au *ArtifactUpdate) RemoveIncludedInSboms(b ...*BillOfMaterials) *ArtifactUpdate

RemoveIncludedInSboms removes "included_in_sboms" edges to BillOfMaterials entities.

func (*ArtifactUpdate) RemoveMetadata added in v0.6.0

func (au *ArtifactUpdate) RemoveMetadata(h ...*HasMetadata) *ArtifactUpdate

RemoveMetadata removes "metadata" edges to HasMetadata entities.

func (*ArtifactUpdate) RemoveMetadatumIDs added in v0.6.0

func (au *ArtifactUpdate) RemoveMetadatumIDs(ids ...uuid.UUID) *ArtifactUpdate

RemoveMetadatumIDs removes the "metadata" edge to HasMetadata entities by IDs.

func (*ArtifactUpdate) RemoveOccurrenceIDs

func (au *ArtifactUpdate) RemoveOccurrenceIDs(ids ...uuid.UUID) *ArtifactUpdate

RemoveOccurrenceIDs removes the "occurrences" edge to Occurrence entities by IDs.

func (*ArtifactUpdate) RemoveOccurrences

func (au *ArtifactUpdate) RemoveOccurrences(o ...*Occurrence) *ArtifactUpdate

RemoveOccurrences removes "occurrences" edges to Occurrence entities.

func (*ArtifactUpdate) RemovePoc added in v0.6.0

func (au *ArtifactUpdate) RemovePoc(p ...*PointOfContact) *ArtifactUpdate

RemovePoc removes "poc" edges to PointOfContact entities.

func (*ArtifactUpdate) RemovePocIDs added in v0.6.0

func (au *ArtifactUpdate) RemovePocIDs(ids ...uuid.UUID) *ArtifactUpdate

RemovePocIDs removes the "poc" edge to PointOfContact entities by IDs.

func (*ArtifactUpdate) RemoveSbom

func (au *ArtifactUpdate) RemoveSbom(b ...*BillOfMaterials) *ArtifactUpdate

RemoveSbom removes "sbom" edges to BillOfMaterials entities.

func (*ArtifactUpdate) RemoveSbomIDs

func (au *ArtifactUpdate) RemoveSbomIDs(ids ...uuid.UUID) *ArtifactUpdate

RemoveSbomIDs removes the "sbom" edge to BillOfMaterials entities by IDs.

func (*ArtifactUpdate) RemoveVex added in v0.6.0

func (au *ArtifactUpdate) RemoveVex(c ...*CertifyVex) *ArtifactUpdate

RemoveVex removes "vex" edges to CertifyVex entities.

func (*ArtifactUpdate) RemoveVexIDs added in v0.6.0

func (au *ArtifactUpdate) RemoveVexIDs(ids ...uuid.UUID) *ArtifactUpdate

RemoveVexIDs removes the "vex" edge to CertifyVex entities by IDs.

func (*ArtifactUpdate) Save

func (au *ArtifactUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*ArtifactUpdate) SaveX

func (au *ArtifactUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*ArtifactUpdate) SetAlgorithm

func (au *ArtifactUpdate) SetAlgorithm(s string) *ArtifactUpdate

SetAlgorithm sets the "algorithm" field.

func (*ArtifactUpdate) SetDigest

func (au *ArtifactUpdate) SetDigest(s string) *ArtifactUpdate

SetDigest sets the "digest" field.

func (*ArtifactUpdate) SetNillableAlgorithm added in v0.4.0

func (au *ArtifactUpdate) SetNillableAlgorithm(s *string) *ArtifactUpdate

SetNillableAlgorithm sets the "algorithm" field if the given value is not nil.

func (*ArtifactUpdate) SetNillableDigest added in v0.4.0

func (au *ArtifactUpdate) SetNillableDigest(s *string) *ArtifactUpdate

SetNillableDigest sets the "digest" field if the given value is not nil.

func (*ArtifactUpdate) Where

func (au *ArtifactUpdate) Where(ps ...predicate.Artifact) *ArtifactUpdate

Where appends a list predicates to the ArtifactUpdate builder.

type ArtifactUpdateOne

type ArtifactUpdateOne struct {
	// contains filtered or unexported fields
}

ArtifactUpdateOne is the builder for updating a single Artifact entity.

func (*ArtifactUpdateOne) AddAttestationIDs

func (auo *ArtifactUpdateOne) AddAttestationIDs(ids ...uuid.UUID) *ArtifactUpdateOne

AddAttestationIDs adds the "attestations" edge to the SLSAAttestation entity by IDs.

func (*ArtifactUpdateOne) AddAttestations

func (auo *ArtifactUpdateOne) AddAttestations(s ...*SLSAAttestation) *ArtifactUpdateOne

AddAttestations adds the "attestations" edges to the SLSAAttestation entity.

func (*ArtifactUpdateOne) AddAttestationsSubject added in v0.6.0

func (auo *ArtifactUpdateOne) AddAttestationsSubject(s ...*SLSAAttestation) *ArtifactUpdateOne

AddAttestationsSubject adds the "attestations_subject" edges to the SLSAAttestation entity.

func (*ArtifactUpdateOne) AddAttestationsSubjectIDs added in v0.6.0

func (auo *ArtifactUpdateOne) AddAttestationsSubjectIDs(ids ...uuid.UUID) *ArtifactUpdateOne

AddAttestationsSubjectIDs adds the "attestations_subject" edge to the SLSAAttestation entity by IDs.

func (*ArtifactUpdateOne) AddCertification added in v0.6.0

func (auo *ArtifactUpdateOne) AddCertification(c ...*Certification) *ArtifactUpdateOne

AddCertification adds the "certification" edges to the Certification entity.

func (*ArtifactUpdateOne) AddCertificationIDs added in v0.6.0

func (auo *ArtifactUpdateOne) AddCertificationIDs(ids ...uuid.UUID) *ArtifactUpdateOne

AddCertificationIDs adds the "certification" edge to the Certification entity by IDs.

func (*ArtifactUpdateOne) AddHashEqualArtA added in v0.5.0

func (auo *ArtifactUpdateOne) AddHashEqualArtA(h ...*HashEqual) *ArtifactUpdateOne

AddHashEqualArtA adds the "hash_equal_art_a" edges to the HashEqual entity.

func (*ArtifactUpdateOne) AddHashEqualArtAIDs added in v0.5.0

func (auo *ArtifactUpdateOne) AddHashEqualArtAIDs(ids ...uuid.UUID) *ArtifactUpdateOne

AddHashEqualArtAIDs adds the "hash_equal_art_a" edge to the HashEqual entity by IDs.

func (*ArtifactUpdateOne) AddHashEqualArtB added in v0.5.0

func (auo *ArtifactUpdateOne) AddHashEqualArtB(h ...*HashEqual) *ArtifactUpdateOne

AddHashEqualArtB adds the "hash_equal_art_b" edges to the HashEqual entity.

func (*ArtifactUpdateOne) AddHashEqualArtBIDs added in v0.5.0

func (auo *ArtifactUpdateOne) AddHashEqualArtBIDs(ids ...uuid.UUID) *ArtifactUpdateOne

AddHashEqualArtBIDs adds the "hash_equal_art_b" edge to the HashEqual entity by IDs.

func (*ArtifactUpdateOne) AddIncludedInSbomIDs added in v0.4.0

func (auo *ArtifactUpdateOne) AddIncludedInSbomIDs(ids ...uuid.UUID) *ArtifactUpdateOne

AddIncludedInSbomIDs adds the "included_in_sboms" edge to the BillOfMaterials entity by IDs.

func (*ArtifactUpdateOne) AddIncludedInSboms added in v0.4.0

func (auo *ArtifactUpdateOne) AddIncludedInSboms(b ...*BillOfMaterials) *ArtifactUpdateOne

AddIncludedInSboms adds the "included_in_sboms" edges to the BillOfMaterials entity.

func (*ArtifactUpdateOne) AddMetadata added in v0.6.0

func (auo *ArtifactUpdateOne) AddMetadata(h ...*HasMetadata) *ArtifactUpdateOne

AddMetadata adds the "metadata" edges to the HasMetadata entity.

func (*ArtifactUpdateOne) AddMetadatumIDs added in v0.6.0

func (auo *ArtifactUpdateOne) AddMetadatumIDs(ids ...uuid.UUID) *ArtifactUpdateOne

AddMetadatumIDs adds the "metadata" edge to the HasMetadata entity by IDs.

func (*ArtifactUpdateOne) AddOccurrenceIDs

func (auo *ArtifactUpdateOne) AddOccurrenceIDs(ids ...uuid.UUID) *ArtifactUpdateOne

AddOccurrenceIDs adds the "occurrences" edge to the Occurrence entity by IDs.

func (*ArtifactUpdateOne) AddOccurrences

func (auo *ArtifactUpdateOne) AddOccurrences(o ...*Occurrence) *ArtifactUpdateOne

AddOccurrences adds the "occurrences" edges to the Occurrence entity.

func (*ArtifactUpdateOne) AddPoc added in v0.6.0

AddPoc adds the "poc" edges to the PointOfContact entity.

func (*ArtifactUpdateOne) AddPocIDs added in v0.6.0

func (auo *ArtifactUpdateOne) AddPocIDs(ids ...uuid.UUID) *ArtifactUpdateOne

AddPocIDs adds the "poc" edge to the PointOfContact entity by IDs.

func (*ArtifactUpdateOne) AddSbom

AddSbom adds the "sbom" edges to the BillOfMaterials entity.

func (*ArtifactUpdateOne) AddSbomIDs

func (auo *ArtifactUpdateOne) AddSbomIDs(ids ...uuid.UUID) *ArtifactUpdateOne

AddSbomIDs adds the "sbom" edge to the BillOfMaterials entity by IDs.

func (*ArtifactUpdateOne) AddVex added in v0.6.0

func (auo *ArtifactUpdateOne) AddVex(c ...*CertifyVex) *ArtifactUpdateOne

AddVex adds the "vex" edges to the CertifyVex entity.

func (*ArtifactUpdateOne) AddVexIDs added in v0.6.0

func (auo *ArtifactUpdateOne) AddVexIDs(ids ...uuid.UUID) *ArtifactUpdateOne

AddVexIDs adds the "vex" edge to the CertifyVex entity by IDs.

func (*ArtifactUpdateOne) ClearAttestations

func (auo *ArtifactUpdateOne) ClearAttestations() *ArtifactUpdateOne

ClearAttestations clears all "attestations" edges to the SLSAAttestation entity.

func (*ArtifactUpdateOne) ClearAttestationsSubject added in v0.6.0

func (auo *ArtifactUpdateOne) ClearAttestationsSubject() *ArtifactUpdateOne

ClearAttestationsSubject clears all "attestations_subject" edges to the SLSAAttestation entity.

func (*ArtifactUpdateOne) ClearCertification added in v0.6.0

func (auo *ArtifactUpdateOne) ClearCertification() *ArtifactUpdateOne

ClearCertification clears all "certification" edges to the Certification entity.

func (*ArtifactUpdateOne) ClearHashEqualArtA added in v0.5.0

func (auo *ArtifactUpdateOne) ClearHashEqualArtA() *ArtifactUpdateOne

ClearHashEqualArtA clears all "hash_equal_art_a" edges to the HashEqual entity.

func (*ArtifactUpdateOne) ClearHashEqualArtB added in v0.5.0

func (auo *ArtifactUpdateOne) ClearHashEqualArtB() *ArtifactUpdateOne

ClearHashEqualArtB clears all "hash_equal_art_b" edges to the HashEqual entity.

func (*ArtifactUpdateOne) ClearIncludedInSboms added in v0.4.0

func (auo *ArtifactUpdateOne) ClearIncludedInSboms() *ArtifactUpdateOne

ClearIncludedInSboms clears all "included_in_sboms" edges to the BillOfMaterials entity.

func (*ArtifactUpdateOne) ClearMetadata added in v0.6.0

func (auo *ArtifactUpdateOne) ClearMetadata() *ArtifactUpdateOne

ClearMetadata clears all "metadata" edges to the HasMetadata entity.

func (*ArtifactUpdateOne) ClearOccurrences

func (auo *ArtifactUpdateOne) ClearOccurrences() *ArtifactUpdateOne

ClearOccurrences clears all "occurrences" edges to the Occurrence entity.

func (*ArtifactUpdateOne) ClearPoc added in v0.6.0

func (auo *ArtifactUpdateOne) ClearPoc() *ArtifactUpdateOne

ClearPoc clears all "poc" edges to the PointOfContact entity.

func (*ArtifactUpdateOne) ClearSbom

func (auo *ArtifactUpdateOne) ClearSbom() *ArtifactUpdateOne

ClearSbom clears all "sbom" edges to the BillOfMaterials entity.

func (*ArtifactUpdateOne) ClearVex added in v0.6.0

func (auo *ArtifactUpdateOne) ClearVex() *ArtifactUpdateOne

ClearVex clears all "vex" edges to the CertifyVex entity.

func (*ArtifactUpdateOne) Exec

func (auo *ArtifactUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*ArtifactUpdateOne) ExecX

func (auo *ArtifactUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ArtifactUpdateOne) Mutation

func (auo *ArtifactUpdateOne) Mutation() *ArtifactMutation

Mutation returns the ArtifactMutation object of the builder.

func (*ArtifactUpdateOne) RemoveAttestationIDs

func (auo *ArtifactUpdateOne) RemoveAttestationIDs(ids ...uuid.UUID) *ArtifactUpdateOne

RemoveAttestationIDs removes the "attestations" edge to SLSAAttestation entities by IDs.

func (*ArtifactUpdateOne) RemoveAttestations

func (auo *ArtifactUpdateOne) RemoveAttestations(s ...*SLSAAttestation) *ArtifactUpdateOne

RemoveAttestations removes "attestations" edges to SLSAAttestation entities.

func (*ArtifactUpdateOne) RemoveAttestationsSubject added in v0.6.0

func (auo *ArtifactUpdateOne) RemoveAttestationsSubject(s ...*SLSAAttestation) *ArtifactUpdateOne

RemoveAttestationsSubject removes "attestations_subject" edges to SLSAAttestation entities.

func (*ArtifactUpdateOne) RemoveAttestationsSubjectIDs added in v0.6.0

func (auo *ArtifactUpdateOne) RemoveAttestationsSubjectIDs(ids ...uuid.UUID) *ArtifactUpdateOne

RemoveAttestationsSubjectIDs removes the "attestations_subject" edge to SLSAAttestation entities by IDs.

func (*ArtifactUpdateOne) RemoveCertification added in v0.6.0

func (auo *ArtifactUpdateOne) RemoveCertification(c ...*Certification) *ArtifactUpdateOne

RemoveCertification removes "certification" edges to Certification entities.

func (*ArtifactUpdateOne) RemoveCertificationIDs added in v0.6.0

func (auo *ArtifactUpdateOne) RemoveCertificationIDs(ids ...uuid.UUID) *ArtifactUpdateOne

RemoveCertificationIDs removes the "certification" edge to Certification entities by IDs.

func (*ArtifactUpdateOne) RemoveHashEqualArtA added in v0.5.0

func (auo *ArtifactUpdateOne) RemoveHashEqualArtA(h ...*HashEqual) *ArtifactUpdateOne

RemoveHashEqualArtA removes "hash_equal_art_a" edges to HashEqual entities.

func (*ArtifactUpdateOne) RemoveHashEqualArtAIDs added in v0.5.0

func (auo *ArtifactUpdateOne) RemoveHashEqualArtAIDs(ids ...uuid.UUID) *ArtifactUpdateOne

RemoveHashEqualArtAIDs removes the "hash_equal_art_a" edge to HashEqual entities by IDs.

func (*ArtifactUpdateOne) RemoveHashEqualArtB added in v0.5.0

func (auo *ArtifactUpdateOne) RemoveHashEqualArtB(h ...*HashEqual) *ArtifactUpdateOne

RemoveHashEqualArtB removes "hash_equal_art_b" edges to HashEqual entities.

func (*ArtifactUpdateOne) RemoveHashEqualArtBIDs added in v0.5.0

func (auo *ArtifactUpdateOne) RemoveHashEqualArtBIDs(ids ...uuid.UUID) *ArtifactUpdateOne

RemoveHashEqualArtBIDs removes the "hash_equal_art_b" edge to HashEqual entities by IDs.

func (*ArtifactUpdateOne) RemoveIncludedInSbomIDs added in v0.4.0

func (auo *ArtifactUpdateOne) RemoveIncludedInSbomIDs(ids ...uuid.UUID) *ArtifactUpdateOne

RemoveIncludedInSbomIDs removes the "included_in_sboms" edge to BillOfMaterials entities by IDs.

func (*ArtifactUpdateOne) RemoveIncludedInSboms added in v0.4.0

func (auo *ArtifactUpdateOne) RemoveIncludedInSboms(b ...*BillOfMaterials) *ArtifactUpdateOne

RemoveIncludedInSboms removes "included_in_sboms" edges to BillOfMaterials entities.

func (*ArtifactUpdateOne) RemoveMetadata added in v0.6.0

func (auo *ArtifactUpdateOne) RemoveMetadata(h ...*HasMetadata) *ArtifactUpdateOne

RemoveMetadata removes "metadata" edges to HasMetadata entities.

func (*ArtifactUpdateOne) RemoveMetadatumIDs added in v0.6.0

func (auo *ArtifactUpdateOne) RemoveMetadatumIDs(ids ...uuid.UUID) *ArtifactUpdateOne

RemoveMetadatumIDs removes the "metadata" edge to HasMetadata entities by IDs.

func (*ArtifactUpdateOne) RemoveOccurrenceIDs

func (auo *ArtifactUpdateOne) RemoveOccurrenceIDs(ids ...uuid.UUID) *ArtifactUpdateOne

RemoveOccurrenceIDs removes the "occurrences" edge to Occurrence entities by IDs.

func (*ArtifactUpdateOne) RemoveOccurrences

func (auo *ArtifactUpdateOne) RemoveOccurrences(o ...*Occurrence) *ArtifactUpdateOne

RemoveOccurrences removes "occurrences" edges to Occurrence entities.

func (*ArtifactUpdateOne) RemovePoc added in v0.6.0

func (auo *ArtifactUpdateOne) RemovePoc(p ...*PointOfContact) *ArtifactUpdateOne

RemovePoc removes "poc" edges to PointOfContact entities.

func (*ArtifactUpdateOne) RemovePocIDs added in v0.6.0

func (auo *ArtifactUpdateOne) RemovePocIDs(ids ...uuid.UUID) *ArtifactUpdateOne

RemovePocIDs removes the "poc" edge to PointOfContact entities by IDs.

func (*ArtifactUpdateOne) RemoveSbom

func (auo *ArtifactUpdateOne) RemoveSbom(b ...*BillOfMaterials) *ArtifactUpdateOne

RemoveSbom removes "sbom" edges to BillOfMaterials entities.

func (*ArtifactUpdateOne) RemoveSbomIDs

func (auo *ArtifactUpdateOne) RemoveSbomIDs(ids ...uuid.UUID) *ArtifactUpdateOne

RemoveSbomIDs removes the "sbom" edge to BillOfMaterials entities by IDs.

func (*ArtifactUpdateOne) RemoveVex added in v0.6.0

func (auo *ArtifactUpdateOne) RemoveVex(c ...*CertifyVex) *ArtifactUpdateOne

RemoveVex removes "vex" edges to CertifyVex entities.

func (*ArtifactUpdateOne) RemoveVexIDs added in v0.6.0

func (auo *ArtifactUpdateOne) RemoveVexIDs(ids ...uuid.UUID) *ArtifactUpdateOne

RemoveVexIDs removes the "vex" edge to CertifyVex entities by IDs.

func (*ArtifactUpdateOne) Save

func (auo *ArtifactUpdateOne) Save(ctx context.Context) (*Artifact, error)

Save executes the query and returns the updated Artifact entity.

func (*ArtifactUpdateOne) SaveX

func (auo *ArtifactUpdateOne) SaveX(ctx context.Context) *Artifact

SaveX is like Save, but panics if an error occurs.

func (*ArtifactUpdateOne) Select

func (auo *ArtifactUpdateOne) Select(field string, fields ...string) *ArtifactUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*ArtifactUpdateOne) SetAlgorithm

func (auo *ArtifactUpdateOne) SetAlgorithm(s string) *ArtifactUpdateOne

SetAlgorithm sets the "algorithm" field.

func (*ArtifactUpdateOne) SetDigest

func (auo *ArtifactUpdateOne) SetDigest(s string) *ArtifactUpdateOne

SetDigest sets the "digest" field.

func (*ArtifactUpdateOne) SetNillableAlgorithm added in v0.4.0

func (auo *ArtifactUpdateOne) SetNillableAlgorithm(s *string) *ArtifactUpdateOne

SetNillableAlgorithm sets the "algorithm" field if the given value is not nil.

func (*ArtifactUpdateOne) SetNillableDigest added in v0.4.0

func (auo *ArtifactUpdateOne) SetNillableDigest(s *string) *ArtifactUpdateOne

SetNillableDigest sets the "digest" field if the given value is not nil.

func (*ArtifactUpdateOne) Where

Where appends a list predicates to the ArtifactUpdate builder.

type ArtifactUpsert

type ArtifactUpsert struct {
	*sql.UpdateSet
}

ArtifactUpsert is the "OnConflict" setter.

func (*ArtifactUpsert) SetAlgorithm

func (u *ArtifactUpsert) SetAlgorithm(v string) *ArtifactUpsert

SetAlgorithm sets the "algorithm" field.

func (*ArtifactUpsert) SetDigest

func (u *ArtifactUpsert) SetDigest(v string) *ArtifactUpsert

SetDigest sets the "digest" field.

func (*ArtifactUpsert) UpdateAlgorithm

func (u *ArtifactUpsert) UpdateAlgorithm() *ArtifactUpsert

UpdateAlgorithm sets the "algorithm" field to the value that was provided on create.

func (*ArtifactUpsert) UpdateDigest

func (u *ArtifactUpsert) UpdateDigest() *ArtifactUpsert

UpdateDigest sets the "digest" field to the value that was provided on create.

type ArtifactUpsertBulk

type ArtifactUpsertBulk struct {
	// contains filtered or unexported fields
}

ArtifactUpsertBulk is the builder for "upsert"-ing a bulk of Artifact nodes.

func (*ArtifactUpsertBulk) DoNothing

func (u *ArtifactUpsertBulk) DoNothing() *ArtifactUpsertBulk

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*ArtifactUpsertBulk) Exec

func (u *ArtifactUpsertBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*ArtifactUpsertBulk) ExecX

func (u *ArtifactUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ArtifactUpsertBulk) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Artifact.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*ArtifactUpsertBulk) SetAlgorithm

func (u *ArtifactUpsertBulk) SetAlgorithm(v string) *ArtifactUpsertBulk

SetAlgorithm sets the "algorithm" field.

func (*ArtifactUpsertBulk) SetDigest

func (u *ArtifactUpsertBulk) SetDigest(v string) *ArtifactUpsertBulk

SetDigest sets the "digest" field.

func (*ArtifactUpsertBulk) Update

func (u *ArtifactUpsertBulk) Update(set func(*ArtifactUpsert)) *ArtifactUpsertBulk

Update allows overriding fields `UPDATE` values. See the ArtifactCreateBulk.OnConflict documentation for more info.

func (*ArtifactUpsertBulk) UpdateAlgorithm

func (u *ArtifactUpsertBulk) UpdateAlgorithm() *ArtifactUpsertBulk

UpdateAlgorithm sets the "algorithm" field to the value that was provided on create.

func (*ArtifactUpsertBulk) UpdateDigest

func (u *ArtifactUpsertBulk) UpdateDigest() *ArtifactUpsertBulk

UpdateDigest sets the "digest" field to the value that was provided on create.

func (*ArtifactUpsertBulk) UpdateNewValues

func (u *ArtifactUpsertBulk) UpdateNewValues() *ArtifactUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.Artifact.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(artifact.FieldID)
		}),
	).
	Exec(ctx)

type ArtifactUpsertOne

type ArtifactUpsertOne struct {
	// contains filtered or unexported fields
}

ArtifactUpsertOne is the builder for "upsert"-ing

one Artifact node.

func (*ArtifactUpsertOne) DoNothing

func (u *ArtifactUpsertOne) DoNothing() *ArtifactUpsertOne

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*ArtifactUpsertOne) Exec

func (u *ArtifactUpsertOne) Exec(ctx context.Context) error

Exec executes the query.

func (*ArtifactUpsertOne) ExecX

func (u *ArtifactUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ArtifactUpsertOne) ID

func (u *ArtifactUpsertOne) ID(ctx context.Context) (id uuid.UUID, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*ArtifactUpsertOne) IDX

IDX is like ID, but panics if an error occurs.

func (*ArtifactUpsertOne) Ignore

func (u *ArtifactUpsertOne) Ignore() *ArtifactUpsertOne

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Artifact.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*ArtifactUpsertOne) SetAlgorithm

func (u *ArtifactUpsertOne) SetAlgorithm(v string) *ArtifactUpsertOne

SetAlgorithm sets the "algorithm" field.

func (*ArtifactUpsertOne) SetDigest

func (u *ArtifactUpsertOne) SetDigest(v string) *ArtifactUpsertOne

SetDigest sets the "digest" field.

func (*ArtifactUpsertOne) Update

func (u *ArtifactUpsertOne) Update(set func(*ArtifactUpsert)) *ArtifactUpsertOne

Update allows overriding fields `UPDATE` values. See the ArtifactCreate.OnConflict documentation for more info.

func (*ArtifactUpsertOne) UpdateAlgorithm

func (u *ArtifactUpsertOne) UpdateAlgorithm() *ArtifactUpsertOne

UpdateAlgorithm sets the "algorithm" field to the value that was provided on create.

func (*ArtifactUpsertOne) UpdateDigest

func (u *ArtifactUpsertOne) UpdateDigest() *ArtifactUpsertOne

UpdateDigest sets the "digest" field to the value that was provided on create.

func (*ArtifactUpsertOne) UpdateNewValues

func (u *ArtifactUpsertOne) UpdateNewValues() *ArtifactUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:

client.Artifact.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(artifact.FieldID)
		}),
	).
	Exec(ctx)

type Artifacts

type Artifacts []*Artifact

Artifacts is a parsable slice of Artifact.

type BillOfMaterials

type BillOfMaterials struct {

	// ID of the ent.
	ID uuid.UUID `json:"id,omitempty"`
	// PackageID holds the value of the "package_id" field.
	PackageID *uuid.UUID `json:"package_id,omitempty"`
	// ArtifactID holds the value of the "artifact_id" field.
	ArtifactID *uuid.UUID `json:"artifact_id,omitempty"`
	// SBOM's URI
	URI string `json:"uri,omitempty"`
	// Digest algorithm
	Algorithm string `json:"algorithm,omitempty"`
	// Digest holds the value of the "digest" field.
	Digest string `json:"digest,omitempty"`
	// DownloadLocation holds the value of the "download_location" field.
	DownloadLocation string `json:"download_location,omitempty"`
	// Origin holds the value of the "origin" field.
	Origin string `json:"origin,omitempty"`
	// GUAC collector for the document
	Collector string `json:"collector,omitempty"`
	// DocumentRef holds the value of the "document_ref" field.
	DocumentRef string `json:"document_ref,omitempty"`
	// KnownSince holds the value of the "known_since" field.
	KnownSince time.Time `json:"known_since,omitempty"`
	// An opaque hash of the included packages
	IncludedPackagesHash string `json:"included_packages_hash,omitempty"`
	// An opaque hash of the included artifacts
	IncludedArtifactsHash string `json:"included_artifacts_hash,omitempty"`
	// An opaque hash of the included dependencies
	IncludedDependenciesHash string `json:"included_dependencies_hash,omitempty"`
	// An opaque hash of the included occurrences
	IncludedOccurrencesHash string `json:"included_occurrences_hash,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the BillOfMaterialsQuery when eager-loading is set.
	Edges BillOfMaterialsEdges `json:"edges"`
	// contains filtered or unexported fields
}

BillOfMaterials is the model entity for the BillOfMaterials schema.

func (*BillOfMaterials) Artifact

func (bom *BillOfMaterials) Artifact(ctx context.Context) (*Artifact, error)

func (*BillOfMaterials) IncludedDependencies added in v0.4.0

func (bom *BillOfMaterials) IncludedDependencies(ctx context.Context) (result []*Dependency, err error)

func (*BillOfMaterials) IncludedOccurrences added in v0.4.0

func (bom *BillOfMaterials) IncludedOccurrences(ctx context.Context) (result []*Occurrence, err error)

func (*BillOfMaterials) IncludedSoftwareArtifacts added in v0.4.0

func (bom *BillOfMaterials) IncludedSoftwareArtifacts(ctx context.Context) (result []*Artifact, err error)

func (*BillOfMaterials) IncludedSoftwarePackages added in v0.4.0

func (bom *BillOfMaterials) IncludedSoftwarePackages(ctx context.Context) (result []*PackageVersion, err error)

func (*BillOfMaterials) IsNode

func (n *BillOfMaterials) IsNode()

IsNode implements the Node interface check for GQLGen.

func (*BillOfMaterials) NamedIncludedDependencies added in v0.4.0

func (bom *BillOfMaterials) NamedIncludedDependencies(name string) ([]*Dependency, error)

NamedIncludedDependencies returns the IncludedDependencies named value or an error if the edge was not loaded in eager-loading with this name.

func (*BillOfMaterials) NamedIncludedOccurrences added in v0.4.0

func (bom *BillOfMaterials) NamedIncludedOccurrences(name string) ([]*Occurrence, error)

NamedIncludedOccurrences returns the IncludedOccurrences named value or an error if the edge was not loaded in eager-loading with this name.

func (*BillOfMaterials) NamedIncludedSoftwareArtifacts added in v0.4.0

func (bom *BillOfMaterials) NamedIncludedSoftwareArtifacts(name string) ([]*Artifact, error)

NamedIncludedSoftwareArtifacts returns the IncludedSoftwareArtifacts named value or an error if the edge was not loaded in eager-loading with this name.

func (*BillOfMaterials) NamedIncludedSoftwarePackages added in v0.4.0

func (bom *BillOfMaterials) NamedIncludedSoftwarePackages(name string) ([]*PackageVersion, error)

NamedIncludedSoftwarePackages returns the IncludedSoftwarePackages named value or an error if the edge was not loaded in eager-loading with this name.

func (*BillOfMaterials) Package

func (bom *BillOfMaterials) Package(ctx context.Context) (*PackageVersion, error)

func (*BillOfMaterials) QueryArtifact

func (bom *BillOfMaterials) QueryArtifact() *ArtifactQuery

QueryArtifact queries the "artifact" edge of the BillOfMaterials entity.

func (*BillOfMaterials) QueryIncludedDependencies added in v0.4.0

func (bom *BillOfMaterials) QueryIncludedDependencies() *DependencyQuery

QueryIncludedDependencies queries the "included_dependencies" edge of the BillOfMaterials entity.

func (*BillOfMaterials) QueryIncludedOccurrences added in v0.4.0

func (bom *BillOfMaterials) QueryIncludedOccurrences() *OccurrenceQuery

QueryIncludedOccurrences queries the "included_occurrences" edge of the BillOfMaterials entity.

func (*BillOfMaterials) QueryIncludedSoftwareArtifacts added in v0.4.0

func (bom *BillOfMaterials) QueryIncludedSoftwareArtifacts() *ArtifactQuery

QueryIncludedSoftwareArtifacts queries the "included_software_artifacts" edge of the BillOfMaterials entity.

func (*BillOfMaterials) QueryIncludedSoftwarePackages added in v0.4.0

func (bom *BillOfMaterials) QueryIncludedSoftwarePackages() *PackageVersionQuery

QueryIncludedSoftwarePackages queries the "included_software_packages" edge of the BillOfMaterials entity.

func (*BillOfMaterials) QueryPackage

func (bom *BillOfMaterials) QueryPackage() *PackageVersionQuery

QueryPackage queries the "package" edge of the BillOfMaterials entity.

func (*BillOfMaterials) String

func (bom *BillOfMaterials) String() string

String implements the fmt.Stringer.

func (*BillOfMaterials) ToEdge

ToEdge converts BillOfMaterials into BillOfMaterialsEdge.

func (*BillOfMaterials) Unwrap

func (bom *BillOfMaterials) Unwrap() *BillOfMaterials

Unwrap unwraps the BillOfMaterials entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.

func (*BillOfMaterials) Update

Update returns a builder for updating this BillOfMaterials. Note that you need to call BillOfMaterials.Unwrap() before calling this method if this BillOfMaterials was returned from a transaction, and the transaction was committed or rolled back.

func (*BillOfMaterials) Value

func (bom *BillOfMaterials) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the BillOfMaterials. This includes values selected through modifiers, order, etc.

type BillOfMaterialsClient

type BillOfMaterialsClient struct {
	// contains filtered or unexported fields
}

BillOfMaterialsClient is a client for the BillOfMaterials schema.

func NewBillOfMaterialsClient

func NewBillOfMaterialsClient(c config) *BillOfMaterialsClient

NewBillOfMaterialsClient returns a client for the BillOfMaterials from the given config.

func (*BillOfMaterialsClient) Create

Create returns a builder for creating a BillOfMaterials entity.

func (*BillOfMaterialsClient) CreateBulk

CreateBulk returns a builder for creating a bulk of BillOfMaterials entities.

func (*BillOfMaterialsClient) Delete

Delete returns a delete builder for BillOfMaterials.

func (*BillOfMaterialsClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*BillOfMaterialsClient) DeleteOneID

DeleteOneID returns a builder for deleting the given entity by its id.

func (*BillOfMaterialsClient) Get

Get returns a BillOfMaterials entity by its id.

func (*BillOfMaterialsClient) GetX

GetX is like Get, but panics if an error occurs.

func (*BillOfMaterialsClient) Hooks

func (c *BillOfMaterialsClient) Hooks() []Hook

Hooks returns the client hooks.

func (*BillOfMaterialsClient) Intercept

func (c *BillOfMaterialsClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `billofmaterials.Intercept(f(g(h())))`.

func (*BillOfMaterialsClient) Interceptors

func (c *BillOfMaterialsClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*BillOfMaterialsClient) MapCreateBulk

func (c *BillOfMaterialsClient) MapCreateBulk(slice any, setFunc func(*BillOfMaterialsCreate, int)) *BillOfMaterialsCreateBulk

MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.

func (*BillOfMaterialsClient) Query

Query returns a query builder for BillOfMaterials.

func (*BillOfMaterialsClient) QueryArtifact

func (c *BillOfMaterialsClient) QueryArtifact(bom *BillOfMaterials) *ArtifactQuery

QueryArtifact queries the artifact edge of a BillOfMaterials.

func (*BillOfMaterialsClient) QueryIncludedDependencies added in v0.4.0

func (c *BillOfMaterialsClient) QueryIncludedDependencies(bom *BillOfMaterials) *DependencyQuery

QueryIncludedDependencies queries the included_dependencies edge of a BillOfMaterials.

func (*BillOfMaterialsClient) QueryIncludedOccurrences added in v0.4.0

func (c *BillOfMaterialsClient) QueryIncludedOccurrences(bom *BillOfMaterials) *OccurrenceQuery

QueryIncludedOccurrences queries the included_occurrences edge of a BillOfMaterials.

func (*BillOfMaterialsClient) QueryIncludedSoftwareArtifacts added in v0.4.0

func (c *BillOfMaterialsClient) QueryIncludedSoftwareArtifacts(bom *BillOfMaterials) *ArtifactQuery

QueryIncludedSoftwareArtifacts queries the included_software_artifacts edge of a BillOfMaterials.

func (*BillOfMaterialsClient) QueryIncludedSoftwarePackages added in v0.4.0

func (c *BillOfMaterialsClient) QueryIncludedSoftwarePackages(bom *BillOfMaterials) *PackageVersionQuery

QueryIncludedSoftwarePackages queries the included_software_packages edge of a BillOfMaterials.

func (*BillOfMaterialsClient) QueryPackage

QueryPackage queries the package edge of a BillOfMaterials.

func (*BillOfMaterialsClient) Update

Update returns an update builder for BillOfMaterials.

func (*BillOfMaterialsClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*BillOfMaterialsClient) UpdateOneID

UpdateOneID returns an update builder for the given id.

func (*BillOfMaterialsClient) Use

func (c *BillOfMaterialsClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `billofmaterials.Hooks(f(g(h())))`.

type BillOfMaterialsConnection

type BillOfMaterialsConnection struct {
	Edges      []*BillOfMaterialsEdge `json:"edges"`
	PageInfo   PageInfo               `json:"pageInfo"`
	TotalCount int                    `json:"totalCount"`
}

BillOfMaterialsConnection is the connection containing edges to BillOfMaterials.

type BillOfMaterialsCreate

type BillOfMaterialsCreate struct {
	// contains filtered or unexported fields
}

BillOfMaterialsCreate is the builder for creating a BillOfMaterials entity.

func (*BillOfMaterialsCreate) AddIncludedDependencies added in v0.4.0

func (bomc *BillOfMaterialsCreate) AddIncludedDependencies(d ...*Dependency) *BillOfMaterialsCreate

AddIncludedDependencies adds the "included_dependencies" edges to the Dependency entity.

func (*BillOfMaterialsCreate) AddIncludedDependencyIDs added in v0.4.0

func (bomc *BillOfMaterialsCreate) AddIncludedDependencyIDs(ids ...uuid.UUID) *BillOfMaterialsCreate

AddIncludedDependencyIDs adds the "included_dependencies" edge to the Dependency entity by IDs.

func (*BillOfMaterialsCreate) AddIncludedOccurrenceIDs added in v0.4.0

func (bomc *BillOfMaterialsCreate) AddIncludedOccurrenceIDs(ids ...uuid.UUID) *BillOfMaterialsCreate

AddIncludedOccurrenceIDs adds the "included_occurrences" edge to the Occurrence entity by IDs.

func (*BillOfMaterialsCreate) AddIncludedOccurrences added in v0.4.0

func (bomc *BillOfMaterialsCreate) AddIncludedOccurrences(o ...*Occurrence) *BillOfMaterialsCreate

AddIncludedOccurrences adds the "included_occurrences" edges to the Occurrence entity.

func (*BillOfMaterialsCreate) AddIncludedSoftwareArtifactIDs added in v0.4.0

func (bomc *BillOfMaterialsCreate) AddIncludedSoftwareArtifactIDs(ids ...uuid.UUID) *BillOfMaterialsCreate

AddIncludedSoftwareArtifactIDs adds the "included_software_artifacts" edge to the Artifact entity by IDs.

func (*BillOfMaterialsCreate) AddIncludedSoftwareArtifacts added in v0.4.0

func (bomc *BillOfMaterialsCreate) AddIncludedSoftwareArtifacts(a ...*Artifact) *BillOfMaterialsCreate

AddIncludedSoftwareArtifacts adds the "included_software_artifacts" edges to the Artifact entity.

func (*BillOfMaterialsCreate) AddIncludedSoftwarePackageIDs added in v0.4.0

func (bomc *BillOfMaterialsCreate) AddIncludedSoftwarePackageIDs(ids ...uuid.UUID) *BillOfMaterialsCreate

AddIncludedSoftwarePackageIDs adds the "included_software_packages" edge to the PackageVersion entity by IDs.

func (*BillOfMaterialsCreate) AddIncludedSoftwarePackages added in v0.4.0

func (bomc *BillOfMaterialsCreate) AddIncludedSoftwarePackages(p ...*PackageVersion) *BillOfMaterialsCreate

AddIncludedSoftwarePackages adds the "included_software_packages" edges to the PackageVersion entity.

func (*BillOfMaterialsCreate) Exec

func (bomc *BillOfMaterialsCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*BillOfMaterialsCreate) ExecX

func (bomc *BillOfMaterialsCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*BillOfMaterialsCreate) Mutation

Mutation returns the BillOfMaterialsMutation object of the builder.

func (*BillOfMaterialsCreate) OnConflict

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.BillOfMaterials.Create().
	SetPackageID(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.BillOfMaterialsUpsert) {
		SetPackageID(v+v).
	}).
	Exec(ctx)

func (*BillOfMaterialsCreate) OnConflictColumns

func (bomc *BillOfMaterialsCreate) OnConflictColumns(columns ...string) *BillOfMaterialsUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.BillOfMaterials.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*BillOfMaterialsCreate) Save

Save creates the BillOfMaterials in the database.

func (*BillOfMaterialsCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*BillOfMaterialsCreate) SetAlgorithm

func (bomc *BillOfMaterialsCreate) SetAlgorithm(s string) *BillOfMaterialsCreate

SetAlgorithm sets the "algorithm" field.

func (*BillOfMaterialsCreate) SetArtifact

func (bomc *BillOfMaterialsCreate) SetArtifact(a *Artifact) *BillOfMaterialsCreate

SetArtifact sets the "artifact" edge to the Artifact entity.

func (*BillOfMaterialsCreate) SetArtifactID

func (bomc *BillOfMaterialsCreate) SetArtifactID(u uuid.UUID) *BillOfMaterialsCreate

SetArtifactID sets the "artifact_id" field.

func (*BillOfMaterialsCreate) SetCollector

func (bomc *BillOfMaterialsCreate) SetCollector(s string) *BillOfMaterialsCreate

SetCollector sets the "collector" field.

func (*BillOfMaterialsCreate) SetDigest

SetDigest sets the "digest" field.

func (*BillOfMaterialsCreate) SetDocumentRef added in v0.6.0

func (bomc *BillOfMaterialsCreate) SetDocumentRef(s string) *BillOfMaterialsCreate

SetDocumentRef sets the "document_ref" field.

func (*BillOfMaterialsCreate) SetDownloadLocation

func (bomc *BillOfMaterialsCreate) SetDownloadLocation(s string) *BillOfMaterialsCreate

SetDownloadLocation sets the "download_location" field.

func (*BillOfMaterialsCreate) SetID added in v0.5.0

SetID sets the "id" field.

func (*BillOfMaterialsCreate) SetIncludedArtifactsHash added in v0.5.0

func (bomc *BillOfMaterialsCreate) SetIncludedArtifactsHash(s string) *BillOfMaterialsCreate

SetIncludedArtifactsHash sets the "included_artifacts_hash" field.

func (*BillOfMaterialsCreate) SetIncludedDependenciesHash added in v0.5.0

func (bomc *BillOfMaterialsCreate) SetIncludedDependenciesHash(s string) *BillOfMaterialsCreate

SetIncludedDependenciesHash sets the "included_dependencies_hash" field.

func (*BillOfMaterialsCreate) SetIncludedOccurrencesHash added in v0.5.0

func (bomc *BillOfMaterialsCreate) SetIncludedOccurrencesHash(s string) *BillOfMaterialsCreate

SetIncludedOccurrencesHash sets the "included_occurrences_hash" field.

func (*BillOfMaterialsCreate) SetIncludedPackagesHash added in v0.5.0

func (bomc *BillOfMaterialsCreate) SetIncludedPackagesHash(s string) *BillOfMaterialsCreate

SetIncludedPackagesHash sets the "included_packages_hash" field.

func (*BillOfMaterialsCreate) SetKnownSince added in v0.4.0

func (bomc *BillOfMaterialsCreate) SetKnownSince(t time.Time) *BillOfMaterialsCreate

SetKnownSince sets the "known_since" field.

func (*BillOfMaterialsCreate) SetNillableArtifactID

func (bomc *BillOfMaterialsCreate) SetNillableArtifactID(u *uuid.UUID) *BillOfMaterialsCreate

SetNillableArtifactID sets the "artifact_id" field if the given value is not nil.

func (*BillOfMaterialsCreate) SetNillableID added in v0.5.0

func (bomc *BillOfMaterialsCreate) SetNillableID(u *uuid.UUID) *BillOfMaterialsCreate

SetNillableID sets the "id" field if the given value is not nil.

func (*BillOfMaterialsCreate) SetNillablePackageID

func (bomc *BillOfMaterialsCreate) SetNillablePackageID(u *uuid.UUID) *BillOfMaterialsCreate

SetNillablePackageID sets the "package_id" field if the given value is not nil.

func (*BillOfMaterialsCreate) SetOrigin

SetOrigin sets the "origin" field.

func (*BillOfMaterialsCreate) SetPackage

SetPackage sets the "package" edge to the PackageVersion entity.

func (*BillOfMaterialsCreate) SetPackageID

func (bomc *BillOfMaterialsCreate) SetPackageID(u uuid.UUID) *BillOfMaterialsCreate

SetPackageID sets the "package_id" field.

func (*BillOfMaterialsCreate) SetURI

SetURI sets the "uri" field.

type BillOfMaterialsCreateBulk

type BillOfMaterialsCreateBulk struct {
	// contains filtered or unexported fields
}

BillOfMaterialsCreateBulk is the builder for creating many BillOfMaterials entities in bulk.

func (*BillOfMaterialsCreateBulk) Exec

Exec executes the query.

func (*BillOfMaterialsCreateBulk) ExecX

func (bomcb *BillOfMaterialsCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*BillOfMaterialsCreateBulk) OnConflict

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.BillOfMaterials.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.BillOfMaterialsUpsert) {
		SetPackageID(v+v).
	}).
	Exec(ctx)

func (*BillOfMaterialsCreateBulk) OnConflictColumns

func (bomcb *BillOfMaterialsCreateBulk) OnConflictColumns(columns ...string) *BillOfMaterialsUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.BillOfMaterials.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*BillOfMaterialsCreateBulk) Save

Save creates the BillOfMaterials entities in the database.

func (*BillOfMaterialsCreateBulk) SaveX

SaveX is like Save, but panics if an error occurs.

type BillOfMaterialsDelete

type BillOfMaterialsDelete struct {
	// contains filtered or unexported fields
}

BillOfMaterialsDelete is the builder for deleting a BillOfMaterials entity.

func (*BillOfMaterialsDelete) Exec

func (bomd *BillOfMaterialsDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*BillOfMaterialsDelete) ExecX

func (bomd *BillOfMaterialsDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*BillOfMaterialsDelete) Where

Where appends a list predicates to the BillOfMaterialsDelete builder.

type BillOfMaterialsDeleteOne

type BillOfMaterialsDeleteOne struct {
	// contains filtered or unexported fields
}

BillOfMaterialsDeleteOne is the builder for deleting a single BillOfMaterials entity.

func (*BillOfMaterialsDeleteOne) Exec

func (bomdo *BillOfMaterialsDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*BillOfMaterialsDeleteOne) ExecX

func (bomdo *BillOfMaterialsDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*BillOfMaterialsDeleteOne) Where

Where appends a list predicates to the BillOfMaterialsDelete builder.

type BillOfMaterialsEdge

type BillOfMaterialsEdge struct {
	Node   *BillOfMaterials `json:"node"`
	Cursor Cursor           `json:"cursor"`
}

BillOfMaterialsEdge is the edge representation of BillOfMaterials.

type BillOfMaterialsEdges

type BillOfMaterialsEdges struct {
	// Package holds the value of the package edge.
	Package *PackageVersion `json:"package,omitempty"`
	// Artifact holds the value of the artifact edge.
	Artifact *Artifact `json:"artifact,omitempty"`
	// IncludedSoftwarePackages holds the value of the included_software_packages edge.
	IncludedSoftwarePackages []*PackageVersion `json:"included_software_packages,omitempty"`
	// IncludedSoftwareArtifacts holds the value of the included_software_artifacts edge.
	IncludedSoftwareArtifacts []*Artifact `json:"included_software_artifacts,omitempty"`
	// IncludedDependencies holds the value of the included_dependencies edge.
	IncludedDependencies []*Dependency `json:"included_dependencies,omitempty"`
	// IncludedOccurrences holds the value of the included_occurrences edge.
	IncludedOccurrences []*Occurrence `json:"included_occurrences,omitempty"`
	// contains filtered or unexported fields
}

BillOfMaterialsEdges holds the relations/edges for other nodes in the graph.

func (BillOfMaterialsEdges) ArtifactOrErr

func (e BillOfMaterialsEdges) ArtifactOrErr() (*Artifact, error)

ArtifactOrErr returns the Artifact value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (BillOfMaterialsEdges) IncludedDependenciesOrErr added in v0.4.0

func (e BillOfMaterialsEdges) IncludedDependenciesOrErr() ([]*Dependency, error)

IncludedDependenciesOrErr returns the IncludedDependencies value or an error if the edge was not loaded in eager-loading.

func (BillOfMaterialsEdges) IncludedOccurrencesOrErr added in v0.4.0

func (e BillOfMaterialsEdges) IncludedOccurrencesOrErr() ([]*Occurrence, error)

IncludedOccurrencesOrErr returns the IncludedOccurrences value or an error if the edge was not loaded in eager-loading.

func (BillOfMaterialsEdges) IncludedSoftwareArtifactsOrErr added in v0.4.0

func (e BillOfMaterialsEdges) IncludedSoftwareArtifactsOrErr() ([]*Artifact, error)

IncludedSoftwareArtifactsOrErr returns the IncludedSoftwareArtifacts value or an error if the edge was not loaded in eager-loading.

func (BillOfMaterialsEdges) IncludedSoftwarePackagesOrErr added in v0.4.0

func (e BillOfMaterialsEdges) IncludedSoftwarePackagesOrErr() ([]*PackageVersion, error)

IncludedSoftwarePackagesOrErr returns the IncludedSoftwarePackages value or an error if the edge was not loaded in eager-loading.

func (BillOfMaterialsEdges) PackageOrErr

func (e BillOfMaterialsEdges) PackageOrErr() (*PackageVersion, error)

PackageOrErr returns the Package value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type BillOfMaterialsGroupBy

type BillOfMaterialsGroupBy struct {
	// contains filtered or unexported fields
}

BillOfMaterialsGroupBy is the group-by builder for BillOfMaterials entities.

func (*BillOfMaterialsGroupBy) Aggregate

Aggregate adds the given aggregation functions to the group-by query.

func (*BillOfMaterialsGroupBy) Bool

func (s *BillOfMaterialsGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*BillOfMaterialsGroupBy) BoolX

func (s *BillOfMaterialsGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*BillOfMaterialsGroupBy) Bools

func (s *BillOfMaterialsGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*BillOfMaterialsGroupBy) BoolsX

func (s *BillOfMaterialsGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*BillOfMaterialsGroupBy) Float64

func (s *BillOfMaterialsGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*BillOfMaterialsGroupBy) Float64X

func (s *BillOfMaterialsGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*BillOfMaterialsGroupBy) Float64s

func (s *BillOfMaterialsGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*BillOfMaterialsGroupBy) Float64sX

func (s *BillOfMaterialsGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*BillOfMaterialsGroupBy) Int

func (s *BillOfMaterialsGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*BillOfMaterialsGroupBy) IntX

func (s *BillOfMaterialsGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*BillOfMaterialsGroupBy) Ints

func (s *BillOfMaterialsGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*BillOfMaterialsGroupBy) IntsX

func (s *BillOfMaterialsGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*BillOfMaterialsGroupBy) Scan

func (bomgb *BillOfMaterialsGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*BillOfMaterialsGroupBy) ScanX

func (s *BillOfMaterialsGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*BillOfMaterialsGroupBy) String

func (s *BillOfMaterialsGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*BillOfMaterialsGroupBy) StringX

func (s *BillOfMaterialsGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*BillOfMaterialsGroupBy) Strings

func (s *BillOfMaterialsGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*BillOfMaterialsGroupBy) StringsX

func (s *BillOfMaterialsGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type BillOfMaterialsMutation

type BillOfMaterialsMutation struct {
	// contains filtered or unexported fields
}

BillOfMaterialsMutation represents an operation that mutates the BillOfMaterials nodes in the graph.

func (*BillOfMaterialsMutation) AddField

func (m *BillOfMaterialsMutation) AddField(name string, value ent.Value) error

AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*BillOfMaterialsMutation) AddIncludedDependencyIDs added in v0.4.0

func (m *BillOfMaterialsMutation) AddIncludedDependencyIDs(ids ...uuid.UUID)

AddIncludedDependencyIDs adds the "included_dependencies" edge to the Dependency entity by ids.

func (*BillOfMaterialsMutation) AddIncludedOccurrenceIDs added in v0.4.0

func (m *BillOfMaterialsMutation) AddIncludedOccurrenceIDs(ids ...uuid.UUID)

AddIncludedOccurrenceIDs adds the "included_occurrences" edge to the Occurrence entity by ids.

func (*BillOfMaterialsMutation) AddIncludedSoftwareArtifactIDs added in v0.4.0

func (m *BillOfMaterialsMutation) AddIncludedSoftwareArtifactIDs(ids ...uuid.UUID)

AddIncludedSoftwareArtifactIDs adds the "included_software_artifacts" edge to the Artifact entity by ids.

func (*BillOfMaterialsMutation) AddIncludedSoftwarePackageIDs added in v0.4.0

func (m *BillOfMaterialsMutation) AddIncludedSoftwarePackageIDs(ids ...uuid.UUID)

AddIncludedSoftwarePackageIDs adds the "included_software_packages" edge to the PackageVersion entity by ids.

func (*BillOfMaterialsMutation) AddedEdges

func (m *BillOfMaterialsMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*BillOfMaterialsMutation) AddedField

func (m *BillOfMaterialsMutation) AddedField(name string) (ent.Value, bool)

AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*BillOfMaterialsMutation) AddedFields

func (m *BillOfMaterialsMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*BillOfMaterialsMutation) AddedIDs

func (m *BillOfMaterialsMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*BillOfMaterialsMutation) Algorithm

func (m *BillOfMaterialsMutation) Algorithm() (r string, exists bool)

Algorithm returns the value of the "algorithm" field in the mutation.

func (*BillOfMaterialsMutation) ArtifactCleared

func (m *BillOfMaterialsMutation) ArtifactCleared() bool

ArtifactCleared reports if the "artifact" edge to the Artifact entity was cleared.

func (*BillOfMaterialsMutation) ArtifactID

func (m *BillOfMaterialsMutation) ArtifactID() (r uuid.UUID, exists bool)

ArtifactID returns the value of the "artifact_id" field in the mutation.

func (*BillOfMaterialsMutation) ArtifactIDCleared

func (m *BillOfMaterialsMutation) ArtifactIDCleared() bool

ArtifactIDCleared returns if the "artifact_id" field was cleared in this mutation.

func (*BillOfMaterialsMutation) ArtifactIDs

func (m *BillOfMaterialsMutation) ArtifactIDs() (ids []uuid.UUID)

ArtifactIDs returns the "artifact" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use ArtifactID instead. It exists only for internal usage by the builders.

func (*BillOfMaterialsMutation) ClearArtifact

func (m *BillOfMaterialsMutation) ClearArtifact()

ClearArtifact clears the "artifact" edge to the Artifact entity.

func (*BillOfMaterialsMutation) ClearArtifactID

func (m *BillOfMaterialsMutation) ClearArtifactID()

ClearArtifactID clears the value of the "artifact_id" field.

func (*BillOfMaterialsMutation) ClearEdge

func (m *BillOfMaterialsMutation) ClearEdge(name string) error

ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.

func (*BillOfMaterialsMutation) ClearField

func (m *BillOfMaterialsMutation) ClearField(name string) error

ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.

func (*BillOfMaterialsMutation) ClearIncludedDependencies added in v0.4.0

func (m *BillOfMaterialsMutation) ClearIncludedDependencies()

ClearIncludedDependencies clears the "included_dependencies" edge to the Dependency entity.

func (*BillOfMaterialsMutation) ClearIncludedOccurrences added in v0.4.0

func (m *BillOfMaterialsMutation) ClearIncludedOccurrences()

ClearIncludedOccurrences clears the "included_occurrences" edge to the Occurrence entity.

func (*BillOfMaterialsMutation) ClearIncludedSoftwareArtifacts added in v0.4.0

func (m *BillOfMaterialsMutation) ClearIncludedSoftwareArtifacts()

ClearIncludedSoftwareArtifacts clears the "included_software_artifacts" edge to the Artifact entity.

func (*BillOfMaterialsMutation) ClearIncludedSoftwarePackages added in v0.4.0

func (m *BillOfMaterialsMutation) ClearIncludedSoftwarePackages()

ClearIncludedSoftwarePackages clears the "included_software_packages" edge to the PackageVersion entity.

func (*BillOfMaterialsMutation) ClearPackage

func (m *BillOfMaterialsMutation) ClearPackage()

ClearPackage clears the "package" edge to the PackageVersion entity.

func (*BillOfMaterialsMutation) ClearPackageID

func (m *BillOfMaterialsMutation) ClearPackageID()

ClearPackageID clears the value of the "package_id" field.

func (*BillOfMaterialsMutation) ClearedEdges

func (m *BillOfMaterialsMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*BillOfMaterialsMutation) ClearedFields

func (m *BillOfMaterialsMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (BillOfMaterialsMutation) Client

func (m BillOfMaterialsMutation) Client() *Client

Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.

func (*BillOfMaterialsMutation) Collector

func (m *BillOfMaterialsMutation) Collector() (r string, exists bool)

Collector returns the value of the "collector" field in the mutation.

func (*BillOfMaterialsMutation) Digest

func (m *BillOfMaterialsMutation) Digest() (r string, exists bool)

Digest returns the value of the "digest" field in the mutation.

func (*BillOfMaterialsMutation) DocumentRef added in v0.6.0

func (m *BillOfMaterialsMutation) DocumentRef() (r string, exists bool)

DocumentRef returns the value of the "document_ref" field in the mutation.

func (*BillOfMaterialsMutation) DownloadLocation

func (m *BillOfMaterialsMutation) DownloadLocation() (r string, exists bool)

DownloadLocation returns the value of the "download_location" field in the mutation.

func (*BillOfMaterialsMutation) EdgeCleared

func (m *BillOfMaterialsMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*BillOfMaterialsMutation) Field

func (m *BillOfMaterialsMutation) Field(name string) (ent.Value, bool)

Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*BillOfMaterialsMutation) FieldCleared

func (m *BillOfMaterialsMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*BillOfMaterialsMutation) Fields

func (m *BillOfMaterialsMutation) Fields() []string

Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().

func (*BillOfMaterialsMutation) ID

func (m *BillOfMaterialsMutation) ID() (id uuid.UUID, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*BillOfMaterialsMutation) IDs

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*BillOfMaterialsMutation) IncludedArtifactsHash added in v0.5.0

func (m *BillOfMaterialsMutation) IncludedArtifactsHash() (r string, exists bool)

IncludedArtifactsHash returns the value of the "included_artifacts_hash" field in the mutation.

func (*BillOfMaterialsMutation) IncludedDependenciesCleared added in v0.4.0

func (m *BillOfMaterialsMutation) IncludedDependenciesCleared() bool

IncludedDependenciesCleared reports if the "included_dependencies" edge to the Dependency entity was cleared.

func (*BillOfMaterialsMutation) IncludedDependenciesHash added in v0.5.0

func (m *BillOfMaterialsMutation) IncludedDependenciesHash() (r string, exists bool)

IncludedDependenciesHash returns the value of the "included_dependencies_hash" field in the mutation.

func (*BillOfMaterialsMutation) IncludedDependenciesIDs added in v0.4.0

func (m *BillOfMaterialsMutation) IncludedDependenciesIDs() (ids []uuid.UUID)

IncludedDependenciesIDs returns the "included_dependencies" edge IDs in the mutation.

func (*BillOfMaterialsMutation) IncludedOccurrencesCleared added in v0.4.0

func (m *BillOfMaterialsMutation) IncludedOccurrencesCleared() bool

IncludedOccurrencesCleared reports if the "included_occurrences" edge to the Occurrence entity was cleared.

func (*BillOfMaterialsMutation) IncludedOccurrencesHash added in v0.5.0

func (m *BillOfMaterialsMutation) IncludedOccurrencesHash() (r string, exists bool)

IncludedOccurrencesHash returns the value of the "included_occurrences_hash" field in the mutation.

func (*BillOfMaterialsMutation) IncludedOccurrencesIDs added in v0.4.0

func (m *BillOfMaterialsMutation) IncludedOccurrencesIDs() (ids []uuid.UUID)

IncludedOccurrencesIDs returns the "included_occurrences" edge IDs in the mutation.

func (*BillOfMaterialsMutation) IncludedPackagesHash added in v0.5.0

func (m *BillOfMaterialsMutation) IncludedPackagesHash() (r string, exists bool)

IncludedPackagesHash returns the value of the "included_packages_hash" field in the mutation.

func (*BillOfMaterialsMutation) IncludedSoftwareArtifactsCleared added in v0.4.0

func (m *BillOfMaterialsMutation) IncludedSoftwareArtifactsCleared() bool

IncludedSoftwareArtifactsCleared reports if the "included_software_artifacts" edge to the Artifact entity was cleared.

func (*BillOfMaterialsMutation) IncludedSoftwareArtifactsIDs added in v0.4.0

func (m *BillOfMaterialsMutation) IncludedSoftwareArtifactsIDs() (ids []uuid.UUID)

IncludedSoftwareArtifactsIDs returns the "included_software_artifacts" edge IDs in the mutation.

func (*BillOfMaterialsMutation) IncludedSoftwarePackagesCleared added in v0.4.0

func (m *BillOfMaterialsMutation) IncludedSoftwarePackagesCleared() bool

IncludedSoftwarePackagesCleared reports if the "included_software_packages" edge to the PackageVersion entity was cleared.

func (*BillOfMaterialsMutation) IncludedSoftwarePackagesIDs added in v0.4.0

func (m *BillOfMaterialsMutation) IncludedSoftwarePackagesIDs() (ids []uuid.UUID)

IncludedSoftwarePackagesIDs returns the "included_software_packages" edge IDs in the mutation.

func (*BillOfMaterialsMutation) KnownSince added in v0.4.0

func (m *BillOfMaterialsMutation) KnownSince() (r time.Time, exists bool)

KnownSince returns the value of the "known_since" field in the mutation.

func (*BillOfMaterialsMutation) OldAlgorithm

func (m *BillOfMaterialsMutation) OldAlgorithm(ctx context.Context) (v string, err error)

OldAlgorithm returns the old "algorithm" field's value of the BillOfMaterials entity. If the BillOfMaterials object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*BillOfMaterialsMutation) OldArtifactID

func (m *BillOfMaterialsMutation) OldArtifactID(ctx context.Context) (v *uuid.UUID, err error)

OldArtifactID returns the old "artifact_id" field's value of the BillOfMaterials entity. If the BillOfMaterials object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*BillOfMaterialsMutation) OldCollector

func (m *BillOfMaterialsMutation) OldCollector(ctx context.Context) (v string, err error)

OldCollector returns the old "collector" field's value of the BillOfMaterials entity. If the BillOfMaterials object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*BillOfMaterialsMutation) OldDigest

func (m *BillOfMaterialsMutation) OldDigest(ctx context.Context) (v string, err error)

OldDigest returns the old "digest" field's value of the BillOfMaterials entity. If the BillOfMaterials object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*BillOfMaterialsMutation) OldDocumentRef added in v0.6.0

func (m *BillOfMaterialsMutation) OldDocumentRef(ctx context.Context) (v string, err error)

OldDocumentRef returns the old "document_ref" field's value of the BillOfMaterials entity. If the BillOfMaterials object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*BillOfMaterialsMutation) OldDownloadLocation

func (m *BillOfMaterialsMutation) OldDownloadLocation(ctx context.Context) (v string, err error)

OldDownloadLocation returns the old "download_location" field's value of the BillOfMaterials entity. If the BillOfMaterials object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*BillOfMaterialsMutation) OldField

func (m *BillOfMaterialsMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*BillOfMaterialsMutation) OldIncludedArtifactsHash added in v0.5.0

func (m *BillOfMaterialsMutation) OldIncludedArtifactsHash(ctx context.Context) (v string, err error)

OldIncludedArtifactsHash returns the old "included_artifacts_hash" field's value of the BillOfMaterials entity. If the BillOfMaterials object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*BillOfMaterialsMutation) OldIncludedDependenciesHash added in v0.5.0

func (m *BillOfMaterialsMutation) OldIncludedDependenciesHash(ctx context.Context) (v string, err error)

OldIncludedDependenciesHash returns the old "included_dependencies_hash" field's value of the BillOfMaterials entity. If the BillOfMaterials object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*BillOfMaterialsMutation) OldIncludedOccurrencesHash added in v0.5.0

func (m *BillOfMaterialsMutation) OldIncludedOccurrencesHash(ctx context.Context) (v string, err error)

OldIncludedOccurrencesHash returns the old "included_occurrences_hash" field's value of the BillOfMaterials entity. If the BillOfMaterials object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*BillOfMaterialsMutation) OldIncludedPackagesHash added in v0.5.0

func (m *BillOfMaterialsMutation) OldIncludedPackagesHash(ctx context.Context) (v string, err error)

OldIncludedPackagesHash returns the old "included_packages_hash" field's value of the BillOfMaterials entity. If the BillOfMaterials object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*BillOfMaterialsMutation) OldKnownSince added in v0.4.0

func (m *BillOfMaterialsMutation) OldKnownSince(ctx context.Context) (v time.Time, err error)

OldKnownSince returns the old "known_since" field's value of the BillOfMaterials entity. If the BillOfMaterials object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*BillOfMaterialsMutation) OldOrigin

func (m *BillOfMaterialsMutation) OldOrigin(ctx context.Context) (v string, err error)

OldOrigin returns the old "origin" field's value of the BillOfMaterials entity. If the BillOfMaterials object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*BillOfMaterialsMutation) OldPackageID

func (m *BillOfMaterialsMutation) OldPackageID(ctx context.Context) (v *uuid.UUID, err error)

OldPackageID returns the old "package_id" field's value of the BillOfMaterials entity. If the BillOfMaterials object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*BillOfMaterialsMutation) OldURI

func (m *BillOfMaterialsMutation) OldURI(ctx context.Context) (v string, err error)

OldURI returns the old "uri" field's value of the BillOfMaterials entity. If the BillOfMaterials object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*BillOfMaterialsMutation) Op

func (m *BillOfMaterialsMutation) Op() Op

Op returns the operation name.

func (*BillOfMaterialsMutation) Origin

func (m *BillOfMaterialsMutation) Origin() (r string, exists bool)

Origin returns the value of the "origin" field in the mutation.

func (*BillOfMaterialsMutation) PackageCleared

func (m *BillOfMaterialsMutation) PackageCleared() bool

PackageCleared reports if the "package" edge to the PackageVersion entity was cleared.

func (*BillOfMaterialsMutation) PackageID

func (m *BillOfMaterialsMutation) PackageID() (r uuid.UUID, exists bool)

PackageID returns the value of the "package_id" field in the mutation.

func (*BillOfMaterialsMutation) PackageIDCleared

func (m *BillOfMaterialsMutation) PackageIDCleared() bool

PackageIDCleared returns if the "package_id" field was cleared in this mutation.

func (*BillOfMaterialsMutation) PackageIDs

func (m *BillOfMaterialsMutation) PackageIDs() (ids []uuid.UUID)

PackageIDs returns the "package" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use PackageID instead. It exists only for internal usage by the builders.

func (*BillOfMaterialsMutation) RemoveIncludedDependencyIDs added in v0.4.0

func (m *BillOfMaterialsMutation) RemoveIncludedDependencyIDs(ids ...uuid.UUID)

RemoveIncludedDependencyIDs removes the "included_dependencies" edge to the Dependency entity by IDs.

func (*BillOfMaterialsMutation) RemoveIncludedOccurrenceIDs added in v0.4.0

func (m *BillOfMaterialsMutation) RemoveIncludedOccurrenceIDs(ids ...uuid.UUID)

RemoveIncludedOccurrenceIDs removes the "included_occurrences" edge to the Occurrence entity by IDs.

func (*BillOfMaterialsMutation) RemoveIncludedSoftwareArtifactIDs added in v0.4.0

func (m *BillOfMaterialsMutation) RemoveIncludedSoftwareArtifactIDs(ids ...uuid.UUID)

RemoveIncludedSoftwareArtifactIDs removes the "included_software_artifacts" edge to the Artifact entity by IDs.

func (*BillOfMaterialsMutation) RemoveIncludedSoftwarePackageIDs added in v0.4.0

func (m *BillOfMaterialsMutation) RemoveIncludedSoftwarePackageIDs(ids ...uuid.UUID)

RemoveIncludedSoftwarePackageIDs removes the "included_software_packages" edge to the PackageVersion entity by IDs.

func (*BillOfMaterialsMutation) RemovedEdges

func (m *BillOfMaterialsMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*BillOfMaterialsMutation) RemovedIDs

func (m *BillOfMaterialsMutation) RemovedIDs(name string) []ent.Value

RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.

func (*BillOfMaterialsMutation) RemovedIncludedDependenciesIDs added in v0.4.0

func (m *BillOfMaterialsMutation) RemovedIncludedDependenciesIDs() (ids []uuid.UUID)

RemovedIncludedDependencies returns the removed IDs of the "included_dependencies" edge to the Dependency entity.

func (*BillOfMaterialsMutation) RemovedIncludedOccurrencesIDs added in v0.4.0

func (m *BillOfMaterialsMutation) RemovedIncludedOccurrencesIDs() (ids []uuid.UUID)

RemovedIncludedOccurrences returns the removed IDs of the "included_occurrences" edge to the Occurrence entity.

func (*BillOfMaterialsMutation) RemovedIncludedSoftwareArtifactsIDs added in v0.4.0

func (m *BillOfMaterialsMutation) RemovedIncludedSoftwareArtifactsIDs() (ids []uuid.UUID)

RemovedIncludedSoftwareArtifacts returns the removed IDs of the "included_software_artifacts" edge to the Artifact entity.

func (*BillOfMaterialsMutation) RemovedIncludedSoftwarePackagesIDs added in v0.4.0

func (m *BillOfMaterialsMutation) RemovedIncludedSoftwarePackagesIDs() (ids []uuid.UUID)

RemovedIncludedSoftwarePackages returns the removed IDs of the "included_software_packages" edge to the PackageVersion entity.

func (*BillOfMaterialsMutation) ResetAlgorithm

func (m *BillOfMaterialsMutation) ResetAlgorithm()

ResetAlgorithm resets all changes to the "algorithm" field.

func (*BillOfMaterialsMutation) ResetArtifact

func (m *BillOfMaterialsMutation) ResetArtifact()

ResetArtifact resets all changes to the "artifact" edge.

func (*BillOfMaterialsMutation) ResetArtifactID

func (m *BillOfMaterialsMutation) ResetArtifactID()

ResetArtifactID resets all changes to the "artifact_id" field.

func (*BillOfMaterialsMutation) ResetCollector

func (m *BillOfMaterialsMutation) ResetCollector()

ResetCollector resets all changes to the "collector" field.

func (*BillOfMaterialsMutation) ResetDigest

func (m *BillOfMaterialsMutation) ResetDigest()

ResetDigest resets all changes to the "digest" field.

func (*BillOfMaterialsMutation) ResetDocumentRef added in v0.6.0

func (m *BillOfMaterialsMutation) ResetDocumentRef()

ResetDocumentRef resets all changes to the "document_ref" field.

func (*BillOfMaterialsMutation) ResetDownloadLocation

func (m *BillOfMaterialsMutation) ResetDownloadLocation()

ResetDownloadLocation resets all changes to the "download_location" field.

func (*BillOfMaterialsMutation) ResetEdge

func (m *BillOfMaterialsMutation) ResetEdge(name string) error

ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.

func (*BillOfMaterialsMutation) ResetField

func (m *BillOfMaterialsMutation) ResetField(name string) error

ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.

func (*BillOfMaterialsMutation) ResetIncludedArtifactsHash added in v0.5.0

func (m *BillOfMaterialsMutation) ResetIncludedArtifactsHash()

ResetIncludedArtifactsHash resets all changes to the "included_artifacts_hash" field.

func (*BillOfMaterialsMutation) ResetIncludedDependencies added in v0.4.0

func (m *BillOfMaterialsMutation) ResetIncludedDependencies()

ResetIncludedDependencies resets all changes to the "included_dependencies" edge.

func (*BillOfMaterialsMutation) ResetIncludedDependenciesHash added in v0.5.0

func (m *BillOfMaterialsMutation) ResetIncludedDependenciesHash()

ResetIncludedDependenciesHash resets all changes to the "included_dependencies_hash" field.

func (*BillOfMaterialsMutation) ResetIncludedOccurrences added in v0.4.0

func (m *BillOfMaterialsMutation) ResetIncludedOccurrences()

ResetIncludedOccurrences resets all changes to the "included_occurrences" edge.

func (*BillOfMaterialsMutation) ResetIncludedOccurrencesHash added in v0.5.0

func (m *BillOfMaterialsMutation) ResetIncludedOccurrencesHash()

ResetIncludedOccurrencesHash resets all changes to the "included_occurrences_hash" field.

func (*BillOfMaterialsMutation) ResetIncludedPackagesHash added in v0.5.0

func (m *BillOfMaterialsMutation) ResetIncludedPackagesHash()

ResetIncludedPackagesHash resets all changes to the "included_packages_hash" field.

func (*BillOfMaterialsMutation) ResetIncludedSoftwareArtifacts added in v0.4.0

func (m *BillOfMaterialsMutation) ResetIncludedSoftwareArtifacts()

ResetIncludedSoftwareArtifacts resets all changes to the "included_software_artifacts" edge.

func (*BillOfMaterialsMutation) ResetIncludedSoftwarePackages added in v0.4.0

func (m *BillOfMaterialsMutation) ResetIncludedSoftwarePackages()

ResetIncludedSoftwarePackages resets all changes to the "included_software_packages" edge.

func (*BillOfMaterialsMutation) ResetKnownSince added in v0.4.0

func (m *BillOfMaterialsMutation) ResetKnownSince()

ResetKnownSince resets all changes to the "known_since" field.

func (*BillOfMaterialsMutation) ResetOrigin

func (m *BillOfMaterialsMutation) ResetOrigin()

ResetOrigin resets all changes to the "origin" field.

func (*BillOfMaterialsMutation) ResetPackage

func (m *BillOfMaterialsMutation) ResetPackage()

ResetPackage resets all changes to the "package" edge.

func (*BillOfMaterialsMutation) ResetPackageID

func (m *BillOfMaterialsMutation) ResetPackageID()

ResetPackageID resets all changes to the "package_id" field.

func (*BillOfMaterialsMutation) ResetURI

func (m *BillOfMaterialsMutation) ResetURI()

ResetURI resets all changes to the "uri" field.

func (*BillOfMaterialsMutation) SetAlgorithm

func (m *BillOfMaterialsMutation) SetAlgorithm(s string)

SetAlgorithm sets the "algorithm" field.

func (*BillOfMaterialsMutation) SetArtifactID

func (m *BillOfMaterialsMutation) SetArtifactID(u uuid.UUID)

SetArtifactID sets the "artifact_id" field.

func (*BillOfMaterialsMutation) SetCollector

func (m *BillOfMaterialsMutation) SetCollector(s string)

SetCollector sets the "collector" field.

func (*BillOfMaterialsMutation) SetDigest

func (m *BillOfMaterialsMutation) SetDigest(s string)

SetDigest sets the "digest" field.

func (*BillOfMaterialsMutation) SetDocumentRef added in v0.6.0

func (m *BillOfMaterialsMutation) SetDocumentRef(s string)

SetDocumentRef sets the "document_ref" field.

func (*BillOfMaterialsMutation) SetDownloadLocation

func (m *BillOfMaterialsMutation) SetDownloadLocation(s string)

SetDownloadLocation sets the "download_location" field.

func (*BillOfMaterialsMutation) SetField

func (m *BillOfMaterialsMutation) SetField(name string, value ent.Value) error

SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*BillOfMaterialsMutation) SetID added in v0.5.0

func (m *BillOfMaterialsMutation) SetID(id uuid.UUID)

SetID sets the value of the id field. Note that this operation is only accepted on creation of BillOfMaterials entities.

func (*BillOfMaterialsMutation) SetIncludedArtifactsHash added in v0.5.0

func (m *BillOfMaterialsMutation) SetIncludedArtifactsHash(s string)

SetIncludedArtifactsHash sets the "included_artifacts_hash" field.

func (*BillOfMaterialsMutation) SetIncludedDependenciesHash added in v0.5.0

func (m *BillOfMaterialsMutation) SetIncludedDependenciesHash(s string)

SetIncludedDependenciesHash sets the "included_dependencies_hash" field.

func (*BillOfMaterialsMutation) SetIncludedOccurrencesHash added in v0.5.0

func (m *BillOfMaterialsMutation) SetIncludedOccurrencesHash(s string)

SetIncludedOccurrencesHash sets the "included_occurrences_hash" field.

func (*BillOfMaterialsMutation) SetIncludedPackagesHash added in v0.5.0

func (m *BillOfMaterialsMutation) SetIncludedPackagesHash(s string)

SetIncludedPackagesHash sets the "included_packages_hash" field.

func (*BillOfMaterialsMutation) SetKnownSince added in v0.4.0

func (m *BillOfMaterialsMutation) SetKnownSince(t time.Time)

SetKnownSince sets the "known_since" field.

func (*BillOfMaterialsMutation) SetOp

func (m *BillOfMaterialsMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*BillOfMaterialsMutation) SetOrigin

func (m *BillOfMaterialsMutation) SetOrigin(s string)

SetOrigin sets the "origin" field.

func (*BillOfMaterialsMutation) SetPackageID

func (m *BillOfMaterialsMutation) SetPackageID(u uuid.UUID)

SetPackageID sets the "package_id" field.

func (*BillOfMaterialsMutation) SetURI

func (m *BillOfMaterialsMutation) SetURI(s string)

SetURI sets the "uri" field.

func (BillOfMaterialsMutation) Tx

func (m BillOfMaterialsMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*BillOfMaterialsMutation) Type

func (m *BillOfMaterialsMutation) Type() string

Type returns the node type of this mutation (BillOfMaterials).

func (*BillOfMaterialsMutation) URI

func (m *BillOfMaterialsMutation) URI() (r string, exists bool)

URI returns the value of the "uri" field in the mutation.

func (*BillOfMaterialsMutation) Where

Where appends a list predicates to the BillOfMaterialsMutation builder.

func (*BillOfMaterialsMutation) WhereP

func (m *BillOfMaterialsMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the BillOfMaterialsMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type BillOfMaterialsOrder

type BillOfMaterialsOrder struct {
	Direction OrderDirection             `json:"direction"`
	Field     *BillOfMaterialsOrderField `json:"field"`
}

BillOfMaterialsOrder defines the ordering of BillOfMaterials.

type BillOfMaterialsOrderField

type BillOfMaterialsOrderField struct {
	// Value extracts the ordering value from the given BillOfMaterials.
	Value func(*BillOfMaterials) (ent.Value, error)
	// contains filtered or unexported fields
}

BillOfMaterialsOrderField defines the ordering field of BillOfMaterials.

type BillOfMaterialsPaginateOption

type BillOfMaterialsPaginateOption func(*billofmaterialsPager) error

BillOfMaterialsPaginateOption enables pagination customization.

func WithBillOfMaterialsFilter

func WithBillOfMaterialsFilter(filter func(*BillOfMaterialsQuery) (*BillOfMaterialsQuery, error)) BillOfMaterialsPaginateOption

WithBillOfMaterialsFilter configures pagination filter.

func WithBillOfMaterialsOrder

func WithBillOfMaterialsOrder(order *BillOfMaterialsOrder) BillOfMaterialsPaginateOption

WithBillOfMaterialsOrder configures pagination ordering.

type BillOfMaterialsQuery

type BillOfMaterialsQuery struct {
	// contains filtered or unexported fields
}

BillOfMaterialsQuery is the builder for querying BillOfMaterials entities.

func (*BillOfMaterialsQuery) Aggregate

func (bomq *BillOfMaterialsQuery) Aggregate(fns ...AggregateFunc) *BillOfMaterialsSelect

Aggregate returns a BillOfMaterialsSelect configured with the given aggregations.

func (*BillOfMaterialsQuery) All

All executes the query and returns a list of BillOfMaterialsSlice.

func (*BillOfMaterialsQuery) AllX

AllX is like All, but panics if an error occurs.

func (*BillOfMaterialsQuery) Clone

Clone returns a duplicate of the BillOfMaterialsQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*BillOfMaterialsQuery) CollectFields

func (bom *BillOfMaterialsQuery) CollectFields(ctx context.Context, satisfies ...string) (*BillOfMaterialsQuery, error)

CollectFields tells the query-builder to eagerly load connected nodes by resolver context.

func (*BillOfMaterialsQuery) Count

func (bomq *BillOfMaterialsQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*BillOfMaterialsQuery) CountX

func (bomq *BillOfMaterialsQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*BillOfMaterialsQuery) Exist

func (bomq *BillOfMaterialsQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*BillOfMaterialsQuery) ExistX

func (bomq *BillOfMaterialsQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*BillOfMaterialsQuery) First

First returns the first BillOfMaterials entity from the query. Returns a *NotFoundError when no BillOfMaterials was found.

func (*BillOfMaterialsQuery) FirstID

func (bomq *BillOfMaterialsQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)

FirstID returns the first BillOfMaterials ID from the query. Returns a *NotFoundError when no BillOfMaterials ID was found.

func (*BillOfMaterialsQuery) FirstIDX

func (bomq *BillOfMaterialsQuery) FirstIDX(ctx context.Context) uuid.UUID

FirstIDX is like FirstID, but panics if an error occurs.

func (*BillOfMaterialsQuery) FirstX

FirstX is like First, but panics if an error occurs.

func (*BillOfMaterialsQuery) GroupBy

func (bomq *BillOfMaterialsQuery) GroupBy(field string, fields ...string) *BillOfMaterialsGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	PackageID uuid.UUID `json:"package_id,omitempty"`
	Count int `json:"count,omitempty"`
}

client.BillOfMaterials.Query().
	GroupBy(billofmaterials.FieldPackageID).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*BillOfMaterialsQuery) IDs

func (bomq *BillOfMaterialsQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)

IDs executes the query and returns a list of BillOfMaterials IDs.

func (*BillOfMaterialsQuery) IDsX

func (bomq *BillOfMaterialsQuery) IDsX(ctx context.Context) []uuid.UUID

IDsX is like IDs, but panics if an error occurs.

func (*BillOfMaterialsQuery) Limit

func (bomq *BillOfMaterialsQuery) Limit(limit int) *BillOfMaterialsQuery

Limit the number of records to be returned by this query.

func (*BillOfMaterialsQuery) Offset

func (bomq *BillOfMaterialsQuery) Offset(offset int) *BillOfMaterialsQuery

Offset to start from.

func (*BillOfMaterialsQuery) Only

Only returns a single BillOfMaterials entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one BillOfMaterials entity is found. Returns a *NotFoundError when no BillOfMaterials entities are found.

func (*BillOfMaterialsQuery) OnlyID

func (bomq *BillOfMaterialsQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)

OnlyID is like Only, but returns the only BillOfMaterials ID in the query. Returns a *NotSingularError when more than one BillOfMaterials ID is found. Returns a *NotFoundError when no entities are found.

func (*BillOfMaterialsQuery) OnlyIDX

func (bomq *BillOfMaterialsQuery) OnlyIDX(ctx context.Context) uuid.UUID

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*BillOfMaterialsQuery) OnlyX

OnlyX is like Only, but panics if an error occurs.

func (*BillOfMaterialsQuery) Order

Order specifies how the records should be ordered.

func (*BillOfMaterialsQuery) Paginate

func (bom *BillOfMaterialsQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...BillOfMaterialsPaginateOption,
) (*BillOfMaterialsConnection, error)

Paginate executes the query and returns a relay based cursor connection to BillOfMaterials.

func (*BillOfMaterialsQuery) QueryArtifact

func (bomq *BillOfMaterialsQuery) QueryArtifact() *ArtifactQuery

QueryArtifact chains the current query on the "artifact" edge.

func (*BillOfMaterialsQuery) QueryIncludedDependencies added in v0.4.0

func (bomq *BillOfMaterialsQuery) QueryIncludedDependencies() *DependencyQuery

QueryIncludedDependencies chains the current query on the "included_dependencies" edge.

func (*BillOfMaterialsQuery) QueryIncludedOccurrences added in v0.4.0

func (bomq *BillOfMaterialsQuery) QueryIncludedOccurrences() *OccurrenceQuery

QueryIncludedOccurrences chains the current query on the "included_occurrences" edge.

func (*BillOfMaterialsQuery) QueryIncludedSoftwareArtifacts added in v0.4.0

func (bomq *BillOfMaterialsQuery) QueryIncludedSoftwareArtifacts() *ArtifactQuery

QueryIncludedSoftwareArtifacts chains the current query on the "included_software_artifacts" edge.

func (*BillOfMaterialsQuery) QueryIncludedSoftwarePackages added in v0.4.0

func (bomq *BillOfMaterialsQuery) QueryIncludedSoftwarePackages() *PackageVersionQuery

QueryIncludedSoftwarePackages chains the current query on the "included_software_packages" edge.

func (*BillOfMaterialsQuery) QueryPackage

func (bomq *BillOfMaterialsQuery) QueryPackage() *PackageVersionQuery

QueryPackage chains the current query on the "package" edge.

func (*BillOfMaterialsQuery) Select

func (bomq *BillOfMaterialsQuery) Select(fields ...string) *BillOfMaterialsSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	PackageID uuid.UUID `json:"package_id,omitempty"`
}

client.BillOfMaterials.Query().
	Select(billofmaterials.FieldPackageID).
	Scan(ctx, &v)

func (*BillOfMaterialsQuery) Unique

func (bomq *BillOfMaterialsQuery) Unique(unique bool) *BillOfMaterialsQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*BillOfMaterialsQuery) Where

Where adds a new predicate for the BillOfMaterialsQuery builder.

func (*BillOfMaterialsQuery) WithArtifact

func (bomq *BillOfMaterialsQuery) WithArtifact(opts ...func(*ArtifactQuery)) *BillOfMaterialsQuery

WithArtifact tells the query-builder to eager-load the nodes that are connected to the "artifact" edge. The optional arguments are used to configure the query builder of the edge.

func (*BillOfMaterialsQuery) WithIncludedDependencies added in v0.4.0

func (bomq *BillOfMaterialsQuery) WithIncludedDependencies(opts ...func(*DependencyQuery)) *BillOfMaterialsQuery

WithIncludedDependencies tells the query-builder to eager-load the nodes that are connected to the "included_dependencies" edge. The optional arguments are used to configure the query builder of the edge.

func (*BillOfMaterialsQuery) WithIncludedOccurrences added in v0.4.0

func (bomq *BillOfMaterialsQuery) WithIncludedOccurrences(opts ...func(*OccurrenceQuery)) *BillOfMaterialsQuery

WithIncludedOccurrences tells the query-builder to eager-load the nodes that are connected to the "included_occurrences" edge. The optional arguments are used to configure the query builder of the edge.

func (*BillOfMaterialsQuery) WithIncludedSoftwareArtifacts added in v0.4.0

func (bomq *BillOfMaterialsQuery) WithIncludedSoftwareArtifacts(opts ...func(*ArtifactQuery)) *BillOfMaterialsQuery

WithIncludedSoftwareArtifacts tells the query-builder to eager-load the nodes that are connected to the "included_software_artifacts" edge. The optional arguments are used to configure the query builder of the edge.

func (*BillOfMaterialsQuery) WithIncludedSoftwarePackages added in v0.4.0

func (bomq *BillOfMaterialsQuery) WithIncludedSoftwarePackages(opts ...func(*PackageVersionQuery)) *BillOfMaterialsQuery

WithIncludedSoftwarePackages tells the query-builder to eager-load the nodes that are connected to the "included_software_packages" edge. The optional arguments are used to configure the query builder of the edge.

func (*BillOfMaterialsQuery) WithNamedIncludedDependencies added in v0.4.0

func (bomq *BillOfMaterialsQuery) WithNamedIncludedDependencies(name string, opts ...func(*DependencyQuery)) *BillOfMaterialsQuery

WithNamedIncludedDependencies tells the query-builder to eager-load the nodes that are connected to the "included_dependencies" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*BillOfMaterialsQuery) WithNamedIncludedOccurrences added in v0.4.0

func (bomq *BillOfMaterialsQuery) WithNamedIncludedOccurrences(name string, opts ...func(*OccurrenceQuery)) *BillOfMaterialsQuery

WithNamedIncludedOccurrences tells the query-builder to eager-load the nodes that are connected to the "included_occurrences" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*BillOfMaterialsQuery) WithNamedIncludedSoftwareArtifacts added in v0.4.0

func (bomq *BillOfMaterialsQuery) WithNamedIncludedSoftwareArtifacts(name string, opts ...func(*ArtifactQuery)) *BillOfMaterialsQuery

WithNamedIncludedSoftwareArtifacts tells the query-builder to eager-load the nodes that are connected to the "included_software_artifacts" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*BillOfMaterialsQuery) WithNamedIncludedSoftwarePackages added in v0.4.0

func (bomq *BillOfMaterialsQuery) WithNamedIncludedSoftwarePackages(name string, opts ...func(*PackageVersionQuery)) *BillOfMaterialsQuery

WithNamedIncludedSoftwarePackages tells the query-builder to eager-load the nodes that are connected to the "included_software_packages" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*BillOfMaterialsQuery) WithPackage

func (bomq *BillOfMaterialsQuery) WithPackage(opts ...func(*PackageVersionQuery)) *BillOfMaterialsQuery

WithPackage tells the query-builder to eager-load the nodes that are connected to the "package" edge. The optional arguments are used to configure the query builder of the edge.

type BillOfMaterialsSelect

type BillOfMaterialsSelect struct {
	*BillOfMaterialsQuery
	// contains filtered or unexported fields
}

BillOfMaterialsSelect is the builder for selecting fields of BillOfMaterials entities.

func (*BillOfMaterialsSelect) Aggregate

Aggregate adds the given aggregation functions to the selector query.

func (*BillOfMaterialsSelect) Bool

func (s *BillOfMaterialsSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*BillOfMaterialsSelect) BoolX

func (s *BillOfMaterialsSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*BillOfMaterialsSelect) Bools

func (s *BillOfMaterialsSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*BillOfMaterialsSelect) BoolsX

func (s *BillOfMaterialsSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*BillOfMaterialsSelect) Float64

func (s *BillOfMaterialsSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*BillOfMaterialsSelect) Float64X

func (s *BillOfMaterialsSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*BillOfMaterialsSelect) Float64s

func (s *BillOfMaterialsSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*BillOfMaterialsSelect) Float64sX

func (s *BillOfMaterialsSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*BillOfMaterialsSelect) Int

func (s *BillOfMaterialsSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*BillOfMaterialsSelect) IntX

func (s *BillOfMaterialsSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*BillOfMaterialsSelect) Ints

func (s *BillOfMaterialsSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*BillOfMaterialsSelect) IntsX

func (s *BillOfMaterialsSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*BillOfMaterialsSelect) Scan

func (boms *BillOfMaterialsSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*BillOfMaterialsSelect) ScanX

func (s *BillOfMaterialsSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*BillOfMaterialsSelect) String

func (s *BillOfMaterialsSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*BillOfMaterialsSelect) StringX

func (s *BillOfMaterialsSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*BillOfMaterialsSelect) Strings

func (s *BillOfMaterialsSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*BillOfMaterialsSelect) StringsX

func (s *BillOfMaterialsSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type BillOfMaterialsSlice

type BillOfMaterialsSlice []*BillOfMaterials

BillOfMaterialsSlice is a parsable slice of BillOfMaterials.

type BillOfMaterialsUpdate

type BillOfMaterialsUpdate struct {
	// contains filtered or unexported fields
}

BillOfMaterialsUpdate is the builder for updating BillOfMaterials entities.

func (*BillOfMaterialsUpdate) AddIncludedDependencies added in v0.4.0

func (bomu *BillOfMaterialsUpdate) AddIncludedDependencies(d ...*Dependency) *BillOfMaterialsUpdate

AddIncludedDependencies adds the "included_dependencies" edges to the Dependency entity.

func (*BillOfMaterialsUpdate) AddIncludedDependencyIDs added in v0.4.0

func (bomu *BillOfMaterialsUpdate) AddIncludedDependencyIDs(ids ...uuid.UUID) *BillOfMaterialsUpdate

AddIncludedDependencyIDs adds the "included_dependencies" edge to the Dependency entity by IDs.

func (*BillOfMaterialsUpdate) AddIncludedOccurrenceIDs added in v0.4.0

func (bomu *BillOfMaterialsUpdate) AddIncludedOccurrenceIDs(ids ...uuid.UUID) *BillOfMaterialsUpdate

AddIncludedOccurrenceIDs adds the "included_occurrences" edge to the Occurrence entity by IDs.

func (*BillOfMaterialsUpdate) AddIncludedOccurrences added in v0.4.0

func (bomu *BillOfMaterialsUpdate) AddIncludedOccurrences(o ...*Occurrence) *BillOfMaterialsUpdate

AddIncludedOccurrences adds the "included_occurrences" edges to the Occurrence entity.

func (*BillOfMaterialsUpdate) AddIncludedSoftwareArtifactIDs added in v0.4.0

func (bomu *BillOfMaterialsUpdate) AddIncludedSoftwareArtifactIDs(ids ...uuid.UUID) *BillOfMaterialsUpdate

AddIncludedSoftwareArtifactIDs adds the "included_software_artifacts" edge to the Artifact entity by IDs.

func (*BillOfMaterialsUpdate) AddIncludedSoftwareArtifacts added in v0.4.0

func (bomu *BillOfMaterialsUpdate) AddIncludedSoftwareArtifacts(a ...*Artifact) *BillOfMaterialsUpdate

AddIncludedSoftwareArtifacts adds the "included_software_artifacts" edges to the Artifact entity.

func (*BillOfMaterialsUpdate) AddIncludedSoftwarePackageIDs added in v0.4.0

func (bomu *BillOfMaterialsUpdate) AddIncludedSoftwarePackageIDs(ids ...uuid.UUID) *BillOfMaterialsUpdate

AddIncludedSoftwarePackageIDs adds the "included_software_packages" edge to the PackageVersion entity by IDs.

func (*BillOfMaterialsUpdate) AddIncludedSoftwarePackages added in v0.4.0

func (bomu *BillOfMaterialsUpdate) AddIncludedSoftwarePackages(p ...*PackageVersion) *BillOfMaterialsUpdate

AddIncludedSoftwarePackages adds the "included_software_packages" edges to the PackageVersion entity.

func (*BillOfMaterialsUpdate) ClearArtifact

func (bomu *BillOfMaterialsUpdate) ClearArtifact() *BillOfMaterialsUpdate

ClearArtifact clears the "artifact" edge to the Artifact entity.

func (*BillOfMaterialsUpdate) ClearArtifactID

func (bomu *BillOfMaterialsUpdate) ClearArtifactID() *BillOfMaterialsUpdate

ClearArtifactID clears the value of the "artifact_id" field.

func (*BillOfMaterialsUpdate) ClearIncludedDependencies added in v0.4.0

func (bomu *BillOfMaterialsUpdate) ClearIncludedDependencies() *BillOfMaterialsUpdate

ClearIncludedDependencies clears all "included_dependencies" edges to the Dependency entity.

func (*BillOfMaterialsUpdate) ClearIncludedOccurrences added in v0.4.0

func (bomu *BillOfMaterialsUpdate) ClearIncludedOccurrences() *BillOfMaterialsUpdate

ClearIncludedOccurrences clears all "included_occurrences" edges to the Occurrence entity.

func (*BillOfMaterialsUpdate) ClearIncludedSoftwareArtifacts added in v0.4.0

func (bomu *BillOfMaterialsUpdate) ClearIncludedSoftwareArtifacts() *BillOfMaterialsUpdate

ClearIncludedSoftwareArtifacts clears all "included_software_artifacts" edges to the Artifact entity.

func (*BillOfMaterialsUpdate) ClearIncludedSoftwarePackages added in v0.4.0

func (bomu *BillOfMaterialsUpdate) ClearIncludedSoftwarePackages() *BillOfMaterialsUpdate

ClearIncludedSoftwarePackages clears all "included_software_packages" edges to the PackageVersion entity.

func (*BillOfMaterialsUpdate) ClearPackage

func (bomu *BillOfMaterialsUpdate) ClearPackage() *BillOfMaterialsUpdate

ClearPackage clears the "package" edge to the PackageVersion entity.

func (*BillOfMaterialsUpdate) ClearPackageID

func (bomu *BillOfMaterialsUpdate) ClearPackageID() *BillOfMaterialsUpdate

ClearPackageID clears the value of the "package_id" field.

func (*BillOfMaterialsUpdate) Exec

func (bomu *BillOfMaterialsUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*BillOfMaterialsUpdate) ExecX

func (bomu *BillOfMaterialsUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*BillOfMaterialsUpdate) Mutation

Mutation returns the BillOfMaterialsMutation object of the builder.

func (*BillOfMaterialsUpdate) RemoveIncludedDependencies added in v0.4.0

func (bomu *BillOfMaterialsUpdate) RemoveIncludedDependencies(d ...*Dependency) *BillOfMaterialsUpdate

RemoveIncludedDependencies removes "included_dependencies" edges to Dependency entities.

func (*BillOfMaterialsUpdate) RemoveIncludedDependencyIDs added in v0.4.0

func (bomu *BillOfMaterialsUpdate) RemoveIncludedDependencyIDs(ids ...uuid.UUID) *BillOfMaterialsUpdate

RemoveIncludedDependencyIDs removes the "included_dependencies" edge to Dependency entities by IDs.

func (*BillOfMaterialsUpdate) RemoveIncludedOccurrenceIDs added in v0.4.0

func (bomu *BillOfMaterialsUpdate) RemoveIncludedOccurrenceIDs(ids ...uuid.UUID) *BillOfMaterialsUpdate

RemoveIncludedOccurrenceIDs removes the "included_occurrences" edge to Occurrence entities by IDs.

func (*BillOfMaterialsUpdate) RemoveIncludedOccurrences added in v0.4.0

func (bomu *BillOfMaterialsUpdate) RemoveIncludedOccurrences(o ...*Occurrence) *BillOfMaterialsUpdate

RemoveIncludedOccurrences removes "included_occurrences" edges to Occurrence entities.

func (*BillOfMaterialsUpdate) RemoveIncludedSoftwareArtifactIDs added in v0.4.0

func (bomu *BillOfMaterialsUpdate) RemoveIncludedSoftwareArtifactIDs(ids ...uuid.UUID) *BillOfMaterialsUpdate

RemoveIncludedSoftwareArtifactIDs removes the "included_software_artifacts" edge to Artifact entities by IDs.

func (*BillOfMaterialsUpdate) RemoveIncludedSoftwareArtifacts added in v0.4.0

func (bomu *BillOfMaterialsUpdate) RemoveIncludedSoftwareArtifacts(a ...*Artifact) *BillOfMaterialsUpdate

RemoveIncludedSoftwareArtifacts removes "included_software_artifacts" edges to Artifact entities.

func (*BillOfMaterialsUpdate) RemoveIncludedSoftwarePackageIDs added in v0.4.0

func (bomu *BillOfMaterialsUpdate) RemoveIncludedSoftwarePackageIDs(ids ...uuid.UUID) *BillOfMaterialsUpdate

RemoveIncludedSoftwarePackageIDs removes the "included_software_packages" edge to PackageVersion entities by IDs.

func (*BillOfMaterialsUpdate) RemoveIncludedSoftwarePackages added in v0.4.0

func (bomu *BillOfMaterialsUpdate) RemoveIncludedSoftwarePackages(p ...*PackageVersion) *BillOfMaterialsUpdate

RemoveIncludedSoftwarePackages removes "included_software_packages" edges to PackageVersion entities.

func (*BillOfMaterialsUpdate) Save

func (bomu *BillOfMaterialsUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*BillOfMaterialsUpdate) SaveX

func (bomu *BillOfMaterialsUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*BillOfMaterialsUpdate) SetAlgorithm

func (bomu *BillOfMaterialsUpdate) SetAlgorithm(s string) *BillOfMaterialsUpdate

SetAlgorithm sets the "algorithm" field.

func (*BillOfMaterialsUpdate) SetArtifact

func (bomu *BillOfMaterialsUpdate) SetArtifact(a *Artifact) *BillOfMaterialsUpdate

SetArtifact sets the "artifact" edge to the Artifact entity.

func (*BillOfMaterialsUpdate) SetArtifactID

func (bomu *BillOfMaterialsUpdate) SetArtifactID(u uuid.UUID) *BillOfMaterialsUpdate

SetArtifactID sets the "artifact_id" field.

func (*BillOfMaterialsUpdate) SetCollector

func (bomu *BillOfMaterialsUpdate) SetCollector(s string) *BillOfMaterialsUpdate

SetCollector sets the "collector" field.

func (*BillOfMaterialsUpdate) SetDigest

SetDigest sets the "digest" field.

func (*BillOfMaterialsUpdate) SetDocumentRef added in v0.6.0

func (bomu *BillOfMaterialsUpdate) SetDocumentRef(s string) *BillOfMaterialsUpdate

SetDocumentRef sets the "document_ref" field.

func (*BillOfMaterialsUpdate) SetDownloadLocation

func (bomu *BillOfMaterialsUpdate) SetDownloadLocation(s string) *BillOfMaterialsUpdate

SetDownloadLocation sets the "download_location" field.

func (*BillOfMaterialsUpdate) SetIncludedArtifactsHash added in v0.5.0

func (bomu *BillOfMaterialsUpdate) SetIncludedArtifactsHash(s string) *BillOfMaterialsUpdate

SetIncludedArtifactsHash sets the "included_artifacts_hash" field.

func (*BillOfMaterialsUpdate) SetIncludedDependenciesHash added in v0.5.0

func (bomu *BillOfMaterialsUpdate) SetIncludedDependenciesHash(s string) *BillOfMaterialsUpdate

SetIncludedDependenciesHash sets the "included_dependencies_hash" field.

func (*BillOfMaterialsUpdate) SetIncludedOccurrencesHash added in v0.5.0

func (bomu *BillOfMaterialsUpdate) SetIncludedOccurrencesHash(s string) *BillOfMaterialsUpdate

SetIncludedOccurrencesHash sets the "included_occurrences_hash" field.

func (*BillOfMaterialsUpdate) SetIncludedPackagesHash added in v0.5.0

func (bomu *BillOfMaterialsUpdate) SetIncludedPackagesHash(s string) *BillOfMaterialsUpdate

SetIncludedPackagesHash sets the "included_packages_hash" field.

func (*BillOfMaterialsUpdate) SetKnownSince added in v0.4.0

func (bomu *BillOfMaterialsUpdate) SetKnownSince(t time.Time) *BillOfMaterialsUpdate

SetKnownSince sets the "known_since" field.

func (*BillOfMaterialsUpdate) SetNillableAlgorithm added in v0.4.0

func (bomu *BillOfMaterialsUpdate) SetNillableAlgorithm(s *string) *BillOfMaterialsUpdate

SetNillableAlgorithm sets the "algorithm" field if the given value is not nil.

func (*BillOfMaterialsUpdate) SetNillableArtifactID

func (bomu *BillOfMaterialsUpdate) SetNillableArtifactID(u *uuid.UUID) *BillOfMaterialsUpdate

SetNillableArtifactID sets the "artifact_id" field if the given value is not nil.

func (*BillOfMaterialsUpdate) SetNillableCollector added in v0.4.0

func (bomu *BillOfMaterialsUpdate) SetNillableCollector(s *string) *BillOfMaterialsUpdate

SetNillableCollector sets the "collector" field if the given value is not nil.

func (*BillOfMaterialsUpdate) SetNillableDigest added in v0.4.0

func (bomu *BillOfMaterialsUpdate) SetNillableDigest(s *string) *BillOfMaterialsUpdate

SetNillableDigest sets the "digest" field if the given value is not nil.

func (*BillOfMaterialsUpdate) SetNillableDocumentRef added in v0.6.0

func (bomu *BillOfMaterialsUpdate) SetNillableDocumentRef(s *string) *BillOfMaterialsUpdate

SetNillableDocumentRef sets the "document_ref" field if the given value is not nil.

func (*BillOfMaterialsUpdate) SetNillableDownloadLocation added in v0.4.0

func (bomu *BillOfMaterialsUpdate) SetNillableDownloadLocation(s *string) *BillOfMaterialsUpdate

SetNillableDownloadLocation sets the "download_location" field if the given value is not nil.

func (*BillOfMaterialsUpdate) SetNillableIncludedArtifactsHash added in v0.5.0

func (bomu *BillOfMaterialsUpdate) SetNillableIncludedArtifactsHash(s *string) *BillOfMaterialsUpdate

SetNillableIncludedArtifactsHash sets the "included_artifacts_hash" field if the given value is not nil.

func (*BillOfMaterialsUpdate) SetNillableIncludedDependenciesHash added in v0.5.0

func (bomu *BillOfMaterialsUpdate) SetNillableIncludedDependenciesHash(s *string) *BillOfMaterialsUpdate

SetNillableIncludedDependenciesHash sets the "included_dependencies_hash" field if the given value is not nil.

func (*BillOfMaterialsUpdate) SetNillableIncludedOccurrencesHash added in v0.5.0

func (bomu *BillOfMaterialsUpdate) SetNillableIncludedOccurrencesHash(s *string) *BillOfMaterialsUpdate

SetNillableIncludedOccurrencesHash sets the "included_occurrences_hash" field if the given value is not nil.

func (*BillOfMaterialsUpdate) SetNillableIncludedPackagesHash added in v0.5.0

func (bomu *BillOfMaterialsUpdate) SetNillableIncludedPackagesHash(s *string) *BillOfMaterialsUpdate

SetNillableIncludedPackagesHash sets the "included_packages_hash" field if the given value is not nil.

func (*BillOfMaterialsUpdate) SetNillableKnownSince added in v0.4.0

func (bomu *BillOfMaterialsUpdate) SetNillableKnownSince(t *time.Time) *BillOfMaterialsUpdate

SetNillableKnownSince sets the "known_since" field if the given value is not nil.

func (*BillOfMaterialsUpdate) SetNillableOrigin added in v0.4.0

func (bomu *BillOfMaterialsUpdate) SetNillableOrigin(s *string) *BillOfMaterialsUpdate

SetNillableOrigin sets the "origin" field if the given value is not nil.

func (*BillOfMaterialsUpdate) SetNillablePackageID

func (bomu *BillOfMaterialsUpdate) SetNillablePackageID(u *uuid.UUID) *BillOfMaterialsUpdate

SetNillablePackageID sets the "package_id" field if the given value is not nil.

func (*BillOfMaterialsUpdate) SetNillableURI added in v0.4.0

func (bomu *BillOfMaterialsUpdate) SetNillableURI(s *string) *BillOfMaterialsUpdate

SetNillableURI sets the "uri" field if the given value is not nil.

func (*BillOfMaterialsUpdate) SetOrigin

SetOrigin sets the "origin" field.

func (*BillOfMaterialsUpdate) SetPackage

SetPackage sets the "package" edge to the PackageVersion entity.

func (*BillOfMaterialsUpdate) SetPackageID

func (bomu *BillOfMaterialsUpdate) SetPackageID(u uuid.UUID) *BillOfMaterialsUpdate

SetPackageID sets the "package_id" field.

func (*BillOfMaterialsUpdate) SetURI

SetURI sets the "uri" field.

func (*BillOfMaterialsUpdate) Where

Where appends a list predicates to the BillOfMaterialsUpdate builder.

type BillOfMaterialsUpdateOne

type BillOfMaterialsUpdateOne struct {
	// contains filtered or unexported fields
}

BillOfMaterialsUpdateOne is the builder for updating a single BillOfMaterials entity.

func (*BillOfMaterialsUpdateOne) AddIncludedDependencies added in v0.4.0

func (bomuo *BillOfMaterialsUpdateOne) AddIncludedDependencies(d ...*Dependency) *BillOfMaterialsUpdateOne

AddIncludedDependencies adds the "included_dependencies" edges to the Dependency entity.

func (*BillOfMaterialsUpdateOne) AddIncludedDependencyIDs added in v0.4.0

func (bomuo *BillOfMaterialsUpdateOne) AddIncludedDependencyIDs(ids ...uuid.UUID) *BillOfMaterialsUpdateOne

AddIncludedDependencyIDs adds the "included_dependencies" edge to the Dependency entity by IDs.

func (*BillOfMaterialsUpdateOne) AddIncludedOccurrenceIDs added in v0.4.0

func (bomuo *BillOfMaterialsUpdateOne) AddIncludedOccurrenceIDs(ids ...uuid.UUID) *BillOfMaterialsUpdateOne

AddIncludedOccurrenceIDs adds the "included_occurrences" edge to the Occurrence entity by IDs.

func (*BillOfMaterialsUpdateOne) AddIncludedOccurrences added in v0.4.0

func (bomuo *BillOfMaterialsUpdateOne) AddIncludedOccurrences(o ...*Occurrence) *BillOfMaterialsUpdateOne

AddIncludedOccurrences adds the "included_occurrences" edges to the Occurrence entity.

func (*BillOfMaterialsUpdateOne) AddIncludedSoftwareArtifactIDs added in v0.4.0

func (bomuo *BillOfMaterialsUpdateOne) AddIncludedSoftwareArtifactIDs(ids ...uuid.UUID) *BillOfMaterialsUpdateOne

AddIncludedSoftwareArtifactIDs adds the "included_software_artifacts" edge to the Artifact entity by IDs.

func (*BillOfMaterialsUpdateOne) AddIncludedSoftwareArtifacts added in v0.4.0

func (bomuo *BillOfMaterialsUpdateOne) AddIncludedSoftwareArtifacts(a ...*Artifact) *BillOfMaterialsUpdateOne

AddIncludedSoftwareArtifacts adds the "included_software_artifacts" edges to the Artifact entity.

func (*BillOfMaterialsUpdateOne) AddIncludedSoftwarePackageIDs added in v0.4.0

func (bomuo *BillOfMaterialsUpdateOne) AddIncludedSoftwarePackageIDs(ids ...uuid.UUID) *BillOfMaterialsUpdateOne

AddIncludedSoftwarePackageIDs adds the "included_software_packages" edge to the PackageVersion entity by IDs.

func (*BillOfMaterialsUpdateOne) AddIncludedSoftwarePackages added in v0.4.0

func (bomuo *BillOfMaterialsUpdateOne) AddIncludedSoftwarePackages(p ...*PackageVersion) *BillOfMaterialsUpdateOne

AddIncludedSoftwarePackages adds the "included_software_packages" edges to the PackageVersion entity.

func (*BillOfMaterialsUpdateOne) ClearArtifact

func (bomuo *BillOfMaterialsUpdateOne) ClearArtifact() *BillOfMaterialsUpdateOne

ClearArtifact clears the "artifact" edge to the Artifact entity.

func (*BillOfMaterialsUpdateOne) ClearArtifactID

func (bomuo *BillOfMaterialsUpdateOne) ClearArtifactID() *BillOfMaterialsUpdateOne

ClearArtifactID clears the value of the "artifact_id" field.

func (*BillOfMaterialsUpdateOne) ClearIncludedDependencies added in v0.4.0

func (bomuo *BillOfMaterialsUpdateOne) ClearIncludedDependencies() *BillOfMaterialsUpdateOne

ClearIncludedDependencies clears all "included_dependencies" edges to the Dependency entity.

func (*BillOfMaterialsUpdateOne) ClearIncludedOccurrences added in v0.4.0

func (bomuo *BillOfMaterialsUpdateOne) ClearIncludedOccurrences() *BillOfMaterialsUpdateOne

ClearIncludedOccurrences clears all "included_occurrences" edges to the Occurrence entity.

func (*BillOfMaterialsUpdateOne) ClearIncludedSoftwareArtifacts added in v0.4.0

func (bomuo *BillOfMaterialsUpdateOne) ClearIncludedSoftwareArtifacts() *BillOfMaterialsUpdateOne

ClearIncludedSoftwareArtifacts clears all "included_software_artifacts" edges to the Artifact entity.

func (*BillOfMaterialsUpdateOne) ClearIncludedSoftwarePackages added in v0.4.0

func (bomuo *BillOfMaterialsUpdateOne) ClearIncludedSoftwarePackages() *BillOfMaterialsUpdateOne

ClearIncludedSoftwarePackages clears all "included_software_packages" edges to the PackageVersion entity.

func (*BillOfMaterialsUpdateOne) ClearPackage

func (bomuo *BillOfMaterialsUpdateOne) ClearPackage() *BillOfMaterialsUpdateOne

ClearPackage clears the "package" edge to the PackageVersion entity.

func (*BillOfMaterialsUpdateOne) ClearPackageID

func (bomuo *BillOfMaterialsUpdateOne) ClearPackageID() *BillOfMaterialsUpdateOne

ClearPackageID clears the value of the "package_id" field.

func (*BillOfMaterialsUpdateOne) Exec

func (bomuo *BillOfMaterialsUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*BillOfMaterialsUpdateOne) ExecX

func (bomuo *BillOfMaterialsUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*BillOfMaterialsUpdateOne) Mutation

Mutation returns the BillOfMaterialsMutation object of the builder.

func (*BillOfMaterialsUpdateOne) RemoveIncludedDependencies added in v0.4.0

func (bomuo *BillOfMaterialsUpdateOne) RemoveIncludedDependencies(d ...*Dependency) *BillOfMaterialsUpdateOne

RemoveIncludedDependencies removes "included_dependencies" edges to Dependency entities.

func (*BillOfMaterialsUpdateOne) RemoveIncludedDependencyIDs added in v0.4.0

func (bomuo *BillOfMaterialsUpdateOne) RemoveIncludedDependencyIDs(ids ...uuid.UUID) *BillOfMaterialsUpdateOne

RemoveIncludedDependencyIDs removes the "included_dependencies" edge to Dependency entities by IDs.

func (*BillOfMaterialsUpdateOne) RemoveIncludedOccurrenceIDs added in v0.4.0

func (bomuo *BillOfMaterialsUpdateOne) RemoveIncludedOccurrenceIDs(ids ...uuid.UUID) *BillOfMaterialsUpdateOne

RemoveIncludedOccurrenceIDs removes the "included_occurrences" edge to Occurrence entities by IDs.

func (*BillOfMaterialsUpdateOne) RemoveIncludedOccurrences added in v0.4.0

func (bomuo *BillOfMaterialsUpdateOne) RemoveIncludedOccurrences(o ...*Occurrence) *BillOfMaterialsUpdateOne

RemoveIncludedOccurrences removes "included_occurrences" edges to Occurrence entities.

func (*BillOfMaterialsUpdateOne) RemoveIncludedSoftwareArtifactIDs added in v0.4.0

func (bomuo *BillOfMaterialsUpdateOne) RemoveIncludedSoftwareArtifactIDs(ids ...uuid.UUID) *BillOfMaterialsUpdateOne

RemoveIncludedSoftwareArtifactIDs removes the "included_software_artifacts" edge to Artifact entities by IDs.

func (*BillOfMaterialsUpdateOne) RemoveIncludedSoftwareArtifacts added in v0.4.0

func (bomuo *BillOfMaterialsUpdateOne) RemoveIncludedSoftwareArtifacts(a ...*Artifact) *BillOfMaterialsUpdateOne

RemoveIncludedSoftwareArtifacts removes "included_software_artifacts" edges to Artifact entities.

func (*BillOfMaterialsUpdateOne) RemoveIncludedSoftwarePackageIDs added in v0.4.0

func (bomuo *BillOfMaterialsUpdateOne) RemoveIncludedSoftwarePackageIDs(ids ...uuid.UUID) *BillOfMaterialsUpdateOne

RemoveIncludedSoftwarePackageIDs removes the "included_software_packages" edge to PackageVersion entities by IDs.

func (*BillOfMaterialsUpdateOne) RemoveIncludedSoftwarePackages added in v0.4.0

func (bomuo *BillOfMaterialsUpdateOne) RemoveIncludedSoftwarePackages(p ...*PackageVersion) *BillOfMaterialsUpdateOne

RemoveIncludedSoftwarePackages removes "included_software_packages" edges to PackageVersion entities.

func (*BillOfMaterialsUpdateOne) Save

Save executes the query and returns the updated BillOfMaterials entity.

func (*BillOfMaterialsUpdateOne) SaveX

SaveX is like Save, but panics if an error occurs.

func (*BillOfMaterialsUpdateOne) Select

func (bomuo *BillOfMaterialsUpdateOne) Select(field string, fields ...string) *BillOfMaterialsUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*BillOfMaterialsUpdateOne) SetAlgorithm

SetAlgorithm sets the "algorithm" field.

func (*BillOfMaterialsUpdateOne) SetArtifact

SetArtifact sets the "artifact" edge to the Artifact entity.

func (*BillOfMaterialsUpdateOne) SetArtifactID

SetArtifactID sets the "artifact_id" field.

func (*BillOfMaterialsUpdateOne) SetCollector

SetCollector sets the "collector" field.

func (*BillOfMaterialsUpdateOne) SetDigest

SetDigest sets the "digest" field.

func (*BillOfMaterialsUpdateOne) SetDocumentRef added in v0.6.0

func (bomuo *BillOfMaterialsUpdateOne) SetDocumentRef(s string) *BillOfMaterialsUpdateOne

SetDocumentRef sets the "document_ref" field.

func (*BillOfMaterialsUpdateOne) SetDownloadLocation

func (bomuo *BillOfMaterialsUpdateOne) SetDownloadLocation(s string) *BillOfMaterialsUpdateOne

SetDownloadLocation sets the "download_location" field.

func (*BillOfMaterialsUpdateOne) SetIncludedArtifactsHash added in v0.5.0

func (bomuo *BillOfMaterialsUpdateOne) SetIncludedArtifactsHash(s string) *BillOfMaterialsUpdateOne

SetIncludedArtifactsHash sets the "included_artifacts_hash" field.

func (*BillOfMaterialsUpdateOne) SetIncludedDependenciesHash added in v0.5.0

func (bomuo *BillOfMaterialsUpdateOne) SetIncludedDependenciesHash(s string) *BillOfMaterialsUpdateOne

SetIncludedDependenciesHash sets the "included_dependencies_hash" field.

func (*BillOfMaterialsUpdateOne) SetIncludedOccurrencesHash added in v0.5.0

func (bomuo *BillOfMaterialsUpdateOne) SetIncludedOccurrencesHash(s string) *BillOfMaterialsUpdateOne

SetIncludedOccurrencesHash sets the "included_occurrences_hash" field.

func (*BillOfMaterialsUpdateOne) SetIncludedPackagesHash added in v0.5.0

func (bomuo *BillOfMaterialsUpdateOne) SetIncludedPackagesHash(s string) *BillOfMaterialsUpdateOne

SetIncludedPackagesHash sets the "included_packages_hash" field.

func (*BillOfMaterialsUpdateOne) SetKnownSince added in v0.4.0

SetKnownSince sets the "known_since" field.

func (*BillOfMaterialsUpdateOne) SetNillableAlgorithm added in v0.4.0

func (bomuo *BillOfMaterialsUpdateOne) SetNillableAlgorithm(s *string) *BillOfMaterialsUpdateOne

SetNillableAlgorithm sets the "algorithm" field if the given value is not nil.

func (*BillOfMaterialsUpdateOne) SetNillableArtifactID

func (bomuo *BillOfMaterialsUpdateOne) SetNillableArtifactID(u *uuid.UUID) *BillOfMaterialsUpdateOne

SetNillableArtifactID sets the "artifact_id" field if the given value is not nil.

func (*BillOfMaterialsUpdateOne) SetNillableCollector added in v0.4.0

func (bomuo *BillOfMaterialsUpdateOne) SetNillableCollector(s *string) *BillOfMaterialsUpdateOne

SetNillableCollector sets the "collector" field if the given value is not nil.

func (*BillOfMaterialsUpdateOne) SetNillableDigest added in v0.4.0

func (bomuo *BillOfMaterialsUpdateOne) SetNillableDigest(s *string) *BillOfMaterialsUpdateOne

SetNillableDigest sets the "digest" field if the given value is not nil.

func (*BillOfMaterialsUpdateOne) SetNillableDocumentRef added in v0.6.0

func (bomuo *BillOfMaterialsUpdateOne) SetNillableDocumentRef(s *string) *BillOfMaterialsUpdateOne

SetNillableDocumentRef sets the "document_ref" field if the given value is not nil.

func (*BillOfMaterialsUpdateOne) SetNillableDownloadLocation added in v0.4.0

func (bomuo *BillOfMaterialsUpdateOne) SetNillableDownloadLocation(s *string) *BillOfMaterialsUpdateOne

SetNillableDownloadLocation sets the "download_location" field if the given value is not nil.

func (*BillOfMaterialsUpdateOne) SetNillableIncludedArtifactsHash added in v0.5.0

func (bomuo *BillOfMaterialsUpdateOne) SetNillableIncludedArtifactsHash(s *string) *BillOfMaterialsUpdateOne

SetNillableIncludedArtifactsHash sets the "included_artifacts_hash" field if the given value is not nil.

func (*BillOfMaterialsUpdateOne) SetNillableIncludedDependenciesHash added in v0.5.0

func (bomuo *BillOfMaterialsUpdateOne) SetNillableIncludedDependenciesHash(s *string) *BillOfMaterialsUpdateOne

SetNillableIncludedDependenciesHash sets the "included_dependencies_hash" field if the given value is not nil.

func (*BillOfMaterialsUpdateOne) SetNillableIncludedOccurrencesHash added in v0.5.0

func (bomuo *BillOfMaterialsUpdateOne) SetNillableIncludedOccurrencesHash(s *string) *BillOfMaterialsUpdateOne

SetNillableIncludedOccurrencesHash sets the "included_occurrences_hash" field if the given value is not nil.

func (*BillOfMaterialsUpdateOne) SetNillableIncludedPackagesHash added in v0.5.0

func (bomuo *BillOfMaterialsUpdateOne) SetNillableIncludedPackagesHash(s *string) *BillOfMaterialsUpdateOne

SetNillableIncludedPackagesHash sets the "included_packages_hash" field if the given value is not nil.

func (*BillOfMaterialsUpdateOne) SetNillableKnownSince added in v0.4.0

func (bomuo *BillOfMaterialsUpdateOne) SetNillableKnownSince(t *time.Time) *BillOfMaterialsUpdateOne

SetNillableKnownSince sets the "known_since" field if the given value is not nil.

func (*BillOfMaterialsUpdateOne) SetNillableOrigin added in v0.4.0

func (bomuo *BillOfMaterialsUpdateOne) SetNillableOrigin(s *string) *BillOfMaterialsUpdateOne

SetNillableOrigin sets the "origin" field if the given value is not nil.

func (*BillOfMaterialsUpdateOne) SetNillablePackageID

func (bomuo *BillOfMaterialsUpdateOne) SetNillablePackageID(u *uuid.UUID) *BillOfMaterialsUpdateOne

SetNillablePackageID sets the "package_id" field if the given value is not nil.

func (*BillOfMaterialsUpdateOne) SetNillableURI added in v0.4.0

func (bomuo *BillOfMaterialsUpdateOne) SetNillableURI(s *string) *BillOfMaterialsUpdateOne

SetNillableURI sets the "uri" field if the given value is not nil.

func (*BillOfMaterialsUpdateOne) SetOrigin

SetOrigin sets the "origin" field.

func (*BillOfMaterialsUpdateOne) SetPackage

SetPackage sets the "package" edge to the PackageVersion entity.

func (*BillOfMaterialsUpdateOne) SetPackageID

SetPackageID sets the "package_id" field.

func (*BillOfMaterialsUpdateOne) SetURI

SetURI sets the "uri" field.

func (*BillOfMaterialsUpdateOne) Where

Where appends a list predicates to the BillOfMaterialsUpdate builder.

type BillOfMaterialsUpsert

type BillOfMaterialsUpsert struct {
	*sql.UpdateSet
}

BillOfMaterialsUpsert is the "OnConflict" setter.

func (*BillOfMaterialsUpsert) ClearArtifactID

func (u *BillOfMaterialsUpsert) ClearArtifactID() *BillOfMaterialsUpsert

ClearArtifactID clears the value of the "artifact_id" field.

func (*BillOfMaterialsUpsert) ClearPackageID

func (u *BillOfMaterialsUpsert) ClearPackageID() *BillOfMaterialsUpsert

ClearPackageID clears the value of the "package_id" field.

func (*BillOfMaterialsUpsert) SetAlgorithm

SetAlgorithm sets the "algorithm" field.

func (*BillOfMaterialsUpsert) SetArtifactID

SetArtifactID sets the "artifact_id" field.

func (*BillOfMaterialsUpsert) SetCollector

SetCollector sets the "collector" field.

func (*BillOfMaterialsUpsert) SetDigest

SetDigest sets the "digest" field.

func (*BillOfMaterialsUpsert) SetDocumentRef added in v0.6.0

func (u *BillOfMaterialsUpsert) SetDocumentRef(v string) *BillOfMaterialsUpsert

SetDocumentRef sets the "document_ref" field.

func (*BillOfMaterialsUpsert) SetDownloadLocation

func (u *BillOfMaterialsUpsert) SetDownloadLocation(v string) *BillOfMaterialsUpsert

SetDownloadLocation sets the "download_location" field.

func (*BillOfMaterialsUpsert) SetIncludedArtifactsHash added in v0.5.0

func (u *BillOfMaterialsUpsert) SetIncludedArtifactsHash(v string) *BillOfMaterialsUpsert

SetIncludedArtifactsHash sets the "included_artifacts_hash" field.

func (*BillOfMaterialsUpsert) SetIncludedDependenciesHash added in v0.5.0

func (u *BillOfMaterialsUpsert) SetIncludedDependenciesHash(v string) *BillOfMaterialsUpsert

SetIncludedDependenciesHash sets the "included_dependencies_hash" field.

func (*BillOfMaterialsUpsert) SetIncludedOccurrencesHash added in v0.5.0

func (u *BillOfMaterialsUpsert) SetIncludedOccurrencesHash(v string) *BillOfMaterialsUpsert

SetIncludedOccurrencesHash sets the "included_occurrences_hash" field.

func (*BillOfMaterialsUpsert) SetIncludedPackagesHash added in v0.5.0

func (u *BillOfMaterialsUpsert) SetIncludedPackagesHash(v string) *BillOfMaterialsUpsert

SetIncludedPackagesHash sets the "included_packages_hash" field.

func (*BillOfMaterialsUpsert) SetKnownSince added in v0.4.0

SetKnownSince sets the "known_since" field.

func (*BillOfMaterialsUpsert) SetOrigin

SetOrigin sets the "origin" field.

func (*BillOfMaterialsUpsert) SetPackageID

SetPackageID sets the "package_id" field.

func (*BillOfMaterialsUpsert) SetURI

SetURI sets the "uri" field.

func (*BillOfMaterialsUpsert) UpdateAlgorithm

func (u *BillOfMaterialsUpsert) UpdateAlgorithm() *BillOfMaterialsUpsert

UpdateAlgorithm sets the "algorithm" field to the value that was provided on create.

func (*BillOfMaterialsUpsert) UpdateArtifactID

func (u *BillOfMaterialsUpsert) UpdateArtifactID() *BillOfMaterialsUpsert

UpdateArtifactID sets the "artifact_id" field to the value that was provided on create.

func (*BillOfMaterialsUpsert) UpdateCollector

func (u *BillOfMaterialsUpsert) UpdateCollector() *BillOfMaterialsUpsert

UpdateCollector sets the "collector" field to the value that was provided on create.

func (*BillOfMaterialsUpsert) UpdateDigest

func (u *BillOfMaterialsUpsert) UpdateDigest() *BillOfMaterialsUpsert

UpdateDigest sets the "digest" field to the value that was provided on create.

func (*BillOfMaterialsUpsert) UpdateDocumentRef added in v0.6.0

func (u *BillOfMaterialsUpsert) UpdateDocumentRef() *BillOfMaterialsUpsert

UpdateDocumentRef sets the "document_ref" field to the value that was provided on create.

func (*BillOfMaterialsUpsert) UpdateDownloadLocation

func (u *BillOfMaterialsUpsert) UpdateDownloadLocation() *BillOfMaterialsUpsert

UpdateDownloadLocation sets the "download_location" field to the value that was provided on create.

func (*BillOfMaterialsUpsert) UpdateIncludedArtifactsHash added in v0.5.0

func (u *BillOfMaterialsUpsert) UpdateIncludedArtifactsHash() *BillOfMaterialsUpsert

UpdateIncludedArtifactsHash sets the "included_artifacts_hash" field to the value that was provided on create.

func (*BillOfMaterialsUpsert) UpdateIncludedDependenciesHash added in v0.5.0

func (u *BillOfMaterialsUpsert) UpdateIncludedDependenciesHash() *BillOfMaterialsUpsert

UpdateIncludedDependenciesHash sets the "included_dependencies_hash" field to the value that was provided on create.

func (*BillOfMaterialsUpsert) UpdateIncludedOccurrencesHash added in v0.5.0

func (u *BillOfMaterialsUpsert) UpdateIncludedOccurrencesHash() *BillOfMaterialsUpsert

UpdateIncludedOccurrencesHash sets the "included_occurrences_hash" field to the value that was provided on create.

func (*BillOfMaterialsUpsert) UpdateIncludedPackagesHash added in v0.5.0

func (u *BillOfMaterialsUpsert) UpdateIncludedPackagesHash() *BillOfMaterialsUpsert

UpdateIncludedPackagesHash sets the "included_packages_hash" field to the value that was provided on create.

func (*BillOfMaterialsUpsert) UpdateKnownSince added in v0.4.0

func (u *BillOfMaterialsUpsert) UpdateKnownSince() *BillOfMaterialsUpsert

UpdateKnownSince sets the "known_since" field to the value that was provided on create.

func (*BillOfMaterialsUpsert) UpdateOrigin

func (u *BillOfMaterialsUpsert) UpdateOrigin() *BillOfMaterialsUpsert

UpdateOrigin sets the "origin" field to the value that was provided on create.

func (*BillOfMaterialsUpsert) UpdatePackageID

func (u *BillOfMaterialsUpsert) UpdatePackageID() *BillOfMaterialsUpsert

UpdatePackageID sets the "package_id" field to the value that was provided on create.

func (*BillOfMaterialsUpsert) UpdateURI

UpdateURI sets the "uri" field to the value that was provided on create.

type BillOfMaterialsUpsertBulk

type BillOfMaterialsUpsertBulk struct {
	// contains filtered or unexported fields
}

BillOfMaterialsUpsertBulk is the builder for "upsert"-ing a bulk of BillOfMaterials nodes.

func (*BillOfMaterialsUpsertBulk) ClearArtifactID

ClearArtifactID clears the value of the "artifact_id" field.

func (*BillOfMaterialsUpsertBulk) ClearPackageID

ClearPackageID clears the value of the "package_id" field.

func (*BillOfMaterialsUpsertBulk) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*BillOfMaterialsUpsertBulk) Exec

Exec executes the query.

func (*BillOfMaterialsUpsertBulk) ExecX

ExecX is like Exec, but panics if an error occurs.

func (*BillOfMaterialsUpsertBulk) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.BillOfMaterials.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*BillOfMaterialsUpsertBulk) SetAlgorithm

SetAlgorithm sets the "algorithm" field.

func (*BillOfMaterialsUpsertBulk) SetArtifactID

SetArtifactID sets the "artifact_id" field.

func (*BillOfMaterialsUpsertBulk) SetCollector

SetCollector sets the "collector" field.

func (*BillOfMaterialsUpsertBulk) SetDigest

SetDigest sets the "digest" field.

func (*BillOfMaterialsUpsertBulk) SetDocumentRef added in v0.6.0

SetDocumentRef sets the "document_ref" field.

func (*BillOfMaterialsUpsertBulk) SetDownloadLocation

func (u *BillOfMaterialsUpsertBulk) SetDownloadLocation(v string) *BillOfMaterialsUpsertBulk

SetDownloadLocation sets the "download_location" field.

func (*BillOfMaterialsUpsertBulk) SetIncludedArtifactsHash added in v0.5.0

func (u *BillOfMaterialsUpsertBulk) SetIncludedArtifactsHash(v string) *BillOfMaterialsUpsertBulk

SetIncludedArtifactsHash sets the "included_artifacts_hash" field.

func (*BillOfMaterialsUpsertBulk) SetIncludedDependenciesHash added in v0.5.0

func (u *BillOfMaterialsUpsertBulk) SetIncludedDependenciesHash(v string) *BillOfMaterialsUpsertBulk

SetIncludedDependenciesHash sets the "included_dependencies_hash" field.

func (*BillOfMaterialsUpsertBulk) SetIncludedOccurrencesHash added in v0.5.0

func (u *BillOfMaterialsUpsertBulk) SetIncludedOccurrencesHash(v string) *BillOfMaterialsUpsertBulk

SetIncludedOccurrencesHash sets the "included_occurrences_hash" field.

func (*BillOfMaterialsUpsertBulk) SetIncludedPackagesHash added in v0.5.0

func (u *BillOfMaterialsUpsertBulk) SetIncludedPackagesHash(v string) *BillOfMaterialsUpsertBulk

SetIncludedPackagesHash sets the "included_packages_hash" field.

func (*BillOfMaterialsUpsertBulk) SetKnownSince added in v0.4.0

SetKnownSince sets the "known_since" field.

func (*BillOfMaterialsUpsertBulk) SetOrigin

SetOrigin sets the "origin" field.

func (*BillOfMaterialsUpsertBulk) SetPackageID

SetPackageID sets the "package_id" field.

func (*BillOfMaterialsUpsertBulk) SetURI

SetURI sets the "uri" field.

func (*BillOfMaterialsUpsertBulk) Update

Update allows overriding fields `UPDATE` values. See the BillOfMaterialsCreateBulk.OnConflict documentation for more info.

func (*BillOfMaterialsUpsertBulk) UpdateAlgorithm

UpdateAlgorithm sets the "algorithm" field to the value that was provided on create.

func (*BillOfMaterialsUpsertBulk) UpdateArtifactID

UpdateArtifactID sets the "artifact_id" field to the value that was provided on create.

func (*BillOfMaterialsUpsertBulk) UpdateCollector

UpdateCollector sets the "collector" field to the value that was provided on create.

func (*BillOfMaterialsUpsertBulk) UpdateDigest

UpdateDigest sets the "digest" field to the value that was provided on create.

func (*BillOfMaterialsUpsertBulk) UpdateDocumentRef added in v0.6.0

func (u *BillOfMaterialsUpsertBulk) UpdateDocumentRef() *BillOfMaterialsUpsertBulk

UpdateDocumentRef sets the "document_ref" field to the value that was provided on create.

func (*BillOfMaterialsUpsertBulk) UpdateDownloadLocation

func (u *BillOfMaterialsUpsertBulk) UpdateDownloadLocation() *BillOfMaterialsUpsertBulk

UpdateDownloadLocation sets the "download_location" field to the value that was provided on create.

func (*BillOfMaterialsUpsertBulk) UpdateIncludedArtifactsHash added in v0.5.0

func (u *BillOfMaterialsUpsertBulk) UpdateIncludedArtifactsHash() *BillOfMaterialsUpsertBulk

UpdateIncludedArtifactsHash sets the "included_artifacts_hash" field to the value that was provided on create.

func (*BillOfMaterialsUpsertBulk) UpdateIncludedDependenciesHash added in v0.5.0

func (u *BillOfMaterialsUpsertBulk) UpdateIncludedDependenciesHash() *BillOfMaterialsUpsertBulk

UpdateIncludedDependenciesHash sets the "included_dependencies_hash" field to the value that was provided on create.

func (*BillOfMaterialsUpsertBulk) UpdateIncludedOccurrencesHash added in v0.5.0

func (u *BillOfMaterialsUpsertBulk) UpdateIncludedOccurrencesHash() *BillOfMaterialsUpsertBulk

UpdateIncludedOccurrencesHash sets the "included_occurrences_hash" field to the value that was provided on create.

func (*BillOfMaterialsUpsertBulk) UpdateIncludedPackagesHash added in v0.5.0

func (u *BillOfMaterialsUpsertBulk) UpdateIncludedPackagesHash() *BillOfMaterialsUpsertBulk

UpdateIncludedPackagesHash sets the "included_packages_hash" field to the value that was provided on create.

func (*BillOfMaterialsUpsertBulk) UpdateKnownSince added in v0.4.0

UpdateKnownSince sets the "known_since" field to the value that was provided on create.

func (*BillOfMaterialsUpsertBulk) UpdateNewValues

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.BillOfMaterials.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(billofmaterials.FieldID)
		}),
	).
	Exec(ctx)

func (*BillOfMaterialsUpsertBulk) UpdateOrigin

UpdateOrigin sets the "origin" field to the value that was provided on create.

func (*BillOfMaterialsUpsertBulk) UpdatePackageID

UpdatePackageID sets the "package_id" field to the value that was provided on create.

func (*BillOfMaterialsUpsertBulk) UpdateURI

UpdateURI sets the "uri" field to the value that was provided on create.

type BillOfMaterialsUpsertOne

type BillOfMaterialsUpsertOne struct {
	// contains filtered or unexported fields
}

BillOfMaterialsUpsertOne is the builder for "upsert"-ing

one BillOfMaterials node.

func (*BillOfMaterialsUpsertOne) ClearArtifactID

func (u *BillOfMaterialsUpsertOne) ClearArtifactID() *BillOfMaterialsUpsertOne

ClearArtifactID clears the value of the "artifact_id" field.

func (*BillOfMaterialsUpsertOne) ClearPackageID

ClearPackageID clears the value of the "package_id" field.

func (*BillOfMaterialsUpsertOne) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*BillOfMaterialsUpsertOne) Exec

Exec executes the query.

func (*BillOfMaterialsUpsertOne) ExecX

ExecX is like Exec, but panics if an error occurs.

func (*BillOfMaterialsUpsertOne) ID

func (u *BillOfMaterialsUpsertOne) ID(ctx context.Context) (id uuid.UUID, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*BillOfMaterialsUpsertOne) IDX

IDX is like ID, but panics if an error occurs.

func (*BillOfMaterialsUpsertOne) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.BillOfMaterials.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*BillOfMaterialsUpsertOne) SetAlgorithm

SetAlgorithm sets the "algorithm" field.

func (*BillOfMaterialsUpsertOne) SetArtifactID

SetArtifactID sets the "artifact_id" field.

func (*BillOfMaterialsUpsertOne) SetCollector

SetCollector sets the "collector" field.

func (*BillOfMaterialsUpsertOne) SetDigest

SetDigest sets the "digest" field.

func (*BillOfMaterialsUpsertOne) SetDocumentRef added in v0.6.0

SetDocumentRef sets the "document_ref" field.

func (*BillOfMaterialsUpsertOne) SetDownloadLocation

func (u *BillOfMaterialsUpsertOne) SetDownloadLocation(v string) *BillOfMaterialsUpsertOne

SetDownloadLocation sets the "download_location" field.

func (*BillOfMaterialsUpsertOne) SetIncludedArtifactsHash added in v0.5.0

func (u *BillOfMaterialsUpsertOne) SetIncludedArtifactsHash(v string) *BillOfMaterialsUpsertOne

SetIncludedArtifactsHash sets the "included_artifacts_hash" field.

func (*BillOfMaterialsUpsertOne) SetIncludedDependenciesHash added in v0.5.0

func (u *BillOfMaterialsUpsertOne) SetIncludedDependenciesHash(v string) *BillOfMaterialsUpsertOne

SetIncludedDependenciesHash sets the "included_dependencies_hash" field.

func (*BillOfMaterialsUpsertOne) SetIncludedOccurrencesHash added in v0.5.0

func (u *BillOfMaterialsUpsertOne) SetIncludedOccurrencesHash(v string) *BillOfMaterialsUpsertOne

SetIncludedOccurrencesHash sets the "included_occurrences_hash" field.

func (*BillOfMaterialsUpsertOne) SetIncludedPackagesHash added in v0.5.0

func (u *BillOfMaterialsUpsertOne) SetIncludedPackagesHash(v string) *BillOfMaterialsUpsertOne

SetIncludedPackagesHash sets the "included_packages_hash" field.

func (*BillOfMaterialsUpsertOne) SetKnownSince added in v0.4.0

SetKnownSince sets the "known_since" field.

func (*BillOfMaterialsUpsertOne) SetOrigin

SetOrigin sets the "origin" field.

func (*BillOfMaterialsUpsertOne) SetPackageID

SetPackageID sets the "package_id" field.

func (*BillOfMaterialsUpsertOne) SetURI

SetURI sets the "uri" field.

func (*BillOfMaterialsUpsertOne) Update

Update allows overriding fields `UPDATE` values. See the BillOfMaterialsCreate.OnConflict documentation for more info.

func (*BillOfMaterialsUpsertOne) UpdateAlgorithm

func (u *BillOfMaterialsUpsertOne) UpdateAlgorithm() *BillOfMaterialsUpsertOne

UpdateAlgorithm sets the "algorithm" field to the value that was provided on create.

func (*BillOfMaterialsUpsertOne) UpdateArtifactID

func (u *BillOfMaterialsUpsertOne) UpdateArtifactID() *BillOfMaterialsUpsertOne

UpdateArtifactID sets the "artifact_id" field to the value that was provided on create.

func (*BillOfMaterialsUpsertOne) UpdateCollector

func (u *BillOfMaterialsUpsertOne) UpdateCollector() *BillOfMaterialsUpsertOne

UpdateCollector sets the "collector" field to the value that was provided on create.

func (*BillOfMaterialsUpsertOne) UpdateDigest

UpdateDigest sets the "digest" field to the value that was provided on create.

func (*BillOfMaterialsUpsertOne) UpdateDocumentRef added in v0.6.0

func (u *BillOfMaterialsUpsertOne) UpdateDocumentRef() *BillOfMaterialsUpsertOne

UpdateDocumentRef sets the "document_ref" field to the value that was provided on create.

func (*BillOfMaterialsUpsertOne) UpdateDownloadLocation

func (u *BillOfMaterialsUpsertOne) UpdateDownloadLocation() *BillOfMaterialsUpsertOne

UpdateDownloadLocation sets the "download_location" field to the value that was provided on create.

func (*BillOfMaterialsUpsertOne) UpdateIncludedArtifactsHash added in v0.5.0

func (u *BillOfMaterialsUpsertOne) UpdateIncludedArtifactsHash() *BillOfMaterialsUpsertOne

UpdateIncludedArtifactsHash sets the "included_artifacts_hash" field to the value that was provided on create.

func (*BillOfMaterialsUpsertOne) UpdateIncludedDependenciesHash added in v0.5.0

func (u *BillOfMaterialsUpsertOne) UpdateIncludedDependenciesHash() *BillOfMaterialsUpsertOne

UpdateIncludedDependenciesHash sets the "included_dependencies_hash" field to the value that was provided on create.

func (*BillOfMaterialsUpsertOne) UpdateIncludedOccurrencesHash added in v0.5.0

func (u *BillOfMaterialsUpsertOne) UpdateIncludedOccurrencesHash() *BillOfMaterialsUpsertOne

UpdateIncludedOccurrencesHash sets the "included_occurrences_hash" field to the value that was provided on create.

func (*BillOfMaterialsUpsertOne) UpdateIncludedPackagesHash added in v0.5.0

func (u *BillOfMaterialsUpsertOne) UpdateIncludedPackagesHash() *BillOfMaterialsUpsertOne

UpdateIncludedPackagesHash sets the "included_packages_hash" field to the value that was provided on create.

func (*BillOfMaterialsUpsertOne) UpdateKnownSince added in v0.4.0

func (u *BillOfMaterialsUpsertOne) UpdateKnownSince() *BillOfMaterialsUpsertOne

UpdateKnownSince sets the "known_since" field to the value that was provided on create.

func (*BillOfMaterialsUpsertOne) UpdateNewValues

func (u *BillOfMaterialsUpsertOne) UpdateNewValues() *BillOfMaterialsUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:

client.BillOfMaterials.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(billofmaterials.FieldID)
		}),
	).
	Exec(ctx)

func (*BillOfMaterialsUpsertOne) UpdateOrigin

UpdateOrigin sets the "origin" field to the value that was provided on create.

func (*BillOfMaterialsUpsertOne) UpdatePackageID

func (u *BillOfMaterialsUpsertOne) UpdatePackageID() *BillOfMaterialsUpsertOne

UpdatePackageID sets the "package_id" field to the value that was provided on create.

func (*BillOfMaterialsUpsertOne) UpdateURI

UpdateURI sets the "uri" field to the value that was provided on create.

type Builder

type Builder struct {

	// ID of the ent.
	ID uuid.UUID `json:"id,omitempty"`
	// The URI of the builder, used as a unique identifier in the graph query
	URI string `json:"uri,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the BuilderQuery when eager-loading is set.
	Edges BuilderEdges `json:"edges"`
	// contains filtered or unexported fields
}

Builder is the model entity for the Builder schema.

func (*Builder) IsNode

func (n *Builder) IsNode()

IsNode implements the Node interface check for GQLGen.

func (*Builder) NamedSlsaAttestations

func (b *Builder) NamedSlsaAttestations(name string) ([]*SLSAAttestation, error)

NamedSlsaAttestations returns the SlsaAttestations named value or an error if the edge was not loaded in eager-loading with this name.

func (*Builder) QuerySlsaAttestations

func (b *Builder) QuerySlsaAttestations() *SLSAAttestationQuery

QuerySlsaAttestations queries the "slsa_attestations" edge of the Builder entity.

func (*Builder) SlsaAttestations

func (b *Builder) SlsaAttestations(ctx context.Context) (result []*SLSAAttestation, err error)

func (*Builder) String

func (b *Builder) String() string

String implements the fmt.Stringer.

func (*Builder) ToEdge

func (b *Builder) ToEdge(order *BuilderOrder) *BuilderEdge

ToEdge converts Builder into BuilderEdge.

func (*Builder) Unwrap

func (b *Builder) Unwrap() *Builder

Unwrap unwraps the Builder entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.

func (*Builder) Update

func (b *Builder) Update() *BuilderUpdateOne

Update returns a builder for updating this Builder. Note that you need to call Builder.Unwrap() before calling this method if this Builder was returned from a transaction, and the transaction was committed or rolled back.

func (*Builder) Value

func (b *Builder) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the Builder. This includes values selected through modifiers, order, etc.

type BuilderClient

type BuilderClient struct {
	// contains filtered or unexported fields
}

BuilderClient is a client for the Builder schema.

func NewBuilderClient

func NewBuilderClient(c config) *BuilderClient

NewBuilderClient returns a client for the Builder from the given config.

func (*BuilderClient) Create

func (c *BuilderClient) Create() *BuilderCreate

Create returns a builder for creating a Builder entity.

func (*BuilderClient) CreateBulk

func (c *BuilderClient) CreateBulk(builders ...*BuilderCreate) *BuilderCreateBulk

CreateBulk returns a builder for creating a bulk of Builder entities.

func (*BuilderClient) Delete

func (c *BuilderClient) Delete() *BuilderDelete

Delete returns a delete builder for Builder.

func (*BuilderClient) DeleteOne

func (c *BuilderClient) DeleteOne(b *Builder) *BuilderDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*BuilderClient) DeleteOneID

func (c *BuilderClient) DeleteOneID(id uuid.UUID) *BuilderDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*BuilderClient) Get

func (c *BuilderClient) Get(ctx context.Context, id uuid.UUID) (*Builder, error)

Get returns a Builder entity by its id.

func (*BuilderClient) GetX

func (c *BuilderClient) GetX(ctx context.Context, id uuid.UUID) *Builder

GetX is like Get, but panics if an error occurs.

func (*BuilderClient) Hooks

func (c *BuilderClient) Hooks() []Hook

Hooks returns the client hooks.

func (*BuilderClient) Intercept

func (c *BuilderClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `builder.Intercept(f(g(h())))`.

func (*BuilderClient) Interceptors

func (c *BuilderClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*BuilderClient) MapCreateBulk

func (c *BuilderClient) MapCreateBulk(slice any, setFunc func(*BuilderCreate, int)) *BuilderCreateBulk

MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.

func (*BuilderClient) Query

func (c *BuilderClient) Query() *BuilderQuery

Query returns a query builder for Builder.

func (*BuilderClient) QuerySlsaAttestations

func (c *BuilderClient) QuerySlsaAttestations(b *Builder) *SLSAAttestationQuery

QuerySlsaAttestations queries the slsa_attestations edge of a Builder.

func (*BuilderClient) Update

func (c *BuilderClient) Update() *BuilderUpdate

Update returns an update builder for Builder.

func (*BuilderClient) UpdateOne

func (c *BuilderClient) UpdateOne(b *Builder) *BuilderUpdateOne

UpdateOne returns an update builder for the given entity.

func (*BuilderClient) UpdateOneID

func (c *BuilderClient) UpdateOneID(id uuid.UUID) *BuilderUpdateOne

UpdateOneID returns an update builder for the given id.

func (*BuilderClient) Use

func (c *BuilderClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `builder.Hooks(f(g(h())))`.

type BuilderConnection

type BuilderConnection struct {
	Edges      []*BuilderEdge `json:"edges"`
	PageInfo   PageInfo       `json:"pageInfo"`
	TotalCount int            `json:"totalCount"`
}

BuilderConnection is the connection containing edges to Builder.

type BuilderCreate

type BuilderCreate struct {
	// contains filtered or unexported fields
}

BuilderCreate is the builder for creating a Builder entity.

func (*BuilderCreate) AddSlsaAttestationIDs

func (bc *BuilderCreate) AddSlsaAttestationIDs(ids ...uuid.UUID) *BuilderCreate

AddSlsaAttestationIDs adds the "slsa_attestations" edge to the SLSAAttestation entity by IDs.

func (*BuilderCreate) AddSlsaAttestations

func (bc *BuilderCreate) AddSlsaAttestations(s ...*SLSAAttestation) *BuilderCreate

AddSlsaAttestations adds the "slsa_attestations" edges to the SLSAAttestation entity.

func (*BuilderCreate) Exec

func (bc *BuilderCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*BuilderCreate) ExecX

func (bc *BuilderCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*BuilderCreate) Mutation

func (bc *BuilderCreate) Mutation() *BuilderMutation

Mutation returns the BuilderMutation object of the builder.

func (*BuilderCreate) OnConflict

func (bc *BuilderCreate) OnConflict(opts ...sql.ConflictOption) *BuilderUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.Builder.Create().
	SetURI(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.BuilderUpsert) {
		SetURI(v+v).
	}).
	Exec(ctx)

func (*BuilderCreate) OnConflictColumns

func (bc *BuilderCreate) OnConflictColumns(columns ...string) *BuilderUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.Builder.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*BuilderCreate) Save

func (bc *BuilderCreate) Save(ctx context.Context) (*Builder, error)

Save creates the Builder in the database.

func (*BuilderCreate) SaveX

func (bc *BuilderCreate) SaveX(ctx context.Context) *Builder

SaveX calls Save and panics if Save returns an error.

func (*BuilderCreate) SetID added in v0.5.0

func (bc *BuilderCreate) SetID(u uuid.UUID) *BuilderCreate

SetID sets the "id" field.

func (*BuilderCreate) SetNillableID added in v0.5.0

func (bc *BuilderCreate) SetNillableID(u *uuid.UUID) *BuilderCreate

SetNillableID sets the "id" field if the given value is not nil.

func (*BuilderCreate) SetURI

func (bc *BuilderCreate) SetURI(s string) *BuilderCreate

SetURI sets the "uri" field.

type BuilderCreateBulk

type BuilderCreateBulk struct {
	// contains filtered or unexported fields
}

BuilderCreateBulk is the builder for creating many Builder entities in bulk.

func (*BuilderCreateBulk) Exec

func (bcb *BuilderCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*BuilderCreateBulk) ExecX

func (bcb *BuilderCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*BuilderCreateBulk) OnConflict

func (bcb *BuilderCreateBulk) OnConflict(opts ...sql.ConflictOption) *BuilderUpsertBulk

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.Builder.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.BuilderUpsert) {
		SetURI(v+v).
	}).
	Exec(ctx)

func (*BuilderCreateBulk) OnConflictColumns

func (bcb *BuilderCreateBulk) OnConflictColumns(columns ...string) *BuilderUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.Builder.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*BuilderCreateBulk) Save

func (bcb *BuilderCreateBulk) Save(ctx context.Context) ([]*Builder, error)

Save creates the Builder entities in the database.

func (*BuilderCreateBulk) SaveX

func (bcb *BuilderCreateBulk) SaveX(ctx context.Context) []*Builder

SaveX is like Save, but panics if an error occurs.

type BuilderDelete

type BuilderDelete struct {
	// contains filtered or unexported fields
}

BuilderDelete is the builder for deleting a Builder entity.

func (*BuilderDelete) Exec

func (bd *BuilderDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*BuilderDelete) ExecX

func (bd *BuilderDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*BuilderDelete) Where

func (bd *BuilderDelete) Where(ps ...predicate.Builder) *BuilderDelete

Where appends a list predicates to the BuilderDelete builder.

type BuilderDeleteOne

type BuilderDeleteOne struct {
	// contains filtered or unexported fields
}

BuilderDeleteOne is the builder for deleting a single Builder entity.

func (*BuilderDeleteOne) Exec

func (bdo *BuilderDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*BuilderDeleteOne) ExecX

func (bdo *BuilderDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*BuilderDeleteOne) Where

Where appends a list predicates to the BuilderDelete builder.

type BuilderEdge

type BuilderEdge struct {
	Node   *Builder `json:"node"`
	Cursor Cursor   `json:"cursor"`
}

BuilderEdge is the edge representation of Builder.

type BuilderEdges

type BuilderEdges struct {
	// SlsaAttestations holds the value of the slsa_attestations edge.
	SlsaAttestations []*SLSAAttestation `json:"slsa_attestations,omitempty"`
	// contains filtered or unexported fields
}

BuilderEdges holds the relations/edges for other nodes in the graph.

func (BuilderEdges) SlsaAttestationsOrErr

func (e BuilderEdges) SlsaAttestationsOrErr() ([]*SLSAAttestation, error)

SlsaAttestationsOrErr returns the SlsaAttestations value or an error if the edge was not loaded in eager-loading.

type BuilderGroupBy

type BuilderGroupBy struct {
	// contains filtered or unexported fields
}

BuilderGroupBy is the group-by builder for Builder entities.

func (*BuilderGroupBy) Aggregate

func (bgb *BuilderGroupBy) Aggregate(fns ...AggregateFunc) *BuilderGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*BuilderGroupBy) Bool

func (s *BuilderGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*BuilderGroupBy) BoolX

func (s *BuilderGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*BuilderGroupBy) Bools

func (s *BuilderGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*BuilderGroupBy) BoolsX

func (s *BuilderGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*BuilderGroupBy) Float64

func (s *BuilderGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*BuilderGroupBy) Float64X

func (s *BuilderGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*BuilderGroupBy) Float64s

func (s *BuilderGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*BuilderGroupBy) Float64sX

func (s *BuilderGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*BuilderGroupBy) Int

func (s *BuilderGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*BuilderGroupBy) IntX

func (s *BuilderGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*BuilderGroupBy) Ints

func (s *BuilderGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*BuilderGroupBy) IntsX

func (s *BuilderGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*BuilderGroupBy) Scan

func (bgb *BuilderGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*BuilderGroupBy) ScanX

func (s *BuilderGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*BuilderGroupBy) String

func (s *BuilderGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*BuilderGroupBy) StringX

func (s *BuilderGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*BuilderGroupBy) Strings

func (s *BuilderGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*BuilderGroupBy) StringsX

func (s *BuilderGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type BuilderMutation

type BuilderMutation struct {
	// contains filtered or unexported fields
}

BuilderMutation represents an operation that mutates the Builder nodes in the graph.

func (*BuilderMutation) AddField

func (m *BuilderMutation) AddField(name string, value ent.Value) error

AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*BuilderMutation) AddSlsaAttestationIDs

func (m *BuilderMutation) AddSlsaAttestationIDs(ids ...uuid.UUID)

AddSlsaAttestationIDs adds the "slsa_attestations" edge to the SLSAAttestation entity by ids.

func (*BuilderMutation) AddedEdges

func (m *BuilderMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*BuilderMutation) AddedField

func (m *BuilderMutation) AddedField(name string) (ent.Value, bool)

AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*BuilderMutation) AddedFields

func (m *BuilderMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*BuilderMutation) AddedIDs

func (m *BuilderMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*BuilderMutation) ClearEdge

func (m *BuilderMutation) ClearEdge(name string) error

ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.

func (*BuilderMutation) ClearField

func (m *BuilderMutation) ClearField(name string) error

ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.

func (*BuilderMutation) ClearSlsaAttestations

func (m *BuilderMutation) ClearSlsaAttestations()

ClearSlsaAttestations clears the "slsa_attestations" edge to the SLSAAttestation entity.

func (*BuilderMutation) ClearedEdges

func (m *BuilderMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*BuilderMutation) ClearedFields

func (m *BuilderMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (BuilderMutation) Client

func (m BuilderMutation) Client() *Client

Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.

func (*BuilderMutation) EdgeCleared

func (m *BuilderMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*BuilderMutation) Field

func (m *BuilderMutation) Field(name string) (ent.Value, bool)

Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*BuilderMutation) FieldCleared

func (m *BuilderMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*BuilderMutation) Fields

func (m *BuilderMutation) Fields() []string

Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().

func (*BuilderMutation) ID

func (m *BuilderMutation) ID() (id uuid.UUID, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*BuilderMutation) IDs

func (m *BuilderMutation) IDs(ctx context.Context) ([]uuid.UUID, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*BuilderMutation) OldField

func (m *BuilderMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*BuilderMutation) OldURI

func (m *BuilderMutation) OldURI(ctx context.Context) (v string, err error)

OldURI returns the old "uri" field's value of the Builder entity. If the Builder object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*BuilderMutation) Op

func (m *BuilderMutation) Op() Op

Op returns the operation name.

func (*BuilderMutation) RemoveSlsaAttestationIDs

func (m *BuilderMutation) RemoveSlsaAttestationIDs(ids ...uuid.UUID)

RemoveSlsaAttestationIDs removes the "slsa_attestations" edge to the SLSAAttestation entity by IDs.

func (*BuilderMutation) RemovedEdges

func (m *BuilderMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*BuilderMutation) RemovedIDs

func (m *BuilderMutation) RemovedIDs(name string) []ent.Value

RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.

func (*BuilderMutation) RemovedSlsaAttestationsIDs

func (m *BuilderMutation) RemovedSlsaAttestationsIDs() (ids []uuid.UUID)

RemovedSlsaAttestations returns the removed IDs of the "slsa_attestations" edge to the SLSAAttestation entity.

func (*BuilderMutation) ResetEdge

func (m *BuilderMutation) ResetEdge(name string) error

ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.

func (*BuilderMutation) ResetField

func (m *BuilderMutation) ResetField(name string) error

ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.

func (*BuilderMutation) ResetSlsaAttestations

func (m *BuilderMutation) ResetSlsaAttestations()

ResetSlsaAttestations resets all changes to the "slsa_attestations" edge.

func (*BuilderMutation) ResetURI

func (m *BuilderMutation) ResetURI()

ResetURI resets all changes to the "uri" field.

func (*BuilderMutation) SetField

func (m *BuilderMutation) SetField(name string, value ent.Value) error

SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*BuilderMutation) SetID added in v0.5.0

func (m *BuilderMutation) SetID(id uuid.UUID)

SetID sets the value of the id field. Note that this operation is only accepted on creation of Builder entities.

func (*BuilderMutation) SetOp

func (m *BuilderMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*BuilderMutation) SetURI

func (m *BuilderMutation) SetURI(s string)

SetURI sets the "uri" field.

func (*BuilderMutation) SlsaAttestationsCleared

func (m *BuilderMutation) SlsaAttestationsCleared() bool

SlsaAttestationsCleared reports if the "slsa_attestations" edge to the SLSAAttestation entity was cleared.

func (*BuilderMutation) SlsaAttestationsIDs

func (m *BuilderMutation) SlsaAttestationsIDs() (ids []uuid.UUID)

SlsaAttestationsIDs returns the "slsa_attestations" edge IDs in the mutation.

func (BuilderMutation) Tx

func (m BuilderMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*BuilderMutation) Type

func (m *BuilderMutation) Type() string

Type returns the node type of this mutation (Builder).

func (*BuilderMutation) URI

func (m *BuilderMutation) URI() (r string, exists bool)

URI returns the value of the "uri" field in the mutation.

func (*BuilderMutation) Where

func (m *BuilderMutation) Where(ps ...predicate.Builder)

Where appends a list predicates to the BuilderMutation builder.

func (*BuilderMutation) WhereP

func (m *BuilderMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the BuilderMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type BuilderOrder

type BuilderOrder struct {
	Direction OrderDirection     `json:"direction"`
	Field     *BuilderOrderField `json:"field"`
}

BuilderOrder defines the ordering of Builder.

type BuilderOrderField

type BuilderOrderField struct {
	// Value extracts the ordering value from the given Builder.
	Value func(*Builder) (ent.Value, error)
	// contains filtered or unexported fields
}

BuilderOrderField defines the ordering field of Builder.

type BuilderPaginateOption

type BuilderPaginateOption func(*builderPager) error

BuilderPaginateOption enables pagination customization.

func WithBuilderFilter

func WithBuilderFilter(filter func(*BuilderQuery) (*BuilderQuery, error)) BuilderPaginateOption

WithBuilderFilter configures pagination filter.

func WithBuilderOrder

func WithBuilderOrder(order *BuilderOrder) BuilderPaginateOption

WithBuilderOrder configures pagination ordering.

type BuilderQuery

type BuilderQuery struct {
	// contains filtered or unexported fields
}

BuilderQuery is the builder for querying Builder entities.

func (*BuilderQuery) Aggregate

func (bq *BuilderQuery) Aggregate(fns ...AggregateFunc) *BuilderSelect

Aggregate returns a BuilderSelect configured with the given aggregations.

func (*BuilderQuery) All

func (bq *BuilderQuery) All(ctx context.Context) ([]*Builder, error)

All executes the query and returns a list of Builders.

func (*BuilderQuery) AllX

func (bq *BuilderQuery) AllX(ctx context.Context) []*Builder

AllX is like All, but panics if an error occurs.

func (*BuilderQuery) Clone

func (bq *BuilderQuery) Clone() *BuilderQuery

Clone returns a duplicate of the BuilderQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*BuilderQuery) CollectFields

func (b *BuilderQuery) CollectFields(ctx context.Context, satisfies ...string) (*BuilderQuery, error)

CollectFields tells the query-builder to eagerly load connected nodes by resolver context.

func (*BuilderQuery) Count

func (bq *BuilderQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*BuilderQuery) CountX

func (bq *BuilderQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*BuilderQuery) Exist

func (bq *BuilderQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*BuilderQuery) ExistX

func (bq *BuilderQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*BuilderQuery) First

func (bq *BuilderQuery) First(ctx context.Context) (*Builder, error)

First returns the first Builder entity from the query. Returns a *NotFoundError when no Builder was found.

func (*BuilderQuery) FirstID

func (bq *BuilderQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)

FirstID returns the first Builder ID from the query. Returns a *NotFoundError when no Builder ID was found.

func (*BuilderQuery) FirstIDX

func (bq *BuilderQuery) FirstIDX(ctx context.Context) uuid.UUID

FirstIDX is like FirstID, but panics if an error occurs.

func (*BuilderQuery) FirstX

func (bq *BuilderQuery) FirstX(ctx context.Context) *Builder

FirstX is like First, but panics if an error occurs.

func (*BuilderQuery) GroupBy

func (bq *BuilderQuery) GroupBy(field string, fields ...string) *BuilderGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	URI string `json:"uri,omitempty"`
	Count int `json:"count,omitempty"`
}

client.Builder.Query().
	GroupBy(builder.FieldURI).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*BuilderQuery) IDs

func (bq *BuilderQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)

IDs executes the query and returns a list of Builder IDs.

func (*BuilderQuery) IDsX

func (bq *BuilderQuery) IDsX(ctx context.Context) []uuid.UUID

IDsX is like IDs, but panics if an error occurs.

func (*BuilderQuery) Limit

func (bq *BuilderQuery) Limit(limit int) *BuilderQuery

Limit the number of records to be returned by this query.

func (*BuilderQuery) Offset

func (bq *BuilderQuery) Offset(offset int) *BuilderQuery

Offset to start from.

func (*BuilderQuery) Only

func (bq *BuilderQuery) Only(ctx context.Context) (*Builder, error)

Only returns a single Builder entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Builder entity is found. Returns a *NotFoundError when no Builder entities are found.

func (*BuilderQuery) OnlyID

func (bq *BuilderQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)

OnlyID is like Only, but returns the only Builder ID in the query. Returns a *NotSingularError when more than one Builder ID is found. Returns a *NotFoundError when no entities are found.

func (*BuilderQuery) OnlyIDX

func (bq *BuilderQuery) OnlyIDX(ctx context.Context) uuid.UUID

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*BuilderQuery) OnlyX

func (bq *BuilderQuery) OnlyX(ctx context.Context) *Builder

OnlyX is like Only, but panics if an error occurs.

func (*BuilderQuery) Order

func (bq *BuilderQuery) Order(o ...builder.OrderOption) *BuilderQuery

Order specifies how the records should be ordered.

func (*BuilderQuery) Paginate

func (b *BuilderQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...BuilderPaginateOption,
) (*BuilderConnection, error)

Paginate executes the query and returns a relay based cursor connection to Builder.

func (*BuilderQuery) QuerySlsaAttestations

func (bq *BuilderQuery) QuerySlsaAttestations() *SLSAAttestationQuery

QuerySlsaAttestations chains the current query on the "slsa_attestations" edge.

func (*BuilderQuery) Select

func (bq *BuilderQuery) Select(fields ...string) *BuilderSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	URI string `json:"uri,omitempty"`
}

client.Builder.Query().
	Select(builder.FieldURI).
	Scan(ctx, &v)

func (*BuilderQuery) Unique

func (bq *BuilderQuery) Unique(unique bool) *BuilderQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*BuilderQuery) Where

func (bq *BuilderQuery) Where(ps ...predicate.Builder) *BuilderQuery

Where adds a new predicate for the BuilderQuery builder.

func (*BuilderQuery) WithNamedSlsaAttestations

func (bq *BuilderQuery) WithNamedSlsaAttestations(name string, opts ...func(*SLSAAttestationQuery)) *BuilderQuery

WithNamedSlsaAttestations tells the query-builder to eager-load the nodes that are connected to the "slsa_attestations" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*BuilderQuery) WithSlsaAttestations

func (bq *BuilderQuery) WithSlsaAttestations(opts ...func(*SLSAAttestationQuery)) *BuilderQuery

WithSlsaAttestations tells the query-builder to eager-load the nodes that are connected to the "slsa_attestations" edge. The optional arguments are used to configure the query builder of the edge.

type BuilderSelect

type BuilderSelect struct {
	*BuilderQuery
	// contains filtered or unexported fields
}

BuilderSelect is the builder for selecting fields of Builder entities.

func (*BuilderSelect) Aggregate

func (bs *BuilderSelect) Aggregate(fns ...AggregateFunc) *BuilderSelect

Aggregate adds the given aggregation functions to the selector query.

func (*BuilderSelect) Bool

func (s *BuilderSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*BuilderSelect) BoolX

func (s *BuilderSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*BuilderSelect) Bools

func (s *BuilderSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*BuilderSelect) BoolsX

func (s *BuilderSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*BuilderSelect) Float64

func (s *BuilderSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*BuilderSelect) Float64X

func (s *BuilderSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*BuilderSelect) Float64s

func (s *BuilderSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*BuilderSelect) Float64sX

func (s *BuilderSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*BuilderSelect) Int

func (s *BuilderSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*BuilderSelect) IntX

func (s *BuilderSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*BuilderSelect) Ints

func (s *BuilderSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*BuilderSelect) IntsX

func (s *BuilderSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*BuilderSelect) Scan

func (bs *BuilderSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*BuilderSelect) ScanX

func (s *BuilderSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*BuilderSelect) String

func (s *BuilderSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*BuilderSelect) StringX

func (s *BuilderSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*BuilderSelect) Strings

func (s *BuilderSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*BuilderSelect) StringsX

func (s *BuilderSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type BuilderUpdate

type BuilderUpdate struct {
	// contains filtered or unexported fields
}

BuilderUpdate is the builder for updating Builder entities.

func (*BuilderUpdate) AddSlsaAttestationIDs

func (bu *BuilderUpdate) AddSlsaAttestationIDs(ids ...uuid.UUID) *BuilderUpdate

AddSlsaAttestationIDs adds the "slsa_attestations" edge to the SLSAAttestation entity by IDs.

func (*BuilderUpdate) AddSlsaAttestations

func (bu *BuilderUpdate) AddSlsaAttestations(s ...*SLSAAttestation) *BuilderUpdate

AddSlsaAttestations adds the "slsa_attestations" edges to the SLSAAttestation entity.

func (*BuilderUpdate) ClearSlsaAttestations

func (bu *BuilderUpdate) ClearSlsaAttestations() *BuilderUpdate

ClearSlsaAttestations clears all "slsa_attestations" edges to the SLSAAttestation entity.

func (*BuilderUpdate) Exec

func (bu *BuilderUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*BuilderUpdate) ExecX

func (bu *BuilderUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*BuilderUpdate) Mutation

func (bu *BuilderUpdate) Mutation() *BuilderMutation

Mutation returns the BuilderMutation object of the builder.

func (*BuilderUpdate) RemoveSlsaAttestationIDs

func (bu *BuilderUpdate) RemoveSlsaAttestationIDs(ids ...uuid.UUID) *BuilderUpdate

RemoveSlsaAttestationIDs removes the "slsa_attestations" edge to SLSAAttestation entities by IDs.

func (*BuilderUpdate) RemoveSlsaAttestations

func (bu *BuilderUpdate) RemoveSlsaAttestations(s ...*SLSAAttestation) *BuilderUpdate

RemoveSlsaAttestations removes "slsa_attestations" edges to SLSAAttestation entities.

func (*BuilderUpdate) Save

func (bu *BuilderUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*BuilderUpdate) SaveX

func (bu *BuilderUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*BuilderUpdate) Where

func (bu *BuilderUpdate) Where(ps ...predicate.Builder) *BuilderUpdate

Where appends a list predicates to the BuilderUpdate builder.

type BuilderUpdateOne

type BuilderUpdateOne struct {
	// contains filtered or unexported fields
}

BuilderUpdateOne is the builder for updating a single Builder entity.

func (*BuilderUpdateOne) AddSlsaAttestationIDs

func (buo *BuilderUpdateOne) AddSlsaAttestationIDs(ids ...uuid.UUID) *BuilderUpdateOne

AddSlsaAttestationIDs adds the "slsa_attestations" edge to the SLSAAttestation entity by IDs.

func (*BuilderUpdateOne) AddSlsaAttestations

func (buo *BuilderUpdateOne) AddSlsaAttestations(s ...*SLSAAttestation) *BuilderUpdateOne

AddSlsaAttestations adds the "slsa_attestations" edges to the SLSAAttestation entity.

func (*BuilderUpdateOne) ClearSlsaAttestations

func (buo *BuilderUpdateOne) ClearSlsaAttestations() *BuilderUpdateOne

ClearSlsaAttestations clears all "slsa_attestations" edges to the SLSAAttestation entity.

func (*BuilderUpdateOne) Exec

func (buo *BuilderUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*BuilderUpdateOne) ExecX

func (buo *BuilderUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*BuilderUpdateOne) Mutation

func (buo *BuilderUpdateOne) Mutation() *BuilderMutation

Mutation returns the BuilderMutation object of the builder.

func (*BuilderUpdateOne) RemoveSlsaAttestationIDs

func (buo *BuilderUpdateOne) RemoveSlsaAttestationIDs(ids ...uuid.UUID) *BuilderUpdateOne

RemoveSlsaAttestationIDs removes the "slsa_attestations" edge to SLSAAttestation entities by IDs.

func (*BuilderUpdateOne) RemoveSlsaAttestations

func (buo *BuilderUpdateOne) RemoveSlsaAttestations(s ...*SLSAAttestation) *BuilderUpdateOne

RemoveSlsaAttestations removes "slsa_attestations" edges to SLSAAttestation entities.

func (*BuilderUpdateOne) Save

func (buo *BuilderUpdateOne) Save(ctx context.Context) (*Builder, error)

Save executes the query and returns the updated Builder entity.

func (*BuilderUpdateOne) SaveX

func (buo *BuilderUpdateOne) SaveX(ctx context.Context) *Builder

SaveX is like Save, but panics if an error occurs.

func (*BuilderUpdateOne) Select

func (buo *BuilderUpdateOne) Select(field string, fields ...string) *BuilderUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*BuilderUpdateOne) Where

Where appends a list predicates to the BuilderUpdate builder.

type BuilderUpsert

type BuilderUpsert struct {
	*sql.UpdateSet
}

BuilderUpsert is the "OnConflict" setter.

type BuilderUpsertBulk

type BuilderUpsertBulk struct {
	// contains filtered or unexported fields
}

BuilderUpsertBulk is the builder for "upsert"-ing a bulk of Builder nodes.

func (*BuilderUpsertBulk) DoNothing

func (u *BuilderUpsertBulk) DoNothing() *BuilderUpsertBulk

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*BuilderUpsertBulk) Exec

func (u *BuilderUpsertBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*BuilderUpsertBulk) ExecX

func (u *BuilderUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*BuilderUpsertBulk) Ignore

func (u *BuilderUpsertBulk) Ignore() *BuilderUpsertBulk

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Builder.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*BuilderUpsertBulk) Update

func (u *BuilderUpsertBulk) Update(set func(*BuilderUpsert)) *BuilderUpsertBulk

Update allows overriding fields `UPDATE` values. See the BuilderCreateBulk.OnConflict documentation for more info.

func (*BuilderUpsertBulk) UpdateNewValues

func (u *BuilderUpsertBulk) UpdateNewValues() *BuilderUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.Builder.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(builder.FieldID)
		}),
	).
	Exec(ctx)

type BuilderUpsertOne

type BuilderUpsertOne struct {
	// contains filtered or unexported fields
}

BuilderUpsertOne is the builder for "upsert"-ing

one Builder node.

func (*BuilderUpsertOne) DoNothing

func (u *BuilderUpsertOne) DoNothing() *BuilderUpsertOne

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*BuilderUpsertOne) Exec

func (u *BuilderUpsertOne) Exec(ctx context.Context) error

Exec executes the query.

func (*BuilderUpsertOne) ExecX

func (u *BuilderUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*BuilderUpsertOne) ID

func (u *BuilderUpsertOne) ID(ctx context.Context) (id uuid.UUID, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*BuilderUpsertOne) IDX

IDX is like ID, but panics if an error occurs.

func (*BuilderUpsertOne) Ignore

func (u *BuilderUpsertOne) Ignore() *BuilderUpsertOne

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Builder.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*BuilderUpsertOne) Update

func (u *BuilderUpsertOne) Update(set func(*BuilderUpsert)) *BuilderUpsertOne

Update allows overriding fields `UPDATE` values. See the BuilderCreate.OnConflict documentation for more info.

func (*BuilderUpsertOne) UpdateNewValues

func (u *BuilderUpsertOne) UpdateNewValues() *BuilderUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:

client.Builder.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(builder.FieldID)
		}),
	).
	Exec(ctx)

type Builders

type Builders []*Builder

Builders is a parsable slice of Builder.

type Certification

type Certification struct {

	// ID of the ent.
	ID uuid.UUID `json:"id,omitempty"`
	// SourceID holds the value of the "source_id" field.
	SourceID *uuid.UUID `json:"source_id,omitempty"`
	// PackageVersionID holds the value of the "package_version_id" field.
	PackageVersionID *uuid.UUID `json:"package_version_id,omitempty"`
	// PackageNameID holds the value of the "package_name_id" field.
	PackageNameID *uuid.UUID `json:"package_name_id,omitempty"`
	// ArtifactID holds the value of the "artifact_id" field.
	ArtifactID *uuid.UUID `json:"artifact_id,omitempty"`
	// Type holds the value of the "type" field.
	Type certification.Type `json:"type,omitempty"`
	// Justification holds the value of the "justification" field.
	Justification string `json:"justification,omitempty"`
	// KnownSince holds the value of the "known_since" field.
	KnownSince time.Time `json:"known_since,omitempty"`
	// Origin holds the value of the "origin" field.
	Origin string `json:"origin,omitempty"`
	// Collector holds the value of the "collector" field.
	Collector string `json:"collector,omitempty"`
	// DocumentRef holds the value of the "document_ref" field.
	DocumentRef string `json:"document_ref,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the CertificationQuery when eager-loading is set.
	Edges CertificationEdges `json:"edges"`
	// contains filtered or unexported fields
}

Certification is the model entity for the Certification schema.

func (*Certification) AllVersions

func (c *Certification) AllVersions(ctx context.Context) (*PackageName, error)

func (*Certification) Artifact

func (c *Certification) Artifact(ctx context.Context) (*Artifact, error)

func (*Certification) IsNode

func (n *Certification) IsNode()

IsNode implements the Node interface check for GQLGen.

func (*Certification) PackageVersion

func (c *Certification) PackageVersion(ctx context.Context) (*PackageVersion, error)

func (*Certification) QueryAllVersions

func (c *Certification) QueryAllVersions() *PackageNameQuery

QueryAllVersions queries the "all_versions" edge of the Certification entity.

func (*Certification) QueryArtifact

func (c *Certification) QueryArtifact() *ArtifactQuery

QueryArtifact queries the "artifact" edge of the Certification entity.

func (*Certification) QueryPackageVersion

func (c *Certification) QueryPackageVersion() *PackageVersionQuery

QueryPackageVersion queries the "package_version" edge of the Certification entity.

func (*Certification) QuerySource

func (c *Certification) QuerySource() *SourceNameQuery

QuerySource queries the "source" edge of the Certification entity.

func (*Certification) Source

func (c *Certification) Source(ctx context.Context) (*SourceName, error)

func (*Certification) String

func (c *Certification) String() string

String implements the fmt.Stringer.

func (*Certification) ToEdge

ToEdge converts Certification into CertificationEdge.

func (*Certification) Unwrap

func (c *Certification) Unwrap() *Certification

Unwrap unwraps the Certification entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.

func (*Certification) Update

Update returns a builder for updating this Certification. Note that you need to call Certification.Unwrap() before calling this method if this Certification was returned from a transaction, and the transaction was committed or rolled back.

func (*Certification) Value

func (c *Certification) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the Certification. This includes values selected through modifiers, order, etc.

type CertificationClient

type CertificationClient struct {
	// contains filtered or unexported fields
}

CertificationClient is a client for the Certification schema.

func NewCertificationClient

func NewCertificationClient(c config) *CertificationClient

NewCertificationClient returns a client for the Certification from the given config.

func (*CertificationClient) Create

Create returns a builder for creating a Certification entity.

func (*CertificationClient) CreateBulk

CreateBulk returns a builder for creating a bulk of Certification entities.

func (*CertificationClient) Delete

Delete returns a delete builder for Certification.

func (*CertificationClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*CertificationClient) DeleteOneID

DeleteOneID returns a builder for deleting the given entity by its id.

func (*CertificationClient) Get

Get returns a Certification entity by its id.

func (*CertificationClient) GetX

GetX is like Get, but panics if an error occurs.

func (*CertificationClient) Hooks

func (c *CertificationClient) Hooks() []Hook

Hooks returns the client hooks.

func (*CertificationClient) Intercept

func (c *CertificationClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `certification.Intercept(f(g(h())))`.

func (*CertificationClient) Interceptors

func (c *CertificationClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*CertificationClient) MapCreateBulk

func (c *CertificationClient) MapCreateBulk(slice any, setFunc func(*CertificationCreate, int)) *CertificationCreateBulk

MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.

func (*CertificationClient) Query

Query returns a query builder for Certification.

func (*CertificationClient) QueryAllVersions

func (c *CertificationClient) QueryAllVersions(ce *Certification) *PackageNameQuery

QueryAllVersions queries the all_versions edge of a Certification.

func (*CertificationClient) QueryArtifact

func (c *CertificationClient) QueryArtifact(ce *Certification) *ArtifactQuery

QueryArtifact queries the artifact edge of a Certification.

func (*CertificationClient) QueryPackageVersion

func (c *CertificationClient) QueryPackageVersion(ce *Certification) *PackageVersionQuery

QueryPackageVersion queries the package_version edge of a Certification.

func (*CertificationClient) QuerySource

func (c *CertificationClient) QuerySource(ce *Certification) *SourceNameQuery

QuerySource queries the source edge of a Certification.

func (*CertificationClient) Update

Update returns an update builder for Certification.

func (*CertificationClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*CertificationClient) UpdateOneID

UpdateOneID returns an update builder for the given id.

func (*CertificationClient) Use

func (c *CertificationClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `certification.Hooks(f(g(h())))`.

type CertificationConnection

type CertificationConnection struct {
	Edges      []*CertificationEdge `json:"edges"`
	PageInfo   PageInfo             `json:"pageInfo"`
	TotalCount int                  `json:"totalCount"`
}

CertificationConnection is the connection containing edges to Certification.

type CertificationCreate

type CertificationCreate struct {
	// contains filtered or unexported fields
}

CertificationCreate is the builder for creating a Certification entity.

func (*CertificationCreate) Exec

func (cc *CertificationCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*CertificationCreate) ExecX

func (cc *CertificationCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*CertificationCreate) Mutation

Mutation returns the CertificationMutation object of the builder.

func (*CertificationCreate) OnConflict

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.Certification.Create().
	SetSourceID(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.CertificationUpsert) {
		SetSourceID(v+v).
	}).
	Exec(ctx)

func (*CertificationCreate) OnConflictColumns

func (cc *CertificationCreate) OnConflictColumns(columns ...string) *CertificationUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.Certification.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*CertificationCreate) Save

Save creates the Certification in the database.

func (*CertificationCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*CertificationCreate) SetAllVersions

func (cc *CertificationCreate) SetAllVersions(p *PackageName) *CertificationCreate

SetAllVersions sets the "all_versions" edge to the PackageName entity.

func (*CertificationCreate) SetAllVersionsID

func (cc *CertificationCreate) SetAllVersionsID(id uuid.UUID) *CertificationCreate

SetAllVersionsID sets the "all_versions" edge to the PackageName entity by ID.

func (*CertificationCreate) SetArtifact

func (cc *CertificationCreate) SetArtifact(a *Artifact) *CertificationCreate

SetArtifact sets the "artifact" edge to the Artifact entity.

func (*CertificationCreate) SetArtifactID

func (cc *CertificationCreate) SetArtifactID(u uuid.UUID) *CertificationCreate

SetArtifactID sets the "artifact_id" field.

func (*CertificationCreate) SetCollector

func (cc *CertificationCreate) SetCollector(s string) *CertificationCreate

SetCollector sets the "collector" field.

func (*CertificationCreate) SetDocumentRef added in v0.6.0

func (cc *CertificationCreate) SetDocumentRef(s string) *CertificationCreate

SetDocumentRef sets the "document_ref" field.

func (*CertificationCreate) SetID added in v0.5.0

SetID sets the "id" field.

func (*CertificationCreate) SetJustification

func (cc *CertificationCreate) SetJustification(s string) *CertificationCreate

SetJustification sets the "justification" field.

func (*CertificationCreate) SetKnownSince added in v0.4.0

func (cc *CertificationCreate) SetKnownSince(t time.Time) *CertificationCreate

SetKnownSince sets the "known_since" field.

func (*CertificationCreate) SetNillableAllVersionsID

func (cc *CertificationCreate) SetNillableAllVersionsID(id *uuid.UUID) *CertificationCreate

SetNillableAllVersionsID sets the "all_versions" edge to the PackageName entity by ID if the given value is not nil.

func (*CertificationCreate) SetNillableArtifactID

func (cc *CertificationCreate) SetNillableArtifactID(u *uuid.UUID) *CertificationCreate

SetNillableArtifactID sets the "artifact_id" field if the given value is not nil.

func (*CertificationCreate) SetNillableID added in v0.5.0

func (cc *CertificationCreate) SetNillableID(u *uuid.UUID) *CertificationCreate

SetNillableID sets the "id" field if the given value is not nil.

func (*CertificationCreate) SetNillablePackageNameID

func (cc *CertificationCreate) SetNillablePackageNameID(u *uuid.UUID) *CertificationCreate

SetNillablePackageNameID sets the "package_name_id" field if the given value is not nil.

func (*CertificationCreate) SetNillablePackageVersionID

func (cc *CertificationCreate) SetNillablePackageVersionID(u *uuid.UUID) *CertificationCreate

SetNillablePackageVersionID sets the "package_version_id" field if the given value is not nil.

func (*CertificationCreate) SetNillableSourceID

func (cc *CertificationCreate) SetNillableSourceID(u *uuid.UUID) *CertificationCreate

SetNillableSourceID sets the "source_id" field if the given value is not nil.

func (*CertificationCreate) SetNillableType

func (cc *CertificationCreate) SetNillableType(c *certification.Type) *CertificationCreate

SetNillableType sets the "type" field if the given value is not nil.

func (*CertificationCreate) SetOrigin

SetOrigin sets the "origin" field.

func (*CertificationCreate) SetPackageNameID

func (cc *CertificationCreate) SetPackageNameID(u uuid.UUID) *CertificationCreate

SetPackageNameID sets the "package_name_id" field.

func (*CertificationCreate) SetPackageVersion

func (cc *CertificationCreate) SetPackageVersion(p *PackageVersion) *CertificationCreate

SetPackageVersion sets the "package_version" edge to the PackageVersion entity.

func (*CertificationCreate) SetPackageVersionID

func (cc *CertificationCreate) SetPackageVersionID(u uuid.UUID) *CertificationCreate

SetPackageVersionID sets the "package_version_id" field.

func (*CertificationCreate) SetSource

SetSource sets the "source" edge to the SourceName entity.

func (*CertificationCreate) SetSourceID

func (cc *CertificationCreate) SetSourceID(u uuid.UUID) *CertificationCreate

SetSourceID sets the "source_id" field.

func (*CertificationCreate) SetType

SetType sets the "type" field.

type CertificationCreateBulk

type CertificationCreateBulk struct {
	// contains filtered or unexported fields
}

CertificationCreateBulk is the builder for creating many Certification entities in bulk.

func (*CertificationCreateBulk) Exec

Exec executes the query.

func (*CertificationCreateBulk) ExecX

func (ccb *CertificationCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*CertificationCreateBulk) OnConflict

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.Certification.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.CertificationUpsert) {
		SetSourceID(v+v).
	}).
	Exec(ctx)

func (*CertificationCreateBulk) OnConflictColumns

func (ccb *CertificationCreateBulk) OnConflictColumns(columns ...string) *CertificationUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.Certification.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*CertificationCreateBulk) Save

Save creates the Certification entities in the database.

func (*CertificationCreateBulk) SaveX

SaveX is like Save, but panics if an error occurs.

type CertificationDelete

type CertificationDelete struct {
	// contains filtered or unexported fields
}

CertificationDelete is the builder for deleting a Certification entity.

func (*CertificationDelete) Exec

func (cd *CertificationDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*CertificationDelete) ExecX

func (cd *CertificationDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*CertificationDelete) Where

Where appends a list predicates to the CertificationDelete builder.

type CertificationDeleteOne

type CertificationDeleteOne struct {
	// contains filtered or unexported fields
}

CertificationDeleteOne is the builder for deleting a single Certification entity.

func (*CertificationDeleteOne) Exec

Exec executes the deletion query.

func (*CertificationDeleteOne) ExecX

func (cdo *CertificationDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*CertificationDeleteOne) Where

Where appends a list predicates to the CertificationDelete builder.

type CertificationEdge

type CertificationEdge struct {
	Node   *Certification `json:"node"`
	Cursor Cursor         `json:"cursor"`
}

CertificationEdge is the edge representation of Certification.

type CertificationEdges

type CertificationEdges struct {
	// Source holds the value of the source edge.
	Source *SourceName `json:"source,omitempty"`
	// PackageVersion holds the value of the package_version edge.
	PackageVersion *PackageVersion `json:"package_version,omitempty"`
	// AllVersions holds the value of the all_versions edge.
	AllVersions *PackageName `json:"all_versions,omitempty"`
	// Artifact holds the value of the artifact edge.
	Artifact *Artifact `json:"artifact,omitempty"`
	// contains filtered or unexported fields
}

CertificationEdges holds the relations/edges for other nodes in the graph.

func (CertificationEdges) AllVersionsOrErr

func (e CertificationEdges) AllVersionsOrErr() (*PackageName, error)

AllVersionsOrErr returns the AllVersions value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (CertificationEdges) ArtifactOrErr

func (e CertificationEdges) ArtifactOrErr() (*Artifact, error)

ArtifactOrErr returns the Artifact value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (CertificationEdges) PackageVersionOrErr

func (e CertificationEdges) PackageVersionOrErr() (*PackageVersion, error)

PackageVersionOrErr returns the PackageVersion value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (CertificationEdges) SourceOrErr

func (e CertificationEdges) SourceOrErr() (*SourceName, error)

SourceOrErr returns the Source value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type CertificationGroupBy

type CertificationGroupBy struct {
	// contains filtered or unexported fields
}

CertificationGroupBy is the group-by builder for Certification entities.

func (*CertificationGroupBy) Aggregate

Aggregate adds the given aggregation functions to the group-by query.

func (*CertificationGroupBy) Bool

func (s *CertificationGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*CertificationGroupBy) BoolX

func (s *CertificationGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*CertificationGroupBy) Bools

func (s *CertificationGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*CertificationGroupBy) BoolsX

func (s *CertificationGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*CertificationGroupBy) Float64

func (s *CertificationGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*CertificationGroupBy) Float64X

func (s *CertificationGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*CertificationGroupBy) Float64s

func (s *CertificationGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*CertificationGroupBy) Float64sX

func (s *CertificationGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*CertificationGroupBy) Int

func (s *CertificationGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*CertificationGroupBy) IntX

func (s *CertificationGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*CertificationGroupBy) Ints

func (s *CertificationGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*CertificationGroupBy) IntsX

func (s *CertificationGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*CertificationGroupBy) Scan

func (cgb *CertificationGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*CertificationGroupBy) ScanX

func (s *CertificationGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*CertificationGroupBy) String

func (s *CertificationGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*CertificationGroupBy) StringX

func (s *CertificationGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*CertificationGroupBy) Strings

func (s *CertificationGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*CertificationGroupBy) StringsX

func (s *CertificationGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type CertificationMutation

type CertificationMutation struct {
	// contains filtered or unexported fields
}

CertificationMutation represents an operation that mutates the Certification nodes in the graph.

func (*CertificationMutation) AddField

func (m *CertificationMutation) AddField(name string, value ent.Value) error

AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*CertificationMutation) AddedEdges

func (m *CertificationMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*CertificationMutation) AddedField

func (m *CertificationMutation) AddedField(name string) (ent.Value, bool)

AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*CertificationMutation) AddedFields

func (m *CertificationMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*CertificationMutation) AddedIDs

func (m *CertificationMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*CertificationMutation) AllVersionsCleared

func (m *CertificationMutation) AllVersionsCleared() bool

AllVersionsCleared reports if the "all_versions" edge to the PackageName entity was cleared.

func (*CertificationMutation) AllVersionsID

func (m *CertificationMutation) AllVersionsID() (id uuid.UUID, exists bool)

AllVersionsID returns the "all_versions" edge ID in the mutation.

func (*CertificationMutation) AllVersionsIDs

func (m *CertificationMutation) AllVersionsIDs() (ids []uuid.UUID)

AllVersionsIDs returns the "all_versions" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use AllVersionsID instead. It exists only for internal usage by the builders.

func (*CertificationMutation) ArtifactCleared

func (m *CertificationMutation) ArtifactCleared() bool

ArtifactCleared reports if the "artifact" edge to the Artifact entity was cleared.

func (*CertificationMutation) ArtifactID

func (m *CertificationMutation) ArtifactID() (r uuid.UUID, exists bool)

ArtifactID returns the value of the "artifact_id" field in the mutation.

func (*CertificationMutation) ArtifactIDCleared

func (m *CertificationMutation) ArtifactIDCleared() bool

ArtifactIDCleared returns if the "artifact_id" field was cleared in this mutation.

func (*CertificationMutation) ArtifactIDs

func (m *CertificationMutation) ArtifactIDs() (ids []uuid.UUID)

ArtifactIDs returns the "artifact" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use ArtifactID instead. It exists only for internal usage by the builders.

func (*CertificationMutation) ClearAllVersions

func (m *CertificationMutation) ClearAllVersions()

ClearAllVersions clears the "all_versions" edge to the PackageName entity.

func (*CertificationMutation) ClearArtifact

func (m *CertificationMutation) ClearArtifact()

ClearArtifact clears the "artifact" edge to the Artifact entity.

func (*CertificationMutation) ClearArtifactID

func (m *CertificationMutation) ClearArtifactID()

ClearArtifactID clears the value of the "artifact_id" field.

func (*CertificationMutation) ClearEdge

func (m *CertificationMutation) ClearEdge(name string) error

ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.

func (*CertificationMutation) ClearField

func (m *CertificationMutation) ClearField(name string) error

ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.

func (*CertificationMutation) ClearPackageNameID

func (m *CertificationMutation) ClearPackageNameID()

ClearPackageNameID clears the value of the "package_name_id" field.

func (*CertificationMutation) ClearPackageVersion

func (m *CertificationMutation) ClearPackageVersion()

ClearPackageVersion clears the "package_version" edge to the PackageVersion entity.

func (*CertificationMutation) ClearPackageVersionID

func (m *CertificationMutation) ClearPackageVersionID()

ClearPackageVersionID clears the value of the "package_version_id" field.

func (*CertificationMutation) ClearSource

func (m *CertificationMutation) ClearSource()

ClearSource clears the "source" edge to the SourceName entity.

func (*CertificationMutation) ClearSourceID

func (m *CertificationMutation) ClearSourceID()

ClearSourceID clears the value of the "source_id" field.

func (*CertificationMutation) ClearedEdges

func (m *CertificationMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*CertificationMutation) ClearedFields

func (m *CertificationMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (CertificationMutation) Client

func (m CertificationMutation) Client() *Client

Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.

func (*CertificationMutation) Collector

func (m *CertificationMutation) Collector() (r string, exists bool)

Collector returns the value of the "collector" field in the mutation.

func (*CertificationMutation) DocumentRef added in v0.6.0

func (m *CertificationMutation) DocumentRef() (r string, exists bool)

DocumentRef returns the value of the "document_ref" field in the mutation.

func (*CertificationMutation) EdgeCleared

func (m *CertificationMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*CertificationMutation) Field

func (m *CertificationMutation) Field(name string) (ent.Value, bool)

Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*CertificationMutation) FieldCleared

func (m *CertificationMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*CertificationMutation) Fields

func (m *CertificationMutation) Fields() []string

Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().

func (*CertificationMutation) GetType

func (m *CertificationMutation) GetType() (r certification.Type, exists bool)

GetType returns the value of the "type" field in the mutation.

func (*CertificationMutation) ID

func (m *CertificationMutation) ID() (id uuid.UUID, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*CertificationMutation) IDs

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*CertificationMutation) Justification

func (m *CertificationMutation) Justification() (r string, exists bool)

Justification returns the value of the "justification" field in the mutation.

func (*CertificationMutation) KnownSince added in v0.4.0

func (m *CertificationMutation) KnownSince() (r time.Time, exists bool)

KnownSince returns the value of the "known_since" field in the mutation.

func (*CertificationMutation) OldArtifactID

func (m *CertificationMutation) OldArtifactID(ctx context.Context) (v *uuid.UUID, err error)

OldArtifactID returns the old "artifact_id" field's value of the Certification entity. If the Certification object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*CertificationMutation) OldCollector

func (m *CertificationMutation) OldCollector(ctx context.Context) (v string, err error)

OldCollector returns the old "collector" field's value of the Certification entity. If the Certification object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*CertificationMutation) OldDocumentRef added in v0.6.0

func (m *CertificationMutation) OldDocumentRef(ctx context.Context) (v string, err error)

OldDocumentRef returns the old "document_ref" field's value of the Certification entity. If the Certification object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*CertificationMutation) OldField

func (m *CertificationMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*CertificationMutation) OldJustification

func (m *CertificationMutation) OldJustification(ctx context.Context) (v string, err error)

OldJustification returns the old "justification" field's value of the Certification entity. If the Certification object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*CertificationMutation) OldKnownSince added in v0.4.0

func (m *CertificationMutation) OldKnownSince(ctx context.Context) (v time.Time, err error)

OldKnownSince returns the old "known_since" field's value of the Certification entity. If the Certification object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*CertificationMutation) OldOrigin

func (m *CertificationMutation) OldOrigin(ctx context.Context) (v string, err error)

OldOrigin returns the old "origin" field's value of the Certification entity. If the Certification object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*CertificationMutation) OldPackageNameID

func (m *CertificationMutation) OldPackageNameID(ctx context.Context) (v *uuid.UUID, err error)

OldPackageNameID returns the old "package_name_id" field's value of the Certification entity. If the Certification object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*CertificationMutation) OldPackageVersionID

func (m *CertificationMutation) OldPackageVersionID(ctx context.Context) (v *uuid.UUID, err error)

OldPackageVersionID returns the old "package_version_id" field's value of the Certification entity. If the Certification object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*CertificationMutation) OldSourceID

func (m *CertificationMutation) OldSourceID(ctx context.Context) (v *uuid.UUID, err error)

OldSourceID returns the old "source_id" field's value of the Certification entity. If the Certification object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*CertificationMutation) OldType

func (m *CertificationMutation) OldType(ctx context.Context) (v certification.Type, err error)

OldType returns the old "type" field's value of the Certification entity. If the Certification object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*CertificationMutation) Op

func (m *CertificationMutation) Op() Op

Op returns the operation name.

func (*CertificationMutation) Origin

func (m *CertificationMutation) Origin() (r string, exists bool)

Origin returns the value of the "origin" field in the mutation.

func (*CertificationMutation) PackageNameID

func (m *CertificationMutation) PackageNameID() (r uuid.UUID, exists bool)

PackageNameID returns the value of the "package_name_id" field in the mutation.

func (*CertificationMutation) PackageNameIDCleared

func (m *CertificationMutation) PackageNameIDCleared() bool

PackageNameIDCleared returns if the "package_name_id" field was cleared in this mutation.

func (*CertificationMutation) PackageVersionCleared

func (m *CertificationMutation) PackageVersionCleared() bool

PackageVersionCleared reports if the "package_version" edge to the PackageVersion entity was cleared.

func (*CertificationMutation) PackageVersionID

func (m *CertificationMutation) PackageVersionID() (r uuid.UUID, exists bool)

PackageVersionID returns the value of the "package_version_id" field in the mutation.

func (*CertificationMutation) PackageVersionIDCleared

func (m *CertificationMutation) PackageVersionIDCleared() bool

PackageVersionIDCleared returns if the "package_version_id" field was cleared in this mutation.

func (*CertificationMutation) PackageVersionIDs

func (m *CertificationMutation) PackageVersionIDs() (ids []uuid.UUID)

PackageVersionIDs returns the "package_version" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use PackageVersionID instead. It exists only for internal usage by the builders.

func (*CertificationMutation) RemovedEdges

func (m *CertificationMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*CertificationMutation) RemovedIDs

func (m *CertificationMutation) RemovedIDs(name string) []ent.Value

RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.

func (*CertificationMutation) ResetAllVersions

func (m *CertificationMutation) ResetAllVersions()

ResetAllVersions resets all changes to the "all_versions" edge.

func (*CertificationMutation) ResetArtifact

func (m *CertificationMutation) ResetArtifact()

ResetArtifact resets all changes to the "artifact" edge.

func (*CertificationMutation) ResetArtifactID

func (m *CertificationMutation) ResetArtifactID()

ResetArtifactID resets all changes to the "artifact_id" field.

func (*CertificationMutation) ResetCollector

func (m *CertificationMutation) ResetCollector()

ResetCollector resets all changes to the "collector" field.

func (*CertificationMutation) ResetDocumentRef added in v0.6.0

func (m *CertificationMutation) ResetDocumentRef()

ResetDocumentRef resets all changes to the "document_ref" field.

func (*CertificationMutation) ResetEdge

func (m *CertificationMutation) ResetEdge(name string) error

ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.

func (*CertificationMutation) ResetField

func (m *CertificationMutation) ResetField(name string) error

ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.

func (*CertificationMutation) ResetJustification

func (m *CertificationMutation) ResetJustification()

ResetJustification resets all changes to the "justification" field.

func (*CertificationMutation) ResetKnownSince added in v0.4.0

func (m *CertificationMutation) ResetKnownSince()

ResetKnownSince resets all changes to the "known_since" field.

func (*CertificationMutation) ResetOrigin

func (m *CertificationMutation) ResetOrigin()

ResetOrigin resets all changes to the "origin" field.

func (*CertificationMutation) ResetPackageNameID

func (m *CertificationMutation) ResetPackageNameID()

ResetPackageNameID resets all changes to the "package_name_id" field.

func (*CertificationMutation) ResetPackageVersion

func (m *CertificationMutation) ResetPackageVersion()

ResetPackageVersion resets all changes to the "package_version" edge.

func (*CertificationMutation) ResetPackageVersionID

func (m *CertificationMutation) ResetPackageVersionID()

ResetPackageVersionID resets all changes to the "package_version_id" field.

func (*CertificationMutation) ResetSource

func (m *CertificationMutation) ResetSource()

ResetSource resets all changes to the "source" edge.

func (*CertificationMutation) ResetSourceID

func (m *CertificationMutation) ResetSourceID()

ResetSourceID resets all changes to the "source_id" field.

func (*CertificationMutation) ResetType

func (m *CertificationMutation) ResetType()

ResetType resets all changes to the "type" field.

func (*CertificationMutation) SetAllVersionsID

func (m *CertificationMutation) SetAllVersionsID(id uuid.UUID)

SetAllVersionsID sets the "all_versions" edge to the PackageName entity by id.

func (*CertificationMutation) SetArtifactID

func (m *CertificationMutation) SetArtifactID(u uuid.UUID)

SetArtifactID sets the "artifact_id" field.

func (*CertificationMutation) SetCollector

func (m *CertificationMutation) SetCollector(s string)

SetCollector sets the "collector" field.

func (*CertificationMutation) SetDocumentRef added in v0.6.0

func (m *CertificationMutation) SetDocumentRef(s string)

SetDocumentRef sets the "document_ref" field.

func (*CertificationMutation) SetField

func (m *CertificationMutation) SetField(name string, value ent.Value) error

SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*CertificationMutation) SetID added in v0.5.0

func (m *CertificationMutation) SetID(id uuid.UUID)

SetID sets the value of the id field. Note that this operation is only accepted on creation of Certification entities.

func (*CertificationMutation) SetJustification

func (m *CertificationMutation) SetJustification(s string)

SetJustification sets the "justification" field.

func (*CertificationMutation) SetKnownSince added in v0.4.0

func (m *CertificationMutation) SetKnownSince(t time.Time)

SetKnownSince sets the "known_since" field.

func (*CertificationMutation) SetOp

func (m *CertificationMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*CertificationMutation) SetOrigin

func (m *CertificationMutation) SetOrigin(s string)

SetOrigin sets the "origin" field.

func (*CertificationMutation) SetPackageNameID

func (m *CertificationMutation) SetPackageNameID(u uuid.UUID)

SetPackageNameID sets the "package_name_id" field.

func (*CertificationMutation) SetPackageVersionID

func (m *CertificationMutation) SetPackageVersionID(u uuid.UUID)

SetPackageVersionID sets the "package_version_id" field.

func (*CertificationMutation) SetSourceID

func (m *CertificationMutation) SetSourceID(u uuid.UUID)

SetSourceID sets the "source_id" field.

func (*CertificationMutation) SetType

SetType sets the "type" field.

func (*CertificationMutation) SourceCleared

func (m *CertificationMutation) SourceCleared() bool

SourceCleared reports if the "source" edge to the SourceName entity was cleared.

func (*CertificationMutation) SourceID

func (m *CertificationMutation) SourceID() (r uuid.UUID, exists bool)

SourceID returns the value of the "source_id" field in the mutation.

func (*CertificationMutation) SourceIDCleared

func (m *CertificationMutation) SourceIDCleared() bool

SourceIDCleared returns if the "source_id" field was cleared in this mutation.

func (*CertificationMutation) SourceIDs

func (m *CertificationMutation) SourceIDs() (ids []uuid.UUID)

SourceIDs returns the "source" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use SourceID instead. It exists only for internal usage by the builders.

func (CertificationMutation) Tx

func (m CertificationMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*CertificationMutation) Type

func (m *CertificationMutation) Type() string

Type returns the node type of this mutation (Certification).

func (*CertificationMutation) Where

Where appends a list predicates to the CertificationMutation builder.

func (*CertificationMutation) WhereP

func (m *CertificationMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the CertificationMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type CertificationOrder

type CertificationOrder struct {
	Direction OrderDirection           `json:"direction"`
	Field     *CertificationOrderField `json:"field"`
}

CertificationOrder defines the ordering of Certification.

type CertificationOrderField

type CertificationOrderField struct {
	// Value extracts the ordering value from the given Certification.
	Value func(*Certification) (ent.Value, error)
	// contains filtered or unexported fields
}

CertificationOrderField defines the ordering field of Certification.

type CertificationPaginateOption

type CertificationPaginateOption func(*certificationPager) error

CertificationPaginateOption enables pagination customization.

func WithCertificationFilter

func WithCertificationFilter(filter func(*CertificationQuery) (*CertificationQuery, error)) CertificationPaginateOption

WithCertificationFilter configures pagination filter.

func WithCertificationOrder

func WithCertificationOrder(order *CertificationOrder) CertificationPaginateOption

WithCertificationOrder configures pagination ordering.

type CertificationQuery

type CertificationQuery struct {
	// contains filtered or unexported fields
}

CertificationQuery is the builder for querying Certification entities.

func (*CertificationQuery) Aggregate

func (cq *CertificationQuery) Aggregate(fns ...AggregateFunc) *CertificationSelect

Aggregate returns a CertificationSelect configured with the given aggregations.

func (*CertificationQuery) All

All executes the query and returns a list of Certifications.

func (*CertificationQuery) AllX

AllX is like All, but panics if an error occurs.

func (*CertificationQuery) Clone

Clone returns a duplicate of the CertificationQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*CertificationQuery) CollectFields

func (c *CertificationQuery) CollectFields(ctx context.Context, satisfies ...string) (*CertificationQuery, error)

CollectFields tells the query-builder to eagerly load connected nodes by resolver context.

func (*CertificationQuery) Count

func (cq *CertificationQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*CertificationQuery) CountX

func (cq *CertificationQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*CertificationQuery) Exist

func (cq *CertificationQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*CertificationQuery) ExistX

func (cq *CertificationQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*CertificationQuery) First

First returns the first Certification entity from the query. Returns a *NotFoundError when no Certification was found.

func (*CertificationQuery) FirstID

func (cq *CertificationQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)

FirstID returns the first Certification ID from the query. Returns a *NotFoundError when no Certification ID was found.

func (*CertificationQuery) FirstIDX

func (cq *CertificationQuery) FirstIDX(ctx context.Context) uuid.UUID

FirstIDX is like FirstID, but panics if an error occurs.

func (*CertificationQuery) FirstX

FirstX is like First, but panics if an error occurs.

func (*CertificationQuery) GroupBy

func (cq *CertificationQuery) GroupBy(field string, fields ...string) *CertificationGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	SourceID uuid.UUID `json:"source_id,omitempty"`
	Count int `json:"count,omitempty"`
}

client.Certification.Query().
	GroupBy(certification.FieldSourceID).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*CertificationQuery) IDs

func (cq *CertificationQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)

IDs executes the query and returns a list of Certification IDs.

func (*CertificationQuery) IDsX

func (cq *CertificationQuery) IDsX(ctx context.Context) []uuid.UUID

IDsX is like IDs, but panics if an error occurs.

func (*CertificationQuery) Limit

func (cq *CertificationQuery) Limit(limit int) *CertificationQuery

Limit the number of records to be returned by this query.

func (*CertificationQuery) Offset

func (cq *CertificationQuery) Offset(offset int) *CertificationQuery

Offset to start from.

func (*CertificationQuery) Only

Only returns a single Certification entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Certification entity is found. Returns a *NotFoundError when no Certification entities are found.

func (*CertificationQuery) OnlyID

func (cq *CertificationQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)

OnlyID is like Only, but returns the only Certification ID in the query. Returns a *NotSingularError when more than one Certification ID is found. Returns a *NotFoundError when no entities are found.

func (*CertificationQuery) OnlyIDX

func (cq *CertificationQuery) OnlyIDX(ctx context.Context) uuid.UUID

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*CertificationQuery) OnlyX

OnlyX is like Only, but panics if an error occurs.

func (*CertificationQuery) Order

Order specifies how the records should be ordered.

func (*CertificationQuery) Paginate

func (c *CertificationQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...CertificationPaginateOption,
) (*CertificationConnection, error)

Paginate executes the query and returns a relay based cursor connection to Certification.

func (*CertificationQuery) QueryAllVersions

func (cq *CertificationQuery) QueryAllVersions() *PackageNameQuery

QueryAllVersions chains the current query on the "all_versions" edge.

func (*CertificationQuery) QueryArtifact

func (cq *CertificationQuery) QueryArtifact() *ArtifactQuery

QueryArtifact chains the current query on the "artifact" edge.

func (*CertificationQuery) QueryPackageVersion

func (cq *CertificationQuery) QueryPackageVersion() *PackageVersionQuery

QueryPackageVersion chains the current query on the "package_version" edge.

func (*CertificationQuery) QuerySource

func (cq *CertificationQuery) QuerySource() *SourceNameQuery

QuerySource chains the current query on the "source" edge.

func (*CertificationQuery) Select

func (cq *CertificationQuery) Select(fields ...string) *CertificationSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	SourceID uuid.UUID `json:"source_id,omitempty"`
}

client.Certification.Query().
	Select(certification.FieldSourceID).
	Scan(ctx, &v)

func (*CertificationQuery) Unique

func (cq *CertificationQuery) Unique(unique bool) *CertificationQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*CertificationQuery) Where

Where adds a new predicate for the CertificationQuery builder.

func (*CertificationQuery) WithAllVersions

func (cq *CertificationQuery) WithAllVersions(opts ...func(*PackageNameQuery)) *CertificationQuery

WithAllVersions tells the query-builder to eager-load the nodes that are connected to the "all_versions" edge. The optional arguments are used to configure the query builder of the edge.

func (*CertificationQuery) WithArtifact

func (cq *CertificationQuery) WithArtifact(opts ...func(*ArtifactQuery)) *CertificationQuery

WithArtifact tells the query-builder to eager-load the nodes that are connected to the "artifact" edge. The optional arguments are used to configure the query builder of the edge.

func (*CertificationQuery) WithPackageVersion

func (cq *CertificationQuery) WithPackageVersion(opts ...func(*PackageVersionQuery)) *CertificationQuery

WithPackageVersion tells the query-builder to eager-load the nodes that are connected to the "package_version" edge. The optional arguments are used to configure the query builder of the edge.

func (*CertificationQuery) WithSource

func (cq *CertificationQuery) WithSource(opts ...func(*SourceNameQuery)) *CertificationQuery

WithSource tells the query-builder to eager-load the nodes that are connected to the "source" edge. The optional arguments are used to configure the query builder of the edge.

type CertificationSelect

type CertificationSelect struct {
	*CertificationQuery
	// contains filtered or unexported fields
}

CertificationSelect is the builder for selecting fields of Certification entities.

func (*CertificationSelect) Aggregate

func (cs *CertificationSelect) Aggregate(fns ...AggregateFunc) *CertificationSelect

Aggregate adds the given aggregation functions to the selector query.

func (*CertificationSelect) Bool

func (s *CertificationSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*CertificationSelect) BoolX

func (s *CertificationSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*CertificationSelect) Bools

func (s *CertificationSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*CertificationSelect) BoolsX

func (s *CertificationSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*CertificationSelect) Float64

func (s *CertificationSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*CertificationSelect) Float64X

func (s *CertificationSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*CertificationSelect) Float64s

func (s *CertificationSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*CertificationSelect) Float64sX

func (s *CertificationSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*CertificationSelect) Int

func (s *CertificationSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*CertificationSelect) IntX

func (s *CertificationSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*CertificationSelect) Ints

func (s *CertificationSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*CertificationSelect) IntsX

func (s *CertificationSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*CertificationSelect) Scan

func (cs *CertificationSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*CertificationSelect) ScanX

func (s *CertificationSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*CertificationSelect) String

func (s *CertificationSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*CertificationSelect) StringX

func (s *CertificationSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*CertificationSelect) Strings

func (s *CertificationSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*CertificationSelect) StringsX

func (s *CertificationSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type CertificationUpdate

type CertificationUpdate struct {
	// contains filtered or unexported fields
}

CertificationUpdate is the builder for updating Certification entities.

func (*CertificationUpdate) ClearAllVersions

func (cu *CertificationUpdate) ClearAllVersions() *CertificationUpdate

ClearAllVersions clears the "all_versions" edge to the PackageName entity.

func (*CertificationUpdate) ClearArtifact

func (cu *CertificationUpdate) ClearArtifact() *CertificationUpdate

ClearArtifact clears the "artifact" edge to the Artifact entity.

func (*CertificationUpdate) ClearArtifactID

func (cu *CertificationUpdate) ClearArtifactID() *CertificationUpdate

ClearArtifactID clears the value of the "artifact_id" field.

func (*CertificationUpdate) ClearPackageNameID

func (cu *CertificationUpdate) ClearPackageNameID() *CertificationUpdate

ClearPackageNameID clears the value of the "package_name_id" field.

func (*CertificationUpdate) ClearPackageVersion

func (cu *CertificationUpdate) ClearPackageVersion() *CertificationUpdate

ClearPackageVersion clears the "package_version" edge to the PackageVersion entity.

func (*CertificationUpdate) ClearPackageVersionID

func (cu *CertificationUpdate) ClearPackageVersionID() *CertificationUpdate

ClearPackageVersionID clears the value of the "package_version_id" field.

func (*CertificationUpdate) ClearSource

func (cu *CertificationUpdate) ClearSource() *CertificationUpdate

ClearSource clears the "source" edge to the SourceName entity.

func (*CertificationUpdate) ClearSourceID

func (cu *CertificationUpdate) ClearSourceID() *CertificationUpdate

ClearSourceID clears the value of the "source_id" field.

func (*CertificationUpdate) Exec

func (cu *CertificationUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*CertificationUpdate) ExecX

func (cu *CertificationUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*CertificationUpdate) Mutation

Mutation returns the CertificationMutation object of the builder.

func (*CertificationUpdate) Save

func (cu *CertificationUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*CertificationUpdate) SaveX

func (cu *CertificationUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*CertificationUpdate) SetAllVersions

func (cu *CertificationUpdate) SetAllVersions(p *PackageName) *CertificationUpdate

SetAllVersions sets the "all_versions" edge to the PackageName entity.

func (*CertificationUpdate) SetAllVersionsID

func (cu *CertificationUpdate) SetAllVersionsID(id uuid.UUID) *CertificationUpdate

SetAllVersionsID sets the "all_versions" edge to the PackageName entity by ID.

func (*CertificationUpdate) SetArtifact

func (cu *CertificationUpdate) SetArtifact(a *Artifact) *CertificationUpdate

SetArtifact sets the "artifact" edge to the Artifact entity.

func (*CertificationUpdate) SetArtifactID

func (cu *CertificationUpdate) SetArtifactID(u uuid.UUID) *CertificationUpdate

SetArtifactID sets the "artifact_id" field.

func (*CertificationUpdate) SetCollector

func (cu *CertificationUpdate) SetCollector(s string) *CertificationUpdate

SetCollector sets the "collector" field.

func (*CertificationUpdate) SetDocumentRef added in v0.6.0

func (cu *CertificationUpdate) SetDocumentRef(s string) *CertificationUpdate

SetDocumentRef sets the "document_ref" field.

func (*CertificationUpdate) SetJustification

func (cu *CertificationUpdate) SetJustification(s string) *CertificationUpdate

SetJustification sets the "justification" field.

func (*CertificationUpdate) SetKnownSince added in v0.4.0

func (cu *CertificationUpdate) SetKnownSince(t time.Time) *CertificationUpdate

SetKnownSince sets the "known_since" field.

func (*CertificationUpdate) SetNillableAllVersionsID

func (cu *CertificationUpdate) SetNillableAllVersionsID(id *uuid.UUID) *CertificationUpdate

SetNillableAllVersionsID sets the "all_versions" edge to the PackageName entity by ID if the given value is not nil.

func (*CertificationUpdate) SetNillableArtifactID

func (cu *CertificationUpdate) SetNillableArtifactID(u *uuid.UUID) *CertificationUpdate

SetNillableArtifactID sets the "artifact_id" field if the given value is not nil.

func (*CertificationUpdate) SetNillableCollector added in v0.4.0

func (cu *CertificationUpdate) SetNillableCollector(s *string) *CertificationUpdate

SetNillableCollector sets the "collector" field if the given value is not nil.

func (*CertificationUpdate) SetNillableDocumentRef added in v0.6.0

func (cu *CertificationUpdate) SetNillableDocumentRef(s *string) *CertificationUpdate

SetNillableDocumentRef sets the "document_ref" field if the given value is not nil.

func (*CertificationUpdate) SetNillableJustification added in v0.4.0

func (cu *CertificationUpdate) SetNillableJustification(s *string) *CertificationUpdate

SetNillableJustification sets the "justification" field if the given value is not nil.

func (*CertificationUpdate) SetNillableKnownSince added in v0.4.0

func (cu *CertificationUpdate) SetNillableKnownSince(t *time.Time) *CertificationUpdate

SetNillableKnownSince sets the "known_since" field if the given value is not nil.

func (*CertificationUpdate) SetNillableOrigin added in v0.4.0

func (cu *CertificationUpdate) SetNillableOrigin(s *string) *CertificationUpdate

SetNillableOrigin sets the "origin" field if the given value is not nil.

func (*CertificationUpdate) SetNillablePackageNameID

func (cu *CertificationUpdate) SetNillablePackageNameID(u *uuid.UUID) *CertificationUpdate

SetNillablePackageNameID sets the "package_name_id" field if the given value is not nil.

func (*CertificationUpdate) SetNillablePackageVersionID

func (cu *CertificationUpdate) SetNillablePackageVersionID(u *uuid.UUID) *CertificationUpdate

SetNillablePackageVersionID sets the "package_version_id" field if the given value is not nil.

func (*CertificationUpdate) SetNillableSourceID

func (cu *CertificationUpdate) SetNillableSourceID(u *uuid.UUID) *CertificationUpdate

SetNillableSourceID sets the "source_id" field if the given value is not nil.

func (*CertificationUpdate) SetNillableType

func (cu *CertificationUpdate) SetNillableType(c *certification.Type) *CertificationUpdate

SetNillableType sets the "type" field if the given value is not nil.

func (*CertificationUpdate) SetOrigin

SetOrigin sets the "origin" field.

func (*CertificationUpdate) SetPackageNameID

func (cu *CertificationUpdate) SetPackageNameID(u uuid.UUID) *CertificationUpdate

SetPackageNameID sets the "package_name_id" field.

func (*CertificationUpdate) SetPackageVersion

func (cu *CertificationUpdate) SetPackageVersion(p *PackageVersion) *CertificationUpdate

SetPackageVersion sets the "package_version" edge to the PackageVersion entity.

func (*CertificationUpdate) SetPackageVersionID

func (cu *CertificationUpdate) SetPackageVersionID(u uuid.UUID) *CertificationUpdate

SetPackageVersionID sets the "package_version_id" field.

func (*CertificationUpdate) SetSource

SetSource sets the "source" edge to the SourceName entity.

func (*CertificationUpdate) SetSourceID

func (cu *CertificationUpdate) SetSourceID(u uuid.UUID) *CertificationUpdate

SetSourceID sets the "source_id" field.

func (*CertificationUpdate) SetType

SetType sets the "type" field.

func (*CertificationUpdate) Where

Where appends a list predicates to the CertificationUpdate builder.

type CertificationUpdateOne

type CertificationUpdateOne struct {
	// contains filtered or unexported fields
}

CertificationUpdateOne is the builder for updating a single Certification entity.

func (*CertificationUpdateOne) ClearAllVersions

func (cuo *CertificationUpdateOne) ClearAllVersions() *CertificationUpdateOne

ClearAllVersions clears the "all_versions" edge to the PackageName entity.

func (*CertificationUpdateOne) ClearArtifact

func (cuo *CertificationUpdateOne) ClearArtifact() *CertificationUpdateOne

ClearArtifact clears the "artifact" edge to the Artifact entity.

func (*CertificationUpdateOne) ClearArtifactID

func (cuo *CertificationUpdateOne) ClearArtifactID() *CertificationUpdateOne

ClearArtifactID clears the value of the "artifact_id" field.

func (*CertificationUpdateOne) ClearPackageNameID

func (cuo *CertificationUpdateOne) ClearPackageNameID() *CertificationUpdateOne

ClearPackageNameID clears the value of the "package_name_id" field.

func (*CertificationUpdateOne) ClearPackageVersion

func (cuo *CertificationUpdateOne) ClearPackageVersion() *CertificationUpdateOne

ClearPackageVersion clears the "package_version" edge to the PackageVersion entity.

func (*CertificationUpdateOne) ClearPackageVersionID

func (cuo *CertificationUpdateOne) ClearPackageVersionID() *CertificationUpdateOne

ClearPackageVersionID clears the value of the "package_version_id" field.

func (*CertificationUpdateOne) ClearSource

func (cuo *CertificationUpdateOne) ClearSource() *CertificationUpdateOne

ClearSource clears the "source" edge to the SourceName entity.

func (*CertificationUpdateOne) ClearSourceID

func (cuo *CertificationUpdateOne) ClearSourceID() *CertificationUpdateOne

ClearSourceID clears the value of the "source_id" field.

func (*CertificationUpdateOne) Exec

Exec executes the query on the entity.

func (*CertificationUpdateOne) ExecX

func (cuo *CertificationUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*CertificationUpdateOne) Mutation

Mutation returns the CertificationMutation object of the builder.

func (*CertificationUpdateOne) Save

Save executes the query and returns the updated Certification entity.

func (*CertificationUpdateOne) SaveX

SaveX is like Save, but panics if an error occurs.

func (*CertificationUpdateOne) Select

func (cuo *CertificationUpdateOne) Select(field string, fields ...string) *CertificationUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*CertificationUpdateOne) SetAllVersions

SetAllVersions sets the "all_versions" edge to the PackageName entity.

func (*CertificationUpdateOne) SetAllVersionsID

func (cuo *CertificationUpdateOne) SetAllVersionsID(id uuid.UUID) *CertificationUpdateOne

SetAllVersionsID sets the "all_versions" edge to the PackageName entity by ID.

func (*CertificationUpdateOne) SetArtifact

SetArtifact sets the "artifact" edge to the Artifact entity.

func (*CertificationUpdateOne) SetArtifactID

func (cuo *CertificationUpdateOne) SetArtifactID(u uuid.UUID) *CertificationUpdateOne

SetArtifactID sets the "artifact_id" field.

func (*CertificationUpdateOne) SetCollector

SetCollector sets the "collector" field.

func (*CertificationUpdateOne) SetDocumentRef added in v0.6.0

func (cuo *CertificationUpdateOne) SetDocumentRef(s string) *CertificationUpdateOne

SetDocumentRef sets the "document_ref" field.

func (*CertificationUpdateOne) SetJustification

func (cuo *CertificationUpdateOne) SetJustification(s string) *CertificationUpdateOne

SetJustification sets the "justification" field.

func (*CertificationUpdateOne) SetKnownSince added in v0.4.0

func (cuo *CertificationUpdateOne) SetKnownSince(t time.Time) *CertificationUpdateOne

SetKnownSince sets the "known_since" field.

func (*CertificationUpdateOne) SetNillableAllVersionsID

func (cuo *CertificationUpdateOne) SetNillableAllVersionsID(id *uuid.UUID) *CertificationUpdateOne

SetNillableAllVersionsID sets the "all_versions" edge to the PackageName entity by ID if the given value is not nil.

func (*CertificationUpdateOne) SetNillableArtifactID

func (cuo *CertificationUpdateOne) SetNillableArtifactID(u *uuid.UUID) *CertificationUpdateOne

SetNillableArtifactID sets the "artifact_id" field if the given value is not nil.

func (*CertificationUpdateOne) SetNillableCollector added in v0.4.0

func (cuo *CertificationUpdateOne) SetNillableCollector(s *string) *CertificationUpdateOne

SetNillableCollector sets the "collector" field if the given value is not nil.

func (*CertificationUpdateOne) SetNillableDocumentRef added in v0.6.0

func (cuo *CertificationUpdateOne) SetNillableDocumentRef(s *string) *CertificationUpdateOne

SetNillableDocumentRef sets the "document_ref" field if the given value is not nil.

func (*CertificationUpdateOne) SetNillableJustification added in v0.4.0

func (cuo *CertificationUpdateOne) SetNillableJustification(s *string) *CertificationUpdateOne

SetNillableJustification sets the "justification" field if the given value is not nil.

func (*CertificationUpdateOne) SetNillableKnownSince added in v0.4.0

func (cuo *CertificationUpdateOne) SetNillableKnownSince(t *time.Time) *CertificationUpdateOne

SetNillableKnownSince sets the "known_since" field if the given value is not nil.

func (*CertificationUpdateOne) SetNillableOrigin added in v0.4.0

func (cuo *CertificationUpdateOne) SetNillableOrigin(s *string) *CertificationUpdateOne

SetNillableOrigin sets the "origin" field if the given value is not nil.

func (*CertificationUpdateOne) SetNillablePackageNameID

func (cuo *CertificationUpdateOne) SetNillablePackageNameID(u *uuid.UUID) *CertificationUpdateOne

SetNillablePackageNameID sets the "package_name_id" field if the given value is not nil.

func (*CertificationUpdateOne) SetNillablePackageVersionID

func (cuo *CertificationUpdateOne) SetNillablePackageVersionID(u *uuid.UUID) *CertificationUpdateOne

SetNillablePackageVersionID sets the "package_version_id" field if the given value is not nil.

func (*CertificationUpdateOne) SetNillableSourceID

func (cuo *CertificationUpdateOne) SetNillableSourceID(u *uuid.UUID) *CertificationUpdateOne

SetNillableSourceID sets the "source_id" field if the given value is not nil.

func (*CertificationUpdateOne) SetNillableType

SetNillableType sets the "type" field if the given value is not nil.

func (*CertificationUpdateOne) SetOrigin

SetOrigin sets the "origin" field.

func (*CertificationUpdateOne) SetPackageNameID

func (cuo *CertificationUpdateOne) SetPackageNameID(u uuid.UUID) *CertificationUpdateOne

SetPackageNameID sets the "package_name_id" field.

func (*CertificationUpdateOne) SetPackageVersion

func (cuo *CertificationUpdateOne) SetPackageVersion(p *PackageVersion) *CertificationUpdateOne

SetPackageVersion sets the "package_version" edge to the PackageVersion entity.

func (*CertificationUpdateOne) SetPackageVersionID

func (cuo *CertificationUpdateOne) SetPackageVersionID(u uuid.UUID) *CertificationUpdateOne

SetPackageVersionID sets the "package_version_id" field.

func (*CertificationUpdateOne) SetSource

SetSource sets the "source" edge to the SourceName entity.

func (*CertificationUpdateOne) SetSourceID

SetSourceID sets the "source_id" field.

func (*CertificationUpdateOne) SetType

SetType sets the "type" field.

func (*CertificationUpdateOne) Where

Where appends a list predicates to the CertificationUpdate builder.

type CertificationUpsert

type CertificationUpsert struct {
	*sql.UpdateSet
}

CertificationUpsert is the "OnConflict" setter.

func (*CertificationUpsert) ClearArtifactID

func (u *CertificationUpsert) ClearArtifactID() *CertificationUpsert

ClearArtifactID clears the value of the "artifact_id" field.

func (*CertificationUpsert) ClearPackageNameID

func (u *CertificationUpsert) ClearPackageNameID() *CertificationUpsert

ClearPackageNameID clears the value of the "package_name_id" field.

func (*CertificationUpsert) ClearPackageVersionID

func (u *CertificationUpsert) ClearPackageVersionID() *CertificationUpsert

ClearPackageVersionID clears the value of the "package_version_id" field.

func (*CertificationUpsert) ClearSourceID

func (u *CertificationUpsert) ClearSourceID() *CertificationUpsert

ClearSourceID clears the value of the "source_id" field.

func (*CertificationUpsert) SetArtifactID

func (u *CertificationUpsert) SetArtifactID(v uuid.UUID) *CertificationUpsert

SetArtifactID sets the "artifact_id" field.

func (*CertificationUpsert) SetCollector

func (u *CertificationUpsert) SetCollector(v string) *CertificationUpsert

SetCollector sets the "collector" field.

func (*CertificationUpsert) SetDocumentRef added in v0.6.0

func (u *CertificationUpsert) SetDocumentRef(v string) *CertificationUpsert

SetDocumentRef sets the "document_ref" field.

func (*CertificationUpsert) SetJustification

func (u *CertificationUpsert) SetJustification(v string) *CertificationUpsert

SetJustification sets the "justification" field.

func (*CertificationUpsert) SetKnownSince added in v0.4.0

func (u *CertificationUpsert) SetKnownSince(v time.Time) *CertificationUpsert

SetKnownSince sets the "known_since" field.

func (*CertificationUpsert) SetOrigin

SetOrigin sets the "origin" field.

func (*CertificationUpsert) SetPackageNameID

func (u *CertificationUpsert) SetPackageNameID(v uuid.UUID) *CertificationUpsert

SetPackageNameID sets the "package_name_id" field.

func (*CertificationUpsert) SetPackageVersionID

func (u *CertificationUpsert) SetPackageVersionID(v uuid.UUID) *CertificationUpsert

SetPackageVersionID sets the "package_version_id" field.

func (*CertificationUpsert) SetSourceID

func (u *CertificationUpsert) SetSourceID(v uuid.UUID) *CertificationUpsert

SetSourceID sets the "source_id" field.

func (*CertificationUpsert) SetType

SetType sets the "type" field.

func (*CertificationUpsert) UpdateArtifactID

func (u *CertificationUpsert) UpdateArtifactID() *CertificationUpsert

UpdateArtifactID sets the "artifact_id" field to the value that was provided on create.

func (*CertificationUpsert) UpdateCollector

func (u *CertificationUpsert) UpdateCollector() *CertificationUpsert

UpdateCollector sets the "collector" field to the value that was provided on create.

func (*CertificationUpsert) UpdateDocumentRef added in v0.6.0

func (u *CertificationUpsert) UpdateDocumentRef() *CertificationUpsert

UpdateDocumentRef sets the "document_ref" field to the value that was provided on create.

func (*CertificationUpsert) UpdateJustification

func (u *CertificationUpsert) UpdateJustification() *CertificationUpsert

UpdateJustification sets the "justification" field to the value that was provided on create.

func (*CertificationUpsert) UpdateKnownSince added in v0.4.0

func (u *CertificationUpsert) UpdateKnownSince() *CertificationUpsert

UpdateKnownSince sets the "known_since" field to the value that was provided on create.

func (*CertificationUpsert) UpdateOrigin

func (u *CertificationUpsert) UpdateOrigin() *CertificationUpsert

UpdateOrigin sets the "origin" field to the value that was provided on create.

func (*CertificationUpsert) UpdatePackageNameID

func (u *CertificationUpsert) UpdatePackageNameID() *CertificationUpsert

UpdatePackageNameID sets the "package_name_id" field to the value that was provided on create.

func (*CertificationUpsert) UpdatePackageVersionID

func (u *CertificationUpsert) UpdatePackageVersionID() *CertificationUpsert

UpdatePackageVersionID sets the "package_version_id" field to the value that was provided on create.

func (*CertificationUpsert) UpdateSourceID

func (u *CertificationUpsert) UpdateSourceID() *CertificationUpsert

UpdateSourceID sets the "source_id" field to the value that was provided on create.

func (*CertificationUpsert) UpdateType

func (u *CertificationUpsert) UpdateType() *CertificationUpsert

UpdateType sets the "type" field to the value that was provided on create.

type CertificationUpsertBulk

type CertificationUpsertBulk struct {
	// contains filtered or unexported fields
}

CertificationUpsertBulk is the builder for "upsert"-ing a bulk of Certification nodes.

func (*CertificationUpsertBulk) ClearArtifactID

func (u *CertificationUpsertBulk) ClearArtifactID() *CertificationUpsertBulk

ClearArtifactID clears the value of the "artifact_id" field.

func (*CertificationUpsertBulk) ClearPackageNameID

func (u *CertificationUpsertBulk) ClearPackageNameID() *CertificationUpsertBulk

ClearPackageNameID clears the value of the "package_name_id" field.

func (*CertificationUpsertBulk) ClearPackageVersionID

func (u *CertificationUpsertBulk) ClearPackageVersionID() *CertificationUpsertBulk

ClearPackageVersionID clears the value of the "package_version_id" field.

func (*CertificationUpsertBulk) ClearSourceID

ClearSourceID clears the value of the "source_id" field.

func (*CertificationUpsertBulk) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*CertificationUpsertBulk) Exec

Exec executes the query.

func (*CertificationUpsertBulk) ExecX

func (u *CertificationUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*CertificationUpsertBulk) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Certification.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*CertificationUpsertBulk) SetArtifactID

SetArtifactID sets the "artifact_id" field.

func (*CertificationUpsertBulk) SetCollector

SetCollector sets the "collector" field.

func (*CertificationUpsertBulk) SetDocumentRef added in v0.6.0

SetDocumentRef sets the "document_ref" field.

func (*CertificationUpsertBulk) SetJustification

func (u *CertificationUpsertBulk) SetJustification(v string) *CertificationUpsertBulk

SetJustification sets the "justification" field.

func (*CertificationUpsertBulk) SetKnownSince added in v0.4.0

SetKnownSince sets the "known_since" field.

func (*CertificationUpsertBulk) SetOrigin

SetOrigin sets the "origin" field.

func (*CertificationUpsertBulk) SetPackageNameID

func (u *CertificationUpsertBulk) SetPackageNameID(v uuid.UUID) *CertificationUpsertBulk

SetPackageNameID sets the "package_name_id" field.

func (*CertificationUpsertBulk) SetPackageVersionID

func (u *CertificationUpsertBulk) SetPackageVersionID(v uuid.UUID) *CertificationUpsertBulk

SetPackageVersionID sets the "package_version_id" field.

func (*CertificationUpsertBulk) SetSourceID

SetSourceID sets the "source_id" field.

func (*CertificationUpsertBulk) SetType

SetType sets the "type" field.

func (*CertificationUpsertBulk) Update

Update allows overriding fields `UPDATE` values. See the CertificationCreateBulk.OnConflict documentation for more info.

func (*CertificationUpsertBulk) UpdateArtifactID

func (u *CertificationUpsertBulk) UpdateArtifactID() *CertificationUpsertBulk

UpdateArtifactID sets the "artifact_id" field to the value that was provided on create.

func (*CertificationUpsertBulk) UpdateCollector

func (u *CertificationUpsertBulk) UpdateCollector() *CertificationUpsertBulk

UpdateCollector sets the "collector" field to the value that was provided on create.

func (*CertificationUpsertBulk) UpdateDocumentRef added in v0.6.0

func (u *CertificationUpsertBulk) UpdateDocumentRef() *CertificationUpsertBulk

UpdateDocumentRef sets the "document_ref" field to the value that was provided on create.

func (*CertificationUpsertBulk) UpdateJustification

func (u *CertificationUpsertBulk) UpdateJustification() *CertificationUpsertBulk

UpdateJustification sets the "justification" field to the value that was provided on create.

func (*CertificationUpsertBulk) UpdateKnownSince added in v0.4.0

func (u *CertificationUpsertBulk) UpdateKnownSince() *CertificationUpsertBulk

UpdateKnownSince sets the "known_since" field to the value that was provided on create.

func (*CertificationUpsertBulk) UpdateNewValues

func (u *CertificationUpsertBulk) UpdateNewValues() *CertificationUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.Certification.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(certification.FieldID)
		}),
	).
	Exec(ctx)

func (*CertificationUpsertBulk) UpdateOrigin

UpdateOrigin sets the "origin" field to the value that was provided on create.

func (*CertificationUpsertBulk) UpdatePackageNameID

func (u *CertificationUpsertBulk) UpdatePackageNameID() *CertificationUpsertBulk

UpdatePackageNameID sets the "package_name_id" field to the value that was provided on create.

func (*CertificationUpsertBulk) UpdatePackageVersionID

func (u *CertificationUpsertBulk) UpdatePackageVersionID() *CertificationUpsertBulk

UpdatePackageVersionID sets the "package_version_id" field to the value that was provided on create.

func (*CertificationUpsertBulk) UpdateSourceID

func (u *CertificationUpsertBulk) UpdateSourceID() *CertificationUpsertBulk

UpdateSourceID sets the "source_id" field to the value that was provided on create.

func (*CertificationUpsertBulk) UpdateType

UpdateType sets the "type" field to the value that was provided on create.

type CertificationUpsertOne

type CertificationUpsertOne struct {
	// contains filtered or unexported fields
}

CertificationUpsertOne is the builder for "upsert"-ing

one Certification node.

func (*CertificationUpsertOne) ClearArtifactID

func (u *CertificationUpsertOne) ClearArtifactID() *CertificationUpsertOne

ClearArtifactID clears the value of the "artifact_id" field.

func (*CertificationUpsertOne) ClearPackageNameID

func (u *CertificationUpsertOne) ClearPackageNameID() *CertificationUpsertOne

ClearPackageNameID clears the value of the "package_name_id" field.

func (*CertificationUpsertOne) ClearPackageVersionID

func (u *CertificationUpsertOne) ClearPackageVersionID() *CertificationUpsertOne

ClearPackageVersionID clears the value of the "package_version_id" field.

func (*CertificationUpsertOne) ClearSourceID

func (u *CertificationUpsertOne) ClearSourceID() *CertificationUpsertOne

ClearSourceID clears the value of the "source_id" field.

func (*CertificationUpsertOne) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*CertificationUpsertOne) Exec

Exec executes the query.

func (*CertificationUpsertOne) ExecX

func (u *CertificationUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*CertificationUpsertOne) ID

func (u *CertificationUpsertOne) ID(ctx context.Context) (id uuid.UUID, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*CertificationUpsertOne) IDX

IDX is like ID, but panics if an error occurs.

func (*CertificationUpsertOne) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Certification.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*CertificationUpsertOne) SetArtifactID

SetArtifactID sets the "artifact_id" field.

func (*CertificationUpsertOne) SetCollector

SetCollector sets the "collector" field.

func (*CertificationUpsertOne) SetDocumentRef added in v0.6.0

SetDocumentRef sets the "document_ref" field.

func (*CertificationUpsertOne) SetJustification

func (u *CertificationUpsertOne) SetJustification(v string) *CertificationUpsertOne

SetJustification sets the "justification" field.

func (*CertificationUpsertOne) SetKnownSince added in v0.4.0

SetKnownSince sets the "known_since" field.

func (*CertificationUpsertOne) SetOrigin

SetOrigin sets the "origin" field.

func (*CertificationUpsertOne) SetPackageNameID

func (u *CertificationUpsertOne) SetPackageNameID(v uuid.UUID) *CertificationUpsertOne

SetPackageNameID sets the "package_name_id" field.

func (*CertificationUpsertOne) SetPackageVersionID

func (u *CertificationUpsertOne) SetPackageVersionID(v uuid.UUID) *CertificationUpsertOne

SetPackageVersionID sets the "package_version_id" field.

func (*CertificationUpsertOne) SetSourceID

SetSourceID sets the "source_id" field.

func (*CertificationUpsertOne) SetType

SetType sets the "type" field.

func (*CertificationUpsertOne) Update

Update allows overriding fields `UPDATE` values. See the CertificationCreate.OnConflict documentation for more info.

func (*CertificationUpsertOne) UpdateArtifactID

func (u *CertificationUpsertOne) UpdateArtifactID() *CertificationUpsertOne

UpdateArtifactID sets the "artifact_id" field to the value that was provided on create.

func (*CertificationUpsertOne) UpdateCollector

func (u *CertificationUpsertOne) UpdateCollector() *CertificationUpsertOne

UpdateCollector sets the "collector" field to the value that was provided on create.

func (*CertificationUpsertOne) UpdateDocumentRef added in v0.6.0

func (u *CertificationUpsertOne) UpdateDocumentRef() *CertificationUpsertOne

UpdateDocumentRef sets the "document_ref" field to the value that was provided on create.

func (*CertificationUpsertOne) UpdateJustification

func (u *CertificationUpsertOne) UpdateJustification() *CertificationUpsertOne

UpdateJustification sets the "justification" field to the value that was provided on create.

func (*CertificationUpsertOne) UpdateKnownSince added in v0.4.0

func (u *CertificationUpsertOne) UpdateKnownSince() *CertificationUpsertOne

UpdateKnownSince sets the "known_since" field to the value that was provided on create.

func (*CertificationUpsertOne) UpdateNewValues

func (u *CertificationUpsertOne) UpdateNewValues() *CertificationUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:

client.Certification.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(certification.FieldID)
		}),
	).
	Exec(ctx)

func (*CertificationUpsertOne) UpdateOrigin

UpdateOrigin sets the "origin" field to the value that was provided on create.

func (*CertificationUpsertOne) UpdatePackageNameID

func (u *CertificationUpsertOne) UpdatePackageNameID() *CertificationUpsertOne

UpdatePackageNameID sets the "package_name_id" field to the value that was provided on create.

func (*CertificationUpsertOne) UpdatePackageVersionID

func (u *CertificationUpsertOne) UpdatePackageVersionID() *CertificationUpsertOne

UpdatePackageVersionID sets the "package_version_id" field to the value that was provided on create.

func (*CertificationUpsertOne) UpdateSourceID

func (u *CertificationUpsertOne) UpdateSourceID() *CertificationUpsertOne

UpdateSourceID sets the "source_id" field to the value that was provided on create.

func (*CertificationUpsertOne) UpdateType

UpdateType sets the "type" field to the value that was provided on create.

type Certifications

type Certifications []*Certification

Certifications is a parsable slice of Certification.

type CertifyLegal

type CertifyLegal struct {

	// ID of the ent.
	ID uuid.UUID `json:"id,omitempty"`
	// PackageID holds the value of the "package_id" field.
	PackageID *uuid.UUID `json:"package_id,omitempty"`
	// SourceID holds the value of the "source_id" field.
	SourceID *uuid.UUID `json:"source_id,omitempty"`
	// DeclaredLicense holds the value of the "declared_license" field.
	DeclaredLicense string `json:"declared_license,omitempty"`
	// DiscoveredLicense holds the value of the "discovered_license" field.
	DiscoveredLicense string `json:"discovered_license,omitempty"`
	// Attribution holds the value of the "attribution" field.
	Attribution string `json:"attribution,omitempty"`
	// Justification holds the value of the "justification" field.
	Justification string `json:"justification,omitempty"`
	// TimeScanned holds the value of the "time_scanned" field.
	TimeScanned time.Time `json:"time_scanned,omitempty"`
	// Origin holds the value of the "origin" field.
	Origin string `json:"origin,omitempty"`
	// Collector holds the value of the "collector" field.
	Collector string `json:"collector,omitempty"`
	// DocumentRef holds the value of the "document_ref" field.
	DocumentRef string `json:"document_ref,omitempty"`
	// An opaque hash of the declared license IDs to ensure uniqueness
	DeclaredLicensesHash string `json:"declared_licenses_hash,omitempty"`
	// An opaque hash of the discovered license IDs to ensure uniqueness
	DiscoveredLicensesHash string `json:"discovered_licenses_hash,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the CertifyLegalQuery when eager-loading is set.
	Edges CertifyLegalEdges `json:"edges"`
	// contains filtered or unexported fields
}

CertifyLegal is the model entity for the CertifyLegal schema.

func (*CertifyLegal) DeclaredLicenses

func (cl *CertifyLegal) DeclaredLicenses(ctx context.Context) (result []*License, err error)

func (*CertifyLegal) DiscoveredLicenses

func (cl *CertifyLegal) DiscoveredLicenses(ctx context.Context) (result []*License, err error)

func (*CertifyLegal) IsNode

func (n *CertifyLegal) IsNode()

IsNode implements the Node interface check for GQLGen.

func (*CertifyLegal) NamedDeclaredLicenses

func (cl *CertifyLegal) NamedDeclaredLicenses(name string) ([]*License, error)

NamedDeclaredLicenses returns the DeclaredLicenses named value or an error if the edge was not loaded in eager-loading with this name.

func (*CertifyLegal) NamedDiscoveredLicenses

func (cl *CertifyLegal) NamedDiscoveredLicenses(name string) ([]*License, error)

NamedDiscoveredLicenses returns the DiscoveredLicenses named value or an error if the edge was not loaded in eager-loading with this name.

func (*CertifyLegal) Package

func (cl *CertifyLegal) Package(ctx context.Context) (*PackageVersion, error)

func (*CertifyLegal) QueryDeclaredLicenses

func (cl *CertifyLegal) QueryDeclaredLicenses() *LicenseQuery

QueryDeclaredLicenses queries the "declared_licenses" edge of the CertifyLegal entity.

func (*CertifyLegal) QueryDiscoveredLicenses

func (cl *CertifyLegal) QueryDiscoveredLicenses() *LicenseQuery

QueryDiscoveredLicenses queries the "discovered_licenses" edge of the CertifyLegal entity.

func (*CertifyLegal) QueryPackage

func (cl *CertifyLegal) QueryPackage() *PackageVersionQuery

QueryPackage queries the "package" edge of the CertifyLegal entity.

func (*CertifyLegal) QuerySource

func (cl *CertifyLegal) QuerySource() *SourceNameQuery

QuerySource queries the "source" edge of the CertifyLegal entity.

func (*CertifyLegal) Source

func (cl *CertifyLegal) Source(ctx context.Context) (*SourceName, error)

func (*CertifyLegal) String

func (cl *CertifyLegal) String() string

String implements the fmt.Stringer.

func (*CertifyLegal) ToEdge

func (cl *CertifyLegal) ToEdge(order *CertifyLegalOrder) *CertifyLegalEdge

ToEdge converts CertifyLegal into CertifyLegalEdge.

func (*CertifyLegal) Unwrap

func (cl *CertifyLegal) Unwrap() *CertifyLegal

Unwrap unwraps the CertifyLegal entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.

func (*CertifyLegal) Update

func (cl *CertifyLegal) Update() *CertifyLegalUpdateOne

Update returns a builder for updating this CertifyLegal. Note that you need to call CertifyLegal.Unwrap() before calling this method if this CertifyLegal was returned from a transaction, and the transaction was committed or rolled back.

func (*CertifyLegal) Value

func (cl *CertifyLegal) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the CertifyLegal. This includes values selected through modifiers, order, etc.

type CertifyLegalClient

type CertifyLegalClient struct {
	// contains filtered or unexported fields
}

CertifyLegalClient is a client for the CertifyLegal schema.

func NewCertifyLegalClient

func NewCertifyLegalClient(c config) *CertifyLegalClient

NewCertifyLegalClient returns a client for the CertifyLegal from the given config.

func (*CertifyLegalClient) Create

Create returns a builder for creating a CertifyLegal entity.

func (*CertifyLegalClient) CreateBulk

func (c *CertifyLegalClient) CreateBulk(builders ...*CertifyLegalCreate) *CertifyLegalCreateBulk

CreateBulk returns a builder for creating a bulk of CertifyLegal entities.

func (*CertifyLegalClient) Delete

Delete returns a delete builder for CertifyLegal.

func (*CertifyLegalClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*CertifyLegalClient) DeleteOneID

func (c *CertifyLegalClient) DeleteOneID(id uuid.UUID) *CertifyLegalDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*CertifyLegalClient) Get

Get returns a CertifyLegal entity by its id.

func (*CertifyLegalClient) GetX

GetX is like Get, but panics if an error occurs.

func (*CertifyLegalClient) Hooks

func (c *CertifyLegalClient) Hooks() []Hook

Hooks returns the client hooks.

func (*CertifyLegalClient) Intercept

func (c *CertifyLegalClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `certifylegal.Intercept(f(g(h())))`.

func (*CertifyLegalClient) Interceptors

func (c *CertifyLegalClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*CertifyLegalClient) MapCreateBulk

func (c *CertifyLegalClient) MapCreateBulk(slice any, setFunc func(*CertifyLegalCreate, int)) *CertifyLegalCreateBulk

MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.

func (*CertifyLegalClient) Query

Query returns a query builder for CertifyLegal.

func (*CertifyLegalClient) QueryDeclaredLicenses

func (c *CertifyLegalClient) QueryDeclaredLicenses(cl *CertifyLegal) *LicenseQuery

QueryDeclaredLicenses queries the declared_licenses edge of a CertifyLegal.

func (*CertifyLegalClient) QueryDiscoveredLicenses

func (c *CertifyLegalClient) QueryDiscoveredLicenses(cl *CertifyLegal) *LicenseQuery

QueryDiscoveredLicenses queries the discovered_licenses edge of a CertifyLegal.

func (*CertifyLegalClient) QueryPackage

func (c *CertifyLegalClient) QueryPackage(cl *CertifyLegal) *PackageVersionQuery

QueryPackage queries the package edge of a CertifyLegal.

func (*CertifyLegalClient) QuerySource

func (c *CertifyLegalClient) QuerySource(cl *CertifyLegal) *SourceNameQuery

QuerySource queries the source edge of a CertifyLegal.

func (*CertifyLegalClient) Update

Update returns an update builder for CertifyLegal.

func (*CertifyLegalClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*CertifyLegalClient) UpdateOneID

func (c *CertifyLegalClient) UpdateOneID(id uuid.UUID) *CertifyLegalUpdateOne

UpdateOneID returns an update builder for the given id.

func (*CertifyLegalClient) Use

func (c *CertifyLegalClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `certifylegal.Hooks(f(g(h())))`.

type CertifyLegalConnection

type CertifyLegalConnection struct {
	Edges      []*CertifyLegalEdge `json:"edges"`
	PageInfo   PageInfo            `json:"pageInfo"`
	TotalCount int                 `json:"totalCount"`
}

CertifyLegalConnection is the connection containing edges to CertifyLegal.

type CertifyLegalCreate

type CertifyLegalCreate struct {
	// contains filtered or unexported fields
}

CertifyLegalCreate is the builder for creating a CertifyLegal entity.

func (*CertifyLegalCreate) AddDeclaredLicenseIDs

func (clc *CertifyLegalCreate) AddDeclaredLicenseIDs(ids ...uuid.UUID) *CertifyLegalCreate

AddDeclaredLicenseIDs adds the "declared_licenses" edge to the License entity by IDs.

func (*CertifyLegalCreate) AddDeclaredLicenses

func (clc *CertifyLegalCreate) AddDeclaredLicenses(l ...*License) *CertifyLegalCreate

AddDeclaredLicenses adds the "declared_licenses" edges to the License entity.

func (*CertifyLegalCreate) AddDiscoveredLicenseIDs

func (clc *CertifyLegalCreate) AddDiscoveredLicenseIDs(ids ...uuid.UUID) *CertifyLegalCreate

AddDiscoveredLicenseIDs adds the "discovered_licenses" edge to the License entity by IDs.

func (*CertifyLegalCreate) AddDiscoveredLicenses

func (clc *CertifyLegalCreate) AddDiscoveredLicenses(l ...*License) *CertifyLegalCreate

AddDiscoveredLicenses adds the "discovered_licenses" edges to the License entity.

func (*CertifyLegalCreate) Exec

func (clc *CertifyLegalCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*CertifyLegalCreate) ExecX

func (clc *CertifyLegalCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*CertifyLegalCreate) Mutation

func (clc *CertifyLegalCreate) Mutation() *CertifyLegalMutation

Mutation returns the CertifyLegalMutation object of the builder.

func (*CertifyLegalCreate) OnConflict

func (clc *CertifyLegalCreate) OnConflict(opts ...sql.ConflictOption) *CertifyLegalUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.CertifyLegal.Create().
	SetPackageID(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.CertifyLegalUpsert) {
		SetPackageID(v+v).
	}).
	Exec(ctx)

func (*CertifyLegalCreate) OnConflictColumns

func (clc *CertifyLegalCreate) OnConflictColumns(columns ...string) *CertifyLegalUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.CertifyLegal.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*CertifyLegalCreate) Save

Save creates the CertifyLegal in the database.

func (*CertifyLegalCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*CertifyLegalCreate) SetAttribution

func (clc *CertifyLegalCreate) SetAttribution(s string) *CertifyLegalCreate

SetAttribution sets the "attribution" field.

func (*CertifyLegalCreate) SetCollector

func (clc *CertifyLegalCreate) SetCollector(s string) *CertifyLegalCreate

SetCollector sets the "collector" field.

func (*CertifyLegalCreate) SetDeclaredLicense

func (clc *CertifyLegalCreate) SetDeclaredLicense(s string) *CertifyLegalCreate

SetDeclaredLicense sets the "declared_license" field.

func (*CertifyLegalCreate) SetDeclaredLicensesHash

func (clc *CertifyLegalCreate) SetDeclaredLicensesHash(s string) *CertifyLegalCreate

SetDeclaredLicensesHash sets the "declared_licenses_hash" field.

func (*CertifyLegalCreate) SetDiscoveredLicense

func (clc *CertifyLegalCreate) SetDiscoveredLicense(s string) *CertifyLegalCreate

SetDiscoveredLicense sets the "discovered_license" field.

func (*CertifyLegalCreate) SetDiscoveredLicensesHash

func (clc *CertifyLegalCreate) SetDiscoveredLicensesHash(s string) *CertifyLegalCreate

SetDiscoveredLicensesHash sets the "discovered_licenses_hash" field.

func (*CertifyLegalCreate) SetDocumentRef added in v0.6.0

func (clc *CertifyLegalCreate) SetDocumentRef(s string) *CertifyLegalCreate

SetDocumentRef sets the "document_ref" field.

func (*CertifyLegalCreate) SetID added in v0.5.0

SetID sets the "id" field.

func (*CertifyLegalCreate) SetJustification

func (clc *CertifyLegalCreate) SetJustification(s string) *CertifyLegalCreate

SetJustification sets the "justification" field.

func (*CertifyLegalCreate) SetNillableID added in v0.5.0

func (clc *CertifyLegalCreate) SetNillableID(u *uuid.UUID) *CertifyLegalCreate

SetNillableID sets the "id" field if the given value is not nil.

func (*CertifyLegalCreate) SetNillablePackageID

func (clc *CertifyLegalCreate) SetNillablePackageID(u *uuid.UUID) *CertifyLegalCreate

SetNillablePackageID sets the "package_id" field if the given value is not nil.

func (*CertifyLegalCreate) SetNillableSourceID

func (clc *CertifyLegalCreate) SetNillableSourceID(u *uuid.UUID) *CertifyLegalCreate

SetNillableSourceID sets the "source_id" field if the given value is not nil.

func (*CertifyLegalCreate) SetOrigin

func (clc *CertifyLegalCreate) SetOrigin(s string) *CertifyLegalCreate

SetOrigin sets the "origin" field.

func (*CertifyLegalCreate) SetPackage

SetPackage sets the "package" edge to the PackageVersion entity.

func (*CertifyLegalCreate) SetPackageID

func (clc *CertifyLegalCreate) SetPackageID(u uuid.UUID) *CertifyLegalCreate

SetPackageID sets the "package_id" field.

func (*CertifyLegalCreate) SetSource

func (clc *CertifyLegalCreate) SetSource(s *SourceName) *CertifyLegalCreate

SetSource sets the "source" edge to the SourceName entity.

func (*CertifyLegalCreate) SetSourceID

func (clc *CertifyLegalCreate) SetSourceID(u uuid.UUID) *CertifyLegalCreate

SetSourceID sets the "source_id" field.

func (*CertifyLegalCreate) SetTimeScanned

func (clc *CertifyLegalCreate) SetTimeScanned(t time.Time) *CertifyLegalCreate

SetTimeScanned sets the "time_scanned" field.

type CertifyLegalCreateBulk

type CertifyLegalCreateBulk struct {
	// contains filtered or unexported fields
}

CertifyLegalCreateBulk is the builder for creating many CertifyLegal entities in bulk.

func (*CertifyLegalCreateBulk) Exec

func (clcb *CertifyLegalCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*CertifyLegalCreateBulk) ExecX

func (clcb *CertifyLegalCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*CertifyLegalCreateBulk) OnConflict

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.CertifyLegal.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.CertifyLegalUpsert) {
		SetPackageID(v+v).
	}).
	Exec(ctx)

func (*CertifyLegalCreateBulk) OnConflictColumns

func (clcb *CertifyLegalCreateBulk) OnConflictColumns(columns ...string) *CertifyLegalUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.CertifyLegal.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*CertifyLegalCreateBulk) Save

Save creates the CertifyLegal entities in the database.

func (*CertifyLegalCreateBulk) SaveX

func (clcb *CertifyLegalCreateBulk) SaveX(ctx context.Context) []*CertifyLegal

SaveX is like Save, but panics if an error occurs.

type CertifyLegalDelete

type CertifyLegalDelete struct {
	// contains filtered or unexported fields
}

CertifyLegalDelete is the builder for deleting a CertifyLegal entity.

func (*CertifyLegalDelete) Exec

func (cld *CertifyLegalDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*CertifyLegalDelete) ExecX

func (cld *CertifyLegalDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*CertifyLegalDelete) Where

Where appends a list predicates to the CertifyLegalDelete builder.

type CertifyLegalDeleteOne

type CertifyLegalDeleteOne struct {
	// contains filtered or unexported fields
}

CertifyLegalDeleteOne is the builder for deleting a single CertifyLegal entity.

func (*CertifyLegalDeleteOne) Exec

func (cldo *CertifyLegalDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*CertifyLegalDeleteOne) ExecX

func (cldo *CertifyLegalDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*CertifyLegalDeleteOne) Where

Where appends a list predicates to the CertifyLegalDelete builder.

type CertifyLegalEdge

type CertifyLegalEdge struct {
	Node   *CertifyLegal `json:"node"`
	Cursor Cursor        `json:"cursor"`
}

CertifyLegalEdge is the edge representation of CertifyLegal.

type CertifyLegalEdges

type CertifyLegalEdges struct {
	// Package holds the value of the package edge.
	Package *PackageVersion `json:"package,omitempty"`
	// Source holds the value of the source edge.
	Source *SourceName `json:"source,omitempty"`
	// DeclaredLicenses holds the value of the declared_licenses edge.
	DeclaredLicenses []*License `json:"declared_licenses,omitempty"`
	// DiscoveredLicenses holds the value of the discovered_licenses edge.
	DiscoveredLicenses []*License `json:"discovered_licenses,omitempty"`
	// contains filtered or unexported fields
}

CertifyLegalEdges holds the relations/edges for other nodes in the graph.

func (CertifyLegalEdges) DeclaredLicensesOrErr

func (e CertifyLegalEdges) DeclaredLicensesOrErr() ([]*License, error)

DeclaredLicensesOrErr returns the DeclaredLicenses value or an error if the edge was not loaded in eager-loading.

func (CertifyLegalEdges) DiscoveredLicensesOrErr

func (e CertifyLegalEdges) DiscoveredLicensesOrErr() ([]*License, error)

DiscoveredLicensesOrErr returns the DiscoveredLicenses value or an error if the edge was not loaded in eager-loading.

func (CertifyLegalEdges) PackageOrErr

func (e CertifyLegalEdges) PackageOrErr() (*PackageVersion, error)

PackageOrErr returns the Package value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (CertifyLegalEdges) SourceOrErr

func (e CertifyLegalEdges) SourceOrErr() (*SourceName, error)

SourceOrErr returns the Source value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type CertifyLegalGroupBy

type CertifyLegalGroupBy struct {
	// contains filtered or unexported fields
}

CertifyLegalGroupBy is the group-by builder for CertifyLegal entities.

func (*CertifyLegalGroupBy) Aggregate

func (clgb *CertifyLegalGroupBy) Aggregate(fns ...AggregateFunc) *CertifyLegalGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*CertifyLegalGroupBy) Bool

func (s *CertifyLegalGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*CertifyLegalGroupBy) BoolX

func (s *CertifyLegalGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*CertifyLegalGroupBy) Bools

func (s *CertifyLegalGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*CertifyLegalGroupBy) BoolsX

func (s *CertifyLegalGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*CertifyLegalGroupBy) Float64

func (s *CertifyLegalGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*CertifyLegalGroupBy) Float64X

func (s *CertifyLegalGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*CertifyLegalGroupBy) Float64s

func (s *CertifyLegalGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*CertifyLegalGroupBy) Float64sX

func (s *CertifyLegalGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*CertifyLegalGroupBy) Int

func (s *CertifyLegalGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*CertifyLegalGroupBy) IntX

func (s *CertifyLegalGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*CertifyLegalGroupBy) Ints

func (s *CertifyLegalGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*CertifyLegalGroupBy) IntsX

func (s *CertifyLegalGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*CertifyLegalGroupBy) Scan

func (clgb *CertifyLegalGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*CertifyLegalGroupBy) ScanX

func (s *CertifyLegalGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*CertifyLegalGroupBy) String

func (s *CertifyLegalGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*CertifyLegalGroupBy) StringX

func (s *CertifyLegalGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*CertifyLegalGroupBy) Strings

func (s *CertifyLegalGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*CertifyLegalGroupBy) StringsX

func (s *CertifyLegalGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type CertifyLegalMutation

type CertifyLegalMutation struct {
	// contains filtered or unexported fields
}

CertifyLegalMutation represents an operation that mutates the CertifyLegal nodes in the graph.

func (*CertifyLegalMutation) AddDeclaredLicenseIDs

func (m *CertifyLegalMutation) AddDeclaredLicenseIDs(ids ...uuid.UUID)

AddDeclaredLicenseIDs adds the "declared_licenses" edge to the License entity by ids.

func (*CertifyLegalMutation) AddDiscoveredLicenseIDs

func (m *CertifyLegalMutation) AddDiscoveredLicenseIDs(ids ...uuid.UUID)

AddDiscoveredLicenseIDs adds the "discovered_licenses" edge to the License entity by ids.

func (*CertifyLegalMutation) AddField

func (m *CertifyLegalMutation) AddField(name string, value ent.Value) error

AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*CertifyLegalMutation) AddedEdges

func (m *CertifyLegalMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*CertifyLegalMutation) AddedField

func (m *CertifyLegalMutation) AddedField(name string) (ent.Value, bool)

AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*CertifyLegalMutation) AddedFields

func (m *CertifyLegalMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*CertifyLegalMutation) AddedIDs

func (m *CertifyLegalMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*CertifyLegalMutation) Attribution

func (m *CertifyLegalMutation) Attribution() (r string, exists bool)

Attribution returns the value of the "attribution" field in the mutation.

func (*CertifyLegalMutation) ClearDeclaredLicenses

func (m *CertifyLegalMutation) ClearDeclaredLicenses()

ClearDeclaredLicenses clears the "declared_licenses" edge to the License entity.

func (*CertifyLegalMutation) ClearDiscoveredLicenses

func (m *CertifyLegalMutation) ClearDiscoveredLicenses()

ClearDiscoveredLicenses clears the "discovered_licenses" edge to the License entity.

func (*CertifyLegalMutation) ClearEdge

func (m *CertifyLegalMutation) ClearEdge(name string) error

ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.

func (*CertifyLegalMutation) ClearField

func (m *CertifyLegalMutation) ClearField(name string) error

ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.

func (*CertifyLegalMutation) ClearPackage

func (m *CertifyLegalMutation) ClearPackage()

ClearPackage clears the "package" edge to the PackageVersion entity.

func (*CertifyLegalMutation) ClearPackageID

func (m *CertifyLegalMutation) ClearPackageID()

ClearPackageID clears the value of the "package_id" field.

func (*CertifyLegalMutation) ClearSource

func (m *CertifyLegalMutation) ClearSource()

ClearSource clears the "source" edge to the SourceName entity.

func (*CertifyLegalMutation) ClearSourceID

func (m *CertifyLegalMutation) ClearSourceID()

ClearSourceID clears the value of the "source_id" field.

func (*CertifyLegalMutation) ClearedEdges

func (m *CertifyLegalMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*CertifyLegalMutation) ClearedFields

func (m *CertifyLegalMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (CertifyLegalMutation) Client

func (m CertifyLegalMutation) Client() *Client

Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.

func (*CertifyLegalMutation) Collector

func (m *CertifyLegalMutation) Collector() (r string, exists bool)

Collector returns the value of the "collector" field in the mutation.

func (*CertifyLegalMutation) DeclaredLicense

func (m *CertifyLegalMutation) DeclaredLicense() (r string, exists bool)

DeclaredLicense returns the value of the "declared_license" field in the mutation.

func (*CertifyLegalMutation) DeclaredLicensesCleared

func (m *CertifyLegalMutation) DeclaredLicensesCleared() bool

DeclaredLicensesCleared reports if the "declared_licenses" edge to the License entity was cleared.

func (*CertifyLegalMutation) DeclaredLicensesHash

func (m *CertifyLegalMutation) DeclaredLicensesHash() (r string, exists bool)

DeclaredLicensesHash returns the value of the "declared_licenses_hash" field in the mutation.

func (*CertifyLegalMutation) DeclaredLicensesIDs

func (m *CertifyLegalMutation) DeclaredLicensesIDs() (ids []uuid.UUID)

DeclaredLicensesIDs returns the "declared_licenses" edge IDs in the mutation.

func (*CertifyLegalMutation) DiscoveredLicense

func (m *CertifyLegalMutation) DiscoveredLicense() (r string, exists bool)

DiscoveredLicense returns the value of the "discovered_license" field in the mutation.

func (*CertifyLegalMutation) DiscoveredLicensesCleared

func (m *CertifyLegalMutation) DiscoveredLicensesCleared() bool

DiscoveredLicensesCleared reports if the "discovered_licenses" edge to the License entity was cleared.

func (*CertifyLegalMutation) DiscoveredLicensesHash

func (m *CertifyLegalMutation) DiscoveredLicensesHash() (r string, exists bool)

DiscoveredLicensesHash returns the value of the "discovered_licenses_hash" field in the mutation.

func (*CertifyLegalMutation) DiscoveredLicensesIDs

func (m *CertifyLegalMutation) DiscoveredLicensesIDs() (ids []uuid.UUID)

DiscoveredLicensesIDs returns the "discovered_licenses" edge IDs in the mutation.

func (*CertifyLegalMutation) DocumentRef added in v0.6.0

func (m *CertifyLegalMutation) DocumentRef() (r string, exists bool)

DocumentRef returns the value of the "document_ref" field in the mutation.

func (*CertifyLegalMutation) EdgeCleared

func (m *CertifyLegalMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*CertifyLegalMutation) Field

func (m *CertifyLegalMutation) Field(name string) (ent.Value, bool)

Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*CertifyLegalMutation) FieldCleared

func (m *CertifyLegalMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*CertifyLegalMutation) Fields

func (m *CertifyLegalMutation) Fields() []string

Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().

func (*CertifyLegalMutation) ID

func (m *CertifyLegalMutation) ID() (id uuid.UUID, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*CertifyLegalMutation) IDs

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*CertifyLegalMutation) Justification

func (m *CertifyLegalMutation) Justification() (r string, exists bool)

Justification returns the value of the "justification" field in the mutation.

func (*CertifyLegalMutation) OldAttribution

func (m *CertifyLegalMutation) OldAttribution(ctx context.Context) (v string, err error)

OldAttribution returns the old "attribution" field's value of the CertifyLegal entity. If the CertifyLegal object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*CertifyLegalMutation) OldCollector

func (m *CertifyLegalMutation) OldCollector(ctx context.Context) (v string, err error)

OldCollector returns the old "collector" field's value of the CertifyLegal entity. If the CertifyLegal object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*CertifyLegalMutation) OldDeclaredLicense

func (m *CertifyLegalMutation) OldDeclaredLicense(ctx context.Context) (v string, err error)

OldDeclaredLicense returns the old "declared_license" field's value of the CertifyLegal entity. If the CertifyLegal object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*CertifyLegalMutation) OldDeclaredLicensesHash

func (m *CertifyLegalMutation) OldDeclaredLicensesHash(ctx context.Context) (v string, err error)

OldDeclaredLicensesHash returns the old "declared_licenses_hash" field's value of the CertifyLegal entity. If the CertifyLegal object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*CertifyLegalMutation) OldDiscoveredLicense

func (m *CertifyLegalMutation) OldDiscoveredLicense(ctx context.Context) (v string, err error)

OldDiscoveredLicense returns the old "discovered_license" field's value of the CertifyLegal entity. If the CertifyLegal object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*CertifyLegalMutation) OldDiscoveredLicensesHash

func (m *CertifyLegalMutation) OldDiscoveredLicensesHash(ctx context.Context) (v string, err error)

OldDiscoveredLicensesHash returns the old "discovered_licenses_hash" field's value of the CertifyLegal entity. If the CertifyLegal object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*CertifyLegalMutation) OldDocumentRef added in v0.6.0

func (m *CertifyLegalMutation) OldDocumentRef(ctx context.Context) (v string, err error)

OldDocumentRef returns the old "document_ref" field's value of the CertifyLegal entity. If the CertifyLegal object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*CertifyLegalMutation) OldField

func (m *CertifyLegalMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*CertifyLegalMutation) OldJustification

func (m *CertifyLegalMutation) OldJustification(ctx context.Context) (v string, err error)

OldJustification returns the old "justification" field's value of the CertifyLegal entity. If the CertifyLegal object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*CertifyLegalMutation) OldOrigin

func (m *CertifyLegalMutation) OldOrigin(ctx context.Context) (v string, err error)

OldOrigin returns the old "origin" field's value of the CertifyLegal entity. If the CertifyLegal object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*CertifyLegalMutation) OldPackageID

func (m *CertifyLegalMutation) OldPackageID(ctx context.Context) (v *uuid.UUID, err error)

OldPackageID returns the old "package_id" field's value of the CertifyLegal entity. If the CertifyLegal object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*CertifyLegalMutation) OldSourceID

func (m *CertifyLegalMutation) OldSourceID(ctx context.Context) (v *uuid.UUID, err error)

OldSourceID returns the old "source_id" field's value of the CertifyLegal entity. If the CertifyLegal object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*CertifyLegalMutation) OldTimeScanned

func (m *CertifyLegalMutation) OldTimeScanned(ctx context.Context) (v time.Time, err error)

OldTimeScanned returns the old "time_scanned" field's value of the CertifyLegal entity. If the CertifyLegal object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*CertifyLegalMutation) Op

func (m *CertifyLegalMutation) Op() Op

Op returns the operation name.

func (*CertifyLegalMutation) Origin

func (m *CertifyLegalMutation) Origin() (r string, exists bool)

Origin returns the value of the "origin" field in the mutation.

func (*CertifyLegalMutation) PackageCleared

func (m *CertifyLegalMutation) PackageCleared() bool

PackageCleared reports if the "package" edge to the PackageVersion entity was cleared.

func (*CertifyLegalMutation) PackageID

func (m *CertifyLegalMutation) PackageID() (r uuid.UUID, exists bool)

PackageID returns the value of the "package_id" field in the mutation.

func (*CertifyLegalMutation) PackageIDCleared

func (m *CertifyLegalMutation) PackageIDCleared() bool

PackageIDCleared returns if the "package_id" field was cleared in this mutation.

func (*CertifyLegalMutation) PackageIDs

func (m *CertifyLegalMutation) PackageIDs() (ids []uuid.UUID)

PackageIDs returns the "package" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use PackageID instead. It exists only for internal usage by the builders.

func (*CertifyLegalMutation) RemoveDeclaredLicenseIDs

func (m *CertifyLegalMutation) RemoveDeclaredLicenseIDs(ids ...uuid.UUID)

RemoveDeclaredLicenseIDs removes the "declared_licenses" edge to the License entity by IDs.

func (*CertifyLegalMutation) RemoveDiscoveredLicenseIDs

func (m *CertifyLegalMutation) RemoveDiscoveredLicenseIDs(ids ...uuid.UUID)

RemoveDiscoveredLicenseIDs removes the "discovered_licenses" edge to the License entity by IDs.

func (*CertifyLegalMutation) RemovedDeclaredLicensesIDs

func (m *CertifyLegalMutation) RemovedDeclaredLicensesIDs() (ids []uuid.UUID)

RemovedDeclaredLicenses returns the removed IDs of the "declared_licenses" edge to the License entity.

func (*CertifyLegalMutation) RemovedDiscoveredLicensesIDs

func (m *CertifyLegalMutation) RemovedDiscoveredLicensesIDs() (ids []uuid.UUID)

RemovedDiscoveredLicenses returns the removed IDs of the "discovered_licenses" edge to the License entity.

func (*CertifyLegalMutation) RemovedEdges

func (m *CertifyLegalMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*CertifyLegalMutation) RemovedIDs

func (m *CertifyLegalMutation) RemovedIDs(name string) []ent.Value

RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.

func (*CertifyLegalMutation) ResetAttribution

func (m *CertifyLegalMutation) ResetAttribution()

ResetAttribution resets all changes to the "attribution" field.

func (*CertifyLegalMutation) ResetCollector

func (m *CertifyLegalMutation) ResetCollector()

ResetCollector resets all changes to the "collector" field.

func (*CertifyLegalMutation) ResetDeclaredLicense

func (m *CertifyLegalMutation) ResetDeclaredLicense()

ResetDeclaredLicense resets all changes to the "declared_license" field.

func (*CertifyLegalMutation) ResetDeclaredLicenses

func (m *CertifyLegalMutation) ResetDeclaredLicenses()

ResetDeclaredLicenses resets all changes to the "declared_licenses" edge.

func (*CertifyLegalMutation) ResetDeclaredLicensesHash

func (m *CertifyLegalMutation) ResetDeclaredLicensesHash()

ResetDeclaredLicensesHash resets all changes to the "declared_licenses_hash" field.

func (*CertifyLegalMutation) ResetDiscoveredLicense

func (m *CertifyLegalMutation) ResetDiscoveredLicense()

ResetDiscoveredLicense resets all changes to the "discovered_license" field.

func (*CertifyLegalMutation) ResetDiscoveredLicenses

func (m *CertifyLegalMutation) ResetDiscoveredLicenses()

ResetDiscoveredLicenses resets all changes to the "discovered_licenses" edge.

func (*CertifyLegalMutation) ResetDiscoveredLicensesHash

func (m *CertifyLegalMutation) ResetDiscoveredLicensesHash()

ResetDiscoveredLicensesHash resets all changes to the "discovered_licenses_hash" field.

func (*CertifyLegalMutation) ResetDocumentRef added in v0.6.0

func (m *CertifyLegalMutation) ResetDocumentRef()

ResetDocumentRef resets all changes to the "document_ref" field.

func (*CertifyLegalMutation) ResetEdge

func (m *CertifyLegalMutation) ResetEdge(name string) error

ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.

func (*CertifyLegalMutation) ResetField

func (m *CertifyLegalMutation) ResetField(name string) error

ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.

func (*CertifyLegalMutation) ResetJustification

func (m *CertifyLegalMutation) ResetJustification()

ResetJustification resets all changes to the "justification" field.

func (*CertifyLegalMutation) ResetOrigin

func (m *CertifyLegalMutation) ResetOrigin()

ResetOrigin resets all changes to the "origin" field.

func (*CertifyLegalMutation) ResetPackage

func (m *CertifyLegalMutation) ResetPackage()

ResetPackage resets all changes to the "package" edge.

func (*CertifyLegalMutation) ResetPackageID

func (m *CertifyLegalMutation) ResetPackageID()

ResetPackageID resets all changes to the "package_id" field.

func (*CertifyLegalMutation) ResetSource

func (m *CertifyLegalMutation) ResetSource()

ResetSource resets all changes to the "source" edge.

func (*CertifyLegalMutation) ResetSourceID

func (m *CertifyLegalMutation) ResetSourceID()

ResetSourceID resets all changes to the "source_id" field.

func (*CertifyLegalMutation) ResetTimeScanned

func (m *CertifyLegalMutation) ResetTimeScanned()

ResetTimeScanned resets all changes to the "time_scanned" field.

func (*CertifyLegalMutation) SetAttribution

func (m *CertifyLegalMutation) SetAttribution(s string)

SetAttribution sets the "attribution" field.

func (*CertifyLegalMutation) SetCollector

func (m *CertifyLegalMutation) SetCollector(s string)

SetCollector sets the "collector" field.

func (*CertifyLegalMutation) SetDeclaredLicense

func (m *CertifyLegalMutation) SetDeclaredLicense(s string)

SetDeclaredLicense sets the "declared_license" field.

func (*CertifyLegalMutation) SetDeclaredLicensesHash

func (m *CertifyLegalMutation) SetDeclaredLicensesHash(s string)

SetDeclaredLicensesHash sets the "declared_licenses_hash" field.

func (*CertifyLegalMutation) SetDiscoveredLicense

func (m *CertifyLegalMutation) SetDiscoveredLicense(s string)

SetDiscoveredLicense sets the "discovered_license" field.

func (*CertifyLegalMutation) SetDiscoveredLicensesHash

func (m *CertifyLegalMutation) SetDiscoveredLicensesHash(s string)

SetDiscoveredLicensesHash sets the "discovered_licenses_hash" field.

func (*CertifyLegalMutation) SetDocumentRef added in v0.6.0

func (m *CertifyLegalMutation) SetDocumentRef(s string)

SetDocumentRef sets the "document_ref" field.

func (*CertifyLegalMutation) SetField

func (m *CertifyLegalMutation) SetField(name string, value ent.Value) error

SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*CertifyLegalMutation) SetID added in v0.5.0

func (m *CertifyLegalMutation) SetID(id uuid.UUID)

SetID sets the value of the id field. Note that this operation is only accepted on creation of CertifyLegal entities.

func (*CertifyLegalMutation) SetJustification

func (m *CertifyLegalMutation) SetJustification(s string)

SetJustification sets the "justification" field.

func (*CertifyLegalMutation) SetOp

func (m *CertifyLegalMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*CertifyLegalMutation) SetOrigin

func (m *CertifyLegalMutation) SetOrigin(s string)

SetOrigin sets the "origin" field.

func (*CertifyLegalMutation) SetPackageID

func (m *CertifyLegalMutation) SetPackageID(u uuid.UUID)

SetPackageID sets the "package_id" field.

func (*CertifyLegalMutation) SetSourceID

func (m *CertifyLegalMutation) SetSourceID(u uuid.UUID)

SetSourceID sets the "source_id" field.

func (*CertifyLegalMutation) SetTimeScanned

func (m *CertifyLegalMutation) SetTimeScanned(t time.Time)

SetTimeScanned sets the "time_scanned" field.

func (*CertifyLegalMutation) SourceCleared

func (m *CertifyLegalMutation) SourceCleared() bool

SourceCleared reports if the "source" edge to the SourceName entity was cleared.

func (*CertifyLegalMutation) SourceID

func (m *CertifyLegalMutation) SourceID() (r uuid.UUID, exists bool)

SourceID returns the value of the "source_id" field in the mutation.

func (*CertifyLegalMutation) SourceIDCleared

func (m *CertifyLegalMutation) SourceIDCleared() bool

SourceIDCleared returns if the "source_id" field was cleared in this mutation.

func (*CertifyLegalMutation) SourceIDs

func (m *CertifyLegalMutation) SourceIDs() (ids []uuid.UUID)

SourceIDs returns the "source" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use SourceID instead. It exists only for internal usage by the builders.

func (*CertifyLegalMutation) TimeScanned

func (m *CertifyLegalMutation) TimeScanned() (r time.Time, exists bool)

TimeScanned returns the value of the "time_scanned" field in the mutation.

func (CertifyLegalMutation) Tx

func (m CertifyLegalMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*CertifyLegalMutation) Type

func (m *CertifyLegalMutation) Type() string

Type returns the node type of this mutation (CertifyLegal).

func (*CertifyLegalMutation) Where

Where appends a list predicates to the CertifyLegalMutation builder.

func (*CertifyLegalMutation) WhereP

func (m *CertifyLegalMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the CertifyLegalMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type CertifyLegalOrder

type CertifyLegalOrder struct {
	Direction OrderDirection          `json:"direction"`
	Field     *CertifyLegalOrderField `json:"field"`
}

CertifyLegalOrder defines the ordering of CertifyLegal.

type CertifyLegalOrderField

type CertifyLegalOrderField struct {
	// Value extracts the ordering value from the given CertifyLegal.
	Value func(*CertifyLegal) (ent.Value, error)
	// contains filtered or unexported fields
}

CertifyLegalOrderField defines the ordering field of CertifyLegal.

type CertifyLegalPaginateOption

type CertifyLegalPaginateOption func(*certifylegalPager) error

CertifyLegalPaginateOption enables pagination customization.

func WithCertifyLegalFilter

func WithCertifyLegalFilter(filter func(*CertifyLegalQuery) (*CertifyLegalQuery, error)) CertifyLegalPaginateOption

WithCertifyLegalFilter configures pagination filter.

func WithCertifyLegalOrder

func WithCertifyLegalOrder(order *CertifyLegalOrder) CertifyLegalPaginateOption

WithCertifyLegalOrder configures pagination ordering.

type CertifyLegalQuery

type CertifyLegalQuery struct {
	// contains filtered or unexported fields
}

CertifyLegalQuery is the builder for querying CertifyLegal entities.

func (*CertifyLegalQuery) Aggregate

func (clq *CertifyLegalQuery) Aggregate(fns ...AggregateFunc) *CertifyLegalSelect

Aggregate returns a CertifyLegalSelect configured with the given aggregations.

func (*CertifyLegalQuery) All

func (clq *CertifyLegalQuery) All(ctx context.Context) ([]*CertifyLegal, error)

All executes the query and returns a list of CertifyLegals.

func (*CertifyLegalQuery) AllX

func (clq *CertifyLegalQuery) AllX(ctx context.Context) []*CertifyLegal

AllX is like All, but panics if an error occurs.

func (*CertifyLegalQuery) Clone

func (clq *CertifyLegalQuery) Clone() *CertifyLegalQuery

Clone returns a duplicate of the CertifyLegalQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*CertifyLegalQuery) CollectFields

func (cl *CertifyLegalQuery) CollectFields(ctx context.Context, satisfies ...string) (*CertifyLegalQuery, error)

CollectFields tells the query-builder to eagerly load connected nodes by resolver context.

func (*CertifyLegalQuery) Count

func (clq *CertifyLegalQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*CertifyLegalQuery) CountX

func (clq *CertifyLegalQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*CertifyLegalQuery) Exist

func (clq *CertifyLegalQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*CertifyLegalQuery) ExistX

func (clq *CertifyLegalQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*CertifyLegalQuery) First

func (clq *CertifyLegalQuery) First(ctx context.Context) (*CertifyLegal, error)

First returns the first CertifyLegal entity from the query. Returns a *NotFoundError when no CertifyLegal was found.

func (*CertifyLegalQuery) FirstID

func (clq *CertifyLegalQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)

FirstID returns the first CertifyLegal ID from the query. Returns a *NotFoundError when no CertifyLegal ID was found.

func (*CertifyLegalQuery) FirstIDX

func (clq *CertifyLegalQuery) FirstIDX(ctx context.Context) uuid.UUID

FirstIDX is like FirstID, but panics if an error occurs.

func (*CertifyLegalQuery) FirstX

func (clq *CertifyLegalQuery) FirstX(ctx context.Context) *CertifyLegal

FirstX is like First, but panics if an error occurs.

func (*CertifyLegalQuery) GroupBy

func (clq *CertifyLegalQuery) GroupBy(field string, fields ...string) *CertifyLegalGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	PackageID uuid.UUID `json:"package_id,omitempty"`
	Count int `json:"count,omitempty"`
}

client.CertifyLegal.Query().
	GroupBy(certifylegal.FieldPackageID).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*CertifyLegalQuery) IDs

func (clq *CertifyLegalQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)

IDs executes the query and returns a list of CertifyLegal IDs.

func (*CertifyLegalQuery) IDsX

func (clq *CertifyLegalQuery) IDsX(ctx context.Context) []uuid.UUID

IDsX is like IDs, but panics if an error occurs.

func (*CertifyLegalQuery) Limit

func (clq *CertifyLegalQuery) Limit(limit int) *CertifyLegalQuery

Limit the number of records to be returned by this query.

func (*CertifyLegalQuery) Offset

func (clq *CertifyLegalQuery) Offset(offset int) *CertifyLegalQuery

Offset to start from.

func (*CertifyLegalQuery) Only

func (clq *CertifyLegalQuery) Only(ctx context.Context) (*CertifyLegal, error)

Only returns a single CertifyLegal entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one CertifyLegal entity is found. Returns a *NotFoundError when no CertifyLegal entities are found.

func (*CertifyLegalQuery) OnlyID

func (clq *CertifyLegalQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)

OnlyID is like Only, but returns the only CertifyLegal ID in the query. Returns a *NotSingularError when more than one CertifyLegal ID is found. Returns a *NotFoundError when no entities are found.

func (*CertifyLegalQuery) OnlyIDX

func (clq *CertifyLegalQuery) OnlyIDX(ctx context.Context) uuid.UUID

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*CertifyLegalQuery) OnlyX

func (clq *CertifyLegalQuery) OnlyX(ctx context.Context) *CertifyLegal

OnlyX is like Only, but panics if an error occurs.

func (*CertifyLegalQuery) Order

Order specifies how the records should be ordered.

func (*CertifyLegalQuery) Paginate

func (cl *CertifyLegalQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...CertifyLegalPaginateOption,
) (*CertifyLegalConnection, error)

Paginate executes the query and returns a relay based cursor connection to CertifyLegal.

func (*CertifyLegalQuery) QueryDeclaredLicenses

func (clq *CertifyLegalQuery) QueryDeclaredLicenses() *LicenseQuery

QueryDeclaredLicenses chains the current query on the "declared_licenses" edge.

func (*CertifyLegalQuery) QueryDiscoveredLicenses

func (clq *CertifyLegalQuery) QueryDiscoveredLicenses() *LicenseQuery

QueryDiscoveredLicenses chains the current query on the "discovered_licenses" edge.

func (*CertifyLegalQuery) QueryPackage

func (clq *CertifyLegalQuery) QueryPackage() *PackageVersionQuery

QueryPackage chains the current query on the "package" edge.

func (*CertifyLegalQuery) QuerySource

func (clq *CertifyLegalQuery) QuerySource() *SourceNameQuery

QuerySource chains the current query on the "source" edge.

func (*CertifyLegalQuery) Select

func (clq *CertifyLegalQuery) Select(fields ...string) *CertifyLegalSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	PackageID uuid.UUID `json:"package_id,omitempty"`
}

client.CertifyLegal.Query().
	Select(certifylegal.FieldPackageID).
	Scan(ctx, &v)

func (*CertifyLegalQuery) Unique

func (clq *CertifyLegalQuery) Unique(unique bool) *CertifyLegalQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*CertifyLegalQuery) Where

Where adds a new predicate for the CertifyLegalQuery builder.

func (*CertifyLegalQuery) WithDeclaredLicenses

func (clq *CertifyLegalQuery) WithDeclaredLicenses(opts ...func(*LicenseQuery)) *CertifyLegalQuery

WithDeclaredLicenses tells the query-builder to eager-load the nodes that are connected to the "declared_licenses" edge. The optional arguments are used to configure the query builder of the edge.

func (*CertifyLegalQuery) WithDiscoveredLicenses

func (clq *CertifyLegalQuery) WithDiscoveredLicenses(opts ...func(*LicenseQuery)) *CertifyLegalQuery

WithDiscoveredLicenses tells the query-builder to eager-load the nodes that are connected to the "discovered_licenses" edge. The optional arguments are used to configure the query builder of the edge.

func (*CertifyLegalQuery) WithNamedDeclaredLicenses

func (clq *CertifyLegalQuery) WithNamedDeclaredLicenses(name string, opts ...func(*LicenseQuery)) *CertifyLegalQuery

WithNamedDeclaredLicenses tells the query-builder to eager-load the nodes that are connected to the "declared_licenses" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*CertifyLegalQuery) WithNamedDiscoveredLicenses

func (clq *CertifyLegalQuery) WithNamedDiscoveredLicenses(name string, opts ...func(*LicenseQuery)) *CertifyLegalQuery

WithNamedDiscoveredLicenses tells the query-builder to eager-load the nodes that are connected to the "discovered_licenses" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*CertifyLegalQuery) WithPackage

func (clq *CertifyLegalQuery) WithPackage(opts ...func(*PackageVersionQuery)) *CertifyLegalQuery

WithPackage tells the query-builder to eager-load the nodes that are connected to the "package" edge. The optional arguments are used to configure the query builder of the edge.

func (*CertifyLegalQuery) WithSource

func (clq *CertifyLegalQuery) WithSource(opts ...func(*SourceNameQuery)) *CertifyLegalQuery

WithSource tells the query-builder to eager-load the nodes that are connected to the "source" edge. The optional arguments are used to configure the query builder of the edge.

type CertifyLegalSelect

type CertifyLegalSelect struct {
	*CertifyLegalQuery
	// contains filtered or unexported fields
}

CertifyLegalSelect is the builder for selecting fields of CertifyLegal entities.

func (*CertifyLegalSelect) Aggregate

func (cls *CertifyLegalSelect) Aggregate(fns ...AggregateFunc) *CertifyLegalSelect

Aggregate adds the given aggregation functions to the selector query.

func (*CertifyLegalSelect) Bool

func (s *CertifyLegalSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*CertifyLegalSelect) BoolX

func (s *CertifyLegalSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*CertifyLegalSelect) Bools

func (s *CertifyLegalSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*CertifyLegalSelect) BoolsX

func (s *CertifyLegalSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*CertifyLegalSelect) Float64

func (s *CertifyLegalSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*CertifyLegalSelect) Float64X

func (s *CertifyLegalSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*CertifyLegalSelect) Float64s

func (s *CertifyLegalSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*CertifyLegalSelect) Float64sX

func (s *CertifyLegalSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*CertifyLegalSelect) Int

func (s *CertifyLegalSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*CertifyLegalSelect) IntX

func (s *CertifyLegalSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*CertifyLegalSelect) Ints

func (s *CertifyLegalSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*CertifyLegalSelect) IntsX

func (s *CertifyLegalSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*CertifyLegalSelect) Scan

func (cls *CertifyLegalSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*CertifyLegalSelect) ScanX

func (s *CertifyLegalSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*CertifyLegalSelect) String

func (s *CertifyLegalSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*CertifyLegalSelect) StringX

func (s *CertifyLegalSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*CertifyLegalSelect) Strings

func (s *CertifyLegalSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*CertifyLegalSelect) StringsX

func (s *CertifyLegalSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type CertifyLegalUpdate

type CertifyLegalUpdate struct {
	// contains filtered or unexported fields
}

CertifyLegalUpdate is the builder for updating CertifyLegal entities.

func (*CertifyLegalUpdate) AddDeclaredLicenseIDs

func (clu *CertifyLegalUpdate) AddDeclaredLicenseIDs(ids ...uuid.UUID) *CertifyLegalUpdate

AddDeclaredLicenseIDs adds the "declared_licenses" edge to the License entity by IDs.

func (*CertifyLegalUpdate) AddDeclaredLicenses

func (clu *CertifyLegalUpdate) AddDeclaredLicenses(l ...*License) *CertifyLegalUpdate

AddDeclaredLicenses adds the "declared_licenses" edges to the License entity.

func (*CertifyLegalUpdate) AddDiscoveredLicenseIDs

func (clu *CertifyLegalUpdate) AddDiscoveredLicenseIDs(ids ...uuid.UUID) *CertifyLegalUpdate

AddDiscoveredLicenseIDs adds the "discovered_licenses" edge to the License entity by IDs.

func (*CertifyLegalUpdate) AddDiscoveredLicenses

func (clu *CertifyLegalUpdate) AddDiscoveredLicenses(l ...*License) *CertifyLegalUpdate

AddDiscoveredLicenses adds the "discovered_licenses" edges to the License entity.

func (*CertifyLegalUpdate) ClearDeclaredLicenses

func (clu *CertifyLegalUpdate) ClearDeclaredLicenses() *CertifyLegalUpdate

ClearDeclaredLicenses clears all "declared_licenses" edges to the License entity.

func (*CertifyLegalUpdate) ClearDiscoveredLicenses

func (clu *CertifyLegalUpdate) ClearDiscoveredLicenses() *CertifyLegalUpdate

ClearDiscoveredLicenses clears all "discovered_licenses" edges to the License entity.

func (*CertifyLegalUpdate) ClearPackage

func (clu *CertifyLegalUpdate) ClearPackage() *CertifyLegalUpdate

ClearPackage clears the "package" edge to the PackageVersion entity.

func (*CertifyLegalUpdate) ClearPackageID

func (clu *CertifyLegalUpdate) ClearPackageID() *CertifyLegalUpdate

ClearPackageID clears the value of the "package_id" field.

func (*CertifyLegalUpdate) ClearSource

func (clu *CertifyLegalUpdate) ClearSource() *CertifyLegalUpdate

ClearSource clears the "source" edge to the SourceName entity.

func (*CertifyLegalUpdate) ClearSourceID

func (clu *CertifyLegalUpdate) ClearSourceID() *CertifyLegalUpdate

ClearSourceID clears the value of the "source_id" field.

func (*CertifyLegalUpdate) Exec

func (clu *CertifyLegalUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*CertifyLegalUpdate) ExecX

func (clu *CertifyLegalUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*CertifyLegalUpdate) Mutation

func (clu *CertifyLegalUpdate) Mutation() *CertifyLegalMutation

Mutation returns the CertifyLegalMutation object of the builder.

func (*CertifyLegalUpdate) RemoveDeclaredLicenseIDs

func (clu *CertifyLegalUpdate) RemoveDeclaredLicenseIDs(ids ...uuid.UUID) *CertifyLegalUpdate

RemoveDeclaredLicenseIDs removes the "declared_licenses" edge to License entities by IDs.

func (*CertifyLegalUpdate) RemoveDeclaredLicenses

func (clu *CertifyLegalUpdate) RemoveDeclaredLicenses(l ...*License) *CertifyLegalUpdate

RemoveDeclaredLicenses removes "declared_licenses" edges to License entities.

func (*CertifyLegalUpdate) RemoveDiscoveredLicenseIDs

func (clu *CertifyLegalUpdate) RemoveDiscoveredLicenseIDs(ids ...uuid.UUID) *CertifyLegalUpdate

RemoveDiscoveredLicenseIDs removes the "discovered_licenses" edge to License entities by IDs.

func (*CertifyLegalUpdate) RemoveDiscoveredLicenses

func (clu *CertifyLegalUpdate) RemoveDiscoveredLicenses(l ...*License) *CertifyLegalUpdate

RemoveDiscoveredLicenses removes "discovered_licenses" edges to License entities.

func (*CertifyLegalUpdate) Save

func (clu *CertifyLegalUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*CertifyLegalUpdate) SaveX

func (clu *CertifyLegalUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*CertifyLegalUpdate) SetAttribution

func (clu *CertifyLegalUpdate) SetAttribution(s string) *CertifyLegalUpdate

SetAttribution sets the "attribution" field.

func (*CertifyLegalUpdate) SetCollector

func (clu *CertifyLegalUpdate) SetCollector(s string) *CertifyLegalUpdate

SetCollector sets the "collector" field.

func (*CertifyLegalUpdate) SetDeclaredLicense

func (clu *CertifyLegalUpdate) SetDeclaredLicense(s string) *CertifyLegalUpdate

SetDeclaredLicense sets the "declared_license" field.

func (*CertifyLegalUpdate) SetDeclaredLicensesHash

func (clu *CertifyLegalUpdate) SetDeclaredLicensesHash(s string) *CertifyLegalUpdate

SetDeclaredLicensesHash sets the "declared_licenses_hash" field.

func (*CertifyLegalUpdate) SetDiscoveredLicense

func (clu *CertifyLegalUpdate) SetDiscoveredLicense(s string) *CertifyLegalUpdate

SetDiscoveredLicense sets the "discovered_license" field.

func (*CertifyLegalUpdate) SetDiscoveredLicensesHash

func (clu *CertifyLegalUpdate) SetDiscoveredLicensesHash(s string) *CertifyLegalUpdate

SetDiscoveredLicensesHash sets the "discovered_licenses_hash" field.

func (*CertifyLegalUpdate) SetDocumentRef added in v0.6.0

func (clu *CertifyLegalUpdate) SetDocumentRef(s string) *CertifyLegalUpdate

SetDocumentRef sets the "document_ref" field.

func (*CertifyLegalUpdate) SetJustification

func (clu *CertifyLegalUpdate) SetJustification(s string) *CertifyLegalUpdate

SetJustification sets the "justification" field.

func (*CertifyLegalUpdate) SetNillableAttribution added in v0.4.0

func (clu *CertifyLegalUpdate) SetNillableAttribution(s *string) *CertifyLegalUpdate

SetNillableAttribution sets the "attribution" field if the given value is not nil.

func (*CertifyLegalUpdate) SetNillableCollector added in v0.4.0

func (clu *CertifyLegalUpdate) SetNillableCollector(s *string) *CertifyLegalUpdate

SetNillableCollector sets the "collector" field if the given value is not nil.

func (*CertifyLegalUpdate) SetNillableDeclaredLicense added in v0.4.0

func (clu *CertifyLegalUpdate) SetNillableDeclaredLicense(s *string) *CertifyLegalUpdate

SetNillableDeclaredLicense sets the "declared_license" field if the given value is not nil.

func (*CertifyLegalUpdate) SetNillableDeclaredLicensesHash added in v0.4.0

func (clu *CertifyLegalUpdate) SetNillableDeclaredLicensesHash(s *string) *CertifyLegalUpdate

SetNillableDeclaredLicensesHash sets the "declared_licenses_hash" field if the given value is not nil.

func (*CertifyLegalUpdate) SetNillableDiscoveredLicense added in v0.4.0

func (clu *CertifyLegalUpdate) SetNillableDiscoveredLicense(s *string) *CertifyLegalUpdate

SetNillableDiscoveredLicense sets the "discovered_license" field if the given value is not nil.

func (*CertifyLegalUpdate) SetNillableDiscoveredLicensesHash added in v0.4.0

func (clu *CertifyLegalUpdate) SetNillableDiscoveredLicensesHash(s *string) *CertifyLegalUpdate

SetNillableDiscoveredLicensesHash sets the "discovered_licenses_hash" field if the given value is not nil.

func (*CertifyLegalUpdate) SetNillableDocumentRef added in v0.6.0

func (clu *CertifyLegalUpdate) SetNillableDocumentRef(s *string) *CertifyLegalUpdate

SetNillableDocumentRef sets the "document_ref" field if the given value is not nil.

func (*CertifyLegalUpdate) SetNillableJustification added in v0.4.0

func (clu *CertifyLegalUpdate) SetNillableJustification(s *string) *CertifyLegalUpdate

SetNillableJustification sets the "justification" field if the given value is not nil.

func (*CertifyLegalUpdate) SetNillableOrigin added in v0.4.0

func (clu *CertifyLegalUpdate) SetNillableOrigin(s *string) *CertifyLegalUpdate

SetNillableOrigin sets the "origin" field if the given value is not nil.

func (*CertifyLegalUpdate) SetNillablePackageID

func (clu *CertifyLegalUpdate) SetNillablePackageID(u *uuid.UUID) *CertifyLegalUpdate

SetNillablePackageID sets the "package_id" field if the given value is not nil.

func (*CertifyLegalUpdate) SetNillableSourceID

func (clu *CertifyLegalUpdate) SetNillableSourceID(u *uuid.UUID) *CertifyLegalUpdate

SetNillableSourceID sets the "source_id" field if the given value is not nil.

func (*CertifyLegalUpdate) SetNillableTimeScanned added in v0.4.0

func (clu *CertifyLegalUpdate) SetNillableTimeScanned(t *time.Time) *CertifyLegalUpdate

SetNillableTimeScanned sets the "time_scanned" field if the given value is not nil.

func (*CertifyLegalUpdate) SetOrigin

func (clu *CertifyLegalUpdate) SetOrigin(s string) *CertifyLegalUpdate

SetOrigin sets the "origin" field.

func (*CertifyLegalUpdate) SetPackage

SetPackage sets the "package" edge to the PackageVersion entity.

func (*CertifyLegalUpdate) SetPackageID

func (clu *CertifyLegalUpdate) SetPackageID(u uuid.UUID) *CertifyLegalUpdate

SetPackageID sets the "package_id" field.

func (*CertifyLegalUpdate) SetSource

func (clu *CertifyLegalUpdate) SetSource(s *SourceName) *CertifyLegalUpdate

SetSource sets the "source" edge to the SourceName entity.

func (*CertifyLegalUpdate) SetSourceID

func (clu *CertifyLegalUpdate) SetSourceID(u uuid.UUID) *CertifyLegalUpdate

SetSourceID sets the "source_id" field.

func (*CertifyLegalUpdate) SetTimeScanned

func (clu *CertifyLegalUpdate) SetTimeScanned(t time.Time) *CertifyLegalUpdate

SetTimeScanned sets the "time_scanned" field.

func (*CertifyLegalUpdate) Where

Where appends a list predicates to the CertifyLegalUpdate builder.

type CertifyLegalUpdateOne

type CertifyLegalUpdateOne struct {
	// contains filtered or unexported fields
}

CertifyLegalUpdateOne is the builder for updating a single CertifyLegal entity.

func (*CertifyLegalUpdateOne) AddDeclaredLicenseIDs

func (cluo *CertifyLegalUpdateOne) AddDeclaredLicenseIDs(ids ...uuid.UUID) *CertifyLegalUpdateOne

AddDeclaredLicenseIDs adds the "declared_licenses" edge to the License entity by IDs.

func (*CertifyLegalUpdateOne) AddDeclaredLicenses

func (cluo *CertifyLegalUpdateOne) AddDeclaredLicenses(l ...*License) *CertifyLegalUpdateOne

AddDeclaredLicenses adds the "declared_licenses" edges to the License entity.

func (*CertifyLegalUpdateOne) AddDiscoveredLicenseIDs

func (cluo *CertifyLegalUpdateOne) AddDiscoveredLicenseIDs(ids ...uuid.UUID) *CertifyLegalUpdateOne

AddDiscoveredLicenseIDs adds the "discovered_licenses" edge to the License entity by IDs.

func (*CertifyLegalUpdateOne) AddDiscoveredLicenses

func (cluo *CertifyLegalUpdateOne) AddDiscoveredLicenses(l ...*License) *CertifyLegalUpdateOne

AddDiscoveredLicenses adds the "discovered_licenses" edges to the License entity.

func (*CertifyLegalUpdateOne) ClearDeclaredLicenses

func (cluo *CertifyLegalUpdateOne) ClearDeclaredLicenses() *CertifyLegalUpdateOne

ClearDeclaredLicenses clears all "declared_licenses" edges to the License entity.

func (*CertifyLegalUpdateOne) ClearDiscoveredLicenses

func (cluo *CertifyLegalUpdateOne) ClearDiscoveredLicenses() *CertifyLegalUpdateOne

ClearDiscoveredLicenses clears all "discovered_licenses" edges to the License entity.

func (*CertifyLegalUpdateOne) ClearPackage

func (cluo *CertifyLegalUpdateOne) ClearPackage() *CertifyLegalUpdateOne

ClearPackage clears the "package" edge to the PackageVersion entity.

func (*CertifyLegalUpdateOne) ClearPackageID

func (cluo *CertifyLegalUpdateOne) ClearPackageID() *CertifyLegalUpdateOne

ClearPackageID clears the value of the "package_id" field.

func (*CertifyLegalUpdateOne) ClearSource

func (cluo *CertifyLegalUpdateOne) ClearSource() *CertifyLegalUpdateOne

ClearSource clears the "source" edge to the SourceName entity.

func (*CertifyLegalUpdateOne) ClearSourceID

func (cluo *CertifyLegalUpdateOne) ClearSourceID() *CertifyLegalUpdateOne

ClearSourceID clears the value of the "source_id" field.

func (*CertifyLegalUpdateOne) Exec

func (cluo *CertifyLegalUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*CertifyLegalUpdateOne) ExecX

func (cluo *CertifyLegalUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*CertifyLegalUpdateOne) Mutation

func (cluo *CertifyLegalUpdateOne) Mutation() *CertifyLegalMutation

Mutation returns the CertifyLegalMutation object of the builder.

func (*CertifyLegalUpdateOne) RemoveDeclaredLicenseIDs

func (cluo *CertifyLegalUpdateOne) RemoveDeclaredLicenseIDs(ids ...uuid.UUID) *CertifyLegalUpdateOne

RemoveDeclaredLicenseIDs removes the "declared_licenses" edge to License entities by IDs.

func (*CertifyLegalUpdateOne) RemoveDeclaredLicenses

func (cluo *CertifyLegalUpdateOne) RemoveDeclaredLicenses(l ...*License) *CertifyLegalUpdateOne

RemoveDeclaredLicenses removes "declared_licenses" edges to License entities.

func (*CertifyLegalUpdateOne) RemoveDiscoveredLicenseIDs

func (cluo *CertifyLegalUpdateOne) RemoveDiscoveredLicenseIDs(ids ...uuid.UUID) *CertifyLegalUpdateOne

RemoveDiscoveredLicenseIDs removes the "discovered_licenses" edge to License entities by IDs.

func (*CertifyLegalUpdateOne) RemoveDiscoveredLicenses

func (cluo *CertifyLegalUpdateOne) RemoveDiscoveredLicenses(l ...*License) *CertifyLegalUpdateOne

RemoveDiscoveredLicenses removes "discovered_licenses" edges to License entities.

func (*CertifyLegalUpdateOne) Save

Save executes the query and returns the updated CertifyLegal entity.

func (*CertifyLegalUpdateOne) SaveX

SaveX is like Save, but panics if an error occurs.

func (*CertifyLegalUpdateOne) Select

func (cluo *CertifyLegalUpdateOne) Select(field string, fields ...string) *CertifyLegalUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*CertifyLegalUpdateOne) SetAttribution

func (cluo *CertifyLegalUpdateOne) SetAttribution(s string) *CertifyLegalUpdateOne

SetAttribution sets the "attribution" field.

func (*CertifyLegalUpdateOne) SetCollector

func (cluo *CertifyLegalUpdateOne) SetCollector(s string) *CertifyLegalUpdateOne

SetCollector sets the "collector" field.

func (*CertifyLegalUpdateOne) SetDeclaredLicense

func (cluo *CertifyLegalUpdateOne) SetDeclaredLicense(s string) *CertifyLegalUpdateOne

SetDeclaredLicense sets the "declared_license" field.

func (*CertifyLegalUpdateOne) SetDeclaredLicensesHash

func (cluo *CertifyLegalUpdateOne) SetDeclaredLicensesHash(s string) *CertifyLegalUpdateOne

SetDeclaredLicensesHash sets the "declared_licenses_hash" field.

func (*CertifyLegalUpdateOne) SetDiscoveredLicense

func (cluo *CertifyLegalUpdateOne) SetDiscoveredLicense(s string) *CertifyLegalUpdateOne

SetDiscoveredLicense sets the "discovered_license" field.

func (*CertifyLegalUpdateOne) SetDiscoveredLicensesHash

func (cluo *CertifyLegalUpdateOne) SetDiscoveredLicensesHash(s string) *CertifyLegalUpdateOne

SetDiscoveredLicensesHash sets the "discovered_licenses_hash" field.

func (*CertifyLegalUpdateOne) SetDocumentRef added in v0.6.0

func (cluo *CertifyLegalUpdateOne) SetDocumentRef(s string) *CertifyLegalUpdateOne

SetDocumentRef sets the "document_ref" field.

func (*CertifyLegalUpdateOne) SetJustification

func (cluo *CertifyLegalUpdateOne) SetJustification(s string) *CertifyLegalUpdateOne

SetJustification sets the "justification" field.

func (*CertifyLegalUpdateOne) SetNillableAttribution added in v0.4.0

func (cluo *CertifyLegalUpdateOne) SetNillableAttribution(s *string) *CertifyLegalUpdateOne

SetNillableAttribution sets the "attribution" field if the given value is not nil.

func (*CertifyLegalUpdateOne) SetNillableCollector added in v0.4.0

func (cluo *CertifyLegalUpdateOne) SetNillableCollector(s *string) *CertifyLegalUpdateOne

SetNillableCollector sets the "collector" field if the given value is not nil.

func (*CertifyLegalUpdateOne) SetNillableDeclaredLicense added in v0.4.0

func (cluo *CertifyLegalUpdateOne) SetNillableDeclaredLicense(s *string) *CertifyLegalUpdateOne

SetNillableDeclaredLicense sets the "declared_license" field if the given value is not nil.

func (*CertifyLegalUpdateOne) SetNillableDeclaredLicensesHash added in v0.4.0

func (cluo *CertifyLegalUpdateOne) SetNillableDeclaredLicensesHash(s *string) *CertifyLegalUpdateOne

SetNillableDeclaredLicensesHash sets the "declared_licenses_hash" field if the given value is not nil.

func (*CertifyLegalUpdateOne) SetNillableDiscoveredLicense added in v0.4.0

func (cluo *CertifyLegalUpdateOne) SetNillableDiscoveredLicense(s *string) *CertifyLegalUpdateOne

SetNillableDiscoveredLicense sets the "discovered_license" field if the given value is not nil.

func (*CertifyLegalUpdateOne) SetNillableDiscoveredLicensesHash added in v0.4.0

func (cluo *CertifyLegalUpdateOne) SetNillableDiscoveredLicensesHash(s *string) *CertifyLegalUpdateOne

SetNillableDiscoveredLicensesHash sets the "discovered_licenses_hash" field if the given value is not nil.

func (*CertifyLegalUpdateOne) SetNillableDocumentRef added in v0.6.0

func (cluo *CertifyLegalUpdateOne) SetNillableDocumentRef(s *string) *CertifyLegalUpdateOne

SetNillableDocumentRef sets the "document_ref" field if the given value is not nil.

func (*CertifyLegalUpdateOne) SetNillableJustification added in v0.4.0

func (cluo *CertifyLegalUpdateOne) SetNillableJustification(s *string) *CertifyLegalUpdateOne

SetNillableJustification sets the "justification" field if the given value is not nil.

func (*CertifyLegalUpdateOne) SetNillableOrigin added in v0.4.0

func (cluo *CertifyLegalUpdateOne) SetNillableOrigin(s *string) *CertifyLegalUpdateOne

SetNillableOrigin sets the "origin" field if the given value is not nil.

func (*CertifyLegalUpdateOne) SetNillablePackageID

func (cluo *CertifyLegalUpdateOne) SetNillablePackageID(u *uuid.UUID) *CertifyLegalUpdateOne

SetNillablePackageID sets the "package_id" field if the given value is not nil.

func (*CertifyLegalUpdateOne) SetNillableSourceID

func (cluo *CertifyLegalUpdateOne) SetNillableSourceID(u *uuid.UUID) *CertifyLegalUpdateOne

SetNillableSourceID sets the "source_id" field if the given value is not nil.

func (*CertifyLegalUpdateOne) SetNillableTimeScanned added in v0.4.0

func (cluo *CertifyLegalUpdateOne) SetNillableTimeScanned(t *time.Time) *CertifyLegalUpdateOne

SetNillableTimeScanned sets the "time_scanned" field if the given value is not nil.

func (*CertifyLegalUpdateOne) SetOrigin

SetOrigin sets the "origin" field.

func (*CertifyLegalUpdateOne) SetPackage

SetPackage sets the "package" edge to the PackageVersion entity.

func (*CertifyLegalUpdateOne) SetPackageID

func (cluo *CertifyLegalUpdateOne) SetPackageID(u uuid.UUID) *CertifyLegalUpdateOne

SetPackageID sets the "package_id" field.

func (*CertifyLegalUpdateOne) SetSource

SetSource sets the "source" edge to the SourceName entity.

func (*CertifyLegalUpdateOne) SetSourceID

func (cluo *CertifyLegalUpdateOne) SetSourceID(u uuid.UUID) *CertifyLegalUpdateOne

SetSourceID sets the "source_id" field.

func (*CertifyLegalUpdateOne) SetTimeScanned

func (cluo *CertifyLegalUpdateOne) SetTimeScanned(t time.Time) *CertifyLegalUpdateOne

SetTimeScanned sets the "time_scanned" field.

func (*CertifyLegalUpdateOne) Where

Where appends a list predicates to the CertifyLegalUpdate builder.

type CertifyLegalUpsert

type CertifyLegalUpsert struct {
	*sql.UpdateSet
}

CertifyLegalUpsert is the "OnConflict" setter.

func (*CertifyLegalUpsert) ClearPackageID

func (u *CertifyLegalUpsert) ClearPackageID() *CertifyLegalUpsert

ClearPackageID clears the value of the "package_id" field.

func (*CertifyLegalUpsert) ClearSourceID

func (u *CertifyLegalUpsert) ClearSourceID() *CertifyLegalUpsert

ClearSourceID clears the value of the "source_id" field.

func (*CertifyLegalUpsert) SetAttribution

func (u *CertifyLegalUpsert) SetAttribution(v string) *CertifyLegalUpsert

SetAttribution sets the "attribution" field.

func (*CertifyLegalUpsert) SetCollector

func (u *CertifyLegalUpsert) SetCollector(v string) *CertifyLegalUpsert

SetCollector sets the "collector" field.

func (*CertifyLegalUpsert) SetDeclaredLicense

func (u *CertifyLegalUpsert) SetDeclaredLicense(v string) *CertifyLegalUpsert

SetDeclaredLicense sets the "declared_license" field.

func (*CertifyLegalUpsert) SetDeclaredLicensesHash

func (u *CertifyLegalUpsert) SetDeclaredLicensesHash(v string) *CertifyLegalUpsert

SetDeclaredLicensesHash sets the "declared_licenses_hash" field.

func (*CertifyLegalUpsert) SetDiscoveredLicense

func (u *CertifyLegalUpsert) SetDiscoveredLicense(v string) *CertifyLegalUpsert

SetDiscoveredLicense sets the "discovered_license" field.

func (*CertifyLegalUpsert) SetDiscoveredLicensesHash

func (u *CertifyLegalUpsert) SetDiscoveredLicensesHash(v string) *CertifyLegalUpsert

SetDiscoveredLicensesHash sets the "discovered_licenses_hash" field.

func (*CertifyLegalUpsert) SetDocumentRef added in v0.6.0

func (u *CertifyLegalUpsert) SetDocumentRef(v string) *CertifyLegalUpsert

SetDocumentRef sets the "document_ref" field.

func (*CertifyLegalUpsert) SetJustification

func (u *CertifyLegalUpsert) SetJustification(v string) *CertifyLegalUpsert

SetJustification sets the "justification" field.

func (*CertifyLegalUpsert) SetOrigin

func (u *CertifyLegalUpsert) SetOrigin(v string) *CertifyLegalUpsert

SetOrigin sets the "origin" field.

func (*CertifyLegalUpsert) SetPackageID

func (u *CertifyLegalUpsert) SetPackageID(v uuid.UUID) *CertifyLegalUpsert

SetPackageID sets the "package_id" field.

func (*CertifyLegalUpsert) SetSourceID

func (u *CertifyLegalUpsert) SetSourceID(v uuid.UUID) *CertifyLegalUpsert

SetSourceID sets the "source_id" field.

func (*CertifyLegalUpsert) SetTimeScanned

func (u *CertifyLegalUpsert) SetTimeScanned(v time.Time) *CertifyLegalUpsert

SetTimeScanned sets the "time_scanned" field.

func (*CertifyLegalUpsert) UpdateAttribution

func (u *CertifyLegalUpsert) UpdateAttribution() *CertifyLegalUpsert

UpdateAttribution sets the "attribution" field to the value that was provided on create.

func (*CertifyLegalUpsert) UpdateCollector

func (u *CertifyLegalUpsert) UpdateCollector() *CertifyLegalUpsert

UpdateCollector sets the "collector" field to the value that was provided on create.

func (*CertifyLegalUpsert) UpdateDeclaredLicense

func (u *CertifyLegalUpsert) UpdateDeclaredLicense() *CertifyLegalUpsert

UpdateDeclaredLicense sets the "declared_license" field to the value that was provided on create.

func (*CertifyLegalUpsert) UpdateDeclaredLicensesHash

func (u *CertifyLegalUpsert) UpdateDeclaredLicensesHash() *CertifyLegalUpsert

UpdateDeclaredLicensesHash sets the "declared_licenses_hash" field to the value that was provided on create.

func (*CertifyLegalUpsert) UpdateDiscoveredLicense

func (u *CertifyLegalUpsert) UpdateDiscoveredLicense() *CertifyLegalUpsert

UpdateDiscoveredLicense sets the "discovered_license" field to the value that was provided on create.

func (*CertifyLegalUpsert) UpdateDiscoveredLicensesHash

func (u *CertifyLegalUpsert) UpdateDiscoveredLicensesHash() *CertifyLegalUpsert

UpdateDiscoveredLicensesHash sets the "discovered_licenses_hash" field to the value that was provided on create.

func (*CertifyLegalUpsert) UpdateDocumentRef added in v0.6.0

func (u *CertifyLegalUpsert) UpdateDocumentRef() *CertifyLegalUpsert

UpdateDocumentRef sets the "document_ref" field to the value that was provided on create.

func (*CertifyLegalUpsert) UpdateJustification

func (u *CertifyLegalUpsert) UpdateJustification() *CertifyLegalUpsert

UpdateJustification sets the "justification" field to the value that was provided on create.

func (*CertifyLegalUpsert) UpdateOrigin

func (u *CertifyLegalUpsert) UpdateOrigin() *CertifyLegalUpsert

UpdateOrigin sets the "origin" field to the value that was provided on create.

func (*CertifyLegalUpsert) UpdatePackageID

func (u *CertifyLegalUpsert) UpdatePackageID() *CertifyLegalUpsert

UpdatePackageID sets the "package_id" field to the value that was provided on create.

func (*CertifyLegalUpsert) UpdateSourceID

func (u *CertifyLegalUpsert) UpdateSourceID() *CertifyLegalUpsert

UpdateSourceID sets the "source_id" field to the value that was provided on create.

func (*CertifyLegalUpsert) UpdateTimeScanned

func (u *CertifyLegalUpsert) UpdateTimeScanned() *CertifyLegalUpsert

UpdateTimeScanned sets the "time_scanned" field to the value that was provided on create.

type CertifyLegalUpsertBulk

type CertifyLegalUpsertBulk struct {
	// contains filtered or unexported fields
}

CertifyLegalUpsertBulk is the builder for "upsert"-ing a bulk of CertifyLegal nodes.

func (*CertifyLegalUpsertBulk) ClearPackageID

func (u *CertifyLegalUpsertBulk) ClearPackageID() *CertifyLegalUpsertBulk

ClearPackageID clears the value of the "package_id" field.

func (*CertifyLegalUpsertBulk) ClearSourceID

func (u *CertifyLegalUpsertBulk) ClearSourceID() *CertifyLegalUpsertBulk

ClearSourceID clears the value of the "source_id" field.

func (*CertifyLegalUpsertBulk) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*CertifyLegalUpsertBulk) Exec

Exec executes the query.

func (*CertifyLegalUpsertBulk) ExecX

func (u *CertifyLegalUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*CertifyLegalUpsertBulk) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.CertifyLegal.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*CertifyLegalUpsertBulk) SetAttribution

SetAttribution sets the "attribution" field.

func (*CertifyLegalUpsertBulk) SetCollector

SetCollector sets the "collector" field.

func (*CertifyLegalUpsertBulk) SetDeclaredLicense

func (u *CertifyLegalUpsertBulk) SetDeclaredLicense(v string) *CertifyLegalUpsertBulk

SetDeclaredLicense sets the "declared_license" field.

func (*CertifyLegalUpsertBulk) SetDeclaredLicensesHash

func (u *CertifyLegalUpsertBulk) SetDeclaredLicensesHash(v string) *CertifyLegalUpsertBulk

SetDeclaredLicensesHash sets the "declared_licenses_hash" field.

func (*CertifyLegalUpsertBulk) SetDiscoveredLicense

func (u *CertifyLegalUpsertBulk) SetDiscoveredLicense(v string) *CertifyLegalUpsertBulk

SetDiscoveredLicense sets the "discovered_license" field.

func (*CertifyLegalUpsertBulk) SetDiscoveredLicensesHash

func (u *CertifyLegalUpsertBulk) SetDiscoveredLicensesHash(v string) *CertifyLegalUpsertBulk

SetDiscoveredLicensesHash sets the "discovered_licenses_hash" field.

func (*CertifyLegalUpsertBulk) SetDocumentRef added in v0.6.0

SetDocumentRef sets the "document_ref" field.

func (*CertifyLegalUpsertBulk) SetJustification

func (u *CertifyLegalUpsertBulk) SetJustification(v string) *CertifyLegalUpsertBulk

SetJustification sets the "justification" field.

func (*CertifyLegalUpsertBulk) SetOrigin

SetOrigin sets the "origin" field.

func (*CertifyLegalUpsertBulk) SetPackageID

SetPackageID sets the "package_id" field.

func (*CertifyLegalUpsertBulk) SetSourceID

SetSourceID sets the "source_id" field.

func (*CertifyLegalUpsertBulk) SetTimeScanned

SetTimeScanned sets the "time_scanned" field.

func (*CertifyLegalUpsertBulk) Update

Update allows overriding fields `UPDATE` values. See the CertifyLegalCreateBulk.OnConflict documentation for more info.

func (*CertifyLegalUpsertBulk) UpdateAttribution

func (u *CertifyLegalUpsertBulk) UpdateAttribution() *CertifyLegalUpsertBulk

UpdateAttribution sets the "attribution" field to the value that was provided on create.

func (*CertifyLegalUpsertBulk) UpdateCollector

func (u *CertifyLegalUpsertBulk) UpdateCollector() *CertifyLegalUpsertBulk

UpdateCollector sets the "collector" field to the value that was provided on create.

func (*CertifyLegalUpsertBulk) UpdateDeclaredLicense

func (u *CertifyLegalUpsertBulk) UpdateDeclaredLicense() *CertifyLegalUpsertBulk

UpdateDeclaredLicense sets the "declared_license" field to the value that was provided on create.

func (*CertifyLegalUpsertBulk) UpdateDeclaredLicensesHash

func (u *CertifyLegalUpsertBulk) UpdateDeclaredLicensesHash() *CertifyLegalUpsertBulk

UpdateDeclaredLicensesHash sets the "declared_licenses_hash" field to the value that was provided on create.

func (*CertifyLegalUpsertBulk) UpdateDiscoveredLicense

func (u *CertifyLegalUpsertBulk) UpdateDiscoveredLicense() *CertifyLegalUpsertBulk

UpdateDiscoveredLicense sets the "discovered_license" field to the value that was provided on create.

func (*CertifyLegalUpsertBulk) UpdateDiscoveredLicensesHash

func (u *CertifyLegalUpsertBulk) UpdateDiscoveredLicensesHash() *CertifyLegalUpsertBulk

UpdateDiscoveredLicensesHash sets the "discovered_licenses_hash" field to the value that was provided on create.

func (*CertifyLegalUpsertBulk) UpdateDocumentRef added in v0.6.0

func (u *CertifyLegalUpsertBulk) UpdateDocumentRef() *CertifyLegalUpsertBulk

UpdateDocumentRef sets the "document_ref" field to the value that was provided on create.

func (*CertifyLegalUpsertBulk) UpdateJustification

func (u *CertifyLegalUpsertBulk) UpdateJustification() *CertifyLegalUpsertBulk

UpdateJustification sets the "justification" field to the value that was provided on create.

func (*CertifyLegalUpsertBulk) UpdateNewValues

func (u *CertifyLegalUpsertBulk) UpdateNewValues() *CertifyLegalUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.CertifyLegal.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(certifylegal.FieldID)
		}),
	).
	Exec(ctx)

func (*CertifyLegalUpsertBulk) UpdateOrigin

UpdateOrigin sets the "origin" field to the value that was provided on create.

func (*CertifyLegalUpsertBulk) UpdatePackageID

func (u *CertifyLegalUpsertBulk) UpdatePackageID() *CertifyLegalUpsertBulk

UpdatePackageID sets the "package_id" field to the value that was provided on create.

func (*CertifyLegalUpsertBulk) UpdateSourceID

func (u *CertifyLegalUpsertBulk) UpdateSourceID() *CertifyLegalUpsertBulk

UpdateSourceID sets the "source_id" field to the value that was provided on create.

func (*CertifyLegalUpsertBulk) UpdateTimeScanned

func (u *CertifyLegalUpsertBulk) UpdateTimeScanned() *CertifyLegalUpsertBulk

UpdateTimeScanned sets the "time_scanned" field to the value that was provided on create.

type CertifyLegalUpsertOne

type CertifyLegalUpsertOne struct {
	// contains filtered or unexported fields
}

CertifyLegalUpsertOne is the builder for "upsert"-ing

one CertifyLegal node.

func (*CertifyLegalUpsertOne) ClearPackageID

func (u *CertifyLegalUpsertOne) ClearPackageID() *CertifyLegalUpsertOne

ClearPackageID clears the value of the "package_id" field.

func (*CertifyLegalUpsertOne) ClearSourceID

func (u *CertifyLegalUpsertOne) ClearSourceID() *CertifyLegalUpsertOne

ClearSourceID clears the value of the "source_id" field.

func (*CertifyLegalUpsertOne) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*CertifyLegalUpsertOne) Exec

Exec executes the query.

func (*CertifyLegalUpsertOne) ExecX

func (u *CertifyLegalUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*CertifyLegalUpsertOne) ID

func (u *CertifyLegalUpsertOne) ID(ctx context.Context) (id uuid.UUID, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*CertifyLegalUpsertOne) IDX

IDX is like ID, but panics if an error occurs.

func (*CertifyLegalUpsertOne) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.CertifyLegal.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*CertifyLegalUpsertOne) SetAttribution

func (u *CertifyLegalUpsertOne) SetAttribution(v string) *CertifyLegalUpsertOne

SetAttribution sets the "attribution" field.

func (*CertifyLegalUpsertOne) SetCollector

SetCollector sets the "collector" field.

func (*CertifyLegalUpsertOne) SetDeclaredLicense

func (u *CertifyLegalUpsertOne) SetDeclaredLicense(v string) *CertifyLegalUpsertOne

SetDeclaredLicense sets the "declared_license" field.

func (*CertifyLegalUpsertOne) SetDeclaredLicensesHash

func (u *CertifyLegalUpsertOne) SetDeclaredLicensesHash(v string) *CertifyLegalUpsertOne

SetDeclaredLicensesHash sets the "declared_licenses_hash" field.

func (*CertifyLegalUpsertOne) SetDiscoveredLicense

func (u *CertifyLegalUpsertOne) SetDiscoveredLicense(v string) *CertifyLegalUpsertOne

SetDiscoveredLicense sets the "discovered_license" field.

func (*CertifyLegalUpsertOne) SetDiscoveredLicensesHash

func (u *CertifyLegalUpsertOne) SetDiscoveredLicensesHash(v string) *CertifyLegalUpsertOne

SetDiscoveredLicensesHash sets the "discovered_licenses_hash" field.

func (*CertifyLegalUpsertOne) SetDocumentRef added in v0.6.0

func (u *CertifyLegalUpsertOne) SetDocumentRef(v string) *CertifyLegalUpsertOne

SetDocumentRef sets the "document_ref" field.

func (*CertifyLegalUpsertOne) SetJustification

func (u *CertifyLegalUpsertOne) SetJustification(v string) *CertifyLegalUpsertOne

SetJustification sets the "justification" field.

func (*CertifyLegalUpsertOne) SetOrigin

SetOrigin sets the "origin" field.

func (*CertifyLegalUpsertOne) SetPackageID

SetPackageID sets the "package_id" field.

func (*CertifyLegalUpsertOne) SetSourceID

SetSourceID sets the "source_id" field.

func (*CertifyLegalUpsertOne) SetTimeScanned

func (u *CertifyLegalUpsertOne) SetTimeScanned(v time.Time) *CertifyLegalUpsertOne

SetTimeScanned sets the "time_scanned" field.

func (*CertifyLegalUpsertOne) Update

Update allows overriding fields `UPDATE` values. See the CertifyLegalCreate.OnConflict documentation for more info.

func (*CertifyLegalUpsertOne) UpdateAttribution

func (u *CertifyLegalUpsertOne) UpdateAttribution() *CertifyLegalUpsertOne

UpdateAttribution sets the "attribution" field to the value that was provided on create.

func (*CertifyLegalUpsertOne) UpdateCollector

func (u *CertifyLegalUpsertOne) UpdateCollector() *CertifyLegalUpsertOne

UpdateCollector sets the "collector" field to the value that was provided on create.

func (*CertifyLegalUpsertOne) UpdateDeclaredLicense

func (u *CertifyLegalUpsertOne) UpdateDeclaredLicense() *CertifyLegalUpsertOne

UpdateDeclaredLicense sets the "declared_license" field to the value that was provided on create.

func (*CertifyLegalUpsertOne) UpdateDeclaredLicensesHash

func (u *CertifyLegalUpsertOne) UpdateDeclaredLicensesHash() *CertifyLegalUpsertOne

UpdateDeclaredLicensesHash sets the "declared_licenses_hash" field to the value that was provided on create.

func (*CertifyLegalUpsertOne) UpdateDiscoveredLicense

func (u *CertifyLegalUpsertOne) UpdateDiscoveredLicense() *CertifyLegalUpsertOne

UpdateDiscoveredLicense sets the "discovered_license" field to the value that was provided on create.

func (*CertifyLegalUpsertOne) UpdateDiscoveredLicensesHash

func (u *CertifyLegalUpsertOne) UpdateDiscoveredLicensesHash() *CertifyLegalUpsertOne

UpdateDiscoveredLicensesHash sets the "discovered_licenses_hash" field to the value that was provided on create.

func (*CertifyLegalUpsertOne) UpdateDocumentRef added in v0.6.0

func (u *CertifyLegalUpsertOne) UpdateDocumentRef() *CertifyLegalUpsertOne

UpdateDocumentRef sets the "document_ref" field to the value that was provided on create.

func (*CertifyLegalUpsertOne) UpdateJustification

func (u *CertifyLegalUpsertOne) UpdateJustification() *CertifyLegalUpsertOne

UpdateJustification sets the "justification" field to the value that was provided on create.

func (*CertifyLegalUpsertOne) UpdateNewValues

func (u *CertifyLegalUpsertOne) UpdateNewValues() *CertifyLegalUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:

client.CertifyLegal.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(certifylegal.FieldID)
		}),
	).
	Exec(ctx)

func (*CertifyLegalUpsertOne) UpdateOrigin

func (u *CertifyLegalUpsertOne) UpdateOrigin() *CertifyLegalUpsertOne

UpdateOrigin sets the "origin" field to the value that was provided on create.

func (*CertifyLegalUpsertOne) UpdatePackageID

func (u *CertifyLegalUpsertOne) UpdatePackageID() *CertifyLegalUpsertOne

UpdatePackageID sets the "package_id" field to the value that was provided on create.

func (*CertifyLegalUpsertOne) UpdateSourceID

func (u *CertifyLegalUpsertOne) UpdateSourceID() *CertifyLegalUpsertOne

UpdateSourceID sets the "source_id" field to the value that was provided on create.

func (*CertifyLegalUpsertOne) UpdateTimeScanned

func (u *CertifyLegalUpsertOne) UpdateTimeScanned() *CertifyLegalUpsertOne

UpdateTimeScanned sets the "time_scanned" field to the value that was provided on create.

type CertifyLegals

type CertifyLegals []*CertifyLegal

CertifyLegals is a parsable slice of CertifyLegal.

type CertifyScorecard

type CertifyScorecard struct {

	// ID of the ent.
	ID uuid.UUID `json:"id,omitempty"`
	// SourceID holds the value of the "source_id" field.
	SourceID uuid.UUID `json:"source_id,omitempty"`
	// Checks holds the value of the "checks" field.
	Checks []*model.ScorecardCheck `json:"checks,omitempty"`
	// Overall Scorecard score for the source
	AggregateScore float64 `json:"aggregate_score,omitempty"`
	// TimeScanned holds the value of the "time_scanned" field.
	TimeScanned time.Time `json:"time_scanned,omitempty"`
	// ScorecardVersion holds the value of the "scorecard_version" field.
	ScorecardVersion string `json:"scorecard_version,omitempty"`
	// ScorecardCommit holds the value of the "scorecard_commit" field.
	ScorecardCommit string `json:"scorecard_commit,omitempty"`
	// Origin holds the value of the "origin" field.
	Origin string `json:"origin,omitempty"`
	// Collector holds the value of the "collector" field.
	Collector string `json:"collector,omitempty"`
	// DocumentRef holds the value of the "document_ref" field.
	DocumentRef string `json:"document_ref,omitempty"`
	// A SHA1 of the checks fields after sorting keys, used to ensure uniqueness of scorecard records.
	ChecksHash string `json:"checks_hash,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the CertifyScorecardQuery when eager-loading is set.
	Edges CertifyScorecardEdges `json:"edges"`
	// contains filtered or unexported fields
}

CertifyScorecard is the model entity for the CertifyScorecard schema.

func (*CertifyScorecard) IsNode

func (n *CertifyScorecard) IsNode()

IsNode implements the Node interface check for GQLGen.

func (*CertifyScorecard) QuerySource

func (cs *CertifyScorecard) QuerySource() *SourceNameQuery

QuerySource queries the "source" edge of the CertifyScorecard entity.

func (*CertifyScorecard) Source

func (cs *CertifyScorecard) Source(ctx context.Context) (*SourceName, error)

func (*CertifyScorecard) String

func (cs *CertifyScorecard) String() string

String implements the fmt.Stringer.

func (*CertifyScorecard) ToEdge

ToEdge converts CertifyScorecard into CertifyScorecardEdge.

func (*CertifyScorecard) Unwrap

func (cs *CertifyScorecard) Unwrap() *CertifyScorecard

Unwrap unwraps the CertifyScorecard entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.

func (*CertifyScorecard) Update

Update returns a builder for updating this CertifyScorecard. Note that you need to call CertifyScorecard.Unwrap() before calling this method if this CertifyScorecard was returned from a transaction, and the transaction was committed or rolled back.

func (*CertifyScorecard) Value

func (cs *CertifyScorecard) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the CertifyScorecard. This includes values selected through modifiers, order, etc.

type CertifyScorecardClient

type CertifyScorecardClient struct {
	// contains filtered or unexported fields
}

CertifyScorecardClient is a client for the CertifyScorecard schema.

func NewCertifyScorecardClient

func NewCertifyScorecardClient(c config) *CertifyScorecardClient

NewCertifyScorecardClient returns a client for the CertifyScorecard from the given config.

func (*CertifyScorecardClient) Create

Create returns a builder for creating a CertifyScorecard entity.

func (*CertifyScorecardClient) CreateBulk

CreateBulk returns a builder for creating a bulk of CertifyScorecard entities.

func (*CertifyScorecardClient) Delete

Delete returns a delete builder for CertifyScorecard.

func (*CertifyScorecardClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*CertifyScorecardClient) DeleteOneID

DeleteOneID returns a builder for deleting the given entity by its id.

func (*CertifyScorecardClient) Get

Get returns a CertifyScorecard entity by its id.

func (*CertifyScorecardClient) GetX

GetX is like Get, but panics if an error occurs.

func (*CertifyScorecardClient) Hooks

func (c *CertifyScorecardClient) Hooks() []Hook

Hooks returns the client hooks.

func (*CertifyScorecardClient) Intercept

func (c *CertifyScorecardClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `certifyscorecard.Intercept(f(g(h())))`.

func (*CertifyScorecardClient) Interceptors

func (c *CertifyScorecardClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*CertifyScorecardClient) MapCreateBulk

func (c *CertifyScorecardClient) MapCreateBulk(slice any, setFunc func(*CertifyScorecardCreate, int)) *CertifyScorecardCreateBulk

MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.

func (*CertifyScorecardClient) Query

Query returns a query builder for CertifyScorecard.

func (*CertifyScorecardClient) QuerySource

QuerySource queries the source edge of a CertifyScorecard.

func (*CertifyScorecardClient) Update

Update returns an update builder for CertifyScorecard.

func (*CertifyScorecardClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*CertifyScorecardClient) UpdateOneID

UpdateOneID returns an update builder for the given id.

func (*CertifyScorecardClient) Use

func (c *CertifyScorecardClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `certifyscorecard.Hooks(f(g(h())))`.

type CertifyScorecardConnection

type CertifyScorecardConnection struct {
	Edges      []*CertifyScorecardEdge `json:"edges"`
	PageInfo   PageInfo                `json:"pageInfo"`
	TotalCount int                     `json:"totalCount"`
}

CertifyScorecardConnection is the connection containing edges to CertifyScorecard.

type CertifyScorecardCreate

type CertifyScorecardCreate struct {
	// contains filtered or unexported fields
}

CertifyScorecardCreate is the builder for creating a CertifyScorecard entity.

func (*CertifyScorecardCreate) Exec

Exec executes the query.

func (*CertifyScorecardCreate) ExecX

func (csc *CertifyScorecardCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*CertifyScorecardCreate) Mutation

Mutation returns the CertifyScorecardMutation object of the builder.

func (*CertifyScorecardCreate) OnConflict

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.CertifyScorecard.Create().
	SetSourceID(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.CertifyScorecardUpsert) {
		SetSourceID(v+v).
	}).
	Exec(ctx)

func (*CertifyScorecardCreate) OnConflictColumns

func (csc *CertifyScorecardCreate) OnConflictColumns(columns ...string) *CertifyScorecardUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.CertifyScorecard.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*CertifyScorecardCreate) Save

Save creates the CertifyScorecard in the database.

func (*CertifyScorecardCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*CertifyScorecardCreate) SetAggregateScore added in v0.5.0

func (csc *CertifyScorecardCreate) SetAggregateScore(f float64) *CertifyScorecardCreate

SetAggregateScore sets the "aggregate_score" field.

func (*CertifyScorecardCreate) SetChecks added in v0.5.0

SetChecks sets the "checks" field.

func (*CertifyScorecardCreate) SetChecksHash added in v0.5.0

func (csc *CertifyScorecardCreate) SetChecksHash(s string) *CertifyScorecardCreate

SetChecksHash sets the "checks_hash" field.

func (*CertifyScorecardCreate) SetCollector added in v0.5.0

SetCollector sets the "collector" field.

func (*CertifyScorecardCreate) SetDocumentRef added in v0.6.0

func (csc *CertifyScorecardCreate) SetDocumentRef(s string) *CertifyScorecardCreate

SetDocumentRef sets the "document_ref" field.

func (*CertifyScorecardCreate) SetID added in v0.5.0

SetID sets the "id" field.

func (*CertifyScorecardCreate) SetNillableAggregateScore added in v0.5.0

func (csc *CertifyScorecardCreate) SetNillableAggregateScore(f *float64) *CertifyScorecardCreate

SetNillableAggregateScore sets the "aggregate_score" field if the given value is not nil.

func (*CertifyScorecardCreate) SetNillableID added in v0.5.0

func (csc *CertifyScorecardCreate) SetNillableID(u *uuid.UUID) *CertifyScorecardCreate

SetNillableID sets the "id" field if the given value is not nil.

func (*CertifyScorecardCreate) SetNillableTimeScanned added in v0.5.0

func (csc *CertifyScorecardCreate) SetNillableTimeScanned(t *time.Time) *CertifyScorecardCreate

SetNillableTimeScanned sets the "time_scanned" field if the given value is not nil.

func (*CertifyScorecardCreate) SetOrigin added in v0.5.0

SetOrigin sets the "origin" field.

func (*CertifyScorecardCreate) SetScorecardCommit added in v0.5.0

func (csc *CertifyScorecardCreate) SetScorecardCommit(s string) *CertifyScorecardCreate

SetScorecardCommit sets the "scorecard_commit" field.

func (*CertifyScorecardCreate) SetScorecardVersion added in v0.5.0

func (csc *CertifyScorecardCreate) SetScorecardVersion(s string) *CertifyScorecardCreate

SetScorecardVersion sets the "scorecard_version" field.

func (*CertifyScorecardCreate) SetSource

SetSource sets the "source" edge to the SourceName entity.

func (*CertifyScorecardCreate) SetSourceID

SetSourceID sets the "source_id" field.

func (*CertifyScorecardCreate) SetTimeScanned added in v0.5.0

func (csc *CertifyScorecardCreate) SetTimeScanned(t time.Time) *CertifyScorecardCreate

SetTimeScanned sets the "time_scanned" field.

type CertifyScorecardCreateBulk

type CertifyScorecardCreateBulk struct {
	// contains filtered or unexported fields
}

CertifyScorecardCreateBulk is the builder for creating many CertifyScorecard entities in bulk.

func (*CertifyScorecardCreateBulk) Exec

Exec executes the query.

func (*CertifyScorecardCreateBulk) ExecX

func (cscb *CertifyScorecardCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*CertifyScorecardCreateBulk) OnConflict

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.CertifyScorecard.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.CertifyScorecardUpsert) {
		SetSourceID(v+v).
	}).
	Exec(ctx)

func (*CertifyScorecardCreateBulk) OnConflictColumns

func (cscb *CertifyScorecardCreateBulk) OnConflictColumns(columns ...string) *CertifyScorecardUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.CertifyScorecard.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*CertifyScorecardCreateBulk) Save

Save creates the CertifyScorecard entities in the database.

func (*CertifyScorecardCreateBulk) SaveX

SaveX is like Save, but panics if an error occurs.

type CertifyScorecardDelete

type CertifyScorecardDelete struct {
	// contains filtered or unexported fields
}

CertifyScorecardDelete is the builder for deleting a CertifyScorecard entity.

func (*CertifyScorecardDelete) Exec

func (csd *CertifyScorecardDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*CertifyScorecardDelete) ExecX

func (csd *CertifyScorecardDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*CertifyScorecardDelete) Where

Where appends a list predicates to the CertifyScorecardDelete builder.

type CertifyScorecardDeleteOne

type CertifyScorecardDeleteOne struct {
	// contains filtered or unexported fields
}

CertifyScorecardDeleteOne is the builder for deleting a single CertifyScorecard entity.

func (*CertifyScorecardDeleteOne) Exec

Exec executes the deletion query.

func (*CertifyScorecardDeleteOne) ExecX

func (csdo *CertifyScorecardDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*CertifyScorecardDeleteOne) Where

Where appends a list predicates to the CertifyScorecardDelete builder.

type CertifyScorecardEdge

type CertifyScorecardEdge struct {
	Node   *CertifyScorecard `json:"node"`
	Cursor Cursor            `json:"cursor"`
}

CertifyScorecardEdge is the edge representation of CertifyScorecard.

type CertifyScorecardEdges

type CertifyScorecardEdges struct {
	// Source holds the value of the source edge.
	Source *SourceName `json:"source,omitempty"`
	// contains filtered or unexported fields
}

CertifyScorecardEdges holds the relations/edges for other nodes in the graph.

func (CertifyScorecardEdges) SourceOrErr

func (e CertifyScorecardEdges) SourceOrErr() (*SourceName, error)

SourceOrErr returns the Source value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type CertifyScorecardGroupBy

type CertifyScorecardGroupBy struct {
	// contains filtered or unexported fields
}

CertifyScorecardGroupBy is the group-by builder for CertifyScorecard entities.

func (*CertifyScorecardGroupBy) Aggregate

Aggregate adds the given aggregation functions to the group-by query.

func (*CertifyScorecardGroupBy) Bool

func (s *CertifyScorecardGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*CertifyScorecardGroupBy) BoolX

func (s *CertifyScorecardGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*CertifyScorecardGroupBy) Bools

func (s *CertifyScorecardGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*CertifyScorecardGroupBy) BoolsX

func (s *CertifyScorecardGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*CertifyScorecardGroupBy) Float64

func (s *CertifyScorecardGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*CertifyScorecardGroupBy) Float64X

func (s *CertifyScorecardGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*CertifyScorecardGroupBy) Float64s

func (s *CertifyScorecardGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*CertifyScorecardGroupBy) Float64sX

func (s *CertifyScorecardGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*CertifyScorecardGroupBy) Int

func (s *CertifyScorecardGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*CertifyScorecardGroupBy) IntX

func (s *CertifyScorecardGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*CertifyScorecardGroupBy) Ints

func (s *CertifyScorecardGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*CertifyScorecardGroupBy) IntsX

func (s *CertifyScorecardGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*CertifyScorecardGroupBy) Scan

func (csgb *CertifyScorecardGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*CertifyScorecardGroupBy) ScanX

func (s *CertifyScorecardGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*CertifyScorecardGroupBy) String

func (s *CertifyScorecardGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*CertifyScorecardGroupBy) StringX

func (s *CertifyScorecardGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*CertifyScorecardGroupBy) Strings

func (s *CertifyScorecardGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*CertifyScorecardGroupBy) StringsX

func (s *CertifyScorecardGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type CertifyScorecardMutation

type CertifyScorecardMutation struct {
	// contains filtered or unexported fields
}

CertifyScorecardMutation represents an operation that mutates the CertifyScorecard nodes in the graph.

func (*CertifyScorecardMutation) AddAggregateScore added in v0.5.0

func (m *CertifyScorecardMutation) AddAggregateScore(f float64)

AddAggregateScore adds f to the "aggregate_score" field.

func (*CertifyScorecardMutation) AddField

func (m *CertifyScorecardMutation) AddField(name string, value ent.Value) error

AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*CertifyScorecardMutation) AddedAggregateScore added in v0.5.0

func (m *CertifyScorecardMutation) AddedAggregateScore() (r float64, exists bool)

AddedAggregateScore returns the value that was added to the "aggregate_score" field in this mutation.

func (*CertifyScorecardMutation) AddedEdges

func (m *CertifyScorecardMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*CertifyScorecardMutation) AddedField

func (m *CertifyScorecardMutation) AddedField(name string) (ent.Value, bool)

AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*CertifyScorecardMutation) AddedFields

func (m *CertifyScorecardMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*CertifyScorecardMutation) AddedIDs

func (m *CertifyScorecardMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*CertifyScorecardMutation) AggregateScore added in v0.5.0

func (m *CertifyScorecardMutation) AggregateScore() (r float64, exists bool)

AggregateScore returns the value of the "aggregate_score" field in the mutation.

func (*CertifyScorecardMutation) AppendChecks added in v0.5.0

func (m *CertifyScorecardMutation) AppendChecks(mc []*model.ScorecardCheck)

AppendChecks adds mc to the "checks" field.

func (*CertifyScorecardMutation) AppendedChecks added in v0.5.0

func (m *CertifyScorecardMutation) AppendedChecks() ([]*model.ScorecardCheck, bool)

AppendedChecks returns the list of values that were appended to the "checks" field in this mutation.

func (*CertifyScorecardMutation) Checks added in v0.5.0

func (m *CertifyScorecardMutation) Checks() (r []*model.ScorecardCheck, exists bool)

Checks returns the value of the "checks" field in the mutation.

func (*CertifyScorecardMutation) ChecksHash added in v0.5.0

func (m *CertifyScorecardMutation) ChecksHash() (r string, exists bool)

ChecksHash returns the value of the "checks_hash" field in the mutation.

func (*CertifyScorecardMutation) ClearEdge

func (m *CertifyScorecardMutation) ClearEdge(name string) error

ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.

func (*CertifyScorecardMutation) ClearField

func (m *CertifyScorecardMutation) ClearField(name string) error

ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.

func (*CertifyScorecardMutation) ClearSource

func (m *CertifyScorecardMutation) ClearSource()

ClearSource clears the "source" edge to the SourceName entity.

func (*CertifyScorecardMutation) ClearedEdges

func (m *CertifyScorecardMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*CertifyScorecardMutation) ClearedFields

func (m *CertifyScorecardMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (CertifyScorecardMutation) Client

func (m CertifyScorecardMutation) Client() *Client

Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.

func (*CertifyScorecardMutation) Collector added in v0.5.0

func (m *CertifyScorecardMutation) Collector() (r string, exists bool)

Collector returns the value of the "collector" field in the mutation.

func (*CertifyScorecardMutation) DocumentRef added in v0.6.0

func (m *CertifyScorecardMutation) DocumentRef() (r string, exists bool)

DocumentRef returns the value of the "document_ref" field in the mutation.

func (*CertifyScorecardMutation) EdgeCleared

func (m *CertifyScorecardMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*CertifyScorecardMutation) Field

func (m *CertifyScorecardMutation) Field(name string) (ent.Value, bool)

Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*CertifyScorecardMutation) FieldCleared

func (m *CertifyScorecardMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*CertifyScorecardMutation) Fields

func (m *CertifyScorecardMutation) Fields() []string

Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().

func (*CertifyScorecardMutation) ID

func (m *CertifyScorecardMutation) ID() (id uuid.UUID, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*CertifyScorecardMutation) IDs

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*CertifyScorecardMutation) OldAggregateScore added in v0.5.0

func (m *CertifyScorecardMutation) OldAggregateScore(ctx context.Context) (v float64, err error)

OldAggregateScore returns the old "aggregate_score" field's value of the CertifyScorecard entity. If the CertifyScorecard object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*CertifyScorecardMutation) OldChecks added in v0.5.0

func (m *CertifyScorecardMutation) OldChecks(ctx context.Context) (v []*model.ScorecardCheck, err error)

OldChecks returns the old "checks" field's value of the CertifyScorecard entity. If the CertifyScorecard object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*CertifyScorecardMutation) OldChecksHash added in v0.5.0

func (m *CertifyScorecardMutation) OldChecksHash(ctx context.Context) (v string, err error)

OldChecksHash returns the old "checks_hash" field's value of the CertifyScorecard entity. If the CertifyScorecard object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*CertifyScorecardMutation) OldCollector added in v0.5.0

func (m *CertifyScorecardMutation) OldCollector(ctx context.Context) (v string, err error)

OldCollector returns the old "collector" field's value of the CertifyScorecard entity. If the CertifyScorecard object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*CertifyScorecardMutation) OldDocumentRef added in v0.6.0

func (m *CertifyScorecardMutation) OldDocumentRef(ctx context.Context) (v string, err error)

OldDocumentRef returns the old "document_ref" field's value of the CertifyScorecard entity. If the CertifyScorecard object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*CertifyScorecardMutation) OldField

func (m *CertifyScorecardMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*CertifyScorecardMutation) OldOrigin added in v0.5.0

func (m *CertifyScorecardMutation) OldOrigin(ctx context.Context) (v string, err error)

OldOrigin returns the old "origin" field's value of the CertifyScorecard entity. If the CertifyScorecard object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*CertifyScorecardMutation) OldScorecardCommit added in v0.5.0

func (m *CertifyScorecardMutation) OldScorecardCommit(ctx context.Context) (v string, err error)

OldScorecardCommit returns the old "scorecard_commit" field's value of the CertifyScorecard entity. If the CertifyScorecard object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*CertifyScorecardMutation) OldScorecardVersion added in v0.5.0

func (m *CertifyScorecardMutation) OldScorecardVersion(ctx context.Context) (v string, err error)

OldScorecardVersion returns the old "scorecard_version" field's value of the CertifyScorecard entity. If the CertifyScorecard object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*CertifyScorecardMutation) OldSourceID

func (m *CertifyScorecardMutation) OldSourceID(ctx context.Context) (v uuid.UUID, err error)

OldSourceID returns the old "source_id" field's value of the CertifyScorecard entity. If the CertifyScorecard object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*CertifyScorecardMutation) OldTimeScanned added in v0.5.0

func (m *CertifyScorecardMutation) OldTimeScanned(ctx context.Context) (v time.Time, err error)

OldTimeScanned returns the old "time_scanned" field's value of the CertifyScorecard entity. If the CertifyScorecard object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*CertifyScorecardMutation) Op

func (m *CertifyScorecardMutation) Op() Op

Op returns the operation name.

func (*CertifyScorecardMutation) Origin added in v0.5.0

func (m *CertifyScorecardMutation) Origin() (r string, exists bool)

Origin returns the value of the "origin" field in the mutation.

func (*CertifyScorecardMutation) RemovedEdges

func (m *CertifyScorecardMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*CertifyScorecardMutation) RemovedIDs

func (m *CertifyScorecardMutation) RemovedIDs(name string) []ent.Value

RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.

func (*CertifyScorecardMutation) ResetAggregateScore added in v0.5.0

func (m *CertifyScorecardMutation) ResetAggregateScore()

ResetAggregateScore resets all changes to the "aggregate_score" field.

func (*CertifyScorecardMutation) ResetChecks added in v0.5.0

func (m *CertifyScorecardMutation) ResetChecks()

ResetChecks resets all changes to the "checks" field.

func (*CertifyScorecardMutation) ResetChecksHash added in v0.5.0

func (m *CertifyScorecardMutation) ResetChecksHash()

ResetChecksHash resets all changes to the "checks_hash" field.

func (*CertifyScorecardMutation) ResetCollector added in v0.5.0

func (m *CertifyScorecardMutation) ResetCollector()

ResetCollector resets all changes to the "collector" field.

func (*CertifyScorecardMutation) ResetDocumentRef added in v0.6.0

func (m *CertifyScorecardMutation) ResetDocumentRef()

ResetDocumentRef resets all changes to the "document_ref" field.

func (*CertifyScorecardMutation) ResetEdge

func (m *CertifyScorecardMutation) ResetEdge(name string) error

ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.

func (*CertifyScorecardMutation) ResetField

func (m *CertifyScorecardMutation) ResetField(name string) error

ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.

func (*CertifyScorecardMutation) ResetOrigin added in v0.5.0

func (m *CertifyScorecardMutation) ResetOrigin()

ResetOrigin resets all changes to the "origin" field.

func (*CertifyScorecardMutation) ResetScorecardCommit added in v0.5.0

func (m *CertifyScorecardMutation) ResetScorecardCommit()

ResetScorecardCommit resets all changes to the "scorecard_commit" field.

func (*CertifyScorecardMutation) ResetScorecardVersion added in v0.5.0

func (m *CertifyScorecardMutation) ResetScorecardVersion()

ResetScorecardVersion resets all changes to the "scorecard_version" field.

func (*CertifyScorecardMutation) ResetSource

func (m *CertifyScorecardMutation) ResetSource()

ResetSource resets all changes to the "source" edge.

func (*CertifyScorecardMutation) ResetSourceID

func (m *CertifyScorecardMutation) ResetSourceID()

ResetSourceID resets all changes to the "source_id" field.

func (*CertifyScorecardMutation) ResetTimeScanned added in v0.5.0

func (m *CertifyScorecardMutation) ResetTimeScanned()

ResetTimeScanned resets all changes to the "time_scanned" field.

func (*CertifyScorecardMutation) ScorecardCommit added in v0.5.0

func (m *CertifyScorecardMutation) ScorecardCommit() (r string, exists bool)

ScorecardCommit returns the value of the "scorecard_commit" field in the mutation.

func (*CertifyScorecardMutation) ScorecardVersion added in v0.5.0

func (m *CertifyScorecardMutation) ScorecardVersion() (r string, exists bool)

ScorecardVersion returns the value of the "scorecard_version" field in the mutation.

func (*CertifyScorecardMutation) SetAggregateScore added in v0.5.0

func (m *CertifyScorecardMutation) SetAggregateScore(f float64)

SetAggregateScore sets the "aggregate_score" field.

func (*CertifyScorecardMutation) SetChecks added in v0.5.0

func (m *CertifyScorecardMutation) SetChecks(mc []*model.ScorecardCheck)

SetChecks sets the "checks" field.

func (*CertifyScorecardMutation) SetChecksHash added in v0.5.0

func (m *CertifyScorecardMutation) SetChecksHash(s string)

SetChecksHash sets the "checks_hash" field.

func (*CertifyScorecardMutation) SetCollector added in v0.5.0

func (m *CertifyScorecardMutation) SetCollector(s string)

SetCollector sets the "collector" field.

func (*CertifyScorecardMutation) SetDocumentRef added in v0.6.0

func (m *CertifyScorecardMutation) SetDocumentRef(s string)

SetDocumentRef sets the "document_ref" field.

func (*CertifyScorecardMutation) SetField

func (m *CertifyScorecardMutation) SetField(name string, value ent.Value) error

SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*CertifyScorecardMutation) SetID added in v0.5.0

func (m *CertifyScorecardMutation) SetID(id uuid.UUID)

SetID sets the value of the id field. Note that this operation is only accepted on creation of CertifyScorecard entities.

func (*CertifyScorecardMutation) SetOp

func (m *CertifyScorecardMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*CertifyScorecardMutation) SetOrigin added in v0.5.0

func (m *CertifyScorecardMutation) SetOrigin(s string)

SetOrigin sets the "origin" field.

func (*CertifyScorecardMutation) SetScorecardCommit added in v0.5.0

func (m *CertifyScorecardMutation) SetScorecardCommit(s string)

SetScorecardCommit sets the "scorecard_commit" field.

func (*CertifyScorecardMutation) SetScorecardVersion added in v0.5.0

func (m *CertifyScorecardMutation) SetScorecardVersion(s string)

SetScorecardVersion sets the "scorecard_version" field.

func (*CertifyScorecardMutation) SetSourceID

func (m *CertifyScorecardMutation) SetSourceID(u uuid.UUID)

SetSourceID sets the "source_id" field.

func (*CertifyScorecardMutation) SetTimeScanned added in v0.5.0

func (m *CertifyScorecardMutation) SetTimeScanned(t time.Time)

SetTimeScanned sets the "time_scanned" field.

func (*CertifyScorecardMutation) SourceCleared

func (m *CertifyScorecardMutation) SourceCleared() bool

SourceCleared reports if the "source" edge to the SourceName entity was cleared.

func (*CertifyScorecardMutation) SourceID

func (m *CertifyScorecardMutation) SourceID() (r uuid.UUID, exists bool)

SourceID returns the value of the "source_id" field in the mutation.

func (*CertifyScorecardMutation) SourceIDs

func (m *CertifyScorecardMutation) SourceIDs() (ids []uuid.UUID)

SourceIDs returns the "source" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use SourceID instead. It exists only for internal usage by the builders.

func (*CertifyScorecardMutation) TimeScanned added in v0.5.0

func (m *CertifyScorecardMutation) TimeScanned() (r time.Time, exists bool)

TimeScanned returns the value of the "time_scanned" field in the mutation.

func (CertifyScorecardMutation) Tx

func (m CertifyScorecardMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*CertifyScorecardMutation) Type

func (m *CertifyScorecardMutation) Type() string

Type returns the node type of this mutation (CertifyScorecard).

func (*CertifyScorecardMutation) Where

Where appends a list predicates to the CertifyScorecardMutation builder.

func (*CertifyScorecardMutation) WhereP

func (m *CertifyScorecardMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the CertifyScorecardMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type CertifyScorecardOrder

type CertifyScorecardOrder struct {
	Direction OrderDirection              `json:"direction"`
	Field     *CertifyScorecardOrderField `json:"field"`
}

CertifyScorecardOrder defines the ordering of CertifyScorecard.

type CertifyScorecardOrderField

type CertifyScorecardOrderField struct {
	// Value extracts the ordering value from the given CertifyScorecard.
	Value func(*CertifyScorecard) (ent.Value, error)
	// contains filtered or unexported fields
}

CertifyScorecardOrderField defines the ordering field of CertifyScorecard.

type CertifyScorecardPaginateOption

type CertifyScorecardPaginateOption func(*certifyscorecardPager) error

CertifyScorecardPaginateOption enables pagination customization.

func WithCertifyScorecardFilter

func WithCertifyScorecardFilter(filter func(*CertifyScorecardQuery) (*CertifyScorecardQuery, error)) CertifyScorecardPaginateOption

WithCertifyScorecardFilter configures pagination filter.

func WithCertifyScorecardOrder

func WithCertifyScorecardOrder(order *CertifyScorecardOrder) CertifyScorecardPaginateOption

WithCertifyScorecardOrder configures pagination ordering.

type CertifyScorecardQuery

type CertifyScorecardQuery struct {
	// contains filtered or unexported fields
}

CertifyScorecardQuery is the builder for querying CertifyScorecard entities.

func (*CertifyScorecardQuery) Aggregate

Aggregate returns a CertifyScorecardSelect configured with the given aggregations.

func (*CertifyScorecardQuery) All

All executes the query and returns a list of CertifyScorecards.

func (*CertifyScorecardQuery) AllX

AllX is like All, but panics if an error occurs.

func (*CertifyScorecardQuery) Clone

Clone returns a duplicate of the CertifyScorecardQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*CertifyScorecardQuery) CollectFields

func (cs *CertifyScorecardQuery) CollectFields(ctx context.Context, satisfies ...string) (*CertifyScorecardQuery, error)

CollectFields tells the query-builder to eagerly load connected nodes by resolver context.

func (*CertifyScorecardQuery) Count

func (csq *CertifyScorecardQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*CertifyScorecardQuery) CountX

func (csq *CertifyScorecardQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*CertifyScorecardQuery) Exist

func (csq *CertifyScorecardQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*CertifyScorecardQuery) ExistX

func (csq *CertifyScorecardQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*CertifyScorecardQuery) First

First returns the first CertifyScorecard entity from the query. Returns a *NotFoundError when no CertifyScorecard was found.

func (*CertifyScorecardQuery) FirstID

func (csq *CertifyScorecardQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)

FirstID returns the first CertifyScorecard ID from the query. Returns a *NotFoundError when no CertifyScorecard ID was found.

func (*CertifyScorecardQuery) FirstIDX

func (csq *CertifyScorecardQuery) FirstIDX(ctx context.Context) uuid.UUID

FirstIDX is like FirstID, but panics if an error occurs.

func (*CertifyScorecardQuery) FirstX

FirstX is like First, but panics if an error occurs.

func (*CertifyScorecardQuery) GroupBy

func (csq *CertifyScorecardQuery) GroupBy(field string, fields ...string) *CertifyScorecardGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	SourceID uuid.UUID `json:"source_id,omitempty"`
	Count int `json:"count,omitempty"`
}

client.CertifyScorecard.Query().
	GroupBy(certifyscorecard.FieldSourceID).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*CertifyScorecardQuery) IDs

func (csq *CertifyScorecardQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)

IDs executes the query and returns a list of CertifyScorecard IDs.

func (*CertifyScorecardQuery) IDsX

func (csq *CertifyScorecardQuery) IDsX(ctx context.Context) []uuid.UUID

IDsX is like IDs, but panics if an error occurs.

func (*CertifyScorecardQuery) Limit

func (csq *CertifyScorecardQuery) Limit(limit int) *CertifyScorecardQuery

Limit the number of records to be returned by this query.

func (*CertifyScorecardQuery) Offset

func (csq *CertifyScorecardQuery) Offset(offset int) *CertifyScorecardQuery

Offset to start from.

func (*CertifyScorecardQuery) Only

Only returns a single CertifyScorecard entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one CertifyScorecard entity is found. Returns a *NotFoundError when no CertifyScorecard entities are found.

func (*CertifyScorecardQuery) OnlyID

func (csq *CertifyScorecardQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)

OnlyID is like Only, but returns the only CertifyScorecard ID in the query. Returns a *NotSingularError when more than one CertifyScorecard ID is found. Returns a *NotFoundError when no entities are found.

func (*CertifyScorecardQuery) OnlyIDX

func (csq *CertifyScorecardQuery) OnlyIDX(ctx context.Context) uuid.UUID

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*CertifyScorecardQuery) OnlyX

OnlyX is like Only, but panics if an error occurs.

func (*CertifyScorecardQuery) Order

Order specifies how the records should be ordered.

func (*CertifyScorecardQuery) Paginate

func (cs *CertifyScorecardQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...CertifyScorecardPaginateOption,
) (*CertifyScorecardConnection, error)

Paginate executes the query and returns a relay based cursor connection to CertifyScorecard.

func (*CertifyScorecardQuery) QuerySource

func (csq *CertifyScorecardQuery) QuerySource() *SourceNameQuery

QuerySource chains the current query on the "source" edge.

func (*CertifyScorecardQuery) Select

func (csq *CertifyScorecardQuery) Select(fields ...string) *CertifyScorecardSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	SourceID uuid.UUID `json:"source_id,omitempty"`
}

client.CertifyScorecard.Query().
	Select(certifyscorecard.FieldSourceID).
	Scan(ctx, &v)

func (*CertifyScorecardQuery) Unique

func (csq *CertifyScorecardQuery) Unique(unique bool) *CertifyScorecardQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*CertifyScorecardQuery) Where

Where adds a new predicate for the CertifyScorecardQuery builder.

func (*CertifyScorecardQuery) WithSource

func (csq *CertifyScorecardQuery) WithSource(opts ...func(*SourceNameQuery)) *CertifyScorecardQuery

WithSource tells the query-builder to eager-load the nodes that are connected to the "source" edge. The optional arguments are used to configure the query builder of the edge.

type CertifyScorecardSelect

type CertifyScorecardSelect struct {
	*CertifyScorecardQuery
	// contains filtered or unexported fields
}

CertifyScorecardSelect is the builder for selecting fields of CertifyScorecard entities.

func (*CertifyScorecardSelect) Aggregate

Aggregate adds the given aggregation functions to the selector query.

func (*CertifyScorecardSelect) Bool

func (s *CertifyScorecardSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*CertifyScorecardSelect) BoolX

func (s *CertifyScorecardSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*CertifyScorecardSelect) Bools

func (s *CertifyScorecardSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*CertifyScorecardSelect) BoolsX

func (s *CertifyScorecardSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*CertifyScorecardSelect) Float64

func (s *CertifyScorecardSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*CertifyScorecardSelect) Float64X

func (s *CertifyScorecardSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*CertifyScorecardSelect) Float64s

func (s *CertifyScorecardSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*CertifyScorecardSelect) Float64sX

func (s *CertifyScorecardSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*CertifyScorecardSelect) Int

func (s *CertifyScorecardSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*CertifyScorecardSelect) IntX

func (s *CertifyScorecardSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*CertifyScorecardSelect) Ints

func (s *CertifyScorecardSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*CertifyScorecardSelect) IntsX

func (s *CertifyScorecardSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*CertifyScorecardSelect) Scan

func (css *CertifyScorecardSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*CertifyScorecardSelect) ScanX

func (s *CertifyScorecardSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*CertifyScorecardSelect) String

func (s *CertifyScorecardSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*CertifyScorecardSelect) StringX

func (s *CertifyScorecardSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*CertifyScorecardSelect) Strings

func (s *CertifyScorecardSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*CertifyScorecardSelect) StringsX

func (s *CertifyScorecardSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type CertifyScorecardUpdate

type CertifyScorecardUpdate struct {
	// contains filtered or unexported fields
}

CertifyScorecardUpdate is the builder for updating CertifyScorecard entities.

func (*CertifyScorecardUpdate) AddAggregateScore added in v0.5.0

func (csu *CertifyScorecardUpdate) AddAggregateScore(f float64) *CertifyScorecardUpdate

AddAggregateScore adds f to the "aggregate_score" field.

func (*CertifyScorecardUpdate) AppendChecks added in v0.5.0

AppendChecks appends mc to the "checks" field.

func (*CertifyScorecardUpdate) ClearSource

func (csu *CertifyScorecardUpdate) ClearSource() *CertifyScorecardUpdate

ClearSource clears the "source" edge to the SourceName entity.

func (*CertifyScorecardUpdate) Exec

Exec executes the query.

func (*CertifyScorecardUpdate) ExecX

func (csu *CertifyScorecardUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*CertifyScorecardUpdate) Mutation

Mutation returns the CertifyScorecardMutation object of the builder.

func (*CertifyScorecardUpdate) Save

func (csu *CertifyScorecardUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*CertifyScorecardUpdate) SaveX

func (csu *CertifyScorecardUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*CertifyScorecardUpdate) SetAggregateScore added in v0.5.0

func (csu *CertifyScorecardUpdate) SetAggregateScore(f float64) *CertifyScorecardUpdate

SetAggregateScore sets the "aggregate_score" field.

func (*CertifyScorecardUpdate) SetChecks added in v0.5.0

SetChecks sets the "checks" field.

func (*CertifyScorecardUpdate) SetChecksHash added in v0.5.0

func (csu *CertifyScorecardUpdate) SetChecksHash(s string) *CertifyScorecardUpdate

SetChecksHash sets the "checks_hash" field.

func (*CertifyScorecardUpdate) SetCollector added in v0.5.0

SetCollector sets the "collector" field.

func (*CertifyScorecardUpdate) SetDocumentRef added in v0.6.0

func (csu *CertifyScorecardUpdate) SetDocumentRef(s string) *CertifyScorecardUpdate

SetDocumentRef sets the "document_ref" field.

func (*CertifyScorecardUpdate) SetNillableAggregateScore added in v0.5.0

func (csu *CertifyScorecardUpdate) SetNillableAggregateScore(f *float64) *CertifyScorecardUpdate

SetNillableAggregateScore sets the "aggregate_score" field if the given value is not nil.

func (*CertifyScorecardUpdate) SetNillableChecksHash added in v0.5.0

func (csu *CertifyScorecardUpdate) SetNillableChecksHash(s *string) *CertifyScorecardUpdate

SetNillableChecksHash sets the "checks_hash" field if the given value is not nil.

func (*CertifyScorecardUpdate) SetNillableCollector added in v0.5.0

func (csu *CertifyScorecardUpdate) SetNillableCollector(s *string) *CertifyScorecardUpdate

SetNillableCollector sets the "collector" field if the given value is not nil.

func (*CertifyScorecardUpdate) SetNillableDocumentRef added in v0.6.0

func (csu *CertifyScorecardUpdate) SetNillableDocumentRef(s *string) *CertifyScorecardUpdate

SetNillableDocumentRef sets the "document_ref" field if the given value is not nil.

func (*CertifyScorecardUpdate) SetNillableOrigin added in v0.5.0

func (csu *CertifyScorecardUpdate) SetNillableOrigin(s *string) *CertifyScorecardUpdate

SetNillableOrigin sets the "origin" field if the given value is not nil.

func (*CertifyScorecardUpdate) SetNillableScorecardCommit added in v0.5.0

func (csu *CertifyScorecardUpdate) SetNillableScorecardCommit(s *string) *CertifyScorecardUpdate

SetNillableScorecardCommit sets the "scorecard_commit" field if the given value is not nil.

func (*CertifyScorecardUpdate) SetNillableScorecardVersion added in v0.5.0

func (csu *CertifyScorecardUpdate) SetNillableScorecardVersion(s *string) *CertifyScorecardUpdate

SetNillableScorecardVersion sets the "scorecard_version" field if the given value is not nil.

func (*CertifyScorecardUpdate) SetNillableSourceID added in v0.4.0

func (csu *CertifyScorecardUpdate) SetNillableSourceID(u *uuid.UUID) *CertifyScorecardUpdate

SetNillableSourceID sets the "source_id" field if the given value is not nil.

func (*CertifyScorecardUpdate) SetNillableTimeScanned added in v0.5.0

func (csu *CertifyScorecardUpdate) SetNillableTimeScanned(t *time.Time) *CertifyScorecardUpdate

SetNillableTimeScanned sets the "time_scanned" field if the given value is not nil.

func (*CertifyScorecardUpdate) SetOrigin added in v0.5.0

SetOrigin sets the "origin" field.

func (*CertifyScorecardUpdate) SetScorecardCommit added in v0.5.0

func (csu *CertifyScorecardUpdate) SetScorecardCommit(s string) *CertifyScorecardUpdate

SetScorecardCommit sets the "scorecard_commit" field.

func (*CertifyScorecardUpdate) SetScorecardVersion added in v0.5.0

func (csu *CertifyScorecardUpdate) SetScorecardVersion(s string) *CertifyScorecardUpdate

SetScorecardVersion sets the "scorecard_version" field.

func (*CertifyScorecardUpdate) SetSource

SetSource sets the "source" edge to the SourceName entity.

func (*CertifyScorecardUpdate) SetSourceID

SetSourceID sets the "source_id" field.

func (*CertifyScorecardUpdate) SetTimeScanned added in v0.5.0

func (csu *CertifyScorecardUpdate) SetTimeScanned(t time.Time) *CertifyScorecardUpdate

SetTimeScanned sets the "time_scanned" field.

func (*CertifyScorecardUpdate) Where

Where appends a list predicates to the CertifyScorecardUpdate builder.

type CertifyScorecardUpdateOne

type CertifyScorecardUpdateOne struct {
	// contains filtered or unexported fields
}

CertifyScorecardUpdateOne is the builder for updating a single CertifyScorecard entity.

func (*CertifyScorecardUpdateOne) AddAggregateScore added in v0.5.0

func (csuo *CertifyScorecardUpdateOne) AddAggregateScore(f float64) *CertifyScorecardUpdateOne

AddAggregateScore adds f to the "aggregate_score" field.

func (*CertifyScorecardUpdateOne) AppendChecks added in v0.5.0

AppendChecks appends mc to the "checks" field.

func (*CertifyScorecardUpdateOne) ClearSource

ClearSource clears the "source" edge to the SourceName entity.

func (*CertifyScorecardUpdateOne) Exec

Exec executes the query on the entity.

func (*CertifyScorecardUpdateOne) ExecX

func (csuo *CertifyScorecardUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*CertifyScorecardUpdateOne) Mutation

Mutation returns the CertifyScorecardMutation object of the builder.

func (*CertifyScorecardUpdateOne) Save

Save executes the query and returns the updated CertifyScorecard entity.

func (*CertifyScorecardUpdateOne) SaveX

SaveX is like Save, but panics if an error occurs.

func (*CertifyScorecardUpdateOne) Select

func (csuo *CertifyScorecardUpdateOne) Select(field string, fields ...string) *CertifyScorecardUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*CertifyScorecardUpdateOne) SetAggregateScore added in v0.5.0

func (csuo *CertifyScorecardUpdateOne) SetAggregateScore(f float64) *CertifyScorecardUpdateOne

SetAggregateScore sets the "aggregate_score" field.

func (*CertifyScorecardUpdateOne) SetChecks added in v0.5.0

SetChecks sets the "checks" field.

func (*CertifyScorecardUpdateOne) SetChecksHash added in v0.5.0

SetChecksHash sets the "checks_hash" field.

func (*CertifyScorecardUpdateOne) SetCollector added in v0.5.0

SetCollector sets the "collector" field.

func (*CertifyScorecardUpdateOne) SetDocumentRef added in v0.6.0

SetDocumentRef sets the "document_ref" field.

func (*CertifyScorecardUpdateOne) SetNillableAggregateScore added in v0.5.0

func (csuo *CertifyScorecardUpdateOne) SetNillableAggregateScore(f *float64) *CertifyScorecardUpdateOne

SetNillableAggregateScore sets the "aggregate_score" field if the given value is not nil.

func (*CertifyScorecardUpdateOne) SetNillableChecksHash added in v0.5.0

func (csuo *CertifyScorecardUpdateOne) SetNillableChecksHash(s *string) *CertifyScorecardUpdateOne

SetNillableChecksHash sets the "checks_hash" field if the given value is not nil.

func (*CertifyScorecardUpdateOne) SetNillableCollector added in v0.5.0

func (csuo *CertifyScorecardUpdateOne) SetNillableCollector(s *string) *CertifyScorecardUpdateOne

SetNillableCollector sets the "collector" field if the given value is not nil.

func (*CertifyScorecardUpdateOne) SetNillableDocumentRef added in v0.6.0

func (csuo *CertifyScorecardUpdateOne) SetNillableDocumentRef(s *string) *CertifyScorecardUpdateOne

SetNillableDocumentRef sets the "document_ref" field if the given value is not nil.

func (*CertifyScorecardUpdateOne) SetNillableOrigin added in v0.5.0

func (csuo *CertifyScorecardUpdateOne) SetNillableOrigin(s *string) *CertifyScorecardUpdateOne

SetNillableOrigin sets the "origin" field if the given value is not nil.

func (*CertifyScorecardUpdateOne) SetNillableScorecardCommit added in v0.5.0

func (csuo *CertifyScorecardUpdateOne) SetNillableScorecardCommit(s *string) *CertifyScorecardUpdateOne

SetNillableScorecardCommit sets the "scorecard_commit" field if the given value is not nil.

func (*CertifyScorecardUpdateOne) SetNillableScorecardVersion added in v0.5.0

func (csuo *CertifyScorecardUpdateOne) SetNillableScorecardVersion(s *string) *CertifyScorecardUpdateOne

SetNillableScorecardVersion sets the "scorecard_version" field if the given value is not nil.

func (*CertifyScorecardUpdateOne) SetNillableSourceID added in v0.4.0

func (csuo *CertifyScorecardUpdateOne) SetNillableSourceID(u *uuid.UUID) *CertifyScorecardUpdateOne

SetNillableSourceID sets the "source_id" field if the given value is not nil.

func (*CertifyScorecardUpdateOne) SetNillableTimeScanned added in v0.5.0

func (csuo *CertifyScorecardUpdateOne) SetNillableTimeScanned(t *time.Time) *CertifyScorecardUpdateOne

SetNillableTimeScanned sets the "time_scanned" field if the given value is not nil.

func (*CertifyScorecardUpdateOne) SetOrigin added in v0.5.0

SetOrigin sets the "origin" field.

func (*CertifyScorecardUpdateOne) SetScorecardCommit added in v0.5.0

func (csuo *CertifyScorecardUpdateOne) SetScorecardCommit(s string) *CertifyScorecardUpdateOne

SetScorecardCommit sets the "scorecard_commit" field.

func (*CertifyScorecardUpdateOne) SetScorecardVersion added in v0.5.0

func (csuo *CertifyScorecardUpdateOne) SetScorecardVersion(s string) *CertifyScorecardUpdateOne

SetScorecardVersion sets the "scorecard_version" field.

func (*CertifyScorecardUpdateOne) SetSource

SetSource sets the "source" edge to the SourceName entity.

func (*CertifyScorecardUpdateOne) SetSourceID

SetSourceID sets the "source_id" field.

func (*CertifyScorecardUpdateOne) SetTimeScanned added in v0.5.0

SetTimeScanned sets the "time_scanned" field.

func (*CertifyScorecardUpdateOne) Where

Where appends a list predicates to the CertifyScorecardUpdate builder.

type CertifyScorecardUpsert

type CertifyScorecardUpsert struct {
	*sql.UpdateSet
}

CertifyScorecardUpsert is the "OnConflict" setter.

func (*CertifyScorecardUpsert) AddAggregateScore added in v0.5.0

func (u *CertifyScorecardUpsert) AddAggregateScore(v float64) *CertifyScorecardUpsert

AddAggregateScore adds v to the "aggregate_score" field.

func (*CertifyScorecardUpsert) SetAggregateScore added in v0.5.0

func (u *CertifyScorecardUpsert) SetAggregateScore(v float64) *CertifyScorecardUpsert

SetAggregateScore sets the "aggregate_score" field.

func (*CertifyScorecardUpsert) SetChecks added in v0.5.0

SetChecks sets the "checks" field.

func (*CertifyScorecardUpsert) SetChecksHash added in v0.5.0

SetChecksHash sets the "checks_hash" field.

func (*CertifyScorecardUpsert) SetCollector added in v0.5.0

SetCollector sets the "collector" field.

func (*CertifyScorecardUpsert) SetDocumentRef added in v0.6.0

SetDocumentRef sets the "document_ref" field.

func (*CertifyScorecardUpsert) SetOrigin added in v0.5.0

SetOrigin sets the "origin" field.

func (*CertifyScorecardUpsert) SetScorecardCommit added in v0.5.0

func (u *CertifyScorecardUpsert) SetScorecardCommit(v string) *CertifyScorecardUpsert

SetScorecardCommit sets the "scorecard_commit" field.

func (*CertifyScorecardUpsert) SetScorecardVersion added in v0.5.0

func (u *CertifyScorecardUpsert) SetScorecardVersion(v string) *CertifyScorecardUpsert

SetScorecardVersion sets the "scorecard_version" field.

func (*CertifyScorecardUpsert) SetSourceID

SetSourceID sets the "source_id" field.

func (*CertifyScorecardUpsert) SetTimeScanned added in v0.5.0

SetTimeScanned sets the "time_scanned" field.

func (*CertifyScorecardUpsert) UpdateAggregateScore added in v0.5.0

func (u *CertifyScorecardUpsert) UpdateAggregateScore() *CertifyScorecardUpsert

UpdateAggregateScore sets the "aggregate_score" field to the value that was provided on create.

func (*CertifyScorecardUpsert) UpdateChecks added in v0.5.0

UpdateChecks sets the "checks" field to the value that was provided on create.

func (*CertifyScorecardUpsert) UpdateChecksHash added in v0.5.0

func (u *CertifyScorecardUpsert) UpdateChecksHash() *CertifyScorecardUpsert

UpdateChecksHash sets the "checks_hash" field to the value that was provided on create.

func (*CertifyScorecardUpsert) UpdateCollector added in v0.5.0

func (u *CertifyScorecardUpsert) UpdateCollector() *CertifyScorecardUpsert

UpdateCollector sets the "collector" field to the value that was provided on create.

func (*CertifyScorecardUpsert) UpdateDocumentRef added in v0.6.0

func (u *CertifyScorecardUpsert) UpdateDocumentRef() *CertifyScorecardUpsert

UpdateDocumentRef sets the "document_ref" field to the value that was provided on create.

func (*CertifyScorecardUpsert) UpdateOrigin added in v0.5.0

UpdateOrigin sets the "origin" field to the value that was provided on create.

func (*CertifyScorecardUpsert) UpdateScorecardCommit added in v0.5.0

func (u *CertifyScorecardUpsert) UpdateScorecardCommit() *CertifyScorecardUpsert

UpdateScorecardCommit sets the "scorecard_commit" field to the value that was provided on create.

func (*CertifyScorecardUpsert) UpdateScorecardVersion added in v0.5.0

func (u *CertifyScorecardUpsert) UpdateScorecardVersion() *CertifyScorecardUpsert

UpdateScorecardVersion sets the "scorecard_version" field to the value that was provided on create.

func (*CertifyScorecardUpsert) UpdateSourceID

func (u *CertifyScorecardUpsert) UpdateSourceID() *CertifyScorecardUpsert

UpdateSourceID sets the "source_id" field to the value that was provided on create.

func (*CertifyScorecardUpsert) UpdateTimeScanned added in v0.5.0

func (u *CertifyScorecardUpsert) UpdateTimeScanned() *CertifyScorecardUpsert

UpdateTimeScanned sets the "time_scanned" field to the value that was provided on create.

type CertifyScorecardUpsertBulk

type CertifyScorecardUpsertBulk struct {
	// contains filtered or unexported fields
}

CertifyScorecardUpsertBulk is the builder for "upsert"-ing a bulk of CertifyScorecard nodes.

func (*CertifyScorecardUpsertBulk) AddAggregateScore added in v0.5.0

AddAggregateScore adds v to the "aggregate_score" field.

func (*CertifyScorecardUpsertBulk) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*CertifyScorecardUpsertBulk) Exec

Exec executes the query.

func (*CertifyScorecardUpsertBulk) ExecX

ExecX is like Exec, but panics if an error occurs.

func (*CertifyScorecardUpsertBulk) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.CertifyScorecard.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*CertifyScorecardUpsertBulk) SetAggregateScore added in v0.5.0

SetAggregateScore sets the "aggregate_score" field.

func (*CertifyScorecardUpsertBulk) SetChecks added in v0.5.0

SetChecks sets the "checks" field.

func (*CertifyScorecardUpsertBulk) SetChecksHash added in v0.5.0

SetChecksHash sets the "checks_hash" field.

func (*CertifyScorecardUpsertBulk) SetCollector added in v0.5.0

SetCollector sets the "collector" field.

func (*CertifyScorecardUpsertBulk) SetDocumentRef added in v0.6.0

SetDocumentRef sets the "document_ref" field.

func (*CertifyScorecardUpsertBulk) SetOrigin added in v0.5.0

SetOrigin sets the "origin" field.

func (*CertifyScorecardUpsertBulk) SetScorecardCommit added in v0.5.0

SetScorecardCommit sets the "scorecard_commit" field.

func (*CertifyScorecardUpsertBulk) SetScorecardVersion added in v0.5.0

SetScorecardVersion sets the "scorecard_version" field.

func (*CertifyScorecardUpsertBulk) SetSourceID

SetSourceID sets the "source_id" field.

func (*CertifyScorecardUpsertBulk) SetTimeScanned added in v0.5.0

SetTimeScanned sets the "time_scanned" field.

func (*CertifyScorecardUpsertBulk) Update

Update allows overriding fields `UPDATE` values. See the CertifyScorecardCreateBulk.OnConflict documentation for more info.

func (*CertifyScorecardUpsertBulk) UpdateAggregateScore added in v0.5.0

func (u *CertifyScorecardUpsertBulk) UpdateAggregateScore() *CertifyScorecardUpsertBulk

UpdateAggregateScore sets the "aggregate_score" field to the value that was provided on create.

func (*CertifyScorecardUpsertBulk) UpdateChecks added in v0.5.0

UpdateChecks sets the "checks" field to the value that was provided on create.

func (*CertifyScorecardUpsertBulk) UpdateChecksHash added in v0.5.0

UpdateChecksHash sets the "checks_hash" field to the value that was provided on create.

func (*CertifyScorecardUpsertBulk) UpdateCollector added in v0.5.0

UpdateCollector sets the "collector" field to the value that was provided on create.

func (*CertifyScorecardUpsertBulk) UpdateDocumentRef added in v0.6.0

UpdateDocumentRef sets the "document_ref" field to the value that was provided on create.

func (*CertifyScorecardUpsertBulk) UpdateNewValues

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.CertifyScorecard.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(certifyscorecard.FieldID)
		}),
	).
	Exec(ctx)

func (*CertifyScorecardUpsertBulk) UpdateOrigin added in v0.5.0

UpdateOrigin sets the "origin" field to the value that was provided on create.

func (*CertifyScorecardUpsertBulk) UpdateScorecardCommit added in v0.5.0

func (u *CertifyScorecardUpsertBulk) UpdateScorecardCommit() *CertifyScorecardUpsertBulk

UpdateScorecardCommit sets the "scorecard_commit" field to the value that was provided on create.

func (*CertifyScorecardUpsertBulk) UpdateScorecardVersion added in v0.5.0

func (u *CertifyScorecardUpsertBulk) UpdateScorecardVersion() *CertifyScorecardUpsertBulk

UpdateScorecardVersion sets the "scorecard_version" field to the value that was provided on create.

func (*CertifyScorecardUpsertBulk) UpdateSourceID

UpdateSourceID sets the "source_id" field to the value that was provided on create.

func (*CertifyScorecardUpsertBulk) UpdateTimeScanned added in v0.5.0

UpdateTimeScanned sets the "time_scanned" field to the value that was provided on create.

type CertifyScorecardUpsertOne

type CertifyScorecardUpsertOne struct {
	// contains filtered or unexported fields
}

CertifyScorecardUpsertOne is the builder for "upsert"-ing

one CertifyScorecard node.

func (*CertifyScorecardUpsertOne) AddAggregateScore added in v0.5.0

AddAggregateScore adds v to the "aggregate_score" field.

func (*CertifyScorecardUpsertOne) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*CertifyScorecardUpsertOne) Exec

Exec executes the query.

func (*CertifyScorecardUpsertOne) ExecX

ExecX is like Exec, but panics if an error occurs.

func (*CertifyScorecardUpsertOne) ID

func (u *CertifyScorecardUpsertOne) ID(ctx context.Context) (id uuid.UUID, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*CertifyScorecardUpsertOne) IDX

IDX is like ID, but panics if an error occurs.

func (*CertifyScorecardUpsertOne) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.CertifyScorecard.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*CertifyScorecardUpsertOne) SetAggregateScore added in v0.5.0

SetAggregateScore sets the "aggregate_score" field.

func (*CertifyScorecardUpsertOne) SetChecks added in v0.5.0

SetChecks sets the "checks" field.

func (*CertifyScorecardUpsertOne) SetChecksHash added in v0.5.0

SetChecksHash sets the "checks_hash" field.

func (*CertifyScorecardUpsertOne) SetCollector added in v0.5.0

SetCollector sets the "collector" field.

func (*CertifyScorecardUpsertOne) SetDocumentRef added in v0.6.0

SetDocumentRef sets the "document_ref" field.

func (*CertifyScorecardUpsertOne) SetOrigin added in v0.5.0

SetOrigin sets the "origin" field.

func (*CertifyScorecardUpsertOne) SetScorecardCommit added in v0.5.0

SetScorecardCommit sets the "scorecard_commit" field.

func (*CertifyScorecardUpsertOne) SetScorecardVersion added in v0.5.0

func (u *CertifyScorecardUpsertOne) SetScorecardVersion(v string) *CertifyScorecardUpsertOne

SetScorecardVersion sets the "scorecard_version" field.

func (*CertifyScorecardUpsertOne) SetSourceID

SetSourceID sets the "source_id" field.

func (*CertifyScorecardUpsertOne) SetTimeScanned added in v0.5.0

SetTimeScanned sets the "time_scanned" field.

func (*CertifyScorecardUpsertOne) Update

Update allows overriding fields `UPDATE` values. See the CertifyScorecardCreate.OnConflict documentation for more info.

func (*CertifyScorecardUpsertOne) UpdateAggregateScore added in v0.5.0

func (u *CertifyScorecardUpsertOne) UpdateAggregateScore() *CertifyScorecardUpsertOne

UpdateAggregateScore sets the "aggregate_score" field to the value that was provided on create.

func (*CertifyScorecardUpsertOne) UpdateChecks added in v0.5.0

UpdateChecks sets the "checks" field to the value that was provided on create.

func (*CertifyScorecardUpsertOne) UpdateChecksHash added in v0.5.0

UpdateChecksHash sets the "checks_hash" field to the value that was provided on create.

func (*CertifyScorecardUpsertOne) UpdateCollector added in v0.5.0

UpdateCollector sets the "collector" field to the value that was provided on create.

func (*CertifyScorecardUpsertOne) UpdateDocumentRef added in v0.6.0

func (u *CertifyScorecardUpsertOne) UpdateDocumentRef() *CertifyScorecardUpsertOne

UpdateDocumentRef sets the "document_ref" field to the value that was provided on create.

func (*CertifyScorecardUpsertOne) UpdateNewValues

UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:

client.CertifyScorecard.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(certifyscorecard.FieldID)
		}),
	).
	Exec(ctx)

func (*CertifyScorecardUpsertOne) UpdateOrigin added in v0.5.0

UpdateOrigin sets the "origin" field to the value that was provided on create.

func (*CertifyScorecardUpsertOne) UpdateScorecardCommit added in v0.5.0

func (u *CertifyScorecardUpsertOne) UpdateScorecardCommit() *CertifyScorecardUpsertOne

UpdateScorecardCommit sets the "scorecard_commit" field to the value that was provided on create.

func (*CertifyScorecardUpsertOne) UpdateScorecardVersion added in v0.5.0

func (u *CertifyScorecardUpsertOne) UpdateScorecardVersion() *CertifyScorecardUpsertOne

UpdateScorecardVersion sets the "scorecard_version" field to the value that was provided on create.

func (*CertifyScorecardUpsertOne) UpdateSourceID

UpdateSourceID sets the "source_id" field to the value that was provided on create.

func (*CertifyScorecardUpsertOne) UpdateTimeScanned added in v0.5.0

func (u *CertifyScorecardUpsertOne) UpdateTimeScanned() *CertifyScorecardUpsertOne

UpdateTimeScanned sets the "time_scanned" field to the value that was provided on create.

type CertifyScorecards

type CertifyScorecards []*CertifyScorecard

CertifyScorecards is a parsable slice of CertifyScorecard.

type CertifyVex

type CertifyVex struct {

	// ID of the ent.
	ID uuid.UUID `json:"id,omitempty"`
	// PackageID holds the value of the "package_id" field.
	PackageID *uuid.UUID `json:"package_id,omitempty"`
	// ArtifactID holds the value of the "artifact_id" field.
	ArtifactID *uuid.UUID `json:"artifact_id,omitempty"`
	// VulnerabilityID holds the value of the "vulnerability_id" field.
	VulnerabilityID uuid.UUID `json:"vulnerability_id,omitempty"`
	// KnownSince holds the value of the "known_since" field.
	KnownSince time.Time `json:"known_since,omitempty"`
	// Status holds the value of the "status" field.
	Status string `json:"status,omitempty"`
	// Statement holds the value of the "statement" field.
	Statement string `json:"statement,omitempty"`
	// StatusNotes holds the value of the "status_notes" field.
	StatusNotes string `json:"status_notes,omitempty"`
	// Justification holds the value of the "justification" field.
	Justification string `json:"justification,omitempty"`
	// Origin holds the value of the "origin" field.
	Origin string `json:"origin,omitempty"`
	// Collector holds the value of the "collector" field.
	Collector string `json:"collector,omitempty"`
	// DocumentRef holds the value of the "document_ref" field.
	DocumentRef string `json:"document_ref,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the CertifyVexQuery when eager-loading is set.
	Edges CertifyVexEdges `json:"edges"`
	// contains filtered or unexported fields
}

CertifyVex is the model entity for the CertifyVex schema.

func (*CertifyVex) Artifact

func (cv *CertifyVex) Artifact(ctx context.Context) (*Artifact, error)

func (*CertifyVex) IsNode

func (n *CertifyVex) IsNode()

IsNode implements the Node interface check for GQLGen.

func (*CertifyVex) Package

func (cv *CertifyVex) Package(ctx context.Context) (*PackageVersion, error)

func (*CertifyVex) QueryArtifact

func (cv *CertifyVex) QueryArtifact() *ArtifactQuery

QueryArtifact queries the "artifact" edge of the CertifyVex entity.

func (*CertifyVex) QueryPackage

func (cv *CertifyVex) QueryPackage() *PackageVersionQuery

QueryPackage queries the "package" edge of the CertifyVex entity.

func (*CertifyVex) QueryVulnerability

func (cv *CertifyVex) QueryVulnerability() *VulnerabilityIDQuery

QueryVulnerability queries the "vulnerability" edge of the CertifyVex entity.

func (*CertifyVex) String

func (cv *CertifyVex) String() string

String implements the fmt.Stringer.

func (*CertifyVex) ToEdge

func (cv *CertifyVex) ToEdge(order *CertifyVexOrder) *CertifyVexEdge

ToEdge converts CertifyVex into CertifyVexEdge.

func (*CertifyVex) Unwrap

func (cv *CertifyVex) Unwrap() *CertifyVex

Unwrap unwraps the CertifyVex entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.

func (*CertifyVex) Update

func (cv *CertifyVex) Update() *CertifyVexUpdateOne

Update returns a builder for updating this CertifyVex. Note that you need to call CertifyVex.Unwrap() before calling this method if this CertifyVex was returned from a transaction, and the transaction was committed or rolled back.

func (*CertifyVex) Value

func (cv *CertifyVex) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the CertifyVex. This includes values selected through modifiers, order, etc.

func (*CertifyVex) Vulnerability

func (cv *CertifyVex) Vulnerability(ctx context.Context) (*VulnerabilityID, error)

type CertifyVexClient

type CertifyVexClient struct {
	// contains filtered or unexported fields
}

CertifyVexClient is a client for the CertifyVex schema.

func NewCertifyVexClient

func NewCertifyVexClient(c config) *CertifyVexClient

NewCertifyVexClient returns a client for the CertifyVex from the given config.

func (*CertifyVexClient) Create

func (c *CertifyVexClient) Create() *CertifyVexCreate

Create returns a builder for creating a CertifyVex entity.

func (*CertifyVexClient) CreateBulk

func (c *CertifyVexClient) CreateBulk(builders ...*CertifyVexCreate) *CertifyVexCreateBulk

CreateBulk returns a builder for creating a bulk of CertifyVex entities.

func (*CertifyVexClient) Delete

func (c *CertifyVexClient) Delete() *CertifyVexDelete

Delete returns a delete builder for CertifyVex.

func (*CertifyVexClient) DeleteOne

func (c *CertifyVexClient) DeleteOne(cv *CertifyVex) *CertifyVexDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*CertifyVexClient) DeleteOneID

func (c *CertifyVexClient) DeleteOneID(id uuid.UUID) *CertifyVexDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*CertifyVexClient) Get

Get returns a CertifyVex entity by its id.

func (*CertifyVexClient) GetX

func (c *CertifyVexClient) GetX(ctx context.Context, id uuid.UUID) *CertifyVex

GetX is like Get, but panics if an error occurs.

func (*CertifyVexClient) Hooks

func (c *CertifyVexClient) Hooks() []Hook

Hooks returns the client hooks.

func (*CertifyVexClient) Intercept

func (c *CertifyVexClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `certifyvex.Intercept(f(g(h())))`.

func (*CertifyVexClient) Interceptors

func (c *CertifyVexClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*CertifyVexClient) MapCreateBulk

func (c *CertifyVexClient) MapCreateBulk(slice any, setFunc func(*CertifyVexCreate, int)) *CertifyVexCreateBulk

MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.

func (*CertifyVexClient) Query

func (c *CertifyVexClient) Query() *CertifyVexQuery

Query returns a query builder for CertifyVex.

func (*CertifyVexClient) QueryArtifact

func (c *CertifyVexClient) QueryArtifact(cv *CertifyVex) *ArtifactQuery

QueryArtifact queries the artifact edge of a CertifyVex.

func (*CertifyVexClient) QueryPackage

func (c *CertifyVexClient) QueryPackage(cv *CertifyVex) *PackageVersionQuery

QueryPackage queries the package edge of a CertifyVex.

func (*CertifyVexClient) QueryVulnerability

func (c *CertifyVexClient) QueryVulnerability(cv *CertifyVex) *VulnerabilityIDQuery

QueryVulnerability queries the vulnerability edge of a CertifyVex.

func (*CertifyVexClient) Update

func (c *CertifyVexClient) Update() *CertifyVexUpdate

Update returns an update builder for CertifyVex.

func (*CertifyVexClient) UpdateOne

func (c *CertifyVexClient) UpdateOne(cv *CertifyVex) *CertifyVexUpdateOne

UpdateOne returns an update builder for the given entity.

func (*CertifyVexClient) UpdateOneID

func (c *CertifyVexClient) UpdateOneID(id uuid.UUID) *CertifyVexUpdateOne

UpdateOneID returns an update builder for the given id.

func (*CertifyVexClient) Use

func (c *CertifyVexClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `certifyvex.Hooks(f(g(h())))`.

type CertifyVexConnection

type CertifyVexConnection struct {
	Edges      []*CertifyVexEdge `json:"edges"`
	PageInfo   PageInfo          `json:"pageInfo"`
	TotalCount int               `json:"totalCount"`
}

CertifyVexConnection is the connection containing edges to CertifyVex.

type CertifyVexCreate

type CertifyVexCreate struct {
	// contains filtered or unexported fields
}

CertifyVexCreate is the builder for creating a CertifyVex entity.

func (*CertifyVexCreate) Exec

func (cvc *CertifyVexCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*CertifyVexCreate) ExecX

func (cvc *CertifyVexCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*CertifyVexCreate) Mutation

func (cvc *CertifyVexCreate) Mutation() *CertifyVexMutation

Mutation returns the CertifyVexMutation object of the builder.

func (*CertifyVexCreate) OnConflict

func (cvc *CertifyVexCreate) OnConflict(opts ...sql.ConflictOption) *CertifyVexUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.CertifyVex.Create().
	SetPackageID(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.CertifyVexUpsert) {
		SetPackageID(v+v).
	}).
	Exec(ctx)

func (*CertifyVexCreate) OnConflictColumns

func (cvc *CertifyVexCreate) OnConflictColumns(columns ...string) *CertifyVexUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.CertifyVex.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*CertifyVexCreate) Save

func (cvc *CertifyVexCreate) Save(ctx context.Context) (*CertifyVex, error)

Save creates the CertifyVex in the database.

func (*CertifyVexCreate) SaveX

func (cvc *CertifyVexCreate) SaveX(ctx context.Context) *CertifyVex

SaveX calls Save and panics if Save returns an error.

func (*CertifyVexCreate) SetArtifact

func (cvc *CertifyVexCreate) SetArtifact(a *Artifact) *CertifyVexCreate

SetArtifact sets the "artifact" edge to the Artifact entity.

func (*CertifyVexCreate) SetArtifactID

func (cvc *CertifyVexCreate) SetArtifactID(u uuid.UUID) *CertifyVexCreate

SetArtifactID sets the "artifact_id" field.

func (*CertifyVexCreate) SetCollector

func (cvc *CertifyVexCreate) SetCollector(s string) *CertifyVexCreate

SetCollector sets the "collector" field.

func (*CertifyVexCreate) SetDocumentRef added in v0.6.0

func (cvc *CertifyVexCreate) SetDocumentRef(s string) *CertifyVexCreate

SetDocumentRef sets the "document_ref" field.

func (*CertifyVexCreate) SetID added in v0.5.0

func (cvc *CertifyVexCreate) SetID(u uuid.UUID) *CertifyVexCreate

SetID sets the "id" field.

func (*CertifyVexCreate) SetJustification

func (cvc *CertifyVexCreate) SetJustification(s string) *CertifyVexCreate

SetJustification sets the "justification" field.

func (*CertifyVexCreate) SetKnownSince

func (cvc *CertifyVexCreate) SetKnownSince(t time.Time) *CertifyVexCreate

SetKnownSince sets the "known_since" field.

func (*CertifyVexCreate) SetNillableArtifactID

func (cvc *CertifyVexCreate) SetNillableArtifactID(u *uuid.UUID) *CertifyVexCreate

SetNillableArtifactID sets the "artifact_id" field if the given value is not nil.

func (*CertifyVexCreate) SetNillableID added in v0.5.0

func (cvc *CertifyVexCreate) SetNillableID(u *uuid.UUID) *CertifyVexCreate

SetNillableID sets the "id" field if the given value is not nil.

func (*CertifyVexCreate) SetNillablePackageID

func (cvc *CertifyVexCreate) SetNillablePackageID(u *uuid.UUID) *CertifyVexCreate

SetNillablePackageID sets the "package_id" field if the given value is not nil.

func (*CertifyVexCreate) SetOrigin

func (cvc *CertifyVexCreate) SetOrigin(s string) *CertifyVexCreate

SetOrigin sets the "origin" field.

func (*CertifyVexCreate) SetPackage

func (cvc *CertifyVexCreate) SetPackage(p *PackageVersion) *CertifyVexCreate

SetPackage sets the "package" edge to the PackageVersion entity.

func (*CertifyVexCreate) SetPackageID

func (cvc *CertifyVexCreate) SetPackageID(u uuid.UUID) *CertifyVexCreate

SetPackageID sets the "package_id" field.

func (*CertifyVexCreate) SetStatement

func (cvc *CertifyVexCreate) SetStatement(s string) *CertifyVexCreate

SetStatement sets the "statement" field.

func (*CertifyVexCreate) SetStatus

func (cvc *CertifyVexCreate) SetStatus(s string) *CertifyVexCreate

SetStatus sets the "status" field.

func (*CertifyVexCreate) SetStatusNotes

func (cvc *CertifyVexCreate) SetStatusNotes(s string) *CertifyVexCreate

SetStatusNotes sets the "status_notes" field.

func (*CertifyVexCreate) SetVulnerability

func (cvc *CertifyVexCreate) SetVulnerability(v *VulnerabilityID) *CertifyVexCreate

SetVulnerability sets the "vulnerability" edge to the VulnerabilityID entity.

func (*CertifyVexCreate) SetVulnerabilityID

func (cvc *CertifyVexCreate) SetVulnerabilityID(u uuid.UUID) *CertifyVexCreate

SetVulnerabilityID sets the "vulnerability_id" field.

type CertifyVexCreateBulk

type CertifyVexCreateBulk struct {
	// contains filtered or unexported fields
}

CertifyVexCreateBulk is the builder for creating many CertifyVex entities in bulk.

func (*CertifyVexCreateBulk) Exec

func (cvcb *CertifyVexCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*CertifyVexCreateBulk) ExecX

func (cvcb *CertifyVexCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*CertifyVexCreateBulk) OnConflict

func (cvcb *CertifyVexCreateBulk) OnConflict(opts ...sql.ConflictOption) *CertifyVexUpsertBulk

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.CertifyVex.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.CertifyVexUpsert) {
		SetPackageID(v+v).
	}).
	Exec(ctx)

func (*CertifyVexCreateBulk) OnConflictColumns

func (cvcb *CertifyVexCreateBulk) OnConflictColumns(columns ...string) *CertifyVexUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.CertifyVex.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*CertifyVexCreateBulk) Save

func (cvcb *CertifyVexCreateBulk) Save(ctx context.Context) ([]*CertifyVex, error)

Save creates the CertifyVex entities in the database.

func (*CertifyVexCreateBulk) SaveX

func (cvcb *CertifyVexCreateBulk) SaveX(ctx context.Context) []*CertifyVex

SaveX is like Save, but panics if an error occurs.

type CertifyVexDelete

type CertifyVexDelete struct {
	// contains filtered or unexported fields
}

CertifyVexDelete is the builder for deleting a CertifyVex entity.

func (*CertifyVexDelete) Exec

func (cvd *CertifyVexDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*CertifyVexDelete) ExecX

func (cvd *CertifyVexDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*CertifyVexDelete) Where

Where appends a list predicates to the CertifyVexDelete builder.

type CertifyVexDeleteOne

type CertifyVexDeleteOne struct {
	// contains filtered or unexported fields
}

CertifyVexDeleteOne is the builder for deleting a single CertifyVex entity.

func (*CertifyVexDeleteOne) Exec

func (cvdo *CertifyVexDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*CertifyVexDeleteOne) ExecX

func (cvdo *CertifyVexDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*CertifyVexDeleteOne) Where

Where appends a list predicates to the CertifyVexDelete builder.

type CertifyVexEdge

type CertifyVexEdge struct {
	Node   *CertifyVex `json:"node"`
	Cursor Cursor      `json:"cursor"`
}

CertifyVexEdge is the edge representation of CertifyVex.

type CertifyVexEdges

type CertifyVexEdges struct {
	// Package holds the value of the package edge.
	Package *PackageVersion `json:"package,omitempty"`
	// Artifact holds the value of the artifact edge.
	Artifact *Artifact `json:"artifact,omitempty"`
	// Vulnerability holds the value of the vulnerability edge.
	Vulnerability *VulnerabilityID `json:"vulnerability,omitempty"`
	// contains filtered or unexported fields
}

CertifyVexEdges holds the relations/edges for other nodes in the graph.

func (CertifyVexEdges) ArtifactOrErr

func (e CertifyVexEdges) ArtifactOrErr() (*Artifact, error)

ArtifactOrErr returns the Artifact value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (CertifyVexEdges) PackageOrErr

func (e CertifyVexEdges) PackageOrErr() (*PackageVersion, error)

PackageOrErr returns the Package value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (CertifyVexEdges) VulnerabilityOrErr

func (e CertifyVexEdges) VulnerabilityOrErr() (*VulnerabilityID, error)

VulnerabilityOrErr returns the Vulnerability value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type CertifyVexGroupBy

type CertifyVexGroupBy struct {
	// contains filtered or unexported fields
}

CertifyVexGroupBy is the group-by builder for CertifyVex entities.

func (*CertifyVexGroupBy) Aggregate

func (cvgb *CertifyVexGroupBy) Aggregate(fns ...AggregateFunc) *CertifyVexGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*CertifyVexGroupBy) Bool

func (s *CertifyVexGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*CertifyVexGroupBy) BoolX

func (s *CertifyVexGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*CertifyVexGroupBy) Bools

func (s *CertifyVexGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*CertifyVexGroupBy) BoolsX

func (s *CertifyVexGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*CertifyVexGroupBy) Float64

func (s *CertifyVexGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*CertifyVexGroupBy) Float64X

func (s *CertifyVexGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*CertifyVexGroupBy) Float64s

func (s *CertifyVexGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*CertifyVexGroupBy) Float64sX

func (s *CertifyVexGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*CertifyVexGroupBy) Int

func (s *CertifyVexGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*CertifyVexGroupBy) IntX

func (s *CertifyVexGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*CertifyVexGroupBy) Ints

func (s *CertifyVexGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*CertifyVexGroupBy) IntsX

func (s *CertifyVexGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*CertifyVexGroupBy) Scan

func (cvgb *CertifyVexGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*CertifyVexGroupBy) ScanX

func (s *CertifyVexGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*CertifyVexGroupBy) String

func (s *CertifyVexGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*CertifyVexGroupBy) StringX

func (s *CertifyVexGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*CertifyVexGroupBy) Strings

func (s *CertifyVexGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*CertifyVexGroupBy) StringsX

func (s *CertifyVexGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type CertifyVexMutation

type CertifyVexMutation struct {
	// contains filtered or unexported fields
}

CertifyVexMutation represents an operation that mutates the CertifyVex nodes in the graph.

func (*CertifyVexMutation) AddField

func (m *CertifyVexMutation) AddField(name string, value ent.Value) error

AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*CertifyVexMutation) AddedEdges

func (m *CertifyVexMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*CertifyVexMutation) AddedField

func (m *CertifyVexMutation) AddedField(name string) (ent.Value, bool)

AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*CertifyVexMutation) AddedFields

func (m *CertifyVexMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*CertifyVexMutation) AddedIDs

func (m *CertifyVexMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*CertifyVexMutation) ArtifactCleared

func (m *CertifyVexMutation) ArtifactCleared() bool

ArtifactCleared reports if the "artifact" edge to the Artifact entity was cleared.

func (*CertifyVexMutation) ArtifactID

func (m *CertifyVexMutation) ArtifactID() (r uuid.UUID, exists bool)

ArtifactID returns the value of the "artifact_id" field in the mutation.

func (*CertifyVexMutation) ArtifactIDCleared

func (m *CertifyVexMutation) ArtifactIDCleared() bool

ArtifactIDCleared returns if the "artifact_id" field was cleared in this mutation.

func (*CertifyVexMutation) ArtifactIDs

func (m *CertifyVexMutation) ArtifactIDs() (ids []uuid.UUID)

ArtifactIDs returns the "artifact" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use ArtifactID instead. It exists only for internal usage by the builders.

func (*CertifyVexMutation) ClearArtifact

func (m *CertifyVexMutation) ClearArtifact()

ClearArtifact clears the "artifact" edge to the Artifact entity.

func (*CertifyVexMutation) ClearArtifactID

func (m *CertifyVexMutation) ClearArtifactID()

ClearArtifactID clears the value of the "artifact_id" field.

func (*CertifyVexMutation) ClearEdge

func (m *CertifyVexMutation) ClearEdge(name string) error

ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.

func (*CertifyVexMutation) ClearField

func (m *CertifyVexMutation) ClearField(name string) error

ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.

func (*CertifyVexMutation) ClearPackage

func (m *CertifyVexMutation) ClearPackage()

ClearPackage clears the "package" edge to the PackageVersion entity.

func (*CertifyVexMutation) ClearPackageID

func (m *CertifyVexMutation) ClearPackageID()

ClearPackageID clears the value of the "package_id" field.

func (*CertifyVexMutation) ClearVulnerability

func (m *CertifyVexMutation) ClearVulnerability()

ClearVulnerability clears the "vulnerability" edge to the VulnerabilityID entity.

func (*CertifyVexMutation) ClearedEdges

func (m *CertifyVexMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*CertifyVexMutation) ClearedFields

func (m *CertifyVexMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (CertifyVexMutation) Client

func (m CertifyVexMutation) Client() *Client

Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.

func (*CertifyVexMutation) Collector

func (m *CertifyVexMutation) Collector() (r string, exists bool)

Collector returns the value of the "collector" field in the mutation.

func (*CertifyVexMutation) DocumentRef added in v0.6.0

func (m *CertifyVexMutation) DocumentRef() (r string, exists bool)

DocumentRef returns the value of the "document_ref" field in the mutation.

func (*CertifyVexMutation) EdgeCleared

func (m *CertifyVexMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*CertifyVexMutation) Field

func (m *CertifyVexMutation) Field(name string) (ent.Value, bool)

Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*CertifyVexMutation) FieldCleared

func (m *CertifyVexMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*CertifyVexMutation) Fields

func (m *CertifyVexMutation) Fields() []string

Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().

func (*CertifyVexMutation) ID

func (m *CertifyVexMutation) ID() (id uuid.UUID, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*CertifyVexMutation) IDs

func (m *CertifyVexMutation) IDs(ctx context.Context) ([]uuid.UUID, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*CertifyVexMutation) Justification

func (m *CertifyVexMutation) Justification() (r string, exists bool)

Justification returns the value of the "justification" field in the mutation.

func (*CertifyVexMutation) KnownSince

func (m *CertifyVexMutation) KnownSince() (r time.Time, exists bool)

KnownSince returns the value of the "known_since" field in the mutation.

func (*CertifyVexMutation) OldArtifactID

func (m *CertifyVexMutation) OldArtifactID(ctx context.Context) (v *uuid.UUID, err error)

OldArtifactID returns the old "artifact_id" field's value of the CertifyVex entity. If the CertifyVex object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*CertifyVexMutation) OldCollector

func (m *CertifyVexMutation) OldCollector(ctx context.Context) (v string, err error)

OldCollector returns the old "collector" field's value of the CertifyVex entity. If the CertifyVex object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*CertifyVexMutation) OldDocumentRef added in v0.6.0

func (m *CertifyVexMutation) OldDocumentRef(ctx context.Context) (v string, err error)

OldDocumentRef returns the old "document_ref" field's value of the CertifyVex entity. If the CertifyVex object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*CertifyVexMutation) OldField

func (m *CertifyVexMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*CertifyVexMutation) OldJustification

func (m *CertifyVexMutation) OldJustification(ctx context.Context) (v string, err error)

OldJustification returns the old "justification" field's value of the CertifyVex entity. If the CertifyVex object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*CertifyVexMutation) OldKnownSince

func (m *CertifyVexMutation) OldKnownSince(ctx context.Context) (v time.Time, err error)

OldKnownSince returns the old "known_since" field's value of the CertifyVex entity. If the CertifyVex object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*CertifyVexMutation) OldOrigin

func (m *CertifyVexMutation) OldOrigin(ctx context.Context) (v string, err error)

OldOrigin returns the old "origin" field's value of the CertifyVex entity. If the CertifyVex object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*CertifyVexMutation) OldPackageID

func (m *CertifyVexMutation) OldPackageID(ctx context.Context) (v *uuid.UUID, err error)

OldPackageID returns the old "package_id" field's value of the CertifyVex entity. If the CertifyVex object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*CertifyVexMutation) OldStatement

func (m *CertifyVexMutation) OldStatement(ctx context.Context) (v string, err error)

OldStatement returns the old "statement" field's value of the CertifyVex entity. If the CertifyVex object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*CertifyVexMutation) OldStatus

func (m *CertifyVexMutation) OldStatus(ctx context.Context) (v string, err error)

OldStatus returns the old "status" field's value of the CertifyVex entity. If the CertifyVex object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*CertifyVexMutation) OldStatusNotes

func (m *CertifyVexMutation) OldStatusNotes(ctx context.Context) (v string, err error)

OldStatusNotes returns the old "status_notes" field's value of the CertifyVex entity. If the CertifyVex object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*CertifyVexMutation) OldVulnerabilityID

func (m *CertifyVexMutation) OldVulnerabilityID(ctx context.Context) (v uuid.UUID, err error)

OldVulnerabilityID returns the old "vulnerability_id" field's value of the CertifyVex entity. If the CertifyVex object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*CertifyVexMutation) Op

func (m *CertifyVexMutation) Op() Op

Op returns the operation name.

func (*CertifyVexMutation) Origin

func (m *CertifyVexMutation) Origin() (r string, exists bool)

Origin returns the value of the "origin" field in the mutation.

func (*CertifyVexMutation) PackageCleared

func (m *CertifyVexMutation) PackageCleared() bool

PackageCleared reports if the "package" edge to the PackageVersion entity was cleared.

func (*CertifyVexMutation) PackageID

func (m *CertifyVexMutation) PackageID() (r uuid.UUID, exists bool)

PackageID returns the value of the "package_id" field in the mutation.

func (*CertifyVexMutation) PackageIDCleared

func (m *CertifyVexMutation) PackageIDCleared() bool

PackageIDCleared returns if the "package_id" field was cleared in this mutation.

func (*CertifyVexMutation) PackageIDs

func (m *CertifyVexMutation) PackageIDs() (ids []uuid.UUID)

PackageIDs returns the "package" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use PackageID instead. It exists only for internal usage by the builders.

func (*CertifyVexMutation) RemovedEdges

func (m *CertifyVexMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*CertifyVexMutation) RemovedIDs

func (m *CertifyVexMutation) RemovedIDs(name string) []ent.Value

RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.

func (*CertifyVexMutation) ResetArtifact

func (m *CertifyVexMutation) ResetArtifact()

ResetArtifact resets all changes to the "artifact" edge.

func (*CertifyVexMutation) ResetArtifactID

func (m *CertifyVexMutation) ResetArtifactID()

ResetArtifactID resets all changes to the "artifact_id" field.

func (*CertifyVexMutation) ResetCollector

func (m *CertifyVexMutation) ResetCollector()

ResetCollector resets all changes to the "collector" field.

func (*CertifyVexMutation) ResetDocumentRef added in v0.6.0

func (m *CertifyVexMutation) ResetDocumentRef()

ResetDocumentRef resets all changes to the "document_ref" field.

func (*CertifyVexMutation) ResetEdge

func (m *CertifyVexMutation) ResetEdge(name string) error

ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.

func (*CertifyVexMutation) ResetField

func (m *CertifyVexMutation) ResetField(name string) error

ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.

func (*CertifyVexMutation) ResetJustification

func (m *CertifyVexMutation) ResetJustification()

ResetJustification resets all changes to the "justification" field.

func (*CertifyVexMutation) ResetKnownSince

func (m *CertifyVexMutation) ResetKnownSince()

ResetKnownSince resets all changes to the "known_since" field.

func (*CertifyVexMutation) ResetOrigin

func (m *CertifyVexMutation) ResetOrigin()

ResetOrigin resets all changes to the "origin" field.

func (*CertifyVexMutation) ResetPackage

func (m *CertifyVexMutation) ResetPackage()

ResetPackage resets all changes to the "package" edge.

func (*CertifyVexMutation) ResetPackageID

func (m *CertifyVexMutation) ResetPackageID()

ResetPackageID resets all changes to the "package_id" field.

func (*CertifyVexMutation) ResetStatement

func (m *CertifyVexMutation) ResetStatement()

ResetStatement resets all changes to the "statement" field.

func (*CertifyVexMutation) ResetStatus

func (m *CertifyVexMutation) ResetStatus()

ResetStatus resets all changes to the "status" field.

func (*CertifyVexMutation) ResetStatusNotes

func (m *CertifyVexMutation) ResetStatusNotes()

ResetStatusNotes resets all changes to the "status_notes" field.

func (*CertifyVexMutation) ResetVulnerability

func (m *CertifyVexMutation) ResetVulnerability()

ResetVulnerability resets all changes to the "vulnerability" edge.

func (*CertifyVexMutation) ResetVulnerabilityID

func (m *CertifyVexMutation) ResetVulnerabilityID()

ResetVulnerabilityID resets all changes to the "vulnerability_id" field.

func (*CertifyVexMutation) SetArtifactID

func (m *CertifyVexMutation) SetArtifactID(u uuid.UUID)

SetArtifactID sets the "artifact_id" field.

func (*CertifyVexMutation) SetCollector

func (m *CertifyVexMutation) SetCollector(s string)

SetCollector sets the "collector" field.

func (*CertifyVexMutation) SetDocumentRef added in v0.6.0

func (m *CertifyVexMutation) SetDocumentRef(s string)

SetDocumentRef sets the "document_ref" field.

func (*CertifyVexMutation) SetField

func (m *CertifyVexMutation) SetField(name string, value ent.Value) error

SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*CertifyVexMutation) SetID added in v0.5.0

func (m *CertifyVexMutation) SetID(id uuid.UUID)

SetID sets the value of the id field. Note that this operation is only accepted on creation of CertifyVex entities.

func (*CertifyVexMutation) SetJustification

func (m *CertifyVexMutation) SetJustification(s string)

SetJustification sets the "justification" field.

func (*CertifyVexMutation) SetKnownSince

func (m *CertifyVexMutation) SetKnownSince(t time.Time)

SetKnownSince sets the "known_since" field.

func (*CertifyVexMutation) SetOp

func (m *CertifyVexMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*CertifyVexMutation) SetOrigin

func (m *CertifyVexMutation) SetOrigin(s string)

SetOrigin sets the "origin" field.

func (*CertifyVexMutation) SetPackageID

func (m *CertifyVexMutation) SetPackageID(u uuid.UUID)

SetPackageID sets the "package_id" field.

func (*CertifyVexMutation) SetStatement

func (m *CertifyVexMutation) SetStatement(s string)

SetStatement sets the "statement" field.

func (*CertifyVexMutation) SetStatus

func (m *CertifyVexMutation) SetStatus(s string)

SetStatus sets the "status" field.

func (*CertifyVexMutation) SetStatusNotes

func (m *CertifyVexMutation) SetStatusNotes(s string)

SetStatusNotes sets the "status_notes" field.

func (*CertifyVexMutation) SetVulnerabilityID

func (m *CertifyVexMutation) SetVulnerabilityID(u uuid.UUID)

SetVulnerabilityID sets the "vulnerability_id" field.

func (*CertifyVexMutation) Statement

func (m *CertifyVexMutation) Statement() (r string, exists bool)

Statement returns the value of the "statement" field in the mutation.

func (*CertifyVexMutation) Status

func (m *CertifyVexMutation) Status() (r string, exists bool)

Status returns the value of the "status" field in the mutation.

func (*CertifyVexMutation) StatusNotes

func (m *CertifyVexMutation) StatusNotes() (r string, exists bool)

StatusNotes returns the value of the "status_notes" field in the mutation.

func (CertifyVexMutation) Tx

func (m CertifyVexMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*CertifyVexMutation) Type

func (m *CertifyVexMutation) Type() string

Type returns the node type of this mutation (CertifyVex).

func (*CertifyVexMutation) VulnerabilityCleared

func (m *CertifyVexMutation) VulnerabilityCleared() bool

VulnerabilityCleared reports if the "vulnerability" edge to the VulnerabilityID entity was cleared.

func (*CertifyVexMutation) VulnerabilityID

func (m *CertifyVexMutation) VulnerabilityID() (r uuid.UUID, exists bool)

VulnerabilityID returns the value of the "vulnerability_id" field in the mutation.

func (*CertifyVexMutation) VulnerabilityIDs

func (m *CertifyVexMutation) VulnerabilityIDs() (ids []uuid.UUID)

VulnerabilityIDs returns the "vulnerability" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use VulnerabilityID instead. It exists only for internal usage by the builders.

func (*CertifyVexMutation) Where

func (m *CertifyVexMutation) Where(ps ...predicate.CertifyVex)

Where appends a list predicates to the CertifyVexMutation builder.

func (*CertifyVexMutation) WhereP

func (m *CertifyVexMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the CertifyVexMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type CertifyVexOrder

type CertifyVexOrder struct {
	Direction OrderDirection        `json:"direction"`
	Field     *CertifyVexOrderField `json:"field"`
}

CertifyVexOrder defines the ordering of CertifyVex.

type CertifyVexOrderField

type CertifyVexOrderField struct {
	// Value extracts the ordering value from the given CertifyVex.
	Value func(*CertifyVex) (ent.Value, error)
	// contains filtered or unexported fields
}

CertifyVexOrderField defines the ordering field of CertifyVex.

type CertifyVexPaginateOption

type CertifyVexPaginateOption func(*certifyvexPager) error

CertifyVexPaginateOption enables pagination customization.

func WithCertifyVexFilter

func WithCertifyVexFilter(filter func(*CertifyVexQuery) (*CertifyVexQuery, error)) CertifyVexPaginateOption

WithCertifyVexFilter configures pagination filter.

func WithCertifyVexOrder

func WithCertifyVexOrder(order *CertifyVexOrder) CertifyVexPaginateOption

WithCertifyVexOrder configures pagination ordering.

type CertifyVexQuery

type CertifyVexQuery struct {
	// contains filtered or unexported fields
}

CertifyVexQuery is the builder for querying CertifyVex entities.

func (*CertifyVexQuery) Aggregate

func (cvq *CertifyVexQuery) Aggregate(fns ...AggregateFunc) *CertifyVexSelect

Aggregate returns a CertifyVexSelect configured with the given aggregations.

func (*CertifyVexQuery) All

func (cvq *CertifyVexQuery) All(ctx context.Context) ([]*CertifyVex, error)

All executes the query and returns a list of CertifyVexes.

func (*CertifyVexQuery) AllX

func (cvq *CertifyVexQuery) AllX(ctx context.Context) []*CertifyVex

AllX is like All, but panics if an error occurs.

func (*CertifyVexQuery) Clone

func (cvq *CertifyVexQuery) Clone() *CertifyVexQuery

Clone returns a duplicate of the CertifyVexQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*CertifyVexQuery) CollectFields

func (cv *CertifyVexQuery) CollectFields(ctx context.Context, satisfies ...string) (*CertifyVexQuery, error)

CollectFields tells the query-builder to eagerly load connected nodes by resolver context.

func (*CertifyVexQuery) Count

func (cvq *CertifyVexQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*CertifyVexQuery) CountX

func (cvq *CertifyVexQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*CertifyVexQuery) Exist

func (cvq *CertifyVexQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*CertifyVexQuery) ExistX

func (cvq *CertifyVexQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*CertifyVexQuery) First

func (cvq *CertifyVexQuery) First(ctx context.Context) (*CertifyVex, error)

First returns the first CertifyVex entity from the query. Returns a *NotFoundError when no CertifyVex was found.

func (*CertifyVexQuery) FirstID

func (cvq *CertifyVexQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)

FirstID returns the first CertifyVex ID from the query. Returns a *NotFoundError when no CertifyVex ID was found.

func (*CertifyVexQuery) FirstIDX

func (cvq *CertifyVexQuery) FirstIDX(ctx context.Context) uuid.UUID

FirstIDX is like FirstID, but panics if an error occurs.

func (*CertifyVexQuery) FirstX

func (cvq *CertifyVexQuery) FirstX(ctx context.Context) *CertifyVex

FirstX is like First, but panics if an error occurs.

func (*CertifyVexQuery) GroupBy

func (cvq *CertifyVexQuery) GroupBy(field string, fields ...string) *CertifyVexGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	PackageID uuid.UUID `json:"package_id,omitempty"`
	Count int `json:"count,omitempty"`
}

client.CertifyVex.Query().
	GroupBy(certifyvex.FieldPackageID).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*CertifyVexQuery) IDs

func (cvq *CertifyVexQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)

IDs executes the query and returns a list of CertifyVex IDs.

func (*CertifyVexQuery) IDsX

func (cvq *CertifyVexQuery) IDsX(ctx context.Context) []uuid.UUID

IDsX is like IDs, but panics if an error occurs.

func (*CertifyVexQuery) Limit

func (cvq *CertifyVexQuery) Limit(limit int) *CertifyVexQuery

Limit the number of records to be returned by this query.

func (*CertifyVexQuery) Offset

func (cvq *CertifyVexQuery) Offset(offset int) *CertifyVexQuery

Offset to start from.

func (*CertifyVexQuery) Only

func (cvq *CertifyVexQuery) Only(ctx context.Context) (*CertifyVex, error)

Only returns a single CertifyVex entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one CertifyVex entity is found. Returns a *NotFoundError when no CertifyVex entities are found.

func (*CertifyVexQuery) OnlyID

func (cvq *CertifyVexQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)

OnlyID is like Only, but returns the only CertifyVex ID in the query. Returns a *NotSingularError when more than one CertifyVex ID is found. Returns a *NotFoundError when no entities are found.

func (*CertifyVexQuery) OnlyIDX

func (cvq *CertifyVexQuery) OnlyIDX(ctx context.Context) uuid.UUID

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*CertifyVexQuery) OnlyX

func (cvq *CertifyVexQuery) OnlyX(ctx context.Context) *CertifyVex

OnlyX is like Only, but panics if an error occurs.

func (*CertifyVexQuery) Order

Order specifies how the records should be ordered.

func (*CertifyVexQuery) Paginate

func (cv *CertifyVexQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...CertifyVexPaginateOption,
) (*CertifyVexConnection, error)

Paginate executes the query and returns a relay based cursor connection to CertifyVex.

func (*CertifyVexQuery) QueryArtifact

func (cvq *CertifyVexQuery) QueryArtifact() *ArtifactQuery

QueryArtifact chains the current query on the "artifact" edge.

func (*CertifyVexQuery) QueryPackage

func (cvq *CertifyVexQuery) QueryPackage() *PackageVersionQuery

QueryPackage chains the current query on the "package" edge.

func (*CertifyVexQuery) QueryVulnerability

func (cvq *CertifyVexQuery) QueryVulnerability() *VulnerabilityIDQuery

QueryVulnerability chains the current query on the "vulnerability" edge.

func (*CertifyVexQuery) Select

func (cvq *CertifyVexQuery) Select(fields ...string) *CertifyVexSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	PackageID uuid.UUID `json:"package_id,omitempty"`
}

client.CertifyVex.Query().
	Select(certifyvex.FieldPackageID).
	Scan(ctx, &v)

func (*CertifyVexQuery) Unique

func (cvq *CertifyVexQuery) Unique(unique bool) *CertifyVexQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*CertifyVexQuery) Where

Where adds a new predicate for the CertifyVexQuery builder.

func (*CertifyVexQuery) WithArtifact

func (cvq *CertifyVexQuery) WithArtifact(opts ...func(*ArtifactQuery)) *CertifyVexQuery

WithArtifact tells the query-builder to eager-load the nodes that are connected to the "artifact" edge. The optional arguments are used to configure the query builder of the edge.

func (*CertifyVexQuery) WithPackage

func (cvq *CertifyVexQuery) WithPackage(opts ...func(*PackageVersionQuery)) *CertifyVexQuery

WithPackage tells the query-builder to eager-load the nodes that are connected to the "package" edge. The optional arguments are used to configure the query builder of the edge.

func (*CertifyVexQuery) WithVulnerability

func (cvq *CertifyVexQuery) WithVulnerability(opts ...func(*VulnerabilityIDQuery)) *CertifyVexQuery

WithVulnerability tells the query-builder to eager-load the nodes that are connected to the "vulnerability" edge. The optional arguments are used to configure the query builder of the edge.

type CertifyVexSelect

type CertifyVexSelect struct {
	*CertifyVexQuery
	// contains filtered or unexported fields
}

CertifyVexSelect is the builder for selecting fields of CertifyVex entities.

func (*CertifyVexSelect) Aggregate

func (cvs *CertifyVexSelect) Aggregate(fns ...AggregateFunc) *CertifyVexSelect

Aggregate adds the given aggregation functions to the selector query.

func (*CertifyVexSelect) Bool

func (s *CertifyVexSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*CertifyVexSelect) BoolX

func (s *CertifyVexSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*CertifyVexSelect) Bools

func (s *CertifyVexSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*CertifyVexSelect) BoolsX

func (s *CertifyVexSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*CertifyVexSelect) Float64

func (s *CertifyVexSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*CertifyVexSelect) Float64X

func (s *CertifyVexSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*CertifyVexSelect) Float64s

func (s *CertifyVexSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*CertifyVexSelect) Float64sX

func (s *CertifyVexSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*CertifyVexSelect) Int

func (s *CertifyVexSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*CertifyVexSelect) IntX

func (s *CertifyVexSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*CertifyVexSelect) Ints

func (s *CertifyVexSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*CertifyVexSelect) IntsX

func (s *CertifyVexSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*CertifyVexSelect) Scan

func (cvs *CertifyVexSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*CertifyVexSelect) ScanX

func (s *CertifyVexSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*CertifyVexSelect) String

func (s *CertifyVexSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*CertifyVexSelect) StringX

func (s *CertifyVexSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*CertifyVexSelect) Strings

func (s *CertifyVexSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*CertifyVexSelect) StringsX

func (s *CertifyVexSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type CertifyVexUpdate

type CertifyVexUpdate struct {
	// contains filtered or unexported fields
}

CertifyVexUpdate is the builder for updating CertifyVex entities.

func (*CertifyVexUpdate) ClearArtifact

func (cvu *CertifyVexUpdate) ClearArtifact() *CertifyVexUpdate

ClearArtifact clears the "artifact" edge to the Artifact entity.

func (*CertifyVexUpdate) ClearArtifactID

func (cvu *CertifyVexUpdate) ClearArtifactID() *CertifyVexUpdate

ClearArtifactID clears the value of the "artifact_id" field.

func (*CertifyVexUpdate) ClearPackage

func (cvu *CertifyVexUpdate) ClearPackage() *CertifyVexUpdate

ClearPackage clears the "package" edge to the PackageVersion entity.

func (*CertifyVexUpdate) ClearPackageID

func (cvu *CertifyVexUpdate) ClearPackageID() *CertifyVexUpdate

ClearPackageID clears the value of the "package_id" field.

func (*CertifyVexUpdate) ClearVulnerability

func (cvu *CertifyVexUpdate) ClearVulnerability() *CertifyVexUpdate

ClearVulnerability clears the "vulnerability" edge to the VulnerabilityID entity.

func (*CertifyVexUpdate) Exec

func (cvu *CertifyVexUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*CertifyVexUpdate) ExecX

func (cvu *CertifyVexUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*CertifyVexUpdate) Mutation

func (cvu *CertifyVexUpdate) Mutation() *CertifyVexMutation

Mutation returns the CertifyVexMutation object of the builder.

func (*CertifyVexUpdate) Save

func (cvu *CertifyVexUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*CertifyVexUpdate) SaveX

func (cvu *CertifyVexUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*CertifyVexUpdate) SetArtifact

func (cvu *CertifyVexUpdate) SetArtifact(a *Artifact) *CertifyVexUpdate

SetArtifact sets the "artifact" edge to the Artifact entity.

func (*CertifyVexUpdate) SetArtifactID

func (cvu *CertifyVexUpdate) SetArtifactID(u uuid.UUID) *CertifyVexUpdate

SetArtifactID sets the "artifact_id" field.

func (*CertifyVexUpdate) SetCollector

func (cvu *CertifyVexUpdate) SetCollector(s string) *CertifyVexUpdate

SetCollector sets the "collector" field.

func (*CertifyVexUpdate) SetDocumentRef added in v0.6.0

func (cvu *CertifyVexUpdate) SetDocumentRef(s string) *CertifyVexUpdate

SetDocumentRef sets the "document_ref" field.

func (*CertifyVexUpdate) SetJustification

func (cvu *CertifyVexUpdate) SetJustification(s string) *CertifyVexUpdate

SetJustification sets the "justification" field.

func (*CertifyVexUpdate) SetKnownSince

func (cvu *CertifyVexUpdate) SetKnownSince(t time.Time) *CertifyVexUpdate

SetKnownSince sets the "known_since" field.

func (*CertifyVexUpdate) SetNillableArtifactID

func (cvu *CertifyVexUpdate) SetNillableArtifactID(u *uuid.UUID) *CertifyVexUpdate

SetNillableArtifactID sets the "artifact_id" field if the given value is not nil.

func (*CertifyVexUpdate) SetNillableCollector added in v0.4.0

func (cvu *CertifyVexUpdate) SetNillableCollector(s *string) *CertifyVexUpdate

SetNillableCollector sets the "collector" field if the given value is not nil.

func (*CertifyVexUpdate) SetNillableDocumentRef added in v0.6.0

func (cvu *CertifyVexUpdate) SetNillableDocumentRef(s *string) *CertifyVexUpdate

SetNillableDocumentRef sets the "document_ref" field if the given value is not nil.

func (*CertifyVexUpdate) SetNillableJustification added in v0.4.0

func (cvu *CertifyVexUpdate) SetNillableJustification(s *string) *CertifyVexUpdate

SetNillableJustification sets the "justification" field if the given value is not nil.

func (*CertifyVexUpdate) SetNillableKnownSince added in v0.4.0

func (cvu *CertifyVexUpdate) SetNillableKnownSince(t *time.Time) *CertifyVexUpdate

SetNillableKnownSince sets the "known_since" field if the given value is not nil.

func (*CertifyVexUpdate) SetNillableOrigin added in v0.4.0

func (cvu *CertifyVexUpdate) SetNillableOrigin(s *string) *CertifyVexUpdate

SetNillableOrigin sets the "origin" field if the given value is not nil.

func (*CertifyVexUpdate) SetNillablePackageID

func (cvu *CertifyVexUpdate) SetNillablePackageID(u *uuid.UUID) *CertifyVexUpdate

SetNillablePackageID sets the "package_id" field if the given value is not nil.

func (*CertifyVexUpdate) SetNillableStatement added in v0.4.0

func (cvu *CertifyVexUpdate) SetNillableStatement(s *string) *CertifyVexUpdate

SetNillableStatement sets the "statement" field if the given value is not nil.

func (*CertifyVexUpdate) SetNillableStatus added in v0.4.0

func (cvu *CertifyVexUpdate) SetNillableStatus(s *string) *CertifyVexUpdate

SetNillableStatus sets the "status" field if the given value is not nil.

func (*CertifyVexUpdate) SetNillableStatusNotes added in v0.4.0

func (cvu *CertifyVexUpdate) SetNillableStatusNotes(s *string) *CertifyVexUpdate

SetNillableStatusNotes sets the "status_notes" field if the given value is not nil.

func (*CertifyVexUpdate) SetNillableVulnerabilityID added in v0.4.0

func (cvu *CertifyVexUpdate) SetNillableVulnerabilityID(u *uuid.UUID) *CertifyVexUpdate

SetNillableVulnerabilityID sets the "vulnerability_id" field if the given value is not nil.

func (*CertifyVexUpdate) SetOrigin

func (cvu *CertifyVexUpdate) SetOrigin(s string) *CertifyVexUpdate

SetOrigin sets the "origin" field.

func (*CertifyVexUpdate) SetPackage

func (cvu *CertifyVexUpdate) SetPackage(p *PackageVersion) *CertifyVexUpdate

SetPackage sets the "package" edge to the PackageVersion entity.

func (*CertifyVexUpdate) SetPackageID

func (cvu *CertifyVexUpdate) SetPackageID(u uuid.UUID) *CertifyVexUpdate

SetPackageID sets the "package_id" field.

func (*CertifyVexUpdate) SetStatement

func (cvu *CertifyVexUpdate) SetStatement(s string) *CertifyVexUpdate

SetStatement sets the "statement" field.

func (*CertifyVexUpdate) SetStatus

func (cvu *CertifyVexUpdate) SetStatus(s string) *CertifyVexUpdate

SetStatus sets the "status" field.

func (*CertifyVexUpdate) SetStatusNotes

func (cvu *CertifyVexUpdate) SetStatusNotes(s string) *CertifyVexUpdate

SetStatusNotes sets the "status_notes" field.

func (*CertifyVexUpdate) SetVulnerability

func (cvu *CertifyVexUpdate) SetVulnerability(v *VulnerabilityID) *CertifyVexUpdate

SetVulnerability sets the "vulnerability" edge to the VulnerabilityID entity.

func (*CertifyVexUpdate) SetVulnerabilityID

func (cvu *CertifyVexUpdate) SetVulnerabilityID(u uuid.UUID) *CertifyVexUpdate

SetVulnerabilityID sets the "vulnerability_id" field.

func (*CertifyVexUpdate) Where

Where appends a list predicates to the CertifyVexUpdate builder.

type CertifyVexUpdateOne

type CertifyVexUpdateOne struct {
	// contains filtered or unexported fields
}

CertifyVexUpdateOne is the builder for updating a single CertifyVex entity.

func (*CertifyVexUpdateOne) ClearArtifact

func (cvuo *CertifyVexUpdateOne) ClearArtifact() *CertifyVexUpdateOne

ClearArtifact clears the "artifact" edge to the Artifact entity.

func (*CertifyVexUpdateOne) ClearArtifactID

func (cvuo *CertifyVexUpdateOne) ClearArtifactID() *CertifyVexUpdateOne

ClearArtifactID clears the value of the "artifact_id" field.

func (*CertifyVexUpdateOne) ClearPackage

func (cvuo *CertifyVexUpdateOne) ClearPackage() *CertifyVexUpdateOne

ClearPackage clears the "package" edge to the PackageVersion entity.

func (*CertifyVexUpdateOne) ClearPackageID

func (cvuo *CertifyVexUpdateOne) ClearPackageID() *CertifyVexUpdateOne

ClearPackageID clears the value of the "package_id" field.

func (*CertifyVexUpdateOne) ClearVulnerability

func (cvuo *CertifyVexUpdateOne) ClearVulnerability() *CertifyVexUpdateOne

ClearVulnerability clears the "vulnerability" edge to the VulnerabilityID entity.

func (*CertifyVexUpdateOne) Exec

func (cvuo *CertifyVexUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*CertifyVexUpdateOne) ExecX

func (cvuo *CertifyVexUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*CertifyVexUpdateOne) Mutation

func (cvuo *CertifyVexUpdateOne) Mutation() *CertifyVexMutation

Mutation returns the CertifyVexMutation object of the builder.

func (*CertifyVexUpdateOne) Save

func (cvuo *CertifyVexUpdateOne) Save(ctx context.Context) (*CertifyVex, error)

Save executes the query and returns the updated CertifyVex entity.

func (*CertifyVexUpdateOne) SaveX

func (cvuo *CertifyVexUpdateOne) SaveX(ctx context.Context) *CertifyVex

SaveX is like Save, but panics if an error occurs.

func (*CertifyVexUpdateOne) Select

func (cvuo *CertifyVexUpdateOne) Select(field string, fields ...string) *CertifyVexUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*CertifyVexUpdateOne) SetArtifact

func (cvuo *CertifyVexUpdateOne) SetArtifact(a *Artifact) *CertifyVexUpdateOne

SetArtifact sets the "artifact" edge to the Artifact entity.

func (*CertifyVexUpdateOne) SetArtifactID

func (cvuo *CertifyVexUpdateOne) SetArtifactID(u uuid.UUID) *CertifyVexUpdateOne

SetArtifactID sets the "artifact_id" field.

func (*CertifyVexUpdateOne) SetCollector

func (cvuo *CertifyVexUpdateOne) SetCollector(s string) *CertifyVexUpdateOne

SetCollector sets the "collector" field.

func (*CertifyVexUpdateOne) SetDocumentRef added in v0.6.0

func (cvuo *CertifyVexUpdateOne) SetDocumentRef(s string) *CertifyVexUpdateOne

SetDocumentRef sets the "document_ref" field.

func (*CertifyVexUpdateOne) SetJustification

func (cvuo *CertifyVexUpdateOne) SetJustification(s string) *CertifyVexUpdateOne

SetJustification sets the "justification" field.

func (*CertifyVexUpdateOne) SetKnownSince

func (cvuo *CertifyVexUpdateOne) SetKnownSince(t time.Time) *CertifyVexUpdateOne

SetKnownSince sets the "known_since" field.

func (*CertifyVexUpdateOne) SetNillableArtifactID

func (cvuo *CertifyVexUpdateOne) SetNillableArtifactID(u *uuid.UUID) *CertifyVexUpdateOne

SetNillableArtifactID sets the "artifact_id" field if the given value is not nil.

func (*CertifyVexUpdateOne) SetNillableCollector added in v0.4.0

func (cvuo *CertifyVexUpdateOne) SetNillableCollector(s *string) *CertifyVexUpdateOne

SetNillableCollector sets the "collector" field if the given value is not nil.

func (*CertifyVexUpdateOne) SetNillableDocumentRef added in v0.6.0

func (cvuo *CertifyVexUpdateOne) SetNillableDocumentRef(s *string) *CertifyVexUpdateOne

SetNillableDocumentRef sets the "document_ref" field if the given value is not nil.

func (*CertifyVexUpdateOne) SetNillableJustification added in v0.4.0

func (cvuo *CertifyVexUpdateOne) SetNillableJustification(s *string) *CertifyVexUpdateOne

SetNillableJustification sets the "justification" field if the given value is not nil.

func (*CertifyVexUpdateOne) SetNillableKnownSince added in v0.4.0

func (cvuo *CertifyVexUpdateOne) SetNillableKnownSince(t *time.Time) *CertifyVexUpdateOne

SetNillableKnownSince sets the "known_since" field if the given value is not nil.

func (*CertifyVexUpdateOne) SetNillableOrigin added in v0.4.0

func (cvuo *CertifyVexUpdateOne) SetNillableOrigin(s *string) *CertifyVexUpdateOne

SetNillableOrigin sets the "origin" field if the given value is not nil.

func (*CertifyVexUpdateOne) SetNillablePackageID

func (cvuo *CertifyVexUpdateOne) SetNillablePackageID(u *uuid.UUID) *CertifyVexUpdateOne

SetNillablePackageID sets the "package_id" field if the given value is not nil.

func (*CertifyVexUpdateOne) SetNillableStatement added in v0.4.0

func (cvuo *CertifyVexUpdateOne) SetNillableStatement(s *string) *CertifyVexUpdateOne

SetNillableStatement sets the "statement" field if the given value is not nil.

func (*CertifyVexUpdateOne) SetNillableStatus added in v0.4.0

func (cvuo *CertifyVexUpdateOne) SetNillableStatus(s *string) *CertifyVexUpdateOne

SetNillableStatus sets the "status" field if the given value is not nil.

func (*CertifyVexUpdateOne) SetNillableStatusNotes added in v0.4.0

func (cvuo *CertifyVexUpdateOne) SetNillableStatusNotes(s *string) *CertifyVexUpdateOne

SetNillableStatusNotes sets the "status_notes" field if the given value is not nil.

func (*CertifyVexUpdateOne) SetNillableVulnerabilityID added in v0.4.0

func (cvuo *CertifyVexUpdateOne) SetNillableVulnerabilityID(u *uuid.UUID) *CertifyVexUpdateOne

SetNillableVulnerabilityID sets the "vulnerability_id" field if the given value is not nil.

func (*CertifyVexUpdateOne) SetOrigin

func (cvuo *CertifyVexUpdateOne) SetOrigin(s string) *CertifyVexUpdateOne

SetOrigin sets the "origin" field.

func (*CertifyVexUpdateOne) SetPackage

SetPackage sets the "package" edge to the PackageVersion entity.

func (*CertifyVexUpdateOne) SetPackageID

func (cvuo *CertifyVexUpdateOne) SetPackageID(u uuid.UUID) *CertifyVexUpdateOne

SetPackageID sets the "package_id" field.

func (*CertifyVexUpdateOne) SetStatement

func (cvuo *CertifyVexUpdateOne) SetStatement(s string) *CertifyVexUpdateOne

SetStatement sets the "statement" field.

func (*CertifyVexUpdateOne) SetStatus

func (cvuo *CertifyVexUpdateOne) SetStatus(s string) *CertifyVexUpdateOne

SetStatus sets the "status" field.

func (*CertifyVexUpdateOne) SetStatusNotes

func (cvuo *CertifyVexUpdateOne) SetStatusNotes(s string) *CertifyVexUpdateOne

SetStatusNotes sets the "status_notes" field.

func (*CertifyVexUpdateOne) SetVulnerability

func (cvuo *CertifyVexUpdateOne) SetVulnerability(v *VulnerabilityID) *CertifyVexUpdateOne

SetVulnerability sets the "vulnerability" edge to the VulnerabilityID entity.

func (*CertifyVexUpdateOne) SetVulnerabilityID

func (cvuo *CertifyVexUpdateOne) SetVulnerabilityID(u uuid.UUID) *CertifyVexUpdateOne

SetVulnerabilityID sets the "vulnerability_id" field.

func (*CertifyVexUpdateOne) Where

Where appends a list predicates to the CertifyVexUpdate builder.

type CertifyVexUpsert

type CertifyVexUpsert struct {
	*sql.UpdateSet
}

CertifyVexUpsert is the "OnConflict" setter.

func (*CertifyVexUpsert) ClearArtifactID

func (u *CertifyVexUpsert) ClearArtifactID() *CertifyVexUpsert

ClearArtifactID clears the value of the "artifact_id" field.

func (*CertifyVexUpsert) ClearPackageID

func (u *CertifyVexUpsert) ClearPackageID() *CertifyVexUpsert

ClearPackageID clears the value of the "package_id" field.

func (*CertifyVexUpsert) SetArtifactID

func (u *CertifyVexUpsert) SetArtifactID(v uuid.UUID) *CertifyVexUpsert

SetArtifactID sets the "artifact_id" field.

func (*CertifyVexUpsert) SetCollector

func (u *CertifyVexUpsert) SetCollector(v string) *CertifyVexUpsert

SetCollector sets the "collector" field.

func (*CertifyVexUpsert) SetDocumentRef added in v0.6.0

func (u *CertifyVexUpsert) SetDocumentRef(v string) *CertifyVexUpsert

SetDocumentRef sets the "document_ref" field.

func (*CertifyVexUpsert) SetJustification

func (u *CertifyVexUpsert) SetJustification(v string) *CertifyVexUpsert

SetJustification sets the "justification" field.

func (*CertifyVexUpsert) SetKnownSince

func (u *CertifyVexUpsert) SetKnownSince(v time.Time) *CertifyVexUpsert

SetKnownSince sets the "known_since" field.

func (*CertifyVexUpsert) SetOrigin

func (u *CertifyVexUpsert) SetOrigin(v string) *CertifyVexUpsert

SetOrigin sets the "origin" field.

func (*CertifyVexUpsert) SetPackageID

func (u *CertifyVexUpsert) SetPackageID(v uuid.UUID) *CertifyVexUpsert

SetPackageID sets the "package_id" field.

func (*CertifyVexUpsert) SetStatement

func (u *CertifyVexUpsert) SetStatement(v string) *CertifyVexUpsert

SetStatement sets the "statement" field.

func (*CertifyVexUpsert) SetStatus

func (u *CertifyVexUpsert) SetStatus(v string) *CertifyVexUpsert

SetStatus sets the "status" field.

func (*CertifyVexUpsert) SetStatusNotes

func (u *CertifyVexUpsert) SetStatusNotes(v string) *CertifyVexUpsert

SetStatusNotes sets the "status_notes" field.

func (*CertifyVexUpsert) SetVulnerabilityID

func (u *CertifyVexUpsert) SetVulnerabilityID(v uuid.UUID) *CertifyVexUpsert

SetVulnerabilityID sets the "vulnerability_id" field.

func (*CertifyVexUpsert) UpdateArtifactID

func (u *CertifyVexUpsert) UpdateArtifactID() *CertifyVexUpsert

UpdateArtifactID sets the "artifact_id" field to the value that was provided on create.

func (*CertifyVexUpsert) UpdateCollector

func (u *CertifyVexUpsert) UpdateCollector() *CertifyVexUpsert

UpdateCollector sets the "collector" field to the value that was provided on create.

func (*CertifyVexUpsert) UpdateDocumentRef added in v0.6.0

func (u *CertifyVexUpsert) UpdateDocumentRef() *CertifyVexUpsert

UpdateDocumentRef sets the "document_ref" field to the value that was provided on create.

func (*CertifyVexUpsert) UpdateJustification

func (u *CertifyVexUpsert) UpdateJustification() *CertifyVexUpsert

UpdateJustification sets the "justification" field to the value that was provided on create.

func (*CertifyVexUpsert) UpdateKnownSince

func (u *CertifyVexUpsert) UpdateKnownSince() *CertifyVexUpsert

UpdateKnownSince sets the "known_since" field to the value that was provided on create.

func (*CertifyVexUpsert) UpdateOrigin

func (u *CertifyVexUpsert) UpdateOrigin() *CertifyVexUpsert

UpdateOrigin sets the "origin" field to the value that was provided on create.

func (*CertifyVexUpsert) UpdatePackageID

func (u *CertifyVexUpsert) UpdatePackageID() *CertifyVexUpsert

UpdatePackageID sets the "package_id" field to the value that was provided on create.

func (*CertifyVexUpsert) UpdateStatement

func (u *CertifyVexUpsert) UpdateStatement() *CertifyVexUpsert

UpdateStatement sets the "statement" field to the value that was provided on create.

func (*CertifyVexUpsert) UpdateStatus

func (u *CertifyVexUpsert) UpdateStatus() *CertifyVexUpsert

UpdateStatus sets the "status" field to the value that was provided on create.

func (*CertifyVexUpsert) UpdateStatusNotes

func (u *CertifyVexUpsert) UpdateStatusNotes() *CertifyVexUpsert

UpdateStatusNotes sets the "status_notes" field to the value that was provided on create.

func (*CertifyVexUpsert) UpdateVulnerabilityID

func (u *CertifyVexUpsert) UpdateVulnerabilityID() *CertifyVexUpsert

UpdateVulnerabilityID sets the "vulnerability_id" field to the value that was provided on create.

type CertifyVexUpsertBulk

type CertifyVexUpsertBulk struct {
	// contains filtered or unexported fields
}

CertifyVexUpsertBulk is the builder for "upsert"-ing a bulk of CertifyVex nodes.

func (*CertifyVexUpsertBulk) ClearArtifactID

func (u *CertifyVexUpsertBulk) ClearArtifactID() *CertifyVexUpsertBulk

ClearArtifactID clears the value of the "artifact_id" field.

func (*CertifyVexUpsertBulk) ClearPackageID

func (u *CertifyVexUpsertBulk) ClearPackageID() *CertifyVexUpsertBulk

ClearPackageID clears the value of the "package_id" field.

func (*CertifyVexUpsertBulk) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*CertifyVexUpsertBulk) Exec

Exec executes the query.

func (*CertifyVexUpsertBulk) ExecX

func (u *CertifyVexUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*CertifyVexUpsertBulk) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.CertifyVex.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*CertifyVexUpsertBulk) SetArtifactID

func (u *CertifyVexUpsertBulk) SetArtifactID(v uuid.UUID) *CertifyVexUpsertBulk

SetArtifactID sets the "artifact_id" field.

func (*CertifyVexUpsertBulk) SetCollector

func (u *CertifyVexUpsertBulk) SetCollector(v string) *CertifyVexUpsertBulk

SetCollector sets the "collector" field.

func (*CertifyVexUpsertBulk) SetDocumentRef added in v0.6.0

func (u *CertifyVexUpsertBulk) SetDocumentRef(v string) *CertifyVexUpsertBulk

SetDocumentRef sets the "document_ref" field.

func (*CertifyVexUpsertBulk) SetJustification

func (u *CertifyVexUpsertBulk) SetJustification(v string) *CertifyVexUpsertBulk

SetJustification sets the "justification" field.

func (*CertifyVexUpsertBulk) SetKnownSince

func (u *CertifyVexUpsertBulk) SetKnownSince(v time.Time) *CertifyVexUpsertBulk

SetKnownSince sets the "known_since" field.

func (*CertifyVexUpsertBulk) SetOrigin

SetOrigin sets the "origin" field.

func (*CertifyVexUpsertBulk) SetPackageID

func (u *CertifyVexUpsertBulk) SetPackageID(v uuid.UUID) *CertifyVexUpsertBulk

SetPackageID sets the "package_id" field.

func (*CertifyVexUpsertBulk) SetStatement

func (u *CertifyVexUpsertBulk) SetStatement(v string) *CertifyVexUpsertBulk

SetStatement sets the "statement" field.

func (*CertifyVexUpsertBulk) SetStatus

SetStatus sets the "status" field.

func (*CertifyVexUpsertBulk) SetStatusNotes

func (u *CertifyVexUpsertBulk) SetStatusNotes(v string) *CertifyVexUpsertBulk

SetStatusNotes sets the "status_notes" field.

func (*CertifyVexUpsertBulk) SetVulnerabilityID

func (u *CertifyVexUpsertBulk) SetVulnerabilityID(v uuid.UUID) *CertifyVexUpsertBulk

SetVulnerabilityID sets the "vulnerability_id" field.

func (*CertifyVexUpsertBulk) Update

Update allows overriding fields `UPDATE` values. See the CertifyVexCreateBulk.OnConflict documentation for more info.

func (*CertifyVexUpsertBulk) UpdateArtifactID

func (u *CertifyVexUpsertBulk) UpdateArtifactID() *CertifyVexUpsertBulk

UpdateArtifactID sets the "artifact_id" field to the value that was provided on create.

func (*CertifyVexUpsertBulk) UpdateCollector

func (u *CertifyVexUpsertBulk) UpdateCollector() *CertifyVexUpsertBulk

UpdateCollector sets the "collector" field to the value that was provided on create.

func (*CertifyVexUpsertBulk) UpdateDocumentRef added in v0.6.0

func (u *CertifyVexUpsertBulk) UpdateDocumentRef() *CertifyVexUpsertBulk

UpdateDocumentRef sets the "document_ref" field to the value that was provided on create.

func (*CertifyVexUpsertBulk) UpdateJustification

func (u *CertifyVexUpsertBulk) UpdateJustification() *CertifyVexUpsertBulk

UpdateJustification sets the "justification" field to the value that was provided on create.

func (*CertifyVexUpsertBulk) UpdateKnownSince

func (u *CertifyVexUpsertBulk) UpdateKnownSince() *CertifyVexUpsertBulk

UpdateKnownSince sets the "known_since" field to the value that was provided on create.

func (*CertifyVexUpsertBulk) UpdateNewValues

func (u *CertifyVexUpsertBulk) UpdateNewValues() *CertifyVexUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.CertifyVex.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(certifyvex.FieldID)
		}),
	).
	Exec(ctx)

func (*CertifyVexUpsertBulk) UpdateOrigin

func (u *CertifyVexUpsertBulk) UpdateOrigin() *CertifyVexUpsertBulk

UpdateOrigin sets the "origin" field to the value that was provided on create.

func (*CertifyVexUpsertBulk) UpdatePackageID

func (u *CertifyVexUpsertBulk) UpdatePackageID() *CertifyVexUpsertBulk

UpdatePackageID sets the "package_id" field to the value that was provided on create.

func (*CertifyVexUpsertBulk) UpdateStatement

func (u *CertifyVexUpsertBulk) UpdateStatement() *CertifyVexUpsertBulk

UpdateStatement sets the "statement" field to the value that was provided on create.

func (*CertifyVexUpsertBulk) UpdateStatus

func (u *CertifyVexUpsertBulk) UpdateStatus() *CertifyVexUpsertBulk

UpdateStatus sets the "status" field to the value that was provided on create.

func (*CertifyVexUpsertBulk) UpdateStatusNotes

func (u *CertifyVexUpsertBulk) UpdateStatusNotes() *CertifyVexUpsertBulk

UpdateStatusNotes sets the "status_notes" field to the value that was provided on create.

func (*CertifyVexUpsertBulk) UpdateVulnerabilityID

func (u *CertifyVexUpsertBulk) UpdateVulnerabilityID() *CertifyVexUpsertBulk

UpdateVulnerabilityID sets the "vulnerability_id" field to the value that was provided on create.

type CertifyVexUpsertOne

type CertifyVexUpsertOne struct {
	// contains filtered or unexported fields
}

CertifyVexUpsertOne is the builder for "upsert"-ing

one CertifyVex node.

func (*CertifyVexUpsertOne) ClearArtifactID

func (u *CertifyVexUpsertOne) ClearArtifactID() *CertifyVexUpsertOne

ClearArtifactID clears the value of the "artifact_id" field.

func (*CertifyVexUpsertOne) ClearPackageID

func (u *CertifyVexUpsertOne) ClearPackageID() *CertifyVexUpsertOne

ClearPackageID clears the value of the "package_id" field.

func (*CertifyVexUpsertOne) DoNothing

func (u *CertifyVexUpsertOne) DoNothing() *CertifyVexUpsertOne

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*CertifyVexUpsertOne) Exec

Exec executes the query.

func (*CertifyVexUpsertOne) ExecX

func (u *CertifyVexUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*CertifyVexUpsertOne) ID

func (u *CertifyVexUpsertOne) ID(ctx context.Context) (id uuid.UUID, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*CertifyVexUpsertOne) IDX

IDX is like ID, but panics if an error occurs.

func (*CertifyVexUpsertOne) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.CertifyVex.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*CertifyVexUpsertOne) SetArtifactID

func (u *CertifyVexUpsertOne) SetArtifactID(v uuid.UUID) *CertifyVexUpsertOne

SetArtifactID sets the "artifact_id" field.

func (*CertifyVexUpsertOne) SetCollector

func (u *CertifyVexUpsertOne) SetCollector(v string) *CertifyVexUpsertOne

SetCollector sets the "collector" field.

func (*CertifyVexUpsertOne) SetDocumentRef added in v0.6.0

func (u *CertifyVexUpsertOne) SetDocumentRef(v string) *CertifyVexUpsertOne

SetDocumentRef sets the "document_ref" field.

func (*CertifyVexUpsertOne) SetJustification

func (u *CertifyVexUpsertOne) SetJustification(v string) *CertifyVexUpsertOne

SetJustification sets the "justification" field.

func (*CertifyVexUpsertOne) SetKnownSince

func (u *CertifyVexUpsertOne) SetKnownSince(v time.Time) *CertifyVexUpsertOne

SetKnownSince sets the "known_since" field.

func (*CertifyVexUpsertOne) SetOrigin

SetOrigin sets the "origin" field.

func (*CertifyVexUpsertOne) SetPackageID

func (u *CertifyVexUpsertOne) SetPackageID(v uuid.UUID) *CertifyVexUpsertOne

SetPackageID sets the "package_id" field.

func (*CertifyVexUpsertOne) SetStatement

func (u *CertifyVexUpsertOne) SetStatement(v string) *CertifyVexUpsertOne

SetStatement sets the "statement" field.

func (*CertifyVexUpsertOne) SetStatus

SetStatus sets the "status" field.

func (*CertifyVexUpsertOne) SetStatusNotes

func (u *CertifyVexUpsertOne) SetStatusNotes(v string) *CertifyVexUpsertOne

SetStatusNotes sets the "status_notes" field.

func (*CertifyVexUpsertOne) SetVulnerabilityID

func (u *CertifyVexUpsertOne) SetVulnerabilityID(v uuid.UUID) *CertifyVexUpsertOne

SetVulnerabilityID sets the "vulnerability_id" field.

func (*CertifyVexUpsertOne) Update

Update allows overriding fields `UPDATE` values. See the CertifyVexCreate.OnConflict documentation for more info.

func (*CertifyVexUpsertOne) UpdateArtifactID

func (u *CertifyVexUpsertOne) UpdateArtifactID() *CertifyVexUpsertOne

UpdateArtifactID sets the "artifact_id" field to the value that was provided on create.

func (*CertifyVexUpsertOne) UpdateCollector

func (u *CertifyVexUpsertOne) UpdateCollector() *CertifyVexUpsertOne

UpdateCollector sets the "collector" field to the value that was provided on create.

func (*CertifyVexUpsertOne) UpdateDocumentRef added in v0.6.0

func (u *CertifyVexUpsertOne) UpdateDocumentRef() *CertifyVexUpsertOne

UpdateDocumentRef sets the "document_ref" field to the value that was provided on create.

func (*CertifyVexUpsertOne) UpdateJustification

func (u *CertifyVexUpsertOne) UpdateJustification() *CertifyVexUpsertOne

UpdateJustification sets the "justification" field to the value that was provided on create.

func (*CertifyVexUpsertOne) UpdateKnownSince

func (u *CertifyVexUpsertOne) UpdateKnownSince() *CertifyVexUpsertOne

UpdateKnownSince sets the "known_since" field to the value that was provided on create.

func (*CertifyVexUpsertOne) UpdateNewValues

func (u *CertifyVexUpsertOne) UpdateNewValues() *CertifyVexUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:

client.CertifyVex.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(certifyvex.FieldID)
		}),
	).
	Exec(ctx)

func (*CertifyVexUpsertOne) UpdateOrigin

func (u *CertifyVexUpsertOne) UpdateOrigin() *CertifyVexUpsertOne

UpdateOrigin sets the "origin" field to the value that was provided on create.

func (*CertifyVexUpsertOne) UpdatePackageID

func (u *CertifyVexUpsertOne) UpdatePackageID() *CertifyVexUpsertOne

UpdatePackageID sets the "package_id" field to the value that was provided on create.

func (*CertifyVexUpsertOne) UpdateStatement

func (u *CertifyVexUpsertOne) UpdateStatement() *CertifyVexUpsertOne

UpdateStatement sets the "statement" field to the value that was provided on create.

func (*CertifyVexUpsertOne) UpdateStatus

func (u *CertifyVexUpsertOne) UpdateStatus() *CertifyVexUpsertOne

UpdateStatus sets the "status" field to the value that was provided on create.

func (*CertifyVexUpsertOne) UpdateStatusNotes

func (u *CertifyVexUpsertOne) UpdateStatusNotes() *CertifyVexUpsertOne

UpdateStatusNotes sets the "status_notes" field to the value that was provided on create.

func (*CertifyVexUpsertOne) UpdateVulnerabilityID

func (u *CertifyVexUpsertOne) UpdateVulnerabilityID() *CertifyVexUpsertOne

UpdateVulnerabilityID sets the "vulnerability_id" field to the value that was provided on create.

type CertifyVexes

type CertifyVexes []*CertifyVex

CertifyVexes is a parsable slice of CertifyVex.

type CertifyVuln

type CertifyVuln struct {

	// ID of the ent.
	ID uuid.UUID `json:"id,omitempty"`
	// VulnerabilityID holds the value of the "vulnerability_id" field.
	VulnerabilityID uuid.UUID `json:"vulnerability_id,omitempty"`
	// PackageID holds the value of the "package_id" field.
	PackageID uuid.UUID `json:"package_id,omitempty"`
	// TimeScanned holds the value of the "time_scanned" field.
	TimeScanned time.Time `json:"time_scanned,omitempty"`
	// DbURI holds the value of the "db_uri" field.
	DbURI string `json:"db_uri,omitempty"`
	// DbVersion holds the value of the "db_version" field.
	DbVersion string `json:"db_version,omitempty"`
	// ScannerURI holds the value of the "scanner_uri" field.
	ScannerURI string `json:"scanner_uri,omitempty"`
	// ScannerVersion holds the value of the "scanner_version" field.
	ScannerVersion string `json:"scanner_version,omitempty"`
	// Origin holds the value of the "origin" field.
	Origin string `json:"origin,omitempty"`
	// Collector holds the value of the "collector" field.
	Collector string `json:"collector,omitempty"`
	// DocumentRef holds the value of the "document_ref" field.
	DocumentRef string `json:"document_ref,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the CertifyVulnQuery when eager-loading is set.
	Edges CertifyVulnEdges `json:"edges"`
	// contains filtered or unexported fields
}

CertifyVuln is the model entity for the CertifyVuln schema.

func (*CertifyVuln) IsNode

func (n *CertifyVuln) IsNode()

IsNode implements the Node interface check for GQLGen.

func (*CertifyVuln) Package

func (cv *CertifyVuln) Package(ctx context.Context) (*PackageVersion, error)

func (*CertifyVuln) QueryPackage

func (cv *CertifyVuln) QueryPackage() *PackageVersionQuery

QueryPackage queries the "package" edge of the CertifyVuln entity.

func (*CertifyVuln) QueryVulnerability

func (cv *CertifyVuln) QueryVulnerability() *VulnerabilityIDQuery

QueryVulnerability queries the "vulnerability" edge of the CertifyVuln entity.

func (*CertifyVuln) String

func (cv *CertifyVuln) String() string

String implements the fmt.Stringer.

func (*CertifyVuln) ToEdge

func (cv *CertifyVuln) ToEdge(order *CertifyVulnOrder) *CertifyVulnEdge

ToEdge converts CertifyVuln into CertifyVulnEdge.

func (*CertifyVuln) Unwrap

func (cv *CertifyVuln) Unwrap() *CertifyVuln

Unwrap unwraps the CertifyVuln entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.

func (*CertifyVuln) Update

func (cv *CertifyVuln) Update() *CertifyVulnUpdateOne

Update returns a builder for updating this CertifyVuln. Note that you need to call CertifyVuln.Unwrap() before calling this method if this CertifyVuln was returned from a transaction, and the transaction was committed or rolled back.

func (*CertifyVuln) Value

func (cv *CertifyVuln) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the CertifyVuln. This includes values selected through modifiers, order, etc.

func (*CertifyVuln) Vulnerability

func (cv *CertifyVuln) Vulnerability(ctx context.Context) (*VulnerabilityID, error)

type CertifyVulnClient

type CertifyVulnClient struct {
	// contains filtered or unexported fields
}

CertifyVulnClient is a client for the CertifyVuln schema.

func NewCertifyVulnClient

func NewCertifyVulnClient(c config) *CertifyVulnClient

NewCertifyVulnClient returns a client for the CertifyVuln from the given config.

func (*CertifyVulnClient) Create

func (c *CertifyVulnClient) Create() *CertifyVulnCreate

Create returns a builder for creating a CertifyVuln entity.

func (*CertifyVulnClient) CreateBulk

func (c *CertifyVulnClient) CreateBulk(builders ...*CertifyVulnCreate) *CertifyVulnCreateBulk

CreateBulk returns a builder for creating a bulk of CertifyVuln entities.

func (*CertifyVulnClient) Delete

func (c *CertifyVulnClient) Delete() *CertifyVulnDelete

Delete returns a delete builder for CertifyVuln.

func (*CertifyVulnClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*CertifyVulnClient) DeleteOneID

func (c *CertifyVulnClient) DeleteOneID(id uuid.UUID) *CertifyVulnDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*CertifyVulnClient) Get

Get returns a CertifyVuln entity by its id.

func (*CertifyVulnClient) GetX

GetX is like Get, but panics if an error occurs.

func (*CertifyVulnClient) Hooks

func (c *CertifyVulnClient) Hooks() []Hook

Hooks returns the client hooks.

func (*CertifyVulnClient) Intercept

func (c *CertifyVulnClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `certifyvuln.Intercept(f(g(h())))`.

func (*CertifyVulnClient) Interceptors

func (c *CertifyVulnClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*CertifyVulnClient) MapCreateBulk

func (c *CertifyVulnClient) MapCreateBulk(slice any, setFunc func(*CertifyVulnCreate, int)) *CertifyVulnCreateBulk

MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.

func (*CertifyVulnClient) Query

func (c *CertifyVulnClient) Query() *CertifyVulnQuery

Query returns a query builder for CertifyVuln.

func (*CertifyVulnClient) QueryPackage

func (c *CertifyVulnClient) QueryPackage(cv *CertifyVuln) *PackageVersionQuery

QueryPackage queries the package edge of a CertifyVuln.

func (*CertifyVulnClient) QueryVulnerability

func (c *CertifyVulnClient) QueryVulnerability(cv *CertifyVuln) *VulnerabilityIDQuery

QueryVulnerability queries the vulnerability edge of a CertifyVuln.

func (*CertifyVulnClient) Update

func (c *CertifyVulnClient) Update() *CertifyVulnUpdate

Update returns an update builder for CertifyVuln.

func (*CertifyVulnClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*CertifyVulnClient) UpdateOneID

func (c *CertifyVulnClient) UpdateOneID(id uuid.UUID) *CertifyVulnUpdateOne

UpdateOneID returns an update builder for the given id.

func (*CertifyVulnClient) Use

func (c *CertifyVulnClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `certifyvuln.Hooks(f(g(h())))`.

type CertifyVulnConnection

type CertifyVulnConnection struct {
	Edges      []*CertifyVulnEdge `json:"edges"`
	PageInfo   PageInfo           `json:"pageInfo"`
	TotalCount int                `json:"totalCount"`
}

CertifyVulnConnection is the connection containing edges to CertifyVuln.

type CertifyVulnCreate

type CertifyVulnCreate struct {
	// contains filtered or unexported fields
}

CertifyVulnCreate is the builder for creating a CertifyVuln entity.

func (*CertifyVulnCreate) Exec

func (cvc *CertifyVulnCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*CertifyVulnCreate) ExecX

func (cvc *CertifyVulnCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*CertifyVulnCreate) Mutation

func (cvc *CertifyVulnCreate) Mutation() *CertifyVulnMutation

Mutation returns the CertifyVulnMutation object of the builder.

func (*CertifyVulnCreate) OnConflict

func (cvc *CertifyVulnCreate) OnConflict(opts ...sql.ConflictOption) *CertifyVulnUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.CertifyVuln.Create().
	SetVulnerabilityID(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.CertifyVulnUpsert) {
		SetVulnerabilityID(v+v).
	}).
	Exec(ctx)

func (*CertifyVulnCreate) OnConflictColumns

func (cvc *CertifyVulnCreate) OnConflictColumns(columns ...string) *CertifyVulnUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.CertifyVuln.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*CertifyVulnCreate) Save

func (cvc *CertifyVulnCreate) Save(ctx context.Context) (*CertifyVuln, error)

Save creates the CertifyVuln in the database.

func (*CertifyVulnCreate) SaveX

func (cvc *CertifyVulnCreate) SaveX(ctx context.Context) *CertifyVuln

SaveX calls Save and panics if Save returns an error.

func (*CertifyVulnCreate) SetCollector

func (cvc *CertifyVulnCreate) SetCollector(s string) *CertifyVulnCreate

SetCollector sets the "collector" field.

func (*CertifyVulnCreate) SetDbURI

func (cvc *CertifyVulnCreate) SetDbURI(s string) *CertifyVulnCreate

SetDbURI sets the "db_uri" field.

func (*CertifyVulnCreate) SetDbVersion

func (cvc *CertifyVulnCreate) SetDbVersion(s string) *CertifyVulnCreate

SetDbVersion sets the "db_version" field.

func (*CertifyVulnCreate) SetDocumentRef added in v0.6.0

func (cvc *CertifyVulnCreate) SetDocumentRef(s string) *CertifyVulnCreate

SetDocumentRef sets the "document_ref" field.

func (*CertifyVulnCreate) SetID added in v0.5.0

SetID sets the "id" field.

func (*CertifyVulnCreate) SetNillableID added in v0.5.0

func (cvc *CertifyVulnCreate) SetNillableID(u *uuid.UUID) *CertifyVulnCreate

SetNillableID sets the "id" field if the given value is not nil.

func (*CertifyVulnCreate) SetOrigin

func (cvc *CertifyVulnCreate) SetOrigin(s string) *CertifyVulnCreate

SetOrigin sets the "origin" field.

func (*CertifyVulnCreate) SetPackage

func (cvc *CertifyVulnCreate) SetPackage(p *PackageVersion) *CertifyVulnCreate

SetPackage sets the "package" edge to the PackageVersion entity.

func (*CertifyVulnCreate) SetPackageID

func (cvc *CertifyVulnCreate) SetPackageID(u uuid.UUID) *CertifyVulnCreate

SetPackageID sets the "package_id" field.

func (*CertifyVulnCreate) SetScannerURI

func (cvc *CertifyVulnCreate) SetScannerURI(s string) *CertifyVulnCreate

SetScannerURI sets the "scanner_uri" field.

func (*CertifyVulnCreate) SetScannerVersion

func (cvc *CertifyVulnCreate) SetScannerVersion(s string) *CertifyVulnCreate

SetScannerVersion sets the "scanner_version" field.

func (*CertifyVulnCreate) SetTimeScanned

func (cvc *CertifyVulnCreate) SetTimeScanned(t time.Time) *CertifyVulnCreate

SetTimeScanned sets the "time_scanned" field.

func (*CertifyVulnCreate) SetVulnerability

func (cvc *CertifyVulnCreate) SetVulnerability(v *VulnerabilityID) *CertifyVulnCreate

SetVulnerability sets the "vulnerability" edge to the VulnerabilityID entity.

func (*CertifyVulnCreate) SetVulnerabilityID

func (cvc *CertifyVulnCreate) SetVulnerabilityID(u uuid.UUID) *CertifyVulnCreate

SetVulnerabilityID sets the "vulnerability_id" field.

type CertifyVulnCreateBulk

type CertifyVulnCreateBulk struct {
	// contains filtered or unexported fields
}

CertifyVulnCreateBulk is the builder for creating many CertifyVuln entities in bulk.

func (*CertifyVulnCreateBulk) Exec

func (cvcb *CertifyVulnCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*CertifyVulnCreateBulk) ExecX

func (cvcb *CertifyVulnCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*CertifyVulnCreateBulk) OnConflict

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.CertifyVuln.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.CertifyVulnUpsert) {
		SetVulnerabilityID(v+v).
	}).
	Exec(ctx)

func (*CertifyVulnCreateBulk) OnConflictColumns

func (cvcb *CertifyVulnCreateBulk) OnConflictColumns(columns ...string) *CertifyVulnUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.CertifyVuln.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*CertifyVulnCreateBulk) Save

func (cvcb *CertifyVulnCreateBulk) Save(ctx context.Context) ([]*CertifyVuln, error)

Save creates the CertifyVuln entities in the database.

func (*CertifyVulnCreateBulk) SaveX

func (cvcb *CertifyVulnCreateBulk) SaveX(ctx context.Context) []*CertifyVuln

SaveX is like Save, but panics if an error occurs.

type CertifyVulnDelete

type CertifyVulnDelete struct {
	// contains filtered or unexported fields
}

CertifyVulnDelete is the builder for deleting a CertifyVuln entity.

func (*CertifyVulnDelete) Exec

func (cvd *CertifyVulnDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*CertifyVulnDelete) ExecX

func (cvd *CertifyVulnDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*CertifyVulnDelete) Where

Where appends a list predicates to the CertifyVulnDelete builder.

type CertifyVulnDeleteOne

type CertifyVulnDeleteOne struct {
	// contains filtered or unexported fields
}

CertifyVulnDeleteOne is the builder for deleting a single CertifyVuln entity.

func (*CertifyVulnDeleteOne) Exec

func (cvdo *CertifyVulnDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*CertifyVulnDeleteOne) ExecX

func (cvdo *CertifyVulnDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*CertifyVulnDeleteOne) Where

Where appends a list predicates to the CertifyVulnDelete builder.

type CertifyVulnEdge

type CertifyVulnEdge struct {
	Node   *CertifyVuln `json:"node"`
	Cursor Cursor       `json:"cursor"`
}

CertifyVulnEdge is the edge representation of CertifyVuln.

type CertifyVulnEdges

type CertifyVulnEdges struct {
	// Vulnerability holds the value of the vulnerability edge.
	Vulnerability *VulnerabilityID `json:"vulnerability,omitempty"`
	// Package holds the value of the package edge.
	Package *PackageVersion `json:"package,omitempty"`
	// contains filtered or unexported fields
}

CertifyVulnEdges holds the relations/edges for other nodes in the graph.

func (CertifyVulnEdges) PackageOrErr

func (e CertifyVulnEdges) PackageOrErr() (*PackageVersion, error)

PackageOrErr returns the Package value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (CertifyVulnEdges) VulnerabilityOrErr

func (e CertifyVulnEdges) VulnerabilityOrErr() (*VulnerabilityID, error)

VulnerabilityOrErr returns the Vulnerability value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type CertifyVulnGroupBy

type CertifyVulnGroupBy struct {
	// contains filtered or unexported fields
}

CertifyVulnGroupBy is the group-by builder for CertifyVuln entities.

func (*CertifyVulnGroupBy) Aggregate

func (cvgb *CertifyVulnGroupBy) Aggregate(fns ...AggregateFunc) *CertifyVulnGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*CertifyVulnGroupBy) Bool

func (s *CertifyVulnGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*CertifyVulnGroupBy) BoolX

func (s *CertifyVulnGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*CertifyVulnGroupBy) Bools

func (s *CertifyVulnGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*CertifyVulnGroupBy) BoolsX

func (s *CertifyVulnGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*CertifyVulnGroupBy) Float64

func (s *CertifyVulnGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*CertifyVulnGroupBy) Float64X

func (s *CertifyVulnGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*CertifyVulnGroupBy) Float64s

func (s *CertifyVulnGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*CertifyVulnGroupBy) Float64sX

func (s *CertifyVulnGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*CertifyVulnGroupBy) Int

func (s *CertifyVulnGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*CertifyVulnGroupBy) IntX

func (s *CertifyVulnGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*CertifyVulnGroupBy) Ints

func (s *CertifyVulnGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*CertifyVulnGroupBy) IntsX

func (s *CertifyVulnGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*CertifyVulnGroupBy) Scan

func (cvgb *CertifyVulnGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*CertifyVulnGroupBy) ScanX

func (s *CertifyVulnGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*CertifyVulnGroupBy) String

func (s *CertifyVulnGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*CertifyVulnGroupBy) StringX

func (s *CertifyVulnGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*CertifyVulnGroupBy) Strings

func (s *CertifyVulnGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*CertifyVulnGroupBy) StringsX

func (s *CertifyVulnGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type CertifyVulnMutation

type CertifyVulnMutation struct {
	// contains filtered or unexported fields
}

CertifyVulnMutation represents an operation that mutates the CertifyVuln nodes in the graph.

func (*CertifyVulnMutation) AddField

func (m *CertifyVulnMutation) AddField(name string, value ent.Value) error

AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*CertifyVulnMutation) AddedEdges

func (m *CertifyVulnMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*CertifyVulnMutation) AddedField

func (m *CertifyVulnMutation) AddedField(name string) (ent.Value, bool)

AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*CertifyVulnMutation) AddedFields

func (m *CertifyVulnMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*CertifyVulnMutation) AddedIDs

func (m *CertifyVulnMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*CertifyVulnMutation) ClearEdge

func (m *CertifyVulnMutation) ClearEdge(name string) error

ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.

func (*CertifyVulnMutation) ClearField

func (m *CertifyVulnMutation) ClearField(name string) error

ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.

func (*CertifyVulnMutation) ClearPackage

func (m *CertifyVulnMutation) ClearPackage()

ClearPackage clears the "package" edge to the PackageVersion entity.

func (*CertifyVulnMutation) ClearVulnerability

func (m *CertifyVulnMutation) ClearVulnerability()

ClearVulnerability clears the "vulnerability" edge to the VulnerabilityID entity.

func (*CertifyVulnMutation) ClearedEdges

func (m *CertifyVulnMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*CertifyVulnMutation) ClearedFields

func (m *CertifyVulnMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (CertifyVulnMutation) Client

func (m CertifyVulnMutation) Client() *Client

Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.

func (*CertifyVulnMutation) Collector

func (m *CertifyVulnMutation) Collector() (r string, exists bool)

Collector returns the value of the "collector" field in the mutation.

func (*CertifyVulnMutation) DbURI

func (m *CertifyVulnMutation) DbURI() (r string, exists bool)

DbURI returns the value of the "db_uri" field in the mutation.

func (*CertifyVulnMutation) DbVersion

func (m *CertifyVulnMutation) DbVersion() (r string, exists bool)

DbVersion returns the value of the "db_version" field in the mutation.

func (*CertifyVulnMutation) DocumentRef added in v0.6.0

func (m *CertifyVulnMutation) DocumentRef() (r string, exists bool)

DocumentRef returns the value of the "document_ref" field in the mutation.

func (*CertifyVulnMutation) EdgeCleared

func (m *CertifyVulnMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*CertifyVulnMutation) Field

func (m *CertifyVulnMutation) Field(name string) (ent.Value, bool)

Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*CertifyVulnMutation) FieldCleared

func (m *CertifyVulnMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*CertifyVulnMutation) Fields

func (m *CertifyVulnMutation) Fields() []string

Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().

func (*CertifyVulnMutation) ID

func (m *CertifyVulnMutation) ID() (id uuid.UUID, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*CertifyVulnMutation) IDs

func (m *CertifyVulnMutation) IDs(ctx context.Context) ([]uuid.UUID, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*CertifyVulnMutation) OldCollector

func (m *CertifyVulnMutation) OldCollector(ctx context.Context) (v string, err error)

OldCollector returns the old "collector" field's value of the CertifyVuln entity. If the CertifyVuln object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*CertifyVulnMutation) OldDbURI

func (m *CertifyVulnMutation) OldDbURI(ctx context.Context) (v string, err error)

OldDbURI returns the old "db_uri" field's value of the CertifyVuln entity. If the CertifyVuln object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*CertifyVulnMutation) OldDbVersion

func (m *CertifyVulnMutation) OldDbVersion(ctx context.Context) (v string, err error)

OldDbVersion returns the old "db_version" field's value of the CertifyVuln entity. If the CertifyVuln object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*CertifyVulnMutation) OldDocumentRef added in v0.6.0

func (m *CertifyVulnMutation) OldDocumentRef(ctx context.Context) (v string, err error)

OldDocumentRef returns the old "document_ref" field's value of the CertifyVuln entity. If the CertifyVuln object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*CertifyVulnMutation) OldField

func (m *CertifyVulnMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*CertifyVulnMutation) OldOrigin

func (m *CertifyVulnMutation) OldOrigin(ctx context.Context) (v string, err error)

OldOrigin returns the old "origin" field's value of the CertifyVuln entity. If the CertifyVuln object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*CertifyVulnMutation) OldPackageID

func (m *CertifyVulnMutation) OldPackageID(ctx context.Context) (v uuid.UUID, err error)

OldPackageID returns the old "package_id" field's value of the CertifyVuln entity. If the CertifyVuln object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*CertifyVulnMutation) OldScannerURI

func (m *CertifyVulnMutation) OldScannerURI(ctx context.Context) (v string, err error)

OldScannerURI returns the old "scanner_uri" field's value of the CertifyVuln entity. If the CertifyVuln object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*CertifyVulnMutation) OldScannerVersion

func (m *CertifyVulnMutation) OldScannerVersion(ctx context.Context) (v string, err error)

OldScannerVersion returns the old "scanner_version" field's value of the CertifyVuln entity. If the CertifyVuln object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*CertifyVulnMutation) OldTimeScanned

func (m *CertifyVulnMutation) OldTimeScanned(ctx context.Context) (v time.Time, err error)

OldTimeScanned returns the old "time_scanned" field's value of the CertifyVuln entity. If the CertifyVuln object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*CertifyVulnMutation) OldVulnerabilityID

func (m *CertifyVulnMutation) OldVulnerabilityID(ctx context.Context) (v uuid.UUID, err error)

OldVulnerabilityID returns the old "vulnerability_id" field's value of the CertifyVuln entity. If the CertifyVuln object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*CertifyVulnMutation) Op

func (m *CertifyVulnMutation) Op() Op

Op returns the operation name.

func (*CertifyVulnMutation) Origin

func (m *CertifyVulnMutation) Origin() (r string, exists bool)

Origin returns the value of the "origin" field in the mutation.

func (*CertifyVulnMutation) PackageCleared

func (m *CertifyVulnMutation) PackageCleared() bool

PackageCleared reports if the "package" edge to the PackageVersion entity was cleared.

func (*CertifyVulnMutation) PackageID

func (m *CertifyVulnMutation) PackageID() (r uuid.UUID, exists bool)

PackageID returns the value of the "package_id" field in the mutation.

func (*CertifyVulnMutation) PackageIDs

func (m *CertifyVulnMutation) PackageIDs() (ids []uuid.UUID)

PackageIDs returns the "package" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use PackageID instead. It exists only for internal usage by the builders.

func (*CertifyVulnMutation) RemovedEdges

func (m *CertifyVulnMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*CertifyVulnMutation) RemovedIDs

func (m *CertifyVulnMutation) RemovedIDs(name string) []ent.Value

RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.

func (*CertifyVulnMutation) ResetCollector

func (m *CertifyVulnMutation) ResetCollector()

ResetCollector resets all changes to the "collector" field.

func (*CertifyVulnMutation) ResetDbURI

func (m *CertifyVulnMutation) ResetDbURI()

ResetDbURI resets all changes to the "db_uri" field.

func (*CertifyVulnMutation) ResetDbVersion

func (m *CertifyVulnMutation) ResetDbVersion()

ResetDbVersion resets all changes to the "db_version" field.

func (*CertifyVulnMutation) ResetDocumentRef added in v0.6.0

func (m *CertifyVulnMutation) ResetDocumentRef()

ResetDocumentRef resets all changes to the "document_ref" field.

func (*CertifyVulnMutation) ResetEdge

func (m *CertifyVulnMutation) ResetEdge(name string) error

ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.

func (*CertifyVulnMutation) ResetField

func (m *CertifyVulnMutation) ResetField(name string) error

ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.

func (*CertifyVulnMutation) ResetOrigin

func (m *CertifyVulnMutation) ResetOrigin()

ResetOrigin resets all changes to the "origin" field.

func (*CertifyVulnMutation) ResetPackage

func (m *CertifyVulnMutation) ResetPackage()

ResetPackage resets all changes to the "package" edge.

func (*CertifyVulnMutation) ResetPackageID

func (m *CertifyVulnMutation) ResetPackageID()

ResetPackageID resets all changes to the "package_id" field.

func (*CertifyVulnMutation) ResetScannerURI

func (m *CertifyVulnMutation) ResetScannerURI()

ResetScannerURI resets all changes to the "scanner_uri" field.

func (*CertifyVulnMutation) ResetScannerVersion

func (m *CertifyVulnMutation) ResetScannerVersion()

ResetScannerVersion resets all changes to the "scanner_version" field.

func (*CertifyVulnMutation) ResetTimeScanned

func (m *CertifyVulnMutation) ResetTimeScanned()

ResetTimeScanned resets all changes to the "time_scanned" field.

func (*CertifyVulnMutation) ResetVulnerability

func (m *CertifyVulnMutation) ResetVulnerability()

ResetVulnerability resets all changes to the "vulnerability" edge.

func (*CertifyVulnMutation) ResetVulnerabilityID

func (m *CertifyVulnMutation) ResetVulnerabilityID()

ResetVulnerabilityID resets all changes to the "vulnerability_id" field.

func (*CertifyVulnMutation) ScannerURI

func (m *CertifyVulnMutation) ScannerURI() (r string, exists bool)

ScannerURI returns the value of the "scanner_uri" field in the mutation.

func (*CertifyVulnMutation) ScannerVersion

func (m *CertifyVulnMutation) ScannerVersion() (r string, exists bool)

ScannerVersion returns the value of the "scanner_version" field in the mutation.

func (*CertifyVulnMutation) SetCollector

func (m *CertifyVulnMutation) SetCollector(s string)

SetCollector sets the "collector" field.

func (*CertifyVulnMutation) SetDbURI

func (m *CertifyVulnMutation) SetDbURI(s string)

SetDbURI sets the "db_uri" field.

func (*CertifyVulnMutation) SetDbVersion

func (m *CertifyVulnMutation) SetDbVersion(s string)

SetDbVersion sets the "db_version" field.

func (*CertifyVulnMutation) SetDocumentRef added in v0.6.0

func (m *CertifyVulnMutation) SetDocumentRef(s string)

SetDocumentRef sets the "document_ref" field.

func (*CertifyVulnMutation) SetField

func (m *CertifyVulnMutation) SetField(name string, value ent.Value) error

SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*CertifyVulnMutation) SetID added in v0.5.0

func (m *CertifyVulnMutation) SetID(id uuid.UUID)

SetID sets the value of the id field. Note that this operation is only accepted on creation of CertifyVuln entities.

func (*CertifyVulnMutation) SetOp

func (m *CertifyVulnMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*CertifyVulnMutation) SetOrigin

func (m *CertifyVulnMutation) SetOrigin(s string)

SetOrigin sets the "origin" field.

func (*CertifyVulnMutation) SetPackageID

func (m *CertifyVulnMutation) SetPackageID(u uuid.UUID)

SetPackageID sets the "package_id" field.

func (*CertifyVulnMutation) SetScannerURI

func (m *CertifyVulnMutation) SetScannerURI(s string)

SetScannerURI sets the "scanner_uri" field.

func (*CertifyVulnMutation) SetScannerVersion

func (m *CertifyVulnMutation) SetScannerVersion(s string)

SetScannerVersion sets the "scanner_version" field.

func (*CertifyVulnMutation) SetTimeScanned

func (m *CertifyVulnMutation) SetTimeScanned(t time.Time)

SetTimeScanned sets the "time_scanned" field.

func (*CertifyVulnMutation) SetVulnerabilityID

func (m *CertifyVulnMutation) SetVulnerabilityID(u uuid.UUID)

SetVulnerabilityID sets the "vulnerability_id" field.

func (*CertifyVulnMutation) TimeScanned

func (m *CertifyVulnMutation) TimeScanned() (r time.Time, exists bool)

TimeScanned returns the value of the "time_scanned" field in the mutation.

func (CertifyVulnMutation) Tx

func (m CertifyVulnMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*CertifyVulnMutation) Type

func (m *CertifyVulnMutation) Type() string

Type returns the node type of this mutation (CertifyVuln).

func (*CertifyVulnMutation) VulnerabilityCleared

func (m *CertifyVulnMutation) VulnerabilityCleared() bool

VulnerabilityCleared reports if the "vulnerability" edge to the VulnerabilityID entity was cleared.

func (*CertifyVulnMutation) VulnerabilityID

func (m *CertifyVulnMutation) VulnerabilityID() (r uuid.UUID, exists bool)

VulnerabilityID returns the value of the "vulnerability_id" field in the mutation.

func (*CertifyVulnMutation) VulnerabilityIDs

func (m *CertifyVulnMutation) VulnerabilityIDs() (ids []uuid.UUID)

VulnerabilityIDs returns the "vulnerability" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use VulnerabilityID instead. It exists only for internal usage by the builders.

func (*CertifyVulnMutation) Where

func (m *CertifyVulnMutation) Where(ps ...predicate.CertifyVuln)

Where appends a list predicates to the CertifyVulnMutation builder.

func (*CertifyVulnMutation) WhereP

func (m *CertifyVulnMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the CertifyVulnMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type CertifyVulnOrder

type CertifyVulnOrder struct {
	Direction OrderDirection         `json:"direction"`
	Field     *CertifyVulnOrderField `json:"field"`
}

CertifyVulnOrder defines the ordering of CertifyVuln.

type CertifyVulnOrderField

type CertifyVulnOrderField struct {
	// Value extracts the ordering value from the given CertifyVuln.
	Value func(*CertifyVuln) (ent.Value, error)
	// contains filtered or unexported fields
}

CertifyVulnOrderField defines the ordering field of CertifyVuln.

type CertifyVulnPaginateOption

type CertifyVulnPaginateOption func(*certifyvulnPager) error

CertifyVulnPaginateOption enables pagination customization.

func WithCertifyVulnFilter

func WithCertifyVulnFilter(filter func(*CertifyVulnQuery) (*CertifyVulnQuery, error)) CertifyVulnPaginateOption

WithCertifyVulnFilter configures pagination filter.

func WithCertifyVulnOrder

func WithCertifyVulnOrder(order *CertifyVulnOrder) CertifyVulnPaginateOption

WithCertifyVulnOrder configures pagination ordering.

type CertifyVulnQuery

type CertifyVulnQuery struct {
	// contains filtered or unexported fields
}

CertifyVulnQuery is the builder for querying CertifyVuln entities.

func (*CertifyVulnQuery) Aggregate

func (cvq *CertifyVulnQuery) Aggregate(fns ...AggregateFunc) *CertifyVulnSelect

Aggregate returns a CertifyVulnSelect configured with the given aggregations.

func (*CertifyVulnQuery) All

func (cvq *CertifyVulnQuery) All(ctx context.Context) ([]*CertifyVuln, error)

All executes the query and returns a list of CertifyVulns.

func (*CertifyVulnQuery) AllX

func (cvq *CertifyVulnQuery) AllX(ctx context.Context) []*CertifyVuln

AllX is like All, but panics if an error occurs.

func (*CertifyVulnQuery) Clone

func (cvq *CertifyVulnQuery) Clone() *CertifyVulnQuery

Clone returns a duplicate of the CertifyVulnQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*CertifyVulnQuery) CollectFields

func (cv *CertifyVulnQuery) CollectFields(ctx context.Context, satisfies ...string) (*CertifyVulnQuery, error)

CollectFields tells the query-builder to eagerly load connected nodes by resolver context.

func (*CertifyVulnQuery) Count

func (cvq *CertifyVulnQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*CertifyVulnQuery) CountX

func (cvq *CertifyVulnQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*CertifyVulnQuery) Exist

func (cvq *CertifyVulnQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*CertifyVulnQuery) ExistX

func (cvq *CertifyVulnQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*CertifyVulnQuery) First

func (cvq *CertifyVulnQuery) First(ctx context.Context) (*CertifyVuln, error)

First returns the first CertifyVuln entity from the query. Returns a *NotFoundError when no CertifyVuln was found.

func (*CertifyVulnQuery) FirstID

func (cvq *CertifyVulnQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)

FirstID returns the first CertifyVuln ID from the query. Returns a *NotFoundError when no CertifyVuln ID was found.

func (*CertifyVulnQuery) FirstIDX

func (cvq *CertifyVulnQuery) FirstIDX(ctx context.Context) uuid.UUID

FirstIDX is like FirstID, but panics if an error occurs.

func (*CertifyVulnQuery) FirstX

func (cvq *CertifyVulnQuery) FirstX(ctx context.Context) *CertifyVuln

FirstX is like First, but panics if an error occurs.

func (*CertifyVulnQuery) GroupBy

func (cvq *CertifyVulnQuery) GroupBy(field string, fields ...string) *CertifyVulnGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	VulnerabilityID uuid.UUID `json:"vulnerability_id,omitempty"`
	Count int `json:"count,omitempty"`
}

client.CertifyVuln.Query().
	GroupBy(certifyvuln.FieldVulnerabilityID).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*CertifyVulnQuery) IDs

func (cvq *CertifyVulnQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)

IDs executes the query and returns a list of CertifyVuln IDs.

func (*CertifyVulnQuery) IDsX

func (cvq *CertifyVulnQuery) IDsX(ctx context.Context) []uuid.UUID

IDsX is like IDs, but panics if an error occurs.

func (*CertifyVulnQuery) Limit

func (cvq *CertifyVulnQuery) Limit(limit int) *CertifyVulnQuery

Limit the number of records to be returned by this query.

func (*CertifyVulnQuery) Offset

func (cvq *CertifyVulnQuery) Offset(offset int) *CertifyVulnQuery

Offset to start from.

func (*CertifyVulnQuery) Only

func (cvq *CertifyVulnQuery) Only(ctx context.Context) (*CertifyVuln, error)

Only returns a single CertifyVuln entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one CertifyVuln entity is found. Returns a *NotFoundError when no CertifyVuln entities are found.

func (*CertifyVulnQuery) OnlyID

func (cvq *CertifyVulnQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)

OnlyID is like Only, but returns the only CertifyVuln ID in the query. Returns a *NotSingularError when more than one CertifyVuln ID is found. Returns a *NotFoundError when no entities are found.

func (*CertifyVulnQuery) OnlyIDX

func (cvq *CertifyVulnQuery) OnlyIDX(ctx context.Context) uuid.UUID

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*CertifyVulnQuery) OnlyX

func (cvq *CertifyVulnQuery) OnlyX(ctx context.Context) *CertifyVuln

OnlyX is like Only, but panics if an error occurs.

func (*CertifyVulnQuery) Order

Order specifies how the records should be ordered.

func (*CertifyVulnQuery) Paginate

func (cv *CertifyVulnQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...CertifyVulnPaginateOption,
) (*CertifyVulnConnection, error)

Paginate executes the query and returns a relay based cursor connection to CertifyVuln.

func (*CertifyVulnQuery) QueryPackage

func (cvq *CertifyVulnQuery) QueryPackage() *PackageVersionQuery

QueryPackage chains the current query on the "package" edge.

func (*CertifyVulnQuery) QueryVulnerability

func (cvq *CertifyVulnQuery) QueryVulnerability() *VulnerabilityIDQuery

QueryVulnerability chains the current query on the "vulnerability" edge.

func (*CertifyVulnQuery) Select

func (cvq *CertifyVulnQuery) Select(fields ...string) *CertifyVulnSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	VulnerabilityID uuid.UUID `json:"vulnerability_id,omitempty"`
}

client.CertifyVuln.Query().
	Select(certifyvuln.FieldVulnerabilityID).
	Scan(ctx, &v)

func (*CertifyVulnQuery) Unique

func (cvq *CertifyVulnQuery) Unique(unique bool) *CertifyVulnQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*CertifyVulnQuery) Where

Where adds a new predicate for the CertifyVulnQuery builder.

func (*CertifyVulnQuery) WithPackage

func (cvq *CertifyVulnQuery) WithPackage(opts ...func(*PackageVersionQuery)) *CertifyVulnQuery

WithPackage tells the query-builder to eager-load the nodes that are connected to the "package" edge. The optional arguments are used to configure the query builder of the edge.

func (*CertifyVulnQuery) WithVulnerability

func (cvq *CertifyVulnQuery) WithVulnerability(opts ...func(*VulnerabilityIDQuery)) *CertifyVulnQuery

WithVulnerability tells the query-builder to eager-load the nodes that are connected to the "vulnerability" edge. The optional arguments are used to configure the query builder of the edge.

type CertifyVulnSelect

type CertifyVulnSelect struct {
	*CertifyVulnQuery
	// contains filtered or unexported fields
}

CertifyVulnSelect is the builder for selecting fields of CertifyVuln entities.

func (*CertifyVulnSelect) Aggregate

func (cvs *CertifyVulnSelect) Aggregate(fns ...AggregateFunc) *CertifyVulnSelect

Aggregate adds the given aggregation functions to the selector query.

func (*CertifyVulnSelect) Bool

func (s *CertifyVulnSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*CertifyVulnSelect) BoolX

func (s *CertifyVulnSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*CertifyVulnSelect) Bools

func (s *CertifyVulnSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*CertifyVulnSelect) BoolsX

func (s *CertifyVulnSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*CertifyVulnSelect) Float64

func (s *CertifyVulnSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*CertifyVulnSelect) Float64X

func (s *CertifyVulnSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*CertifyVulnSelect) Float64s

func (s *CertifyVulnSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*CertifyVulnSelect) Float64sX

func (s *CertifyVulnSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*CertifyVulnSelect) Int

func (s *CertifyVulnSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*CertifyVulnSelect) IntX

func (s *CertifyVulnSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*CertifyVulnSelect) Ints

func (s *CertifyVulnSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*CertifyVulnSelect) IntsX

func (s *CertifyVulnSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*CertifyVulnSelect) Scan

func (cvs *CertifyVulnSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*CertifyVulnSelect) ScanX

func (s *CertifyVulnSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*CertifyVulnSelect) String

func (s *CertifyVulnSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*CertifyVulnSelect) StringX

func (s *CertifyVulnSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*CertifyVulnSelect) Strings

func (s *CertifyVulnSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*CertifyVulnSelect) StringsX

func (s *CertifyVulnSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type CertifyVulnUpdate

type CertifyVulnUpdate struct {
	// contains filtered or unexported fields
}

CertifyVulnUpdate is the builder for updating CertifyVuln entities.

func (*CertifyVulnUpdate) ClearPackage

func (cvu *CertifyVulnUpdate) ClearPackage() *CertifyVulnUpdate

ClearPackage clears the "package" edge to the PackageVersion entity.

func (*CertifyVulnUpdate) ClearVulnerability

func (cvu *CertifyVulnUpdate) ClearVulnerability() *CertifyVulnUpdate

ClearVulnerability clears the "vulnerability" edge to the VulnerabilityID entity.

func (*CertifyVulnUpdate) Exec

func (cvu *CertifyVulnUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*CertifyVulnUpdate) ExecX

func (cvu *CertifyVulnUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*CertifyVulnUpdate) Mutation

func (cvu *CertifyVulnUpdate) Mutation() *CertifyVulnMutation

Mutation returns the CertifyVulnMutation object of the builder.

func (*CertifyVulnUpdate) Save

func (cvu *CertifyVulnUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*CertifyVulnUpdate) SaveX

func (cvu *CertifyVulnUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*CertifyVulnUpdate) SetCollector

func (cvu *CertifyVulnUpdate) SetCollector(s string) *CertifyVulnUpdate

SetCollector sets the "collector" field.

func (*CertifyVulnUpdate) SetDbURI

func (cvu *CertifyVulnUpdate) SetDbURI(s string) *CertifyVulnUpdate

SetDbURI sets the "db_uri" field.

func (*CertifyVulnUpdate) SetDbVersion

func (cvu *CertifyVulnUpdate) SetDbVersion(s string) *CertifyVulnUpdate

SetDbVersion sets the "db_version" field.

func (*CertifyVulnUpdate) SetDocumentRef added in v0.6.0

func (cvu *CertifyVulnUpdate) SetDocumentRef(s string) *CertifyVulnUpdate

SetDocumentRef sets the "document_ref" field.

func (*CertifyVulnUpdate) SetNillableCollector added in v0.4.0

func (cvu *CertifyVulnUpdate) SetNillableCollector(s *string) *CertifyVulnUpdate

SetNillableCollector sets the "collector" field if the given value is not nil.

func (*CertifyVulnUpdate) SetNillableDbURI added in v0.4.0

func (cvu *CertifyVulnUpdate) SetNillableDbURI(s *string) *CertifyVulnUpdate

SetNillableDbURI sets the "db_uri" field if the given value is not nil.

func (*CertifyVulnUpdate) SetNillableDbVersion added in v0.4.0

func (cvu *CertifyVulnUpdate) SetNillableDbVersion(s *string) *CertifyVulnUpdate

SetNillableDbVersion sets the "db_version" field if the given value is not nil.

func (*CertifyVulnUpdate) SetNillableDocumentRef added in v0.6.0

func (cvu *CertifyVulnUpdate) SetNillableDocumentRef(s *string) *CertifyVulnUpdate

SetNillableDocumentRef sets the "document_ref" field if the given value is not nil.

func (*CertifyVulnUpdate) SetNillableOrigin added in v0.4.0

func (cvu *CertifyVulnUpdate) SetNillableOrigin(s *string) *CertifyVulnUpdate

SetNillableOrigin sets the "origin" field if the given value is not nil.

func (*CertifyVulnUpdate) SetNillablePackageID added in v0.4.0

func (cvu *CertifyVulnUpdate) SetNillablePackageID(u *uuid.UUID) *CertifyVulnUpdate

SetNillablePackageID sets the "package_id" field if the given value is not nil.

func (*CertifyVulnUpdate) SetNillableScannerURI added in v0.4.0

func (cvu *CertifyVulnUpdate) SetNillableScannerURI(s *string) *CertifyVulnUpdate

SetNillableScannerURI sets the "scanner_uri" field if the given value is not nil.

func (*CertifyVulnUpdate) SetNillableScannerVersion added in v0.4.0

func (cvu *CertifyVulnUpdate) SetNillableScannerVersion(s *string) *CertifyVulnUpdate

SetNillableScannerVersion sets the "scanner_version" field if the given value is not nil.

func (*CertifyVulnUpdate) SetNillableTimeScanned added in v0.4.0

func (cvu *CertifyVulnUpdate) SetNillableTimeScanned(t *time.Time) *CertifyVulnUpdate

SetNillableTimeScanned sets the "time_scanned" field if the given value is not nil.

func (*CertifyVulnUpdate) SetNillableVulnerabilityID added in v0.4.0

func (cvu *CertifyVulnUpdate) SetNillableVulnerabilityID(u *uuid.UUID) *CertifyVulnUpdate

SetNillableVulnerabilityID sets the "vulnerability_id" field if the given value is not nil.

func (*CertifyVulnUpdate) SetOrigin

func (cvu *CertifyVulnUpdate) SetOrigin(s string) *CertifyVulnUpdate

SetOrigin sets the "origin" field.

func (*CertifyVulnUpdate) SetPackage

func (cvu *CertifyVulnUpdate) SetPackage(p *PackageVersion) *CertifyVulnUpdate

SetPackage sets the "package" edge to the PackageVersion entity.

func (*CertifyVulnUpdate) SetPackageID

func (cvu *CertifyVulnUpdate) SetPackageID(u uuid.UUID) *CertifyVulnUpdate

SetPackageID sets the "package_id" field.

func (*CertifyVulnUpdate) SetScannerURI

func (cvu *CertifyVulnUpdate) SetScannerURI(s string) *CertifyVulnUpdate

SetScannerURI sets the "scanner_uri" field.

func (*CertifyVulnUpdate) SetScannerVersion

func (cvu *CertifyVulnUpdate) SetScannerVersion(s string) *CertifyVulnUpdate

SetScannerVersion sets the "scanner_version" field.

func (*CertifyVulnUpdate) SetTimeScanned

func (cvu *CertifyVulnUpdate) SetTimeScanned(t time.Time) *CertifyVulnUpdate

SetTimeScanned sets the "time_scanned" field.

func (*CertifyVulnUpdate) SetVulnerability

func (cvu *CertifyVulnUpdate) SetVulnerability(v *VulnerabilityID) *CertifyVulnUpdate

SetVulnerability sets the "vulnerability" edge to the VulnerabilityID entity.

func (*CertifyVulnUpdate) SetVulnerabilityID

func (cvu *CertifyVulnUpdate) SetVulnerabilityID(u uuid.UUID) *CertifyVulnUpdate

SetVulnerabilityID sets the "vulnerability_id" field.

func (*CertifyVulnUpdate) Where

Where appends a list predicates to the CertifyVulnUpdate builder.

type CertifyVulnUpdateOne

type CertifyVulnUpdateOne struct {
	// contains filtered or unexported fields
}

CertifyVulnUpdateOne is the builder for updating a single CertifyVuln entity.

func (*CertifyVulnUpdateOne) ClearPackage

func (cvuo *CertifyVulnUpdateOne) ClearPackage() *CertifyVulnUpdateOne

ClearPackage clears the "package" edge to the PackageVersion entity.

func (*CertifyVulnUpdateOne) ClearVulnerability

func (cvuo *CertifyVulnUpdateOne) ClearVulnerability() *CertifyVulnUpdateOne

ClearVulnerability clears the "vulnerability" edge to the VulnerabilityID entity.

func (*CertifyVulnUpdateOne) Exec

func (cvuo *CertifyVulnUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*CertifyVulnUpdateOne) ExecX

func (cvuo *CertifyVulnUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*CertifyVulnUpdateOne) Mutation

func (cvuo *CertifyVulnUpdateOne) Mutation() *CertifyVulnMutation

Mutation returns the CertifyVulnMutation object of the builder.

func (*CertifyVulnUpdateOne) Save

Save executes the query and returns the updated CertifyVuln entity.

func (*CertifyVulnUpdateOne) SaveX

func (cvuo *CertifyVulnUpdateOne) SaveX(ctx context.Context) *CertifyVuln

SaveX is like Save, but panics if an error occurs.

func (*CertifyVulnUpdateOne) Select

func (cvuo *CertifyVulnUpdateOne) Select(field string, fields ...string) *CertifyVulnUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*CertifyVulnUpdateOne) SetCollector

func (cvuo *CertifyVulnUpdateOne) SetCollector(s string) *CertifyVulnUpdateOne

SetCollector sets the "collector" field.

func (*CertifyVulnUpdateOne) SetDbURI

SetDbURI sets the "db_uri" field.

func (*CertifyVulnUpdateOne) SetDbVersion

func (cvuo *CertifyVulnUpdateOne) SetDbVersion(s string) *CertifyVulnUpdateOne

SetDbVersion sets the "db_version" field.

func (*CertifyVulnUpdateOne) SetDocumentRef added in v0.6.0

func (cvuo *CertifyVulnUpdateOne) SetDocumentRef(s string) *CertifyVulnUpdateOne

SetDocumentRef sets the "document_ref" field.

func (*CertifyVulnUpdateOne) SetNillableCollector added in v0.4.0

func (cvuo *CertifyVulnUpdateOne) SetNillableCollector(s *string) *CertifyVulnUpdateOne

SetNillableCollector sets the "collector" field if the given value is not nil.

func (*CertifyVulnUpdateOne) SetNillableDbURI added in v0.4.0

func (cvuo *CertifyVulnUpdateOne) SetNillableDbURI(s *string) *CertifyVulnUpdateOne

SetNillableDbURI sets the "db_uri" field if the given value is not nil.

func (*CertifyVulnUpdateOne) SetNillableDbVersion added in v0.4.0

func (cvuo *CertifyVulnUpdateOne) SetNillableDbVersion(s *string) *CertifyVulnUpdateOne

SetNillableDbVersion sets the "db_version" field if the given value is not nil.

func (*CertifyVulnUpdateOne) SetNillableDocumentRef added in v0.6.0

func (cvuo *CertifyVulnUpdateOne) SetNillableDocumentRef(s *string) *CertifyVulnUpdateOne

SetNillableDocumentRef sets the "document_ref" field if the given value is not nil.

func (*CertifyVulnUpdateOne) SetNillableOrigin added in v0.4.0

func (cvuo *CertifyVulnUpdateOne) SetNillableOrigin(s *string) *CertifyVulnUpdateOne

SetNillableOrigin sets the "origin" field if the given value is not nil.

func (*CertifyVulnUpdateOne) SetNillablePackageID added in v0.4.0

func (cvuo *CertifyVulnUpdateOne) SetNillablePackageID(u *uuid.UUID) *CertifyVulnUpdateOne

SetNillablePackageID sets the "package_id" field if the given value is not nil.

func (*CertifyVulnUpdateOne) SetNillableScannerURI added in v0.4.0

func (cvuo *CertifyVulnUpdateOne) SetNillableScannerURI(s *string) *CertifyVulnUpdateOne

SetNillableScannerURI sets the "scanner_uri" field if the given value is not nil.

func (*CertifyVulnUpdateOne) SetNillableScannerVersion added in v0.4.0

func (cvuo *CertifyVulnUpdateOne) SetNillableScannerVersion(s *string) *CertifyVulnUpdateOne

SetNillableScannerVersion sets the "scanner_version" field if the given value is not nil.

func (*CertifyVulnUpdateOne) SetNillableTimeScanned added in v0.4.0

func (cvuo *CertifyVulnUpdateOne) SetNillableTimeScanned(t *time.Time) *CertifyVulnUpdateOne

SetNillableTimeScanned sets the "time_scanned" field if the given value is not nil.

func (*CertifyVulnUpdateOne) SetNillableVulnerabilityID added in v0.4.0

func (cvuo *CertifyVulnUpdateOne) SetNillableVulnerabilityID(u *uuid.UUID) *CertifyVulnUpdateOne

SetNillableVulnerabilityID sets the "vulnerability_id" field if the given value is not nil.

func (*CertifyVulnUpdateOne) SetOrigin

func (cvuo *CertifyVulnUpdateOne) SetOrigin(s string) *CertifyVulnUpdateOne

SetOrigin sets the "origin" field.

func (*CertifyVulnUpdateOne) SetPackage

SetPackage sets the "package" edge to the PackageVersion entity.

func (*CertifyVulnUpdateOne) SetPackageID

func (cvuo *CertifyVulnUpdateOne) SetPackageID(u uuid.UUID) *CertifyVulnUpdateOne

SetPackageID sets the "package_id" field.

func (*CertifyVulnUpdateOne) SetScannerURI

func (cvuo *CertifyVulnUpdateOne) SetScannerURI(s string) *CertifyVulnUpdateOne

SetScannerURI sets the "scanner_uri" field.

func (*CertifyVulnUpdateOne) SetScannerVersion

func (cvuo *CertifyVulnUpdateOne) SetScannerVersion(s string) *CertifyVulnUpdateOne

SetScannerVersion sets the "scanner_version" field.

func (*CertifyVulnUpdateOne) SetTimeScanned

func (cvuo *CertifyVulnUpdateOne) SetTimeScanned(t time.Time) *CertifyVulnUpdateOne

SetTimeScanned sets the "time_scanned" field.

func (*CertifyVulnUpdateOne) SetVulnerability

func (cvuo *CertifyVulnUpdateOne) SetVulnerability(v *VulnerabilityID) *CertifyVulnUpdateOne

SetVulnerability sets the "vulnerability" edge to the VulnerabilityID entity.

func (*CertifyVulnUpdateOne) SetVulnerabilityID

func (cvuo *CertifyVulnUpdateOne) SetVulnerabilityID(u uuid.UUID) *CertifyVulnUpdateOne

SetVulnerabilityID sets the "vulnerability_id" field.

func (*CertifyVulnUpdateOne) Where

Where appends a list predicates to the CertifyVulnUpdate builder.

type CertifyVulnUpsert

type CertifyVulnUpsert struct {
	*sql.UpdateSet
}

CertifyVulnUpsert is the "OnConflict" setter.

func (*CertifyVulnUpsert) SetCollector

func (u *CertifyVulnUpsert) SetCollector(v string) *CertifyVulnUpsert

SetCollector sets the "collector" field.

func (*CertifyVulnUpsert) SetDbURI

func (u *CertifyVulnUpsert) SetDbURI(v string) *CertifyVulnUpsert

SetDbURI sets the "db_uri" field.

func (*CertifyVulnUpsert) SetDbVersion

func (u *CertifyVulnUpsert) SetDbVersion(v string) *CertifyVulnUpsert

SetDbVersion sets the "db_version" field.

func (*CertifyVulnUpsert) SetDocumentRef added in v0.6.0

func (u *CertifyVulnUpsert) SetDocumentRef(v string) *CertifyVulnUpsert

SetDocumentRef sets the "document_ref" field.

func (*CertifyVulnUpsert) SetOrigin

func (u *CertifyVulnUpsert) SetOrigin(v string) *CertifyVulnUpsert

SetOrigin sets the "origin" field.

func (*CertifyVulnUpsert) SetPackageID

func (u *CertifyVulnUpsert) SetPackageID(v uuid.UUID) *CertifyVulnUpsert

SetPackageID sets the "package_id" field.

func (*CertifyVulnUpsert) SetScannerURI

func (u *CertifyVulnUpsert) SetScannerURI(v string) *CertifyVulnUpsert

SetScannerURI sets the "scanner_uri" field.

func (*CertifyVulnUpsert) SetScannerVersion

func (u *CertifyVulnUpsert) SetScannerVersion(v string) *CertifyVulnUpsert

SetScannerVersion sets the "scanner_version" field.

func (*CertifyVulnUpsert) SetTimeScanned

func (u *CertifyVulnUpsert) SetTimeScanned(v time.Time) *CertifyVulnUpsert

SetTimeScanned sets the "time_scanned" field.

func (*CertifyVulnUpsert) SetVulnerabilityID

func (u *CertifyVulnUpsert) SetVulnerabilityID(v uuid.UUID) *CertifyVulnUpsert

SetVulnerabilityID sets the "vulnerability_id" field.

func (*CertifyVulnUpsert) UpdateCollector

func (u *CertifyVulnUpsert) UpdateCollector() *CertifyVulnUpsert

UpdateCollector sets the "collector" field to the value that was provided on create.

func (*CertifyVulnUpsert) UpdateDbURI

func (u *CertifyVulnUpsert) UpdateDbURI() *CertifyVulnUpsert

UpdateDbURI sets the "db_uri" field to the value that was provided on create.

func (*CertifyVulnUpsert) UpdateDbVersion

func (u *CertifyVulnUpsert) UpdateDbVersion() *CertifyVulnUpsert

UpdateDbVersion sets the "db_version" field to the value that was provided on create.

func (*CertifyVulnUpsert) UpdateDocumentRef added in v0.6.0

func (u *CertifyVulnUpsert) UpdateDocumentRef() *CertifyVulnUpsert

UpdateDocumentRef sets the "document_ref" field to the value that was provided on create.

func (*CertifyVulnUpsert) UpdateOrigin

func (u *CertifyVulnUpsert) UpdateOrigin() *CertifyVulnUpsert

UpdateOrigin sets the "origin" field to the value that was provided on create.

func (*CertifyVulnUpsert) UpdatePackageID

func (u *CertifyVulnUpsert) UpdatePackageID() *CertifyVulnUpsert

UpdatePackageID sets the "package_id" field to the value that was provided on create.

func (*CertifyVulnUpsert) UpdateScannerURI

func (u *CertifyVulnUpsert) UpdateScannerURI() *CertifyVulnUpsert

UpdateScannerURI sets the "scanner_uri" field to the value that was provided on create.

func (*CertifyVulnUpsert) UpdateScannerVersion

func (u *CertifyVulnUpsert) UpdateScannerVersion() *CertifyVulnUpsert

UpdateScannerVersion sets the "scanner_version" field to the value that was provided on create.

func (*CertifyVulnUpsert) UpdateTimeScanned

func (u *CertifyVulnUpsert) UpdateTimeScanned() *CertifyVulnUpsert

UpdateTimeScanned sets the "time_scanned" field to the value that was provided on create.

func (*CertifyVulnUpsert) UpdateVulnerabilityID

func (u *CertifyVulnUpsert) UpdateVulnerabilityID() *CertifyVulnUpsert

UpdateVulnerabilityID sets the "vulnerability_id" field to the value that was provided on create.

type CertifyVulnUpsertBulk

type CertifyVulnUpsertBulk struct {
	// contains filtered or unexported fields
}

CertifyVulnUpsertBulk is the builder for "upsert"-ing a bulk of CertifyVuln nodes.

func (*CertifyVulnUpsertBulk) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*CertifyVulnUpsertBulk) Exec

Exec executes the query.

func (*CertifyVulnUpsertBulk) ExecX

func (u *CertifyVulnUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*CertifyVulnUpsertBulk) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.CertifyVuln.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*CertifyVulnUpsertBulk) SetCollector

SetCollector sets the "collector" field.

func (*CertifyVulnUpsertBulk) SetDbURI

SetDbURI sets the "db_uri" field.

func (*CertifyVulnUpsertBulk) SetDbVersion

SetDbVersion sets the "db_version" field.

func (*CertifyVulnUpsertBulk) SetDocumentRef added in v0.6.0

func (u *CertifyVulnUpsertBulk) SetDocumentRef(v string) *CertifyVulnUpsertBulk

SetDocumentRef sets the "document_ref" field.

func (*CertifyVulnUpsertBulk) SetOrigin

SetOrigin sets the "origin" field.

func (*CertifyVulnUpsertBulk) SetPackageID

SetPackageID sets the "package_id" field.

func (*CertifyVulnUpsertBulk) SetScannerURI

func (u *CertifyVulnUpsertBulk) SetScannerURI(v string) *CertifyVulnUpsertBulk

SetScannerURI sets the "scanner_uri" field.

func (*CertifyVulnUpsertBulk) SetScannerVersion

func (u *CertifyVulnUpsertBulk) SetScannerVersion(v string) *CertifyVulnUpsertBulk

SetScannerVersion sets the "scanner_version" field.

func (*CertifyVulnUpsertBulk) SetTimeScanned

func (u *CertifyVulnUpsertBulk) SetTimeScanned(v time.Time) *CertifyVulnUpsertBulk

SetTimeScanned sets the "time_scanned" field.

func (*CertifyVulnUpsertBulk) SetVulnerabilityID

func (u *CertifyVulnUpsertBulk) SetVulnerabilityID(v uuid.UUID) *CertifyVulnUpsertBulk

SetVulnerabilityID sets the "vulnerability_id" field.

func (*CertifyVulnUpsertBulk) Update

Update allows overriding fields `UPDATE` values. See the CertifyVulnCreateBulk.OnConflict documentation for more info.

func (*CertifyVulnUpsertBulk) UpdateCollector

func (u *CertifyVulnUpsertBulk) UpdateCollector() *CertifyVulnUpsertBulk

UpdateCollector sets the "collector" field to the value that was provided on create.

func (*CertifyVulnUpsertBulk) UpdateDbURI

func (u *CertifyVulnUpsertBulk) UpdateDbURI() *CertifyVulnUpsertBulk

UpdateDbURI sets the "db_uri" field to the value that was provided on create.

func (*CertifyVulnUpsertBulk) UpdateDbVersion

func (u *CertifyVulnUpsertBulk) UpdateDbVersion() *CertifyVulnUpsertBulk

UpdateDbVersion sets the "db_version" field to the value that was provided on create.

func (*CertifyVulnUpsertBulk) UpdateDocumentRef added in v0.6.0

func (u *CertifyVulnUpsertBulk) UpdateDocumentRef() *CertifyVulnUpsertBulk

UpdateDocumentRef sets the "document_ref" field to the value that was provided on create.

func (*CertifyVulnUpsertBulk) UpdateNewValues

func (u *CertifyVulnUpsertBulk) UpdateNewValues() *CertifyVulnUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.CertifyVuln.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(certifyvuln.FieldID)
		}),
	).
	Exec(ctx)

func (*CertifyVulnUpsertBulk) UpdateOrigin

func (u *CertifyVulnUpsertBulk) UpdateOrigin() *CertifyVulnUpsertBulk

UpdateOrigin sets the "origin" field to the value that was provided on create.

func (*CertifyVulnUpsertBulk) UpdatePackageID

func (u *CertifyVulnUpsertBulk) UpdatePackageID() *CertifyVulnUpsertBulk

UpdatePackageID sets the "package_id" field to the value that was provided on create.

func (*CertifyVulnUpsertBulk) UpdateScannerURI

func (u *CertifyVulnUpsertBulk) UpdateScannerURI() *CertifyVulnUpsertBulk

UpdateScannerURI sets the "scanner_uri" field to the value that was provided on create.

func (*CertifyVulnUpsertBulk) UpdateScannerVersion

func (u *CertifyVulnUpsertBulk) UpdateScannerVersion() *CertifyVulnUpsertBulk

UpdateScannerVersion sets the "scanner_version" field to the value that was provided on create.

func (*CertifyVulnUpsertBulk) UpdateTimeScanned

func (u *CertifyVulnUpsertBulk) UpdateTimeScanned() *CertifyVulnUpsertBulk

UpdateTimeScanned sets the "time_scanned" field to the value that was provided on create.

func (*CertifyVulnUpsertBulk) UpdateVulnerabilityID

func (u *CertifyVulnUpsertBulk) UpdateVulnerabilityID() *CertifyVulnUpsertBulk

UpdateVulnerabilityID sets the "vulnerability_id" field to the value that was provided on create.

type CertifyVulnUpsertOne

type CertifyVulnUpsertOne struct {
	// contains filtered or unexported fields
}

CertifyVulnUpsertOne is the builder for "upsert"-ing

one CertifyVuln node.

func (*CertifyVulnUpsertOne) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*CertifyVulnUpsertOne) Exec

Exec executes the query.

func (*CertifyVulnUpsertOne) ExecX

func (u *CertifyVulnUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*CertifyVulnUpsertOne) ID

func (u *CertifyVulnUpsertOne) ID(ctx context.Context) (id uuid.UUID, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*CertifyVulnUpsertOne) IDX

IDX is like ID, but panics if an error occurs.

func (*CertifyVulnUpsertOne) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.CertifyVuln.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*CertifyVulnUpsertOne) SetCollector

func (u *CertifyVulnUpsertOne) SetCollector(v string) *CertifyVulnUpsertOne

SetCollector sets the "collector" field.

func (*CertifyVulnUpsertOne) SetDbURI

SetDbURI sets the "db_uri" field.

func (*CertifyVulnUpsertOne) SetDbVersion

func (u *CertifyVulnUpsertOne) SetDbVersion(v string) *CertifyVulnUpsertOne

SetDbVersion sets the "db_version" field.

func (*CertifyVulnUpsertOne) SetDocumentRef added in v0.6.0

func (u *CertifyVulnUpsertOne) SetDocumentRef(v string) *CertifyVulnUpsertOne

SetDocumentRef sets the "document_ref" field.

func (*CertifyVulnUpsertOne) SetOrigin

SetOrigin sets the "origin" field.

func (*CertifyVulnUpsertOne) SetPackageID

func (u *CertifyVulnUpsertOne) SetPackageID(v uuid.UUID) *CertifyVulnUpsertOne

SetPackageID sets the "package_id" field.

func (*CertifyVulnUpsertOne) SetScannerURI

func (u *CertifyVulnUpsertOne) SetScannerURI(v string) *CertifyVulnUpsertOne

SetScannerURI sets the "scanner_uri" field.

func (*CertifyVulnUpsertOne) SetScannerVersion

func (u *CertifyVulnUpsertOne) SetScannerVersion(v string) *CertifyVulnUpsertOne

SetScannerVersion sets the "scanner_version" field.

func (*CertifyVulnUpsertOne) SetTimeScanned

func (u *CertifyVulnUpsertOne) SetTimeScanned(v time.Time) *CertifyVulnUpsertOne

SetTimeScanned sets the "time_scanned" field.

func (*CertifyVulnUpsertOne) SetVulnerabilityID

func (u *CertifyVulnUpsertOne) SetVulnerabilityID(v uuid.UUID) *CertifyVulnUpsertOne

SetVulnerabilityID sets the "vulnerability_id" field.

func (*CertifyVulnUpsertOne) Update

Update allows overriding fields `UPDATE` values. See the CertifyVulnCreate.OnConflict documentation for more info.

func (*CertifyVulnUpsertOne) UpdateCollector

func (u *CertifyVulnUpsertOne) UpdateCollector() *CertifyVulnUpsertOne

UpdateCollector sets the "collector" field to the value that was provided on create.

func (*CertifyVulnUpsertOne) UpdateDbURI

func (u *CertifyVulnUpsertOne) UpdateDbURI() *CertifyVulnUpsertOne

UpdateDbURI sets the "db_uri" field to the value that was provided on create.

func (*CertifyVulnUpsertOne) UpdateDbVersion

func (u *CertifyVulnUpsertOne) UpdateDbVersion() *CertifyVulnUpsertOne

UpdateDbVersion sets the "db_version" field to the value that was provided on create.

func (*CertifyVulnUpsertOne) UpdateDocumentRef added in v0.6.0

func (u *CertifyVulnUpsertOne) UpdateDocumentRef() *CertifyVulnUpsertOne

UpdateDocumentRef sets the "document_ref" field to the value that was provided on create.

func (*CertifyVulnUpsertOne) UpdateNewValues

func (u *CertifyVulnUpsertOne) UpdateNewValues() *CertifyVulnUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:

client.CertifyVuln.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(certifyvuln.FieldID)
		}),
	).
	Exec(ctx)

func (*CertifyVulnUpsertOne) UpdateOrigin

func (u *CertifyVulnUpsertOne) UpdateOrigin() *CertifyVulnUpsertOne

UpdateOrigin sets the "origin" field to the value that was provided on create.

func (*CertifyVulnUpsertOne) UpdatePackageID

func (u *CertifyVulnUpsertOne) UpdatePackageID() *CertifyVulnUpsertOne

UpdatePackageID sets the "package_id" field to the value that was provided on create.

func (*CertifyVulnUpsertOne) UpdateScannerURI

func (u *CertifyVulnUpsertOne) UpdateScannerURI() *CertifyVulnUpsertOne

UpdateScannerURI sets the "scanner_uri" field to the value that was provided on create.

func (*CertifyVulnUpsertOne) UpdateScannerVersion

func (u *CertifyVulnUpsertOne) UpdateScannerVersion() *CertifyVulnUpsertOne

UpdateScannerVersion sets the "scanner_version" field to the value that was provided on create.

func (*CertifyVulnUpsertOne) UpdateTimeScanned

func (u *CertifyVulnUpsertOne) UpdateTimeScanned() *CertifyVulnUpsertOne

UpdateTimeScanned sets the "time_scanned" field to the value that was provided on create.

func (*CertifyVulnUpsertOne) UpdateVulnerabilityID

func (u *CertifyVulnUpsertOne) UpdateVulnerabilityID() *CertifyVulnUpsertOne

UpdateVulnerabilityID sets the "vulnerability_id" field to the value that was provided on create.

type CertifyVulns

type CertifyVulns []*CertifyVuln

CertifyVulns is a parsable slice of CertifyVuln.

type Client

type Client struct {

	// Schema is the client for creating, migrating and dropping schema.
	Schema *migrate.Schema
	// Artifact is the client for interacting with the Artifact builders.
	Artifact *ArtifactClient
	// BillOfMaterials is the client for interacting with the BillOfMaterials builders.
	BillOfMaterials *BillOfMaterialsClient
	// Builder is the client for interacting with the Builder builders.
	Builder *BuilderClient
	// Certification is the client for interacting with the Certification builders.
	Certification *CertificationClient
	// CertifyLegal is the client for interacting with the CertifyLegal builders.
	CertifyLegal *CertifyLegalClient
	// CertifyScorecard is the client for interacting with the CertifyScorecard builders.
	CertifyScorecard *CertifyScorecardClient
	// CertifyVex is the client for interacting with the CertifyVex builders.
	CertifyVex *CertifyVexClient
	// CertifyVuln is the client for interacting with the CertifyVuln builders.
	CertifyVuln *CertifyVulnClient
	// Dependency is the client for interacting with the Dependency builders.
	Dependency *DependencyClient
	// HasMetadata is the client for interacting with the HasMetadata builders.
	HasMetadata *HasMetadataClient
	// HasSourceAt is the client for interacting with the HasSourceAt builders.
	HasSourceAt *HasSourceAtClient
	// HashEqual is the client for interacting with the HashEqual builders.
	HashEqual *HashEqualClient
	// License is the client for interacting with the License builders.
	License *LicenseClient
	// Occurrence is the client for interacting with the Occurrence builders.
	Occurrence *OccurrenceClient
	// PackageName is the client for interacting with the PackageName builders.
	PackageName *PackageNameClient
	// PackageVersion is the client for interacting with the PackageVersion builders.
	PackageVersion *PackageVersionClient
	// PkgEqual is the client for interacting with the PkgEqual builders.
	PkgEqual *PkgEqualClient
	// PointOfContact is the client for interacting with the PointOfContact builders.
	PointOfContact *PointOfContactClient
	// SLSAAttestation is the client for interacting with the SLSAAttestation builders.
	SLSAAttestation *SLSAAttestationClient
	// SourceName is the client for interacting with the SourceName builders.
	SourceName *SourceNameClient
	// VulnEqual is the client for interacting with the VulnEqual builders.
	VulnEqual *VulnEqualClient
	// VulnerabilityID is the client for interacting with the VulnerabilityID builders.
	VulnerabilityID *VulnerabilityIDClient
	// VulnerabilityMetadata is the client for interacting with the VulnerabilityMetadata builders.
	VulnerabilityMetadata *VulnerabilityMetadataClient
	// contains filtered or unexported fields
}

Client is the client that holds all ent builders.

func FromContext

func FromContext(ctx context.Context) *Client

FromContext returns a Client stored inside a context, or nil if there isn't one.

func NewClient

func NewClient(opts ...Option) *Client

NewClient creates a new client configured with the given options.

func Open

func Open(driverName, dataSourceName string, options ...Option) (*Client, error)

Open opens a database/sql.DB specified by the driver name and the data source name, and returns a new client attached to it. Optional parameters can be added for configuring the client.

func (*Client) BeginTx

func (c *Client) BeginTx(ctx context.Context, opts *sql.TxOptions) (*Tx, error)

BeginTx returns a transactional client with specified options.

func (*Client) Close

func (c *Client) Close() error

Close closes the database connection and prevents new queries from starting.

func (*Client) Debug

func (c *Client) Debug() *Client

Debug returns a new debug-client. It's used to get verbose logging on specific operations.

client.Debug().
	Artifact.
	Query().
	Count(ctx)

func (*Client) Intercept

func (c *Client) Intercept(interceptors ...Interceptor)

Intercept adds the query interceptors to all the entity clients. In order to add interceptors to a specific client, call: `client.Node.Intercept(...)`.

func (*Client) Mutate

func (c *Client) Mutate(ctx context.Context, m Mutation) (Value, error)

Mutate implements the ent.Mutator interface.

func (*Client) Noder

func (c *Client) Noder(ctx context.Context, id uuid.UUID, opts ...NodeOption) (_ Noder, err error)

Noder returns a Node by its id. If the NodeType was not provided, it will be derived from the id value according to the universal-id configuration.

c.Noder(ctx, id)
c.Noder(ctx, id, ent.WithNodeType(typeResolver))

func (*Client) Noders

func (c *Client) Noders(ctx context.Context, ids []uuid.UUID, opts ...NodeOption) ([]Noder, error)

func (*Client) OpenTx

func (c *Client) OpenTx(ctx context.Context) (context.Context, driver.Tx, error)

OpenTx opens a transaction and returns a transactional context along with the created transaction.

func (*Client) Ping

func (c *Client) Ping(ctx context.Context) error

func (*Client) Tx

func (c *Client) Tx(ctx context.Context) (*Tx, error)

Tx returns a new transactional client. The provided context is used until the transaction is committed or rolled back.

func (*Client) Use

func (c *Client) Use(hooks ...Hook)

Use adds the mutation hooks to all the entity clients. In order to add hooks to a specific client, call: `client.Node.Use(...)`.

type CommitFunc

type CommitFunc func(context.Context, *Tx) error

The CommitFunc type is an adapter to allow the use of ordinary function as a Committer. If f is a function with the appropriate signature, CommitFunc(f) is a Committer that calls f.

func (CommitFunc) Commit

func (f CommitFunc) Commit(ctx context.Context, tx *Tx) error

Commit calls f(ctx, m).

type CommitHook

type CommitHook func(Committer) Committer

CommitHook defines the "commit middleware". A function that gets a Committer and returns a Committer. For example:

hook := func(next ent.Committer) ent.Committer {
	return ent.CommitFunc(func(ctx context.Context, tx *ent.Tx) error {
		// Do some stuff before.
		if err := next.Commit(ctx, tx); err != nil {
			return err
		}
		// Do some stuff after.
		return nil
	})
}

type Committer

type Committer interface {
	Commit(context.Context, *Tx) error
}

Committer is the interface that wraps the Commit method.

type ConstraintError

type ConstraintError struct {
	// contains filtered or unexported fields
}

ConstraintError returns when trying to create/update one or more entities and one or more of their constraints failed. For example, violation of edge or field uniqueness.

func (ConstraintError) Error

func (e ConstraintError) Error() string

Error implements the error interface.

func (*ConstraintError) Unwrap

func (e *ConstraintError) Unwrap() error

Unwrap implements the errors.Wrapper interface.

type Cursor

type Cursor = entgql.Cursor[uuid.UUID]

Common entgql types.

type Dependencies

type Dependencies []*Dependency

Dependencies is a parsable slice of Dependency.

type Dependency

type Dependency struct {

	// ID of the ent.
	ID uuid.UUID `json:"id,omitempty"`
	// PackageID holds the value of the "package_id" field.
	PackageID uuid.UUID `json:"package_id,omitempty"`
	// DependentPackageNameID holds the value of the "dependent_package_name_id" field.
	DependentPackageNameID uuid.UUID `json:"dependent_package_name_id,omitempty"`
	// DependentPackageVersionID holds the value of the "dependent_package_version_id" field.
	DependentPackageVersionID uuid.UUID `json:"dependent_package_version_id,omitempty"`
	// VersionRange holds the value of the "version_range" field.
	VersionRange string `json:"version_range,omitempty"`
	// DependencyType holds the value of the "dependency_type" field.
	DependencyType dependency.DependencyType `json:"dependency_type,omitempty"`
	// Justification holds the value of the "justification" field.
	Justification string `json:"justification,omitempty"`
	// Origin holds the value of the "origin" field.
	Origin string `json:"origin,omitempty"`
	// Collector holds the value of the "collector" field.
	Collector string `json:"collector,omitempty"`
	// DocumentRef holds the value of the "document_ref" field.
	DocumentRef string `json:"document_ref,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the DependencyQuery when eager-loading is set.
	Edges DependencyEdges `json:"edges"`
	// contains filtered or unexported fields
}

Dependency is the model entity for the Dependency schema.

func (*Dependency) DependentPackageName

func (d *Dependency) DependentPackageName(ctx context.Context) (*PackageName, error)

func (*Dependency) DependentPackageVersion

func (d *Dependency) DependentPackageVersion(ctx context.Context) (*PackageVersion, error)

func (*Dependency) IncludedInSboms added in v0.4.0

func (d *Dependency) IncludedInSboms(ctx context.Context) (result []*BillOfMaterials, err error)

func (*Dependency) IsNode

func (n *Dependency) IsNode()

IsNode implements the Node interface check for GQLGen.

func (*Dependency) NamedIncludedInSboms added in v0.4.0

func (d *Dependency) NamedIncludedInSboms(name string) ([]*BillOfMaterials, error)

NamedIncludedInSboms returns the IncludedInSboms named value or an error if the edge was not loaded in eager-loading with this name.

func (*Dependency) Package

func (d *Dependency) Package(ctx context.Context) (*PackageVersion, error)

func (*Dependency) QueryDependentPackageName

func (d *Dependency) QueryDependentPackageName() *PackageNameQuery

QueryDependentPackageName queries the "dependent_package_name" edge of the Dependency entity.

func (*Dependency) QueryDependentPackageVersion

func (d *Dependency) QueryDependentPackageVersion() *PackageVersionQuery

QueryDependentPackageVersion queries the "dependent_package_version" edge of the Dependency entity.

func (*Dependency) QueryIncludedInSboms added in v0.4.0

func (d *Dependency) QueryIncludedInSboms() *BillOfMaterialsQuery

QueryIncludedInSboms queries the "included_in_sboms" edge of the Dependency entity.

func (*Dependency) QueryPackage

func (d *Dependency) QueryPackage() *PackageVersionQuery

QueryPackage queries the "package" edge of the Dependency entity.

func (*Dependency) String

func (d *Dependency) String() string

String implements the fmt.Stringer.

func (*Dependency) ToEdge

func (d *Dependency) ToEdge(order *DependencyOrder) *DependencyEdge

ToEdge converts Dependency into DependencyEdge.

func (*Dependency) Unwrap

func (d *Dependency) Unwrap() *Dependency

Unwrap unwraps the Dependency entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.

func (*Dependency) Update

func (d *Dependency) Update() *DependencyUpdateOne

Update returns a builder for updating this Dependency. Note that you need to call Dependency.Unwrap() before calling this method if this Dependency was returned from a transaction, and the transaction was committed or rolled back.

func (*Dependency) Value

func (d *Dependency) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the Dependency. This includes values selected through modifiers, order, etc.

type DependencyClient

type DependencyClient struct {
	// contains filtered or unexported fields
}

DependencyClient is a client for the Dependency schema.

func NewDependencyClient

func NewDependencyClient(c config) *DependencyClient

NewDependencyClient returns a client for the Dependency from the given config.

func (*DependencyClient) Create

func (c *DependencyClient) Create() *DependencyCreate

Create returns a builder for creating a Dependency entity.

func (*DependencyClient) CreateBulk

func (c *DependencyClient) CreateBulk(builders ...*DependencyCreate) *DependencyCreateBulk

CreateBulk returns a builder for creating a bulk of Dependency entities.

func (*DependencyClient) Delete

func (c *DependencyClient) Delete() *DependencyDelete

Delete returns a delete builder for Dependency.

func (*DependencyClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*DependencyClient) DeleteOneID

func (c *DependencyClient) DeleteOneID(id uuid.UUID) *DependencyDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*DependencyClient) Get

Get returns a Dependency entity by its id.

func (*DependencyClient) GetX

func (c *DependencyClient) GetX(ctx context.Context, id uuid.UUID) *Dependency

GetX is like Get, but panics if an error occurs.

func (*DependencyClient) Hooks

func (c *DependencyClient) Hooks() []Hook

Hooks returns the client hooks.

func (*DependencyClient) Intercept

func (c *DependencyClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `dependency.Intercept(f(g(h())))`.

func (*DependencyClient) Interceptors

func (c *DependencyClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*DependencyClient) MapCreateBulk

func (c *DependencyClient) MapCreateBulk(slice any, setFunc func(*DependencyCreate, int)) *DependencyCreateBulk

MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.

func (*DependencyClient) Query

func (c *DependencyClient) Query() *DependencyQuery

Query returns a query builder for Dependency.

func (*DependencyClient) QueryDependentPackageName

func (c *DependencyClient) QueryDependentPackageName(d *Dependency) *PackageNameQuery

QueryDependentPackageName queries the dependent_package_name edge of a Dependency.

func (*DependencyClient) QueryDependentPackageVersion

func (c *DependencyClient) QueryDependentPackageVersion(d *Dependency) *PackageVersionQuery

QueryDependentPackageVersion queries the dependent_package_version edge of a Dependency.

func (*DependencyClient) QueryIncludedInSboms added in v0.4.0

func (c *DependencyClient) QueryIncludedInSboms(d *Dependency) *BillOfMaterialsQuery

QueryIncludedInSboms queries the included_in_sboms edge of a Dependency.

func (*DependencyClient) QueryPackage

func (c *DependencyClient) QueryPackage(d *Dependency) *PackageVersionQuery

QueryPackage queries the package edge of a Dependency.

func (*DependencyClient) Update

func (c *DependencyClient) Update() *DependencyUpdate

Update returns an update builder for Dependency.

func (*DependencyClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*DependencyClient) UpdateOneID

func (c *DependencyClient) UpdateOneID(id uuid.UUID) *DependencyUpdateOne

UpdateOneID returns an update builder for the given id.

func (*DependencyClient) Use

func (c *DependencyClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `dependency.Hooks(f(g(h())))`.

type DependencyConnection

type DependencyConnection struct {
	Edges      []*DependencyEdge `json:"edges"`
	PageInfo   PageInfo          `json:"pageInfo"`
	TotalCount int               `json:"totalCount"`
}

DependencyConnection is the connection containing edges to Dependency.

type DependencyCreate

type DependencyCreate struct {
	// contains filtered or unexported fields
}

DependencyCreate is the builder for creating a Dependency entity.

func (*DependencyCreate) AddIncludedInSbomIDs added in v0.4.0

func (dc *DependencyCreate) AddIncludedInSbomIDs(ids ...uuid.UUID) *DependencyCreate

AddIncludedInSbomIDs adds the "included_in_sboms" edge to the BillOfMaterials entity by IDs.

func (*DependencyCreate) AddIncludedInSboms added in v0.4.0

func (dc *DependencyCreate) AddIncludedInSboms(b ...*BillOfMaterials) *DependencyCreate

AddIncludedInSboms adds the "included_in_sboms" edges to the BillOfMaterials entity.

func (*DependencyCreate) Exec

func (dc *DependencyCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*DependencyCreate) ExecX

func (dc *DependencyCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*DependencyCreate) Mutation

func (dc *DependencyCreate) Mutation() *DependencyMutation

Mutation returns the DependencyMutation object of the builder.

func (*DependencyCreate) OnConflict

func (dc *DependencyCreate) OnConflict(opts ...sql.ConflictOption) *DependencyUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.Dependency.Create().
	SetPackageID(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.DependencyUpsert) {
		SetPackageID(v+v).
	}).
	Exec(ctx)

func (*DependencyCreate) OnConflictColumns

func (dc *DependencyCreate) OnConflictColumns(columns ...string) *DependencyUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.Dependency.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*DependencyCreate) Save

func (dc *DependencyCreate) Save(ctx context.Context) (*Dependency, error)

Save creates the Dependency in the database.

func (*DependencyCreate) SaveX

func (dc *DependencyCreate) SaveX(ctx context.Context) *Dependency

SaveX calls Save and panics if Save returns an error.

func (*DependencyCreate) SetCollector

func (dc *DependencyCreate) SetCollector(s string) *DependencyCreate

SetCollector sets the "collector" field.

func (*DependencyCreate) SetDependencyType

func (dc *DependencyCreate) SetDependencyType(dt dependency.DependencyType) *DependencyCreate

SetDependencyType sets the "dependency_type" field.

func (*DependencyCreate) SetDependentPackageName

func (dc *DependencyCreate) SetDependentPackageName(p *PackageName) *DependencyCreate

SetDependentPackageName sets the "dependent_package_name" edge to the PackageName entity.

func (*DependencyCreate) SetDependentPackageNameID

func (dc *DependencyCreate) SetDependentPackageNameID(u uuid.UUID) *DependencyCreate

SetDependentPackageNameID sets the "dependent_package_name_id" field.

func (*DependencyCreate) SetDependentPackageVersion

func (dc *DependencyCreate) SetDependentPackageVersion(p *PackageVersion) *DependencyCreate

SetDependentPackageVersion sets the "dependent_package_version" edge to the PackageVersion entity.

func (*DependencyCreate) SetDependentPackageVersionID

func (dc *DependencyCreate) SetDependentPackageVersionID(u uuid.UUID) *DependencyCreate

SetDependentPackageVersionID sets the "dependent_package_version_id" field.

func (*DependencyCreate) SetDocumentRef added in v0.6.0

func (dc *DependencyCreate) SetDocumentRef(s string) *DependencyCreate

SetDocumentRef sets the "document_ref" field.

func (*DependencyCreate) SetID added in v0.5.0

SetID sets the "id" field.

func (*DependencyCreate) SetJustification

func (dc *DependencyCreate) SetJustification(s string) *DependencyCreate

SetJustification sets the "justification" field.

func (*DependencyCreate) SetNillableDependentPackageNameID

func (dc *DependencyCreate) SetNillableDependentPackageNameID(u *uuid.UUID) *DependencyCreate

SetNillableDependentPackageNameID sets the "dependent_package_name_id" field if the given value is not nil.

func (*DependencyCreate) SetNillableDependentPackageVersionID

func (dc *DependencyCreate) SetNillableDependentPackageVersionID(u *uuid.UUID) *DependencyCreate

SetNillableDependentPackageVersionID sets the "dependent_package_version_id" field if the given value is not nil.

func (*DependencyCreate) SetNillableID added in v0.5.0

func (dc *DependencyCreate) SetNillableID(u *uuid.UUID) *DependencyCreate

SetNillableID sets the "id" field if the given value is not nil.

func (*DependencyCreate) SetOrigin

func (dc *DependencyCreate) SetOrigin(s string) *DependencyCreate

SetOrigin sets the "origin" field.

func (*DependencyCreate) SetPackage

func (dc *DependencyCreate) SetPackage(p *PackageVersion) *DependencyCreate

SetPackage sets the "package" edge to the PackageVersion entity.

func (*DependencyCreate) SetPackageID

func (dc *DependencyCreate) SetPackageID(u uuid.UUID) *DependencyCreate

SetPackageID sets the "package_id" field.

func (*DependencyCreate) SetVersionRange

func (dc *DependencyCreate) SetVersionRange(s string) *DependencyCreate

SetVersionRange sets the "version_range" field.

type DependencyCreateBulk

type DependencyCreateBulk struct {
	// contains filtered or unexported fields
}

DependencyCreateBulk is the builder for creating many Dependency entities in bulk.

func (*DependencyCreateBulk) Exec

func (dcb *DependencyCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*DependencyCreateBulk) ExecX

func (dcb *DependencyCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*DependencyCreateBulk) OnConflict

func (dcb *DependencyCreateBulk) OnConflict(opts ...sql.ConflictOption) *DependencyUpsertBulk

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.Dependency.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.DependencyUpsert) {
		SetPackageID(v+v).
	}).
	Exec(ctx)

func (*DependencyCreateBulk) OnConflictColumns

func (dcb *DependencyCreateBulk) OnConflictColumns(columns ...string) *DependencyUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.Dependency.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*DependencyCreateBulk) Save

func (dcb *DependencyCreateBulk) Save(ctx context.Context) ([]*Dependency, error)

Save creates the Dependency entities in the database.

func (*DependencyCreateBulk) SaveX

func (dcb *DependencyCreateBulk) SaveX(ctx context.Context) []*Dependency

SaveX is like Save, but panics if an error occurs.

type DependencyDelete

type DependencyDelete struct {
	// contains filtered or unexported fields
}

DependencyDelete is the builder for deleting a Dependency entity.

func (*DependencyDelete) Exec

func (dd *DependencyDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*DependencyDelete) ExecX

func (dd *DependencyDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*DependencyDelete) Where

Where appends a list predicates to the DependencyDelete builder.

type DependencyDeleteOne

type DependencyDeleteOne struct {
	// contains filtered or unexported fields
}

DependencyDeleteOne is the builder for deleting a single Dependency entity.

func (*DependencyDeleteOne) Exec

func (ddo *DependencyDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*DependencyDeleteOne) ExecX

func (ddo *DependencyDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*DependencyDeleteOne) Where

Where appends a list predicates to the DependencyDelete builder.

type DependencyEdge

type DependencyEdge struct {
	Node   *Dependency `json:"node"`
	Cursor Cursor      `json:"cursor"`
}

DependencyEdge is the edge representation of Dependency.

type DependencyEdges

type DependencyEdges struct {
	// Package holds the value of the package edge.
	Package *PackageVersion `json:"package,omitempty"`
	// DependentPackageName holds the value of the dependent_package_name edge.
	DependentPackageName *PackageName `json:"dependent_package_name,omitempty"`
	// DependentPackageVersion holds the value of the dependent_package_version edge.
	DependentPackageVersion *PackageVersion `json:"dependent_package_version,omitempty"`
	// IncludedInSboms holds the value of the included_in_sboms edge.
	IncludedInSboms []*BillOfMaterials `json:"included_in_sboms,omitempty"`
	// contains filtered or unexported fields
}

DependencyEdges holds the relations/edges for other nodes in the graph.

func (DependencyEdges) DependentPackageNameOrErr

func (e DependencyEdges) DependentPackageNameOrErr() (*PackageName, error)

DependentPackageNameOrErr returns the DependentPackageName value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (DependencyEdges) DependentPackageVersionOrErr

func (e DependencyEdges) DependentPackageVersionOrErr() (*PackageVersion, error)

DependentPackageVersionOrErr returns the DependentPackageVersion value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (DependencyEdges) IncludedInSbomsOrErr added in v0.4.0

func (e DependencyEdges) IncludedInSbomsOrErr() ([]*BillOfMaterials, error)

IncludedInSbomsOrErr returns the IncludedInSboms value or an error if the edge was not loaded in eager-loading.

func (DependencyEdges) PackageOrErr

func (e DependencyEdges) PackageOrErr() (*PackageVersion, error)

PackageOrErr returns the Package value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type DependencyGroupBy

type DependencyGroupBy struct {
	// contains filtered or unexported fields
}

DependencyGroupBy is the group-by builder for Dependency entities.

func (*DependencyGroupBy) Aggregate

func (dgb *DependencyGroupBy) Aggregate(fns ...AggregateFunc) *DependencyGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*DependencyGroupBy) Bool

func (s *DependencyGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*DependencyGroupBy) BoolX

func (s *DependencyGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*DependencyGroupBy) Bools

func (s *DependencyGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*DependencyGroupBy) BoolsX

func (s *DependencyGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*DependencyGroupBy) Float64

func (s *DependencyGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*DependencyGroupBy) Float64X

func (s *DependencyGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*DependencyGroupBy) Float64s

func (s *DependencyGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*DependencyGroupBy) Float64sX

func (s *DependencyGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*DependencyGroupBy) Int

func (s *DependencyGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*DependencyGroupBy) IntX

func (s *DependencyGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*DependencyGroupBy) Ints

func (s *DependencyGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*DependencyGroupBy) IntsX

func (s *DependencyGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*DependencyGroupBy) Scan

func (dgb *DependencyGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*DependencyGroupBy) ScanX

func (s *DependencyGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*DependencyGroupBy) String

func (s *DependencyGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*DependencyGroupBy) StringX

func (s *DependencyGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*DependencyGroupBy) Strings

func (s *DependencyGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*DependencyGroupBy) StringsX

func (s *DependencyGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type DependencyMutation

type DependencyMutation struct {
	// contains filtered or unexported fields
}

DependencyMutation represents an operation that mutates the Dependency nodes in the graph.

func (*DependencyMutation) AddField

func (m *DependencyMutation) AddField(name string, value ent.Value) error

AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*DependencyMutation) AddIncludedInSbomIDs added in v0.4.0

func (m *DependencyMutation) AddIncludedInSbomIDs(ids ...uuid.UUID)

AddIncludedInSbomIDs adds the "included_in_sboms" edge to the BillOfMaterials entity by ids.

func (*DependencyMutation) AddedEdges

func (m *DependencyMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*DependencyMutation) AddedField

func (m *DependencyMutation) AddedField(name string) (ent.Value, bool)

AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*DependencyMutation) AddedFields

func (m *DependencyMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*DependencyMutation) AddedIDs

func (m *DependencyMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*DependencyMutation) ClearDependentPackageName

func (m *DependencyMutation) ClearDependentPackageName()

ClearDependentPackageName clears the "dependent_package_name" edge to the PackageName entity.

func (*DependencyMutation) ClearDependentPackageNameID

func (m *DependencyMutation) ClearDependentPackageNameID()

ClearDependentPackageNameID clears the value of the "dependent_package_name_id" field.

func (*DependencyMutation) ClearDependentPackageVersion

func (m *DependencyMutation) ClearDependentPackageVersion()

ClearDependentPackageVersion clears the "dependent_package_version" edge to the PackageVersion entity.

func (*DependencyMutation) ClearDependentPackageVersionID

func (m *DependencyMutation) ClearDependentPackageVersionID()

ClearDependentPackageVersionID clears the value of the "dependent_package_version_id" field.

func (*DependencyMutation) ClearEdge

func (m *DependencyMutation) ClearEdge(name string) error

ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.

func (*DependencyMutation) ClearField

func (m *DependencyMutation) ClearField(name string) error

ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.

func (*DependencyMutation) ClearIncludedInSboms added in v0.4.0

func (m *DependencyMutation) ClearIncludedInSboms()

ClearIncludedInSboms clears the "included_in_sboms" edge to the BillOfMaterials entity.

func (*DependencyMutation) ClearPackage

func (m *DependencyMutation) ClearPackage()

ClearPackage clears the "package" edge to the PackageVersion entity.

func (*DependencyMutation) ClearedEdges

func (m *DependencyMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*DependencyMutation) ClearedFields

func (m *DependencyMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (DependencyMutation) Client

func (m DependencyMutation) Client() *Client

Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.

func (*DependencyMutation) Collector

func (m *DependencyMutation) Collector() (r string, exists bool)

Collector returns the value of the "collector" field in the mutation.

func (*DependencyMutation) DependencyType

func (m *DependencyMutation) DependencyType() (r dependency.DependencyType, exists bool)

DependencyType returns the value of the "dependency_type" field in the mutation.

func (*DependencyMutation) DependentPackageNameCleared

func (m *DependencyMutation) DependentPackageNameCleared() bool

DependentPackageNameCleared reports if the "dependent_package_name" edge to the PackageName entity was cleared.

func (*DependencyMutation) DependentPackageNameID

func (m *DependencyMutation) DependentPackageNameID() (r uuid.UUID, exists bool)

DependentPackageNameID returns the value of the "dependent_package_name_id" field in the mutation.

func (*DependencyMutation) DependentPackageNameIDCleared

func (m *DependencyMutation) DependentPackageNameIDCleared() bool

DependentPackageNameIDCleared returns if the "dependent_package_name_id" field was cleared in this mutation.

func (*DependencyMutation) DependentPackageNameIDs

func (m *DependencyMutation) DependentPackageNameIDs() (ids []uuid.UUID)

DependentPackageNameIDs returns the "dependent_package_name" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use DependentPackageNameID instead. It exists only for internal usage by the builders.

func (*DependencyMutation) DependentPackageVersionCleared

func (m *DependencyMutation) DependentPackageVersionCleared() bool

DependentPackageVersionCleared reports if the "dependent_package_version" edge to the PackageVersion entity was cleared.

func (*DependencyMutation) DependentPackageVersionID

func (m *DependencyMutation) DependentPackageVersionID() (r uuid.UUID, exists bool)

DependentPackageVersionID returns the value of the "dependent_package_version_id" field in the mutation.

func (*DependencyMutation) DependentPackageVersionIDCleared

func (m *DependencyMutation) DependentPackageVersionIDCleared() bool

DependentPackageVersionIDCleared returns if the "dependent_package_version_id" field was cleared in this mutation.

func (*DependencyMutation) DependentPackageVersionIDs

func (m *DependencyMutation) DependentPackageVersionIDs() (ids []uuid.UUID)

DependentPackageVersionIDs returns the "dependent_package_version" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use DependentPackageVersionID instead. It exists only for internal usage by the builders.

func (*DependencyMutation) DocumentRef added in v0.6.0

func (m *DependencyMutation) DocumentRef() (r string, exists bool)

DocumentRef returns the value of the "document_ref" field in the mutation.

func (*DependencyMutation) EdgeCleared

func (m *DependencyMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*DependencyMutation) Field

func (m *DependencyMutation) Field(name string) (ent.Value, bool)

Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*DependencyMutation) FieldCleared

func (m *DependencyMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*DependencyMutation) Fields

func (m *DependencyMutation) Fields() []string

Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().

func (*DependencyMutation) ID

func (m *DependencyMutation) ID() (id uuid.UUID, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*DependencyMutation) IDs

func (m *DependencyMutation) IDs(ctx context.Context) ([]uuid.UUID, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*DependencyMutation) IncludedInSbomsCleared added in v0.4.0

func (m *DependencyMutation) IncludedInSbomsCleared() bool

IncludedInSbomsCleared reports if the "included_in_sboms" edge to the BillOfMaterials entity was cleared.

func (*DependencyMutation) IncludedInSbomsIDs added in v0.4.0

func (m *DependencyMutation) IncludedInSbomsIDs() (ids []uuid.UUID)

IncludedInSbomsIDs returns the "included_in_sboms" edge IDs in the mutation.

func (*DependencyMutation) Justification

func (m *DependencyMutation) Justification() (r string, exists bool)

Justification returns the value of the "justification" field in the mutation.

func (*DependencyMutation) OldCollector

func (m *DependencyMutation) OldCollector(ctx context.Context) (v string, err error)

OldCollector returns the old "collector" field's value of the Dependency entity. If the Dependency object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DependencyMutation) OldDependencyType

func (m *DependencyMutation) OldDependencyType(ctx context.Context) (v dependency.DependencyType, err error)

OldDependencyType returns the old "dependency_type" field's value of the Dependency entity. If the Dependency object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DependencyMutation) OldDependentPackageNameID

func (m *DependencyMutation) OldDependentPackageNameID(ctx context.Context) (v uuid.UUID, err error)

OldDependentPackageNameID returns the old "dependent_package_name_id" field's value of the Dependency entity. If the Dependency object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DependencyMutation) OldDependentPackageVersionID

func (m *DependencyMutation) OldDependentPackageVersionID(ctx context.Context) (v uuid.UUID, err error)

OldDependentPackageVersionID returns the old "dependent_package_version_id" field's value of the Dependency entity. If the Dependency object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DependencyMutation) OldDocumentRef added in v0.6.0

func (m *DependencyMutation) OldDocumentRef(ctx context.Context) (v string, err error)

OldDocumentRef returns the old "document_ref" field's value of the Dependency entity. If the Dependency object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DependencyMutation) OldField

func (m *DependencyMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*DependencyMutation) OldJustification

func (m *DependencyMutation) OldJustification(ctx context.Context) (v string, err error)

OldJustification returns the old "justification" field's value of the Dependency entity. If the Dependency object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DependencyMutation) OldOrigin

func (m *DependencyMutation) OldOrigin(ctx context.Context) (v string, err error)

OldOrigin returns the old "origin" field's value of the Dependency entity. If the Dependency object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DependencyMutation) OldPackageID

func (m *DependencyMutation) OldPackageID(ctx context.Context) (v uuid.UUID, err error)

OldPackageID returns the old "package_id" field's value of the Dependency entity. If the Dependency object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DependencyMutation) OldVersionRange

func (m *DependencyMutation) OldVersionRange(ctx context.Context) (v string, err error)

OldVersionRange returns the old "version_range" field's value of the Dependency entity. If the Dependency object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DependencyMutation) Op

func (m *DependencyMutation) Op() Op

Op returns the operation name.

func (*DependencyMutation) Origin

func (m *DependencyMutation) Origin() (r string, exists bool)

Origin returns the value of the "origin" field in the mutation.

func (*DependencyMutation) PackageCleared

func (m *DependencyMutation) PackageCleared() bool

PackageCleared reports if the "package" edge to the PackageVersion entity was cleared.

func (*DependencyMutation) PackageID

func (m *DependencyMutation) PackageID() (r uuid.UUID, exists bool)

PackageID returns the value of the "package_id" field in the mutation.

func (*DependencyMutation) PackageIDs

func (m *DependencyMutation) PackageIDs() (ids []uuid.UUID)

PackageIDs returns the "package" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use PackageID instead. It exists only for internal usage by the builders.

func (*DependencyMutation) RemoveIncludedInSbomIDs added in v0.4.0

func (m *DependencyMutation) RemoveIncludedInSbomIDs(ids ...uuid.UUID)

RemoveIncludedInSbomIDs removes the "included_in_sboms" edge to the BillOfMaterials entity by IDs.

func (*DependencyMutation) RemovedEdges

func (m *DependencyMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*DependencyMutation) RemovedIDs

func (m *DependencyMutation) RemovedIDs(name string) []ent.Value

RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.

func (*DependencyMutation) RemovedIncludedInSbomsIDs added in v0.4.0

func (m *DependencyMutation) RemovedIncludedInSbomsIDs() (ids []uuid.UUID)

RemovedIncludedInSboms returns the removed IDs of the "included_in_sboms" edge to the BillOfMaterials entity.

func (*DependencyMutation) ResetCollector

func (m *DependencyMutation) ResetCollector()

ResetCollector resets all changes to the "collector" field.

func (*DependencyMutation) ResetDependencyType

func (m *DependencyMutation) ResetDependencyType()

ResetDependencyType resets all changes to the "dependency_type" field.

func (*DependencyMutation) ResetDependentPackageName

func (m *DependencyMutation) ResetDependentPackageName()

ResetDependentPackageName resets all changes to the "dependent_package_name" edge.

func (*DependencyMutation) ResetDependentPackageNameID

func (m *DependencyMutation) ResetDependentPackageNameID()

ResetDependentPackageNameID resets all changes to the "dependent_package_name_id" field.

func (*DependencyMutation) ResetDependentPackageVersion

func (m *DependencyMutation) ResetDependentPackageVersion()

ResetDependentPackageVersion resets all changes to the "dependent_package_version" edge.

func (*DependencyMutation) ResetDependentPackageVersionID

func (m *DependencyMutation) ResetDependentPackageVersionID()

ResetDependentPackageVersionID resets all changes to the "dependent_package_version_id" field.

func (*DependencyMutation) ResetDocumentRef added in v0.6.0

func (m *DependencyMutation) ResetDocumentRef()

ResetDocumentRef resets all changes to the "document_ref" field.

func (*DependencyMutation) ResetEdge

func (m *DependencyMutation) ResetEdge(name string) error

ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.

func (*DependencyMutation) ResetField

func (m *DependencyMutation) ResetField(name string) error

ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.

func (*DependencyMutation) ResetIncludedInSboms added in v0.4.0

func (m *DependencyMutation) ResetIncludedInSboms()

ResetIncludedInSboms resets all changes to the "included_in_sboms" edge.

func (*DependencyMutation) ResetJustification

func (m *DependencyMutation) ResetJustification()

ResetJustification resets all changes to the "justification" field.

func (*DependencyMutation) ResetOrigin

func (m *DependencyMutation) ResetOrigin()

ResetOrigin resets all changes to the "origin" field.

func (*DependencyMutation) ResetPackage

func (m *DependencyMutation) ResetPackage()

ResetPackage resets all changes to the "package" edge.

func (*DependencyMutation) ResetPackageID

func (m *DependencyMutation) ResetPackageID()

ResetPackageID resets all changes to the "package_id" field.

func (*DependencyMutation) ResetVersionRange

func (m *DependencyMutation) ResetVersionRange()

ResetVersionRange resets all changes to the "version_range" field.

func (*DependencyMutation) SetCollector

func (m *DependencyMutation) SetCollector(s string)

SetCollector sets the "collector" field.

func (*DependencyMutation) SetDependencyType

func (m *DependencyMutation) SetDependencyType(dt dependency.DependencyType)

SetDependencyType sets the "dependency_type" field.

func (*DependencyMutation) SetDependentPackageNameID

func (m *DependencyMutation) SetDependentPackageNameID(u uuid.UUID)

SetDependentPackageNameID sets the "dependent_package_name_id" field.

func (*DependencyMutation) SetDependentPackageVersionID

func (m *DependencyMutation) SetDependentPackageVersionID(u uuid.UUID)

SetDependentPackageVersionID sets the "dependent_package_version_id" field.

func (*DependencyMutation) SetDocumentRef added in v0.6.0

func (m *DependencyMutation) SetDocumentRef(s string)

SetDocumentRef sets the "document_ref" field.

func (*DependencyMutation) SetField

func (m *DependencyMutation) SetField(name string, value ent.Value) error

SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*DependencyMutation) SetID added in v0.5.0

func (m *DependencyMutation) SetID(id uuid.UUID)

SetID sets the value of the id field. Note that this operation is only accepted on creation of Dependency entities.

func (*DependencyMutation) SetJustification

func (m *DependencyMutation) SetJustification(s string)

SetJustification sets the "justification" field.

func (*DependencyMutation) SetOp

func (m *DependencyMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*DependencyMutation) SetOrigin

func (m *DependencyMutation) SetOrigin(s string)

SetOrigin sets the "origin" field.

func (*DependencyMutation) SetPackageID

func (m *DependencyMutation) SetPackageID(u uuid.UUID)

SetPackageID sets the "package_id" field.

func (*DependencyMutation) SetVersionRange

func (m *DependencyMutation) SetVersionRange(s string)

SetVersionRange sets the "version_range" field.

func (DependencyMutation) Tx

func (m DependencyMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*DependencyMutation) Type

func (m *DependencyMutation) Type() string

Type returns the node type of this mutation (Dependency).

func (*DependencyMutation) VersionRange

func (m *DependencyMutation) VersionRange() (r string, exists bool)

VersionRange returns the value of the "version_range" field in the mutation.

func (*DependencyMutation) Where

func (m *DependencyMutation) Where(ps ...predicate.Dependency)

Where appends a list predicates to the DependencyMutation builder.

func (*DependencyMutation) WhereP

func (m *DependencyMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the DependencyMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type DependencyOrder

type DependencyOrder struct {
	Direction OrderDirection        `json:"direction"`
	Field     *DependencyOrderField `json:"field"`
}

DependencyOrder defines the ordering of Dependency.

type DependencyOrderField

type DependencyOrderField struct {
	// Value extracts the ordering value from the given Dependency.
	Value func(*Dependency) (ent.Value, error)
	// contains filtered or unexported fields
}

DependencyOrderField defines the ordering field of Dependency.

type DependencyPaginateOption

type DependencyPaginateOption func(*dependencyPager) error

DependencyPaginateOption enables pagination customization.

func WithDependencyFilter

func WithDependencyFilter(filter func(*DependencyQuery) (*DependencyQuery, error)) DependencyPaginateOption

WithDependencyFilter configures pagination filter.

func WithDependencyOrder

func WithDependencyOrder(order *DependencyOrder) DependencyPaginateOption

WithDependencyOrder configures pagination ordering.

type DependencyQuery

type DependencyQuery struct {
	// contains filtered or unexported fields
}

DependencyQuery is the builder for querying Dependency entities.

func (*DependencyQuery) Aggregate

func (dq *DependencyQuery) Aggregate(fns ...AggregateFunc) *DependencySelect

Aggregate returns a DependencySelect configured with the given aggregations.

func (*DependencyQuery) All

func (dq *DependencyQuery) All(ctx context.Context) ([]*Dependency, error)

All executes the query and returns a list of Dependencies.

func (*DependencyQuery) AllX

func (dq *DependencyQuery) AllX(ctx context.Context) []*Dependency

AllX is like All, but panics if an error occurs.

func (*DependencyQuery) Clone

func (dq *DependencyQuery) Clone() *DependencyQuery

Clone returns a duplicate of the DependencyQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*DependencyQuery) CollectFields

func (d *DependencyQuery) CollectFields(ctx context.Context, satisfies ...string) (*DependencyQuery, error)

CollectFields tells the query-builder to eagerly load connected nodes by resolver context.

func (*DependencyQuery) Count

func (dq *DependencyQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*DependencyQuery) CountX

func (dq *DependencyQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*DependencyQuery) Exist

func (dq *DependencyQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*DependencyQuery) ExistX

func (dq *DependencyQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*DependencyQuery) First

func (dq *DependencyQuery) First(ctx context.Context) (*Dependency, error)

First returns the first Dependency entity from the query. Returns a *NotFoundError when no Dependency was found.

func (*DependencyQuery) FirstID

func (dq *DependencyQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)

FirstID returns the first Dependency ID from the query. Returns a *NotFoundError when no Dependency ID was found.

func (*DependencyQuery) FirstIDX

func (dq *DependencyQuery) FirstIDX(ctx context.Context) uuid.UUID

FirstIDX is like FirstID, but panics if an error occurs.

func (*DependencyQuery) FirstX

func (dq *DependencyQuery) FirstX(ctx context.Context) *Dependency

FirstX is like First, but panics if an error occurs.

func (*DependencyQuery) GroupBy

func (dq *DependencyQuery) GroupBy(field string, fields ...string) *DependencyGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	PackageID uuid.UUID `json:"package_id,omitempty"`
	Count int `json:"count,omitempty"`
}

client.Dependency.Query().
	GroupBy(dependency.FieldPackageID).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*DependencyQuery) IDs

func (dq *DependencyQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)

IDs executes the query and returns a list of Dependency IDs.

func (*DependencyQuery) IDsX

func (dq *DependencyQuery) IDsX(ctx context.Context) []uuid.UUID

IDsX is like IDs, but panics if an error occurs.

func (*DependencyQuery) Limit

func (dq *DependencyQuery) Limit(limit int) *DependencyQuery

Limit the number of records to be returned by this query.

func (*DependencyQuery) Offset

func (dq *DependencyQuery) Offset(offset int) *DependencyQuery

Offset to start from.

func (*DependencyQuery) Only

func (dq *DependencyQuery) Only(ctx context.Context) (*Dependency, error)

Only returns a single Dependency entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Dependency entity is found. Returns a *NotFoundError when no Dependency entities are found.

func (*DependencyQuery) OnlyID

func (dq *DependencyQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)

OnlyID is like Only, but returns the only Dependency ID in the query. Returns a *NotSingularError when more than one Dependency ID is found. Returns a *NotFoundError when no entities are found.

func (*DependencyQuery) OnlyIDX

func (dq *DependencyQuery) OnlyIDX(ctx context.Context) uuid.UUID

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*DependencyQuery) OnlyX

func (dq *DependencyQuery) OnlyX(ctx context.Context) *Dependency

OnlyX is like Only, but panics if an error occurs.

func (*DependencyQuery) Order

Order specifies how the records should be ordered.

func (*DependencyQuery) Paginate

func (d *DependencyQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...DependencyPaginateOption,
) (*DependencyConnection, error)

Paginate executes the query and returns a relay based cursor connection to Dependency.

func (*DependencyQuery) QueryDependentPackageName

func (dq *DependencyQuery) QueryDependentPackageName() *PackageNameQuery

QueryDependentPackageName chains the current query on the "dependent_package_name" edge.

func (*DependencyQuery) QueryDependentPackageVersion

func (dq *DependencyQuery) QueryDependentPackageVersion() *PackageVersionQuery

QueryDependentPackageVersion chains the current query on the "dependent_package_version" edge.

func (*DependencyQuery) QueryIncludedInSboms added in v0.4.0

func (dq *DependencyQuery) QueryIncludedInSboms() *BillOfMaterialsQuery

QueryIncludedInSboms chains the current query on the "included_in_sboms" edge.

func (*DependencyQuery) QueryPackage

func (dq *DependencyQuery) QueryPackage() *PackageVersionQuery

QueryPackage chains the current query on the "package" edge.

func (*DependencyQuery) Select

func (dq *DependencyQuery) Select(fields ...string) *DependencySelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	PackageID uuid.UUID `json:"package_id,omitempty"`
}

client.Dependency.Query().
	Select(dependency.FieldPackageID).
	Scan(ctx, &v)

func (*DependencyQuery) Unique

func (dq *DependencyQuery) Unique(unique bool) *DependencyQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*DependencyQuery) Where

Where adds a new predicate for the DependencyQuery builder.

func (*DependencyQuery) WithDependentPackageName

func (dq *DependencyQuery) WithDependentPackageName(opts ...func(*PackageNameQuery)) *DependencyQuery

WithDependentPackageName tells the query-builder to eager-load the nodes that are connected to the "dependent_package_name" edge. The optional arguments are used to configure the query builder of the edge.

func (*DependencyQuery) WithDependentPackageVersion

func (dq *DependencyQuery) WithDependentPackageVersion(opts ...func(*PackageVersionQuery)) *DependencyQuery

WithDependentPackageVersion tells the query-builder to eager-load the nodes that are connected to the "dependent_package_version" edge. The optional arguments are used to configure the query builder of the edge.

func (*DependencyQuery) WithIncludedInSboms added in v0.4.0

func (dq *DependencyQuery) WithIncludedInSboms(opts ...func(*BillOfMaterialsQuery)) *DependencyQuery

WithIncludedInSboms tells the query-builder to eager-load the nodes that are connected to the "included_in_sboms" edge. The optional arguments are used to configure the query builder of the edge.

func (*DependencyQuery) WithNamedIncludedInSboms added in v0.4.0

func (dq *DependencyQuery) WithNamedIncludedInSboms(name string, opts ...func(*BillOfMaterialsQuery)) *DependencyQuery

WithNamedIncludedInSboms tells the query-builder to eager-load the nodes that are connected to the "included_in_sboms" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*DependencyQuery) WithPackage

func (dq *DependencyQuery) WithPackage(opts ...func(*PackageVersionQuery)) *DependencyQuery

WithPackage tells the query-builder to eager-load the nodes that are connected to the "package" edge. The optional arguments are used to configure the query builder of the edge.

type DependencySelect

type DependencySelect struct {
	*DependencyQuery
	// contains filtered or unexported fields
}

DependencySelect is the builder for selecting fields of Dependency entities.

func (*DependencySelect) Aggregate

func (ds *DependencySelect) Aggregate(fns ...AggregateFunc) *DependencySelect

Aggregate adds the given aggregation functions to the selector query.

func (*DependencySelect) Bool

func (s *DependencySelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*DependencySelect) BoolX

func (s *DependencySelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*DependencySelect) Bools

func (s *DependencySelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*DependencySelect) BoolsX

func (s *DependencySelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*DependencySelect) Float64

func (s *DependencySelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*DependencySelect) Float64X

func (s *DependencySelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*DependencySelect) Float64s

func (s *DependencySelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*DependencySelect) Float64sX

func (s *DependencySelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*DependencySelect) Int

func (s *DependencySelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*DependencySelect) IntX

func (s *DependencySelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*DependencySelect) Ints

func (s *DependencySelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*DependencySelect) IntsX

func (s *DependencySelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*DependencySelect) Scan

func (ds *DependencySelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*DependencySelect) ScanX

func (s *DependencySelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*DependencySelect) String

func (s *DependencySelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*DependencySelect) StringX

func (s *DependencySelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*DependencySelect) Strings

func (s *DependencySelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*DependencySelect) StringsX

func (s *DependencySelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type DependencyUpdate

type DependencyUpdate struct {
	// contains filtered or unexported fields
}

DependencyUpdate is the builder for updating Dependency entities.

func (*DependencyUpdate) AddIncludedInSbomIDs added in v0.4.0

func (du *DependencyUpdate) AddIncludedInSbomIDs(ids ...uuid.UUID) *DependencyUpdate

AddIncludedInSbomIDs adds the "included_in_sboms" edge to the BillOfMaterials entity by IDs.

func (*DependencyUpdate) AddIncludedInSboms added in v0.4.0

func (du *DependencyUpdate) AddIncludedInSboms(b ...*BillOfMaterials) *DependencyUpdate

AddIncludedInSboms adds the "included_in_sboms" edges to the BillOfMaterials entity.

func (*DependencyUpdate) ClearDependentPackageName

func (du *DependencyUpdate) ClearDependentPackageName() *DependencyUpdate

ClearDependentPackageName clears the "dependent_package_name" edge to the PackageName entity.

func (*DependencyUpdate) ClearDependentPackageNameID

func (du *DependencyUpdate) ClearDependentPackageNameID() *DependencyUpdate

ClearDependentPackageNameID clears the value of the "dependent_package_name_id" field.

func (*DependencyUpdate) ClearDependentPackageVersion

func (du *DependencyUpdate) ClearDependentPackageVersion() *DependencyUpdate

ClearDependentPackageVersion clears the "dependent_package_version" edge to the PackageVersion entity.

func (*DependencyUpdate) ClearDependentPackageVersionID

func (du *DependencyUpdate) ClearDependentPackageVersionID() *DependencyUpdate

ClearDependentPackageVersionID clears the value of the "dependent_package_version_id" field.

func (*DependencyUpdate) ClearIncludedInSboms added in v0.4.0

func (du *DependencyUpdate) ClearIncludedInSboms() *DependencyUpdate

ClearIncludedInSboms clears all "included_in_sboms" edges to the BillOfMaterials entity.

func (*DependencyUpdate) ClearPackage

func (du *DependencyUpdate) ClearPackage() *DependencyUpdate

ClearPackage clears the "package" edge to the PackageVersion entity.

func (*DependencyUpdate) Exec

func (du *DependencyUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*DependencyUpdate) ExecX

func (du *DependencyUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*DependencyUpdate) Mutation

func (du *DependencyUpdate) Mutation() *DependencyMutation

Mutation returns the DependencyMutation object of the builder.

func (*DependencyUpdate) RemoveIncludedInSbomIDs added in v0.4.0

func (du *DependencyUpdate) RemoveIncludedInSbomIDs(ids ...uuid.UUID) *DependencyUpdate

RemoveIncludedInSbomIDs removes the "included_in_sboms" edge to BillOfMaterials entities by IDs.

func (*DependencyUpdate) RemoveIncludedInSboms added in v0.4.0

func (du *DependencyUpdate) RemoveIncludedInSboms(b ...*BillOfMaterials) *DependencyUpdate

RemoveIncludedInSboms removes "included_in_sboms" edges to BillOfMaterials entities.

func (*DependencyUpdate) Save

func (du *DependencyUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*DependencyUpdate) SaveX

func (du *DependencyUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*DependencyUpdate) SetCollector

func (du *DependencyUpdate) SetCollector(s string) *DependencyUpdate

SetCollector sets the "collector" field.

func (*DependencyUpdate) SetDependencyType

func (du *DependencyUpdate) SetDependencyType(dt dependency.DependencyType) *DependencyUpdate

SetDependencyType sets the "dependency_type" field.

func (*DependencyUpdate) SetDependentPackageName

func (du *DependencyUpdate) SetDependentPackageName(p *PackageName) *DependencyUpdate

SetDependentPackageName sets the "dependent_package_name" edge to the PackageName entity.

func (*DependencyUpdate) SetDependentPackageNameID

func (du *DependencyUpdate) SetDependentPackageNameID(u uuid.UUID) *DependencyUpdate

SetDependentPackageNameID sets the "dependent_package_name_id" field.

func (*DependencyUpdate) SetDependentPackageVersion

func (du *DependencyUpdate) SetDependentPackageVersion(p *PackageVersion) *DependencyUpdate

SetDependentPackageVersion sets the "dependent_package_version" edge to the PackageVersion entity.

func (*DependencyUpdate) SetDependentPackageVersionID

func (du *DependencyUpdate) SetDependentPackageVersionID(u uuid.UUID) *DependencyUpdate

SetDependentPackageVersionID sets the "dependent_package_version_id" field.

func (*DependencyUpdate) SetDocumentRef added in v0.6.0

func (du *DependencyUpdate) SetDocumentRef(s string) *DependencyUpdate

SetDocumentRef sets the "document_ref" field.

func (*DependencyUpdate) SetJustification

func (du *DependencyUpdate) SetJustification(s string) *DependencyUpdate

SetJustification sets the "justification" field.

func (*DependencyUpdate) SetNillableCollector added in v0.4.0

func (du *DependencyUpdate) SetNillableCollector(s *string) *DependencyUpdate

SetNillableCollector sets the "collector" field if the given value is not nil.

func (*DependencyUpdate) SetNillableDependencyType added in v0.4.0

func (du *DependencyUpdate) SetNillableDependencyType(dt *dependency.DependencyType) *DependencyUpdate

SetNillableDependencyType sets the "dependency_type" field if the given value is not nil.

func (*DependencyUpdate) SetNillableDependentPackageNameID

func (du *DependencyUpdate) SetNillableDependentPackageNameID(u *uuid.UUID) *DependencyUpdate

SetNillableDependentPackageNameID sets the "dependent_package_name_id" field if the given value is not nil.

func (*DependencyUpdate) SetNillableDependentPackageVersionID

func (du *DependencyUpdate) SetNillableDependentPackageVersionID(u *uuid.UUID) *DependencyUpdate

SetNillableDependentPackageVersionID sets the "dependent_package_version_id" field if the given value is not nil.

func (*DependencyUpdate) SetNillableDocumentRef added in v0.6.0

func (du *DependencyUpdate) SetNillableDocumentRef(s *string) *DependencyUpdate

SetNillableDocumentRef sets the "document_ref" field if the given value is not nil.

func (*DependencyUpdate) SetNillableJustification added in v0.4.0

func (du *DependencyUpdate) SetNillableJustification(s *string) *DependencyUpdate

SetNillableJustification sets the "justification" field if the given value is not nil.

func (*DependencyUpdate) SetNillableOrigin added in v0.4.0

func (du *DependencyUpdate) SetNillableOrigin(s *string) *DependencyUpdate

SetNillableOrigin sets the "origin" field if the given value is not nil.

func (*DependencyUpdate) SetNillablePackageID added in v0.4.0

func (du *DependencyUpdate) SetNillablePackageID(u *uuid.UUID) *DependencyUpdate

SetNillablePackageID sets the "package_id" field if the given value is not nil.

func (*DependencyUpdate) SetNillableVersionRange added in v0.4.0

func (du *DependencyUpdate) SetNillableVersionRange(s *string) *DependencyUpdate

SetNillableVersionRange sets the "version_range" field if the given value is not nil.

func (*DependencyUpdate) SetOrigin

func (du *DependencyUpdate) SetOrigin(s string) *DependencyUpdate

SetOrigin sets the "origin" field.

func (*DependencyUpdate) SetPackage

func (du *DependencyUpdate) SetPackage(p *PackageVersion) *DependencyUpdate

SetPackage sets the "package" edge to the PackageVersion entity.

func (*DependencyUpdate) SetPackageID

func (du *DependencyUpdate) SetPackageID(u uuid.UUID) *DependencyUpdate

SetPackageID sets the "package_id" field.

func (*DependencyUpdate) SetVersionRange

func (du *DependencyUpdate) SetVersionRange(s string) *DependencyUpdate

SetVersionRange sets the "version_range" field.

func (*DependencyUpdate) Where

Where appends a list predicates to the DependencyUpdate builder.

type DependencyUpdateOne

type DependencyUpdateOne struct {
	// contains filtered or unexported fields
}

DependencyUpdateOne is the builder for updating a single Dependency entity.

func (*DependencyUpdateOne) AddIncludedInSbomIDs added in v0.4.0

func (duo *DependencyUpdateOne) AddIncludedInSbomIDs(ids ...uuid.UUID) *DependencyUpdateOne

AddIncludedInSbomIDs adds the "included_in_sboms" edge to the BillOfMaterials entity by IDs.

func (*DependencyUpdateOne) AddIncludedInSboms added in v0.4.0

func (duo *DependencyUpdateOne) AddIncludedInSboms(b ...*BillOfMaterials) *DependencyUpdateOne

AddIncludedInSboms adds the "included_in_sboms" edges to the BillOfMaterials entity.

func (*DependencyUpdateOne) ClearDependentPackageName

func (duo *DependencyUpdateOne) ClearDependentPackageName() *DependencyUpdateOne

ClearDependentPackageName clears the "dependent_package_name" edge to the PackageName entity.

func (*DependencyUpdateOne) ClearDependentPackageNameID

func (duo *DependencyUpdateOne) ClearDependentPackageNameID() *DependencyUpdateOne

ClearDependentPackageNameID clears the value of the "dependent_package_name_id" field.

func (*DependencyUpdateOne) ClearDependentPackageVersion

func (duo *DependencyUpdateOne) ClearDependentPackageVersion() *DependencyUpdateOne

ClearDependentPackageVersion clears the "dependent_package_version" edge to the PackageVersion entity.

func (*DependencyUpdateOne) ClearDependentPackageVersionID

func (duo *DependencyUpdateOne) ClearDependentPackageVersionID() *DependencyUpdateOne

ClearDependentPackageVersionID clears the value of the "dependent_package_version_id" field.

func (*DependencyUpdateOne) ClearIncludedInSboms added in v0.4.0

func (duo *DependencyUpdateOne) ClearIncludedInSboms() *DependencyUpdateOne

ClearIncludedInSboms clears all "included_in_sboms" edges to the BillOfMaterials entity.

func (*DependencyUpdateOne) ClearPackage

func (duo *DependencyUpdateOne) ClearPackage() *DependencyUpdateOne

ClearPackage clears the "package" edge to the PackageVersion entity.

func (*DependencyUpdateOne) Exec

func (duo *DependencyUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*DependencyUpdateOne) ExecX

func (duo *DependencyUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*DependencyUpdateOne) Mutation

func (duo *DependencyUpdateOne) Mutation() *DependencyMutation

Mutation returns the DependencyMutation object of the builder.

func (*DependencyUpdateOne) RemoveIncludedInSbomIDs added in v0.4.0

func (duo *DependencyUpdateOne) RemoveIncludedInSbomIDs(ids ...uuid.UUID) *DependencyUpdateOne

RemoveIncludedInSbomIDs removes the "included_in_sboms" edge to BillOfMaterials entities by IDs.

func (*DependencyUpdateOne) RemoveIncludedInSboms added in v0.4.0

func (duo *DependencyUpdateOne) RemoveIncludedInSboms(b ...*BillOfMaterials) *DependencyUpdateOne

RemoveIncludedInSboms removes "included_in_sboms" edges to BillOfMaterials entities.

func (*DependencyUpdateOne) Save

func (duo *DependencyUpdateOne) Save(ctx context.Context) (*Dependency, error)

Save executes the query and returns the updated Dependency entity.

func (*DependencyUpdateOne) SaveX

func (duo *DependencyUpdateOne) SaveX(ctx context.Context) *Dependency

SaveX is like Save, but panics if an error occurs.

func (*DependencyUpdateOne) Select

func (duo *DependencyUpdateOne) Select(field string, fields ...string) *DependencyUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*DependencyUpdateOne) SetCollector

func (duo *DependencyUpdateOne) SetCollector(s string) *DependencyUpdateOne

SetCollector sets the "collector" field.

func (*DependencyUpdateOne) SetDependencyType

SetDependencyType sets the "dependency_type" field.

func (*DependencyUpdateOne) SetDependentPackageName

func (duo *DependencyUpdateOne) SetDependentPackageName(p *PackageName) *DependencyUpdateOne

SetDependentPackageName sets the "dependent_package_name" edge to the PackageName entity.

func (*DependencyUpdateOne) SetDependentPackageNameID

func (duo *DependencyUpdateOne) SetDependentPackageNameID(u uuid.UUID) *DependencyUpdateOne

SetDependentPackageNameID sets the "dependent_package_name_id" field.

func (*DependencyUpdateOne) SetDependentPackageVersion

func (duo *DependencyUpdateOne) SetDependentPackageVersion(p *PackageVersion) *DependencyUpdateOne

SetDependentPackageVersion sets the "dependent_package_version" edge to the PackageVersion entity.

func (*DependencyUpdateOne) SetDependentPackageVersionID

func (duo *DependencyUpdateOne) SetDependentPackageVersionID(u uuid.UUID) *DependencyUpdateOne

SetDependentPackageVersionID sets the "dependent_package_version_id" field.

func (*DependencyUpdateOne) SetDocumentRef added in v0.6.0

func (duo *DependencyUpdateOne) SetDocumentRef(s string) *DependencyUpdateOne

SetDocumentRef sets the "document_ref" field.

func (*DependencyUpdateOne) SetJustification

func (duo *DependencyUpdateOne) SetJustification(s string) *DependencyUpdateOne

SetJustification sets the "justification" field.

func (*DependencyUpdateOne) SetNillableCollector added in v0.4.0

func (duo *DependencyUpdateOne) SetNillableCollector(s *string) *DependencyUpdateOne

SetNillableCollector sets the "collector" field if the given value is not nil.

func (*DependencyUpdateOne) SetNillableDependencyType added in v0.4.0

func (duo *DependencyUpdateOne) SetNillableDependencyType(dt *dependency.DependencyType) *DependencyUpdateOne

SetNillableDependencyType sets the "dependency_type" field if the given value is not nil.

func (*DependencyUpdateOne) SetNillableDependentPackageNameID

func (duo *DependencyUpdateOne) SetNillableDependentPackageNameID(u *uuid.UUID) *DependencyUpdateOne

SetNillableDependentPackageNameID sets the "dependent_package_name_id" field if the given value is not nil.

func (*DependencyUpdateOne) SetNillableDependentPackageVersionID

func (duo *DependencyUpdateOne) SetNillableDependentPackageVersionID(u *uuid.UUID) *DependencyUpdateOne

SetNillableDependentPackageVersionID sets the "dependent_package_version_id" field if the given value is not nil.

func (*DependencyUpdateOne) SetNillableDocumentRef added in v0.6.0

func (duo *DependencyUpdateOne) SetNillableDocumentRef(s *string) *DependencyUpdateOne

SetNillableDocumentRef sets the "document_ref" field if the given value is not nil.

func (*DependencyUpdateOne) SetNillableJustification added in v0.4.0

func (duo *DependencyUpdateOne) SetNillableJustification(s *string) *DependencyUpdateOne

SetNillableJustification sets the "justification" field if the given value is not nil.

func (*DependencyUpdateOne) SetNillableOrigin added in v0.4.0

func (duo *DependencyUpdateOne) SetNillableOrigin(s *string) *DependencyUpdateOne

SetNillableOrigin sets the "origin" field if the given value is not nil.

func (*DependencyUpdateOne) SetNillablePackageID added in v0.4.0

func (duo *DependencyUpdateOne) SetNillablePackageID(u *uuid.UUID) *DependencyUpdateOne

SetNillablePackageID sets the "package_id" field if the given value is not nil.

func (*DependencyUpdateOne) SetNillableVersionRange added in v0.4.0

func (duo *DependencyUpdateOne) SetNillableVersionRange(s *string) *DependencyUpdateOne

SetNillableVersionRange sets the "version_range" field if the given value is not nil.

func (*DependencyUpdateOne) SetOrigin

func (duo *DependencyUpdateOne) SetOrigin(s string) *DependencyUpdateOne

SetOrigin sets the "origin" field.

func (*DependencyUpdateOne) SetPackage

SetPackage sets the "package" edge to the PackageVersion entity.

func (*DependencyUpdateOne) SetPackageID

func (duo *DependencyUpdateOne) SetPackageID(u uuid.UUID) *DependencyUpdateOne

SetPackageID sets the "package_id" field.

func (*DependencyUpdateOne) SetVersionRange

func (duo *DependencyUpdateOne) SetVersionRange(s string) *DependencyUpdateOne

SetVersionRange sets the "version_range" field.

func (*DependencyUpdateOne) Where

Where appends a list predicates to the DependencyUpdate builder.

type DependencyUpsert

type DependencyUpsert struct {
	*sql.UpdateSet
}

DependencyUpsert is the "OnConflict" setter.

func (*DependencyUpsert) ClearDependentPackageNameID

func (u *DependencyUpsert) ClearDependentPackageNameID() *DependencyUpsert

ClearDependentPackageNameID clears the value of the "dependent_package_name_id" field.

func (*DependencyUpsert) ClearDependentPackageVersionID

func (u *DependencyUpsert) ClearDependentPackageVersionID() *DependencyUpsert

ClearDependentPackageVersionID clears the value of the "dependent_package_version_id" field.

func (*DependencyUpsert) SetCollector

func (u *DependencyUpsert) SetCollector(v string) *DependencyUpsert

SetCollector sets the "collector" field.

func (*DependencyUpsert) SetDependencyType

SetDependencyType sets the "dependency_type" field.

func (*DependencyUpsert) SetDependentPackageNameID

func (u *DependencyUpsert) SetDependentPackageNameID(v uuid.UUID) *DependencyUpsert

SetDependentPackageNameID sets the "dependent_package_name_id" field.

func (*DependencyUpsert) SetDependentPackageVersionID

func (u *DependencyUpsert) SetDependentPackageVersionID(v uuid.UUID) *DependencyUpsert

SetDependentPackageVersionID sets the "dependent_package_version_id" field.

func (*DependencyUpsert) SetDocumentRef added in v0.6.0

func (u *DependencyUpsert) SetDocumentRef(v string) *DependencyUpsert

SetDocumentRef sets the "document_ref" field.

func (*DependencyUpsert) SetJustification

func (u *DependencyUpsert) SetJustification(v string) *DependencyUpsert

SetJustification sets the "justification" field.

func (*DependencyUpsert) SetOrigin

func (u *DependencyUpsert) SetOrigin(v string) *DependencyUpsert

SetOrigin sets the "origin" field.

func (*DependencyUpsert) SetPackageID

func (u *DependencyUpsert) SetPackageID(v uuid.UUID) *DependencyUpsert

SetPackageID sets the "package_id" field.

func (*DependencyUpsert) SetVersionRange

func (u *DependencyUpsert) SetVersionRange(v string) *DependencyUpsert

SetVersionRange sets the "version_range" field.

func (*DependencyUpsert) UpdateCollector

func (u *DependencyUpsert) UpdateCollector() *DependencyUpsert

UpdateCollector sets the "collector" field to the value that was provided on create.

func (*DependencyUpsert) UpdateDependencyType

func (u *DependencyUpsert) UpdateDependencyType() *DependencyUpsert

UpdateDependencyType sets the "dependency_type" field to the value that was provided on create.

func (*DependencyUpsert) UpdateDependentPackageNameID

func (u *DependencyUpsert) UpdateDependentPackageNameID() *DependencyUpsert

UpdateDependentPackageNameID sets the "dependent_package_name_id" field to the value that was provided on create.

func (*DependencyUpsert) UpdateDependentPackageVersionID

func (u *DependencyUpsert) UpdateDependentPackageVersionID() *DependencyUpsert

UpdateDependentPackageVersionID sets the "dependent_package_version_id" field to the value that was provided on create.

func (*DependencyUpsert) UpdateDocumentRef added in v0.6.0

func (u *DependencyUpsert) UpdateDocumentRef() *DependencyUpsert

UpdateDocumentRef sets the "document_ref" field to the value that was provided on create.

func (*DependencyUpsert) UpdateJustification

func (u *DependencyUpsert) UpdateJustification() *DependencyUpsert

UpdateJustification sets the "justification" field to the value that was provided on create.

func (*DependencyUpsert) UpdateOrigin

func (u *DependencyUpsert) UpdateOrigin() *DependencyUpsert

UpdateOrigin sets the "origin" field to the value that was provided on create.

func (*DependencyUpsert) UpdatePackageID

func (u *DependencyUpsert) UpdatePackageID() *DependencyUpsert

UpdatePackageID sets the "package_id" field to the value that was provided on create.

func (*DependencyUpsert) UpdateVersionRange

func (u *DependencyUpsert) UpdateVersionRange() *DependencyUpsert

UpdateVersionRange sets the "version_range" field to the value that was provided on create.

type DependencyUpsertBulk

type DependencyUpsertBulk struct {
	// contains filtered or unexported fields
}

DependencyUpsertBulk is the builder for "upsert"-ing a bulk of Dependency nodes.

func (*DependencyUpsertBulk) ClearDependentPackageNameID

func (u *DependencyUpsertBulk) ClearDependentPackageNameID() *DependencyUpsertBulk

ClearDependentPackageNameID clears the value of the "dependent_package_name_id" field.

func (*DependencyUpsertBulk) ClearDependentPackageVersionID

func (u *DependencyUpsertBulk) ClearDependentPackageVersionID() *DependencyUpsertBulk

ClearDependentPackageVersionID clears the value of the "dependent_package_version_id" field.

func (*DependencyUpsertBulk) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*DependencyUpsertBulk) Exec

Exec executes the query.

func (*DependencyUpsertBulk) ExecX

func (u *DependencyUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*DependencyUpsertBulk) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Dependency.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*DependencyUpsertBulk) SetCollector

func (u *DependencyUpsertBulk) SetCollector(v string) *DependencyUpsertBulk

SetCollector sets the "collector" field.

func (*DependencyUpsertBulk) SetDependencyType

SetDependencyType sets the "dependency_type" field.

func (*DependencyUpsertBulk) SetDependentPackageNameID

func (u *DependencyUpsertBulk) SetDependentPackageNameID(v uuid.UUID) *DependencyUpsertBulk

SetDependentPackageNameID sets the "dependent_package_name_id" field.

func (*DependencyUpsertBulk) SetDependentPackageVersionID

func (u *DependencyUpsertBulk) SetDependentPackageVersionID(v uuid.UUID) *DependencyUpsertBulk

SetDependentPackageVersionID sets the "dependent_package_version_id" field.

func (*DependencyUpsertBulk) SetDocumentRef added in v0.6.0

func (u *DependencyUpsertBulk) SetDocumentRef(v string) *DependencyUpsertBulk

SetDocumentRef sets the "document_ref" field.

func (*DependencyUpsertBulk) SetJustification

func (u *DependencyUpsertBulk) SetJustification(v string) *DependencyUpsertBulk

SetJustification sets the "justification" field.

func (*DependencyUpsertBulk) SetOrigin

SetOrigin sets the "origin" field.

func (*DependencyUpsertBulk) SetPackageID

func (u *DependencyUpsertBulk) SetPackageID(v uuid.UUID) *DependencyUpsertBulk

SetPackageID sets the "package_id" field.

func (*DependencyUpsertBulk) SetVersionRange

func (u *DependencyUpsertBulk) SetVersionRange(v string) *DependencyUpsertBulk

SetVersionRange sets the "version_range" field.

func (*DependencyUpsertBulk) Update

Update allows overriding fields `UPDATE` values. See the DependencyCreateBulk.OnConflict documentation for more info.

func (*DependencyUpsertBulk) UpdateCollector

func (u *DependencyUpsertBulk) UpdateCollector() *DependencyUpsertBulk

UpdateCollector sets the "collector" field to the value that was provided on create.

func (*DependencyUpsertBulk) UpdateDependencyType

func (u *DependencyUpsertBulk) UpdateDependencyType() *DependencyUpsertBulk

UpdateDependencyType sets the "dependency_type" field to the value that was provided on create.

func (*DependencyUpsertBulk) UpdateDependentPackageNameID

func (u *DependencyUpsertBulk) UpdateDependentPackageNameID() *DependencyUpsertBulk

UpdateDependentPackageNameID sets the "dependent_package_name_id" field to the value that was provided on create.

func (*DependencyUpsertBulk) UpdateDependentPackageVersionID

func (u *DependencyUpsertBulk) UpdateDependentPackageVersionID() *DependencyUpsertBulk

UpdateDependentPackageVersionID sets the "dependent_package_version_id" field to the value that was provided on create.

func (*DependencyUpsertBulk) UpdateDocumentRef added in v0.6.0

func (u *DependencyUpsertBulk) UpdateDocumentRef() *DependencyUpsertBulk

UpdateDocumentRef sets the "document_ref" field to the value that was provided on create.

func (*DependencyUpsertBulk) UpdateJustification

func (u *DependencyUpsertBulk) UpdateJustification() *DependencyUpsertBulk

UpdateJustification sets the "justification" field to the value that was provided on create.

func (*DependencyUpsertBulk) UpdateNewValues

func (u *DependencyUpsertBulk) UpdateNewValues() *DependencyUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.Dependency.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(dependency.FieldID)
		}),
	).
	Exec(ctx)

func (*DependencyUpsertBulk) UpdateOrigin

func (u *DependencyUpsertBulk) UpdateOrigin() *DependencyUpsertBulk

UpdateOrigin sets the "origin" field to the value that was provided on create.

func (*DependencyUpsertBulk) UpdatePackageID

func (u *DependencyUpsertBulk) UpdatePackageID() *DependencyUpsertBulk

UpdatePackageID sets the "package_id" field to the value that was provided on create.

func (*DependencyUpsertBulk) UpdateVersionRange

func (u *DependencyUpsertBulk) UpdateVersionRange() *DependencyUpsertBulk

UpdateVersionRange sets the "version_range" field to the value that was provided on create.

type DependencyUpsertOne

type DependencyUpsertOne struct {
	// contains filtered or unexported fields
}

DependencyUpsertOne is the builder for "upsert"-ing

one Dependency node.

func (*DependencyUpsertOne) ClearDependentPackageNameID

func (u *DependencyUpsertOne) ClearDependentPackageNameID() *DependencyUpsertOne

ClearDependentPackageNameID clears the value of the "dependent_package_name_id" field.

func (*DependencyUpsertOne) ClearDependentPackageVersionID

func (u *DependencyUpsertOne) ClearDependentPackageVersionID() *DependencyUpsertOne

ClearDependentPackageVersionID clears the value of the "dependent_package_version_id" field.

func (*DependencyUpsertOne) DoNothing

func (u *DependencyUpsertOne) DoNothing() *DependencyUpsertOne

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*DependencyUpsertOne) Exec

Exec executes the query.

func (*DependencyUpsertOne) ExecX

func (u *DependencyUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*DependencyUpsertOne) ID

func (u *DependencyUpsertOne) ID(ctx context.Context) (id uuid.UUID, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*DependencyUpsertOne) IDX

IDX is like ID, but panics if an error occurs.

func (*DependencyUpsertOne) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Dependency.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*DependencyUpsertOne) SetCollector

func (u *DependencyUpsertOne) SetCollector(v string) *DependencyUpsertOne

SetCollector sets the "collector" field.

func (*DependencyUpsertOne) SetDependencyType

SetDependencyType sets the "dependency_type" field.

func (*DependencyUpsertOne) SetDependentPackageNameID

func (u *DependencyUpsertOne) SetDependentPackageNameID(v uuid.UUID) *DependencyUpsertOne

SetDependentPackageNameID sets the "dependent_package_name_id" field.

func (*DependencyUpsertOne) SetDependentPackageVersionID

func (u *DependencyUpsertOne) SetDependentPackageVersionID(v uuid.UUID) *DependencyUpsertOne

SetDependentPackageVersionID sets the "dependent_package_version_id" field.

func (*DependencyUpsertOne) SetDocumentRef added in v0.6.0

func (u *DependencyUpsertOne) SetDocumentRef(v string) *DependencyUpsertOne

SetDocumentRef sets the "document_ref" field.

func (*DependencyUpsertOne) SetJustification

func (u *DependencyUpsertOne) SetJustification(v string) *DependencyUpsertOne

SetJustification sets the "justification" field.

func (*DependencyUpsertOne) SetOrigin

SetOrigin sets the "origin" field.

func (*DependencyUpsertOne) SetPackageID

func (u *DependencyUpsertOne) SetPackageID(v uuid.UUID) *DependencyUpsertOne

SetPackageID sets the "package_id" field.

func (*DependencyUpsertOne) SetVersionRange

func (u *DependencyUpsertOne) SetVersionRange(v string) *DependencyUpsertOne

SetVersionRange sets the "version_range" field.

func (*DependencyUpsertOne) Update

Update allows overriding fields `UPDATE` values. See the DependencyCreate.OnConflict documentation for more info.

func (*DependencyUpsertOne) UpdateCollector

func (u *DependencyUpsertOne) UpdateCollector() *DependencyUpsertOne

UpdateCollector sets the "collector" field to the value that was provided on create.

func (*DependencyUpsertOne) UpdateDependencyType

func (u *DependencyUpsertOne) UpdateDependencyType() *DependencyUpsertOne

UpdateDependencyType sets the "dependency_type" field to the value that was provided on create.

func (*DependencyUpsertOne) UpdateDependentPackageNameID

func (u *DependencyUpsertOne) UpdateDependentPackageNameID() *DependencyUpsertOne

UpdateDependentPackageNameID sets the "dependent_package_name_id" field to the value that was provided on create.

func (*DependencyUpsertOne) UpdateDependentPackageVersionID

func (u *DependencyUpsertOne) UpdateDependentPackageVersionID() *DependencyUpsertOne

UpdateDependentPackageVersionID sets the "dependent_package_version_id" field to the value that was provided on create.

func (*DependencyUpsertOne) UpdateDocumentRef added in v0.6.0

func (u *DependencyUpsertOne) UpdateDocumentRef() *DependencyUpsertOne

UpdateDocumentRef sets the "document_ref" field to the value that was provided on create.

func (*DependencyUpsertOne) UpdateJustification

func (u *DependencyUpsertOne) UpdateJustification() *DependencyUpsertOne

UpdateJustification sets the "justification" field to the value that was provided on create.

func (*DependencyUpsertOne) UpdateNewValues

func (u *DependencyUpsertOne) UpdateNewValues() *DependencyUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:

client.Dependency.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(dependency.FieldID)
		}),
	).
	Exec(ctx)

func (*DependencyUpsertOne) UpdateOrigin

func (u *DependencyUpsertOne) UpdateOrigin() *DependencyUpsertOne

UpdateOrigin sets the "origin" field to the value that was provided on create.

func (*DependencyUpsertOne) UpdatePackageID

func (u *DependencyUpsertOne) UpdatePackageID() *DependencyUpsertOne

UpdatePackageID sets the "package_id" field to the value that was provided on create.

func (*DependencyUpsertOne) UpdateVersionRange

func (u *DependencyUpsertOne) UpdateVersionRange() *DependencyUpsertOne

UpdateVersionRange sets the "version_range" field to the value that was provided on create.

type HasMetadata added in v0.2.1

type HasMetadata struct {

	// ID of the ent.
	ID uuid.UUID `json:"id,omitempty"`
	// SourceID holds the value of the "source_id" field.
	SourceID *uuid.UUID `json:"source_id,omitempty"`
	// PackageVersionID holds the value of the "package_version_id" field.
	PackageVersionID *uuid.UUID `json:"package_version_id,omitempty"`
	// PackageNameID holds the value of the "package_name_id" field.
	PackageNameID *uuid.UUID `json:"package_name_id,omitempty"`
	// ArtifactID holds the value of the "artifact_id" field.
	ArtifactID *uuid.UUID `json:"artifact_id,omitempty"`
	// Timestamp holds the value of the "timestamp" field.
	Timestamp time.Time `json:"timestamp,omitempty"`
	// Key holds the value of the "key" field.
	Key string `json:"key,omitempty"`
	// Value holds the value of the "value" field.
	Value string `json:"value,omitempty"`
	// Justification holds the value of the "justification" field.
	Justification string `json:"justification,omitempty"`
	// Origin holds the value of the "origin" field.
	Origin string `json:"origin,omitempty"`
	// Collector holds the value of the "collector" field.
	Collector string `json:"collector,omitempty"`
	// DocumentRef holds the value of the "document_ref" field.
	DocumentRef string `json:"document_ref,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the HasMetadataQuery when eager-loading is set.
	Edges HasMetadataEdges `json:"edges"`
	// contains filtered or unexported fields
}

HasMetadata is the model entity for the HasMetadata schema.

func (*HasMetadata) AllVersions added in v0.2.1

func (hm *HasMetadata) AllVersions(ctx context.Context) (*PackageName, error)

func (*HasMetadata) Artifact added in v0.2.1

func (hm *HasMetadata) Artifact(ctx context.Context) (*Artifact, error)

func (*HasMetadata) GetValue added in v0.2.1

func (hm *HasMetadata) GetValue(name string) (ent.Value, error)

GetValue returns the ent.Value that was dynamically selected and assigned to the HasMetadata. This includes values selected through modifiers, order, etc.

func (*HasMetadata) IsNode added in v0.2.1

func (n *HasMetadata) IsNode()

IsNode implements the Node interface check for GQLGen.

func (*HasMetadata) PackageVersion added in v0.2.1

func (hm *HasMetadata) PackageVersion(ctx context.Context) (*PackageVersion, error)

func (*HasMetadata) QueryAllVersions added in v0.2.1

func (hm *HasMetadata) QueryAllVersions() *PackageNameQuery

QueryAllVersions queries the "all_versions" edge of the HasMetadata entity.

func (*HasMetadata) QueryArtifact added in v0.2.1

func (hm *HasMetadata) QueryArtifact() *ArtifactQuery

QueryArtifact queries the "artifact" edge of the HasMetadata entity.

func (*HasMetadata) QueryPackageVersion added in v0.2.1

func (hm *HasMetadata) QueryPackageVersion() *PackageVersionQuery

QueryPackageVersion queries the "package_version" edge of the HasMetadata entity.

func (*HasMetadata) QuerySource added in v0.2.1

func (hm *HasMetadata) QuerySource() *SourceNameQuery

QuerySource queries the "source" edge of the HasMetadata entity.

func (*HasMetadata) Source added in v0.2.1

func (hm *HasMetadata) Source(ctx context.Context) (*SourceName, error)

func (*HasMetadata) String added in v0.2.1

func (hm *HasMetadata) String() string

String implements the fmt.Stringer.

func (*HasMetadata) ToEdge added in v0.2.1

func (hm *HasMetadata) ToEdge(order *HasMetadataOrder) *HasMetadataEdge

ToEdge converts HasMetadata into HasMetadataEdge.

func (*HasMetadata) Unwrap added in v0.2.1

func (hm *HasMetadata) Unwrap() *HasMetadata

Unwrap unwraps the HasMetadata entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.

func (*HasMetadata) Update added in v0.2.1

func (hm *HasMetadata) Update() *HasMetadataUpdateOne

Update returns a builder for updating this HasMetadata. Note that you need to call HasMetadata.Unwrap() before calling this method if this HasMetadata was returned from a transaction, and the transaction was committed or rolled back.

type HasMetadataClient added in v0.2.1

type HasMetadataClient struct {
	// contains filtered or unexported fields
}

HasMetadataClient is a client for the HasMetadata schema.

func NewHasMetadataClient added in v0.2.1

func NewHasMetadataClient(c config) *HasMetadataClient

NewHasMetadataClient returns a client for the HasMetadata from the given config.

func (*HasMetadataClient) Create added in v0.2.1

func (c *HasMetadataClient) Create() *HasMetadataCreate

Create returns a builder for creating a HasMetadata entity.

func (*HasMetadataClient) CreateBulk added in v0.2.1

func (c *HasMetadataClient) CreateBulk(builders ...*HasMetadataCreate) *HasMetadataCreateBulk

CreateBulk returns a builder for creating a bulk of HasMetadata entities.

func (*HasMetadataClient) Delete added in v0.2.1

func (c *HasMetadataClient) Delete() *HasMetadataDelete

Delete returns a delete builder for HasMetadata.

func (*HasMetadataClient) DeleteOne added in v0.2.1

DeleteOne returns a builder for deleting the given entity.

func (*HasMetadataClient) DeleteOneID added in v0.2.1

func (c *HasMetadataClient) DeleteOneID(id uuid.UUID) *HasMetadataDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*HasMetadataClient) Get added in v0.2.1

Get returns a HasMetadata entity by its id.

func (*HasMetadataClient) GetX added in v0.2.1

GetX is like Get, but panics if an error occurs.

func (*HasMetadataClient) Hooks added in v0.2.1

func (c *HasMetadataClient) Hooks() []Hook

Hooks returns the client hooks.

func (*HasMetadataClient) Intercept added in v0.2.1

func (c *HasMetadataClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `hasmetadata.Intercept(f(g(h())))`.

func (*HasMetadataClient) Interceptors added in v0.2.1

func (c *HasMetadataClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*HasMetadataClient) MapCreateBulk added in v0.2.1

func (c *HasMetadataClient) MapCreateBulk(slice any, setFunc func(*HasMetadataCreate, int)) *HasMetadataCreateBulk

MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.

func (*HasMetadataClient) Query added in v0.2.1

func (c *HasMetadataClient) Query() *HasMetadataQuery

Query returns a query builder for HasMetadata.

func (*HasMetadataClient) QueryAllVersions added in v0.2.1

func (c *HasMetadataClient) QueryAllVersions(hm *HasMetadata) *PackageNameQuery

QueryAllVersions queries the all_versions edge of a HasMetadata.

func (*HasMetadataClient) QueryArtifact added in v0.2.1

func (c *HasMetadataClient) QueryArtifact(hm *HasMetadata) *ArtifactQuery

QueryArtifact queries the artifact edge of a HasMetadata.

func (*HasMetadataClient) QueryPackageVersion added in v0.2.1

func (c *HasMetadataClient) QueryPackageVersion(hm *HasMetadata) *PackageVersionQuery

QueryPackageVersion queries the package_version edge of a HasMetadata.

func (*HasMetadataClient) QuerySource added in v0.2.1

func (c *HasMetadataClient) QuerySource(hm *HasMetadata) *SourceNameQuery

QuerySource queries the source edge of a HasMetadata.

func (*HasMetadataClient) Update added in v0.2.1

func (c *HasMetadataClient) Update() *HasMetadataUpdate

Update returns an update builder for HasMetadata.

func (*HasMetadataClient) UpdateOne added in v0.2.1

UpdateOne returns an update builder for the given entity.

func (*HasMetadataClient) UpdateOneID added in v0.2.1

func (c *HasMetadataClient) UpdateOneID(id uuid.UUID) *HasMetadataUpdateOne

UpdateOneID returns an update builder for the given id.

func (*HasMetadataClient) Use added in v0.2.1

func (c *HasMetadataClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `hasmetadata.Hooks(f(g(h())))`.

type HasMetadataConnection added in v0.2.1

type HasMetadataConnection struct {
	Edges      []*HasMetadataEdge `json:"edges"`
	PageInfo   PageInfo           `json:"pageInfo"`
	TotalCount int                `json:"totalCount"`
}

HasMetadataConnection is the connection containing edges to HasMetadata.

type HasMetadataCreate added in v0.2.1

type HasMetadataCreate struct {
	// contains filtered or unexported fields
}

HasMetadataCreate is the builder for creating a HasMetadata entity.

func (*HasMetadataCreate) Exec added in v0.2.1

func (hmc *HasMetadataCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*HasMetadataCreate) ExecX added in v0.2.1

func (hmc *HasMetadataCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*HasMetadataCreate) Mutation added in v0.2.1

func (hmc *HasMetadataCreate) Mutation() *HasMetadataMutation

Mutation returns the HasMetadataMutation object of the builder.

func (*HasMetadataCreate) OnConflict added in v0.2.1

func (hmc *HasMetadataCreate) OnConflict(opts ...sql.ConflictOption) *HasMetadataUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.HasMetadata.Create().
	SetSourceID(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.HasMetadataUpsert) {
		SetSourceID(v+v).
	}).
	Exec(ctx)

func (*HasMetadataCreate) OnConflictColumns added in v0.2.1

func (hmc *HasMetadataCreate) OnConflictColumns(columns ...string) *HasMetadataUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.HasMetadata.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*HasMetadataCreate) Save added in v0.2.1

func (hmc *HasMetadataCreate) Save(ctx context.Context) (*HasMetadata, error)

Save creates the HasMetadata in the database.

func (*HasMetadataCreate) SaveX added in v0.2.1

func (hmc *HasMetadataCreate) SaveX(ctx context.Context) *HasMetadata

SaveX calls Save and panics if Save returns an error.

func (*HasMetadataCreate) SetAllVersions added in v0.2.1

func (hmc *HasMetadataCreate) SetAllVersions(p *PackageName) *HasMetadataCreate

SetAllVersions sets the "all_versions" edge to the PackageName entity.

func (*HasMetadataCreate) SetAllVersionsID added in v0.2.1

func (hmc *HasMetadataCreate) SetAllVersionsID(id uuid.UUID) *HasMetadataCreate

SetAllVersionsID sets the "all_versions" edge to the PackageName entity by ID.

func (*HasMetadataCreate) SetArtifact added in v0.2.1

func (hmc *HasMetadataCreate) SetArtifact(a *Artifact) *HasMetadataCreate

SetArtifact sets the "artifact" edge to the Artifact entity.

func (*HasMetadataCreate) SetArtifactID added in v0.2.1

func (hmc *HasMetadataCreate) SetArtifactID(u uuid.UUID) *HasMetadataCreate

SetArtifactID sets the "artifact_id" field.

func (*HasMetadataCreate) SetCollector added in v0.2.1

func (hmc *HasMetadataCreate) SetCollector(s string) *HasMetadataCreate

SetCollector sets the "collector" field.

func (*HasMetadataCreate) SetDocumentRef added in v0.6.0

func (hmc *HasMetadataCreate) SetDocumentRef(s string) *HasMetadataCreate

SetDocumentRef sets the "document_ref" field.

func (*HasMetadataCreate) SetID added in v0.5.0

SetID sets the "id" field.

func (*HasMetadataCreate) SetJustification added in v0.2.1

func (hmc *HasMetadataCreate) SetJustification(s string) *HasMetadataCreate

SetJustification sets the "justification" field.

func (*HasMetadataCreate) SetKey added in v0.2.1

func (hmc *HasMetadataCreate) SetKey(s string) *HasMetadataCreate

SetKey sets the "key" field.

func (*HasMetadataCreate) SetNillableAllVersionsID added in v0.2.1

func (hmc *HasMetadataCreate) SetNillableAllVersionsID(id *uuid.UUID) *HasMetadataCreate

SetNillableAllVersionsID sets the "all_versions" edge to the PackageName entity by ID if the given value is not nil.

func (*HasMetadataCreate) SetNillableArtifactID added in v0.2.1

func (hmc *HasMetadataCreate) SetNillableArtifactID(u *uuid.UUID) *HasMetadataCreate

SetNillableArtifactID sets the "artifact_id" field if the given value is not nil.

func (*HasMetadataCreate) SetNillableID added in v0.5.0

func (hmc *HasMetadataCreate) SetNillableID(u *uuid.UUID) *HasMetadataCreate

SetNillableID sets the "id" field if the given value is not nil.

func (*HasMetadataCreate) SetNillablePackageNameID added in v0.2.1

func (hmc *HasMetadataCreate) SetNillablePackageNameID(u *uuid.UUID) *HasMetadataCreate

SetNillablePackageNameID sets the "package_name_id" field if the given value is not nil.

func (*HasMetadataCreate) SetNillablePackageVersionID added in v0.2.1

func (hmc *HasMetadataCreate) SetNillablePackageVersionID(u *uuid.UUID) *HasMetadataCreate

SetNillablePackageVersionID sets the "package_version_id" field if the given value is not nil.

func (*HasMetadataCreate) SetNillableSourceID added in v0.2.1

func (hmc *HasMetadataCreate) SetNillableSourceID(u *uuid.UUID) *HasMetadataCreate

SetNillableSourceID sets the "source_id" field if the given value is not nil.

func (*HasMetadataCreate) SetOrigin added in v0.2.1

func (hmc *HasMetadataCreate) SetOrigin(s string) *HasMetadataCreate

SetOrigin sets the "origin" field.

func (*HasMetadataCreate) SetPackageNameID added in v0.2.1

func (hmc *HasMetadataCreate) SetPackageNameID(u uuid.UUID) *HasMetadataCreate

SetPackageNameID sets the "package_name_id" field.

func (*HasMetadataCreate) SetPackageVersion added in v0.2.1

func (hmc *HasMetadataCreate) SetPackageVersion(p *PackageVersion) *HasMetadataCreate

SetPackageVersion sets the "package_version" edge to the PackageVersion entity.

func (*HasMetadataCreate) SetPackageVersionID added in v0.2.1

func (hmc *HasMetadataCreate) SetPackageVersionID(u uuid.UUID) *HasMetadataCreate

SetPackageVersionID sets the "package_version_id" field.

func (*HasMetadataCreate) SetSource added in v0.2.1

func (hmc *HasMetadataCreate) SetSource(s *SourceName) *HasMetadataCreate

SetSource sets the "source" edge to the SourceName entity.

func (*HasMetadataCreate) SetSourceID added in v0.2.1

func (hmc *HasMetadataCreate) SetSourceID(u uuid.UUID) *HasMetadataCreate

SetSourceID sets the "source_id" field.

func (*HasMetadataCreate) SetTimestamp added in v0.2.1

func (hmc *HasMetadataCreate) SetTimestamp(t time.Time) *HasMetadataCreate

SetTimestamp sets the "timestamp" field.

func (*HasMetadataCreate) SetValue added in v0.2.1

func (hmc *HasMetadataCreate) SetValue(s string) *HasMetadataCreate

SetValue sets the "value" field.

type HasMetadataCreateBulk added in v0.2.1

type HasMetadataCreateBulk struct {
	// contains filtered or unexported fields
}

HasMetadataCreateBulk is the builder for creating many HasMetadata entities in bulk.

func (*HasMetadataCreateBulk) Exec added in v0.2.1

func (hmcb *HasMetadataCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*HasMetadataCreateBulk) ExecX added in v0.2.1

func (hmcb *HasMetadataCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*HasMetadataCreateBulk) OnConflict added in v0.2.1

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.HasMetadata.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.HasMetadataUpsert) {
		SetSourceID(v+v).
	}).
	Exec(ctx)

func (*HasMetadataCreateBulk) OnConflictColumns added in v0.2.1

func (hmcb *HasMetadataCreateBulk) OnConflictColumns(columns ...string) *HasMetadataUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.HasMetadata.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*HasMetadataCreateBulk) Save added in v0.2.1

func (hmcb *HasMetadataCreateBulk) Save(ctx context.Context) ([]*HasMetadata, error)

Save creates the HasMetadata entities in the database.

func (*HasMetadataCreateBulk) SaveX added in v0.2.1

func (hmcb *HasMetadataCreateBulk) SaveX(ctx context.Context) []*HasMetadata

SaveX is like Save, but panics if an error occurs.

type HasMetadataDelete added in v0.2.1

type HasMetadataDelete struct {
	// contains filtered or unexported fields
}

HasMetadataDelete is the builder for deleting a HasMetadata entity.

func (*HasMetadataDelete) Exec added in v0.2.1

func (hmd *HasMetadataDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*HasMetadataDelete) ExecX added in v0.2.1

func (hmd *HasMetadataDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*HasMetadataDelete) Where added in v0.2.1

Where appends a list predicates to the HasMetadataDelete builder.

type HasMetadataDeleteOne added in v0.2.1

type HasMetadataDeleteOne struct {
	// contains filtered or unexported fields
}

HasMetadataDeleteOne is the builder for deleting a single HasMetadata entity.

func (*HasMetadataDeleteOne) Exec added in v0.2.1

func (hmdo *HasMetadataDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*HasMetadataDeleteOne) ExecX added in v0.2.1

func (hmdo *HasMetadataDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*HasMetadataDeleteOne) Where added in v0.2.1

Where appends a list predicates to the HasMetadataDelete builder.

type HasMetadataEdge added in v0.2.1

type HasMetadataEdge struct {
	Node   *HasMetadata `json:"node"`
	Cursor Cursor       `json:"cursor"`
}

HasMetadataEdge is the edge representation of HasMetadata.

type HasMetadataEdges added in v0.2.1

type HasMetadataEdges struct {
	// Source holds the value of the source edge.
	Source *SourceName `json:"source,omitempty"`
	// PackageVersion holds the value of the package_version edge.
	PackageVersion *PackageVersion `json:"package_version,omitempty"`
	// AllVersions holds the value of the all_versions edge.
	AllVersions *PackageName `json:"all_versions,omitempty"`
	// Artifact holds the value of the artifact edge.
	Artifact *Artifact `json:"artifact,omitempty"`
	// contains filtered or unexported fields
}

HasMetadataEdges holds the relations/edges for other nodes in the graph.

func (HasMetadataEdges) AllVersionsOrErr added in v0.2.1

func (e HasMetadataEdges) AllVersionsOrErr() (*PackageName, error)

AllVersionsOrErr returns the AllVersions value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (HasMetadataEdges) ArtifactOrErr added in v0.2.1

func (e HasMetadataEdges) ArtifactOrErr() (*Artifact, error)

ArtifactOrErr returns the Artifact value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (HasMetadataEdges) PackageVersionOrErr added in v0.2.1

func (e HasMetadataEdges) PackageVersionOrErr() (*PackageVersion, error)

PackageVersionOrErr returns the PackageVersion value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (HasMetadataEdges) SourceOrErr added in v0.2.1

func (e HasMetadataEdges) SourceOrErr() (*SourceName, error)

SourceOrErr returns the Source value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type HasMetadataGroupBy added in v0.2.1

type HasMetadataGroupBy struct {
	// contains filtered or unexported fields
}

HasMetadataGroupBy is the group-by builder for HasMetadata entities.

func (*HasMetadataGroupBy) Aggregate added in v0.2.1

func (hmgb *HasMetadataGroupBy) Aggregate(fns ...AggregateFunc) *HasMetadataGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*HasMetadataGroupBy) Bool added in v0.2.1

func (s *HasMetadataGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*HasMetadataGroupBy) BoolX added in v0.2.1

func (s *HasMetadataGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*HasMetadataGroupBy) Bools added in v0.2.1

func (s *HasMetadataGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*HasMetadataGroupBy) BoolsX added in v0.2.1

func (s *HasMetadataGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*HasMetadataGroupBy) Float64 added in v0.2.1

func (s *HasMetadataGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*HasMetadataGroupBy) Float64X added in v0.2.1

func (s *HasMetadataGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*HasMetadataGroupBy) Float64s added in v0.2.1

func (s *HasMetadataGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*HasMetadataGroupBy) Float64sX added in v0.2.1

func (s *HasMetadataGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*HasMetadataGroupBy) Int added in v0.2.1

func (s *HasMetadataGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*HasMetadataGroupBy) IntX added in v0.2.1

func (s *HasMetadataGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*HasMetadataGroupBy) Ints added in v0.2.1

func (s *HasMetadataGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*HasMetadataGroupBy) IntsX added in v0.2.1

func (s *HasMetadataGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*HasMetadataGroupBy) Scan added in v0.2.1

func (hmgb *HasMetadataGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*HasMetadataGroupBy) ScanX added in v0.2.1

func (s *HasMetadataGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*HasMetadataGroupBy) String added in v0.2.1

func (s *HasMetadataGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*HasMetadataGroupBy) StringX added in v0.2.1

func (s *HasMetadataGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*HasMetadataGroupBy) Strings added in v0.2.1

func (s *HasMetadataGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*HasMetadataGroupBy) StringsX added in v0.2.1

func (s *HasMetadataGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type HasMetadataMutation added in v0.2.1

type HasMetadataMutation struct {
	// contains filtered or unexported fields
}

HasMetadataMutation represents an operation that mutates the HasMetadata nodes in the graph.

func (*HasMetadataMutation) AddField added in v0.2.1

func (m *HasMetadataMutation) AddField(name string, value ent.Value) error

AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*HasMetadataMutation) AddedEdges added in v0.2.1

func (m *HasMetadataMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*HasMetadataMutation) AddedField added in v0.2.1

func (m *HasMetadataMutation) AddedField(name string) (ent.Value, bool)

AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*HasMetadataMutation) AddedFields added in v0.2.1

func (m *HasMetadataMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*HasMetadataMutation) AddedIDs added in v0.2.1

func (m *HasMetadataMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*HasMetadataMutation) AllVersionsCleared added in v0.2.1

func (m *HasMetadataMutation) AllVersionsCleared() bool

AllVersionsCleared reports if the "all_versions" edge to the PackageName entity was cleared.

func (*HasMetadataMutation) AllVersionsID added in v0.2.1

func (m *HasMetadataMutation) AllVersionsID() (id uuid.UUID, exists bool)

AllVersionsID returns the "all_versions" edge ID in the mutation.

func (*HasMetadataMutation) AllVersionsIDs added in v0.2.1

func (m *HasMetadataMutation) AllVersionsIDs() (ids []uuid.UUID)

AllVersionsIDs returns the "all_versions" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use AllVersionsID instead. It exists only for internal usage by the builders.

func (*HasMetadataMutation) ArtifactCleared added in v0.2.1

func (m *HasMetadataMutation) ArtifactCleared() bool

ArtifactCleared reports if the "artifact" edge to the Artifact entity was cleared.

func (*HasMetadataMutation) ArtifactID added in v0.2.1

func (m *HasMetadataMutation) ArtifactID() (r uuid.UUID, exists bool)

ArtifactID returns the value of the "artifact_id" field in the mutation.

func (*HasMetadataMutation) ArtifactIDCleared added in v0.2.1

func (m *HasMetadataMutation) ArtifactIDCleared() bool

ArtifactIDCleared returns if the "artifact_id" field was cleared in this mutation.

func (*HasMetadataMutation) ArtifactIDs added in v0.2.1

func (m *HasMetadataMutation) ArtifactIDs() (ids []uuid.UUID)

ArtifactIDs returns the "artifact" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use ArtifactID instead. It exists only for internal usage by the builders.

func (*HasMetadataMutation) ClearAllVersions added in v0.2.1

func (m *HasMetadataMutation) ClearAllVersions()

ClearAllVersions clears the "all_versions" edge to the PackageName entity.

func (*HasMetadataMutation) ClearArtifact added in v0.2.1

func (m *HasMetadataMutation) ClearArtifact()

ClearArtifact clears the "artifact" edge to the Artifact entity.

func (*HasMetadataMutation) ClearArtifactID added in v0.2.1

func (m *HasMetadataMutation) ClearArtifactID()

ClearArtifactID clears the value of the "artifact_id" field.

func (*HasMetadataMutation) ClearEdge added in v0.2.1

func (m *HasMetadataMutation) ClearEdge(name string) error

ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.

func (*HasMetadataMutation) ClearField added in v0.2.1

func (m *HasMetadataMutation) ClearField(name string) error

ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.

func (*HasMetadataMutation) ClearPackageNameID added in v0.2.1

func (m *HasMetadataMutation) ClearPackageNameID()

ClearPackageNameID clears the value of the "package_name_id" field.

func (*HasMetadataMutation) ClearPackageVersion added in v0.2.1

func (m *HasMetadataMutation) ClearPackageVersion()

ClearPackageVersion clears the "package_version" edge to the PackageVersion entity.

func (*HasMetadataMutation) ClearPackageVersionID added in v0.2.1

func (m *HasMetadataMutation) ClearPackageVersionID()

ClearPackageVersionID clears the value of the "package_version_id" field.

func (*HasMetadataMutation) ClearSource added in v0.2.1

func (m *HasMetadataMutation) ClearSource()

ClearSource clears the "source" edge to the SourceName entity.

func (*HasMetadataMutation) ClearSourceID added in v0.2.1

func (m *HasMetadataMutation) ClearSourceID()

ClearSourceID clears the value of the "source_id" field.

func (*HasMetadataMutation) ClearedEdges added in v0.2.1

func (m *HasMetadataMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*HasMetadataMutation) ClearedFields added in v0.2.1

func (m *HasMetadataMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (HasMetadataMutation) Client added in v0.2.1

func (m HasMetadataMutation) Client() *Client

Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.

func (*HasMetadataMutation) Collector added in v0.2.1

func (m *HasMetadataMutation) Collector() (r string, exists bool)

Collector returns the value of the "collector" field in the mutation.

func (*HasMetadataMutation) DocumentRef added in v0.6.0

func (m *HasMetadataMutation) DocumentRef() (r string, exists bool)

DocumentRef returns the value of the "document_ref" field in the mutation.

func (*HasMetadataMutation) EdgeCleared added in v0.2.1

func (m *HasMetadataMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*HasMetadataMutation) Field added in v0.2.1

func (m *HasMetadataMutation) Field(name string) (ent.Value, bool)

Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*HasMetadataMutation) FieldCleared added in v0.2.1

func (m *HasMetadataMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*HasMetadataMutation) Fields added in v0.2.1

func (m *HasMetadataMutation) Fields() []string

Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().

func (*HasMetadataMutation) ID added in v0.2.1

func (m *HasMetadataMutation) ID() (id uuid.UUID, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*HasMetadataMutation) IDs added in v0.2.1

func (m *HasMetadataMutation) IDs(ctx context.Context) ([]uuid.UUID, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*HasMetadataMutation) Justification added in v0.2.1

func (m *HasMetadataMutation) Justification() (r string, exists bool)

Justification returns the value of the "justification" field in the mutation.

func (*HasMetadataMutation) Key added in v0.2.1

func (m *HasMetadataMutation) Key() (r string, exists bool)

Key returns the value of the "key" field in the mutation.

func (*HasMetadataMutation) OldArtifactID added in v0.2.1

func (m *HasMetadataMutation) OldArtifactID(ctx context.Context) (v *uuid.UUID, err error)

OldArtifactID returns the old "artifact_id" field's value of the HasMetadata entity. If the HasMetadata object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*HasMetadataMutation) OldCollector added in v0.2.1

func (m *HasMetadataMutation) OldCollector(ctx context.Context) (v string, err error)

OldCollector returns the old "collector" field's value of the HasMetadata entity. If the HasMetadata object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*HasMetadataMutation) OldDocumentRef added in v0.6.0

func (m *HasMetadataMutation) OldDocumentRef(ctx context.Context) (v string, err error)

OldDocumentRef returns the old "document_ref" field's value of the HasMetadata entity. If the HasMetadata object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*HasMetadataMutation) OldField added in v0.2.1

func (m *HasMetadataMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*HasMetadataMutation) OldJustification added in v0.2.1

func (m *HasMetadataMutation) OldJustification(ctx context.Context) (v string, err error)

OldJustification returns the old "justification" field's value of the HasMetadata entity. If the HasMetadata object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*HasMetadataMutation) OldKey added in v0.2.1

func (m *HasMetadataMutation) OldKey(ctx context.Context) (v string, err error)

OldKey returns the old "key" field's value of the HasMetadata entity. If the HasMetadata object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*HasMetadataMutation) OldOrigin added in v0.2.1

func (m *HasMetadataMutation) OldOrigin(ctx context.Context) (v string, err error)

OldOrigin returns the old "origin" field's value of the HasMetadata entity. If the HasMetadata object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*HasMetadataMutation) OldPackageNameID added in v0.2.1

func (m *HasMetadataMutation) OldPackageNameID(ctx context.Context) (v *uuid.UUID, err error)

OldPackageNameID returns the old "package_name_id" field's value of the HasMetadata entity. If the HasMetadata object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*HasMetadataMutation) OldPackageVersionID added in v0.2.1

func (m *HasMetadataMutation) OldPackageVersionID(ctx context.Context) (v *uuid.UUID, err error)

OldPackageVersionID returns the old "package_version_id" field's value of the HasMetadata entity. If the HasMetadata object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*HasMetadataMutation) OldSourceID added in v0.2.1

func (m *HasMetadataMutation) OldSourceID(ctx context.Context) (v *uuid.UUID, err error)

OldSourceID returns the old "source_id" field's value of the HasMetadata entity. If the HasMetadata object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*HasMetadataMutation) OldTimestamp added in v0.2.1

func (m *HasMetadataMutation) OldTimestamp(ctx context.Context) (v time.Time, err error)

OldTimestamp returns the old "timestamp" field's value of the HasMetadata entity. If the HasMetadata object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*HasMetadataMutation) OldValue added in v0.2.1

func (m *HasMetadataMutation) OldValue(ctx context.Context) (v string, err error)

OldValue returns the old "value" field's value of the HasMetadata entity. If the HasMetadata object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*HasMetadataMutation) Op added in v0.2.1

func (m *HasMetadataMutation) Op() Op

Op returns the operation name.

func (*HasMetadataMutation) Origin added in v0.2.1

func (m *HasMetadataMutation) Origin() (r string, exists bool)

Origin returns the value of the "origin" field in the mutation.

func (*HasMetadataMutation) PackageNameID added in v0.2.1

func (m *HasMetadataMutation) PackageNameID() (r uuid.UUID, exists bool)

PackageNameID returns the value of the "package_name_id" field in the mutation.

func (*HasMetadataMutation) PackageNameIDCleared added in v0.2.1

func (m *HasMetadataMutation) PackageNameIDCleared() bool

PackageNameIDCleared returns if the "package_name_id" field was cleared in this mutation.

func (*HasMetadataMutation) PackageVersionCleared added in v0.2.1

func (m *HasMetadataMutation) PackageVersionCleared() bool

PackageVersionCleared reports if the "package_version" edge to the PackageVersion entity was cleared.

func (*HasMetadataMutation) PackageVersionID added in v0.2.1

func (m *HasMetadataMutation) PackageVersionID() (r uuid.UUID, exists bool)

PackageVersionID returns the value of the "package_version_id" field in the mutation.

func (*HasMetadataMutation) PackageVersionIDCleared added in v0.2.1

func (m *HasMetadataMutation) PackageVersionIDCleared() bool

PackageVersionIDCleared returns if the "package_version_id" field was cleared in this mutation.

func (*HasMetadataMutation) PackageVersionIDs added in v0.2.1

func (m *HasMetadataMutation) PackageVersionIDs() (ids []uuid.UUID)

PackageVersionIDs returns the "package_version" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use PackageVersionID instead. It exists only for internal usage by the builders.

func (*HasMetadataMutation) RemovedEdges added in v0.2.1

func (m *HasMetadataMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*HasMetadataMutation) RemovedIDs added in v0.2.1

func (m *HasMetadataMutation) RemovedIDs(name string) []ent.Value

RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.

func (*HasMetadataMutation) ResetAllVersions added in v0.2.1

func (m *HasMetadataMutation) ResetAllVersions()

ResetAllVersions resets all changes to the "all_versions" edge.

func (*HasMetadataMutation) ResetArtifact added in v0.2.1

func (m *HasMetadataMutation) ResetArtifact()

ResetArtifact resets all changes to the "artifact" edge.

func (*HasMetadataMutation) ResetArtifactID added in v0.2.1

func (m *HasMetadataMutation) ResetArtifactID()

ResetArtifactID resets all changes to the "artifact_id" field.

func (*HasMetadataMutation) ResetCollector added in v0.2.1

func (m *HasMetadataMutation) ResetCollector()

ResetCollector resets all changes to the "collector" field.

func (*HasMetadataMutation) ResetDocumentRef added in v0.6.0

func (m *HasMetadataMutation) ResetDocumentRef()

ResetDocumentRef resets all changes to the "document_ref" field.

func (*HasMetadataMutation) ResetEdge added in v0.2.1

func (m *HasMetadataMutation) ResetEdge(name string) error

ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.

func (*HasMetadataMutation) ResetField added in v0.2.1

func (m *HasMetadataMutation) ResetField(name string) error

ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.

func (*HasMetadataMutation) ResetJustification added in v0.2.1

func (m *HasMetadataMutation) ResetJustification()

ResetJustification resets all changes to the "justification" field.

func (*HasMetadataMutation) ResetKey added in v0.2.1

func (m *HasMetadataMutation) ResetKey()

ResetKey resets all changes to the "key" field.

func (*HasMetadataMutation) ResetOrigin added in v0.2.1

func (m *HasMetadataMutation) ResetOrigin()

ResetOrigin resets all changes to the "origin" field.

func (*HasMetadataMutation) ResetPackageNameID added in v0.2.1

func (m *HasMetadataMutation) ResetPackageNameID()

ResetPackageNameID resets all changes to the "package_name_id" field.

func (*HasMetadataMutation) ResetPackageVersion added in v0.2.1

func (m *HasMetadataMutation) ResetPackageVersion()

ResetPackageVersion resets all changes to the "package_version" edge.

func (*HasMetadataMutation) ResetPackageVersionID added in v0.2.1

func (m *HasMetadataMutation) ResetPackageVersionID()

ResetPackageVersionID resets all changes to the "package_version_id" field.

func (*HasMetadataMutation) ResetSource added in v0.2.1

func (m *HasMetadataMutation) ResetSource()

ResetSource resets all changes to the "source" edge.

func (*HasMetadataMutation) ResetSourceID added in v0.2.1

func (m *HasMetadataMutation) ResetSourceID()

ResetSourceID resets all changes to the "source_id" field.

func (*HasMetadataMutation) ResetTimestamp added in v0.2.1

func (m *HasMetadataMutation) ResetTimestamp()

ResetTimestamp resets all changes to the "timestamp" field.

func (*HasMetadataMutation) ResetValue added in v0.2.1

func (m *HasMetadataMutation) ResetValue()

ResetValue resets all changes to the "value" field.

func (*HasMetadataMutation) SetAllVersionsID added in v0.2.1

func (m *HasMetadataMutation) SetAllVersionsID(id uuid.UUID)

SetAllVersionsID sets the "all_versions" edge to the PackageName entity by id.

func (*HasMetadataMutation) SetArtifactID added in v0.2.1

func (m *HasMetadataMutation) SetArtifactID(u uuid.UUID)

SetArtifactID sets the "artifact_id" field.

func (*HasMetadataMutation) SetCollector added in v0.2.1

func (m *HasMetadataMutation) SetCollector(s string)

SetCollector sets the "collector" field.

func (*HasMetadataMutation) SetDocumentRef added in v0.6.0

func (m *HasMetadataMutation) SetDocumentRef(s string)

SetDocumentRef sets the "document_ref" field.

func (*HasMetadataMutation) SetField added in v0.2.1

func (m *HasMetadataMutation) SetField(name string, value ent.Value) error

SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*HasMetadataMutation) SetID added in v0.5.0

func (m *HasMetadataMutation) SetID(id uuid.UUID)

SetID sets the value of the id field. Note that this operation is only accepted on creation of HasMetadata entities.

func (*HasMetadataMutation) SetJustification added in v0.2.1

func (m *HasMetadataMutation) SetJustification(s string)

SetJustification sets the "justification" field.

func (*HasMetadataMutation) SetKey added in v0.2.1

func (m *HasMetadataMutation) SetKey(s string)

SetKey sets the "key" field.

func (*HasMetadataMutation) SetOp added in v0.2.1

func (m *HasMetadataMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*HasMetadataMutation) SetOrigin added in v0.2.1

func (m *HasMetadataMutation) SetOrigin(s string)

SetOrigin sets the "origin" field.

func (*HasMetadataMutation) SetPackageNameID added in v0.2.1

func (m *HasMetadataMutation) SetPackageNameID(u uuid.UUID)

SetPackageNameID sets the "package_name_id" field.

func (*HasMetadataMutation) SetPackageVersionID added in v0.2.1

func (m *HasMetadataMutation) SetPackageVersionID(u uuid.UUID)

SetPackageVersionID sets the "package_version_id" field.

func (*HasMetadataMutation) SetSourceID added in v0.2.1

func (m *HasMetadataMutation) SetSourceID(u uuid.UUID)

SetSourceID sets the "source_id" field.

func (*HasMetadataMutation) SetTimestamp added in v0.2.1

func (m *HasMetadataMutation) SetTimestamp(t time.Time)

SetTimestamp sets the "timestamp" field.

func (*HasMetadataMutation) SetValue added in v0.2.1

func (m *HasMetadataMutation) SetValue(s string)

SetValue sets the "value" field.

func (*HasMetadataMutation) SourceCleared added in v0.2.1

func (m *HasMetadataMutation) SourceCleared() bool

SourceCleared reports if the "source" edge to the SourceName entity was cleared.

func (*HasMetadataMutation) SourceID added in v0.2.1

func (m *HasMetadataMutation) SourceID() (r uuid.UUID, exists bool)

SourceID returns the value of the "source_id" field in the mutation.

func (*HasMetadataMutation) SourceIDCleared added in v0.2.1

func (m *HasMetadataMutation) SourceIDCleared() bool

SourceIDCleared returns if the "source_id" field was cleared in this mutation.

func (*HasMetadataMutation) SourceIDs added in v0.2.1

func (m *HasMetadataMutation) SourceIDs() (ids []uuid.UUID)

SourceIDs returns the "source" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use SourceID instead. It exists only for internal usage by the builders.

func (*HasMetadataMutation) Timestamp added in v0.2.1

func (m *HasMetadataMutation) Timestamp() (r time.Time, exists bool)

Timestamp returns the value of the "timestamp" field in the mutation.

func (HasMetadataMutation) Tx added in v0.2.1

func (m HasMetadataMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*HasMetadataMutation) Type added in v0.2.1

func (m *HasMetadataMutation) Type() string

Type returns the node type of this mutation (HasMetadata).

func (*HasMetadataMutation) Value added in v0.2.1

func (m *HasMetadataMutation) Value() (r string, exists bool)

Value returns the value of the "value" field in the mutation.

func (*HasMetadataMutation) Where added in v0.2.1

func (m *HasMetadataMutation) Where(ps ...predicate.HasMetadata)

Where appends a list predicates to the HasMetadataMutation builder.

func (*HasMetadataMutation) WhereP added in v0.2.1

func (m *HasMetadataMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the HasMetadataMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type HasMetadataOrder added in v0.2.1

type HasMetadataOrder struct {
	Direction OrderDirection         `json:"direction"`
	Field     *HasMetadataOrderField `json:"field"`
}

HasMetadataOrder defines the ordering of HasMetadata.

type HasMetadataOrderField added in v0.2.1

type HasMetadataOrderField struct {
	// Value extracts the ordering value from the given HasMetadata.
	Value func(*HasMetadata) (ent.Value, error)
	// contains filtered or unexported fields
}

HasMetadataOrderField defines the ordering field of HasMetadata.

type HasMetadataPaginateOption added in v0.2.1

type HasMetadataPaginateOption func(*hasmetadataPager) error

HasMetadataPaginateOption enables pagination customization.

func WithHasMetadataFilter added in v0.2.1

func WithHasMetadataFilter(filter func(*HasMetadataQuery) (*HasMetadataQuery, error)) HasMetadataPaginateOption

WithHasMetadataFilter configures pagination filter.

func WithHasMetadataOrder added in v0.2.1

func WithHasMetadataOrder(order *HasMetadataOrder) HasMetadataPaginateOption

WithHasMetadataOrder configures pagination ordering.

type HasMetadataQuery added in v0.2.1

type HasMetadataQuery struct {
	// contains filtered or unexported fields
}

HasMetadataQuery is the builder for querying HasMetadata entities.

func (*HasMetadataQuery) Aggregate added in v0.2.1

func (hmq *HasMetadataQuery) Aggregate(fns ...AggregateFunc) *HasMetadataSelect

Aggregate returns a HasMetadataSelect configured with the given aggregations.

func (*HasMetadataQuery) All added in v0.2.1

func (hmq *HasMetadataQuery) All(ctx context.Context) ([]*HasMetadata, error)

All executes the query and returns a list of HasMetadataSlice.

func (*HasMetadataQuery) AllX added in v0.2.1

func (hmq *HasMetadataQuery) AllX(ctx context.Context) []*HasMetadata

AllX is like All, but panics if an error occurs.

func (*HasMetadataQuery) Clone added in v0.2.1

func (hmq *HasMetadataQuery) Clone() *HasMetadataQuery

Clone returns a duplicate of the HasMetadataQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*HasMetadataQuery) CollectFields added in v0.2.1

func (hm *HasMetadataQuery) CollectFields(ctx context.Context, satisfies ...string) (*HasMetadataQuery, error)

CollectFields tells the query-builder to eagerly load connected nodes by resolver context.

func (*HasMetadataQuery) Count added in v0.2.1

func (hmq *HasMetadataQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*HasMetadataQuery) CountX added in v0.2.1

func (hmq *HasMetadataQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*HasMetadataQuery) Exist added in v0.2.1

func (hmq *HasMetadataQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*HasMetadataQuery) ExistX added in v0.2.1

func (hmq *HasMetadataQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*HasMetadataQuery) First added in v0.2.1

func (hmq *HasMetadataQuery) First(ctx context.Context) (*HasMetadata, error)

First returns the first HasMetadata entity from the query. Returns a *NotFoundError when no HasMetadata was found.

func (*HasMetadataQuery) FirstID added in v0.2.1

func (hmq *HasMetadataQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)

FirstID returns the first HasMetadata ID from the query. Returns a *NotFoundError when no HasMetadata ID was found.

func (*HasMetadataQuery) FirstIDX added in v0.2.1

func (hmq *HasMetadataQuery) FirstIDX(ctx context.Context) uuid.UUID

FirstIDX is like FirstID, but panics if an error occurs.

func (*HasMetadataQuery) FirstX added in v0.2.1

func (hmq *HasMetadataQuery) FirstX(ctx context.Context) *HasMetadata

FirstX is like First, but panics if an error occurs.

func (*HasMetadataQuery) GroupBy added in v0.2.1

func (hmq *HasMetadataQuery) GroupBy(field string, fields ...string) *HasMetadataGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	SourceID uuid.UUID `json:"source_id,omitempty"`
	Count int `json:"count,omitempty"`
}

client.HasMetadata.Query().
	GroupBy(hasmetadata.FieldSourceID).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*HasMetadataQuery) IDs added in v0.2.1

func (hmq *HasMetadataQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)

IDs executes the query and returns a list of HasMetadata IDs.

func (*HasMetadataQuery) IDsX added in v0.2.1

func (hmq *HasMetadataQuery) IDsX(ctx context.Context) []uuid.UUID

IDsX is like IDs, but panics if an error occurs.

func (*HasMetadataQuery) Limit added in v0.2.1

func (hmq *HasMetadataQuery) Limit(limit int) *HasMetadataQuery

Limit the number of records to be returned by this query.

func (*HasMetadataQuery) Offset added in v0.2.1

func (hmq *HasMetadataQuery) Offset(offset int) *HasMetadataQuery

Offset to start from.

func (*HasMetadataQuery) Only added in v0.2.1

func (hmq *HasMetadataQuery) Only(ctx context.Context) (*HasMetadata, error)

Only returns a single HasMetadata entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one HasMetadata entity is found. Returns a *NotFoundError when no HasMetadata entities are found.

func (*HasMetadataQuery) OnlyID added in v0.2.1

func (hmq *HasMetadataQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)

OnlyID is like Only, but returns the only HasMetadata ID in the query. Returns a *NotSingularError when more than one HasMetadata ID is found. Returns a *NotFoundError when no entities are found.

func (*HasMetadataQuery) OnlyIDX added in v0.2.1

func (hmq *HasMetadataQuery) OnlyIDX(ctx context.Context) uuid.UUID

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*HasMetadataQuery) OnlyX added in v0.2.1

func (hmq *HasMetadataQuery) OnlyX(ctx context.Context) *HasMetadata

OnlyX is like Only, but panics if an error occurs.

func (*HasMetadataQuery) Order added in v0.2.1

Order specifies how the records should be ordered.

func (*HasMetadataQuery) Paginate added in v0.2.1

func (hm *HasMetadataQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...HasMetadataPaginateOption,
) (*HasMetadataConnection, error)

Paginate executes the query and returns a relay based cursor connection to HasMetadata.

func (*HasMetadataQuery) QueryAllVersions added in v0.2.1

func (hmq *HasMetadataQuery) QueryAllVersions() *PackageNameQuery

QueryAllVersions chains the current query on the "all_versions" edge.

func (*HasMetadataQuery) QueryArtifact added in v0.2.1

func (hmq *HasMetadataQuery) QueryArtifact() *ArtifactQuery

QueryArtifact chains the current query on the "artifact" edge.

func (*HasMetadataQuery) QueryPackageVersion added in v0.2.1

func (hmq *HasMetadataQuery) QueryPackageVersion() *PackageVersionQuery

QueryPackageVersion chains the current query on the "package_version" edge.

func (*HasMetadataQuery) QuerySource added in v0.2.1

func (hmq *HasMetadataQuery) QuerySource() *SourceNameQuery

QuerySource chains the current query on the "source" edge.

func (*HasMetadataQuery) Select added in v0.2.1

func (hmq *HasMetadataQuery) Select(fields ...string) *HasMetadataSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	SourceID uuid.UUID `json:"source_id,omitempty"`
}

client.HasMetadata.Query().
	Select(hasmetadata.FieldSourceID).
	Scan(ctx, &v)

func (*HasMetadataQuery) Unique added in v0.2.1

func (hmq *HasMetadataQuery) Unique(unique bool) *HasMetadataQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*HasMetadataQuery) Where added in v0.2.1

Where adds a new predicate for the HasMetadataQuery builder.

func (*HasMetadataQuery) WithAllVersions added in v0.2.1

func (hmq *HasMetadataQuery) WithAllVersions(opts ...func(*PackageNameQuery)) *HasMetadataQuery

WithAllVersions tells the query-builder to eager-load the nodes that are connected to the "all_versions" edge. The optional arguments are used to configure the query builder of the edge.

func (*HasMetadataQuery) WithArtifact added in v0.2.1

func (hmq *HasMetadataQuery) WithArtifact(opts ...func(*ArtifactQuery)) *HasMetadataQuery

WithArtifact tells the query-builder to eager-load the nodes that are connected to the "artifact" edge. The optional arguments are used to configure the query builder of the edge.

func (*HasMetadataQuery) WithPackageVersion added in v0.2.1

func (hmq *HasMetadataQuery) WithPackageVersion(opts ...func(*PackageVersionQuery)) *HasMetadataQuery

WithPackageVersion tells the query-builder to eager-load the nodes that are connected to the "package_version" edge. The optional arguments are used to configure the query builder of the edge.

func (*HasMetadataQuery) WithSource added in v0.2.1

func (hmq *HasMetadataQuery) WithSource(opts ...func(*SourceNameQuery)) *HasMetadataQuery

WithSource tells the query-builder to eager-load the nodes that are connected to the "source" edge. The optional arguments are used to configure the query builder of the edge.

type HasMetadataSelect added in v0.2.1

type HasMetadataSelect struct {
	*HasMetadataQuery
	// contains filtered or unexported fields
}

HasMetadataSelect is the builder for selecting fields of HasMetadata entities.

func (*HasMetadataSelect) Aggregate added in v0.2.1

func (hms *HasMetadataSelect) Aggregate(fns ...AggregateFunc) *HasMetadataSelect

Aggregate adds the given aggregation functions to the selector query.

func (*HasMetadataSelect) Bool added in v0.2.1

func (s *HasMetadataSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*HasMetadataSelect) BoolX added in v0.2.1

func (s *HasMetadataSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*HasMetadataSelect) Bools added in v0.2.1

func (s *HasMetadataSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*HasMetadataSelect) BoolsX added in v0.2.1

func (s *HasMetadataSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*HasMetadataSelect) Float64 added in v0.2.1

func (s *HasMetadataSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*HasMetadataSelect) Float64X added in v0.2.1

func (s *HasMetadataSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*HasMetadataSelect) Float64s added in v0.2.1

func (s *HasMetadataSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*HasMetadataSelect) Float64sX added in v0.2.1

func (s *HasMetadataSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*HasMetadataSelect) Int added in v0.2.1

func (s *HasMetadataSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*HasMetadataSelect) IntX added in v0.2.1

func (s *HasMetadataSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*HasMetadataSelect) Ints added in v0.2.1

func (s *HasMetadataSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*HasMetadataSelect) IntsX added in v0.2.1

func (s *HasMetadataSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*HasMetadataSelect) Scan added in v0.2.1

func (hms *HasMetadataSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*HasMetadataSelect) ScanX added in v0.2.1

func (s *HasMetadataSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*HasMetadataSelect) String added in v0.2.1

func (s *HasMetadataSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*HasMetadataSelect) StringX added in v0.2.1

func (s *HasMetadataSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*HasMetadataSelect) Strings added in v0.2.1

func (s *HasMetadataSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*HasMetadataSelect) StringsX added in v0.2.1

func (s *HasMetadataSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type HasMetadataSlice added in v0.2.1

type HasMetadataSlice []*HasMetadata

HasMetadataSlice is a parsable slice of HasMetadata.

type HasMetadataUpdate added in v0.2.1

type HasMetadataUpdate struct {
	// contains filtered or unexported fields
}

HasMetadataUpdate is the builder for updating HasMetadata entities.

func (*HasMetadataUpdate) ClearAllVersions added in v0.2.1

func (hmu *HasMetadataUpdate) ClearAllVersions() *HasMetadataUpdate

ClearAllVersions clears the "all_versions" edge to the PackageName entity.

func (*HasMetadataUpdate) ClearArtifact added in v0.2.1

func (hmu *HasMetadataUpdate) ClearArtifact() *HasMetadataUpdate

ClearArtifact clears the "artifact" edge to the Artifact entity.

func (*HasMetadataUpdate) ClearArtifactID added in v0.2.1

func (hmu *HasMetadataUpdate) ClearArtifactID() *HasMetadataUpdate

ClearArtifactID clears the value of the "artifact_id" field.

func (*HasMetadataUpdate) ClearPackageNameID added in v0.2.1

func (hmu *HasMetadataUpdate) ClearPackageNameID() *HasMetadataUpdate

ClearPackageNameID clears the value of the "package_name_id" field.

func (*HasMetadataUpdate) ClearPackageVersion added in v0.2.1

func (hmu *HasMetadataUpdate) ClearPackageVersion() *HasMetadataUpdate

ClearPackageVersion clears the "package_version" edge to the PackageVersion entity.

func (*HasMetadataUpdate) ClearPackageVersionID added in v0.2.1

func (hmu *HasMetadataUpdate) ClearPackageVersionID() *HasMetadataUpdate

ClearPackageVersionID clears the value of the "package_version_id" field.

func (*HasMetadataUpdate) ClearSource added in v0.2.1

func (hmu *HasMetadataUpdate) ClearSource() *HasMetadataUpdate

ClearSource clears the "source" edge to the SourceName entity.

func (*HasMetadataUpdate) ClearSourceID added in v0.2.1

func (hmu *HasMetadataUpdate) ClearSourceID() *HasMetadataUpdate

ClearSourceID clears the value of the "source_id" field.

func (*HasMetadataUpdate) Exec added in v0.2.1

func (hmu *HasMetadataUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*HasMetadataUpdate) ExecX added in v0.2.1

func (hmu *HasMetadataUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*HasMetadataUpdate) Mutation added in v0.2.1

func (hmu *HasMetadataUpdate) Mutation() *HasMetadataMutation

Mutation returns the HasMetadataMutation object of the builder.

func (*HasMetadataUpdate) Save added in v0.2.1

func (hmu *HasMetadataUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*HasMetadataUpdate) SaveX added in v0.2.1

func (hmu *HasMetadataUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*HasMetadataUpdate) SetAllVersions added in v0.2.1

func (hmu *HasMetadataUpdate) SetAllVersions(p *PackageName) *HasMetadataUpdate

SetAllVersions sets the "all_versions" edge to the PackageName entity.

func (*HasMetadataUpdate) SetAllVersionsID added in v0.2.1

func (hmu *HasMetadataUpdate) SetAllVersionsID(id uuid.UUID) *HasMetadataUpdate

SetAllVersionsID sets the "all_versions" edge to the PackageName entity by ID.

func (*HasMetadataUpdate) SetArtifact added in v0.2.1

func (hmu *HasMetadataUpdate) SetArtifact(a *Artifact) *HasMetadataUpdate

SetArtifact sets the "artifact" edge to the Artifact entity.

func (*HasMetadataUpdate) SetArtifactID added in v0.2.1

func (hmu *HasMetadataUpdate) SetArtifactID(u uuid.UUID) *HasMetadataUpdate

SetArtifactID sets the "artifact_id" field.

func (*HasMetadataUpdate) SetCollector added in v0.2.1

func (hmu *HasMetadataUpdate) SetCollector(s string) *HasMetadataUpdate

SetCollector sets the "collector" field.

func (*HasMetadataUpdate) SetDocumentRef added in v0.6.0

func (hmu *HasMetadataUpdate) SetDocumentRef(s string) *HasMetadataUpdate

SetDocumentRef sets the "document_ref" field.

func (*HasMetadataUpdate) SetJustification added in v0.2.1

func (hmu *HasMetadataUpdate) SetJustification(s string) *HasMetadataUpdate

SetJustification sets the "justification" field.

func (*HasMetadataUpdate) SetKey added in v0.2.1

func (hmu *HasMetadataUpdate) SetKey(s string) *HasMetadataUpdate

SetKey sets the "key" field.

func (*HasMetadataUpdate) SetNillableAllVersionsID added in v0.2.1

func (hmu *HasMetadataUpdate) SetNillableAllVersionsID(id *uuid.UUID) *HasMetadataUpdate

SetNillableAllVersionsID sets the "all_versions" edge to the PackageName entity by ID if the given value is not nil.

func (*HasMetadataUpdate) SetNillableArtifactID added in v0.2.1

func (hmu *HasMetadataUpdate) SetNillableArtifactID(u *uuid.UUID) *HasMetadataUpdate

SetNillableArtifactID sets the "artifact_id" field if the given value is not nil.

func (*HasMetadataUpdate) SetNillableCollector added in v0.4.0

func (hmu *HasMetadataUpdate) SetNillableCollector(s *string) *HasMetadataUpdate

SetNillableCollector sets the "collector" field if the given value is not nil.

func (*HasMetadataUpdate) SetNillableDocumentRef added in v0.6.0

func (hmu *HasMetadataUpdate) SetNillableDocumentRef(s *string) *HasMetadataUpdate

SetNillableDocumentRef sets the "document_ref" field if the given value is not nil.

func (*HasMetadataUpdate) SetNillableJustification added in v0.4.0

func (hmu *HasMetadataUpdate) SetNillableJustification(s *string) *HasMetadataUpdate

SetNillableJustification sets the "justification" field if the given value is not nil.

func (*HasMetadataUpdate) SetNillableKey added in v0.4.0

func (hmu *HasMetadataUpdate) SetNillableKey(s *string) *HasMetadataUpdate

SetNillableKey sets the "key" field if the given value is not nil.

func (*HasMetadataUpdate) SetNillableOrigin added in v0.4.0

func (hmu *HasMetadataUpdate) SetNillableOrigin(s *string) *HasMetadataUpdate

SetNillableOrigin sets the "origin" field if the given value is not nil.

func (*HasMetadataUpdate) SetNillablePackageNameID added in v0.2.1

func (hmu *HasMetadataUpdate) SetNillablePackageNameID(u *uuid.UUID) *HasMetadataUpdate

SetNillablePackageNameID sets the "package_name_id" field if the given value is not nil.

func (*HasMetadataUpdate) SetNillablePackageVersionID added in v0.2.1

func (hmu *HasMetadataUpdate) SetNillablePackageVersionID(u *uuid.UUID) *HasMetadataUpdate

SetNillablePackageVersionID sets the "package_version_id" field if the given value is not nil.

func (*HasMetadataUpdate) SetNillableSourceID added in v0.2.1

func (hmu *HasMetadataUpdate) SetNillableSourceID(u *uuid.UUID) *HasMetadataUpdate

SetNillableSourceID sets the "source_id" field if the given value is not nil.

func (*HasMetadataUpdate) SetNillableTimestamp added in v0.4.0

func (hmu *HasMetadataUpdate) SetNillableTimestamp(t *time.Time) *HasMetadataUpdate

SetNillableTimestamp sets the "timestamp" field if the given value is not nil.

func (*HasMetadataUpdate) SetNillableValue added in v0.4.0

func (hmu *HasMetadataUpdate) SetNillableValue(s *string) *HasMetadataUpdate

SetNillableValue sets the "value" field if the given value is not nil.

func (*HasMetadataUpdate) SetOrigin added in v0.2.1

func (hmu *HasMetadataUpdate) SetOrigin(s string) *HasMetadataUpdate

SetOrigin sets the "origin" field.

func (*HasMetadataUpdate) SetPackageNameID added in v0.2.1

func (hmu *HasMetadataUpdate) SetPackageNameID(u uuid.UUID) *HasMetadataUpdate

SetPackageNameID sets the "package_name_id" field.

func (*HasMetadataUpdate) SetPackageVersion added in v0.2.1

func (hmu *HasMetadataUpdate) SetPackageVersion(p *PackageVersion) *HasMetadataUpdate

SetPackageVersion sets the "package_version" edge to the PackageVersion entity.

func (*HasMetadataUpdate) SetPackageVersionID added in v0.2.1

func (hmu *HasMetadataUpdate) SetPackageVersionID(u uuid.UUID) *HasMetadataUpdate

SetPackageVersionID sets the "package_version_id" field.

func (*HasMetadataUpdate) SetSource added in v0.2.1

func (hmu *HasMetadataUpdate) SetSource(s *SourceName) *HasMetadataUpdate

SetSource sets the "source" edge to the SourceName entity.

func (*HasMetadataUpdate) SetSourceID added in v0.2.1

func (hmu *HasMetadataUpdate) SetSourceID(u uuid.UUID) *HasMetadataUpdate

SetSourceID sets the "source_id" field.

func (*HasMetadataUpdate) SetTimestamp added in v0.2.1

func (hmu *HasMetadataUpdate) SetTimestamp(t time.Time) *HasMetadataUpdate

SetTimestamp sets the "timestamp" field.

func (*HasMetadataUpdate) SetValue added in v0.2.1

func (hmu *HasMetadataUpdate) SetValue(s string) *HasMetadataUpdate

SetValue sets the "value" field.

func (*HasMetadataUpdate) Where added in v0.2.1

Where appends a list predicates to the HasMetadataUpdate builder.

type HasMetadataUpdateOne added in v0.2.1

type HasMetadataUpdateOne struct {
	// contains filtered or unexported fields
}

HasMetadataUpdateOne is the builder for updating a single HasMetadata entity.

func (*HasMetadataUpdateOne) ClearAllVersions added in v0.2.1

func (hmuo *HasMetadataUpdateOne) ClearAllVersions() *HasMetadataUpdateOne

ClearAllVersions clears the "all_versions" edge to the PackageName entity.

func (*HasMetadataUpdateOne) ClearArtifact added in v0.2.1

func (hmuo *HasMetadataUpdateOne) ClearArtifact() *HasMetadataUpdateOne

ClearArtifact clears the "artifact" edge to the Artifact entity.

func (*HasMetadataUpdateOne) ClearArtifactID added in v0.2.1

func (hmuo *HasMetadataUpdateOne) ClearArtifactID() *HasMetadataUpdateOne

ClearArtifactID clears the value of the "artifact_id" field.

func (*HasMetadataUpdateOne) ClearPackageNameID added in v0.2.1

func (hmuo *HasMetadataUpdateOne) ClearPackageNameID() *HasMetadataUpdateOne

ClearPackageNameID clears the value of the "package_name_id" field.

func (*HasMetadataUpdateOne) ClearPackageVersion added in v0.2.1

func (hmuo *HasMetadataUpdateOne) ClearPackageVersion() *HasMetadataUpdateOne

ClearPackageVersion clears the "package_version" edge to the PackageVersion entity.

func (*HasMetadataUpdateOne) ClearPackageVersionID added in v0.2.1

func (hmuo *HasMetadataUpdateOne) ClearPackageVersionID() *HasMetadataUpdateOne

ClearPackageVersionID clears the value of the "package_version_id" field.

func (*HasMetadataUpdateOne) ClearSource added in v0.2.1

func (hmuo *HasMetadataUpdateOne) ClearSource() *HasMetadataUpdateOne

ClearSource clears the "source" edge to the SourceName entity.

func (*HasMetadataUpdateOne) ClearSourceID added in v0.2.1

func (hmuo *HasMetadataUpdateOne) ClearSourceID() *HasMetadataUpdateOne

ClearSourceID clears the value of the "source_id" field.

func (*HasMetadataUpdateOne) Exec added in v0.2.1

func (hmuo *HasMetadataUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*HasMetadataUpdateOne) ExecX added in v0.2.1

func (hmuo *HasMetadataUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*HasMetadataUpdateOne) Mutation added in v0.2.1

func (hmuo *HasMetadataUpdateOne) Mutation() *HasMetadataMutation

Mutation returns the HasMetadataMutation object of the builder.

func (*HasMetadataUpdateOne) Save added in v0.2.1

Save executes the query and returns the updated HasMetadata entity.

func (*HasMetadataUpdateOne) SaveX added in v0.2.1

func (hmuo *HasMetadataUpdateOne) SaveX(ctx context.Context) *HasMetadata

SaveX is like Save, but panics if an error occurs.

func (*HasMetadataUpdateOne) Select added in v0.2.1

func (hmuo *HasMetadataUpdateOne) Select(field string, fields ...string) *HasMetadataUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*HasMetadataUpdateOne) SetAllVersions added in v0.2.1

func (hmuo *HasMetadataUpdateOne) SetAllVersions(p *PackageName) *HasMetadataUpdateOne

SetAllVersions sets the "all_versions" edge to the PackageName entity.

func (*HasMetadataUpdateOne) SetAllVersionsID added in v0.2.1

func (hmuo *HasMetadataUpdateOne) SetAllVersionsID(id uuid.UUID) *HasMetadataUpdateOne

SetAllVersionsID sets the "all_versions" edge to the PackageName entity by ID.

func (*HasMetadataUpdateOne) SetArtifact added in v0.2.1

func (hmuo *HasMetadataUpdateOne) SetArtifact(a *Artifact) *HasMetadataUpdateOne

SetArtifact sets the "artifact" edge to the Artifact entity.

func (*HasMetadataUpdateOne) SetArtifactID added in v0.2.1

func (hmuo *HasMetadataUpdateOne) SetArtifactID(u uuid.UUID) *HasMetadataUpdateOne

SetArtifactID sets the "artifact_id" field.

func (*HasMetadataUpdateOne) SetCollector added in v0.2.1

func (hmuo *HasMetadataUpdateOne) SetCollector(s string) *HasMetadataUpdateOne

SetCollector sets the "collector" field.

func (*HasMetadataUpdateOne) SetDocumentRef added in v0.6.0

func (hmuo *HasMetadataUpdateOne) SetDocumentRef(s string) *HasMetadataUpdateOne

SetDocumentRef sets the "document_ref" field.

func (*HasMetadataUpdateOne) SetJustification added in v0.2.1

func (hmuo *HasMetadataUpdateOne) SetJustification(s string) *HasMetadataUpdateOne

SetJustification sets the "justification" field.

func (*HasMetadataUpdateOne) SetKey added in v0.2.1

SetKey sets the "key" field.

func (*HasMetadataUpdateOne) SetNillableAllVersionsID added in v0.2.1

func (hmuo *HasMetadataUpdateOne) SetNillableAllVersionsID(id *uuid.UUID) *HasMetadataUpdateOne

SetNillableAllVersionsID sets the "all_versions" edge to the PackageName entity by ID if the given value is not nil.

func (*HasMetadataUpdateOne) SetNillableArtifactID added in v0.2.1

func (hmuo *HasMetadataUpdateOne) SetNillableArtifactID(u *uuid.UUID) *HasMetadataUpdateOne

SetNillableArtifactID sets the "artifact_id" field if the given value is not nil.

func (*HasMetadataUpdateOne) SetNillableCollector added in v0.4.0

func (hmuo *HasMetadataUpdateOne) SetNillableCollector(s *string) *HasMetadataUpdateOne

SetNillableCollector sets the "collector" field if the given value is not nil.

func (*HasMetadataUpdateOne) SetNillableDocumentRef added in v0.6.0

func (hmuo *HasMetadataUpdateOne) SetNillableDocumentRef(s *string) *HasMetadataUpdateOne

SetNillableDocumentRef sets the "document_ref" field if the given value is not nil.

func (*HasMetadataUpdateOne) SetNillableJustification added in v0.4.0

func (hmuo *HasMetadataUpdateOne) SetNillableJustification(s *string) *HasMetadataUpdateOne

SetNillableJustification sets the "justification" field if the given value is not nil.

func (*HasMetadataUpdateOne) SetNillableKey added in v0.4.0

func (hmuo *HasMetadataUpdateOne) SetNillableKey(s *string) *HasMetadataUpdateOne

SetNillableKey sets the "key" field if the given value is not nil.

func (*HasMetadataUpdateOne) SetNillableOrigin added in v0.4.0

func (hmuo *HasMetadataUpdateOne) SetNillableOrigin(s *string) *HasMetadataUpdateOne

SetNillableOrigin sets the "origin" field if the given value is not nil.

func (*HasMetadataUpdateOne) SetNillablePackageNameID added in v0.2.1

func (hmuo *HasMetadataUpdateOne) SetNillablePackageNameID(u *uuid.UUID) *HasMetadataUpdateOne

SetNillablePackageNameID sets the "package_name_id" field if the given value is not nil.

func (*HasMetadataUpdateOne) SetNillablePackageVersionID added in v0.2.1

func (hmuo *HasMetadataUpdateOne) SetNillablePackageVersionID(u *uuid.UUID) *HasMetadataUpdateOne

SetNillablePackageVersionID sets the "package_version_id" field if the given value is not nil.

func (*HasMetadataUpdateOne) SetNillableSourceID added in v0.2.1

func (hmuo *HasMetadataUpdateOne) SetNillableSourceID(u *uuid.UUID) *HasMetadataUpdateOne

SetNillableSourceID sets the "source_id" field if the given value is not nil.

func (*HasMetadataUpdateOne) SetNillableTimestamp added in v0.4.0

func (hmuo *HasMetadataUpdateOne) SetNillableTimestamp(t *time.Time) *HasMetadataUpdateOne

SetNillableTimestamp sets the "timestamp" field if the given value is not nil.

func (*HasMetadataUpdateOne) SetNillableValue added in v0.4.0

func (hmuo *HasMetadataUpdateOne) SetNillableValue(s *string) *HasMetadataUpdateOne

SetNillableValue sets the "value" field if the given value is not nil.

func (*HasMetadataUpdateOne) SetOrigin added in v0.2.1

func (hmuo *HasMetadataUpdateOne) SetOrigin(s string) *HasMetadataUpdateOne

SetOrigin sets the "origin" field.

func (*HasMetadataUpdateOne) SetPackageNameID added in v0.2.1

func (hmuo *HasMetadataUpdateOne) SetPackageNameID(u uuid.UUID) *HasMetadataUpdateOne

SetPackageNameID sets the "package_name_id" field.

func (*HasMetadataUpdateOne) SetPackageVersion added in v0.2.1

func (hmuo *HasMetadataUpdateOne) SetPackageVersion(p *PackageVersion) *HasMetadataUpdateOne

SetPackageVersion sets the "package_version" edge to the PackageVersion entity.

func (*HasMetadataUpdateOne) SetPackageVersionID added in v0.2.1

func (hmuo *HasMetadataUpdateOne) SetPackageVersionID(u uuid.UUID) *HasMetadataUpdateOne

SetPackageVersionID sets the "package_version_id" field.

func (*HasMetadataUpdateOne) SetSource added in v0.2.1

SetSource sets the "source" edge to the SourceName entity.

func (*HasMetadataUpdateOne) SetSourceID added in v0.2.1

func (hmuo *HasMetadataUpdateOne) SetSourceID(u uuid.UUID) *HasMetadataUpdateOne

SetSourceID sets the "source_id" field.

func (*HasMetadataUpdateOne) SetTimestamp added in v0.2.1

func (hmuo *HasMetadataUpdateOne) SetTimestamp(t time.Time) *HasMetadataUpdateOne

SetTimestamp sets the "timestamp" field.

func (*HasMetadataUpdateOne) SetValue added in v0.2.1

SetValue sets the "value" field.

func (*HasMetadataUpdateOne) Where added in v0.2.1

Where appends a list predicates to the HasMetadataUpdate builder.

type HasMetadataUpsert added in v0.2.1

type HasMetadataUpsert struct {
	*sql.UpdateSet
}

HasMetadataUpsert is the "OnConflict" setter.

func (*HasMetadataUpsert) ClearArtifactID added in v0.2.1

func (u *HasMetadataUpsert) ClearArtifactID() *HasMetadataUpsert

ClearArtifactID clears the value of the "artifact_id" field.

func (*HasMetadataUpsert) ClearPackageNameID added in v0.2.1

func (u *HasMetadataUpsert) ClearPackageNameID() *HasMetadataUpsert

ClearPackageNameID clears the value of the "package_name_id" field.

func (*HasMetadataUpsert) ClearPackageVersionID added in v0.2.1

func (u *HasMetadataUpsert) ClearPackageVersionID() *HasMetadataUpsert

ClearPackageVersionID clears the value of the "package_version_id" field.

func (*HasMetadataUpsert) ClearSourceID added in v0.2.1

func (u *HasMetadataUpsert) ClearSourceID() *HasMetadataUpsert

ClearSourceID clears the value of the "source_id" field.

func (*HasMetadataUpsert) SetArtifactID added in v0.2.1

func (u *HasMetadataUpsert) SetArtifactID(v uuid.UUID) *HasMetadataUpsert

SetArtifactID sets the "artifact_id" field.

func (*HasMetadataUpsert) SetCollector added in v0.2.1

func (u *HasMetadataUpsert) SetCollector(v string) *HasMetadataUpsert

SetCollector sets the "collector" field.

func (*HasMetadataUpsert) SetDocumentRef added in v0.6.0

func (u *HasMetadataUpsert) SetDocumentRef(v string) *HasMetadataUpsert

SetDocumentRef sets the "document_ref" field.

func (*HasMetadataUpsert) SetJustification added in v0.2.1

func (u *HasMetadataUpsert) SetJustification(v string) *HasMetadataUpsert

SetJustification sets the "justification" field.

func (*HasMetadataUpsert) SetKey added in v0.2.1

SetKey sets the "key" field.

func (*HasMetadataUpsert) SetOrigin added in v0.2.1

func (u *HasMetadataUpsert) SetOrigin(v string) *HasMetadataUpsert

SetOrigin sets the "origin" field.

func (*HasMetadataUpsert) SetPackageNameID added in v0.2.1

func (u *HasMetadataUpsert) SetPackageNameID(v uuid.UUID) *HasMetadataUpsert

SetPackageNameID sets the "package_name_id" field.

func (*HasMetadataUpsert) SetPackageVersionID added in v0.2.1

func (u *HasMetadataUpsert) SetPackageVersionID(v uuid.UUID) *HasMetadataUpsert

SetPackageVersionID sets the "package_version_id" field.

func (*HasMetadataUpsert) SetSourceID added in v0.2.1

func (u *HasMetadataUpsert) SetSourceID(v uuid.UUID) *HasMetadataUpsert

SetSourceID sets the "source_id" field.

func (*HasMetadataUpsert) SetTimestamp added in v0.2.1

func (u *HasMetadataUpsert) SetTimestamp(v time.Time) *HasMetadataUpsert

SetTimestamp sets the "timestamp" field.

func (*HasMetadataUpsert) SetValue added in v0.2.1

func (u *HasMetadataUpsert) SetValue(v string) *HasMetadataUpsert

SetValue sets the "value" field.

func (*HasMetadataUpsert) UpdateArtifactID added in v0.2.1

func (u *HasMetadataUpsert) UpdateArtifactID() *HasMetadataUpsert

UpdateArtifactID sets the "artifact_id" field to the value that was provided on create.

func (*HasMetadataUpsert) UpdateCollector added in v0.2.1

func (u *HasMetadataUpsert) UpdateCollector() *HasMetadataUpsert

UpdateCollector sets the "collector" field to the value that was provided on create.

func (*HasMetadataUpsert) UpdateDocumentRef added in v0.6.0

func (u *HasMetadataUpsert) UpdateDocumentRef() *HasMetadataUpsert

UpdateDocumentRef sets the "document_ref" field to the value that was provided on create.

func (*HasMetadataUpsert) UpdateJustification added in v0.2.1

func (u *HasMetadataUpsert) UpdateJustification() *HasMetadataUpsert

UpdateJustification sets the "justification" field to the value that was provided on create.

func (*HasMetadataUpsert) UpdateKey added in v0.2.1

func (u *HasMetadataUpsert) UpdateKey() *HasMetadataUpsert

UpdateKey sets the "key" field to the value that was provided on create.

func (*HasMetadataUpsert) UpdateOrigin added in v0.2.1

func (u *HasMetadataUpsert) UpdateOrigin() *HasMetadataUpsert

UpdateOrigin sets the "origin" field to the value that was provided on create.

func (*HasMetadataUpsert) UpdatePackageNameID added in v0.2.1

func (u *HasMetadataUpsert) UpdatePackageNameID() *HasMetadataUpsert

UpdatePackageNameID sets the "package_name_id" field to the value that was provided on create.

func (*HasMetadataUpsert) UpdatePackageVersionID added in v0.2.1

func (u *HasMetadataUpsert) UpdatePackageVersionID() *HasMetadataUpsert

UpdatePackageVersionID sets the "package_version_id" field to the value that was provided on create.

func (*HasMetadataUpsert) UpdateSourceID added in v0.2.1

func (u *HasMetadataUpsert) UpdateSourceID() *HasMetadataUpsert

UpdateSourceID sets the "source_id" field to the value that was provided on create.

func (*HasMetadataUpsert) UpdateTimestamp added in v0.2.1

func (u *HasMetadataUpsert) UpdateTimestamp() *HasMetadataUpsert

UpdateTimestamp sets the "timestamp" field to the value that was provided on create.

func (*HasMetadataUpsert) UpdateValue added in v0.2.1

func (u *HasMetadataUpsert) UpdateValue() *HasMetadataUpsert

UpdateValue sets the "value" field to the value that was provided on create.

type HasMetadataUpsertBulk added in v0.2.1

type HasMetadataUpsertBulk struct {
	// contains filtered or unexported fields
}

HasMetadataUpsertBulk is the builder for "upsert"-ing a bulk of HasMetadata nodes.

func (*HasMetadataUpsertBulk) ClearArtifactID added in v0.2.1

func (u *HasMetadataUpsertBulk) ClearArtifactID() *HasMetadataUpsertBulk

ClearArtifactID clears the value of the "artifact_id" field.

func (*HasMetadataUpsertBulk) ClearPackageNameID added in v0.2.1

func (u *HasMetadataUpsertBulk) ClearPackageNameID() *HasMetadataUpsertBulk

ClearPackageNameID clears the value of the "package_name_id" field.

func (*HasMetadataUpsertBulk) ClearPackageVersionID added in v0.2.1

func (u *HasMetadataUpsertBulk) ClearPackageVersionID() *HasMetadataUpsertBulk

ClearPackageVersionID clears the value of the "package_version_id" field.

func (*HasMetadataUpsertBulk) ClearSourceID added in v0.2.1

func (u *HasMetadataUpsertBulk) ClearSourceID() *HasMetadataUpsertBulk

ClearSourceID clears the value of the "source_id" field.

func (*HasMetadataUpsertBulk) DoNothing added in v0.2.1

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*HasMetadataUpsertBulk) Exec added in v0.2.1

Exec executes the query.

func (*HasMetadataUpsertBulk) ExecX added in v0.2.1

func (u *HasMetadataUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*HasMetadataUpsertBulk) Ignore added in v0.2.1

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.HasMetadata.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*HasMetadataUpsertBulk) SetArtifactID added in v0.2.1

SetArtifactID sets the "artifact_id" field.

func (*HasMetadataUpsertBulk) SetCollector added in v0.2.1

SetCollector sets the "collector" field.

func (*HasMetadataUpsertBulk) SetDocumentRef added in v0.6.0

func (u *HasMetadataUpsertBulk) SetDocumentRef(v string) *HasMetadataUpsertBulk

SetDocumentRef sets the "document_ref" field.

func (*HasMetadataUpsertBulk) SetJustification added in v0.2.1

func (u *HasMetadataUpsertBulk) SetJustification(v string) *HasMetadataUpsertBulk

SetJustification sets the "justification" field.

func (*HasMetadataUpsertBulk) SetKey added in v0.2.1

SetKey sets the "key" field.

func (*HasMetadataUpsertBulk) SetOrigin added in v0.2.1

SetOrigin sets the "origin" field.

func (*HasMetadataUpsertBulk) SetPackageNameID added in v0.2.1

func (u *HasMetadataUpsertBulk) SetPackageNameID(v uuid.UUID) *HasMetadataUpsertBulk

SetPackageNameID sets the "package_name_id" field.

func (*HasMetadataUpsertBulk) SetPackageVersionID added in v0.2.1

func (u *HasMetadataUpsertBulk) SetPackageVersionID(v uuid.UUID) *HasMetadataUpsertBulk

SetPackageVersionID sets the "package_version_id" field.

func (*HasMetadataUpsertBulk) SetSourceID added in v0.2.1

SetSourceID sets the "source_id" field.

func (*HasMetadataUpsertBulk) SetTimestamp added in v0.2.1

SetTimestamp sets the "timestamp" field.

func (*HasMetadataUpsertBulk) SetValue added in v0.2.1

SetValue sets the "value" field.

func (*HasMetadataUpsertBulk) Update added in v0.2.1

Update allows overriding fields `UPDATE` values. See the HasMetadataCreateBulk.OnConflict documentation for more info.

func (*HasMetadataUpsertBulk) UpdateArtifactID added in v0.2.1

func (u *HasMetadataUpsertBulk) UpdateArtifactID() *HasMetadataUpsertBulk

UpdateArtifactID sets the "artifact_id" field to the value that was provided on create.

func (*HasMetadataUpsertBulk) UpdateCollector added in v0.2.1

func (u *HasMetadataUpsertBulk) UpdateCollector() *HasMetadataUpsertBulk

UpdateCollector sets the "collector" field to the value that was provided on create.

func (*HasMetadataUpsertBulk) UpdateDocumentRef added in v0.6.0

func (u *HasMetadataUpsertBulk) UpdateDocumentRef() *HasMetadataUpsertBulk

UpdateDocumentRef sets the "document_ref" field to the value that was provided on create.

func (*HasMetadataUpsertBulk) UpdateJustification added in v0.2.1

func (u *HasMetadataUpsertBulk) UpdateJustification() *HasMetadataUpsertBulk

UpdateJustification sets the "justification" field to the value that was provided on create.

func (*HasMetadataUpsertBulk) UpdateKey added in v0.2.1

UpdateKey sets the "key" field to the value that was provided on create.

func (*HasMetadataUpsertBulk) UpdateNewValues added in v0.2.1

func (u *HasMetadataUpsertBulk) UpdateNewValues() *HasMetadataUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.HasMetadata.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(hasmetadata.FieldID)
		}),
	).
	Exec(ctx)

func (*HasMetadataUpsertBulk) UpdateOrigin added in v0.2.1

func (u *HasMetadataUpsertBulk) UpdateOrigin() *HasMetadataUpsertBulk

UpdateOrigin sets the "origin" field to the value that was provided on create.

func (*HasMetadataUpsertBulk) UpdatePackageNameID added in v0.2.1

func (u *HasMetadataUpsertBulk) UpdatePackageNameID() *HasMetadataUpsertBulk

UpdatePackageNameID sets the "package_name_id" field to the value that was provided on create.

func (*HasMetadataUpsertBulk) UpdatePackageVersionID added in v0.2.1

func (u *HasMetadataUpsertBulk) UpdatePackageVersionID() *HasMetadataUpsertBulk

UpdatePackageVersionID sets the "package_version_id" field to the value that was provided on create.

func (*HasMetadataUpsertBulk) UpdateSourceID added in v0.2.1

func (u *HasMetadataUpsertBulk) UpdateSourceID() *HasMetadataUpsertBulk

UpdateSourceID sets the "source_id" field to the value that was provided on create.

func (*HasMetadataUpsertBulk) UpdateTimestamp added in v0.2.1

func (u *HasMetadataUpsertBulk) UpdateTimestamp() *HasMetadataUpsertBulk

UpdateTimestamp sets the "timestamp" field to the value that was provided on create.

func (*HasMetadataUpsertBulk) UpdateValue added in v0.2.1

func (u *HasMetadataUpsertBulk) UpdateValue() *HasMetadataUpsertBulk

UpdateValue sets the "value" field to the value that was provided on create.

type HasMetadataUpsertOne added in v0.2.1

type HasMetadataUpsertOne struct {
	// contains filtered or unexported fields
}

HasMetadataUpsertOne is the builder for "upsert"-ing

one HasMetadata node.

func (*HasMetadataUpsertOne) ClearArtifactID added in v0.2.1

func (u *HasMetadataUpsertOne) ClearArtifactID() *HasMetadataUpsertOne

ClearArtifactID clears the value of the "artifact_id" field.

func (*HasMetadataUpsertOne) ClearPackageNameID added in v0.2.1

func (u *HasMetadataUpsertOne) ClearPackageNameID() *HasMetadataUpsertOne

ClearPackageNameID clears the value of the "package_name_id" field.

func (*HasMetadataUpsertOne) ClearPackageVersionID added in v0.2.1

func (u *HasMetadataUpsertOne) ClearPackageVersionID() *HasMetadataUpsertOne

ClearPackageVersionID clears the value of the "package_version_id" field.

func (*HasMetadataUpsertOne) ClearSourceID added in v0.2.1

func (u *HasMetadataUpsertOne) ClearSourceID() *HasMetadataUpsertOne

ClearSourceID clears the value of the "source_id" field.

func (*HasMetadataUpsertOne) DoNothing added in v0.2.1

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*HasMetadataUpsertOne) Exec added in v0.2.1

Exec executes the query.

func (*HasMetadataUpsertOne) ExecX added in v0.2.1

func (u *HasMetadataUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*HasMetadataUpsertOne) ID added in v0.2.1

func (u *HasMetadataUpsertOne) ID(ctx context.Context) (id uuid.UUID, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*HasMetadataUpsertOne) IDX added in v0.2.1

IDX is like ID, but panics if an error occurs.

func (*HasMetadataUpsertOne) Ignore added in v0.2.1

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.HasMetadata.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*HasMetadataUpsertOne) SetArtifactID added in v0.2.1

func (u *HasMetadataUpsertOne) SetArtifactID(v uuid.UUID) *HasMetadataUpsertOne

SetArtifactID sets the "artifact_id" field.

func (*HasMetadataUpsertOne) SetCollector added in v0.2.1

func (u *HasMetadataUpsertOne) SetCollector(v string) *HasMetadataUpsertOne

SetCollector sets the "collector" field.

func (*HasMetadataUpsertOne) SetDocumentRef added in v0.6.0

func (u *HasMetadataUpsertOne) SetDocumentRef(v string) *HasMetadataUpsertOne

SetDocumentRef sets the "document_ref" field.

func (*HasMetadataUpsertOne) SetJustification added in v0.2.1

func (u *HasMetadataUpsertOne) SetJustification(v string) *HasMetadataUpsertOne

SetJustification sets the "justification" field.

func (*HasMetadataUpsertOne) SetKey added in v0.2.1

SetKey sets the "key" field.

func (*HasMetadataUpsertOne) SetOrigin added in v0.2.1

SetOrigin sets the "origin" field.

func (*HasMetadataUpsertOne) SetPackageNameID added in v0.2.1

func (u *HasMetadataUpsertOne) SetPackageNameID(v uuid.UUID) *HasMetadataUpsertOne

SetPackageNameID sets the "package_name_id" field.

func (*HasMetadataUpsertOne) SetPackageVersionID added in v0.2.1

func (u *HasMetadataUpsertOne) SetPackageVersionID(v uuid.UUID) *HasMetadataUpsertOne

SetPackageVersionID sets the "package_version_id" field.

func (*HasMetadataUpsertOne) SetSourceID added in v0.2.1

SetSourceID sets the "source_id" field.

func (*HasMetadataUpsertOne) SetTimestamp added in v0.2.1

func (u *HasMetadataUpsertOne) SetTimestamp(v time.Time) *HasMetadataUpsertOne

SetTimestamp sets the "timestamp" field.

func (*HasMetadataUpsertOne) SetValue added in v0.2.1

SetValue sets the "value" field.

func (*HasMetadataUpsertOne) Update added in v0.2.1

Update allows overriding fields `UPDATE` values. See the HasMetadataCreate.OnConflict documentation for more info.

func (*HasMetadataUpsertOne) UpdateArtifactID added in v0.2.1

func (u *HasMetadataUpsertOne) UpdateArtifactID() *HasMetadataUpsertOne

UpdateArtifactID sets the "artifact_id" field to the value that was provided on create.

func (*HasMetadataUpsertOne) UpdateCollector added in v0.2.1

func (u *HasMetadataUpsertOne) UpdateCollector() *HasMetadataUpsertOne

UpdateCollector sets the "collector" field to the value that was provided on create.

func (*HasMetadataUpsertOne) UpdateDocumentRef added in v0.6.0

func (u *HasMetadataUpsertOne) UpdateDocumentRef() *HasMetadataUpsertOne

UpdateDocumentRef sets the "document_ref" field to the value that was provided on create.

func (*HasMetadataUpsertOne) UpdateJustification added in v0.2.1

func (u *HasMetadataUpsertOne) UpdateJustification() *HasMetadataUpsertOne

UpdateJustification sets the "justification" field to the value that was provided on create.

func (*HasMetadataUpsertOne) UpdateKey added in v0.2.1

UpdateKey sets the "key" field to the value that was provided on create.

func (*HasMetadataUpsertOne) UpdateNewValues added in v0.2.1

func (u *HasMetadataUpsertOne) UpdateNewValues() *HasMetadataUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:

client.HasMetadata.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(hasmetadata.FieldID)
		}),
	).
	Exec(ctx)

func (*HasMetadataUpsertOne) UpdateOrigin added in v0.2.1

func (u *HasMetadataUpsertOne) UpdateOrigin() *HasMetadataUpsertOne

UpdateOrigin sets the "origin" field to the value that was provided on create.

func (*HasMetadataUpsertOne) UpdatePackageNameID added in v0.2.1

func (u *HasMetadataUpsertOne) UpdatePackageNameID() *HasMetadataUpsertOne

UpdatePackageNameID sets the "package_name_id" field to the value that was provided on create.

func (*HasMetadataUpsertOne) UpdatePackageVersionID added in v0.2.1

func (u *HasMetadataUpsertOne) UpdatePackageVersionID() *HasMetadataUpsertOne

UpdatePackageVersionID sets the "package_version_id" field to the value that was provided on create.

func (*HasMetadataUpsertOne) UpdateSourceID added in v0.2.1

func (u *HasMetadataUpsertOne) UpdateSourceID() *HasMetadataUpsertOne

UpdateSourceID sets the "source_id" field to the value that was provided on create.

func (*HasMetadataUpsertOne) UpdateTimestamp added in v0.2.1

func (u *HasMetadataUpsertOne) UpdateTimestamp() *HasMetadataUpsertOne

UpdateTimestamp sets the "timestamp" field to the value that was provided on create.

func (*HasMetadataUpsertOne) UpdateValue added in v0.2.1

func (u *HasMetadataUpsertOne) UpdateValue() *HasMetadataUpsertOne

UpdateValue sets the "value" field to the value that was provided on create.

type HasSourceAt

type HasSourceAt struct {

	// ID of the ent.
	ID uuid.UUID `json:"id,omitempty"`
	// PackageVersionID holds the value of the "package_version_id" field.
	PackageVersionID *uuid.UUID `json:"package_version_id,omitempty"`
	// PackageNameID holds the value of the "package_name_id" field.
	PackageNameID *uuid.UUID `json:"package_name_id,omitempty"`
	// SourceID holds the value of the "source_id" field.
	SourceID uuid.UUID `json:"source_id,omitempty"`
	// KnownSince holds the value of the "known_since" field.
	KnownSince time.Time `json:"known_since,omitempty"`
	// Justification holds the value of the "justification" field.
	Justification string `json:"justification,omitempty"`
	// Origin holds the value of the "origin" field.
	Origin string `json:"origin,omitempty"`
	// Collector holds the value of the "collector" field.
	Collector string `json:"collector,omitempty"`
	// DocumentRef holds the value of the "document_ref" field.
	DocumentRef string `json:"document_ref,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the HasSourceAtQuery when eager-loading is set.
	Edges HasSourceAtEdges `json:"edges"`
	// contains filtered or unexported fields
}

HasSourceAt is the model entity for the HasSourceAt schema.

func (*HasSourceAt) AllVersions

func (hsa *HasSourceAt) AllVersions(ctx context.Context) (*PackageName, error)

func (*HasSourceAt) IsNode

func (n *HasSourceAt) IsNode()

IsNode implements the Node interface check for GQLGen.

func (*HasSourceAt) PackageVersion

func (hsa *HasSourceAt) PackageVersion(ctx context.Context) (*PackageVersion, error)

func (*HasSourceAt) QueryAllVersions

func (hsa *HasSourceAt) QueryAllVersions() *PackageNameQuery

QueryAllVersions queries the "all_versions" edge of the HasSourceAt entity.

func (*HasSourceAt) QueryPackageVersion

func (hsa *HasSourceAt) QueryPackageVersion() *PackageVersionQuery

QueryPackageVersion queries the "package_version" edge of the HasSourceAt entity.

func (*HasSourceAt) QuerySource

func (hsa *HasSourceAt) QuerySource() *SourceNameQuery

QuerySource queries the "source" edge of the HasSourceAt entity.

func (*HasSourceAt) Source

func (hsa *HasSourceAt) Source(ctx context.Context) (*SourceName, error)

func (*HasSourceAt) String

func (hsa *HasSourceAt) String() string

String implements the fmt.Stringer.

func (*HasSourceAt) ToEdge

func (hsa *HasSourceAt) ToEdge(order *HasSourceAtOrder) *HasSourceAtEdge

ToEdge converts HasSourceAt into HasSourceAtEdge.

func (*HasSourceAt) Unwrap

func (hsa *HasSourceAt) Unwrap() *HasSourceAt

Unwrap unwraps the HasSourceAt entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.

func (*HasSourceAt) Update

func (hsa *HasSourceAt) Update() *HasSourceAtUpdateOne

Update returns a builder for updating this HasSourceAt. Note that you need to call HasSourceAt.Unwrap() before calling this method if this HasSourceAt was returned from a transaction, and the transaction was committed or rolled back.

func (*HasSourceAt) Value

func (hsa *HasSourceAt) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the HasSourceAt. This includes values selected through modifiers, order, etc.

type HasSourceAtClient

type HasSourceAtClient struct {
	// contains filtered or unexported fields
}

HasSourceAtClient is a client for the HasSourceAt schema.

func NewHasSourceAtClient

func NewHasSourceAtClient(c config) *HasSourceAtClient

NewHasSourceAtClient returns a client for the HasSourceAt from the given config.

func (*HasSourceAtClient) Create

func (c *HasSourceAtClient) Create() *HasSourceAtCreate

Create returns a builder for creating a HasSourceAt entity.

func (*HasSourceAtClient) CreateBulk

func (c *HasSourceAtClient) CreateBulk(builders ...*HasSourceAtCreate) *HasSourceAtCreateBulk

CreateBulk returns a builder for creating a bulk of HasSourceAt entities.

func (*HasSourceAtClient) Delete

func (c *HasSourceAtClient) Delete() *HasSourceAtDelete

Delete returns a delete builder for HasSourceAt.

func (*HasSourceAtClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*HasSourceAtClient) DeleteOneID

func (c *HasSourceAtClient) DeleteOneID(id uuid.UUID) *HasSourceAtDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*HasSourceAtClient) Get

Get returns a HasSourceAt entity by its id.

func (*HasSourceAtClient) GetX

GetX is like Get, but panics if an error occurs.

func (*HasSourceAtClient) Hooks

func (c *HasSourceAtClient) Hooks() []Hook

Hooks returns the client hooks.

func (*HasSourceAtClient) Intercept

func (c *HasSourceAtClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `hassourceat.Intercept(f(g(h())))`.

func (*HasSourceAtClient) Interceptors

func (c *HasSourceAtClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*HasSourceAtClient) MapCreateBulk

func (c *HasSourceAtClient) MapCreateBulk(slice any, setFunc func(*HasSourceAtCreate, int)) *HasSourceAtCreateBulk

MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.

func (*HasSourceAtClient) Query

func (c *HasSourceAtClient) Query() *HasSourceAtQuery

Query returns a query builder for HasSourceAt.

func (*HasSourceAtClient) QueryAllVersions

func (c *HasSourceAtClient) QueryAllVersions(hsa *HasSourceAt) *PackageNameQuery

QueryAllVersions queries the all_versions edge of a HasSourceAt.

func (*HasSourceAtClient) QueryPackageVersion

func (c *HasSourceAtClient) QueryPackageVersion(hsa *HasSourceAt) *PackageVersionQuery

QueryPackageVersion queries the package_version edge of a HasSourceAt.

func (*HasSourceAtClient) QuerySource

func (c *HasSourceAtClient) QuerySource(hsa *HasSourceAt) *SourceNameQuery

QuerySource queries the source edge of a HasSourceAt.

func (*HasSourceAtClient) Update

func (c *HasSourceAtClient) Update() *HasSourceAtUpdate

Update returns an update builder for HasSourceAt.

func (*HasSourceAtClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*HasSourceAtClient) UpdateOneID

func (c *HasSourceAtClient) UpdateOneID(id uuid.UUID) *HasSourceAtUpdateOne

UpdateOneID returns an update builder for the given id.

func (*HasSourceAtClient) Use

func (c *HasSourceAtClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `hassourceat.Hooks(f(g(h())))`.

type HasSourceAtConnection

type HasSourceAtConnection struct {
	Edges      []*HasSourceAtEdge `json:"edges"`
	PageInfo   PageInfo           `json:"pageInfo"`
	TotalCount int                `json:"totalCount"`
}

HasSourceAtConnection is the connection containing edges to HasSourceAt.

type HasSourceAtCreate

type HasSourceAtCreate struct {
	// contains filtered or unexported fields
}

HasSourceAtCreate is the builder for creating a HasSourceAt entity.

func (*HasSourceAtCreate) Exec

func (hsac *HasSourceAtCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*HasSourceAtCreate) ExecX

func (hsac *HasSourceAtCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*HasSourceAtCreate) Mutation

func (hsac *HasSourceAtCreate) Mutation() *HasSourceAtMutation

Mutation returns the HasSourceAtMutation object of the builder.

func (*HasSourceAtCreate) OnConflict

func (hsac *HasSourceAtCreate) OnConflict(opts ...sql.ConflictOption) *HasSourceAtUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.HasSourceAt.Create().
	SetPackageVersionID(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.HasSourceAtUpsert) {
		SetPackageVersionID(v+v).
	}).
	Exec(ctx)

func (*HasSourceAtCreate) OnConflictColumns

func (hsac *HasSourceAtCreate) OnConflictColumns(columns ...string) *HasSourceAtUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.HasSourceAt.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*HasSourceAtCreate) Save

func (hsac *HasSourceAtCreate) Save(ctx context.Context) (*HasSourceAt, error)

Save creates the HasSourceAt in the database.

func (*HasSourceAtCreate) SaveX

func (hsac *HasSourceAtCreate) SaveX(ctx context.Context) *HasSourceAt

SaveX calls Save and panics if Save returns an error.

func (*HasSourceAtCreate) SetAllVersions

func (hsac *HasSourceAtCreate) SetAllVersions(p *PackageName) *HasSourceAtCreate

SetAllVersions sets the "all_versions" edge to the PackageName entity.

func (*HasSourceAtCreate) SetAllVersionsID

func (hsac *HasSourceAtCreate) SetAllVersionsID(id uuid.UUID) *HasSourceAtCreate

SetAllVersionsID sets the "all_versions" edge to the PackageName entity by ID.

func (*HasSourceAtCreate) SetCollector

func (hsac *HasSourceAtCreate) SetCollector(s string) *HasSourceAtCreate

SetCollector sets the "collector" field.

func (*HasSourceAtCreate) SetDocumentRef added in v0.6.0

func (hsac *HasSourceAtCreate) SetDocumentRef(s string) *HasSourceAtCreate

SetDocumentRef sets the "document_ref" field.

func (*HasSourceAtCreate) SetID added in v0.5.0

func (hsac *HasSourceAtCreate) SetID(u uuid.UUID) *HasSourceAtCreate

SetID sets the "id" field.

func (*HasSourceAtCreate) SetJustification

func (hsac *HasSourceAtCreate) SetJustification(s string) *HasSourceAtCreate

SetJustification sets the "justification" field.

func (*HasSourceAtCreate) SetKnownSince

func (hsac *HasSourceAtCreate) SetKnownSince(t time.Time) *HasSourceAtCreate

SetKnownSince sets the "known_since" field.

func (*HasSourceAtCreate) SetNillableAllVersionsID

func (hsac *HasSourceAtCreate) SetNillableAllVersionsID(id *uuid.UUID) *HasSourceAtCreate

SetNillableAllVersionsID sets the "all_versions" edge to the PackageName entity by ID if the given value is not nil.

func (*HasSourceAtCreate) SetNillableID added in v0.5.0

func (hsac *HasSourceAtCreate) SetNillableID(u *uuid.UUID) *HasSourceAtCreate

SetNillableID sets the "id" field if the given value is not nil.

func (*HasSourceAtCreate) SetNillablePackageNameID

func (hsac *HasSourceAtCreate) SetNillablePackageNameID(u *uuid.UUID) *HasSourceAtCreate

SetNillablePackageNameID sets the "package_name_id" field if the given value is not nil.

func (*HasSourceAtCreate) SetNillablePackageVersionID

func (hsac *HasSourceAtCreate) SetNillablePackageVersionID(u *uuid.UUID) *HasSourceAtCreate

SetNillablePackageVersionID sets the "package_version_id" field if the given value is not nil.

func (*HasSourceAtCreate) SetOrigin

func (hsac *HasSourceAtCreate) SetOrigin(s string) *HasSourceAtCreate

SetOrigin sets the "origin" field.

func (*HasSourceAtCreate) SetPackageNameID

func (hsac *HasSourceAtCreate) SetPackageNameID(u uuid.UUID) *HasSourceAtCreate

SetPackageNameID sets the "package_name_id" field.

func (*HasSourceAtCreate) SetPackageVersion

func (hsac *HasSourceAtCreate) SetPackageVersion(p *PackageVersion) *HasSourceAtCreate

SetPackageVersion sets the "package_version" edge to the PackageVersion entity.

func (*HasSourceAtCreate) SetPackageVersionID

func (hsac *HasSourceAtCreate) SetPackageVersionID(u uuid.UUID) *HasSourceAtCreate

SetPackageVersionID sets the "package_version_id" field.

func (*HasSourceAtCreate) SetSource

func (hsac *HasSourceAtCreate) SetSource(s *SourceName) *HasSourceAtCreate

SetSource sets the "source" edge to the SourceName entity.

func (*HasSourceAtCreate) SetSourceID

func (hsac *HasSourceAtCreate) SetSourceID(u uuid.UUID) *HasSourceAtCreate

SetSourceID sets the "source_id" field.

type HasSourceAtCreateBulk

type HasSourceAtCreateBulk struct {
	// contains filtered or unexported fields
}

HasSourceAtCreateBulk is the builder for creating many HasSourceAt entities in bulk.

func (*HasSourceAtCreateBulk) Exec

func (hsacb *HasSourceAtCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*HasSourceAtCreateBulk) ExecX

func (hsacb *HasSourceAtCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*HasSourceAtCreateBulk) OnConflict

func (hsacb *HasSourceAtCreateBulk) OnConflict(opts ...sql.ConflictOption) *HasSourceAtUpsertBulk

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.HasSourceAt.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.HasSourceAtUpsert) {
		SetPackageVersionID(v+v).
	}).
	Exec(ctx)

func (*HasSourceAtCreateBulk) OnConflictColumns

func (hsacb *HasSourceAtCreateBulk) OnConflictColumns(columns ...string) *HasSourceAtUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.HasSourceAt.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*HasSourceAtCreateBulk) Save

func (hsacb *HasSourceAtCreateBulk) Save(ctx context.Context) ([]*HasSourceAt, error)

Save creates the HasSourceAt entities in the database.

func (*HasSourceAtCreateBulk) SaveX

func (hsacb *HasSourceAtCreateBulk) SaveX(ctx context.Context) []*HasSourceAt

SaveX is like Save, but panics if an error occurs.

type HasSourceAtDelete

type HasSourceAtDelete struct {
	// contains filtered or unexported fields
}

HasSourceAtDelete is the builder for deleting a HasSourceAt entity.

func (*HasSourceAtDelete) Exec

func (hsad *HasSourceAtDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*HasSourceAtDelete) ExecX

func (hsad *HasSourceAtDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*HasSourceAtDelete) Where

Where appends a list predicates to the HasSourceAtDelete builder.

type HasSourceAtDeleteOne

type HasSourceAtDeleteOne struct {
	// contains filtered or unexported fields
}

HasSourceAtDeleteOne is the builder for deleting a single HasSourceAt entity.

func (*HasSourceAtDeleteOne) Exec

func (hsado *HasSourceAtDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*HasSourceAtDeleteOne) ExecX

func (hsado *HasSourceAtDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*HasSourceAtDeleteOne) Where

Where appends a list predicates to the HasSourceAtDelete builder.

type HasSourceAtEdge

type HasSourceAtEdge struct {
	Node   *HasSourceAt `json:"node"`
	Cursor Cursor       `json:"cursor"`
}

HasSourceAtEdge is the edge representation of HasSourceAt.

type HasSourceAtEdges

type HasSourceAtEdges struct {
	// PackageVersion holds the value of the package_version edge.
	PackageVersion *PackageVersion `json:"package_version,omitempty"`
	// AllVersions holds the value of the all_versions edge.
	AllVersions *PackageName `json:"all_versions,omitempty"`
	// Source holds the value of the source edge.
	Source *SourceName `json:"source,omitempty"`
	// contains filtered or unexported fields
}

HasSourceAtEdges holds the relations/edges for other nodes in the graph.

func (HasSourceAtEdges) AllVersionsOrErr

func (e HasSourceAtEdges) AllVersionsOrErr() (*PackageName, error)

AllVersionsOrErr returns the AllVersions value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (HasSourceAtEdges) PackageVersionOrErr

func (e HasSourceAtEdges) PackageVersionOrErr() (*PackageVersion, error)

PackageVersionOrErr returns the PackageVersion value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (HasSourceAtEdges) SourceOrErr

func (e HasSourceAtEdges) SourceOrErr() (*SourceName, error)

SourceOrErr returns the Source value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type HasSourceAtGroupBy

type HasSourceAtGroupBy struct {
	// contains filtered or unexported fields
}

HasSourceAtGroupBy is the group-by builder for HasSourceAt entities.

func (*HasSourceAtGroupBy) Aggregate

func (hsagb *HasSourceAtGroupBy) Aggregate(fns ...AggregateFunc) *HasSourceAtGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*HasSourceAtGroupBy) Bool

func (s *HasSourceAtGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*HasSourceAtGroupBy) BoolX

func (s *HasSourceAtGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*HasSourceAtGroupBy) Bools

func (s *HasSourceAtGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*HasSourceAtGroupBy) BoolsX

func (s *HasSourceAtGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*HasSourceAtGroupBy) Float64

func (s *HasSourceAtGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*HasSourceAtGroupBy) Float64X

func (s *HasSourceAtGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*HasSourceAtGroupBy) Float64s

func (s *HasSourceAtGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*HasSourceAtGroupBy) Float64sX

func (s *HasSourceAtGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*HasSourceAtGroupBy) Int

func (s *HasSourceAtGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*HasSourceAtGroupBy) IntX

func (s *HasSourceAtGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*HasSourceAtGroupBy) Ints

func (s *HasSourceAtGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*HasSourceAtGroupBy) IntsX

func (s *HasSourceAtGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*HasSourceAtGroupBy) Scan

func (hsagb *HasSourceAtGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*HasSourceAtGroupBy) ScanX

func (s *HasSourceAtGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*HasSourceAtGroupBy) String

func (s *HasSourceAtGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*HasSourceAtGroupBy) StringX

func (s *HasSourceAtGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*HasSourceAtGroupBy) Strings

func (s *HasSourceAtGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*HasSourceAtGroupBy) StringsX

func (s *HasSourceAtGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type HasSourceAtMutation

type HasSourceAtMutation struct {
	// contains filtered or unexported fields
}

HasSourceAtMutation represents an operation that mutates the HasSourceAt nodes in the graph.

func (*HasSourceAtMutation) AddField

func (m *HasSourceAtMutation) AddField(name string, value ent.Value) error

AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*HasSourceAtMutation) AddedEdges

func (m *HasSourceAtMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*HasSourceAtMutation) AddedField

func (m *HasSourceAtMutation) AddedField(name string) (ent.Value, bool)

AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*HasSourceAtMutation) AddedFields

func (m *HasSourceAtMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*HasSourceAtMutation) AddedIDs

func (m *HasSourceAtMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*HasSourceAtMutation) AllVersionsCleared

func (m *HasSourceAtMutation) AllVersionsCleared() bool

AllVersionsCleared reports if the "all_versions" edge to the PackageName entity was cleared.

func (*HasSourceAtMutation) AllVersionsID

func (m *HasSourceAtMutation) AllVersionsID() (id uuid.UUID, exists bool)

AllVersionsID returns the "all_versions" edge ID in the mutation.

func (*HasSourceAtMutation) AllVersionsIDs

func (m *HasSourceAtMutation) AllVersionsIDs() (ids []uuid.UUID)

AllVersionsIDs returns the "all_versions" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use AllVersionsID instead. It exists only for internal usage by the builders.

func (*HasSourceAtMutation) ClearAllVersions

func (m *HasSourceAtMutation) ClearAllVersions()

ClearAllVersions clears the "all_versions" edge to the PackageName entity.

func (*HasSourceAtMutation) ClearEdge

func (m *HasSourceAtMutation) ClearEdge(name string) error

ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.

func (*HasSourceAtMutation) ClearField

func (m *HasSourceAtMutation) ClearField(name string) error

ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.

func (*HasSourceAtMutation) ClearPackageNameID

func (m *HasSourceAtMutation) ClearPackageNameID()

ClearPackageNameID clears the value of the "package_name_id" field.

func (*HasSourceAtMutation) ClearPackageVersion

func (m *HasSourceAtMutation) ClearPackageVersion()

ClearPackageVersion clears the "package_version" edge to the PackageVersion entity.

func (*HasSourceAtMutation) ClearPackageVersionID

func (m *HasSourceAtMutation) ClearPackageVersionID()

ClearPackageVersionID clears the value of the "package_version_id" field.

func (*HasSourceAtMutation) ClearSource

func (m *HasSourceAtMutation) ClearSource()

ClearSource clears the "source" edge to the SourceName entity.

func (*HasSourceAtMutation) ClearedEdges

func (m *HasSourceAtMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*HasSourceAtMutation) ClearedFields

func (m *HasSourceAtMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (HasSourceAtMutation) Client

func (m HasSourceAtMutation) Client() *Client

Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.

func (*HasSourceAtMutation) Collector

func (m *HasSourceAtMutation) Collector() (r string, exists bool)

Collector returns the value of the "collector" field in the mutation.

func (*HasSourceAtMutation) DocumentRef added in v0.6.0

func (m *HasSourceAtMutation) DocumentRef() (r string, exists bool)

DocumentRef returns the value of the "document_ref" field in the mutation.

func (*HasSourceAtMutation) EdgeCleared

func (m *HasSourceAtMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*HasSourceAtMutation) Field

func (m *HasSourceAtMutation) Field(name string) (ent.Value, bool)

Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*HasSourceAtMutation) FieldCleared

func (m *HasSourceAtMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*HasSourceAtMutation) Fields

func (m *HasSourceAtMutation) Fields() []string

Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().

func (*HasSourceAtMutation) ID

func (m *HasSourceAtMutation) ID() (id uuid.UUID, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*HasSourceAtMutation) IDs

func (m *HasSourceAtMutation) IDs(ctx context.Context) ([]uuid.UUID, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*HasSourceAtMutation) Justification

func (m *HasSourceAtMutation) Justification() (r string, exists bool)

Justification returns the value of the "justification" field in the mutation.

func (*HasSourceAtMutation) KnownSince

func (m *HasSourceAtMutation) KnownSince() (r time.Time, exists bool)

KnownSince returns the value of the "known_since" field in the mutation.

func (*HasSourceAtMutation) OldCollector

func (m *HasSourceAtMutation) OldCollector(ctx context.Context) (v string, err error)

OldCollector returns the old "collector" field's value of the HasSourceAt entity. If the HasSourceAt object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*HasSourceAtMutation) OldDocumentRef added in v0.6.0

func (m *HasSourceAtMutation) OldDocumentRef(ctx context.Context) (v string, err error)

OldDocumentRef returns the old "document_ref" field's value of the HasSourceAt entity. If the HasSourceAt object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*HasSourceAtMutation) OldField

func (m *HasSourceAtMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*HasSourceAtMutation) OldJustification

func (m *HasSourceAtMutation) OldJustification(ctx context.Context) (v string, err error)

OldJustification returns the old "justification" field's value of the HasSourceAt entity. If the HasSourceAt object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*HasSourceAtMutation) OldKnownSince

func (m *HasSourceAtMutation) OldKnownSince(ctx context.Context) (v time.Time, err error)

OldKnownSince returns the old "known_since" field's value of the HasSourceAt entity. If the HasSourceAt object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*HasSourceAtMutation) OldOrigin

func (m *HasSourceAtMutation) OldOrigin(ctx context.Context) (v string, err error)

OldOrigin returns the old "origin" field's value of the HasSourceAt entity. If the HasSourceAt object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*HasSourceAtMutation) OldPackageNameID

func (m *HasSourceAtMutation) OldPackageNameID(ctx context.Context) (v *uuid.UUID, err error)

OldPackageNameID returns the old "package_name_id" field's value of the HasSourceAt entity. If the HasSourceAt object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*HasSourceAtMutation) OldPackageVersionID

func (m *HasSourceAtMutation) OldPackageVersionID(ctx context.Context) (v *uuid.UUID, err error)

OldPackageVersionID returns the old "package_version_id" field's value of the HasSourceAt entity. If the HasSourceAt object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*HasSourceAtMutation) OldSourceID

func (m *HasSourceAtMutation) OldSourceID(ctx context.Context) (v uuid.UUID, err error)

OldSourceID returns the old "source_id" field's value of the HasSourceAt entity. If the HasSourceAt object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*HasSourceAtMutation) Op

func (m *HasSourceAtMutation) Op() Op

Op returns the operation name.

func (*HasSourceAtMutation) Origin

func (m *HasSourceAtMutation) Origin() (r string, exists bool)

Origin returns the value of the "origin" field in the mutation.

func (*HasSourceAtMutation) PackageNameID

func (m *HasSourceAtMutation) PackageNameID() (r uuid.UUID, exists bool)

PackageNameID returns the value of the "package_name_id" field in the mutation.

func (*HasSourceAtMutation) PackageNameIDCleared

func (m *HasSourceAtMutation) PackageNameIDCleared() bool

PackageNameIDCleared returns if the "package_name_id" field was cleared in this mutation.

func (*HasSourceAtMutation) PackageVersionCleared

func (m *HasSourceAtMutation) PackageVersionCleared() bool

PackageVersionCleared reports if the "package_version" edge to the PackageVersion entity was cleared.

func (*HasSourceAtMutation) PackageVersionID

func (m *HasSourceAtMutation) PackageVersionID() (r uuid.UUID, exists bool)

PackageVersionID returns the value of the "package_version_id" field in the mutation.

func (*HasSourceAtMutation) PackageVersionIDCleared

func (m *HasSourceAtMutation) PackageVersionIDCleared() bool

PackageVersionIDCleared returns if the "package_version_id" field was cleared in this mutation.

func (*HasSourceAtMutation) PackageVersionIDs

func (m *HasSourceAtMutation) PackageVersionIDs() (ids []uuid.UUID)

PackageVersionIDs returns the "package_version" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use PackageVersionID instead. It exists only for internal usage by the builders.

func (*HasSourceAtMutation) RemovedEdges

func (m *HasSourceAtMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*HasSourceAtMutation) RemovedIDs

func (m *HasSourceAtMutation) RemovedIDs(name string) []ent.Value

RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.

func (*HasSourceAtMutation) ResetAllVersions

func (m *HasSourceAtMutation) ResetAllVersions()

ResetAllVersions resets all changes to the "all_versions" edge.

func (*HasSourceAtMutation) ResetCollector

func (m *HasSourceAtMutation) ResetCollector()

ResetCollector resets all changes to the "collector" field.

func (*HasSourceAtMutation) ResetDocumentRef added in v0.6.0

func (m *HasSourceAtMutation) ResetDocumentRef()

ResetDocumentRef resets all changes to the "document_ref" field.

func (*HasSourceAtMutation) ResetEdge

func (m *HasSourceAtMutation) ResetEdge(name string) error

ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.

func (*HasSourceAtMutation) ResetField

func (m *HasSourceAtMutation) ResetField(name string) error

ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.

func (*HasSourceAtMutation) ResetJustification

func (m *HasSourceAtMutation) ResetJustification()

ResetJustification resets all changes to the "justification" field.

func (*HasSourceAtMutation) ResetKnownSince

func (m *HasSourceAtMutation) ResetKnownSince()

ResetKnownSince resets all changes to the "known_since" field.

func (*HasSourceAtMutation) ResetOrigin

func (m *HasSourceAtMutation) ResetOrigin()

ResetOrigin resets all changes to the "origin" field.

func (*HasSourceAtMutation) ResetPackageNameID

func (m *HasSourceAtMutation) ResetPackageNameID()

ResetPackageNameID resets all changes to the "package_name_id" field.

func (*HasSourceAtMutation) ResetPackageVersion

func (m *HasSourceAtMutation) ResetPackageVersion()

ResetPackageVersion resets all changes to the "package_version" edge.

func (*HasSourceAtMutation) ResetPackageVersionID

func (m *HasSourceAtMutation) ResetPackageVersionID()

ResetPackageVersionID resets all changes to the "package_version_id" field.

func (*HasSourceAtMutation) ResetSource

func (m *HasSourceAtMutation) ResetSource()

ResetSource resets all changes to the "source" edge.

func (*HasSourceAtMutation) ResetSourceID

func (m *HasSourceAtMutation) ResetSourceID()

ResetSourceID resets all changes to the "source_id" field.

func (*HasSourceAtMutation) SetAllVersionsID

func (m *HasSourceAtMutation) SetAllVersionsID(id uuid.UUID)

SetAllVersionsID sets the "all_versions" edge to the PackageName entity by id.

func (*HasSourceAtMutation) SetCollector

func (m *HasSourceAtMutation) SetCollector(s string)

SetCollector sets the "collector" field.

func (*HasSourceAtMutation) SetDocumentRef added in v0.6.0

func (m *HasSourceAtMutation) SetDocumentRef(s string)

SetDocumentRef sets the "document_ref" field.

func (*HasSourceAtMutation) SetField

func (m *HasSourceAtMutation) SetField(name string, value ent.Value) error

SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*HasSourceAtMutation) SetID added in v0.5.0

func (m *HasSourceAtMutation) SetID(id uuid.UUID)

SetID sets the value of the id field. Note that this operation is only accepted on creation of HasSourceAt entities.

func (*HasSourceAtMutation) SetJustification

func (m *HasSourceAtMutation) SetJustification(s string)

SetJustification sets the "justification" field.

func (*HasSourceAtMutation) SetKnownSince

func (m *HasSourceAtMutation) SetKnownSince(t time.Time)

SetKnownSince sets the "known_since" field.

func (*HasSourceAtMutation) SetOp

func (m *HasSourceAtMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*HasSourceAtMutation) SetOrigin

func (m *HasSourceAtMutation) SetOrigin(s string)

SetOrigin sets the "origin" field.

func (*HasSourceAtMutation) SetPackageNameID

func (m *HasSourceAtMutation) SetPackageNameID(u uuid.UUID)

SetPackageNameID sets the "package_name_id" field.

func (*HasSourceAtMutation) SetPackageVersionID

func (m *HasSourceAtMutation) SetPackageVersionID(u uuid.UUID)

SetPackageVersionID sets the "package_version_id" field.

func (*HasSourceAtMutation) SetSourceID

func (m *HasSourceAtMutation) SetSourceID(u uuid.UUID)

SetSourceID sets the "source_id" field.

func (*HasSourceAtMutation) SourceCleared

func (m *HasSourceAtMutation) SourceCleared() bool

SourceCleared reports if the "source" edge to the SourceName entity was cleared.

func (*HasSourceAtMutation) SourceID

func (m *HasSourceAtMutation) SourceID() (r uuid.UUID, exists bool)

SourceID returns the value of the "source_id" field in the mutation.

func (*HasSourceAtMutation) SourceIDs

func (m *HasSourceAtMutation) SourceIDs() (ids []uuid.UUID)

SourceIDs returns the "source" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use SourceID instead. It exists only for internal usage by the builders.

func (HasSourceAtMutation) Tx

func (m HasSourceAtMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*HasSourceAtMutation) Type

func (m *HasSourceAtMutation) Type() string

Type returns the node type of this mutation (HasSourceAt).

func (*HasSourceAtMutation) Where

func (m *HasSourceAtMutation) Where(ps ...predicate.HasSourceAt)

Where appends a list predicates to the HasSourceAtMutation builder.

func (*HasSourceAtMutation) WhereP

func (m *HasSourceAtMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the HasSourceAtMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type HasSourceAtOrder

type HasSourceAtOrder struct {
	Direction OrderDirection         `json:"direction"`
	Field     *HasSourceAtOrderField `json:"field"`
}

HasSourceAtOrder defines the ordering of HasSourceAt.

type HasSourceAtOrderField

type HasSourceAtOrderField struct {
	// Value extracts the ordering value from the given HasSourceAt.
	Value func(*HasSourceAt) (ent.Value, error)
	// contains filtered or unexported fields
}

HasSourceAtOrderField defines the ordering field of HasSourceAt.

type HasSourceAtPaginateOption

type HasSourceAtPaginateOption func(*hassourceatPager) error

HasSourceAtPaginateOption enables pagination customization.

func WithHasSourceAtFilter

func WithHasSourceAtFilter(filter func(*HasSourceAtQuery) (*HasSourceAtQuery, error)) HasSourceAtPaginateOption

WithHasSourceAtFilter configures pagination filter.

func WithHasSourceAtOrder

func WithHasSourceAtOrder(order *HasSourceAtOrder) HasSourceAtPaginateOption

WithHasSourceAtOrder configures pagination ordering.

type HasSourceAtQuery

type HasSourceAtQuery struct {
	// contains filtered or unexported fields
}

HasSourceAtQuery is the builder for querying HasSourceAt entities.

func (*HasSourceAtQuery) Aggregate

func (hsaq *HasSourceAtQuery) Aggregate(fns ...AggregateFunc) *HasSourceAtSelect

Aggregate returns a HasSourceAtSelect configured with the given aggregations.

func (*HasSourceAtQuery) All

func (hsaq *HasSourceAtQuery) All(ctx context.Context) ([]*HasSourceAt, error)

All executes the query and returns a list of HasSourceAts.

func (*HasSourceAtQuery) AllX

func (hsaq *HasSourceAtQuery) AllX(ctx context.Context) []*HasSourceAt

AllX is like All, but panics if an error occurs.

func (*HasSourceAtQuery) Clone

func (hsaq *HasSourceAtQuery) Clone() *HasSourceAtQuery

Clone returns a duplicate of the HasSourceAtQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*HasSourceAtQuery) CollectFields

func (hsa *HasSourceAtQuery) CollectFields(ctx context.Context, satisfies ...string) (*HasSourceAtQuery, error)

CollectFields tells the query-builder to eagerly load connected nodes by resolver context.

func (*HasSourceAtQuery) Count

func (hsaq *HasSourceAtQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*HasSourceAtQuery) CountX

func (hsaq *HasSourceAtQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*HasSourceAtQuery) Exist

func (hsaq *HasSourceAtQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*HasSourceAtQuery) ExistX

func (hsaq *HasSourceAtQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*HasSourceAtQuery) First

func (hsaq *HasSourceAtQuery) First(ctx context.Context) (*HasSourceAt, error)

First returns the first HasSourceAt entity from the query. Returns a *NotFoundError when no HasSourceAt was found.

func (*HasSourceAtQuery) FirstID

func (hsaq *HasSourceAtQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)

FirstID returns the first HasSourceAt ID from the query. Returns a *NotFoundError when no HasSourceAt ID was found.

func (*HasSourceAtQuery) FirstIDX

func (hsaq *HasSourceAtQuery) FirstIDX(ctx context.Context) uuid.UUID

FirstIDX is like FirstID, but panics if an error occurs.

func (*HasSourceAtQuery) FirstX

func (hsaq *HasSourceAtQuery) FirstX(ctx context.Context) *HasSourceAt

FirstX is like First, but panics if an error occurs.

func (*HasSourceAtQuery) GroupBy

func (hsaq *HasSourceAtQuery) GroupBy(field string, fields ...string) *HasSourceAtGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	PackageVersionID uuid.UUID `json:"package_version_id,omitempty"`
	Count int `json:"count,omitempty"`
}

client.HasSourceAt.Query().
	GroupBy(hassourceat.FieldPackageVersionID).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*HasSourceAtQuery) IDs

func (hsaq *HasSourceAtQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)

IDs executes the query and returns a list of HasSourceAt IDs.

func (*HasSourceAtQuery) IDsX

func (hsaq *HasSourceAtQuery) IDsX(ctx context.Context) []uuid.UUID

IDsX is like IDs, but panics if an error occurs.

func (*HasSourceAtQuery) Limit

func (hsaq *HasSourceAtQuery) Limit(limit int) *HasSourceAtQuery

Limit the number of records to be returned by this query.

func (*HasSourceAtQuery) Offset

func (hsaq *HasSourceAtQuery) Offset(offset int) *HasSourceAtQuery

Offset to start from.

func (*HasSourceAtQuery) Only

func (hsaq *HasSourceAtQuery) Only(ctx context.Context) (*HasSourceAt, error)

Only returns a single HasSourceAt entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one HasSourceAt entity is found. Returns a *NotFoundError when no HasSourceAt entities are found.

func (*HasSourceAtQuery) OnlyID

func (hsaq *HasSourceAtQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)

OnlyID is like Only, but returns the only HasSourceAt ID in the query. Returns a *NotSingularError when more than one HasSourceAt ID is found. Returns a *NotFoundError when no entities are found.

func (*HasSourceAtQuery) OnlyIDX

func (hsaq *HasSourceAtQuery) OnlyIDX(ctx context.Context) uuid.UUID

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*HasSourceAtQuery) OnlyX

func (hsaq *HasSourceAtQuery) OnlyX(ctx context.Context) *HasSourceAt

OnlyX is like Only, but panics if an error occurs.

func (*HasSourceAtQuery) Order

Order specifies how the records should be ordered.

func (*HasSourceAtQuery) Paginate

func (hsa *HasSourceAtQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...HasSourceAtPaginateOption,
) (*HasSourceAtConnection, error)

Paginate executes the query and returns a relay based cursor connection to HasSourceAt.

func (*HasSourceAtQuery) QueryAllVersions

func (hsaq *HasSourceAtQuery) QueryAllVersions() *PackageNameQuery

QueryAllVersions chains the current query on the "all_versions" edge.

func (*HasSourceAtQuery) QueryPackageVersion

func (hsaq *HasSourceAtQuery) QueryPackageVersion() *PackageVersionQuery

QueryPackageVersion chains the current query on the "package_version" edge.

func (*HasSourceAtQuery) QuerySource

func (hsaq *HasSourceAtQuery) QuerySource() *SourceNameQuery

QuerySource chains the current query on the "source" edge.

func (*HasSourceAtQuery) Select

func (hsaq *HasSourceAtQuery) Select(fields ...string) *HasSourceAtSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	PackageVersionID uuid.UUID `json:"package_version_id,omitempty"`
}

client.HasSourceAt.Query().
	Select(hassourceat.FieldPackageVersionID).
	Scan(ctx, &v)

func (*HasSourceAtQuery) Unique

func (hsaq *HasSourceAtQuery) Unique(unique bool) *HasSourceAtQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*HasSourceAtQuery) Where

Where adds a new predicate for the HasSourceAtQuery builder.

func (*HasSourceAtQuery) WithAllVersions

func (hsaq *HasSourceAtQuery) WithAllVersions(opts ...func(*PackageNameQuery)) *HasSourceAtQuery

WithAllVersions tells the query-builder to eager-load the nodes that are connected to the "all_versions" edge. The optional arguments are used to configure the query builder of the edge.

func (*HasSourceAtQuery) WithPackageVersion

func (hsaq *HasSourceAtQuery) WithPackageVersion(opts ...func(*PackageVersionQuery)) *HasSourceAtQuery

WithPackageVersion tells the query-builder to eager-load the nodes that are connected to the "package_version" edge. The optional arguments are used to configure the query builder of the edge.

func (*HasSourceAtQuery) WithSource

func (hsaq *HasSourceAtQuery) WithSource(opts ...func(*SourceNameQuery)) *HasSourceAtQuery

WithSource tells the query-builder to eager-load the nodes that are connected to the "source" edge. The optional arguments are used to configure the query builder of the edge.

type HasSourceAtSelect

type HasSourceAtSelect struct {
	*HasSourceAtQuery
	// contains filtered or unexported fields
}

HasSourceAtSelect is the builder for selecting fields of HasSourceAt entities.

func (*HasSourceAtSelect) Aggregate

func (hsas *HasSourceAtSelect) Aggregate(fns ...AggregateFunc) *HasSourceAtSelect

Aggregate adds the given aggregation functions to the selector query.

func (*HasSourceAtSelect) Bool

func (s *HasSourceAtSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*HasSourceAtSelect) BoolX

func (s *HasSourceAtSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*HasSourceAtSelect) Bools

func (s *HasSourceAtSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*HasSourceAtSelect) BoolsX

func (s *HasSourceAtSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*HasSourceAtSelect) Float64

func (s *HasSourceAtSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*HasSourceAtSelect) Float64X

func (s *HasSourceAtSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*HasSourceAtSelect) Float64s

func (s *HasSourceAtSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*HasSourceAtSelect) Float64sX

func (s *HasSourceAtSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*HasSourceAtSelect) Int

func (s *HasSourceAtSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*HasSourceAtSelect) IntX

func (s *HasSourceAtSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*HasSourceAtSelect) Ints

func (s *HasSourceAtSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*HasSourceAtSelect) IntsX

func (s *HasSourceAtSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*HasSourceAtSelect) Scan

func (hsas *HasSourceAtSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*HasSourceAtSelect) ScanX

func (s *HasSourceAtSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*HasSourceAtSelect) String

func (s *HasSourceAtSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*HasSourceAtSelect) StringX

func (s *HasSourceAtSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*HasSourceAtSelect) Strings

func (s *HasSourceAtSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*HasSourceAtSelect) StringsX

func (s *HasSourceAtSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type HasSourceAtUpdate

type HasSourceAtUpdate struct {
	// contains filtered or unexported fields
}

HasSourceAtUpdate is the builder for updating HasSourceAt entities.

func (*HasSourceAtUpdate) ClearAllVersions

func (hsau *HasSourceAtUpdate) ClearAllVersions() *HasSourceAtUpdate

ClearAllVersions clears the "all_versions" edge to the PackageName entity.

func (*HasSourceAtUpdate) ClearPackageNameID

func (hsau *HasSourceAtUpdate) ClearPackageNameID() *HasSourceAtUpdate

ClearPackageNameID clears the value of the "package_name_id" field.

func (*HasSourceAtUpdate) ClearPackageVersion

func (hsau *HasSourceAtUpdate) ClearPackageVersion() *HasSourceAtUpdate

ClearPackageVersion clears the "package_version" edge to the PackageVersion entity.

func (*HasSourceAtUpdate) ClearPackageVersionID

func (hsau *HasSourceAtUpdate) ClearPackageVersionID() *HasSourceAtUpdate

ClearPackageVersionID clears the value of the "package_version_id" field.

func (*HasSourceAtUpdate) ClearSource

func (hsau *HasSourceAtUpdate) ClearSource() *HasSourceAtUpdate

ClearSource clears the "source" edge to the SourceName entity.

func (*HasSourceAtUpdate) Exec

func (hsau *HasSourceAtUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*HasSourceAtUpdate) ExecX

func (hsau *HasSourceAtUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*HasSourceAtUpdate) Mutation

func (hsau *HasSourceAtUpdate) Mutation() *HasSourceAtMutation

Mutation returns the HasSourceAtMutation object of the builder.

func (*HasSourceAtUpdate) Save

func (hsau *HasSourceAtUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*HasSourceAtUpdate) SaveX

func (hsau *HasSourceAtUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*HasSourceAtUpdate) SetAllVersions

func (hsau *HasSourceAtUpdate) SetAllVersions(p *PackageName) *HasSourceAtUpdate

SetAllVersions sets the "all_versions" edge to the PackageName entity.

func (*HasSourceAtUpdate) SetAllVersionsID

func (hsau *HasSourceAtUpdate) SetAllVersionsID(id uuid.UUID) *HasSourceAtUpdate

SetAllVersionsID sets the "all_versions" edge to the PackageName entity by ID.

func (*HasSourceAtUpdate) SetCollector

func (hsau *HasSourceAtUpdate) SetCollector(s string) *HasSourceAtUpdate

SetCollector sets the "collector" field.

func (*HasSourceAtUpdate) SetDocumentRef added in v0.6.0

func (hsau *HasSourceAtUpdate) SetDocumentRef(s string) *HasSourceAtUpdate

SetDocumentRef sets the "document_ref" field.

func (*HasSourceAtUpdate) SetJustification

func (hsau *HasSourceAtUpdate) SetJustification(s string) *HasSourceAtUpdate

SetJustification sets the "justification" field.

func (*HasSourceAtUpdate) SetKnownSince

func (hsau *HasSourceAtUpdate) SetKnownSince(t time.Time) *HasSourceAtUpdate

SetKnownSince sets the "known_since" field.

func (*HasSourceAtUpdate) SetNillableAllVersionsID

func (hsau *HasSourceAtUpdate) SetNillableAllVersionsID(id *uuid.UUID) *HasSourceAtUpdate

SetNillableAllVersionsID sets the "all_versions" edge to the PackageName entity by ID if the given value is not nil.

func (*HasSourceAtUpdate) SetNillableCollector added in v0.4.0

func (hsau *HasSourceAtUpdate) SetNillableCollector(s *string) *HasSourceAtUpdate

SetNillableCollector sets the "collector" field if the given value is not nil.

func (*HasSourceAtUpdate) SetNillableDocumentRef added in v0.6.0

func (hsau *HasSourceAtUpdate) SetNillableDocumentRef(s *string) *HasSourceAtUpdate

SetNillableDocumentRef sets the "document_ref" field if the given value is not nil.

func (*HasSourceAtUpdate) SetNillableJustification added in v0.4.0

func (hsau *HasSourceAtUpdate) SetNillableJustification(s *string) *HasSourceAtUpdate

SetNillableJustification sets the "justification" field if the given value is not nil.

func (*HasSourceAtUpdate) SetNillableKnownSince added in v0.4.0

func (hsau *HasSourceAtUpdate) SetNillableKnownSince(t *time.Time) *HasSourceAtUpdate

SetNillableKnownSince sets the "known_since" field if the given value is not nil.

func (*HasSourceAtUpdate) SetNillableOrigin added in v0.4.0

func (hsau *HasSourceAtUpdate) SetNillableOrigin(s *string) *HasSourceAtUpdate

SetNillableOrigin sets the "origin" field if the given value is not nil.

func (*HasSourceAtUpdate) SetNillablePackageNameID

func (hsau *HasSourceAtUpdate) SetNillablePackageNameID(u *uuid.UUID) *HasSourceAtUpdate

SetNillablePackageNameID sets the "package_name_id" field if the given value is not nil.

func (*HasSourceAtUpdate) SetNillablePackageVersionID

func (hsau *HasSourceAtUpdate) SetNillablePackageVersionID(u *uuid.UUID) *HasSourceAtUpdate

SetNillablePackageVersionID sets the "package_version_id" field if the given value is not nil.

func (*HasSourceAtUpdate) SetNillableSourceID added in v0.4.0

func (hsau *HasSourceAtUpdate) SetNillableSourceID(u *uuid.UUID) *HasSourceAtUpdate

SetNillableSourceID sets the "source_id" field if the given value is not nil.

func (*HasSourceAtUpdate) SetOrigin

func (hsau *HasSourceAtUpdate) SetOrigin(s string) *HasSourceAtUpdate

SetOrigin sets the "origin" field.

func (*HasSourceAtUpdate) SetPackageNameID

func (hsau *HasSourceAtUpdate) SetPackageNameID(u uuid.UUID) *HasSourceAtUpdate

SetPackageNameID sets the "package_name_id" field.

func (*HasSourceAtUpdate) SetPackageVersion

func (hsau *HasSourceAtUpdate) SetPackageVersion(p *PackageVersion) *HasSourceAtUpdate

SetPackageVersion sets the "package_version" edge to the PackageVersion entity.

func (*HasSourceAtUpdate) SetPackageVersionID

func (hsau *HasSourceAtUpdate) SetPackageVersionID(u uuid.UUID) *HasSourceAtUpdate

SetPackageVersionID sets the "package_version_id" field.

func (*HasSourceAtUpdate) SetSource

func (hsau *HasSourceAtUpdate) SetSource(s *SourceName) *HasSourceAtUpdate

SetSource sets the "source" edge to the SourceName entity.

func (*HasSourceAtUpdate) SetSourceID

func (hsau *HasSourceAtUpdate) SetSourceID(u uuid.UUID) *HasSourceAtUpdate

SetSourceID sets the "source_id" field.

func (*HasSourceAtUpdate) Where

Where appends a list predicates to the HasSourceAtUpdate builder.

type HasSourceAtUpdateOne

type HasSourceAtUpdateOne struct {
	// contains filtered or unexported fields
}

HasSourceAtUpdateOne is the builder for updating a single HasSourceAt entity.

func (*HasSourceAtUpdateOne) ClearAllVersions

func (hsauo *HasSourceAtUpdateOne) ClearAllVersions() *HasSourceAtUpdateOne

ClearAllVersions clears the "all_versions" edge to the PackageName entity.

func (*HasSourceAtUpdateOne) ClearPackageNameID

func (hsauo *HasSourceAtUpdateOne) ClearPackageNameID() *HasSourceAtUpdateOne

ClearPackageNameID clears the value of the "package_name_id" field.

func (*HasSourceAtUpdateOne) ClearPackageVersion

func (hsauo *HasSourceAtUpdateOne) ClearPackageVersion() *HasSourceAtUpdateOne

ClearPackageVersion clears the "package_version" edge to the PackageVersion entity.

func (*HasSourceAtUpdateOne) ClearPackageVersionID

func (hsauo *HasSourceAtUpdateOne) ClearPackageVersionID() *HasSourceAtUpdateOne

ClearPackageVersionID clears the value of the "package_version_id" field.

func (*HasSourceAtUpdateOne) ClearSource

func (hsauo *HasSourceAtUpdateOne) ClearSource() *HasSourceAtUpdateOne

ClearSource clears the "source" edge to the SourceName entity.

func (*HasSourceAtUpdateOne) Exec

func (hsauo *HasSourceAtUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*HasSourceAtUpdateOne) ExecX

func (hsauo *HasSourceAtUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*HasSourceAtUpdateOne) Mutation

func (hsauo *HasSourceAtUpdateOne) Mutation() *HasSourceAtMutation

Mutation returns the HasSourceAtMutation object of the builder.

func (*HasSourceAtUpdateOne) Save

func (hsauo *HasSourceAtUpdateOne) Save(ctx context.Context) (*HasSourceAt, error)

Save executes the query and returns the updated HasSourceAt entity.

func (*HasSourceAtUpdateOne) SaveX

func (hsauo *HasSourceAtUpdateOne) SaveX(ctx context.Context) *HasSourceAt

SaveX is like Save, but panics if an error occurs.

func (*HasSourceAtUpdateOne) Select

func (hsauo *HasSourceAtUpdateOne) Select(field string, fields ...string) *HasSourceAtUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*HasSourceAtUpdateOne) SetAllVersions

func (hsauo *HasSourceAtUpdateOne) SetAllVersions(p *PackageName) *HasSourceAtUpdateOne

SetAllVersions sets the "all_versions" edge to the PackageName entity.

func (*HasSourceAtUpdateOne) SetAllVersionsID

func (hsauo *HasSourceAtUpdateOne) SetAllVersionsID(id uuid.UUID) *HasSourceAtUpdateOne

SetAllVersionsID sets the "all_versions" edge to the PackageName entity by ID.

func (*HasSourceAtUpdateOne) SetCollector

func (hsauo *HasSourceAtUpdateOne) SetCollector(s string) *HasSourceAtUpdateOne

SetCollector sets the "collector" field.

func (*HasSourceAtUpdateOne) SetDocumentRef added in v0.6.0

func (hsauo *HasSourceAtUpdateOne) SetDocumentRef(s string) *HasSourceAtUpdateOne

SetDocumentRef sets the "document_ref" field.

func (*HasSourceAtUpdateOne) SetJustification

func (hsauo *HasSourceAtUpdateOne) SetJustification(s string) *HasSourceAtUpdateOne

SetJustification sets the "justification" field.

func (*HasSourceAtUpdateOne) SetKnownSince

func (hsauo *HasSourceAtUpdateOne) SetKnownSince(t time.Time) *HasSourceAtUpdateOne

SetKnownSince sets the "known_since" field.

func (*HasSourceAtUpdateOne) SetNillableAllVersionsID

func (hsauo *HasSourceAtUpdateOne) SetNillableAllVersionsID(id *uuid.UUID) *HasSourceAtUpdateOne

SetNillableAllVersionsID sets the "all_versions" edge to the PackageName entity by ID if the given value is not nil.

func (*HasSourceAtUpdateOne) SetNillableCollector added in v0.4.0

func (hsauo *HasSourceAtUpdateOne) SetNillableCollector(s *string) *HasSourceAtUpdateOne

SetNillableCollector sets the "collector" field if the given value is not nil.

func (*HasSourceAtUpdateOne) SetNillableDocumentRef added in v0.6.0

func (hsauo *HasSourceAtUpdateOne) SetNillableDocumentRef(s *string) *HasSourceAtUpdateOne

SetNillableDocumentRef sets the "document_ref" field if the given value is not nil.

func (*HasSourceAtUpdateOne) SetNillableJustification added in v0.4.0

func (hsauo *HasSourceAtUpdateOne) SetNillableJustification(s *string) *HasSourceAtUpdateOne

SetNillableJustification sets the "justification" field if the given value is not nil.

func (*HasSourceAtUpdateOne) SetNillableKnownSince added in v0.4.0

func (hsauo *HasSourceAtUpdateOne) SetNillableKnownSince(t *time.Time) *HasSourceAtUpdateOne

SetNillableKnownSince sets the "known_since" field if the given value is not nil.

func (*HasSourceAtUpdateOne) SetNillableOrigin added in v0.4.0

func (hsauo *HasSourceAtUpdateOne) SetNillableOrigin(s *string) *HasSourceAtUpdateOne

SetNillableOrigin sets the "origin" field if the given value is not nil.

func (*HasSourceAtUpdateOne) SetNillablePackageNameID

func (hsauo *HasSourceAtUpdateOne) SetNillablePackageNameID(u *uuid.UUID) *HasSourceAtUpdateOne

SetNillablePackageNameID sets the "package_name_id" field if the given value is not nil.

func (*HasSourceAtUpdateOne) SetNillablePackageVersionID

func (hsauo *HasSourceAtUpdateOne) SetNillablePackageVersionID(u *uuid.UUID) *HasSourceAtUpdateOne

SetNillablePackageVersionID sets the "package_version_id" field if the given value is not nil.

func (*HasSourceAtUpdateOne) SetNillableSourceID added in v0.4.0

func (hsauo *HasSourceAtUpdateOne) SetNillableSourceID(u *uuid.UUID) *HasSourceAtUpdateOne

SetNillableSourceID sets the "source_id" field if the given value is not nil.

func (*HasSourceAtUpdateOne) SetOrigin

func (hsauo *HasSourceAtUpdateOne) SetOrigin(s string) *HasSourceAtUpdateOne

SetOrigin sets the "origin" field.

func (*HasSourceAtUpdateOne) SetPackageNameID

func (hsauo *HasSourceAtUpdateOne) SetPackageNameID(u uuid.UUID) *HasSourceAtUpdateOne

SetPackageNameID sets the "package_name_id" field.

func (*HasSourceAtUpdateOne) SetPackageVersion

func (hsauo *HasSourceAtUpdateOne) SetPackageVersion(p *PackageVersion) *HasSourceAtUpdateOne

SetPackageVersion sets the "package_version" edge to the PackageVersion entity.

func (*HasSourceAtUpdateOne) SetPackageVersionID

func (hsauo *HasSourceAtUpdateOne) SetPackageVersionID(u uuid.UUID) *HasSourceAtUpdateOne

SetPackageVersionID sets the "package_version_id" field.

func (*HasSourceAtUpdateOne) SetSource

SetSource sets the "source" edge to the SourceName entity.

func (*HasSourceAtUpdateOne) SetSourceID

func (hsauo *HasSourceAtUpdateOne) SetSourceID(u uuid.UUID) *HasSourceAtUpdateOne

SetSourceID sets the "source_id" field.

func (*HasSourceAtUpdateOne) Where

Where appends a list predicates to the HasSourceAtUpdate builder.

type HasSourceAtUpsert

type HasSourceAtUpsert struct {
	*sql.UpdateSet
}

HasSourceAtUpsert is the "OnConflict" setter.

func (*HasSourceAtUpsert) ClearPackageNameID

func (u *HasSourceAtUpsert) ClearPackageNameID() *HasSourceAtUpsert

ClearPackageNameID clears the value of the "package_name_id" field.

func (*HasSourceAtUpsert) ClearPackageVersionID

func (u *HasSourceAtUpsert) ClearPackageVersionID() *HasSourceAtUpsert

ClearPackageVersionID clears the value of the "package_version_id" field.

func (*HasSourceAtUpsert) SetCollector

func (u *HasSourceAtUpsert) SetCollector(v string) *HasSourceAtUpsert

SetCollector sets the "collector" field.

func (*HasSourceAtUpsert) SetDocumentRef added in v0.6.0

func (u *HasSourceAtUpsert) SetDocumentRef(v string) *HasSourceAtUpsert

SetDocumentRef sets the "document_ref" field.

func (*HasSourceAtUpsert) SetJustification

func (u *HasSourceAtUpsert) SetJustification(v string) *HasSourceAtUpsert

SetJustification sets the "justification" field.

func (*HasSourceAtUpsert) SetKnownSince

func (u *HasSourceAtUpsert) SetKnownSince(v time.Time) *HasSourceAtUpsert

SetKnownSince sets the "known_since" field.

func (*HasSourceAtUpsert) SetOrigin

func (u *HasSourceAtUpsert) SetOrigin(v string) *HasSourceAtUpsert

SetOrigin sets the "origin" field.

func (*HasSourceAtUpsert) SetPackageNameID

func (u *HasSourceAtUpsert) SetPackageNameID(v uuid.UUID) *HasSourceAtUpsert

SetPackageNameID sets the "package_name_id" field.

func (*HasSourceAtUpsert) SetPackageVersionID

func (u *HasSourceAtUpsert) SetPackageVersionID(v uuid.UUID) *HasSourceAtUpsert

SetPackageVersionID sets the "package_version_id" field.

func (*HasSourceAtUpsert) SetSourceID

func (u *HasSourceAtUpsert) SetSourceID(v uuid.UUID) *HasSourceAtUpsert

SetSourceID sets the "source_id" field.

func (*HasSourceAtUpsert) UpdateCollector

func (u *HasSourceAtUpsert) UpdateCollector() *HasSourceAtUpsert

UpdateCollector sets the "collector" field to the value that was provided on create.

func (*HasSourceAtUpsert) UpdateDocumentRef added in v0.6.0

func (u *HasSourceAtUpsert) UpdateDocumentRef() *HasSourceAtUpsert

UpdateDocumentRef sets the "document_ref" field to the value that was provided on create.

func (*HasSourceAtUpsert) UpdateJustification

func (u *HasSourceAtUpsert) UpdateJustification() *HasSourceAtUpsert

UpdateJustification sets the "justification" field to the value that was provided on create.

func (*HasSourceAtUpsert) UpdateKnownSince

func (u *HasSourceAtUpsert) UpdateKnownSince() *HasSourceAtUpsert

UpdateKnownSince sets the "known_since" field to the value that was provided on create.

func (*HasSourceAtUpsert) UpdateOrigin

func (u *HasSourceAtUpsert) UpdateOrigin() *HasSourceAtUpsert

UpdateOrigin sets the "origin" field to the value that was provided on create.

func (*HasSourceAtUpsert) UpdatePackageNameID

func (u *HasSourceAtUpsert) UpdatePackageNameID() *HasSourceAtUpsert

UpdatePackageNameID sets the "package_name_id" field to the value that was provided on create.

func (*HasSourceAtUpsert) UpdatePackageVersionID

func (u *HasSourceAtUpsert) UpdatePackageVersionID() *HasSourceAtUpsert

UpdatePackageVersionID sets the "package_version_id" field to the value that was provided on create.

func (*HasSourceAtUpsert) UpdateSourceID

func (u *HasSourceAtUpsert) UpdateSourceID() *HasSourceAtUpsert

UpdateSourceID sets the "source_id" field to the value that was provided on create.

type HasSourceAtUpsertBulk

type HasSourceAtUpsertBulk struct {
	// contains filtered or unexported fields
}

HasSourceAtUpsertBulk is the builder for "upsert"-ing a bulk of HasSourceAt nodes.

func (*HasSourceAtUpsertBulk) ClearPackageNameID

func (u *HasSourceAtUpsertBulk) ClearPackageNameID() *HasSourceAtUpsertBulk

ClearPackageNameID clears the value of the "package_name_id" field.

func (*HasSourceAtUpsertBulk) ClearPackageVersionID

func (u *HasSourceAtUpsertBulk) ClearPackageVersionID() *HasSourceAtUpsertBulk

ClearPackageVersionID clears the value of the "package_version_id" field.

func (*HasSourceAtUpsertBulk) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*HasSourceAtUpsertBulk) Exec

Exec executes the query.

func (*HasSourceAtUpsertBulk) ExecX

func (u *HasSourceAtUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*HasSourceAtUpsertBulk) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.HasSourceAt.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*HasSourceAtUpsertBulk) SetCollector

SetCollector sets the "collector" field.

func (*HasSourceAtUpsertBulk) SetDocumentRef added in v0.6.0

func (u *HasSourceAtUpsertBulk) SetDocumentRef(v string) *HasSourceAtUpsertBulk

SetDocumentRef sets the "document_ref" field.

func (*HasSourceAtUpsertBulk) SetJustification

func (u *HasSourceAtUpsertBulk) SetJustification(v string) *HasSourceAtUpsertBulk

SetJustification sets the "justification" field.

func (*HasSourceAtUpsertBulk) SetKnownSince

SetKnownSince sets the "known_since" field.

func (*HasSourceAtUpsertBulk) SetOrigin

SetOrigin sets the "origin" field.

func (*HasSourceAtUpsertBulk) SetPackageNameID

func (u *HasSourceAtUpsertBulk) SetPackageNameID(v uuid.UUID) *HasSourceAtUpsertBulk

SetPackageNameID sets the "package_name_id" field.

func (*HasSourceAtUpsertBulk) SetPackageVersionID

func (u *HasSourceAtUpsertBulk) SetPackageVersionID(v uuid.UUID) *HasSourceAtUpsertBulk

SetPackageVersionID sets the "package_version_id" field.

func (*HasSourceAtUpsertBulk) SetSourceID

SetSourceID sets the "source_id" field.

func (*HasSourceAtUpsertBulk) Update

Update allows overriding fields `UPDATE` values. See the HasSourceAtCreateBulk.OnConflict documentation for more info.

func (*HasSourceAtUpsertBulk) UpdateCollector

func (u *HasSourceAtUpsertBulk) UpdateCollector() *HasSourceAtUpsertBulk

UpdateCollector sets the "collector" field to the value that was provided on create.

func (*HasSourceAtUpsertBulk) UpdateDocumentRef added in v0.6.0

func (u *HasSourceAtUpsertBulk) UpdateDocumentRef() *HasSourceAtUpsertBulk

UpdateDocumentRef sets the "document_ref" field to the value that was provided on create.

func (*HasSourceAtUpsertBulk) UpdateJustification

func (u *HasSourceAtUpsertBulk) UpdateJustification() *HasSourceAtUpsertBulk

UpdateJustification sets the "justification" field to the value that was provided on create.

func (*HasSourceAtUpsertBulk) UpdateKnownSince

func (u *HasSourceAtUpsertBulk) UpdateKnownSince() *HasSourceAtUpsertBulk

UpdateKnownSince sets the "known_since" field to the value that was provided on create.

func (*HasSourceAtUpsertBulk) UpdateNewValues

func (u *HasSourceAtUpsertBulk) UpdateNewValues() *HasSourceAtUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.HasSourceAt.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(hassourceat.FieldID)
		}),
	).
	Exec(ctx)

func (*HasSourceAtUpsertBulk) UpdateOrigin

func (u *HasSourceAtUpsertBulk) UpdateOrigin() *HasSourceAtUpsertBulk

UpdateOrigin sets the "origin" field to the value that was provided on create.

func (*HasSourceAtUpsertBulk) UpdatePackageNameID

func (u *HasSourceAtUpsertBulk) UpdatePackageNameID() *HasSourceAtUpsertBulk

UpdatePackageNameID sets the "package_name_id" field to the value that was provided on create.

func (*HasSourceAtUpsertBulk) UpdatePackageVersionID

func (u *HasSourceAtUpsertBulk) UpdatePackageVersionID() *HasSourceAtUpsertBulk

UpdatePackageVersionID sets the "package_version_id" field to the value that was provided on create.

func (*HasSourceAtUpsertBulk) UpdateSourceID

func (u *HasSourceAtUpsertBulk) UpdateSourceID() *HasSourceAtUpsertBulk

UpdateSourceID sets the "source_id" field to the value that was provided on create.

type HasSourceAtUpsertOne

type HasSourceAtUpsertOne struct {
	// contains filtered or unexported fields
}

HasSourceAtUpsertOne is the builder for "upsert"-ing

one HasSourceAt node.

func (*HasSourceAtUpsertOne) ClearPackageNameID

func (u *HasSourceAtUpsertOne) ClearPackageNameID() *HasSourceAtUpsertOne

ClearPackageNameID clears the value of the "package_name_id" field.

func (*HasSourceAtUpsertOne) ClearPackageVersionID

func (u *HasSourceAtUpsertOne) ClearPackageVersionID() *HasSourceAtUpsertOne

ClearPackageVersionID clears the value of the "package_version_id" field.

func (*HasSourceAtUpsertOne) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*HasSourceAtUpsertOne) Exec

Exec executes the query.

func (*HasSourceAtUpsertOne) ExecX

func (u *HasSourceAtUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*HasSourceAtUpsertOne) ID

func (u *HasSourceAtUpsertOne) ID(ctx context.Context) (id uuid.UUID, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*HasSourceAtUpsertOne) IDX

IDX is like ID, but panics if an error occurs.

func (*HasSourceAtUpsertOne) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.HasSourceAt.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*HasSourceAtUpsertOne) SetCollector

func (u *HasSourceAtUpsertOne) SetCollector(v string) *HasSourceAtUpsertOne

SetCollector sets the "collector" field.

func (*HasSourceAtUpsertOne) SetDocumentRef added in v0.6.0

func (u *HasSourceAtUpsertOne) SetDocumentRef(v string) *HasSourceAtUpsertOne

SetDocumentRef sets the "document_ref" field.

func (*HasSourceAtUpsertOne) SetJustification

func (u *HasSourceAtUpsertOne) SetJustification(v string) *HasSourceAtUpsertOne

SetJustification sets the "justification" field.

func (*HasSourceAtUpsertOne) SetKnownSince

func (u *HasSourceAtUpsertOne) SetKnownSince(v time.Time) *HasSourceAtUpsertOne

SetKnownSince sets the "known_since" field.

func (*HasSourceAtUpsertOne) SetOrigin

SetOrigin sets the "origin" field.

func (*HasSourceAtUpsertOne) SetPackageNameID

func (u *HasSourceAtUpsertOne) SetPackageNameID(v uuid.UUID) *HasSourceAtUpsertOne

SetPackageNameID sets the "package_name_id" field.

func (*HasSourceAtUpsertOne) SetPackageVersionID

func (u *HasSourceAtUpsertOne) SetPackageVersionID(v uuid.UUID) *HasSourceAtUpsertOne

SetPackageVersionID sets the "package_version_id" field.

func (*HasSourceAtUpsertOne) SetSourceID

SetSourceID sets the "source_id" field.

func (*HasSourceAtUpsertOne) Update

Update allows overriding fields `UPDATE` values. See the HasSourceAtCreate.OnConflict documentation for more info.

func (*HasSourceAtUpsertOne) UpdateCollector

func (u *HasSourceAtUpsertOne) UpdateCollector() *HasSourceAtUpsertOne

UpdateCollector sets the "collector" field to the value that was provided on create.

func (*HasSourceAtUpsertOne) UpdateDocumentRef added in v0.6.0

func (u *HasSourceAtUpsertOne) UpdateDocumentRef() *HasSourceAtUpsertOne

UpdateDocumentRef sets the "document_ref" field to the value that was provided on create.

func (*HasSourceAtUpsertOne) UpdateJustification

func (u *HasSourceAtUpsertOne) UpdateJustification() *HasSourceAtUpsertOne

UpdateJustification sets the "justification" field to the value that was provided on create.

func (*HasSourceAtUpsertOne) UpdateKnownSince

func (u *HasSourceAtUpsertOne) UpdateKnownSince() *HasSourceAtUpsertOne

UpdateKnownSince sets the "known_since" field to the value that was provided on create.

func (*HasSourceAtUpsertOne) UpdateNewValues

func (u *HasSourceAtUpsertOne) UpdateNewValues() *HasSourceAtUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:

client.HasSourceAt.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(hassourceat.FieldID)
		}),
	).
	Exec(ctx)

func (*HasSourceAtUpsertOne) UpdateOrigin

func (u *HasSourceAtUpsertOne) UpdateOrigin() *HasSourceAtUpsertOne

UpdateOrigin sets the "origin" field to the value that was provided on create.

func (*HasSourceAtUpsertOne) UpdatePackageNameID

func (u *HasSourceAtUpsertOne) UpdatePackageNameID() *HasSourceAtUpsertOne

UpdatePackageNameID sets the "package_name_id" field to the value that was provided on create.

func (*HasSourceAtUpsertOne) UpdatePackageVersionID

func (u *HasSourceAtUpsertOne) UpdatePackageVersionID() *HasSourceAtUpsertOne

UpdatePackageVersionID sets the "package_version_id" field to the value that was provided on create.

func (*HasSourceAtUpsertOne) UpdateSourceID

func (u *HasSourceAtUpsertOne) UpdateSourceID() *HasSourceAtUpsertOne

UpdateSourceID sets the "source_id" field to the value that was provided on create.

type HasSourceAts

type HasSourceAts []*HasSourceAt

HasSourceAts is a parsable slice of HasSourceAt.

type HashEqual

type HashEqual struct {

	// ID of the ent.
	ID uuid.UUID `json:"id,omitempty"`
	// ArtID holds the value of the "art_id" field.
	ArtID uuid.UUID `json:"art_id,omitempty"`
	// EqualArtID holds the value of the "equal_art_id" field.
	EqualArtID uuid.UUID `json:"equal_art_id,omitempty"`
	// Origin holds the value of the "origin" field.
	Origin string `json:"origin,omitempty"`
	// Collector holds the value of the "collector" field.
	Collector string `json:"collector,omitempty"`
	// Justification holds the value of the "justification" field.
	Justification string `json:"justification,omitempty"`
	// DocumentRef holds the value of the "document_ref" field.
	DocumentRef string `json:"document_ref,omitempty"`
	// An opaque hash of the artifact IDs that are equal
	ArtifactsHash string `json:"artifacts_hash,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the HashEqualQuery when eager-loading is set.
	Edges HashEqualEdges `json:"edges"`
	// contains filtered or unexported fields
}

HashEqual is the model entity for the HashEqual schema.

func (*HashEqual) ArtifactA added in v0.5.0

func (he *HashEqual) ArtifactA(ctx context.Context) (*Artifact, error)

func (*HashEqual) ArtifactB added in v0.5.0

func (he *HashEqual) ArtifactB(ctx context.Context) (*Artifact, error)

func (*HashEqual) IsNode

func (n *HashEqual) IsNode()

IsNode implements the Node interface check for GQLGen.

func (*HashEqual) QueryArtifactA added in v0.5.0

func (he *HashEqual) QueryArtifactA() *ArtifactQuery

QueryArtifactA queries the "artifact_a" edge of the HashEqual entity.

func (*HashEqual) QueryArtifactB added in v0.5.0

func (he *HashEqual) QueryArtifactB() *ArtifactQuery

QueryArtifactB queries the "artifact_b" edge of the HashEqual entity.

func (*HashEqual) String

func (he *HashEqual) String() string

String implements the fmt.Stringer.

func (*HashEqual) ToEdge

func (he *HashEqual) ToEdge(order *HashEqualOrder) *HashEqualEdge

ToEdge converts HashEqual into HashEqualEdge.

func (*HashEqual) Unwrap

func (he *HashEqual) Unwrap() *HashEqual

Unwrap unwraps the HashEqual entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.

func (*HashEqual) Update

func (he *HashEqual) Update() *HashEqualUpdateOne

Update returns a builder for updating this HashEqual. Note that you need to call HashEqual.Unwrap() before calling this method if this HashEqual was returned from a transaction, and the transaction was committed or rolled back.

func (*HashEqual) Value

func (he *HashEqual) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the HashEqual. This includes values selected through modifiers, order, etc.

type HashEqualClient

type HashEqualClient struct {
	// contains filtered or unexported fields
}

HashEqualClient is a client for the HashEqual schema.

func NewHashEqualClient

func NewHashEqualClient(c config) *HashEqualClient

NewHashEqualClient returns a client for the HashEqual from the given config.

func (*HashEqualClient) Create

func (c *HashEqualClient) Create() *HashEqualCreate

Create returns a builder for creating a HashEqual entity.

func (*HashEqualClient) CreateBulk

func (c *HashEqualClient) CreateBulk(builders ...*HashEqualCreate) *HashEqualCreateBulk

CreateBulk returns a builder for creating a bulk of HashEqual entities.

func (*HashEqualClient) Delete

func (c *HashEqualClient) Delete() *HashEqualDelete

Delete returns a delete builder for HashEqual.

func (*HashEqualClient) DeleteOne

func (c *HashEqualClient) DeleteOne(he *HashEqual) *HashEqualDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*HashEqualClient) DeleteOneID

func (c *HashEqualClient) DeleteOneID(id uuid.UUID) *HashEqualDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*HashEqualClient) Get

func (c *HashEqualClient) Get(ctx context.Context, id uuid.UUID) (*HashEqual, error)

Get returns a HashEqual entity by its id.

func (*HashEqualClient) GetX

func (c *HashEqualClient) GetX(ctx context.Context, id uuid.UUID) *HashEqual

GetX is like Get, but panics if an error occurs.

func (*HashEqualClient) Hooks

func (c *HashEqualClient) Hooks() []Hook

Hooks returns the client hooks.

func (*HashEqualClient) Intercept

func (c *HashEqualClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `hashequal.Intercept(f(g(h())))`.

func (*HashEqualClient) Interceptors

func (c *HashEqualClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*HashEqualClient) MapCreateBulk

func (c *HashEqualClient) MapCreateBulk(slice any, setFunc func(*HashEqualCreate, int)) *HashEqualCreateBulk

MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.

func (*HashEqualClient) Query

func (c *HashEqualClient) Query() *HashEqualQuery

Query returns a query builder for HashEqual.

func (*HashEqualClient) QueryArtifactA added in v0.5.0

func (c *HashEqualClient) QueryArtifactA(he *HashEqual) *ArtifactQuery

QueryArtifactA queries the artifact_a edge of a HashEqual.

func (*HashEqualClient) QueryArtifactB added in v0.5.0

func (c *HashEqualClient) QueryArtifactB(he *HashEqual) *ArtifactQuery

QueryArtifactB queries the artifact_b edge of a HashEqual.

func (*HashEqualClient) Update

func (c *HashEqualClient) Update() *HashEqualUpdate

Update returns an update builder for HashEqual.

func (*HashEqualClient) UpdateOne

func (c *HashEqualClient) UpdateOne(he *HashEqual) *HashEqualUpdateOne

UpdateOne returns an update builder for the given entity.

func (*HashEqualClient) UpdateOneID

func (c *HashEqualClient) UpdateOneID(id uuid.UUID) *HashEqualUpdateOne

UpdateOneID returns an update builder for the given id.

func (*HashEqualClient) Use

func (c *HashEqualClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `hashequal.Hooks(f(g(h())))`.

type HashEqualConnection

type HashEqualConnection struct {
	Edges      []*HashEqualEdge `json:"edges"`
	PageInfo   PageInfo         `json:"pageInfo"`
	TotalCount int              `json:"totalCount"`
}

HashEqualConnection is the connection containing edges to HashEqual.

type HashEqualCreate

type HashEqualCreate struct {
	// contains filtered or unexported fields
}

HashEqualCreate is the builder for creating a HashEqual entity.

func (*HashEqualCreate) Exec

func (hec *HashEqualCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*HashEqualCreate) ExecX

func (hec *HashEqualCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*HashEqualCreate) Mutation

func (hec *HashEqualCreate) Mutation() *HashEqualMutation

Mutation returns the HashEqualMutation object of the builder.

func (*HashEqualCreate) OnConflict

func (hec *HashEqualCreate) OnConflict(opts ...sql.ConflictOption) *HashEqualUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.HashEqual.Create().
	SetArtID(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.HashEqualUpsert) {
		SetArtID(v+v).
	}).
	Exec(ctx)

func (*HashEqualCreate) OnConflictColumns

func (hec *HashEqualCreate) OnConflictColumns(columns ...string) *HashEqualUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.HashEqual.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*HashEqualCreate) Save

func (hec *HashEqualCreate) Save(ctx context.Context) (*HashEqual, error)

Save creates the HashEqual in the database.

func (*HashEqualCreate) SaveX

func (hec *HashEqualCreate) SaveX(ctx context.Context) *HashEqual

SaveX calls Save and panics if Save returns an error.

func (*HashEqualCreate) SetArtID added in v0.5.0

func (hec *HashEqualCreate) SetArtID(u uuid.UUID) *HashEqualCreate

SetArtID sets the "art_id" field.

func (*HashEqualCreate) SetArtifactA added in v0.5.0

func (hec *HashEqualCreate) SetArtifactA(a *Artifact) *HashEqualCreate

SetArtifactA sets the "artifact_a" edge to the Artifact entity.

func (*HashEqualCreate) SetArtifactAID added in v0.5.0

func (hec *HashEqualCreate) SetArtifactAID(id uuid.UUID) *HashEqualCreate

SetArtifactAID sets the "artifact_a" edge to the Artifact entity by ID.

func (*HashEqualCreate) SetArtifactB added in v0.5.0

func (hec *HashEqualCreate) SetArtifactB(a *Artifact) *HashEqualCreate

SetArtifactB sets the "artifact_b" edge to the Artifact entity.

func (*HashEqualCreate) SetArtifactBID added in v0.5.0

func (hec *HashEqualCreate) SetArtifactBID(id uuid.UUID) *HashEqualCreate

SetArtifactBID sets the "artifact_b" edge to the Artifact entity by ID.

func (*HashEqualCreate) SetArtifactsHash added in v0.5.0

func (hec *HashEqualCreate) SetArtifactsHash(s string) *HashEqualCreate

SetArtifactsHash sets the "artifacts_hash" field.

func (*HashEqualCreate) SetCollector

func (hec *HashEqualCreate) SetCollector(s string) *HashEqualCreate

SetCollector sets the "collector" field.

func (*HashEqualCreate) SetDocumentRef added in v0.6.0

func (hec *HashEqualCreate) SetDocumentRef(s string) *HashEqualCreate

SetDocumentRef sets the "document_ref" field.

func (*HashEqualCreate) SetEqualArtID added in v0.5.0

func (hec *HashEqualCreate) SetEqualArtID(u uuid.UUID) *HashEqualCreate

SetEqualArtID sets the "equal_art_id" field.

func (*HashEqualCreate) SetID added in v0.5.0

func (hec *HashEqualCreate) SetID(u uuid.UUID) *HashEqualCreate

SetID sets the "id" field.

func (*HashEqualCreate) SetJustification

func (hec *HashEqualCreate) SetJustification(s string) *HashEqualCreate

SetJustification sets the "justification" field.

func (*HashEqualCreate) SetNillableID added in v0.5.0

func (hec *HashEqualCreate) SetNillableID(u *uuid.UUID) *HashEqualCreate

SetNillableID sets the "id" field if the given value is not nil.

func (*HashEqualCreate) SetOrigin

func (hec *HashEqualCreate) SetOrigin(s string) *HashEqualCreate

SetOrigin sets the "origin" field.

type HashEqualCreateBulk

type HashEqualCreateBulk struct {
	// contains filtered or unexported fields
}

HashEqualCreateBulk is the builder for creating many HashEqual entities in bulk.

func (*HashEqualCreateBulk) Exec

func (hecb *HashEqualCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*HashEqualCreateBulk) ExecX

func (hecb *HashEqualCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*HashEqualCreateBulk) OnConflict

func (hecb *HashEqualCreateBulk) OnConflict(opts ...sql.ConflictOption) *HashEqualUpsertBulk

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.HashEqual.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.HashEqualUpsert) {
		SetArtID(v+v).
	}).
	Exec(ctx)

func (*HashEqualCreateBulk) OnConflictColumns

func (hecb *HashEqualCreateBulk) OnConflictColumns(columns ...string) *HashEqualUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.HashEqual.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*HashEqualCreateBulk) Save

func (hecb *HashEqualCreateBulk) Save(ctx context.Context) ([]*HashEqual, error)

Save creates the HashEqual entities in the database.

func (*HashEqualCreateBulk) SaveX

func (hecb *HashEqualCreateBulk) SaveX(ctx context.Context) []*HashEqual

SaveX is like Save, but panics if an error occurs.

type HashEqualDelete

type HashEqualDelete struct {
	// contains filtered or unexported fields
}

HashEqualDelete is the builder for deleting a HashEqual entity.

func (*HashEqualDelete) Exec

func (hed *HashEqualDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*HashEqualDelete) ExecX

func (hed *HashEqualDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*HashEqualDelete) Where

Where appends a list predicates to the HashEqualDelete builder.

type HashEqualDeleteOne

type HashEqualDeleteOne struct {
	// contains filtered or unexported fields
}

HashEqualDeleteOne is the builder for deleting a single HashEqual entity.

func (*HashEqualDeleteOne) Exec

func (hedo *HashEqualDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*HashEqualDeleteOne) ExecX

func (hedo *HashEqualDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*HashEqualDeleteOne) Where

Where appends a list predicates to the HashEqualDelete builder.

type HashEqualEdge

type HashEqualEdge struct {
	Node   *HashEqual `json:"node"`
	Cursor Cursor     `json:"cursor"`
}

HashEqualEdge is the edge representation of HashEqual.

type HashEqualEdges

type HashEqualEdges struct {
	// ArtifactA holds the value of the artifact_a edge.
	ArtifactA *Artifact `json:"artifact_a,omitempty"`
	// ArtifactB holds the value of the artifact_b edge.
	ArtifactB *Artifact `json:"artifact_b,omitempty"`
	// contains filtered or unexported fields
}

HashEqualEdges holds the relations/edges for other nodes in the graph.

func (HashEqualEdges) ArtifactAOrErr added in v0.5.0

func (e HashEqualEdges) ArtifactAOrErr() (*Artifact, error)

ArtifactAOrErr returns the ArtifactA value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (HashEqualEdges) ArtifactBOrErr added in v0.5.0

func (e HashEqualEdges) ArtifactBOrErr() (*Artifact, error)

ArtifactBOrErr returns the ArtifactB value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type HashEqualGroupBy

type HashEqualGroupBy struct {
	// contains filtered or unexported fields
}

HashEqualGroupBy is the group-by builder for HashEqual entities.

func (*HashEqualGroupBy) Aggregate

func (hegb *HashEqualGroupBy) Aggregate(fns ...AggregateFunc) *HashEqualGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*HashEqualGroupBy) Bool

func (s *HashEqualGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*HashEqualGroupBy) BoolX

func (s *HashEqualGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*HashEqualGroupBy) Bools

func (s *HashEqualGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*HashEqualGroupBy) BoolsX

func (s *HashEqualGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*HashEqualGroupBy) Float64

func (s *HashEqualGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*HashEqualGroupBy) Float64X

func (s *HashEqualGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*HashEqualGroupBy) Float64s

func (s *HashEqualGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*HashEqualGroupBy) Float64sX

func (s *HashEqualGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*HashEqualGroupBy) Int

func (s *HashEqualGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*HashEqualGroupBy) IntX

func (s *HashEqualGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*HashEqualGroupBy) Ints

func (s *HashEqualGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*HashEqualGroupBy) IntsX

func (s *HashEqualGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*HashEqualGroupBy) Scan

func (hegb *HashEqualGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*HashEqualGroupBy) ScanX

func (s *HashEqualGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*HashEqualGroupBy) String

func (s *HashEqualGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*HashEqualGroupBy) StringX

func (s *HashEqualGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*HashEqualGroupBy) Strings

func (s *HashEqualGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*HashEqualGroupBy) StringsX

func (s *HashEqualGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type HashEqualMutation

type HashEqualMutation struct {
	// contains filtered or unexported fields
}

HashEqualMutation represents an operation that mutates the HashEqual nodes in the graph.

func (*HashEqualMutation) AddField

func (m *HashEqualMutation) AddField(name string, value ent.Value) error

AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*HashEqualMutation) AddedEdges

func (m *HashEqualMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*HashEqualMutation) AddedField

func (m *HashEqualMutation) AddedField(name string) (ent.Value, bool)

AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*HashEqualMutation) AddedFields

func (m *HashEqualMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*HashEqualMutation) AddedIDs

func (m *HashEqualMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*HashEqualMutation) ArtID added in v0.5.0

func (m *HashEqualMutation) ArtID() (r uuid.UUID, exists bool)

ArtID returns the value of the "art_id" field in the mutation.

func (*HashEqualMutation) ArtifactACleared added in v0.5.0

func (m *HashEqualMutation) ArtifactACleared() bool

ArtifactACleared reports if the "artifact_a" edge to the Artifact entity was cleared.

func (*HashEqualMutation) ArtifactAID added in v0.5.0

func (m *HashEqualMutation) ArtifactAID() (id uuid.UUID, exists bool)

ArtifactAID returns the "artifact_a" edge ID in the mutation.

func (*HashEqualMutation) ArtifactAIDs added in v0.5.0

func (m *HashEqualMutation) ArtifactAIDs() (ids []uuid.UUID)

ArtifactAIDs returns the "artifact_a" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use ArtifactAID instead. It exists only for internal usage by the builders.

func (*HashEqualMutation) ArtifactBCleared added in v0.5.0

func (m *HashEqualMutation) ArtifactBCleared() bool

ArtifactBCleared reports if the "artifact_b" edge to the Artifact entity was cleared.

func (*HashEqualMutation) ArtifactBID added in v0.5.0

func (m *HashEqualMutation) ArtifactBID() (id uuid.UUID, exists bool)

ArtifactBID returns the "artifact_b" edge ID in the mutation.

func (*HashEqualMutation) ArtifactBIDs added in v0.5.0

func (m *HashEqualMutation) ArtifactBIDs() (ids []uuid.UUID)

ArtifactBIDs returns the "artifact_b" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use ArtifactBID instead. It exists only for internal usage by the builders.

func (*HashEqualMutation) ArtifactsHash added in v0.5.0

func (m *HashEqualMutation) ArtifactsHash() (r string, exists bool)

ArtifactsHash returns the value of the "artifacts_hash" field in the mutation.

func (*HashEqualMutation) ClearArtifactA added in v0.5.0

func (m *HashEqualMutation) ClearArtifactA()

ClearArtifactA clears the "artifact_a" edge to the Artifact entity.

func (*HashEqualMutation) ClearArtifactB added in v0.5.0

func (m *HashEqualMutation) ClearArtifactB()

ClearArtifactB clears the "artifact_b" edge to the Artifact entity.

func (*HashEqualMutation) ClearEdge

func (m *HashEqualMutation) ClearEdge(name string) error

ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.

func (*HashEqualMutation) ClearField

func (m *HashEqualMutation) ClearField(name string) error

ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.

func (*HashEqualMutation) ClearedEdges

func (m *HashEqualMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*HashEqualMutation) ClearedFields

func (m *HashEqualMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (HashEqualMutation) Client

func (m HashEqualMutation) Client() *Client

Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.

func (*HashEqualMutation) Collector

func (m *HashEqualMutation) Collector() (r string, exists bool)

Collector returns the value of the "collector" field in the mutation.

func (*HashEqualMutation) DocumentRef added in v0.6.0

func (m *HashEqualMutation) DocumentRef() (r string, exists bool)

DocumentRef returns the value of the "document_ref" field in the mutation.

func (*HashEqualMutation) EdgeCleared

func (m *HashEqualMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*HashEqualMutation) EqualArtID added in v0.5.0

func (m *HashEqualMutation) EqualArtID() (r uuid.UUID, exists bool)

EqualArtID returns the value of the "equal_art_id" field in the mutation.

func (*HashEqualMutation) Field

func (m *HashEqualMutation) Field(name string) (ent.Value, bool)

Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*HashEqualMutation) FieldCleared

func (m *HashEqualMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*HashEqualMutation) Fields

func (m *HashEqualMutation) Fields() []string

Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().

func (*HashEqualMutation) ID

func (m *HashEqualMutation) ID() (id uuid.UUID, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*HashEqualMutation) IDs

func (m *HashEqualMutation) IDs(ctx context.Context) ([]uuid.UUID, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*HashEqualMutation) Justification

func (m *HashEqualMutation) Justification() (r string, exists bool)

Justification returns the value of the "justification" field in the mutation.

func (*HashEqualMutation) OldArtID added in v0.5.0

func (m *HashEqualMutation) OldArtID(ctx context.Context) (v uuid.UUID, err error)

OldArtID returns the old "art_id" field's value of the HashEqual entity. If the HashEqual object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*HashEqualMutation) OldArtifactsHash added in v0.5.0

func (m *HashEqualMutation) OldArtifactsHash(ctx context.Context) (v string, err error)

OldArtifactsHash returns the old "artifacts_hash" field's value of the HashEqual entity. If the HashEqual object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*HashEqualMutation) OldCollector

func (m *HashEqualMutation) OldCollector(ctx context.Context) (v string, err error)

OldCollector returns the old "collector" field's value of the HashEqual entity. If the HashEqual object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*HashEqualMutation) OldDocumentRef added in v0.6.0

func (m *HashEqualMutation) OldDocumentRef(ctx context.Context) (v string, err error)

OldDocumentRef returns the old "document_ref" field's value of the HashEqual entity. If the HashEqual object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*HashEqualMutation) OldEqualArtID added in v0.5.0

func (m *HashEqualMutation) OldEqualArtID(ctx context.Context) (v uuid.UUID, err error)

OldEqualArtID returns the old "equal_art_id" field's value of the HashEqual entity. If the HashEqual object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*HashEqualMutation) OldField

func (m *HashEqualMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*HashEqualMutation) OldJustification

func (m *HashEqualMutation) OldJustification(ctx context.Context) (v string, err error)

OldJustification returns the old "justification" field's value of the HashEqual entity. If the HashEqual object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*HashEqualMutation) OldOrigin

func (m *HashEqualMutation) OldOrigin(ctx context.Context) (v string, err error)

OldOrigin returns the old "origin" field's value of the HashEqual entity. If the HashEqual object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*HashEqualMutation) Op

func (m *HashEqualMutation) Op() Op

Op returns the operation name.

func (*HashEqualMutation) Origin

func (m *HashEqualMutation) Origin() (r string, exists bool)

Origin returns the value of the "origin" field in the mutation.

func (*HashEqualMutation) RemovedEdges

func (m *HashEqualMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*HashEqualMutation) RemovedIDs

func (m *HashEqualMutation) RemovedIDs(name string) []ent.Value

RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.

func (*HashEqualMutation) ResetArtID added in v0.5.0

func (m *HashEqualMutation) ResetArtID()

ResetArtID resets all changes to the "art_id" field.

func (*HashEqualMutation) ResetArtifactA added in v0.5.0

func (m *HashEqualMutation) ResetArtifactA()

ResetArtifactA resets all changes to the "artifact_a" edge.

func (*HashEqualMutation) ResetArtifactB added in v0.5.0

func (m *HashEqualMutation) ResetArtifactB()

ResetArtifactB resets all changes to the "artifact_b" edge.

func (*HashEqualMutation) ResetArtifactsHash added in v0.5.0

func (m *HashEqualMutation) ResetArtifactsHash()

ResetArtifactsHash resets all changes to the "artifacts_hash" field.

func (*HashEqualMutation) ResetCollector

func (m *HashEqualMutation) ResetCollector()

ResetCollector resets all changes to the "collector" field.

func (*HashEqualMutation) ResetDocumentRef added in v0.6.0

func (m *HashEqualMutation) ResetDocumentRef()

ResetDocumentRef resets all changes to the "document_ref" field.

func (*HashEqualMutation) ResetEdge

func (m *HashEqualMutation) ResetEdge(name string) error

ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.

func (*HashEqualMutation) ResetEqualArtID added in v0.5.0

func (m *HashEqualMutation) ResetEqualArtID()

ResetEqualArtID resets all changes to the "equal_art_id" field.

func (*HashEqualMutation) ResetField

func (m *HashEqualMutation) ResetField(name string) error

ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.

func (*HashEqualMutation) ResetJustification

func (m *HashEqualMutation) ResetJustification()

ResetJustification resets all changes to the "justification" field.

func (*HashEqualMutation) ResetOrigin

func (m *HashEqualMutation) ResetOrigin()

ResetOrigin resets all changes to the "origin" field.

func (*HashEqualMutation) SetArtID added in v0.5.0

func (m *HashEqualMutation) SetArtID(u uuid.UUID)

SetArtID sets the "art_id" field.

func (*HashEqualMutation) SetArtifactAID added in v0.5.0

func (m *HashEqualMutation) SetArtifactAID(id uuid.UUID)

SetArtifactAID sets the "artifact_a" edge to the Artifact entity by id.

func (*HashEqualMutation) SetArtifactBID added in v0.5.0

func (m *HashEqualMutation) SetArtifactBID(id uuid.UUID)

SetArtifactBID sets the "artifact_b" edge to the Artifact entity by id.

func (*HashEqualMutation) SetArtifactsHash added in v0.5.0

func (m *HashEqualMutation) SetArtifactsHash(s string)

SetArtifactsHash sets the "artifacts_hash" field.

func (*HashEqualMutation) SetCollector

func (m *HashEqualMutation) SetCollector(s string)

SetCollector sets the "collector" field.

func (*HashEqualMutation) SetDocumentRef added in v0.6.0

func (m *HashEqualMutation) SetDocumentRef(s string)

SetDocumentRef sets the "document_ref" field.

func (*HashEqualMutation) SetEqualArtID added in v0.5.0

func (m *HashEqualMutation) SetEqualArtID(u uuid.UUID)

SetEqualArtID sets the "equal_art_id" field.

func (*HashEqualMutation) SetField

func (m *HashEqualMutation) SetField(name string, value ent.Value) error

SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*HashEqualMutation) SetID added in v0.5.0

func (m *HashEqualMutation) SetID(id uuid.UUID)

SetID sets the value of the id field. Note that this operation is only accepted on creation of HashEqual entities.

func (*HashEqualMutation) SetJustification

func (m *HashEqualMutation) SetJustification(s string)

SetJustification sets the "justification" field.

func (*HashEqualMutation) SetOp

func (m *HashEqualMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*HashEqualMutation) SetOrigin

func (m *HashEqualMutation) SetOrigin(s string)

SetOrigin sets the "origin" field.

func (HashEqualMutation) Tx

func (m HashEqualMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*HashEqualMutation) Type

func (m *HashEqualMutation) Type() string

Type returns the node type of this mutation (HashEqual).

func (*HashEqualMutation) Where

func (m *HashEqualMutation) Where(ps ...predicate.HashEqual)

Where appends a list predicates to the HashEqualMutation builder.

func (*HashEqualMutation) WhereP

func (m *HashEqualMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the HashEqualMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type HashEqualOrder

type HashEqualOrder struct {
	Direction OrderDirection       `json:"direction"`
	Field     *HashEqualOrderField `json:"field"`
}

HashEqualOrder defines the ordering of HashEqual.

type HashEqualOrderField

type HashEqualOrderField struct {
	// Value extracts the ordering value from the given HashEqual.
	Value func(*HashEqual) (ent.Value, error)
	// contains filtered or unexported fields
}

HashEqualOrderField defines the ordering field of HashEqual.

type HashEqualPaginateOption

type HashEqualPaginateOption func(*hashequalPager) error

HashEqualPaginateOption enables pagination customization.

func WithHashEqualFilter

func WithHashEqualFilter(filter func(*HashEqualQuery) (*HashEqualQuery, error)) HashEqualPaginateOption

WithHashEqualFilter configures pagination filter.

func WithHashEqualOrder

func WithHashEqualOrder(order *HashEqualOrder) HashEqualPaginateOption

WithHashEqualOrder configures pagination ordering.

type HashEqualQuery

type HashEqualQuery struct {
	// contains filtered or unexported fields
}

HashEqualQuery is the builder for querying HashEqual entities.

func (*HashEqualQuery) Aggregate

func (heq *HashEqualQuery) Aggregate(fns ...AggregateFunc) *HashEqualSelect

Aggregate returns a HashEqualSelect configured with the given aggregations.

func (*HashEqualQuery) All

func (heq *HashEqualQuery) All(ctx context.Context) ([]*HashEqual, error)

All executes the query and returns a list of HashEquals.

func (*HashEqualQuery) AllX

func (heq *HashEqualQuery) AllX(ctx context.Context) []*HashEqual

AllX is like All, but panics if an error occurs.

func (*HashEqualQuery) Clone

func (heq *HashEqualQuery) Clone() *HashEqualQuery

Clone returns a duplicate of the HashEqualQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*HashEqualQuery) CollectFields

func (he *HashEqualQuery) CollectFields(ctx context.Context, satisfies ...string) (*HashEqualQuery, error)

CollectFields tells the query-builder to eagerly load connected nodes by resolver context.

func (*HashEqualQuery) Count

func (heq *HashEqualQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*HashEqualQuery) CountX

func (heq *HashEqualQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*HashEqualQuery) Exist

func (heq *HashEqualQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*HashEqualQuery) ExistX

func (heq *HashEqualQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*HashEqualQuery) First

func (heq *HashEqualQuery) First(ctx context.Context) (*HashEqual, error)

First returns the first HashEqual entity from the query. Returns a *NotFoundError when no HashEqual was found.

func (*HashEqualQuery) FirstID

func (heq *HashEqualQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)

FirstID returns the first HashEqual ID from the query. Returns a *NotFoundError when no HashEqual ID was found.

func (*HashEqualQuery) FirstIDX

func (heq *HashEqualQuery) FirstIDX(ctx context.Context) uuid.UUID

FirstIDX is like FirstID, but panics if an error occurs.

func (*HashEqualQuery) FirstX

func (heq *HashEqualQuery) FirstX(ctx context.Context) *HashEqual

FirstX is like First, but panics if an error occurs.

func (*HashEqualQuery) GroupBy

func (heq *HashEqualQuery) GroupBy(field string, fields ...string) *HashEqualGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	ArtID uuid.UUID `json:"art_id,omitempty"`
	Count int `json:"count,omitempty"`
}

client.HashEqual.Query().
	GroupBy(hashequal.FieldArtID).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*HashEqualQuery) IDs

func (heq *HashEqualQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)

IDs executes the query and returns a list of HashEqual IDs.

func (*HashEqualQuery) IDsX

func (heq *HashEqualQuery) IDsX(ctx context.Context) []uuid.UUID

IDsX is like IDs, but panics if an error occurs.

func (*HashEqualQuery) Limit

func (heq *HashEqualQuery) Limit(limit int) *HashEqualQuery

Limit the number of records to be returned by this query.

func (*HashEqualQuery) Offset

func (heq *HashEqualQuery) Offset(offset int) *HashEqualQuery

Offset to start from.

func (*HashEqualQuery) Only

func (heq *HashEqualQuery) Only(ctx context.Context) (*HashEqual, error)

Only returns a single HashEqual entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one HashEqual entity is found. Returns a *NotFoundError when no HashEqual entities are found.

func (*HashEqualQuery) OnlyID

func (heq *HashEqualQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)

OnlyID is like Only, but returns the only HashEqual ID in the query. Returns a *NotSingularError when more than one HashEqual ID is found. Returns a *NotFoundError when no entities are found.

func (*HashEqualQuery) OnlyIDX

func (heq *HashEqualQuery) OnlyIDX(ctx context.Context) uuid.UUID

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*HashEqualQuery) OnlyX

func (heq *HashEqualQuery) OnlyX(ctx context.Context) *HashEqual

OnlyX is like Only, but panics if an error occurs.

func (*HashEqualQuery) Order

Order specifies how the records should be ordered.

func (*HashEqualQuery) Paginate

func (he *HashEqualQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...HashEqualPaginateOption,
) (*HashEqualConnection, error)

Paginate executes the query and returns a relay based cursor connection to HashEqual.

func (*HashEqualQuery) QueryArtifactA added in v0.5.0

func (heq *HashEqualQuery) QueryArtifactA() *ArtifactQuery

QueryArtifactA chains the current query on the "artifact_a" edge.

func (*HashEqualQuery) QueryArtifactB added in v0.5.0

func (heq *HashEqualQuery) QueryArtifactB() *ArtifactQuery

QueryArtifactB chains the current query on the "artifact_b" edge.

func (*HashEqualQuery) Select

func (heq *HashEqualQuery) Select(fields ...string) *HashEqualSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	ArtID uuid.UUID `json:"art_id,omitempty"`
}

client.HashEqual.Query().
	Select(hashequal.FieldArtID).
	Scan(ctx, &v)

func (*HashEqualQuery) Unique

func (heq *HashEqualQuery) Unique(unique bool) *HashEqualQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*HashEqualQuery) Where

func (heq *HashEqualQuery) Where(ps ...predicate.HashEqual) *HashEqualQuery

Where adds a new predicate for the HashEqualQuery builder.

func (*HashEqualQuery) WithArtifactA added in v0.5.0

func (heq *HashEqualQuery) WithArtifactA(opts ...func(*ArtifactQuery)) *HashEqualQuery

WithArtifactA tells the query-builder to eager-load the nodes that are connected to the "artifact_a" edge. The optional arguments are used to configure the query builder of the edge.

func (*HashEqualQuery) WithArtifactB added in v0.5.0

func (heq *HashEqualQuery) WithArtifactB(opts ...func(*ArtifactQuery)) *HashEqualQuery

WithArtifactB tells the query-builder to eager-load the nodes that are connected to the "artifact_b" edge. The optional arguments are used to configure the query builder of the edge.

type HashEqualSelect

type HashEqualSelect struct {
	*HashEqualQuery
	// contains filtered or unexported fields
}

HashEqualSelect is the builder for selecting fields of HashEqual entities.

func (*HashEqualSelect) Aggregate

func (hes *HashEqualSelect) Aggregate(fns ...AggregateFunc) *HashEqualSelect

Aggregate adds the given aggregation functions to the selector query.

func (*HashEqualSelect) Bool

func (s *HashEqualSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*HashEqualSelect) BoolX

func (s *HashEqualSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*HashEqualSelect) Bools

func (s *HashEqualSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*HashEqualSelect) BoolsX

func (s *HashEqualSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*HashEqualSelect) Float64

func (s *HashEqualSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*HashEqualSelect) Float64X

func (s *HashEqualSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*HashEqualSelect) Float64s

func (s *HashEqualSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*HashEqualSelect) Float64sX

func (s *HashEqualSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*HashEqualSelect) Int

func (s *HashEqualSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*HashEqualSelect) IntX

func (s *HashEqualSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*HashEqualSelect) Ints

func (s *HashEqualSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*HashEqualSelect) IntsX

func (s *HashEqualSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*HashEqualSelect) Scan

func (hes *HashEqualSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*HashEqualSelect) ScanX

func (s *HashEqualSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*HashEqualSelect) String

func (s *HashEqualSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*HashEqualSelect) StringX

func (s *HashEqualSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*HashEqualSelect) Strings

func (s *HashEqualSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*HashEqualSelect) StringsX

func (s *HashEqualSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type HashEqualUpdate

type HashEqualUpdate struct {
	// contains filtered or unexported fields
}

HashEqualUpdate is the builder for updating HashEqual entities.

func (*HashEqualUpdate) ClearArtifactA added in v0.5.0

func (heu *HashEqualUpdate) ClearArtifactA() *HashEqualUpdate

ClearArtifactA clears the "artifact_a" edge to the Artifact entity.

func (*HashEqualUpdate) ClearArtifactB added in v0.5.0

func (heu *HashEqualUpdate) ClearArtifactB() *HashEqualUpdate

ClearArtifactB clears the "artifact_b" edge to the Artifact entity.

func (*HashEqualUpdate) Exec

func (heu *HashEqualUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*HashEqualUpdate) ExecX

func (heu *HashEqualUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*HashEqualUpdate) Mutation

func (heu *HashEqualUpdate) Mutation() *HashEqualMutation

Mutation returns the HashEqualMutation object of the builder.

func (*HashEqualUpdate) Save

func (heu *HashEqualUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*HashEqualUpdate) SaveX

func (heu *HashEqualUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*HashEqualUpdate) SetArtID added in v0.5.0

func (heu *HashEqualUpdate) SetArtID(u uuid.UUID) *HashEqualUpdate

SetArtID sets the "art_id" field.

func (*HashEqualUpdate) SetArtifactA added in v0.5.0

func (heu *HashEqualUpdate) SetArtifactA(a *Artifact) *HashEqualUpdate

SetArtifactA sets the "artifact_a" edge to the Artifact entity.

func (*HashEqualUpdate) SetArtifactAID added in v0.5.0

func (heu *HashEqualUpdate) SetArtifactAID(id uuid.UUID) *HashEqualUpdate

SetArtifactAID sets the "artifact_a" edge to the Artifact entity by ID.

func (*HashEqualUpdate) SetArtifactB added in v0.5.0

func (heu *HashEqualUpdate) SetArtifactB(a *Artifact) *HashEqualUpdate

SetArtifactB sets the "artifact_b" edge to the Artifact entity.

func (*HashEqualUpdate) SetArtifactBID added in v0.5.0

func (heu *HashEqualUpdate) SetArtifactBID(id uuid.UUID) *HashEqualUpdate

SetArtifactBID sets the "artifact_b" edge to the Artifact entity by ID.

func (*HashEqualUpdate) SetArtifactsHash added in v0.5.0

func (heu *HashEqualUpdate) SetArtifactsHash(s string) *HashEqualUpdate

SetArtifactsHash sets the "artifacts_hash" field.

func (*HashEqualUpdate) SetCollector

func (heu *HashEqualUpdate) SetCollector(s string) *HashEqualUpdate

SetCollector sets the "collector" field.

func (*HashEqualUpdate) SetDocumentRef added in v0.6.0

func (heu *HashEqualUpdate) SetDocumentRef(s string) *HashEqualUpdate

SetDocumentRef sets the "document_ref" field.

func (*HashEqualUpdate) SetEqualArtID added in v0.5.0

func (heu *HashEqualUpdate) SetEqualArtID(u uuid.UUID) *HashEqualUpdate

SetEqualArtID sets the "equal_art_id" field.

func (*HashEqualUpdate) SetJustification

func (heu *HashEqualUpdate) SetJustification(s string) *HashEqualUpdate

SetJustification sets the "justification" field.

func (*HashEqualUpdate) SetNillableArtID added in v0.5.0

func (heu *HashEqualUpdate) SetNillableArtID(u *uuid.UUID) *HashEqualUpdate

SetNillableArtID sets the "art_id" field if the given value is not nil.

func (*HashEqualUpdate) SetNillableArtifactsHash added in v0.5.0

func (heu *HashEqualUpdate) SetNillableArtifactsHash(s *string) *HashEqualUpdate

SetNillableArtifactsHash sets the "artifacts_hash" field if the given value is not nil.

func (*HashEqualUpdate) SetNillableCollector added in v0.4.0

func (heu *HashEqualUpdate) SetNillableCollector(s *string) *HashEqualUpdate

SetNillableCollector sets the "collector" field if the given value is not nil.

func (*HashEqualUpdate) SetNillableDocumentRef added in v0.6.0

func (heu *HashEqualUpdate) SetNillableDocumentRef(s *string) *HashEqualUpdate

SetNillableDocumentRef sets the "document_ref" field if the given value is not nil.

func (*HashEqualUpdate) SetNillableEqualArtID added in v0.5.0

func (heu *HashEqualUpdate) SetNillableEqualArtID(u *uuid.UUID) *HashEqualUpdate

SetNillableEqualArtID sets the "equal_art_id" field if the given value is not nil.

func (*HashEqualUpdate) SetNillableJustification added in v0.4.0

func (heu *HashEqualUpdate) SetNillableJustification(s *string) *HashEqualUpdate

SetNillableJustification sets the "justification" field if the given value is not nil.

func (*HashEqualUpdate) SetNillableOrigin added in v0.4.0

func (heu *HashEqualUpdate) SetNillableOrigin(s *string) *HashEqualUpdate

SetNillableOrigin sets the "origin" field if the given value is not nil.

func (*HashEqualUpdate) SetOrigin

func (heu *HashEqualUpdate) SetOrigin(s string) *HashEqualUpdate

SetOrigin sets the "origin" field.

func (*HashEqualUpdate) Where

Where appends a list predicates to the HashEqualUpdate builder.

type HashEqualUpdateOne

type HashEqualUpdateOne struct {
	// contains filtered or unexported fields
}

HashEqualUpdateOne is the builder for updating a single HashEqual entity.

func (*HashEqualUpdateOne) ClearArtifactA added in v0.5.0

func (heuo *HashEqualUpdateOne) ClearArtifactA() *HashEqualUpdateOne

ClearArtifactA clears the "artifact_a" edge to the Artifact entity.

func (*HashEqualUpdateOne) ClearArtifactB added in v0.5.0

func (heuo *HashEqualUpdateOne) ClearArtifactB() *HashEqualUpdateOne

ClearArtifactB clears the "artifact_b" edge to the Artifact entity.

func (*HashEqualUpdateOne) Exec

func (heuo *HashEqualUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*HashEqualUpdateOne) ExecX

func (heuo *HashEqualUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*HashEqualUpdateOne) Mutation

func (heuo *HashEqualUpdateOne) Mutation() *HashEqualMutation

Mutation returns the HashEqualMutation object of the builder.

func (*HashEqualUpdateOne) Save

func (heuo *HashEqualUpdateOne) Save(ctx context.Context) (*HashEqual, error)

Save executes the query and returns the updated HashEqual entity.

func (*HashEqualUpdateOne) SaveX

func (heuo *HashEqualUpdateOne) SaveX(ctx context.Context) *HashEqual

SaveX is like Save, but panics if an error occurs.

func (*HashEqualUpdateOne) Select

func (heuo *HashEqualUpdateOne) Select(field string, fields ...string) *HashEqualUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*HashEqualUpdateOne) SetArtID added in v0.5.0

func (heuo *HashEqualUpdateOne) SetArtID(u uuid.UUID) *HashEqualUpdateOne

SetArtID sets the "art_id" field.

func (*HashEqualUpdateOne) SetArtifactA added in v0.5.0

func (heuo *HashEqualUpdateOne) SetArtifactA(a *Artifact) *HashEqualUpdateOne

SetArtifactA sets the "artifact_a" edge to the Artifact entity.

func (*HashEqualUpdateOne) SetArtifactAID added in v0.5.0

func (heuo *HashEqualUpdateOne) SetArtifactAID(id uuid.UUID) *HashEqualUpdateOne

SetArtifactAID sets the "artifact_a" edge to the Artifact entity by ID.

func (*HashEqualUpdateOne) SetArtifactB added in v0.5.0

func (heuo *HashEqualUpdateOne) SetArtifactB(a *Artifact) *HashEqualUpdateOne

SetArtifactB sets the "artifact_b" edge to the Artifact entity.

func (*HashEqualUpdateOne) SetArtifactBID added in v0.5.0

func (heuo *HashEqualUpdateOne) SetArtifactBID(id uuid.UUID) *HashEqualUpdateOne

SetArtifactBID sets the "artifact_b" edge to the Artifact entity by ID.

func (*HashEqualUpdateOne) SetArtifactsHash added in v0.5.0

func (heuo *HashEqualUpdateOne) SetArtifactsHash(s string) *HashEqualUpdateOne

SetArtifactsHash sets the "artifacts_hash" field.

func (*HashEqualUpdateOne) SetCollector

func (heuo *HashEqualUpdateOne) SetCollector(s string) *HashEqualUpdateOne

SetCollector sets the "collector" field.

func (*HashEqualUpdateOne) SetDocumentRef added in v0.6.0

func (heuo *HashEqualUpdateOne) SetDocumentRef(s string) *HashEqualUpdateOne

SetDocumentRef sets the "document_ref" field.

func (*HashEqualUpdateOne) SetEqualArtID added in v0.5.0

func (heuo *HashEqualUpdateOne) SetEqualArtID(u uuid.UUID) *HashEqualUpdateOne

SetEqualArtID sets the "equal_art_id" field.

func (*HashEqualUpdateOne) SetJustification

func (heuo *HashEqualUpdateOne) SetJustification(s string) *HashEqualUpdateOne

SetJustification sets the "justification" field.

func (*HashEqualUpdateOne) SetNillableArtID added in v0.5.0

func (heuo *HashEqualUpdateOne) SetNillableArtID(u *uuid.UUID) *HashEqualUpdateOne

SetNillableArtID sets the "art_id" field if the given value is not nil.

func (*HashEqualUpdateOne) SetNillableArtifactsHash added in v0.5.0

func (heuo *HashEqualUpdateOne) SetNillableArtifactsHash(s *string) *HashEqualUpdateOne

SetNillableArtifactsHash sets the "artifacts_hash" field if the given value is not nil.

func (*HashEqualUpdateOne) SetNillableCollector added in v0.4.0

func (heuo *HashEqualUpdateOne) SetNillableCollector(s *string) *HashEqualUpdateOne

SetNillableCollector sets the "collector" field if the given value is not nil.

func (*HashEqualUpdateOne) SetNillableDocumentRef added in v0.6.0

func (heuo *HashEqualUpdateOne) SetNillableDocumentRef(s *string) *HashEqualUpdateOne

SetNillableDocumentRef sets the "document_ref" field if the given value is not nil.

func (*HashEqualUpdateOne) SetNillableEqualArtID added in v0.5.0

func (heuo *HashEqualUpdateOne) SetNillableEqualArtID(u *uuid.UUID) *HashEqualUpdateOne

SetNillableEqualArtID sets the "equal_art_id" field if the given value is not nil.

func (*HashEqualUpdateOne) SetNillableJustification added in v0.4.0

func (heuo *HashEqualUpdateOne) SetNillableJustification(s *string) *HashEqualUpdateOne

SetNillableJustification sets the "justification" field if the given value is not nil.

func (*HashEqualUpdateOne) SetNillableOrigin added in v0.4.0

func (heuo *HashEqualUpdateOne) SetNillableOrigin(s *string) *HashEqualUpdateOne

SetNillableOrigin sets the "origin" field if the given value is not nil.

func (*HashEqualUpdateOne) SetOrigin

func (heuo *HashEqualUpdateOne) SetOrigin(s string) *HashEqualUpdateOne

SetOrigin sets the "origin" field.

func (*HashEqualUpdateOne) Where

Where appends a list predicates to the HashEqualUpdate builder.

type HashEqualUpsert

type HashEqualUpsert struct {
	*sql.UpdateSet
}

HashEqualUpsert is the "OnConflict" setter.

func (*HashEqualUpsert) SetArtID added in v0.5.0

func (u *HashEqualUpsert) SetArtID(v uuid.UUID) *HashEqualUpsert

SetArtID sets the "art_id" field.

func (*HashEqualUpsert) SetArtifactsHash added in v0.5.0

func (u *HashEqualUpsert) SetArtifactsHash(v string) *HashEqualUpsert

SetArtifactsHash sets the "artifacts_hash" field.

func (*HashEqualUpsert) SetCollector

func (u *HashEqualUpsert) SetCollector(v string) *HashEqualUpsert

SetCollector sets the "collector" field.

func (*HashEqualUpsert) SetDocumentRef added in v0.6.0

func (u *HashEqualUpsert) SetDocumentRef(v string) *HashEqualUpsert

SetDocumentRef sets the "document_ref" field.

func (*HashEqualUpsert) SetEqualArtID added in v0.5.0

func (u *HashEqualUpsert) SetEqualArtID(v uuid.UUID) *HashEqualUpsert

SetEqualArtID sets the "equal_art_id" field.

func (*HashEqualUpsert) SetJustification

func (u *HashEqualUpsert) SetJustification(v string) *HashEqualUpsert

SetJustification sets the "justification" field.

func (*HashEqualUpsert) SetOrigin

func (u *HashEqualUpsert) SetOrigin(v string) *HashEqualUpsert

SetOrigin sets the "origin" field.

func (*HashEqualUpsert) UpdateArtID added in v0.5.0

func (u *HashEqualUpsert) UpdateArtID() *HashEqualUpsert

UpdateArtID sets the "art_id" field to the value that was provided on create.

func (*HashEqualUpsert) UpdateArtifactsHash added in v0.5.0

func (u *HashEqualUpsert) UpdateArtifactsHash() *HashEqualUpsert

UpdateArtifactsHash sets the "artifacts_hash" field to the value that was provided on create.

func (*HashEqualUpsert) UpdateCollector

func (u *HashEqualUpsert) UpdateCollector() *HashEqualUpsert

UpdateCollector sets the "collector" field to the value that was provided on create.

func (*HashEqualUpsert) UpdateDocumentRef added in v0.6.0

func (u *HashEqualUpsert) UpdateDocumentRef() *HashEqualUpsert

UpdateDocumentRef sets the "document_ref" field to the value that was provided on create.

func (*HashEqualUpsert) UpdateEqualArtID added in v0.5.0

func (u *HashEqualUpsert) UpdateEqualArtID() *HashEqualUpsert

UpdateEqualArtID sets the "equal_art_id" field to the value that was provided on create.

func (*HashEqualUpsert) UpdateJustification

func (u *HashEqualUpsert) UpdateJustification() *HashEqualUpsert

UpdateJustification sets the "justification" field to the value that was provided on create.

func (*HashEqualUpsert) UpdateOrigin

func (u *HashEqualUpsert) UpdateOrigin() *HashEqualUpsert

UpdateOrigin sets the "origin" field to the value that was provided on create.

type HashEqualUpsertBulk

type HashEqualUpsertBulk struct {
	// contains filtered or unexported fields
}

HashEqualUpsertBulk is the builder for "upsert"-ing a bulk of HashEqual nodes.

func (*HashEqualUpsertBulk) DoNothing

func (u *HashEqualUpsertBulk) DoNothing() *HashEqualUpsertBulk

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*HashEqualUpsertBulk) Exec

Exec executes the query.

func (*HashEqualUpsertBulk) ExecX

func (u *HashEqualUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*HashEqualUpsertBulk) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.HashEqual.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*HashEqualUpsertBulk) SetArtID added in v0.5.0

SetArtID sets the "art_id" field.

func (*HashEqualUpsertBulk) SetArtifactsHash added in v0.5.0

func (u *HashEqualUpsertBulk) SetArtifactsHash(v string) *HashEqualUpsertBulk

SetArtifactsHash sets the "artifacts_hash" field.

func (*HashEqualUpsertBulk) SetCollector

func (u *HashEqualUpsertBulk) SetCollector(v string) *HashEqualUpsertBulk

SetCollector sets the "collector" field.

func (*HashEqualUpsertBulk) SetDocumentRef added in v0.6.0

func (u *HashEqualUpsertBulk) SetDocumentRef(v string) *HashEqualUpsertBulk

SetDocumentRef sets the "document_ref" field.

func (*HashEqualUpsertBulk) SetEqualArtID added in v0.5.0

func (u *HashEqualUpsertBulk) SetEqualArtID(v uuid.UUID) *HashEqualUpsertBulk

SetEqualArtID sets the "equal_art_id" field.

func (*HashEqualUpsertBulk) SetJustification

func (u *HashEqualUpsertBulk) SetJustification(v string) *HashEqualUpsertBulk

SetJustification sets the "justification" field.

func (*HashEqualUpsertBulk) SetOrigin

SetOrigin sets the "origin" field.

func (*HashEqualUpsertBulk) Update

Update allows overriding fields `UPDATE` values. See the HashEqualCreateBulk.OnConflict documentation for more info.

func (*HashEqualUpsertBulk) UpdateArtID added in v0.5.0

func (u *HashEqualUpsertBulk) UpdateArtID() *HashEqualUpsertBulk

UpdateArtID sets the "art_id" field to the value that was provided on create.

func (*HashEqualUpsertBulk) UpdateArtifactsHash added in v0.5.0

func (u *HashEqualUpsertBulk) UpdateArtifactsHash() *HashEqualUpsertBulk

UpdateArtifactsHash sets the "artifacts_hash" field to the value that was provided on create.

func (*HashEqualUpsertBulk) UpdateCollector

func (u *HashEqualUpsertBulk) UpdateCollector() *HashEqualUpsertBulk

UpdateCollector sets the "collector" field to the value that was provided on create.

func (*HashEqualUpsertBulk) UpdateDocumentRef added in v0.6.0

func (u *HashEqualUpsertBulk) UpdateDocumentRef() *HashEqualUpsertBulk

UpdateDocumentRef sets the "document_ref" field to the value that was provided on create.

func (*HashEqualUpsertBulk) UpdateEqualArtID added in v0.5.0

func (u *HashEqualUpsertBulk) UpdateEqualArtID() *HashEqualUpsertBulk

UpdateEqualArtID sets the "equal_art_id" field to the value that was provided on create.

func (*HashEqualUpsertBulk) UpdateJustification

func (u *HashEqualUpsertBulk) UpdateJustification() *HashEqualUpsertBulk

UpdateJustification sets the "justification" field to the value that was provided on create.

func (*HashEqualUpsertBulk) UpdateNewValues

func (u *HashEqualUpsertBulk) UpdateNewValues() *HashEqualUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.HashEqual.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(hashequal.FieldID)
		}),
	).
	Exec(ctx)

func (*HashEqualUpsertBulk) UpdateOrigin

func (u *HashEqualUpsertBulk) UpdateOrigin() *HashEqualUpsertBulk

UpdateOrigin sets the "origin" field to the value that was provided on create.

type HashEqualUpsertOne

type HashEqualUpsertOne struct {
	// contains filtered or unexported fields
}

HashEqualUpsertOne is the builder for "upsert"-ing

one HashEqual node.

func (*HashEqualUpsertOne) DoNothing

func (u *HashEqualUpsertOne) DoNothing() *HashEqualUpsertOne

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*HashEqualUpsertOne) Exec

func (u *HashEqualUpsertOne) Exec(ctx context.Context) error

Exec executes the query.

func (*HashEqualUpsertOne) ExecX

func (u *HashEqualUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*HashEqualUpsertOne) ID

func (u *HashEqualUpsertOne) ID(ctx context.Context) (id uuid.UUID, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*HashEqualUpsertOne) IDX

IDX is like ID, but panics if an error occurs.

func (*HashEqualUpsertOne) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.HashEqual.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*HashEqualUpsertOne) SetArtID added in v0.5.0

SetArtID sets the "art_id" field.

func (*HashEqualUpsertOne) SetArtifactsHash added in v0.5.0

func (u *HashEqualUpsertOne) SetArtifactsHash(v string) *HashEqualUpsertOne

SetArtifactsHash sets the "artifacts_hash" field.

func (*HashEqualUpsertOne) SetCollector

func (u *HashEqualUpsertOne) SetCollector(v string) *HashEqualUpsertOne

SetCollector sets the "collector" field.

func (*HashEqualUpsertOne) SetDocumentRef added in v0.6.0

func (u *HashEqualUpsertOne) SetDocumentRef(v string) *HashEqualUpsertOne

SetDocumentRef sets the "document_ref" field.

func (*HashEqualUpsertOne) SetEqualArtID added in v0.5.0

func (u *HashEqualUpsertOne) SetEqualArtID(v uuid.UUID) *HashEqualUpsertOne

SetEqualArtID sets the "equal_art_id" field.

func (*HashEqualUpsertOne) SetJustification

func (u *HashEqualUpsertOne) SetJustification(v string) *HashEqualUpsertOne

SetJustification sets the "justification" field.

func (*HashEqualUpsertOne) SetOrigin

func (u *HashEqualUpsertOne) SetOrigin(v string) *HashEqualUpsertOne

SetOrigin sets the "origin" field.

func (*HashEqualUpsertOne) Update

func (u *HashEqualUpsertOne) Update(set func(*HashEqualUpsert)) *HashEqualUpsertOne

Update allows overriding fields `UPDATE` values. See the HashEqualCreate.OnConflict documentation for more info.

func (*HashEqualUpsertOne) UpdateArtID added in v0.5.0

func (u *HashEqualUpsertOne) UpdateArtID() *HashEqualUpsertOne

UpdateArtID sets the "art_id" field to the value that was provided on create.

func (*HashEqualUpsertOne) UpdateArtifactsHash added in v0.5.0

func (u *HashEqualUpsertOne) UpdateArtifactsHash() *HashEqualUpsertOne

UpdateArtifactsHash sets the "artifacts_hash" field to the value that was provided on create.

func (*HashEqualUpsertOne) UpdateCollector

func (u *HashEqualUpsertOne) UpdateCollector() *HashEqualUpsertOne

UpdateCollector sets the "collector" field to the value that was provided on create.

func (*HashEqualUpsertOne) UpdateDocumentRef added in v0.6.0

func (u *HashEqualUpsertOne) UpdateDocumentRef() *HashEqualUpsertOne

UpdateDocumentRef sets the "document_ref" field to the value that was provided on create.

func (*HashEqualUpsertOne) UpdateEqualArtID added in v0.5.0

func (u *HashEqualUpsertOne) UpdateEqualArtID() *HashEqualUpsertOne

UpdateEqualArtID sets the "equal_art_id" field to the value that was provided on create.

func (*HashEqualUpsertOne) UpdateJustification

func (u *HashEqualUpsertOne) UpdateJustification() *HashEqualUpsertOne

UpdateJustification sets the "justification" field to the value that was provided on create.

func (*HashEqualUpsertOne) UpdateNewValues

func (u *HashEqualUpsertOne) UpdateNewValues() *HashEqualUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:

client.HashEqual.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(hashequal.FieldID)
		}),
	).
	Exec(ctx)

func (*HashEqualUpsertOne) UpdateOrigin

func (u *HashEqualUpsertOne) UpdateOrigin() *HashEqualUpsertOne

UpdateOrigin sets the "origin" field to the value that was provided on create.

type HashEquals

type HashEquals []*HashEqual

HashEquals is a parsable slice of HashEqual.

type Hook

type Hook = ent.Hook

ent aliases to avoid import conflicts in user's code.

type InterceptFunc

type InterceptFunc = ent.InterceptFunc

ent aliases to avoid import conflicts in user's code.

type Interceptor

type Interceptor = ent.Interceptor

ent aliases to avoid import conflicts in user's code.

type License

type License struct {

	// ID of the ent.
	ID uuid.UUID `json:"id,omitempty"`
	// Name holds the value of the "name" field.
	Name string `json:"name,omitempty"`
	// Inline holds the value of the "inline" field.
	Inline string `json:"inline,omitempty"`
	// ListVersion holds the value of the "list_version" field.
	ListVersion string `json:"list_version,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the LicenseQuery when eager-loading is set.
	Edges LicenseEdges `json:"edges"`
	// contains filtered or unexported fields
}

License is the model entity for the License schema.

func (*License) DeclaredInCertifyLegals

func (l *License) DeclaredInCertifyLegals(ctx context.Context) (result []*CertifyLegal, err error)

func (*License) DiscoveredInCertifyLegals

func (l *License) DiscoveredInCertifyLegals(ctx context.Context) (result []*CertifyLegal, err error)

func (*License) IsNode

func (n *License) IsNode()

IsNode implements the Node interface check for GQLGen.

func (*License) NamedDeclaredInCertifyLegals

func (l *License) NamedDeclaredInCertifyLegals(name string) ([]*CertifyLegal, error)

NamedDeclaredInCertifyLegals returns the DeclaredInCertifyLegals named value or an error if the edge was not loaded in eager-loading with this name.

func (*License) NamedDiscoveredInCertifyLegals

func (l *License) NamedDiscoveredInCertifyLegals(name string) ([]*CertifyLegal, error)

NamedDiscoveredInCertifyLegals returns the DiscoveredInCertifyLegals named value or an error if the edge was not loaded in eager-loading with this name.

func (*License) QueryDeclaredInCertifyLegals

func (l *License) QueryDeclaredInCertifyLegals() *CertifyLegalQuery

QueryDeclaredInCertifyLegals queries the "declared_in_certify_legals" edge of the License entity.

func (*License) QueryDiscoveredInCertifyLegals

func (l *License) QueryDiscoveredInCertifyLegals() *CertifyLegalQuery

QueryDiscoveredInCertifyLegals queries the "discovered_in_certify_legals" edge of the License entity.

func (*License) String

func (l *License) String() string

String implements the fmt.Stringer.

func (*License) ToEdge

func (l *License) ToEdge(order *LicenseOrder) *LicenseEdge

ToEdge converts License into LicenseEdge.

func (*License) Unwrap

func (l *License) Unwrap() *License

Unwrap unwraps the License entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.

func (*License) Update

func (l *License) Update() *LicenseUpdateOne

Update returns a builder for updating this License. Note that you need to call License.Unwrap() before calling this method if this License was returned from a transaction, and the transaction was committed or rolled back.

func (*License) Value

func (l *License) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the License. This includes values selected through modifiers, order, etc.

type LicenseClient

type LicenseClient struct {
	// contains filtered or unexported fields
}

LicenseClient is a client for the License schema.

func NewLicenseClient

func NewLicenseClient(c config) *LicenseClient

NewLicenseClient returns a client for the License from the given config.

func (*LicenseClient) Create

func (c *LicenseClient) Create() *LicenseCreate

Create returns a builder for creating a License entity.

func (*LicenseClient) CreateBulk

func (c *LicenseClient) CreateBulk(builders ...*LicenseCreate) *LicenseCreateBulk

CreateBulk returns a builder for creating a bulk of License entities.

func (*LicenseClient) Delete

func (c *LicenseClient) Delete() *LicenseDelete

Delete returns a delete builder for License.

func (*LicenseClient) DeleteOne

func (c *LicenseClient) DeleteOne(l *License) *LicenseDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*LicenseClient) DeleteOneID

func (c *LicenseClient) DeleteOneID(id uuid.UUID) *LicenseDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*LicenseClient) Get

func (c *LicenseClient) Get(ctx context.Context, id uuid.UUID) (*License, error)

Get returns a License entity by its id.

func (*LicenseClient) GetX

func (c *LicenseClient) GetX(ctx context.Context, id uuid.UUID) *License

GetX is like Get, but panics if an error occurs.

func (*LicenseClient) Hooks

func (c *LicenseClient) Hooks() []Hook

Hooks returns the client hooks.

func (*LicenseClient) Intercept

func (c *LicenseClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `license.Intercept(f(g(h())))`.

func (*LicenseClient) Interceptors

func (c *LicenseClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*LicenseClient) MapCreateBulk

func (c *LicenseClient) MapCreateBulk(slice any, setFunc func(*LicenseCreate, int)) *LicenseCreateBulk

MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.

func (*LicenseClient) Query

func (c *LicenseClient) Query() *LicenseQuery

Query returns a query builder for License.

func (*LicenseClient) QueryDeclaredInCertifyLegals

func (c *LicenseClient) QueryDeclaredInCertifyLegals(l *License) *CertifyLegalQuery

QueryDeclaredInCertifyLegals queries the declared_in_certify_legals edge of a License.

func (*LicenseClient) QueryDiscoveredInCertifyLegals

func (c *LicenseClient) QueryDiscoveredInCertifyLegals(l *License) *CertifyLegalQuery

QueryDiscoveredInCertifyLegals queries the discovered_in_certify_legals edge of a License.

func (*LicenseClient) Update

func (c *LicenseClient) Update() *LicenseUpdate

Update returns an update builder for License.

func (*LicenseClient) UpdateOne

func (c *LicenseClient) UpdateOne(l *License) *LicenseUpdateOne

UpdateOne returns an update builder for the given entity.

func (*LicenseClient) UpdateOneID

func (c *LicenseClient) UpdateOneID(id uuid.UUID) *LicenseUpdateOne

UpdateOneID returns an update builder for the given id.

func (*LicenseClient) Use

func (c *LicenseClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `license.Hooks(f(g(h())))`.

type LicenseConnection

type LicenseConnection struct {
	Edges      []*LicenseEdge `json:"edges"`
	PageInfo   PageInfo       `json:"pageInfo"`
	TotalCount int            `json:"totalCount"`
}

LicenseConnection is the connection containing edges to License.

type LicenseCreate

type LicenseCreate struct {
	// contains filtered or unexported fields
}

LicenseCreate is the builder for creating a License entity.

func (*LicenseCreate) AddDeclaredInCertifyLegalIDs

func (lc *LicenseCreate) AddDeclaredInCertifyLegalIDs(ids ...uuid.UUID) *LicenseCreate

AddDeclaredInCertifyLegalIDs adds the "declared_in_certify_legals" edge to the CertifyLegal entity by IDs.

func (*LicenseCreate) AddDeclaredInCertifyLegals

func (lc *LicenseCreate) AddDeclaredInCertifyLegals(c ...*CertifyLegal) *LicenseCreate

AddDeclaredInCertifyLegals adds the "declared_in_certify_legals" edges to the CertifyLegal entity.

func (*LicenseCreate) AddDiscoveredInCertifyLegalIDs

func (lc *LicenseCreate) AddDiscoveredInCertifyLegalIDs(ids ...uuid.UUID) *LicenseCreate

AddDiscoveredInCertifyLegalIDs adds the "discovered_in_certify_legals" edge to the CertifyLegal entity by IDs.

func (*LicenseCreate) AddDiscoveredInCertifyLegals

func (lc *LicenseCreate) AddDiscoveredInCertifyLegals(c ...*CertifyLegal) *LicenseCreate

AddDiscoveredInCertifyLegals adds the "discovered_in_certify_legals" edges to the CertifyLegal entity.

func (*LicenseCreate) Exec

func (lc *LicenseCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*LicenseCreate) ExecX

func (lc *LicenseCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*LicenseCreate) Mutation

func (lc *LicenseCreate) Mutation() *LicenseMutation

Mutation returns the LicenseMutation object of the builder.

func (*LicenseCreate) OnConflict

func (lc *LicenseCreate) OnConflict(opts ...sql.ConflictOption) *LicenseUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.License.Create().
	SetName(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.LicenseUpsert) {
		SetName(v+v).
	}).
	Exec(ctx)

func (*LicenseCreate) OnConflictColumns

func (lc *LicenseCreate) OnConflictColumns(columns ...string) *LicenseUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.License.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*LicenseCreate) Save

func (lc *LicenseCreate) Save(ctx context.Context) (*License, error)

Save creates the License in the database.

func (*LicenseCreate) SaveX

func (lc *LicenseCreate) SaveX(ctx context.Context) *License

SaveX calls Save and panics if Save returns an error.

func (*LicenseCreate) SetID added in v0.5.0

func (lc *LicenseCreate) SetID(u uuid.UUID) *LicenseCreate

SetID sets the "id" field.

func (*LicenseCreate) SetInline

func (lc *LicenseCreate) SetInline(s string) *LicenseCreate

SetInline sets the "inline" field.

func (*LicenseCreate) SetListVersion

func (lc *LicenseCreate) SetListVersion(s string) *LicenseCreate

SetListVersion sets the "list_version" field.

func (*LicenseCreate) SetName

func (lc *LicenseCreate) SetName(s string) *LicenseCreate

SetName sets the "name" field.

func (*LicenseCreate) SetNillableID added in v0.5.0

func (lc *LicenseCreate) SetNillableID(u *uuid.UUID) *LicenseCreate

SetNillableID sets the "id" field if the given value is not nil.

func (*LicenseCreate) SetNillableInline

func (lc *LicenseCreate) SetNillableInline(s *string) *LicenseCreate

SetNillableInline sets the "inline" field if the given value is not nil.

func (*LicenseCreate) SetNillableListVersion

func (lc *LicenseCreate) SetNillableListVersion(s *string) *LicenseCreate

SetNillableListVersion sets the "list_version" field if the given value is not nil.

type LicenseCreateBulk

type LicenseCreateBulk struct {
	// contains filtered or unexported fields
}

LicenseCreateBulk is the builder for creating many License entities in bulk.

func (*LicenseCreateBulk) Exec

func (lcb *LicenseCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*LicenseCreateBulk) ExecX

func (lcb *LicenseCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*LicenseCreateBulk) OnConflict

func (lcb *LicenseCreateBulk) OnConflict(opts ...sql.ConflictOption) *LicenseUpsertBulk

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.License.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.LicenseUpsert) {
		SetName(v+v).
	}).
	Exec(ctx)

func (*LicenseCreateBulk) OnConflictColumns

func (lcb *LicenseCreateBulk) OnConflictColumns(columns ...string) *LicenseUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.License.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*LicenseCreateBulk) Save

func (lcb *LicenseCreateBulk) Save(ctx context.Context) ([]*License, error)

Save creates the License entities in the database.

func (*LicenseCreateBulk) SaveX

func (lcb *LicenseCreateBulk) SaveX(ctx context.Context) []*License

SaveX is like Save, but panics if an error occurs.

type LicenseDelete

type LicenseDelete struct {
	// contains filtered or unexported fields
}

LicenseDelete is the builder for deleting a License entity.

func (*LicenseDelete) Exec

func (ld *LicenseDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*LicenseDelete) ExecX

func (ld *LicenseDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*LicenseDelete) Where

func (ld *LicenseDelete) Where(ps ...predicate.License) *LicenseDelete

Where appends a list predicates to the LicenseDelete builder.

type LicenseDeleteOne

type LicenseDeleteOne struct {
	// contains filtered or unexported fields
}

LicenseDeleteOne is the builder for deleting a single License entity.

func (*LicenseDeleteOne) Exec

func (ldo *LicenseDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*LicenseDeleteOne) ExecX

func (ldo *LicenseDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*LicenseDeleteOne) Where

Where appends a list predicates to the LicenseDelete builder.

type LicenseEdge

type LicenseEdge struct {
	Node   *License `json:"node"`
	Cursor Cursor   `json:"cursor"`
}

LicenseEdge is the edge representation of License.

type LicenseEdges

type LicenseEdges struct {
	// DeclaredInCertifyLegals holds the value of the declared_in_certify_legals edge.
	DeclaredInCertifyLegals []*CertifyLegal `json:"declared_in_certify_legals,omitempty"`
	// DiscoveredInCertifyLegals holds the value of the discovered_in_certify_legals edge.
	DiscoveredInCertifyLegals []*CertifyLegal `json:"discovered_in_certify_legals,omitempty"`
	// contains filtered or unexported fields
}

LicenseEdges holds the relations/edges for other nodes in the graph.

func (LicenseEdges) DeclaredInCertifyLegalsOrErr

func (e LicenseEdges) DeclaredInCertifyLegalsOrErr() ([]*CertifyLegal, error)

DeclaredInCertifyLegalsOrErr returns the DeclaredInCertifyLegals value or an error if the edge was not loaded in eager-loading.

func (LicenseEdges) DiscoveredInCertifyLegalsOrErr

func (e LicenseEdges) DiscoveredInCertifyLegalsOrErr() ([]*CertifyLegal, error)

DiscoveredInCertifyLegalsOrErr returns the DiscoveredInCertifyLegals value or an error if the edge was not loaded in eager-loading.

type LicenseGroupBy

type LicenseGroupBy struct {
	// contains filtered or unexported fields
}

LicenseGroupBy is the group-by builder for License entities.

func (*LicenseGroupBy) Aggregate

func (lgb *LicenseGroupBy) Aggregate(fns ...AggregateFunc) *LicenseGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*LicenseGroupBy) Bool

func (s *LicenseGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*LicenseGroupBy) BoolX

func (s *LicenseGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*LicenseGroupBy) Bools

func (s *LicenseGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*LicenseGroupBy) BoolsX

func (s *LicenseGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*LicenseGroupBy) Float64

func (s *LicenseGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*LicenseGroupBy) Float64X

func (s *LicenseGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*LicenseGroupBy) Float64s

func (s *LicenseGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*LicenseGroupBy) Float64sX

func (s *LicenseGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*LicenseGroupBy) Int

func (s *LicenseGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*LicenseGroupBy) IntX

func (s *LicenseGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*LicenseGroupBy) Ints

func (s *LicenseGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*LicenseGroupBy) IntsX

func (s *LicenseGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*LicenseGroupBy) Scan

func (lgb *LicenseGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*LicenseGroupBy) ScanX

func (s *LicenseGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*LicenseGroupBy) String

func (s *LicenseGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*LicenseGroupBy) StringX

func (s *LicenseGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*LicenseGroupBy) Strings

func (s *LicenseGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*LicenseGroupBy) StringsX

func (s *LicenseGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type LicenseMutation

type LicenseMutation struct {
	// contains filtered or unexported fields
}

LicenseMutation represents an operation that mutates the License nodes in the graph.

func (*LicenseMutation) AddDeclaredInCertifyLegalIDs

func (m *LicenseMutation) AddDeclaredInCertifyLegalIDs(ids ...uuid.UUID)

AddDeclaredInCertifyLegalIDs adds the "declared_in_certify_legals" edge to the CertifyLegal entity by ids.

func (*LicenseMutation) AddDiscoveredInCertifyLegalIDs

func (m *LicenseMutation) AddDiscoveredInCertifyLegalIDs(ids ...uuid.UUID)

AddDiscoveredInCertifyLegalIDs adds the "discovered_in_certify_legals" edge to the CertifyLegal entity by ids.

func (*LicenseMutation) AddField

func (m *LicenseMutation) AddField(name string, value ent.Value) error

AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*LicenseMutation) AddedEdges

func (m *LicenseMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*LicenseMutation) AddedField

func (m *LicenseMutation) AddedField(name string) (ent.Value, bool)

AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*LicenseMutation) AddedFields

func (m *LicenseMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*LicenseMutation) AddedIDs

func (m *LicenseMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*LicenseMutation) ClearDeclaredInCertifyLegals

func (m *LicenseMutation) ClearDeclaredInCertifyLegals()

ClearDeclaredInCertifyLegals clears the "declared_in_certify_legals" edge to the CertifyLegal entity.

func (*LicenseMutation) ClearDiscoveredInCertifyLegals

func (m *LicenseMutation) ClearDiscoveredInCertifyLegals()

ClearDiscoveredInCertifyLegals clears the "discovered_in_certify_legals" edge to the CertifyLegal entity.

func (*LicenseMutation) ClearEdge

func (m *LicenseMutation) ClearEdge(name string) error

ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.

func (*LicenseMutation) ClearField

func (m *LicenseMutation) ClearField(name string) error

ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.

func (*LicenseMutation) ClearInline

func (m *LicenseMutation) ClearInline()

ClearInline clears the value of the "inline" field.

func (*LicenseMutation) ClearListVersion

func (m *LicenseMutation) ClearListVersion()

ClearListVersion clears the value of the "list_version" field.

func (*LicenseMutation) ClearedEdges

func (m *LicenseMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*LicenseMutation) ClearedFields

func (m *LicenseMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (LicenseMutation) Client

func (m LicenseMutation) Client() *Client

Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.

func (*LicenseMutation) DeclaredInCertifyLegalsCleared

func (m *LicenseMutation) DeclaredInCertifyLegalsCleared() bool

DeclaredInCertifyLegalsCleared reports if the "declared_in_certify_legals" edge to the CertifyLegal entity was cleared.

func (*LicenseMutation) DeclaredInCertifyLegalsIDs

func (m *LicenseMutation) DeclaredInCertifyLegalsIDs() (ids []uuid.UUID)

DeclaredInCertifyLegalsIDs returns the "declared_in_certify_legals" edge IDs in the mutation.

func (*LicenseMutation) DiscoveredInCertifyLegalsCleared

func (m *LicenseMutation) DiscoveredInCertifyLegalsCleared() bool

DiscoveredInCertifyLegalsCleared reports if the "discovered_in_certify_legals" edge to the CertifyLegal entity was cleared.

func (*LicenseMutation) DiscoveredInCertifyLegalsIDs

func (m *LicenseMutation) DiscoveredInCertifyLegalsIDs() (ids []uuid.UUID)

DiscoveredInCertifyLegalsIDs returns the "discovered_in_certify_legals" edge IDs in the mutation.

func (*LicenseMutation) EdgeCleared

func (m *LicenseMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*LicenseMutation) Field

func (m *LicenseMutation) Field(name string) (ent.Value, bool)

Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*LicenseMutation) FieldCleared

func (m *LicenseMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*LicenseMutation) Fields

func (m *LicenseMutation) Fields() []string

Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().

func (*LicenseMutation) ID

func (m *LicenseMutation) ID() (id uuid.UUID, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*LicenseMutation) IDs

func (m *LicenseMutation) IDs(ctx context.Context) ([]uuid.UUID, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*LicenseMutation) Inline

func (m *LicenseMutation) Inline() (r string, exists bool)

Inline returns the value of the "inline" field in the mutation.

func (*LicenseMutation) InlineCleared

func (m *LicenseMutation) InlineCleared() bool

InlineCleared returns if the "inline" field was cleared in this mutation.

func (*LicenseMutation) ListVersion

func (m *LicenseMutation) ListVersion() (r string, exists bool)

ListVersion returns the value of the "list_version" field in the mutation.

func (*LicenseMutation) ListVersionCleared

func (m *LicenseMutation) ListVersionCleared() bool

ListVersionCleared returns if the "list_version" field was cleared in this mutation.

func (*LicenseMutation) Name

func (m *LicenseMutation) Name() (r string, exists bool)

Name returns the value of the "name" field in the mutation.

func (*LicenseMutation) OldField

func (m *LicenseMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*LicenseMutation) OldInline

func (m *LicenseMutation) OldInline(ctx context.Context) (v string, err error)

OldInline returns the old "inline" field's value of the License entity. If the License object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*LicenseMutation) OldListVersion

func (m *LicenseMutation) OldListVersion(ctx context.Context) (v string, err error)

OldListVersion returns the old "list_version" field's value of the License entity. If the License object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*LicenseMutation) OldName

func (m *LicenseMutation) OldName(ctx context.Context) (v string, err error)

OldName returns the old "name" field's value of the License entity. If the License object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*LicenseMutation) Op

func (m *LicenseMutation) Op() Op

Op returns the operation name.

func (*LicenseMutation) RemoveDeclaredInCertifyLegalIDs

func (m *LicenseMutation) RemoveDeclaredInCertifyLegalIDs(ids ...uuid.UUID)

RemoveDeclaredInCertifyLegalIDs removes the "declared_in_certify_legals" edge to the CertifyLegal entity by IDs.

func (*LicenseMutation) RemoveDiscoveredInCertifyLegalIDs

func (m *LicenseMutation) RemoveDiscoveredInCertifyLegalIDs(ids ...uuid.UUID)

RemoveDiscoveredInCertifyLegalIDs removes the "discovered_in_certify_legals" edge to the CertifyLegal entity by IDs.

func (*LicenseMutation) RemovedDeclaredInCertifyLegalsIDs

func (m *LicenseMutation) RemovedDeclaredInCertifyLegalsIDs() (ids []uuid.UUID)

RemovedDeclaredInCertifyLegals returns the removed IDs of the "declared_in_certify_legals" edge to the CertifyLegal entity.

func (*LicenseMutation) RemovedDiscoveredInCertifyLegalsIDs

func (m *LicenseMutation) RemovedDiscoveredInCertifyLegalsIDs() (ids []uuid.UUID)

RemovedDiscoveredInCertifyLegals returns the removed IDs of the "discovered_in_certify_legals" edge to the CertifyLegal entity.

func (*LicenseMutation) RemovedEdges

func (m *LicenseMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*LicenseMutation) RemovedIDs

func (m *LicenseMutation) RemovedIDs(name string) []ent.Value

RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.

func (*LicenseMutation) ResetDeclaredInCertifyLegals

func (m *LicenseMutation) ResetDeclaredInCertifyLegals()

ResetDeclaredInCertifyLegals resets all changes to the "declared_in_certify_legals" edge.

func (*LicenseMutation) ResetDiscoveredInCertifyLegals

func (m *LicenseMutation) ResetDiscoveredInCertifyLegals()

ResetDiscoveredInCertifyLegals resets all changes to the "discovered_in_certify_legals" edge.

func (*LicenseMutation) ResetEdge

func (m *LicenseMutation) ResetEdge(name string) error

ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.

func (*LicenseMutation) ResetField

func (m *LicenseMutation) ResetField(name string) error

ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.

func (*LicenseMutation) ResetInline

func (m *LicenseMutation) ResetInline()

ResetInline resets all changes to the "inline" field.

func (*LicenseMutation) ResetListVersion

func (m *LicenseMutation) ResetListVersion()

ResetListVersion resets all changes to the "list_version" field.

func (*LicenseMutation) ResetName

func (m *LicenseMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*LicenseMutation) SetField

func (m *LicenseMutation) SetField(name string, value ent.Value) error

SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*LicenseMutation) SetID added in v0.5.0

func (m *LicenseMutation) SetID(id uuid.UUID)

SetID sets the value of the id field. Note that this operation is only accepted on creation of License entities.

func (*LicenseMutation) SetInline

func (m *LicenseMutation) SetInline(s string)

SetInline sets the "inline" field.

func (*LicenseMutation) SetListVersion

func (m *LicenseMutation) SetListVersion(s string)

SetListVersion sets the "list_version" field.

func (*LicenseMutation) SetName

func (m *LicenseMutation) SetName(s string)

SetName sets the "name" field.

func (*LicenseMutation) SetOp

func (m *LicenseMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (LicenseMutation) Tx

func (m LicenseMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*LicenseMutation) Type

func (m *LicenseMutation) Type() string

Type returns the node type of this mutation (License).

func (*LicenseMutation) Where

func (m *LicenseMutation) Where(ps ...predicate.License)

Where appends a list predicates to the LicenseMutation builder.

func (*LicenseMutation) WhereP

func (m *LicenseMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the LicenseMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type LicenseOrder

type LicenseOrder struct {
	Direction OrderDirection     `json:"direction"`
	Field     *LicenseOrderField `json:"field"`
}

LicenseOrder defines the ordering of License.

type LicenseOrderField

type LicenseOrderField struct {
	// Value extracts the ordering value from the given License.
	Value func(*License) (ent.Value, error)
	// contains filtered or unexported fields
}

LicenseOrderField defines the ordering field of License.

type LicensePaginateOption

type LicensePaginateOption func(*licensePager) error

LicensePaginateOption enables pagination customization.

func WithLicenseFilter

func WithLicenseFilter(filter func(*LicenseQuery) (*LicenseQuery, error)) LicensePaginateOption

WithLicenseFilter configures pagination filter.

func WithLicenseOrder

func WithLicenseOrder(order *LicenseOrder) LicensePaginateOption

WithLicenseOrder configures pagination ordering.

type LicenseQuery

type LicenseQuery struct {
	// contains filtered or unexported fields
}

LicenseQuery is the builder for querying License entities.

func (*LicenseQuery) Aggregate

func (lq *LicenseQuery) Aggregate(fns ...AggregateFunc) *LicenseSelect

Aggregate returns a LicenseSelect configured with the given aggregations.

func (*LicenseQuery) All

func (lq *LicenseQuery) All(ctx context.Context) ([]*License, error)

All executes the query and returns a list of Licenses.

func (*LicenseQuery) AllX

func (lq *LicenseQuery) AllX(ctx context.Context) []*License

AllX is like All, but panics if an error occurs.

func (*LicenseQuery) Clone

func (lq *LicenseQuery) Clone() *LicenseQuery

Clone returns a duplicate of the LicenseQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*LicenseQuery) CollectFields

func (l *LicenseQuery) CollectFields(ctx context.Context, satisfies ...string) (*LicenseQuery, error)

CollectFields tells the query-builder to eagerly load connected nodes by resolver context.

func (*LicenseQuery) Count

func (lq *LicenseQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*LicenseQuery) CountX

func (lq *LicenseQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*LicenseQuery) Exist

func (lq *LicenseQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*LicenseQuery) ExistX

func (lq *LicenseQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*LicenseQuery) First

func (lq *LicenseQuery) First(ctx context.Context) (*License, error)

First returns the first License entity from the query. Returns a *NotFoundError when no License was found.

func (*LicenseQuery) FirstID

func (lq *LicenseQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)

FirstID returns the first License ID from the query. Returns a *NotFoundError when no License ID was found.

func (*LicenseQuery) FirstIDX

func (lq *LicenseQuery) FirstIDX(ctx context.Context) uuid.UUID

FirstIDX is like FirstID, but panics if an error occurs.

func (*LicenseQuery) FirstX

func (lq *LicenseQuery) FirstX(ctx context.Context) *License

FirstX is like First, but panics if an error occurs.

func (*LicenseQuery) GroupBy

func (lq *LicenseQuery) GroupBy(field string, fields ...string) *LicenseGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	Name string `json:"name,omitempty"`
	Count int `json:"count,omitempty"`
}

client.License.Query().
	GroupBy(license.FieldName).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*LicenseQuery) IDs

func (lq *LicenseQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)

IDs executes the query and returns a list of License IDs.

func (*LicenseQuery) IDsX

func (lq *LicenseQuery) IDsX(ctx context.Context) []uuid.UUID

IDsX is like IDs, but panics if an error occurs.

func (*LicenseQuery) Limit

func (lq *LicenseQuery) Limit(limit int) *LicenseQuery

Limit the number of records to be returned by this query.

func (*LicenseQuery) Offset

func (lq *LicenseQuery) Offset(offset int) *LicenseQuery

Offset to start from.

func (*LicenseQuery) Only

func (lq *LicenseQuery) Only(ctx context.Context) (*License, error)

Only returns a single License entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one License entity is found. Returns a *NotFoundError when no License entities are found.

func (*LicenseQuery) OnlyID

func (lq *LicenseQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)

OnlyID is like Only, but returns the only License ID in the query. Returns a *NotSingularError when more than one License ID is found. Returns a *NotFoundError when no entities are found.

func (*LicenseQuery) OnlyIDX

func (lq *LicenseQuery) OnlyIDX(ctx context.Context) uuid.UUID

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*LicenseQuery) OnlyX

func (lq *LicenseQuery) OnlyX(ctx context.Context) *License

OnlyX is like Only, but panics if an error occurs.

func (*LicenseQuery) Order

func (lq *LicenseQuery) Order(o ...license.OrderOption) *LicenseQuery

Order specifies how the records should be ordered.

func (*LicenseQuery) Paginate

func (l *LicenseQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...LicensePaginateOption,
) (*LicenseConnection, error)

Paginate executes the query and returns a relay based cursor connection to License.

func (*LicenseQuery) QueryDeclaredInCertifyLegals

func (lq *LicenseQuery) QueryDeclaredInCertifyLegals() *CertifyLegalQuery

QueryDeclaredInCertifyLegals chains the current query on the "declared_in_certify_legals" edge.

func (*LicenseQuery) QueryDiscoveredInCertifyLegals

func (lq *LicenseQuery) QueryDiscoveredInCertifyLegals() *CertifyLegalQuery

QueryDiscoveredInCertifyLegals chains the current query on the "discovered_in_certify_legals" edge.

func (*LicenseQuery) Select

func (lq *LicenseQuery) Select(fields ...string) *LicenseSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	Name string `json:"name,omitempty"`
}

client.License.Query().
	Select(license.FieldName).
	Scan(ctx, &v)

func (*LicenseQuery) Unique

func (lq *LicenseQuery) Unique(unique bool) *LicenseQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*LicenseQuery) Where

func (lq *LicenseQuery) Where(ps ...predicate.License) *LicenseQuery

Where adds a new predicate for the LicenseQuery builder.

func (*LicenseQuery) WithDeclaredInCertifyLegals

func (lq *LicenseQuery) WithDeclaredInCertifyLegals(opts ...func(*CertifyLegalQuery)) *LicenseQuery

WithDeclaredInCertifyLegals tells the query-builder to eager-load the nodes that are connected to the "declared_in_certify_legals" edge. The optional arguments are used to configure the query builder of the edge.

func (*LicenseQuery) WithDiscoveredInCertifyLegals

func (lq *LicenseQuery) WithDiscoveredInCertifyLegals(opts ...func(*CertifyLegalQuery)) *LicenseQuery

WithDiscoveredInCertifyLegals tells the query-builder to eager-load the nodes that are connected to the "discovered_in_certify_legals" edge. The optional arguments are used to configure the query builder of the edge.

func (*LicenseQuery) WithNamedDeclaredInCertifyLegals

func (lq *LicenseQuery) WithNamedDeclaredInCertifyLegals(name string, opts ...func(*CertifyLegalQuery)) *LicenseQuery

WithNamedDeclaredInCertifyLegals tells the query-builder to eager-load the nodes that are connected to the "declared_in_certify_legals" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*LicenseQuery) WithNamedDiscoveredInCertifyLegals

func (lq *LicenseQuery) WithNamedDiscoveredInCertifyLegals(name string, opts ...func(*CertifyLegalQuery)) *LicenseQuery

WithNamedDiscoveredInCertifyLegals tells the query-builder to eager-load the nodes that are connected to the "discovered_in_certify_legals" edge with the given name. The optional arguments are used to configure the query builder of the edge.

type LicenseSelect

type LicenseSelect struct {
	*LicenseQuery
	// contains filtered or unexported fields
}

LicenseSelect is the builder for selecting fields of License entities.

func (*LicenseSelect) Aggregate

func (ls *LicenseSelect) Aggregate(fns ...AggregateFunc) *LicenseSelect

Aggregate adds the given aggregation functions to the selector query.

func (*LicenseSelect) Bool

func (s *LicenseSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*LicenseSelect) BoolX

func (s *LicenseSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*LicenseSelect) Bools

func (s *LicenseSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*LicenseSelect) BoolsX

func (s *LicenseSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*LicenseSelect) Float64

func (s *LicenseSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*LicenseSelect) Float64X

func (s *LicenseSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*LicenseSelect) Float64s

func (s *LicenseSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*LicenseSelect) Float64sX

func (s *LicenseSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*LicenseSelect) Int

func (s *LicenseSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*LicenseSelect) IntX

func (s *LicenseSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*LicenseSelect) Ints

func (s *LicenseSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*LicenseSelect) IntsX

func (s *LicenseSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*LicenseSelect) Scan

func (ls *LicenseSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*LicenseSelect) ScanX

func (s *LicenseSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*LicenseSelect) String

func (s *LicenseSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*LicenseSelect) StringX

func (s *LicenseSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*LicenseSelect) Strings

func (s *LicenseSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*LicenseSelect) StringsX

func (s *LicenseSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type LicenseUpdate

type LicenseUpdate struct {
	// contains filtered or unexported fields
}

LicenseUpdate is the builder for updating License entities.

func (*LicenseUpdate) AddDeclaredInCertifyLegalIDs

func (lu *LicenseUpdate) AddDeclaredInCertifyLegalIDs(ids ...uuid.UUID) *LicenseUpdate

AddDeclaredInCertifyLegalIDs adds the "declared_in_certify_legals" edge to the CertifyLegal entity by IDs.

func (*LicenseUpdate) AddDeclaredInCertifyLegals

func (lu *LicenseUpdate) AddDeclaredInCertifyLegals(c ...*CertifyLegal) *LicenseUpdate

AddDeclaredInCertifyLegals adds the "declared_in_certify_legals" edges to the CertifyLegal entity.

func (*LicenseUpdate) AddDiscoveredInCertifyLegalIDs

func (lu *LicenseUpdate) AddDiscoveredInCertifyLegalIDs(ids ...uuid.UUID) *LicenseUpdate

AddDiscoveredInCertifyLegalIDs adds the "discovered_in_certify_legals" edge to the CertifyLegal entity by IDs.

func (*LicenseUpdate) AddDiscoveredInCertifyLegals

func (lu *LicenseUpdate) AddDiscoveredInCertifyLegals(c ...*CertifyLegal) *LicenseUpdate

AddDiscoveredInCertifyLegals adds the "discovered_in_certify_legals" edges to the CertifyLegal entity.

func (*LicenseUpdate) ClearDeclaredInCertifyLegals

func (lu *LicenseUpdate) ClearDeclaredInCertifyLegals() *LicenseUpdate

ClearDeclaredInCertifyLegals clears all "declared_in_certify_legals" edges to the CertifyLegal entity.

func (*LicenseUpdate) ClearDiscoveredInCertifyLegals

func (lu *LicenseUpdate) ClearDiscoveredInCertifyLegals() *LicenseUpdate

ClearDiscoveredInCertifyLegals clears all "discovered_in_certify_legals" edges to the CertifyLegal entity.

func (*LicenseUpdate) ClearInline

func (lu *LicenseUpdate) ClearInline() *LicenseUpdate

ClearInline clears the value of the "inline" field.

func (*LicenseUpdate) ClearListVersion

func (lu *LicenseUpdate) ClearListVersion() *LicenseUpdate

ClearListVersion clears the value of the "list_version" field.

func (*LicenseUpdate) Exec

func (lu *LicenseUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*LicenseUpdate) ExecX

func (lu *LicenseUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*LicenseUpdate) Mutation

func (lu *LicenseUpdate) Mutation() *LicenseMutation

Mutation returns the LicenseMutation object of the builder.

func (*LicenseUpdate) RemoveDeclaredInCertifyLegalIDs

func (lu *LicenseUpdate) RemoveDeclaredInCertifyLegalIDs(ids ...uuid.UUID) *LicenseUpdate

RemoveDeclaredInCertifyLegalIDs removes the "declared_in_certify_legals" edge to CertifyLegal entities by IDs.

func (*LicenseUpdate) RemoveDeclaredInCertifyLegals

func (lu *LicenseUpdate) RemoveDeclaredInCertifyLegals(c ...*CertifyLegal) *LicenseUpdate

RemoveDeclaredInCertifyLegals removes "declared_in_certify_legals" edges to CertifyLegal entities.

func (*LicenseUpdate) RemoveDiscoveredInCertifyLegalIDs

func (lu *LicenseUpdate) RemoveDiscoveredInCertifyLegalIDs(ids ...uuid.UUID) *LicenseUpdate

RemoveDiscoveredInCertifyLegalIDs removes the "discovered_in_certify_legals" edge to CertifyLegal entities by IDs.

func (*LicenseUpdate) RemoveDiscoveredInCertifyLegals

func (lu *LicenseUpdate) RemoveDiscoveredInCertifyLegals(c ...*CertifyLegal) *LicenseUpdate

RemoveDiscoveredInCertifyLegals removes "discovered_in_certify_legals" edges to CertifyLegal entities.

func (*LicenseUpdate) Save

func (lu *LicenseUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*LicenseUpdate) SaveX

func (lu *LicenseUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*LicenseUpdate) SetInline

func (lu *LicenseUpdate) SetInline(s string) *LicenseUpdate

SetInline sets the "inline" field.

func (*LicenseUpdate) SetListVersion

func (lu *LicenseUpdate) SetListVersion(s string) *LicenseUpdate

SetListVersion sets the "list_version" field.

func (*LicenseUpdate) SetName

func (lu *LicenseUpdate) SetName(s string) *LicenseUpdate

SetName sets the "name" field.

func (*LicenseUpdate) SetNillableInline

func (lu *LicenseUpdate) SetNillableInline(s *string) *LicenseUpdate

SetNillableInline sets the "inline" field if the given value is not nil.

func (*LicenseUpdate) SetNillableListVersion

func (lu *LicenseUpdate) SetNillableListVersion(s *string) *LicenseUpdate

SetNillableListVersion sets the "list_version" field if the given value is not nil.

func (*LicenseUpdate) SetNillableName added in v0.4.0

func (lu *LicenseUpdate) SetNillableName(s *string) *LicenseUpdate

SetNillableName sets the "name" field if the given value is not nil.

func (*LicenseUpdate) Where

func (lu *LicenseUpdate) Where(ps ...predicate.License) *LicenseUpdate

Where appends a list predicates to the LicenseUpdate builder.

type LicenseUpdateOne

type LicenseUpdateOne struct {
	// contains filtered or unexported fields
}

LicenseUpdateOne is the builder for updating a single License entity.

func (*LicenseUpdateOne) AddDeclaredInCertifyLegalIDs

func (luo *LicenseUpdateOne) AddDeclaredInCertifyLegalIDs(ids ...uuid.UUID) *LicenseUpdateOne

AddDeclaredInCertifyLegalIDs adds the "declared_in_certify_legals" edge to the CertifyLegal entity by IDs.

func (*LicenseUpdateOne) AddDeclaredInCertifyLegals

func (luo *LicenseUpdateOne) AddDeclaredInCertifyLegals(c ...*CertifyLegal) *LicenseUpdateOne

AddDeclaredInCertifyLegals adds the "declared_in_certify_legals" edges to the CertifyLegal entity.

func (*LicenseUpdateOne) AddDiscoveredInCertifyLegalIDs

func (luo *LicenseUpdateOne) AddDiscoveredInCertifyLegalIDs(ids ...uuid.UUID) *LicenseUpdateOne

AddDiscoveredInCertifyLegalIDs adds the "discovered_in_certify_legals" edge to the CertifyLegal entity by IDs.

func (*LicenseUpdateOne) AddDiscoveredInCertifyLegals

func (luo *LicenseUpdateOne) AddDiscoveredInCertifyLegals(c ...*CertifyLegal) *LicenseUpdateOne

AddDiscoveredInCertifyLegals adds the "discovered_in_certify_legals" edges to the CertifyLegal entity.

func (*LicenseUpdateOne) ClearDeclaredInCertifyLegals

func (luo *LicenseUpdateOne) ClearDeclaredInCertifyLegals() *LicenseUpdateOne

ClearDeclaredInCertifyLegals clears all "declared_in_certify_legals" edges to the CertifyLegal entity.

func (*LicenseUpdateOne) ClearDiscoveredInCertifyLegals

func (luo *LicenseUpdateOne) ClearDiscoveredInCertifyLegals() *LicenseUpdateOne

ClearDiscoveredInCertifyLegals clears all "discovered_in_certify_legals" edges to the CertifyLegal entity.

func (*LicenseUpdateOne) ClearInline

func (luo *LicenseUpdateOne) ClearInline() *LicenseUpdateOne

ClearInline clears the value of the "inline" field.

func (*LicenseUpdateOne) ClearListVersion

func (luo *LicenseUpdateOne) ClearListVersion() *LicenseUpdateOne

ClearListVersion clears the value of the "list_version" field.

func (*LicenseUpdateOne) Exec

func (luo *LicenseUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*LicenseUpdateOne) ExecX

func (luo *LicenseUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*LicenseUpdateOne) Mutation

func (luo *LicenseUpdateOne) Mutation() *LicenseMutation

Mutation returns the LicenseMutation object of the builder.

func (*LicenseUpdateOne) RemoveDeclaredInCertifyLegalIDs

func (luo *LicenseUpdateOne) RemoveDeclaredInCertifyLegalIDs(ids ...uuid.UUID) *LicenseUpdateOne

RemoveDeclaredInCertifyLegalIDs removes the "declared_in_certify_legals" edge to CertifyLegal entities by IDs.

func (*LicenseUpdateOne) RemoveDeclaredInCertifyLegals

func (luo *LicenseUpdateOne) RemoveDeclaredInCertifyLegals(c ...*CertifyLegal) *LicenseUpdateOne

RemoveDeclaredInCertifyLegals removes "declared_in_certify_legals" edges to CertifyLegal entities.

func (*LicenseUpdateOne) RemoveDiscoveredInCertifyLegalIDs

func (luo *LicenseUpdateOne) RemoveDiscoveredInCertifyLegalIDs(ids ...uuid.UUID) *LicenseUpdateOne

RemoveDiscoveredInCertifyLegalIDs removes the "discovered_in_certify_legals" edge to CertifyLegal entities by IDs.

func (*LicenseUpdateOne) RemoveDiscoveredInCertifyLegals

func (luo *LicenseUpdateOne) RemoveDiscoveredInCertifyLegals(c ...*CertifyLegal) *LicenseUpdateOne

RemoveDiscoveredInCertifyLegals removes "discovered_in_certify_legals" edges to CertifyLegal entities.

func (*LicenseUpdateOne) Save

func (luo *LicenseUpdateOne) Save(ctx context.Context) (*License, error)

Save executes the query and returns the updated License entity.

func (*LicenseUpdateOne) SaveX

func (luo *LicenseUpdateOne) SaveX(ctx context.Context) *License

SaveX is like Save, but panics if an error occurs.

func (*LicenseUpdateOne) Select

func (luo *LicenseUpdateOne) Select(field string, fields ...string) *LicenseUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*LicenseUpdateOne) SetInline

func (luo *LicenseUpdateOne) SetInline(s string) *LicenseUpdateOne

SetInline sets the "inline" field.

func (*LicenseUpdateOne) SetListVersion

func (luo *LicenseUpdateOne) SetListVersion(s string) *LicenseUpdateOne

SetListVersion sets the "list_version" field.

func (*LicenseUpdateOne) SetName

func (luo *LicenseUpdateOne) SetName(s string) *LicenseUpdateOne

SetName sets the "name" field.

func (*LicenseUpdateOne) SetNillableInline

func (luo *LicenseUpdateOne) SetNillableInline(s *string) *LicenseUpdateOne

SetNillableInline sets the "inline" field if the given value is not nil.

func (*LicenseUpdateOne) SetNillableListVersion

func (luo *LicenseUpdateOne) SetNillableListVersion(s *string) *LicenseUpdateOne

SetNillableListVersion sets the "list_version" field if the given value is not nil.

func (*LicenseUpdateOne) SetNillableName added in v0.4.0

func (luo *LicenseUpdateOne) SetNillableName(s *string) *LicenseUpdateOne

SetNillableName sets the "name" field if the given value is not nil.

func (*LicenseUpdateOne) Where

Where appends a list predicates to the LicenseUpdate builder.

type LicenseUpsert

type LicenseUpsert struct {
	*sql.UpdateSet
}

LicenseUpsert is the "OnConflict" setter.

func (*LicenseUpsert) ClearInline

func (u *LicenseUpsert) ClearInline() *LicenseUpsert

ClearInline clears the value of the "inline" field.

func (*LicenseUpsert) ClearListVersion

func (u *LicenseUpsert) ClearListVersion() *LicenseUpsert

ClearListVersion clears the value of the "list_version" field.

func (*LicenseUpsert) SetInline

func (u *LicenseUpsert) SetInline(v string) *LicenseUpsert

SetInline sets the "inline" field.

func (*LicenseUpsert) SetListVersion

func (u *LicenseUpsert) SetListVersion(v string) *LicenseUpsert

SetListVersion sets the "list_version" field.

func (*LicenseUpsert) SetName

func (u *LicenseUpsert) SetName(v string) *LicenseUpsert

SetName sets the "name" field.

func (*LicenseUpsert) UpdateInline

func (u *LicenseUpsert) UpdateInline() *LicenseUpsert

UpdateInline sets the "inline" field to the value that was provided on create.

func (*LicenseUpsert) UpdateListVersion

func (u *LicenseUpsert) UpdateListVersion() *LicenseUpsert

UpdateListVersion sets the "list_version" field to the value that was provided on create.

func (*LicenseUpsert) UpdateName

func (u *LicenseUpsert) UpdateName() *LicenseUpsert

UpdateName sets the "name" field to the value that was provided on create.

type LicenseUpsertBulk

type LicenseUpsertBulk struct {
	// contains filtered or unexported fields
}

LicenseUpsertBulk is the builder for "upsert"-ing a bulk of License nodes.

func (*LicenseUpsertBulk) ClearInline

func (u *LicenseUpsertBulk) ClearInline() *LicenseUpsertBulk

ClearInline clears the value of the "inline" field.

func (*LicenseUpsertBulk) ClearListVersion

func (u *LicenseUpsertBulk) ClearListVersion() *LicenseUpsertBulk

ClearListVersion clears the value of the "list_version" field.

func (*LicenseUpsertBulk) DoNothing

func (u *LicenseUpsertBulk) DoNothing() *LicenseUpsertBulk

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*LicenseUpsertBulk) Exec

func (u *LicenseUpsertBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*LicenseUpsertBulk) ExecX

func (u *LicenseUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*LicenseUpsertBulk) Ignore

func (u *LicenseUpsertBulk) Ignore() *LicenseUpsertBulk

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.License.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*LicenseUpsertBulk) SetInline

func (u *LicenseUpsertBulk) SetInline(v string) *LicenseUpsertBulk

SetInline sets the "inline" field.

func (*LicenseUpsertBulk) SetListVersion

func (u *LicenseUpsertBulk) SetListVersion(v string) *LicenseUpsertBulk

SetListVersion sets the "list_version" field.

func (*LicenseUpsertBulk) SetName

SetName sets the "name" field.

func (*LicenseUpsertBulk) Update

func (u *LicenseUpsertBulk) Update(set func(*LicenseUpsert)) *LicenseUpsertBulk

Update allows overriding fields `UPDATE` values. See the LicenseCreateBulk.OnConflict documentation for more info.

func (*LicenseUpsertBulk) UpdateInline

func (u *LicenseUpsertBulk) UpdateInline() *LicenseUpsertBulk

UpdateInline sets the "inline" field to the value that was provided on create.

func (*LicenseUpsertBulk) UpdateListVersion

func (u *LicenseUpsertBulk) UpdateListVersion() *LicenseUpsertBulk

UpdateListVersion sets the "list_version" field to the value that was provided on create.

func (*LicenseUpsertBulk) UpdateName

func (u *LicenseUpsertBulk) UpdateName() *LicenseUpsertBulk

UpdateName sets the "name" field to the value that was provided on create.

func (*LicenseUpsertBulk) UpdateNewValues

func (u *LicenseUpsertBulk) UpdateNewValues() *LicenseUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.License.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(license.FieldID)
		}),
	).
	Exec(ctx)

type LicenseUpsertOne

type LicenseUpsertOne struct {
	// contains filtered or unexported fields
}

LicenseUpsertOne is the builder for "upsert"-ing

one License node.

func (*LicenseUpsertOne) ClearInline

func (u *LicenseUpsertOne) ClearInline() *LicenseUpsertOne

ClearInline clears the value of the "inline" field.

func (*LicenseUpsertOne) ClearListVersion

func (u *LicenseUpsertOne) ClearListVersion() *LicenseUpsertOne

ClearListVersion clears the value of the "list_version" field.

func (*LicenseUpsertOne) DoNothing

func (u *LicenseUpsertOne) DoNothing() *LicenseUpsertOne

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*LicenseUpsertOne) Exec

func (u *LicenseUpsertOne) Exec(ctx context.Context) error

Exec executes the query.

func (*LicenseUpsertOne) ExecX

func (u *LicenseUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*LicenseUpsertOne) ID

func (u *LicenseUpsertOne) ID(ctx context.Context) (id uuid.UUID, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*LicenseUpsertOne) IDX

IDX is like ID, but panics if an error occurs.

func (*LicenseUpsertOne) Ignore

func (u *LicenseUpsertOne) Ignore() *LicenseUpsertOne

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.License.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*LicenseUpsertOne) SetInline

func (u *LicenseUpsertOne) SetInline(v string) *LicenseUpsertOne

SetInline sets the "inline" field.

func (*LicenseUpsertOne) SetListVersion

func (u *LicenseUpsertOne) SetListVersion(v string) *LicenseUpsertOne

SetListVersion sets the "list_version" field.

func (*LicenseUpsertOne) SetName

func (u *LicenseUpsertOne) SetName(v string) *LicenseUpsertOne

SetName sets the "name" field.

func (*LicenseUpsertOne) Update

func (u *LicenseUpsertOne) Update(set func(*LicenseUpsert)) *LicenseUpsertOne

Update allows overriding fields `UPDATE` values. See the LicenseCreate.OnConflict documentation for more info.

func (*LicenseUpsertOne) UpdateInline

func (u *LicenseUpsertOne) UpdateInline() *LicenseUpsertOne

UpdateInline sets the "inline" field to the value that was provided on create.

func (*LicenseUpsertOne) UpdateListVersion

func (u *LicenseUpsertOne) UpdateListVersion() *LicenseUpsertOne

UpdateListVersion sets the "list_version" field to the value that was provided on create.

func (*LicenseUpsertOne) UpdateName

func (u *LicenseUpsertOne) UpdateName() *LicenseUpsertOne

UpdateName sets the "name" field to the value that was provided on create.

func (*LicenseUpsertOne) UpdateNewValues

func (u *LicenseUpsertOne) UpdateNewValues() *LicenseUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:

client.License.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(license.FieldID)
		}),
	).
	Exec(ctx)

type Licenses

type Licenses []*License

Licenses is a parsable slice of License.

type MutateFunc

type MutateFunc = ent.MutateFunc

ent aliases to avoid import conflicts in user's code.

type Mutation

type Mutation = ent.Mutation

ent aliases to avoid import conflicts in user's code.

type Mutator

type Mutator = ent.Mutator

ent aliases to avoid import conflicts in user's code.

type NodeOption

type NodeOption func(*nodeOptions)

NodeOption allows configuring the Noder execution using functional options.

func WithFixedNodeType

func WithFixedNodeType(t string) NodeOption

WithFixedNodeType sets the Type of the node to a fixed value.

func WithNodeType

func WithNodeType(f func(context.Context, uuid.UUID) (string, error)) NodeOption

WithNodeType sets the node Type resolver function (i.e. the table to query). If was not provided, the table will be derived from the universal-id configuration as described in: https://entgo.io/docs/migrate/#universal-ids.

type Noder

type Noder interface {
	IsNode()
}

Noder wraps the basic Node method.

type NotFoundError

type NotFoundError struct {
	// contains filtered or unexported fields
}

NotFoundError returns when trying to fetch a specific entity and it was not found in the database.

func (*NotFoundError) Error

func (e *NotFoundError) Error() string

Error implements the error interface.

type NotLoadedError

type NotLoadedError struct {
	// contains filtered or unexported fields
}

NotLoadedError returns when trying to get a node that was not loaded by the query.

func (*NotLoadedError) Error

func (e *NotLoadedError) Error() string

Error implements the error interface.

type NotSingularError

type NotSingularError struct {
	// contains filtered or unexported fields
}

NotSingularError returns when trying to fetch a singular entity and more then one was found in the database.

func (*NotSingularError) Error

func (e *NotSingularError) Error() string

Error implements the error interface.

type Occurrence

type Occurrence struct {

	// ID of the ent.
	ID uuid.UUID `json:"id,omitempty"`
	// The artifact in the relationship
	ArtifactID uuid.UUID `json:"artifact_id,omitempty"`
	// Justification for the attested relationship
	Justification string `json:"justification,omitempty"`
	// Document from which this attestation is generated from
	Origin string `json:"origin,omitempty"`
	// GUAC collector for the document
	Collector string `json:"collector,omitempty"`
	// DocumentRef holds the value of the "document_ref" field.
	DocumentRef string `json:"document_ref,omitempty"`
	// SourceID holds the value of the "source_id" field.
	SourceID *uuid.UUID `json:"source_id,omitempty"`
	// PackageID holds the value of the "package_id" field.
	PackageID *uuid.UUID `json:"package_id,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the OccurrenceQuery when eager-loading is set.
	Edges OccurrenceEdges `json:"edges"`
	// contains filtered or unexported fields
}

Occurrence is the model entity for the Occurrence schema.

func (*Occurrence) Artifact

func (o *Occurrence) Artifact(ctx context.Context) (*Artifact, error)

func (*Occurrence) IncludedInSboms added in v0.4.0

func (o *Occurrence) IncludedInSboms(ctx context.Context) (result []*BillOfMaterials, err error)

func (*Occurrence) IsNode

func (n *Occurrence) IsNode()

IsNode implements the Node interface check for GQLGen.

func (*Occurrence) NamedIncludedInSboms added in v0.4.0

func (o *Occurrence) NamedIncludedInSboms(name string) ([]*BillOfMaterials, error)

NamedIncludedInSboms returns the IncludedInSboms named value or an error if the edge was not loaded in eager-loading with this name.

func (*Occurrence) Package

func (o *Occurrence) Package(ctx context.Context) (*PackageVersion, error)

func (*Occurrence) QueryArtifact

func (o *Occurrence) QueryArtifact() *ArtifactQuery

QueryArtifact queries the "artifact" edge of the Occurrence entity.

func (*Occurrence) QueryIncludedInSboms added in v0.4.0

func (o *Occurrence) QueryIncludedInSboms() *BillOfMaterialsQuery

QueryIncludedInSboms queries the "included_in_sboms" edge of the Occurrence entity.

func (*Occurrence) QueryPackage

func (o *Occurrence) QueryPackage() *PackageVersionQuery

QueryPackage queries the "package" edge of the Occurrence entity.

func (*Occurrence) QuerySource

func (o *Occurrence) QuerySource() *SourceNameQuery

QuerySource queries the "source" edge of the Occurrence entity.

func (*Occurrence) Source

func (o *Occurrence) Source(ctx context.Context) (*SourceName, error)

func (*Occurrence) String

func (o *Occurrence) String() string

String implements the fmt.Stringer.

func (*Occurrence) ToEdge

func (o *Occurrence) ToEdge(order *OccurrenceOrder) *OccurrenceEdge

ToEdge converts Occurrence into OccurrenceEdge.

func (*Occurrence) Unwrap

func (o *Occurrence) Unwrap() *Occurrence

Unwrap unwraps the Occurrence entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.

func (*Occurrence) Update

func (o *Occurrence) Update() *OccurrenceUpdateOne

Update returns a builder for updating this Occurrence. Note that you need to call Occurrence.Unwrap() before calling this method if this Occurrence was returned from a transaction, and the transaction was committed or rolled back.

func (*Occurrence) Value

func (o *Occurrence) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the Occurrence. This includes values selected through modifiers, order, etc.

type OccurrenceClient

type OccurrenceClient struct {
	// contains filtered or unexported fields
}

OccurrenceClient is a client for the Occurrence schema.

func NewOccurrenceClient

func NewOccurrenceClient(c config) *OccurrenceClient

NewOccurrenceClient returns a client for the Occurrence from the given config.

func (*OccurrenceClient) Create

func (c *OccurrenceClient) Create() *OccurrenceCreate

Create returns a builder for creating a Occurrence entity.

func (*OccurrenceClient) CreateBulk

func (c *OccurrenceClient) CreateBulk(builders ...*OccurrenceCreate) *OccurrenceCreateBulk

CreateBulk returns a builder for creating a bulk of Occurrence entities.

func (*OccurrenceClient) Delete

func (c *OccurrenceClient) Delete() *OccurrenceDelete

Delete returns a delete builder for Occurrence.

func (*OccurrenceClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*OccurrenceClient) DeleteOneID

func (c *OccurrenceClient) DeleteOneID(id uuid.UUID) *OccurrenceDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*OccurrenceClient) Get

Get returns a Occurrence entity by its id.

func (*OccurrenceClient) GetX

func (c *OccurrenceClient) GetX(ctx context.Context, id uuid.UUID) *Occurrence

GetX is like Get, but panics if an error occurs.

func (*OccurrenceClient) Hooks

func (c *OccurrenceClient) Hooks() []Hook

Hooks returns the client hooks.

func (*OccurrenceClient) Intercept

func (c *OccurrenceClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `occurrence.Intercept(f(g(h())))`.

func (*OccurrenceClient) Interceptors

func (c *OccurrenceClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*OccurrenceClient) MapCreateBulk

func (c *OccurrenceClient) MapCreateBulk(slice any, setFunc func(*OccurrenceCreate, int)) *OccurrenceCreateBulk

MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.

func (*OccurrenceClient) Query

func (c *OccurrenceClient) Query() *OccurrenceQuery

Query returns a query builder for Occurrence.

func (*OccurrenceClient) QueryArtifact

func (c *OccurrenceClient) QueryArtifact(o *Occurrence) *ArtifactQuery

QueryArtifact queries the artifact edge of a Occurrence.

func (*OccurrenceClient) QueryIncludedInSboms added in v0.4.0

func (c *OccurrenceClient) QueryIncludedInSboms(o *Occurrence) *BillOfMaterialsQuery

QueryIncludedInSboms queries the included_in_sboms edge of a Occurrence.

func (*OccurrenceClient) QueryPackage

func (c *OccurrenceClient) QueryPackage(o *Occurrence) *PackageVersionQuery

QueryPackage queries the package edge of a Occurrence.

func (*OccurrenceClient) QuerySource

func (c *OccurrenceClient) QuerySource(o *Occurrence) *SourceNameQuery

QuerySource queries the source edge of a Occurrence.

func (*OccurrenceClient) Update

func (c *OccurrenceClient) Update() *OccurrenceUpdate

Update returns an update builder for Occurrence.

func (*OccurrenceClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*OccurrenceClient) UpdateOneID

func (c *OccurrenceClient) UpdateOneID(id uuid.UUID) *OccurrenceUpdateOne

UpdateOneID returns an update builder for the given id.

func (*OccurrenceClient) Use

func (c *OccurrenceClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `occurrence.Hooks(f(g(h())))`.

type OccurrenceConnection

type OccurrenceConnection struct {
	Edges      []*OccurrenceEdge `json:"edges"`
	PageInfo   PageInfo          `json:"pageInfo"`
	TotalCount int               `json:"totalCount"`
}

OccurrenceConnection is the connection containing edges to Occurrence.

type OccurrenceCreate

type OccurrenceCreate struct {
	// contains filtered or unexported fields
}

OccurrenceCreate is the builder for creating a Occurrence entity.

func (*OccurrenceCreate) AddIncludedInSbomIDs added in v0.4.0

func (oc *OccurrenceCreate) AddIncludedInSbomIDs(ids ...uuid.UUID) *OccurrenceCreate

AddIncludedInSbomIDs adds the "included_in_sboms" edge to the BillOfMaterials entity by IDs.

func (*OccurrenceCreate) AddIncludedInSboms added in v0.4.0

func (oc *OccurrenceCreate) AddIncludedInSboms(b ...*BillOfMaterials) *OccurrenceCreate

AddIncludedInSboms adds the "included_in_sboms" edges to the BillOfMaterials entity.

func (*OccurrenceCreate) Exec

func (oc *OccurrenceCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*OccurrenceCreate) ExecX

func (oc *OccurrenceCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OccurrenceCreate) Mutation

func (oc *OccurrenceCreate) Mutation() *OccurrenceMutation

Mutation returns the OccurrenceMutation object of the builder.

func (*OccurrenceCreate) OnConflict

func (oc *OccurrenceCreate) OnConflict(opts ...sql.ConflictOption) *OccurrenceUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.Occurrence.Create().
	SetArtifactID(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.OccurrenceUpsert) {
		SetArtifactID(v+v).
	}).
	Exec(ctx)

func (*OccurrenceCreate) OnConflictColumns

func (oc *OccurrenceCreate) OnConflictColumns(columns ...string) *OccurrenceUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.Occurrence.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*OccurrenceCreate) Save

func (oc *OccurrenceCreate) Save(ctx context.Context) (*Occurrence, error)

Save creates the Occurrence in the database.

func (*OccurrenceCreate) SaveX

func (oc *OccurrenceCreate) SaveX(ctx context.Context) *Occurrence

SaveX calls Save and panics if Save returns an error.

func (*OccurrenceCreate) SetArtifact

func (oc *OccurrenceCreate) SetArtifact(a *Artifact) *OccurrenceCreate

SetArtifact sets the "artifact" edge to the Artifact entity.

func (*OccurrenceCreate) SetArtifactID

func (oc *OccurrenceCreate) SetArtifactID(u uuid.UUID) *OccurrenceCreate

SetArtifactID sets the "artifact_id" field.

func (*OccurrenceCreate) SetCollector

func (oc *OccurrenceCreate) SetCollector(s string) *OccurrenceCreate

SetCollector sets the "collector" field.

func (*OccurrenceCreate) SetDocumentRef added in v0.6.0

func (oc *OccurrenceCreate) SetDocumentRef(s string) *OccurrenceCreate

SetDocumentRef sets the "document_ref" field.

func (*OccurrenceCreate) SetID added in v0.5.0

SetID sets the "id" field.

func (*OccurrenceCreate) SetJustification

func (oc *OccurrenceCreate) SetJustification(s string) *OccurrenceCreate

SetJustification sets the "justification" field.

func (*OccurrenceCreate) SetNillableID added in v0.5.0

func (oc *OccurrenceCreate) SetNillableID(u *uuid.UUID) *OccurrenceCreate

SetNillableID sets the "id" field if the given value is not nil.

func (*OccurrenceCreate) SetNillablePackageID

func (oc *OccurrenceCreate) SetNillablePackageID(u *uuid.UUID) *OccurrenceCreate

SetNillablePackageID sets the "package_id" field if the given value is not nil.

func (*OccurrenceCreate) SetNillableSourceID

func (oc *OccurrenceCreate) SetNillableSourceID(u *uuid.UUID) *OccurrenceCreate

SetNillableSourceID sets the "source_id" field if the given value is not nil.

func (*OccurrenceCreate) SetOrigin

func (oc *OccurrenceCreate) SetOrigin(s string) *OccurrenceCreate

SetOrigin sets the "origin" field.

func (*OccurrenceCreate) SetPackage

func (oc *OccurrenceCreate) SetPackage(p *PackageVersion) *OccurrenceCreate

SetPackage sets the "package" edge to the PackageVersion entity.

func (*OccurrenceCreate) SetPackageID

func (oc *OccurrenceCreate) SetPackageID(u uuid.UUID) *OccurrenceCreate

SetPackageID sets the "package_id" field.

func (*OccurrenceCreate) SetSource

func (oc *OccurrenceCreate) SetSource(s *SourceName) *OccurrenceCreate

SetSource sets the "source" edge to the SourceName entity.

func (*OccurrenceCreate) SetSourceID

func (oc *OccurrenceCreate) SetSourceID(u uuid.UUID) *OccurrenceCreate

SetSourceID sets the "source_id" field.

type OccurrenceCreateBulk

type OccurrenceCreateBulk struct {
	// contains filtered or unexported fields
}

OccurrenceCreateBulk is the builder for creating many Occurrence entities in bulk.

func (*OccurrenceCreateBulk) Exec

func (ocb *OccurrenceCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*OccurrenceCreateBulk) ExecX

func (ocb *OccurrenceCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OccurrenceCreateBulk) OnConflict

func (ocb *OccurrenceCreateBulk) OnConflict(opts ...sql.ConflictOption) *OccurrenceUpsertBulk

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.Occurrence.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.OccurrenceUpsert) {
		SetArtifactID(v+v).
	}).
	Exec(ctx)

func (*OccurrenceCreateBulk) OnConflictColumns

func (ocb *OccurrenceCreateBulk) OnConflictColumns(columns ...string) *OccurrenceUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.Occurrence.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*OccurrenceCreateBulk) Save

func (ocb *OccurrenceCreateBulk) Save(ctx context.Context) ([]*Occurrence, error)

Save creates the Occurrence entities in the database.

func (*OccurrenceCreateBulk) SaveX

func (ocb *OccurrenceCreateBulk) SaveX(ctx context.Context) []*Occurrence

SaveX is like Save, but panics if an error occurs.

type OccurrenceDelete

type OccurrenceDelete struct {
	// contains filtered or unexported fields
}

OccurrenceDelete is the builder for deleting a Occurrence entity.

func (*OccurrenceDelete) Exec

func (od *OccurrenceDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*OccurrenceDelete) ExecX

func (od *OccurrenceDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*OccurrenceDelete) Where

Where appends a list predicates to the OccurrenceDelete builder.

type OccurrenceDeleteOne

type OccurrenceDeleteOne struct {
	// contains filtered or unexported fields
}

OccurrenceDeleteOne is the builder for deleting a single Occurrence entity.

func (*OccurrenceDeleteOne) Exec

func (odo *OccurrenceDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*OccurrenceDeleteOne) ExecX

func (odo *OccurrenceDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OccurrenceDeleteOne) Where

Where appends a list predicates to the OccurrenceDelete builder.

type OccurrenceEdge

type OccurrenceEdge struct {
	Node   *Occurrence `json:"node"`
	Cursor Cursor      `json:"cursor"`
}

OccurrenceEdge is the edge representation of Occurrence.

type OccurrenceEdges

type OccurrenceEdges struct {
	// Artifact holds the value of the artifact edge.
	Artifact *Artifact `json:"artifact,omitempty"`
	// Package holds the value of the package edge.
	Package *PackageVersion `json:"package,omitempty"`
	// Source holds the value of the source edge.
	Source *SourceName `json:"source,omitempty"`
	// IncludedInSboms holds the value of the included_in_sboms edge.
	IncludedInSboms []*BillOfMaterials `json:"included_in_sboms,omitempty"`
	// contains filtered or unexported fields
}

OccurrenceEdges holds the relations/edges for other nodes in the graph.

func (OccurrenceEdges) ArtifactOrErr

func (e OccurrenceEdges) ArtifactOrErr() (*Artifact, error)

ArtifactOrErr returns the Artifact value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (OccurrenceEdges) IncludedInSbomsOrErr added in v0.4.0

func (e OccurrenceEdges) IncludedInSbomsOrErr() ([]*BillOfMaterials, error)

IncludedInSbomsOrErr returns the IncludedInSboms value or an error if the edge was not loaded in eager-loading.

func (OccurrenceEdges) PackageOrErr

func (e OccurrenceEdges) PackageOrErr() (*PackageVersion, error)

PackageOrErr returns the Package value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (OccurrenceEdges) SourceOrErr

func (e OccurrenceEdges) SourceOrErr() (*SourceName, error)

SourceOrErr returns the Source value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type OccurrenceGroupBy

type OccurrenceGroupBy struct {
	// contains filtered or unexported fields
}

OccurrenceGroupBy is the group-by builder for Occurrence entities.

func (*OccurrenceGroupBy) Aggregate

func (ogb *OccurrenceGroupBy) Aggregate(fns ...AggregateFunc) *OccurrenceGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*OccurrenceGroupBy) Bool

func (s *OccurrenceGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*OccurrenceGroupBy) BoolX

func (s *OccurrenceGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*OccurrenceGroupBy) Bools

func (s *OccurrenceGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*OccurrenceGroupBy) BoolsX

func (s *OccurrenceGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*OccurrenceGroupBy) Float64

func (s *OccurrenceGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*OccurrenceGroupBy) Float64X

func (s *OccurrenceGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*OccurrenceGroupBy) Float64s

func (s *OccurrenceGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*OccurrenceGroupBy) Float64sX

func (s *OccurrenceGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*OccurrenceGroupBy) Int

func (s *OccurrenceGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*OccurrenceGroupBy) IntX

func (s *OccurrenceGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*OccurrenceGroupBy) Ints

func (s *OccurrenceGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*OccurrenceGroupBy) IntsX

func (s *OccurrenceGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*OccurrenceGroupBy) Scan

func (ogb *OccurrenceGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*OccurrenceGroupBy) ScanX

func (s *OccurrenceGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*OccurrenceGroupBy) String

func (s *OccurrenceGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*OccurrenceGroupBy) StringX

func (s *OccurrenceGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*OccurrenceGroupBy) Strings

func (s *OccurrenceGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*OccurrenceGroupBy) StringsX

func (s *OccurrenceGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type OccurrenceMutation

type OccurrenceMutation struct {
	// contains filtered or unexported fields
}

OccurrenceMutation represents an operation that mutates the Occurrence nodes in the graph.

func (*OccurrenceMutation) AddField

func (m *OccurrenceMutation) AddField(name string, value ent.Value) error

AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*OccurrenceMutation) AddIncludedInSbomIDs added in v0.4.0

func (m *OccurrenceMutation) AddIncludedInSbomIDs(ids ...uuid.UUID)

AddIncludedInSbomIDs adds the "included_in_sboms" edge to the BillOfMaterials entity by ids.

func (*OccurrenceMutation) AddedEdges

func (m *OccurrenceMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*OccurrenceMutation) AddedField

func (m *OccurrenceMutation) AddedField(name string) (ent.Value, bool)

AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*OccurrenceMutation) AddedFields

func (m *OccurrenceMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*OccurrenceMutation) AddedIDs

func (m *OccurrenceMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*OccurrenceMutation) ArtifactCleared

func (m *OccurrenceMutation) ArtifactCleared() bool

ArtifactCleared reports if the "artifact" edge to the Artifact entity was cleared.

func (*OccurrenceMutation) ArtifactID

func (m *OccurrenceMutation) ArtifactID() (r uuid.UUID, exists bool)

ArtifactID returns the value of the "artifact_id" field in the mutation.

func (*OccurrenceMutation) ArtifactIDs

func (m *OccurrenceMutation) ArtifactIDs() (ids []uuid.UUID)

ArtifactIDs returns the "artifact" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use ArtifactID instead. It exists only for internal usage by the builders.

func (*OccurrenceMutation) ClearArtifact

func (m *OccurrenceMutation) ClearArtifact()

ClearArtifact clears the "artifact" edge to the Artifact entity.

func (*OccurrenceMutation) ClearEdge

func (m *OccurrenceMutation) ClearEdge(name string) error

ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.

func (*OccurrenceMutation) ClearField

func (m *OccurrenceMutation) ClearField(name string) error

ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.

func (*OccurrenceMutation) ClearIncludedInSboms added in v0.4.0

func (m *OccurrenceMutation) ClearIncludedInSboms()

ClearIncludedInSboms clears the "included_in_sboms" edge to the BillOfMaterials entity.

func (*OccurrenceMutation) ClearPackage

func (m *OccurrenceMutation) ClearPackage()

ClearPackage clears the "package" edge to the PackageVersion entity.

func (*OccurrenceMutation) ClearPackageID

func (m *OccurrenceMutation) ClearPackageID()

ClearPackageID clears the value of the "package_id" field.

func (*OccurrenceMutation) ClearSource

func (m *OccurrenceMutation) ClearSource()

ClearSource clears the "source" edge to the SourceName entity.

func (*OccurrenceMutation) ClearSourceID

func (m *OccurrenceMutation) ClearSourceID()

ClearSourceID clears the value of the "source_id" field.

func (*OccurrenceMutation) ClearedEdges

func (m *OccurrenceMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*OccurrenceMutation) ClearedFields

func (m *OccurrenceMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (OccurrenceMutation) Client

func (m OccurrenceMutation) Client() *Client

Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.

func (*OccurrenceMutation) Collector

func (m *OccurrenceMutation) Collector() (r string, exists bool)

Collector returns the value of the "collector" field in the mutation.

func (*OccurrenceMutation) DocumentRef added in v0.6.0

func (m *OccurrenceMutation) DocumentRef() (r string, exists bool)

DocumentRef returns the value of the "document_ref" field in the mutation.

func (*OccurrenceMutation) EdgeCleared

func (m *OccurrenceMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*OccurrenceMutation) Field

func (m *OccurrenceMutation) Field(name string) (ent.Value, bool)

Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*OccurrenceMutation) FieldCleared

func (m *OccurrenceMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*OccurrenceMutation) Fields

func (m *OccurrenceMutation) Fields() []string

Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().

func (*OccurrenceMutation) ID

func (m *OccurrenceMutation) ID() (id uuid.UUID, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*OccurrenceMutation) IDs

func (m *OccurrenceMutation) IDs(ctx context.Context) ([]uuid.UUID, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*OccurrenceMutation) IncludedInSbomsCleared added in v0.4.0

func (m *OccurrenceMutation) IncludedInSbomsCleared() bool

IncludedInSbomsCleared reports if the "included_in_sboms" edge to the BillOfMaterials entity was cleared.

func (*OccurrenceMutation) IncludedInSbomsIDs added in v0.4.0

func (m *OccurrenceMutation) IncludedInSbomsIDs() (ids []uuid.UUID)

IncludedInSbomsIDs returns the "included_in_sboms" edge IDs in the mutation.

func (*OccurrenceMutation) Justification

func (m *OccurrenceMutation) Justification() (r string, exists bool)

Justification returns the value of the "justification" field in the mutation.

func (*OccurrenceMutation) OldArtifactID

func (m *OccurrenceMutation) OldArtifactID(ctx context.Context) (v uuid.UUID, err error)

OldArtifactID returns the old "artifact_id" field's value of the Occurrence entity. If the Occurrence object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*OccurrenceMutation) OldCollector

func (m *OccurrenceMutation) OldCollector(ctx context.Context) (v string, err error)

OldCollector returns the old "collector" field's value of the Occurrence entity. If the Occurrence object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*OccurrenceMutation) OldDocumentRef added in v0.6.0

func (m *OccurrenceMutation) OldDocumentRef(ctx context.Context) (v string, err error)

OldDocumentRef returns the old "document_ref" field's value of the Occurrence entity. If the Occurrence object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*OccurrenceMutation) OldField

func (m *OccurrenceMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*OccurrenceMutation) OldJustification

func (m *OccurrenceMutation) OldJustification(ctx context.Context) (v string, err error)

OldJustification returns the old "justification" field's value of the Occurrence entity. If the Occurrence object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*OccurrenceMutation) OldOrigin

func (m *OccurrenceMutation) OldOrigin(ctx context.Context) (v string, err error)

OldOrigin returns the old "origin" field's value of the Occurrence entity. If the Occurrence object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*OccurrenceMutation) OldPackageID

func (m *OccurrenceMutation) OldPackageID(ctx context.Context) (v *uuid.UUID, err error)

OldPackageID returns the old "package_id" field's value of the Occurrence entity. If the Occurrence object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*OccurrenceMutation) OldSourceID

func (m *OccurrenceMutation) OldSourceID(ctx context.Context) (v *uuid.UUID, err error)

OldSourceID returns the old "source_id" field's value of the Occurrence entity. If the Occurrence object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*OccurrenceMutation) Op

func (m *OccurrenceMutation) Op() Op

Op returns the operation name.

func (*OccurrenceMutation) Origin

func (m *OccurrenceMutation) Origin() (r string, exists bool)

Origin returns the value of the "origin" field in the mutation.

func (*OccurrenceMutation) PackageCleared

func (m *OccurrenceMutation) PackageCleared() bool

PackageCleared reports if the "package" edge to the PackageVersion entity was cleared.

func (*OccurrenceMutation) PackageID

func (m *OccurrenceMutation) PackageID() (r uuid.UUID, exists bool)

PackageID returns the value of the "package_id" field in the mutation.

func (*OccurrenceMutation) PackageIDCleared

func (m *OccurrenceMutation) PackageIDCleared() bool

PackageIDCleared returns if the "package_id" field was cleared in this mutation.

func (*OccurrenceMutation) PackageIDs

func (m *OccurrenceMutation) PackageIDs() (ids []uuid.UUID)

PackageIDs returns the "package" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use PackageID instead. It exists only for internal usage by the builders.

func (*OccurrenceMutation) RemoveIncludedInSbomIDs added in v0.4.0

func (m *OccurrenceMutation) RemoveIncludedInSbomIDs(ids ...uuid.UUID)

RemoveIncludedInSbomIDs removes the "included_in_sboms" edge to the BillOfMaterials entity by IDs.

func (*OccurrenceMutation) RemovedEdges

func (m *OccurrenceMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*OccurrenceMutation) RemovedIDs

func (m *OccurrenceMutation) RemovedIDs(name string) []ent.Value

RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.

func (*OccurrenceMutation) RemovedIncludedInSbomsIDs added in v0.4.0

func (m *OccurrenceMutation) RemovedIncludedInSbomsIDs() (ids []uuid.UUID)

RemovedIncludedInSboms returns the removed IDs of the "included_in_sboms" edge to the BillOfMaterials entity.

func (*OccurrenceMutation) ResetArtifact

func (m *OccurrenceMutation) ResetArtifact()

ResetArtifact resets all changes to the "artifact" edge.

func (*OccurrenceMutation) ResetArtifactID

func (m *OccurrenceMutation) ResetArtifactID()

ResetArtifactID resets all changes to the "artifact_id" field.

func (*OccurrenceMutation) ResetCollector

func (m *OccurrenceMutation) ResetCollector()

ResetCollector resets all changes to the "collector" field.

func (*OccurrenceMutation) ResetDocumentRef added in v0.6.0

func (m *OccurrenceMutation) ResetDocumentRef()

ResetDocumentRef resets all changes to the "document_ref" field.

func (*OccurrenceMutation) ResetEdge

func (m *OccurrenceMutation) ResetEdge(name string) error

ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.

func (*OccurrenceMutation) ResetField

func (m *OccurrenceMutation) ResetField(name string) error

ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.

func (*OccurrenceMutation) ResetIncludedInSboms added in v0.4.0

func (m *OccurrenceMutation) ResetIncludedInSboms()

ResetIncludedInSboms resets all changes to the "included_in_sboms" edge.

func (*OccurrenceMutation) ResetJustification

func (m *OccurrenceMutation) ResetJustification()

ResetJustification resets all changes to the "justification" field.

func (*OccurrenceMutation) ResetOrigin

func (m *OccurrenceMutation) ResetOrigin()

ResetOrigin resets all changes to the "origin" field.

func (*OccurrenceMutation) ResetPackage

func (m *OccurrenceMutation) ResetPackage()

ResetPackage resets all changes to the "package" edge.

func (*OccurrenceMutation) ResetPackageID

func (m *OccurrenceMutation) ResetPackageID()

ResetPackageID resets all changes to the "package_id" field.

func (*OccurrenceMutation) ResetSource

func (m *OccurrenceMutation) ResetSource()

ResetSource resets all changes to the "source" edge.

func (*OccurrenceMutation) ResetSourceID

func (m *OccurrenceMutation) ResetSourceID()

ResetSourceID resets all changes to the "source_id" field.

func (*OccurrenceMutation) SetArtifactID

func (m *OccurrenceMutation) SetArtifactID(u uuid.UUID)

SetArtifactID sets the "artifact_id" field.

func (*OccurrenceMutation) SetCollector

func (m *OccurrenceMutation) SetCollector(s string)

SetCollector sets the "collector" field.

func (*OccurrenceMutation) SetDocumentRef added in v0.6.0

func (m *OccurrenceMutation) SetDocumentRef(s string)

SetDocumentRef sets the "document_ref" field.

func (*OccurrenceMutation) SetField

func (m *OccurrenceMutation) SetField(name string, value ent.Value) error

SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*OccurrenceMutation) SetID added in v0.5.0

func (m *OccurrenceMutation) SetID(id uuid.UUID)

SetID sets the value of the id field. Note that this operation is only accepted on creation of Occurrence entities.

func (*OccurrenceMutation) SetJustification

func (m *OccurrenceMutation) SetJustification(s string)

SetJustification sets the "justification" field.

func (*OccurrenceMutation) SetOp

func (m *OccurrenceMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*OccurrenceMutation) SetOrigin

func (m *OccurrenceMutation) SetOrigin(s string)

SetOrigin sets the "origin" field.

func (*OccurrenceMutation) SetPackageID

func (m *OccurrenceMutation) SetPackageID(u uuid.UUID)

SetPackageID sets the "package_id" field.

func (*OccurrenceMutation) SetSourceID

func (m *OccurrenceMutation) SetSourceID(u uuid.UUID)

SetSourceID sets the "source_id" field.

func (*OccurrenceMutation) SourceCleared

func (m *OccurrenceMutation) SourceCleared() bool

SourceCleared reports if the "source" edge to the SourceName entity was cleared.

func (*OccurrenceMutation) SourceID

func (m *OccurrenceMutation) SourceID() (r uuid.UUID, exists bool)

SourceID returns the value of the "source_id" field in the mutation.

func (*OccurrenceMutation) SourceIDCleared

func (m *OccurrenceMutation) SourceIDCleared() bool

SourceIDCleared returns if the "source_id" field was cleared in this mutation.

func (*OccurrenceMutation) SourceIDs

func (m *OccurrenceMutation) SourceIDs() (ids []uuid.UUID)

SourceIDs returns the "source" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use SourceID instead. It exists only for internal usage by the builders.

func (OccurrenceMutation) Tx

func (m OccurrenceMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*OccurrenceMutation) Type

func (m *OccurrenceMutation) Type() string

Type returns the node type of this mutation (Occurrence).

func (*OccurrenceMutation) Where

func (m *OccurrenceMutation) Where(ps ...predicate.Occurrence)

Where appends a list predicates to the OccurrenceMutation builder.

func (*OccurrenceMutation) WhereP

func (m *OccurrenceMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the OccurrenceMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type OccurrenceOrder

type OccurrenceOrder struct {
	Direction OrderDirection        `json:"direction"`
	Field     *OccurrenceOrderField `json:"field"`
}

OccurrenceOrder defines the ordering of Occurrence.

type OccurrenceOrderField

type OccurrenceOrderField struct {
	// Value extracts the ordering value from the given Occurrence.
	Value func(*Occurrence) (ent.Value, error)
	// contains filtered or unexported fields
}

OccurrenceOrderField defines the ordering field of Occurrence.

type OccurrencePaginateOption

type OccurrencePaginateOption func(*occurrencePager) error

OccurrencePaginateOption enables pagination customization.

func WithOccurrenceFilter

func WithOccurrenceFilter(filter func(*OccurrenceQuery) (*OccurrenceQuery, error)) OccurrencePaginateOption

WithOccurrenceFilter configures pagination filter.

func WithOccurrenceOrder

func WithOccurrenceOrder(order *OccurrenceOrder) OccurrencePaginateOption

WithOccurrenceOrder configures pagination ordering.

type OccurrenceQuery

type OccurrenceQuery struct {
	// contains filtered or unexported fields
}

OccurrenceQuery is the builder for querying Occurrence entities.

func (*OccurrenceQuery) Aggregate

func (oq *OccurrenceQuery) Aggregate(fns ...AggregateFunc) *OccurrenceSelect

Aggregate returns a OccurrenceSelect configured with the given aggregations.

func (*OccurrenceQuery) All

func (oq *OccurrenceQuery) All(ctx context.Context) ([]*Occurrence, error)

All executes the query and returns a list of Occurrences.

func (*OccurrenceQuery) AllX

func (oq *OccurrenceQuery) AllX(ctx context.Context) []*Occurrence

AllX is like All, but panics if an error occurs.

func (*OccurrenceQuery) Clone

func (oq *OccurrenceQuery) Clone() *OccurrenceQuery

Clone returns a duplicate of the OccurrenceQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*OccurrenceQuery) CollectFields

func (o *OccurrenceQuery) CollectFields(ctx context.Context, satisfies ...string) (*OccurrenceQuery, error)

CollectFields tells the query-builder to eagerly load connected nodes by resolver context.

func (*OccurrenceQuery) Count

func (oq *OccurrenceQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*OccurrenceQuery) CountX

func (oq *OccurrenceQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*OccurrenceQuery) Exist

func (oq *OccurrenceQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*OccurrenceQuery) ExistX

func (oq *OccurrenceQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*OccurrenceQuery) First

func (oq *OccurrenceQuery) First(ctx context.Context) (*Occurrence, error)

First returns the first Occurrence entity from the query. Returns a *NotFoundError when no Occurrence was found.

func (*OccurrenceQuery) FirstID

func (oq *OccurrenceQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)

FirstID returns the first Occurrence ID from the query. Returns a *NotFoundError when no Occurrence ID was found.

func (*OccurrenceQuery) FirstIDX

func (oq *OccurrenceQuery) FirstIDX(ctx context.Context) uuid.UUID

FirstIDX is like FirstID, but panics if an error occurs.

func (*OccurrenceQuery) FirstX

func (oq *OccurrenceQuery) FirstX(ctx context.Context) *Occurrence

FirstX is like First, but panics if an error occurs.

func (*OccurrenceQuery) GroupBy

func (oq *OccurrenceQuery) GroupBy(field string, fields ...string) *OccurrenceGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	ArtifactID uuid.UUID `json:"artifact_id,omitempty"`
	Count int `json:"count,omitempty"`
}

client.Occurrence.Query().
	GroupBy(occurrence.FieldArtifactID).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*OccurrenceQuery) IDs

func (oq *OccurrenceQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)

IDs executes the query and returns a list of Occurrence IDs.

func (*OccurrenceQuery) IDsX

func (oq *OccurrenceQuery) IDsX(ctx context.Context) []uuid.UUID

IDsX is like IDs, but panics if an error occurs.

func (*OccurrenceQuery) Limit

func (oq *OccurrenceQuery) Limit(limit int) *OccurrenceQuery

Limit the number of records to be returned by this query.

func (*OccurrenceQuery) Offset

func (oq *OccurrenceQuery) Offset(offset int) *OccurrenceQuery

Offset to start from.

func (*OccurrenceQuery) Only

func (oq *OccurrenceQuery) Only(ctx context.Context) (*Occurrence, error)

Only returns a single Occurrence entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Occurrence entity is found. Returns a *NotFoundError when no Occurrence entities are found.

func (*OccurrenceQuery) OnlyID

func (oq *OccurrenceQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)

OnlyID is like Only, but returns the only Occurrence ID in the query. Returns a *NotSingularError when more than one Occurrence ID is found. Returns a *NotFoundError when no entities are found.

func (*OccurrenceQuery) OnlyIDX

func (oq *OccurrenceQuery) OnlyIDX(ctx context.Context) uuid.UUID

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*OccurrenceQuery) OnlyX

func (oq *OccurrenceQuery) OnlyX(ctx context.Context) *Occurrence

OnlyX is like Only, but panics if an error occurs.

func (*OccurrenceQuery) Order

Order specifies how the records should be ordered.

func (*OccurrenceQuery) Paginate

func (o *OccurrenceQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...OccurrencePaginateOption,
) (*OccurrenceConnection, error)

Paginate executes the query and returns a relay based cursor connection to Occurrence.

func (*OccurrenceQuery) QueryArtifact

func (oq *OccurrenceQuery) QueryArtifact() *ArtifactQuery

QueryArtifact chains the current query on the "artifact" edge.

func (*OccurrenceQuery) QueryIncludedInSboms added in v0.4.0

func (oq *OccurrenceQuery) QueryIncludedInSboms() *BillOfMaterialsQuery

QueryIncludedInSboms chains the current query on the "included_in_sboms" edge.

func (*OccurrenceQuery) QueryPackage

func (oq *OccurrenceQuery) QueryPackage() *PackageVersionQuery

QueryPackage chains the current query on the "package" edge.

func (*OccurrenceQuery) QuerySource

func (oq *OccurrenceQuery) QuerySource() *SourceNameQuery

QuerySource chains the current query on the "source" edge.

func (*OccurrenceQuery) Select

func (oq *OccurrenceQuery) Select(fields ...string) *OccurrenceSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	ArtifactID uuid.UUID `json:"artifact_id,omitempty"`
}

client.Occurrence.Query().
	Select(occurrence.FieldArtifactID).
	Scan(ctx, &v)

func (*OccurrenceQuery) Unique

func (oq *OccurrenceQuery) Unique(unique bool) *OccurrenceQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*OccurrenceQuery) Where

Where adds a new predicate for the OccurrenceQuery builder.

func (*OccurrenceQuery) WithArtifact

func (oq *OccurrenceQuery) WithArtifact(opts ...func(*ArtifactQuery)) *OccurrenceQuery

WithArtifact tells the query-builder to eager-load the nodes that are connected to the "artifact" edge. The optional arguments are used to configure the query builder of the edge.

func (*OccurrenceQuery) WithIncludedInSboms added in v0.4.0

func (oq *OccurrenceQuery) WithIncludedInSboms(opts ...func(*BillOfMaterialsQuery)) *OccurrenceQuery

WithIncludedInSboms tells the query-builder to eager-load the nodes that are connected to the "included_in_sboms" edge. The optional arguments are used to configure the query builder of the edge.

func (*OccurrenceQuery) WithNamedIncludedInSboms added in v0.4.0

func (oq *OccurrenceQuery) WithNamedIncludedInSboms(name string, opts ...func(*BillOfMaterialsQuery)) *OccurrenceQuery

WithNamedIncludedInSboms tells the query-builder to eager-load the nodes that are connected to the "included_in_sboms" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*OccurrenceQuery) WithPackage

func (oq *OccurrenceQuery) WithPackage(opts ...func(*PackageVersionQuery)) *OccurrenceQuery

WithPackage tells the query-builder to eager-load the nodes that are connected to the "package" edge. The optional arguments are used to configure the query builder of the edge.

func (*OccurrenceQuery) WithSource

func (oq *OccurrenceQuery) WithSource(opts ...func(*SourceNameQuery)) *OccurrenceQuery

WithSource tells the query-builder to eager-load the nodes that are connected to the "source" edge. The optional arguments are used to configure the query builder of the edge.

type OccurrenceSelect

type OccurrenceSelect struct {
	*OccurrenceQuery
	// contains filtered or unexported fields
}

OccurrenceSelect is the builder for selecting fields of Occurrence entities.

func (*OccurrenceSelect) Aggregate

func (os *OccurrenceSelect) Aggregate(fns ...AggregateFunc) *OccurrenceSelect

Aggregate adds the given aggregation functions to the selector query.

func (*OccurrenceSelect) Bool

func (s *OccurrenceSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*OccurrenceSelect) BoolX

func (s *OccurrenceSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*OccurrenceSelect) Bools

func (s *OccurrenceSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*OccurrenceSelect) BoolsX

func (s *OccurrenceSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*OccurrenceSelect) Float64

func (s *OccurrenceSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*OccurrenceSelect) Float64X

func (s *OccurrenceSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*OccurrenceSelect) Float64s

func (s *OccurrenceSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*OccurrenceSelect) Float64sX

func (s *OccurrenceSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*OccurrenceSelect) Int

func (s *OccurrenceSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*OccurrenceSelect) IntX

func (s *OccurrenceSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*OccurrenceSelect) Ints

func (s *OccurrenceSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*OccurrenceSelect) IntsX

func (s *OccurrenceSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*OccurrenceSelect) Scan

func (os *OccurrenceSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*OccurrenceSelect) ScanX

func (s *OccurrenceSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*OccurrenceSelect) String

func (s *OccurrenceSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*OccurrenceSelect) StringX

func (s *OccurrenceSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*OccurrenceSelect) Strings

func (s *OccurrenceSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*OccurrenceSelect) StringsX

func (s *OccurrenceSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type OccurrenceUpdate

type OccurrenceUpdate struct {
	// contains filtered or unexported fields
}

OccurrenceUpdate is the builder for updating Occurrence entities.

func (*OccurrenceUpdate) AddIncludedInSbomIDs added in v0.4.0

func (ou *OccurrenceUpdate) AddIncludedInSbomIDs(ids ...uuid.UUID) *OccurrenceUpdate

AddIncludedInSbomIDs adds the "included_in_sboms" edge to the BillOfMaterials entity by IDs.

func (*OccurrenceUpdate) AddIncludedInSboms added in v0.4.0

func (ou *OccurrenceUpdate) AddIncludedInSboms(b ...*BillOfMaterials) *OccurrenceUpdate

AddIncludedInSboms adds the "included_in_sboms" edges to the BillOfMaterials entity.

func (*OccurrenceUpdate) ClearArtifact

func (ou *OccurrenceUpdate) ClearArtifact() *OccurrenceUpdate

ClearArtifact clears the "artifact" edge to the Artifact entity.

func (*OccurrenceUpdate) ClearIncludedInSboms added in v0.4.0

func (ou *OccurrenceUpdate) ClearIncludedInSboms() *OccurrenceUpdate

ClearIncludedInSboms clears all "included_in_sboms" edges to the BillOfMaterials entity.

func (*OccurrenceUpdate) ClearPackage

func (ou *OccurrenceUpdate) ClearPackage() *OccurrenceUpdate

ClearPackage clears the "package" edge to the PackageVersion entity.

func (*OccurrenceUpdate) ClearPackageID

func (ou *OccurrenceUpdate) ClearPackageID() *OccurrenceUpdate

ClearPackageID clears the value of the "package_id" field.

func (*OccurrenceUpdate) ClearSource

func (ou *OccurrenceUpdate) ClearSource() *OccurrenceUpdate

ClearSource clears the "source" edge to the SourceName entity.

func (*OccurrenceUpdate) ClearSourceID

func (ou *OccurrenceUpdate) ClearSourceID() *OccurrenceUpdate

ClearSourceID clears the value of the "source_id" field.

func (*OccurrenceUpdate) Exec

func (ou *OccurrenceUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*OccurrenceUpdate) ExecX

func (ou *OccurrenceUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OccurrenceUpdate) Mutation

func (ou *OccurrenceUpdate) Mutation() *OccurrenceMutation

Mutation returns the OccurrenceMutation object of the builder.

func (*OccurrenceUpdate) RemoveIncludedInSbomIDs added in v0.4.0

func (ou *OccurrenceUpdate) RemoveIncludedInSbomIDs(ids ...uuid.UUID) *OccurrenceUpdate

RemoveIncludedInSbomIDs removes the "included_in_sboms" edge to BillOfMaterials entities by IDs.

func (*OccurrenceUpdate) RemoveIncludedInSboms added in v0.4.0

func (ou *OccurrenceUpdate) RemoveIncludedInSboms(b ...*BillOfMaterials) *OccurrenceUpdate

RemoveIncludedInSboms removes "included_in_sboms" edges to BillOfMaterials entities.

func (*OccurrenceUpdate) Save

func (ou *OccurrenceUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*OccurrenceUpdate) SaveX

func (ou *OccurrenceUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*OccurrenceUpdate) SetArtifact

func (ou *OccurrenceUpdate) SetArtifact(a *Artifact) *OccurrenceUpdate

SetArtifact sets the "artifact" edge to the Artifact entity.

func (*OccurrenceUpdate) SetArtifactID

func (ou *OccurrenceUpdate) SetArtifactID(u uuid.UUID) *OccurrenceUpdate

SetArtifactID sets the "artifact_id" field.

func (*OccurrenceUpdate) SetCollector

func (ou *OccurrenceUpdate) SetCollector(s string) *OccurrenceUpdate

SetCollector sets the "collector" field.

func (*OccurrenceUpdate) SetDocumentRef added in v0.6.0

func (ou *OccurrenceUpdate) SetDocumentRef(s string) *OccurrenceUpdate

SetDocumentRef sets the "document_ref" field.

func (*OccurrenceUpdate) SetJustification

func (ou *OccurrenceUpdate) SetJustification(s string) *OccurrenceUpdate

SetJustification sets the "justification" field.

func (*OccurrenceUpdate) SetNillableArtifactID added in v0.4.0

func (ou *OccurrenceUpdate) SetNillableArtifactID(u *uuid.UUID) *OccurrenceUpdate

SetNillableArtifactID sets the "artifact_id" field if the given value is not nil.

func (*OccurrenceUpdate) SetNillableCollector added in v0.4.0

func (ou *OccurrenceUpdate) SetNillableCollector(s *string) *OccurrenceUpdate

SetNillableCollector sets the "collector" field if the given value is not nil.

func (*OccurrenceUpdate) SetNillableDocumentRef added in v0.6.0

func (ou *OccurrenceUpdate) SetNillableDocumentRef(s *string) *OccurrenceUpdate

SetNillableDocumentRef sets the "document_ref" field if the given value is not nil.

func (*OccurrenceUpdate) SetNillableJustification added in v0.4.0

func (ou *OccurrenceUpdate) SetNillableJustification(s *string) *OccurrenceUpdate

SetNillableJustification sets the "justification" field if the given value is not nil.

func (*OccurrenceUpdate) SetNillableOrigin added in v0.4.0

func (ou *OccurrenceUpdate) SetNillableOrigin(s *string) *OccurrenceUpdate

SetNillableOrigin sets the "origin" field if the given value is not nil.

func (*OccurrenceUpdate) SetNillablePackageID

func (ou *OccurrenceUpdate) SetNillablePackageID(u *uuid.UUID) *OccurrenceUpdate

SetNillablePackageID sets the "package_id" field if the given value is not nil.

func (*OccurrenceUpdate) SetNillableSourceID

func (ou *OccurrenceUpdate) SetNillableSourceID(u *uuid.UUID) *OccurrenceUpdate

SetNillableSourceID sets the "source_id" field if the given value is not nil.

func (*OccurrenceUpdate) SetOrigin

func (ou *OccurrenceUpdate) SetOrigin(s string) *OccurrenceUpdate

SetOrigin sets the "origin" field.

func (*OccurrenceUpdate) SetPackage

func (ou *OccurrenceUpdate) SetPackage(p *PackageVersion) *OccurrenceUpdate

SetPackage sets the "package" edge to the PackageVersion entity.

func (*OccurrenceUpdate) SetPackageID

func (ou *OccurrenceUpdate) SetPackageID(u uuid.UUID) *OccurrenceUpdate

SetPackageID sets the "package_id" field.

func (*OccurrenceUpdate) SetSource

func (ou *OccurrenceUpdate) SetSource(s *SourceName) *OccurrenceUpdate

SetSource sets the "source" edge to the SourceName entity.

func (*OccurrenceUpdate) SetSourceID

func (ou *OccurrenceUpdate) SetSourceID(u uuid.UUID) *OccurrenceUpdate

SetSourceID sets the "source_id" field.

func (*OccurrenceUpdate) Where

Where appends a list predicates to the OccurrenceUpdate builder.

type OccurrenceUpdateOne

type OccurrenceUpdateOne struct {
	// contains filtered or unexported fields
}

OccurrenceUpdateOne is the builder for updating a single Occurrence entity.

func (*OccurrenceUpdateOne) AddIncludedInSbomIDs added in v0.4.0

func (ouo *OccurrenceUpdateOne) AddIncludedInSbomIDs(ids ...uuid.UUID) *OccurrenceUpdateOne

AddIncludedInSbomIDs adds the "included_in_sboms" edge to the BillOfMaterials entity by IDs.

func (*OccurrenceUpdateOne) AddIncludedInSboms added in v0.4.0

func (ouo *OccurrenceUpdateOne) AddIncludedInSboms(b ...*BillOfMaterials) *OccurrenceUpdateOne

AddIncludedInSboms adds the "included_in_sboms" edges to the BillOfMaterials entity.

func (*OccurrenceUpdateOne) ClearArtifact

func (ouo *OccurrenceUpdateOne) ClearArtifact() *OccurrenceUpdateOne

ClearArtifact clears the "artifact" edge to the Artifact entity.

func (*OccurrenceUpdateOne) ClearIncludedInSboms added in v0.4.0

func (ouo *OccurrenceUpdateOne) ClearIncludedInSboms() *OccurrenceUpdateOne

ClearIncludedInSboms clears all "included_in_sboms" edges to the BillOfMaterials entity.

func (*OccurrenceUpdateOne) ClearPackage

func (ouo *OccurrenceUpdateOne) ClearPackage() *OccurrenceUpdateOne

ClearPackage clears the "package" edge to the PackageVersion entity.

func (*OccurrenceUpdateOne) ClearPackageID

func (ouo *OccurrenceUpdateOne) ClearPackageID() *OccurrenceUpdateOne

ClearPackageID clears the value of the "package_id" field.

func (*OccurrenceUpdateOne) ClearSource

func (ouo *OccurrenceUpdateOne) ClearSource() *OccurrenceUpdateOne

ClearSource clears the "source" edge to the SourceName entity.

func (*OccurrenceUpdateOne) ClearSourceID

func (ouo *OccurrenceUpdateOne) ClearSourceID() *OccurrenceUpdateOne

ClearSourceID clears the value of the "source_id" field.

func (*OccurrenceUpdateOne) Exec

func (ouo *OccurrenceUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*OccurrenceUpdateOne) ExecX

func (ouo *OccurrenceUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OccurrenceUpdateOne) Mutation

func (ouo *OccurrenceUpdateOne) Mutation() *OccurrenceMutation

Mutation returns the OccurrenceMutation object of the builder.

func (*OccurrenceUpdateOne) RemoveIncludedInSbomIDs added in v0.4.0

func (ouo *OccurrenceUpdateOne) RemoveIncludedInSbomIDs(ids ...uuid.UUID) *OccurrenceUpdateOne

RemoveIncludedInSbomIDs removes the "included_in_sboms" edge to BillOfMaterials entities by IDs.

func (*OccurrenceUpdateOne) RemoveIncludedInSboms added in v0.4.0

func (ouo *OccurrenceUpdateOne) RemoveIncludedInSboms(b ...*BillOfMaterials) *OccurrenceUpdateOne

RemoveIncludedInSboms removes "included_in_sboms" edges to BillOfMaterials entities.

func (*OccurrenceUpdateOne) Save

func (ouo *OccurrenceUpdateOne) Save(ctx context.Context) (*Occurrence, error)

Save executes the query and returns the updated Occurrence entity.

func (*OccurrenceUpdateOne) SaveX

func (ouo *OccurrenceUpdateOne) SaveX(ctx context.Context) *Occurrence

SaveX is like Save, but panics if an error occurs.

func (*OccurrenceUpdateOne) Select

func (ouo *OccurrenceUpdateOne) Select(field string, fields ...string) *OccurrenceUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*OccurrenceUpdateOne) SetArtifact

func (ouo *OccurrenceUpdateOne) SetArtifact(a *Artifact) *OccurrenceUpdateOne

SetArtifact sets the "artifact" edge to the Artifact entity.

func (*OccurrenceUpdateOne) SetArtifactID

func (ouo *OccurrenceUpdateOne) SetArtifactID(u uuid.UUID) *OccurrenceUpdateOne

SetArtifactID sets the "artifact_id" field.

func (*OccurrenceUpdateOne) SetCollector

func (ouo *OccurrenceUpdateOne) SetCollector(s string) *OccurrenceUpdateOne

SetCollector sets the "collector" field.

func (*OccurrenceUpdateOne) SetDocumentRef added in v0.6.0

func (ouo *OccurrenceUpdateOne) SetDocumentRef(s string) *OccurrenceUpdateOne

SetDocumentRef sets the "document_ref" field.

func (*OccurrenceUpdateOne) SetJustification

func (ouo *OccurrenceUpdateOne) SetJustification(s string) *OccurrenceUpdateOne

SetJustification sets the "justification" field.

func (*OccurrenceUpdateOne) SetNillableArtifactID added in v0.4.0

func (ouo *OccurrenceUpdateOne) SetNillableArtifactID(u *uuid.UUID) *OccurrenceUpdateOne

SetNillableArtifactID sets the "artifact_id" field if the given value is not nil.

func (*OccurrenceUpdateOne) SetNillableCollector added in v0.4.0

func (ouo *OccurrenceUpdateOne) SetNillableCollector(s *string) *OccurrenceUpdateOne

SetNillableCollector sets the "collector" field if the given value is not nil.

func (*OccurrenceUpdateOne) SetNillableDocumentRef added in v0.6.0

func (ouo *OccurrenceUpdateOne) SetNillableDocumentRef(s *string) *OccurrenceUpdateOne

SetNillableDocumentRef sets the "document_ref" field if the given value is not nil.

func (*OccurrenceUpdateOne) SetNillableJustification added in v0.4.0

func (ouo *OccurrenceUpdateOne) SetNillableJustification(s *string) *OccurrenceUpdateOne

SetNillableJustification sets the "justification" field if the given value is not nil.

func (*OccurrenceUpdateOne) SetNillableOrigin added in v0.4.0

func (ouo *OccurrenceUpdateOne) SetNillableOrigin(s *string) *OccurrenceUpdateOne

SetNillableOrigin sets the "origin" field if the given value is not nil.

func (*OccurrenceUpdateOne) SetNillablePackageID

func (ouo *OccurrenceUpdateOne) SetNillablePackageID(u *uuid.UUID) *OccurrenceUpdateOne

SetNillablePackageID sets the "package_id" field if the given value is not nil.

func (*OccurrenceUpdateOne) SetNillableSourceID

func (ouo *OccurrenceUpdateOne) SetNillableSourceID(u *uuid.UUID) *OccurrenceUpdateOne

SetNillableSourceID sets the "source_id" field if the given value is not nil.

func (*OccurrenceUpdateOne) SetOrigin

func (ouo *OccurrenceUpdateOne) SetOrigin(s string) *OccurrenceUpdateOne

SetOrigin sets the "origin" field.

func (*OccurrenceUpdateOne) SetPackage

SetPackage sets the "package" edge to the PackageVersion entity.

func (*OccurrenceUpdateOne) SetPackageID

func (ouo *OccurrenceUpdateOne) SetPackageID(u uuid.UUID) *OccurrenceUpdateOne

SetPackageID sets the "package_id" field.

func (*OccurrenceUpdateOne) SetSource

SetSource sets the "source" edge to the SourceName entity.

func (*OccurrenceUpdateOne) SetSourceID

func (ouo *OccurrenceUpdateOne) SetSourceID(u uuid.UUID) *OccurrenceUpdateOne

SetSourceID sets the "source_id" field.

func (*OccurrenceUpdateOne) Where

Where appends a list predicates to the OccurrenceUpdate builder.

type OccurrenceUpsert

type OccurrenceUpsert struct {
	*sql.UpdateSet
}

OccurrenceUpsert is the "OnConflict" setter.

func (*OccurrenceUpsert) ClearPackageID

func (u *OccurrenceUpsert) ClearPackageID() *OccurrenceUpsert

ClearPackageID clears the value of the "package_id" field.

func (*OccurrenceUpsert) ClearSourceID

func (u *OccurrenceUpsert) ClearSourceID() *OccurrenceUpsert

ClearSourceID clears the value of the "source_id" field.

func (*OccurrenceUpsert) SetArtifactID

func (u *OccurrenceUpsert) SetArtifactID(v uuid.UUID) *OccurrenceUpsert

SetArtifactID sets the "artifact_id" field.

func (*OccurrenceUpsert) SetCollector

func (u *OccurrenceUpsert) SetCollector(v string) *OccurrenceUpsert

SetCollector sets the "collector" field.

func (*OccurrenceUpsert) SetDocumentRef added in v0.6.0

func (u *OccurrenceUpsert) SetDocumentRef(v string) *OccurrenceUpsert

SetDocumentRef sets the "document_ref" field.

func (*OccurrenceUpsert) SetJustification

func (u *OccurrenceUpsert) SetJustification(v string) *OccurrenceUpsert

SetJustification sets the "justification" field.

func (*OccurrenceUpsert) SetOrigin

func (u *OccurrenceUpsert) SetOrigin(v string) *OccurrenceUpsert

SetOrigin sets the "origin" field.

func (*OccurrenceUpsert) SetPackageID

func (u *OccurrenceUpsert) SetPackageID(v uuid.UUID) *OccurrenceUpsert

SetPackageID sets the "package_id" field.

func (*OccurrenceUpsert) SetSourceID

func (u *OccurrenceUpsert) SetSourceID(v uuid.UUID) *OccurrenceUpsert

SetSourceID sets the "source_id" field.

func (*OccurrenceUpsert) UpdateArtifactID

func (u *OccurrenceUpsert) UpdateArtifactID() *OccurrenceUpsert

UpdateArtifactID sets the "artifact_id" field to the value that was provided on create.

func (*OccurrenceUpsert) UpdateCollector

func (u *OccurrenceUpsert) UpdateCollector() *OccurrenceUpsert

UpdateCollector sets the "collector" field to the value that was provided on create.

func (*OccurrenceUpsert) UpdateDocumentRef added in v0.6.0

func (u *OccurrenceUpsert) UpdateDocumentRef() *OccurrenceUpsert

UpdateDocumentRef sets the "document_ref" field to the value that was provided on create.

func (*OccurrenceUpsert) UpdateJustification

func (u *OccurrenceUpsert) UpdateJustification() *OccurrenceUpsert

UpdateJustification sets the "justification" field to the value that was provided on create.

func (*OccurrenceUpsert) UpdateOrigin

func (u *OccurrenceUpsert) UpdateOrigin() *OccurrenceUpsert

UpdateOrigin sets the "origin" field to the value that was provided on create.

func (*OccurrenceUpsert) UpdatePackageID

func (u *OccurrenceUpsert) UpdatePackageID() *OccurrenceUpsert

UpdatePackageID sets the "package_id" field to the value that was provided on create.

func (*OccurrenceUpsert) UpdateSourceID

func (u *OccurrenceUpsert) UpdateSourceID() *OccurrenceUpsert

UpdateSourceID sets the "source_id" field to the value that was provided on create.

type OccurrenceUpsertBulk

type OccurrenceUpsertBulk struct {
	// contains filtered or unexported fields
}

OccurrenceUpsertBulk is the builder for "upsert"-ing a bulk of Occurrence nodes.

func (*OccurrenceUpsertBulk) ClearPackageID

func (u *OccurrenceUpsertBulk) ClearPackageID() *OccurrenceUpsertBulk

ClearPackageID clears the value of the "package_id" field.

func (*OccurrenceUpsertBulk) ClearSourceID

func (u *OccurrenceUpsertBulk) ClearSourceID() *OccurrenceUpsertBulk

ClearSourceID clears the value of the "source_id" field.

func (*OccurrenceUpsertBulk) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*OccurrenceUpsertBulk) Exec

Exec executes the query.

func (*OccurrenceUpsertBulk) ExecX

func (u *OccurrenceUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OccurrenceUpsertBulk) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Occurrence.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*OccurrenceUpsertBulk) SetArtifactID

func (u *OccurrenceUpsertBulk) SetArtifactID(v uuid.UUID) *OccurrenceUpsertBulk

SetArtifactID sets the "artifact_id" field.

func (*OccurrenceUpsertBulk) SetCollector

func (u *OccurrenceUpsertBulk) SetCollector(v string) *OccurrenceUpsertBulk

SetCollector sets the "collector" field.

func (*OccurrenceUpsertBulk) SetDocumentRef added in v0.6.0

func (u *OccurrenceUpsertBulk) SetDocumentRef(v string) *OccurrenceUpsertBulk

SetDocumentRef sets the "document_ref" field.

func (*OccurrenceUpsertBulk) SetJustification

func (u *OccurrenceUpsertBulk) SetJustification(v string) *OccurrenceUpsertBulk

SetJustification sets the "justification" field.

func (*OccurrenceUpsertBulk) SetOrigin

SetOrigin sets the "origin" field.

func (*OccurrenceUpsertBulk) SetPackageID

func (u *OccurrenceUpsertBulk) SetPackageID(v uuid.UUID) *OccurrenceUpsertBulk

SetPackageID sets the "package_id" field.

func (*OccurrenceUpsertBulk) SetSourceID

SetSourceID sets the "source_id" field.

func (*OccurrenceUpsertBulk) Update

Update allows overriding fields `UPDATE` values. See the OccurrenceCreateBulk.OnConflict documentation for more info.

func (*OccurrenceUpsertBulk) UpdateArtifactID

func (u *OccurrenceUpsertBulk) UpdateArtifactID() *OccurrenceUpsertBulk

UpdateArtifactID sets the "artifact_id" field to the value that was provided on create.

func (*OccurrenceUpsertBulk) UpdateCollector

func (u *OccurrenceUpsertBulk) UpdateCollector() *OccurrenceUpsertBulk

UpdateCollector sets the "collector" field to the value that was provided on create.

func (*OccurrenceUpsertBulk) UpdateDocumentRef added in v0.6.0

func (u *OccurrenceUpsertBulk) UpdateDocumentRef() *OccurrenceUpsertBulk

UpdateDocumentRef sets the "document_ref" field to the value that was provided on create.

func (*OccurrenceUpsertBulk) UpdateJustification

func (u *OccurrenceUpsertBulk) UpdateJustification() *OccurrenceUpsertBulk

UpdateJustification sets the "justification" field to the value that was provided on create.

func (*OccurrenceUpsertBulk) UpdateNewValues

func (u *OccurrenceUpsertBulk) UpdateNewValues() *OccurrenceUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.Occurrence.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(occurrence.FieldID)
		}),
	).
	Exec(ctx)

func (*OccurrenceUpsertBulk) UpdateOrigin

func (u *OccurrenceUpsertBulk) UpdateOrigin() *OccurrenceUpsertBulk

UpdateOrigin sets the "origin" field to the value that was provided on create.

func (*OccurrenceUpsertBulk) UpdatePackageID

func (u *OccurrenceUpsertBulk) UpdatePackageID() *OccurrenceUpsertBulk

UpdatePackageID sets the "package_id" field to the value that was provided on create.

func (*OccurrenceUpsertBulk) UpdateSourceID

func (u *OccurrenceUpsertBulk) UpdateSourceID() *OccurrenceUpsertBulk

UpdateSourceID sets the "source_id" field to the value that was provided on create.

type OccurrenceUpsertOne

type OccurrenceUpsertOne struct {
	// contains filtered or unexported fields
}

OccurrenceUpsertOne is the builder for "upsert"-ing

one Occurrence node.

func (*OccurrenceUpsertOne) ClearPackageID

func (u *OccurrenceUpsertOne) ClearPackageID() *OccurrenceUpsertOne

ClearPackageID clears the value of the "package_id" field.

func (*OccurrenceUpsertOne) ClearSourceID

func (u *OccurrenceUpsertOne) ClearSourceID() *OccurrenceUpsertOne

ClearSourceID clears the value of the "source_id" field.

func (*OccurrenceUpsertOne) DoNothing

func (u *OccurrenceUpsertOne) DoNothing() *OccurrenceUpsertOne

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*OccurrenceUpsertOne) Exec

Exec executes the query.

func (*OccurrenceUpsertOne) ExecX

func (u *OccurrenceUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OccurrenceUpsertOne) ID

func (u *OccurrenceUpsertOne) ID(ctx context.Context) (id uuid.UUID, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*OccurrenceUpsertOne) IDX

IDX is like ID, but panics if an error occurs.

func (*OccurrenceUpsertOne) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Occurrence.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*OccurrenceUpsertOne) SetArtifactID

func (u *OccurrenceUpsertOne) SetArtifactID(v uuid.UUID) *OccurrenceUpsertOne

SetArtifactID sets the "artifact_id" field.

func (*OccurrenceUpsertOne) SetCollector

func (u *OccurrenceUpsertOne) SetCollector(v string) *OccurrenceUpsertOne

SetCollector sets the "collector" field.

func (*OccurrenceUpsertOne) SetDocumentRef added in v0.6.0

func (u *OccurrenceUpsertOne) SetDocumentRef(v string) *OccurrenceUpsertOne

SetDocumentRef sets the "document_ref" field.

func (*OccurrenceUpsertOne) SetJustification

func (u *OccurrenceUpsertOne) SetJustification(v string) *OccurrenceUpsertOne

SetJustification sets the "justification" field.

func (*OccurrenceUpsertOne) SetOrigin

SetOrigin sets the "origin" field.

func (*OccurrenceUpsertOne) SetPackageID

func (u *OccurrenceUpsertOne) SetPackageID(v uuid.UUID) *OccurrenceUpsertOne

SetPackageID sets the "package_id" field.

func (*OccurrenceUpsertOne) SetSourceID

func (u *OccurrenceUpsertOne) SetSourceID(v uuid.UUID) *OccurrenceUpsertOne

SetSourceID sets the "source_id" field.

func (*OccurrenceUpsertOne) Update

Update allows overriding fields `UPDATE` values. See the OccurrenceCreate.OnConflict documentation for more info.

func (*OccurrenceUpsertOne) UpdateArtifactID

func (u *OccurrenceUpsertOne) UpdateArtifactID() *OccurrenceUpsertOne

UpdateArtifactID sets the "artifact_id" field to the value that was provided on create.

func (*OccurrenceUpsertOne) UpdateCollector

func (u *OccurrenceUpsertOne) UpdateCollector() *OccurrenceUpsertOne

UpdateCollector sets the "collector" field to the value that was provided on create.

func (*OccurrenceUpsertOne) UpdateDocumentRef added in v0.6.0

func (u *OccurrenceUpsertOne) UpdateDocumentRef() *OccurrenceUpsertOne

UpdateDocumentRef sets the "document_ref" field to the value that was provided on create.

func (*OccurrenceUpsertOne) UpdateJustification

func (u *OccurrenceUpsertOne) UpdateJustification() *OccurrenceUpsertOne

UpdateJustification sets the "justification" field to the value that was provided on create.

func (*OccurrenceUpsertOne) UpdateNewValues

func (u *OccurrenceUpsertOne) UpdateNewValues() *OccurrenceUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:

client.Occurrence.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(occurrence.FieldID)
		}),
	).
	Exec(ctx)

func (*OccurrenceUpsertOne) UpdateOrigin

func (u *OccurrenceUpsertOne) UpdateOrigin() *OccurrenceUpsertOne

UpdateOrigin sets the "origin" field to the value that was provided on create.

func (*OccurrenceUpsertOne) UpdatePackageID

func (u *OccurrenceUpsertOne) UpdatePackageID() *OccurrenceUpsertOne

UpdatePackageID sets the "package_id" field to the value that was provided on create.

func (*OccurrenceUpsertOne) UpdateSourceID

func (u *OccurrenceUpsertOne) UpdateSourceID() *OccurrenceUpsertOne

UpdateSourceID sets the "source_id" field to the value that was provided on create.

type Occurrences

type Occurrences []*Occurrence

Occurrences is a parsable slice of Occurrence.

type Op

type Op = ent.Op

ent aliases to avoid import conflicts in user's code.

type Option

type Option func(*config)

Option function to configure the client.

func Debug

func Debug() Option

Debug enables debug logging on the ent.Driver.

func Driver

func Driver(driver dialect.Driver) Option

Driver configures the client driver.

func Log

func Log(fn func(...any)) Option

Log sets the logging function for debug mode.

type OrderDirection

type OrderDirection = entgql.OrderDirection

Common entgql types.

type OrderFunc

type OrderFunc func(*sql.Selector)

OrderFunc applies an ordering on the sql selector. Deprecated: Use Asc/Desc functions or the package builders instead.

type PackageName

type PackageName struct {

	// ID of the ent.
	ID uuid.UUID `json:"id,omitempty"`
	// This node matches a pkg:<type> partial pURL
	Type string `json:"type,omitempty"`
	// In the pURL representation, each PackageNamespace matches the pkg:<type>/<namespace>/ partial pURL
	Namespace string `json:"namespace,omitempty"`
	// Name holds the value of the "name" field.
	Name string `json:"name,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the PackageNameQuery when eager-loading is set.
	Edges PackageNameEdges `json:"edges"`
	// contains filtered or unexported fields
}

PackageName is the model entity for the PackageName schema.

func (*PackageName) Certification added in v0.6.0

func (pn *PackageName) Certification(ctx context.Context) (result []*Certification, err error)

func (*PackageName) Dependency added in v0.6.0

func (pn *PackageName) Dependency(ctx context.Context) (result []*Dependency, err error)

func (*PackageName) HasSourceAt added in v0.6.0

func (pn *PackageName) HasSourceAt(ctx context.Context) (result []*HasSourceAt, err error)

func (*PackageName) IsNode

func (n *PackageName) IsNode()

IsNode implements the Node interface check for GQLGen.

func (*PackageName) Metadata added in v0.6.0

func (pn *PackageName) Metadata(ctx context.Context) (result []*HasMetadata, err error)

func (*PackageName) NamedCertification added in v0.6.0

func (pn *PackageName) NamedCertification(name string) ([]*Certification, error)

NamedCertification returns the Certification named value or an error if the edge was not loaded in eager-loading with this name.

func (*PackageName) NamedDependency added in v0.6.0

func (pn *PackageName) NamedDependency(name string) ([]*Dependency, error)

NamedDependency returns the Dependency named value or an error if the edge was not loaded in eager-loading with this name.

func (*PackageName) NamedHasSourceAt added in v0.6.0

func (pn *PackageName) NamedHasSourceAt(name string) ([]*HasSourceAt, error)

NamedHasSourceAt returns the HasSourceAt named value or an error if the edge was not loaded in eager-loading with this name.

func (*PackageName) NamedMetadata added in v0.6.0

func (pn *PackageName) NamedMetadata(name string) ([]*HasMetadata, error)

NamedMetadata returns the Metadata named value or an error if the edge was not loaded in eager-loading with this name.

func (*PackageName) NamedPoc added in v0.6.0

func (pn *PackageName) NamedPoc(name string) ([]*PointOfContact, error)

NamedPoc returns the Poc named value or an error if the edge was not loaded in eager-loading with this name.

func (*PackageName) NamedVersions

func (pn *PackageName) NamedVersions(name string) ([]*PackageVersion, error)

NamedVersions returns the Versions named value or an error if the edge was not loaded in eager-loading with this name.

func (*PackageName) Poc added in v0.6.0

func (pn *PackageName) Poc(ctx context.Context) (result []*PointOfContact, err error)

func (*PackageName) QueryCertification added in v0.6.0

func (pn *PackageName) QueryCertification() *CertificationQuery

QueryCertification queries the "certification" edge of the PackageName entity.

func (*PackageName) QueryDependency added in v0.6.0

func (pn *PackageName) QueryDependency() *DependencyQuery

QueryDependency queries the "dependency" edge of the PackageName entity.

func (*PackageName) QueryHasSourceAt added in v0.6.0

func (pn *PackageName) QueryHasSourceAt() *HasSourceAtQuery

QueryHasSourceAt queries the "has_source_at" edge of the PackageName entity.

func (*PackageName) QueryMetadata added in v0.6.0

func (pn *PackageName) QueryMetadata() *HasMetadataQuery

QueryMetadata queries the "metadata" edge of the PackageName entity.

func (*PackageName) QueryPoc added in v0.6.0

func (pn *PackageName) QueryPoc() *PointOfContactQuery

QueryPoc queries the "poc" edge of the PackageName entity.

func (*PackageName) QueryVersions

func (pn *PackageName) QueryVersions() *PackageVersionQuery

QueryVersions queries the "versions" edge of the PackageName entity.

func (*PackageName) String

func (pn *PackageName) String() string

String implements the fmt.Stringer.

func (*PackageName) ToEdge

func (pn *PackageName) ToEdge(order *PackageNameOrder) *PackageNameEdge

ToEdge converts PackageName into PackageNameEdge.

func (*PackageName) Unwrap

func (pn *PackageName) Unwrap() *PackageName

Unwrap unwraps the PackageName entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.

func (*PackageName) Update

func (pn *PackageName) Update() *PackageNameUpdateOne

Update returns a builder for updating this PackageName. Note that you need to call PackageName.Unwrap() before calling this method if this PackageName was returned from a transaction, and the transaction was committed or rolled back.

func (*PackageName) Value

func (pn *PackageName) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the PackageName. This includes values selected through modifiers, order, etc.

func (*PackageName) Versions

func (pn *PackageName) Versions(ctx context.Context) (result []*PackageVersion, err error)

type PackageNameClient

type PackageNameClient struct {
	// contains filtered or unexported fields
}

PackageNameClient is a client for the PackageName schema.

func NewPackageNameClient

func NewPackageNameClient(c config) *PackageNameClient

NewPackageNameClient returns a client for the PackageName from the given config.

func (*PackageNameClient) Create

func (c *PackageNameClient) Create() *PackageNameCreate

Create returns a builder for creating a PackageName entity.

func (*PackageNameClient) CreateBulk

func (c *PackageNameClient) CreateBulk(builders ...*PackageNameCreate) *PackageNameCreateBulk

CreateBulk returns a builder for creating a bulk of PackageName entities.

func (*PackageNameClient) Delete

func (c *PackageNameClient) Delete() *PackageNameDelete

Delete returns a delete builder for PackageName.

func (*PackageNameClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*PackageNameClient) DeleteOneID

func (c *PackageNameClient) DeleteOneID(id uuid.UUID) *PackageNameDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*PackageNameClient) Get

Get returns a PackageName entity by its id.

func (*PackageNameClient) GetX

GetX is like Get, but panics if an error occurs.

func (*PackageNameClient) Hooks

func (c *PackageNameClient) Hooks() []Hook

Hooks returns the client hooks.

func (*PackageNameClient) Intercept

func (c *PackageNameClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `packagename.Intercept(f(g(h())))`.

func (*PackageNameClient) Interceptors

func (c *PackageNameClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*PackageNameClient) MapCreateBulk

func (c *PackageNameClient) MapCreateBulk(slice any, setFunc func(*PackageNameCreate, int)) *PackageNameCreateBulk

MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.

func (*PackageNameClient) Query

func (c *PackageNameClient) Query() *PackageNameQuery

Query returns a query builder for PackageName.

func (*PackageNameClient) QueryCertification added in v0.6.0

func (c *PackageNameClient) QueryCertification(pn *PackageName) *CertificationQuery

QueryCertification queries the certification edge of a PackageName.

func (*PackageNameClient) QueryDependency added in v0.6.0

func (c *PackageNameClient) QueryDependency(pn *PackageName) *DependencyQuery

QueryDependency queries the dependency edge of a PackageName.

func (*PackageNameClient) QueryHasSourceAt added in v0.6.0

func (c *PackageNameClient) QueryHasSourceAt(pn *PackageName) *HasSourceAtQuery

QueryHasSourceAt queries the has_source_at edge of a PackageName.

func (*PackageNameClient) QueryMetadata added in v0.6.0

func (c *PackageNameClient) QueryMetadata(pn *PackageName) *HasMetadataQuery

QueryMetadata queries the metadata edge of a PackageName.

func (*PackageNameClient) QueryPoc added in v0.6.0

QueryPoc queries the poc edge of a PackageName.

func (*PackageNameClient) QueryVersions

func (c *PackageNameClient) QueryVersions(pn *PackageName) *PackageVersionQuery

QueryVersions queries the versions edge of a PackageName.

func (*PackageNameClient) Update

func (c *PackageNameClient) Update() *PackageNameUpdate

Update returns an update builder for PackageName.

func (*PackageNameClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*PackageNameClient) UpdateOneID

func (c *PackageNameClient) UpdateOneID(id uuid.UUID) *PackageNameUpdateOne

UpdateOneID returns an update builder for the given id.

func (*PackageNameClient) Use

func (c *PackageNameClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `packagename.Hooks(f(g(h())))`.

type PackageNameConnection

type PackageNameConnection struct {
	Edges      []*PackageNameEdge `json:"edges"`
	PageInfo   PageInfo           `json:"pageInfo"`
	TotalCount int                `json:"totalCount"`
}

PackageNameConnection is the connection containing edges to PackageName.

type PackageNameCreate

type PackageNameCreate struct {
	// contains filtered or unexported fields
}

PackageNameCreate is the builder for creating a PackageName entity.

func (*PackageNameCreate) AddCertification added in v0.6.0

func (pnc *PackageNameCreate) AddCertification(c ...*Certification) *PackageNameCreate

AddCertification adds the "certification" edges to the Certification entity.

func (*PackageNameCreate) AddCertificationIDs added in v0.6.0

func (pnc *PackageNameCreate) AddCertificationIDs(ids ...uuid.UUID) *PackageNameCreate

AddCertificationIDs adds the "certification" edge to the Certification entity by IDs.

func (*PackageNameCreate) AddDependency added in v0.6.0

func (pnc *PackageNameCreate) AddDependency(d ...*Dependency) *PackageNameCreate

AddDependency adds the "dependency" edges to the Dependency entity.

func (*PackageNameCreate) AddDependencyIDs added in v0.6.0

func (pnc *PackageNameCreate) AddDependencyIDs(ids ...uuid.UUID) *PackageNameCreate

AddDependencyIDs adds the "dependency" edge to the Dependency entity by IDs.

func (*PackageNameCreate) AddHasSourceAt added in v0.6.0

func (pnc *PackageNameCreate) AddHasSourceAt(h ...*HasSourceAt) *PackageNameCreate

AddHasSourceAt adds the "has_source_at" edges to the HasSourceAt entity.

func (*PackageNameCreate) AddHasSourceAtIDs added in v0.6.0

func (pnc *PackageNameCreate) AddHasSourceAtIDs(ids ...uuid.UUID) *PackageNameCreate

AddHasSourceAtIDs adds the "has_source_at" edge to the HasSourceAt entity by IDs.

func (*PackageNameCreate) AddMetadata added in v0.6.0

func (pnc *PackageNameCreate) AddMetadata(h ...*HasMetadata) *PackageNameCreate

AddMetadata adds the "metadata" edges to the HasMetadata entity.

func (*PackageNameCreate) AddMetadatumIDs added in v0.6.0

func (pnc *PackageNameCreate) AddMetadatumIDs(ids ...uuid.UUID) *PackageNameCreate

AddMetadatumIDs adds the "metadata" edge to the HasMetadata entity by IDs.

func (*PackageNameCreate) AddPoc added in v0.6.0

AddPoc adds the "poc" edges to the PointOfContact entity.

func (*PackageNameCreate) AddPocIDs added in v0.6.0

func (pnc *PackageNameCreate) AddPocIDs(ids ...uuid.UUID) *PackageNameCreate

AddPocIDs adds the "poc" edge to the PointOfContact entity by IDs.

func (*PackageNameCreate) AddVersionIDs

func (pnc *PackageNameCreate) AddVersionIDs(ids ...uuid.UUID) *PackageNameCreate

AddVersionIDs adds the "versions" edge to the PackageVersion entity by IDs.

func (*PackageNameCreate) AddVersions

func (pnc *PackageNameCreate) AddVersions(p ...*PackageVersion) *PackageNameCreate

AddVersions adds the "versions" edges to the PackageVersion entity.

func (*PackageNameCreate) Exec

func (pnc *PackageNameCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*PackageNameCreate) ExecX

func (pnc *PackageNameCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*PackageNameCreate) Mutation

func (pnc *PackageNameCreate) Mutation() *PackageNameMutation

Mutation returns the PackageNameMutation object of the builder.

func (*PackageNameCreate) OnConflict

func (pnc *PackageNameCreate) OnConflict(opts ...sql.ConflictOption) *PackageNameUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.PackageName.Create().
	SetType(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.PackageNameUpsert) {
		SetType(v+v).
	}).
	Exec(ctx)

func (*PackageNameCreate) OnConflictColumns

func (pnc *PackageNameCreate) OnConflictColumns(columns ...string) *PackageNameUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.PackageName.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*PackageNameCreate) Save

func (pnc *PackageNameCreate) Save(ctx context.Context) (*PackageName, error)

Save creates the PackageName in the database.

func (*PackageNameCreate) SaveX

func (pnc *PackageNameCreate) SaveX(ctx context.Context) *PackageName

SaveX calls Save and panics if Save returns an error.

func (*PackageNameCreate) SetID added in v0.5.0

SetID sets the "id" field.

func (*PackageNameCreate) SetName

func (pnc *PackageNameCreate) SetName(s string) *PackageNameCreate

SetName sets the "name" field.

func (*PackageNameCreate) SetNamespace

func (pnc *PackageNameCreate) SetNamespace(s string) *PackageNameCreate

SetNamespace sets the "namespace" field.

func (*PackageNameCreate) SetNillableID added in v0.5.0

func (pnc *PackageNameCreate) SetNillableID(u *uuid.UUID) *PackageNameCreate

SetNillableID sets the "id" field if the given value is not nil.

func (*PackageNameCreate) SetType added in v0.5.0

func (pnc *PackageNameCreate) SetType(s string) *PackageNameCreate

SetType sets the "type" field.

type PackageNameCreateBulk

type PackageNameCreateBulk struct {
	// contains filtered or unexported fields
}

PackageNameCreateBulk is the builder for creating many PackageName entities in bulk.

func (*PackageNameCreateBulk) Exec

func (pncb *PackageNameCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*PackageNameCreateBulk) ExecX

func (pncb *PackageNameCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*PackageNameCreateBulk) OnConflict

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.PackageName.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.PackageNameUpsert) {
		SetType(v+v).
	}).
	Exec(ctx)

func (*PackageNameCreateBulk) OnConflictColumns

func (pncb *PackageNameCreateBulk) OnConflictColumns(columns ...string) *PackageNameUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.PackageName.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*PackageNameCreateBulk) Save

func (pncb *PackageNameCreateBulk) Save(ctx context.Context) ([]*PackageName, error)

Save creates the PackageName entities in the database.

func (*PackageNameCreateBulk) SaveX

func (pncb *PackageNameCreateBulk) SaveX(ctx context.Context) []*PackageName

SaveX is like Save, but panics if an error occurs.

type PackageNameDelete

type PackageNameDelete struct {
	// contains filtered or unexported fields
}

PackageNameDelete is the builder for deleting a PackageName entity.

func (*PackageNameDelete) Exec

func (pnd *PackageNameDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*PackageNameDelete) ExecX

func (pnd *PackageNameDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*PackageNameDelete) Where

Where appends a list predicates to the PackageNameDelete builder.

type PackageNameDeleteOne

type PackageNameDeleteOne struct {
	// contains filtered or unexported fields
}

PackageNameDeleteOne is the builder for deleting a single PackageName entity.

func (*PackageNameDeleteOne) Exec

func (pndo *PackageNameDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*PackageNameDeleteOne) ExecX

func (pndo *PackageNameDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*PackageNameDeleteOne) Where

Where appends a list predicates to the PackageNameDelete builder.

type PackageNameEdge

type PackageNameEdge struct {
	Node   *PackageName `json:"node"`
	Cursor Cursor       `json:"cursor"`
}

PackageNameEdge is the edge representation of PackageName.

type PackageNameEdges

type PackageNameEdges struct {
	// Versions holds the value of the versions edge.
	Versions []*PackageVersion `json:"versions,omitempty"`
	// HasSourceAt holds the value of the has_source_at edge.
	HasSourceAt []*HasSourceAt `json:"has_source_at,omitempty"`
	// Dependency holds the value of the dependency edge.
	Dependency []*Dependency `json:"dependency,omitempty"`
	// Certification holds the value of the certification edge.
	Certification []*Certification `json:"certification,omitempty"`
	// Metadata holds the value of the metadata edge.
	Metadata []*HasMetadata `json:"metadata,omitempty"`
	// Poc holds the value of the poc edge.
	Poc []*PointOfContact `json:"poc,omitempty"`
	// contains filtered or unexported fields
}

PackageNameEdges holds the relations/edges for other nodes in the graph.

func (PackageNameEdges) CertificationOrErr added in v0.6.0

func (e PackageNameEdges) CertificationOrErr() ([]*Certification, error)

CertificationOrErr returns the Certification value or an error if the edge was not loaded in eager-loading.

func (PackageNameEdges) DependencyOrErr added in v0.6.0

func (e PackageNameEdges) DependencyOrErr() ([]*Dependency, error)

DependencyOrErr returns the Dependency value or an error if the edge was not loaded in eager-loading.

func (PackageNameEdges) HasSourceAtOrErr added in v0.6.0

func (e PackageNameEdges) HasSourceAtOrErr() ([]*HasSourceAt, error)

HasSourceAtOrErr returns the HasSourceAt value or an error if the edge was not loaded in eager-loading.

func (PackageNameEdges) MetadataOrErr added in v0.6.0

func (e PackageNameEdges) MetadataOrErr() ([]*HasMetadata, error)

MetadataOrErr returns the Metadata value or an error if the edge was not loaded in eager-loading.

func (PackageNameEdges) PocOrErr added in v0.6.0

func (e PackageNameEdges) PocOrErr() ([]*PointOfContact, error)

PocOrErr returns the Poc value or an error if the edge was not loaded in eager-loading.

func (PackageNameEdges) VersionsOrErr

func (e PackageNameEdges) VersionsOrErr() ([]*PackageVersion, error)

VersionsOrErr returns the Versions value or an error if the edge was not loaded in eager-loading.

type PackageNameGroupBy

type PackageNameGroupBy struct {
	// contains filtered or unexported fields
}

PackageNameGroupBy is the group-by builder for PackageName entities.

func (*PackageNameGroupBy) Aggregate

func (pngb *PackageNameGroupBy) Aggregate(fns ...AggregateFunc) *PackageNameGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*PackageNameGroupBy) Bool

func (s *PackageNameGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*PackageNameGroupBy) BoolX

func (s *PackageNameGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*PackageNameGroupBy) Bools

func (s *PackageNameGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*PackageNameGroupBy) BoolsX

func (s *PackageNameGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*PackageNameGroupBy) Float64

func (s *PackageNameGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*PackageNameGroupBy) Float64X

func (s *PackageNameGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*PackageNameGroupBy) Float64s

func (s *PackageNameGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*PackageNameGroupBy) Float64sX

func (s *PackageNameGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*PackageNameGroupBy) Int

func (s *PackageNameGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*PackageNameGroupBy) IntX

func (s *PackageNameGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*PackageNameGroupBy) Ints

func (s *PackageNameGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*PackageNameGroupBy) IntsX

func (s *PackageNameGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*PackageNameGroupBy) Scan

func (pngb *PackageNameGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*PackageNameGroupBy) ScanX

func (s *PackageNameGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*PackageNameGroupBy) String

func (s *PackageNameGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*PackageNameGroupBy) StringX

func (s *PackageNameGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*PackageNameGroupBy) Strings

func (s *PackageNameGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*PackageNameGroupBy) StringsX

func (s *PackageNameGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type PackageNameMutation

type PackageNameMutation struct {
	// contains filtered or unexported fields
}

PackageNameMutation represents an operation that mutates the PackageName nodes in the graph.

func (*PackageNameMutation) AddCertificationIDs added in v0.6.0

func (m *PackageNameMutation) AddCertificationIDs(ids ...uuid.UUID)

AddCertificationIDs adds the "certification" edge to the Certification entity by ids.

func (*PackageNameMutation) AddDependencyIDs added in v0.6.0

func (m *PackageNameMutation) AddDependencyIDs(ids ...uuid.UUID)

AddDependencyIDs adds the "dependency" edge to the Dependency entity by ids.

func (*PackageNameMutation) AddField

func (m *PackageNameMutation) AddField(name string, value ent.Value) error

AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*PackageNameMutation) AddHasSourceAtIDs added in v0.6.0

func (m *PackageNameMutation) AddHasSourceAtIDs(ids ...uuid.UUID)

AddHasSourceAtIDs adds the "has_source_at" edge to the HasSourceAt entity by ids.

func (*PackageNameMutation) AddMetadatumIDs added in v0.6.0

func (m *PackageNameMutation) AddMetadatumIDs(ids ...uuid.UUID)

AddMetadatumIDs adds the "metadata" edge to the HasMetadata entity by ids.

func (*PackageNameMutation) AddPocIDs added in v0.6.0

func (m *PackageNameMutation) AddPocIDs(ids ...uuid.UUID)

AddPocIDs adds the "poc" edge to the PointOfContact entity by ids.

func (*PackageNameMutation) AddVersionIDs

func (m *PackageNameMutation) AddVersionIDs(ids ...uuid.UUID)

AddVersionIDs adds the "versions" edge to the PackageVersion entity by ids.

func (*PackageNameMutation) AddedEdges

func (m *PackageNameMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*PackageNameMutation) AddedField

func (m *PackageNameMutation) AddedField(name string) (ent.Value, bool)

AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*PackageNameMutation) AddedFields

func (m *PackageNameMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*PackageNameMutation) AddedIDs

func (m *PackageNameMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*PackageNameMutation) CertificationCleared added in v0.6.0

func (m *PackageNameMutation) CertificationCleared() bool

CertificationCleared reports if the "certification" edge to the Certification entity was cleared.

func (*PackageNameMutation) CertificationIDs added in v0.6.0

func (m *PackageNameMutation) CertificationIDs() (ids []uuid.UUID)

CertificationIDs returns the "certification" edge IDs in the mutation.

func (*PackageNameMutation) ClearCertification added in v0.6.0

func (m *PackageNameMutation) ClearCertification()

ClearCertification clears the "certification" edge to the Certification entity.

func (*PackageNameMutation) ClearDependency added in v0.6.0

func (m *PackageNameMutation) ClearDependency()

ClearDependency clears the "dependency" edge to the Dependency entity.

func (*PackageNameMutation) ClearEdge

func (m *PackageNameMutation) ClearEdge(name string) error

ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.

func (*PackageNameMutation) ClearField

func (m *PackageNameMutation) ClearField(name string) error

ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.

func (*PackageNameMutation) ClearHasSourceAt added in v0.6.0

func (m *PackageNameMutation) ClearHasSourceAt()

ClearHasSourceAt clears the "has_source_at" edge to the HasSourceAt entity.

func (*PackageNameMutation) ClearMetadata added in v0.6.0

func (m *PackageNameMutation) ClearMetadata()

ClearMetadata clears the "metadata" edge to the HasMetadata entity.

func (*PackageNameMutation) ClearPoc added in v0.6.0

func (m *PackageNameMutation) ClearPoc()

ClearPoc clears the "poc" edge to the PointOfContact entity.

func (*PackageNameMutation) ClearVersions

func (m *PackageNameMutation) ClearVersions()

ClearVersions clears the "versions" edge to the PackageVersion entity.

func (*PackageNameMutation) ClearedEdges

func (m *PackageNameMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*PackageNameMutation) ClearedFields

func (m *PackageNameMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (PackageNameMutation) Client

func (m PackageNameMutation) Client() *Client

Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.

func (*PackageNameMutation) DependencyCleared added in v0.6.0

func (m *PackageNameMutation) DependencyCleared() bool

DependencyCleared reports if the "dependency" edge to the Dependency entity was cleared.

func (*PackageNameMutation) DependencyIDs added in v0.6.0

func (m *PackageNameMutation) DependencyIDs() (ids []uuid.UUID)

DependencyIDs returns the "dependency" edge IDs in the mutation.

func (*PackageNameMutation) EdgeCleared

func (m *PackageNameMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*PackageNameMutation) Field

func (m *PackageNameMutation) Field(name string) (ent.Value, bool)

Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*PackageNameMutation) FieldCleared

func (m *PackageNameMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*PackageNameMutation) Fields

func (m *PackageNameMutation) Fields() []string

Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().

func (*PackageNameMutation) GetType added in v0.5.0

func (m *PackageNameMutation) GetType() (r string, exists bool)

GetType returns the value of the "type" field in the mutation.

func (*PackageNameMutation) HasSourceAtCleared added in v0.6.0

func (m *PackageNameMutation) HasSourceAtCleared() bool

HasSourceAtCleared reports if the "has_source_at" edge to the HasSourceAt entity was cleared.

func (*PackageNameMutation) HasSourceAtIDs added in v0.6.0

func (m *PackageNameMutation) HasSourceAtIDs() (ids []uuid.UUID)

HasSourceAtIDs returns the "has_source_at" edge IDs in the mutation.

func (*PackageNameMutation) ID

func (m *PackageNameMutation) ID() (id uuid.UUID, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*PackageNameMutation) IDs

func (m *PackageNameMutation) IDs(ctx context.Context) ([]uuid.UUID, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*PackageNameMutation) MetadataCleared added in v0.6.0

func (m *PackageNameMutation) MetadataCleared() bool

MetadataCleared reports if the "metadata" edge to the HasMetadata entity was cleared.

func (*PackageNameMutation) MetadataIDs added in v0.6.0

func (m *PackageNameMutation) MetadataIDs() (ids []uuid.UUID)

MetadataIDs returns the "metadata" edge IDs in the mutation.

func (*PackageNameMutation) Name

func (m *PackageNameMutation) Name() (r string, exists bool)

Name returns the value of the "name" field in the mutation.

func (*PackageNameMutation) Namespace added in v0.5.0

func (m *PackageNameMutation) Namespace() (r string, exists bool)

Namespace returns the value of the "namespace" field in the mutation.

func (*PackageNameMutation) OldField

func (m *PackageNameMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*PackageNameMutation) OldName

func (m *PackageNameMutation) OldName(ctx context.Context) (v string, err error)

OldName returns the old "name" field's value of the PackageName entity. If the PackageName object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*PackageNameMutation) OldNamespace added in v0.5.0

func (m *PackageNameMutation) OldNamespace(ctx context.Context) (v string, err error)

OldNamespace returns the old "namespace" field's value of the PackageName entity. If the PackageName object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*PackageNameMutation) OldType added in v0.5.0

func (m *PackageNameMutation) OldType(ctx context.Context) (v string, err error)

OldType returns the old "type" field's value of the PackageName entity. If the PackageName object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*PackageNameMutation) Op

func (m *PackageNameMutation) Op() Op

Op returns the operation name.

func (*PackageNameMutation) PocCleared added in v0.6.0

func (m *PackageNameMutation) PocCleared() bool

PocCleared reports if the "poc" edge to the PointOfContact entity was cleared.

func (*PackageNameMutation) PocIDs added in v0.6.0

func (m *PackageNameMutation) PocIDs() (ids []uuid.UUID)

PocIDs returns the "poc" edge IDs in the mutation.

func (*PackageNameMutation) RemoveCertificationIDs added in v0.6.0

func (m *PackageNameMutation) RemoveCertificationIDs(ids ...uuid.UUID)

RemoveCertificationIDs removes the "certification" edge to the Certification entity by IDs.

func (*PackageNameMutation) RemoveDependencyIDs added in v0.6.0

func (m *PackageNameMutation) RemoveDependencyIDs(ids ...uuid.UUID)

RemoveDependencyIDs removes the "dependency" edge to the Dependency entity by IDs.

func (*PackageNameMutation) RemoveHasSourceAtIDs added in v0.6.0

func (m *PackageNameMutation) RemoveHasSourceAtIDs(ids ...uuid.UUID)

RemoveHasSourceAtIDs removes the "has_source_at" edge to the HasSourceAt entity by IDs.

func (*PackageNameMutation) RemoveMetadatumIDs added in v0.6.0

func (m *PackageNameMutation) RemoveMetadatumIDs(ids ...uuid.UUID)

RemoveMetadatumIDs removes the "metadata" edge to the HasMetadata entity by IDs.

func (*PackageNameMutation) RemovePocIDs added in v0.6.0

func (m *PackageNameMutation) RemovePocIDs(ids ...uuid.UUID)

RemovePocIDs removes the "poc" edge to the PointOfContact entity by IDs.

func (*PackageNameMutation) RemoveVersionIDs

func (m *PackageNameMutation) RemoveVersionIDs(ids ...uuid.UUID)

RemoveVersionIDs removes the "versions" edge to the PackageVersion entity by IDs.

func (*PackageNameMutation) RemovedCertificationIDs added in v0.6.0

func (m *PackageNameMutation) RemovedCertificationIDs() (ids []uuid.UUID)

RemovedCertification returns the removed IDs of the "certification" edge to the Certification entity.

func (*PackageNameMutation) RemovedDependencyIDs added in v0.6.0

func (m *PackageNameMutation) RemovedDependencyIDs() (ids []uuid.UUID)

RemovedDependency returns the removed IDs of the "dependency" edge to the Dependency entity.

func (*PackageNameMutation) RemovedEdges

func (m *PackageNameMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*PackageNameMutation) RemovedHasSourceAtIDs added in v0.6.0

func (m *PackageNameMutation) RemovedHasSourceAtIDs() (ids []uuid.UUID)

RemovedHasSourceAt returns the removed IDs of the "has_source_at" edge to the HasSourceAt entity.

func (*PackageNameMutation) RemovedIDs

func (m *PackageNameMutation) RemovedIDs(name string) []ent.Value

RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.

func (*PackageNameMutation) RemovedMetadataIDs added in v0.6.0

func (m *PackageNameMutation) RemovedMetadataIDs() (ids []uuid.UUID)

RemovedMetadata returns the removed IDs of the "metadata" edge to the HasMetadata entity.

func (*PackageNameMutation) RemovedPocIDs added in v0.6.0

func (m *PackageNameMutation) RemovedPocIDs() (ids []uuid.UUID)

RemovedPoc returns the removed IDs of the "poc" edge to the PointOfContact entity.

func (*PackageNameMutation) RemovedVersionsIDs

func (m *PackageNameMutation) RemovedVersionsIDs() (ids []uuid.UUID)

RemovedVersions returns the removed IDs of the "versions" edge to the PackageVersion entity.

func (*PackageNameMutation) ResetCertification added in v0.6.0

func (m *PackageNameMutation) ResetCertification()

ResetCertification resets all changes to the "certification" edge.

func (*PackageNameMutation) ResetDependency added in v0.6.0

func (m *PackageNameMutation) ResetDependency()

ResetDependency resets all changes to the "dependency" edge.

func (*PackageNameMutation) ResetEdge

func (m *PackageNameMutation) ResetEdge(name string) error

ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.

func (*PackageNameMutation) ResetField

func (m *PackageNameMutation) ResetField(name string) error

ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.

func (*PackageNameMutation) ResetHasSourceAt added in v0.6.0

func (m *PackageNameMutation) ResetHasSourceAt()

ResetHasSourceAt resets all changes to the "has_source_at" edge.

func (*PackageNameMutation) ResetMetadata added in v0.6.0

func (m *PackageNameMutation) ResetMetadata()

ResetMetadata resets all changes to the "metadata" edge.

func (*PackageNameMutation) ResetName

func (m *PackageNameMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*PackageNameMutation) ResetNamespace

func (m *PackageNameMutation) ResetNamespace()

ResetNamespace resets all changes to the "namespace" field.

func (*PackageNameMutation) ResetPoc added in v0.6.0

func (m *PackageNameMutation) ResetPoc()

ResetPoc resets all changes to the "poc" edge.

func (*PackageNameMutation) ResetType added in v0.5.0

func (m *PackageNameMutation) ResetType()

ResetType resets all changes to the "type" field.

func (*PackageNameMutation) ResetVersions

func (m *PackageNameMutation) ResetVersions()

ResetVersions resets all changes to the "versions" edge.

func (*PackageNameMutation) SetField

func (m *PackageNameMutation) SetField(name string, value ent.Value) error

SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*PackageNameMutation) SetID added in v0.5.0

func (m *PackageNameMutation) SetID(id uuid.UUID)

SetID sets the value of the id field. Note that this operation is only accepted on creation of PackageName entities.

func (*PackageNameMutation) SetName

func (m *PackageNameMutation) SetName(s string)

SetName sets the "name" field.

func (*PackageNameMutation) SetNamespace added in v0.5.0

func (m *PackageNameMutation) SetNamespace(s string)

SetNamespace sets the "namespace" field.

func (*PackageNameMutation) SetOp

func (m *PackageNameMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*PackageNameMutation) SetType added in v0.5.0

func (m *PackageNameMutation) SetType(s string)

SetType sets the "type" field.

func (PackageNameMutation) Tx

func (m PackageNameMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*PackageNameMutation) Type

func (m *PackageNameMutation) Type() string

Type returns the node type of this mutation (PackageName).

func (*PackageNameMutation) VersionsCleared

func (m *PackageNameMutation) VersionsCleared() bool

VersionsCleared reports if the "versions" edge to the PackageVersion entity was cleared.

func (*PackageNameMutation) VersionsIDs

func (m *PackageNameMutation) VersionsIDs() (ids []uuid.UUID)

VersionsIDs returns the "versions" edge IDs in the mutation.

func (*PackageNameMutation) Where

func (m *PackageNameMutation) Where(ps ...predicate.PackageName)

Where appends a list predicates to the PackageNameMutation builder.

func (*PackageNameMutation) WhereP

func (m *PackageNameMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the PackageNameMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type PackageNameOrder

type PackageNameOrder struct {
	Direction OrderDirection         `json:"direction"`
	Field     *PackageNameOrderField `json:"field"`
}

PackageNameOrder defines the ordering of PackageName.

type PackageNameOrderField

type PackageNameOrderField struct {
	// Value extracts the ordering value from the given PackageName.
	Value func(*PackageName) (ent.Value, error)
	// contains filtered or unexported fields
}

PackageNameOrderField defines the ordering field of PackageName.

type PackageNamePaginateOption

type PackageNamePaginateOption func(*packagenamePager) error

PackageNamePaginateOption enables pagination customization.

func WithPackageNameFilter

func WithPackageNameFilter(filter func(*PackageNameQuery) (*PackageNameQuery, error)) PackageNamePaginateOption

WithPackageNameFilter configures pagination filter.

func WithPackageNameOrder

func WithPackageNameOrder(order *PackageNameOrder) PackageNamePaginateOption

WithPackageNameOrder configures pagination ordering.

type PackageNameQuery

type PackageNameQuery struct {
	// contains filtered or unexported fields
}

PackageNameQuery is the builder for querying PackageName entities.

func (*PackageNameQuery) Aggregate

func (pnq *PackageNameQuery) Aggregate(fns ...AggregateFunc) *PackageNameSelect

Aggregate returns a PackageNameSelect configured with the given aggregations.

func (*PackageNameQuery) All

func (pnq *PackageNameQuery) All(ctx context.Context) ([]*PackageName, error)

All executes the query and returns a list of PackageNames.

func (*PackageNameQuery) AllX

func (pnq *PackageNameQuery) AllX(ctx context.Context) []*PackageName

AllX is like All, but panics if an error occurs.

func (*PackageNameQuery) Clone

func (pnq *PackageNameQuery) Clone() *PackageNameQuery

Clone returns a duplicate of the PackageNameQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*PackageNameQuery) CollectFields

func (pn *PackageNameQuery) CollectFields(ctx context.Context, satisfies ...string) (*PackageNameQuery, error)

CollectFields tells the query-builder to eagerly load connected nodes by resolver context.

func (*PackageNameQuery) Count

func (pnq *PackageNameQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*PackageNameQuery) CountX

func (pnq *PackageNameQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*PackageNameQuery) Exist

func (pnq *PackageNameQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*PackageNameQuery) ExistX

func (pnq *PackageNameQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*PackageNameQuery) First

func (pnq *PackageNameQuery) First(ctx context.Context) (*PackageName, error)

First returns the first PackageName entity from the query. Returns a *NotFoundError when no PackageName was found.

func (*PackageNameQuery) FirstID

func (pnq *PackageNameQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)

FirstID returns the first PackageName ID from the query. Returns a *NotFoundError when no PackageName ID was found.

func (*PackageNameQuery) FirstIDX

func (pnq *PackageNameQuery) FirstIDX(ctx context.Context) uuid.UUID

FirstIDX is like FirstID, but panics if an error occurs.

func (*PackageNameQuery) FirstX

func (pnq *PackageNameQuery) FirstX(ctx context.Context) *PackageName

FirstX is like First, but panics if an error occurs.

func (*PackageNameQuery) GroupBy

func (pnq *PackageNameQuery) GroupBy(field string, fields ...string) *PackageNameGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	Type string `json:"type,omitempty"`
	Count int `json:"count,omitempty"`
}

client.PackageName.Query().
	GroupBy(packagename.FieldType).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*PackageNameQuery) IDs

func (pnq *PackageNameQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)

IDs executes the query and returns a list of PackageName IDs.

func (*PackageNameQuery) IDsX

func (pnq *PackageNameQuery) IDsX(ctx context.Context) []uuid.UUID

IDsX is like IDs, but panics if an error occurs.

func (*PackageNameQuery) Limit

func (pnq *PackageNameQuery) Limit(limit int) *PackageNameQuery

Limit the number of records to be returned by this query.

func (*PackageNameQuery) Offset

func (pnq *PackageNameQuery) Offset(offset int) *PackageNameQuery

Offset to start from.

func (*PackageNameQuery) Only

func (pnq *PackageNameQuery) Only(ctx context.Context) (*PackageName, error)

Only returns a single PackageName entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one PackageName entity is found. Returns a *NotFoundError when no PackageName entities are found.

func (*PackageNameQuery) OnlyID

func (pnq *PackageNameQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)

OnlyID is like Only, but returns the only PackageName ID in the query. Returns a *NotSingularError when more than one PackageName ID is found. Returns a *NotFoundError when no entities are found.

func (*PackageNameQuery) OnlyIDX

func (pnq *PackageNameQuery) OnlyIDX(ctx context.Context) uuid.UUID

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*PackageNameQuery) OnlyX

func (pnq *PackageNameQuery) OnlyX(ctx context.Context) *PackageName

OnlyX is like Only, but panics if an error occurs.

func (*PackageNameQuery) Order

Order specifies how the records should be ordered.

func (*PackageNameQuery) Paginate

func (pn *PackageNameQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...PackageNamePaginateOption,
) (*PackageNameConnection, error)

Paginate executes the query and returns a relay based cursor connection to PackageName.

func (*PackageNameQuery) QueryCertification added in v0.6.0

func (pnq *PackageNameQuery) QueryCertification() *CertificationQuery

QueryCertification chains the current query on the "certification" edge.

func (*PackageNameQuery) QueryDependency added in v0.6.0

func (pnq *PackageNameQuery) QueryDependency() *DependencyQuery

QueryDependency chains the current query on the "dependency" edge.

func (*PackageNameQuery) QueryHasSourceAt added in v0.6.0

func (pnq *PackageNameQuery) QueryHasSourceAt() *HasSourceAtQuery

QueryHasSourceAt chains the current query on the "has_source_at" edge.

func (*PackageNameQuery) QueryMetadata added in v0.6.0

func (pnq *PackageNameQuery) QueryMetadata() *HasMetadataQuery

QueryMetadata chains the current query on the "metadata" edge.

func (*PackageNameQuery) QueryPoc added in v0.6.0

func (pnq *PackageNameQuery) QueryPoc() *PointOfContactQuery

QueryPoc chains the current query on the "poc" edge.

func (*PackageNameQuery) QueryVersions

func (pnq *PackageNameQuery) QueryVersions() *PackageVersionQuery

QueryVersions chains the current query on the "versions" edge.

func (*PackageNameQuery) Select

func (pnq *PackageNameQuery) Select(fields ...string) *PackageNameSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	Type string `json:"type,omitempty"`
}

client.PackageName.Query().
	Select(packagename.FieldType).
	Scan(ctx, &v)

func (*PackageNameQuery) Unique

func (pnq *PackageNameQuery) Unique(unique bool) *PackageNameQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*PackageNameQuery) Where

Where adds a new predicate for the PackageNameQuery builder.

func (*PackageNameQuery) WithCertification added in v0.6.0

func (pnq *PackageNameQuery) WithCertification(opts ...func(*CertificationQuery)) *PackageNameQuery

WithCertification tells the query-builder to eager-load the nodes that are connected to the "certification" edge. The optional arguments are used to configure the query builder of the edge.

func (*PackageNameQuery) WithDependency added in v0.6.0

func (pnq *PackageNameQuery) WithDependency(opts ...func(*DependencyQuery)) *PackageNameQuery

WithDependency tells the query-builder to eager-load the nodes that are connected to the "dependency" edge. The optional arguments are used to configure the query builder of the edge.

func (*PackageNameQuery) WithHasSourceAt added in v0.6.0

func (pnq *PackageNameQuery) WithHasSourceAt(opts ...func(*HasSourceAtQuery)) *PackageNameQuery

WithHasSourceAt tells the query-builder to eager-load the nodes that are connected to the "has_source_at" edge. The optional arguments are used to configure the query builder of the edge.

func (*PackageNameQuery) WithMetadata added in v0.6.0

func (pnq *PackageNameQuery) WithMetadata(opts ...func(*HasMetadataQuery)) *PackageNameQuery

WithMetadata tells the query-builder to eager-load the nodes that are connected to the "metadata" edge. The optional arguments are used to configure the query builder of the edge.

func (*PackageNameQuery) WithNamedCertification added in v0.6.0

func (pnq *PackageNameQuery) WithNamedCertification(name string, opts ...func(*CertificationQuery)) *PackageNameQuery

WithNamedCertification tells the query-builder to eager-load the nodes that are connected to the "certification" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*PackageNameQuery) WithNamedDependency added in v0.6.0

func (pnq *PackageNameQuery) WithNamedDependency(name string, opts ...func(*DependencyQuery)) *PackageNameQuery

WithNamedDependency tells the query-builder to eager-load the nodes that are connected to the "dependency" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*PackageNameQuery) WithNamedHasSourceAt added in v0.6.0

func (pnq *PackageNameQuery) WithNamedHasSourceAt(name string, opts ...func(*HasSourceAtQuery)) *PackageNameQuery

WithNamedHasSourceAt tells the query-builder to eager-load the nodes that are connected to the "has_source_at" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*PackageNameQuery) WithNamedMetadata added in v0.6.0

func (pnq *PackageNameQuery) WithNamedMetadata(name string, opts ...func(*HasMetadataQuery)) *PackageNameQuery

WithNamedMetadata tells the query-builder to eager-load the nodes that are connected to the "metadata" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*PackageNameQuery) WithNamedPoc added in v0.6.0

func (pnq *PackageNameQuery) WithNamedPoc(name string, opts ...func(*PointOfContactQuery)) *PackageNameQuery

WithNamedPoc tells the query-builder to eager-load the nodes that are connected to the "poc" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*PackageNameQuery) WithNamedVersions

func (pnq *PackageNameQuery) WithNamedVersions(name string, opts ...func(*PackageVersionQuery)) *PackageNameQuery

WithNamedVersions tells the query-builder to eager-load the nodes that are connected to the "versions" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*PackageNameQuery) WithPoc added in v0.6.0

func (pnq *PackageNameQuery) WithPoc(opts ...func(*PointOfContactQuery)) *PackageNameQuery

WithPoc tells the query-builder to eager-load the nodes that are connected to the "poc" edge. The optional arguments are used to configure the query builder of the edge.

func (*PackageNameQuery) WithVersions

func (pnq *PackageNameQuery) WithVersions(opts ...func(*PackageVersionQuery)) *PackageNameQuery

WithVersions tells the query-builder to eager-load the nodes that are connected to the "versions" edge. The optional arguments are used to configure the query builder of the edge.

type PackageNameSelect

type PackageNameSelect struct {
	*PackageNameQuery
	// contains filtered or unexported fields
}

PackageNameSelect is the builder for selecting fields of PackageName entities.

func (*PackageNameSelect) Aggregate

func (pns *PackageNameSelect) Aggregate(fns ...AggregateFunc) *PackageNameSelect

Aggregate adds the given aggregation functions to the selector query.

func (*PackageNameSelect) Bool

func (s *PackageNameSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*PackageNameSelect) BoolX

func (s *PackageNameSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*PackageNameSelect) Bools

func (s *PackageNameSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*PackageNameSelect) BoolsX

func (s *PackageNameSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*PackageNameSelect) Float64

func (s *PackageNameSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*PackageNameSelect) Float64X

func (s *PackageNameSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*PackageNameSelect) Float64s

func (s *PackageNameSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*PackageNameSelect) Float64sX

func (s *PackageNameSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*PackageNameSelect) Int

func (s *PackageNameSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*PackageNameSelect) IntX

func (s *PackageNameSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*PackageNameSelect) Ints

func (s *PackageNameSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*PackageNameSelect) IntsX

func (s *PackageNameSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*PackageNameSelect) Scan

func (pns *PackageNameSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*PackageNameSelect) ScanX

func (s *PackageNameSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*PackageNameSelect) String

func (s *PackageNameSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*PackageNameSelect) StringX

func (s *PackageNameSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*PackageNameSelect) Strings

func (s *PackageNameSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*PackageNameSelect) StringsX

func (s *PackageNameSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type PackageNameUpdate

type PackageNameUpdate struct {
	// contains filtered or unexported fields
}

PackageNameUpdate is the builder for updating PackageName entities.

func (*PackageNameUpdate) AddCertification added in v0.6.0

func (pnu *PackageNameUpdate) AddCertification(c ...*Certification) *PackageNameUpdate

AddCertification adds the "certification" edges to the Certification entity.

func (*PackageNameUpdate) AddCertificationIDs added in v0.6.0

func (pnu *PackageNameUpdate) AddCertificationIDs(ids ...uuid.UUID) *PackageNameUpdate

AddCertificationIDs adds the "certification" edge to the Certification entity by IDs.

func (*PackageNameUpdate) AddDependency added in v0.6.0

func (pnu *PackageNameUpdate) AddDependency(d ...*Dependency) *PackageNameUpdate

AddDependency adds the "dependency" edges to the Dependency entity.

func (*PackageNameUpdate) AddDependencyIDs added in v0.6.0

func (pnu *PackageNameUpdate) AddDependencyIDs(ids ...uuid.UUID) *PackageNameUpdate

AddDependencyIDs adds the "dependency" edge to the Dependency entity by IDs.

func (*PackageNameUpdate) AddHasSourceAt added in v0.6.0

func (pnu *PackageNameUpdate) AddHasSourceAt(h ...*HasSourceAt) *PackageNameUpdate

AddHasSourceAt adds the "has_source_at" edges to the HasSourceAt entity.

func (*PackageNameUpdate) AddHasSourceAtIDs added in v0.6.0

func (pnu *PackageNameUpdate) AddHasSourceAtIDs(ids ...uuid.UUID) *PackageNameUpdate

AddHasSourceAtIDs adds the "has_source_at" edge to the HasSourceAt entity by IDs.

func (*PackageNameUpdate) AddMetadata added in v0.6.0

func (pnu *PackageNameUpdate) AddMetadata(h ...*HasMetadata) *PackageNameUpdate

AddMetadata adds the "metadata" edges to the HasMetadata entity.

func (*PackageNameUpdate) AddMetadatumIDs added in v0.6.0

func (pnu *PackageNameUpdate) AddMetadatumIDs(ids ...uuid.UUID) *PackageNameUpdate

AddMetadatumIDs adds the "metadata" edge to the HasMetadata entity by IDs.

func (*PackageNameUpdate) AddPoc added in v0.6.0

AddPoc adds the "poc" edges to the PointOfContact entity.

func (*PackageNameUpdate) AddPocIDs added in v0.6.0

func (pnu *PackageNameUpdate) AddPocIDs(ids ...uuid.UUID) *PackageNameUpdate

AddPocIDs adds the "poc" edge to the PointOfContact entity by IDs.

func (*PackageNameUpdate) AddVersionIDs

func (pnu *PackageNameUpdate) AddVersionIDs(ids ...uuid.UUID) *PackageNameUpdate

AddVersionIDs adds the "versions" edge to the PackageVersion entity by IDs.

func (*PackageNameUpdate) AddVersions

func (pnu *PackageNameUpdate) AddVersions(p ...*PackageVersion) *PackageNameUpdate

AddVersions adds the "versions" edges to the PackageVersion entity.

func (*PackageNameUpdate) ClearCertification added in v0.6.0

func (pnu *PackageNameUpdate) ClearCertification() *PackageNameUpdate

ClearCertification clears all "certification" edges to the Certification entity.

func (*PackageNameUpdate) ClearDependency added in v0.6.0

func (pnu *PackageNameUpdate) ClearDependency() *PackageNameUpdate

ClearDependency clears all "dependency" edges to the Dependency entity.

func (*PackageNameUpdate) ClearHasSourceAt added in v0.6.0

func (pnu *PackageNameUpdate) ClearHasSourceAt() *PackageNameUpdate

ClearHasSourceAt clears all "has_source_at" edges to the HasSourceAt entity.

func (*PackageNameUpdate) ClearMetadata added in v0.6.0

func (pnu *PackageNameUpdate) ClearMetadata() *PackageNameUpdate

ClearMetadata clears all "metadata" edges to the HasMetadata entity.

func (*PackageNameUpdate) ClearPoc added in v0.6.0

func (pnu *PackageNameUpdate) ClearPoc() *PackageNameUpdate

ClearPoc clears all "poc" edges to the PointOfContact entity.

func (*PackageNameUpdate) ClearVersions

func (pnu *PackageNameUpdate) ClearVersions() *PackageNameUpdate

ClearVersions clears all "versions" edges to the PackageVersion entity.

func (*PackageNameUpdate) Exec

func (pnu *PackageNameUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*PackageNameUpdate) ExecX

func (pnu *PackageNameUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*PackageNameUpdate) Mutation

func (pnu *PackageNameUpdate) Mutation() *PackageNameMutation

Mutation returns the PackageNameMutation object of the builder.

func (*PackageNameUpdate) RemoveCertification added in v0.6.0

func (pnu *PackageNameUpdate) RemoveCertification(c ...*Certification) *PackageNameUpdate

RemoveCertification removes "certification" edges to Certification entities.

func (*PackageNameUpdate) RemoveCertificationIDs added in v0.6.0

func (pnu *PackageNameUpdate) RemoveCertificationIDs(ids ...uuid.UUID) *PackageNameUpdate

RemoveCertificationIDs removes the "certification" edge to Certification entities by IDs.

func (*PackageNameUpdate) RemoveDependency added in v0.6.0

func (pnu *PackageNameUpdate) RemoveDependency(d ...*Dependency) *PackageNameUpdate

RemoveDependency removes "dependency" edges to Dependency entities.

func (*PackageNameUpdate) RemoveDependencyIDs added in v0.6.0

func (pnu *PackageNameUpdate) RemoveDependencyIDs(ids ...uuid.UUID) *PackageNameUpdate

RemoveDependencyIDs removes the "dependency" edge to Dependency entities by IDs.

func (*PackageNameUpdate) RemoveHasSourceAt added in v0.6.0

func (pnu *PackageNameUpdate) RemoveHasSourceAt(h ...*HasSourceAt) *PackageNameUpdate

RemoveHasSourceAt removes "has_source_at" edges to HasSourceAt entities.

func (*PackageNameUpdate) RemoveHasSourceAtIDs added in v0.6.0

func (pnu *PackageNameUpdate) RemoveHasSourceAtIDs(ids ...uuid.UUID) *PackageNameUpdate

RemoveHasSourceAtIDs removes the "has_source_at" edge to HasSourceAt entities by IDs.

func (*PackageNameUpdate) RemoveMetadata added in v0.6.0

func (pnu *PackageNameUpdate) RemoveMetadata(h ...*HasMetadata) *PackageNameUpdate

RemoveMetadata removes "metadata" edges to HasMetadata entities.

func (*PackageNameUpdate) RemoveMetadatumIDs added in v0.6.0

func (pnu *PackageNameUpdate) RemoveMetadatumIDs(ids ...uuid.UUID) *PackageNameUpdate

RemoveMetadatumIDs removes the "metadata" edge to HasMetadata entities by IDs.

func (*PackageNameUpdate) RemovePoc added in v0.6.0

func (pnu *PackageNameUpdate) RemovePoc(p ...*PointOfContact) *PackageNameUpdate

RemovePoc removes "poc" edges to PointOfContact entities.

func (*PackageNameUpdate) RemovePocIDs added in v0.6.0

func (pnu *PackageNameUpdate) RemovePocIDs(ids ...uuid.UUID) *PackageNameUpdate

RemovePocIDs removes the "poc" edge to PointOfContact entities by IDs.

func (*PackageNameUpdate) RemoveVersionIDs

func (pnu *PackageNameUpdate) RemoveVersionIDs(ids ...uuid.UUID) *PackageNameUpdate

RemoveVersionIDs removes the "versions" edge to PackageVersion entities by IDs.

func (*PackageNameUpdate) RemoveVersions

func (pnu *PackageNameUpdate) RemoveVersions(p ...*PackageVersion) *PackageNameUpdate

RemoveVersions removes "versions" edges to PackageVersion entities.

func (*PackageNameUpdate) Save

func (pnu *PackageNameUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*PackageNameUpdate) SaveX

func (pnu *PackageNameUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*PackageNameUpdate) SetName

func (pnu *PackageNameUpdate) SetName(s string) *PackageNameUpdate

SetName sets the "name" field.

func (*PackageNameUpdate) SetNamespace

func (pnu *PackageNameUpdate) SetNamespace(s string) *PackageNameUpdate

SetNamespace sets the "namespace" field.

func (*PackageNameUpdate) SetNillableName added in v0.4.0

func (pnu *PackageNameUpdate) SetNillableName(s *string) *PackageNameUpdate

SetNillableName sets the "name" field if the given value is not nil.

func (*PackageNameUpdate) SetNillableNamespace added in v0.5.0

func (pnu *PackageNameUpdate) SetNillableNamespace(s *string) *PackageNameUpdate

SetNillableNamespace sets the "namespace" field if the given value is not nil.

func (*PackageNameUpdate) SetNillableType added in v0.5.0

func (pnu *PackageNameUpdate) SetNillableType(s *string) *PackageNameUpdate

SetNillableType sets the "type" field if the given value is not nil.

func (*PackageNameUpdate) SetType added in v0.5.0

func (pnu *PackageNameUpdate) SetType(s string) *PackageNameUpdate

SetType sets the "type" field.

func (*PackageNameUpdate) Where

Where appends a list predicates to the PackageNameUpdate builder.

type PackageNameUpdateOne

type PackageNameUpdateOne struct {
	// contains filtered or unexported fields
}

PackageNameUpdateOne is the builder for updating a single PackageName entity.

func (*PackageNameUpdateOne) AddCertification added in v0.6.0

func (pnuo *PackageNameUpdateOne) AddCertification(c ...*Certification) *PackageNameUpdateOne

AddCertification adds the "certification" edges to the Certification entity.

func (*PackageNameUpdateOne) AddCertificationIDs added in v0.6.0

func (pnuo *PackageNameUpdateOne) AddCertificationIDs(ids ...uuid.UUID) *PackageNameUpdateOne

AddCertificationIDs adds the "certification" edge to the Certification entity by IDs.

func (*PackageNameUpdateOne) AddDependency added in v0.6.0

func (pnuo *PackageNameUpdateOne) AddDependency(d ...*Dependency) *PackageNameUpdateOne

AddDependency adds the "dependency" edges to the Dependency entity.

func (*PackageNameUpdateOne) AddDependencyIDs added in v0.6.0

func (pnuo *PackageNameUpdateOne) AddDependencyIDs(ids ...uuid.UUID) *PackageNameUpdateOne

AddDependencyIDs adds the "dependency" edge to the Dependency entity by IDs.

func (*PackageNameUpdateOne) AddHasSourceAt added in v0.6.0

func (pnuo *PackageNameUpdateOne) AddHasSourceAt(h ...*HasSourceAt) *PackageNameUpdateOne

AddHasSourceAt adds the "has_source_at" edges to the HasSourceAt entity.

func (*PackageNameUpdateOne) AddHasSourceAtIDs added in v0.6.0

func (pnuo *PackageNameUpdateOne) AddHasSourceAtIDs(ids ...uuid.UUID) *PackageNameUpdateOne

AddHasSourceAtIDs adds the "has_source_at" edge to the HasSourceAt entity by IDs.

func (*PackageNameUpdateOne) AddMetadata added in v0.6.0

func (pnuo *PackageNameUpdateOne) AddMetadata(h ...*HasMetadata) *PackageNameUpdateOne

AddMetadata adds the "metadata" edges to the HasMetadata entity.

func (*PackageNameUpdateOne) AddMetadatumIDs added in v0.6.0

func (pnuo *PackageNameUpdateOne) AddMetadatumIDs(ids ...uuid.UUID) *PackageNameUpdateOne

AddMetadatumIDs adds the "metadata" edge to the HasMetadata entity by IDs.

func (*PackageNameUpdateOne) AddPoc added in v0.6.0

AddPoc adds the "poc" edges to the PointOfContact entity.

func (*PackageNameUpdateOne) AddPocIDs added in v0.6.0

func (pnuo *PackageNameUpdateOne) AddPocIDs(ids ...uuid.UUID) *PackageNameUpdateOne

AddPocIDs adds the "poc" edge to the PointOfContact entity by IDs.

func (*PackageNameUpdateOne) AddVersionIDs

func (pnuo *PackageNameUpdateOne) AddVersionIDs(ids ...uuid.UUID) *PackageNameUpdateOne

AddVersionIDs adds the "versions" edge to the PackageVersion entity by IDs.

func (*PackageNameUpdateOne) AddVersions

func (pnuo *PackageNameUpdateOne) AddVersions(p ...*PackageVersion) *PackageNameUpdateOne

AddVersions adds the "versions" edges to the PackageVersion entity.

func (*PackageNameUpdateOne) ClearCertification added in v0.6.0

func (pnuo *PackageNameUpdateOne) ClearCertification() *PackageNameUpdateOne

ClearCertification clears all "certification" edges to the Certification entity.

func (*PackageNameUpdateOne) ClearDependency added in v0.6.0

func (pnuo *PackageNameUpdateOne) ClearDependency() *PackageNameUpdateOne

ClearDependency clears all "dependency" edges to the Dependency entity.

func (*PackageNameUpdateOne) ClearHasSourceAt added in v0.6.0

func (pnuo *PackageNameUpdateOne) ClearHasSourceAt() *PackageNameUpdateOne

ClearHasSourceAt clears all "has_source_at" edges to the HasSourceAt entity.

func (*PackageNameUpdateOne) ClearMetadata added in v0.6.0

func (pnuo *PackageNameUpdateOne) ClearMetadata() *PackageNameUpdateOne

ClearMetadata clears all "metadata" edges to the HasMetadata entity.

func (*PackageNameUpdateOne) ClearPoc added in v0.6.0

func (pnuo *PackageNameUpdateOne) ClearPoc() *PackageNameUpdateOne

ClearPoc clears all "poc" edges to the PointOfContact entity.

func (*PackageNameUpdateOne) ClearVersions

func (pnuo *PackageNameUpdateOne) ClearVersions() *PackageNameUpdateOne

ClearVersions clears all "versions" edges to the PackageVersion entity.

func (*PackageNameUpdateOne) Exec

func (pnuo *PackageNameUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*PackageNameUpdateOne) ExecX

func (pnuo *PackageNameUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*PackageNameUpdateOne) Mutation

func (pnuo *PackageNameUpdateOne) Mutation() *PackageNameMutation

Mutation returns the PackageNameMutation object of the builder.

func (*PackageNameUpdateOne) RemoveCertification added in v0.6.0

func (pnuo *PackageNameUpdateOne) RemoveCertification(c ...*Certification) *PackageNameUpdateOne

RemoveCertification removes "certification" edges to Certification entities.

func (*PackageNameUpdateOne) RemoveCertificationIDs added in v0.6.0

func (pnuo *PackageNameUpdateOne) RemoveCertificationIDs(ids ...uuid.UUID) *PackageNameUpdateOne

RemoveCertificationIDs removes the "certification" edge to Certification entities by IDs.

func (*PackageNameUpdateOne) RemoveDependency added in v0.6.0

func (pnuo *PackageNameUpdateOne) RemoveDependency(d ...*Dependency) *PackageNameUpdateOne

RemoveDependency removes "dependency" edges to Dependency entities.

func (*PackageNameUpdateOne) RemoveDependencyIDs added in v0.6.0

func (pnuo *PackageNameUpdateOne) RemoveDependencyIDs(ids ...uuid.UUID) *PackageNameUpdateOne

RemoveDependencyIDs removes the "dependency" edge to Dependency entities by IDs.

func (*PackageNameUpdateOne) RemoveHasSourceAt added in v0.6.0

func (pnuo *PackageNameUpdateOne) RemoveHasSourceAt(h ...*HasSourceAt) *PackageNameUpdateOne

RemoveHasSourceAt removes "has_source_at" edges to HasSourceAt entities.

func (*PackageNameUpdateOne) RemoveHasSourceAtIDs added in v0.6.0

func (pnuo *PackageNameUpdateOne) RemoveHasSourceAtIDs(ids ...uuid.UUID) *PackageNameUpdateOne

RemoveHasSourceAtIDs removes the "has_source_at" edge to HasSourceAt entities by IDs.

func (*PackageNameUpdateOne) RemoveMetadata added in v0.6.0

func (pnuo *PackageNameUpdateOne) RemoveMetadata(h ...*HasMetadata) *PackageNameUpdateOne

RemoveMetadata removes "metadata" edges to HasMetadata entities.

func (*PackageNameUpdateOne) RemoveMetadatumIDs added in v0.6.0

func (pnuo *PackageNameUpdateOne) RemoveMetadatumIDs(ids ...uuid.UUID) *PackageNameUpdateOne

RemoveMetadatumIDs removes the "metadata" edge to HasMetadata entities by IDs.

func (*PackageNameUpdateOne) RemovePoc added in v0.6.0

RemovePoc removes "poc" edges to PointOfContact entities.

func (*PackageNameUpdateOne) RemovePocIDs added in v0.6.0

func (pnuo *PackageNameUpdateOne) RemovePocIDs(ids ...uuid.UUID) *PackageNameUpdateOne

RemovePocIDs removes the "poc" edge to PointOfContact entities by IDs.

func (*PackageNameUpdateOne) RemoveVersionIDs

func (pnuo *PackageNameUpdateOne) RemoveVersionIDs(ids ...uuid.UUID) *PackageNameUpdateOne

RemoveVersionIDs removes the "versions" edge to PackageVersion entities by IDs.

func (*PackageNameUpdateOne) RemoveVersions

func (pnuo *PackageNameUpdateOne) RemoveVersions(p ...*PackageVersion) *PackageNameUpdateOne

RemoveVersions removes "versions" edges to PackageVersion entities.

func (*PackageNameUpdateOne) Save

Save executes the query and returns the updated PackageName entity.

func (*PackageNameUpdateOne) SaveX

func (pnuo *PackageNameUpdateOne) SaveX(ctx context.Context) *PackageName

SaveX is like Save, but panics if an error occurs.

func (*PackageNameUpdateOne) Select

func (pnuo *PackageNameUpdateOne) Select(field string, fields ...string) *PackageNameUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*PackageNameUpdateOne) SetName

SetName sets the "name" field.

func (*PackageNameUpdateOne) SetNamespace

func (pnuo *PackageNameUpdateOne) SetNamespace(s string) *PackageNameUpdateOne

SetNamespace sets the "namespace" field.

func (*PackageNameUpdateOne) SetNillableName added in v0.4.0

func (pnuo *PackageNameUpdateOne) SetNillableName(s *string) *PackageNameUpdateOne

SetNillableName sets the "name" field if the given value is not nil.

func (*PackageNameUpdateOne) SetNillableNamespace added in v0.5.0

func (pnuo *PackageNameUpdateOne) SetNillableNamespace(s *string) *PackageNameUpdateOne

SetNillableNamespace sets the "namespace" field if the given value is not nil.

func (*PackageNameUpdateOne) SetNillableType added in v0.5.0

func (pnuo *PackageNameUpdateOne) SetNillableType(s *string) *PackageNameUpdateOne

SetNillableType sets the "type" field if the given value is not nil.

func (*PackageNameUpdateOne) SetType added in v0.5.0

SetType sets the "type" field.

func (*PackageNameUpdateOne) Where

Where appends a list predicates to the PackageNameUpdate builder.

type PackageNameUpsert

type PackageNameUpsert struct {
	*sql.UpdateSet
}

PackageNameUpsert is the "OnConflict" setter.

func (*PackageNameUpsert) SetName

SetName sets the "name" field.

func (*PackageNameUpsert) SetNamespace added in v0.5.0

func (u *PackageNameUpsert) SetNamespace(v string) *PackageNameUpsert

SetNamespace sets the "namespace" field.

func (*PackageNameUpsert) SetType added in v0.5.0

SetType sets the "type" field.

func (*PackageNameUpsert) UpdateName

func (u *PackageNameUpsert) UpdateName() *PackageNameUpsert

UpdateName sets the "name" field to the value that was provided on create.

func (*PackageNameUpsert) UpdateNamespace added in v0.5.0

func (u *PackageNameUpsert) UpdateNamespace() *PackageNameUpsert

UpdateNamespace sets the "namespace" field to the value that was provided on create.

func (*PackageNameUpsert) UpdateType added in v0.5.0

func (u *PackageNameUpsert) UpdateType() *PackageNameUpsert

UpdateType sets the "type" field to the value that was provided on create.

type PackageNameUpsertBulk

type PackageNameUpsertBulk struct {
	// contains filtered or unexported fields
}

PackageNameUpsertBulk is the builder for "upsert"-ing a bulk of PackageName nodes.

func (*PackageNameUpsertBulk) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*PackageNameUpsertBulk) Exec

Exec executes the query.

func (*PackageNameUpsertBulk) ExecX

func (u *PackageNameUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*PackageNameUpsertBulk) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.PackageName.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*PackageNameUpsertBulk) SetName

SetName sets the "name" field.

func (*PackageNameUpsertBulk) SetNamespace added in v0.5.0

SetNamespace sets the "namespace" field.

func (*PackageNameUpsertBulk) SetType added in v0.5.0

SetType sets the "type" field.

func (*PackageNameUpsertBulk) Update

Update allows overriding fields `UPDATE` values. See the PackageNameCreateBulk.OnConflict documentation for more info.

func (*PackageNameUpsertBulk) UpdateName

UpdateName sets the "name" field to the value that was provided on create.

func (*PackageNameUpsertBulk) UpdateNamespace added in v0.5.0

func (u *PackageNameUpsertBulk) UpdateNamespace() *PackageNameUpsertBulk

UpdateNamespace sets the "namespace" field to the value that was provided on create.

func (*PackageNameUpsertBulk) UpdateNewValues

func (u *PackageNameUpsertBulk) UpdateNewValues() *PackageNameUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.PackageName.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(packagename.FieldID)
		}),
	).
	Exec(ctx)

func (*PackageNameUpsertBulk) UpdateType added in v0.5.0

UpdateType sets the "type" field to the value that was provided on create.

type PackageNameUpsertOne

type PackageNameUpsertOne struct {
	// contains filtered or unexported fields
}

PackageNameUpsertOne is the builder for "upsert"-ing

one PackageName node.

func (*PackageNameUpsertOne) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*PackageNameUpsertOne) Exec

Exec executes the query.

func (*PackageNameUpsertOne) ExecX

func (u *PackageNameUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*PackageNameUpsertOne) ID

func (u *PackageNameUpsertOne) ID(ctx context.Context) (id uuid.UUID, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*PackageNameUpsertOne) IDX

IDX is like ID, but panics if an error occurs.

func (*PackageNameUpsertOne) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.PackageName.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*PackageNameUpsertOne) SetName

SetName sets the "name" field.

func (*PackageNameUpsertOne) SetNamespace added in v0.5.0

func (u *PackageNameUpsertOne) SetNamespace(v string) *PackageNameUpsertOne

SetNamespace sets the "namespace" field.

func (*PackageNameUpsertOne) SetType added in v0.5.0

SetType sets the "type" field.

func (*PackageNameUpsertOne) Update

Update allows overriding fields `UPDATE` values. See the PackageNameCreate.OnConflict documentation for more info.

func (*PackageNameUpsertOne) UpdateName

func (u *PackageNameUpsertOne) UpdateName() *PackageNameUpsertOne

UpdateName sets the "name" field to the value that was provided on create.

func (*PackageNameUpsertOne) UpdateNamespace added in v0.5.0

func (u *PackageNameUpsertOne) UpdateNamespace() *PackageNameUpsertOne

UpdateNamespace sets the "namespace" field to the value that was provided on create.

func (*PackageNameUpsertOne) UpdateNewValues

func (u *PackageNameUpsertOne) UpdateNewValues() *PackageNameUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:

client.PackageName.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(packagename.FieldID)
		}),
	).
	Exec(ctx)

func (*PackageNameUpsertOne) UpdateType added in v0.5.0

func (u *PackageNameUpsertOne) UpdateType() *PackageNameUpsertOne

UpdateType sets the "type" field to the value that was provided on create.

type PackageNames

type PackageNames []*PackageName

PackageNames is a parsable slice of PackageName.

type PackageVersion

type PackageVersion struct {

	// ID of the ent.
	ID uuid.UUID `json:"id,omitempty"`
	// NameID holds the value of the "name_id" field.
	NameID uuid.UUID `json:"name_id,omitempty"`
	// Version holds the value of the "version" field.
	Version string `json:"version,omitempty"`
	// Subpath holds the value of the "subpath" field.
	Subpath string `json:"subpath,omitempty"`
	// Qualifiers holds the value of the "qualifiers" field.
	Qualifiers []model.PackageQualifier `json:"qualifiers,omitempty"`
	// A SHA1 of the qualifiers, subpath, version fields after sorting keys, used to ensure uniqueness of version records.
	Hash string `json:"hash,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the PackageVersionQuery when eager-loading is set.
	Edges PackageVersionEdges `json:"edges"`
	// contains filtered or unexported fields
}

PackageVersion is the model entity for the PackageVersion schema.

func (*PackageVersion) Certification added in v0.6.0

func (pv *PackageVersion) Certification(ctx context.Context) (result []*Certification, err error)

func (*PackageVersion) CertifyLegal added in v0.6.0

func (pv *PackageVersion) CertifyLegal(ctx context.Context) (result []*CertifyLegal, err error)

func (*PackageVersion) Dependency added in v0.6.0

func (pv *PackageVersion) Dependency(ctx context.Context) (result []*Dependency, err error)

func (*PackageVersion) DependencySubject added in v0.6.0

func (pv *PackageVersion) DependencySubject(ctx context.Context) (result []*Dependency, err error)

func (*PackageVersion) HasSourceAt added in v0.6.0

func (pv *PackageVersion) HasSourceAt(ctx context.Context) (result []*HasSourceAt, err error)

func (*PackageVersion) IncludedInSboms added in v0.4.0

func (pv *PackageVersion) IncludedInSboms(ctx context.Context) (result []*BillOfMaterials, err error)

func (*PackageVersion) IsNode

func (n *PackageVersion) IsNode()

IsNode implements the Node interface check for GQLGen.

func (*PackageVersion) Metadata added in v0.6.0

func (pv *PackageVersion) Metadata(ctx context.Context) (result []*HasMetadata, err error)

func (*PackageVersion) Name

func (pv *PackageVersion) Name(ctx context.Context) (*PackageName, error)

func (*PackageVersion) NamedCertification added in v0.6.0

func (pv *PackageVersion) NamedCertification(name string) ([]*Certification, error)

NamedCertification returns the Certification named value or an error if the edge was not loaded in eager-loading with this name.

func (*PackageVersion) NamedCertifyLegal added in v0.6.0

func (pv *PackageVersion) NamedCertifyLegal(name string) ([]*CertifyLegal, error)

NamedCertifyLegal returns the CertifyLegal named value or an error if the edge was not loaded in eager-loading with this name.

func (*PackageVersion) NamedDependency added in v0.6.0

func (pv *PackageVersion) NamedDependency(name string) ([]*Dependency, error)

NamedDependency returns the Dependency named value or an error if the edge was not loaded in eager-loading with this name.

func (*PackageVersion) NamedDependencySubject added in v0.6.0

func (pv *PackageVersion) NamedDependencySubject(name string) ([]*Dependency, error)

NamedDependencySubject returns the DependencySubject named value or an error if the edge was not loaded in eager-loading with this name.

func (*PackageVersion) NamedHasSourceAt added in v0.6.0

func (pv *PackageVersion) NamedHasSourceAt(name string) ([]*HasSourceAt, error)

NamedHasSourceAt returns the HasSourceAt named value or an error if the edge was not loaded in eager-loading with this name.

func (*PackageVersion) NamedIncludedInSboms added in v0.4.0

func (pv *PackageVersion) NamedIncludedInSboms(name string) ([]*BillOfMaterials, error)

NamedIncludedInSboms returns the IncludedInSboms named value or an error if the edge was not loaded in eager-loading with this name.

func (*PackageVersion) NamedMetadata added in v0.6.0

func (pv *PackageVersion) NamedMetadata(name string) ([]*HasMetadata, error)

NamedMetadata returns the Metadata named value or an error if the edge was not loaded in eager-loading with this name.

func (*PackageVersion) NamedOccurrences

func (pv *PackageVersion) NamedOccurrences(name string) ([]*Occurrence, error)

NamedOccurrences returns the Occurrences named value or an error if the edge was not loaded in eager-loading with this name.

func (*PackageVersion) NamedPkgEqualPkgA added in v0.5.0

func (pv *PackageVersion) NamedPkgEqualPkgA(name string) ([]*PkgEqual, error)

NamedPkgEqualPkgA returns the PkgEqualPkgA named value or an error if the edge was not loaded in eager-loading with this name.

func (*PackageVersion) NamedPkgEqualPkgB added in v0.5.0

func (pv *PackageVersion) NamedPkgEqualPkgB(name string) ([]*PkgEqual, error)

NamedPkgEqualPkgB returns the PkgEqualPkgB named value or an error if the edge was not loaded in eager-loading with this name.

func (*PackageVersion) NamedPoc added in v0.6.0

func (pv *PackageVersion) NamedPoc(name string) ([]*PointOfContact, error)

NamedPoc returns the Poc named value or an error if the edge was not loaded in eager-loading with this name.

func (*PackageVersion) NamedSbom

func (pv *PackageVersion) NamedSbom(name string) ([]*BillOfMaterials, error)

NamedSbom returns the Sbom named value or an error if the edge was not loaded in eager-loading with this name.

func (*PackageVersion) NamedVex added in v0.6.0

func (pv *PackageVersion) NamedVex(name string) ([]*CertifyVex, error)

NamedVex returns the Vex named value or an error if the edge was not loaded in eager-loading with this name.

func (*PackageVersion) NamedVuln added in v0.6.0

func (pv *PackageVersion) NamedVuln(name string) ([]*CertifyVuln, error)

NamedVuln returns the Vuln named value or an error if the edge was not loaded in eager-loading with this name.

func (*PackageVersion) Occurrences

func (pv *PackageVersion) Occurrences(ctx context.Context) (result []*Occurrence, err error)

func (*PackageVersion) PkgEqualPkgA added in v0.5.0

func (pv *PackageVersion) PkgEqualPkgA(ctx context.Context) (result []*PkgEqual, err error)

func (*PackageVersion) PkgEqualPkgB added in v0.5.0

func (pv *PackageVersion) PkgEqualPkgB(ctx context.Context) (result []*PkgEqual, err error)

func (*PackageVersion) Poc added in v0.6.0

func (pv *PackageVersion) Poc(ctx context.Context) (result []*PointOfContact, err error)

func (*PackageVersion) QueryCertification added in v0.6.0

func (pv *PackageVersion) QueryCertification() *CertificationQuery

QueryCertification queries the "certification" edge of the PackageVersion entity.

func (*PackageVersion) QueryCertifyLegal added in v0.6.0

func (pv *PackageVersion) QueryCertifyLegal() *CertifyLegalQuery

QueryCertifyLegal queries the "certify_legal" edge of the PackageVersion entity.

func (*PackageVersion) QueryDependency added in v0.6.0

func (pv *PackageVersion) QueryDependency() *DependencyQuery

QueryDependency queries the "dependency" edge of the PackageVersion entity.

func (*PackageVersion) QueryDependencySubject added in v0.6.0

func (pv *PackageVersion) QueryDependencySubject() *DependencyQuery

QueryDependencySubject queries the "dependency_subject" edge of the PackageVersion entity.

func (*PackageVersion) QueryHasSourceAt added in v0.6.0

func (pv *PackageVersion) QueryHasSourceAt() *HasSourceAtQuery

QueryHasSourceAt queries the "has_source_at" edge of the PackageVersion entity.

func (*PackageVersion) QueryIncludedInSboms added in v0.4.0

func (pv *PackageVersion) QueryIncludedInSboms() *BillOfMaterialsQuery

QueryIncludedInSboms queries the "included_in_sboms" edge of the PackageVersion entity.

func (*PackageVersion) QueryMetadata added in v0.6.0

func (pv *PackageVersion) QueryMetadata() *HasMetadataQuery

QueryMetadata queries the "metadata" edge of the PackageVersion entity.

func (*PackageVersion) QueryName

func (pv *PackageVersion) QueryName() *PackageNameQuery

QueryName queries the "name" edge of the PackageVersion entity.

func (*PackageVersion) QueryOccurrences

func (pv *PackageVersion) QueryOccurrences() *OccurrenceQuery

QueryOccurrences queries the "occurrences" edge of the PackageVersion entity.

func (*PackageVersion) QueryPkgEqualPkgA added in v0.5.0

func (pv *PackageVersion) QueryPkgEqualPkgA() *PkgEqualQuery

QueryPkgEqualPkgA queries the "pkg_equal_pkg_a" edge of the PackageVersion entity.

func (*PackageVersion) QueryPkgEqualPkgB added in v0.5.0

func (pv *PackageVersion) QueryPkgEqualPkgB() *PkgEqualQuery

QueryPkgEqualPkgB queries the "pkg_equal_pkg_b" edge of the PackageVersion entity.

func (*PackageVersion) QueryPoc added in v0.6.0

func (pv *PackageVersion) QueryPoc() *PointOfContactQuery

QueryPoc queries the "poc" edge of the PackageVersion entity.

func (*PackageVersion) QuerySbom

func (pv *PackageVersion) QuerySbom() *BillOfMaterialsQuery

QuerySbom queries the "sbom" edge of the PackageVersion entity.

func (*PackageVersion) QueryVex added in v0.6.0

func (pv *PackageVersion) QueryVex() *CertifyVexQuery

QueryVex queries the "vex" edge of the PackageVersion entity.

func (*PackageVersion) QueryVuln added in v0.6.0

func (pv *PackageVersion) QueryVuln() *CertifyVulnQuery

QueryVuln queries the "vuln" edge of the PackageVersion entity.

func (*PackageVersion) Sbom

func (pv *PackageVersion) Sbom(ctx context.Context) (result []*BillOfMaterials, err error)

func (*PackageVersion) String

func (pv *PackageVersion) String() string

String implements the fmt.Stringer.

func (*PackageVersion) ToEdge

ToEdge converts PackageVersion into PackageVersionEdge.

func (*PackageVersion) Unwrap

func (pv *PackageVersion) Unwrap() *PackageVersion

Unwrap unwraps the PackageVersion entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.

func (*PackageVersion) Update

Update returns a builder for updating this PackageVersion. Note that you need to call PackageVersion.Unwrap() before calling this method if this PackageVersion was returned from a transaction, and the transaction was committed or rolled back.

func (*PackageVersion) Value

func (pv *PackageVersion) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the PackageVersion. This includes values selected through modifiers, order, etc.

func (*PackageVersion) Vex added in v0.6.0

func (pv *PackageVersion) Vex(ctx context.Context) (result []*CertifyVex, err error)

func (*PackageVersion) Vuln added in v0.6.0

func (pv *PackageVersion) Vuln(ctx context.Context) (result []*CertifyVuln, err error)

type PackageVersionClient

type PackageVersionClient struct {
	// contains filtered or unexported fields
}

PackageVersionClient is a client for the PackageVersion schema.

func NewPackageVersionClient

func NewPackageVersionClient(c config) *PackageVersionClient

NewPackageVersionClient returns a client for the PackageVersion from the given config.

func (*PackageVersionClient) Create

Create returns a builder for creating a PackageVersion entity.

func (*PackageVersionClient) CreateBulk

CreateBulk returns a builder for creating a bulk of PackageVersion entities.

func (*PackageVersionClient) Delete

Delete returns a delete builder for PackageVersion.

func (*PackageVersionClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*PackageVersionClient) DeleteOneID

DeleteOneID returns a builder for deleting the given entity by its id.

func (*PackageVersionClient) Get

Get returns a PackageVersion entity by its id.

func (*PackageVersionClient) GetX

GetX is like Get, but panics if an error occurs.

func (*PackageVersionClient) Hooks

func (c *PackageVersionClient) Hooks() []Hook

Hooks returns the client hooks.

func (*PackageVersionClient) Intercept

func (c *PackageVersionClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `packageversion.Intercept(f(g(h())))`.

func (*PackageVersionClient) Interceptors

func (c *PackageVersionClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*PackageVersionClient) MapCreateBulk

func (c *PackageVersionClient) MapCreateBulk(slice any, setFunc func(*PackageVersionCreate, int)) *PackageVersionCreateBulk

MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.

func (*PackageVersionClient) Query

Query returns a query builder for PackageVersion.

func (*PackageVersionClient) QueryCertification added in v0.6.0

func (c *PackageVersionClient) QueryCertification(pv *PackageVersion) *CertificationQuery

QueryCertification queries the certification edge of a PackageVersion.

func (*PackageVersionClient) QueryCertifyLegal added in v0.6.0

func (c *PackageVersionClient) QueryCertifyLegal(pv *PackageVersion) *CertifyLegalQuery

QueryCertifyLegal queries the certify_legal edge of a PackageVersion.

func (*PackageVersionClient) QueryDependency added in v0.6.0

func (c *PackageVersionClient) QueryDependency(pv *PackageVersion) *DependencyQuery

QueryDependency queries the dependency edge of a PackageVersion.

func (*PackageVersionClient) QueryDependencySubject added in v0.6.0

func (c *PackageVersionClient) QueryDependencySubject(pv *PackageVersion) *DependencyQuery

QueryDependencySubject queries the dependency_subject edge of a PackageVersion.

func (*PackageVersionClient) QueryHasSourceAt added in v0.6.0

func (c *PackageVersionClient) QueryHasSourceAt(pv *PackageVersion) *HasSourceAtQuery

QueryHasSourceAt queries the has_source_at edge of a PackageVersion.

func (*PackageVersionClient) QueryIncludedInSboms added in v0.4.0

func (c *PackageVersionClient) QueryIncludedInSboms(pv *PackageVersion) *BillOfMaterialsQuery

QueryIncludedInSboms queries the included_in_sboms edge of a PackageVersion.

func (*PackageVersionClient) QueryMetadata added in v0.6.0

func (c *PackageVersionClient) QueryMetadata(pv *PackageVersion) *HasMetadataQuery

QueryMetadata queries the metadata edge of a PackageVersion.

func (*PackageVersionClient) QueryName

QueryName queries the name edge of a PackageVersion.

func (*PackageVersionClient) QueryOccurrences

func (c *PackageVersionClient) QueryOccurrences(pv *PackageVersion) *OccurrenceQuery

QueryOccurrences queries the occurrences edge of a PackageVersion.

func (*PackageVersionClient) QueryPkgEqualPkgA added in v0.5.0

func (c *PackageVersionClient) QueryPkgEqualPkgA(pv *PackageVersion) *PkgEqualQuery

QueryPkgEqualPkgA queries the pkg_equal_pkg_a edge of a PackageVersion.

func (*PackageVersionClient) QueryPkgEqualPkgB added in v0.5.0

func (c *PackageVersionClient) QueryPkgEqualPkgB(pv *PackageVersion) *PkgEqualQuery

QueryPkgEqualPkgB queries the pkg_equal_pkg_b edge of a PackageVersion.

func (*PackageVersionClient) QueryPoc added in v0.6.0

QueryPoc queries the poc edge of a PackageVersion.

func (*PackageVersionClient) QuerySbom

QuerySbom queries the sbom edge of a PackageVersion.

func (*PackageVersionClient) QueryVex added in v0.6.0

QueryVex queries the vex edge of a PackageVersion.

func (*PackageVersionClient) QueryVuln added in v0.6.0

QueryVuln queries the vuln edge of a PackageVersion.

func (*PackageVersionClient) Update

Update returns an update builder for PackageVersion.

func (*PackageVersionClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*PackageVersionClient) UpdateOneID

UpdateOneID returns an update builder for the given id.

func (*PackageVersionClient) Use

func (c *PackageVersionClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `packageversion.Hooks(f(g(h())))`.

type PackageVersionConnection

type PackageVersionConnection struct {
	Edges      []*PackageVersionEdge `json:"edges"`
	PageInfo   PageInfo              `json:"pageInfo"`
	TotalCount int                   `json:"totalCount"`
}

PackageVersionConnection is the connection containing edges to PackageVersion.

type PackageVersionCreate

type PackageVersionCreate struct {
	// contains filtered or unexported fields
}

PackageVersionCreate is the builder for creating a PackageVersion entity.

func (*PackageVersionCreate) AddCertification added in v0.6.0

func (pvc *PackageVersionCreate) AddCertification(c ...*Certification) *PackageVersionCreate

AddCertification adds the "certification" edges to the Certification entity.

func (*PackageVersionCreate) AddCertificationIDs added in v0.6.0

func (pvc *PackageVersionCreate) AddCertificationIDs(ids ...uuid.UUID) *PackageVersionCreate

AddCertificationIDs adds the "certification" edge to the Certification entity by IDs.

func (*PackageVersionCreate) AddCertifyLegal added in v0.6.0

func (pvc *PackageVersionCreate) AddCertifyLegal(c ...*CertifyLegal) *PackageVersionCreate

AddCertifyLegal adds the "certify_legal" edges to the CertifyLegal entity.

func (*PackageVersionCreate) AddCertifyLegalIDs added in v0.6.0

func (pvc *PackageVersionCreate) AddCertifyLegalIDs(ids ...uuid.UUID) *PackageVersionCreate

AddCertifyLegalIDs adds the "certify_legal" edge to the CertifyLegal entity by IDs.

func (*PackageVersionCreate) AddDependency added in v0.6.0

func (pvc *PackageVersionCreate) AddDependency(d ...*Dependency) *PackageVersionCreate

AddDependency adds the "dependency" edges to the Dependency entity.

func (*PackageVersionCreate) AddDependencyIDs added in v0.6.0

func (pvc *PackageVersionCreate) AddDependencyIDs(ids ...uuid.UUID) *PackageVersionCreate

AddDependencyIDs adds the "dependency" edge to the Dependency entity by IDs.

func (*PackageVersionCreate) AddDependencySubject added in v0.6.0

func (pvc *PackageVersionCreate) AddDependencySubject(d ...*Dependency) *PackageVersionCreate

AddDependencySubject adds the "dependency_subject" edges to the Dependency entity.

func (*PackageVersionCreate) AddDependencySubjectIDs added in v0.6.0

func (pvc *PackageVersionCreate) AddDependencySubjectIDs(ids ...uuid.UUID) *PackageVersionCreate

AddDependencySubjectIDs adds the "dependency_subject" edge to the Dependency entity by IDs.

func (*PackageVersionCreate) AddHasSourceAt added in v0.6.0

func (pvc *PackageVersionCreate) AddHasSourceAt(h ...*HasSourceAt) *PackageVersionCreate

AddHasSourceAt adds the "has_source_at" edges to the HasSourceAt entity.

func (*PackageVersionCreate) AddHasSourceAtIDs added in v0.6.0

func (pvc *PackageVersionCreate) AddHasSourceAtIDs(ids ...uuid.UUID) *PackageVersionCreate

AddHasSourceAtIDs adds the "has_source_at" edge to the HasSourceAt entity by IDs.

func (*PackageVersionCreate) AddIncludedInSbomIDs added in v0.4.0

func (pvc *PackageVersionCreate) AddIncludedInSbomIDs(ids ...uuid.UUID) *PackageVersionCreate

AddIncludedInSbomIDs adds the "included_in_sboms" edge to the BillOfMaterials entity by IDs.

func (*PackageVersionCreate) AddIncludedInSboms added in v0.4.0

func (pvc *PackageVersionCreate) AddIncludedInSboms(b ...*BillOfMaterials) *PackageVersionCreate

AddIncludedInSboms adds the "included_in_sboms" edges to the BillOfMaterials entity.

func (*PackageVersionCreate) AddMetadata added in v0.6.0

func (pvc *PackageVersionCreate) AddMetadata(h ...*HasMetadata) *PackageVersionCreate

AddMetadata adds the "metadata" edges to the HasMetadata entity.

func (*PackageVersionCreate) AddMetadatumIDs added in v0.6.0

func (pvc *PackageVersionCreate) AddMetadatumIDs(ids ...uuid.UUID) *PackageVersionCreate

AddMetadatumIDs adds the "metadata" edge to the HasMetadata entity by IDs.

func (*PackageVersionCreate) AddOccurrenceIDs

func (pvc *PackageVersionCreate) AddOccurrenceIDs(ids ...uuid.UUID) *PackageVersionCreate

AddOccurrenceIDs adds the "occurrences" edge to the Occurrence entity by IDs.

func (*PackageVersionCreate) AddOccurrences

func (pvc *PackageVersionCreate) AddOccurrences(o ...*Occurrence) *PackageVersionCreate

AddOccurrences adds the "occurrences" edges to the Occurrence entity.

func (*PackageVersionCreate) AddPkgEqualPkgA added in v0.5.0

func (pvc *PackageVersionCreate) AddPkgEqualPkgA(p ...*PkgEqual) *PackageVersionCreate

AddPkgEqualPkgA adds the "pkg_equal_pkg_a" edges to the PkgEqual entity.

func (*PackageVersionCreate) AddPkgEqualPkgAIDs added in v0.5.0

func (pvc *PackageVersionCreate) AddPkgEqualPkgAIDs(ids ...uuid.UUID) *PackageVersionCreate

AddPkgEqualPkgAIDs adds the "pkg_equal_pkg_a" edge to the PkgEqual entity by IDs.

func (*PackageVersionCreate) AddPkgEqualPkgB added in v0.5.0

func (pvc *PackageVersionCreate) AddPkgEqualPkgB(p ...*PkgEqual) *PackageVersionCreate

AddPkgEqualPkgB adds the "pkg_equal_pkg_b" edges to the PkgEqual entity.

func (*PackageVersionCreate) AddPkgEqualPkgBIDs added in v0.5.0

func (pvc *PackageVersionCreate) AddPkgEqualPkgBIDs(ids ...uuid.UUID) *PackageVersionCreate

AddPkgEqualPkgBIDs adds the "pkg_equal_pkg_b" edge to the PkgEqual entity by IDs.

func (*PackageVersionCreate) AddPoc added in v0.6.0

AddPoc adds the "poc" edges to the PointOfContact entity.

func (*PackageVersionCreate) AddPocIDs added in v0.6.0

func (pvc *PackageVersionCreate) AddPocIDs(ids ...uuid.UUID) *PackageVersionCreate

AddPocIDs adds the "poc" edge to the PointOfContact entity by IDs.

func (*PackageVersionCreate) AddSbom

AddSbom adds the "sbom" edges to the BillOfMaterials entity.

func (*PackageVersionCreate) AddSbomIDs

func (pvc *PackageVersionCreate) AddSbomIDs(ids ...uuid.UUID) *PackageVersionCreate

AddSbomIDs adds the "sbom" edge to the BillOfMaterials entity by IDs.

func (*PackageVersionCreate) AddVex added in v0.6.0

AddVex adds the "vex" edges to the CertifyVex entity.

func (*PackageVersionCreate) AddVexIDs added in v0.6.0

func (pvc *PackageVersionCreate) AddVexIDs(ids ...uuid.UUID) *PackageVersionCreate

AddVexIDs adds the "vex" edge to the CertifyVex entity by IDs.

func (*PackageVersionCreate) AddVuln added in v0.6.0

AddVuln adds the "vuln" edges to the CertifyVuln entity.

func (*PackageVersionCreate) AddVulnIDs added in v0.6.0

func (pvc *PackageVersionCreate) AddVulnIDs(ids ...uuid.UUID) *PackageVersionCreate

AddVulnIDs adds the "vuln" edge to the CertifyVuln entity by IDs.

func (*PackageVersionCreate) Exec

func (pvc *PackageVersionCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*PackageVersionCreate) ExecX

func (pvc *PackageVersionCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*PackageVersionCreate) Mutation

Mutation returns the PackageVersionMutation object of the builder.

func (*PackageVersionCreate) OnConflict

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.PackageVersion.Create().
	SetNameID(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.PackageVersionUpsert) {
		SetNameID(v+v).
	}).
	Exec(ctx)

func (*PackageVersionCreate) OnConflictColumns

func (pvc *PackageVersionCreate) OnConflictColumns(columns ...string) *PackageVersionUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.PackageVersion.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*PackageVersionCreate) Save

Save creates the PackageVersion in the database.

func (*PackageVersionCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*PackageVersionCreate) SetHash

SetHash sets the "hash" field.

func (*PackageVersionCreate) SetID added in v0.5.0

SetID sets the "id" field.

func (*PackageVersionCreate) SetName

SetName sets the "name" edge to the PackageName entity.

func (*PackageVersionCreate) SetNameID

SetNameID sets the "name_id" field.

func (*PackageVersionCreate) SetNillableID added in v0.5.0

func (pvc *PackageVersionCreate) SetNillableID(u *uuid.UUID) *PackageVersionCreate

SetNillableID sets the "id" field if the given value is not nil.

func (*PackageVersionCreate) SetNillableSubpath

func (pvc *PackageVersionCreate) SetNillableSubpath(s *string) *PackageVersionCreate

SetNillableSubpath sets the "subpath" field if the given value is not nil.

func (*PackageVersionCreate) SetNillableVersion

func (pvc *PackageVersionCreate) SetNillableVersion(s *string) *PackageVersionCreate

SetNillableVersion sets the "version" field if the given value is not nil.

func (*PackageVersionCreate) SetQualifiers

SetQualifiers sets the "qualifiers" field.

func (*PackageVersionCreate) SetSubpath

func (pvc *PackageVersionCreate) SetSubpath(s string) *PackageVersionCreate

SetSubpath sets the "subpath" field.

func (*PackageVersionCreate) SetVersion

func (pvc *PackageVersionCreate) SetVersion(s string) *PackageVersionCreate

SetVersion sets the "version" field.

type PackageVersionCreateBulk

type PackageVersionCreateBulk struct {
	// contains filtered or unexported fields
}

PackageVersionCreateBulk is the builder for creating many PackageVersion entities in bulk.

func (*PackageVersionCreateBulk) Exec

Exec executes the query.

func (*PackageVersionCreateBulk) ExecX

func (pvcb *PackageVersionCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*PackageVersionCreateBulk) OnConflict

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.PackageVersion.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.PackageVersionUpsert) {
		SetNameID(v+v).
	}).
	Exec(ctx)

func (*PackageVersionCreateBulk) OnConflictColumns

func (pvcb *PackageVersionCreateBulk) OnConflictColumns(columns ...string) *PackageVersionUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.PackageVersion.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*PackageVersionCreateBulk) Save

Save creates the PackageVersion entities in the database.

func (*PackageVersionCreateBulk) SaveX

SaveX is like Save, but panics if an error occurs.

type PackageVersionDelete

type PackageVersionDelete struct {
	// contains filtered or unexported fields
}

PackageVersionDelete is the builder for deleting a PackageVersion entity.

func (*PackageVersionDelete) Exec

func (pvd *PackageVersionDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*PackageVersionDelete) ExecX

func (pvd *PackageVersionDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*PackageVersionDelete) Where

Where appends a list predicates to the PackageVersionDelete builder.

type PackageVersionDeleteOne

type PackageVersionDeleteOne struct {
	// contains filtered or unexported fields
}

PackageVersionDeleteOne is the builder for deleting a single PackageVersion entity.

func (*PackageVersionDeleteOne) Exec

func (pvdo *PackageVersionDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*PackageVersionDeleteOne) ExecX

func (pvdo *PackageVersionDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*PackageVersionDeleteOne) Where

Where appends a list predicates to the PackageVersionDelete builder.

type PackageVersionEdge

type PackageVersionEdge struct {
	Node   *PackageVersion `json:"node"`
	Cursor Cursor          `json:"cursor"`
}

PackageVersionEdge is the edge representation of PackageVersion.

type PackageVersionEdges

type PackageVersionEdges struct {
	// Name holds the value of the name edge.
	Name *PackageName `json:"name,omitempty"`
	// Occurrences holds the value of the occurrences edge.
	Occurrences []*Occurrence `json:"occurrences,omitempty"`
	// Sbom holds the value of the sbom edge.
	Sbom []*BillOfMaterials `json:"sbom,omitempty"`
	// Vuln holds the value of the vuln edge.
	Vuln []*CertifyVuln `json:"vuln,omitempty"`
	// Vex holds the value of the vex edge.
	Vex []*CertifyVex `json:"vex,omitempty"`
	// HasSourceAt holds the value of the has_source_at edge.
	HasSourceAt []*HasSourceAt `json:"has_source_at,omitempty"`
	// Certification holds the value of the certification edge.
	Certification []*Certification `json:"certification,omitempty"`
	// Metadata holds the value of the metadata edge.
	Metadata []*HasMetadata `json:"metadata,omitempty"`
	// Dependency holds the value of the dependency edge.
	Dependency []*Dependency `json:"dependency,omitempty"`
	// DependencySubject holds the value of the dependency_subject edge.
	DependencySubject []*Dependency `json:"dependency_subject,omitempty"`
	// IncludedInSboms holds the value of the included_in_sboms edge.
	IncludedInSboms []*BillOfMaterials `json:"included_in_sboms,omitempty"`
	// PkgEqualPkgA holds the value of the pkg_equal_pkg_a edge.
	PkgEqualPkgA []*PkgEqual `json:"pkg_equal_pkg_a,omitempty"`
	// PkgEqualPkgB holds the value of the pkg_equal_pkg_b edge.
	PkgEqualPkgB []*PkgEqual `json:"pkg_equal_pkg_b,omitempty"`
	// Poc holds the value of the poc edge.
	Poc []*PointOfContact `json:"poc,omitempty"`
	// CertifyLegal holds the value of the certify_legal edge.
	CertifyLegal []*CertifyLegal `json:"certify_legal,omitempty"`
	// contains filtered or unexported fields
}

PackageVersionEdges holds the relations/edges for other nodes in the graph.

func (PackageVersionEdges) CertificationOrErr added in v0.6.0

func (e PackageVersionEdges) CertificationOrErr() ([]*Certification, error)

CertificationOrErr returns the Certification value or an error if the edge was not loaded in eager-loading.

func (PackageVersionEdges) CertifyLegalOrErr added in v0.6.0

func (e PackageVersionEdges) CertifyLegalOrErr() ([]*CertifyLegal, error)

CertifyLegalOrErr returns the CertifyLegal value or an error if the edge was not loaded in eager-loading.

func (PackageVersionEdges) DependencyOrErr added in v0.6.0

func (e PackageVersionEdges) DependencyOrErr() ([]*Dependency, error)

DependencyOrErr returns the Dependency value or an error if the edge was not loaded in eager-loading.

func (PackageVersionEdges) DependencySubjectOrErr added in v0.6.0

func (e PackageVersionEdges) DependencySubjectOrErr() ([]*Dependency, error)

DependencySubjectOrErr returns the DependencySubject value or an error if the edge was not loaded in eager-loading.

func (PackageVersionEdges) HasSourceAtOrErr added in v0.6.0

func (e PackageVersionEdges) HasSourceAtOrErr() ([]*HasSourceAt, error)

HasSourceAtOrErr returns the HasSourceAt value or an error if the edge was not loaded in eager-loading.

func (PackageVersionEdges) IncludedInSbomsOrErr added in v0.4.0

func (e PackageVersionEdges) IncludedInSbomsOrErr() ([]*BillOfMaterials, error)

IncludedInSbomsOrErr returns the IncludedInSboms value or an error if the edge was not loaded in eager-loading.

func (PackageVersionEdges) MetadataOrErr added in v0.6.0

func (e PackageVersionEdges) MetadataOrErr() ([]*HasMetadata, error)

MetadataOrErr returns the Metadata value or an error if the edge was not loaded in eager-loading.

func (PackageVersionEdges) NameOrErr

func (e PackageVersionEdges) NameOrErr() (*PackageName, error)

NameOrErr returns the Name value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (PackageVersionEdges) OccurrencesOrErr

func (e PackageVersionEdges) OccurrencesOrErr() ([]*Occurrence, error)

OccurrencesOrErr returns the Occurrences value or an error if the edge was not loaded in eager-loading.

func (PackageVersionEdges) PkgEqualPkgAOrErr added in v0.5.0

func (e PackageVersionEdges) PkgEqualPkgAOrErr() ([]*PkgEqual, error)

PkgEqualPkgAOrErr returns the PkgEqualPkgA value or an error if the edge was not loaded in eager-loading.

func (PackageVersionEdges) PkgEqualPkgBOrErr added in v0.5.0

func (e PackageVersionEdges) PkgEqualPkgBOrErr() ([]*PkgEqual, error)

PkgEqualPkgBOrErr returns the PkgEqualPkgB value or an error if the edge was not loaded in eager-loading.

func (PackageVersionEdges) PocOrErr added in v0.6.0

func (e PackageVersionEdges) PocOrErr() ([]*PointOfContact, error)

PocOrErr returns the Poc value or an error if the edge was not loaded in eager-loading.

func (PackageVersionEdges) SbomOrErr

func (e PackageVersionEdges) SbomOrErr() ([]*BillOfMaterials, error)

SbomOrErr returns the Sbom value or an error if the edge was not loaded in eager-loading.

func (PackageVersionEdges) VexOrErr added in v0.6.0

func (e PackageVersionEdges) VexOrErr() ([]*CertifyVex, error)

VexOrErr returns the Vex value or an error if the edge was not loaded in eager-loading.

func (PackageVersionEdges) VulnOrErr added in v0.6.0

func (e PackageVersionEdges) VulnOrErr() ([]*CertifyVuln, error)

VulnOrErr returns the Vuln value or an error if the edge was not loaded in eager-loading.

type PackageVersionGroupBy

type PackageVersionGroupBy struct {
	// contains filtered or unexported fields
}

PackageVersionGroupBy is the group-by builder for PackageVersion entities.

func (*PackageVersionGroupBy) Aggregate

Aggregate adds the given aggregation functions to the group-by query.

func (*PackageVersionGroupBy) Bool

func (s *PackageVersionGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*PackageVersionGroupBy) BoolX

func (s *PackageVersionGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*PackageVersionGroupBy) Bools

func (s *PackageVersionGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*PackageVersionGroupBy) BoolsX

func (s *PackageVersionGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*PackageVersionGroupBy) Float64

func (s *PackageVersionGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*PackageVersionGroupBy) Float64X

func (s *PackageVersionGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*PackageVersionGroupBy) Float64s

func (s *PackageVersionGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*PackageVersionGroupBy) Float64sX

func (s *PackageVersionGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*PackageVersionGroupBy) Int

func (s *PackageVersionGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*PackageVersionGroupBy) IntX

func (s *PackageVersionGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*PackageVersionGroupBy) Ints

func (s *PackageVersionGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*PackageVersionGroupBy) IntsX

func (s *PackageVersionGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*PackageVersionGroupBy) Scan

func (pvgb *PackageVersionGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*PackageVersionGroupBy) ScanX

func (s *PackageVersionGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*PackageVersionGroupBy) String

func (s *PackageVersionGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*PackageVersionGroupBy) StringX

func (s *PackageVersionGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*PackageVersionGroupBy) Strings

func (s *PackageVersionGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*PackageVersionGroupBy) StringsX

func (s *PackageVersionGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type PackageVersionMutation

type PackageVersionMutation struct {
	// contains filtered or unexported fields
}

PackageVersionMutation represents an operation that mutates the PackageVersion nodes in the graph.

func (*PackageVersionMutation) AddCertificationIDs added in v0.6.0

func (m *PackageVersionMutation) AddCertificationIDs(ids ...uuid.UUID)

AddCertificationIDs adds the "certification" edge to the Certification entity by ids.

func (*PackageVersionMutation) AddCertifyLegalIDs added in v0.6.0

func (m *PackageVersionMutation) AddCertifyLegalIDs(ids ...uuid.UUID)

AddCertifyLegalIDs adds the "certify_legal" edge to the CertifyLegal entity by ids.

func (*PackageVersionMutation) AddDependencyIDs added in v0.6.0

func (m *PackageVersionMutation) AddDependencyIDs(ids ...uuid.UUID)

AddDependencyIDs adds the "dependency" edge to the Dependency entity by ids.

func (*PackageVersionMutation) AddDependencySubjectIDs added in v0.6.0

func (m *PackageVersionMutation) AddDependencySubjectIDs(ids ...uuid.UUID)

AddDependencySubjectIDs adds the "dependency_subject" edge to the Dependency entity by ids.

func (*PackageVersionMutation) AddField

func (m *PackageVersionMutation) AddField(name string, value ent.Value) error

AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*PackageVersionMutation) AddHasSourceAtIDs added in v0.6.0

func (m *PackageVersionMutation) AddHasSourceAtIDs(ids ...uuid.UUID)

AddHasSourceAtIDs adds the "has_source_at" edge to the HasSourceAt entity by ids.

func (*PackageVersionMutation) AddIncludedInSbomIDs added in v0.4.0

func (m *PackageVersionMutation) AddIncludedInSbomIDs(ids ...uuid.UUID)

AddIncludedInSbomIDs adds the "included_in_sboms" edge to the BillOfMaterials entity by ids.

func (*PackageVersionMutation) AddMetadatumIDs added in v0.6.0

func (m *PackageVersionMutation) AddMetadatumIDs(ids ...uuid.UUID)

AddMetadatumIDs adds the "metadata" edge to the HasMetadata entity by ids.

func (*PackageVersionMutation) AddOccurrenceIDs

func (m *PackageVersionMutation) AddOccurrenceIDs(ids ...uuid.UUID)

AddOccurrenceIDs adds the "occurrences" edge to the Occurrence entity by ids.

func (*PackageVersionMutation) AddPkgEqualPkgAIDs added in v0.5.0

func (m *PackageVersionMutation) AddPkgEqualPkgAIDs(ids ...uuid.UUID)

AddPkgEqualPkgAIDs adds the "pkg_equal_pkg_a" edge to the PkgEqual entity by ids.

func (*PackageVersionMutation) AddPkgEqualPkgBIDs added in v0.5.0

func (m *PackageVersionMutation) AddPkgEqualPkgBIDs(ids ...uuid.UUID)

AddPkgEqualPkgBIDs adds the "pkg_equal_pkg_b" edge to the PkgEqual entity by ids.

func (*PackageVersionMutation) AddPocIDs added in v0.6.0

func (m *PackageVersionMutation) AddPocIDs(ids ...uuid.UUID)

AddPocIDs adds the "poc" edge to the PointOfContact entity by ids.

func (*PackageVersionMutation) AddSbomIDs

func (m *PackageVersionMutation) AddSbomIDs(ids ...uuid.UUID)

AddSbomIDs adds the "sbom" edge to the BillOfMaterials entity by ids.

func (*PackageVersionMutation) AddVexIDs added in v0.6.0

func (m *PackageVersionMutation) AddVexIDs(ids ...uuid.UUID)

AddVexIDs adds the "vex" edge to the CertifyVex entity by ids.

func (*PackageVersionMutation) AddVulnIDs added in v0.6.0

func (m *PackageVersionMutation) AddVulnIDs(ids ...uuid.UUID)

AddVulnIDs adds the "vuln" edge to the CertifyVuln entity by ids.

func (*PackageVersionMutation) AddedEdges

func (m *PackageVersionMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*PackageVersionMutation) AddedField

func (m *PackageVersionMutation) AddedField(name string) (ent.Value, bool)

AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*PackageVersionMutation) AddedFields

func (m *PackageVersionMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*PackageVersionMutation) AddedIDs

func (m *PackageVersionMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*PackageVersionMutation) AppendQualifiers

func (m *PackageVersionMutation) AppendQualifiers(mq []model.PackageQualifier)

AppendQualifiers adds mq to the "qualifiers" field.

func (*PackageVersionMutation) AppendedQualifiers

func (m *PackageVersionMutation) AppendedQualifiers() ([]model.PackageQualifier, bool)

AppendedQualifiers returns the list of values that were appended to the "qualifiers" field in this mutation.

func (*PackageVersionMutation) CertificationCleared added in v0.6.0

func (m *PackageVersionMutation) CertificationCleared() bool

CertificationCleared reports if the "certification" edge to the Certification entity was cleared.

func (*PackageVersionMutation) CertificationIDs added in v0.6.0

func (m *PackageVersionMutation) CertificationIDs() (ids []uuid.UUID)

CertificationIDs returns the "certification" edge IDs in the mutation.

func (*PackageVersionMutation) CertifyLegalCleared added in v0.6.0

func (m *PackageVersionMutation) CertifyLegalCleared() bool

CertifyLegalCleared reports if the "certify_legal" edge to the CertifyLegal entity was cleared.

func (*PackageVersionMutation) CertifyLegalIDs added in v0.6.0

func (m *PackageVersionMutation) CertifyLegalIDs() (ids []uuid.UUID)

CertifyLegalIDs returns the "certify_legal" edge IDs in the mutation.

func (*PackageVersionMutation) ClearCertification added in v0.6.0

func (m *PackageVersionMutation) ClearCertification()

ClearCertification clears the "certification" edge to the Certification entity.

func (*PackageVersionMutation) ClearCertifyLegal added in v0.6.0

func (m *PackageVersionMutation) ClearCertifyLegal()

ClearCertifyLegal clears the "certify_legal" edge to the CertifyLegal entity.

func (*PackageVersionMutation) ClearDependency added in v0.6.0

func (m *PackageVersionMutation) ClearDependency()

ClearDependency clears the "dependency" edge to the Dependency entity.

func (*PackageVersionMutation) ClearDependencySubject added in v0.6.0

func (m *PackageVersionMutation) ClearDependencySubject()

ClearDependencySubject clears the "dependency_subject" edge to the Dependency entity.

func (*PackageVersionMutation) ClearEdge

func (m *PackageVersionMutation) ClearEdge(name string) error

ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.

func (*PackageVersionMutation) ClearField

func (m *PackageVersionMutation) ClearField(name string) error

ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.

func (*PackageVersionMutation) ClearHasSourceAt added in v0.6.0

func (m *PackageVersionMutation) ClearHasSourceAt()

ClearHasSourceAt clears the "has_source_at" edge to the HasSourceAt entity.

func (*PackageVersionMutation) ClearIncludedInSboms added in v0.4.0

func (m *PackageVersionMutation) ClearIncludedInSboms()

ClearIncludedInSboms clears the "included_in_sboms" edge to the BillOfMaterials entity.

func (*PackageVersionMutation) ClearMetadata added in v0.6.0

func (m *PackageVersionMutation) ClearMetadata()

ClearMetadata clears the "metadata" edge to the HasMetadata entity.

func (*PackageVersionMutation) ClearName

func (m *PackageVersionMutation) ClearName()

ClearName clears the "name" edge to the PackageName entity.

func (*PackageVersionMutation) ClearOccurrences

func (m *PackageVersionMutation) ClearOccurrences()

ClearOccurrences clears the "occurrences" edge to the Occurrence entity.

func (*PackageVersionMutation) ClearPkgEqualPkgA added in v0.5.0

func (m *PackageVersionMutation) ClearPkgEqualPkgA()

ClearPkgEqualPkgA clears the "pkg_equal_pkg_a" edge to the PkgEqual entity.

func (*PackageVersionMutation) ClearPkgEqualPkgB added in v0.5.0

func (m *PackageVersionMutation) ClearPkgEqualPkgB()

ClearPkgEqualPkgB clears the "pkg_equal_pkg_b" edge to the PkgEqual entity.

func (*PackageVersionMutation) ClearPoc added in v0.6.0

func (m *PackageVersionMutation) ClearPoc()

ClearPoc clears the "poc" edge to the PointOfContact entity.

func (*PackageVersionMutation) ClearQualifiers

func (m *PackageVersionMutation) ClearQualifiers()

ClearQualifiers clears the value of the "qualifiers" field.

func (*PackageVersionMutation) ClearSbom

func (m *PackageVersionMutation) ClearSbom()

ClearSbom clears the "sbom" edge to the BillOfMaterials entity.

func (*PackageVersionMutation) ClearVex added in v0.6.0

func (m *PackageVersionMutation) ClearVex()

ClearVex clears the "vex" edge to the CertifyVex entity.

func (*PackageVersionMutation) ClearVuln added in v0.6.0

func (m *PackageVersionMutation) ClearVuln()

ClearVuln clears the "vuln" edge to the CertifyVuln entity.

func (*PackageVersionMutation) ClearedEdges

func (m *PackageVersionMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*PackageVersionMutation) ClearedFields

func (m *PackageVersionMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (PackageVersionMutation) Client

func (m PackageVersionMutation) Client() *Client

Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.

func (*PackageVersionMutation) DependencyCleared added in v0.6.0

func (m *PackageVersionMutation) DependencyCleared() bool

DependencyCleared reports if the "dependency" edge to the Dependency entity was cleared.

func (*PackageVersionMutation) DependencyIDs added in v0.6.0

func (m *PackageVersionMutation) DependencyIDs() (ids []uuid.UUID)

DependencyIDs returns the "dependency" edge IDs in the mutation.

func (*PackageVersionMutation) DependencySubjectCleared added in v0.6.0

func (m *PackageVersionMutation) DependencySubjectCleared() bool

DependencySubjectCleared reports if the "dependency_subject" edge to the Dependency entity was cleared.

func (*PackageVersionMutation) DependencySubjectIDs added in v0.6.0

func (m *PackageVersionMutation) DependencySubjectIDs() (ids []uuid.UUID)

DependencySubjectIDs returns the "dependency_subject" edge IDs in the mutation.

func (*PackageVersionMutation) EdgeCleared

func (m *PackageVersionMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*PackageVersionMutation) Field

func (m *PackageVersionMutation) Field(name string) (ent.Value, bool)

Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*PackageVersionMutation) FieldCleared

func (m *PackageVersionMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*PackageVersionMutation) Fields

func (m *PackageVersionMutation) Fields() []string

Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().

func (*PackageVersionMutation) HasSourceAtCleared added in v0.6.0

func (m *PackageVersionMutation) HasSourceAtCleared() bool

HasSourceAtCleared reports if the "has_source_at" edge to the HasSourceAt entity was cleared.

func (*PackageVersionMutation) HasSourceAtIDs added in v0.6.0

func (m *PackageVersionMutation) HasSourceAtIDs() (ids []uuid.UUID)

HasSourceAtIDs returns the "has_source_at" edge IDs in the mutation.

func (*PackageVersionMutation) Hash

func (m *PackageVersionMutation) Hash() (r string, exists bool)

Hash returns the value of the "hash" field in the mutation.

func (*PackageVersionMutation) ID

func (m *PackageVersionMutation) ID() (id uuid.UUID, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*PackageVersionMutation) IDs

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*PackageVersionMutation) IncludedInSbomsCleared added in v0.4.0

func (m *PackageVersionMutation) IncludedInSbomsCleared() bool

IncludedInSbomsCleared reports if the "included_in_sboms" edge to the BillOfMaterials entity was cleared.

func (*PackageVersionMutation) IncludedInSbomsIDs added in v0.4.0

func (m *PackageVersionMutation) IncludedInSbomsIDs() (ids []uuid.UUID)

IncludedInSbomsIDs returns the "included_in_sboms" edge IDs in the mutation.

func (*PackageVersionMutation) MetadataCleared added in v0.6.0

func (m *PackageVersionMutation) MetadataCleared() bool

MetadataCleared reports if the "metadata" edge to the HasMetadata entity was cleared.

func (*PackageVersionMutation) MetadataIDs added in v0.6.0

func (m *PackageVersionMutation) MetadataIDs() (ids []uuid.UUID)

MetadataIDs returns the "metadata" edge IDs in the mutation.

func (*PackageVersionMutation) NameCleared

func (m *PackageVersionMutation) NameCleared() bool

NameCleared reports if the "name" edge to the PackageName entity was cleared.

func (*PackageVersionMutation) NameID

func (m *PackageVersionMutation) NameID() (r uuid.UUID, exists bool)

NameID returns the value of the "name_id" field in the mutation.

func (*PackageVersionMutation) NameIDs

func (m *PackageVersionMutation) NameIDs() (ids []uuid.UUID)

NameIDs returns the "name" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use NameID instead. It exists only for internal usage by the builders.

func (*PackageVersionMutation) OccurrencesCleared

func (m *PackageVersionMutation) OccurrencesCleared() bool

OccurrencesCleared reports if the "occurrences" edge to the Occurrence entity was cleared.

func (*PackageVersionMutation) OccurrencesIDs

func (m *PackageVersionMutation) OccurrencesIDs() (ids []uuid.UUID)

OccurrencesIDs returns the "occurrences" edge IDs in the mutation.

func (*PackageVersionMutation) OldField

func (m *PackageVersionMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*PackageVersionMutation) OldHash

func (m *PackageVersionMutation) OldHash(ctx context.Context) (v string, err error)

OldHash returns the old "hash" field's value of the PackageVersion entity. If the PackageVersion object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*PackageVersionMutation) OldNameID

func (m *PackageVersionMutation) OldNameID(ctx context.Context) (v uuid.UUID, err error)

OldNameID returns the old "name_id" field's value of the PackageVersion entity. If the PackageVersion object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*PackageVersionMutation) OldQualifiers

func (m *PackageVersionMutation) OldQualifiers(ctx context.Context) (v []model.PackageQualifier, err error)

OldQualifiers returns the old "qualifiers" field's value of the PackageVersion entity. If the PackageVersion object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*PackageVersionMutation) OldSubpath

func (m *PackageVersionMutation) OldSubpath(ctx context.Context) (v string, err error)

OldSubpath returns the old "subpath" field's value of the PackageVersion entity. If the PackageVersion object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*PackageVersionMutation) OldVersion

func (m *PackageVersionMutation) OldVersion(ctx context.Context) (v string, err error)

OldVersion returns the old "version" field's value of the PackageVersion entity. If the PackageVersion object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*PackageVersionMutation) Op

func (m *PackageVersionMutation) Op() Op

Op returns the operation name.

func (*PackageVersionMutation) PkgEqualPkgACleared added in v0.5.0

func (m *PackageVersionMutation) PkgEqualPkgACleared() bool

PkgEqualPkgACleared reports if the "pkg_equal_pkg_a" edge to the PkgEqual entity was cleared.

func (*PackageVersionMutation) PkgEqualPkgAIDs added in v0.5.0

func (m *PackageVersionMutation) PkgEqualPkgAIDs() (ids []uuid.UUID)

PkgEqualPkgAIDs returns the "pkg_equal_pkg_a" edge IDs in the mutation.

func (*PackageVersionMutation) PkgEqualPkgBCleared added in v0.5.0

func (m *PackageVersionMutation) PkgEqualPkgBCleared() bool

PkgEqualPkgBCleared reports if the "pkg_equal_pkg_b" edge to the PkgEqual entity was cleared.

func (*PackageVersionMutation) PkgEqualPkgBIDs added in v0.5.0

func (m *PackageVersionMutation) PkgEqualPkgBIDs() (ids []uuid.UUID)

PkgEqualPkgBIDs returns the "pkg_equal_pkg_b" edge IDs in the mutation.

func (*PackageVersionMutation) PocCleared added in v0.6.0

func (m *PackageVersionMutation) PocCleared() bool

PocCleared reports if the "poc" edge to the PointOfContact entity was cleared.

func (*PackageVersionMutation) PocIDs added in v0.6.0

func (m *PackageVersionMutation) PocIDs() (ids []uuid.UUID)

PocIDs returns the "poc" edge IDs in the mutation.

func (*PackageVersionMutation) Qualifiers

func (m *PackageVersionMutation) Qualifiers() (r []model.PackageQualifier, exists bool)

Qualifiers returns the value of the "qualifiers" field in the mutation.

func (*PackageVersionMutation) QualifiersCleared

func (m *PackageVersionMutation) QualifiersCleared() bool

QualifiersCleared returns if the "qualifiers" field was cleared in this mutation.

func (*PackageVersionMutation) RemoveCertificationIDs added in v0.6.0

func (m *PackageVersionMutation) RemoveCertificationIDs(ids ...uuid.UUID)

RemoveCertificationIDs removes the "certification" edge to the Certification entity by IDs.

func (*PackageVersionMutation) RemoveCertifyLegalIDs added in v0.6.0

func (m *PackageVersionMutation) RemoveCertifyLegalIDs(ids ...uuid.UUID)

RemoveCertifyLegalIDs removes the "certify_legal" edge to the CertifyLegal entity by IDs.

func (*PackageVersionMutation) RemoveDependencyIDs added in v0.6.0

func (m *PackageVersionMutation) RemoveDependencyIDs(ids ...uuid.UUID)

RemoveDependencyIDs removes the "dependency" edge to the Dependency entity by IDs.

func (*PackageVersionMutation) RemoveDependencySubjectIDs added in v0.6.0

func (m *PackageVersionMutation) RemoveDependencySubjectIDs(ids ...uuid.UUID)

RemoveDependencySubjectIDs removes the "dependency_subject" edge to the Dependency entity by IDs.

func (*PackageVersionMutation) RemoveHasSourceAtIDs added in v0.6.0

func (m *PackageVersionMutation) RemoveHasSourceAtIDs(ids ...uuid.UUID)

RemoveHasSourceAtIDs removes the "has_source_at" edge to the HasSourceAt entity by IDs.

func (*PackageVersionMutation) RemoveIncludedInSbomIDs added in v0.4.0

func (m *PackageVersionMutation) RemoveIncludedInSbomIDs(ids ...uuid.UUID)

RemoveIncludedInSbomIDs removes the "included_in_sboms" edge to the BillOfMaterials entity by IDs.

func (*PackageVersionMutation) RemoveMetadatumIDs added in v0.6.0

func (m *PackageVersionMutation) RemoveMetadatumIDs(ids ...uuid.UUID)

RemoveMetadatumIDs removes the "metadata" edge to the HasMetadata entity by IDs.

func (*PackageVersionMutation) RemoveOccurrenceIDs

func (m *PackageVersionMutation) RemoveOccurrenceIDs(ids ...uuid.UUID)

RemoveOccurrenceIDs removes the "occurrences" edge to the Occurrence entity by IDs.

func (*PackageVersionMutation) RemovePkgEqualPkgAIDs added in v0.5.0

func (m *PackageVersionMutation) RemovePkgEqualPkgAIDs(ids ...uuid.UUID)

RemovePkgEqualPkgAIDs removes the "pkg_equal_pkg_a" edge to the PkgEqual entity by IDs.

func (*PackageVersionMutation) RemovePkgEqualPkgBIDs added in v0.5.0

func (m *PackageVersionMutation) RemovePkgEqualPkgBIDs(ids ...uuid.UUID)

RemovePkgEqualPkgBIDs removes the "pkg_equal_pkg_b" edge to the PkgEqual entity by IDs.

func (*PackageVersionMutation) RemovePocIDs added in v0.6.0

func (m *PackageVersionMutation) RemovePocIDs(ids ...uuid.UUID)

RemovePocIDs removes the "poc" edge to the PointOfContact entity by IDs.

func (*PackageVersionMutation) RemoveSbomIDs

func (m *PackageVersionMutation) RemoveSbomIDs(ids ...uuid.UUID)

RemoveSbomIDs removes the "sbom" edge to the BillOfMaterials entity by IDs.

func (*PackageVersionMutation) RemoveVexIDs added in v0.6.0

func (m *PackageVersionMutation) RemoveVexIDs(ids ...uuid.UUID)

RemoveVexIDs removes the "vex" edge to the CertifyVex entity by IDs.

func (*PackageVersionMutation) RemoveVulnIDs added in v0.6.0

func (m *PackageVersionMutation) RemoveVulnIDs(ids ...uuid.UUID)

RemoveVulnIDs removes the "vuln" edge to the CertifyVuln entity by IDs.

func (*PackageVersionMutation) RemovedCertificationIDs added in v0.6.0

func (m *PackageVersionMutation) RemovedCertificationIDs() (ids []uuid.UUID)

RemovedCertification returns the removed IDs of the "certification" edge to the Certification entity.

func (*PackageVersionMutation) RemovedCertifyLegalIDs added in v0.6.0

func (m *PackageVersionMutation) RemovedCertifyLegalIDs() (ids []uuid.UUID)

RemovedCertifyLegal returns the removed IDs of the "certify_legal" edge to the CertifyLegal entity.

func (*PackageVersionMutation) RemovedDependencyIDs added in v0.6.0

func (m *PackageVersionMutation) RemovedDependencyIDs() (ids []uuid.UUID)

RemovedDependency returns the removed IDs of the "dependency" edge to the Dependency entity.

func (*PackageVersionMutation) RemovedDependencySubjectIDs added in v0.6.0

func (m *PackageVersionMutation) RemovedDependencySubjectIDs() (ids []uuid.UUID)

RemovedDependencySubject returns the removed IDs of the "dependency_subject" edge to the Dependency entity.

func (*PackageVersionMutation) RemovedEdges

func (m *PackageVersionMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*PackageVersionMutation) RemovedHasSourceAtIDs added in v0.6.0

func (m *PackageVersionMutation) RemovedHasSourceAtIDs() (ids []uuid.UUID)

RemovedHasSourceAt returns the removed IDs of the "has_source_at" edge to the HasSourceAt entity.

func (*PackageVersionMutation) RemovedIDs

func (m *PackageVersionMutation) RemovedIDs(name string) []ent.Value

RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.

func (*PackageVersionMutation) RemovedIncludedInSbomsIDs added in v0.4.0

func (m *PackageVersionMutation) RemovedIncludedInSbomsIDs() (ids []uuid.UUID)

RemovedIncludedInSboms returns the removed IDs of the "included_in_sboms" edge to the BillOfMaterials entity.

func (*PackageVersionMutation) RemovedMetadataIDs added in v0.6.0

func (m *PackageVersionMutation) RemovedMetadataIDs() (ids []uuid.UUID)

RemovedMetadata returns the removed IDs of the "metadata" edge to the HasMetadata entity.

func (*PackageVersionMutation) RemovedOccurrencesIDs

func (m *PackageVersionMutation) RemovedOccurrencesIDs() (ids []uuid.UUID)

RemovedOccurrences returns the removed IDs of the "occurrences" edge to the Occurrence entity.

func (*PackageVersionMutation) RemovedPkgEqualPkgAIDs added in v0.5.0

func (m *PackageVersionMutation) RemovedPkgEqualPkgAIDs() (ids []uuid.UUID)

RemovedPkgEqualPkgA returns the removed IDs of the "pkg_equal_pkg_a" edge to the PkgEqual entity.

func (*PackageVersionMutation) RemovedPkgEqualPkgBIDs added in v0.5.0

func (m *PackageVersionMutation) RemovedPkgEqualPkgBIDs() (ids []uuid.UUID)

RemovedPkgEqualPkgB returns the removed IDs of the "pkg_equal_pkg_b" edge to the PkgEqual entity.

func (*PackageVersionMutation) RemovedPocIDs added in v0.6.0

func (m *PackageVersionMutation) RemovedPocIDs() (ids []uuid.UUID)

RemovedPoc returns the removed IDs of the "poc" edge to the PointOfContact entity.

func (*PackageVersionMutation) RemovedSbomIDs

func (m *PackageVersionMutation) RemovedSbomIDs() (ids []uuid.UUID)

RemovedSbom returns the removed IDs of the "sbom" edge to the BillOfMaterials entity.

func (*PackageVersionMutation) RemovedVexIDs added in v0.6.0

func (m *PackageVersionMutation) RemovedVexIDs() (ids []uuid.UUID)

RemovedVex returns the removed IDs of the "vex" edge to the CertifyVex entity.

func (*PackageVersionMutation) RemovedVulnIDs added in v0.6.0

func (m *PackageVersionMutation) RemovedVulnIDs() (ids []uuid.UUID)

RemovedVuln returns the removed IDs of the "vuln" edge to the CertifyVuln entity.

func (*PackageVersionMutation) ResetCertification added in v0.6.0

func (m *PackageVersionMutation) ResetCertification()

ResetCertification resets all changes to the "certification" edge.

func (*PackageVersionMutation) ResetCertifyLegal added in v0.6.0

func (m *PackageVersionMutation) ResetCertifyLegal()

ResetCertifyLegal resets all changes to the "certify_legal" edge.

func (*PackageVersionMutation) ResetDependency added in v0.6.0

func (m *PackageVersionMutation) ResetDependency()

ResetDependency resets all changes to the "dependency" edge.

func (*PackageVersionMutation) ResetDependencySubject added in v0.6.0

func (m *PackageVersionMutation) ResetDependencySubject()

ResetDependencySubject resets all changes to the "dependency_subject" edge.

func (*PackageVersionMutation) ResetEdge

func (m *PackageVersionMutation) ResetEdge(name string) error

ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.

func (*PackageVersionMutation) ResetField

func (m *PackageVersionMutation) ResetField(name string) error

ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.

func (*PackageVersionMutation) ResetHasSourceAt added in v0.6.0

func (m *PackageVersionMutation) ResetHasSourceAt()

ResetHasSourceAt resets all changes to the "has_source_at" edge.

func (*PackageVersionMutation) ResetHash

func (m *PackageVersionMutation) ResetHash()

ResetHash resets all changes to the "hash" field.

func (*PackageVersionMutation) ResetIncludedInSboms added in v0.4.0

func (m *PackageVersionMutation) ResetIncludedInSboms()

ResetIncludedInSboms resets all changes to the "included_in_sboms" edge.

func (*PackageVersionMutation) ResetMetadata added in v0.6.0

func (m *PackageVersionMutation) ResetMetadata()

ResetMetadata resets all changes to the "metadata" edge.

func (*PackageVersionMutation) ResetName

func (m *PackageVersionMutation) ResetName()

ResetName resets all changes to the "name" edge.

func (*PackageVersionMutation) ResetNameID

func (m *PackageVersionMutation) ResetNameID()

ResetNameID resets all changes to the "name_id" field.

func (*PackageVersionMutation) ResetOccurrences

func (m *PackageVersionMutation) ResetOccurrences()

ResetOccurrences resets all changes to the "occurrences" edge.

func (*PackageVersionMutation) ResetPkgEqualPkgA added in v0.5.0

func (m *PackageVersionMutation) ResetPkgEqualPkgA()

ResetPkgEqualPkgA resets all changes to the "pkg_equal_pkg_a" edge.

func (*PackageVersionMutation) ResetPkgEqualPkgB added in v0.5.0

func (m *PackageVersionMutation) ResetPkgEqualPkgB()

ResetPkgEqualPkgB resets all changes to the "pkg_equal_pkg_b" edge.

func (*PackageVersionMutation) ResetPoc added in v0.6.0

func (m *PackageVersionMutation) ResetPoc()

ResetPoc resets all changes to the "poc" edge.

func (*PackageVersionMutation) ResetQualifiers

func (m *PackageVersionMutation) ResetQualifiers()

ResetQualifiers resets all changes to the "qualifiers" field.

func (*PackageVersionMutation) ResetSbom

func (m *PackageVersionMutation) ResetSbom()

ResetSbom resets all changes to the "sbom" edge.

func (*PackageVersionMutation) ResetSubpath

func (m *PackageVersionMutation) ResetSubpath()

ResetSubpath resets all changes to the "subpath" field.

func (*PackageVersionMutation) ResetVersion

func (m *PackageVersionMutation) ResetVersion()

ResetVersion resets all changes to the "version" field.

func (*PackageVersionMutation) ResetVex added in v0.6.0

func (m *PackageVersionMutation) ResetVex()

ResetVex resets all changes to the "vex" edge.

func (*PackageVersionMutation) ResetVuln added in v0.6.0

func (m *PackageVersionMutation) ResetVuln()

ResetVuln resets all changes to the "vuln" edge.

func (*PackageVersionMutation) SbomCleared

func (m *PackageVersionMutation) SbomCleared() bool

SbomCleared reports if the "sbom" edge to the BillOfMaterials entity was cleared.

func (*PackageVersionMutation) SbomIDs

func (m *PackageVersionMutation) SbomIDs() (ids []uuid.UUID)

SbomIDs returns the "sbom" edge IDs in the mutation.

func (*PackageVersionMutation) SetField

func (m *PackageVersionMutation) SetField(name string, value ent.Value) error

SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*PackageVersionMutation) SetHash

func (m *PackageVersionMutation) SetHash(s string)

SetHash sets the "hash" field.

func (*PackageVersionMutation) SetID added in v0.5.0

func (m *PackageVersionMutation) SetID(id uuid.UUID)

SetID sets the value of the id field. Note that this operation is only accepted on creation of PackageVersion entities.

func (*PackageVersionMutation) SetNameID

func (m *PackageVersionMutation) SetNameID(u uuid.UUID)

SetNameID sets the "name_id" field.

func (*PackageVersionMutation) SetOp

func (m *PackageVersionMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*PackageVersionMutation) SetQualifiers

func (m *PackageVersionMutation) SetQualifiers(mq []model.PackageQualifier)

SetQualifiers sets the "qualifiers" field.

func (*PackageVersionMutation) SetSubpath

func (m *PackageVersionMutation) SetSubpath(s string)

SetSubpath sets the "subpath" field.

func (*PackageVersionMutation) SetVersion

func (m *PackageVersionMutation) SetVersion(s string)

SetVersion sets the "version" field.

func (*PackageVersionMutation) Subpath

func (m *PackageVersionMutation) Subpath() (r string, exists bool)

Subpath returns the value of the "subpath" field in the mutation.

func (PackageVersionMutation) Tx

func (m PackageVersionMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*PackageVersionMutation) Type

func (m *PackageVersionMutation) Type() string

Type returns the node type of this mutation (PackageVersion).

func (*PackageVersionMutation) Version

func (m *PackageVersionMutation) Version() (r string, exists bool)

Version returns the value of the "version" field in the mutation.

func (*PackageVersionMutation) VexCleared added in v0.6.0

func (m *PackageVersionMutation) VexCleared() bool

VexCleared reports if the "vex" edge to the CertifyVex entity was cleared.

func (*PackageVersionMutation) VexIDs added in v0.6.0

func (m *PackageVersionMutation) VexIDs() (ids []uuid.UUID)

VexIDs returns the "vex" edge IDs in the mutation.

func (*PackageVersionMutation) VulnCleared added in v0.6.0

func (m *PackageVersionMutation) VulnCleared() bool

VulnCleared reports if the "vuln" edge to the CertifyVuln entity was cleared.

func (*PackageVersionMutation) VulnIDs added in v0.6.0

func (m *PackageVersionMutation) VulnIDs() (ids []uuid.UUID)

VulnIDs returns the "vuln" edge IDs in the mutation.

func (*PackageVersionMutation) Where

Where appends a list predicates to the PackageVersionMutation builder.

func (*PackageVersionMutation) WhereP

func (m *PackageVersionMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the PackageVersionMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type PackageVersionOrder

type PackageVersionOrder struct {
	Direction OrderDirection            `json:"direction"`
	Field     *PackageVersionOrderField `json:"field"`
}

PackageVersionOrder defines the ordering of PackageVersion.

type PackageVersionOrderField

type PackageVersionOrderField struct {
	// Value extracts the ordering value from the given PackageVersion.
	Value func(*PackageVersion) (ent.Value, error)
	// contains filtered or unexported fields
}

PackageVersionOrderField defines the ordering field of PackageVersion.

type PackageVersionPaginateOption

type PackageVersionPaginateOption func(*packageversionPager) error

PackageVersionPaginateOption enables pagination customization.

func WithPackageVersionFilter

func WithPackageVersionFilter(filter func(*PackageVersionQuery) (*PackageVersionQuery, error)) PackageVersionPaginateOption

WithPackageVersionFilter configures pagination filter.

func WithPackageVersionOrder

func WithPackageVersionOrder(order *PackageVersionOrder) PackageVersionPaginateOption

WithPackageVersionOrder configures pagination ordering.

type PackageVersionQuery

type PackageVersionQuery struct {
	// contains filtered or unexported fields
}

PackageVersionQuery is the builder for querying PackageVersion entities.

func (*PackageVersionQuery) Aggregate

func (pvq *PackageVersionQuery) Aggregate(fns ...AggregateFunc) *PackageVersionSelect

Aggregate returns a PackageVersionSelect configured with the given aggregations.

func (*PackageVersionQuery) All

All executes the query and returns a list of PackageVersions.

func (*PackageVersionQuery) AllX

AllX is like All, but panics if an error occurs.

func (*PackageVersionQuery) Clone

Clone returns a duplicate of the PackageVersionQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*PackageVersionQuery) CollectFields

func (pv *PackageVersionQuery) CollectFields(ctx context.Context, satisfies ...string) (*PackageVersionQuery, error)

CollectFields tells the query-builder to eagerly load connected nodes by resolver context.

func (*PackageVersionQuery) Count

func (pvq *PackageVersionQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*PackageVersionQuery) CountX

func (pvq *PackageVersionQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*PackageVersionQuery) Exist

func (pvq *PackageVersionQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*PackageVersionQuery) ExistX

func (pvq *PackageVersionQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*PackageVersionQuery) First

First returns the first PackageVersion entity from the query. Returns a *NotFoundError when no PackageVersion was found.

func (*PackageVersionQuery) FirstID

func (pvq *PackageVersionQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)

FirstID returns the first PackageVersion ID from the query. Returns a *NotFoundError when no PackageVersion ID was found.

func (*PackageVersionQuery) FirstIDX

func (pvq *PackageVersionQuery) FirstIDX(ctx context.Context) uuid.UUID

FirstIDX is like FirstID, but panics if an error occurs.

func (*PackageVersionQuery) FirstX

FirstX is like First, but panics if an error occurs.

func (*PackageVersionQuery) GroupBy

func (pvq *PackageVersionQuery) GroupBy(field string, fields ...string) *PackageVersionGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	NameID uuid.UUID `json:"name_id,omitempty"`
	Count int `json:"count,omitempty"`
}

client.PackageVersion.Query().
	GroupBy(packageversion.FieldNameID).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*PackageVersionQuery) IDs

func (pvq *PackageVersionQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)

IDs executes the query and returns a list of PackageVersion IDs.

func (*PackageVersionQuery) IDsX

func (pvq *PackageVersionQuery) IDsX(ctx context.Context) []uuid.UUID

IDsX is like IDs, but panics if an error occurs.

func (*PackageVersionQuery) Limit

func (pvq *PackageVersionQuery) Limit(limit int) *PackageVersionQuery

Limit the number of records to be returned by this query.

func (*PackageVersionQuery) Offset

func (pvq *PackageVersionQuery) Offset(offset int) *PackageVersionQuery

Offset to start from.

func (*PackageVersionQuery) Only

Only returns a single PackageVersion entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one PackageVersion entity is found. Returns a *NotFoundError when no PackageVersion entities are found.

func (*PackageVersionQuery) OnlyID

func (pvq *PackageVersionQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)

OnlyID is like Only, but returns the only PackageVersion ID in the query. Returns a *NotSingularError when more than one PackageVersion ID is found. Returns a *NotFoundError when no entities are found.

func (*PackageVersionQuery) OnlyIDX

func (pvq *PackageVersionQuery) OnlyIDX(ctx context.Context) uuid.UUID

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*PackageVersionQuery) OnlyX

OnlyX is like Only, but panics if an error occurs.

func (*PackageVersionQuery) Order

Order specifies how the records should be ordered.

func (*PackageVersionQuery) Paginate

func (pv *PackageVersionQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...PackageVersionPaginateOption,
) (*PackageVersionConnection, error)

Paginate executes the query and returns a relay based cursor connection to PackageVersion.

func (*PackageVersionQuery) QueryCertification added in v0.6.0

func (pvq *PackageVersionQuery) QueryCertification() *CertificationQuery

QueryCertification chains the current query on the "certification" edge.

func (*PackageVersionQuery) QueryCertifyLegal added in v0.6.0

func (pvq *PackageVersionQuery) QueryCertifyLegal() *CertifyLegalQuery

QueryCertifyLegal chains the current query on the "certify_legal" edge.

func (*PackageVersionQuery) QueryDependency added in v0.6.0

func (pvq *PackageVersionQuery) QueryDependency() *DependencyQuery

QueryDependency chains the current query on the "dependency" edge.

func (*PackageVersionQuery) QueryDependencySubject added in v0.6.0

func (pvq *PackageVersionQuery) QueryDependencySubject() *DependencyQuery

QueryDependencySubject chains the current query on the "dependency_subject" edge.

func (*PackageVersionQuery) QueryHasSourceAt added in v0.6.0

func (pvq *PackageVersionQuery) QueryHasSourceAt() *HasSourceAtQuery

QueryHasSourceAt chains the current query on the "has_source_at" edge.

func (*PackageVersionQuery) QueryIncludedInSboms added in v0.4.0

func (pvq *PackageVersionQuery) QueryIncludedInSboms() *BillOfMaterialsQuery

QueryIncludedInSboms chains the current query on the "included_in_sboms" edge.

func (*PackageVersionQuery) QueryMetadata added in v0.6.0

func (pvq *PackageVersionQuery) QueryMetadata() *HasMetadataQuery

QueryMetadata chains the current query on the "metadata" edge.

func (*PackageVersionQuery) QueryName

func (pvq *PackageVersionQuery) QueryName() *PackageNameQuery

QueryName chains the current query on the "name" edge.

func (*PackageVersionQuery) QueryOccurrences

func (pvq *PackageVersionQuery) QueryOccurrences() *OccurrenceQuery

QueryOccurrences chains the current query on the "occurrences" edge.

func (*PackageVersionQuery) QueryPkgEqualPkgA added in v0.5.0

func (pvq *PackageVersionQuery) QueryPkgEqualPkgA() *PkgEqualQuery

QueryPkgEqualPkgA chains the current query on the "pkg_equal_pkg_a" edge.

func (*PackageVersionQuery) QueryPkgEqualPkgB added in v0.5.0

func (pvq *PackageVersionQuery) QueryPkgEqualPkgB() *PkgEqualQuery

QueryPkgEqualPkgB chains the current query on the "pkg_equal_pkg_b" edge.

func (*PackageVersionQuery) QueryPoc added in v0.6.0

func (pvq *PackageVersionQuery) QueryPoc() *PointOfContactQuery

QueryPoc chains the current query on the "poc" edge.

func (*PackageVersionQuery) QuerySbom

func (pvq *PackageVersionQuery) QuerySbom() *BillOfMaterialsQuery

QuerySbom chains the current query on the "sbom" edge.

func (*PackageVersionQuery) QueryVex added in v0.6.0

func (pvq *PackageVersionQuery) QueryVex() *CertifyVexQuery

QueryVex chains the current query on the "vex" edge.

func (*PackageVersionQuery) QueryVuln added in v0.6.0

func (pvq *PackageVersionQuery) QueryVuln() *CertifyVulnQuery

QueryVuln chains the current query on the "vuln" edge.

func (*PackageVersionQuery) Select

func (pvq *PackageVersionQuery) Select(fields ...string) *PackageVersionSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	NameID uuid.UUID `json:"name_id,omitempty"`
}

client.PackageVersion.Query().
	Select(packageversion.FieldNameID).
	Scan(ctx, &v)

func (*PackageVersionQuery) Unique

func (pvq *PackageVersionQuery) Unique(unique bool) *PackageVersionQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*PackageVersionQuery) Where

Where adds a new predicate for the PackageVersionQuery builder.

func (*PackageVersionQuery) WithCertification added in v0.6.0

func (pvq *PackageVersionQuery) WithCertification(opts ...func(*CertificationQuery)) *PackageVersionQuery

WithCertification tells the query-builder to eager-load the nodes that are connected to the "certification" edge. The optional arguments are used to configure the query builder of the edge.

func (*PackageVersionQuery) WithCertifyLegal added in v0.6.0

func (pvq *PackageVersionQuery) WithCertifyLegal(opts ...func(*CertifyLegalQuery)) *PackageVersionQuery

WithCertifyLegal tells the query-builder to eager-load the nodes that are connected to the "certify_legal" edge. The optional arguments are used to configure the query builder of the edge.

func (*PackageVersionQuery) WithDependency added in v0.6.0

func (pvq *PackageVersionQuery) WithDependency(opts ...func(*DependencyQuery)) *PackageVersionQuery

WithDependency tells the query-builder to eager-load the nodes that are connected to the "dependency" edge. The optional arguments are used to configure the query builder of the edge.

func (*PackageVersionQuery) WithDependencySubject added in v0.6.0

func (pvq *PackageVersionQuery) WithDependencySubject(opts ...func(*DependencyQuery)) *PackageVersionQuery

WithDependencySubject tells the query-builder to eager-load the nodes that are connected to the "dependency_subject" edge. The optional arguments are used to configure the query builder of the edge.

func (*PackageVersionQuery) WithHasSourceAt added in v0.6.0

func (pvq *PackageVersionQuery) WithHasSourceAt(opts ...func(*HasSourceAtQuery)) *PackageVersionQuery

WithHasSourceAt tells the query-builder to eager-load the nodes that are connected to the "has_source_at" edge. The optional arguments are used to configure the query builder of the edge.

func (*PackageVersionQuery) WithIncludedInSboms added in v0.4.0

func (pvq *PackageVersionQuery) WithIncludedInSboms(opts ...func(*BillOfMaterialsQuery)) *PackageVersionQuery

WithIncludedInSboms tells the query-builder to eager-load the nodes that are connected to the "included_in_sboms" edge. The optional arguments are used to configure the query builder of the edge.

func (*PackageVersionQuery) WithMetadata added in v0.6.0

func (pvq *PackageVersionQuery) WithMetadata(opts ...func(*HasMetadataQuery)) *PackageVersionQuery

WithMetadata tells the query-builder to eager-load the nodes that are connected to the "metadata" edge. The optional arguments are used to configure the query builder of the edge.

func (*PackageVersionQuery) WithName

func (pvq *PackageVersionQuery) WithName(opts ...func(*PackageNameQuery)) *PackageVersionQuery

WithName tells the query-builder to eager-load the nodes that are connected to the "name" edge. The optional arguments are used to configure the query builder of the edge.

func (*PackageVersionQuery) WithNamedCertification added in v0.6.0

func (pvq *PackageVersionQuery) WithNamedCertification(name string, opts ...func(*CertificationQuery)) *PackageVersionQuery

WithNamedCertification tells the query-builder to eager-load the nodes that are connected to the "certification" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*PackageVersionQuery) WithNamedCertifyLegal added in v0.6.0

func (pvq *PackageVersionQuery) WithNamedCertifyLegal(name string, opts ...func(*CertifyLegalQuery)) *PackageVersionQuery

WithNamedCertifyLegal tells the query-builder to eager-load the nodes that are connected to the "certify_legal" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*PackageVersionQuery) WithNamedDependency added in v0.6.0

func (pvq *PackageVersionQuery) WithNamedDependency(name string, opts ...func(*DependencyQuery)) *PackageVersionQuery

WithNamedDependency tells the query-builder to eager-load the nodes that are connected to the "dependency" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*PackageVersionQuery) WithNamedDependencySubject added in v0.6.0

func (pvq *PackageVersionQuery) WithNamedDependencySubject(name string, opts ...func(*DependencyQuery)) *PackageVersionQuery

WithNamedDependencySubject tells the query-builder to eager-load the nodes that are connected to the "dependency_subject" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*PackageVersionQuery) WithNamedHasSourceAt added in v0.6.0

func (pvq *PackageVersionQuery) WithNamedHasSourceAt(name string, opts ...func(*HasSourceAtQuery)) *PackageVersionQuery

WithNamedHasSourceAt tells the query-builder to eager-load the nodes that are connected to the "has_source_at" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*PackageVersionQuery) WithNamedIncludedInSboms added in v0.4.0

func (pvq *PackageVersionQuery) WithNamedIncludedInSboms(name string, opts ...func(*BillOfMaterialsQuery)) *PackageVersionQuery

WithNamedIncludedInSboms tells the query-builder to eager-load the nodes that are connected to the "included_in_sboms" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*PackageVersionQuery) WithNamedMetadata added in v0.6.0

func (pvq *PackageVersionQuery) WithNamedMetadata(name string, opts ...func(*HasMetadataQuery)) *PackageVersionQuery

WithNamedMetadata tells the query-builder to eager-load the nodes that are connected to the "metadata" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*PackageVersionQuery) WithNamedOccurrences

func (pvq *PackageVersionQuery) WithNamedOccurrences(name string, opts ...func(*OccurrenceQuery)) *PackageVersionQuery

WithNamedOccurrences tells the query-builder to eager-load the nodes that are connected to the "occurrences" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*PackageVersionQuery) WithNamedPkgEqualPkgA added in v0.5.0

func (pvq *PackageVersionQuery) WithNamedPkgEqualPkgA(name string, opts ...func(*PkgEqualQuery)) *PackageVersionQuery

WithNamedPkgEqualPkgA tells the query-builder to eager-load the nodes that are connected to the "pkg_equal_pkg_a" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*PackageVersionQuery) WithNamedPkgEqualPkgB added in v0.5.0

func (pvq *PackageVersionQuery) WithNamedPkgEqualPkgB(name string, opts ...func(*PkgEqualQuery)) *PackageVersionQuery

WithNamedPkgEqualPkgB tells the query-builder to eager-load the nodes that are connected to the "pkg_equal_pkg_b" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*PackageVersionQuery) WithNamedPoc added in v0.6.0

func (pvq *PackageVersionQuery) WithNamedPoc(name string, opts ...func(*PointOfContactQuery)) *PackageVersionQuery

WithNamedPoc tells the query-builder to eager-load the nodes that are connected to the "poc" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*PackageVersionQuery) WithNamedSbom

func (pvq *PackageVersionQuery) WithNamedSbom(name string, opts ...func(*BillOfMaterialsQuery)) *PackageVersionQuery

WithNamedSbom tells the query-builder to eager-load the nodes that are connected to the "sbom" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*PackageVersionQuery) WithNamedVex added in v0.6.0

func (pvq *PackageVersionQuery) WithNamedVex(name string, opts ...func(*CertifyVexQuery)) *PackageVersionQuery

WithNamedVex tells the query-builder to eager-load the nodes that are connected to the "vex" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*PackageVersionQuery) WithNamedVuln added in v0.6.0

func (pvq *PackageVersionQuery) WithNamedVuln(name string, opts ...func(*CertifyVulnQuery)) *PackageVersionQuery

WithNamedVuln tells the query-builder to eager-load the nodes that are connected to the "vuln" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*PackageVersionQuery) WithOccurrences

func (pvq *PackageVersionQuery) WithOccurrences(opts ...func(*OccurrenceQuery)) *PackageVersionQuery

WithOccurrences tells the query-builder to eager-load the nodes that are connected to the "occurrences" edge. The optional arguments are used to configure the query builder of the edge.

func (*PackageVersionQuery) WithPkgEqualPkgA added in v0.5.0

func (pvq *PackageVersionQuery) WithPkgEqualPkgA(opts ...func(*PkgEqualQuery)) *PackageVersionQuery

WithPkgEqualPkgA tells the query-builder to eager-load the nodes that are connected to the "pkg_equal_pkg_a" edge. The optional arguments are used to configure the query builder of the edge.

func (*PackageVersionQuery) WithPkgEqualPkgB added in v0.5.0

func (pvq *PackageVersionQuery) WithPkgEqualPkgB(opts ...func(*PkgEqualQuery)) *PackageVersionQuery

WithPkgEqualPkgB tells the query-builder to eager-load the nodes that are connected to the "pkg_equal_pkg_b" edge. The optional arguments are used to configure the query builder of the edge.

func (*PackageVersionQuery) WithPoc added in v0.6.0

func (pvq *PackageVersionQuery) WithPoc(opts ...func(*PointOfContactQuery)) *PackageVersionQuery

WithPoc tells the query-builder to eager-load the nodes that are connected to the "poc" edge. The optional arguments are used to configure the query builder of the edge.

func (*PackageVersionQuery) WithSbom

func (pvq *PackageVersionQuery) WithSbom(opts ...func(*BillOfMaterialsQuery)) *PackageVersionQuery

WithSbom tells the query-builder to eager-load the nodes that are connected to the "sbom" edge. The optional arguments are used to configure the query builder of the edge.

func (*PackageVersionQuery) WithVex added in v0.6.0

func (pvq *PackageVersionQuery) WithVex(opts ...func(*CertifyVexQuery)) *PackageVersionQuery

WithVex tells the query-builder to eager-load the nodes that are connected to the "vex" edge. The optional arguments are used to configure the query builder of the edge.

func (*PackageVersionQuery) WithVuln added in v0.6.0

func (pvq *PackageVersionQuery) WithVuln(opts ...func(*CertifyVulnQuery)) *PackageVersionQuery

WithVuln tells the query-builder to eager-load the nodes that are connected to the "vuln" edge. The optional arguments are used to configure the query builder of the edge.

type PackageVersionSelect

type PackageVersionSelect struct {
	*PackageVersionQuery
	// contains filtered or unexported fields
}

PackageVersionSelect is the builder for selecting fields of PackageVersion entities.

func (*PackageVersionSelect) Aggregate

Aggregate adds the given aggregation functions to the selector query.

func (*PackageVersionSelect) Bool

func (s *PackageVersionSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*PackageVersionSelect) BoolX

func (s *PackageVersionSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*PackageVersionSelect) Bools

func (s *PackageVersionSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*PackageVersionSelect) BoolsX

func (s *PackageVersionSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*PackageVersionSelect) Float64

func (s *PackageVersionSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*PackageVersionSelect) Float64X

func (s *PackageVersionSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*PackageVersionSelect) Float64s

func (s *PackageVersionSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*PackageVersionSelect) Float64sX

func (s *PackageVersionSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*PackageVersionSelect) Int

func (s *PackageVersionSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*PackageVersionSelect) IntX

func (s *PackageVersionSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*PackageVersionSelect) Ints

func (s *PackageVersionSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*PackageVersionSelect) IntsX

func (s *PackageVersionSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*PackageVersionSelect) Scan

func (pvs *PackageVersionSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*PackageVersionSelect) ScanX

func (s *PackageVersionSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*PackageVersionSelect) String

func (s *PackageVersionSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*PackageVersionSelect) StringX

func (s *PackageVersionSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*PackageVersionSelect) Strings

func (s *PackageVersionSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*PackageVersionSelect) StringsX

func (s *PackageVersionSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type PackageVersionUpdate

type PackageVersionUpdate struct {
	// contains filtered or unexported fields
}

PackageVersionUpdate is the builder for updating PackageVersion entities.

func (*PackageVersionUpdate) AddCertification added in v0.6.0

func (pvu *PackageVersionUpdate) AddCertification(c ...*Certification) *PackageVersionUpdate

AddCertification adds the "certification" edges to the Certification entity.

func (*PackageVersionUpdate) AddCertificationIDs added in v0.6.0

func (pvu *PackageVersionUpdate) AddCertificationIDs(ids ...uuid.UUID) *PackageVersionUpdate

AddCertificationIDs adds the "certification" edge to the Certification entity by IDs.

func (*PackageVersionUpdate) AddCertifyLegal added in v0.6.0

func (pvu *PackageVersionUpdate) AddCertifyLegal(c ...*CertifyLegal) *PackageVersionUpdate

AddCertifyLegal adds the "certify_legal" edges to the CertifyLegal entity.

func (*PackageVersionUpdate) AddCertifyLegalIDs added in v0.6.0

func (pvu *PackageVersionUpdate) AddCertifyLegalIDs(ids ...uuid.UUID) *PackageVersionUpdate

AddCertifyLegalIDs adds the "certify_legal" edge to the CertifyLegal entity by IDs.

func (*PackageVersionUpdate) AddDependency added in v0.6.0

func (pvu *PackageVersionUpdate) AddDependency(d ...*Dependency) *PackageVersionUpdate

AddDependency adds the "dependency" edges to the Dependency entity.

func (*PackageVersionUpdate) AddDependencyIDs added in v0.6.0

func (pvu *PackageVersionUpdate) AddDependencyIDs(ids ...uuid.UUID) *PackageVersionUpdate

AddDependencyIDs adds the "dependency" edge to the Dependency entity by IDs.

func (*PackageVersionUpdate) AddDependencySubject added in v0.6.0

func (pvu *PackageVersionUpdate) AddDependencySubject(d ...*Dependency) *PackageVersionUpdate

AddDependencySubject adds the "dependency_subject" edges to the Dependency entity.

func (*PackageVersionUpdate) AddDependencySubjectIDs added in v0.6.0

func (pvu *PackageVersionUpdate) AddDependencySubjectIDs(ids ...uuid.UUID) *PackageVersionUpdate

AddDependencySubjectIDs adds the "dependency_subject" edge to the Dependency entity by IDs.

func (*PackageVersionUpdate) AddHasSourceAt added in v0.6.0

func (pvu *PackageVersionUpdate) AddHasSourceAt(h ...*HasSourceAt) *PackageVersionUpdate

AddHasSourceAt adds the "has_source_at" edges to the HasSourceAt entity.

func (*PackageVersionUpdate) AddHasSourceAtIDs added in v0.6.0

func (pvu *PackageVersionUpdate) AddHasSourceAtIDs(ids ...uuid.UUID) *PackageVersionUpdate

AddHasSourceAtIDs adds the "has_source_at" edge to the HasSourceAt entity by IDs.

func (*PackageVersionUpdate) AddIncludedInSbomIDs added in v0.4.0

func (pvu *PackageVersionUpdate) AddIncludedInSbomIDs(ids ...uuid.UUID) *PackageVersionUpdate

AddIncludedInSbomIDs adds the "included_in_sboms" edge to the BillOfMaterials entity by IDs.

func (*PackageVersionUpdate) AddIncludedInSboms added in v0.4.0

func (pvu *PackageVersionUpdate) AddIncludedInSboms(b ...*BillOfMaterials) *PackageVersionUpdate

AddIncludedInSboms adds the "included_in_sboms" edges to the BillOfMaterials entity.

func (*PackageVersionUpdate) AddMetadata added in v0.6.0

func (pvu *PackageVersionUpdate) AddMetadata(h ...*HasMetadata) *PackageVersionUpdate

AddMetadata adds the "metadata" edges to the HasMetadata entity.

func (*PackageVersionUpdate) AddMetadatumIDs added in v0.6.0

func (pvu *PackageVersionUpdate) AddMetadatumIDs(ids ...uuid.UUID) *PackageVersionUpdate

AddMetadatumIDs adds the "metadata" edge to the HasMetadata entity by IDs.

func (*PackageVersionUpdate) AddOccurrenceIDs

func (pvu *PackageVersionUpdate) AddOccurrenceIDs(ids ...uuid.UUID) *PackageVersionUpdate

AddOccurrenceIDs adds the "occurrences" edge to the Occurrence entity by IDs.

func (*PackageVersionUpdate) AddOccurrences

func (pvu *PackageVersionUpdate) AddOccurrences(o ...*Occurrence) *PackageVersionUpdate

AddOccurrences adds the "occurrences" edges to the Occurrence entity.

func (*PackageVersionUpdate) AddPkgEqualPkgA added in v0.5.0

func (pvu *PackageVersionUpdate) AddPkgEqualPkgA(p ...*PkgEqual) *PackageVersionUpdate

AddPkgEqualPkgA adds the "pkg_equal_pkg_a" edges to the PkgEqual entity.

func (*PackageVersionUpdate) AddPkgEqualPkgAIDs added in v0.5.0

func (pvu *PackageVersionUpdate) AddPkgEqualPkgAIDs(ids ...uuid.UUID) *PackageVersionUpdate

AddPkgEqualPkgAIDs adds the "pkg_equal_pkg_a" edge to the PkgEqual entity by IDs.

func (*PackageVersionUpdate) AddPkgEqualPkgB added in v0.5.0

func (pvu *PackageVersionUpdate) AddPkgEqualPkgB(p ...*PkgEqual) *PackageVersionUpdate

AddPkgEqualPkgB adds the "pkg_equal_pkg_b" edges to the PkgEqual entity.

func (*PackageVersionUpdate) AddPkgEqualPkgBIDs added in v0.5.0

func (pvu *PackageVersionUpdate) AddPkgEqualPkgBIDs(ids ...uuid.UUID) *PackageVersionUpdate

AddPkgEqualPkgBIDs adds the "pkg_equal_pkg_b" edge to the PkgEqual entity by IDs.

func (*PackageVersionUpdate) AddPoc added in v0.6.0

AddPoc adds the "poc" edges to the PointOfContact entity.

func (*PackageVersionUpdate) AddPocIDs added in v0.6.0

func (pvu *PackageVersionUpdate) AddPocIDs(ids ...uuid.UUID) *PackageVersionUpdate

AddPocIDs adds the "poc" edge to the PointOfContact entity by IDs.

func (*PackageVersionUpdate) AddSbom

AddSbom adds the "sbom" edges to the BillOfMaterials entity.

func (*PackageVersionUpdate) AddSbomIDs

func (pvu *PackageVersionUpdate) AddSbomIDs(ids ...uuid.UUID) *PackageVersionUpdate

AddSbomIDs adds the "sbom" edge to the BillOfMaterials entity by IDs.

func (*PackageVersionUpdate) AddVex added in v0.6.0

AddVex adds the "vex" edges to the CertifyVex entity.

func (*PackageVersionUpdate) AddVexIDs added in v0.6.0

func (pvu *PackageVersionUpdate) AddVexIDs(ids ...uuid.UUID) *PackageVersionUpdate

AddVexIDs adds the "vex" edge to the CertifyVex entity by IDs.

func (*PackageVersionUpdate) AddVuln added in v0.6.0

AddVuln adds the "vuln" edges to the CertifyVuln entity.

func (*PackageVersionUpdate) AddVulnIDs added in v0.6.0

func (pvu *PackageVersionUpdate) AddVulnIDs(ids ...uuid.UUID) *PackageVersionUpdate

AddVulnIDs adds the "vuln" edge to the CertifyVuln entity by IDs.

func (*PackageVersionUpdate) AppendQualifiers

func (pvu *PackageVersionUpdate) AppendQualifiers(mq []model.PackageQualifier) *PackageVersionUpdate

AppendQualifiers appends mq to the "qualifiers" field.

func (*PackageVersionUpdate) ClearCertification added in v0.6.0

func (pvu *PackageVersionUpdate) ClearCertification() *PackageVersionUpdate

ClearCertification clears all "certification" edges to the Certification entity.

func (*PackageVersionUpdate) ClearCertifyLegal added in v0.6.0

func (pvu *PackageVersionUpdate) ClearCertifyLegal() *PackageVersionUpdate

ClearCertifyLegal clears all "certify_legal" edges to the CertifyLegal entity.

func (*PackageVersionUpdate) ClearDependency added in v0.6.0

func (pvu *PackageVersionUpdate) ClearDependency() *PackageVersionUpdate

ClearDependency clears all "dependency" edges to the Dependency entity.

func (*PackageVersionUpdate) ClearDependencySubject added in v0.6.0

func (pvu *PackageVersionUpdate) ClearDependencySubject() *PackageVersionUpdate

ClearDependencySubject clears all "dependency_subject" edges to the Dependency entity.

func (*PackageVersionUpdate) ClearHasSourceAt added in v0.6.0

func (pvu *PackageVersionUpdate) ClearHasSourceAt() *PackageVersionUpdate

ClearHasSourceAt clears all "has_source_at" edges to the HasSourceAt entity.

func (*PackageVersionUpdate) ClearIncludedInSboms added in v0.4.0

func (pvu *PackageVersionUpdate) ClearIncludedInSboms() *PackageVersionUpdate

ClearIncludedInSboms clears all "included_in_sboms" edges to the BillOfMaterials entity.

func (*PackageVersionUpdate) ClearMetadata added in v0.6.0

func (pvu *PackageVersionUpdate) ClearMetadata() *PackageVersionUpdate

ClearMetadata clears all "metadata" edges to the HasMetadata entity.

func (*PackageVersionUpdate) ClearName

func (pvu *PackageVersionUpdate) ClearName() *PackageVersionUpdate

ClearName clears the "name" edge to the PackageName entity.

func (*PackageVersionUpdate) ClearOccurrences

func (pvu *PackageVersionUpdate) ClearOccurrences() *PackageVersionUpdate

ClearOccurrences clears all "occurrences" edges to the Occurrence entity.

func (*PackageVersionUpdate) ClearPkgEqualPkgA added in v0.5.0

func (pvu *PackageVersionUpdate) ClearPkgEqualPkgA() *PackageVersionUpdate

ClearPkgEqualPkgA clears all "pkg_equal_pkg_a" edges to the PkgEqual entity.

func (*PackageVersionUpdate) ClearPkgEqualPkgB added in v0.5.0

func (pvu *PackageVersionUpdate) ClearPkgEqualPkgB() *PackageVersionUpdate

ClearPkgEqualPkgB clears all "pkg_equal_pkg_b" edges to the PkgEqual entity.

func (*PackageVersionUpdate) ClearPoc added in v0.6.0

func (pvu *PackageVersionUpdate) ClearPoc() *PackageVersionUpdate

ClearPoc clears all "poc" edges to the PointOfContact entity.

func (*PackageVersionUpdate) ClearQualifiers

func (pvu *PackageVersionUpdate) ClearQualifiers() *PackageVersionUpdate

ClearQualifiers clears the value of the "qualifiers" field.

func (*PackageVersionUpdate) ClearSbom

func (pvu *PackageVersionUpdate) ClearSbom() *PackageVersionUpdate

ClearSbom clears all "sbom" edges to the BillOfMaterials entity.

func (*PackageVersionUpdate) ClearVex added in v0.6.0

func (pvu *PackageVersionUpdate) ClearVex() *PackageVersionUpdate

ClearVex clears all "vex" edges to the CertifyVex entity.

func (*PackageVersionUpdate) ClearVuln added in v0.6.0

func (pvu *PackageVersionUpdate) ClearVuln() *PackageVersionUpdate

ClearVuln clears all "vuln" edges to the CertifyVuln entity.

func (*PackageVersionUpdate) Exec

func (pvu *PackageVersionUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*PackageVersionUpdate) ExecX

func (pvu *PackageVersionUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*PackageVersionUpdate) Mutation

Mutation returns the PackageVersionMutation object of the builder.

func (*PackageVersionUpdate) RemoveCertification added in v0.6.0

func (pvu *PackageVersionUpdate) RemoveCertification(c ...*Certification) *PackageVersionUpdate

RemoveCertification removes "certification" edges to Certification entities.

func (*PackageVersionUpdate) RemoveCertificationIDs added in v0.6.0

func (pvu *PackageVersionUpdate) RemoveCertificationIDs(ids ...uuid.UUID) *PackageVersionUpdate

RemoveCertificationIDs removes the "certification" edge to Certification entities by IDs.

func (*PackageVersionUpdate) RemoveCertifyLegal added in v0.6.0

func (pvu *PackageVersionUpdate) RemoveCertifyLegal(c ...*CertifyLegal) *PackageVersionUpdate

RemoveCertifyLegal removes "certify_legal" edges to CertifyLegal entities.

func (*PackageVersionUpdate) RemoveCertifyLegalIDs added in v0.6.0

func (pvu *PackageVersionUpdate) RemoveCertifyLegalIDs(ids ...uuid.UUID) *PackageVersionUpdate

RemoveCertifyLegalIDs removes the "certify_legal" edge to CertifyLegal entities by IDs.

func (*PackageVersionUpdate) RemoveDependency added in v0.6.0

func (pvu *PackageVersionUpdate) RemoveDependency(d ...*Dependency) *PackageVersionUpdate

RemoveDependency removes "dependency" edges to Dependency entities.

func (*PackageVersionUpdate) RemoveDependencyIDs added in v0.6.0

func (pvu *PackageVersionUpdate) RemoveDependencyIDs(ids ...uuid.UUID) *PackageVersionUpdate

RemoveDependencyIDs removes the "dependency" edge to Dependency entities by IDs.

func (*PackageVersionUpdate) RemoveDependencySubject added in v0.6.0

func (pvu *PackageVersionUpdate) RemoveDependencySubject(d ...*Dependency) *PackageVersionUpdate

RemoveDependencySubject removes "dependency_subject" edges to Dependency entities.

func (*PackageVersionUpdate) RemoveDependencySubjectIDs added in v0.6.0

func (pvu *PackageVersionUpdate) RemoveDependencySubjectIDs(ids ...uuid.UUID) *PackageVersionUpdate

RemoveDependencySubjectIDs removes the "dependency_subject" edge to Dependency entities by IDs.

func (*PackageVersionUpdate) RemoveHasSourceAt added in v0.6.0

func (pvu *PackageVersionUpdate) RemoveHasSourceAt(h ...*HasSourceAt) *PackageVersionUpdate

RemoveHasSourceAt removes "has_source_at" edges to HasSourceAt entities.

func (*PackageVersionUpdate) RemoveHasSourceAtIDs added in v0.6.0

func (pvu *PackageVersionUpdate) RemoveHasSourceAtIDs(ids ...uuid.UUID) *PackageVersionUpdate

RemoveHasSourceAtIDs removes the "has_source_at" edge to HasSourceAt entities by IDs.

func (*PackageVersionUpdate) RemoveIncludedInSbomIDs added in v0.4.0

func (pvu *PackageVersionUpdate) RemoveIncludedInSbomIDs(ids ...uuid.UUID) *PackageVersionUpdate

RemoveIncludedInSbomIDs removes the "included_in_sboms" edge to BillOfMaterials entities by IDs.

func (*PackageVersionUpdate) RemoveIncludedInSboms added in v0.4.0

func (pvu *PackageVersionUpdate) RemoveIncludedInSboms(b ...*BillOfMaterials) *PackageVersionUpdate

RemoveIncludedInSboms removes "included_in_sboms" edges to BillOfMaterials entities.

func (*PackageVersionUpdate) RemoveMetadata added in v0.6.0

func (pvu *PackageVersionUpdate) RemoveMetadata(h ...*HasMetadata) *PackageVersionUpdate

RemoveMetadata removes "metadata" edges to HasMetadata entities.

func (*PackageVersionUpdate) RemoveMetadatumIDs added in v0.6.0

func (pvu *PackageVersionUpdate) RemoveMetadatumIDs(ids ...uuid.UUID) *PackageVersionUpdate

RemoveMetadatumIDs removes the "metadata" edge to HasMetadata entities by IDs.

func (*PackageVersionUpdate) RemoveOccurrenceIDs

func (pvu *PackageVersionUpdate) RemoveOccurrenceIDs(ids ...uuid.UUID) *PackageVersionUpdate

RemoveOccurrenceIDs removes the "occurrences" edge to Occurrence entities by IDs.

func (*PackageVersionUpdate) RemoveOccurrences

func (pvu *PackageVersionUpdate) RemoveOccurrences(o ...*Occurrence) *PackageVersionUpdate

RemoveOccurrences removes "occurrences" edges to Occurrence entities.

func (*PackageVersionUpdate) RemovePkgEqualPkgA added in v0.5.0

func (pvu *PackageVersionUpdate) RemovePkgEqualPkgA(p ...*PkgEqual) *PackageVersionUpdate

RemovePkgEqualPkgA removes "pkg_equal_pkg_a" edges to PkgEqual entities.

func (*PackageVersionUpdate) RemovePkgEqualPkgAIDs added in v0.5.0

func (pvu *PackageVersionUpdate) RemovePkgEqualPkgAIDs(ids ...uuid.UUID) *PackageVersionUpdate

RemovePkgEqualPkgAIDs removes the "pkg_equal_pkg_a" edge to PkgEqual entities by IDs.

func (*PackageVersionUpdate) RemovePkgEqualPkgB added in v0.5.0

func (pvu *PackageVersionUpdate) RemovePkgEqualPkgB(p ...*PkgEqual) *PackageVersionUpdate

RemovePkgEqualPkgB removes "pkg_equal_pkg_b" edges to PkgEqual entities.

func (*PackageVersionUpdate) RemovePkgEqualPkgBIDs added in v0.5.0

func (pvu *PackageVersionUpdate) RemovePkgEqualPkgBIDs(ids ...uuid.UUID) *PackageVersionUpdate

RemovePkgEqualPkgBIDs removes the "pkg_equal_pkg_b" edge to PkgEqual entities by IDs.

func (*PackageVersionUpdate) RemovePoc added in v0.6.0

RemovePoc removes "poc" edges to PointOfContact entities.

func (*PackageVersionUpdate) RemovePocIDs added in v0.6.0

func (pvu *PackageVersionUpdate) RemovePocIDs(ids ...uuid.UUID) *PackageVersionUpdate

RemovePocIDs removes the "poc" edge to PointOfContact entities by IDs.

func (*PackageVersionUpdate) RemoveSbom

RemoveSbom removes "sbom" edges to BillOfMaterials entities.

func (*PackageVersionUpdate) RemoveSbomIDs

func (pvu *PackageVersionUpdate) RemoveSbomIDs(ids ...uuid.UUID) *PackageVersionUpdate

RemoveSbomIDs removes the "sbom" edge to BillOfMaterials entities by IDs.

func (*PackageVersionUpdate) RemoveVex added in v0.6.0

func (pvu *PackageVersionUpdate) RemoveVex(c ...*CertifyVex) *PackageVersionUpdate

RemoveVex removes "vex" edges to CertifyVex entities.

func (*PackageVersionUpdate) RemoveVexIDs added in v0.6.0

func (pvu *PackageVersionUpdate) RemoveVexIDs(ids ...uuid.UUID) *PackageVersionUpdate

RemoveVexIDs removes the "vex" edge to CertifyVex entities by IDs.

func (*PackageVersionUpdate) RemoveVuln added in v0.6.0

func (pvu *PackageVersionUpdate) RemoveVuln(c ...*CertifyVuln) *PackageVersionUpdate

RemoveVuln removes "vuln" edges to CertifyVuln entities.

func (*PackageVersionUpdate) RemoveVulnIDs added in v0.6.0

func (pvu *PackageVersionUpdate) RemoveVulnIDs(ids ...uuid.UUID) *PackageVersionUpdate

RemoveVulnIDs removes the "vuln" edge to CertifyVuln entities by IDs.

func (*PackageVersionUpdate) Save

func (pvu *PackageVersionUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*PackageVersionUpdate) SaveX

func (pvu *PackageVersionUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*PackageVersionUpdate) SetHash

SetHash sets the "hash" field.

func (*PackageVersionUpdate) SetName

SetName sets the "name" edge to the PackageName entity.

func (*PackageVersionUpdate) SetNameID

SetNameID sets the "name_id" field.

func (*PackageVersionUpdate) SetNillableHash added in v0.4.0

func (pvu *PackageVersionUpdate) SetNillableHash(s *string) *PackageVersionUpdate

SetNillableHash sets the "hash" field if the given value is not nil.

func (*PackageVersionUpdate) SetNillableNameID added in v0.4.0

func (pvu *PackageVersionUpdate) SetNillableNameID(u *uuid.UUID) *PackageVersionUpdate

SetNillableNameID sets the "name_id" field if the given value is not nil.

func (*PackageVersionUpdate) SetNillableSubpath

func (pvu *PackageVersionUpdate) SetNillableSubpath(s *string) *PackageVersionUpdate

SetNillableSubpath sets the "subpath" field if the given value is not nil.

func (*PackageVersionUpdate) SetNillableVersion

func (pvu *PackageVersionUpdate) SetNillableVersion(s *string) *PackageVersionUpdate

SetNillableVersion sets the "version" field if the given value is not nil.

func (*PackageVersionUpdate) SetQualifiers

SetQualifiers sets the "qualifiers" field.

func (*PackageVersionUpdate) SetSubpath

func (pvu *PackageVersionUpdate) SetSubpath(s string) *PackageVersionUpdate

SetSubpath sets the "subpath" field.

func (*PackageVersionUpdate) SetVersion

func (pvu *PackageVersionUpdate) SetVersion(s string) *PackageVersionUpdate

SetVersion sets the "version" field.

func (*PackageVersionUpdate) Where

Where appends a list predicates to the PackageVersionUpdate builder.

type PackageVersionUpdateOne

type PackageVersionUpdateOne struct {
	// contains filtered or unexported fields
}

PackageVersionUpdateOne is the builder for updating a single PackageVersion entity.

func (*PackageVersionUpdateOne) AddCertification added in v0.6.0

func (pvuo *PackageVersionUpdateOne) AddCertification(c ...*Certification) *PackageVersionUpdateOne

AddCertification adds the "certification" edges to the Certification entity.

func (*PackageVersionUpdateOne) AddCertificationIDs added in v0.6.0

func (pvuo *PackageVersionUpdateOne) AddCertificationIDs(ids ...uuid.UUID) *PackageVersionUpdateOne

AddCertificationIDs adds the "certification" edge to the Certification entity by IDs.

func (*PackageVersionUpdateOne) AddCertifyLegal added in v0.6.0

func (pvuo *PackageVersionUpdateOne) AddCertifyLegal(c ...*CertifyLegal) *PackageVersionUpdateOne

AddCertifyLegal adds the "certify_legal" edges to the CertifyLegal entity.

func (*PackageVersionUpdateOne) AddCertifyLegalIDs added in v0.6.0

func (pvuo *PackageVersionUpdateOne) AddCertifyLegalIDs(ids ...uuid.UUID) *PackageVersionUpdateOne

AddCertifyLegalIDs adds the "certify_legal" edge to the CertifyLegal entity by IDs.

func (*PackageVersionUpdateOne) AddDependency added in v0.6.0

func (pvuo *PackageVersionUpdateOne) AddDependency(d ...*Dependency) *PackageVersionUpdateOne

AddDependency adds the "dependency" edges to the Dependency entity.

func (*PackageVersionUpdateOne) AddDependencyIDs added in v0.6.0

func (pvuo *PackageVersionUpdateOne) AddDependencyIDs(ids ...uuid.UUID) *PackageVersionUpdateOne

AddDependencyIDs adds the "dependency" edge to the Dependency entity by IDs.

func (*PackageVersionUpdateOne) AddDependencySubject added in v0.6.0

func (pvuo *PackageVersionUpdateOne) AddDependencySubject(d ...*Dependency) *PackageVersionUpdateOne

AddDependencySubject adds the "dependency_subject" edges to the Dependency entity.

func (*PackageVersionUpdateOne) AddDependencySubjectIDs added in v0.6.0

func (pvuo *PackageVersionUpdateOne) AddDependencySubjectIDs(ids ...uuid.UUID) *PackageVersionUpdateOne

AddDependencySubjectIDs adds the "dependency_subject" edge to the Dependency entity by IDs.

func (*PackageVersionUpdateOne) AddHasSourceAt added in v0.6.0

func (pvuo *PackageVersionUpdateOne) AddHasSourceAt(h ...*HasSourceAt) *PackageVersionUpdateOne

AddHasSourceAt adds the "has_source_at" edges to the HasSourceAt entity.

func (*PackageVersionUpdateOne) AddHasSourceAtIDs added in v0.6.0

func (pvuo *PackageVersionUpdateOne) AddHasSourceAtIDs(ids ...uuid.UUID) *PackageVersionUpdateOne

AddHasSourceAtIDs adds the "has_source_at" edge to the HasSourceAt entity by IDs.

func (*PackageVersionUpdateOne) AddIncludedInSbomIDs added in v0.4.0

func (pvuo *PackageVersionUpdateOne) AddIncludedInSbomIDs(ids ...uuid.UUID) *PackageVersionUpdateOne

AddIncludedInSbomIDs adds the "included_in_sboms" edge to the BillOfMaterials entity by IDs.

func (*PackageVersionUpdateOne) AddIncludedInSboms added in v0.4.0

func (pvuo *PackageVersionUpdateOne) AddIncludedInSboms(b ...*BillOfMaterials) *PackageVersionUpdateOne

AddIncludedInSboms adds the "included_in_sboms" edges to the BillOfMaterials entity.

func (*PackageVersionUpdateOne) AddMetadata added in v0.6.0

AddMetadata adds the "metadata" edges to the HasMetadata entity.

func (*PackageVersionUpdateOne) AddMetadatumIDs added in v0.6.0

func (pvuo *PackageVersionUpdateOne) AddMetadatumIDs(ids ...uuid.UUID) *PackageVersionUpdateOne

AddMetadatumIDs adds the "metadata" edge to the HasMetadata entity by IDs.

func (*PackageVersionUpdateOne) AddOccurrenceIDs

func (pvuo *PackageVersionUpdateOne) AddOccurrenceIDs(ids ...uuid.UUID) *PackageVersionUpdateOne

AddOccurrenceIDs adds the "occurrences" edge to the Occurrence entity by IDs.

func (*PackageVersionUpdateOne) AddOccurrences

func (pvuo *PackageVersionUpdateOne) AddOccurrences(o ...*Occurrence) *PackageVersionUpdateOne

AddOccurrences adds the "occurrences" edges to the Occurrence entity.

func (*PackageVersionUpdateOne) AddPkgEqualPkgA added in v0.5.0

func (pvuo *PackageVersionUpdateOne) AddPkgEqualPkgA(p ...*PkgEqual) *PackageVersionUpdateOne

AddPkgEqualPkgA adds the "pkg_equal_pkg_a" edges to the PkgEqual entity.

func (*PackageVersionUpdateOne) AddPkgEqualPkgAIDs added in v0.5.0

func (pvuo *PackageVersionUpdateOne) AddPkgEqualPkgAIDs(ids ...uuid.UUID) *PackageVersionUpdateOne

AddPkgEqualPkgAIDs adds the "pkg_equal_pkg_a" edge to the PkgEqual entity by IDs.

func (*PackageVersionUpdateOne) AddPkgEqualPkgB added in v0.5.0

func (pvuo *PackageVersionUpdateOne) AddPkgEqualPkgB(p ...*PkgEqual) *PackageVersionUpdateOne

AddPkgEqualPkgB adds the "pkg_equal_pkg_b" edges to the PkgEqual entity.

func (*PackageVersionUpdateOne) AddPkgEqualPkgBIDs added in v0.5.0

func (pvuo *PackageVersionUpdateOne) AddPkgEqualPkgBIDs(ids ...uuid.UUID) *PackageVersionUpdateOne

AddPkgEqualPkgBIDs adds the "pkg_equal_pkg_b" edge to the PkgEqual entity by IDs.

func (*PackageVersionUpdateOne) AddPoc added in v0.6.0

AddPoc adds the "poc" edges to the PointOfContact entity.

func (*PackageVersionUpdateOne) AddPocIDs added in v0.6.0

func (pvuo *PackageVersionUpdateOne) AddPocIDs(ids ...uuid.UUID) *PackageVersionUpdateOne

AddPocIDs adds the "poc" edge to the PointOfContact entity by IDs.

func (*PackageVersionUpdateOne) AddSbom

AddSbom adds the "sbom" edges to the BillOfMaterials entity.

func (*PackageVersionUpdateOne) AddSbomIDs

func (pvuo *PackageVersionUpdateOne) AddSbomIDs(ids ...uuid.UUID) *PackageVersionUpdateOne

AddSbomIDs adds the "sbom" edge to the BillOfMaterials entity by IDs.

func (*PackageVersionUpdateOne) AddVex added in v0.6.0

AddVex adds the "vex" edges to the CertifyVex entity.

func (*PackageVersionUpdateOne) AddVexIDs added in v0.6.0

func (pvuo *PackageVersionUpdateOne) AddVexIDs(ids ...uuid.UUID) *PackageVersionUpdateOne

AddVexIDs adds the "vex" edge to the CertifyVex entity by IDs.

func (*PackageVersionUpdateOne) AddVuln added in v0.6.0

AddVuln adds the "vuln" edges to the CertifyVuln entity.

func (*PackageVersionUpdateOne) AddVulnIDs added in v0.6.0

func (pvuo *PackageVersionUpdateOne) AddVulnIDs(ids ...uuid.UUID) *PackageVersionUpdateOne

AddVulnIDs adds the "vuln" edge to the CertifyVuln entity by IDs.

func (*PackageVersionUpdateOne) AppendQualifiers

AppendQualifiers appends mq to the "qualifiers" field.

func (*PackageVersionUpdateOne) ClearCertification added in v0.6.0

func (pvuo *PackageVersionUpdateOne) ClearCertification() *PackageVersionUpdateOne

ClearCertification clears all "certification" edges to the Certification entity.

func (*PackageVersionUpdateOne) ClearCertifyLegal added in v0.6.0

func (pvuo *PackageVersionUpdateOne) ClearCertifyLegal() *PackageVersionUpdateOne

ClearCertifyLegal clears all "certify_legal" edges to the CertifyLegal entity.

func (*PackageVersionUpdateOne) ClearDependency added in v0.6.0

func (pvuo *PackageVersionUpdateOne) ClearDependency() *PackageVersionUpdateOne

ClearDependency clears all "dependency" edges to the Dependency entity.

func (*PackageVersionUpdateOne) ClearDependencySubject added in v0.6.0

func (pvuo *PackageVersionUpdateOne) ClearDependencySubject() *PackageVersionUpdateOne

ClearDependencySubject clears all "dependency_subject" edges to the Dependency entity.

func (*PackageVersionUpdateOne) ClearHasSourceAt added in v0.6.0

func (pvuo *PackageVersionUpdateOne) ClearHasSourceAt() *PackageVersionUpdateOne

ClearHasSourceAt clears all "has_source_at" edges to the HasSourceAt entity.

func (*PackageVersionUpdateOne) ClearIncludedInSboms added in v0.4.0

func (pvuo *PackageVersionUpdateOne) ClearIncludedInSboms() *PackageVersionUpdateOne

ClearIncludedInSboms clears all "included_in_sboms" edges to the BillOfMaterials entity.

func (*PackageVersionUpdateOne) ClearMetadata added in v0.6.0

func (pvuo *PackageVersionUpdateOne) ClearMetadata() *PackageVersionUpdateOne

ClearMetadata clears all "metadata" edges to the HasMetadata entity.

func (*PackageVersionUpdateOne) ClearName

ClearName clears the "name" edge to the PackageName entity.

func (*PackageVersionUpdateOne) ClearOccurrences

func (pvuo *PackageVersionUpdateOne) ClearOccurrences() *PackageVersionUpdateOne

ClearOccurrences clears all "occurrences" edges to the Occurrence entity.

func (*PackageVersionUpdateOne) ClearPkgEqualPkgA added in v0.5.0

func (pvuo *PackageVersionUpdateOne) ClearPkgEqualPkgA() *PackageVersionUpdateOne

ClearPkgEqualPkgA clears all "pkg_equal_pkg_a" edges to the PkgEqual entity.

func (*PackageVersionUpdateOne) ClearPkgEqualPkgB added in v0.5.0

func (pvuo *PackageVersionUpdateOne) ClearPkgEqualPkgB() *PackageVersionUpdateOne

ClearPkgEqualPkgB clears all "pkg_equal_pkg_b" edges to the PkgEqual entity.

func (*PackageVersionUpdateOne) ClearPoc added in v0.6.0

ClearPoc clears all "poc" edges to the PointOfContact entity.

func (*PackageVersionUpdateOne) ClearQualifiers

func (pvuo *PackageVersionUpdateOne) ClearQualifiers() *PackageVersionUpdateOne

ClearQualifiers clears the value of the "qualifiers" field.

func (*PackageVersionUpdateOne) ClearSbom

ClearSbom clears all "sbom" edges to the BillOfMaterials entity.

func (*PackageVersionUpdateOne) ClearVex added in v0.6.0

ClearVex clears all "vex" edges to the CertifyVex entity.

func (*PackageVersionUpdateOne) ClearVuln added in v0.6.0

ClearVuln clears all "vuln" edges to the CertifyVuln entity.

func (*PackageVersionUpdateOne) Exec

func (pvuo *PackageVersionUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*PackageVersionUpdateOne) ExecX

func (pvuo *PackageVersionUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*PackageVersionUpdateOne) Mutation

Mutation returns the PackageVersionMutation object of the builder.

func (*PackageVersionUpdateOne) RemoveCertification added in v0.6.0

func (pvuo *PackageVersionUpdateOne) RemoveCertification(c ...*Certification) *PackageVersionUpdateOne

RemoveCertification removes "certification" edges to Certification entities.

func (*PackageVersionUpdateOne) RemoveCertificationIDs added in v0.6.0

func (pvuo *PackageVersionUpdateOne) RemoveCertificationIDs(ids ...uuid.UUID) *PackageVersionUpdateOne

RemoveCertificationIDs removes the "certification" edge to Certification entities by IDs.

func (*PackageVersionUpdateOne) RemoveCertifyLegal added in v0.6.0

func (pvuo *PackageVersionUpdateOne) RemoveCertifyLegal(c ...*CertifyLegal) *PackageVersionUpdateOne

RemoveCertifyLegal removes "certify_legal" edges to CertifyLegal entities.

func (*PackageVersionUpdateOne) RemoveCertifyLegalIDs added in v0.6.0

func (pvuo *PackageVersionUpdateOne) RemoveCertifyLegalIDs(ids ...uuid.UUID) *PackageVersionUpdateOne

RemoveCertifyLegalIDs removes the "certify_legal" edge to CertifyLegal entities by IDs.

func (*PackageVersionUpdateOne) RemoveDependency added in v0.6.0

func (pvuo *PackageVersionUpdateOne) RemoveDependency(d ...*Dependency) *PackageVersionUpdateOne

RemoveDependency removes "dependency" edges to Dependency entities.

func (*PackageVersionUpdateOne) RemoveDependencyIDs added in v0.6.0

func (pvuo *PackageVersionUpdateOne) RemoveDependencyIDs(ids ...uuid.UUID) *PackageVersionUpdateOne

RemoveDependencyIDs removes the "dependency" edge to Dependency entities by IDs.

func (*PackageVersionUpdateOne) RemoveDependencySubject added in v0.6.0

func (pvuo *PackageVersionUpdateOne) RemoveDependencySubject(d ...*Dependency) *PackageVersionUpdateOne

RemoveDependencySubject removes "dependency_subject" edges to Dependency entities.

func (*PackageVersionUpdateOne) RemoveDependencySubjectIDs added in v0.6.0

func (pvuo *PackageVersionUpdateOne) RemoveDependencySubjectIDs(ids ...uuid.UUID) *PackageVersionUpdateOne

RemoveDependencySubjectIDs removes the "dependency_subject" edge to Dependency entities by IDs.

func (*PackageVersionUpdateOne) RemoveHasSourceAt added in v0.6.0

func (pvuo *PackageVersionUpdateOne) RemoveHasSourceAt(h ...*HasSourceAt) *PackageVersionUpdateOne

RemoveHasSourceAt removes "has_source_at" edges to HasSourceAt entities.

func (*PackageVersionUpdateOne) RemoveHasSourceAtIDs added in v0.6.0

func (pvuo *PackageVersionUpdateOne) RemoveHasSourceAtIDs(ids ...uuid.UUID) *PackageVersionUpdateOne

RemoveHasSourceAtIDs removes the "has_source_at" edge to HasSourceAt entities by IDs.

func (*PackageVersionUpdateOne) RemoveIncludedInSbomIDs added in v0.4.0

func (pvuo *PackageVersionUpdateOne) RemoveIncludedInSbomIDs(ids ...uuid.UUID) *PackageVersionUpdateOne

RemoveIncludedInSbomIDs removes the "included_in_sboms" edge to BillOfMaterials entities by IDs.

func (*PackageVersionUpdateOne) RemoveIncludedInSboms added in v0.4.0

func (pvuo *PackageVersionUpdateOne) RemoveIncludedInSboms(b ...*BillOfMaterials) *PackageVersionUpdateOne

RemoveIncludedInSboms removes "included_in_sboms" edges to BillOfMaterials entities.

func (*PackageVersionUpdateOne) RemoveMetadata added in v0.6.0

func (pvuo *PackageVersionUpdateOne) RemoveMetadata(h ...*HasMetadata) *PackageVersionUpdateOne

RemoveMetadata removes "metadata" edges to HasMetadata entities.

func (*PackageVersionUpdateOne) RemoveMetadatumIDs added in v0.6.0

func (pvuo *PackageVersionUpdateOne) RemoveMetadatumIDs(ids ...uuid.UUID) *PackageVersionUpdateOne

RemoveMetadatumIDs removes the "metadata" edge to HasMetadata entities by IDs.

func (*PackageVersionUpdateOne) RemoveOccurrenceIDs

func (pvuo *PackageVersionUpdateOne) RemoveOccurrenceIDs(ids ...uuid.UUID) *PackageVersionUpdateOne

RemoveOccurrenceIDs removes the "occurrences" edge to Occurrence entities by IDs.

func (*PackageVersionUpdateOne) RemoveOccurrences

func (pvuo *PackageVersionUpdateOne) RemoveOccurrences(o ...*Occurrence) *PackageVersionUpdateOne

RemoveOccurrences removes "occurrences" edges to Occurrence entities.

func (*PackageVersionUpdateOne) RemovePkgEqualPkgA added in v0.5.0

func (pvuo *PackageVersionUpdateOne) RemovePkgEqualPkgA(p ...*PkgEqual) *PackageVersionUpdateOne

RemovePkgEqualPkgA removes "pkg_equal_pkg_a" edges to PkgEqual entities.

func (*PackageVersionUpdateOne) RemovePkgEqualPkgAIDs added in v0.5.0

func (pvuo *PackageVersionUpdateOne) RemovePkgEqualPkgAIDs(ids ...uuid.UUID) *PackageVersionUpdateOne

RemovePkgEqualPkgAIDs removes the "pkg_equal_pkg_a" edge to PkgEqual entities by IDs.

func (*PackageVersionUpdateOne) RemovePkgEqualPkgB added in v0.5.0

func (pvuo *PackageVersionUpdateOne) RemovePkgEqualPkgB(p ...*PkgEqual) *PackageVersionUpdateOne

RemovePkgEqualPkgB removes "pkg_equal_pkg_b" edges to PkgEqual entities.

func (*PackageVersionUpdateOne) RemovePkgEqualPkgBIDs added in v0.5.0

func (pvuo *PackageVersionUpdateOne) RemovePkgEqualPkgBIDs(ids ...uuid.UUID) *PackageVersionUpdateOne

RemovePkgEqualPkgBIDs removes the "pkg_equal_pkg_b" edge to PkgEqual entities by IDs.

func (*PackageVersionUpdateOne) RemovePoc added in v0.6.0

RemovePoc removes "poc" edges to PointOfContact entities.

func (*PackageVersionUpdateOne) RemovePocIDs added in v0.6.0

func (pvuo *PackageVersionUpdateOne) RemovePocIDs(ids ...uuid.UUID) *PackageVersionUpdateOne

RemovePocIDs removes the "poc" edge to PointOfContact entities by IDs.

func (*PackageVersionUpdateOne) RemoveSbom

RemoveSbom removes "sbom" edges to BillOfMaterials entities.

func (*PackageVersionUpdateOne) RemoveSbomIDs

func (pvuo *PackageVersionUpdateOne) RemoveSbomIDs(ids ...uuid.UUID) *PackageVersionUpdateOne

RemoveSbomIDs removes the "sbom" edge to BillOfMaterials entities by IDs.

func (*PackageVersionUpdateOne) RemoveVex added in v0.6.0

RemoveVex removes "vex" edges to CertifyVex entities.

func (*PackageVersionUpdateOne) RemoveVexIDs added in v0.6.0

func (pvuo *PackageVersionUpdateOne) RemoveVexIDs(ids ...uuid.UUID) *PackageVersionUpdateOne

RemoveVexIDs removes the "vex" edge to CertifyVex entities by IDs.

func (*PackageVersionUpdateOne) RemoveVuln added in v0.6.0

RemoveVuln removes "vuln" edges to CertifyVuln entities.

func (*PackageVersionUpdateOne) RemoveVulnIDs added in v0.6.0

func (pvuo *PackageVersionUpdateOne) RemoveVulnIDs(ids ...uuid.UUID) *PackageVersionUpdateOne

RemoveVulnIDs removes the "vuln" edge to CertifyVuln entities by IDs.

func (*PackageVersionUpdateOne) Save

Save executes the query and returns the updated PackageVersion entity.

func (*PackageVersionUpdateOne) SaveX

SaveX is like Save, but panics if an error occurs.

func (*PackageVersionUpdateOne) Select

func (pvuo *PackageVersionUpdateOne) Select(field string, fields ...string) *PackageVersionUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*PackageVersionUpdateOne) SetHash

SetHash sets the "hash" field.

func (*PackageVersionUpdateOne) SetName

SetName sets the "name" edge to the PackageName entity.

func (*PackageVersionUpdateOne) SetNameID

SetNameID sets the "name_id" field.

func (*PackageVersionUpdateOne) SetNillableHash added in v0.4.0

func (pvuo *PackageVersionUpdateOne) SetNillableHash(s *string) *PackageVersionUpdateOne

SetNillableHash sets the "hash" field if the given value is not nil.

func (*PackageVersionUpdateOne) SetNillableNameID added in v0.4.0

func (pvuo *PackageVersionUpdateOne) SetNillableNameID(u *uuid.UUID) *PackageVersionUpdateOne

SetNillableNameID sets the "name_id" field if the given value is not nil.

func (*PackageVersionUpdateOne) SetNillableSubpath

func (pvuo *PackageVersionUpdateOne) SetNillableSubpath(s *string) *PackageVersionUpdateOne

SetNillableSubpath sets the "subpath" field if the given value is not nil.

func (*PackageVersionUpdateOne) SetNillableVersion

func (pvuo *PackageVersionUpdateOne) SetNillableVersion(s *string) *PackageVersionUpdateOne

SetNillableVersion sets the "version" field if the given value is not nil.

func (*PackageVersionUpdateOne) SetQualifiers

SetQualifiers sets the "qualifiers" field.

func (*PackageVersionUpdateOne) SetSubpath

SetSubpath sets the "subpath" field.

func (*PackageVersionUpdateOne) SetVersion

SetVersion sets the "version" field.

func (*PackageVersionUpdateOne) Where

Where appends a list predicates to the PackageVersionUpdate builder.

type PackageVersionUpsert

type PackageVersionUpsert struct {
	*sql.UpdateSet
}

PackageVersionUpsert is the "OnConflict" setter.

func (*PackageVersionUpsert) ClearQualifiers

func (u *PackageVersionUpsert) ClearQualifiers() *PackageVersionUpsert

ClearQualifiers clears the value of the "qualifiers" field.

func (*PackageVersionUpsert) SetHash

SetHash sets the "hash" field.

func (*PackageVersionUpsert) SetNameID

SetNameID sets the "name_id" field.

func (*PackageVersionUpsert) SetQualifiers

SetQualifiers sets the "qualifiers" field.

func (*PackageVersionUpsert) SetSubpath

SetSubpath sets the "subpath" field.

func (*PackageVersionUpsert) SetVersion

SetVersion sets the "version" field.

func (*PackageVersionUpsert) UpdateHash

func (u *PackageVersionUpsert) UpdateHash() *PackageVersionUpsert

UpdateHash sets the "hash" field to the value that was provided on create.

func (*PackageVersionUpsert) UpdateNameID

func (u *PackageVersionUpsert) UpdateNameID() *PackageVersionUpsert

UpdateNameID sets the "name_id" field to the value that was provided on create.

func (*PackageVersionUpsert) UpdateQualifiers

func (u *PackageVersionUpsert) UpdateQualifiers() *PackageVersionUpsert

UpdateQualifiers sets the "qualifiers" field to the value that was provided on create.

func (*PackageVersionUpsert) UpdateSubpath

func (u *PackageVersionUpsert) UpdateSubpath() *PackageVersionUpsert

UpdateSubpath sets the "subpath" field to the value that was provided on create.

func (*PackageVersionUpsert) UpdateVersion

func (u *PackageVersionUpsert) UpdateVersion() *PackageVersionUpsert

UpdateVersion sets the "version" field to the value that was provided on create.

type PackageVersionUpsertBulk

type PackageVersionUpsertBulk struct {
	// contains filtered or unexported fields
}

PackageVersionUpsertBulk is the builder for "upsert"-ing a bulk of PackageVersion nodes.

func (*PackageVersionUpsertBulk) ClearQualifiers

func (u *PackageVersionUpsertBulk) ClearQualifiers() *PackageVersionUpsertBulk

ClearQualifiers clears the value of the "qualifiers" field.

func (*PackageVersionUpsertBulk) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*PackageVersionUpsertBulk) Exec

Exec executes the query.

func (*PackageVersionUpsertBulk) ExecX

ExecX is like Exec, but panics if an error occurs.

func (*PackageVersionUpsertBulk) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.PackageVersion.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*PackageVersionUpsertBulk) SetHash

SetHash sets the "hash" field.

func (*PackageVersionUpsertBulk) SetNameID

SetNameID sets the "name_id" field.

func (*PackageVersionUpsertBulk) SetQualifiers

SetQualifiers sets the "qualifiers" field.

func (*PackageVersionUpsertBulk) SetSubpath

SetSubpath sets the "subpath" field.

func (*PackageVersionUpsertBulk) SetVersion

SetVersion sets the "version" field.

func (*PackageVersionUpsertBulk) Update

Update allows overriding fields `UPDATE` values. See the PackageVersionCreateBulk.OnConflict documentation for more info.

func (*PackageVersionUpsertBulk) UpdateHash

UpdateHash sets the "hash" field to the value that was provided on create.

func (*PackageVersionUpsertBulk) UpdateNameID

UpdateNameID sets the "name_id" field to the value that was provided on create.

func (*PackageVersionUpsertBulk) UpdateNewValues

func (u *PackageVersionUpsertBulk) UpdateNewValues() *PackageVersionUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.PackageVersion.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(packageversion.FieldID)
		}),
	).
	Exec(ctx)

func (*PackageVersionUpsertBulk) UpdateQualifiers

func (u *PackageVersionUpsertBulk) UpdateQualifiers() *PackageVersionUpsertBulk

UpdateQualifiers sets the "qualifiers" field to the value that was provided on create.

func (*PackageVersionUpsertBulk) UpdateSubpath

UpdateSubpath sets the "subpath" field to the value that was provided on create.

func (*PackageVersionUpsertBulk) UpdateVersion

UpdateVersion sets the "version" field to the value that was provided on create.

type PackageVersionUpsertOne

type PackageVersionUpsertOne struct {
	// contains filtered or unexported fields
}

PackageVersionUpsertOne is the builder for "upsert"-ing

one PackageVersion node.

func (*PackageVersionUpsertOne) ClearQualifiers

func (u *PackageVersionUpsertOne) ClearQualifiers() *PackageVersionUpsertOne

ClearQualifiers clears the value of the "qualifiers" field.

func (*PackageVersionUpsertOne) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*PackageVersionUpsertOne) Exec

Exec executes the query.

func (*PackageVersionUpsertOne) ExecX

func (u *PackageVersionUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*PackageVersionUpsertOne) ID

func (u *PackageVersionUpsertOne) ID(ctx context.Context) (id uuid.UUID, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*PackageVersionUpsertOne) IDX

IDX is like ID, but panics if an error occurs.

func (*PackageVersionUpsertOne) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.PackageVersion.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*PackageVersionUpsertOne) SetHash

SetHash sets the "hash" field.

func (*PackageVersionUpsertOne) SetNameID

SetNameID sets the "name_id" field.

func (*PackageVersionUpsertOne) SetQualifiers

SetQualifiers sets the "qualifiers" field.

func (*PackageVersionUpsertOne) SetSubpath

SetSubpath sets the "subpath" field.

func (*PackageVersionUpsertOne) SetVersion

SetVersion sets the "version" field.

func (*PackageVersionUpsertOne) Update

Update allows overriding fields `UPDATE` values. See the PackageVersionCreate.OnConflict documentation for more info.

func (*PackageVersionUpsertOne) UpdateHash

UpdateHash sets the "hash" field to the value that was provided on create.

func (*PackageVersionUpsertOne) UpdateNameID

UpdateNameID sets the "name_id" field to the value that was provided on create.

func (*PackageVersionUpsertOne) UpdateNewValues

func (u *PackageVersionUpsertOne) UpdateNewValues() *PackageVersionUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:

client.PackageVersion.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(packageversion.FieldID)
		}),
	).
	Exec(ctx)

func (*PackageVersionUpsertOne) UpdateQualifiers

func (u *PackageVersionUpsertOne) UpdateQualifiers() *PackageVersionUpsertOne

UpdateQualifiers sets the "qualifiers" field to the value that was provided on create.

func (*PackageVersionUpsertOne) UpdateSubpath

UpdateSubpath sets the "subpath" field to the value that was provided on create.

func (*PackageVersionUpsertOne) UpdateVersion

UpdateVersion sets the "version" field to the value that was provided on create.

type PackageVersions

type PackageVersions []*PackageVersion

PackageVersions is a parsable slice of PackageVersion.

type PageInfo

type PageInfo = entgql.PageInfo[uuid.UUID]

Common entgql types.

type PkgEqual

type PkgEqual struct {

	// ID of the ent.
	ID uuid.UUID `json:"id,omitempty"`
	// PkgID holds the value of the "pkg_id" field.
	PkgID uuid.UUID `json:"pkg_id,omitempty"`
	// EqualPkgID holds the value of the "equal_pkg_id" field.
	EqualPkgID uuid.UUID `json:"equal_pkg_id,omitempty"`
	// Origin holds the value of the "origin" field.
	Origin string `json:"origin,omitempty"`
	// Collector holds the value of the "collector" field.
	Collector string `json:"collector,omitempty"`
	// DocumentRef holds the value of the "document_ref" field.
	DocumentRef string `json:"document_ref,omitempty"`
	// Justification holds the value of the "justification" field.
	Justification string `json:"justification,omitempty"`
	// An opaque hash of the package IDs that are equal
	PackagesHash string `json:"packages_hash,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the PkgEqualQuery when eager-loading is set.
	Edges PkgEqualEdges `json:"edges"`
	// contains filtered or unexported fields
}

PkgEqual is the model entity for the PkgEqual schema.

func (*PkgEqual) IsNode

func (n *PkgEqual) IsNode()

IsNode implements the Node interface check for GQLGen.

func (*PkgEqual) PackageA added in v0.5.0

func (pe *PkgEqual) PackageA(ctx context.Context) (*PackageVersion, error)

func (*PkgEqual) PackageB added in v0.5.0

func (pe *PkgEqual) PackageB(ctx context.Context) (*PackageVersion, error)

func (*PkgEqual) QueryPackageA added in v0.5.0

func (pe *PkgEqual) QueryPackageA() *PackageVersionQuery

QueryPackageA queries the "package_a" edge of the PkgEqual entity.

func (*PkgEqual) QueryPackageB added in v0.5.0

func (pe *PkgEqual) QueryPackageB() *PackageVersionQuery

QueryPackageB queries the "package_b" edge of the PkgEqual entity.

func (*PkgEqual) String

func (pe *PkgEqual) String() string

String implements the fmt.Stringer.

func (*PkgEqual) ToEdge

func (pe *PkgEqual) ToEdge(order *PkgEqualOrder) *PkgEqualEdge

ToEdge converts PkgEqual into PkgEqualEdge.

func (*PkgEqual) Unwrap

func (pe *PkgEqual) Unwrap() *PkgEqual

Unwrap unwraps the PkgEqual entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.

func (*PkgEqual) Update

func (pe *PkgEqual) Update() *PkgEqualUpdateOne

Update returns a builder for updating this PkgEqual. Note that you need to call PkgEqual.Unwrap() before calling this method if this PkgEqual was returned from a transaction, and the transaction was committed or rolled back.

func (*PkgEqual) Value

func (pe *PkgEqual) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the PkgEqual. This includes values selected through modifiers, order, etc.

type PkgEqualClient

type PkgEqualClient struct {
	// contains filtered or unexported fields
}

PkgEqualClient is a client for the PkgEqual schema.

func NewPkgEqualClient

func NewPkgEqualClient(c config) *PkgEqualClient

NewPkgEqualClient returns a client for the PkgEqual from the given config.

func (*PkgEqualClient) Create

func (c *PkgEqualClient) Create() *PkgEqualCreate

Create returns a builder for creating a PkgEqual entity.

func (*PkgEqualClient) CreateBulk

func (c *PkgEqualClient) CreateBulk(builders ...*PkgEqualCreate) *PkgEqualCreateBulk

CreateBulk returns a builder for creating a bulk of PkgEqual entities.

func (*PkgEqualClient) Delete

func (c *PkgEqualClient) Delete() *PkgEqualDelete

Delete returns a delete builder for PkgEqual.

func (*PkgEqualClient) DeleteOne

func (c *PkgEqualClient) DeleteOne(pe *PkgEqual) *PkgEqualDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*PkgEqualClient) DeleteOneID

func (c *PkgEqualClient) DeleteOneID(id uuid.UUID) *PkgEqualDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*PkgEqualClient) Get

func (c *PkgEqualClient) Get(ctx context.Context, id uuid.UUID) (*PkgEqual, error)

Get returns a PkgEqual entity by its id.

func (*PkgEqualClient) GetX

func (c *PkgEqualClient) GetX(ctx context.Context, id uuid.UUID) *PkgEqual

GetX is like Get, but panics if an error occurs.

func (*PkgEqualClient) Hooks

func (c *PkgEqualClient) Hooks() []Hook

Hooks returns the client hooks.

func (*PkgEqualClient) Intercept

func (c *PkgEqualClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `pkgequal.Intercept(f(g(h())))`.

func (*PkgEqualClient) Interceptors

func (c *PkgEqualClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*PkgEqualClient) MapCreateBulk

func (c *PkgEqualClient) MapCreateBulk(slice any, setFunc func(*PkgEqualCreate, int)) *PkgEqualCreateBulk

MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.

func (*PkgEqualClient) Query

func (c *PkgEqualClient) Query() *PkgEqualQuery

Query returns a query builder for PkgEqual.

func (*PkgEqualClient) QueryPackageA added in v0.5.0

func (c *PkgEqualClient) QueryPackageA(pe *PkgEqual) *PackageVersionQuery

QueryPackageA queries the package_a edge of a PkgEqual.

func (*PkgEqualClient) QueryPackageB added in v0.5.0

func (c *PkgEqualClient) QueryPackageB(pe *PkgEqual) *PackageVersionQuery

QueryPackageB queries the package_b edge of a PkgEqual.

func (*PkgEqualClient) Update

func (c *PkgEqualClient) Update() *PkgEqualUpdate

Update returns an update builder for PkgEqual.

func (*PkgEqualClient) UpdateOne

func (c *PkgEqualClient) UpdateOne(pe *PkgEqual) *PkgEqualUpdateOne

UpdateOne returns an update builder for the given entity.

func (*PkgEqualClient) UpdateOneID

func (c *PkgEqualClient) UpdateOneID(id uuid.UUID) *PkgEqualUpdateOne

UpdateOneID returns an update builder for the given id.

func (*PkgEqualClient) Use

func (c *PkgEqualClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `pkgequal.Hooks(f(g(h())))`.

type PkgEqualConnection

type PkgEqualConnection struct {
	Edges      []*PkgEqualEdge `json:"edges"`
	PageInfo   PageInfo        `json:"pageInfo"`
	TotalCount int             `json:"totalCount"`
}

PkgEqualConnection is the connection containing edges to PkgEqual.

type PkgEqualCreate

type PkgEqualCreate struct {
	// contains filtered or unexported fields
}

PkgEqualCreate is the builder for creating a PkgEqual entity.

func (*PkgEqualCreate) Exec

func (pec *PkgEqualCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*PkgEqualCreate) ExecX

func (pec *PkgEqualCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*PkgEqualCreate) Mutation

func (pec *PkgEqualCreate) Mutation() *PkgEqualMutation

Mutation returns the PkgEqualMutation object of the builder.

func (*PkgEqualCreate) OnConflict

func (pec *PkgEqualCreate) OnConflict(opts ...sql.ConflictOption) *PkgEqualUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.PkgEqual.Create().
	SetPkgID(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.PkgEqualUpsert) {
		SetPkgID(v+v).
	}).
	Exec(ctx)

func (*PkgEqualCreate) OnConflictColumns

func (pec *PkgEqualCreate) OnConflictColumns(columns ...string) *PkgEqualUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.PkgEqual.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*PkgEqualCreate) Save

func (pec *PkgEqualCreate) Save(ctx context.Context) (*PkgEqual, error)

Save creates the PkgEqual in the database.

func (*PkgEqualCreate) SaveX

func (pec *PkgEqualCreate) SaveX(ctx context.Context) *PkgEqual

SaveX calls Save and panics if Save returns an error.

func (*PkgEqualCreate) SetCollector

func (pec *PkgEqualCreate) SetCollector(s string) *PkgEqualCreate

SetCollector sets the "collector" field.

func (*PkgEqualCreate) SetDocumentRef added in v0.6.0

func (pec *PkgEqualCreate) SetDocumentRef(s string) *PkgEqualCreate

SetDocumentRef sets the "document_ref" field.

func (*PkgEqualCreate) SetEqualPkgID added in v0.5.0

func (pec *PkgEqualCreate) SetEqualPkgID(u uuid.UUID) *PkgEqualCreate

SetEqualPkgID sets the "equal_pkg_id" field.

func (*PkgEqualCreate) SetID added in v0.5.0

func (pec *PkgEqualCreate) SetID(u uuid.UUID) *PkgEqualCreate

SetID sets the "id" field.

func (*PkgEqualCreate) SetJustification

func (pec *PkgEqualCreate) SetJustification(s string) *PkgEqualCreate

SetJustification sets the "justification" field.

func (*PkgEqualCreate) SetNillableID added in v0.5.0

func (pec *PkgEqualCreate) SetNillableID(u *uuid.UUID) *PkgEqualCreate

SetNillableID sets the "id" field if the given value is not nil.

func (*PkgEqualCreate) SetOrigin

func (pec *PkgEqualCreate) SetOrigin(s string) *PkgEqualCreate

SetOrigin sets the "origin" field.

func (*PkgEqualCreate) SetPackageA added in v0.5.0

func (pec *PkgEqualCreate) SetPackageA(p *PackageVersion) *PkgEqualCreate

SetPackageA sets the "package_a" edge to the PackageVersion entity.

func (*PkgEqualCreate) SetPackageAID added in v0.5.0

func (pec *PkgEqualCreate) SetPackageAID(id uuid.UUID) *PkgEqualCreate

SetPackageAID sets the "package_a" edge to the PackageVersion entity by ID.

func (*PkgEqualCreate) SetPackageB added in v0.5.0

func (pec *PkgEqualCreate) SetPackageB(p *PackageVersion) *PkgEqualCreate

SetPackageB sets the "package_b" edge to the PackageVersion entity.

func (*PkgEqualCreate) SetPackageBID added in v0.5.0

func (pec *PkgEqualCreate) SetPackageBID(id uuid.UUID) *PkgEqualCreate

SetPackageBID sets the "package_b" edge to the PackageVersion entity by ID.

func (*PkgEqualCreate) SetPackagesHash

func (pec *PkgEqualCreate) SetPackagesHash(s string) *PkgEqualCreate

SetPackagesHash sets the "packages_hash" field.

func (*PkgEqualCreate) SetPkgID added in v0.5.0

func (pec *PkgEqualCreate) SetPkgID(u uuid.UUID) *PkgEqualCreate

SetPkgID sets the "pkg_id" field.

type PkgEqualCreateBulk

type PkgEqualCreateBulk struct {
	// contains filtered or unexported fields
}

PkgEqualCreateBulk is the builder for creating many PkgEqual entities in bulk.

func (*PkgEqualCreateBulk) Exec

func (pecb *PkgEqualCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*PkgEqualCreateBulk) ExecX

func (pecb *PkgEqualCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*PkgEqualCreateBulk) OnConflict

func (pecb *PkgEqualCreateBulk) OnConflict(opts ...sql.ConflictOption) *PkgEqualUpsertBulk

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.PkgEqual.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.PkgEqualUpsert) {
		SetPkgID(v+v).
	}).
	Exec(ctx)

func (*PkgEqualCreateBulk) OnConflictColumns

func (pecb *PkgEqualCreateBulk) OnConflictColumns(columns ...string) *PkgEqualUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.PkgEqual.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*PkgEqualCreateBulk) Save

func (pecb *PkgEqualCreateBulk) Save(ctx context.Context) ([]*PkgEqual, error)

Save creates the PkgEqual entities in the database.

func (*PkgEqualCreateBulk) SaveX

func (pecb *PkgEqualCreateBulk) SaveX(ctx context.Context) []*PkgEqual

SaveX is like Save, but panics if an error occurs.

type PkgEqualDelete

type PkgEqualDelete struct {
	// contains filtered or unexported fields
}

PkgEqualDelete is the builder for deleting a PkgEqual entity.

func (*PkgEqualDelete) Exec

func (ped *PkgEqualDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*PkgEqualDelete) ExecX

func (ped *PkgEqualDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*PkgEqualDelete) Where

func (ped *PkgEqualDelete) Where(ps ...predicate.PkgEqual) *PkgEqualDelete

Where appends a list predicates to the PkgEqualDelete builder.

type PkgEqualDeleteOne

type PkgEqualDeleteOne struct {
	// contains filtered or unexported fields
}

PkgEqualDeleteOne is the builder for deleting a single PkgEqual entity.

func (*PkgEqualDeleteOne) Exec

func (pedo *PkgEqualDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*PkgEqualDeleteOne) ExecX

func (pedo *PkgEqualDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*PkgEqualDeleteOne) Where

Where appends a list predicates to the PkgEqualDelete builder.

type PkgEqualEdge

type PkgEqualEdge struct {
	Node   *PkgEqual `json:"node"`
	Cursor Cursor    `json:"cursor"`
}

PkgEqualEdge is the edge representation of PkgEqual.

type PkgEqualEdges

type PkgEqualEdges struct {
	// PackageA holds the value of the package_a edge.
	PackageA *PackageVersion `json:"package_a,omitempty"`
	// PackageB holds the value of the package_b edge.
	PackageB *PackageVersion `json:"package_b,omitempty"`
	// contains filtered or unexported fields
}

PkgEqualEdges holds the relations/edges for other nodes in the graph.

func (PkgEqualEdges) PackageAOrErr added in v0.5.0

func (e PkgEqualEdges) PackageAOrErr() (*PackageVersion, error)

PackageAOrErr returns the PackageA value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (PkgEqualEdges) PackageBOrErr added in v0.5.0

func (e PkgEqualEdges) PackageBOrErr() (*PackageVersion, error)

PackageBOrErr returns the PackageB value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type PkgEqualGroupBy

type PkgEqualGroupBy struct {
	// contains filtered or unexported fields
}

PkgEqualGroupBy is the group-by builder for PkgEqual entities.

func (*PkgEqualGroupBy) Aggregate

func (pegb *PkgEqualGroupBy) Aggregate(fns ...AggregateFunc) *PkgEqualGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*PkgEqualGroupBy) Bool

func (s *PkgEqualGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*PkgEqualGroupBy) BoolX

func (s *PkgEqualGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*PkgEqualGroupBy) Bools

func (s *PkgEqualGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*PkgEqualGroupBy) BoolsX

func (s *PkgEqualGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*PkgEqualGroupBy) Float64

func (s *PkgEqualGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*PkgEqualGroupBy) Float64X

func (s *PkgEqualGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*PkgEqualGroupBy) Float64s

func (s *PkgEqualGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*PkgEqualGroupBy) Float64sX

func (s *PkgEqualGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*PkgEqualGroupBy) Int

func (s *PkgEqualGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*PkgEqualGroupBy) IntX

func (s *PkgEqualGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*PkgEqualGroupBy) Ints

func (s *PkgEqualGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*PkgEqualGroupBy) IntsX

func (s *PkgEqualGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*PkgEqualGroupBy) Scan

func (pegb *PkgEqualGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*PkgEqualGroupBy) ScanX

func (s *PkgEqualGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*PkgEqualGroupBy) String

func (s *PkgEqualGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*PkgEqualGroupBy) StringX

func (s *PkgEqualGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*PkgEqualGroupBy) Strings

func (s *PkgEqualGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*PkgEqualGroupBy) StringsX

func (s *PkgEqualGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type PkgEqualMutation

type PkgEqualMutation struct {
	// contains filtered or unexported fields
}

PkgEqualMutation represents an operation that mutates the PkgEqual nodes in the graph.

func (*PkgEqualMutation) AddField

func (m *PkgEqualMutation) AddField(name string, value ent.Value) error

AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*PkgEqualMutation) AddedEdges

func (m *PkgEqualMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*PkgEqualMutation) AddedField

func (m *PkgEqualMutation) AddedField(name string) (ent.Value, bool)

AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*PkgEqualMutation) AddedFields

func (m *PkgEqualMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*PkgEqualMutation) AddedIDs

func (m *PkgEqualMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*PkgEqualMutation) ClearEdge

func (m *PkgEqualMutation) ClearEdge(name string) error

ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.

func (*PkgEqualMutation) ClearField

func (m *PkgEqualMutation) ClearField(name string) error

ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.

func (*PkgEqualMutation) ClearPackageA added in v0.5.0

func (m *PkgEqualMutation) ClearPackageA()

ClearPackageA clears the "package_a" edge to the PackageVersion entity.

func (*PkgEqualMutation) ClearPackageB added in v0.5.0

func (m *PkgEqualMutation) ClearPackageB()

ClearPackageB clears the "package_b" edge to the PackageVersion entity.

func (*PkgEqualMutation) ClearedEdges

func (m *PkgEqualMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*PkgEqualMutation) ClearedFields

func (m *PkgEqualMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (PkgEqualMutation) Client

func (m PkgEqualMutation) Client() *Client

Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.

func (*PkgEqualMutation) Collector

func (m *PkgEqualMutation) Collector() (r string, exists bool)

Collector returns the value of the "collector" field in the mutation.

func (*PkgEqualMutation) DocumentRef added in v0.6.0

func (m *PkgEqualMutation) DocumentRef() (r string, exists bool)

DocumentRef returns the value of the "document_ref" field in the mutation.

func (*PkgEqualMutation) EdgeCleared

func (m *PkgEqualMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*PkgEqualMutation) EqualPkgID added in v0.5.0

func (m *PkgEqualMutation) EqualPkgID() (r uuid.UUID, exists bool)

EqualPkgID returns the value of the "equal_pkg_id" field in the mutation.

func (*PkgEqualMutation) Field

func (m *PkgEqualMutation) Field(name string) (ent.Value, bool)

Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*PkgEqualMutation) FieldCleared

func (m *PkgEqualMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*PkgEqualMutation) Fields

func (m *PkgEqualMutation) Fields() []string

Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().

func (*PkgEqualMutation) ID

func (m *PkgEqualMutation) ID() (id uuid.UUID, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*PkgEqualMutation) IDs

func (m *PkgEqualMutation) IDs(ctx context.Context) ([]uuid.UUID, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*PkgEqualMutation) Justification

func (m *PkgEqualMutation) Justification() (r string, exists bool)

Justification returns the value of the "justification" field in the mutation.

func (*PkgEqualMutation) OldCollector

func (m *PkgEqualMutation) OldCollector(ctx context.Context) (v string, err error)

OldCollector returns the old "collector" field's value of the PkgEqual entity. If the PkgEqual object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*PkgEqualMutation) OldDocumentRef added in v0.6.0

func (m *PkgEqualMutation) OldDocumentRef(ctx context.Context) (v string, err error)

OldDocumentRef returns the old "document_ref" field's value of the PkgEqual entity. If the PkgEqual object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*PkgEqualMutation) OldEqualPkgID added in v0.5.0

func (m *PkgEqualMutation) OldEqualPkgID(ctx context.Context) (v uuid.UUID, err error)

OldEqualPkgID returns the old "equal_pkg_id" field's value of the PkgEqual entity. If the PkgEqual object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*PkgEqualMutation) OldField

func (m *PkgEqualMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*PkgEqualMutation) OldJustification

func (m *PkgEqualMutation) OldJustification(ctx context.Context) (v string, err error)

OldJustification returns the old "justification" field's value of the PkgEqual entity. If the PkgEqual object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*PkgEqualMutation) OldOrigin

func (m *PkgEqualMutation) OldOrigin(ctx context.Context) (v string, err error)

OldOrigin returns the old "origin" field's value of the PkgEqual entity. If the PkgEqual object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*PkgEqualMutation) OldPackagesHash

func (m *PkgEqualMutation) OldPackagesHash(ctx context.Context) (v string, err error)

OldPackagesHash returns the old "packages_hash" field's value of the PkgEqual entity. If the PkgEqual object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*PkgEqualMutation) OldPkgID added in v0.5.0

func (m *PkgEqualMutation) OldPkgID(ctx context.Context) (v uuid.UUID, err error)

OldPkgID returns the old "pkg_id" field's value of the PkgEqual entity. If the PkgEqual object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*PkgEqualMutation) Op

func (m *PkgEqualMutation) Op() Op

Op returns the operation name.

func (*PkgEqualMutation) Origin

func (m *PkgEqualMutation) Origin() (r string, exists bool)

Origin returns the value of the "origin" field in the mutation.

func (*PkgEqualMutation) PackageACleared added in v0.5.0

func (m *PkgEqualMutation) PackageACleared() bool

PackageACleared reports if the "package_a" edge to the PackageVersion entity was cleared.

func (*PkgEqualMutation) PackageAID added in v0.5.0

func (m *PkgEqualMutation) PackageAID() (id uuid.UUID, exists bool)

PackageAID returns the "package_a" edge ID in the mutation.

func (*PkgEqualMutation) PackageAIDs added in v0.5.0

func (m *PkgEqualMutation) PackageAIDs() (ids []uuid.UUID)

PackageAIDs returns the "package_a" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use PackageAID instead. It exists only for internal usage by the builders.

func (*PkgEqualMutation) PackageBCleared added in v0.5.0

func (m *PkgEqualMutation) PackageBCleared() bool

PackageBCleared reports if the "package_b" edge to the PackageVersion entity was cleared.

func (*PkgEqualMutation) PackageBID added in v0.5.0

func (m *PkgEqualMutation) PackageBID() (id uuid.UUID, exists bool)

PackageBID returns the "package_b" edge ID in the mutation.

func (*PkgEqualMutation) PackageBIDs added in v0.5.0

func (m *PkgEqualMutation) PackageBIDs() (ids []uuid.UUID)

PackageBIDs returns the "package_b" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use PackageBID instead. It exists only for internal usage by the builders.

func (*PkgEqualMutation) PackagesHash

func (m *PkgEqualMutation) PackagesHash() (r string, exists bool)

PackagesHash returns the value of the "packages_hash" field in the mutation.

func (*PkgEqualMutation) PkgID added in v0.5.0

func (m *PkgEqualMutation) PkgID() (r uuid.UUID, exists bool)

PkgID returns the value of the "pkg_id" field in the mutation.

func (*PkgEqualMutation) RemovedEdges

func (m *PkgEqualMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*PkgEqualMutation) RemovedIDs

func (m *PkgEqualMutation) RemovedIDs(name string) []ent.Value

RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.

func (*PkgEqualMutation) ResetCollector

func (m *PkgEqualMutation) ResetCollector()

ResetCollector resets all changes to the "collector" field.

func (*PkgEqualMutation) ResetDocumentRef added in v0.6.0

func (m *PkgEqualMutation) ResetDocumentRef()

ResetDocumentRef resets all changes to the "document_ref" field.

func (*PkgEqualMutation) ResetEdge

func (m *PkgEqualMutation) ResetEdge(name string) error

ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.

func (*PkgEqualMutation) ResetEqualPkgID added in v0.5.0

func (m *PkgEqualMutation) ResetEqualPkgID()

ResetEqualPkgID resets all changes to the "equal_pkg_id" field.

func (*PkgEqualMutation) ResetField

func (m *PkgEqualMutation) ResetField(name string) error

ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.

func (*PkgEqualMutation) ResetJustification

func (m *PkgEqualMutation) ResetJustification()

ResetJustification resets all changes to the "justification" field.

func (*PkgEqualMutation) ResetOrigin

func (m *PkgEqualMutation) ResetOrigin()

ResetOrigin resets all changes to the "origin" field.

func (*PkgEqualMutation) ResetPackageA added in v0.5.0

func (m *PkgEqualMutation) ResetPackageA()

ResetPackageA resets all changes to the "package_a" edge.

func (*PkgEqualMutation) ResetPackageB added in v0.5.0

func (m *PkgEqualMutation) ResetPackageB()

ResetPackageB resets all changes to the "package_b" edge.

func (*PkgEqualMutation) ResetPackagesHash

func (m *PkgEqualMutation) ResetPackagesHash()

ResetPackagesHash resets all changes to the "packages_hash" field.

func (*PkgEqualMutation) ResetPkgID added in v0.5.0

func (m *PkgEqualMutation) ResetPkgID()

ResetPkgID resets all changes to the "pkg_id" field.

func (*PkgEqualMutation) SetCollector

func (m *PkgEqualMutation) SetCollector(s string)

SetCollector sets the "collector" field.

func (*PkgEqualMutation) SetDocumentRef added in v0.6.0

func (m *PkgEqualMutation) SetDocumentRef(s string)

SetDocumentRef sets the "document_ref" field.

func (*PkgEqualMutation) SetEqualPkgID added in v0.5.0

func (m *PkgEqualMutation) SetEqualPkgID(u uuid.UUID)

SetEqualPkgID sets the "equal_pkg_id" field.

func (*PkgEqualMutation) SetField

func (m *PkgEqualMutation) SetField(name string, value ent.Value) error

SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*PkgEqualMutation) SetID added in v0.5.0

func (m *PkgEqualMutation) SetID(id uuid.UUID)

SetID sets the value of the id field. Note that this operation is only accepted on creation of PkgEqual entities.

func (*PkgEqualMutation) SetJustification

func (m *PkgEqualMutation) SetJustification(s string)

SetJustification sets the "justification" field.

func (*PkgEqualMutation) SetOp

func (m *PkgEqualMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*PkgEqualMutation) SetOrigin

func (m *PkgEqualMutation) SetOrigin(s string)

SetOrigin sets the "origin" field.

func (*PkgEqualMutation) SetPackageAID added in v0.5.0

func (m *PkgEqualMutation) SetPackageAID(id uuid.UUID)

SetPackageAID sets the "package_a" edge to the PackageVersion entity by id.

func (*PkgEqualMutation) SetPackageBID added in v0.5.0

func (m *PkgEqualMutation) SetPackageBID(id uuid.UUID)

SetPackageBID sets the "package_b" edge to the PackageVersion entity by id.

func (*PkgEqualMutation) SetPackagesHash

func (m *PkgEqualMutation) SetPackagesHash(s string)

SetPackagesHash sets the "packages_hash" field.

func (*PkgEqualMutation) SetPkgID added in v0.5.0

func (m *PkgEqualMutation) SetPkgID(u uuid.UUID)

SetPkgID sets the "pkg_id" field.

func (PkgEqualMutation) Tx

func (m PkgEqualMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*PkgEqualMutation) Type

func (m *PkgEqualMutation) Type() string

Type returns the node type of this mutation (PkgEqual).

func (*PkgEqualMutation) Where

func (m *PkgEqualMutation) Where(ps ...predicate.PkgEqual)

Where appends a list predicates to the PkgEqualMutation builder.

func (*PkgEqualMutation) WhereP

func (m *PkgEqualMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the PkgEqualMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type PkgEqualOrder

type PkgEqualOrder struct {
	Direction OrderDirection      `json:"direction"`
	Field     *PkgEqualOrderField `json:"field"`
}

PkgEqualOrder defines the ordering of PkgEqual.

type PkgEqualOrderField

type PkgEqualOrderField struct {
	// Value extracts the ordering value from the given PkgEqual.
	Value func(*PkgEqual) (ent.Value, error)
	// contains filtered or unexported fields
}

PkgEqualOrderField defines the ordering field of PkgEqual.

type PkgEqualPaginateOption

type PkgEqualPaginateOption func(*pkgequalPager) error

PkgEqualPaginateOption enables pagination customization.

func WithPkgEqualFilter

func WithPkgEqualFilter(filter func(*PkgEqualQuery) (*PkgEqualQuery, error)) PkgEqualPaginateOption

WithPkgEqualFilter configures pagination filter.

func WithPkgEqualOrder

func WithPkgEqualOrder(order *PkgEqualOrder) PkgEqualPaginateOption

WithPkgEqualOrder configures pagination ordering.

type PkgEqualQuery

type PkgEqualQuery struct {
	// contains filtered or unexported fields
}

PkgEqualQuery is the builder for querying PkgEqual entities.

func (*PkgEqualQuery) Aggregate

func (peq *PkgEqualQuery) Aggregate(fns ...AggregateFunc) *PkgEqualSelect

Aggregate returns a PkgEqualSelect configured with the given aggregations.

func (*PkgEqualQuery) All

func (peq *PkgEqualQuery) All(ctx context.Context) ([]*PkgEqual, error)

All executes the query and returns a list of PkgEquals.

func (*PkgEqualQuery) AllX

func (peq *PkgEqualQuery) AllX(ctx context.Context) []*PkgEqual

AllX is like All, but panics if an error occurs.

func (*PkgEqualQuery) Clone

func (peq *PkgEqualQuery) Clone() *PkgEqualQuery

Clone returns a duplicate of the PkgEqualQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*PkgEqualQuery) CollectFields

func (pe *PkgEqualQuery) CollectFields(ctx context.Context, satisfies ...string) (*PkgEqualQuery, error)

CollectFields tells the query-builder to eagerly load connected nodes by resolver context.

func (*PkgEqualQuery) Count

func (peq *PkgEqualQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*PkgEqualQuery) CountX

func (peq *PkgEqualQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*PkgEqualQuery) Exist

func (peq *PkgEqualQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*PkgEqualQuery) ExistX

func (peq *PkgEqualQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*PkgEqualQuery) First

func (peq *PkgEqualQuery) First(ctx context.Context) (*PkgEqual, error)

First returns the first PkgEqual entity from the query. Returns a *NotFoundError when no PkgEqual was found.

func (*PkgEqualQuery) FirstID

func (peq *PkgEqualQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)

FirstID returns the first PkgEqual ID from the query. Returns a *NotFoundError when no PkgEqual ID was found.

func (*PkgEqualQuery) FirstIDX

func (peq *PkgEqualQuery) FirstIDX(ctx context.Context) uuid.UUID

FirstIDX is like FirstID, but panics if an error occurs.

func (*PkgEqualQuery) FirstX

func (peq *PkgEqualQuery) FirstX(ctx context.Context) *PkgEqual

FirstX is like First, but panics if an error occurs.

func (*PkgEqualQuery) GroupBy

func (peq *PkgEqualQuery) GroupBy(field string, fields ...string) *PkgEqualGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	PkgID uuid.UUID `json:"pkg_id,omitempty"`
	Count int `json:"count,omitempty"`
}

client.PkgEqual.Query().
	GroupBy(pkgequal.FieldPkgID).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*PkgEqualQuery) IDs

func (peq *PkgEqualQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)

IDs executes the query and returns a list of PkgEqual IDs.

func (*PkgEqualQuery) IDsX

func (peq *PkgEqualQuery) IDsX(ctx context.Context) []uuid.UUID

IDsX is like IDs, but panics if an error occurs.

func (*PkgEqualQuery) Limit

func (peq *PkgEqualQuery) Limit(limit int) *PkgEqualQuery

Limit the number of records to be returned by this query.

func (*PkgEqualQuery) Offset

func (peq *PkgEqualQuery) Offset(offset int) *PkgEqualQuery

Offset to start from.

func (*PkgEqualQuery) Only

func (peq *PkgEqualQuery) Only(ctx context.Context) (*PkgEqual, error)

Only returns a single PkgEqual entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one PkgEqual entity is found. Returns a *NotFoundError when no PkgEqual entities are found.

func (*PkgEqualQuery) OnlyID

func (peq *PkgEqualQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)

OnlyID is like Only, but returns the only PkgEqual ID in the query. Returns a *NotSingularError when more than one PkgEqual ID is found. Returns a *NotFoundError when no entities are found.

func (*PkgEqualQuery) OnlyIDX

func (peq *PkgEqualQuery) OnlyIDX(ctx context.Context) uuid.UUID

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*PkgEqualQuery) OnlyX

func (peq *PkgEqualQuery) OnlyX(ctx context.Context) *PkgEqual

OnlyX is like Only, but panics if an error occurs.

func (*PkgEqualQuery) Order

func (peq *PkgEqualQuery) Order(o ...pkgequal.OrderOption) *PkgEqualQuery

Order specifies how the records should be ordered.

func (*PkgEqualQuery) Paginate

func (pe *PkgEqualQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...PkgEqualPaginateOption,
) (*PkgEqualConnection, error)

Paginate executes the query and returns a relay based cursor connection to PkgEqual.

func (*PkgEqualQuery) QueryPackageA added in v0.5.0

func (peq *PkgEqualQuery) QueryPackageA() *PackageVersionQuery

QueryPackageA chains the current query on the "package_a" edge.

func (*PkgEqualQuery) QueryPackageB added in v0.5.0

func (peq *PkgEqualQuery) QueryPackageB() *PackageVersionQuery

QueryPackageB chains the current query on the "package_b" edge.

func (*PkgEqualQuery) Select

func (peq *PkgEqualQuery) Select(fields ...string) *PkgEqualSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	PkgID uuid.UUID `json:"pkg_id,omitempty"`
}

client.PkgEqual.Query().
	Select(pkgequal.FieldPkgID).
	Scan(ctx, &v)

func (*PkgEqualQuery) Unique

func (peq *PkgEqualQuery) Unique(unique bool) *PkgEqualQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*PkgEqualQuery) Where

func (peq *PkgEqualQuery) Where(ps ...predicate.PkgEqual) *PkgEqualQuery

Where adds a new predicate for the PkgEqualQuery builder.

func (*PkgEqualQuery) WithPackageA added in v0.5.0

func (peq *PkgEqualQuery) WithPackageA(opts ...func(*PackageVersionQuery)) *PkgEqualQuery

WithPackageA tells the query-builder to eager-load the nodes that are connected to the "package_a" edge. The optional arguments are used to configure the query builder of the edge.

func (*PkgEqualQuery) WithPackageB added in v0.5.0

func (peq *PkgEqualQuery) WithPackageB(opts ...func(*PackageVersionQuery)) *PkgEqualQuery

WithPackageB tells the query-builder to eager-load the nodes that are connected to the "package_b" edge. The optional arguments are used to configure the query builder of the edge.

type PkgEqualSelect

type PkgEqualSelect struct {
	*PkgEqualQuery
	// contains filtered or unexported fields
}

PkgEqualSelect is the builder for selecting fields of PkgEqual entities.

func (*PkgEqualSelect) Aggregate

func (pes *PkgEqualSelect) Aggregate(fns ...AggregateFunc) *PkgEqualSelect

Aggregate adds the given aggregation functions to the selector query.

func (*PkgEqualSelect) Bool

func (s *PkgEqualSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*PkgEqualSelect) BoolX

func (s *PkgEqualSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*PkgEqualSelect) Bools

func (s *PkgEqualSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*PkgEqualSelect) BoolsX

func (s *PkgEqualSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*PkgEqualSelect) Float64

func (s *PkgEqualSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*PkgEqualSelect) Float64X

func (s *PkgEqualSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*PkgEqualSelect) Float64s

func (s *PkgEqualSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*PkgEqualSelect) Float64sX

func (s *PkgEqualSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*PkgEqualSelect) Int

func (s *PkgEqualSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*PkgEqualSelect) IntX

func (s *PkgEqualSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*PkgEqualSelect) Ints

func (s *PkgEqualSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*PkgEqualSelect) IntsX

func (s *PkgEqualSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*PkgEqualSelect) Scan

func (pes *PkgEqualSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*PkgEqualSelect) ScanX

func (s *PkgEqualSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*PkgEqualSelect) String

func (s *PkgEqualSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*PkgEqualSelect) StringX

func (s *PkgEqualSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*PkgEqualSelect) Strings

func (s *PkgEqualSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*PkgEqualSelect) StringsX

func (s *PkgEqualSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type PkgEqualUpdate

type PkgEqualUpdate struct {
	// contains filtered or unexported fields
}

PkgEqualUpdate is the builder for updating PkgEqual entities.

func (*PkgEqualUpdate) ClearPackageA added in v0.5.0

func (peu *PkgEqualUpdate) ClearPackageA() *PkgEqualUpdate

ClearPackageA clears the "package_a" edge to the PackageVersion entity.

func (*PkgEqualUpdate) ClearPackageB added in v0.5.0

func (peu *PkgEqualUpdate) ClearPackageB() *PkgEqualUpdate

ClearPackageB clears the "package_b" edge to the PackageVersion entity.

func (*PkgEqualUpdate) Exec

func (peu *PkgEqualUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*PkgEqualUpdate) ExecX

func (peu *PkgEqualUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*PkgEqualUpdate) Mutation

func (peu *PkgEqualUpdate) Mutation() *PkgEqualMutation

Mutation returns the PkgEqualMutation object of the builder.

func (*PkgEqualUpdate) Save

func (peu *PkgEqualUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*PkgEqualUpdate) SaveX

func (peu *PkgEqualUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*PkgEqualUpdate) SetCollector

func (peu *PkgEqualUpdate) SetCollector(s string) *PkgEqualUpdate

SetCollector sets the "collector" field.

func (*PkgEqualUpdate) SetDocumentRef added in v0.6.0

func (peu *PkgEqualUpdate) SetDocumentRef(s string) *PkgEqualUpdate

SetDocumentRef sets the "document_ref" field.

func (*PkgEqualUpdate) SetEqualPkgID added in v0.5.0

func (peu *PkgEqualUpdate) SetEqualPkgID(u uuid.UUID) *PkgEqualUpdate

SetEqualPkgID sets the "equal_pkg_id" field.

func (*PkgEqualUpdate) SetJustification

func (peu *PkgEqualUpdate) SetJustification(s string) *PkgEqualUpdate

SetJustification sets the "justification" field.

func (*PkgEqualUpdate) SetNillableCollector added in v0.4.0

func (peu *PkgEqualUpdate) SetNillableCollector(s *string) *PkgEqualUpdate

SetNillableCollector sets the "collector" field if the given value is not nil.

func (*PkgEqualUpdate) SetNillableDocumentRef added in v0.6.0

func (peu *PkgEqualUpdate) SetNillableDocumentRef(s *string) *PkgEqualUpdate

SetNillableDocumentRef sets the "document_ref" field if the given value is not nil.

func (*PkgEqualUpdate) SetNillableEqualPkgID added in v0.5.0

func (peu *PkgEqualUpdate) SetNillableEqualPkgID(u *uuid.UUID) *PkgEqualUpdate

SetNillableEqualPkgID sets the "equal_pkg_id" field if the given value is not nil.

func (*PkgEqualUpdate) SetNillableJustification added in v0.4.0

func (peu *PkgEqualUpdate) SetNillableJustification(s *string) *PkgEqualUpdate

SetNillableJustification sets the "justification" field if the given value is not nil.

func (*PkgEqualUpdate) SetNillableOrigin added in v0.4.0

func (peu *PkgEqualUpdate) SetNillableOrigin(s *string) *PkgEqualUpdate

SetNillableOrigin sets the "origin" field if the given value is not nil.

func (*PkgEqualUpdate) SetNillablePackagesHash added in v0.4.0

func (peu *PkgEqualUpdate) SetNillablePackagesHash(s *string) *PkgEqualUpdate

SetNillablePackagesHash sets the "packages_hash" field if the given value is not nil.

func (*PkgEqualUpdate) SetNillablePkgID added in v0.5.0

func (peu *PkgEqualUpdate) SetNillablePkgID(u *uuid.UUID) *PkgEqualUpdate

SetNillablePkgID sets the "pkg_id" field if the given value is not nil.

func (*PkgEqualUpdate) SetOrigin

func (peu *PkgEqualUpdate) SetOrigin(s string) *PkgEqualUpdate

SetOrigin sets the "origin" field.

func (*PkgEqualUpdate) SetPackageA added in v0.5.0

func (peu *PkgEqualUpdate) SetPackageA(p *PackageVersion) *PkgEqualUpdate

SetPackageA sets the "package_a" edge to the PackageVersion entity.

func (*PkgEqualUpdate) SetPackageAID added in v0.5.0

func (peu *PkgEqualUpdate) SetPackageAID(id uuid.UUID) *PkgEqualUpdate

SetPackageAID sets the "package_a" edge to the PackageVersion entity by ID.

func (*PkgEqualUpdate) SetPackageB added in v0.5.0

func (peu *PkgEqualUpdate) SetPackageB(p *PackageVersion) *PkgEqualUpdate

SetPackageB sets the "package_b" edge to the PackageVersion entity.

func (*PkgEqualUpdate) SetPackageBID added in v0.5.0

func (peu *PkgEqualUpdate) SetPackageBID(id uuid.UUID) *PkgEqualUpdate

SetPackageBID sets the "package_b" edge to the PackageVersion entity by ID.

func (*PkgEqualUpdate) SetPackagesHash

func (peu *PkgEqualUpdate) SetPackagesHash(s string) *PkgEqualUpdate

SetPackagesHash sets the "packages_hash" field.

func (*PkgEqualUpdate) SetPkgID added in v0.5.0

func (peu *PkgEqualUpdate) SetPkgID(u uuid.UUID) *PkgEqualUpdate

SetPkgID sets the "pkg_id" field.

func (*PkgEqualUpdate) Where

func (peu *PkgEqualUpdate) Where(ps ...predicate.PkgEqual) *PkgEqualUpdate

Where appends a list predicates to the PkgEqualUpdate builder.

type PkgEqualUpdateOne

type PkgEqualUpdateOne struct {
	// contains filtered or unexported fields
}

PkgEqualUpdateOne is the builder for updating a single PkgEqual entity.

func (*PkgEqualUpdateOne) ClearPackageA added in v0.5.0

func (peuo *PkgEqualUpdateOne) ClearPackageA() *PkgEqualUpdateOne

ClearPackageA clears the "package_a" edge to the PackageVersion entity.

func (*PkgEqualUpdateOne) ClearPackageB added in v0.5.0

func (peuo *PkgEqualUpdateOne) ClearPackageB() *PkgEqualUpdateOne

ClearPackageB clears the "package_b" edge to the PackageVersion entity.

func (*PkgEqualUpdateOne) Exec

func (peuo *PkgEqualUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*PkgEqualUpdateOne) ExecX

func (peuo *PkgEqualUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*PkgEqualUpdateOne) Mutation

func (peuo *PkgEqualUpdateOne) Mutation() *PkgEqualMutation

Mutation returns the PkgEqualMutation object of the builder.

func (*PkgEqualUpdateOne) Save

func (peuo *PkgEqualUpdateOne) Save(ctx context.Context) (*PkgEqual, error)

Save executes the query and returns the updated PkgEqual entity.

func (*PkgEqualUpdateOne) SaveX

func (peuo *PkgEqualUpdateOne) SaveX(ctx context.Context) *PkgEqual

SaveX is like Save, but panics if an error occurs.

func (*PkgEqualUpdateOne) Select

func (peuo *PkgEqualUpdateOne) Select(field string, fields ...string) *PkgEqualUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*PkgEqualUpdateOne) SetCollector

func (peuo *PkgEqualUpdateOne) SetCollector(s string) *PkgEqualUpdateOne

SetCollector sets the "collector" field.

func (*PkgEqualUpdateOne) SetDocumentRef added in v0.6.0

func (peuo *PkgEqualUpdateOne) SetDocumentRef(s string) *PkgEqualUpdateOne

SetDocumentRef sets the "document_ref" field.

func (*PkgEqualUpdateOne) SetEqualPkgID added in v0.5.0

func (peuo *PkgEqualUpdateOne) SetEqualPkgID(u uuid.UUID) *PkgEqualUpdateOne

SetEqualPkgID sets the "equal_pkg_id" field.

func (*PkgEqualUpdateOne) SetJustification

func (peuo *PkgEqualUpdateOne) SetJustification(s string) *PkgEqualUpdateOne

SetJustification sets the "justification" field.

func (*PkgEqualUpdateOne) SetNillableCollector added in v0.4.0

func (peuo *PkgEqualUpdateOne) SetNillableCollector(s *string) *PkgEqualUpdateOne

SetNillableCollector sets the "collector" field if the given value is not nil.

func (*PkgEqualUpdateOne) SetNillableDocumentRef added in v0.6.0

func (peuo *PkgEqualUpdateOne) SetNillableDocumentRef(s *string) *PkgEqualUpdateOne

SetNillableDocumentRef sets the "document_ref" field if the given value is not nil.

func (*PkgEqualUpdateOne) SetNillableEqualPkgID added in v0.5.0

func (peuo *PkgEqualUpdateOne) SetNillableEqualPkgID(u *uuid.UUID) *PkgEqualUpdateOne

SetNillableEqualPkgID sets the "equal_pkg_id" field if the given value is not nil.

func (*PkgEqualUpdateOne) SetNillableJustification added in v0.4.0

func (peuo *PkgEqualUpdateOne) SetNillableJustification(s *string) *PkgEqualUpdateOne

SetNillableJustification sets the "justification" field if the given value is not nil.

func (*PkgEqualUpdateOne) SetNillableOrigin added in v0.4.0

func (peuo *PkgEqualUpdateOne) SetNillableOrigin(s *string) *PkgEqualUpdateOne

SetNillableOrigin sets the "origin" field if the given value is not nil.

func (*PkgEqualUpdateOne) SetNillablePackagesHash added in v0.4.0

func (peuo *PkgEqualUpdateOne) SetNillablePackagesHash(s *string) *PkgEqualUpdateOne

SetNillablePackagesHash sets the "packages_hash" field if the given value is not nil.

func (*PkgEqualUpdateOne) SetNillablePkgID added in v0.5.0

func (peuo *PkgEqualUpdateOne) SetNillablePkgID(u *uuid.UUID) *PkgEqualUpdateOne

SetNillablePkgID sets the "pkg_id" field if the given value is not nil.

func (*PkgEqualUpdateOne) SetOrigin

func (peuo *PkgEqualUpdateOne) SetOrigin(s string) *PkgEqualUpdateOne

SetOrigin sets the "origin" field.

func (*PkgEqualUpdateOne) SetPackageA added in v0.5.0

func (peuo *PkgEqualUpdateOne) SetPackageA(p *PackageVersion) *PkgEqualUpdateOne

SetPackageA sets the "package_a" edge to the PackageVersion entity.

func (*PkgEqualUpdateOne) SetPackageAID added in v0.5.0

func (peuo *PkgEqualUpdateOne) SetPackageAID(id uuid.UUID) *PkgEqualUpdateOne

SetPackageAID sets the "package_a" edge to the PackageVersion entity by ID.

func (*PkgEqualUpdateOne) SetPackageB added in v0.5.0

func (peuo *PkgEqualUpdateOne) SetPackageB(p *PackageVersion) *PkgEqualUpdateOne

SetPackageB sets the "package_b" edge to the PackageVersion entity.

func (*PkgEqualUpdateOne) SetPackageBID added in v0.5.0

func (peuo *PkgEqualUpdateOne) SetPackageBID(id uuid.UUID) *PkgEqualUpdateOne

SetPackageBID sets the "package_b" edge to the PackageVersion entity by ID.

func (*PkgEqualUpdateOne) SetPackagesHash

func (peuo *PkgEqualUpdateOne) SetPackagesHash(s string) *PkgEqualUpdateOne

SetPackagesHash sets the "packages_hash" field.

func (*PkgEqualUpdateOne) SetPkgID added in v0.5.0

func (peuo *PkgEqualUpdateOne) SetPkgID(u uuid.UUID) *PkgEqualUpdateOne

SetPkgID sets the "pkg_id" field.

func (*PkgEqualUpdateOne) Where

Where appends a list predicates to the PkgEqualUpdate builder.

type PkgEqualUpsert

type PkgEqualUpsert struct {
	*sql.UpdateSet
}

PkgEqualUpsert is the "OnConflict" setter.

func (*PkgEqualUpsert) SetCollector

func (u *PkgEqualUpsert) SetCollector(v string) *PkgEqualUpsert

SetCollector sets the "collector" field.

func (*PkgEqualUpsert) SetDocumentRef added in v0.6.0

func (u *PkgEqualUpsert) SetDocumentRef(v string) *PkgEqualUpsert

SetDocumentRef sets the "document_ref" field.

func (*PkgEqualUpsert) SetEqualPkgID added in v0.5.0

func (u *PkgEqualUpsert) SetEqualPkgID(v uuid.UUID) *PkgEqualUpsert

SetEqualPkgID sets the "equal_pkg_id" field.

func (*PkgEqualUpsert) SetJustification

func (u *PkgEqualUpsert) SetJustification(v string) *PkgEqualUpsert

SetJustification sets the "justification" field.

func (*PkgEqualUpsert) SetOrigin

func (u *PkgEqualUpsert) SetOrigin(v string) *PkgEqualUpsert

SetOrigin sets the "origin" field.

func (*PkgEqualUpsert) SetPackagesHash

func (u *PkgEqualUpsert) SetPackagesHash(v string) *PkgEqualUpsert

SetPackagesHash sets the "packages_hash" field.

func (*PkgEqualUpsert) SetPkgID added in v0.5.0

func (u *PkgEqualUpsert) SetPkgID(v uuid.UUID) *PkgEqualUpsert

SetPkgID sets the "pkg_id" field.

func (*PkgEqualUpsert) UpdateCollector

func (u *PkgEqualUpsert) UpdateCollector() *PkgEqualUpsert

UpdateCollector sets the "collector" field to the value that was provided on create.

func (*PkgEqualUpsert) UpdateDocumentRef added in v0.6.0

func (u *PkgEqualUpsert) UpdateDocumentRef() *PkgEqualUpsert

UpdateDocumentRef sets the "document_ref" field to the value that was provided on create.

func (*PkgEqualUpsert) UpdateEqualPkgID added in v0.5.0

func (u *PkgEqualUpsert) UpdateEqualPkgID() *PkgEqualUpsert

UpdateEqualPkgID sets the "equal_pkg_id" field to the value that was provided on create.

func (*PkgEqualUpsert) UpdateJustification

func (u *PkgEqualUpsert) UpdateJustification() *PkgEqualUpsert

UpdateJustification sets the "justification" field to the value that was provided on create.

func (*PkgEqualUpsert) UpdateOrigin

func (u *PkgEqualUpsert) UpdateOrigin() *PkgEqualUpsert

UpdateOrigin sets the "origin" field to the value that was provided on create.

func (*PkgEqualUpsert) UpdatePackagesHash

func (u *PkgEqualUpsert) UpdatePackagesHash() *PkgEqualUpsert

UpdatePackagesHash sets the "packages_hash" field to the value that was provided on create.

func (*PkgEqualUpsert) UpdatePkgID added in v0.5.0

func (u *PkgEqualUpsert) UpdatePkgID() *PkgEqualUpsert

UpdatePkgID sets the "pkg_id" field to the value that was provided on create.

type PkgEqualUpsertBulk

type PkgEqualUpsertBulk struct {
	// contains filtered or unexported fields
}

PkgEqualUpsertBulk is the builder for "upsert"-ing a bulk of PkgEqual nodes.

func (*PkgEqualUpsertBulk) DoNothing

func (u *PkgEqualUpsertBulk) DoNothing() *PkgEqualUpsertBulk

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*PkgEqualUpsertBulk) Exec

func (u *PkgEqualUpsertBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*PkgEqualUpsertBulk) ExecX

func (u *PkgEqualUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*PkgEqualUpsertBulk) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.PkgEqual.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*PkgEqualUpsertBulk) SetCollector

func (u *PkgEqualUpsertBulk) SetCollector(v string) *PkgEqualUpsertBulk

SetCollector sets the "collector" field.

func (*PkgEqualUpsertBulk) SetDocumentRef added in v0.6.0

func (u *PkgEqualUpsertBulk) SetDocumentRef(v string) *PkgEqualUpsertBulk

SetDocumentRef sets the "document_ref" field.

func (*PkgEqualUpsertBulk) SetEqualPkgID added in v0.5.0

func (u *PkgEqualUpsertBulk) SetEqualPkgID(v uuid.UUID) *PkgEqualUpsertBulk

SetEqualPkgID sets the "equal_pkg_id" field.

func (*PkgEqualUpsertBulk) SetJustification

func (u *PkgEqualUpsertBulk) SetJustification(v string) *PkgEqualUpsertBulk

SetJustification sets the "justification" field.

func (*PkgEqualUpsertBulk) SetOrigin

func (u *PkgEqualUpsertBulk) SetOrigin(v string) *PkgEqualUpsertBulk

SetOrigin sets the "origin" field.

func (*PkgEqualUpsertBulk) SetPackagesHash

func (u *PkgEqualUpsertBulk) SetPackagesHash(v string) *PkgEqualUpsertBulk

SetPackagesHash sets the "packages_hash" field.

func (*PkgEqualUpsertBulk) SetPkgID added in v0.5.0

SetPkgID sets the "pkg_id" field.

func (*PkgEqualUpsertBulk) Update

func (u *PkgEqualUpsertBulk) Update(set func(*PkgEqualUpsert)) *PkgEqualUpsertBulk

Update allows overriding fields `UPDATE` values. See the PkgEqualCreateBulk.OnConflict documentation for more info.

func (*PkgEqualUpsertBulk) UpdateCollector

func (u *PkgEqualUpsertBulk) UpdateCollector() *PkgEqualUpsertBulk

UpdateCollector sets the "collector" field to the value that was provided on create.

func (*PkgEqualUpsertBulk) UpdateDocumentRef added in v0.6.0

func (u *PkgEqualUpsertBulk) UpdateDocumentRef() *PkgEqualUpsertBulk

UpdateDocumentRef sets the "document_ref" field to the value that was provided on create.

func (*PkgEqualUpsertBulk) UpdateEqualPkgID added in v0.5.0

func (u *PkgEqualUpsertBulk) UpdateEqualPkgID() *PkgEqualUpsertBulk

UpdateEqualPkgID sets the "equal_pkg_id" field to the value that was provided on create.

func (*PkgEqualUpsertBulk) UpdateJustification

func (u *PkgEqualUpsertBulk) UpdateJustification() *PkgEqualUpsertBulk

UpdateJustification sets the "justification" field to the value that was provided on create.

func (*PkgEqualUpsertBulk) UpdateNewValues

func (u *PkgEqualUpsertBulk) UpdateNewValues() *PkgEqualUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.PkgEqual.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(pkgequal.FieldID)
		}),
	).
	Exec(ctx)

func (*PkgEqualUpsertBulk) UpdateOrigin

func (u *PkgEqualUpsertBulk) UpdateOrigin() *PkgEqualUpsertBulk

UpdateOrigin sets the "origin" field to the value that was provided on create.

func (*PkgEqualUpsertBulk) UpdatePackagesHash

func (u *PkgEqualUpsertBulk) UpdatePackagesHash() *PkgEqualUpsertBulk

UpdatePackagesHash sets the "packages_hash" field to the value that was provided on create.

func (*PkgEqualUpsertBulk) UpdatePkgID added in v0.5.0

func (u *PkgEqualUpsertBulk) UpdatePkgID() *PkgEqualUpsertBulk

UpdatePkgID sets the "pkg_id" field to the value that was provided on create.

type PkgEqualUpsertOne

type PkgEqualUpsertOne struct {
	// contains filtered or unexported fields
}

PkgEqualUpsertOne is the builder for "upsert"-ing

one PkgEqual node.

func (*PkgEqualUpsertOne) DoNothing

func (u *PkgEqualUpsertOne) DoNothing() *PkgEqualUpsertOne

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*PkgEqualUpsertOne) Exec

func (u *PkgEqualUpsertOne) Exec(ctx context.Context) error

Exec executes the query.

func (*PkgEqualUpsertOne) ExecX

func (u *PkgEqualUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*PkgEqualUpsertOne) ID

func (u *PkgEqualUpsertOne) ID(ctx context.Context) (id uuid.UUID, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*PkgEqualUpsertOne) IDX

IDX is like ID, but panics if an error occurs.

func (*PkgEqualUpsertOne) Ignore

func (u *PkgEqualUpsertOne) Ignore() *PkgEqualUpsertOne

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.PkgEqual.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*PkgEqualUpsertOne) SetCollector

func (u *PkgEqualUpsertOne) SetCollector(v string) *PkgEqualUpsertOne

SetCollector sets the "collector" field.

func (*PkgEqualUpsertOne) SetDocumentRef added in v0.6.0

func (u *PkgEqualUpsertOne) SetDocumentRef(v string) *PkgEqualUpsertOne

SetDocumentRef sets the "document_ref" field.

func (*PkgEqualUpsertOne) SetEqualPkgID added in v0.5.0

func (u *PkgEqualUpsertOne) SetEqualPkgID(v uuid.UUID) *PkgEqualUpsertOne

SetEqualPkgID sets the "equal_pkg_id" field.

func (*PkgEqualUpsertOne) SetJustification

func (u *PkgEqualUpsertOne) SetJustification(v string) *PkgEqualUpsertOne

SetJustification sets the "justification" field.

func (*PkgEqualUpsertOne) SetOrigin

func (u *PkgEqualUpsertOne) SetOrigin(v string) *PkgEqualUpsertOne

SetOrigin sets the "origin" field.

func (*PkgEqualUpsertOne) SetPackagesHash

func (u *PkgEqualUpsertOne) SetPackagesHash(v string) *PkgEqualUpsertOne

SetPackagesHash sets the "packages_hash" field.

func (*PkgEqualUpsertOne) SetPkgID added in v0.5.0

func (u *PkgEqualUpsertOne) SetPkgID(v uuid.UUID) *PkgEqualUpsertOne

SetPkgID sets the "pkg_id" field.

func (*PkgEqualUpsertOne) Update

func (u *PkgEqualUpsertOne) Update(set func(*PkgEqualUpsert)) *PkgEqualUpsertOne

Update allows overriding fields `UPDATE` values. See the PkgEqualCreate.OnConflict documentation for more info.

func (*PkgEqualUpsertOne) UpdateCollector

func (u *PkgEqualUpsertOne) UpdateCollector() *PkgEqualUpsertOne

UpdateCollector sets the "collector" field to the value that was provided on create.

func (*PkgEqualUpsertOne) UpdateDocumentRef added in v0.6.0

func (u *PkgEqualUpsertOne) UpdateDocumentRef() *PkgEqualUpsertOne

UpdateDocumentRef sets the "document_ref" field to the value that was provided on create.

func (*PkgEqualUpsertOne) UpdateEqualPkgID added in v0.5.0

func (u *PkgEqualUpsertOne) UpdateEqualPkgID() *PkgEqualUpsertOne

UpdateEqualPkgID sets the "equal_pkg_id" field to the value that was provided on create.

func (*PkgEqualUpsertOne) UpdateJustification

func (u *PkgEqualUpsertOne) UpdateJustification() *PkgEqualUpsertOne

UpdateJustification sets the "justification" field to the value that was provided on create.

func (*PkgEqualUpsertOne) UpdateNewValues

func (u *PkgEqualUpsertOne) UpdateNewValues() *PkgEqualUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:

client.PkgEqual.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(pkgequal.FieldID)
		}),
	).
	Exec(ctx)

func (*PkgEqualUpsertOne) UpdateOrigin

func (u *PkgEqualUpsertOne) UpdateOrigin() *PkgEqualUpsertOne

UpdateOrigin sets the "origin" field to the value that was provided on create.

func (*PkgEqualUpsertOne) UpdatePackagesHash

func (u *PkgEqualUpsertOne) UpdatePackagesHash() *PkgEqualUpsertOne

UpdatePackagesHash sets the "packages_hash" field to the value that was provided on create.

func (*PkgEqualUpsertOne) UpdatePkgID added in v0.5.0

func (u *PkgEqualUpsertOne) UpdatePkgID() *PkgEqualUpsertOne

UpdatePkgID sets the "pkg_id" field to the value that was provided on create.

type PkgEquals

type PkgEquals []*PkgEqual

PkgEquals is a parsable slice of PkgEqual.

type PointOfContact added in v0.2.1

type PointOfContact struct {

	// ID of the ent.
	ID uuid.UUID `json:"id,omitempty"`
	// SourceID holds the value of the "source_id" field.
	SourceID *uuid.UUID `json:"source_id,omitempty"`
	// PackageVersionID holds the value of the "package_version_id" field.
	PackageVersionID *uuid.UUID `json:"package_version_id,omitempty"`
	// PackageNameID holds the value of the "package_name_id" field.
	PackageNameID *uuid.UUID `json:"package_name_id,omitempty"`
	// ArtifactID holds the value of the "artifact_id" field.
	ArtifactID *uuid.UUID `json:"artifact_id,omitempty"`
	// Email holds the value of the "email" field.
	Email string `json:"email,omitempty"`
	// Info holds the value of the "info" field.
	Info string `json:"info,omitempty"`
	// Since holds the value of the "since" field.
	Since time.Time `json:"since,omitempty"`
	// Justification holds the value of the "justification" field.
	Justification string `json:"justification,omitempty"`
	// Origin holds the value of the "origin" field.
	Origin string `json:"origin,omitempty"`
	// Collector holds the value of the "collector" field.
	Collector string `json:"collector,omitempty"`
	// DocumentRef holds the value of the "document_ref" field.
	DocumentRef string `json:"document_ref,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the PointOfContactQuery when eager-loading is set.
	Edges PointOfContactEdges `json:"edges"`
	// contains filtered or unexported fields
}

PointOfContact is the model entity for the PointOfContact schema.

func (*PointOfContact) AllVersions added in v0.2.1

func (poc *PointOfContact) AllVersions(ctx context.Context) (*PackageName, error)

func (*PointOfContact) Artifact added in v0.2.1

func (poc *PointOfContact) Artifact(ctx context.Context) (*Artifact, error)

func (*PointOfContact) IsNode added in v0.2.1

func (n *PointOfContact) IsNode()

IsNode implements the Node interface check for GQLGen.

func (*PointOfContact) PackageVersion added in v0.2.1

func (poc *PointOfContact) PackageVersion(ctx context.Context) (*PackageVersion, error)

func (*PointOfContact) QueryAllVersions added in v0.2.1

func (poc *PointOfContact) QueryAllVersions() *PackageNameQuery

QueryAllVersions queries the "all_versions" edge of the PointOfContact entity.

func (*PointOfContact) QueryArtifact added in v0.2.1

func (poc *PointOfContact) QueryArtifact() *ArtifactQuery

QueryArtifact queries the "artifact" edge of the PointOfContact entity.

func (*PointOfContact) QueryPackageVersion added in v0.2.1

func (poc *PointOfContact) QueryPackageVersion() *PackageVersionQuery

QueryPackageVersion queries the "package_version" edge of the PointOfContact entity.

func (*PointOfContact) QuerySource added in v0.2.1

func (poc *PointOfContact) QuerySource() *SourceNameQuery

QuerySource queries the "source" edge of the PointOfContact entity.

func (*PointOfContact) Source added in v0.2.1

func (poc *PointOfContact) Source(ctx context.Context) (*SourceName, error)

func (*PointOfContact) String added in v0.2.1

func (poc *PointOfContact) String() string

String implements the fmt.Stringer.

func (*PointOfContact) ToEdge added in v0.2.1

ToEdge converts PointOfContact into PointOfContactEdge.

func (*PointOfContact) Unwrap added in v0.2.1

func (poc *PointOfContact) Unwrap() *PointOfContact

Unwrap unwraps the PointOfContact entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.

func (*PointOfContact) Update added in v0.2.1

func (poc *PointOfContact) Update() *PointOfContactUpdateOne

Update returns a builder for updating this PointOfContact. Note that you need to call PointOfContact.Unwrap() before calling this method if this PointOfContact was returned from a transaction, and the transaction was committed or rolled back.

func (*PointOfContact) Value added in v0.2.1

func (poc *PointOfContact) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the PointOfContact. This includes values selected through modifiers, order, etc.

type PointOfContactClient added in v0.2.1

type PointOfContactClient struct {
	// contains filtered or unexported fields
}

PointOfContactClient is a client for the PointOfContact schema.

func NewPointOfContactClient added in v0.2.1

func NewPointOfContactClient(c config) *PointOfContactClient

NewPointOfContactClient returns a client for the PointOfContact from the given config.

func (*PointOfContactClient) Create added in v0.2.1

Create returns a builder for creating a PointOfContact entity.

func (*PointOfContactClient) CreateBulk added in v0.2.1

CreateBulk returns a builder for creating a bulk of PointOfContact entities.

func (*PointOfContactClient) Delete added in v0.2.1

Delete returns a delete builder for PointOfContact.

func (*PointOfContactClient) DeleteOne added in v0.2.1

DeleteOne returns a builder for deleting the given entity.

func (*PointOfContactClient) DeleteOneID added in v0.2.1

DeleteOneID returns a builder for deleting the given entity by its id.

func (*PointOfContactClient) Get added in v0.2.1

Get returns a PointOfContact entity by its id.

func (*PointOfContactClient) GetX added in v0.2.1

GetX is like Get, but panics if an error occurs.

func (*PointOfContactClient) Hooks added in v0.2.1

func (c *PointOfContactClient) Hooks() []Hook

Hooks returns the client hooks.

func (*PointOfContactClient) Intercept added in v0.2.1

func (c *PointOfContactClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `pointofcontact.Intercept(f(g(h())))`.

func (*PointOfContactClient) Interceptors added in v0.2.1

func (c *PointOfContactClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*PointOfContactClient) MapCreateBulk added in v0.2.1

func (c *PointOfContactClient) MapCreateBulk(slice any, setFunc func(*PointOfContactCreate, int)) *PointOfContactCreateBulk

MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.

func (*PointOfContactClient) Query added in v0.2.1

Query returns a query builder for PointOfContact.

func (*PointOfContactClient) QueryAllVersions added in v0.2.1

func (c *PointOfContactClient) QueryAllVersions(poc *PointOfContact) *PackageNameQuery

QueryAllVersions queries the all_versions edge of a PointOfContact.

func (*PointOfContactClient) QueryArtifact added in v0.2.1

func (c *PointOfContactClient) QueryArtifact(poc *PointOfContact) *ArtifactQuery

QueryArtifact queries the artifact edge of a PointOfContact.

func (*PointOfContactClient) QueryPackageVersion added in v0.2.1

func (c *PointOfContactClient) QueryPackageVersion(poc *PointOfContact) *PackageVersionQuery

QueryPackageVersion queries the package_version edge of a PointOfContact.

func (*PointOfContactClient) QuerySource added in v0.2.1

func (c *PointOfContactClient) QuerySource(poc *PointOfContact) *SourceNameQuery

QuerySource queries the source edge of a PointOfContact.

func (*PointOfContactClient) Update added in v0.2.1

Update returns an update builder for PointOfContact.

func (*PointOfContactClient) UpdateOne added in v0.2.1

UpdateOne returns an update builder for the given entity.

func (*PointOfContactClient) UpdateOneID added in v0.2.1

UpdateOneID returns an update builder for the given id.

func (*PointOfContactClient) Use added in v0.2.1

func (c *PointOfContactClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `pointofcontact.Hooks(f(g(h())))`.

type PointOfContactConnection added in v0.2.1

type PointOfContactConnection struct {
	Edges      []*PointOfContactEdge `json:"edges"`
	PageInfo   PageInfo              `json:"pageInfo"`
	TotalCount int                   `json:"totalCount"`
}

PointOfContactConnection is the connection containing edges to PointOfContact.

type PointOfContactCreate added in v0.2.1

type PointOfContactCreate struct {
	// contains filtered or unexported fields
}

PointOfContactCreate is the builder for creating a PointOfContact entity.

func (*PointOfContactCreate) Exec added in v0.2.1

func (pocc *PointOfContactCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*PointOfContactCreate) ExecX added in v0.2.1

func (pocc *PointOfContactCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*PointOfContactCreate) Mutation added in v0.2.1

func (pocc *PointOfContactCreate) Mutation() *PointOfContactMutation

Mutation returns the PointOfContactMutation object of the builder.

func (*PointOfContactCreate) OnConflict added in v0.2.1

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.PointOfContact.Create().
	SetSourceID(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.PointOfContactUpsert) {
		SetSourceID(v+v).
	}).
	Exec(ctx)

func (*PointOfContactCreate) OnConflictColumns added in v0.2.1

func (pocc *PointOfContactCreate) OnConflictColumns(columns ...string) *PointOfContactUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.PointOfContact.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*PointOfContactCreate) Save added in v0.2.1

Save creates the PointOfContact in the database.

func (*PointOfContactCreate) SaveX added in v0.2.1

SaveX calls Save and panics if Save returns an error.

func (*PointOfContactCreate) SetAllVersions added in v0.2.1

func (pocc *PointOfContactCreate) SetAllVersions(p *PackageName) *PointOfContactCreate

SetAllVersions sets the "all_versions" edge to the PackageName entity.

func (*PointOfContactCreate) SetAllVersionsID added in v0.2.1

func (pocc *PointOfContactCreate) SetAllVersionsID(id uuid.UUID) *PointOfContactCreate

SetAllVersionsID sets the "all_versions" edge to the PackageName entity by ID.

func (*PointOfContactCreate) SetArtifact added in v0.2.1

func (pocc *PointOfContactCreate) SetArtifact(a *Artifact) *PointOfContactCreate

SetArtifact sets the "artifact" edge to the Artifact entity.

func (*PointOfContactCreate) SetArtifactID added in v0.2.1

func (pocc *PointOfContactCreate) SetArtifactID(u uuid.UUID) *PointOfContactCreate

SetArtifactID sets the "artifact_id" field.

func (*PointOfContactCreate) SetCollector added in v0.2.1

func (pocc *PointOfContactCreate) SetCollector(s string) *PointOfContactCreate

SetCollector sets the "collector" field.

func (*PointOfContactCreate) SetDocumentRef added in v0.6.0

func (pocc *PointOfContactCreate) SetDocumentRef(s string) *PointOfContactCreate

SetDocumentRef sets the "document_ref" field.

func (*PointOfContactCreate) SetEmail added in v0.2.1

SetEmail sets the "email" field.

func (*PointOfContactCreate) SetID added in v0.5.0

SetID sets the "id" field.

func (*PointOfContactCreate) SetInfo added in v0.2.1

SetInfo sets the "info" field.

func (*PointOfContactCreate) SetJustification added in v0.2.1

func (pocc *PointOfContactCreate) SetJustification(s string) *PointOfContactCreate

SetJustification sets the "justification" field.

func (*PointOfContactCreate) SetNillableAllVersionsID added in v0.2.1

func (pocc *PointOfContactCreate) SetNillableAllVersionsID(id *uuid.UUID) *PointOfContactCreate

SetNillableAllVersionsID sets the "all_versions" edge to the PackageName entity by ID if the given value is not nil.

func (*PointOfContactCreate) SetNillableArtifactID added in v0.2.1

func (pocc *PointOfContactCreate) SetNillableArtifactID(u *uuid.UUID) *PointOfContactCreate

SetNillableArtifactID sets the "artifact_id" field if the given value is not nil.

func (*PointOfContactCreate) SetNillableID added in v0.5.0

func (pocc *PointOfContactCreate) SetNillableID(u *uuid.UUID) *PointOfContactCreate

SetNillableID sets the "id" field if the given value is not nil.

func (*PointOfContactCreate) SetNillablePackageNameID added in v0.2.1

func (pocc *PointOfContactCreate) SetNillablePackageNameID(u *uuid.UUID) *PointOfContactCreate

SetNillablePackageNameID sets the "package_name_id" field if the given value is not nil.

func (*PointOfContactCreate) SetNillablePackageVersionID added in v0.2.1

func (pocc *PointOfContactCreate) SetNillablePackageVersionID(u *uuid.UUID) *PointOfContactCreate

SetNillablePackageVersionID sets the "package_version_id" field if the given value is not nil.

func (*PointOfContactCreate) SetNillableSourceID added in v0.2.1

func (pocc *PointOfContactCreate) SetNillableSourceID(u *uuid.UUID) *PointOfContactCreate

SetNillableSourceID sets the "source_id" field if the given value is not nil.

func (*PointOfContactCreate) SetOrigin added in v0.2.1

func (pocc *PointOfContactCreate) SetOrigin(s string) *PointOfContactCreate

SetOrigin sets the "origin" field.

func (*PointOfContactCreate) SetPackageNameID added in v0.2.1

func (pocc *PointOfContactCreate) SetPackageNameID(u uuid.UUID) *PointOfContactCreate

SetPackageNameID sets the "package_name_id" field.

func (*PointOfContactCreate) SetPackageVersion added in v0.2.1

func (pocc *PointOfContactCreate) SetPackageVersion(p *PackageVersion) *PointOfContactCreate

SetPackageVersion sets the "package_version" edge to the PackageVersion entity.

func (*PointOfContactCreate) SetPackageVersionID added in v0.2.1

func (pocc *PointOfContactCreate) SetPackageVersionID(u uuid.UUID) *PointOfContactCreate

SetPackageVersionID sets the "package_version_id" field.

func (*PointOfContactCreate) SetSince added in v0.2.1

SetSince sets the "since" field.

func (*PointOfContactCreate) SetSource added in v0.2.1

SetSource sets the "source" edge to the SourceName entity.

func (*PointOfContactCreate) SetSourceID added in v0.2.1

func (pocc *PointOfContactCreate) SetSourceID(u uuid.UUID) *PointOfContactCreate

SetSourceID sets the "source_id" field.

type PointOfContactCreateBulk added in v0.2.1

type PointOfContactCreateBulk struct {
	// contains filtered or unexported fields
}

PointOfContactCreateBulk is the builder for creating many PointOfContact entities in bulk.

func (*PointOfContactCreateBulk) Exec added in v0.2.1

func (poccb *PointOfContactCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*PointOfContactCreateBulk) ExecX added in v0.2.1

func (poccb *PointOfContactCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*PointOfContactCreateBulk) OnConflict added in v0.2.1

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.PointOfContact.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.PointOfContactUpsert) {
		SetSourceID(v+v).
	}).
	Exec(ctx)

func (*PointOfContactCreateBulk) OnConflictColumns added in v0.2.1

func (poccb *PointOfContactCreateBulk) OnConflictColumns(columns ...string) *PointOfContactUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.PointOfContact.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*PointOfContactCreateBulk) Save added in v0.2.1

Save creates the PointOfContact entities in the database.

func (*PointOfContactCreateBulk) SaveX added in v0.2.1

SaveX is like Save, but panics if an error occurs.

type PointOfContactDelete added in v0.2.1

type PointOfContactDelete struct {
	// contains filtered or unexported fields
}

PointOfContactDelete is the builder for deleting a PointOfContact entity.

func (*PointOfContactDelete) Exec added in v0.2.1

func (pocd *PointOfContactDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*PointOfContactDelete) ExecX added in v0.2.1

func (pocd *PointOfContactDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*PointOfContactDelete) Where added in v0.2.1

Where appends a list predicates to the PointOfContactDelete builder.

type PointOfContactDeleteOne added in v0.2.1

type PointOfContactDeleteOne struct {
	// contains filtered or unexported fields
}

PointOfContactDeleteOne is the builder for deleting a single PointOfContact entity.

func (*PointOfContactDeleteOne) Exec added in v0.2.1

func (pocdo *PointOfContactDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*PointOfContactDeleteOne) ExecX added in v0.2.1

func (pocdo *PointOfContactDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*PointOfContactDeleteOne) Where added in v0.2.1

Where appends a list predicates to the PointOfContactDelete builder.

type PointOfContactEdge added in v0.2.1

type PointOfContactEdge struct {
	Node   *PointOfContact `json:"node"`
	Cursor Cursor          `json:"cursor"`
}

PointOfContactEdge is the edge representation of PointOfContact.

type PointOfContactEdges added in v0.2.1

type PointOfContactEdges struct {
	// Source holds the value of the source edge.
	Source *SourceName `json:"source,omitempty"`
	// PackageVersion holds the value of the package_version edge.
	PackageVersion *PackageVersion `json:"package_version,omitempty"`
	// AllVersions holds the value of the all_versions edge.
	AllVersions *PackageName `json:"all_versions,omitempty"`
	// Artifact holds the value of the artifact edge.
	Artifact *Artifact `json:"artifact,omitempty"`
	// contains filtered or unexported fields
}

PointOfContactEdges holds the relations/edges for other nodes in the graph.

func (PointOfContactEdges) AllVersionsOrErr added in v0.2.1

func (e PointOfContactEdges) AllVersionsOrErr() (*PackageName, error)

AllVersionsOrErr returns the AllVersions value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (PointOfContactEdges) ArtifactOrErr added in v0.2.1

func (e PointOfContactEdges) ArtifactOrErr() (*Artifact, error)

ArtifactOrErr returns the Artifact value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (PointOfContactEdges) PackageVersionOrErr added in v0.2.1

func (e PointOfContactEdges) PackageVersionOrErr() (*PackageVersion, error)

PackageVersionOrErr returns the PackageVersion value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (PointOfContactEdges) SourceOrErr added in v0.2.1

func (e PointOfContactEdges) SourceOrErr() (*SourceName, error)

SourceOrErr returns the Source value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type PointOfContactGroupBy added in v0.2.1

type PointOfContactGroupBy struct {
	// contains filtered or unexported fields
}

PointOfContactGroupBy is the group-by builder for PointOfContact entities.

func (*PointOfContactGroupBy) Aggregate added in v0.2.1

func (pocgb *PointOfContactGroupBy) Aggregate(fns ...AggregateFunc) *PointOfContactGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*PointOfContactGroupBy) Bool added in v0.2.1

func (s *PointOfContactGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*PointOfContactGroupBy) BoolX added in v0.2.1

func (s *PointOfContactGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*PointOfContactGroupBy) Bools added in v0.2.1

func (s *PointOfContactGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*PointOfContactGroupBy) BoolsX added in v0.2.1

func (s *PointOfContactGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*PointOfContactGroupBy) Float64 added in v0.2.1

func (s *PointOfContactGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*PointOfContactGroupBy) Float64X added in v0.2.1

func (s *PointOfContactGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*PointOfContactGroupBy) Float64s added in v0.2.1

func (s *PointOfContactGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*PointOfContactGroupBy) Float64sX added in v0.2.1

func (s *PointOfContactGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*PointOfContactGroupBy) Int added in v0.2.1

func (s *PointOfContactGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*PointOfContactGroupBy) IntX added in v0.2.1

func (s *PointOfContactGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*PointOfContactGroupBy) Ints added in v0.2.1

func (s *PointOfContactGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*PointOfContactGroupBy) IntsX added in v0.2.1

func (s *PointOfContactGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*PointOfContactGroupBy) Scan added in v0.2.1

func (pocgb *PointOfContactGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*PointOfContactGroupBy) ScanX added in v0.2.1

func (s *PointOfContactGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*PointOfContactGroupBy) String added in v0.2.1

func (s *PointOfContactGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*PointOfContactGroupBy) StringX added in v0.2.1

func (s *PointOfContactGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*PointOfContactGroupBy) Strings added in v0.2.1

func (s *PointOfContactGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*PointOfContactGroupBy) StringsX added in v0.2.1

func (s *PointOfContactGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type PointOfContactMutation added in v0.2.1

type PointOfContactMutation struct {
	// contains filtered or unexported fields
}

PointOfContactMutation represents an operation that mutates the PointOfContact nodes in the graph.

func (*PointOfContactMutation) AddField added in v0.2.1

func (m *PointOfContactMutation) AddField(name string, value ent.Value) error

AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*PointOfContactMutation) AddedEdges added in v0.2.1

func (m *PointOfContactMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*PointOfContactMutation) AddedField added in v0.2.1

func (m *PointOfContactMutation) AddedField(name string) (ent.Value, bool)

AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*PointOfContactMutation) AddedFields added in v0.2.1

func (m *PointOfContactMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*PointOfContactMutation) AddedIDs added in v0.2.1

func (m *PointOfContactMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*PointOfContactMutation) AllVersionsCleared added in v0.2.1

func (m *PointOfContactMutation) AllVersionsCleared() bool

AllVersionsCleared reports if the "all_versions" edge to the PackageName entity was cleared.

func (*PointOfContactMutation) AllVersionsID added in v0.2.1

func (m *PointOfContactMutation) AllVersionsID() (id uuid.UUID, exists bool)

AllVersionsID returns the "all_versions" edge ID in the mutation.

func (*PointOfContactMutation) AllVersionsIDs added in v0.2.1

func (m *PointOfContactMutation) AllVersionsIDs() (ids []uuid.UUID)

AllVersionsIDs returns the "all_versions" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use AllVersionsID instead. It exists only for internal usage by the builders.

func (*PointOfContactMutation) ArtifactCleared added in v0.2.1

func (m *PointOfContactMutation) ArtifactCleared() bool

ArtifactCleared reports if the "artifact" edge to the Artifact entity was cleared.

func (*PointOfContactMutation) ArtifactID added in v0.2.1

func (m *PointOfContactMutation) ArtifactID() (r uuid.UUID, exists bool)

ArtifactID returns the value of the "artifact_id" field in the mutation.

func (*PointOfContactMutation) ArtifactIDCleared added in v0.2.1

func (m *PointOfContactMutation) ArtifactIDCleared() bool

ArtifactIDCleared returns if the "artifact_id" field was cleared in this mutation.

func (*PointOfContactMutation) ArtifactIDs added in v0.2.1

func (m *PointOfContactMutation) ArtifactIDs() (ids []uuid.UUID)

ArtifactIDs returns the "artifact" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use ArtifactID instead. It exists only for internal usage by the builders.

func (*PointOfContactMutation) ClearAllVersions added in v0.2.1

func (m *PointOfContactMutation) ClearAllVersions()

ClearAllVersions clears the "all_versions" edge to the PackageName entity.

func (*PointOfContactMutation) ClearArtifact added in v0.2.1

func (m *PointOfContactMutation) ClearArtifact()

ClearArtifact clears the "artifact" edge to the Artifact entity.

func (*PointOfContactMutation) ClearArtifactID added in v0.2.1

func (m *PointOfContactMutation) ClearArtifactID()

ClearArtifactID clears the value of the "artifact_id" field.

func (*PointOfContactMutation) ClearEdge added in v0.2.1

func (m *PointOfContactMutation) ClearEdge(name string) error

ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.

func (*PointOfContactMutation) ClearField added in v0.2.1

func (m *PointOfContactMutation) ClearField(name string) error

ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.

func (*PointOfContactMutation) ClearPackageNameID added in v0.2.1

func (m *PointOfContactMutation) ClearPackageNameID()

ClearPackageNameID clears the value of the "package_name_id" field.

func (*PointOfContactMutation) ClearPackageVersion added in v0.2.1

func (m *PointOfContactMutation) ClearPackageVersion()

ClearPackageVersion clears the "package_version" edge to the PackageVersion entity.

func (*PointOfContactMutation) ClearPackageVersionID added in v0.2.1

func (m *PointOfContactMutation) ClearPackageVersionID()

ClearPackageVersionID clears the value of the "package_version_id" field.

func (*PointOfContactMutation) ClearSource added in v0.2.1

func (m *PointOfContactMutation) ClearSource()

ClearSource clears the "source" edge to the SourceName entity.

func (*PointOfContactMutation) ClearSourceID added in v0.2.1

func (m *PointOfContactMutation) ClearSourceID()

ClearSourceID clears the value of the "source_id" field.

func (*PointOfContactMutation) ClearedEdges added in v0.2.1

func (m *PointOfContactMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*PointOfContactMutation) ClearedFields added in v0.2.1

func (m *PointOfContactMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (PointOfContactMutation) Client added in v0.2.1

func (m PointOfContactMutation) Client() *Client

Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.

func (*PointOfContactMutation) Collector added in v0.2.1

func (m *PointOfContactMutation) Collector() (r string, exists bool)

Collector returns the value of the "collector" field in the mutation.

func (*PointOfContactMutation) DocumentRef added in v0.6.0

func (m *PointOfContactMutation) DocumentRef() (r string, exists bool)

DocumentRef returns the value of the "document_ref" field in the mutation.

func (*PointOfContactMutation) EdgeCleared added in v0.2.1

func (m *PointOfContactMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*PointOfContactMutation) Email added in v0.2.1

func (m *PointOfContactMutation) Email() (r string, exists bool)

Email returns the value of the "email" field in the mutation.

func (*PointOfContactMutation) Field added in v0.2.1

func (m *PointOfContactMutation) Field(name string) (ent.Value, bool)

Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*PointOfContactMutation) FieldCleared added in v0.2.1

func (m *PointOfContactMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*PointOfContactMutation) Fields added in v0.2.1

func (m *PointOfContactMutation) Fields() []string

Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().

func (*PointOfContactMutation) ID added in v0.2.1

func (m *PointOfContactMutation) ID() (id uuid.UUID, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*PointOfContactMutation) IDs added in v0.2.1

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*PointOfContactMutation) Info added in v0.2.1

func (m *PointOfContactMutation) Info() (r string, exists bool)

Info returns the value of the "info" field in the mutation.

func (*PointOfContactMutation) Justification added in v0.2.1

func (m *PointOfContactMutation) Justification() (r string, exists bool)

Justification returns the value of the "justification" field in the mutation.

func (*PointOfContactMutation) OldArtifactID added in v0.2.1

func (m *PointOfContactMutation) OldArtifactID(ctx context.Context) (v *uuid.UUID, err error)

OldArtifactID returns the old "artifact_id" field's value of the PointOfContact entity. If the PointOfContact object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*PointOfContactMutation) OldCollector added in v0.2.1

func (m *PointOfContactMutation) OldCollector(ctx context.Context) (v string, err error)

OldCollector returns the old "collector" field's value of the PointOfContact entity. If the PointOfContact object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*PointOfContactMutation) OldDocumentRef added in v0.6.0

func (m *PointOfContactMutation) OldDocumentRef(ctx context.Context) (v string, err error)

OldDocumentRef returns the old "document_ref" field's value of the PointOfContact entity. If the PointOfContact object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*PointOfContactMutation) OldEmail added in v0.2.1

func (m *PointOfContactMutation) OldEmail(ctx context.Context) (v string, err error)

OldEmail returns the old "email" field's value of the PointOfContact entity. If the PointOfContact object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*PointOfContactMutation) OldField added in v0.2.1

func (m *PointOfContactMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*PointOfContactMutation) OldInfo added in v0.2.1

func (m *PointOfContactMutation) OldInfo(ctx context.Context) (v string, err error)

OldInfo returns the old "info" field's value of the PointOfContact entity. If the PointOfContact object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*PointOfContactMutation) OldJustification added in v0.2.1

func (m *PointOfContactMutation) OldJustification(ctx context.Context) (v string, err error)

OldJustification returns the old "justification" field's value of the PointOfContact entity. If the PointOfContact object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*PointOfContactMutation) OldOrigin added in v0.2.1

func (m *PointOfContactMutation) OldOrigin(ctx context.Context) (v string, err error)

OldOrigin returns the old "origin" field's value of the PointOfContact entity. If the PointOfContact object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*PointOfContactMutation) OldPackageNameID added in v0.2.1

func (m *PointOfContactMutation) OldPackageNameID(ctx context.Context) (v *uuid.UUID, err error)

OldPackageNameID returns the old "package_name_id" field's value of the PointOfContact entity. If the PointOfContact object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*PointOfContactMutation) OldPackageVersionID added in v0.2.1

func (m *PointOfContactMutation) OldPackageVersionID(ctx context.Context) (v *uuid.UUID, err error)

OldPackageVersionID returns the old "package_version_id" field's value of the PointOfContact entity. If the PointOfContact object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*PointOfContactMutation) OldSince added in v0.2.1

func (m *PointOfContactMutation) OldSince(ctx context.Context) (v time.Time, err error)

OldSince returns the old "since" field's value of the PointOfContact entity. If the PointOfContact object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*PointOfContactMutation) OldSourceID added in v0.2.1

func (m *PointOfContactMutation) OldSourceID(ctx context.Context) (v *uuid.UUID, err error)

OldSourceID returns the old "source_id" field's value of the PointOfContact entity. If the PointOfContact object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*PointOfContactMutation) Op added in v0.2.1

func (m *PointOfContactMutation) Op() Op

Op returns the operation name.

func (*PointOfContactMutation) Origin added in v0.2.1

func (m *PointOfContactMutation) Origin() (r string, exists bool)

Origin returns the value of the "origin" field in the mutation.

func (*PointOfContactMutation) PackageNameID added in v0.2.1

func (m *PointOfContactMutation) PackageNameID() (r uuid.UUID, exists bool)

PackageNameID returns the value of the "package_name_id" field in the mutation.

func (*PointOfContactMutation) PackageNameIDCleared added in v0.2.1

func (m *PointOfContactMutation) PackageNameIDCleared() bool

PackageNameIDCleared returns if the "package_name_id" field was cleared in this mutation.

func (*PointOfContactMutation) PackageVersionCleared added in v0.2.1

func (m *PointOfContactMutation) PackageVersionCleared() bool

PackageVersionCleared reports if the "package_version" edge to the PackageVersion entity was cleared.

func (*PointOfContactMutation) PackageVersionID added in v0.2.1

func (m *PointOfContactMutation) PackageVersionID() (r uuid.UUID, exists bool)

PackageVersionID returns the value of the "package_version_id" field in the mutation.

func (*PointOfContactMutation) PackageVersionIDCleared added in v0.2.1

func (m *PointOfContactMutation) PackageVersionIDCleared() bool

PackageVersionIDCleared returns if the "package_version_id" field was cleared in this mutation.

func (*PointOfContactMutation) PackageVersionIDs added in v0.2.1

func (m *PointOfContactMutation) PackageVersionIDs() (ids []uuid.UUID)

PackageVersionIDs returns the "package_version" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use PackageVersionID instead. It exists only for internal usage by the builders.

func (*PointOfContactMutation) RemovedEdges added in v0.2.1

func (m *PointOfContactMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*PointOfContactMutation) RemovedIDs added in v0.2.1

func (m *PointOfContactMutation) RemovedIDs(name string) []ent.Value

RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.

func (*PointOfContactMutation) ResetAllVersions added in v0.2.1

func (m *PointOfContactMutation) ResetAllVersions()

ResetAllVersions resets all changes to the "all_versions" edge.

func (*PointOfContactMutation) ResetArtifact added in v0.2.1

func (m *PointOfContactMutation) ResetArtifact()

ResetArtifact resets all changes to the "artifact" edge.

func (*PointOfContactMutation) ResetArtifactID added in v0.2.1

func (m *PointOfContactMutation) ResetArtifactID()

ResetArtifactID resets all changes to the "artifact_id" field.

func (*PointOfContactMutation) ResetCollector added in v0.2.1

func (m *PointOfContactMutation) ResetCollector()

ResetCollector resets all changes to the "collector" field.

func (*PointOfContactMutation) ResetDocumentRef added in v0.6.0

func (m *PointOfContactMutation) ResetDocumentRef()

ResetDocumentRef resets all changes to the "document_ref" field.

func (*PointOfContactMutation) ResetEdge added in v0.2.1

func (m *PointOfContactMutation) ResetEdge(name string) error

ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.

func (*PointOfContactMutation) ResetEmail added in v0.2.1

func (m *PointOfContactMutation) ResetEmail()

ResetEmail resets all changes to the "email" field.

func (*PointOfContactMutation) ResetField added in v0.2.1

func (m *PointOfContactMutation) ResetField(name string) error

ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.

func (*PointOfContactMutation) ResetInfo added in v0.2.1

func (m *PointOfContactMutation) ResetInfo()

ResetInfo resets all changes to the "info" field.

func (*PointOfContactMutation) ResetJustification added in v0.2.1

func (m *PointOfContactMutation) ResetJustification()

ResetJustification resets all changes to the "justification" field.

func (*PointOfContactMutation) ResetOrigin added in v0.2.1

func (m *PointOfContactMutation) ResetOrigin()

ResetOrigin resets all changes to the "origin" field.

func (*PointOfContactMutation) ResetPackageNameID added in v0.2.1

func (m *PointOfContactMutation) ResetPackageNameID()

ResetPackageNameID resets all changes to the "package_name_id" field.

func (*PointOfContactMutation) ResetPackageVersion added in v0.2.1

func (m *PointOfContactMutation) ResetPackageVersion()

ResetPackageVersion resets all changes to the "package_version" edge.

func (*PointOfContactMutation) ResetPackageVersionID added in v0.2.1

func (m *PointOfContactMutation) ResetPackageVersionID()

ResetPackageVersionID resets all changes to the "package_version_id" field.

func (*PointOfContactMutation) ResetSince added in v0.2.1

func (m *PointOfContactMutation) ResetSince()

ResetSince resets all changes to the "since" field.

func (*PointOfContactMutation) ResetSource added in v0.2.1

func (m *PointOfContactMutation) ResetSource()

ResetSource resets all changes to the "source" edge.

func (*PointOfContactMutation) ResetSourceID added in v0.2.1

func (m *PointOfContactMutation) ResetSourceID()

ResetSourceID resets all changes to the "source_id" field.

func (*PointOfContactMutation) SetAllVersionsID added in v0.2.1

func (m *PointOfContactMutation) SetAllVersionsID(id uuid.UUID)

SetAllVersionsID sets the "all_versions" edge to the PackageName entity by id.

func (*PointOfContactMutation) SetArtifactID added in v0.2.1

func (m *PointOfContactMutation) SetArtifactID(u uuid.UUID)

SetArtifactID sets the "artifact_id" field.

func (*PointOfContactMutation) SetCollector added in v0.2.1

func (m *PointOfContactMutation) SetCollector(s string)

SetCollector sets the "collector" field.

func (*PointOfContactMutation) SetDocumentRef added in v0.6.0

func (m *PointOfContactMutation) SetDocumentRef(s string)

SetDocumentRef sets the "document_ref" field.

func (*PointOfContactMutation) SetEmail added in v0.2.1

func (m *PointOfContactMutation) SetEmail(s string)

SetEmail sets the "email" field.

func (*PointOfContactMutation) SetField added in v0.2.1

func (m *PointOfContactMutation) SetField(name string, value ent.Value) error

SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*PointOfContactMutation) SetID added in v0.5.0

func (m *PointOfContactMutation) SetID(id uuid.UUID)

SetID sets the value of the id field. Note that this operation is only accepted on creation of PointOfContact entities.

func (*PointOfContactMutation) SetInfo added in v0.2.1

func (m *PointOfContactMutation) SetInfo(s string)

SetInfo sets the "info" field.

func (*PointOfContactMutation) SetJustification added in v0.2.1

func (m *PointOfContactMutation) SetJustification(s string)

SetJustification sets the "justification" field.

func (*PointOfContactMutation) SetOp added in v0.2.1

func (m *PointOfContactMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*PointOfContactMutation) SetOrigin added in v0.2.1

func (m *PointOfContactMutation) SetOrigin(s string)

SetOrigin sets the "origin" field.

func (*PointOfContactMutation) SetPackageNameID added in v0.2.1

func (m *PointOfContactMutation) SetPackageNameID(u uuid.UUID)

SetPackageNameID sets the "package_name_id" field.

func (*PointOfContactMutation) SetPackageVersionID added in v0.2.1

func (m *PointOfContactMutation) SetPackageVersionID(u uuid.UUID)

SetPackageVersionID sets the "package_version_id" field.

func (*PointOfContactMutation) SetSince added in v0.2.1

func (m *PointOfContactMutation) SetSince(t time.Time)

SetSince sets the "since" field.

func (*PointOfContactMutation) SetSourceID added in v0.2.1

func (m *PointOfContactMutation) SetSourceID(u uuid.UUID)

SetSourceID sets the "source_id" field.

func (*PointOfContactMutation) Since added in v0.2.1

func (m *PointOfContactMutation) Since() (r time.Time, exists bool)

Since returns the value of the "since" field in the mutation.

func (*PointOfContactMutation) SourceCleared added in v0.2.1

func (m *PointOfContactMutation) SourceCleared() bool

SourceCleared reports if the "source" edge to the SourceName entity was cleared.

func (*PointOfContactMutation) SourceID added in v0.2.1

func (m *PointOfContactMutation) SourceID() (r uuid.UUID, exists bool)

SourceID returns the value of the "source_id" field in the mutation.

func (*PointOfContactMutation) SourceIDCleared added in v0.2.1

func (m *PointOfContactMutation) SourceIDCleared() bool

SourceIDCleared returns if the "source_id" field was cleared in this mutation.

func (*PointOfContactMutation) SourceIDs added in v0.2.1

func (m *PointOfContactMutation) SourceIDs() (ids []uuid.UUID)

SourceIDs returns the "source" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use SourceID instead. It exists only for internal usage by the builders.

func (PointOfContactMutation) Tx added in v0.2.1

func (m PointOfContactMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*PointOfContactMutation) Type added in v0.2.1

func (m *PointOfContactMutation) Type() string

Type returns the node type of this mutation (PointOfContact).

func (*PointOfContactMutation) Where added in v0.2.1

Where appends a list predicates to the PointOfContactMutation builder.

func (*PointOfContactMutation) WhereP added in v0.2.1

func (m *PointOfContactMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the PointOfContactMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type PointOfContactOrder added in v0.2.1

type PointOfContactOrder struct {
	Direction OrderDirection            `json:"direction"`
	Field     *PointOfContactOrderField `json:"field"`
}

PointOfContactOrder defines the ordering of PointOfContact.

type PointOfContactOrderField added in v0.2.1

type PointOfContactOrderField struct {
	// Value extracts the ordering value from the given PointOfContact.
	Value func(*PointOfContact) (ent.Value, error)
	// contains filtered or unexported fields
}

PointOfContactOrderField defines the ordering field of PointOfContact.

type PointOfContactPaginateOption added in v0.2.1

type PointOfContactPaginateOption func(*pointofcontactPager) error

PointOfContactPaginateOption enables pagination customization.

func WithPointOfContactFilter added in v0.2.1

func WithPointOfContactFilter(filter func(*PointOfContactQuery) (*PointOfContactQuery, error)) PointOfContactPaginateOption

WithPointOfContactFilter configures pagination filter.

func WithPointOfContactOrder added in v0.2.1

func WithPointOfContactOrder(order *PointOfContactOrder) PointOfContactPaginateOption

WithPointOfContactOrder configures pagination ordering.

type PointOfContactQuery added in v0.2.1

type PointOfContactQuery struct {
	// contains filtered or unexported fields
}

PointOfContactQuery is the builder for querying PointOfContact entities.

func (*PointOfContactQuery) Aggregate added in v0.2.1

func (pocq *PointOfContactQuery) Aggregate(fns ...AggregateFunc) *PointOfContactSelect

Aggregate returns a PointOfContactSelect configured with the given aggregations.

func (*PointOfContactQuery) All added in v0.2.1

All executes the query and returns a list of PointOfContacts.

func (*PointOfContactQuery) AllX added in v0.2.1

AllX is like All, but panics if an error occurs.

func (*PointOfContactQuery) Clone added in v0.2.1

Clone returns a duplicate of the PointOfContactQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*PointOfContactQuery) CollectFields added in v0.2.1

func (poc *PointOfContactQuery) CollectFields(ctx context.Context, satisfies ...string) (*PointOfContactQuery, error)

CollectFields tells the query-builder to eagerly load connected nodes by resolver context.

func (*PointOfContactQuery) Count added in v0.2.1

func (pocq *PointOfContactQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*PointOfContactQuery) CountX added in v0.2.1

func (pocq *PointOfContactQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*PointOfContactQuery) Exist added in v0.2.1

func (pocq *PointOfContactQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*PointOfContactQuery) ExistX added in v0.2.1

func (pocq *PointOfContactQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*PointOfContactQuery) First added in v0.2.1

First returns the first PointOfContact entity from the query. Returns a *NotFoundError when no PointOfContact was found.

func (*PointOfContactQuery) FirstID added in v0.2.1

func (pocq *PointOfContactQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)

FirstID returns the first PointOfContact ID from the query. Returns a *NotFoundError when no PointOfContact ID was found.

func (*PointOfContactQuery) FirstIDX added in v0.2.1

func (pocq *PointOfContactQuery) FirstIDX(ctx context.Context) uuid.UUID

FirstIDX is like FirstID, but panics if an error occurs.

func (*PointOfContactQuery) FirstX added in v0.2.1

FirstX is like First, but panics if an error occurs.

func (*PointOfContactQuery) GroupBy added in v0.2.1

func (pocq *PointOfContactQuery) GroupBy(field string, fields ...string) *PointOfContactGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	SourceID uuid.UUID `json:"source_id,omitempty"`
	Count int `json:"count,omitempty"`
}

client.PointOfContact.Query().
	GroupBy(pointofcontact.FieldSourceID).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*PointOfContactQuery) IDs added in v0.2.1

func (pocq *PointOfContactQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)

IDs executes the query and returns a list of PointOfContact IDs.

func (*PointOfContactQuery) IDsX added in v0.2.1

func (pocq *PointOfContactQuery) IDsX(ctx context.Context) []uuid.UUID

IDsX is like IDs, but panics if an error occurs.

func (*PointOfContactQuery) Limit added in v0.2.1

func (pocq *PointOfContactQuery) Limit(limit int) *PointOfContactQuery

Limit the number of records to be returned by this query.

func (*PointOfContactQuery) Offset added in v0.2.1

func (pocq *PointOfContactQuery) Offset(offset int) *PointOfContactQuery

Offset to start from.

func (*PointOfContactQuery) Only added in v0.2.1

Only returns a single PointOfContact entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one PointOfContact entity is found. Returns a *NotFoundError when no PointOfContact entities are found.

func (*PointOfContactQuery) OnlyID added in v0.2.1

func (pocq *PointOfContactQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)

OnlyID is like Only, but returns the only PointOfContact ID in the query. Returns a *NotSingularError when more than one PointOfContact ID is found. Returns a *NotFoundError when no entities are found.

func (*PointOfContactQuery) OnlyIDX added in v0.2.1

func (pocq *PointOfContactQuery) OnlyIDX(ctx context.Context) uuid.UUID

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*PointOfContactQuery) OnlyX added in v0.2.1

OnlyX is like Only, but panics if an error occurs.

func (*PointOfContactQuery) Order added in v0.2.1

Order specifies how the records should be ordered.

func (*PointOfContactQuery) Paginate added in v0.2.1

func (poc *PointOfContactQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...PointOfContactPaginateOption,
) (*PointOfContactConnection, error)

Paginate executes the query and returns a relay based cursor connection to PointOfContact.

func (*PointOfContactQuery) QueryAllVersions added in v0.2.1

func (pocq *PointOfContactQuery) QueryAllVersions() *PackageNameQuery

QueryAllVersions chains the current query on the "all_versions" edge.

func (*PointOfContactQuery) QueryArtifact added in v0.2.1

func (pocq *PointOfContactQuery) QueryArtifact() *ArtifactQuery

QueryArtifact chains the current query on the "artifact" edge.

func (*PointOfContactQuery) QueryPackageVersion added in v0.2.1

func (pocq *PointOfContactQuery) QueryPackageVersion() *PackageVersionQuery

QueryPackageVersion chains the current query on the "package_version" edge.

func (*PointOfContactQuery) QuerySource added in v0.2.1

func (pocq *PointOfContactQuery) QuerySource() *SourceNameQuery

QuerySource chains the current query on the "source" edge.

func (*PointOfContactQuery) Select added in v0.2.1

func (pocq *PointOfContactQuery) Select(fields ...string) *PointOfContactSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	SourceID uuid.UUID `json:"source_id,omitempty"`
}

client.PointOfContact.Query().
	Select(pointofcontact.FieldSourceID).
	Scan(ctx, &v)

func (*PointOfContactQuery) Unique added in v0.2.1

func (pocq *PointOfContactQuery) Unique(unique bool) *PointOfContactQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*PointOfContactQuery) Where added in v0.2.1

Where adds a new predicate for the PointOfContactQuery builder.

func (*PointOfContactQuery) WithAllVersions added in v0.2.1

func (pocq *PointOfContactQuery) WithAllVersions(opts ...func(*PackageNameQuery)) *PointOfContactQuery

WithAllVersions tells the query-builder to eager-load the nodes that are connected to the "all_versions" edge. The optional arguments are used to configure the query builder of the edge.

func (*PointOfContactQuery) WithArtifact added in v0.2.1

func (pocq *PointOfContactQuery) WithArtifact(opts ...func(*ArtifactQuery)) *PointOfContactQuery

WithArtifact tells the query-builder to eager-load the nodes that are connected to the "artifact" edge. The optional arguments are used to configure the query builder of the edge.

func (*PointOfContactQuery) WithPackageVersion added in v0.2.1

func (pocq *PointOfContactQuery) WithPackageVersion(opts ...func(*PackageVersionQuery)) *PointOfContactQuery

WithPackageVersion tells the query-builder to eager-load the nodes that are connected to the "package_version" edge. The optional arguments are used to configure the query builder of the edge.

func (*PointOfContactQuery) WithSource added in v0.2.1

func (pocq *PointOfContactQuery) WithSource(opts ...func(*SourceNameQuery)) *PointOfContactQuery

WithSource tells the query-builder to eager-load the nodes that are connected to the "source" edge. The optional arguments are used to configure the query builder of the edge.

type PointOfContactSelect added in v0.2.1

type PointOfContactSelect struct {
	*PointOfContactQuery
	// contains filtered or unexported fields
}

PointOfContactSelect is the builder for selecting fields of PointOfContact entities.

func (*PointOfContactSelect) Aggregate added in v0.2.1

func (pocs *PointOfContactSelect) Aggregate(fns ...AggregateFunc) *PointOfContactSelect

Aggregate adds the given aggregation functions to the selector query.

func (*PointOfContactSelect) Bool added in v0.2.1

func (s *PointOfContactSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*PointOfContactSelect) BoolX added in v0.2.1

func (s *PointOfContactSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*PointOfContactSelect) Bools added in v0.2.1

func (s *PointOfContactSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*PointOfContactSelect) BoolsX added in v0.2.1

func (s *PointOfContactSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*PointOfContactSelect) Float64 added in v0.2.1

func (s *PointOfContactSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*PointOfContactSelect) Float64X added in v0.2.1

func (s *PointOfContactSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*PointOfContactSelect) Float64s added in v0.2.1

func (s *PointOfContactSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*PointOfContactSelect) Float64sX added in v0.2.1

func (s *PointOfContactSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*PointOfContactSelect) Int added in v0.2.1

func (s *PointOfContactSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*PointOfContactSelect) IntX added in v0.2.1

func (s *PointOfContactSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*PointOfContactSelect) Ints added in v0.2.1

func (s *PointOfContactSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*PointOfContactSelect) IntsX added in v0.2.1

func (s *PointOfContactSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*PointOfContactSelect) Scan added in v0.2.1

func (pocs *PointOfContactSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*PointOfContactSelect) ScanX added in v0.2.1

func (s *PointOfContactSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*PointOfContactSelect) String added in v0.2.1

func (s *PointOfContactSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*PointOfContactSelect) StringX added in v0.2.1

func (s *PointOfContactSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*PointOfContactSelect) Strings added in v0.2.1

func (s *PointOfContactSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*PointOfContactSelect) StringsX added in v0.2.1

func (s *PointOfContactSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type PointOfContactUpdate added in v0.2.1

type PointOfContactUpdate struct {
	// contains filtered or unexported fields
}

PointOfContactUpdate is the builder for updating PointOfContact entities.

func (*PointOfContactUpdate) ClearAllVersions added in v0.2.1

func (pocu *PointOfContactUpdate) ClearAllVersions() *PointOfContactUpdate

ClearAllVersions clears the "all_versions" edge to the PackageName entity.

func (*PointOfContactUpdate) ClearArtifact added in v0.2.1

func (pocu *PointOfContactUpdate) ClearArtifact() *PointOfContactUpdate

ClearArtifact clears the "artifact" edge to the Artifact entity.

func (*PointOfContactUpdate) ClearArtifactID added in v0.2.1

func (pocu *PointOfContactUpdate) ClearArtifactID() *PointOfContactUpdate

ClearArtifactID clears the value of the "artifact_id" field.

func (*PointOfContactUpdate) ClearPackageNameID added in v0.2.1

func (pocu *PointOfContactUpdate) ClearPackageNameID() *PointOfContactUpdate

ClearPackageNameID clears the value of the "package_name_id" field.

func (*PointOfContactUpdate) ClearPackageVersion added in v0.2.1

func (pocu *PointOfContactUpdate) ClearPackageVersion() *PointOfContactUpdate

ClearPackageVersion clears the "package_version" edge to the PackageVersion entity.

func (*PointOfContactUpdate) ClearPackageVersionID added in v0.2.1

func (pocu *PointOfContactUpdate) ClearPackageVersionID() *PointOfContactUpdate

ClearPackageVersionID clears the value of the "package_version_id" field.

func (*PointOfContactUpdate) ClearSource added in v0.2.1

func (pocu *PointOfContactUpdate) ClearSource() *PointOfContactUpdate

ClearSource clears the "source" edge to the SourceName entity.

func (*PointOfContactUpdate) ClearSourceID added in v0.2.1

func (pocu *PointOfContactUpdate) ClearSourceID() *PointOfContactUpdate

ClearSourceID clears the value of the "source_id" field.

func (*PointOfContactUpdate) Exec added in v0.2.1

func (pocu *PointOfContactUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*PointOfContactUpdate) ExecX added in v0.2.1

func (pocu *PointOfContactUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*PointOfContactUpdate) Mutation added in v0.2.1

func (pocu *PointOfContactUpdate) Mutation() *PointOfContactMutation

Mutation returns the PointOfContactMutation object of the builder.

func (*PointOfContactUpdate) Save added in v0.2.1

func (pocu *PointOfContactUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*PointOfContactUpdate) SaveX added in v0.2.1

func (pocu *PointOfContactUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*PointOfContactUpdate) SetAllVersions added in v0.2.1

func (pocu *PointOfContactUpdate) SetAllVersions(p *PackageName) *PointOfContactUpdate

SetAllVersions sets the "all_versions" edge to the PackageName entity.

func (*PointOfContactUpdate) SetAllVersionsID added in v0.2.1

func (pocu *PointOfContactUpdate) SetAllVersionsID(id uuid.UUID) *PointOfContactUpdate

SetAllVersionsID sets the "all_versions" edge to the PackageName entity by ID.

func (*PointOfContactUpdate) SetArtifact added in v0.2.1

func (pocu *PointOfContactUpdate) SetArtifact(a *Artifact) *PointOfContactUpdate

SetArtifact sets the "artifact" edge to the Artifact entity.

func (*PointOfContactUpdate) SetArtifactID added in v0.2.1

func (pocu *PointOfContactUpdate) SetArtifactID(u uuid.UUID) *PointOfContactUpdate

SetArtifactID sets the "artifact_id" field.

func (*PointOfContactUpdate) SetCollector added in v0.2.1

func (pocu *PointOfContactUpdate) SetCollector(s string) *PointOfContactUpdate

SetCollector sets the "collector" field.

func (*PointOfContactUpdate) SetDocumentRef added in v0.6.0

func (pocu *PointOfContactUpdate) SetDocumentRef(s string) *PointOfContactUpdate

SetDocumentRef sets the "document_ref" field.

func (*PointOfContactUpdate) SetEmail added in v0.2.1

SetEmail sets the "email" field.

func (*PointOfContactUpdate) SetInfo added in v0.2.1

SetInfo sets the "info" field.

func (*PointOfContactUpdate) SetJustification added in v0.2.1

func (pocu *PointOfContactUpdate) SetJustification(s string) *PointOfContactUpdate

SetJustification sets the "justification" field.

func (*PointOfContactUpdate) SetNillableAllVersionsID added in v0.2.1

func (pocu *PointOfContactUpdate) SetNillableAllVersionsID(id *uuid.UUID) *PointOfContactUpdate

SetNillableAllVersionsID sets the "all_versions" edge to the PackageName entity by ID if the given value is not nil.

func (*PointOfContactUpdate) SetNillableArtifactID added in v0.2.1

func (pocu *PointOfContactUpdate) SetNillableArtifactID(u *uuid.UUID) *PointOfContactUpdate

SetNillableArtifactID sets the "artifact_id" field if the given value is not nil.

func (*PointOfContactUpdate) SetNillableCollector added in v0.4.0

func (pocu *PointOfContactUpdate) SetNillableCollector(s *string) *PointOfContactUpdate

SetNillableCollector sets the "collector" field if the given value is not nil.

func (*PointOfContactUpdate) SetNillableDocumentRef added in v0.6.0

func (pocu *PointOfContactUpdate) SetNillableDocumentRef(s *string) *PointOfContactUpdate

SetNillableDocumentRef sets the "document_ref" field if the given value is not nil.

func (*PointOfContactUpdate) SetNillableEmail added in v0.4.0

func (pocu *PointOfContactUpdate) SetNillableEmail(s *string) *PointOfContactUpdate

SetNillableEmail sets the "email" field if the given value is not nil.

func (*PointOfContactUpdate) SetNillableInfo added in v0.4.0

func (pocu *PointOfContactUpdate) SetNillableInfo(s *string) *PointOfContactUpdate

SetNillableInfo sets the "info" field if the given value is not nil.

func (*PointOfContactUpdate) SetNillableJustification added in v0.4.0

func (pocu *PointOfContactUpdate) SetNillableJustification(s *string) *PointOfContactUpdate

SetNillableJustification sets the "justification" field if the given value is not nil.

func (*PointOfContactUpdate) SetNillableOrigin added in v0.4.0

func (pocu *PointOfContactUpdate) SetNillableOrigin(s *string) *PointOfContactUpdate

SetNillableOrigin sets the "origin" field if the given value is not nil.

func (*PointOfContactUpdate) SetNillablePackageNameID added in v0.2.1

func (pocu *PointOfContactUpdate) SetNillablePackageNameID(u *uuid.UUID) *PointOfContactUpdate

SetNillablePackageNameID sets the "package_name_id" field if the given value is not nil.

func (*PointOfContactUpdate) SetNillablePackageVersionID added in v0.2.1

func (pocu *PointOfContactUpdate) SetNillablePackageVersionID(u *uuid.UUID) *PointOfContactUpdate

SetNillablePackageVersionID sets the "package_version_id" field if the given value is not nil.

func (*PointOfContactUpdate) SetNillableSince added in v0.4.0

func (pocu *PointOfContactUpdate) SetNillableSince(t *time.Time) *PointOfContactUpdate

SetNillableSince sets the "since" field if the given value is not nil.

func (*PointOfContactUpdate) SetNillableSourceID added in v0.2.1

func (pocu *PointOfContactUpdate) SetNillableSourceID(u *uuid.UUID) *PointOfContactUpdate

SetNillableSourceID sets the "source_id" field if the given value is not nil.

func (*PointOfContactUpdate) SetOrigin added in v0.2.1

func (pocu *PointOfContactUpdate) SetOrigin(s string) *PointOfContactUpdate

SetOrigin sets the "origin" field.

func (*PointOfContactUpdate) SetPackageNameID added in v0.2.1

func (pocu *PointOfContactUpdate) SetPackageNameID(u uuid.UUID) *PointOfContactUpdate

SetPackageNameID sets the "package_name_id" field.

func (*PointOfContactUpdate) SetPackageVersion added in v0.2.1

func (pocu *PointOfContactUpdate) SetPackageVersion(p *PackageVersion) *PointOfContactUpdate

SetPackageVersion sets the "package_version" edge to the PackageVersion entity.

func (*PointOfContactUpdate) SetPackageVersionID added in v0.2.1

func (pocu *PointOfContactUpdate) SetPackageVersionID(u uuid.UUID) *PointOfContactUpdate

SetPackageVersionID sets the "package_version_id" field.

func (*PointOfContactUpdate) SetSince added in v0.2.1

SetSince sets the "since" field.

func (*PointOfContactUpdate) SetSource added in v0.2.1

SetSource sets the "source" edge to the SourceName entity.

func (*PointOfContactUpdate) SetSourceID added in v0.2.1

func (pocu *PointOfContactUpdate) SetSourceID(u uuid.UUID) *PointOfContactUpdate

SetSourceID sets the "source_id" field.

func (*PointOfContactUpdate) Where added in v0.2.1

Where appends a list predicates to the PointOfContactUpdate builder.

type PointOfContactUpdateOne added in v0.2.1

type PointOfContactUpdateOne struct {
	// contains filtered or unexported fields
}

PointOfContactUpdateOne is the builder for updating a single PointOfContact entity.

func (*PointOfContactUpdateOne) ClearAllVersions added in v0.2.1

func (pocuo *PointOfContactUpdateOne) ClearAllVersions() *PointOfContactUpdateOne

ClearAllVersions clears the "all_versions" edge to the PackageName entity.

func (*PointOfContactUpdateOne) ClearArtifact added in v0.2.1

func (pocuo *PointOfContactUpdateOne) ClearArtifact() *PointOfContactUpdateOne

ClearArtifact clears the "artifact" edge to the Artifact entity.

func (*PointOfContactUpdateOne) ClearArtifactID added in v0.2.1

func (pocuo *PointOfContactUpdateOne) ClearArtifactID() *PointOfContactUpdateOne

ClearArtifactID clears the value of the "artifact_id" field.

func (*PointOfContactUpdateOne) ClearPackageNameID added in v0.2.1

func (pocuo *PointOfContactUpdateOne) ClearPackageNameID() *PointOfContactUpdateOne

ClearPackageNameID clears the value of the "package_name_id" field.

func (*PointOfContactUpdateOne) ClearPackageVersion added in v0.2.1

func (pocuo *PointOfContactUpdateOne) ClearPackageVersion() *PointOfContactUpdateOne

ClearPackageVersion clears the "package_version" edge to the PackageVersion entity.

func (*PointOfContactUpdateOne) ClearPackageVersionID added in v0.2.1

func (pocuo *PointOfContactUpdateOne) ClearPackageVersionID() *PointOfContactUpdateOne

ClearPackageVersionID clears the value of the "package_version_id" field.

func (*PointOfContactUpdateOne) ClearSource added in v0.2.1

func (pocuo *PointOfContactUpdateOne) ClearSource() *PointOfContactUpdateOne

ClearSource clears the "source" edge to the SourceName entity.

func (*PointOfContactUpdateOne) ClearSourceID added in v0.2.1

func (pocuo *PointOfContactUpdateOne) ClearSourceID() *PointOfContactUpdateOne

ClearSourceID clears the value of the "source_id" field.

func (*PointOfContactUpdateOne) Exec added in v0.2.1

func (pocuo *PointOfContactUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*PointOfContactUpdateOne) ExecX added in v0.2.1

func (pocuo *PointOfContactUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*PointOfContactUpdateOne) Mutation added in v0.2.1

Mutation returns the PointOfContactMutation object of the builder.

func (*PointOfContactUpdateOne) Save added in v0.2.1

Save executes the query and returns the updated PointOfContact entity.

func (*PointOfContactUpdateOne) SaveX added in v0.2.1

SaveX is like Save, but panics if an error occurs.

func (*PointOfContactUpdateOne) Select added in v0.2.1

func (pocuo *PointOfContactUpdateOne) Select(field string, fields ...string) *PointOfContactUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*PointOfContactUpdateOne) SetAllVersions added in v0.2.1

func (pocuo *PointOfContactUpdateOne) SetAllVersions(p *PackageName) *PointOfContactUpdateOne

SetAllVersions sets the "all_versions" edge to the PackageName entity.

func (*PointOfContactUpdateOne) SetAllVersionsID added in v0.2.1

func (pocuo *PointOfContactUpdateOne) SetAllVersionsID(id uuid.UUID) *PointOfContactUpdateOne

SetAllVersionsID sets the "all_versions" edge to the PackageName entity by ID.

func (*PointOfContactUpdateOne) SetArtifact added in v0.2.1

SetArtifact sets the "artifact" edge to the Artifact entity.

func (*PointOfContactUpdateOne) SetArtifactID added in v0.2.1

func (pocuo *PointOfContactUpdateOne) SetArtifactID(u uuid.UUID) *PointOfContactUpdateOne

SetArtifactID sets the "artifact_id" field.

func (*PointOfContactUpdateOne) SetCollector added in v0.2.1

func (pocuo *PointOfContactUpdateOne) SetCollector(s string) *PointOfContactUpdateOne

SetCollector sets the "collector" field.

func (*PointOfContactUpdateOne) SetDocumentRef added in v0.6.0

func (pocuo *PointOfContactUpdateOne) SetDocumentRef(s string) *PointOfContactUpdateOne

SetDocumentRef sets the "document_ref" field.

func (*PointOfContactUpdateOne) SetEmail added in v0.2.1

SetEmail sets the "email" field.

func (*PointOfContactUpdateOne) SetInfo added in v0.2.1

SetInfo sets the "info" field.

func (*PointOfContactUpdateOne) SetJustification added in v0.2.1

func (pocuo *PointOfContactUpdateOne) SetJustification(s string) *PointOfContactUpdateOne

SetJustification sets the "justification" field.

func (*PointOfContactUpdateOne) SetNillableAllVersionsID added in v0.2.1

func (pocuo *PointOfContactUpdateOne) SetNillableAllVersionsID(id *uuid.UUID) *PointOfContactUpdateOne

SetNillableAllVersionsID sets the "all_versions" edge to the PackageName entity by ID if the given value is not nil.

func (*PointOfContactUpdateOne) SetNillableArtifactID added in v0.2.1

func (pocuo *PointOfContactUpdateOne) SetNillableArtifactID(u *uuid.UUID) *PointOfContactUpdateOne

SetNillableArtifactID sets the "artifact_id" field if the given value is not nil.

func (*PointOfContactUpdateOne) SetNillableCollector added in v0.4.0

func (pocuo *PointOfContactUpdateOne) SetNillableCollector(s *string) *PointOfContactUpdateOne

SetNillableCollector sets the "collector" field if the given value is not nil.

func (*PointOfContactUpdateOne) SetNillableDocumentRef added in v0.6.0

func (pocuo *PointOfContactUpdateOne) SetNillableDocumentRef(s *string) *PointOfContactUpdateOne

SetNillableDocumentRef sets the "document_ref" field if the given value is not nil.

func (*PointOfContactUpdateOne) SetNillableEmail added in v0.4.0

func (pocuo *PointOfContactUpdateOne) SetNillableEmail(s *string) *PointOfContactUpdateOne

SetNillableEmail sets the "email" field if the given value is not nil.

func (*PointOfContactUpdateOne) SetNillableInfo added in v0.4.0

func (pocuo *PointOfContactUpdateOne) SetNillableInfo(s *string) *PointOfContactUpdateOne

SetNillableInfo sets the "info" field if the given value is not nil.

func (*PointOfContactUpdateOne) SetNillableJustification added in v0.4.0

func (pocuo *PointOfContactUpdateOne) SetNillableJustification(s *string) *PointOfContactUpdateOne

SetNillableJustification sets the "justification" field if the given value is not nil.

func (*PointOfContactUpdateOne) SetNillableOrigin added in v0.4.0

func (pocuo *PointOfContactUpdateOne) SetNillableOrigin(s *string) *PointOfContactUpdateOne

SetNillableOrigin sets the "origin" field if the given value is not nil.

func (*PointOfContactUpdateOne) SetNillablePackageNameID added in v0.2.1

func (pocuo *PointOfContactUpdateOne) SetNillablePackageNameID(u *uuid.UUID) *PointOfContactUpdateOne

SetNillablePackageNameID sets the "package_name_id" field if the given value is not nil.

func (*PointOfContactUpdateOne) SetNillablePackageVersionID added in v0.2.1

func (pocuo *PointOfContactUpdateOne) SetNillablePackageVersionID(u *uuid.UUID) *PointOfContactUpdateOne

SetNillablePackageVersionID sets the "package_version_id" field if the given value is not nil.

func (*PointOfContactUpdateOne) SetNillableSince added in v0.4.0

func (pocuo *PointOfContactUpdateOne) SetNillableSince(t *time.Time) *PointOfContactUpdateOne

SetNillableSince sets the "since" field if the given value is not nil.

func (*PointOfContactUpdateOne) SetNillableSourceID added in v0.2.1

func (pocuo *PointOfContactUpdateOne) SetNillableSourceID(u *uuid.UUID) *PointOfContactUpdateOne

SetNillableSourceID sets the "source_id" field if the given value is not nil.

func (*PointOfContactUpdateOne) SetOrigin added in v0.2.1

SetOrigin sets the "origin" field.

func (*PointOfContactUpdateOne) SetPackageNameID added in v0.2.1

func (pocuo *PointOfContactUpdateOne) SetPackageNameID(u uuid.UUID) *PointOfContactUpdateOne

SetPackageNameID sets the "package_name_id" field.

func (*PointOfContactUpdateOne) SetPackageVersion added in v0.2.1

func (pocuo *PointOfContactUpdateOne) SetPackageVersion(p *PackageVersion) *PointOfContactUpdateOne

SetPackageVersion sets the "package_version" edge to the PackageVersion entity.

func (*PointOfContactUpdateOne) SetPackageVersionID added in v0.2.1

func (pocuo *PointOfContactUpdateOne) SetPackageVersionID(u uuid.UUID) *PointOfContactUpdateOne

SetPackageVersionID sets the "package_version_id" field.

func (*PointOfContactUpdateOne) SetSince added in v0.2.1

SetSince sets the "since" field.

func (*PointOfContactUpdateOne) SetSource added in v0.2.1

SetSource sets the "source" edge to the SourceName entity.

func (*PointOfContactUpdateOne) SetSourceID added in v0.2.1

SetSourceID sets the "source_id" field.

func (*PointOfContactUpdateOne) Where added in v0.2.1

Where appends a list predicates to the PointOfContactUpdate builder.

type PointOfContactUpsert added in v0.2.1

type PointOfContactUpsert struct {
	*sql.UpdateSet
}

PointOfContactUpsert is the "OnConflict" setter.

func (*PointOfContactUpsert) ClearArtifactID added in v0.2.1

func (u *PointOfContactUpsert) ClearArtifactID() *PointOfContactUpsert

ClearArtifactID clears the value of the "artifact_id" field.

func (*PointOfContactUpsert) ClearPackageNameID added in v0.2.1

func (u *PointOfContactUpsert) ClearPackageNameID() *PointOfContactUpsert

ClearPackageNameID clears the value of the "package_name_id" field.

func (*PointOfContactUpsert) ClearPackageVersionID added in v0.2.1

func (u *PointOfContactUpsert) ClearPackageVersionID() *PointOfContactUpsert

ClearPackageVersionID clears the value of the "package_version_id" field.

func (*PointOfContactUpsert) ClearSourceID added in v0.2.1

func (u *PointOfContactUpsert) ClearSourceID() *PointOfContactUpsert

ClearSourceID clears the value of the "source_id" field.

func (*PointOfContactUpsert) SetArtifactID added in v0.2.1

func (u *PointOfContactUpsert) SetArtifactID(v uuid.UUID) *PointOfContactUpsert

SetArtifactID sets the "artifact_id" field.

func (*PointOfContactUpsert) SetCollector added in v0.2.1

func (u *PointOfContactUpsert) SetCollector(v string) *PointOfContactUpsert

SetCollector sets the "collector" field.

func (*PointOfContactUpsert) SetDocumentRef added in v0.6.0

func (u *PointOfContactUpsert) SetDocumentRef(v string) *PointOfContactUpsert

SetDocumentRef sets the "document_ref" field.

func (*PointOfContactUpsert) SetEmail added in v0.2.1

SetEmail sets the "email" field.

func (*PointOfContactUpsert) SetInfo added in v0.2.1

SetInfo sets the "info" field.

func (*PointOfContactUpsert) SetJustification added in v0.2.1

func (u *PointOfContactUpsert) SetJustification(v string) *PointOfContactUpsert

SetJustification sets the "justification" field.

func (*PointOfContactUpsert) SetOrigin added in v0.2.1

SetOrigin sets the "origin" field.

func (*PointOfContactUpsert) SetPackageNameID added in v0.2.1

func (u *PointOfContactUpsert) SetPackageNameID(v uuid.UUID) *PointOfContactUpsert

SetPackageNameID sets the "package_name_id" field.

func (*PointOfContactUpsert) SetPackageVersionID added in v0.2.1

func (u *PointOfContactUpsert) SetPackageVersionID(v uuid.UUID) *PointOfContactUpsert

SetPackageVersionID sets the "package_version_id" field.

func (*PointOfContactUpsert) SetSince added in v0.2.1

SetSince sets the "since" field.

func (*PointOfContactUpsert) SetSourceID added in v0.2.1

SetSourceID sets the "source_id" field.

func (*PointOfContactUpsert) UpdateArtifactID added in v0.2.1

func (u *PointOfContactUpsert) UpdateArtifactID() *PointOfContactUpsert

UpdateArtifactID sets the "artifact_id" field to the value that was provided on create.

func (*PointOfContactUpsert) UpdateCollector added in v0.2.1

func (u *PointOfContactUpsert) UpdateCollector() *PointOfContactUpsert

UpdateCollector sets the "collector" field to the value that was provided on create.

func (*PointOfContactUpsert) UpdateDocumentRef added in v0.6.0

func (u *PointOfContactUpsert) UpdateDocumentRef() *PointOfContactUpsert

UpdateDocumentRef sets the "document_ref" field to the value that was provided on create.

func (*PointOfContactUpsert) UpdateEmail added in v0.2.1

func (u *PointOfContactUpsert) UpdateEmail() *PointOfContactUpsert

UpdateEmail sets the "email" field to the value that was provided on create.

func (*PointOfContactUpsert) UpdateInfo added in v0.2.1

func (u *PointOfContactUpsert) UpdateInfo() *PointOfContactUpsert

UpdateInfo sets the "info" field to the value that was provided on create.

func (*PointOfContactUpsert) UpdateJustification added in v0.2.1

func (u *PointOfContactUpsert) UpdateJustification() *PointOfContactUpsert

UpdateJustification sets the "justification" field to the value that was provided on create.

func (*PointOfContactUpsert) UpdateOrigin added in v0.2.1

func (u *PointOfContactUpsert) UpdateOrigin() *PointOfContactUpsert

UpdateOrigin sets the "origin" field to the value that was provided on create.

func (*PointOfContactUpsert) UpdatePackageNameID added in v0.2.1

func (u *PointOfContactUpsert) UpdatePackageNameID() *PointOfContactUpsert

UpdatePackageNameID sets the "package_name_id" field to the value that was provided on create.

func (*PointOfContactUpsert) UpdatePackageVersionID added in v0.2.1

func (u *PointOfContactUpsert) UpdatePackageVersionID() *PointOfContactUpsert

UpdatePackageVersionID sets the "package_version_id" field to the value that was provided on create.

func (*PointOfContactUpsert) UpdateSince added in v0.2.1

func (u *PointOfContactUpsert) UpdateSince() *PointOfContactUpsert

UpdateSince sets the "since" field to the value that was provided on create.

func (*PointOfContactUpsert) UpdateSourceID added in v0.2.1

func (u *PointOfContactUpsert) UpdateSourceID() *PointOfContactUpsert

UpdateSourceID sets the "source_id" field to the value that was provided on create.

type PointOfContactUpsertBulk added in v0.2.1

type PointOfContactUpsertBulk struct {
	// contains filtered or unexported fields
}

PointOfContactUpsertBulk is the builder for "upsert"-ing a bulk of PointOfContact nodes.

func (*PointOfContactUpsertBulk) ClearArtifactID added in v0.2.1

func (u *PointOfContactUpsertBulk) ClearArtifactID() *PointOfContactUpsertBulk

ClearArtifactID clears the value of the "artifact_id" field.

func (*PointOfContactUpsertBulk) ClearPackageNameID added in v0.2.1

func (u *PointOfContactUpsertBulk) ClearPackageNameID() *PointOfContactUpsertBulk

ClearPackageNameID clears the value of the "package_name_id" field.

func (*PointOfContactUpsertBulk) ClearPackageVersionID added in v0.2.1

func (u *PointOfContactUpsertBulk) ClearPackageVersionID() *PointOfContactUpsertBulk

ClearPackageVersionID clears the value of the "package_version_id" field.

func (*PointOfContactUpsertBulk) ClearSourceID added in v0.2.1

ClearSourceID clears the value of the "source_id" field.

func (*PointOfContactUpsertBulk) DoNothing added in v0.2.1

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*PointOfContactUpsertBulk) Exec added in v0.2.1

Exec executes the query.

func (*PointOfContactUpsertBulk) ExecX added in v0.2.1

ExecX is like Exec, but panics if an error occurs.

func (*PointOfContactUpsertBulk) Ignore added in v0.2.1

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.PointOfContact.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*PointOfContactUpsertBulk) SetArtifactID added in v0.2.1

SetArtifactID sets the "artifact_id" field.

func (*PointOfContactUpsertBulk) SetCollector added in v0.2.1

SetCollector sets the "collector" field.

func (*PointOfContactUpsertBulk) SetDocumentRef added in v0.6.0

SetDocumentRef sets the "document_ref" field.

func (*PointOfContactUpsertBulk) SetEmail added in v0.2.1

SetEmail sets the "email" field.

func (*PointOfContactUpsertBulk) SetInfo added in v0.2.1

SetInfo sets the "info" field.

func (*PointOfContactUpsertBulk) SetJustification added in v0.2.1

SetJustification sets the "justification" field.

func (*PointOfContactUpsertBulk) SetOrigin added in v0.2.1

SetOrigin sets the "origin" field.

func (*PointOfContactUpsertBulk) SetPackageNameID added in v0.2.1

SetPackageNameID sets the "package_name_id" field.

func (*PointOfContactUpsertBulk) SetPackageVersionID added in v0.2.1

func (u *PointOfContactUpsertBulk) SetPackageVersionID(v uuid.UUID) *PointOfContactUpsertBulk

SetPackageVersionID sets the "package_version_id" field.

func (*PointOfContactUpsertBulk) SetSince added in v0.2.1

SetSince sets the "since" field.

func (*PointOfContactUpsertBulk) SetSourceID added in v0.2.1

SetSourceID sets the "source_id" field.

func (*PointOfContactUpsertBulk) Update added in v0.2.1

Update allows overriding fields `UPDATE` values. See the PointOfContactCreateBulk.OnConflict documentation for more info.

func (*PointOfContactUpsertBulk) UpdateArtifactID added in v0.2.1

func (u *PointOfContactUpsertBulk) UpdateArtifactID() *PointOfContactUpsertBulk

UpdateArtifactID sets the "artifact_id" field to the value that was provided on create.

func (*PointOfContactUpsertBulk) UpdateCollector added in v0.2.1

func (u *PointOfContactUpsertBulk) UpdateCollector() *PointOfContactUpsertBulk

UpdateCollector sets the "collector" field to the value that was provided on create.

func (*PointOfContactUpsertBulk) UpdateDocumentRef added in v0.6.0

func (u *PointOfContactUpsertBulk) UpdateDocumentRef() *PointOfContactUpsertBulk

UpdateDocumentRef sets the "document_ref" field to the value that was provided on create.

func (*PointOfContactUpsertBulk) UpdateEmail added in v0.2.1

UpdateEmail sets the "email" field to the value that was provided on create.

func (*PointOfContactUpsertBulk) UpdateInfo added in v0.2.1

UpdateInfo sets the "info" field to the value that was provided on create.

func (*PointOfContactUpsertBulk) UpdateJustification added in v0.2.1

func (u *PointOfContactUpsertBulk) UpdateJustification() *PointOfContactUpsertBulk

UpdateJustification sets the "justification" field to the value that was provided on create.

func (*PointOfContactUpsertBulk) UpdateNewValues added in v0.2.1

func (u *PointOfContactUpsertBulk) UpdateNewValues() *PointOfContactUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.PointOfContact.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(pointofcontact.FieldID)
		}),
	).
	Exec(ctx)

func (*PointOfContactUpsertBulk) UpdateOrigin added in v0.2.1

UpdateOrigin sets the "origin" field to the value that was provided on create.

func (*PointOfContactUpsertBulk) UpdatePackageNameID added in v0.2.1

func (u *PointOfContactUpsertBulk) UpdatePackageNameID() *PointOfContactUpsertBulk

UpdatePackageNameID sets the "package_name_id" field to the value that was provided on create.

func (*PointOfContactUpsertBulk) UpdatePackageVersionID added in v0.2.1

func (u *PointOfContactUpsertBulk) UpdatePackageVersionID() *PointOfContactUpsertBulk

UpdatePackageVersionID sets the "package_version_id" field to the value that was provided on create.

func (*PointOfContactUpsertBulk) UpdateSince added in v0.2.1

UpdateSince sets the "since" field to the value that was provided on create.

func (*PointOfContactUpsertBulk) UpdateSourceID added in v0.2.1

UpdateSourceID sets the "source_id" field to the value that was provided on create.

type PointOfContactUpsertOne added in v0.2.1

type PointOfContactUpsertOne struct {
	// contains filtered or unexported fields
}

PointOfContactUpsertOne is the builder for "upsert"-ing

one PointOfContact node.

func (*PointOfContactUpsertOne) ClearArtifactID added in v0.2.1

func (u *PointOfContactUpsertOne) ClearArtifactID() *PointOfContactUpsertOne

ClearArtifactID clears the value of the "artifact_id" field.

func (*PointOfContactUpsertOne) ClearPackageNameID added in v0.2.1

func (u *PointOfContactUpsertOne) ClearPackageNameID() *PointOfContactUpsertOne

ClearPackageNameID clears the value of the "package_name_id" field.

func (*PointOfContactUpsertOne) ClearPackageVersionID added in v0.2.1

func (u *PointOfContactUpsertOne) ClearPackageVersionID() *PointOfContactUpsertOne

ClearPackageVersionID clears the value of the "package_version_id" field.

func (*PointOfContactUpsertOne) ClearSourceID added in v0.2.1

ClearSourceID clears the value of the "source_id" field.

func (*PointOfContactUpsertOne) DoNothing added in v0.2.1

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*PointOfContactUpsertOne) Exec added in v0.2.1

Exec executes the query.

func (*PointOfContactUpsertOne) ExecX added in v0.2.1

func (u *PointOfContactUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*PointOfContactUpsertOne) ID added in v0.2.1

func (u *PointOfContactUpsertOne) ID(ctx context.Context) (id uuid.UUID, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*PointOfContactUpsertOne) IDX added in v0.2.1

IDX is like ID, but panics if an error occurs.

func (*PointOfContactUpsertOne) Ignore added in v0.2.1

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.PointOfContact.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*PointOfContactUpsertOne) SetArtifactID added in v0.2.1

SetArtifactID sets the "artifact_id" field.

func (*PointOfContactUpsertOne) SetCollector added in v0.2.1

SetCollector sets the "collector" field.

func (*PointOfContactUpsertOne) SetDocumentRef added in v0.6.0

SetDocumentRef sets the "document_ref" field.

func (*PointOfContactUpsertOne) SetEmail added in v0.2.1

SetEmail sets the "email" field.

func (*PointOfContactUpsertOne) SetInfo added in v0.2.1

SetInfo sets the "info" field.

func (*PointOfContactUpsertOne) SetJustification added in v0.2.1

func (u *PointOfContactUpsertOne) SetJustification(v string) *PointOfContactUpsertOne

SetJustification sets the "justification" field.

func (*PointOfContactUpsertOne) SetOrigin added in v0.2.1

SetOrigin sets the "origin" field.

func (*PointOfContactUpsertOne) SetPackageNameID added in v0.2.1

func (u *PointOfContactUpsertOne) SetPackageNameID(v uuid.UUID) *PointOfContactUpsertOne

SetPackageNameID sets the "package_name_id" field.

func (*PointOfContactUpsertOne) SetPackageVersionID added in v0.2.1

func (u *PointOfContactUpsertOne) SetPackageVersionID(v uuid.UUID) *PointOfContactUpsertOne

SetPackageVersionID sets the "package_version_id" field.

func (*PointOfContactUpsertOne) SetSince added in v0.2.1

SetSince sets the "since" field.

func (*PointOfContactUpsertOne) SetSourceID added in v0.2.1

SetSourceID sets the "source_id" field.

func (*PointOfContactUpsertOne) Update added in v0.2.1

Update allows overriding fields `UPDATE` values. See the PointOfContactCreate.OnConflict documentation for more info.

func (*PointOfContactUpsertOne) UpdateArtifactID added in v0.2.1

func (u *PointOfContactUpsertOne) UpdateArtifactID() *PointOfContactUpsertOne

UpdateArtifactID sets the "artifact_id" field to the value that was provided on create.

func (*PointOfContactUpsertOne) UpdateCollector added in v0.2.1

func (u *PointOfContactUpsertOne) UpdateCollector() *PointOfContactUpsertOne

UpdateCollector sets the "collector" field to the value that was provided on create.

func (*PointOfContactUpsertOne) UpdateDocumentRef added in v0.6.0

func (u *PointOfContactUpsertOne) UpdateDocumentRef() *PointOfContactUpsertOne

UpdateDocumentRef sets the "document_ref" field to the value that was provided on create.

func (*PointOfContactUpsertOne) UpdateEmail added in v0.2.1

UpdateEmail sets the "email" field to the value that was provided on create.

func (*PointOfContactUpsertOne) UpdateInfo added in v0.2.1

UpdateInfo sets the "info" field to the value that was provided on create.

func (*PointOfContactUpsertOne) UpdateJustification added in v0.2.1

func (u *PointOfContactUpsertOne) UpdateJustification() *PointOfContactUpsertOne

UpdateJustification sets the "justification" field to the value that was provided on create.

func (*PointOfContactUpsertOne) UpdateNewValues added in v0.2.1

func (u *PointOfContactUpsertOne) UpdateNewValues() *PointOfContactUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:

client.PointOfContact.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(pointofcontact.FieldID)
		}),
	).
	Exec(ctx)

func (*PointOfContactUpsertOne) UpdateOrigin added in v0.2.1

UpdateOrigin sets the "origin" field to the value that was provided on create.

func (*PointOfContactUpsertOne) UpdatePackageNameID added in v0.2.1

func (u *PointOfContactUpsertOne) UpdatePackageNameID() *PointOfContactUpsertOne

UpdatePackageNameID sets the "package_name_id" field to the value that was provided on create.

func (*PointOfContactUpsertOne) UpdatePackageVersionID added in v0.2.1

func (u *PointOfContactUpsertOne) UpdatePackageVersionID() *PointOfContactUpsertOne

UpdatePackageVersionID sets the "package_version_id" field to the value that was provided on create.

func (*PointOfContactUpsertOne) UpdateSince added in v0.2.1

UpdateSince sets the "since" field to the value that was provided on create.

func (*PointOfContactUpsertOne) UpdateSourceID added in v0.2.1

func (u *PointOfContactUpsertOne) UpdateSourceID() *PointOfContactUpsertOne

UpdateSourceID sets the "source_id" field to the value that was provided on create.

type PointOfContacts added in v0.2.1

type PointOfContacts []*PointOfContact

PointOfContacts is a parsable slice of PointOfContact.

type Policy

type Policy = ent.Policy

ent aliases to avoid import conflicts in user's code.

type Querier

type Querier = ent.Querier

ent aliases to avoid import conflicts in user's code.

type QuerierFunc

type QuerierFunc = ent.QuerierFunc

ent aliases to avoid import conflicts in user's code.

type Query

type Query = ent.Query

ent aliases to avoid import conflicts in user's code.

type QueryContext

type QueryContext = ent.QueryContext

ent aliases to avoid import conflicts in user's code.

type RollbackFunc

type RollbackFunc func(context.Context, *Tx) error

The RollbackFunc type is an adapter to allow the use of ordinary function as a Rollbacker. If f is a function with the appropriate signature, RollbackFunc(f) is a Rollbacker that calls f.

func (RollbackFunc) Rollback

func (f RollbackFunc) Rollback(ctx context.Context, tx *Tx) error

Rollback calls f(ctx, m).

type RollbackHook

type RollbackHook func(Rollbacker) Rollbacker

RollbackHook defines the "rollback middleware". A function that gets a Rollbacker and returns a Rollbacker. For example:

hook := func(next ent.Rollbacker) ent.Rollbacker {
	return ent.RollbackFunc(func(ctx context.Context, tx *ent.Tx) error {
		// Do some stuff before.
		if err := next.Rollback(ctx, tx); err != nil {
			return err
		}
		// Do some stuff after.
		return nil
	})
}

type Rollbacker

type Rollbacker interface {
	Rollback(context.Context, *Tx) error
}

Rollbacker is the interface that wraps the Rollback method.

type SLSAAttestation

type SLSAAttestation struct {

	// ID of the ent.
	ID uuid.UUID `json:"id,omitempty"`
	// Type of the builder
	BuildType string `json:"build_type,omitempty"`
	// ID of the builder
	BuiltByID uuid.UUID `json:"built_by_id,omitempty"`
	// ID of the subject artifact
	SubjectID uuid.UUID `json:"subject_id,omitempty"`
	// Individual predicates found in the attestation
	SlsaPredicate []*model.SLSAPredicate `json:"slsa_predicate,omitempty"`
	// Version of the SLSA predicate
	SlsaVersion string `json:"slsa_version,omitempty"`
	// Timestamp of build start time
	StartedOn time.Time `json:"started_on,omitempty"`
	// Timestamp of build end time
	FinishedOn time.Time `json:"finished_on,omitempty"`
	// Document from which this attestation is generated from
	Origin string `json:"origin,omitempty"`
	// GUAC collector for the document
	Collector string `json:"collector,omitempty"`
	// DocumentRef holds the value of the "document_ref" field.
	DocumentRef string `json:"document_ref,omitempty"`
	// Hash of the artifacts that was built
	BuiltFromHash string `json:"built_from_hash,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the SLSAAttestationQuery when eager-loading is set.
	Edges SLSAAttestationEdges `json:"edges"`
	// contains filtered or unexported fields
}

SLSAAttestation is the model entity for the SLSAAttestation schema.

func (*SLSAAttestation) BuiltBy

func (sa *SLSAAttestation) BuiltBy(ctx context.Context) (*Builder, error)

func (*SLSAAttestation) BuiltFrom

func (sa *SLSAAttestation) BuiltFrom(ctx context.Context) (result []*Artifact, err error)

func (*SLSAAttestation) IsNode

func (n *SLSAAttestation) IsNode()

IsNode implements the Node interface check for GQLGen.

func (*SLSAAttestation) NamedBuiltFrom

func (sa *SLSAAttestation) NamedBuiltFrom(name string) ([]*Artifact, error)

NamedBuiltFrom returns the BuiltFrom named value or an error if the edge was not loaded in eager-loading with this name.

func (*SLSAAttestation) QueryBuiltBy

func (sa *SLSAAttestation) QueryBuiltBy() *BuilderQuery

QueryBuiltBy queries the "built_by" edge of the SLSAAttestation entity.

func (*SLSAAttestation) QueryBuiltFrom

func (sa *SLSAAttestation) QueryBuiltFrom() *ArtifactQuery

QueryBuiltFrom queries the "built_from" edge of the SLSAAttestation entity.

func (*SLSAAttestation) QuerySubject

func (sa *SLSAAttestation) QuerySubject() *ArtifactQuery

QuerySubject queries the "subject" edge of the SLSAAttestation entity.

func (*SLSAAttestation) String

func (sa *SLSAAttestation) String() string

String implements the fmt.Stringer.

func (*SLSAAttestation) Subject

func (sa *SLSAAttestation) Subject(ctx context.Context) (*Artifact, error)

func (*SLSAAttestation) ToEdge

ToEdge converts SLSAAttestation into SLSAAttestationEdge.

func (*SLSAAttestation) Unwrap

func (sa *SLSAAttestation) Unwrap() *SLSAAttestation

Unwrap unwraps the SLSAAttestation entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.

func (*SLSAAttestation) Update

Update returns a builder for updating this SLSAAttestation. Note that you need to call SLSAAttestation.Unwrap() before calling this method if this SLSAAttestation was returned from a transaction, and the transaction was committed or rolled back.

func (*SLSAAttestation) Value

func (sa *SLSAAttestation) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the SLSAAttestation. This includes values selected through modifiers, order, etc.

type SLSAAttestationClient

type SLSAAttestationClient struct {
	// contains filtered or unexported fields
}

SLSAAttestationClient is a client for the SLSAAttestation schema.

func NewSLSAAttestationClient

func NewSLSAAttestationClient(c config) *SLSAAttestationClient

NewSLSAAttestationClient returns a client for the SLSAAttestation from the given config.

func (*SLSAAttestationClient) Create

Create returns a builder for creating a SLSAAttestation entity.

func (*SLSAAttestationClient) CreateBulk

CreateBulk returns a builder for creating a bulk of SLSAAttestation entities.

func (*SLSAAttestationClient) Delete

Delete returns a delete builder for SLSAAttestation.

func (*SLSAAttestationClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*SLSAAttestationClient) DeleteOneID

DeleteOneID returns a builder for deleting the given entity by its id.

func (*SLSAAttestationClient) Get

Get returns a SLSAAttestation entity by its id.

func (*SLSAAttestationClient) GetX

GetX is like Get, but panics if an error occurs.

func (*SLSAAttestationClient) Hooks

func (c *SLSAAttestationClient) Hooks() []Hook

Hooks returns the client hooks.

func (*SLSAAttestationClient) Intercept

func (c *SLSAAttestationClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `slsaattestation.Intercept(f(g(h())))`.

func (*SLSAAttestationClient) Interceptors

func (c *SLSAAttestationClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*SLSAAttestationClient) MapCreateBulk

func (c *SLSAAttestationClient) MapCreateBulk(slice any, setFunc func(*SLSAAttestationCreate, int)) *SLSAAttestationCreateBulk

MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.

func (*SLSAAttestationClient) Query

Query returns a query builder for SLSAAttestation.

func (*SLSAAttestationClient) QueryBuiltBy

func (c *SLSAAttestationClient) QueryBuiltBy(sa *SLSAAttestation) *BuilderQuery

QueryBuiltBy queries the built_by edge of a SLSAAttestation.

func (*SLSAAttestationClient) QueryBuiltFrom

func (c *SLSAAttestationClient) QueryBuiltFrom(sa *SLSAAttestation) *ArtifactQuery

QueryBuiltFrom queries the built_from edge of a SLSAAttestation.

func (*SLSAAttestationClient) QuerySubject

func (c *SLSAAttestationClient) QuerySubject(sa *SLSAAttestation) *ArtifactQuery

QuerySubject queries the subject edge of a SLSAAttestation.

func (*SLSAAttestationClient) Update

Update returns an update builder for SLSAAttestation.

func (*SLSAAttestationClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*SLSAAttestationClient) UpdateOneID

UpdateOneID returns an update builder for the given id.

func (*SLSAAttestationClient) Use

func (c *SLSAAttestationClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `slsaattestation.Hooks(f(g(h())))`.

type SLSAAttestationConnection

type SLSAAttestationConnection struct {
	Edges      []*SLSAAttestationEdge `json:"edges"`
	PageInfo   PageInfo               `json:"pageInfo"`
	TotalCount int                    `json:"totalCount"`
}

SLSAAttestationConnection is the connection containing edges to SLSAAttestation.

type SLSAAttestationCreate

type SLSAAttestationCreate struct {
	// contains filtered or unexported fields
}

SLSAAttestationCreate is the builder for creating a SLSAAttestation entity.

func (*SLSAAttestationCreate) AddBuiltFrom

func (sac *SLSAAttestationCreate) AddBuiltFrom(a ...*Artifact) *SLSAAttestationCreate

AddBuiltFrom adds the "built_from" edges to the Artifact entity.

func (*SLSAAttestationCreate) AddBuiltFromIDs

func (sac *SLSAAttestationCreate) AddBuiltFromIDs(ids ...uuid.UUID) *SLSAAttestationCreate

AddBuiltFromIDs adds the "built_from" edge to the Artifact entity by IDs.

func (*SLSAAttestationCreate) Exec

func (sac *SLSAAttestationCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*SLSAAttestationCreate) ExecX

func (sac *SLSAAttestationCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SLSAAttestationCreate) Mutation

Mutation returns the SLSAAttestationMutation object of the builder.

func (*SLSAAttestationCreate) OnConflict

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.SLSAAttestation.Create().
	SetBuildType(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.SLSAAttestationUpsert) {
		SetBuildType(v+v).
	}).
	Exec(ctx)

func (*SLSAAttestationCreate) OnConflictColumns

func (sac *SLSAAttestationCreate) OnConflictColumns(columns ...string) *SLSAAttestationUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.SLSAAttestation.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*SLSAAttestationCreate) Save

Save creates the SLSAAttestation in the database.

func (*SLSAAttestationCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*SLSAAttestationCreate) SetBuildType

func (sac *SLSAAttestationCreate) SetBuildType(s string) *SLSAAttestationCreate

SetBuildType sets the "build_type" field.

func (*SLSAAttestationCreate) SetBuiltBy

SetBuiltBy sets the "built_by" edge to the Builder entity.

func (*SLSAAttestationCreate) SetBuiltByID

func (sac *SLSAAttestationCreate) SetBuiltByID(u uuid.UUID) *SLSAAttestationCreate

SetBuiltByID sets the "built_by_id" field.

func (*SLSAAttestationCreate) SetBuiltFromHash

func (sac *SLSAAttestationCreate) SetBuiltFromHash(s string) *SLSAAttestationCreate

SetBuiltFromHash sets the "built_from_hash" field.

func (*SLSAAttestationCreate) SetCollector

func (sac *SLSAAttestationCreate) SetCollector(s string) *SLSAAttestationCreate

SetCollector sets the "collector" field.

func (*SLSAAttestationCreate) SetDocumentRef added in v0.6.0

func (sac *SLSAAttestationCreate) SetDocumentRef(s string) *SLSAAttestationCreate

SetDocumentRef sets the "document_ref" field.

func (*SLSAAttestationCreate) SetFinishedOn

func (sac *SLSAAttestationCreate) SetFinishedOn(t time.Time) *SLSAAttestationCreate

SetFinishedOn sets the "finished_on" field.

func (*SLSAAttestationCreate) SetID added in v0.5.0

SetID sets the "id" field.

func (*SLSAAttestationCreate) SetNillableID added in v0.5.0

func (sac *SLSAAttestationCreate) SetNillableID(u *uuid.UUID) *SLSAAttestationCreate

SetNillableID sets the "id" field if the given value is not nil.

func (*SLSAAttestationCreate) SetOrigin

SetOrigin sets the "origin" field.

func (*SLSAAttestationCreate) SetSlsaPredicate

func (sac *SLSAAttestationCreate) SetSlsaPredicate(mp []*model.SLSAPredicate) *SLSAAttestationCreate

SetSlsaPredicate sets the "slsa_predicate" field.

func (*SLSAAttestationCreate) SetSlsaVersion

func (sac *SLSAAttestationCreate) SetSlsaVersion(s string) *SLSAAttestationCreate

SetSlsaVersion sets the "slsa_version" field.

func (*SLSAAttestationCreate) SetStartedOn

func (sac *SLSAAttestationCreate) SetStartedOn(t time.Time) *SLSAAttestationCreate

SetStartedOn sets the "started_on" field.

func (*SLSAAttestationCreate) SetSubject

SetSubject sets the "subject" edge to the Artifact entity.

func (*SLSAAttestationCreate) SetSubjectID

func (sac *SLSAAttestationCreate) SetSubjectID(u uuid.UUID) *SLSAAttestationCreate

SetSubjectID sets the "subject_id" field.

type SLSAAttestationCreateBulk

type SLSAAttestationCreateBulk struct {
	// contains filtered or unexported fields
}

SLSAAttestationCreateBulk is the builder for creating many SLSAAttestation entities in bulk.

func (*SLSAAttestationCreateBulk) Exec

Exec executes the query.

func (*SLSAAttestationCreateBulk) ExecX

func (sacb *SLSAAttestationCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SLSAAttestationCreateBulk) OnConflict

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.SLSAAttestation.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.SLSAAttestationUpsert) {
		SetBuildType(v+v).
	}).
	Exec(ctx)

func (*SLSAAttestationCreateBulk) OnConflictColumns

func (sacb *SLSAAttestationCreateBulk) OnConflictColumns(columns ...string) *SLSAAttestationUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.SLSAAttestation.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*SLSAAttestationCreateBulk) Save

Save creates the SLSAAttestation entities in the database.

func (*SLSAAttestationCreateBulk) SaveX

SaveX is like Save, but panics if an error occurs.

type SLSAAttestationDelete

type SLSAAttestationDelete struct {
	// contains filtered or unexported fields
}

SLSAAttestationDelete is the builder for deleting a SLSAAttestation entity.

func (*SLSAAttestationDelete) Exec

func (sad *SLSAAttestationDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*SLSAAttestationDelete) ExecX

func (sad *SLSAAttestationDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*SLSAAttestationDelete) Where

Where appends a list predicates to the SLSAAttestationDelete builder.

type SLSAAttestationDeleteOne

type SLSAAttestationDeleteOne struct {
	// contains filtered or unexported fields
}

SLSAAttestationDeleteOne is the builder for deleting a single SLSAAttestation entity.

func (*SLSAAttestationDeleteOne) Exec

Exec executes the deletion query.

func (*SLSAAttestationDeleteOne) ExecX

func (sado *SLSAAttestationDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SLSAAttestationDeleteOne) Where

Where appends a list predicates to the SLSAAttestationDelete builder.

type SLSAAttestationEdge

type SLSAAttestationEdge struct {
	Node   *SLSAAttestation `json:"node"`
	Cursor Cursor           `json:"cursor"`
}

SLSAAttestationEdge is the edge representation of SLSAAttestation.

type SLSAAttestationEdges

type SLSAAttestationEdges struct {
	// BuiltFrom holds the value of the built_from edge.
	BuiltFrom []*Artifact `json:"built_from,omitempty"`
	// BuiltBy holds the value of the built_by edge.
	BuiltBy *Builder `json:"built_by,omitempty"`
	// Subject holds the value of the subject edge.
	Subject *Artifact `json:"subject,omitempty"`
	// contains filtered or unexported fields
}

SLSAAttestationEdges holds the relations/edges for other nodes in the graph.

func (SLSAAttestationEdges) BuiltByOrErr

func (e SLSAAttestationEdges) BuiltByOrErr() (*Builder, error)

BuiltByOrErr returns the BuiltBy value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (SLSAAttestationEdges) BuiltFromOrErr

func (e SLSAAttestationEdges) BuiltFromOrErr() ([]*Artifact, error)

BuiltFromOrErr returns the BuiltFrom value or an error if the edge was not loaded in eager-loading.

func (SLSAAttestationEdges) SubjectOrErr

func (e SLSAAttestationEdges) SubjectOrErr() (*Artifact, error)

SubjectOrErr returns the Subject value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type SLSAAttestationGroupBy

type SLSAAttestationGroupBy struct {
	// contains filtered or unexported fields
}

SLSAAttestationGroupBy is the group-by builder for SLSAAttestation entities.

func (*SLSAAttestationGroupBy) Aggregate

Aggregate adds the given aggregation functions to the group-by query.

func (*SLSAAttestationGroupBy) Bool

func (s *SLSAAttestationGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*SLSAAttestationGroupBy) BoolX

func (s *SLSAAttestationGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*SLSAAttestationGroupBy) Bools

func (s *SLSAAttestationGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*SLSAAttestationGroupBy) BoolsX

func (s *SLSAAttestationGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*SLSAAttestationGroupBy) Float64

func (s *SLSAAttestationGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*SLSAAttestationGroupBy) Float64X

func (s *SLSAAttestationGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*SLSAAttestationGroupBy) Float64s

func (s *SLSAAttestationGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*SLSAAttestationGroupBy) Float64sX

func (s *SLSAAttestationGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*SLSAAttestationGroupBy) Int

func (s *SLSAAttestationGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*SLSAAttestationGroupBy) IntX

func (s *SLSAAttestationGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*SLSAAttestationGroupBy) Ints

func (s *SLSAAttestationGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*SLSAAttestationGroupBy) IntsX

func (s *SLSAAttestationGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*SLSAAttestationGroupBy) Scan

func (sagb *SLSAAttestationGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*SLSAAttestationGroupBy) ScanX

func (s *SLSAAttestationGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*SLSAAttestationGroupBy) String

func (s *SLSAAttestationGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*SLSAAttestationGroupBy) StringX

func (s *SLSAAttestationGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*SLSAAttestationGroupBy) Strings

func (s *SLSAAttestationGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*SLSAAttestationGroupBy) StringsX

func (s *SLSAAttestationGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type SLSAAttestationMutation

type SLSAAttestationMutation struct {
	// contains filtered or unexported fields
}

SLSAAttestationMutation represents an operation that mutates the SLSAAttestation nodes in the graph.

func (*SLSAAttestationMutation) AddBuiltFromIDs

func (m *SLSAAttestationMutation) AddBuiltFromIDs(ids ...uuid.UUID)

AddBuiltFromIDs adds the "built_from" edge to the Artifact entity by ids.

func (*SLSAAttestationMutation) AddField

func (m *SLSAAttestationMutation) AddField(name string, value ent.Value) error

AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*SLSAAttestationMutation) AddedEdges

func (m *SLSAAttestationMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*SLSAAttestationMutation) AddedField

func (m *SLSAAttestationMutation) AddedField(name string) (ent.Value, bool)

AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*SLSAAttestationMutation) AddedFields

func (m *SLSAAttestationMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*SLSAAttestationMutation) AddedIDs

func (m *SLSAAttestationMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*SLSAAttestationMutation) AppendSlsaPredicate

func (m *SLSAAttestationMutation) AppendSlsaPredicate(mp []*model.SLSAPredicate)

AppendSlsaPredicate adds mp to the "slsa_predicate" field.

func (*SLSAAttestationMutation) AppendedSlsaPredicate

func (m *SLSAAttestationMutation) AppendedSlsaPredicate() ([]*model.SLSAPredicate, bool)

AppendedSlsaPredicate returns the list of values that were appended to the "slsa_predicate" field in this mutation.

func (*SLSAAttestationMutation) BuildType

func (m *SLSAAttestationMutation) BuildType() (r string, exists bool)

BuildType returns the value of the "build_type" field in the mutation.

func (*SLSAAttestationMutation) BuiltByCleared

func (m *SLSAAttestationMutation) BuiltByCleared() bool

BuiltByCleared reports if the "built_by" edge to the Builder entity was cleared.

func (*SLSAAttestationMutation) BuiltByID

func (m *SLSAAttestationMutation) BuiltByID() (r uuid.UUID, exists bool)

BuiltByID returns the value of the "built_by_id" field in the mutation.

func (*SLSAAttestationMutation) BuiltByIDs

func (m *SLSAAttestationMutation) BuiltByIDs() (ids []uuid.UUID)

BuiltByIDs returns the "built_by" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use BuiltByID instead. It exists only for internal usage by the builders.

func (*SLSAAttestationMutation) BuiltFromCleared

func (m *SLSAAttestationMutation) BuiltFromCleared() bool

BuiltFromCleared reports if the "built_from" edge to the Artifact entity was cleared.

func (*SLSAAttestationMutation) BuiltFromHash

func (m *SLSAAttestationMutation) BuiltFromHash() (r string, exists bool)

BuiltFromHash returns the value of the "built_from_hash" field in the mutation.

func (*SLSAAttestationMutation) BuiltFromIDs

func (m *SLSAAttestationMutation) BuiltFromIDs() (ids []uuid.UUID)

BuiltFromIDs returns the "built_from" edge IDs in the mutation.

func (*SLSAAttestationMutation) ClearBuiltBy

func (m *SLSAAttestationMutation) ClearBuiltBy()

ClearBuiltBy clears the "built_by" edge to the Builder entity.

func (*SLSAAttestationMutation) ClearBuiltFrom

func (m *SLSAAttestationMutation) ClearBuiltFrom()

ClearBuiltFrom clears the "built_from" edge to the Artifact entity.

func (*SLSAAttestationMutation) ClearEdge

func (m *SLSAAttestationMutation) ClearEdge(name string) error

ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.

func (*SLSAAttestationMutation) ClearField

func (m *SLSAAttestationMutation) ClearField(name string) error

ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.

func (*SLSAAttestationMutation) ClearSlsaPredicate

func (m *SLSAAttestationMutation) ClearSlsaPredicate()

ClearSlsaPredicate clears the value of the "slsa_predicate" field.

func (*SLSAAttestationMutation) ClearSubject

func (m *SLSAAttestationMutation) ClearSubject()

ClearSubject clears the "subject" edge to the Artifact entity.

func (*SLSAAttestationMutation) ClearedEdges

func (m *SLSAAttestationMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*SLSAAttestationMutation) ClearedFields

func (m *SLSAAttestationMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (SLSAAttestationMutation) Client

func (m SLSAAttestationMutation) Client() *Client

Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.

func (*SLSAAttestationMutation) Collector

func (m *SLSAAttestationMutation) Collector() (r string, exists bool)

Collector returns the value of the "collector" field in the mutation.

func (*SLSAAttestationMutation) DocumentRef added in v0.6.0

func (m *SLSAAttestationMutation) DocumentRef() (r string, exists bool)

DocumentRef returns the value of the "document_ref" field in the mutation.

func (*SLSAAttestationMutation) EdgeCleared

func (m *SLSAAttestationMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*SLSAAttestationMutation) Field

func (m *SLSAAttestationMutation) Field(name string) (ent.Value, bool)

Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*SLSAAttestationMutation) FieldCleared

func (m *SLSAAttestationMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*SLSAAttestationMutation) Fields

func (m *SLSAAttestationMutation) Fields() []string

Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().

func (*SLSAAttestationMutation) FinishedOn

func (m *SLSAAttestationMutation) FinishedOn() (r time.Time, exists bool)

FinishedOn returns the value of the "finished_on" field in the mutation.

func (*SLSAAttestationMutation) ID

func (m *SLSAAttestationMutation) ID() (id uuid.UUID, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*SLSAAttestationMutation) IDs

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*SLSAAttestationMutation) OldBuildType

func (m *SLSAAttestationMutation) OldBuildType(ctx context.Context) (v string, err error)

OldBuildType returns the old "build_type" field's value of the SLSAAttestation entity. If the SLSAAttestation object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*SLSAAttestationMutation) OldBuiltByID

func (m *SLSAAttestationMutation) OldBuiltByID(ctx context.Context) (v uuid.UUID, err error)

OldBuiltByID returns the old "built_by_id" field's value of the SLSAAttestation entity. If the SLSAAttestation object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*SLSAAttestationMutation) OldBuiltFromHash

func (m *SLSAAttestationMutation) OldBuiltFromHash(ctx context.Context) (v string, err error)

OldBuiltFromHash returns the old "built_from_hash" field's value of the SLSAAttestation entity. If the SLSAAttestation object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*SLSAAttestationMutation) OldCollector

func (m *SLSAAttestationMutation) OldCollector(ctx context.Context) (v string, err error)

OldCollector returns the old "collector" field's value of the SLSAAttestation entity. If the SLSAAttestation object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*SLSAAttestationMutation) OldDocumentRef added in v0.6.0

func (m *SLSAAttestationMutation) OldDocumentRef(ctx context.Context) (v string, err error)

OldDocumentRef returns the old "document_ref" field's value of the SLSAAttestation entity. If the SLSAAttestation object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*SLSAAttestationMutation) OldField

func (m *SLSAAttestationMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*SLSAAttestationMutation) OldFinishedOn

func (m *SLSAAttestationMutation) OldFinishedOn(ctx context.Context) (v time.Time, err error)

OldFinishedOn returns the old "finished_on" field's value of the SLSAAttestation entity. If the SLSAAttestation object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*SLSAAttestationMutation) OldOrigin

func (m *SLSAAttestationMutation) OldOrigin(ctx context.Context) (v string, err error)

OldOrigin returns the old "origin" field's value of the SLSAAttestation entity. If the SLSAAttestation object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*SLSAAttestationMutation) OldSlsaPredicate

func (m *SLSAAttestationMutation) OldSlsaPredicate(ctx context.Context) (v []*model.SLSAPredicate, err error)

OldSlsaPredicate returns the old "slsa_predicate" field's value of the SLSAAttestation entity. If the SLSAAttestation object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*SLSAAttestationMutation) OldSlsaVersion

func (m *SLSAAttestationMutation) OldSlsaVersion(ctx context.Context) (v string, err error)

OldSlsaVersion returns the old "slsa_version" field's value of the SLSAAttestation entity. If the SLSAAttestation object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*SLSAAttestationMutation) OldStartedOn

func (m *SLSAAttestationMutation) OldStartedOn(ctx context.Context) (v time.Time, err error)

OldStartedOn returns the old "started_on" field's value of the SLSAAttestation entity. If the SLSAAttestation object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*SLSAAttestationMutation) OldSubjectID

func (m *SLSAAttestationMutation) OldSubjectID(ctx context.Context) (v uuid.UUID, err error)

OldSubjectID returns the old "subject_id" field's value of the SLSAAttestation entity. If the SLSAAttestation object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*SLSAAttestationMutation) Op

func (m *SLSAAttestationMutation) Op() Op

Op returns the operation name.

func (*SLSAAttestationMutation) Origin

func (m *SLSAAttestationMutation) Origin() (r string, exists bool)

Origin returns the value of the "origin" field in the mutation.

func (*SLSAAttestationMutation) RemoveBuiltFromIDs

func (m *SLSAAttestationMutation) RemoveBuiltFromIDs(ids ...uuid.UUID)

RemoveBuiltFromIDs removes the "built_from" edge to the Artifact entity by IDs.

func (*SLSAAttestationMutation) RemovedBuiltFromIDs

func (m *SLSAAttestationMutation) RemovedBuiltFromIDs() (ids []uuid.UUID)

RemovedBuiltFrom returns the removed IDs of the "built_from" edge to the Artifact entity.

func (*SLSAAttestationMutation) RemovedEdges

func (m *SLSAAttestationMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*SLSAAttestationMutation) RemovedIDs

func (m *SLSAAttestationMutation) RemovedIDs(name string) []ent.Value

RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.

func (*SLSAAttestationMutation) ResetBuildType

func (m *SLSAAttestationMutation) ResetBuildType()

ResetBuildType resets all changes to the "build_type" field.

func (*SLSAAttestationMutation) ResetBuiltBy

func (m *SLSAAttestationMutation) ResetBuiltBy()

ResetBuiltBy resets all changes to the "built_by" edge.

func (*SLSAAttestationMutation) ResetBuiltByID

func (m *SLSAAttestationMutation) ResetBuiltByID()

ResetBuiltByID resets all changes to the "built_by_id" field.

func (*SLSAAttestationMutation) ResetBuiltFrom

func (m *SLSAAttestationMutation) ResetBuiltFrom()

ResetBuiltFrom resets all changes to the "built_from" edge.

func (*SLSAAttestationMutation) ResetBuiltFromHash

func (m *SLSAAttestationMutation) ResetBuiltFromHash()

ResetBuiltFromHash resets all changes to the "built_from_hash" field.

func (*SLSAAttestationMutation) ResetCollector

func (m *SLSAAttestationMutation) ResetCollector()

ResetCollector resets all changes to the "collector" field.

func (*SLSAAttestationMutation) ResetDocumentRef added in v0.6.0

func (m *SLSAAttestationMutation) ResetDocumentRef()

ResetDocumentRef resets all changes to the "document_ref" field.

func (*SLSAAttestationMutation) ResetEdge

func (m *SLSAAttestationMutation) ResetEdge(name string) error

ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.

func (*SLSAAttestationMutation) ResetField

func (m *SLSAAttestationMutation) ResetField(name string) error

ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.

func (*SLSAAttestationMutation) ResetFinishedOn

func (m *SLSAAttestationMutation) ResetFinishedOn()

ResetFinishedOn resets all changes to the "finished_on" field.

func (*SLSAAttestationMutation) ResetOrigin

func (m *SLSAAttestationMutation) ResetOrigin()

ResetOrigin resets all changes to the "origin" field.

func (*SLSAAttestationMutation) ResetSlsaPredicate

func (m *SLSAAttestationMutation) ResetSlsaPredicate()

ResetSlsaPredicate resets all changes to the "slsa_predicate" field.

func (*SLSAAttestationMutation) ResetSlsaVersion

func (m *SLSAAttestationMutation) ResetSlsaVersion()

ResetSlsaVersion resets all changes to the "slsa_version" field.

func (*SLSAAttestationMutation) ResetStartedOn

func (m *SLSAAttestationMutation) ResetStartedOn()

ResetStartedOn resets all changes to the "started_on" field.

func (*SLSAAttestationMutation) ResetSubject

func (m *SLSAAttestationMutation) ResetSubject()

ResetSubject resets all changes to the "subject" edge.

func (*SLSAAttestationMutation) ResetSubjectID

func (m *SLSAAttestationMutation) ResetSubjectID()

ResetSubjectID resets all changes to the "subject_id" field.

func (*SLSAAttestationMutation) SetBuildType

func (m *SLSAAttestationMutation) SetBuildType(s string)

SetBuildType sets the "build_type" field.

func (*SLSAAttestationMutation) SetBuiltByID

func (m *SLSAAttestationMutation) SetBuiltByID(u uuid.UUID)

SetBuiltByID sets the "built_by_id" field.

func (*SLSAAttestationMutation) SetBuiltFromHash

func (m *SLSAAttestationMutation) SetBuiltFromHash(s string)

SetBuiltFromHash sets the "built_from_hash" field.

func (*SLSAAttestationMutation) SetCollector

func (m *SLSAAttestationMutation) SetCollector(s string)

SetCollector sets the "collector" field.

func (*SLSAAttestationMutation) SetDocumentRef added in v0.6.0

func (m *SLSAAttestationMutation) SetDocumentRef(s string)

SetDocumentRef sets the "document_ref" field.

func (*SLSAAttestationMutation) SetField

func (m *SLSAAttestationMutation) SetField(name string, value ent.Value) error

SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*SLSAAttestationMutation) SetFinishedOn

func (m *SLSAAttestationMutation) SetFinishedOn(t time.Time)

SetFinishedOn sets the "finished_on" field.

func (*SLSAAttestationMutation) SetID added in v0.5.0

func (m *SLSAAttestationMutation) SetID(id uuid.UUID)

SetID sets the value of the id field. Note that this operation is only accepted on creation of SLSAAttestation entities.

func (*SLSAAttestationMutation) SetOp

func (m *SLSAAttestationMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*SLSAAttestationMutation) SetOrigin

func (m *SLSAAttestationMutation) SetOrigin(s string)

SetOrigin sets the "origin" field.

func (*SLSAAttestationMutation) SetSlsaPredicate

func (m *SLSAAttestationMutation) SetSlsaPredicate(mp []*model.SLSAPredicate)

SetSlsaPredicate sets the "slsa_predicate" field.

func (*SLSAAttestationMutation) SetSlsaVersion

func (m *SLSAAttestationMutation) SetSlsaVersion(s string)

SetSlsaVersion sets the "slsa_version" field.

func (*SLSAAttestationMutation) SetStartedOn

func (m *SLSAAttestationMutation) SetStartedOn(t time.Time)

SetStartedOn sets the "started_on" field.

func (*SLSAAttestationMutation) SetSubjectID

func (m *SLSAAttestationMutation) SetSubjectID(u uuid.UUID)

SetSubjectID sets the "subject_id" field.

func (*SLSAAttestationMutation) SlsaPredicate

func (m *SLSAAttestationMutation) SlsaPredicate() (r []*model.SLSAPredicate, exists bool)

SlsaPredicate returns the value of the "slsa_predicate" field in the mutation.

func (*SLSAAttestationMutation) SlsaPredicateCleared

func (m *SLSAAttestationMutation) SlsaPredicateCleared() bool

SlsaPredicateCleared returns if the "slsa_predicate" field was cleared in this mutation.

func (*SLSAAttestationMutation) SlsaVersion

func (m *SLSAAttestationMutation) SlsaVersion() (r string, exists bool)

SlsaVersion returns the value of the "slsa_version" field in the mutation.

func (*SLSAAttestationMutation) StartedOn

func (m *SLSAAttestationMutation) StartedOn() (r time.Time, exists bool)

StartedOn returns the value of the "started_on" field in the mutation.

func (*SLSAAttestationMutation) SubjectCleared

func (m *SLSAAttestationMutation) SubjectCleared() bool

SubjectCleared reports if the "subject" edge to the Artifact entity was cleared.

func (*SLSAAttestationMutation) SubjectID

func (m *SLSAAttestationMutation) SubjectID() (r uuid.UUID, exists bool)

SubjectID returns the value of the "subject_id" field in the mutation.

func (*SLSAAttestationMutation) SubjectIDs

func (m *SLSAAttestationMutation) SubjectIDs() (ids []uuid.UUID)

SubjectIDs returns the "subject" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use SubjectID instead. It exists only for internal usage by the builders.

func (SLSAAttestationMutation) Tx

func (m SLSAAttestationMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*SLSAAttestationMutation) Type

func (m *SLSAAttestationMutation) Type() string

Type returns the node type of this mutation (SLSAAttestation).

func (*SLSAAttestationMutation) Where

Where appends a list predicates to the SLSAAttestationMutation builder.

func (*SLSAAttestationMutation) WhereP

func (m *SLSAAttestationMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the SLSAAttestationMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type SLSAAttestationOrder

type SLSAAttestationOrder struct {
	Direction OrderDirection             `json:"direction"`
	Field     *SLSAAttestationOrderField `json:"field"`
}

SLSAAttestationOrder defines the ordering of SLSAAttestation.

type SLSAAttestationOrderField

type SLSAAttestationOrderField struct {
	// Value extracts the ordering value from the given SLSAAttestation.
	Value func(*SLSAAttestation) (ent.Value, error)
	// contains filtered or unexported fields
}

SLSAAttestationOrderField defines the ordering field of SLSAAttestation.

type SLSAAttestationPaginateOption

type SLSAAttestationPaginateOption func(*slsaattestationPager) error

SLSAAttestationPaginateOption enables pagination customization.

func WithSLSAAttestationFilter

func WithSLSAAttestationFilter(filter func(*SLSAAttestationQuery) (*SLSAAttestationQuery, error)) SLSAAttestationPaginateOption

WithSLSAAttestationFilter configures pagination filter.

func WithSLSAAttestationOrder

func WithSLSAAttestationOrder(order *SLSAAttestationOrder) SLSAAttestationPaginateOption

WithSLSAAttestationOrder configures pagination ordering.

type SLSAAttestationQuery

type SLSAAttestationQuery struct {
	// contains filtered or unexported fields
}

SLSAAttestationQuery is the builder for querying SLSAAttestation entities.

func (*SLSAAttestationQuery) Aggregate

Aggregate returns a SLSAAttestationSelect configured with the given aggregations.

func (*SLSAAttestationQuery) All

All executes the query and returns a list of SLSAAttestations.

func (*SLSAAttestationQuery) AllX

AllX is like All, but panics if an error occurs.

func (*SLSAAttestationQuery) Clone

Clone returns a duplicate of the SLSAAttestationQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*SLSAAttestationQuery) CollectFields

func (sa *SLSAAttestationQuery) CollectFields(ctx context.Context, satisfies ...string) (*SLSAAttestationQuery, error)

CollectFields tells the query-builder to eagerly load connected nodes by resolver context.

func (*SLSAAttestationQuery) Count

func (saq *SLSAAttestationQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*SLSAAttestationQuery) CountX

func (saq *SLSAAttestationQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*SLSAAttestationQuery) Exist

func (saq *SLSAAttestationQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*SLSAAttestationQuery) ExistX

func (saq *SLSAAttestationQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*SLSAAttestationQuery) First

First returns the first SLSAAttestation entity from the query. Returns a *NotFoundError when no SLSAAttestation was found.

func (*SLSAAttestationQuery) FirstID

func (saq *SLSAAttestationQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)

FirstID returns the first SLSAAttestation ID from the query. Returns a *NotFoundError when no SLSAAttestation ID was found.

func (*SLSAAttestationQuery) FirstIDX

func (saq *SLSAAttestationQuery) FirstIDX(ctx context.Context) uuid.UUID

FirstIDX is like FirstID, but panics if an error occurs.

func (*SLSAAttestationQuery) FirstX

FirstX is like First, but panics if an error occurs.

func (*SLSAAttestationQuery) GroupBy

func (saq *SLSAAttestationQuery) GroupBy(field string, fields ...string) *SLSAAttestationGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	BuildType string `json:"build_type,omitempty"`
	Count int `json:"count,omitempty"`
}

client.SLSAAttestation.Query().
	GroupBy(slsaattestation.FieldBuildType).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*SLSAAttestationQuery) IDs

func (saq *SLSAAttestationQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)

IDs executes the query and returns a list of SLSAAttestation IDs.

func (*SLSAAttestationQuery) IDsX

func (saq *SLSAAttestationQuery) IDsX(ctx context.Context) []uuid.UUID

IDsX is like IDs, but panics if an error occurs.

func (*SLSAAttestationQuery) Limit

func (saq *SLSAAttestationQuery) Limit(limit int) *SLSAAttestationQuery

Limit the number of records to be returned by this query.

func (*SLSAAttestationQuery) Offset

func (saq *SLSAAttestationQuery) Offset(offset int) *SLSAAttestationQuery

Offset to start from.

func (*SLSAAttestationQuery) Only

Only returns a single SLSAAttestation entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one SLSAAttestation entity is found. Returns a *NotFoundError when no SLSAAttestation entities are found.

func (*SLSAAttestationQuery) OnlyID

func (saq *SLSAAttestationQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)

OnlyID is like Only, but returns the only SLSAAttestation ID in the query. Returns a *NotSingularError when more than one SLSAAttestation ID is found. Returns a *NotFoundError when no entities are found.

func (*SLSAAttestationQuery) OnlyIDX

func (saq *SLSAAttestationQuery) OnlyIDX(ctx context.Context) uuid.UUID

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*SLSAAttestationQuery) OnlyX

OnlyX is like Only, but panics if an error occurs.

func (*SLSAAttestationQuery) Order

Order specifies how the records should be ordered.

func (*SLSAAttestationQuery) Paginate

func (sa *SLSAAttestationQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...SLSAAttestationPaginateOption,
) (*SLSAAttestationConnection, error)

Paginate executes the query and returns a relay based cursor connection to SLSAAttestation.

func (*SLSAAttestationQuery) QueryBuiltBy

func (saq *SLSAAttestationQuery) QueryBuiltBy() *BuilderQuery

QueryBuiltBy chains the current query on the "built_by" edge.

func (*SLSAAttestationQuery) QueryBuiltFrom

func (saq *SLSAAttestationQuery) QueryBuiltFrom() *ArtifactQuery

QueryBuiltFrom chains the current query on the "built_from" edge.

func (*SLSAAttestationQuery) QuerySubject

func (saq *SLSAAttestationQuery) QuerySubject() *ArtifactQuery

QuerySubject chains the current query on the "subject" edge.

func (*SLSAAttestationQuery) Select

func (saq *SLSAAttestationQuery) Select(fields ...string) *SLSAAttestationSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	BuildType string `json:"build_type,omitempty"`
}

client.SLSAAttestation.Query().
	Select(slsaattestation.FieldBuildType).
	Scan(ctx, &v)

func (*SLSAAttestationQuery) Unique

func (saq *SLSAAttestationQuery) Unique(unique bool) *SLSAAttestationQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*SLSAAttestationQuery) Where

Where adds a new predicate for the SLSAAttestationQuery builder.

func (*SLSAAttestationQuery) WithBuiltBy

func (saq *SLSAAttestationQuery) WithBuiltBy(opts ...func(*BuilderQuery)) *SLSAAttestationQuery

WithBuiltBy tells the query-builder to eager-load the nodes that are connected to the "built_by" edge. The optional arguments are used to configure the query builder of the edge.

func (*SLSAAttestationQuery) WithBuiltFrom

func (saq *SLSAAttestationQuery) WithBuiltFrom(opts ...func(*ArtifactQuery)) *SLSAAttestationQuery

WithBuiltFrom tells the query-builder to eager-load the nodes that are connected to the "built_from" edge. The optional arguments are used to configure the query builder of the edge.

func (*SLSAAttestationQuery) WithNamedBuiltFrom

func (saq *SLSAAttestationQuery) WithNamedBuiltFrom(name string, opts ...func(*ArtifactQuery)) *SLSAAttestationQuery

WithNamedBuiltFrom tells the query-builder to eager-load the nodes that are connected to the "built_from" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*SLSAAttestationQuery) WithSubject

func (saq *SLSAAttestationQuery) WithSubject(opts ...func(*ArtifactQuery)) *SLSAAttestationQuery

WithSubject tells the query-builder to eager-load the nodes that are connected to the "subject" edge. The optional arguments are used to configure the query builder of the edge.

type SLSAAttestationSelect

type SLSAAttestationSelect struct {
	*SLSAAttestationQuery
	// contains filtered or unexported fields
}

SLSAAttestationSelect is the builder for selecting fields of SLSAAttestation entities.

func (*SLSAAttestationSelect) Aggregate

Aggregate adds the given aggregation functions to the selector query.

func (*SLSAAttestationSelect) Bool

func (s *SLSAAttestationSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*SLSAAttestationSelect) BoolX

func (s *SLSAAttestationSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*SLSAAttestationSelect) Bools

func (s *SLSAAttestationSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*SLSAAttestationSelect) BoolsX

func (s *SLSAAttestationSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*SLSAAttestationSelect) Float64

func (s *SLSAAttestationSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*SLSAAttestationSelect) Float64X

func (s *SLSAAttestationSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*SLSAAttestationSelect) Float64s

func (s *SLSAAttestationSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*SLSAAttestationSelect) Float64sX

func (s *SLSAAttestationSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*SLSAAttestationSelect) Int

func (s *SLSAAttestationSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*SLSAAttestationSelect) IntX

func (s *SLSAAttestationSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*SLSAAttestationSelect) Ints

func (s *SLSAAttestationSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*SLSAAttestationSelect) IntsX

func (s *SLSAAttestationSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*SLSAAttestationSelect) Scan

func (sas *SLSAAttestationSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*SLSAAttestationSelect) ScanX

func (s *SLSAAttestationSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*SLSAAttestationSelect) String

func (s *SLSAAttestationSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*SLSAAttestationSelect) StringX

func (s *SLSAAttestationSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*SLSAAttestationSelect) Strings

func (s *SLSAAttestationSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*SLSAAttestationSelect) StringsX

func (s *SLSAAttestationSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type SLSAAttestationUpdate

type SLSAAttestationUpdate struct {
	// contains filtered or unexported fields
}

SLSAAttestationUpdate is the builder for updating SLSAAttestation entities.

func (*SLSAAttestationUpdate) AddBuiltFrom

func (sau *SLSAAttestationUpdate) AddBuiltFrom(a ...*Artifact) *SLSAAttestationUpdate

AddBuiltFrom adds the "built_from" edges to the Artifact entity.

func (*SLSAAttestationUpdate) AddBuiltFromIDs

func (sau *SLSAAttestationUpdate) AddBuiltFromIDs(ids ...uuid.UUID) *SLSAAttestationUpdate

AddBuiltFromIDs adds the "built_from" edge to the Artifact entity by IDs.

func (*SLSAAttestationUpdate) AppendSlsaPredicate

func (sau *SLSAAttestationUpdate) AppendSlsaPredicate(mp []*model.SLSAPredicate) *SLSAAttestationUpdate

AppendSlsaPredicate appends mp to the "slsa_predicate" field.

func (*SLSAAttestationUpdate) ClearBuiltBy

func (sau *SLSAAttestationUpdate) ClearBuiltBy() *SLSAAttestationUpdate

ClearBuiltBy clears the "built_by" edge to the Builder entity.

func (*SLSAAttestationUpdate) ClearBuiltFrom

func (sau *SLSAAttestationUpdate) ClearBuiltFrom() *SLSAAttestationUpdate

ClearBuiltFrom clears all "built_from" edges to the Artifact entity.

func (*SLSAAttestationUpdate) ClearSlsaPredicate

func (sau *SLSAAttestationUpdate) ClearSlsaPredicate() *SLSAAttestationUpdate

ClearSlsaPredicate clears the value of the "slsa_predicate" field.

func (*SLSAAttestationUpdate) ClearSubject

func (sau *SLSAAttestationUpdate) ClearSubject() *SLSAAttestationUpdate

ClearSubject clears the "subject" edge to the Artifact entity.

func (*SLSAAttestationUpdate) Exec

func (sau *SLSAAttestationUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*SLSAAttestationUpdate) ExecX

func (sau *SLSAAttestationUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SLSAAttestationUpdate) Mutation

Mutation returns the SLSAAttestationMutation object of the builder.

func (*SLSAAttestationUpdate) RemoveBuiltFrom

func (sau *SLSAAttestationUpdate) RemoveBuiltFrom(a ...*Artifact) *SLSAAttestationUpdate

RemoveBuiltFrom removes "built_from" edges to Artifact entities.

func (*SLSAAttestationUpdate) RemoveBuiltFromIDs

func (sau *SLSAAttestationUpdate) RemoveBuiltFromIDs(ids ...uuid.UUID) *SLSAAttestationUpdate

RemoveBuiltFromIDs removes the "built_from" edge to Artifact entities by IDs.

func (*SLSAAttestationUpdate) Save

func (sau *SLSAAttestationUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*SLSAAttestationUpdate) SaveX

func (sau *SLSAAttestationUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*SLSAAttestationUpdate) SetBuildType

func (sau *SLSAAttestationUpdate) SetBuildType(s string) *SLSAAttestationUpdate

SetBuildType sets the "build_type" field.

func (*SLSAAttestationUpdate) SetBuiltBy

SetBuiltBy sets the "built_by" edge to the Builder entity.

func (*SLSAAttestationUpdate) SetBuiltByID

func (sau *SLSAAttestationUpdate) SetBuiltByID(u uuid.UUID) *SLSAAttestationUpdate

SetBuiltByID sets the "built_by_id" field.

func (*SLSAAttestationUpdate) SetBuiltFromHash

func (sau *SLSAAttestationUpdate) SetBuiltFromHash(s string) *SLSAAttestationUpdate

SetBuiltFromHash sets the "built_from_hash" field.

func (*SLSAAttestationUpdate) SetCollector

func (sau *SLSAAttestationUpdate) SetCollector(s string) *SLSAAttestationUpdate

SetCollector sets the "collector" field.

func (*SLSAAttestationUpdate) SetDocumentRef added in v0.6.0

func (sau *SLSAAttestationUpdate) SetDocumentRef(s string) *SLSAAttestationUpdate

SetDocumentRef sets the "document_ref" field.

func (*SLSAAttestationUpdate) SetFinishedOn

func (sau *SLSAAttestationUpdate) SetFinishedOn(t time.Time) *SLSAAttestationUpdate

SetFinishedOn sets the "finished_on" field.

func (*SLSAAttestationUpdate) SetNillableBuildType added in v0.4.0

func (sau *SLSAAttestationUpdate) SetNillableBuildType(s *string) *SLSAAttestationUpdate

SetNillableBuildType sets the "build_type" field if the given value is not nil.

func (*SLSAAttestationUpdate) SetNillableBuiltByID added in v0.4.0

func (sau *SLSAAttestationUpdate) SetNillableBuiltByID(u *uuid.UUID) *SLSAAttestationUpdate

SetNillableBuiltByID sets the "built_by_id" field if the given value is not nil.

func (*SLSAAttestationUpdate) SetNillableBuiltFromHash added in v0.4.0

func (sau *SLSAAttestationUpdate) SetNillableBuiltFromHash(s *string) *SLSAAttestationUpdate

SetNillableBuiltFromHash sets the "built_from_hash" field if the given value is not nil.

func (*SLSAAttestationUpdate) SetNillableCollector added in v0.4.0

func (sau *SLSAAttestationUpdate) SetNillableCollector(s *string) *SLSAAttestationUpdate

SetNillableCollector sets the "collector" field if the given value is not nil.

func (*SLSAAttestationUpdate) SetNillableDocumentRef added in v0.6.0

func (sau *SLSAAttestationUpdate) SetNillableDocumentRef(s *string) *SLSAAttestationUpdate

SetNillableDocumentRef sets the "document_ref" field if the given value is not nil.

func (*SLSAAttestationUpdate) SetNillableFinishedOn

func (sau *SLSAAttestationUpdate) SetNillableFinishedOn(t *time.Time) *SLSAAttestationUpdate

SetNillableFinishedOn sets the "finished_on" field if the given value is not nil.

func (*SLSAAttestationUpdate) SetNillableOrigin added in v0.4.0

func (sau *SLSAAttestationUpdate) SetNillableOrigin(s *string) *SLSAAttestationUpdate

SetNillableOrigin sets the "origin" field if the given value is not nil.

func (*SLSAAttestationUpdate) SetNillableSlsaVersion added in v0.4.0

func (sau *SLSAAttestationUpdate) SetNillableSlsaVersion(s *string) *SLSAAttestationUpdate

SetNillableSlsaVersion sets the "slsa_version" field if the given value is not nil.

func (*SLSAAttestationUpdate) SetNillableStartedOn

func (sau *SLSAAttestationUpdate) SetNillableStartedOn(t *time.Time) *SLSAAttestationUpdate

SetNillableStartedOn sets the "started_on" field if the given value is not nil.

func (*SLSAAttestationUpdate) SetNillableSubjectID added in v0.4.0

func (sau *SLSAAttestationUpdate) SetNillableSubjectID(u *uuid.UUID) *SLSAAttestationUpdate

SetNillableSubjectID sets the "subject_id" field if the given value is not nil.

func (*SLSAAttestationUpdate) SetOrigin

SetOrigin sets the "origin" field.

func (*SLSAAttestationUpdate) SetSlsaPredicate

func (sau *SLSAAttestationUpdate) SetSlsaPredicate(mp []*model.SLSAPredicate) *SLSAAttestationUpdate

SetSlsaPredicate sets the "slsa_predicate" field.

func (*SLSAAttestationUpdate) SetSlsaVersion

func (sau *SLSAAttestationUpdate) SetSlsaVersion(s string) *SLSAAttestationUpdate

SetSlsaVersion sets the "slsa_version" field.

func (*SLSAAttestationUpdate) SetStartedOn

func (sau *SLSAAttestationUpdate) SetStartedOn(t time.Time) *SLSAAttestationUpdate

SetStartedOn sets the "started_on" field.

func (*SLSAAttestationUpdate) SetSubject

SetSubject sets the "subject" edge to the Artifact entity.

func (*SLSAAttestationUpdate) SetSubjectID

func (sau *SLSAAttestationUpdate) SetSubjectID(u uuid.UUID) *SLSAAttestationUpdate

SetSubjectID sets the "subject_id" field.

func (*SLSAAttestationUpdate) Where

Where appends a list predicates to the SLSAAttestationUpdate builder.

type SLSAAttestationUpdateOne

type SLSAAttestationUpdateOne struct {
	// contains filtered or unexported fields
}

SLSAAttestationUpdateOne is the builder for updating a single SLSAAttestation entity.

func (*SLSAAttestationUpdateOne) AddBuiltFrom

func (sauo *SLSAAttestationUpdateOne) AddBuiltFrom(a ...*Artifact) *SLSAAttestationUpdateOne

AddBuiltFrom adds the "built_from" edges to the Artifact entity.

func (*SLSAAttestationUpdateOne) AddBuiltFromIDs

func (sauo *SLSAAttestationUpdateOne) AddBuiltFromIDs(ids ...uuid.UUID) *SLSAAttestationUpdateOne

AddBuiltFromIDs adds the "built_from" edge to the Artifact entity by IDs.

func (*SLSAAttestationUpdateOne) AppendSlsaPredicate

func (sauo *SLSAAttestationUpdateOne) AppendSlsaPredicate(mp []*model.SLSAPredicate) *SLSAAttestationUpdateOne

AppendSlsaPredicate appends mp to the "slsa_predicate" field.

func (*SLSAAttestationUpdateOne) ClearBuiltBy

func (sauo *SLSAAttestationUpdateOne) ClearBuiltBy() *SLSAAttestationUpdateOne

ClearBuiltBy clears the "built_by" edge to the Builder entity.

func (*SLSAAttestationUpdateOne) ClearBuiltFrom

func (sauo *SLSAAttestationUpdateOne) ClearBuiltFrom() *SLSAAttestationUpdateOne

ClearBuiltFrom clears all "built_from" edges to the Artifact entity.

func (*SLSAAttestationUpdateOne) ClearSlsaPredicate

func (sauo *SLSAAttestationUpdateOne) ClearSlsaPredicate() *SLSAAttestationUpdateOne

ClearSlsaPredicate clears the value of the "slsa_predicate" field.

func (*SLSAAttestationUpdateOne) ClearSubject

func (sauo *SLSAAttestationUpdateOne) ClearSubject() *SLSAAttestationUpdateOne

ClearSubject clears the "subject" edge to the Artifact entity.

func (*SLSAAttestationUpdateOne) Exec

Exec executes the query on the entity.

func (*SLSAAttestationUpdateOne) ExecX

func (sauo *SLSAAttestationUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SLSAAttestationUpdateOne) Mutation

Mutation returns the SLSAAttestationMutation object of the builder.

func (*SLSAAttestationUpdateOne) RemoveBuiltFrom

func (sauo *SLSAAttestationUpdateOne) RemoveBuiltFrom(a ...*Artifact) *SLSAAttestationUpdateOne

RemoveBuiltFrom removes "built_from" edges to Artifact entities.

func (*SLSAAttestationUpdateOne) RemoveBuiltFromIDs

func (sauo *SLSAAttestationUpdateOne) RemoveBuiltFromIDs(ids ...uuid.UUID) *SLSAAttestationUpdateOne

RemoveBuiltFromIDs removes the "built_from" edge to Artifact entities by IDs.

func (*SLSAAttestationUpdateOne) Save

Save executes the query and returns the updated SLSAAttestation entity.

func (*SLSAAttestationUpdateOne) SaveX

SaveX is like Save, but panics if an error occurs.

func (*SLSAAttestationUpdateOne) Select

func (sauo *SLSAAttestationUpdateOne) Select(field string, fields ...string) *SLSAAttestationUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*SLSAAttestationUpdateOne) SetBuildType

SetBuildType sets the "build_type" field.

func (*SLSAAttestationUpdateOne) SetBuiltBy

SetBuiltBy sets the "built_by" edge to the Builder entity.

func (*SLSAAttestationUpdateOne) SetBuiltByID

SetBuiltByID sets the "built_by_id" field.

func (*SLSAAttestationUpdateOne) SetBuiltFromHash

func (sauo *SLSAAttestationUpdateOne) SetBuiltFromHash(s string) *SLSAAttestationUpdateOne

SetBuiltFromHash sets the "built_from_hash" field.

func (*SLSAAttestationUpdateOne) SetCollector

SetCollector sets the "collector" field.

func (*SLSAAttestationUpdateOne) SetDocumentRef added in v0.6.0

func (sauo *SLSAAttestationUpdateOne) SetDocumentRef(s string) *SLSAAttestationUpdateOne

SetDocumentRef sets the "document_ref" field.

func (*SLSAAttestationUpdateOne) SetFinishedOn

SetFinishedOn sets the "finished_on" field.

func (*SLSAAttestationUpdateOne) SetNillableBuildType added in v0.4.0

func (sauo *SLSAAttestationUpdateOne) SetNillableBuildType(s *string) *SLSAAttestationUpdateOne

SetNillableBuildType sets the "build_type" field if the given value is not nil.

func (*SLSAAttestationUpdateOne) SetNillableBuiltByID added in v0.4.0

func (sauo *SLSAAttestationUpdateOne) SetNillableBuiltByID(u *uuid.UUID) *SLSAAttestationUpdateOne

SetNillableBuiltByID sets the "built_by_id" field if the given value is not nil.

func (*SLSAAttestationUpdateOne) SetNillableBuiltFromHash added in v0.4.0

func (sauo *SLSAAttestationUpdateOne) SetNillableBuiltFromHash(s *string) *SLSAAttestationUpdateOne

SetNillableBuiltFromHash sets the "built_from_hash" field if the given value is not nil.

func (*SLSAAttestationUpdateOne) SetNillableCollector added in v0.4.0

func (sauo *SLSAAttestationUpdateOne) SetNillableCollector(s *string) *SLSAAttestationUpdateOne

SetNillableCollector sets the "collector" field if the given value is not nil.

func (*SLSAAttestationUpdateOne) SetNillableDocumentRef added in v0.6.0

func (sauo *SLSAAttestationUpdateOne) SetNillableDocumentRef(s *string) *SLSAAttestationUpdateOne

SetNillableDocumentRef sets the "document_ref" field if the given value is not nil.

func (*SLSAAttestationUpdateOne) SetNillableFinishedOn

func (sauo *SLSAAttestationUpdateOne) SetNillableFinishedOn(t *time.Time) *SLSAAttestationUpdateOne

SetNillableFinishedOn sets the "finished_on" field if the given value is not nil.

func (*SLSAAttestationUpdateOne) SetNillableOrigin added in v0.4.0

func (sauo *SLSAAttestationUpdateOne) SetNillableOrigin(s *string) *SLSAAttestationUpdateOne

SetNillableOrigin sets the "origin" field if the given value is not nil.

func (*SLSAAttestationUpdateOne) SetNillableSlsaVersion added in v0.4.0

func (sauo *SLSAAttestationUpdateOne) SetNillableSlsaVersion(s *string) *SLSAAttestationUpdateOne

SetNillableSlsaVersion sets the "slsa_version" field if the given value is not nil.

func (*SLSAAttestationUpdateOne) SetNillableStartedOn

func (sauo *SLSAAttestationUpdateOne) SetNillableStartedOn(t *time.Time) *SLSAAttestationUpdateOne

SetNillableStartedOn sets the "started_on" field if the given value is not nil.

func (*SLSAAttestationUpdateOne) SetNillableSubjectID added in v0.4.0

func (sauo *SLSAAttestationUpdateOne) SetNillableSubjectID(u *uuid.UUID) *SLSAAttestationUpdateOne

SetNillableSubjectID sets the "subject_id" field if the given value is not nil.

func (*SLSAAttestationUpdateOne) SetOrigin

SetOrigin sets the "origin" field.

func (*SLSAAttestationUpdateOne) SetSlsaPredicate

SetSlsaPredicate sets the "slsa_predicate" field.

func (*SLSAAttestationUpdateOne) SetSlsaVersion

func (sauo *SLSAAttestationUpdateOne) SetSlsaVersion(s string) *SLSAAttestationUpdateOne

SetSlsaVersion sets the "slsa_version" field.

func (*SLSAAttestationUpdateOne) SetStartedOn

SetStartedOn sets the "started_on" field.

func (*SLSAAttestationUpdateOne) SetSubject

SetSubject sets the "subject" edge to the Artifact entity.

func (*SLSAAttestationUpdateOne) SetSubjectID

SetSubjectID sets the "subject_id" field.

func (*SLSAAttestationUpdateOne) Where

Where appends a list predicates to the SLSAAttestationUpdate builder.

type SLSAAttestationUpsert

type SLSAAttestationUpsert struct {
	*sql.UpdateSet
}

SLSAAttestationUpsert is the "OnConflict" setter.

func (*SLSAAttestationUpsert) ClearSlsaPredicate

func (u *SLSAAttestationUpsert) ClearSlsaPredicate() *SLSAAttestationUpsert

ClearSlsaPredicate clears the value of the "slsa_predicate" field.

func (*SLSAAttestationUpsert) SetBuildType

SetBuildType sets the "build_type" field.

func (*SLSAAttestationUpsert) SetBuiltByID

SetBuiltByID sets the "built_by_id" field.

func (*SLSAAttestationUpsert) SetBuiltFromHash

func (u *SLSAAttestationUpsert) SetBuiltFromHash(v string) *SLSAAttestationUpsert

SetBuiltFromHash sets the "built_from_hash" field.

func (*SLSAAttestationUpsert) SetCollector

SetCollector sets the "collector" field.

func (*SLSAAttestationUpsert) SetDocumentRef added in v0.6.0

func (u *SLSAAttestationUpsert) SetDocumentRef(v string) *SLSAAttestationUpsert

SetDocumentRef sets the "document_ref" field.

func (*SLSAAttestationUpsert) SetFinishedOn

SetFinishedOn sets the "finished_on" field.

func (*SLSAAttestationUpsert) SetOrigin

SetOrigin sets the "origin" field.

func (*SLSAAttestationUpsert) SetSlsaPredicate

SetSlsaPredicate sets the "slsa_predicate" field.

func (*SLSAAttestationUpsert) SetSlsaVersion

func (u *SLSAAttestationUpsert) SetSlsaVersion(v string) *SLSAAttestationUpsert

SetSlsaVersion sets the "slsa_version" field.

func (*SLSAAttestationUpsert) SetStartedOn

SetStartedOn sets the "started_on" field.

func (*SLSAAttestationUpsert) SetSubjectID

SetSubjectID sets the "subject_id" field.

func (*SLSAAttestationUpsert) UpdateBuildType

func (u *SLSAAttestationUpsert) UpdateBuildType() *SLSAAttestationUpsert

UpdateBuildType sets the "build_type" field to the value that was provided on create.

func (*SLSAAttestationUpsert) UpdateBuiltByID

func (u *SLSAAttestationUpsert) UpdateBuiltByID() *SLSAAttestationUpsert

UpdateBuiltByID sets the "built_by_id" field to the value that was provided on create.

func (*SLSAAttestationUpsert) UpdateBuiltFromHash

func (u *SLSAAttestationUpsert) UpdateBuiltFromHash() *SLSAAttestationUpsert

UpdateBuiltFromHash sets the "built_from_hash" field to the value that was provided on create.

func (*SLSAAttestationUpsert) UpdateCollector

func (u *SLSAAttestationUpsert) UpdateCollector() *SLSAAttestationUpsert

UpdateCollector sets the "collector" field to the value that was provided on create.

func (*SLSAAttestationUpsert) UpdateDocumentRef added in v0.6.0

func (u *SLSAAttestationUpsert) UpdateDocumentRef() *SLSAAttestationUpsert

UpdateDocumentRef sets the "document_ref" field to the value that was provided on create.

func (*SLSAAttestationUpsert) UpdateFinishedOn

func (u *SLSAAttestationUpsert) UpdateFinishedOn() *SLSAAttestationUpsert

UpdateFinishedOn sets the "finished_on" field to the value that was provided on create.

func (*SLSAAttestationUpsert) UpdateOrigin

func (u *SLSAAttestationUpsert) UpdateOrigin() *SLSAAttestationUpsert

UpdateOrigin sets the "origin" field to the value that was provided on create.

func (*SLSAAttestationUpsert) UpdateSlsaPredicate

func (u *SLSAAttestationUpsert) UpdateSlsaPredicate() *SLSAAttestationUpsert

UpdateSlsaPredicate sets the "slsa_predicate" field to the value that was provided on create.

func (*SLSAAttestationUpsert) UpdateSlsaVersion

func (u *SLSAAttestationUpsert) UpdateSlsaVersion() *SLSAAttestationUpsert

UpdateSlsaVersion sets the "slsa_version" field to the value that was provided on create.

func (*SLSAAttestationUpsert) UpdateStartedOn

func (u *SLSAAttestationUpsert) UpdateStartedOn() *SLSAAttestationUpsert

UpdateStartedOn sets the "started_on" field to the value that was provided on create.

func (*SLSAAttestationUpsert) UpdateSubjectID

func (u *SLSAAttestationUpsert) UpdateSubjectID() *SLSAAttestationUpsert

UpdateSubjectID sets the "subject_id" field to the value that was provided on create.

type SLSAAttestationUpsertBulk

type SLSAAttestationUpsertBulk struct {
	// contains filtered or unexported fields
}

SLSAAttestationUpsertBulk is the builder for "upsert"-ing a bulk of SLSAAttestation nodes.

func (*SLSAAttestationUpsertBulk) ClearSlsaPredicate

func (u *SLSAAttestationUpsertBulk) ClearSlsaPredicate() *SLSAAttestationUpsertBulk

ClearSlsaPredicate clears the value of the "slsa_predicate" field.

func (*SLSAAttestationUpsertBulk) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*SLSAAttestationUpsertBulk) Exec

Exec executes the query.

func (*SLSAAttestationUpsertBulk) ExecX

ExecX is like Exec, but panics if an error occurs.

func (*SLSAAttestationUpsertBulk) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.SLSAAttestation.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*SLSAAttestationUpsertBulk) SetBuildType

SetBuildType sets the "build_type" field.

func (*SLSAAttestationUpsertBulk) SetBuiltByID

SetBuiltByID sets the "built_by_id" field.

func (*SLSAAttestationUpsertBulk) SetBuiltFromHash

SetBuiltFromHash sets the "built_from_hash" field.

func (*SLSAAttestationUpsertBulk) SetCollector

SetCollector sets the "collector" field.

func (*SLSAAttestationUpsertBulk) SetDocumentRef added in v0.6.0

SetDocumentRef sets the "document_ref" field.

func (*SLSAAttestationUpsertBulk) SetFinishedOn

SetFinishedOn sets the "finished_on" field.

func (*SLSAAttestationUpsertBulk) SetOrigin

SetOrigin sets the "origin" field.

func (*SLSAAttestationUpsertBulk) SetSlsaPredicate

SetSlsaPredicate sets the "slsa_predicate" field.

func (*SLSAAttestationUpsertBulk) SetSlsaVersion

SetSlsaVersion sets the "slsa_version" field.

func (*SLSAAttestationUpsertBulk) SetStartedOn

SetStartedOn sets the "started_on" field.

func (*SLSAAttestationUpsertBulk) SetSubjectID

SetSubjectID sets the "subject_id" field.

func (*SLSAAttestationUpsertBulk) Update

Update allows overriding fields `UPDATE` values. See the SLSAAttestationCreateBulk.OnConflict documentation for more info.

func (*SLSAAttestationUpsertBulk) UpdateBuildType

UpdateBuildType sets the "build_type" field to the value that was provided on create.

func (*SLSAAttestationUpsertBulk) UpdateBuiltByID

UpdateBuiltByID sets the "built_by_id" field to the value that was provided on create.

func (*SLSAAttestationUpsertBulk) UpdateBuiltFromHash

func (u *SLSAAttestationUpsertBulk) UpdateBuiltFromHash() *SLSAAttestationUpsertBulk

UpdateBuiltFromHash sets the "built_from_hash" field to the value that was provided on create.

func (*SLSAAttestationUpsertBulk) UpdateCollector

UpdateCollector sets the "collector" field to the value that was provided on create.

func (*SLSAAttestationUpsertBulk) UpdateDocumentRef added in v0.6.0

func (u *SLSAAttestationUpsertBulk) UpdateDocumentRef() *SLSAAttestationUpsertBulk

UpdateDocumentRef sets the "document_ref" field to the value that was provided on create.

func (*SLSAAttestationUpsertBulk) UpdateFinishedOn

UpdateFinishedOn sets the "finished_on" field to the value that was provided on create.

func (*SLSAAttestationUpsertBulk) UpdateNewValues

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.SLSAAttestation.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(slsaattestation.FieldID)
		}),
	).
	Exec(ctx)

func (*SLSAAttestationUpsertBulk) UpdateOrigin

UpdateOrigin sets the "origin" field to the value that was provided on create.

func (*SLSAAttestationUpsertBulk) UpdateSlsaPredicate

func (u *SLSAAttestationUpsertBulk) UpdateSlsaPredicate() *SLSAAttestationUpsertBulk

UpdateSlsaPredicate sets the "slsa_predicate" field to the value that was provided on create.

func (*SLSAAttestationUpsertBulk) UpdateSlsaVersion

func (u *SLSAAttestationUpsertBulk) UpdateSlsaVersion() *SLSAAttestationUpsertBulk

UpdateSlsaVersion sets the "slsa_version" field to the value that was provided on create.

func (*SLSAAttestationUpsertBulk) UpdateStartedOn

UpdateStartedOn sets the "started_on" field to the value that was provided on create.

func (*SLSAAttestationUpsertBulk) UpdateSubjectID

UpdateSubjectID sets the "subject_id" field to the value that was provided on create.

type SLSAAttestationUpsertOne

type SLSAAttestationUpsertOne struct {
	// contains filtered or unexported fields
}

SLSAAttestationUpsertOne is the builder for "upsert"-ing

one SLSAAttestation node.

func (*SLSAAttestationUpsertOne) ClearSlsaPredicate

func (u *SLSAAttestationUpsertOne) ClearSlsaPredicate() *SLSAAttestationUpsertOne

ClearSlsaPredicate clears the value of the "slsa_predicate" field.

func (*SLSAAttestationUpsertOne) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*SLSAAttestationUpsertOne) Exec

Exec executes the query.

func (*SLSAAttestationUpsertOne) ExecX

ExecX is like Exec, but panics if an error occurs.

func (*SLSAAttestationUpsertOne) ID

func (u *SLSAAttestationUpsertOne) ID(ctx context.Context) (id uuid.UUID, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*SLSAAttestationUpsertOne) IDX

IDX is like ID, but panics if an error occurs.

func (*SLSAAttestationUpsertOne) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.SLSAAttestation.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*SLSAAttestationUpsertOne) SetBuildType

SetBuildType sets the "build_type" field.

func (*SLSAAttestationUpsertOne) SetBuiltByID

SetBuiltByID sets the "built_by_id" field.

func (*SLSAAttestationUpsertOne) SetBuiltFromHash

SetBuiltFromHash sets the "built_from_hash" field.

func (*SLSAAttestationUpsertOne) SetCollector

SetCollector sets the "collector" field.

func (*SLSAAttestationUpsertOne) SetDocumentRef added in v0.6.0

SetDocumentRef sets the "document_ref" field.

func (*SLSAAttestationUpsertOne) SetFinishedOn

SetFinishedOn sets the "finished_on" field.

func (*SLSAAttestationUpsertOne) SetOrigin

SetOrigin sets the "origin" field.

func (*SLSAAttestationUpsertOne) SetSlsaPredicate

SetSlsaPredicate sets the "slsa_predicate" field.

func (*SLSAAttestationUpsertOne) SetSlsaVersion

SetSlsaVersion sets the "slsa_version" field.

func (*SLSAAttestationUpsertOne) SetStartedOn

SetStartedOn sets the "started_on" field.

func (*SLSAAttestationUpsertOne) SetSubjectID

SetSubjectID sets the "subject_id" field.

func (*SLSAAttestationUpsertOne) Update

Update allows overriding fields `UPDATE` values. See the SLSAAttestationCreate.OnConflict documentation for more info.

func (*SLSAAttestationUpsertOne) UpdateBuildType

func (u *SLSAAttestationUpsertOne) UpdateBuildType() *SLSAAttestationUpsertOne

UpdateBuildType sets the "build_type" field to the value that was provided on create.

func (*SLSAAttestationUpsertOne) UpdateBuiltByID

func (u *SLSAAttestationUpsertOne) UpdateBuiltByID() *SLSAAttestationUpsertOne

UpdateBuiltByID sets the "built_by_id" field to the value that was provided on create.

func (*SLSAAttestationUpsertOne) UpdateBuiltFromHash

func (u *SLSAAttestationUpsertOne) UpdateBuiltFromHash() *SLSAAttestationUpsertOne

UpdateBuiltFromHash sets the "built_from_hash" field to the value that was provided on create.

func (*SLSAAttestationUpsertOne) UpdateCollector

func (u *SLSAAttestationUpsertOne) UpdateCollector() *SLSAAttestationUpsertOne

UpdateCollector sets the "collector" field to the value that was provided on create.

func (*SLSAAttestationUpsertOne) UpdateDocumentRef added in v0.6.0

func (u *SLSAAttestationUpsertOne) UpdateDocumentRef() *SLSAAttestationUpsertOne

UpdateDocumentRef sets the "document_ref" field to the value that was provided on create.

func (*SLSAAttestationUpsertOne) UpdateFinishedOn

func (u *SLSAAttestationUpsertOne) UpdateFinishedOn() *SLSAAttestationUpsertOne

UpdateFinishedOn sets the "finished_on" field to the value that was provided on create.

func (*SLSAAttestationUpsertOne) UpdateNewValues

func (u *SLSAAttestationUpsertOne) UpdateNewValues() *SLSAAttestationUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:

client.SLSAAttestation.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(slsaattestation.FieldID)
		}),
	).
	Exec(ctx)

func (*SLSAAttestationUpsertOne) UpdateOrigin

UpdateOrigin sets the "origin" field to the value that was provided on create.

func (*SLSAAttestationUpsertOne) UpdateSlsaPredicate

func (u *SLSAAttestationUpsertOne) UpdateSlsaPredicate() *SLSAAttestationUpsertOne

UpdateSlsaPredicate sets the "slsa_predicate" field to the value that was provided on create.

func (*SLSAAttestationUpsertOne) UpdateSlsaVersion

func (u *SLSAAttestationUpsertOne) UpdateSlsaVersion() *SLSAAttestationUpsertOne

UpdateSlsaVersion sets the "slsa_version" field to the value that was provided on create.

func (*SLSAAttestationUpsertOne) UpdateStartedOn

func (u *SLSAAttestationUpsertOne) UpdateStartedOn() *SLSAAttestationUpsertOne

UpdateStartedOn sets the "started_on" field to the value that was provided on create.

func (*SLSAAttestationUpsertOne) UpdateSubjectID

func (u *SLSAAttestationUpsertOne) UpdateSubjectID() *SLSAAttestationUpsertOne

UpdateSubjectID sets the "subject_id" field to the value that was provided on create.

type SLSAAttestations

type SLSAAttestations []*SLSAAttestation

SLSAAttestations is a parsable slice of SLSAAttestation.

type SourceName

type SourceName struct {

	// ID of the ent.
	ID uuid.UUID `json:"id,omitempty"`
	// Type holds the value of the "type" field.
	Type string `json:"type,omitempty"`
	// Namespace holds the value of the "namespace" field.
	Namespace string `json:"namespace,omitempty"`
	// Name holds the value of the "name" field.
	Name string `json:"name,omitempty"`
	// Commit holds the value of the "commit" field.
	Commit string `json:"commit,omitempty"`
	// Tag holds the value of the "tag" field.
	Tag string `json:"tag,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the SourceNameQuery when eager-loading is set.
	Edges SourceNameEdges `json:"edges"`
	// contains filtered or unexported fields
}

SourceName is the model entity for the SourceName schema.

func (*SourceName) Certification added in v0.6.0

func (sn *SourceName) Certification(ctx context.Context) (result []*Certification, err error)

func (*SourceName) CertifyLegal added in v0.6.0

func (sn *SourceName) CertifyLegal(ctx context.Context) (result []*CertifyLegal, err error)

func (*SourceName) HasSourceAt added in v0.6.0

func (sn *SourceName) HasSourceAt(ctx context.Context) (result []*HasSourceAt, err error)

func (*SourceName) IsNode

func (n *SourceName) IsNode()

IsNode implements the Node interface check for GQLGen.

func (*SourceName) Metadata added in v0.6.0

func (sn *SourceName) Metadata(ctx context.Context) (result []*HasMetadata, err error)

func (*SourceName) NamedCertification added in v0.6.0

func (sn *SourceName) NamedCertification(name string) ([]*Certification, error)

NamedCertification returns the Certification named value or an error if the edge was not loaded in eager-loading with this name.

func (*SourceName) NamedCertifyLegal added in v0.6.0

func (sn *SourceName) NamedCertifyLegal(name string) ([]*CertifyLegal, error)

NamedCertifyLegal returns the CertifyLegal named value or an error if the edge was not loaded in eager-loading with this name.

func (*SourceName) NamedHasSourceAt added in v0.6.0

func (sn *SourceName) NamedHasSourceAt(name string) ([]*HasSourceAt, error)

NamedHasSourceAt returns the HasSourceAt named value or an error if the edge was not loaded in eager-loading with this name.

func (*SourceName) NamedMetadata added in v0.6.0

func (sn *SourceName) NamedMetadata(name string) ([]*HasMetadata, error)

NamedMetadata returns the Metadata named value or an error if the edge was not loaded in eager-loading with this name.

func (*SourceName) NamedOccurrences

func (sn *SourceName) NamedOccurrences(name string) ([]*Occurrence, error)

NamedOccurrences returns the Occurrences named value or an error if the edge was not loaded in eager-loading with this name.

func (*SourceName) NamedPoc added in v0.6.0

func (sn *SourceName) NamedPoc(name string) ([]*PointOfContact, error)

NamedPoc returns the Poc named value or an error if the edge was not loaded in eager-loading with this name.

func (*SourceName) NamedScorecard added in v0.6.0

func (sn *SourceName) NamedScorecard(name string) ([]*CertifyScorecard, error)

NamedScorecard returns the Scorecard named value or an error if the edge was not loaded in eager-loading with this name.

func (*SourceName) Occurrences

func (sn *SourceName) Occurrences(ctx context.Context) (result []*Occurrence, err error)

func (*SourceName) Poc added in v0.6.0

func (sn *SourceName) Poc(ctx context.Context) (result []*PointOfContact, err error)

func (*SourceName) QueryCertification added in v0.6.0

func (sn *SourceName) QueryCertification() *CertificationQuery

QueryCertification queries the "certification" edge of the SourceName entity.

func (*SourceName) QueryCertifyLegal added in v0.6.0

func (sn *SourceName) QueryCertifyLegal() *CertifyLegalQuery

QueryCertifyLegal queries the "certify_legal" edge of the SourceName entity.

func (*SourceName) QueryHasSourceAt added in v0.6.0

func (sn *SourceName) QueryHasSourceAt() *HasSourceAtQuery

QueryHasSourceAt queries the "has_source_at" edge of the SourceName entity.

func (*SourceName) QueryMetadata added in v0.6.0

func (sn *SourceName) QueryMetadata() *HasMetadataQuery

QueryMetadata queries the "metadata" edge of the SourceName entity.

func (*SourceName) QueryOccurrences

func (sn *SourceName) QueryOccurrences() *OccurrenceQuery

QueryOccurrences queries the "occurrences" edge of the SourceName entity.

func (*SourceName) QueryPoc added in v0.6.0

func (sn *SourceName) QueryPoc() *PointOfContactQuery

QueryPoc queries the "poc" edge of the SourceName entity.

func (*SourceName) QueryScorecard added in v0.6.0

func (sn *SourceName) QueryScorecard() *CertifyScorecardQuery

QueryScorecard queries the "scorecard" edge of the SourceName entity.

func (*SourceName) Scorecard added in v0.6.0

func (sn *SourceName) Scorecard(ctx context.Context) (result []*CertifyScorecard, err error)

func (*SourceName) String

func (sn *SourceName) String() string

String implements the fmt.Stringer.

func (*SourceName) ToEdge

func (sn *SourceName) ToEdge(order *SourceNameOrder) *SourceNameEdge

ToEdge converts SourceName into SourceNameEdge.

func (*SourceName) Unwrap

func (sn *SourceName) Unwrap() *SourceName

Unwrap unwraps the SourceName entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.

func (*SourceName) Update

func (sn *SourceName) Update() *SourceNameUpdateOne

Update returns a builder for updating this SourceName. Note that you need to call SourceName.Unwrap() before calling this method if this SourceName was returned from a transaction, and the transaction was committed or rolled back.

func (*SourceName) Value

func (sn *SourceName) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the SourceName. This includes values selected through modifiers, order, etc.

type SourceNameClient

type SourceNameClient struct {
	// contains filtered or unexported fields
}

SourceNameClient is a client for the SourceName schema.

func NewSourceNameClient

func NewSourceNameClient(c config) *SourceNameClient

NewSourceNameClient returns a client for the SourceName from the given config.

func (*SourceNameClient) Create

func (c *SourceNameClient) Create() *SourceNameCreate

Create returns a builder for creating a SourceName entity.

func (*SourceNameClient) CreateBulk

func (c *SourceNameClient) CreateBulk(builders ...*SourceNameCreate) *SourceNameCreateBulk

CreateBulk returns a builder for creating a bulk of SourceName entities.

func (*SourceNameClient) Delete

func (c *SourceNameClient) Delete() *SourceNameDelete

Delete returns a delete builder for SourceName.

func (*SourceNameClient) DeleteOne

func (c *SourceNameClient) DeleteOne(sn *SourceName) *SourceNameDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*SourceNameClient) DeleteOneID

func (c *SourceNameClient) DeleteOneID(id uuid.UUID) *SourceNameDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*SourceNameClient) Get

Get returns a SourceName entity by its id.

func (*SourceNameClient) GetX

func (c *SourceNameClient) GetX(ctx context.Context, id uuid.UUID) *SourceName

GetX is like Get, but panics if an error occurs.

func (*SourceNameClient) Hooks

func (c *SourceNameClient) Hooks() []Hook

Hooks returns the client hooks.

func (*SourceNameClient) Intercept

func (c *SourceNameClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `sourcename.Intercept(f(g(h())))`.

func (*SourceNameClient) Interceptors

func (c *SourceNameClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*SourceNameClient) MapCreateBulk

func (c *SourceNameClient) MapCreateBulk(slice any, setFunc func(*SourceNameCreate, int)) *SourceNameCreateBulk

MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.

func (*SourceNameClient) Query

func (c *SourceNameClient) Query() *SourceNameQuery

Query returns a query builder for SourceName.

func (*SourceNameClient) QueryCertification added in v0.6.0

func (c *SourceNameClient) QueryCertification(sn *SourceName) *CertificationQuery

QueryCertification queries the certification edge of a SourceName.

func (*SourceNameClient) QueryCertifyLegal added in v0.6.0

func (c *SourceNameClient) QueryCertifyLegal(sn *SourceName) *CertifyLegalQuery

QueryCertifyLegal queries the certify_legal edge of a SourceName.

func (*SourceNameClient) QueryHasSourceAt added in v0.6.0

func (c *SourceNameClient) QueryHasSourceAt(sn *SourceName) *HasSourceAtQuery

QueryHasSourceAt queries the has_source_at edge of a SourceName.

func (*SourceNameClient) QueryMetadata added in v0.6.0

func (c *SourceNameClient) QueryMetadata(sn *SourceName) *HasMetadataQuery

QueryMetadata queries the metadata edge of a SourceName.

func (*SourceNameClient) QueryOccurrences

func (c *SourceNameClient) QueryOccurrences(sn *SourceName) *OccurrenceQuery

QueryOccurrences queries the occurrences edge of a SourceName.

func (*SourceNameClient) QueryPoc added in v0.6.0

QueryPoc queries the poc edge of a SourceName.

func (*SourceNameClient) QueryScorecard added in v0.6.0

func (c *SourceNameClient) QueryScorecard(sn *SourceName) *CertifyScorecardQuery

QueryScorecard queries the scorecard edge of a SourceName.

func (*SourceNameClient) Update

func (c *SourceNameClient) Update() *SourceNameUpdate

Update returns an update builder for SourceName.

func (*SourceNameClient) UpdateOne

func (c *SourceNameClient) UpdateOne(sn *SourceName) *SourceNameUpdateOne

UpdateOne returns an update builder for the given entity.

func (*SourceNameClient) UpdateOneID

func (c *SourceNameClient) UpdateOneID(id uuid.UUID) *SourceNameUpdateOne

UpdateOneID returns an update builder for the given id.

func (*SourceNameClient) Use

func (c *SourceNameClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `sourcename.Hooks(f(g(h())))`.

type SourceNameConnection

type SourceNameConnection struct {
	Edges      []*SourceNameEdge `json:"edges"`
	PageInfo   PageInfo          `json:"pageInfo"`
	TotalCount int               `json:"totalCount"`
}

SourceNameConnection is the connection containing edges to SourceName.

type SourceNameCreate

type SourceNameCreate struct {
	// contains filtered or unexported fields
}

SourceNameCreate is the builder for creating a SourceName entity.

func (*SourceNameCreate) AddCertification added in v0.6.0

func (snc *SourceNameCreate) AddCertification(c ...*Certification) *SourceNameCreate

AddCertification adds the "certification" edges to the Certification entity.

func (*SourceNameCreate) AddCertificationIDs added in v0.6.0

func (snc *SourceNameCreate) AddCertificationIDs(ids ...uuid.UUID) *SourceNameCreate

AddCertificationIDs adds the "certification" edge to the Certification entity by IDs.

func (*SourceNameCreate) AddCertifyLegal added in v0.6.0

func (snc *SourceNameCreate) AddCertifyLegal(c ...*CertifyLegal) *SourceNameCreate

AddCertifyLegal adds the "certify_legal" edges to the CertifyLegal entity.

func (*SourceNameCreate) AddCertifyLegalIDs added in v0.6.0

func (snc *SourceNameCreate) AddCertifyLegalIDs(ids ...uuid.UUID) *SourceNameCreate

AddCertifyLegalIDs adds the "certify_legal" edge to the CertifyLegal entity by IDs.

func (*SourceNameCreate) AddHasSourceAt added in v0.6.0

func (snc *SourceNameCreate) AddHasSourceAt(h ...*HasSourceAt) *SourceNameCreate

AddHasSourceAt adds the "has_source_at" edges to the HasSourceAt entity.

func (*SourceNameCreate) AddHasSourceAtIDs added in v0.6.0

func (snc *SourceNameCreate) AddHasSourceAtIDs(ids ...uuid.UUID) *SourceNameCreate

AddHasSourceAtIDs adds the "has_source_at" edge to the HasSourceAt entity by IDs.

func (*SourceNameCreate) AddMetadata added in v0.6.0

func (snc *SourceNameCreate) AddMetadata(h ...*HasMetadata) *SourceNameCreate

AddMetadata adds the "metadata" edges to the HasMetadata entity.

func (*SourceNameCreate) AddMetadatumIDs added in v0.6.0

func (snc *SourceNameCreate) AddMetadatumIDs(ids ...uuid.UUID) *SourceNameCreate

AddMetadatumIDs adds the "metadata" edge to the HasMetadata entity by IDs.

func (*SourceNameCreate) AddOccurrenceIDs

func (snc *SourceNameCreate) AddOccurrenceIDs(ids ...uuid.UUID) *SourceNameCreate

AddOccurrenceIDs adds the "occurrences" edge to the Occurrence entity by IDs.

func (*SourceNameCreate) AddOccurrences

func (snc *SourceNameCreate) AddOccurrences(o ...*Occurrence) *SourceNameCreate

AddOccurrences adds the "occurrences" edges to the Occurrence entity.

func (*SourceNameCreate) AddPoc added in v0.6.0

func (snc *SourceNameCreate) AddPoc(p ...*PointOfContact) *SourceNameCreate

AddPoc adds the "poc" edges to the PointOfContact entity.

func (*SourceNameCreate) AddPocIDs added in v0.6.0

func (snc *SourceNameCreate) AddPocIDs(ids ...uuid.UUID) *SourceNameCreate

AddPocIDs adds the "poc" edge to the PointOfContact entity by IDs.

func (*SourceNameCreate) AddScorecard added in v0.6.0

func (snc *SourceNameCreate) AddScorecard(c ...*CertifyScorecard) *SourceNameCreate

AddScorecard adds the "scorecard" edges to the CertifyScorecard entity.

func (*SourceNameCreate) AddScorecardIDs added in v0.6.0

func (snc *SourceNameCreate) AddScorecardIDs(ids ...uuid.UUID) *SourceNameCreate

AddScorecardIDs adds the "scorecard" edge to the CertifyScorecard entity by IDs.

func (*SourceNameCreate) Exec

func (snc *SourceNameCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*SourceNameCreate) ExecX

func (snc *SourceNameCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SourceNameCreate) Mutation

func (snc *SourceNameCreate) Mutation() *SourceNameMutation

Mutation returns the SourceNameMutation object of the builder.

func (*SourceNameCreate) OnConflict

func (snc *SourceNameCreate) OnConflict(opts ...sql.ConflictOption) *SourceNameUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.SourceName.Create().
	SetType(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.SourceNameUpsert) {
		SetType(v+v).
	}).
	Exec(ctx)

func (*SourceNameCreate) OnConflictColumns

func (snc *SourceNameCreate) OnConflictColumns(columns ...string) *SourceNameUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.SourceName.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*SourceNameCreate) Save

func (snc *SourceNameCreate) Save(ctx context.Context) (*SourceName, error)

Save creates the SourceName in the database.

func (*SourceNameCreate) SaveX

func (snc *SourceNameCreate) SaveX(ctx context.Context) *SourceName

SaveX calls Save and panics if Save returns an error.

func (*SourceNameCreate) SetCommit

func (snc *SourceNameCreate) SetCommit(s string) *SourceNameCreate

SetCommit sets the "commit" field.

func (*SourceNameCreate) SetID added in v0.5.0

func (snc *SourceNameCreate) SetID(u uuid.UUID) *SourceNameCreate

SetID sets the "id" field.

func (*SourceNameCreate) SetName

func (snc *SourceNameCreate) SetName(s string) *SourceNameCreate

SetName sets the "name" field.

func (*SourceNameCreate) SetNamespace

func (snc *SourceNameCreate) SetNamespace(s string) *SourceNameCreate

SetNamespace sets the "namespace" field.

func (*SourceNameCreate) SetNillableCommit

func (snc *SourceNameCreate) SetNillableCommit(s *string) *SourceNameCreate

SetNillableCommit sets the "commit" field if the given value is not nil.

func (*SourceNameCreate) SetNillableID added in v0.5.0

func (snc *SourceNameCreate) SetNillableID(u *uuid.UUID) *SourceNameCreate

SetNillableID sets the "id" field if the given value is not nil.

func (*SourceNameCreate) SetNillableTag

func (snc *SourceNameCreate) SetNillableTag(s *string) *SourceNameCreate

SetNillableTag sets the "tag" field if the given value is not nil.

func (*SourceNameCreate) SetTag

func (snc *SourceNameCreate) SetTag(s string) *SourceNameCreate

SetTag sets the "tag" field.

func (*SourceNameCreate) SetType added in v0.5.0

func (snc *SourceNameCreate) SetType(s string) *SourceNameCreate

SetType sets the "type" field.

type SourceNameCreateBulk

type SourceNameCreateBulk struct {
	// contains filtered or unexported fields
}

SourceNameCreateBulk is the builder for creating many SourceName entities in bulk.

func (*SourceNameCreateBulk) Exec

func (sncb *SourceNameCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*SourceNameCreateBulk) ExecX

func (sncb *SourceNameCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SourceNameCreateBulk) OnConflict

func (sncb *SourceNameCreateBulk) OnConflict(opts ...sql.ConflictOption) *SourceNameUpsertBulk

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.SourceName.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.SourceNameUpsert) {
		SetType(v+v).
	}).
	Exec(ctx)

func (*SourceNameCreateBulk) OnConflictColumns

func (sncb *SourceNameCreateBulk) OnConflictColumns(columns ...string) *SourceNameUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.SourceName.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*SourceNameCreateBulk) Save

func (sncb *SourceNameCreateBulk) Save(ctx context.Context) ([]*SourceName, error)

Save creates the SourceName entities in the database.

func (*SourceNameCreateBulk) SaveX

func (sncb *SourceNameCreateBulk) SaveX(ctx context.Context) []*SourceName

SaveX is like Save, but panics if an error occurs.

type SourceNameDelete

type SourceNameDelete struct {
	// contains filtered or unexported fields
}

SourceNameDelete is the builder for deleting a SourceName entity.

func (*SourceNameDelete) Exec

func (snd *SourceNameDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*SourceNameDelete) ExecX

func (snd *SourceNameDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*SourceNameDelete) Where

Where appends a list predicates to the SourceNameDelete builder.

type SourceNameDeleteOne

type SourceNameDeleteOne struct {
	// contains filtered or unexported fields
}

SourceNameDeleteOne is the builder for deleting a single SourceName entity.

func (*SourceNameDeleteOne) Exec

func (sndo *SourceNameDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*SourceNameDeleteOne) ExecX

func (sndo *SourceNameDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SourceNameDeleteOne) Where

Where appends a list predicates to the SourceNameDelete builder.

type SourceNameEdge

type SourceNameEdge struct {
	Node   *SourceName `json:"node"`
	Cursor Cursor      `json:"cursor"`
}

SourceNameEdge is the edge representation of SourceName.

type SourceNameEdges

type SourceNameEdges struct {
	// Occurrences holds the value of the occurrences edge.
	Occurrences []*Occurrence `json:"occurrences,omitempty"`
	// HasSourceAt holds the value of the has_source_at edge.
	HasSourceAt []*HasSourceAt `json:"has_source_at,omitempty"`
	// Scorecard holds the value of the scorecard edge.
	Scorecard []*CertifyScorecard `json:"scorecard,omitempty"`
	// Certification holds the value of the certification edge.
	Certification []*Certification `json:"certification,omitempty"`
	// Metadata holds the value of the metadata edge.
	Metadata []*HasMetadata `json:"metadata,omitempty"`
	// Poc holds the value of the poc edge.
	Poc []*PointOfContact `json:"poc,omitempty"`
	// CertifyLegal holds the value of the certify_legal edge.
	CertifyLegal []*CertifyLegal `json:"certify_legal,omitempty"`
	// contains filtered or unexported fields
}

SourceNameEdges holds the relations/edges for other nodes in the graph.

func (SourceNameEdges) CertificationOrErr added in v0.6.0

func (e SourceNameEdges) CertificationOrErr() ([]*Certification, error)

CertificationOrErr returns the Certification value or an error if the edge was not loaded in eager-loading.

func (SourceNameEdges) CertifyLegalOrErr added in v0.6.0

func (e SourceNameEdges) CertifyLegalOrErr() ([]*CertifyLegal, error)

CertifyLegalOrErr returns the CertifyLegal value or an error if the edge was not loaded in eager-loading.

func (SourceNameEdges) HasSourceAtOrErr added in v0.6.0

func (e SourceNameEdges) HasSourceAtOrErr() ([]*HasSourceAt, error)

HasSourceAtOrErr returns the HasSourceAt value or an error if the edge was not loaded in eager-loading.

func (SourceNameEdges) MetadataOrErr added in v0.6.0

func (e SourceNameEdges) MetadataOrErr() ([]*HasMetadata, error)

MetadataOrErr returns the Metadata value or an error if the edge was not loaded in eager-loading.

func (SourceNameEdges) OccurrencesOrErr

func (e SourceNameEdges) OccurrencesOrErr() ([]*Occurrence, error)

OccurrencesOrErr returns the Occurrences value or an error if the edge was not loaded in eager-loading.

func (SourceNameEdges) PocOrErr added in v0.6.0

func (e SourceNameEdges) PocOrErr() ([]*PointOfContact, error)

PocOrErr returns the Poc value or an error if the edge was not loaded in eager-loading.

func (SourceNameEdges) ScorecardOrErr added in v0.6.0

func (e SourceNameEdges) ScorecardOrErr() ([]*CertifyScorecard, error)

ScorecardOrErr returns the Scorecard value or an error if the edge was not loaded in eager-loading.

type SourceNameGroupBy

type SourceNameGroupBy struct {
	// contains filtered or unexported fields
}

SourceNameGroupBy is the group-by builder for SourceName entities.

func (*SourceNameGroupBy) Aggregate

func (sngb *SourceNameGroupBy) Aggregate(fns ...AggregateFunc) *SourceNameGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*SourceNameGroupBy) Bool

func (s *SourceNameGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*SourceNameGroupBy) BoolX

func (s *SourceNameGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*SourceNameGroupBy) Bools

func (s *SourceNameGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*SourceNameGroupBy) BoolsX

func (s *SourceNameGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*SourceNameGroupBy) Float64

func (s *SourceNameGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*SourceNameGroupBy) Float64X

func (s *SourceNameGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*SourceNameGroupBy) Float64s

func (s *SourceNameGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*SourceNameGroupBy) Float64sX

func (s *SourceNameGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*SourceNameGroupBy) Int

func (s *SourceNameGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*SourceNameGroupBy) IntX

func (s *SourceNameGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*SourceNameGroupBy) Ints

func (s *SourceNameGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*SourceNameGroupBy) IntsX

func (s *SourceNameGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*SourceNameGroupBy) Scan

func (sngb *SourceNameGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*SourceNameGroupBy) ScanX

func (s *SourceNameGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*SourceNameGroupBy) String

func (s *SourceNameGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*SourceNameGroupBy) StringX

func (s *SourceNameGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*SourceNameGroupBy) Strings

func (s *SourceNameGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*SourceNameGroupBy) StringsX

func (s *SourceNameGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type SourceNameMutation

type SourceNameMutation struct {
	// contains filtered or unexported fields
}

SourceNameMutation represents an operation that mutates the SourceName nodes in the graph.

func (*SourceNameMutation) AddCertificationIDs added in v0.6.0

func (m *SourceNameMutation) AddCertificationIDs(ids ...uuid.UUID)

AddCertificationIDs adds the "certification" edge to the Certification entity by ids.

func (*SourceNameMutation) AddCertifyLegalIDs added in v0.6.0

func (m *SourceNameMutation) AddCertifyLegalIDs(ids ...uuid.UUID)

AddCertifyLegalIDs adds the "certify_legal" edge to the CertifyLegal entity by ids.

func (*SourceNameMutation) AddField

func (m *SourceNameMutation) AddField(name string, value ent.Value) error

AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*SourceNameMutation) AddHasSourceAtIDs added in v0.6.0

func (m *SourceNameMutation) AddHasSourceAtIDs(ids ...uuid.UUID)

AddHasSourceAtIDs adds the "has_source_at" edge to the HasSourceAt entity by ids.

func (*SourceNameMutation) AddMetadatumIDs added in v0.6.0

func (m *SourceNameMutation) AddMetadatumIDs(ids ...uuid.UUID)

AddMetadatumIDs adds the "metadata" edge to the HasMetadata entity by ids.

func (*SourceNameMutation) AddOccurrenceIDs

func (m *SourceNameMutation) AddOccurrenceIDs(ids ...uuid.UUID)

AddOccurrenceIDs adds the "occurrences" edge to the Occurrence entity by ids.

func (*SourceNameMutation) AddPocIDs added in v0.6.0

func (m *SourceNameMutation) AddPocIDs(ids ...uuid.UUID)

AddPocIDs adds the "poc" edge to the PointOfContact entity by ids.

func (*SourceNameMutation) AddScorecardIDs added in v0.6.0

func (m *SourceNameMutation) AddScorecardIDs(ids ...uuid.UUID)

AddScorecardIDs adds the "scorecard" edge to the CertifyScorecard entity by ids.

func (*SourceNameMutation) AddedEdges

func (m *SourceNameMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*SourceNameMutation) AddedField

func (m *SourceNameMutation) AddedField(name string) (ent.Value, bool)

AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*SourceNameMutation) AddedFields

func (m *SourceNameMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*SourceNameMutation) AddedIDs

func (m *SourceNameMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*SourceNameMutation) CertificationCleared added in v0.6.0

func (m *SourceNameMutation) CertificationCleared() bool

CertificationCleared reports if the "certification" edge to the Certification entity was cleared.

func (*SourceNameMutation) CertificationIDs added in v0.6.0

func (m *SourceNameMutation) CertificationIDs() (ids []uuid.UUID)

CertificationIDs returns the "certification" edge IDs in the mutation.

func (*SourceNameMutation) CertifyLegalCleared added in v0.6.0

func (m *SourceNameMutation) CertifyLegalCleared() bool

CertifyLegalCleared reports if the "certify_legal" edge to the CertifyLegal entity was cleared.

func (*SourceNameMutation) CertifyLegalIDs added in v0.6.0

func (m *SourceNameMutation) CertifyLegalIDs() (ids []uuid.UUID)

CertifyLegalIDs returns the "certify_legal" edge IDs in the mutation.

func (*SourceNameMutation) ClearCertification added in v0.6.0

func (m *SourceNameMutation) ClearCertification()

ClearCertification clears the "certification" edge to the Certification entity.

func (*SourceNameMutation) ClearCertifyLegal added in v0.6.0

func (m *SourceNameMutation) ClearCertifyLegal()

ClearCertifyLegal clears the "certify_legal" edge to the CertifyLegal entity.

func (*SourceNameMutation) ClearCommit

func (m *SourceNameMutation) ClearCommit()

ClearCommit clears the value of the "commit" field.

func (*SourceNameMutation) ClearEdge

func (m *SourceNameMutation) ClearEdge(name string) error

ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.

func (*SourceNameMutation) ClearField

func (m *SourceNameMutation) ClearField(name string) error

ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.

func (*SourceNameMutation) ClearHasSourceAt added in v0.6.0

func (m *SourceNameMutation) ClearHasSourceAt()

ClearHasSourceAt clears the "has_source_at" edge to the HasSourceAt entity.

func (*SourceNameMutation) ClearMetadata added in v0.6.0

func (m *SourceNameMutation) ClearMetadata()

ClearMetadata clears the "metadata" edge to the HasMetadata entity.

func (*SourceNameMutation) ClearOccurrences

func (m *SourceNameMutation) ClearOccurrences()

ClearOccurrences clears the "occurrences" edge to the Occurrence entity.

func (*SourceNameMutation) ClearPoc added in v0.6.0

func (m *SourceNameMutation) ClearPoc()

ClearPoc clears the "poc" edge to the PointOfContact entity.

func (*SourceNameMutation) ClearScorecard added in v0.6.0

func (m *SourceNameMutation) ClearScorecard()

ClearScorecard clears the "scorecard" edge to the CertifyScorecard entity.

func (*SourceNameMutation) ClearTag

func (m *SourceNameMutation) ClearTag()

ClearTag clears the value of the "tag" field.

func (*SourceNameMutation) ClearedEdges

func (m *SourceNameMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*SourceNameMutation) ClearedFields

func (m *SourceNameMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (SourceNameMutation) Client

func (m SourceNameMutation) Client() *Client

Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.

func (*SourceNameMutation) Commit

func (m *SourceNameMutation) Commit() (r string, exists bool)

Commit returns the value of the "commit" field in the mutation.

func (*SourceNameMutation) CommitCleared

func (m *SourceNameMutation) CommitCleared() bool

CommitCleared returns if the "commit" field was cleared in this mutation.

func (*SourceNameMutation) EdgeCleared

func (m *SourceNameMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*SourceNameMutation) Field

func (m *SourceNameMutation) Field(name string) (ent.Value, bool)

Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*SourceNameMutation) FieldCleared

func (m *SourceNameMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*SourceNameMutation) Fields

func (m *SourceNameMutation) Fields() []string

Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().

func (*SourceNameMutation) GetType added in v0.5.0

func (m *SourceNameMutation) GetType() (r string, exists bool)

GetType returns the value of the "type" field in the mutation.

func (*SourceNameMutation) HasSourceAtCleared added in v0.6.0

func (m *SourceNameMutation) HasSourceAtCleared() bool

HasSourceAtCleared reports if the "has_source_at" edge to the HasSourceAt entity was cleared.

func (*SourceNameMutation) HasSourceAtIDs added in v0.6.0

func (m *SourceNameMutation) HasSourceAtIDs() (ids []uuid.UUID)

HasSourceAtIDs returns the "has_source_at" edge IDs in the mutation.

func (*SourceNameMutation) ID

func (m *SourceNameMutation) ID() (id uuid.UUID, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*SourceNameMutation) IDs

func (m *SourceNameMutation) IDs(ctx context.Context) ([]uuid.UUID, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*SourceNameMutation) MetadataCleared added in v0.6.0

func (m *SourceNameMutation) MetadataCleared() bool

MetadataCleared reports if the "metadata" edge to the HasMetadata entity was cleared.

func (*SourceNameMutation) MetadataIDs added in v0.6.0

func (m *SourceNameMutation) MetadataIDs() (ids []uuid.UUID)

MetadataIDs returns the "metadata" edge IDs in the mutation.

func (*SourceNameMutation) Name

func (m *SourceNameMutation) Name() (r string, exists bool)

Name returns the value of the "name" field in the mutation.

func (*SourceNameMutation) Namespace added in v0.5.0

func (m *SourceNameMutation) Namespace() (r string, exists bool)

Namespace returns the value of the "namespace" field in the mutation.

func (*SourceNameMutation) OccurrencesCleared

func (m *SourceNameMutation) OccurrencesCleared() bool

OccurrencesCleared reports if the "occurrences" edge to the Occurrence entity was cleared.

func (*SourceNameMutation) OccurrencesIDs

func (m *SourceNameMutation) OccurrencesIDs() (ids []uuid.UUID)

OccurrencesIDs returns the "occurrences" edge IDs in the mutation.

func (*SourceNameMutation) OldCommit

func (m *SourceNameMutation) OldCommit(ctx context.Context) (v string, err error)

OldCommit returns the old "commit" field's value of the SourceName entity. If the SourceName object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*SourceNameMutation) OldField

func (m *SourceNameMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*SourceNameMutation) OldName

func (m *SourceNameMutation) OldName(ctx context.Context) (v string, err error)

OldName returns the old "name" field's value of the SourceName entity. If the SourceName object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*SourceNameMutation) OldNamespace added in v0.5.0

func (m *SourceNameMutation) OldNamespace(ctx context.Context) (v string, err error)

OldNamespace returns the old "namespace" field's value of the SourceName entity. If the SourceName object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*SourceNameMutation) OldTag

func (m *SourceNameMutation) OldTag(ctx context.Context) (v string, err error)

OldTag returns the old "tag" field's value of the SourceName entity. If the SourceName object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*SourceNameMutation) OldType added in v0.5.0

func (m *SourceNameMutation) OldType(ctx context.Context) (v string, err error)

OldType returns the old "type" field's value of the SourceName entity. If the SourceName object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*SourceNameMutation) Op

func (m *SourceNameMutation) Op() Op

Op returns the operation name.

func (*SourceNameMutation) PocCleared added in v0.6.0

func (m *SourceNameMutation) PocCleared() bool

PocCleared reports if the "poc" edge to the PointOfContact entity was cleared.

func (*SourceNameMutation) PocIDs added in v0.6.0

func (m *SourceNameMutation) PocIDs() (ids []uuid.UUID)

PocIDs returns the "poc" edge IDs in the mutation.

func (*SourceNameMutation) RemoveCertificationIDs added in v0.6.0

func (m *SourceNameMutation) RemoveCertificationIDs(ids ...uuid.UUID)

RemoveCertificationIDs removes the "certification" edge to the Certification entity by IDs.

func (*SourceNameMutation) RemoveCertifyLegalIDs added in v0.6.0

func (m *SourceNameMutation) RemoveCertifyLegalIDs(ids ...uuid.UUID)

RemoveCertifyLegalIDs removes the "certify_legal" edge to the CertifyLegal entity by IDs.

func (*SourceNameMutation) RemoveHasSourceAtIDs added in v0.6.0

func (m *SourceNameMutation) RemoveHasSourceAtIDs(ids ...uuid.UUID)

RemoveHasSourceAtIDs removes the "has_source_at" edge to the HasSourceAt entity by IDs.

func (*SourceNameMutation) RemoveMetadatumIDs added in v0.6.0

func (m *SourceNameMutation) RemoveMetadatumIDs(ids ...uuid.UUID)

RemoveMetadatumIDs removes the "metadata" edge to the HasMetadata entity by IDs.

func (*SourceNameMutation) RemoveOccurrenceIDs

func (m *SourceNameMutation) RemoveOccurrenceIDs(ids ...uuid.UUID)

RemoveOccurrenceIDs removes the "occurrences" edge to the Occurrence entity by IDs.

func (*SourceNameMutation) RemovePocIDs added in v0.6.0

func (m *SourceNameMutation) RemovePocIDs(ids ...uuid.UUID)

RemovePocIDs removes the "poc" edge to the PointOfContact entity by IDs.

func (*SourceNameMutation) RemoveScorecardIDs added in v0.6.0

func (m *SourceNameMutation) RemoveScorecardIDs(ids ...uuid.UUID)

RemoveScorecardIDs removes the "scorecard" edge to the CertifyScorecard entity by IDs.

func (*SourceNameMutation) RemovedCertificationIDs added in v0.6.0

func (m *SourceNameMutation) RemovedCertificationIDs() (ids []uuid.UUID)

RemovedCertification returns the removed IDs of the "certification" edge to the Certification entity.

func (*SourceNameMutation) RemovedCertifyLegalIDs added in v0.6.0

func (m *SourceNameMutation) RemovedCertifyLegalIDs() (ids []uuid.UUID)

RemovedCertifyLegal returns the removed IDs of the "certify_legal" edge to the CertifyLegal entity.

func (*SourceNameMutation) RemovedEdges

func (m *SourceNameMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*SourceNameMutation) RemovedHasSourceAtIDs added in v0.6.0

func (m *SourceNameMutation) RemovedHasSourceAtIDs() (ids []uuid.UUID)

RemovedHasSourceAt returns the removed IDs of the "has_source_at" edge to the HasSourceAt entity.

func (*SourceNameMutation) RemovedIDs

func (m *SourceNameMutation) RemovedIDs(name string) []ent.Value

RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.

func (*SourceNameMutation) RemovedMetadataIDs added in v0.6.0

func (m *SourceNameMutation) RemovedMetadataIDs() (ids []uuid.UUID)

RemovedMetadata returns the removed IDs of the "metadata" edge to the HasMetadata entity.

func (*SourceNameMutation) RemovedOccurrencesIDs

func (m *SourceNameMutation) RemovedOccurrencesIDs() (ids []uuid.UUID)

RemovedOccurrences returns the removed IDs of the "occurrences" edge to the Occurrence entity.

func (*SourceNameMutation) RemovedPocIDs added in v0.6.0

func (m *SourceNameMutation) RemovedPocIDs() (ids []uuid.UUID)

RemovedPoc returns the removed IDs of the "poc" edge to the PointOfContact entity.

func (*SourceNameMutation) RemovedScorecardIDs added in v0.6.0

func (m *SourceNameMutation) RemovedScorecardIDs() (ids []uuid.UUID)

RemovedScorecard returns the removed IDs of the "scorecard" edge to the CertifyScorecard entity.

func (*SourceNameMutation) ResetCertification added in v0.6.0

func (m *SourceNameMutation) ResetCertification()

ResetCertification resets all changes to the "certification" edge.

func (*SourceNameMutation) ResetCertifyLegal added in v0.6.0

func (m *SourceNameMutation) ResetCertifyLegal()

ResetCertifyLegal resets all changes to the "certify_legal" edge.

func (*SourceNameMutation) ResetCommit

func (m *SourceNameMutation) ResetCommit()

ResetCommit resets all changes to the "commit" field.

func (*SourceNameMutation) ResetEdge

func (m *SourceNameMutation) ResetEdge(name string) error

ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.

func (*SourceNameMutation) ResetField

func (m *SourceNameMutation) ResetField(name string) error

ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.

func (*SourceNameMutation) ResetHasSourceAt added in v0.6.0

func (m *SourceNameMutation) ResetHasSourceAt()

ResetHasSourceAt resets all changes to the "has_source_at" edge.

func (*SourceNameMutation) ResetMetadata added in v0.6.0

func (m *SourceNameMutation) ResetMetadata()

ResetMetadata resets all changes to the "metadata" edge.

func (*SourceNameMutation) ResetName

func (m *SourceNameMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*SourceNameMutation) ResetNamespace

func (m *SourceNameMutation) ResetNamespace()

ResetNamespace resets all changes to the "namespace" field.

func (*SourceNameMutation) ResetOccurrences

func (m *SourceNameMutation) ResetOccurrences()

ResetOccurrences resets all changes to the "occurrences" edge.

func (*SourceNameMutation) ResetPoc added in v0.6.0

func (m *SourceNameMutation) ResetPoc()

ResetPoc resets all changes to the "poc" edge.

func (*SourceNameMutation) ResetScorecard added in v0.6.0

func (m *SourceNameMutation) ResetScorecard()

ResetScorecard resets all changes to the "scorecard" edge.

func (*SourceNameMutation) ResetTag

func (m *SourceNameMutation) ResetTag()

ResetTag resets all changes to the "tag" field.

func (*SourceNameMutation) ResetType added in v0.5.0

func (m *SourceNameMutation) ResetType()

ResetType resets all changes to the "type" field.

func (*SourceNameMutation) ScorecardCleared added in v0.6.0

func (m *SourceNameMutation) ScorecardCleared() bool

ScorecardCleared reports if the "scorecard" edge to the CertifyScorecard entity was cleared.

func (*SourceNameMutation) ScorecardIDs added in v0.6.0

func (m *SourceNameMutation) ScorecardIDs() (ids []uuid.UUID)

ScorecardIDs returns the "scorecard" edge IDs in the mutation.

func (*SourceNameMutation) SetCommit

func (m *SourceNameMutation) SetCommit(s string)

SetCommit sets the "commit" field.

func (*SourceNameMutation) SetField

func (m *SourceNameMutation) SetField(name string, value ent.Value) error

SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*SourceNameMutation) SetID added in v0.5.0

func (m *SourceNameMutation) SetID(id uuid.UUID)

SetID sets the value of the id field. Note that this operation is only accepted on creation of SourceName entities.

func (*SourceNameMutation) SetName

func (m *SourceNameMutation) SetName(s string)

SetName sets the "name" field.

func (*SourceNameMutation) SetNamespace added in v0.5.0

func (m *SourceNameMutation) SetNamespace(s string)

SetNamespace sets the "namespace" field.

func (*SourceNameMutation) SetOp

func (m *SourceNameMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*SourceNameMutation) SetTag

func (m *SourceNameMutation) SetTag(s string)

SetTag sets the "tag" field.

func (*SourceNameMutation) SetType added in v0.5.0

func (m *SourceNameMutation) SetType(s string)

SetType sets the "type" field.

func (*SourceNameMutation) Tag

func (m *SourceNameMutation) Tag() (r string, exists bool)

Tag returns the value of the "tag" field in the mutation.

func (*SourceNameMutation) TagCleared

func (m *SourceNameMutation) TagCleared() bool

TagCleared returns if the "tag" field was cleared in this mutation.

func (SourceNameMutation) Tx

func (m SourceNameMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*SourceNameMutation) Type

func (m *SourceNameMutation) Type() string

Type returns the node type of this mutation (SourceName).

func (*SourceNameMutation) Where

func (m *SourceNameMutation) Where(ps ...predicate.SourceName)

Where appends a list predicates to the SourceNameMutation builder.

func (*SourceNameMutation) WhereP

func (m *SourceNameMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the SourceNameMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type SourceNameOrder

type SourceNameOrder struct {
	Direction OrderDirection        `json:"direction"`
	Field     *SourceNameOrderField `json:"field"`
}

SourceNameOrder defines the ordering of SourceName.

type SourceNameOrderField

type SourceNameOrderField struct {
	// Value extracts the ordering value from the given SourceName.
	Value func(*SourceName) (ent.Value, error)
	// contains filtered or unexported fields
}

SourceNameOrderField defines the ordering field of SourceName.

type SourceNamePaginateOption

type SourceNamePaginateOption func(*sourcenamePager) error

SourceNamePaginateOption enables pagination customization.

func WithSourceNameFilter

func WithSourceNameFilter(filter func(*SourceNameQuery) (*SourceNameQuery, error)) SourceNamePaginateOption

WithSourceNameFilter configures pagination filter.

func WithSourceNameOrder

func WithSourceNameOrder(order *SourceNameOrder) SourceNamePaginateOption

WithSourceNameOrder configures pagination ordering.

type SourceNameQuery

type SourceNameQuery struct {
	// contains filtered or unexported fields
}

SourceNameQuery is the builder for querying SourceName entities.

func (*SourceNameQuery) Aggregate

func (snq *SourceNameQuery) Aggregate(fns ...AggregateFunc) *SourceNameSelect

Aggregate returns a SourceNameSelect configured with the given aggregations.

func (*SourceNameQuery) All

func (snq *SourceNameQuery) All(ctx context.Context) ([]*SourceName, error)

All executes the query and returns a list of SourceNames.

func (*SourceNameQuery) AllX

func (snq *SourceNameQuery) AllX(ctx context.Context) []*SourceName

AllX is like All, but panics if an error occurs.

func (*SourceNameQuery) Clone

func (snq *SourceNameQuery) Clone() *SourceNameQuery

Clone returns a duplicate of the SourceNameQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*SourceNameQuery) CollectFields

func (sn *SourceNameQuery) CollectFields(ctx context.Context, satisfies ...string) (*SourceNameQuery, error)

CollectFields tells the query-builder to eagerly load connected nodes by resolver context.

func (*SourceNameQuery) Count

func (snq *SourceNameQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*SourceNameQuery) CountX

func (snq *SourceNameQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*SourceNameQuery) Exist

func (snq *SourceNameQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*SourceNameQuery) ExistX

func (snq *SourceNameQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*SourceNameQuery) First

func (snq *SourceNameQuery) First(ctx context.Context) (*SourceName, error)

First returns the first SourceName entity from the query. Returns a *NotFoundError when no SourceName was found.

func (*SourceNameQuery) FirstID

func (snq *SourceNameQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)

FirstID returns the first SourceName ID from the query. Returns a *NotFoundError when no SourceName ID was found.

func (*SourceNameQuery) FirstIDX

func (snq *SourceNameQuery) FirstIDX(ctx context.Context) uuid.UUID

FirstIDX is like FirstID, but panics if an error occurs.

func (*SourceNameQuery) FirstX

func (snq *SourceNameQuery) FirstX(ctx context.Context) *SourceName

FirstX is like First, but panics if an error occurs.

func (*SourceNameQuery) GroupBy

func (snq *SourceNameQuery) GroupBy(field string, fields ...string) *SourceNameGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	Type string `json:"type,omitempty"`
	Count int `json:"count,omitempty"`
}

client.SourceName.Query().
	GroupBy(sourcename.FieldType).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*SourceNameQuery) IDs

func (snq *SourceNameQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)

IDs executes the query and returns a list of SourceName IDs.

func (*SourceNameQuery) IDsX

func (snq *SourceNameQuery) IDsX(ctx context.Context) []uuid.UUID

IDsX is like IDs, but panics if an error occurs.

func (*SourceNameQuery) Limit

func (snq *SourceNameQuery) Limit(limit int) *SourceNameQuery

Limit the number of records to be returned by this query.

func (*SourceNameQuery) Offset

func (snq *SourceNameQuery) Offset(offset int) *SourceNameQuery

Offset to start from.

func (*SourceNameQuery) Only

func (snq *SourceNameQuery) Only(ctx context.Context) (*SourceName, error)

Only returns a single SourceName entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one SourceName entity is found. Returns a *NotFoundError when no SourceName entities are found.

func (*SourceNameQuery) OnlyID

func (snq *SourceNameQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)

OnlyID is like Only, but returns the only SourceName ID in the query. Returns a *NotSingularError when more than one SourceName ID is found. Returns a *NotFoundError when no entities are found.

func (*SourceNameQuery) OnlyIDX

func (snq *SourceNameQuery) OnlyIDX(ctx context.Context) uuid.UUID

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*SourceNameQuery) OnlyX

func (snq *SourceNameQuery) OnlyX(ctx context.Context) *SourceName

OnlyX is like Only, but panics if an error occurs.

func (*SourceNameQuery) Order

Order specifies how the records should be ordered.

func (*SourceNameQuery) Paginate

func (sn *SourceNameQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...SourceNamePaginateOption,
) (*SourceNameConnection, error)

Paginate executes the query and returns a relay based cursor connection to SourceName.

func (*SourceNameQuery) QueryCertification added in v0.6.0

func (snq *SourceNameQuery) QueryCertification() *CertificationQuery

QueryCertification chains the current query on the "certification" edge.

func (*SourceNameQuery) QueryCertifyLegal added in v0.6.0

func (snq *SourceNameQuery) QueryCertifyLegal() *CertifyLegalQuery

QueryCertifyLegal chains the current query on the "certify_legal" edge.

func (*SourceNameQuery) QueryHasSourceAt added in v0.6.0

func (snq *SourceNameQuery) QueryHasSourceAt() *HasSourceAtQuery

QueryHasSourceAt chains the current query on the "has_source_at" edge.

func (*SourceNameQuery) QueryMetadata added in v0.6.0

func (snq *SourceNameQuery) QueryMetadata() *HasMetadataQuery

QueryMetadata chains the current query on the "metadata" edge.

func (*SourceNameQuery) QueryOccurrences

func (snq *SourceNameQuery) QueryOccurrences() *OccurrenceQuery

QueryOccurrences chains the current query on the "occurrences" edge.

func (*SourceNameQuery) QueryPoc added in v0.6.0

func (snq *SourceNameQuery) QueryPoc() *PointOfContactQuery

QueryPoc chains the current query on the "poc" edge.

func (*SourceNameQuery) QueryScorecard added in v0.6.0

func (snq *SourceNameQuery) QueryScorecard() *CertifyScorecardQuery

QueryScorecard chains the current query on the "scorecard" edge.

func (*SourceNameQuery) Select

func (snq *SourceNameQuery) Select(fields ...string) *SourceNameSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	Type string `json:"type,omitempty"`
}

client.SourceName.Query().
	Select(sourcename.FieldType).
	Scan(ctx, &v)

func (*SourceNameQuery) Unique

func (snq *SourceNameQuery) Unique(unique bool) *SourceNameQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*SourceNameQuery) Where

Where adds a new predicate for the SourceNameQuery builder.

func (*SourceNameQuery) WithCertification added in v0.6.0

func (snq *SourceNameQuery) WithCertification(opts ...func(*CertificationQuery)) *SourceNameQuery

WithCertification tells the query-builder to eager-load the nodes that are connected to the "certification" edge. The optional arguments are used to configure the query builder of the edge.

func (*SourceNameQuery) WithCertifyLegal added in v0.6.0

func (snq *SourceNameQuery) WithCertifyLegal(opts ...func(*CertifyLegalQuery)) *SourceNameQuery

WithCertifyLegal tells the query-builder to eager-load the nodes that are connected to the "certify_legal" edge. The optional arguments are used to configure the query builder of the edge.

func (*SourceNameQuery) WithHasSourceAt added in v0.6.0

func (snq *SourceNameQuery) WithHasSourceAt(opts ...func(*HasSourceAtQuery)) *SourceNameQuery

WithHasSourceAt tells the query-builder to eager-load the nodes that are connected to the "has_source_at" edge. The optional arguments are used to configure the query builder of the edge.

func (*SourceNameQuery) WithMetadata added in v0.6.0

func (snq *SourceNameQuery) WithMetadata(opts ...func(*HasMetadataQuery)) *SourceNameQuery

WithMetadata tells the query-builder to eager-load the nodes that are connected to the "metadata" edge. The optional arguments are used to configure the query builder of the edge.

func (*SourceNameQuery) WithNamedCertification added in v0.6.0

func (snq *SourceNameQuery) WithNamedCertification(name string, opts ...func(*CertificationQuery)) *SourceNameQuery

WithNamedCertification tells the query-builder to eager-load the nodes that are connected to the "certification" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*SourceNameQuery) WithNamedCertifyLegal added in v0.6.0

func (snq *SourceNameQuery) WithNamedCertifyLegal(name string, opts ...func(*CertifyLegalQuery)) *SourceNameQuery

WithNamedCertifyLegal tells the query-builder to eager-load the nodes that are connected to the "certify_legal" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*SourceNameQuery) WithNamedHasSourceAt added in v0.6.0

func (snq *SourceNameQuery) WithNamedHasSourceAt(name string, opts ...func(*HasSourceAtQuery)) *SourceNameQuery

WithNamedHasSourceAt tells the query-builder to eager-load the nodes that are connected to the "has_source_at" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*SourceNameQuery) WithNamedMetadata added in v0.6.0

func (snq *SourceNameQuery) WithNamedMetadata(name string, opts ...func(*HasMetadataQuery)) *SourceNameQuery

WithNamedMetadata tells the query-builder to eager-load the nodes that are connected to the "metadata" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*SourceNameQuery) WithNamedOccurrences

func (snq *SourceNameQuery) WithNamedOccurrences(name string, opts ...func(*OccurrenceQuery)) *SourceNameQuery

WithNamedOccurrences tells the query-builder to eager-load the nodes that are connected to the "occurrences" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*SourceNameQuery) WithNamedPoc added in v0.6.0

func (snq *SourceNameQuery) WithNamedPoc(name string, opts ...func(*PointOfContactQuery)) *SourceNameQuery

WithNamedPoc tells the query-builder to eager-load the nodes that are connected to the "poc" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*SourceNameQuery) WithNamedScorecard added in v0.6.0

func (snq *SourceNameQuery) WithNamedScorecard(name string, opts ...func(*CertifyScorecardQuery)) *SourceNameQuery

WithNamedScorecard tells the query-builder to eager-load the nodes that are connected to the "scorecard" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*SourceNameQuery) WithOccurrences

func (snq *SourceNameQuery) WithOccurrences(opts ...func(*OccurrenceQuery)) *SourceNameQuery

WithOccurrences tells the query-builder to eager-load the nodes that are connected to the "occurrences" edge. The optional arguments are used to configure the query builder of the edge.

func (*SourceNameQuery) WithPoc added in v0.6.0

func (snq *SourceNameQuery) WithPoc(opts ...func(*PointOfContactQuery)) *SourceNameQuery

WithPoc tells the query-builder to eager-load the nodes that are connected to the "poc" edge. The optional arguments are used to configure the query builder of the edge.

func (*SourceNameQuery) WithScorecard added in v0.6.0

func (snq *SourceNameQuery) WithScorecard(opts ...func(*CertifyScorecardQuery)) *SourceNameQuery

WithScorecard tells the query-builder to eager-load the nodes that are connected to the "scorecard" edge. The optional arguments are used to configure the query builder of the edge.

type SourceNameSelect

type SourceNameSelect struct {
	*SourceNameQuery
	// contains filtered or unexported fields
}

SourceNameSelect is the builder for selecting fields of SourceName entities.

func (*SourceNameSelect) Aggregate

func (sns *SourceNameSelect) Aggregate(fns ...AggregateFunc) *SourceNameSelect

Aggregate adds the given aggregation functions to the selector query.

func (*SourceNameSelect) Bool

func (s *SourceNameSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*SourceNameSelect) BoolX

func (s *SourceNameSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*SourceNameSelect) Bools

func (s *SourceNameSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*SourceNameSelect) BoolsX

func (s *SourceNameSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*SourceNameSelect) Float64

func (s *SourceNameSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*SourceNameSelect) Float64X

func (s *SourceNameSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*SourceNameSelect) Float64s

func (s *SourceNameSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*SourceNameSelect) Float64sX

func (s *SourceNameSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*SourceNameSelect) Int

func (s *SourceNameSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*SourceNameSelect) IntX

func (s *SourceNameSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*SourceNameSelect) Ints

func (s *SourceNameSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*SourceNameSelect) IntsX

func (s *SourceNameSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*SourceNameSelect) Scan

func (sns *SourceNameSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*SourceNameSelect) ScanX

func (s *SourceNameSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*SourceNameSelect) String

func (s *SourceNameSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*SourceNameSelect) StringX

func (s *SourceNameSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*SourceNameSelect) Strings

func (s *SourceNameSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*SourceNameSelect) StringsX

func (s *SourceNameSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type SourceNameUpdate

type SourceNameUpdate struct {
	// contains filtered or unexported fields
}

SourceNameUpdate is the builder for updating SourceName entities.

func (*SourceNameUpdate) AddCertification added in v0.6.0

func (snu *SourceNameUpdate) AddCertification(c ...*Certification) *SourceNameUpdate

AddCertification adds the "certification" edges to the Certification entity.

func (*SourceNameUpdate) AddCertificationIDs added in v0.6.0

func (snu *SourceNameUpdate) AddCertificationIDs(ids ...uuid.UUID) *SourceNameUpdate

AddCertificationIDs adds the "certification" edge to the Certification entity by IDs.

func (*SourceNameUpdate) AddCertifyLegal added in v0.6.0

func (snu *SourceNameUpdate) AddCertifyLegal(c ...*CertifyLegal) *SourceNameUpdate

AddCertifyLegal adds the "certify_legal" edges to the CertifyLegal entity.

func (*SourceNameUpdate) AddCertifyLegalIDs added in v0.6.0

func (snu *SourceNameUpdate) AddCertifyLegalIDs(ids ...uuid.UUID) *SourceNameUpdate

AddCertifyLegalIDs adds the "certify_legal" edge to the CertifyLegal entity by IDs.

func (*SourceNameUpdate) AddHasSourceAt added in v0.6.0

func (snu *SourceNameUpdate) AddHasSourceAt(h ...*HasSourceAt) *SourceNameUpdate

AddHasSourceAt adds the "has_source_at" edges to the HasSourceAt entity.

func (*SourceNameUpdate) AddHasSourceAtIDs added in v0.6.0

func (snu *SourceNameUpdate) AddHasSourceAtIDs(ids ...uuid.UUID) *SourceNameUpdate

AddHasSourceAtIDs adds the "has_source_at" edge to the HasSourceAt entity by IDs.

func (*SourceNameUpdate) AddMetadata added in v0.6.0

func (snu *SourceNameUpdate) AddMetadata(h ...*HasMetadata) *SourceNameUpdate

AddMetadata adds the "metadata" edges to the HasMetadata entity.

func (*SourceNameUpdate) AddMetadatumIDs added in v0.6.0

func (snu *SourceNameUpdate) AddMetadatumIDs(ids ...uuid.UUID) *SourceNameUpdate

AddMetadatumIDs adds the "metadata" edge to the HasMetadata entity by IDs.

func (*SourceNameUpdate) AddOccurrenceIDs

func (snu *SourceNameUpdate) AddOccurrenceIDs(ids ...uuid.UUID) *SourceNameUpdate

AddOccurrenceIDs adds the "occurrences" edge to the Occurrence entity by IDs.

func (*SourceNameUpdate) AddOccurrences

func (snu *SourceNameUpdate) AddOccurrences(o ...*Occurrence) *SourceNameUpdate

AddOccurrences adds the "occurrences" edges to the Occurrence entity.

func (*SourceNameUpdate) AddPoc added in v0.6.0

func (snu *SourceNameUpdate) AddPoc(p ...*PointOfContact) *SourceNameUpdate

AddPoc adds the "poc" edges to the PointOfContact entity.

func (*SourceNameUpdate) AddPocIDs added in v0.6.0

func (snu *SourceNameUpdate) AddPocIDs(ids ...uuid.UUID) *SourceNameUpdate

AddPocIDs adds the "poc" edge to the PointOfContact entity by IDs.

func (*SourceNameUpdate) AddScorecard added in v0.6.0

func (snu *SourceNameUpdate) AddScorecard(c ...*CertifyScorecard) *SourceNameUpdate

AddScorecard adds the "scorecard" edges to the CertifyScorecard entity.

func (*SourceNameUpdate) AddScorecardIDs added in v0.6.0

func (snu *SourceNameUpdate) AddScorecardIDs(ids ...uuid.UUID) *SourceNameUpdate

AddScorecardIDs adds the "scorecard" edge to the CertifyScorecard entity by IDs.

func (*SourceNameUpdate) ClearCertification added in v0.6.0

func (snu *SourceNameUpdate) ClearCertification() *SourceNameUpdate

ClearCertification clears all "certification" edges to the Certification entity.

func (*SourceNameUpdate) ClearCertifyLegal added in v0.6.0

func (snu *SourceNameUpdate) ClearCertifyLegal() *SourceNameUpdate

ClearCertifyLegal clears all "certify_legal" edges to the CertifyLegal entity.

func (*SourceNameUpdate) ClearCommit

func (snu *SourceNameUpdate) ClearCommit() *SourceNameUpdate

ClearCommit clears the value of the "commit" field.

func (*SourceNameUpdate) ClearHasSourceAt added in v0.6.0

func (snu *SourceNameUpdate) ClearHasSourceAt() *SourceNameUpdate

ClearHasSourceAt clears all "has_source_at" edges to the HasSourceAt entity.

func (*SourceNameUpdate) ClearMetadata added in v0.6.0

func (snu *SourceNameUpdate) ClearMetadata() *SourceNameUpdate

ClearMetadata clears all "metadata" edges to the HasMetadata entity.

func (*SourceNameUpdate) ClearOccurrences

func (snu *SourceNameUpdate) ClearOccurrences() *SourceNameUpdate

ClearOccurrences clears all "occurrences" edges to the Occurrence entity.

func (*SourceNameUpdate) ClearPoc added in v0.6.0

func (snu *SourceNameUpdate) ClearPoc() *SourceNameUpdate

ClearPoc clears all "poc" edges to the PointOfContact entity.

func (*SourceNameUpdate) ClearScorecard added in v0.6.0

func (snu *SourceNameUpdate) ClearScorecard() *SourceNameUpdate

ClearScorecard clears all "scorecard" edges to the CertifyScorecard entity.

func (*SourceNameUpdate) ClearTag

func (snu *SourceNameUpdate) ClearTag() *SourceNameUpdate

ClearTag clears the value of the "tag" field.

func (*SourceNameUpdate) Exec

func (snu *SourceNameUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*SourceNameUpdate) ExecX

func (snu *SourceNameUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SourceNameUpdate) Mutation

func (snu *SourceNameUpdate) Mutation() *SourceNameMutation

Mutation returns the SourceNameMutation object of the builder.

func (*SourceNameUpdate) RemoveCertification added in v0.6.0

func (snu *SourceNameUpdate) RemoveCertification(c ...*Certification) *SourceNameUpdate

RemoveCertification removes "certification" edges to Certification entities.

func (*SourceNameUpdate) RemoveCertificationIDs added in v0.6.0

func (snu *SourceNameUpdate) RemoveCertificationIDs(ids ...uuid.UUID) *SourceNameUpdate

RemoveCertificationIDs removes the "certification" edge to Certification entities by IDs.

func (*SourceNameUpdate) RemoveCertifyLegal added in v0.6.0

func (snu *SourceNameUpdate) RemoveCertifyLegal(c ...*CertifyLegal) *SourceNameUpdate

RemoveCertifyLegal removes "certify_legal" edges to CertifyLegal entities.

func (*SourceNameUpdate) RemoveCertifyLegalIDs added in v0.6.0

func (snu *SourceNameUpdate) RemoveCertifyLegalIDs(ids ...uuid.UUID) *SourceNameUpdate

RemoveCertifyLegalIDs removes the "certify_legal" edge to CertifyLegal entities by IDs.

func (*SourceNameUpdate) RemoveHasSourceAt added in v0.6.0

func (snu *SourceNameUpdate) RemoveHasSourceAt(h ...*HasSourceAt) *SourceNameUpdate

RemoveHasSourceAt removes "has_source_at" edges to HasSourceAt entities.

func (*SourceNameUpdate) RemoveHasSourceAtIDs added in v0.6.0

func (snu *SourceNameUpdate) RemoveHasSourceAtIDs(ids ...uuid.UUID) *SourceNameUpdate

RemoveHasSourceAtIDs removes the "has_source_at" edge to HasSourceAt entities by IDs.

func (*SourceNameUpdate) RemoveMetadata added in v0.6.0

func (snu *SourceNameUpdate) RemoveMetadata(h ...*HasMetadata) *SourceNameUpdate

RemoveMetadata removes "metadata" edges to HasMetadata entities.

func (*SourceNameUpdate) RemoveMetadatumIDs added in v0.6.0

func (snu *SourceNameUpdate) RemoveMetadatumIDs(ids ...uuid.UUID) *SourceNameUpdate

RemoveMetadatumIDs removes the "metadata" edge to HasMetadata entities by IDs.

func (*SourceNameUpdate) RemoveOccurrenceIDs

func (snu *SourceNameUpdate) RemoveOccurrenceIDs(ids ...uuid.UUID) *SourceNameUpdate

RemoveOccurrenceIDs removes the "occurrences" edge to Occurrence entities by IDs.

func (*SourceNameUpdate) RemoveOccurrences

func (snu *SourceNameUpdate) RemoveOccurrences(o ...*Occurrence) *SourceNameUpdate

RemoveOccurrences removes "occurrences" edges to Occurrence entities.

func (*SourceNameUpdate) RemovePoc added in v0.6.0

func (snu *SourceNameUpdate) RemovePoc(p ...*PointOfContact) *SourceNameUpdate

RemovePoc removes "poc" edges to PointOfContact entities.

func (*SourceNameUpdate) RemovePocIDs added in v0.6.0

func (snu *SourceNameUpdate) RemovePocIDs(ids ...uuid.UUID) *SourceNameUpdate

RemovePocIDs removes the "poc" edge to PointOfContact entities by IDs.

func (*SourceNameUpdate) RemoveScorecard added in v0.6.0

func (snu *SourceNameUpdate) RemoveScorecard(c ...*CertifyScorecard) *SourceNameUpdate

RemoveScorecard removes "scorecard" edges to CertifyScorecard entities.

func (*SourceNameUpdate) RemoveScorecardIDs added in v0.6.0

func (snu *SourceNameUpdate) RemoveScorecardIDs(ids ...uuid.UUID) *SourceNameUpdate

RemoveScorecardIDs removes the "scorecard" edge to CertifyScorecard entities by IDs.

func (*SourceNameUpdate) Save

func (snu *SourceNameUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*SourceNameUpdate) SaveX

func (snu *SourceNameUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*SourceNameUpdate) SetCommit

func (snu *SourceNameUpdate) SetCommit(s string) *SourceNameUpdate

SetCommit sets the "commit" field.

func (*SourceNameUpdate) SetName

func (snu *SourceNameUpdate) SetName(s string) *SourceNameUpdate

SetName sets the "name" field.

func (*SourceNameUpdate) SetNamespace

func (snu *SourceNameUpdate) SetNamespace(s string) *SourceNameUpdate

SetNamespace sets the "namespace" field.

func (*SourceNameUpdate) SetNillableCommit

func (snu *SourceNameUpdate) SetNillableCommit(s *string) *SourceNameUpdate

SetNillableCommit sets the "commit" field if the given value is not nil.

func (*SourceNameUpdate) SetNillableName added in v0.4.0

func (snu *SourceNameUpdate) SetNillableName(s *string) *SourceNameUpdate

SetNillableName sets the "name" field if the given value is not nil.

func (*SourceNameUpdate) SetNillableNamespace added in v0.5.0

func (snu *SourceNameUpdate) SetNillableNamespace(s *string) *SourceNameUpdate

SetNillableNamespace sets the "namespace" field if the given value is not nil.

func (*SourceNameUpdate) SetNillableTag

func (snu *SourceNameUpdate) SetNillableTag(s *string) *SourceNameUpdate

SetNillableTag sets the "tag" field if the given value is not nil.

func (*SourceNameUpdate) SetNillableType added in v0.5.0

func (snu *SourceNameUpdate) SetNillableType(s *string) *SourceNameUpdate

SetNillableType sets the "type" field if the given value is not nil.

func (*SourceNameUpdate) SetTag

func (snu *SourceNameUpdate) SetTag(s string) *SourceNameUpdate

SetTag sets the "tag" field.

func (*SourceNameUpdate) SetType added in v0.5.0

func (snu *SourceNameUpdate) SetType(s string) *SourceNameUpdate

SetType sets the "type" field.

func (*SourceNameUpdate) Where

Where appends a list predicates to the SourceNameUpdate builder.

type SourceNameUpdateOne

type SourceNameUpdateOne struct {
	// contains filtered or unexported fields
}

SourceNameUpdateOne is the builder for updating a single SourceName entity.

func (*SourceNameUpdateOne) AddCertification added in v0.6.0

func (snuo *SourceNameUpdateOne) AddCertification(c ...*Certification) *SourceNameUpdateOne

AddCertification adds the "certification" edges to the Certification entity.

func (*SourceNameUpdateOne) AddCertificationIDs added in v0.6.0

func (snuo *SourceNameUpdateOne) AddCertificationIDs(ids ...uuid.UUID) *SourceNameUpdateOne

AddCertificationIDs adds the "certification" edge to the Certification entity by IDs.

func (*SourceNameUpdateOne) AddCertifyLegal added in v0.6.0

func (snuo *SourceNameUpdateOne) AddCertifyLegal(c ...*CertifyLegal) *SourceNameUpdateOne

AddCertifyLegal adds the "certify_legal" edges to the CertifyLegal entity.

func (*SourceNameUpdateOne) AddCertifyLegalIDs added in v0.6.0

func (snuo *SourceNameUpdateOne) AddCertifyLegalIDs(ids ...uuid.UUID) *SourceNameUpdateOne

AddCertifyLegalIDs adds the "certify_legal" edge to the CertifyLegal entity by IDs.

func (*SourceNameUpdateOne) AddHasSourceAt added in v0.6.0

func (snuo *SourceNameUpdateOne) AddHasSourceAt(h ...*HasSourceAt) *SourceNameUpdateOne

AddHasSourceAt adds the "has_source_at" edges to the HasSourceAt entity.

func (*SourceNameUpdateOne) AddHasSourceAtIDs added in v0.6.0

func (snuo *SourceNameUpdateOne) AddHasSourceAtIDs(ids ...uuid.UUID) *SourceNameUpdateOne

AddHasSourceAtIDs adds the "has_source_at" edge to the HasSourceAt entity by IDs.

func (*SourceNameUpdateOne) AddMetadata added in v0.6.0

func (snuo *SourceNameUpdateOne) AddMetadata(h ...*HasMetadata) *SourceNameUpdateOne

AddMetadata adds the "metadata" edges to the HasMetadata entity.

func (*SourceNameUpdateOne) AddMetadatumIDs added in v0.6.0

func (snuo *SourceNameUpdateOne) AddMetadatumIDs(ids ...uuid.UUID) *SourceNameUpdateOne

AddMetadatumIDs adds the "metadata" edge to the HasMetadata entity by IDs.

func (*SourceNameUpdateOne) AddOccurrenceIDs

func (snuo *SourceNameUpdateOne) AddOccurrenceIDs(ids ...uuid.UUID) *SourceNameUpdateOne

AddOccurrenceIDs adds the "occurrences" edge to the Occurrence entity by IDs.

func (*SourceNameUpdateOne) AddOccurrences

func (snuo *SourceNameUpdateOne) AddOccurrences(o ...*Occurrence) *SourceNameUpdateOne

AddOccurrences adds the "occurrences" edges to the Occurrence entity.

func (*SourceNameUpdateOne) AddPoc added in v0.6.0

AddPoc adds the "poc" edges to the PointOfContact entity.

func (*SourceNameUpdateOne) AddPocIDs added in v0.6.0

func (snuo *SourceNameUpdateOne) AddPocIDs(ids ...uuid.UUID) *SourceNameUpdateOne

AddPocIDs adds the "poc" edge to the PointOfContact entity by IDs.

func (*SourceNameUpdateOne) AddScorecard added in v0.6.0

func (snuo *SourceNameUpdateOne) AddScorecard(c ...*CertifyScorecard) *SourceNameUpdateOne

AddScorecard adds the "scorecard" edges to the CertifyScorecard entity.

func (*SourceNameUpdateOne) AddScorecardIDs added in v0.6.0

func (snuo *SourceNameUpdateOne) AddScorecardIDs(ids ...uuid.UUID) *SourceNameUpdateOne

AddScorecardIDs adds the "scorecard" edge to the CertifyScorecard entity by IDs.

func (*SourceNameUpdateOne) ClearCertification added in v0.6.0

func (snuo *SourceNameUpdateOne) ClearCertification() *SourceNameUpdateOne

ClearCertification clears all "certification" edges to the Certification entity.

func (*SourceNameUpdateOne) ClearCertifyLegal added in v0.6.0

func (snuo *SourceNameUpdateOne) ClearCertifyLegal() *SourceNameUpdateOne

ClearCertifyLegal clears all "certify_legal" edges to the CertifyLegal entity.

func (*SourceNameUpdateOne) ClearCommit

func (snuo *SourceNameUpdateOne) ClearCommit() *SourceNameUpdateOne

ClearCommit clears the value of the "commit" field.

func (*SourceNameUpdateOne) ClearHasSourceAt added in v0.6.0

func (snuo *SourceNameUpdateOne) ClearHasSourceAt() *SourceNameUpdateOne

ClearHasSourceAt clears all "has_source_at" edges to the HasSourceAt entity.

func (*SourceNameUpdateOne) ClearMetadata added in v0.6.0

func (snuo *SourceNameUpdateOne) ClearMetadata() *SourceNameUpdateOne

ClearMetadata clears all "metadata" edges to the HasMetadata entity.

func (*SourceNameUpdateOne) ClearOccurrences

func (snuo *SourceNameUpdateOne) ClearOccurrences() *SourceNameUpdateOne

ClearOccurrences clears all "occurrences" edges to the Occurrence entity.

func (*SourceNameUpdateOne) ClearPoc added in v0.6.0

func (snuo *SourceNameUpdateOne) ClearPoc() *SourceNameUpdateOne

ClearPoc clears all "poc" edges to the PointOfContact entity.

func (*SourceNameUpdateOne) ClearScorecard added in v0.6.0

func (snuo *SourceNameUpdateOne) ClearScorecard() *SourceNameUpdateOne

ClearScorecard clears all "scorecard" edges to the CertifyScorecard entity.

func (*SourceNameUpdateOne) ClearTag

func (snuo *SourceNameUpdateOne) ClearTag() *SourceNameUpdateOne

ClearTag clears the value of the "tag" field.

func (*SourceNameUpdateOne) Exec

func (snuo *SourceNameUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*SourceNameUpdateOne) ExecX

func (snuo *SourceNameUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SourceNameUpdateOne) Mutation

func (snuo *SourceNameUpdateOne) Mutation() *SourceNameMutation

Mutation returns the SourceNameMutation object of the builder.

func (*SourceNameUpdateOne) RemoveCertification added in v0.6.0

func (snuo *SourceNameUpdateOne) RemoveCertification(c ...*Certification) *SourceNameUpdateOne

RemoveCertification removes "certification" edges to Certification entities.

func (*SourceNameUpdateOne) RemoveCertificationIDs added in v0.6.0

func (snuo *SourceNameUpdateOne) RemoveCertificationIDs(ids ...uuid.UUID) *SourceNameUpdateOne

RemoveCertificationIDs removes the "certification" edge to Certification entities by IDs.

func (*SourceNameUpdateOne) RemoveCertifyLegal added in v0.6.0

func (snuo *SourceNameUpdateOne) RemoveCertifyLegal(c ...*CertifyLegal) *SourceNameUpdateOne

RemoveCertifyLegal removes "certify_legal" edges to CertifyLegal entities.

func (*SourceNameUpdateOne) RemoveCertifyLegalIDs added in v0.6.0

func (snuo *SourceNameUpdateOne) RemoveCertifyLegalIDs(ids ...uuid.UUID) *SourceNameUpdateOne

RemoveCertifyLegalIDs removes the "certify_legal" edge to CertifyLegal entities by IDs.

func (*SourceNameUpdateOne) RemoveHasSourceAt added in v0.6.0

func (snuo *SourceNameUpdateOne) RemoveHasSourceAt(h ...*HasSourceAt) *SourceNameUpdateOne

RemoveHasSourceAt removes "has_source_at" edges to HasSourceAt entities.

func (*SourceNameUpdateOne) RemoveHasSourceAtIDs added in v0.6.0

func (snuo *SourceNameUpdateOne) RemoveHasSourceAtIDs(ids ...uuid.UUID) *SourceNameUpdateOne

RemoveHasSourceAtIDs removes the "has_source_at" edge to HasSourceAt entities by IDs.

func (*SourceNameUpdateOne) RemoveMetadata added in v0.6.0

func (snuo *SourceNameUpdateOne) RemoveMetadata(h ...*HasMetadata) *SourceNameUpdateOne

RemoveMetadata removes "metadata" edges to HasMetadata entities.

func (*SourceNameUpdateOne) RemoveMetadatumIDs added in v0.6.0

func (snuo *SourceNameUpdateOne) RemoveMetadatumIDs(ids ...uuid.UUID) *SourceNameUpdateOne

RemoveMetadatumIDs removes the "metadata" edge to HasMetadata entities by IDs.

func (*SourceNameUpdateOne) RemoveOccurrenceIDs

func (snuo *SourceNameUpdateOne) RemoveOccurrenceIDs(ids ...uuid.UUID) *SourceNameUpdateOne

RemoveOccurrenceIDs removes the "occurrences" edge to Occurrence entities by IDs.

func (*SourceNameUpdateOne) RemoveOccurrences

func (snuo *SourceNameUpdateOne) RemoveOccurrences(o ...*Occurrence) *SourceNameUpdateOne

RemoveOccurrences removes "occurrences" edges to Occurrence entities.

func (*SourceNameUpdateOne) RemovePoc added in v0.6.0

func (snuo *SourceNameUpdateOne) RemovePoc(p ...*PointOfContact) *SourceNameUpdateOne

RemovePoc removes "poc" edges to PointOfContact entities.

func (*SourceNameUpdateOne) RemovePocIDs added in v0.6.0

func (snuo *SourceNameUpdateOne) RemovePocIDs(ids ...uuid.UUID) *SourceNameUpdateOne

RemovePocIDs removes the "poc" edge to PointOfContact entities by IDs.

func (*SourceNameUpdateOne) RemoveScorecard added in v0.6.0

func (snuo *SourceNameUpdateOne) RemoveScorecard(c ...*CertifyScorecard) *SourceNameUpdateOne

RemoveScorecard removes "scorecard" edges to CertifyScorecard entities.

func (*SourceNameUpdateOne) RemoveScorecardIDs added in v0.6.0

func (snuo *SourceNameUpdateOne) RemoveScorecardIDs(ids ...uuid.UUID) *SourceNameUpdateOne

RemoveScorecardIDs removes the "scorecard" edge to CertifyScorecard entities by IDs.

func (*SourceNameUpdateOne) Save

func (snuo *SourceNameUpdateOne) Save(ctx context.Context) (*SourceName, error)

Save executes the query and returns the updated SourceName entity.

func (*SourceNameUpdateOne) SaveX

func (snuo *SourceNameUpdateOne) SaveX(ctx context.Context) *SourceName

SaveX is like Save, but panics if an error occurs.

func (*SourceNameUpdateOne) Select

func (snuo *SourceNameUpdateOne) Select(field string, fields ...string) *SourceNameUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*SourceNameUpdateOne) SetCommit

func (snuo *SourceNameUpdateOne) SetCommit(s string) *SourceNameUpdateOne

SetCommit sets the "commit" field.

func (*SourceNameUpdateOne) SetName

SetName sets the "name" field.

func (*SourceNameUpdateOne) SetNamespace

func (snuo *SourceNameUpdateOne) SetNamespace(s string) *SourceNameUpdateOne

SetNamespace sets the "namespace" field.

func (*SourceNameUpdateOne) SetNillableCommit

func (snuo *SourceNameUpdateOne) SetNillableCommit(s *string) *SourceNameUpdateOne

SetNillableCommit sets the "commit" field if the given value is not nil.

func (*SourceNameUpdateOne) SetNillableName added in v0.4.0

func (snuo *SourceNameUpdateOne) SetNillableName(s *string) *SourceNameUpdateOne

SetNillableName sets the "name" field if the given value is not nil.

func (*SourceNameUpdateOne) SetNillableNamespace added in v0.5.0

func (snuo *SourceNameUpdateOne) SetNillableNamespace(s *string) *SourceNameUpdateOne

SetNillableNamespace sets the "namespace" field if the given value is not nil.

func (*SourceNameUpdateOne) SetNillableTag

func (snuo *SourceNameUpdateOne) SetNillableTag(s *string) *SourceNameUpdateOne

SetNillableTag sets the "tag" field if the given value is not nil.

func (*SourceNameUpdateOne) SetNillableType added in v0.5.0

func (snuo *SourceNameUpdateOne) SetNillableType(s *string) *SourceNameUpdateOne

SetNillableType sets the "type" field if the given value is not nil.

func (*SourceNameUpdateOne) SetTag

SetTag sets the "tag" field.

func (*SourceNameUpdateOne) SetType added in v0.5.0

SetType sets the "type" field.

func (*SourceNameUpdateOne) Where

Where appends a list predicates to the SourceNameUpdate builder.

type SourceNameUpsert

type SourceNameUpsert struct {
	*sql.UpdateSet
}

SourceNameUpsert is the "OnConflict" setter.

func (*SourceNameUpsert) ClearCommit

func (u *SourceNameUpsert) ClearCommit() *SourceNameUpsert

ClearCommit clears the value of the "commit" field.

func (*SourceNameUpsert) ClearTag

func (u *SourceNameUpsert) ClearTag() *SourceNameUpsert

ClearTag clears the value of the "tag" field.

func (*SourceNameUpsert) SetCommit

func (u *SourceNameUpsert) SetCommit(v string) *SourceNameUpsert

SetCommit sets the "commit" field.

func (*SourceNameUpsert) SetName

func (u *SourceNameUpsert) SetName(v string) *SourceNameUpsert

SetName sets the "name" field.

func (*SourceNameUpsert) SetNamespace added in v0.5.0

func (u *SourceNameUpsert) SetNamespace(v string) *SourceNameUpsert

SetNamespace sets the "namespace" field.

func (*SourceNameUpsert) SetTag

SetTag sets the "tag" field.

func (*SourceNameUpsert) SetType added in v0.5.0

func (u *SourceNameUpsert) SetType(v string) *SourceNameUpsert

SetType sets the "type" field.

func (*SourceNameUpsert) UpdateCommit

func (u *SourceNameUpsert) UpdateCommit() *SourceNameUpsert

UpdateCommit sets the "commit" field to the value that was provided on create.

func (*SourceNameUpsert) UpdateName

func (u *SourceNameUpsert) UpdateName() *SourceNameUpsert

UpdateName sets the "name" field to the value that was provided on create.

func (*SourceNameUpsert) UpdateNamespace added in v0.5.0

func (u *SourceNameUpsert) UpdateNamespace() *SourceNameUpsert

UpdateNamespace sets the "namespace" field to the value that was provided on create.

func (*SourceNameUpsert) UpdateTag

func (u *SourceNameUpsert) UpdateTag() *SourceNameUpsert

UpdateTag sets the "tag" field to the value that was provided on create.

func (*SourceNameUpsert) UpdateType added in v0.5.0

func (u *SourceNameUpsert) UpdateType() *SourceNameUpsert

UpdateType sets the "type" field to the value that was provided on create.

type SourceNameUpsertBulk

type SourceNameUpsertBulk struct {
	// contains filtered or unexported fields
}

SourceNameUpsertBulk is the builder for "upsert"-ing a bulk of SourceName nodes.

func (*SourceNameUpsertBulk) ClearCommit

func (u *SourceNameUpsertBulk) ClearCommit() *SourceNameUpsertBulk

ClearCommit clears the value of the "commit" field.

func (*SourceNameUpsertBulk) ClearTag

ClearTag clears the value of the "tag" field.

func (*SourceNameUpsertBulk) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*SourceNameUpsertBulk) Exec

Exec executes the query.

func (*SourceNameUpsertBulk) ExecX

func (u *SourceNameUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SourceNameUpsertBulk) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.SourceName.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*SourceNameUpsertBulk) SetCommit

SetCommit sets the "commit" field.

func (*SourceNameUpsertBulk) SetName

SetName sets the "name" field.

func (*SourceNameUpsertBulk) SetNamespace added in v0.5.0

func (u *SourceNameUpsertBulk) SetNamespace(v string) *SourceNameUpsertBulk

SetNamespace sets the "namespace" field.

func (*SourceNameUpsertBulk) SetTag

SetTag sets the "tag" field.

func (*SourceNameUpsertBulk) SetType added in v0.5.0

SetType sets the "type" field.

func (*SourceNameUpsertBulk) Update

Update allows overriding fields `UPDATE` values. See the SourceNameCreateBulk.OnConflict documentation for more info.

func (*SourceNameUpsertBulk) UpdateCommit

func (u *SourceNameUpsertBulk) UpdateCommit() *SourceNameUpsertBulk

UpdateCommit sets the "commit" field to the value that was provided on create.

func (*SourceNameUpsertBulk) UpdateName

func (u *SourceNameUpsertBulk) UpdateName() *SourceNameUpsertBulk

UpdateName sets the "name" field to the value that was provided on create.

func (*SourceNameUpsertBulk) UpdateNamespace added in v0.5.0

func (u *SourceNameUpsertBulk) UpdateNamespace() *SourceNameUpsertBulk

UpdateNamespace sets the "namespace" field to the value that was provided on create.

func (*SourceNameUpsertBulk) UpdateNewValues

func (u *SourceNameUpsertBulk) UpdateNewValues() *SourceNameUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.SourceName.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(sourcename.FieldID)
		}),
	).
	Exec(ctx)

func (*SourceNameUpsertBulk) UpdateTag

UpdateTag sets the "tag" field to the value that was provided on create.

func (*SourceNameUpsertBulk) UpdateType added in v0.5.0

func (u *SourceNameUpsertBulk) UpdateType() *SourceNameUpsertBulk

UpdateType sets the "type" field to the value that was provided on create.

type SourceNameUpsertOne

type SourceNameUpsertOne struct {
	// contains filtered or unexported fields
}

SourceNameUpsertOne is the builder for "upsert"-ing

one SourceName node.

func (*SourceNameUpsertOne) ClearCommit

func (u *SourceNameUpsertOne) ClearCommit() *SourceNameUpsertOne

ClearCommit clears the value of the "commit" field.

func (*SourceNameUpsertOne) ClearTag

ClearTag clears the value of the "tag" field.

func (*SourceNameUpsertOne) DoNothing

func (u *SourceNameUpsertOne) DoNothing() *SourceNameUpsertOne

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*SourceNameUpsertOne) Exec

Exec executes the query.

func (*SourceNameUpsertOne) ExecX

func (u *SourceNameUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SourceNameUpsertOne) ID

func (u *SourceNameUpsertOne) ID(ctx context.Context) (id uuid.UUID, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*SourceNameUpsertOne) IDX

IDX is like ID, but panics if an error occurs.

func (*SourceNameUpsertOne) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.SourceName.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*SourceNameUpsertOne) SetCommit

SetCommit sets the "commit" field.

func (*SourceNameUpsertOne) SetName

SetName sets the "name" field.

func (*SourceNameUpsertOne) SetNamespace added in v0.5.0

func (u *SourceNameUpsertOne) SetNamespace(v string) *SourceNameUpsertOne

SetNamespace sets the "namespace" field.

func (*SourceNameUpsertOne) SetTag

SetTag sets the "tag" field.

func (*SourceNameUpsertOne) SetType added in v0.5.0

SetType sets the "type" field.

func (*SourceNameUpsertOne) Update

Update allows overriding fields `UPDATE` values. See the SourceNameCreate.OnConflict documentation for more info.

func (*SourceNameUpsertOne) UpdateCommit

func (u *SourceNameUpsertOne) UpdateCommit() *SourceNameUpsertOne

UpdateCommit sets the "commit" field to the value that was provided on create.

func (*SourceNameUpsertOne) UpdateName

func (u *SourceNameUpsertOne) UpdateName() *SourceNameUpsertOne

UpdateName sets the "name" field to the value that was provided on create.

func (*SourceNameUpsertOne) UpdateNamespace added in v0.5.0

func (u *SourceNameUpsertOne) UpdateNamespace() *SourceNameUpsertOne

UpdateNamespace sets the "namespace" field to the value that was provided on create.

func (*SourceNameUpsertOne) UpdateNewValues

func (u *SourceNameUpsertOne) UpdateNewValues() *SourceNameUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:

client.SourceName.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(sourcename.FieldID)
		}),
	).
	Exec(ctx)

func (*SourceNameUpsertOne) UpdateTag

func (u *SourceNameUpsertOne) UpdateTag() *SourceNameUpsertOne

UpdateTag sets the "tag" field to the value that was provided on create.

func (*SourceNameUpsertOne) UpdateType added in v0.5.0

func (u *SourceNameUpsertOne) UpdateType() *SourceNameUpsertOne

UpdateType sets the "type" field to the value that was provided on create.

type SourceNames

type SourceNames []*SourceName

SourceNames is a parsable slice of SourceName.

type TraverseFunc

type TraverseFunc = ent.TraverseFunc

ent aliases to avoid import conflicts in user's code.

type Traverser

type Traverser = ent.Traverser

ent aliases to avoid import conflicts in user's code.

type Tx

type Tx struct {

	// Artifact is the client for interacting with the Artifact builders.
	Artifact *ArtifactClient
	// BillOfMaterials is the client for interacting with the BillOfMaterials builders.
	BillOfMaterials *BillOfMaterialsClient
	// Builder is the client for interacting with the Builder builders.
	Builder *BuilderClient
	// Certification is the client for interacting with the Certification builders.
	Certification *CertificationClient
	// CertifyLegal is the client for interacting with the CertifyLegal builders.
	CertifyLegal *CertifyLegalClient
	// CertifyScorecard is the client for interacting with the CertifyScorecard builders.
	CertifyScorecard *CertifyScorecardClient
	// CertifyVex is the client for interacting with the CertifyVex builders.
	CertifyVex *CertifyVexClient
	// CertifyVuln is the client for interacting with the CertifyVuln builders.
	CertifyVuln *CertifyVulnClient
	// Dependency is the client for interacting with the Dependency builders.
	Dependency *DependencyClient
	// HasMetadata is the client for interacting with the HasMetadata builders.
	HasMetadata *HasMetadataClient
	// HasSourceAt is the client for interacting with the HasSourceAt builders.
	HasSourceAt *HasSourceAtClient
	// HashEqual is the client for interacting with the HashEqual builders.
	HashEqual *HashEqualClient
	// License is the client for interacting with the License builders.
	License *LicenseClient
	// Occurrence is the client for interacting with the Occurrence builders.
	Occurrence *OccurrenceClient
	// PackageName is the client for interacting with the PackageName builders.
	PackageName *PackageNameClient
	// PackageVersion is the client for interacting with the PackageVersion builders.
	PackageVersion *PackageVersionClient
	// PkgEqual is the client for interacting with the PkgEqual builders.
	PkgEqual *PkgEqualClient
	// PointOfContact is the client for interacting with the PointOfContact builders.
	PointOfContact *PointOfContactClient
	// SLSAAttestation is the client for interacting with the SLSAAttestation builders.
	SLSAAttestation *SLSAAttestationClient
	// SourceName is the client for interacting with the SourceName builders.
	SourceName *SourceNameClient
	// VulnEqual is the client for interacting with the VulnEqual builders.
	VulnEqual *VulnEqualClient
	// VulnerabilityID is the client for interacting with the VulnerabilityID builders.
	VulnerabilityID *VulnerabilityIDClient
	// VulnerabilityMetadata is the client for interacting with the VulnerabilityMetadata builders.
	VulnerabilityMetadata *VulnerabilityMetadataClient
	// contains filtered or unexported fields
}

Tx is a transactional client that is created by calling Client.Tx().

func TxFromContext

func TxFromContext(ctx context.Context) *Tx

TxFromContext returns a Tx stored inside a context, or nil if there isn't one.

func (*Tx) Client

func (tx *Tx) Client() *Client

Client returns a Client that binds to current transaction.

func (*Tx) Commit

func (tx *Tx) Commit() error

Commit commits the transaction.

func (*Tx) OnCommit

func (tx *Tx) OnCommit(f CommitHook)

OnCommit adds a hook to call on commit.

func (*Tx) OnRollback

func (tx *Tx) OnRollback(f RollbackHook)

OnRollback adds a hook to call on rollback.

func (*Tx) Rollback

func (tx *Tx) Rollback() error

Rollback rollbacks the transaction.

type ValidationError

type ValidationError struct {
	Name string // Field or edge name.
	// contains filtered or unexported fields
}

ValidationError returns when validating a field or edge fails.

func (*ValidationError) Error

func (e *ValidationError) Error() string

Error implements the error interface.

func (*ValidationError) Unwrap

func (e *ValidationError) Unwrap() error

Unwrap implements the errors.Wrapper interface.

type Value

type Value = ent.Value

ent aliases to avoid import conflicts in user's code.

type VulnEqual

type VulnEqual struct {

	// ID of the ent.
	ID uuid.UUID `json:"id,omitempty"`
	// VulnID holds the value of the "vuln_id" field.
	VulnID uuid.UUID `json:"vuln_id,omitempty"`
	// EqualVulnID holds the value of the "equal_vuln_id" field.
	EqualVulnID uuid.UUID `json:"equal_vuln_id,omitempty"`
	// Justification holds the value of the "justification" field.
	Justification string `json:"justification,omitempty"`
	// Origin holds the value of the "origin" field.
	Origin string `json:"origin,omitempty"`
	// Collector holds the value of the "collector" field.
	Collector string `json:"collector,omitempty"`
	// DocumentRef holds the value of the "document_ref" field.
	DocumentRef string `json:"document_ref,omitempty"`
	// An opaque hash of the vulnerability IDs that are equal
	VulnerabilitiesHash string `json:"vulnerabilities_hash,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the VulnEqualQuery when eager-loading is set.
	Edges VulnEqualEdges `json:"edges"`
	// contains filtered or unexported fields
}

VulnEqual is the model entity for the VulnEqual schema.

func (*VulnEqual) IsNode

func (n *VulnEqual) IsNode()

IsNode implements the Node interface check for GQLGen.

func (*VulnEqual) QueryVulnerabilityA added in v0.5.0

func (ve *VulnEqual) QueryVulnerabilityA() *VulnerabilityIDQuery

QueryVulnerabilityA queries the "vulnerability_a" edge of the VulnEqual entity.

func (*VulnEqual) QueryVulnerabilityB added in v0.5.0

func (ve *VulnEqual) QueryVulnerabilityB() *VulnerabilityIDQuery

QueryVulnerabilityB queries the "vulnerability_b" edge of the VulnEqual entity.

func (*VulnEqual) String

func (ve *VulnEqual) String() string

String implements the fmt.Stringer.

func (*VulnEqual) ToEdge

func (ve *VulnEqual) ToEdge(order *VulnEqualOrder) *VulnEqualEdge

ToEdge converts VulnEqual into VulnEqualEdge.

func (*VulnEqual) Unwrap

func (ve *VulnEqual) Unwrap() *VulnEqual

Unwrap unwraps the VulnEqual entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.

func (*VulnEqual) Update

func (ve *VulnEqual) Update() *VulnEqualUpdateOne

Update returns a builder for updating this VulnEqual. Note that you need to call VulnEqual.Unwrap() before calling this method if this VulnEqual was returned from a transaction, and the transaction was committed or rolled back.

func (*VulnEqual) Value

func (ve *VulnEqual) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the VulnEqual. This includes values selected through modifiers, order, etc.

func (*VulnEqual) VulnerabilityA added in v0.5.0

func (ve *VulnEqual) VulnerabilityA(ctx context.Context) (*VulnerabilityID, error)

func (*VulnEqual) VulnerabilityB added in v0.5.0

func (ve *VulnEqual) VulnerabilityB(ctx context.Context) (*VulnerabilityID, error)

type VulnEqualClient

type VulnEqualClient struct {
	// contains filtered or unexported fields
}

VulnEqualClient is a client for the VulnEqual schema.

func NewVulnEqualClient

func NewVulnEqualClient(c config) *VulnEqualClient

NewVulnEqualClient returns a client for the VulnEqual from the given config.

func (*VulnEqualClient) Create

func (c *VulnEqualClient) Create() *VulnEqualCreate

Create returns a builder for creating a VulnEqual entity.

func (*VulnEqualClient) CreateBulk

func (c *VulnEqualClient) CreateBulk(builders ...*VulnEqualCreate) *VulnEqualCreateBulk

CreateBulk returns a builder for creating a bulk of VulnEqual entities.

func (*VulnEqualClient) Delete

func (c *VulnEqualClient) Delete() *VulnEqualDelete

Delete returns a delete builder for VulnEqual.

func (*VulnEqualClient) DeleteOne

func (c *VulnEqualClient) DeleteOne(ve *VulnEqual) *VulnEqualDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*VulnEqualClient) DeleteOneID

func (c *VulnEqualClient) DeleteOneID(id uuid.UUID) *VulnEqualDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*VulnEqualClient) Get

func (c *VulnEqualClient) Get(ctx context.Context, id uuid.UUID) (*VulnEqual, error)

Get returns a VulnEqual entity by its id.

func (*VulnEqualClient) GetX

func (c *VulnEqualClient) GetX(ctx context.Context, id uuid.UUID) *VulnEqual

GetX is like Get, but panics if an error occurs.

func (*VulnEqualClient) Hooks

func (c *VulnEqualClient) Hooks() []Hook

Hooks returns the client hooks.

func (*VulnEqualClient) Intercept

func (c *VulnEqualClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `vulnequal.Intercept(f(g(h())))`.

func (*VulnEqualClient) Interceptors

func (c *VulnEqualClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*VulnEqualClient) MapCreateBulk

func (c *VulnEqualClient) MapCreateBulk(slice any, setFunc func(*VulnEqualCreate, int)) *VulnEqualCreateBulk

MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.

func (*VulnEqualClient) Query

func (c *VulnEqualClient) Query() *VulnEqualQuery

Query returns a query builder for VulnEqual.

func (*VulnEqualClient) QueryVulnerabilityA added in v0.5.0

func (c *VulnEqualClient) QueryVulnerabilityA(ve *VulnEqual) *VulnerabilityIDQuery

QueryVulnerabilityA queries the vulnerability_a edge of a VulnEqual.

func (*VulnEqualClient) QueryVulnerabilityB added in v0.5.0

func (c *VulnEqualClient) QueryVulnerabilityB(ve *VulnEqual) *VulnerabilityIDQuery

QueryVulnerabilityB queries the vulnerability_b edge of a VulnEqual.

func (*VulnEqualClient) Update

func (c *VulnEqualClient) Update() *VulnEqualUpdate

Update returns an update builder for VulnEqual.

func (*VulnEqualClient) UpdateOne

func (c *VulnEqualClient) UpdateOne(ve *VulnEqual) *VulnEqualUpdateOne

UpdateOne returns an update builder for the given entity.

func (*VulnEqualClient) UpdateOneID

func (c *VulnEqualClient) UpdateOneID(id uuid.UUID) *VulnEqualUpdateOne

UpdateOneID returns an update builder for the given id.

func (*VulnEqualClient) Use

func (c *VulnEqualClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `vulnequal.Hooks(f(g(h())))`.

type VulnEqualConnection

type VulnEqualConnection struct {
	Edges      []*VulnEqualEdge `json:"edges"`
	PageInfo   PageInfo         `json:"pageInfo"`
	TotalCount int              `json:"totalCount"`
}

VulnEqualConnection is the connection containing edges to VulnEqual.

type VulnEqualCreate

type VulnEqualCreate struct {
	// contains filtered or unexported fields
}

VulnEqualCreate is the builder for creating a VulnEqual entity.

func (*VulnEqualCreate) Exec

func (vec *VulnEqualCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*VulnEqualCreate) ExecX

func (vec *VulnEqualCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*VulnEqualCreate) Mutation

func (vec *VulnEqualCreate) Mutation() *VulnEqualMutation

Mutation returns the VulnEqualMutation object of the builder.

func (*VulnEqualCreate) OnConflict

func (vec *VulnEqualCreate) OnConflict(opts ...sql.ConflictOption) *VulnEqualUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.VulnEqual.Create().
	SetVulnID(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.VulnEqualUpsert) {
		SetVulnID(v+v).
	}).
	Exec(ctx)

func (*VulnEqualCreate) OnConflictColumns

func (vec *VulnEqualCreate) OnConflictColumns(columns ...string) *VulnEqualUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.VulnEqual.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*VulnEqualCreate) Save

func (vec *VulnEqualCreate) Save(ctx context.Context) (*VulnEqual, error)

Save creates the VulnEqual in the database.

func (*VulnEqualCreate) SaveX

func (vec *VulnEqualCreate) SaveX(ctx context.Context) *VulnEqual

SaveX calls Save and panics if Save returns an error.

func (*VulnEqualCreate) SetCollector

func (vec *VulnEqualCreate) SetCollector(s string) *VulnEqualCreate

SetCollector sets the "collector" field.

func (*VulnEqualCreate) SetDocumentRef added in v0.6.0

func (vec *VulnEqualCreate) SetDocumentRef(s string) *VulnEqualCreate

SetDocumentRef sets the "document_ref" field.

func (*VulnEqualCreate) SetEqualVulnID added in v0.5.0

func (vec *VulnEqualCreate) SetEqualVulnID(u uuid.UUID) *VulnEqualCreate

SetEqualVulnID sets the "equal_vuln_id" field.

func (*VulnEqualCreate) SetID added in v0.5.0

func (vec *VulnEqualCreate) SetID(u uuid.UUID) *VulnEqualCreate

SetID sets the "id" field.

func (*VulnEqualCreate) SetJustification

func (vec *VulnEqualCreate) SetJustification(s string) *VulnEqualCreate

SetJustification sets the "justification" field.

func (*VulnEqualCreate) SetNillableID added in v0.5.0

func (vec *VulnEqualCreate) SetNillableID(u *uuid.UUID) *VulnEqualCreate

SetNillableID sets the "id" field if the given value is not nil.

func (*VulnEqualCreate) SetOrigin

func (vec *VulnEqualCreate) SetOrigin(s string) *VulnEqualCreate

SetOrigin sets the "origin" field.

func (*VulnEqualCreate) SetVulnID added in v0.5.0

func (vec *VulnEqualCreate) SetVulnID(u uuid.UUID) *VulnEqualCreate

SetVulnID sets the "vuln_id" field.

func (*VulnEqualCreate) SetVulnerabilitiesHash added in v0.5.0

func (vec *VulnEqualCreate) SetVulnerabilitiesHash(s string) *VulnEqualCreate

SetVulnerabilitiesHash sets the "vulnerabilities_hash" field.

func (*VulnEqualCreate) SetVulnerabilityA added in v0.5.0

func (vec *VulnEqualCreate) SetVulnerabilityA(v *VulnerabilityID) *VulnEqualCreate

SetVulnerabilityA sets the "vulnerability_a" edge to the VulnerabilityID entity.

func (*VulnEqualCreate) SetVulnerabilityAID added in v0.5.0

func (vec *VulnEqualCreate) SetVulnerabilityAID(id uuid.UUID) *VulnEqualCreate

SetVulnerabilityAID sets the "vulnerability_a" edge to the VulnerabilityID entity by ID.

func (*VulnEqualCreate) SetVulnerabilityB added in v0.5.0

func (vec *VulnEqualCreate) SetVulnerabilityB(v *VulnerabilityID) *VulnEqualCreate

SetVulnerabilityB sets the "vulnerability_b" edge to the VulnerabilityID entity.

func (*VulnEqualCreate) SetVulnerabilityBID added in v0.5.0

func (vec *VulnEqualCreate) SetVulnerabilityBID(id uuid.UUID) *VulnEqualCreate

SetVulnerabilityBID sets the "vulnerability_b" edge to the VulnerabilityID entity by ID.

type VulnEqualCreateBulk

type VulnEqualCreateBulk struct {
	// contains filtered or unexported fields
}

VulnEqualCreateBulk is the builder for creating many VulnEqual entities in bulk.

func (*VulnEqualCreateBulk) Exec

func (vecb *VulnEqualCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*VulnEqualCreateBulk) ExecX

func (vecb *VulnEqualCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*VulnEqualCreateBulk) OnConflict

func (vecb *VulnEqualCreateBulk) OnConflict(opts ...sql.ConflictOption) *VulnEqualUpsertBulk

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.VulnEqual.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.VulnEqualUpsert) {
		SetVulnID(v+v).
	}).
	Exec(ctx)

func (*VulnEqualCreateBulk) OnConflictColumns

func (vecb *VulnEqualCreateBulk) OnConflictColumns(columns ...string) *VulnEqualUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.VulnEqual.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*VulnEqualCreateBulk) Save

func (vecb *VulnEqualCreateBulk) Save(ctx context.Context) ([]*VulnEqual, error)

Save creates the VulnEqual entities in the database.

func (*VulnEqualCreateBulk) SaveX

func (vecb *VulnEqualCreateBulk) SaveX(ctx context.Context) []*VulnEqual

SaveX is like Save, but panics if an error occurs.

type VulnEqualDelete

type VulnEqualDelete struct {
	// contains filtered or unexported fields
}

VulnEqualDelete is the builder for deleting a VulnEqual entity.

func (*VulnEqualDelete) Exec

func (ved *VulnEqualDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*VulnEqualDelete) ExecX

func (ved *VulnEqualDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*VulnEqualDelete) Where

Where appends a list predicates to the VulnEqualDelete builder.

type VulnEqualDeleteOne

type VulnEqualDeleteOne struct {
	// contains filtered or unexported fields
}

VulnEqualDeleteOne is the builder for deleting a single VulnEqual entity.

func (*VulnEqualDeleteOne) Exec

func (vedo *VulnEqualDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*VulnEqualDeleteOne) ExecX

func (vedo *VulnEqualDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*VulnEqualDeleteOne) Where

Where appends a list predicates to the VulnEqualDelete builder.

type VulnEqualEdge

type VulnEqualEdge struct {
	Node   *VulnEqual `json:"node"`
	Cursor Cursor     `json:"cursor"`
}

VulnEqualEdge is the edge representation of VulnEqual.

type VulnEqualEdges

type VulnEqualEdges struct {
	// VulnerabilityA holds the value of the vulnerability_a edge.
	VulnerabilityA *VulnerabilityID `json:"vulnerability_a,omitempty"`
	// VulnerabilityB holds the value of the vulnerability_b edge.
	VulnerabilityB *VulnerabilityID `json:"vulnerability_b,omitempty"`
	// contains filtered or unexported fields
}

VulnEqualEdges holds the relations/edges for other nodes in the graph.

func (VulnEqualEdges) VulnerabilityAOrErr added in v0.5.0

func (e VulnEqualEdges) VulnerabilityAOrErr() (*VulnerabilityID, error)

VulnerabilityAOrErr returns the VulnerabilityA value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (VulnEqualEdges) VulnerabilityBOrErr added in v0.5.0

func (e VulnEqualEdges) VulnerabilityBOrErr() (*VulnerabilityID, error)

VulnerabilityBOrErr returns the VulnerabilityB value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type VulnEqualGroupBy

type VulnEqualGroupBy struct {
	// contains filtered or unexported fields
}

VulnEqualGroupBy is the group-by builder for VulnEqual entities.

func (*VulnEqualGroupBy) Aggregate

func (vegb *VulnEqualGroupBy) Aggregate(fns ...AggregateFunc) *VulnEqualGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*VulnEqualGroupBy) Bool

func (s *VulnEqualGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*VulnEqualGroupBy) BoolX

func (s *VulnEqualGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*VulnEqualGroupBy) Bools

func (s *VulnEqualGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*VulnEqualGroupBy) BoolsX

func (s *VulnEqualGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*VulnEqualGroupBy) Float64

func (s *VulnEqualGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*VulnEqualGroupBy) Float64X

func (s *VulnEqualGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*VulnEqualGroupBy) Float64s

func (s *VulnEqualGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*VulnEqualGroupBy) Float64sX

func (s *VulnEqualGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*VulnEqualGroupBy) Int

func (s *VulnEqualGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*VulnEqualGroupBy) IntX

func (s *VulnEqualGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*VulnEqualGroupBy) Ints

func (s *VulnEqualGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*VulnEqualGroupBy) IntsX

func (s *VulnEqualGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*VulnEqualGroupBy) Scan

func (vegb *VulnEqualGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*VulnEqualGroupBy) ScanX

func (s *VulnEqualGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*VulnEqualGroupBy) String

func (s *VulnEqualGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*VulnEqualGroupBy) StringX

func (s *VulnEqualGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*VulnEqualGroupBy) Strings

func (s *VulnEqualGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*VulnEqualGroupBy) StringsX

func (s *VulnEqualGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type VulnEqualMutation

type VulnEqualMutation struct {
	// contains filtered or unexported fields
}

VulnEqualMutation represents an operation that mutates the VulnEqual nodes in the graph.

func (*VulnEqualMutation) AddField

func (m *VulnEqualMutation) AddField(name string, value ent.Value) error

AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*VulnEqualMutation) AddedEdges

func (m *VulnEqualMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*VulnEqualMutation) AddedField

func (m *VulnEqualMutation) AddedField(name string) (ent.Value, bool)

AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*VulnEqualMutation) AddedFields

func (m *VulnEqualMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*VulnEqualMutation) AddedIDs

func (m *VulnEqualMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*VulnEqualMutation) ClearEdge

func (m *VulnEqualMutation) ClearEdge(name string) error

ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.

func (*VulnEqualMutation) ClearField

func (m *VulnEqualMutation) ClearField(name string) error

ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.

func (*VulnEqualMutation) ClearVulnerabilityA added in v0.5.0

func (m *VulnEqualMutation) ClearVulnerabilityA()

ClearVulnerabilityA clears the "vulnerability_a" edge to the VulnerabilityID entity.

func (*VulnEqualMutation) ClearVulnerabilityB added in v0.5.0

func (m *VulnEqualMutation) ClearVulnerabilityB()

ClearVulnerabilityB clears the "vulnerability_b" edge to the VulnerabilityID entity.

func (*VulnEqualMutation) ClearedEdges

func (m *VulnEqualMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*VulnEqualMutation) ClearedFields

func (m *VulnEqualMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (VulnEqualMutation) Client

func (m VulnEqualMutation) Client() *Client

Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.

func (*VulnEqualMutation) Collector

func (m *VulnEqualMutation) Collector() (r string, exists bool)

Collector returns the value of the "collector" field in the mutation.

func (*VulnEqualMutation) DocumentRef added in v0.6.0

func (m *VulnEqualMutation) DocumentRef() (r string, exists bool)

DocumentRef returns the value of the "document_ref" field in the mutation.

func (*VulnEqualMutation) EdgeCleared

func (m *VulnEqualMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*VulnEqualMutation) EqualVulnID added in v0.5.0

func (m *VulnEqualMutation) EqualVulnID() (r uuid.UUID, exists bool)

EqualVulnID returns the value of the "equal_vuln_id" field in the mutation.

func (*VulnEqualMutation) Field

func (m *VulnEqualMutation) Field(name string) (ent.Value, bool)

Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*VulnEqualMutation) FieldCleared

func (m *VulnEqualMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*VulnEqualMutation) Fields

func (m *VulnEqualMutation) Fields() []string

Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().

func (*VulnEqualMutation) ID

func (m *VulnEqualMutation) ID() (id uuid.UUID, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*VulnEqualMutation) IDs

func (m *VulnEqualMutation) IDs(ctx context.Context) ([]uuid.UUID, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*VulnEqualMutation) Justification

func (m *VulnEqualMutation) Justification() (r string, exists bool)

Justification returns the value of the "justification" field in the mutation.

func (*VulnEqualMutation) OldCollector

func (m *VulnEqualMutation) OldCollector(ctx context.Context) (v string, err error)

OldCollector returns the old "collector" field's value of the VulnEqual entity. If the VulnEqual object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*VulnEqualMutation) OldDocumentRef added in v0.6.0

func (m *VulnEqualMutation) OldDocumentRef(ctx context.Context) (v string, err error)

OldDocumentRef returns the old "document_ref" field's value of the VulnEqual entity. If the VulnEqual object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*VulnEqualMutation) OldEqualVulnID added in v0.5.0

func (m *VulnEqualMutation) OldEqualVulnID(ctx context.Context) (v uuid.UUID, err error)

OldEqualVulnID returns the old "equal_vuln_id" field's value of the VulnEqual entity. If the VulnEqual object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*VulnEqualMutation) OldField

func (m *VulnEqualMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*VulnEqualMutation) OldJustification

func (m *VulnEqualMutation) OldJustification(ctx context.Context) (v string, err error)

OldJustification returns the old "justification" field's value of the VulnEqual entity. If the VulnEqual object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*VulnEqualMutation) OldOrigin

func (m *VulnEqualMutation) OldOrigin(ctx context.Context) (v string, err error)

OldOrigin returns the old "origin" field's value of the VulnEqual entity. If the VulnEqual object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*VulnEqualMutation) OldVulnID added in v0.5.0

func (m *VulnEqualMutation) OldVulnID(ctx context.Context) (v uuid.UUID, err error)

OldVulnID returns the old "vuln_id" field's value of the VulnEqual entity. If the VulnEqual object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*VulnEqualMutation) OldVulnerabilitiesHash added in v0.5.0

func (m *VulnEqualMutation) OldVulnerabilitiesHash(ctx context.Context) (v string, err error)

OldVulnerabilitiesHash returns the old "vulnerabilities_hash" field's value of the VulnEqual entity. If the VulnEqual object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*VulnEqualMutation) Op

func (m *VulnEqualMutation) Op() Op

Op returns the operation name.

func (*VulnEqualMutation) Origin

func (m *VulnEqualMutation) Origin() (r string, exists bool)

Origin returns the value of the "origin" field in the mutation.

func (*VulnEqualMutation) RemovedEdges

func (m *VulnEqualMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*VulnEqualMutation) RemovedIDs

func (m *VulnEqualMutation) RemovedIDs(name string) []ent.Value

RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.

func (*VulnEqualMutation) ResetCollector

func (m *VulnEqualMutation) ResetCollector()

ResetCollector resets all changes to the "collector" field.

func (*VulnEqualMutation) ResetDocumentRef added in v0.6.0

func (m *VulnEqualMutation) ResetDocumentRef()

ResetDocumentRef resets all changes to the "document_ref" field.

func (*VulnEqualMutation) ResetEdge

func (m *VulnEqualMutation) ResetEdge(name string) error

ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.

func (*VulnEqualMutation) ResetEqualVulnID added in v0.5.0

func (m *VulnEqualMutation) ResetEqualVulnID()

ResetEqualVulnID resets all changes to the "equal_vuln_id" field.

func (*VulnEqualMutation) ResetField

func (m *VulnEqualMutation) ResetField(name string) error

ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.

func (*VulnEqualMutation) ResetJustification

func (m *VulnEqualMutation) ResetJustification()

ResetJustification resets all changes to the "justification" field.

func (*VulnEqualMutation) ResetOrigin

func (m *VulnEqualMutation) ResetOrigin()

ResetOrigin resets all changes to the "origin" field.

func (*VulnEqualMutation) ResetVulnID added in v0.5.0

func (m *VulnEqualMutation) ResetVulnID()

ResetVulnID resets all changes to the "vuln_id" field.

func (*VulnEqualMutation) ResetVulnerabilitiesHash added in v0.5.0

func (m *VulnEqualMutation) ResetVulnerabilitiesHash()

ResetVulnerabilitiesHash resets all changes to the "vulnerabilities_hash" field.

func (*VulnEqualMutation) ResetVulnerabilityA added in v0.5.0

func (m *VulnEqualMutation) ResetVulnerabilityA()

ResetVulnerabilityA resets all changes to the "vulnerability_a" edge.

func (*VulnEqualMutation) ResetVulnerabilityB added in v0.5.0

func (m *VulnEqualMutation) ResetVulnerabilityB()

ResetVulnerabilityB resets all changes to the "vulnerability_b" edge.

func (*VulnEqualMutation) SetCollector

func (m *VulnEqualMutation) SetCollector(s string)

SetCollector sets the "collector" field.

func (*VulnEqualMutation) SetDocumentRef added in v0.6.0

func (m *VulnEqualMutation) SetDocumentRef(s string)

SetDocumentRef sets the "document_ref" field.

func (*VulnEqualMutation) SetEqualVulnID added in v0.5.0

func (m *VulnEqualMutation) SetEqualVulnID(u uuid.UUID)

SetEqualVulnID sets the "equal_vuln_id" field.

func (*VulnEqualMutation) SetField

func (m *VulnEqualMutation) SetField(name string, value ent.Value) error

SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*VulnEqualMutation) SetID added in v0.5.0

func (m *VulnEqualMutation) SetID(id uuid.UUID)

SetID sets the value of the id field. Note that this operation is only accepted on creation of VulnEqual entities.

func (*VulnEqualMutation) SetJustification

func (m *VulnEqualMutation) SetJustification(s string)

SetJustification sets the "justification" field.

func (*VulnEqualMutation) SetOp

func (m *VulnEqualMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*VulnEqualMutation) SetOrigin

func (m *VulnEqualMutation) SetOrigin(s string)

SetOrigin sets the "origin" field.

func (*VulnEqualMutation) SetVulnID added in v0.5.0

func (m *VulnEqualMutation) SetVulnID(u uuid.UUID)

SetVulnID sets the "vuln_id" field.

func (*VulnEqualMutation) SetVulnerabilitiesHash added in v0.5.0

func (m *VulnEqualMutation) SetVulnerabilitiesHash(s string)

SetVulnerabilitiesHash sets the "vulnerabilities_hash" field.

func (*VulnEqualMutation) SetVulnerabilityAID added in v0.5.0

func (m *VulnEqualMutation) SetVulnerabilityAID(id uuid.UUID)

SetVulnerabilityAID sets the "vulnerability_a" edge to the VulnerabilityID entity by id.

func (*VulnEqualMutation) SetVulnerabilityBID added in v0.5.0

func (m *VulnEqualMutation) SetVulnerabilityBID(id uuid.UUID)

SetVulnerabilityBID sets the "vulnerability_b" edge to the VulnerabilityID entity by id.

func (VulnEqualMutation) Tx

func (m VulnEqualMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*VulnEqualMutation) Type

func (m *VulnEqualMutation) Type() string

Type returns the node type of this mutation (VulnEqual).

func (*VulnEqualMutation) VulnID added in v0.5.0

func (m *VulnEqualMutation) VulnID() (r uuid.UUID, exists bool)

VulnID returns the value of the "vuln_id" field in the mutation.

func (*VulnEqualMutation) VulnerabilitiesHash added in v0.5.0

func (m *VulnEqualMutation) VulnerabilitiesHash() (r string, exists bool)

VulnerabilitiesHash returns the value of the "vulnerabilities_hash" field in the mutation.

func (*VulnEqualMutation) VulnerabilityACleared added in v0.5.0

func (m *VulnEqualMutation) VulnerabilityACleared() bool

VulnerabilityACleared reports if the "vulnerability_a" edge to the VulnerabilityID entity was cleared.

func (*VulnEqualMutation) VulnerabilityAID added in v0.5.0

func (m *VulnEqualMutation) VulnerabilityAID() (id uuid.UUID, exists bool)

VulnerabilityAID returns the "vulnerability_a" edge ID in the mutation.

func (*VulnEqualMutation) VulnerabilityAIDs added in v0.5.0

func (m *VulnEqualMutation) VulnerabilityAIDs() (ids []uuid.UUID)

VulnerabilityAIDs returns the "vulnerability_a" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use VulnerabilityAID instead. It exists only for internal usage by the builders.

func (*VulnEqualMutation) VulnerabilityBCleared added in v0.5.0

func (m *VulnEqualMutation) VulnerabilityBCleared() bool

VulnerabilityBCleared reports if the "vulnerability_b" edge to the VulnerabilityID entity was cleared.

func (*VulnEqualMutation) VulnerabilityBID added in v0.5.0

func (m *VulnEqualMutation) VulnerabilityBID() (id uuid.UUID, exists bool)

VulnerabilityBID returns the "vulnerability_b" edge ID in the mutation.

func (*VulnEqualMutation) VulnerabilityBIDs added in v0.5.0

func (m *VulnEqualMutation) VulnerabilityBIDs() (ids []uuid.UUID)

VulnerabilityBIDs returns the "vulnerability_b" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use VulnerabilityBID instead. It exists only for internal usage by the builders.

func (*VulnEqualMutation) Where

func (m *VulnEqualMutation) Where(ps ...predicate.VulnEqual)

Where appends a list predicates to the VulnEqualMutation builder.

func (*VulnEqualMutation) WhereP

func (m *VulnEqualMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the VulnEqualMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type VulnEqualOrder

type VulnEqualOrder struct {
	Direction OrderDirection       `json:"direction"`
	Field     *VulnEqualOrderField `json:"field"`
}

VulnEqualOrder defines the ordering of VulnEqual.

type VulnEqualOrderField

type VulnEqualOrderField struct {
	// Value extracts the ordering value from the given VulnEqual.
	Value func(*VulnEqual) (ent.Value, error)
	// contains filtered or unexported fields
}

VulnEqualOrderField defines the ordering field of VulnEqual.

type VulnEqualPaginateOption

type VulnEqualPaginateOption func(*vulnequalPager) error

VulnEqualPaginateOption enables pagination customization.

func WithVulnEqualFilter

func WithVulnEqualFilter(filter func(*VulnEqualQuery) (*VulnEqualQuery, error)) VulnEqualPaginateOption

WithVulnEqualFilter configures pagination filter.

func WithVulnEqualOrder

func WithVulnEqualOrder(order *VulnEqualOrder) VulnEqualPaginateOption

WithVulnEqualOrder configures pagination ordering.

type VulnEqualQuery

type VulnEqualQuery struct {
	// contains filtered or unexported fields
}

VulnEqualQuery is the builder for querying VulnEqual entities.

func (*VulnEqualQuery) Aggregate

func (veq *VulnEqualQuery) Aggregate(fns ...AggregateFunc) *VulnEqualSelect

Aggregate returns a VulnEqualSelect configured with the given aggregations.

func (*VulnEqualQuery) All

func (veq *VulnEqualQuery) All(ctx context.Context) ([]*VulnEqual, error)

All executes the query and returns a list of VulnEquals.

func (*VulnEqualQuery) AllX

func (veq *VulnEqualQuery) AllX(ctx context.Context) []*VulnEqual

AllX is like All, but panics if an error occurs.

func (*VulnEqualQuery) Clone

func (veq *VulnEqualQuery) Clone() *VulnEqualQuery

Clone returns a duplicate of the VulnEqualQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*VulnEqualQuery) CollectFields

func (ve *VulnEqualQuery) CollectFields(ctx context.Context, satisfies ...string) (*VulnEqualQuery, error)

CollectFields tells the query-builder to eagerly load connected nodes by resolver context.

func (*VulnEqualQuery) Count

func (veq *VulnEqualQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*VulnEqualQuery) CountX

func (veq *VulnEqualQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*VulnEqualQuery) Exist

func (veq *VulnEqualQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*VulnEqualQuery) ExistX

func (veq *VulnEqualQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*VulnEqualQuery) First

func (veq *VulnEqualQuery) First(ctx context.Context) (*VulnEqual, error)

First returns the first VulnEqual entity from the query. Returns a *NotFoundError when no VulnEqual was found.

func (*VulnEqualQuery) FirstID

func (veq *VulnEqualQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)

FirstID returns the first VulnEqual ID from the query. Returns a *NotFoundError when no VulnEqual ID was found.

func (*VulnEqualQuery) FirstIDX

func (veq *VulnEqualQuery) FirstIDX(ctx context.Context) uuid.UUID

FirstIDX is like FirstID, but panics if an error occurs.

func (*VulnEqualQuery) FirstX

func (veq *VulnEqualQuery) FirstX(ctx context.Context) *VulnEqual

FirstX is like First, but panics if an error occurs.

func (*VulnEqualQuery) GroupBy

func (veq *VulnEqualQuery) GroupBy(field string, fields ...string) *VulnEqualGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	VulnID uuid.UUID `json:"vuln_id,omitempty"`
	Count int `json:"count,omitempty"`
}

client.VulnEqual.Query().
	GroupBy(vulnequal.FieldVulnID).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*VulnEqualQuery) IDs

func (veq *VulnEqualQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)

IDs executes the query and returns a list of VulnEqual IDs.

func (*VulnEqualQuery) IDsX

func (veq *VulnEqualQuery) IDsX(ctx context.Context) []uuid.UUID

IDsX is like IDs, but panics if an error occurs.

func (*VulnEqualQuery) Limit

func (veq *VulnEqualQuery) Limit(limit int) *VulnEqualQuery

Limit the number of records to be returned by this query.

func (*VulnEqualQuery) Offset

func (veq *VulnEqualQuery) Offset(offset int) *VulnEqualQuery

Offset to start from.

func (*VulnEqualQuery) Only

func (veq *VulnEqualQuery) Only(ctx context.Context) (*VulnEqual, error)

Only returns a single VulnEqual entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one VulnEqual entity is found. Returns a *NotFoundError when no VulnEqual entities are found.

func (*VulnEqualQuery) OnlyID

func (veq *VulnEqualQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)

OnlyID is like Only, but returns the only VulnEqual ID in the query. Returns a *NotSingularError when more than one VulnEqual ID is found. Returns a *NotFoundError when no entities are found.

func (*VulnEqualQuery) OnlyIDX

func (veq *VulnEqualQuery) OnlyIDX(ctx context.Context) uuid.UUID

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*VulnEqualQuery) OnlyX

func (veq *VulnEqualQuery) OnlyX(ctx context.Context) *VulnEqual

OnlyX is like Only, but panics if an error occurs.

func (*VulnEqualQuery) Order

Order specifies how the records should be ordered.

func (*VulnEqualQuery) Paginate

func (ve *VulnEqualQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...VulnEqualPaginateOption,
) (*VulnEqualConnection, error)

Paginate executes the query and returns a relay based cursor connection to VulnEqual.

func (*VulnEqualQuery) QueryVulnerabilityA added in v0.5.0

func (veq *VulnEqualQuery) QueryVulnerabilityA() *VulnerabilityIDQuery

QueryVulnerabilityA chains the current query on the "vulnerability_a" edge.

func (*VulnEqualQuery) QueryVulnerabilityB added in v0.5.0

func (veq *VulnEqualQuery) QueryVulnerabilityB() *VulnerabilityIDQuery

QueryVulnerabilityB chains the current query on the "vulnerability_b" edge.

func (*VulnEqualQuery) Select

func (veq *VulnEqualQuery) Select(fields ...string) *VulnEqualSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	VulnID uuid.UUID `json:"vuln_id,omitempty"`
}

client.VulnEqual.Query().
	Select(vulnequal.FieldVulnID).
	Scan(ctx, &v)

func (*VulnEqualQuery) Unique

func (veq *VulnEqualQuery) Unique(unique bool) *VulnEqualQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*VulnEqualQuery) Where

func (veq *VulnEqualQuery) Where(ps ...predicate.VulnEqual) *VulnEqualQuery

Where adds a new predicate for the VulnEqualQuery builder.

func (*VulnEqualQuery) WithVulnerabilityA added in v0.5.0

func (veq *VulnEqualQuery) WithVulnerabilityA(opts ...func(*VulnerabilityIDQuery)) *VulnEqualQuery

WithVulnerabilityA tells the query-builder to eager-load the nodes that are connected to the "vulnerability_a" edge. The optional arguments are used to configure the query builder of the edge.

func (*VulnEqualQuery) WithVulnerabilityB added in v0.5.0

func (veq *VulnEqualQuery) WithVulnerabilityB(opts ...func(*VulnerabilityIDQuery)) *VulnEqualQuery

WithVulnerabilityB tells the query-builder to eager-load the nodes that are connected to the "vulnerability_b" edge. The optional arguments are used to configure the query builder of the edge.

type VulnEqualSelect

type VulnEqualSelect struct {
	*VulnEqualQuery
	// contains filtered or unexported fields
}

VulnEqualSelect is the builder for selecting fields of VulnEqual entities.

func (*VulnEqualSelect) Aggregate

func (ves *VulnEqualSelect) Aggregate(fns ...AggregateFunc) *VulnEqualSelect

Aggregate adds the given aggregation functions to the selector query.

func (*VulnEqualSelect) Bool

func (s *VulnEqualSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*VulnEqualSelect) BoolX

func (s *VulnEqualSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*VulnEqualSelect) Bools

func (s *VulnEqualSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*VulnEqualSelect) BoolsX

func (s *VulnEqualSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*VulnEqualSelect) Float64

func (s *VulnEqualSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*VulnEqualSelect) Float64X

func (s *VulnEqualSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*VulnEqualSelect) Float64s

func (s *VulnEqualSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*VulnEqualSelect) Float64sX

func (s *VulnEqualSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*VulnEqualSelect) Int

func (s *VulnEqualSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*VulnEqualSelect) IntX

func (s *VulnEqualSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*VulnEqualSelect) Ints

func (s *VulnEqualSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*VulnEqualSelect) IntsX

func (s *VulnEqualSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*VulnEqualSelect) Scan

func (ves *VulnEqualSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*VulnEqualSelect) ScanX

func (s *VulnEqualSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*VulnEqualSelect) String

func (s *VulnEqualSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*VulnEqualSelect) StringX

func (s *VulnEqualSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*VulnEqualSelect) Strings

func (s *VulnEqualSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*VulnEqualSelect) StringsX

func (s *VulnEqualSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type VulnEqualUpdate

type VulnEqualUpdate struct {
	// contains filtered or unexported fields
}

VulnEqualUpdate is the builder for updating VulnEqual entities.

func (*VulnEqualUpdate) ClearVulnerabilityA added in v0.5.0

func (veu *VulnEqualUpdate) ClearVulnerabilityA() *VulnEqualUpdate

ClearVulnerabilityA clears the "vulnerability_a" edge to the VulnerabilityID entity.

func (*VulnEqualUpdate) ClearVulnerabilityB added in v0.5.0

func (veu *VulnEqualUpdate) ClearVulnerabilityB() *VulnEqualUpdate

ClearVulnerabilityB clears the "vulnerability_b" edge to the VulnerabilityID entity.

func (*VulnEqualUpdate) Exec

func (veu *VulnEqualUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*VulnEqualUpdate) ExecX

func (veu *VulnEqualUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*VulnEqualUpdate) Mutation

func (veu *VulnEqualUpdate) Mutation() *VulnEqualMutation

Mutation returns the VulnEqualMutation object of the builder.

func (*VulnEqualUpdate) Save

func (veu *VulnEqualUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*VulnEqualUpdate) SaveX

func (veu *VulnEqualUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*VulnEqualUpdate) SetCollector

func (veu *VulnEqualUpdate) SetCollector(s string) *VulnEqualUpdate

SetCollector sets the "collector" field.

func (*VulnEqualUpdate) SetDocumentRef added in v0.6.0

func (veu *VulnEqualUpdate) SetDocumentRef(s string) *VulnEqualUpdate

SetDocumentRef sets the "document_ref" field.

func (*VulnEqualUpdate) SetEqualVulnID added in v0.5.0

func (veu *VulnEqualUpdate) SetEqualVulnID(u uuid.UUID) *VulnEqualUpdate

SetEqualVulnID sets the "equal_vuln_id" field.

func (*VulnEqualUpdate) SetJustification

func (veu *VulnEqualUpdate) SetJustification(s string) *VulnEqualUpdate

SetJustification sets the "justification" field.

func (*VulnEqualUpdate) SetNillableCollector added in v0.4.0

func (veu *VulnEqualUpdate) SetNillableCollector(s *string) *VulnEqualUpdate

SetNillableCollector sets the "collector" field if the given value is not nil.

func (*VulnEqualUpdate) SetNillableDocumentRef added in v0.6.0

func (veu *VulnEqualUpdate) SetNillableDocumentRef(s *string) *VulnEqualUpdate

SetNillableDocumentRef sets the "document_ref" field if the given value is not nil.

func (*VulnEqualUpdate) SetNillableEqualVulnID added in v0.5.0

func (veu *VulnEqualUpdate) SetNillableEqualVulnID(u *uuid.UUID) *VulnEqualUpdate

SetNillableEqualVulnID sets the "equal_vuln_id" field if the given value is not nil.

func (*VulnEqualUpdate) SetNillableJustification added in v0.4.0

func (veu *VulnEqualUpdate) SetNillableJustification(s *string) *VulnEqualUpdate

SetNillableJustification sets the "justification" field if the given value is not nil.

func (*VulnEqualUpdate) SetNillableOrigin added in v0.4.0

func (veu *VulnEqualUpdate) SetNillableOrigin(s *string) *VulnEqualUpdate

SetNillableOrigin sets the "origin" field if the given value is not nil.

func (*VulnEqualUpdate) SetNillableVulnID added in v0.5.0

func (veu *VulnEqualUpdate) SetNillableVulnID(u *uuid.UUID) *VulnEqualUpdate

SetNillableVulnID sets the "vuln_id" field if the given value is not nil.

func (*VulnEqualUpdate) SetNillableVulnerabilitiesHash added in v0.5.0

func (veu *VulnEqualUpdate) SetNillableVulnerabilitiesHash(s *string) *VulnEqualUpdate

SetNillableVulnerabilitiesHash sets the "vulnerabilities_hash" field if the given value is not nil.

func (*VulnEqualUpdate) SetOrigin

func (veu *VulnEqualUpdate) SetOrigin(s string) *VulnEqualUpdate

SetOrigin sets the "origin" field.

func (*VulnEqualUpdate) SetVulnID added in v0.5.0

func (veu *VulnEqualUpdate) SetVulnID(u uuid.UUID) *VulnEqualUpdate

SetVulnID sets the "vuln_id" field.

func (*VulnEqualUpdate) SetVulnerabilitiesHash added in v0.5.0

func (veu *VulnEqualUpdate) SetVulnerabilitiesHash(s string) *VulnEqualUpdate

SetVulnerabilitiesHash sets the "vulnerabilities_hash" field.

func (*VulnEqualUpdate) SetVulnerabilityA added in v0.5.0

func (veu *VulnEqualUpdate) SetVulnerabilityA(v *VulnerabilityID) *VulnEqualUpdate

SetVulnerabilityA sets the "vulnerability_a" edge to the VulnerabilityID entity.

func (*VulnEqualUpdate) SetVulnerabilityAID added in v0.5.0

func (veu *VulnEqualUpdate) SetVulnerabilityAID(id uuid.UUID) *VulnEqualUpdate

SetVulnerabilityAID sets the "vulnerability_a" edge to the VulnerabilityID entity by ID.

func (*VulnEqualUpdate) SetVulnerabilityB added in v0.5.0

func (veu *VulnEqualUpdate) SetVulnerabilityB(v *VulnerabilityID) *VulnEqualUpdate

SetVulnerabilityB sets the "vulnerability_b" edge to the VulnerabilityID entity.

func (*VulnEqualUpdate) SetVulnerabilityBID added in v0.5.0

func (veu *VulnEqualUpdate) SetVulnerabilityBID(id uuid.UUID) *VulnEqualUpdate

SetVulnerabilityBID sets the "vulnerability_b" edge to the VulnerabilityID entity by ID.

func (*VulnEqualUpdate) Where

Where appends a list predicates to the VulnEqualUpdate builder.

type VulnEqualUpdateOne

type VulnEqualUpdateOne struct {
	// contains filtered or unexported fields
}

VulnEqualUpdateOne is the builder for updating a single VulnEqual entity.

func (*VulnEqualUpdateOne) ClearVulnerabilityA added in v0.5.0

func (veuo *VulnEqualUpdateOne) ClearVulnerabilityA() *VulnEqualUpdateOne

ClearVulnerabilityA clears the "vulnerability_a" edge to the VulnerabilityID entity.

func (*VulnEqualUpdateOne) ClearVulnerabilityB added in v0.5.0

func (veuo *VulnEqualUpdateOne) ClearVulnerabilityB() *VulnEqualUpdateOne

ClearVulnerabilityB clears the "vulnerability_b" edge to the VulnerabilityID entity.

func (*VulnEqualUpdateOne) Exec

func (veuo *VulnEqualUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*VulnEqualUpdateOne) ExecX

func (veuo *VulnEqualUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*VulnEqualUpdateOne) Mutation

func (veuo *VulnEqualUpdateOne) Mutation() *VulnEqualMutation

Mutation returns the VulnEqualMutation object of the builder.

func (*VulnEqualUpdateOne) Save

func (veuo *VulnEqualUpdateOne) Save(ctx context.Context) (*VulnEqual, error)

Save executes the query and returns the updated VulnEqual entity.

func (*VulnEqualUpdateOne) SaveX

func (veuo *VulnEqualUpdateOne) SaveX(ctx context.Context) *VulnEqual

SaveX is like Save, but panics if an error occurs.

func (*VulnEqualUpdateOne) Select

func (veuo *VulnEqualUpdateOne) Select(field string, fields ...string) *VulnEqualUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*VulnEqualUpdateOne) SetCollector

func (veuo *VulnEqualUpdateOne) SetCollector(s string) *VulnEqualUpdateOne

SetCollector sets the "collector" field.

func (*VulnEqualUpdateOne) SetDocumentRef added in v0.6.0

func (veuo *VulnEqualUpdateOne) SetDocumentRef(s string) *VulnEqualUpdateOne

SetDocumentRef sets the "document_ref" field.

func (*VulnEqualUpdateOne) SetEqualVulnID added in v0.5.0

func (veuo *VulnEqualUpdateOne) SetEqualVulnID(u uuid.UUID) *VulnEqualUpdateOne

SetEqualVulnID sets the "equal_vuln_id" field.

func (*VulnEqualUpdateOne) SetJustification

func (veuo *VulnEqualUpdateOne) SetJustification(s string) *VulnEqualUpdateOne

SetJustification sets the "justification" field.

func (*VulnEqualUpdateOne) SetNillableCollector added in v0.4.0

func (veuo *VulnEqualUpdateOne) SetNillableCollector(s *string) *VulnEqualUpdateOne

SetNillableCollector sets the "collector" field if the given value is not nil.

func (*VulnEqualUpdateOne) SetNillableDocumentRef added in v0.6.0

func (veuo *VulnEqualUpdateOne) SetNillableDocumentRef(s *string) *VulnEqualUpdateOne

SetNillableDocumentRef sets the "document_ref" field if the given value is not nil.

func (*VulnEqualUpdateOne) SetNillableEqualVulnID added in v0.5.0

func (veuo *VulnEqualUpdateOne) SetNillableEqualVulnID(u *uuid.UUID) *VulnEqualUpdateOne

SetNillableEqualVulnID sets the "equal_vuln_id" field if the given value is not nil.

func (*VulnEqualUpdateOne) SetNillableJustification added in v0.4.0

func (veuo *VulnEqualUpdateOne) SetNillableJustification(s *string) *VulnEqualUpdateOne

SetNillableJustification sets the "justification" field if the given value is not nil.

func (*VulnEqualUpdateOne) SetNillableOrigin added in v0.4.0

func (veuo *VulnEqualUpdateOne) SetNillableOrigin(s *string) *VulnEqualUpdateOne

SetNillableOrigin sets the "origin" field if the given value is not nil.

func (*VulnEqualUpdateOne) SetNillableVulnID added in v0.5.0

func (veuo *VulnEqualUpdateOne) SetNillableVulnID(u *uuid.UUID) *VulnEqualUpdateOne

SetNillableVulnID sets the "vuln_id" field if the given value is not nil.

func (*VulnEqualUpdateOne) SetNillableVulnerabilitiesHash added in v0.5.0

func (veuo *VulnEqualUpdateOne) SetNillableVulnerabilitiesHash(s *string) *VulnEqualUpdateOne

SetNillableVulnerabilitiesHash sets the "vulnerabilities_hash" field if the given value is not nil.

func (*VulnEqualUpdateOne) SetOrigin

func (veuo *VulnEqualUpdateOne) SetOrigin(s string) *VulnEqualUpdateOne

SetOrigin sets the "origin" field.

func (*VulnEqualUpdateOne) SetVulnID added in v0.5.0

func (veuo *VulnEqualUpdateOne) SetVulnID(u uuid.UUID) *VulnEqualUpdateOne

SetVulnID sets the "vuln_id" field.

func (*VulnEqualUpdateOne) SetVulnerabilitiesHash added in v0.5.0

func (veuo *VulnEqualUpdateOne) SetVulnerabilitiesHash(s string) *VulnEqualUpdateOne

SetVulnerabilitiesHash sets the "vulnerabilities_hash" field.

func (*VulnEqualUpdateOne) SetVulnerabilityA added in v0.5.0

func (veuo *VulnEqualUpdateOne) SetVulnerabilityA(v *VulnerabilityID) *VulnEqualUpdateOne

SetVulnerabilityA sets the "vulnerability_a" edge to the VulnerabilityID entity.

func (*VulnEqualUpdateOne) SetVulnerabilityAID added in v0.5.0

func (veuo *VulnEqualUpdateOne) SetVulnerabilityAID(id uuid.UUID) *VulnEqualUpdateOne

SetVulnerabilityAID sets the "vulnerability_a" edge to the VulnerabilityID entity by ID.

func (*VulnEqualUpdateOne) SetVulnerabilityB added in v0.5.0

func (veuo *VulnEqualUpdateOne) SetVulnerabilityB(v *VulnerabilityID) *VulnEqualUpdateOne

SetVulnerabilityB sets the "vulnerability_b" edge to the VulnerabilityID entity.

func (*VulnEqualUpdateOne) SetVulnerabilityBID added in v0.5.0

func (veuo *VulnEqualUpdateOne) SetVulnerabilityBID(id uuid.UUID) *VulnEqualUpdateOne

SetVulnerabilityBID sets the "vulnerability_b" edge to the VulnerabilityID entity by ID.

func (*VulnEqualUpdateOne) Where

Where appends a list predicates to the VulnEqualUpdate builder.

type VulnEqualUpsert

type VulnEqualUpsert struct {
	*sql.UpdateSet
}

VulnEqualUpsert is the "OnConflict" setter.

func (*VulnEqualUpsert) SetCollector

func (u *VulnEqualUpsert) SetCollector(v string) *VulnEqualUpsert

SetCollector sets the "collector" field.

func (*VulnEqualUpsert) SetDocumentRef added in v0.6.0

func (u *VulnEqualUpsert) SetDocumentRef(v string) *VulnEqualUpsert

SetDocumentRef sets the "document_ref" field.

func (*VulnEqualUpsert) SetEqualVulnID added in v0.5.0

func (u *VulnEqualUpsert) SetEqualVulnID(v uuid.UUID) *VulnEqualUpsert

SetEqualVulnID sets the "equal_vuln_id" field.

func (*VulnEqualUpsert) SetJustification

func (u *VulnEqualUpsert) SetJustification(v string) *VulnEqualUpsert

SetJustification sets the "justification" field.

func (*VulnEqualUpsert) SetOrigin

func (u *VulnEqualUpsert) SetOrigin(v string) *VulnEqualUpsert

SetOrigin sets the "origin" field.

func (*VulnEqualUpsert) SetVulnID added in v0.5.0

func (u *VulnEqualUpsert) SetVulnID(v uuid.UUID) *VulnEqualUpsert

SetVulnID sets the "vuln_id" field.

func (*VulnEqualUpsert) SetVulnerabilitiesHash added in v0.5.0

func (u *VulnEqualUpsert) SetVulnerabilitiesHash(v string) *VulnEqualUpsert

SetVulnerabilitiesHash sets the "vulnerabilities_hash" field.

func (*VulnEqualUpsert) UpdateCollector

func (u *VulnEqualUpsert) UpdateCollector() *VulnEqualUpsert

UpdateCollector sets the "collector" field to the value that was provided on create.

func (*VulnEqualUpsert) UpdateDocumentRef added in v0.6.0

func (u *VulnEqualUpsert) UpdateDocumentRef() *VulnEqualUpsert

UpdateDocumentRef sets the "document_ref" field to the value that was provided on create.

func (*VulnEqualUpsert) UpdateEqualVulnID added in v0.5.0

func (u *VulnEqualUpsert) UpdateEqualVulnID() *VulnEqualUpsert

UpdateEqualVulnID sets the "equal_vuln_id" field to the value that was provided on create.

func (*VulnEqualUpsert) UpdateJustification

func (u *VulnEqualUpsert) UpdateJustification() *VulnEqualUpsert

UpdateJustification sets the "justification" field to the value that was provided on create.

func (*VulnEqualUpsert) UpdateOrigin

func (u *VulnEqualUpsert) UpdateOrigin() *VulnEqualUpsert

UpdateOrigin sets the "origin" field to the value that was provided on create.

func (*VulnEqualUpsert) UpdateVulnID added in v0.5.0

func (u *VulnEqualUpsert) UpdateVulnID() *VulnEqualUpsert

UpdateVulnID sets the "vuln_id" field to the value that was provided on create.

func (*VulnEqualUpsert) UpdateVulnerabilitiesHash added in v0.5.0

func (u *VulnEqualUpsert) UpdateVulnerabilitiesHash() *VulnEqualUpsert

UpdateVulnerabilitiesHash sets the "vulnerabilities_hash" field to the value that was provided on create.

type VulnEqualUpsertBulk

type VulnEqualUpsertBulk struct {
	// contains filtered or unexported fields
}

VulnEqualUpsertBulk is the builder for "upsert"-ing a bulk of VulnEqual nodes.

func (*VulnEqualUpsertBulk) DoNothing

func (u *VulnEqualUpsertBulk) DoNothing() *VulnEqualUpsertBulk

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*VulnEqualUpsertBulk) Exec

Exec executes the query.

func (*VulnEqualUpsertBulk) ExecX

func (u *VulnEqualUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*VulnEqualUpsertBulk) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.VulnEqual.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*VulnEqualUpsertBulk) SetCollector

func (u *VulnEqualUpsertBulk) SetCollector(v string) *VulnEqualUpsertBulk

SetCollector sets the "collector" field.

func (*VulnEqualUpsertBulk) SetDocumentRef added in v0.6.0

func (u *VulnEqualUpsertBulk) SetDocumentRef(v string) *VulnEqualUpsertBulk

SetDocumentRef sets the "document_ref" field.

func (*VulnEqualUpsertBulk) SetEqualVulnID added in v0.5.0

func (u *VulnEqualUpsertBulk) SetEqualVulnID(v uuid.UUID) *VulnEqualUpsertBulk

SetEqualVulnID sets the "equal_vuln_id" field.

func (*VulnEqualUpsertBulk) SetJustification

func (u *VulnEqualUpsertBulk) SetJustification(v string) *VulnEqualUpsertBulk

SetJustification sets the "justification" field.

func (*VulnEqualUpsertBulk) SetOrigin

SetOrigin sets the "origin" field.

func (*VulnEqualUpsertBulk) SetVulnID added in v0.5.0

SetVulnID sets the "vuln_id" field.

func (*VulnEqualUpsertBulk) SetVulnerabilitiesHash added in v0.5.0

func (u *VulnEqualUpsertBulk) SetVulnerabilitiesHash(v string) *VulnEqualUpsertBulk

SetVulnerabilitiesHash sets the "vulnerabilities_hash" field.

func (*VulnEqualUpsertBulk) Update

Update allows overriding fields `UPDATE` values. See the VulnEqualCreateBulk.OnConflict documentation for more info.

func (*VulnEqualUpsertBulk) UpdateCollector

func (u *VulnEqualUpsertBulk) UpdateCollector() *VulnEqualUpsertBulk

UpdateCollector sets the "collector" field to the value that was provided on create.

func (*VulnEqualUpsertBulk) UpdateDocumentRef added in v0.6.0

func (u *VulnEqualUpsertBulk) UpdateDocumentRef() *VulnEqualUpsertBulk

UpdateDocumentRef sets the "document_ref" field to the value that was provided on create.

func (*VulnEqualUpsertBulk) UpdateEqualVulnID added in v0.5.0

func (u *VulnEqualUpsertBulk) UpdateEqualVulnID() *VulnEqualUpsertBulk

UpdateEqualVulnID sets the "equal_vuln_id" field to the value that was provided on create.

func (*VulnEqualUpsertBulk) UpdateJustification

func (u *VulnEqualUpsertBulk) UpdateJustification() *VulnEqualUpsertBulk

UpdateJustification sets the "justification" field to the value that was provided on create.

func (*VulnEqualUpsertBulk) UpdateNewValues

func (u *VulnEqualUpsertBulk) UpdateNewValues() *VulnEqualUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.VulnEqual.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(vulnequal.FieldID)
		}),
	).
	Exec(ctx)

func (*VulnEqualUpsertBulk) UpdateOrigin

func (u *VulnEqualUpsertBulk) UpdateOrigin() *VulnEqualUpsertBulk

UpdateOrigin sets the "origin" field to the value that was provided on create.

func (*VulnEqualUpsertBulk) UpdateVulnID added in v0.5.0

func (u *VulnEqualUpsertBulk) UpdateVulnID() *VulnEqualUpsertBulk

UpdateVulnID sets the "vuln_id" field to the value that was provided on create.

func (*VulnEqualUpsertBulk) UpdateVulnerabilitiesHash added in v0.5.0

func (u *VulnEqualUpsertBulk) UpdateVulnerabilitiesHash() *VulnEqualUpsertBulk

UpdateVulnerabilitiesHash sets the "vulnerabilities_hash" field to the value that was provided on create.

type VulnEqualUpsertOne

type VulnEqualUpsertOne struct {
	// contains filtered or unexported fields
}

VulnEqualUpsertOne is the builder for "upsert"-ing

one VulnEqual node.

func (*VulnEqualUpsertOne) DoNothing

func (u *VulnEqualUpsertOne) DoNothing() *VulnEqualUpsertOne

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*VulnEqualUpsertOne) Exec

func (u *VulnEqualUpsertOne) Exec(ctx context.Context) error

Exec executes the query.

func (*VulnEqualUpsertOne) ExecX

func (u *VulnEqualUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*VulnEqualUpsertOne) ID

func (u *VulnEqualUpsertOne) ID(ctx context.Context) (id uuid.UUID, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*VulnEqualUpsertOne) IDX

IDX is like ID, but panics if an error occurs.

func (*VulnEqualUpsertOne) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.VulnEqual.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*VulnEqualUpsertOne) SetCollector

func (u *VulnEqualUpsertOne) SetCollector(v string) *VulnEqualUpsertOne

SetCollector sets the "collector" field.

func (*VulnEqualUpsertOne) SetDocumentRef added in v0.6.0

func (u *VulnEqualUpsertOne) SetDocumentRef(v string) *VulnEqualUpsertOne

SetDocumentRef sets the "document_ref" field.

func (*VulnEqualUpsertOne) SetEqualVulnID added in v0.5.0

func (u *VulnEqualUpsertOne) SetEqualVulnID(v uuid.UUID) *VulnEqualUpsertOne

SetEqualVulnID sets the "equal_vuln_id" field.

func (*VulnEqualUpsertOne) SetJustification

func (u *VulnEqualUpsertOne) SetJustification(v string) *VulnEqualUpsertOne

SetJustification sets the "justification" field.

func (*VulnEqualUpsertOne) SetOrigin

func (u *VulnEqualUpsertOne) SetOrigin(v string) *VulnEqualUpsertOne

SetOrigin sets the "origin" field.

func (*VulnEqualUpsertOne) SetVulnID added in v0.5.0

SetVulnID sets the "vuln_id" field.

func (*VulnEqualUpsertOne) SetVulnerabilitiesHash added in v0.5.0

func (u *VulnEqualUpsertOne) SetVulnerabilitiesHash(v string) *VulnEqualUpsertOne

SetVulnerabilitiesHash sets the "vulnerabilities_hash" field.

func (*VulnEqualUpsertOne) Update

func (u *VulnEqualUpsertOne) Update(set func(*VulnEqualUpsert)) *VulnEqualUpsertOne

Update allows overriding fields `UPDATE` values. See the VulnEqualCreate.OnConflict documentation for more info.

func (*VulnEqualUpsertOne) UpdateCollector

func (u *VulnEqualUpsertOne) UpdateCollector() *VulnEqualUpsertOne

UpdateCollector sets the "collector" field to the value that was provided on create.

func (*VulnEqualUpsertOne) UpdateDocumentRef added in v0.6.0

func (u *VulnEqualUpsertOne) UpdateDocumentRef() *VulnEqualUpsertOne

UpdateDocumentRef sets the "document_ref" field to the value that was provided on create.

func (*VulnEqualUpsertOne) UpdateEqualVulnID added in v0.5.0

func (u *VulnEqualUpsertOne) UpdateEqualVulnID() *VulnEqualUpsertOne

UpdateEqualVulnID sets the "equal_vuln_id" field to the value that was provided on create.

func (*VulnEqualUpsertOne) UpdateJustification

func (u *VulnEqualUpsertOne) UpdateJustification() *VulnEqualUpsertOne

UpdateJustification sets the "justification" field to the value that was provided on create.

func (*VulnEqualUpsertOne) UpdateNewValues

func (u *VulnEqualUpsertOne) UpdateNewValues() *VulnEqualUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:

client.VulnEqual.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(vulnequal.FieldID)
		}),
	).
	Exec(ctx)

func (*VulnEqualUpsertOne) UpdateOrigin

func (u *VulnEqualUpsertOne) UpdateOrigin() *VulnEqualUpsertOne

UpdateOrigin sets the "origin" field to the value that was provided on create.

func (*VulnEqualUpsertOne) UpdateVulnID added in v0.5.0

func (u *VulnEqualUpsertOne) UpdateVulnID() *VulnEqualUpsertOne

UpdateVulnID sets the "vuln_id" field to the value that was provided on create.

func (*VulnEqualUpsertOne) UpdateVulnerabilitiesHash added in v0.5.0

func (u *VulnEqualUpsertOne) UpdateVulnerabilitiesHash() *VulnEqualUpsertOne

UpdateVulnerabilitiesHash sets the "vulnerabilities_hash" field to the value that was provided on create.

type VulnEquals

type VulnEquals []*VulnEqual

VulnEquals is a parsable slice of VulnEqual.

type VulnerabilityID

type VulnerabilityID struct {

	// ID of the ent.
	ID uuid.UUID `json:"id,omitempty"`
	// ID of the vulnerability, one of OSV, GHSA, CVE, or custom
	VulnerabilityID string `json:"vulnerability_id,omitempty"`
	// Type of vulnerability, one of OSV, GHSA, CVE, or custom
	Type string `json:"type,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the VulnerabilityIDQuery when eager-loading is set.
	Edges VulnerabilityIDEdges `json:"edges"`
	// contains filtered or unexported fields
}

VulnerabilityID is the model entity for the VulnerabilityID schema.

func (*VulnerabilityID) CertifyVuln added in v0.6.0

func (vi *VulnerabilityID) CertifyVuln(ctx context.Context) (result []*CertifyVuln, err error)

func (*VulnerabilityID) IsNode

func (n *VulnerabilityID) IsNode()

IsNode implements the Node interface check for GQLGen.

func (*VulnerabilityID) Metadata added in v0.6.0

func (vi *VulnerabilityID) Metadata(ctx context.Context) (result []*VulnerabilityMetadata, err error)

func (*VulnerabilityID) NamedCertifyVuln added in v0.6.0

func (vi *VulnerabilityID) NamedCertifyVuln(name string) ([]*CertifyVuln, error)

NamedCertifyVuln returns the CertifyVuln named value or an error if the edge was not loaded in eager-loading with this name.

func (*VulnerabilityID) NamedMetadata added in v0.6.0

func (vi *VulnerabilityID) NamedMetadata(name string) ([]*VulnerabilityMetadata, error)

NamedMetadata returns the Metadata named value or an error if the edge was not loaded in eager-loading with this name.

func (*VulnerabilityID) NamedVex added in v0.6.0

func (vi *VulnerabilityID) NamedVex(name string) ([]*CertifyVex, error)

NamedVex returns the Vex named value or an error if the edge was not loaded in eager-loading with this name.

func (*VulnerabilityID) NamedVulnEqualVulnA added in v0.5.0

func (vi *VulnerabilityID) NamedVulnEqualVulnA(name string) ([]*VulnEqual, error)

NamedVulnEqualVulnA returns the VulnEqualVulnA named value or an error if the edge was not loaded in eager-loading with this name.

func (*VulnerabilityID) NamedVulnEqualVulnB added in v0.5.0

func (vi *VulnerabilityID) NamedVulnEqualVulnB(name string) ([]*VulnEqual, error)

NamedVulnEqualVulnB returns the VulnEqualVulnB named value or an error if the edge was not loaded in eager-loading with this name.

func (*VulnerabilityID) QueryCertifyVuln added in v0.6.0

func (vi *VulnerabilityID) QueryCertifyVuln() *CertifyVulnQuery

QueryCertifyVuln queries the "certify_vuln" edge of the VulnerabilityID entity.

func (*VulnerabilityID) QueryMetadata added in v0.6.0

func (vi *VulnerabilityID) QueryMetadata() *VulnerabilityMetadataQuery

QueryMetadata queries the "metadata" edge of the VulnerabilityID entity.

func (*VulnerabilityID) QueryVex added in v0.6.0

func (vi *VulnerabilityID) QueryVex() *CertifyVexQuery

QueryVex queries the "vex" edge of the VulnerabilityID entity.

func (*VulnerabilityID) QueryVulnEqualVulnA added in v0.5.0

func (vi *VulnerabilityID) QueryVulnEqualVulnA() *VulnEqualQuery

QueryVulnEqualVulnA queries the "vuln_equal_vuln_a" edge of the VulnerabilityID entity.

func (*VulnerabilityID) QueryVulnEqualVulnB added in v0.5.0

func (vi *VulnerabilityID) QueryVulnEqualVulnB() *VulnEqualQuery

QueryVulnEqualVulnB queries the "vuln_equal_vuln_b" edge of the VulnerabilityID entity.

func (*VulnerabilityID) String

func (vi *VulnerabilityID) String() string

String implements the fmt.Stringer.

func (*VulnerabilityID) ToEdge

ToEdge converts VulnerabilityID into VulnerabilityIDEdge.

func (*VulnerabilityID) Unwrap

func (vi *VulnerabilityID) Unwrap() *VulnerabilityID

Unwrap unwraps the VulnerabilityID entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.

func (*VulnerabilityID) Update

Update returns a builder for updating this VulnerabilityID. Note that you need to call VulnerabilityID.Unwrap() before calling this method if this VulnerabilityID was returned from a transaction, and the transaction was committed or rolled back.

func (*VulnerabilityID) Value

func (vi *VulnerabilityID) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the VulnerabilityID. This includes values selected through modifiers, order, etc.

func (*VulnerabilityID) Vex added in v0.6.0

func (vi *VulnerabilityID) Vex(ctx context.Context) (result []*CertifyVex, err error)

func (*VulnerabilityID) VulnEqualVulnA added in v0.5.0

func (vi *VulnerabilityID) VulnEqualVulnA(ctx context.Context) (result []*VulnEqual, err error)

func (*VulnerabilityID) VulnEqualVulnB added in v0.5.0

func (vi *VulnerabilityID) VulnEqualVulnB(ctx context.Context) (result []*VulnEqual, err error)

type VulnerabilityIDClient

type VulnerabilityIDClient struct {
	// contains filtered or unexported fields
}

VulnerabilityIDClient is a client for the VulnerabilityID schema.

func NewVulnerabilityIDClient

func NewVulnerabilityIDClient(c config) *VulnerabilityIDClient

NewVulnerabilityIDClient returns a client for the VulnerabilityID from the given config.

func (*VulnerabilityIDClient) Create

Create returns a builder for creating a VulnerabilityID entity.

func (*VulnerabilityIDClient) CreateBulk

CreateBulk returns a builder for creating a bulk of VulnerabilityID entities.

func (*VulnerabilityIDClient) Delete

Delete returns a delete builder for VulnerabilityID.

func (*VulnerabilityIDClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*VulnerabilityIDClient) DeleteOneID

DeleteOneID returns a builder for deleting the given entity by its id.

func (*VulnerabilityIDClient) Get

Get returns a VulnerabilityID entity by its id.

func (*VulnerabilityIDClient) GetX

GetX is like Get, but panics if an error occurs.

func (*VulnerabilityIDClient) Hooks

func (c *VulnerabilityIDClient) Hooks() []Hook

Hooks returns the client hooks.

func (*VulnerabilityIDClient) Intercept

func (c *VulnerabilityIDClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `vulnerabilityid.Intercept(f(g(h())))`.

func (*VulnerabilityIDClient) Interceptors

func (c *VulnerabilityIDClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*VulnerabilityIDClient) MapCreateBulk

func (c *VulnerabilityIDClient) MapCreateBulk(slice any, setFunc func(*VulnerabilityIDCreate, int)) *VulnerabilityIDCreateBulk

MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.

func (*VulnerabilityIDClient) Query

Query returns a query builder for VulnerabilityID.

func (*VulnerabilityIDClient) QueryCertifyVuln added in v0.6.0

func (c *VulnerabilityIDClient) QueryCertifyVuln(vi *VulnerabilityID) *CertifyVulnQuery

QueryCertifyVuln queries the certify_vuln edge of a VulnerabilityID.

func (*VulnerabilityIDClient) QueryMetadata added in v0.6.0

QueryMetadata queries the metadata edge of a VulnerabilityID.

func (*VulnerabilityIDClient) QueryVex added in v0.6.0

QueryVex queries the vex edge of a VulnerabilityID.

func (*VulnerabilityIDClient) QueryVulnEqualVulnA added in v0.5.0

func (c *VulnerabilityIDClient) QueryVulnEqualVulnA(vi *VulnerabilityID) *VulnEqualQuery

QueryVulnEqualVulnA queries the vuln_equal_vuln_a edge of a VulnerabilityID.

func (*VulnerabilityIDClient) QueryVulnEqualVulnB added in v0.5.0

func (c *VulnerabilityIDClient) QueryVulnEqualVulnB(vi *VulnerabilityID) *VulnEqualQuery

QueryVulnEqualVulnB queries the vuln_equal_vuln_b edge of a VulnerabilityID.

func (*VulnerabilityIDClient) Update

Update returns an update builder for VulnerabilityID.

func (*VulnerabilityIDClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*VulnerabilityIDClient) UpdateOneID

UpdateOneID returns an update builder for the given id.

func (*VulnerabilityIDClient) Use

func (c *VulnerabilityIDClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `vulnerabilityid.Hooks(f(g(h())))`.

type VulnerabilityIDConnection

type VulnerabilityIDConnection struct {
	Edges      []*VulnerabilityIDEdge `json:"edges"`
	PageInfo   PageInfo               `json:"pageInfo"`
	TotalCount int                    `json:"totalCount"`
}

VulnerabilityIDConnection is the connection containing edges to VulnerabilityID.

type VulnerabilityIDCreate

type VulnerabilityIDCreate struct {
	// contains filtered or unexported fields
}

VulnerabilityIDCreate is the builder for creating a VulnerabilityID entity.

func (*VulnerabilityIDCreate) AddCertifyVuln added in v0.6.0

func (vic *VulnerabilityIDCreate) AddCertifyVuln(c ...*CertifyVuln) *VulnerabilityIDCreate

AddCertifyVuln adds the "certify_vuln" edges to the CertifyVuln entity.

func (*VulnerabilityIDCreate) AddCertifyVulnIDs added in v0.6.0

func (vic *VulnerabilityIDCreate) AddCertifyVulnIDs(ids ...uuid.UUID) *VulnerabilityIDCreate

AddCertifyVulnIDs adds the "certify_vuln" edge to the CertifyVuln entity by IDs.

func (*VulnerabilityIDCreate) AddMetadata added in v0.6.0

AddMetadata adds the "metadata" edges to the VulnerabilityMetadata entity.

func (*VulnerabilityIDCreate) AddMetadatumIDs added in v0.6.0

func (vic *VulnerabilityIDCreate) AddMetadatumIDs(ids ...uuid.UUID) *VulnerabilityIDCreate

AddMetadatumIDs adds the "metadata" edge to the VulnerabilityMetadata entity by IDs.

func (*VulnerabilityIDCreate) AddVex added in v0.6.0

AddVex adds the "vex" edges to the CertifyVex entity.

func (*VulnerabilityIDCreate) AddVexIDs added in v0.6.0

func (vic *VulnerabilityIDCreate) AddVexIDs(ids ...uuid.UUID) *VulnerabilityIDCreate

AddVexIDs adds the "vex" edge to the CertifyVex entity by IDs.

func (*VulnerabilityIDCreate) AddVulnEqualVulnA added in v0.5.0

func (vic *VulnerabilityIDCreate) AddVulnEqualVulnA(v ...*VulnEqual) *VulnerabilityIDCreate

AddVulnEqualVulnA adds the "vuln_equal_vuln_a" edges to the VulnEqual entity.

func (*VulnerabilityIDCreate) AddVulnEqualVulnAIDs added in v0.5.0

func (vic *VulnerabilityIDCreate) AddVulnEqualVulnAIDs(ids ...uuid.UUID) *VulnerabilityIDCreate

AddVulnEqualVulnAIDs adds the "vuln_equal_vuln_a" edge to the VulnEqual entity by IDs.

func (*VulnerabilityIDCreate) AddVulnEqualVulnB added in v0.5.0

func (vic *VulnerabilityIDCreate) AddVulnEqualVulnB(v ...*VulnEqual) *VulnerabilityIDCreate

AddVulnEqualVulnB adds the "vuln_equal_vuln_b" edges to the VulnEqual entity.

func (*VulnerabilityIDCreate) AddVulnEqualVulnBIDs added in v0.5.0

func (vic *VulnerabilityIDCreate) AddVulnEqualVulnBIDs(ids ...uuid.UUID) *VulnerabilityIDCreate

AddVulnEqualVulnBIDs adds the "vuln_equal_vuln_b" edge to the VulnEqual entity by IDs.

func (*VulnerabilityIDCreate) Exec

func (vic *VulnerabilityIDCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*VulnerabilityIDCreate) ExecX

func (vic *VulnerabilityIDCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*VulnerabilityIDCreate) Mutation

Mutation returns the VulnerabilityIDMutation object of the builder.

func (*VulnerabilityIDCreate) OnConflict

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.VulnerabilityID.Create().
	SetVulnerabilityID(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.VulnerabilityIDUpsert) {
		SetVulnerabilityID(v+v).
	}).
	Exec(ctx)

func (*VulnerabilityIDCreate) OnConflictColumns

func (vic *VulnerabilityIDCreate) OnConflictColumns(columns ...string) *VulnerabilityIDUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.VulnerabilityID.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*VulnerabilityIDCreate) Save

Save creates the VulnerabilityID in the database.

func (*VulnerabilityIDCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*VulnerabilityIDCreate) SetID added in v0.5.0

SetID sets the "id" field.

func (*VulnerabilityIDCreate) SetNillableID added in v0.5.0

func (vic *VulnerabilityIDCreate) SetNillableID(u *uuid.UUID) *VulnerabilityIDCreate

SetNillableID sets the "id" field if the given value is not nil.

func (*VulnerabilityIDCreate) SetType

SetType sets the "type" field.

func (*VulnerabilityIDCreate) SetVulnerabilityID

func (vic *VulnerabilityIDCreate) SetVulnerabilityID(s string) *VulnerabilityIDCreate

SetVulnerabilityID sets the "vulnerability_id" field.

type VulnerabilityIDCreateBulk

type VulnerabilityIDCreateBulk struct {
	// contains filtered or unexported fields
}

VulnerabilityIDCreateBulk is the builder for creating many VulnerabilityID entities in bulk.

func (*VulnerabilityIDCreateBulk) Exec

Exec executes the query.

func (*VulnerabilityIDCreateBulk) ExecX

func (vicb *VulnerabilityIDCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*VulnerabilityIDCreateBulk) OnConflict

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.VulnerabilityID.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.VulnerabilityIDUpsert) {
		SetVulnerabilityID(v+v).
	}).
	Exec(ctx)

func (*VulnerabilityIDCreateBulk) OnConflictColumns

func (vicb *VulnerabilityIDCreateBulk) OnConflictColumns(columns ...string) *VulnerabilityIDUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.VulnerabilityID.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*VulnerabilityIDCreateBulk) Save

Save creates the VulnerabilityID entities in the database.

func (*VulnerabilityIDCreateBulk) SaveX

SaveX is like Save, but panics if an error occurs.

type VulnerabilityIDDelete

type VulnerabilityIDDelete struct {
	// contains filtered or unexported fields
}

VulnerabilityIDDelete is the builder for deleting a VulnerabilityID entity.

func (*VulnerabilityIDDelete) Exec

func (vid *VulnerabilityIDDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*VulnerabilityIDDelete) ExecX

func (vid *VulnerabilityIDDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*VulnerabilityIDDelete) Where

Where appends a list predicates to the VulnerabilityIDDelete builder.

type VulnerabilityIDDeleteOne

type VulnerabilityIDDeleteOne struct {
	// contains filtered or unexported fields
}

VulnerabilityIDDeleteOne is the builder for deleting a single VulnerabilityID entity.

func (*VulnerabilityIDDeleteOne) Exec

Exec executes the deletion query.

func (*VulnerabilityIDDeleteOne) ExecX

func (vido *VulnerabilityIDDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*VulnerabilityIDDeleteOne) Where

Where appends a list predicates to the VulnerabilityIDDelete builder.

type VulnerabilityIDEdge

type VulnerabilityIDEdge struct {
	Node   *VulnerabilityID `json:"node"`
	Cursor Cursor           `json:"cursor"`
}

VulnerabilityIDEdge is the edge representation of VulnerabilityID.

type VulnerabilityIDEdges

type VulnerabilityIDEdges struct {
	// VulnEqualVulnA holds the value of the vuln_equal_vuln_a edge.
	VulnEqualVulnA []*VulnEqual `json:"vuln_equal_vuln_a,omitempty"`
	// VulnEqualVulnB holds the value of the vuln_equal_vuln_b edge.
	VulnEqualVulnB []*VulnEqual `json:"vuln_equal_vuln_b,omitempty"`
	// Metadata holds the value of the metadata edge.
	Metadata []*VulnerabilityMetadata `json:"metadata,omitempty"`
	// CertifyVuln holds the value of the certify_vuln edge.
	CertifyVuln []*CertifyVuln `json:"certify_vuln,omitempty"`
	// Vex holds the value of the vex edge.
	Vex []*CertifyVex `json:"vex,omitempty"`
	// contains filtered or unexported fields
}

VulnerabilityIDEdges holds the relations/edges for other nodes in the graph.

func (VulnerabilityIDEdges) CertifyVulnOrErr added in v0.6.0

func (e VulnerabilityIDEdges) CertifyVulnOrErr() ([]*CertifyVuln, error)

CertifyVulnOrErr returns the CertifyVuln value or an error if the edge was not loaded in eager-loading.

func (VulnerabilityIDEdges) MetadataOrErr added in v0.6.0

func (e VulnerabilityIDEdges) MetadataOrErr() ([]*VulnerabilityMetadata, error)

MetadataOrErr returns the Metadata value or an error if the edge was not loaded in eager-loading.

func (VulnerabilityIDEdges) VexOrErr added in v0.6.0

func (e VulnerabilityIDEdges) VexOrErr() ([]*CertifyVex, error)

VexOrErr returns the Vex value or an error if the edge was not loaded in eager-loading.

func (VulnerabilityIDEdges) VulnEqualVulnAOrErr added in v0.5.0

func (e VulnerabilityIDEdges) VulnEqualVulnAOrErr() ([]*VulnEqual, error)

VulnEqualVulnAOrErr returns the VulnEqualVulnA value or an error if the edge was not loaded in eager-loading.

func (VulnerabilityIDEdges) VulnEqualVulnBOrErr added in v0.5.0

func (e VulnerabilityIDEdges) VulnEqualVulnBOrErr() ([]*VulnEqual, error)

VulnEqualVulnBOrErr returns the VulnEqualVulnB value or an error if the edge was not loaded in eager-loading.

type VulnerabilityIDGroupBy

type VulnerabilityIDGroupBy struct {
	// contains filtered or unexported fields
}

VulnerabilityIDGroupBy is the group-by builder for VulnerabilityID entities.

func (*VulnerabilityIDGroupBy) Aggregate

Aggregate adds the given aggregation functions to the group-by query.

func (*VulnerabilityIDGroupBy) Bool

func (s *VulnerabilityIDGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*VulnerabilityIDGroupBy) BoolX

func (s *VulnerabilityIDGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*VulnerabilityIDGroupBy) Bools

func (s *VulnerabilityIDGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*VulnerabilityIDGroupBy) BoolsX

func (s *VulnerabilityIDGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*VulnerabilityIDGroupBy) Float64

func (s *VulnerabilityIDGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*VulnerabilityIDGroupBy) Float64X

func (s *VulnerabilityIDGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*VulnerabilityIDGroupBy) Float64s

func (s *VulnerabilityIDGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*VulnerabilityIDGroupBy) Float64sX

func (s *VulnerabilityIDGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*VulnerabilityIDGroupBy) Int

func (s *VulnerabilityIDGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*VulnerabilityIDGroupBy) IntX

func (s *VulnerabilityIDGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*VulnerabilityIDGroupBy) Ints

func (s *VulnerabilityIDGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*VulnerabilityIDGroupBy) IntsX

func (s *VulnerabilityIDGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*VulnerabilityIDGroupBy) Scan

func (vigb *VulnerabilityIDGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*VulnerabilityIDGroupBy) ScanX

func (s *VulnerabilityIDGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*VulnerabilityIDGroupBy) String

func (s *VulnerabilityIDGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*VulnerabilityIDGroupBy) StringX

func (s *VulnerabilityIDGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*VulnerabilityIDGroupBy) Strings

func (s *VulnerabilityIDGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*VulnerabilityIDGroupBy) StringsX

func (s *VulnerabilityIDGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type VulnerabilityIDMutation

type VulnerabilityIDMutation struct {
	// contains filtered or unexported fields
}

VulnerabilityIDMutation represents an operation that mutates the VulnerabilityID nodes in the graph.

func (*VulnerabilityIDMutation) AddCertifyVulnIDs added in v0.6.0

func (m *VulnerabilityIDMutation) AddCertifyVulnIDs(ids ...uuid.UUID)

AddCertifyVulnIDs adds the "certify_vuln" edge to the CertifyVuln entity by ids.

func (*VulnerabilityIDMutation) AddField

func (m *VulnerabilityIDMutation) AddField(name string, value ent.Value) error

AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*VulnerabilityIDMutation) AddMetadatumIDs added in v0.6.0

func (m *VulnerabilityIDMutation) AddMetadatumIDs(ids ...uuid.UUID)

AddMetadatumIDs adds the "metadata" edge to the VulnerabilityMetadata entity by ids.

func (*VulnerabilityIDMutation) AddVexIDs added in v0.6.0

func (m *VulnerabilityIDMutation) AddVexIDs(ids ...uuid.UUID)

AddVexIDs adds the "vex" edge to the CertifyVex entity by ids.

func (*VulnerabilityIDMutation) AddVulnEqualVulnAIDs added in v0.5.0

func (m *VulnerabilityIDMutation) AddVulnEqualVulnAIDs(ids ...uuid.UUID)

AddVulnEqualVulnAIDs adds the "vuln_equal_vuln_a" edge to the VulnEqual entity by ids.

func (*VulnerabilityIDMutation) AddVulnEqualVulnBIDs added in v0.5.0

func (m *VulnerabilityIDMutation) AddVulnEqualVulnBIDs(ids ...uuid.UUID)

AddVulnEqualVulnBIDs adds the "vuln_equal_vuln_b" edge to the VulnEqual entity by ids.

func (*VulnerabilityIDMutation) AddedEdges

func (m *VulnerabilityIDMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*VulnerabilityIDMutation) AddedField

func (m *VulnerabilityIDMutation) AddedField(name string) (ent.Value, bool)

AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*VulnerabilityIDMutation) AddedFields

func (m *VulnerabilityIDMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*VulnerabilityIDMutation) AddedIDs

func (m *VulnerabilityIDMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*VulnerabilityIDMutation) CertifyVulnCleared added in v0.6.0

func (m *VulnerabilityIDMutation) CertifyVulnCleared() bool

CertifyVulnCleared reports if the "certify_vuln" edge to the CertifyVuln entity was cleared.

func (*VulnerabilityIDMutation) CertifyVulnIDs added in v0.6.0

func (m *VulnerabilityIDMutation) CertifyVulnIDs() (ids []uuid.UUID)

CertifyVulnIDs returns the "certify_vuln" edge IDs in the mutation.

func (*VulnerabilityIDMutation) ClearCertifyVuln added in v0.6.0

func (m *VulnerabilityIDMutation) ClearCertifyVuln()

ClearCertifyVuln clears the "certify_vuln" edge to the CertifyVuln entity.

func (*VulnerabilityIDMutation) ClearEdge

func (m *VulnerabilityIDMutation) ClearEdge(name string) error

ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.

func (*VulnerabilityIDMutation) ClearField

func (m *VulnerabilityIDMutation) ClearField(name string) error

ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.

func (*VulnerabilityIDMutation) ClearMetadata added in v0.6.0

func (m *VulnerabilityIDMutation) ClearMetadata()

ClearMetadata clears the "metadata" edge to the VulnerabilityMetadata entity.

func (*VulnerabilityIDMutation) ClearVex added in v0.6.0

func (m *VulnerabilityIDMutation) ClearVex()

ClearVex clears the "vex" edge to the CertifyVex entity.

func (*VulnerabilityIDMutation) ClearVulnEqualVulnA added in v0.5.0

func (m *VulnerabilityIDMutation) ClearVulnEqualVulnA()

ClearVulnEqualVulnA clears the "vuln_equal_vuln_a" edge to the VulnEqual entity.

func (*VulnerabilityIDMutation) ClearVulnEqualVulnB added in v0.5.0

func (m *VulnerabilityIDMutation) ClearVulnEqualVulnB()

ClearVulnEqualVulnB clears the "vuln_equal_vuln_b" edge to the VulnEqual entity.

func (*VulnerabilityIDMutation) ClearedEdges

func (m *VulnerabilityIDMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*VulnerabilityIDMutation) ClearedFields

func (m *VulnerabilityIDMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (VulnerabilityIDMutation) Client

func (m VulnerabilityIDMutation) Client() *Client

Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.

func (*VulnerabilityIDMutation) EdgeCleared

func (m *VulnerabilityIDMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*VulnerabilityIDMutation) Field

func (m *VulnerabilityIDMutation) Field(name string) (ent.Value, bool)

Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*VulnerabilityIDMutation) FieldCleared

func (m *VulnerabilityIDMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*VulnerabilityIDMutation) Fields

func (m *VulnerabilityIDMutation) Fields() []string

Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().

func (*VulnerabilityIDMutation) GetType added in v0.5.0

func (m *VulnerabilityIDMutation) GetType() (r string, exists bool)

GetType returns the value of the "type" field in the mutation.

func (*VulnerabilityIDMutation) ID

func (m *VulnerabilityIDMutation) ID() (id uuid.UUID, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*VulnerabilityIDMutation) IDs

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*VulnerabilityIDMutation) MetadataCleared added in v0.6.0

func (m *VulnerabilityIDMutation) MetadataCleared() bool

MetadataCleared reports if the "metadata" edge to the VulnerabilityMetadata entity was cleared.

func (*VulnerabilityIDMutation) MetadataIDs added in v0.6.0

func (m *VulnerabilityIDMutation) MetadataIDs() (ids []uuid.UUID)

MetadataIDs returns the "metadata" edge IDs in the mutation.

func (*VulnerabilityIDMutation) OldField

func (m *VulnerabilityIDMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*VulnerabilityIDMutation) OldType added in v0.5.0

func (m *VulnerabilityIDMutation) OldType(ctx context.Context) (v string, err error)

OldType returns the old "type" field's value of the VulnerabilityID entity. If the VulnerabilityID object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*VulnerabilityIDMutation) OldVulnerabilityID

func (m *VulnerabilityIDMutation) OldVulnerabilityID(ctx context.Context) (v string, err error)

OldVulnerabilityID returns the old "vulnerability_id" field's value of the VulnerabilityID entity. If the VulnerabilityID object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*VulnerabilityIDMutation) Op

func (m *VulnerabilityIDMutation) Op() Op

Op returns the operation name.

func (*VulnerabilityIDMutation) RemoveCertifyVulnIDs added in v0.6.0

func (m *VulnerabilityIDMutation) RemoveCertifyVulnIDs(ids ...uuid.UUID)

RemoveCertifyVulnIDs removes the "certify_vuln" edge to the CertifyVuln entity by IDs.

func (*VulnerabilityIDMutation) RemoveMetadatumIDs added in v0.6.0

func (m *VulnerabilityIDMutation) RemoveMetadatumIDs(ids ...uuid.UUID)

RemoveMetadatumIDs removes the "metadata" edge to the VulnerabilityMetadata entity by IDs.

func (*VulnerabilityIDMutation) RemoveVexIDs added in v0.6.0

func (m *VulnerabilityIDMutation) RemoveVexIDs(ids ...uuid.UUID)

RemoveVexIDs removes the "vex" edge to the CertifyVex entity by IDs.

func (*VulnerabilityIDMutation) RemoveVulnEqualVulnAIDs added in v0.5.0

func (m *VulnerabilityIDMutation) RemoveVulnEqualVulnAIDs(ids ...uuid.UUID)

RemoveVulnEqualVulnAIDs removes the "vuln_equal_vuln_a" edge to the VulnEqual entity by IDs.

func (*VulnerabilityIDMutation) RemoveVulnEqualVulnBIDs added in v0.5.0

func (m *VulnerabilityIDMutation) RemoveVulnEqualVulnBIDs(ids ...uuid.UUID)

RemoveVulnEqualVulnBIDs removes the "vuln_equal_vuln_b" edge to the VulnEqual entity by IDs.

func (*VulnerabilityIDMutation) RemovedCertifyVulnIDs added in v0.6.0

func (m *VulnerabilityIDMutation) RemovedCertifyVulnIDs() (ids []uuid.UUID)

RemovedCertifyVuln returns the removed IDs of the "certify_vuln" edge to the CertifyVuln entity.

func (*VulnerabilityIDMutation) RemovedEdges

func (m *VulnerabilityIDMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*VulnerabilityIDMutation) RemovedIDs

func (m *VulnerabilityIDMutation) RemovedIDs(name string) []ent.Value

RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.

func (*VulnerabilityIDMutation) RemovedMetadataIDs added in v0.6.0

func (m *VulnerabilityIDMutation) RemovedMetadataIDs() (ids []uuid.UUID)

RemovedMetadata returns the removed IDs of the "metadata" edge to the VulnerabilityMetadata entity.

func (*VulnerabilityIDMutation) RemovedVexIDs added in v0.6.0

func (m *VulnerabilityIDMutation) RemovedVexIDs() (ids []uuid.UUID)

RemovedVex returns the removed IDs of the "vex" edge to the CertifyVex entity.

func (*VulnerabilityIDMutation) RemovedVulnEqualVulnAIDs added in v0.5.0

func (m *VulnerabilityIDMutation) RemovedVulnEqualVulnAIDs() (ids []uuid.UUID)

RemovedVulnEqualVulnA returns the removed IDs of the "vuln_equal_vuln_a" edge to the VulnEqual entity.

func (*VulnerabilityIDMutation) RemovedVulnEqualVulnBIDs added in v0.5.0

func (m *VulnerabilityIDMutation) RemovedVulnEqualVulnBIDs() (ids []uuid.UUID)

RemovedVulnEqualVulnB returns the removed IDs of the "vuln_equal_vuln_b" edge to the VulnEqual entity.

func (*VulnerabilityIDMutation) ResetCertifyVuln added in v0.6.0

func (m *VulnerabilityIDMutation) ResetCertifyVuln()

ResetCertifyVuln resets all changes to the "certify_vuln" edge.

func (*VulnerabilityIDMutation) ResetEdge

func (m *VulnerabilityIDMutation) ResetEdge(name string) error

ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.

func (*VulnerabilityIDMutation) ResetField

func (m *VulnerabilityIDMutation) ResetField(name string) error

ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.

func (*VulnerabilityIDMutation) ResetMetadata added in v0.6.0

func (m *VulnerabilityIDMutation) ResetMetadata()

ResetMetadata resets all changes to the "metadata" edge.

func (*VulnerabilityIDMutation) ResetType

func (m *VulnerabilityIDMutation) ResetType()

ResetType resets all changes to the "type" field.

func (*VulnerabilityIDMutation) ResetVex added in v0.6.0

func (m *VulnerabilityIDMutation) ResetVex()

ResetVex resets all changes to the "vex" edge.

func (*VulnerabilityIDMutation) ResetVulnEqualVulnA added in v0.5.0

func (m *VulnerabilityIDMutation) ResetVulnEqualVulnA()

ResetVulnEqualVulnA resets all changes to the "vuln_equal_vuln_a" edge.

func (*VulnerabilityIDMutation) ResetVulnEqualVulnB added in v0.5.0

func (m *VulnerabilityIDMutation) ResetVulnEqualVulnB()

ResetVulnEqualVulnB resets all changes to the "vuln_equal_vuln_b" edge.

func (*VulnerabilityIDMutation) ResetVulnerabilityID

func (m *VulnerabilityIDMutation) ResetVulnerabilityID()

ResetVulnerabilityID resets all changes to the "vulnerability_id" field.

func (*VulnerabilityIDMutation) SetField

func (m *VulnerabilityIDMutation) SetField(name string, value ent.Value) error

SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*VulnerabilityIDMutation) SetID added in v0.5.0

func (m *VulnerabilityIDMutation) SetID(id uuid.UUID)

SetID sets the value of the id field. Note that this operation is only accepted on creation of VulnerabilityID entities.

func (*VulnerabilityIDMutation) SetOp

func (m *VulnerabilityIDMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*VulnerabilityIDMutation) SetType added in v0.5.0

func (m *VulnerabilityIDMutation) SetType(s string)

SetType sets the "type" field.

func (*VulnerabilityIDMutation) SetVulnerabilityID

func (m *VulnerabilityIDMutation) SetVulnerabilityID(s string)

SetVulnerabilityID sets the "vulnerability_id" field.

func (VulnerabilityIDMutation) Tx

func (m VulnerabilityIDMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*VulnerabilityIDMutation) Type

func (m *VulnerabilityIDMutation) Type() string

Type returns the node type of this mutation (VulnerabilityID).

func (*VulnerabilityIDMutation) VexCleared added in v0.6.0

func (m *VulnerabilityIDMutation) VexCleared() bool

VexCleared reports if the "vex" edge to the CertifyVex entity was cleared.

func (*VulnerabilityIDMutation) VexIDs added in v0.6.0

func (m *VulnerabilityIDMutation) VexIDs() (ids []uuid.UUID)

VexIDs returns the "vex" edge IDs in the mutation.

func (*VulnerabilityIDMutation) VulnEqualVulnACleared added in v0.5.0

func (m *VulnerabilityIDMutation) VulnEqualVulnACleared() bool

VulnEqualVulnACleared reports if the "vuln_equal_vuln_a" edge to the VulnEqual entity was cleared.

func (*VulnerabilityIDMutation) VulnEqualVulnAIDs added in v0.5.0

func (m *VulnerabilityIDMutation) VulnEqualVulnAIDs() (ids []uuid.UUID)

VulnEqualVulnAIDs returns the "vuln_equal_vuln_a" edge IDs in the mutation.

func (*VulnerabilityIDMutation) VulnEqualVulnBCleared added in v0.5.0

func (m *VulnerabilityIDMutation) VulnEqualVulnBCleared() bool

VulnEqualVulnBCleared reports if the "vuln_equal_vuln_b" edge to the VulnEqual entity was cleared.

func (*VulnerabilityIDMutation) VulnEqualVulnBIDs added in v0.5.0

func (m *VulnerabilityIDMutation) VulnEqualVulnBIDs() (ids []uuid.UUID)

VulnEqualVulnBIDs returns the "vuln_equal_vuln_b" edge IDs in the mutation.

func (*VulnerabilityIDMutation) VulnerabilityID

func (m *VulnerabilityIDMutation) VulnerabilityID() (r string, exists bool)

VulnerabilityID returns the value of the "vulnerability_id" field in the mutation.

func (*VulnerabilityIDMutation) Where

Where appends a list predicates to the VulnerabilityIDMutation builder.

func (*VulnerabilityIDMutation) WhereP

func (m *VulnerabilityIDMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the VulnerabilityIDMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type VulnerabilityIDOrder

type VulnerabilityIDOrder struct {
	Direction OrderDirection             `json:"direction"`
	Field     *VulnerabilityIDOrderField `json:"field"`
}

VulnerabilityIDOrder defines the ordering of VulnerabilityID.

type VulnerabilityIDOrderField

type VulnerabilityIDOrderField struct {
	// Value extracts the ordering value from the given VulnerabilityID.
	Value func(*VulnerabilityID) (ent.Value, error)
	// contains filtered or unexported fields
}

VulnerabilityIDOrderField defines the ordering field of VulnerabilityID.

type VulnerabilityIDPaginateOption

type VulnerabilityIDPaginateOption func(*vulnerabilityidPager) error

VulnerabilityIDPaginateOption enables pagination customization.

func WithVulnerabilityIDFilter

func WithVulnerabilityIDFilter(filter func(*VulnerabilityIDQuery) (*VulnerabilityIDQuery, error)) VulnerabilityIDPaginateOption

WithVulnerabilityIDFilter configures pagination filter.

func WithVulnerabilityIDOrder

func WithVulnerabilityIDOrder(order *VulnerabilityIDOrder) VulnerabilityIDPaginateOption

WithVulnerabilityIDOrder configures pagination ordering.

type VulnerabilityIDQuery

type VulnerabilityIDQuery struct {
	// contains filtered or unexported fields
}

VulnerabilityIDQuery is the builder for querying VulnerabilityID entities.

func (*VulnerabilityIDQuery) Aggregate

Aggregate returns a VulnerabilityIDSelect configured with the given aggregations.

func (*VulnerabilityIDQuery) All

All executes the query and returns a list of VulnerabilityIDs.

func (*VulnerabilityIDQuery) AllX

AllX is like All, but panics if an error occurs.

func (*VulnerabilityIDQuery) Clone

Clone returns a duplicate of the VulnerabilityIDQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*VulnerabilityIDQuery) CollectFields

func (vi *VulnerabilityIDQuery) CollectFields(ctx context.Context, satisfies ...string) (*VulnerabilityIDQuery, error)

CollectFields tells the query-builder to eagerly load connected nodes by resolver context.

func (*VulnerabilityIDQuery) Count

func (viq *VulnerabilityIDQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*VulnerabilityIDQuery) CountX

func (viq *VulnerabilityIDQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*VulnerabilityIDQuery) Exist

func (viq *VulnerabilityIDQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*VulnerabilityIDQuery) ExistX

func (viq *VulnerabilityIDQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*VulnerabilityIDQuery) First

First returns the first VulnerabilityID entity from the query. Returns a *NotFoundError when no VulnerabilityID was found.

func (*VulnerabilityIDQuery) FirstID

func (viq *VulnerabilityIDQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)

FirstID returns the first VulnerabilityID ID from the query. Returns a *NotFoundError when no VulnerabilityID ID was found.

func (*VulnerabilityIDQuery) FirstIDX

func (viq *VulnerabilityIDQuery) FirstIDX(ctx context.Context) uuid.UUID

FirstIDX is like FirstID, but panics if an error occurs.

func (*VulnerabilityIDQuery) FirstX

FirstX is like First, but panics if an error occurs.

func (*VulnerabilityIDQuery) GroupBy

func (viq *VulnerabilityIDQuery) GroupBy(field string, fields ...string) *VulnerabilityIDGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	VulnerabilityID string `json:"vulnerability_id,omitempty"`
	Count int `json:"count,omitempty"`
}

client.VulnerabilityID.Query().
	GroupBy(vulnerabilityid.FieldVulnerabilityID).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*VulnerabilityIDQuery) IDs

func (viq *VulnerabilityIDQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)

IDs executes the query and returns a list of VulnerabilityID IDs.

func (*VulnerabilityIDQuery) IDsX

func (viq *VulnerabilityIDQuery) IDsX(ctx context.Context) []uuid.UUID

IDsX is like IDs, but panics if an error occurs.

func (*VulnerabilityIDQuery) Limit

func (viq *VulnerabilityIDQuery) Limit(limit int) *VulnerabilityIDQuery

Limit the number of records to be returned by this query.

func (*VulnerabilityIDQuery) Offset

func (viq *VulnerabilityIDQuery) Offset(offset int) *VulnerabilityIDQuery

Offset to start from.

func (*VulnerabilityIDQuery) Only

Only returns a single VulnerabilityID entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one VulnerabilityID entity is found. Returns a *NotFoundError when no VulnerabilityID entities are found.

func (*VulnerabilityIDQuery) OnlyID

func (viq *VulnerabilityIDQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)

OnlyID is like Only, but returns the only VulnerabilityID ID in the query. Returns a *NotSingularError when more than one VulnerabilityID ID is found. Returns a *NotFoundError when no entities are found.

func (*VulnerabilityIDQuery) OnlyIDX

func (viq *VulnerabilityIDQuery) OnlyIDX(ctx context.Context) uuid.UUID

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*VulnerabilityIDQuery) OnlyX

OnlyX is like Only, but panics if an error occurs.

func (*VulnerabilityIDQuery) Order

Order specifies how the records should be ordered.

func (*VulnerabilityIDQuery) Paginate

func (vi *VulnerabilityIDQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...VulnerabilityIDPaginateOption,
) (*VulnerabilityIDConnection, error)

Paginate executes the query and returns a relay based cursor connection to VulnerabilityID.

func (*VulnerabilityIDQuery) QueryCertifyVuln added in v0.6.0

func (viq *VulnerabilityIDQuery) QueryCertifyVuln() *CertifyVulnQuery

QueryCertifyVuln chains the current query on the "certify_vuln" edge.

func (*VulnerabilityIDQuery) QueryMetadata added in v0.6.0

func (viq *VulnerabilityIDQuery) QueryMetadata() *VulnerabilityMetadataQuery

QueryMetadata chains the current query on the "metadata" edge.

func (*VulnerabilityIDQuery) QueryVex added in v0.6.0

func (viq *VulnerabilityIDQuery) QueryVex() *CertifyVexQuery

QueryVex chains the current query on the "vex" edge.

func (*VulnerabilityIDQuery) QueryVulnEqualVulnA added in v0.5.0

func (viq *VulnerabilityIDQuery) QueryVulnEqualVulnA() *VulnEqualQuery

QueryVulnEqualVulnA chains the current query on the "vuln_equal_vuln_a" edge.

func (*VulnerabilityIDQuery) QueryVulnEqualVulnB added in v0.5.0

func (viq *VulnerabilityIDQuery) QueryVulnEqualVulnB() *VulnEqualQuery

QueryVulnEqualVulnB chains the current query on the "vuln_equal_vuln_b" edge.

func (*VulnerabilityIDQuery) Select

func (viq *VulnerabilityIDQuery) Select(fields ...string) *VulnerabilityIDSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	VulnerabilityID string `json:"vulnerability_id,omitempty"`
}

client.VulnerabilityID.Query().
	Select(vulnerabilityid.FieldVulnerabilityID).
	Scan(ctx, &v)

func (*VulnerabilityIDQuery) Unique

func (viq *VulnerabilityIDQuery) Unique(unique bool) *VulnerabilityIDQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*VulnerabilityIDQuery) Where

Where adds a new predicate for the VulnerabilityIDQuery builder.

func (*VulnerabilityIDQuery) WithCertifyVuln added in v0.6.0

func (viq *VulnerabilityIDQuery) WithCertifyVuln(opts ...func(*CertifyVulnQuery)) *VulnerabilityIDQuery

WithCertifyVuln tells the query-builder to eager-load the nodes that are connected to the "certify_vuln" edge. The optional arguments are used to configure the query builder of the edge.

func (*VulnerabilityIDQuery) WithMetadata added in v0.6.0

func (viq *VulnerabilityIDQuery) WithMetadata(opts ...func(*VulnerabilityMetadataQuery)) *VulnerabilityIDQuery

WithMetadata tells the query-builder to eager-load the nodes that are connected to the "metadata" edge. The optional arguments are used to configure the query builder of the edge.

func (*VulnerabilityIDQuery) WithNamedCertifyVuln added in v0.6.0

func (viq *VulnerabilityIDQuery) WithNamedCertifyVuln(name string, opts ...func(*CertifyVulnQuery)) *VulnerabilityIDQuery

WithNamedCertifyVuln tells the query-builder to eager-load the nodes that are connected to the "certify_vuln" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*VulnerabilityIDQuery) WithNamedMetadata added in v0.6.0

func (viq *VulnerabilityIDQuery) WithNamedMetadata(name string, opts ...func(*VulnerabilityMetadataQuery)) *VulnerabilityIDQuery

WithNamedMetadata tells the query-builder to eager-load the nodes that are connected to the "metadata" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*VulnerabilityIDQuery) WithNamedVex added in v0.6.0

func (viq *VulnerabilityIDQuery) WithNamedVex(name string, opts ...func(*CertifyVexQuery)) *VulnerabilityIDQuery

WithNamedVex tells the query-builder to eager-load the nodes that are connected to the "vex" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*VulnerabilityIDQuery) WithNamedVulnEqualVulnA added in v0.5.0

func (viq *VulnerabilityIDQuery) WithNamedVulnEqualVulnA(name string, opts ...func(*VulnEqualQuery)) *VulnerabilityIDQuery

WithNamedVulnEqualVulnA tells the query-builder to eager-load the nodes that are connected to the "vuln_equal_vuln_a" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*VulnerabilityIDQuery) WithNamedVulnEqualVulnB added in v0.5.0

func (viq *VulnerabilityIDQuery) WithNamedVulnEqualVulnB(name string, opts ...func(*VulnEqualQuery)) *VulnerabilityIDQuery

WithNamedVulnEqualVulnB tells the query-builder to eager-load the nodes that are connected to the "vuln_equal_vuln_b" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*VulnerabilityIDQuery) WithVex added in v0.6.0

func (viq *VulnerabilityIDQuery) WithVex(opts ...func(*CertifyVexQuery)) *VulnerabilityIDQuery

WithVex tells the query-builder to eager-load the nodes that are connected to the "vex" edge. The optional arguments are used to configure the query builder of the edge.

func (*VulnerabilityIDQuery) WithVulnEqualVulnA added in v0.5.0

func (viq *VulnerabilityIDQuery) WithVulnEqualVulnA(opts ...func(*VulnEqualQuery)) *VulnerabilityIDQuery

WithVulnEqualVulnA tells the query-builder to eager-load the nodes that are connected to the "vuln_equal_vuln_a" edge. The optional arguments are used to configure the query builder of the edge.

func (*VulnerabilityIDQuery) WithVulnEqualVulnB added in v0.5.0

func (viq *VulnerabilityIDQuery) WithVulnEqualVulnB(opts ...func(*VulnEqualQuery)) *VulnerabilityIDQuery

WithVulnEqualVulnB tells the query-builder to eager-load the nodes that are connected to the "vuln_equal_vuln_b" edge. The optional arguments are used to configure the query builder of the edge.

type VulnerabilityIDSelect

type VulnerabilityIDSelect struct {
	*VulnerabilityIDQuery
	// contains filtered or unexported fields
}

VulnerabilityIDSelect is the builder for selecting fields of VulnerabilityID entities.

func (*VulnerabilityIDSelect) Aggregate

Aggregate adds the given aggregation functions to the selector query.

func (*VulnerabilityIDSelect) Bool

func (s *VulnerabilityIDSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*VulnerabilityIDSelect) BoolX

func (s *VulnerabilityIDSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*VulnerabilityIDSelect) Bools

func (s *VulnerabilityIDSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*VulnerabilityIDSelect) BoolsX

func (s *VulnerabilityIDSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*VulnerabilityIDSelect) Float64

func (s *VulnerabilityIDSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*VulnerabilityIDSelect) Float64X

func (s *VulnerabilityIDSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*VulnerabilityIDSelect) Float64s

func (s *VulnerabilityIDSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*VulnerabilityIDSelect) Float64sX

func (s *VulnerabilityIDSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*VulnerabilityIDSelect) Int

func (s *VulnerabilityIDSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*VulnerabilityIDSelect) IntX

func (s *VulnerabilityIDSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*VulnerabilityIDSelect) Ints

func (s *VulnerabilityIDSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*VulnerabilityIDSelect) IntsX

func (s *VulnerabilityIDSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*VulnerabilityIDSelect) Scan

func (vis *VulnerabilityIDSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*VulnerabilityIDSelect) ScanX

func (s *VulnerabilityIDSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*VulnerabilityIDSelect) String

func (s *VulnerabilityIDSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*VulnerabilityIDSelect) StringX

func (s *VulnerabilityIDSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*VulnerabilityIDSelect) Strings

func (s *VulnerabilityIDSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*VulnerabilityIDSelect) StringsX

func (s *VulnerabilityIDSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type VulnerabilityIDUpdate

type VulnerabilityIDUpdate struct {
	// contains filtered or unexported fields
}

VulnerabilityIDUpdate is the builder for updating VulnerabilityID entities.

func (*VulnerabilityIDUpdate) AddCertifyVuln added in v0.6.0

func (viu *VulnerabilityIDUpdate) AddCertifyVuln(c ...*CertifyVuln) *VulnerabilityIDUpdate

AddCertifyVuln adds the "certify_vuln" edges to the CertifyVuln entity.

func (*VulnerabilityIDUpdate) AddCertifyVulnIDs added in v0.6.0

func (viu *VulnerabilityIDUpdate) AddCertifyVulnIDs(ids ...uuid.UUID) *VulnerabilityIDUpdate

AddCertifyVulnIDs adds the "certify_vuln" edge to the CertifyVuln entity by IDs.

func (*VulnerabilityIDUpdate) AddMetadata added in v0.6.0

AddMetadata adds the "metadata" edges to the VulnerabilityMetadata entity.

func (*VulnerabilityIDUpdate) AddMetadatumIDs added in v0.6.0

func (viu *VulnerabilityIDUpdate) AddMetadatumIDs(ids ...uuid.UUID) *VulnerabilityIDUpdate

AddMetadatumIDs adds the "metadata" edge to the VulnerabilityMetadata entity by IDs.

func (*VulnerabilityIDUpdate) AddVex added in v0.6.0

AddVex adds the "vex" edges to the CertifyVex entity.

func (*VulnerabilityIDUpdate) AddVexIDs added in v0.6.0

func (viu *VulnerabilityIDUpdate) AddVexIDs(ids ...uuid.UUID) *VulnerabilityIDUpdate

AddVexIDs adds the "vex" edge to the CertifyVex entity by IDs.

func (*VulnerabilityIDUpdate) AddVulnEqualVulnA added in v0.5.0

func (viu *VulnerabilityIDUpdate) AddVulnEqualVulnA(v ...*VulnEqual) *VulnerabilityIDUpdate

AddVulnEqualVulnA adds the "vuln_equal_vuln_a" edges to the VulnEqual entity.

func (*VulnerabilityIDUpdate) AddVulnEqualVulnAIDs added in v0.5.0

func (viu *VulnerabilityIDUpdate) AddVulnEqualVulnAIDs(ids ...uuid.UUID) *VulnerabilityIDUpdate

AddVulnEqualVulnAIDs adds the "vuln_equal_vuln_a" edge to the VulnEqual entity by IDs.

func (*VulnerabilityIDUpdate) AddVulnEqualVulnB added in v0.5.0

func (viu *VulnerabilityIDUpdate) AddVulnEqualVulnB(v ...*VulnEqual) *VulnerabilityIDUpdate

AddVulnEqualVulnB adds the "vuln_equal_vuln_b" edges to the VulnEqual entity.

func (*VulnerabilityIDUpdate) AddVulnEqualVulnBIDs added in v0.5.0

func (viu *VulnerabilityIDUpdate) AddVulnEqualVulnBIDs(ids ...uuid.UUID) *VulnerabilityIDUpdate

AddVulnEqualVulnBIDs adds the "vuln_equal_vuln_b" edge to the VulnEqual entity by IDs.

func (*VulnerabilityIDUpdate) ClearCertifyVuln added in v0.6.0

func (viu *VulnerabilityIDUpdate) ClearCertifyVuln() *VulnerabilityIDUpdate

ClearCertifyVuln clears all "certify_vuln" edges to the CertifyVuln entity.

func (*VulnerabilityIDUpdate) ClearMetadata added in v0.6.0

func (viu *VulnerabilityIDUpdate) ClearMetadata() *VulnerabilityIDUpdate

ClearMetadata clears all "metadata" edges to the VulnerabilityMetadata entity.

func (*VulnerabilityIDUpdate) ClearVex added in v0.6.0

ClearVex clears all "vex" edges to the CertifyVex entity.

func (*VulnerabilityIDUpdate) ClearVulnEqualVulnA added in v0.5.0

func (viu *VulnerabilityIDUpdate) ClearVulnEqualVulnA() *VulnerabilityIDUpdate

ClearVulnEqualVulnA clears all "vuln_equal_vuln_a" edges to the VulnEqual entity.

func (*VulnerabilityIDUpdate) ClearVulnEqualVulnB added in v0.5.0

func (viu *VulnerabilityIDUpdate) ClearVulnEqualVulnB() *VulnerabilityIDUpdate

ClearVulnEqualVulnB clears all "vuln_equal_vuln_b" edges to the VulnEqual entity.

func (*VulnerabilityIDUpdate) Exec

func (viu *VulnerabilityIDUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*VulnerabilityIDUpdate) ExecX

func (viu *VulnerabilityIDUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*VulnerabilityIDUpdate) Mutation

Mutation returns the VulnerabilityIDMutation object of the builder.

func (*VulnerabilityIDUpdate) RemoveCertifyVuln added in v0.6.0

func (viu *VulnerabilityIDUpdate) RemoveCertifyVuln(c ...*CertifyVuln) *VulnerabilityIDUpdate

RemoveCertifyVuln removes "certify_vuln" edges to CertifyVuln entities.

func (*VulnerabilityIDUpdate) RemoveCertifyVulnIDs added in v0.6.0

func (viu *VulnerabilityIDUpdate) RemoveCertifyVulnIDs(ids ...uuid.UUID) *VulnerabilityIDUpdate

RemoveCertifyVulnIDs removes the "certify_vuln" edge to CertifyVuln entities by IDs.

func (*VulnerabilityIDUpdate) RemoveMetadata added in v0.6.0

RemoveMetadata removes "metadata" edges to VulnerabilityMetadata entities.

func (*VulnerabilityIDUpdate) RemoveMetadatumIDs added in v0.6.0

func (viu *VulnerabilityIDUpdate) RemoveMetadatumIDs(ids ...uuid.UUID) *VulnerabilityIDUpdate

RemoveMetadatumIDs removes the "metadata" edge to VulnerabilityMetadata entities by IDs.

func (*VulnerabilityIDUpdate) RemoveVex added in v0.6.0

RemoveVex removes "vex" edges to CertifyVex entities.

func (*VulnerabilityIDUpdate) RemoveVexIDs added in v0.6.0

func (viu *VulnerabilityIDUpdate) RemoveVexIDs(ids ...uuid.UUID) *VulnerabilityIDUpdate

RemoveVexIDs removes the "vex" edge to CertifyVex entities by IDs.

func (*VulnerabilityIDUpdate) RemoveVulnEqualVulnA added in v0.5.0

func (viu *VulnerabilityIDUpdate) RemoveVulnEqualVulnA(v ...*VulnEqual) *VulnerabilityIDUpdate

RemoveVulnEqualVulnA removes "vuln_equal_vuln_a" edges to VulnEqual entities.

func (*VulnerabilityIDUpdate) RemoveVulnEqualVulnAIDs added in v0.5.0

func (viu *VulnerabilityIDUpdate) RemoveVulnEqualVulnAIDs(ids ...uuid.UUID) *VulnerabilityIDUpdate

RemoveVulnEqualVulnAIDs removes the "vuln_equal_vuln_a" edge to VulnEqual entities by IDs.

func (*VulnerabilityIDUpdate) RemoveVulnEqualVulnB added in v0.5.0

func (viu *VulnerabilityIDUpdate) RemoveVulnEqualVulnB(v ...*VulnEqual) *VulnerabilityIDUpdate

RemoveVulnEqualVulnB removes "vuln_equal_vuln_b" edges to VulnEqual entities.

func (*VulnerabilityIDUpdate) RemoveVulnEqualVulnBIDs added in v0.5.0

func (viu *VulnerabilityIDUpdate) RemoveVulnEqualVulnBIDs(ids ...uuid.UUID) *VulnerabilityIDUpdate

RemoveVulnEqualVulnBIDs removes the "vuln_equal_vuln_b" edge to VulnEqual entities by IDs.

func (*VulnerabilityIDUpdate) Save

func (viu *VulnerabilityIDUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*VulnerabilityIDUpdate) SaveX

func (viu *VulnerabilityIDUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*VulnerabilityIDUpdate) SetNillableType added in v0.5.0

func (viu *VulnerabilityIDUpdate) SetNillableType(s *string) *VulnerabilityIDUpdate

SetNillableType sets the "type" field if the given value is not nil.

func (*VulnerabilityIDUpdate) SetNillableVulnerabilityID added in v0.4.0

func (viu *VulnerabilityIDUpdate) SetNillableVulnerabilityID(s *string) *VulnerabilityIDUpdate

SetNillableVulnerabilityID sets the "vulnerability_id" field if the given value is not nil.

func (*VulnerabilityIDUpdate) SetType

SetType sets the "type" field.

func (*VulnerabilityIDUpdate) SetVulnerabilityID

func (viu *VulnerabilityIDUpdate) SetVulnerabilityID(s string) *VulnerabilityIDUpdate

SetVulnerabilityID sets the "vulnerability_id" field.

func (*VulnerabilityIDUpdate) Where

Where appends a list predicates to the VulnerabilityIDUpdate builder.

type VulnerabilityIDUpdateOne

type VulnerabilityIDUpdateOne struct {
	// contains filtered or unexported fields
}

VulnerabilityIDUpdateOne is the builder for updating a single VulnerabilityID entity.

func (*VulnerabilityIDUpdateOne) AddCertifyVuln added in v0.6.0

func (viuo *VulnerabilityIDUpdateOne) AddCertifyVuln(c ...*CertifyVuln) *VulnerabilityIDUpdateOne

AddCertifyVuln adds the "certify_vuln" edges to the CertifyVuln entity.

func (*VulnerabilityIDUpdateOne) AddCertifyVulnIDs added in v0.6.0

func (viuo *VulnerabilityIDUpdateOne) AddCertifyVulnIDs(ids ...uuid.UUID) *VulnerabilityIDUpdateOne

AddCertifyVulnIDs adds the "certify_vuln" edge to the CertifyVuln entity by IDs.

func (*VulnerabilityIDUpdateOne) AddMetadata added in v0.6.0

AddMetadata adds the "metadata" edges to the VulnerabilityMetadata entity.

func (*VulnerabilityIDUpdateOne) AddMetadatumIDs added in v0.6.0

func (viuo *VulnerabilityIDUpdateOne) AddMetadatumIDs(ids ...uuid.UUID) *VulnerabilityIDUpdateOne

AddMetadatumIDs adds the "metadata" edge to the VulnerabilityMetadata entity by IDs.

func (*VulnerabilityIDUpdateOne) AddVex added in v0.6.0

AddVex adds the "vex" edges to the CertifyVex entity.

func (*VulnerabilityIDUpdateOne) AddVexIDs added in v0.6.0

AddVexIDs adds the "vex" edge to the CertifyVex entity by IDs.

func (*VulnerabilityIDUpdateOne) AddVulnEqualVulnA added in v0.5.0

func (viuo *VulnerabilityIDUpdateOne) AddVulnEqualVulnA(v ...*VulnEqual) *VulnerabilityIDUpdateOne

AddVulnEqualVulnA adds the "vuln_equal_vuln_a" edges to the VulnEqual entity.

func (*VulnerabilityIDUpdateOne) AddVulnEqualVulnAIDs added in v0.5.0

func (viuo *VulnerabilityIDUpdateOne) AddVulnEqualVulnAIDs(ids ...uuid.UUID) *VulnerabilityIDUpdateOne

AddVulnEqualVulnAIDs adds the "vuln_equal_vuln_a" edge to the VulnEqual entity by IDs.

func (*VulnerabilityIDUpdateOne) AddVulnEqualVulnB added in v0.5.0

func (viuo *VulnerabilityIDUpdateOne) AddVulnEqualVulnB(v ...*VulnEqual) *VulnerabilityIDUpdateOne

AddVulnEqualVulnB adds the "vuln_equal_vuln_b" edges to the VulnEqual entity.

func (*VulnerabilityIDUpdateOne) AddVulnEqualVulnBIDs added in v0.5.0

func (viuo *VulnerabilityIDUpdateOne) AddVulnEqualVulnBIDs(ids ...uuid.UUID) *VulnerabilityIDUpdateOne

AddVulnEqualVulnBIDs adds the "vuln_equal_vuln_b" edge to the VulnEqual entity by IDs.

func (*VulnerabilityIDUpdateOne) ClearCertifyVuln added in v0.6.0

func (viuo *VulnerabilityIDUpdateOne) ClearCertifyVuln() *VulnerabilityIDUpdateOne

ClearCertifyVuln clears all "certify_vuln" edges to the CertifyVuln entity.

func (*VulnerabilityIDUpdateOne) ClearMetadata added in v0.6.0

func (viuo *VulnerabilityIDUpdateOne) ClearMetadata() *VulnerabilityIDUpdateOne

ClearMetadata clears all "metadata" edges to the VulnerabilityMetadata entity.

func (*VulnerabilityIDUpdateOne) ClearVex added in v0.6.0

ClearVex clears all "vex" edges to the CertifyVex entity.

func (*VulnerabilityIDUpdateOne) ClearVulnEqualVulnA added in v0.5.0

func (viuo *VulnerabilityIDUpdateOne) ClearVulnEqualVulnA() *VulnerabilityIDUpdateOne

ClearVulnEqualVulnA clears all "vuln_equal_vuln_a" edges to the VulnEqual entity.

func (*VulnerabilityIDUpdateOne) ClearVulnEqualVulnB added in v0.5.0

func (viuo *VulnerabilityIDUpdateOne) ClearVulnEqualVulnB() *VulnerabilityIDUpdateOne

ClearVulnEqualVulnB clears all "vuln_equal_vuln_b" edges to the VulnEqual entity.

func (*VulnerabilityIDUpdateOne) Exec

Exec executes the query on the entity.

func (*VulnerabilityIDUpdateOne) ExecX

func (viuo *VulnerabilityIDUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*VulnerabilityIDUpdateOne) Mutation

Mutation returns the VulnerabilityIDMutation object of the builder.

func (*VulnerabilityIDUpdateOne) RemoveCertifyVuln added in v0.6.0

func (viuo *VulnerabilityIDUpdateOne) RemoveCertifyVuln(c ...*CertifyVuln) *VulnerabilityIDUpdateOne

RemoveCertifyVuln removes "certify_vuln" edges to CertifyVuln entities.

func (*VulnerabilityIDUpdateOne) RemoveCertifyVulnIDs added in v0.6.0

func (viuo *VulnerabilityIDUpdateOne) RemoveCertifyVulnIDs(ids ...uuid.UUID) *VulnerabilityIDUpdateOne

RemoveCertifyVulnIDs removes the "certify_vuln" edge to CertifyVuln entities by IDs.

func (*VulnerabilityIDUpdateOne) RemoveMetadata added in v0.6.0

RemoveMetadata removes "metadata" edges to VulnerabilityMetadata entities.

func (*VulnerabilityIDUpdateOne) RemoveMetadatumIDs added in v0.6.0

func (viuo *VulnerabilityIDUpdateOne) RemoveMetadatumIDs(ids ...uuid.UUID) *VulnerabilityIDUpdateOne

RemoveMetadatumIDs removes the "metadata" edge to VulnerabilityMetadata entities by IDs.

func (*VulnerabilityIDUpdateOne) RemoveVex added in v0.6.0

RemoveVex removes "vex" edges to CertifyVex entities.

func (*VulnerabilityIDUpdateOne) RemoveVexIDs added in v0.6.0

func (viuo *VulnerabilityIDUpdateOne) RemoveVexIDs(ids ...uuid.UUID) *VulnerabilityIDUpdateOne

RemoveVexIDs removes the "vex" edge to CertifyVex entities by IDs.

func (*VulnerabilityIDUpdateOne) RemoveVulnEqualVulnA added in v0.5.0

func (viuo *VulnerabilityIDUpdateOne) RemoveVulnEqualVulnA(v ...*VulnEqual) *VulnerabilityIDUpdateOne

RemoveVulnEqualVulnA removes "vuln_equal_vuln_a" edges to VulnEqual entities.

func (*VulnerabilityIDUpdateOne) RemoveVulnEqualVulnAIDs added in v0.5.0

func (viuo *VulnerabilityIDUpdateOne) RemoveVulnEqualVulnAIDs(ids ...uuid.UUID) *VulnerabilityIDUpdateOne

RemoveVulnEqualVulnAIDs removes the "vuln_equal_vuln_a" edge to VulnEqual entities by IDs.

func (*VulnerabilityIDUpdateOne) RemoveVulnEqualVulnB added in v0.5.0

func (viuo *VulnerabilityIDUpdateOne) RemoveVulnEqualVulnB(v ...*VulnEqual) *VulnerabilityIDUpdateOne

RemoveVulnEqualVulnB removes "vuln_equal_vuln_b" edges to VulnEqual entities.

func (*VulnerabilityIDUpdateOne) RemoveVulnEqualVulnBIDs added in v0.5.0

func (viuo *VulnerabilityIDUpdateOne) RemoveVulnEqualVulnBIDs(ids ...uuid.UUID) *VulnerabilityIDUpdateOne

RemoveVulnEqualVulnBIDs removes the "vuln_equal_vuln_b" edge to VulnEqual entities by IDs.

func (*VulnerabilityIDUpdateOne) Save

Save executes the query and returns the updated VulnerabilityID entity.

func (*VulnerabilityIDUpdateOne) SaveX

SaveX is like Save, but panics if an error occurs.

func (*VulnerabilityIDUpdateOne) Select

func (viuo *VulnerabilityIDUpdateOne) Select(field string, fields ...string) *VulnerabilityIDUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*VulnerabilityIDUpdateOne) SetNillableType added in v0.5.0

func (viuo *VulnerabilityIDUpdateOne) SetNillableType(s *string) *VulnerabilityIDUpdateOne

SetNillableType sets the "type" field if the given value is not nil.

func (*VulnerabilityIDUpdateOne) SetNillableVulnerabilityID added in v0.4.0

func (viuo *VulnerabilityIDUpdateOne) SetNillableVulnerabilityID(s *string) *VulnerabilityIDUpdateOne

SetNillableVulnerabilityID sets the "vulnerability_id" field if the given value is not nil.

func (*VulnerabilityIDUpdateOne) SetType

SetType sets the "type" field.

func (*VulnerabilityIDUpdateOne) SetVulnerabilityID

func (viuo *VulnerabilityIDUpdateOne) SetVulnerabilityID(s string) *VulnerabilityIDUpdateOne

SetVulnerabilityID sets the "vulnerability_id" field.

func (*VulnerabilityIDUpdateOne) Where

Where appends a list predicates to the VulnerabilityIDUpdate builder.

type VulnerabilityIDUpsert

type VulnerabilityIDUpsert struct {
	*sql.UpdateSet
}

VulnerabilityIDUpsert is the "OnConflict" setter.

func (*VulnerabilityIDUpsert) SetType added in v0.5.0

SetType sets the "type" field.

func (*VulnerabilityIDUpsert) SetVulnerabilityID

func (u *VulnerabilityIDUpsert) SetVulnerabilityID(v string) *VulnerabilityIDUpsert

SetVulnerabilityID sets the "vulnerability_id" field.

func (*VulnerabilityIDUpsert) UpdateType added in v0.5.0

UpdateType sets the "type" field to the value that was provided on create.

func (*VulnerabilityIDUpsert) UpdateVulnerabilityID

func (u *VulnerabilityIDUpsert) UpdateVulnerabilityID() *VulnerabilityIDUpsert

UpdateVulnerabilityID sets the "vulnerability_id" field to the value that was provided on create.

type VulnerabilityIDUpsertBulk

type VulnerabilityIDUpsertBulk struct {
	// contains filtered or unexported fields
}

VulnerabilityIDUpsertBulk is the builder for "upsert"-ing a bulk of VulnerabilityID nodes.

func (*VulnerabilityIDUpsertBulk) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*VulnerabilityIDUpsertBulk) Exec

Exec executes the query.

func (*VulnerabilityIDUpsertBulk) ExecX

ExecX is like Exec, but panics if an error occurs.

func (*VulnerabilityIDUpsertBulk) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.VulnerabilityID.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*VulnerabilityIDUpsertBulk) SetType added in v0.5.0

SetType sets the "type" field.

func (*VulnerabilityIDUpsertBulk) SetVulnerabilityID

SetVulnerabilityID sets the "vulnerability_id" field.

func (*VulnerabilityIDUpsertBulk) Update

Update allows overriding fields `UPDATE` values. See the VulnerabilityIDCreateBulk.OnConflict documentation for more info.

func (*VulnerabilityIDUpsertBulk) UpdateNewValues

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.VulnerabilityID.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(vulnerabilityid.FieldID)
		}),
	).
	Exec(ctx)

func (*VulnerabilityIDUpsertBulk) UpdateType added in v0.5.0

UpdateType sets the "type" field to the value that was provided on create.

func (*VulnerabilityIDUpsertBulk) UpdateVulnerabilityID

func (u *VulnerabilityIDUpsertBulk) UpdateVulnerabilityID() *VulnerabilityIDUpsertBulk

UpdateVulnerabilityID sets the "vulnerability_id" field to the value that was provided on create.

type VulnerabilityIDUpsertOne

type VulnerabilityIDUpsertOne struct {
	// contains filtered or unexported fields
}

VulnerabilityIDUpsertOne is the builder for "upsert"-ing

one VulnerabilityID node.

func (*VulnerabilityIDUpsertOne) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*VulnerabilityIDUpsertOne) Exec

Exec executes the query.

func (*VulnerabilityIDUpsertOne) ExecX

ExecX is like Exec, but panics if an error occurs.

func (*VulnerabilityIDUpsertOne) ID

func (u *VulnerabilityIDUpsertOne) ID(ctx context.Context) (id uuid.UUID, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*VulnerabilityIDUpsertOne) IDX

IDX is like ID, but panics if an error occurs.

func (*VulnerabilityIDUpsertOne) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.VulnerabilityID.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*VulnerabilityIDUpsertOne) SetType added in v0.5.0

SetType sets the "type" field.

func (*VulnerabilityIDUpsertOne) SetVulnerabilityID

func (u *VulnerabilityIDUpsertOne) SetVulnerabilityID(v string) *VulnerabilityIDUpsertOne

SetVulnerabilityID sets the "vulnerability_id" field.

func (*VulnerabilityIDUpsertOne) Update

Update allows overriding fields `UPDATE` values. See the VulnerabilityIDCreate.OnConflict documentation for more info.

func (*VulnerabilityIDUpsertOne) UpdateNewValues

func (u *VulnerabilityIDUpsertOne) UpdateNewValues() *VulnerabilityIDUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:

client.VulnerabilityID.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(vulnerabilityid.FieldID)
		}),
	).
	Exec(ctx)

func (*VulnerabilityIDUpsertOne) UpdateType added in v0.5.0

UpdateType sets the "type" field to the value that was provided on create.

func (*VulnerabilityIDUpsertOne) UpdateVulnerabilityID

func (u *VulnerabilityIDUpsertOne) UpdateVulnerabilityID() *VulnerabilityIDUpsertOne

UpdateVulnerabilityID sets the "vulnerability_id" field to the value that was provided on create.

type VulnerabilityIDs

type VulnerabilityIDs []*VulnerabilityID

VulnerabilityIDs is a parsable slice of VulnerabilityID.

type VulnerabilityMetadata added in v0.4.0

type VulnerabilityMetadata struct {

	// ID of the ent.
	ID uuid.UUID `json:"id,omitempty"`
	// VulnerabilityIDID holds the value of the "vulnerability_id_id" field.
	VulnerabilityIDID uuid.UUID `json:"vulnerability_id_id,omitempty"`
	// ScoreType holds the value of the "score_type" field.
	ScoreType vulnerabilitymetadata.ScoreType `json:"score_type,omitempty"`
	// ScoreValue holds the value of the "score_value" field.
	ScoreValue float64 `json:"score_value,omitempty"`
	// Timestamp holds the value of the "timestamp" field.
	Timestamp time.Time `json:"timestamp,omitempty"`
	// Origin holds the value of the "origin" field.
	Origin string `json:"origin,omitempty"`
	// Collector holds the value of the "collector" field.
	Collector string `json:"collector,omitempty"`
	// DocumentRef holds the value of the "document_ref" field.
	DocumentRef string `json:"document_ref,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the VulnerabilityMetadataQuery when eager-loading is set.
	Edges VulnerabilityMetadataEdges `json:"edges"`
	// contains filtered or unexported fields
}

VulnerabilityMetadata is the model entity for the VulnerabilityMetadata schema.

func (*VulnerabilityMetadata) IsNode added in v0.4.0

func (n *VulnerabilityMetadata) IsNode()

IsNode implements the Node interface check for GQLGen.

func (*VulnerabilityMetadata) QueryVulnerabilityID added in v0.4.0

func (vm *VulnerabilityMetadata) QueryVulnerabilityID() *VulnerabilityIDQuery

QueryVulnerabilityID queries the "vulnerability_id" edge of the VulnerabilityMetadata entity.

func (*VulnerabilityMetadata) String added in v0.4.0

func (vm *VulnerabilityMetadata) String() string

String implements the fmt.Stringer.

func (*VulnerabilityMetadata) ToEdge added in v0.4.0

ToEdge converts VulnerabilityMetadata into VulnerabilityMetadataEdge.

func (*VulnerabilityMetadata) Unwrap added in v0.4.0

Unwrap unwraps the VulnerabilityMetadata entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.

func (*VulnerabilityMetadata) Update added in v0.4.0

Update returns a builder for updating this VulnerabilityMetadata. Note that you need to call VulnerabilityMetadata.Unwrap() before calling this method if this VulnerabilityMetadata was returned from a transaction, and the transaction was committed or rolled back.

func (*VulnerabilityMetadata) Value added in v0.4.0

func (vm *VulnerabilityMetadata) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the VulnerabilityMetadata. This includes values selected through modifiers, order, etc.

func (*VulnerabilityMetadata) VulnerabilityID added in v0.4.0

func (vm *VulnerabilityMetadata) VulnerabilityID(ctx context.Context) (*VulnerabilityID, error)

type VulnerabilityMetadataClient added in v0.4.0

type VulnerabilityMetadataClient struct {
	// contains filtered or unexported fields
}

VulnerabilityMetadataClient is a client for the VulnerabilityMetadata schema.

func NewVulnerabilityMetadataClient added in v0.4.0

func NewVulnerabilityMetadataClient(c config) *VulnerabilityMetadataClient

NewVulnerabilityMetadataClient returns a client for the VulnerabilityMetadata from the given config.

func (*VulnerabilityMetadataClient) Create added in v0.4.0

Create returns a builder for creating a VulnerabilityMetadata entity.

func (*VulnerabilityMetadataClient) CreateBulk added in v0.4.0

CreateBulk returns a builder for creating a bulk of VulnerabilityMetadata entities.

func (*VulnerabilityMetadataClient) Delete added in v0.4.0

Delete returns a delete builder for VulnerabilityMetadata.

func (*VulnerabilityMetadataClient) DeleteOne added in v0.4.0

DeleteOne returns a builder for deleting the given entity.

func (*VulnerabilityMetadataClient) DeleteOneID added in v0.4.0

DeleteOneID returns a builder for deleting the given entity by its id.

func (*VulnerabilityMetadataClient) Get added in v0.4.0

Get returns a VulnerabilityMetadata entity by its id.

func (*VulnerabilityMetadataClient) GetX added in v0.4.0

GetX is like Get, but panics if an error occurs.

func (*VulnerabilityMetadataClient) Hooks added in v0.4.0

func (c *VulnerabilityMetadataClient) Hooks() []Hook

Hooks returns the client hooks.

func (*VulnerabilityMetadataClient) Intercept added in v0.4.0

func (c *VulnerabilityMetadataClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `vulnerabilitymetadata.Intercept(f(g(h())))`.

func (*VulnerabilityMetadataClient) Interceptors added in v0.4.0

func (c *VulnerabilityMetadataClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*VulnerabilityMetadataClient) MapCreateBulk added in v0.4.0

MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.

func (*VulnerabilityMetadataClient) Query added in v0.4.0

Query returns a query builder for VulnerabilityMetadata.

func (*VulnerabilityMetadataClient) QueryVulnerabilityID added in v0.4.0

QueryVulnerabilityID queries the vulnerability_id edge of a VulnerabilityMetadata.

func (*VulnerabilityMetadataClient) Update added in v0.4.0

Update returns an update builder for VulnerabilityMetadata.

func (*VulnerabilityMetadataClient) UpdateOne added in v0.4.0

UpdateOne returns an update builder for the given entity.

func (*VulnerabilityMetadataClient) UpdateOneID added in v0.4.0

UpdateOneID returns an update builder for the given id.

func (*VulnerabilityMetadataClient) Use added in v0.4.0

func (c *VulnerabilityMetadataClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `vulnerabilitymetadata.Hooks(f(g(h())))`.

type VulnerabilityMetadataConnection added in v0.4.0

type VulnerabilityMetadataConnection struct {
	Edges      []*VulnerabilityMetadataEdge `json:"edges"`
	PageInfo   PageInfo                     `json:"pageInfo"`
	TotalCount int                          `json:"totalCount"`
}

VulnerabilityMetadataConnection is the connection containing edges to VulnerabilityMetadata.

type VulnerabilityMetadataCreate added in v0.4.0

type VulnerabilityMetadataCreate struct {
	// contains filtered or unexported fields
}

VulnerabilityMetadataCreate is the builder for creating a VulnerabilityMetadata entity.

func (*VulnerabilityMetadataCreate) Exec added in v0.4.0

Exec executes the query.

func (*VulnerabilityMetadataCreate) ExecX added in v0.4.0

ExecX is like Exec, but panics if an error occurs.

func (*VulnerabilityMetadataCreate) Mutation added in v0.4.0

Mutation returns the VulnerabilityMetadataMutation object of the builder.

func (*VulnerabilityMetadataCreate) OnConflict added in v0.4.0

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.VulnerabilityMetadata.Create().
	SetVulnerabilityIDID(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.VulnerabilityMetadataUpsert) {
		SetVulnerabilityIDID(v+v).
	}).
	Exec(ctx)

func (*VulnerabilityMetadataCreate) OnConflictColumns added in v0.4.0

func (vmc *VulnerabilityMetadataCreate) OnConflictColumns(columns ...string) *VulnerabilityMetadataUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.VulnerabilityMetadata.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*VulnerabilityMetadataCreate) Save added in v0.4.0

Save creates the VulnerabilityMetadata in the database.

func (*VulnerabilityMetadataCreate) SaveX added in v0.4.0

SaveX calls Save and panics if Save returns an error.

func (*VulnerabilityMetadataCreate) SetCollector added in v0.4.0

SetCollector sets the "collector" field.

func (*VulnerabilityMetadataCreate) SetDocumentRef added in v0.6.0

SetDocumentRef sets the "document_ref" field.

func (*VulnerabilityMetadataCreate) SetID added in v0.5.0

SetID sets the "id" field.

func (*VulnerabilityMetadataCreate) SetNillableID added in v0.5.0

SetNillableID sets the "id" field if the given value is not nil.

func (*VulnerabilityMetadataCreate) SetOrigin added in v0.4.0

SetOrigin sets the "origin" field.

func (*VulnerabilityMetadataCreate) SetScoreType added in v0.4.0

SetScoreType sets the "score_type" field.

func (*VulnerabilityMetadataCreate) SetScoreValue added in v0.4.0

SetScoreValue sets the "score_value" field.

func (*VulnerabilityMetadataCreate) SetTimestamp added in v0.4.0

SetTimestamp sets the "timestamp" field.

func (*VulnerabilityMetadataCreate) SetVulnerabilityID added in v0.4.0

SetVulnerabilityID sets the "vulnerability_id" edge to the VulnerabilityID entity.

func (*VulnerabilityMetadataCreate) SetVulnerabilityIDID added in v0.4.0

func (vmc *VulnerabilityMetadataCreate) SetVulnerabilityIDID(u uuid.UUID) *VulnerabilityMetadataCreate

SetVulnerabilityIDID sets the "vulnerability_id_id" field.

type VulnerabilityMetadataCreateBulk added in v0.4.0

type VulnerabilityMetadataCreateBulk struct {
	// contains filtered or unexported fields
}

VulnerabilityMetadataCreateBulk is the builder for creating many VulnerabilityMetadata entities in bulk.

func (*VulnerabilityMetadataCreateBulk) Exec added in v0.4.0

Exec executes the query.

func (*VulnerabilityMetadataCreateBulk) ExecX added in v0.4.0

ExecX is like Exec, but panics if an error occurs.

func (*VulnerabilityMetadataCreateBulk) OnConflict added in v0.4.0

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.VulnerabilityMetadata.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.VulnerabilityMetadataUpsert) {
		SetVulnerabilityIDID(v+v).
	}).
	Exec(ctx)

func (*VulnerabilityMetadataCreateBulk) OnConflictColumns added in v0.4.0

func (vmcb *VulnerabilityMetadataCreateBulk) OnConflictColumns(columns ...string) *VulnerabilityMetadataUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.VulnerabilityMetadata.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*VulnerabilityMetadataCreateBulk) Save added in v0.4.0

Save creates the VulnerabilityMetadata entities in the database.

func (*VulnerabilityMetadataCreateBulk) SaveX added in v0.4.0

SaveX is like Save, but panics if an error occurs.

type VulnerabilityMetadataDelete added in v0.4.0

type VulnerabilityMetadataDelete struct {
	// contains filtered or unexported fields
}

VulnerabilityMetadataDelete is the builder for deleting a VulnerabilityMetadata entity.

func (*VulnerabilityMetadataDelete) Exec added in v0.4.0

Exec executes the deletion query and returns how many vertices were deleted.

func (*VulnerabilityMetadataDelete) ExecX added in v0.4.0

ExecX is like Exec, but panics if an error occurs.

func (*VulnerabilityMetadataDelete) Where added in v0.4.0

Where appends a list predicates to the VulnerabilityMetadataDelete builder.

type VulnerabilityMetadataDeleteOne added in v0.4.0

type VulnerabilityMetadataDeleteOne struct {
	// contains filtered or unexported fields
}

VulnerabilityMetadataDeleteOne is the builder for deleting a single VulnerabilityMetadata entity.

func (*VulnerabilityMetadataDeleteOne) Exec added in v0.4.0

Exec executes the deletion query.

func (*VulnerabilityMetadataDeleteOne) ExecX added in v0.4.0

ExecX is like Exec, but panics if an error occurs.

func (*VulnerabilityMetadataDeleteOne) Where added in v0.4.0

Where appends a list predicates to the VulnerabilityMetadataDelete builder.

type VulnerabilityMetadataEdge added in v0.4.0

type VulnerabilityMetadataEdge struct {
	Node   *VulnerabilityMetadata `json:"node"`
	Cursor Cursor                 `json:"cursor"`
}

VulnerabilityMetadataEdge is the edge representation of VulnerabilityMetadata.

type VulnerabilityMetadataEdges added in v0.4.0

type VulnerabilityMetadataEdges struct {
	// VulnerabilityID holds the value of the vulnerability_id edge.
	VulnerabilityID *VulnerabilityID `json:"vulnerability_id,omitempty"`
	// contains filtered or unexported fields
}

VulnerabilityMetadataEdges holds the relations/edges for other nodes in the graph.

func (VulnerabilityMetadataEdges) VulnerabilityIDOrErr added in v0.4.0

func (e VulnerabilityMetadataEdges) VulnerabilityIDOrErr() (*VulnerabilityID, error)

VulnerabilityIDOrErr returns the VulnerabilityID value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type VulnerabilityMetadataGroupBy added in v0.4.0

type VulnerabilityMetadataGroupBy struct {
	// contains filtered or unexported fields
}

VulnerabilityMetadataGroupBy is the group-by builder for VulnerabilityMetadata entities.

func (*VulnerabilityMetadataGroupBy) Aggregate added in v0.4.0

Aggregate adds the given aggregation functions to the group-by query.

func (*VulnerabilityMetadataGroupBy) Bool added in v0.4.0

func (s *VulnerabilityMetadataGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*VulnerabilityMetadataGroupBy) BoolX added in v0.4.0

func (s *VulnerabilityMetadataGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*VulnerabilityMetadataGroupBy) Bools added in v0.4.0

func (s *VulnerabilityMetadataGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*VulnerabilityMetadataGroupBy) BoolsX added in v0.4.0

func (s *VulnerabilityMetadataGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*VulnerabilityMetadataGroupBy) Float64 added in v0.4.0

func (s *VulnerabilityMetadataGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*VulnerabilityMetadataGroupBy) Float64X added in v0.4.0

func (s *VulnerabilityMetadataGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*VulnerabilityMetadataGroupBy) Float64s added in v0.4.0

func (s *VulnerabilityMetadataGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*VulnerabilityMetadataGroupBy) Float64sX added in v0.4.0

func (s *VulnerabilityMetadataGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*VulnerabilityMetadataGroupBy) Int added in v0.4.0

func (s *VulnerabilityMetadataGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*VulnerabilityMetadataGroupBy) IntX added in v0.4.0

func (s *VulnerabilityMetadataGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*VulnerabilityMetadataGroupBy) Ints added in v0.4.0

func (s *VulnerabilityMetadataGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*VulnerabilityMetadataGroupBy) IntsX added in v0.4.0

func (s *VulnerabilityMetadataGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*VulnerabilityMetadataGroupBy) Scan added in v0.4.0

Scan applies the selector query and scans the result into the given value.

func (*VulnerabilityMetadataGroupBy) ScanX added in v0.4.0

func (s *VulnerabilityMetadataGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*VulnerabilityMetadataGroupBy) String added in v0.4.0

func (s *VulnerabilityMetadataGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*VulnerabilityMetadataGroupBy) StringX added in v0.4.0

func (s *VulnerabilityMetadataGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*VulnerabilityMetadataGroupBy) Strings added in v0.4.0

func (s *VulnerabilityMetadataGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*VulnerabilityMetadataGroupBy) StringsX added in v0.4.0

func (s *VulnerabilityMetadataGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type VulnerabilityMetadataMutation added in v0.4.0

type VulnerabilityMetadataMutation struct {
	// contains filtered or unexported fields
}

VulnerabilityMetadataMutation represents an operation that mutates the VulnerabilityMetadata nodes in the graph.

func (*VulnerabilityMetadataMutation) AddField added in v0.4.0

func (m *VulnerabilityMetadataMutation) AddField(name string, value ent.Value) error

AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*VulnerabilityMetadataMutation) AddScoreValue added in v0.4.0

func (m *VulnerabilityMetadataMutation) AddScoreValue(f float64)

AddScoreValue adds f to the "score_value" field.

func (*VulnerabilityMetadataMutation) AddedEdges added in v0.4.0

func (m *VulnerabilityMetadataMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*VulnerabilityMetadataMutation) AddedField added in v0.4.0

func (m *VulnerabilityMetadataMutation) AddedField(name string) (ent.Value, bool)

AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*VulnerabilityMetadataMutation) AddedFields added in v0.4.0

func (m *VulnerabilityMetadataMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*VulnerabilityMetadataMutation) AddedIDs added in v0.4.0

func (m *VulnerabilityMetadataMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*VulnerabilityMetadataMutation) AddedScoreValue added in v0.4.0

func (m *VulnerabilityMetadataMutation) AddedScoreValue() (r float64, exists bool)

AddedScoreValue returns the value that was added to the "score_value" field in this mutation.

func (*VulnerabilityMetadataMutation) ClearEdge added in v0.4.0

func (m *VulnerabilityMetadataMutation) ClearEdge(name string) error

ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.

func (*VulnerabilityMetadataMutation) ClearField added in v0.4.0

func (m *VulnerabilityMetadataMutation) ClearField(name string) error

ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.

func (*VulnerabilityMetadataMutation) ClearVulnerabilityID added in v0.4.0

func (m *VulnerabilityMetadataMutation) ClearVulnerabilityID()

ClearVulnerabilityID clears the "vulnerability_id" edge to the VulnerabilityID entity.

func (*VulnerabilityMetadataMutation) ClearedEdges added in v0.4.0

func (m *VulnerabilityMetadataMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*VulnerabilityMetadataMutation) ClearedFields added in v0.4.0

func (m *VulnerabilityMetadataMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (VulnerabilityMetadataMutation) Client added in v0.4.0

Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.

func (*VulnerabilityMetadataMutation) Collector added in v0.4.0

func (m *VulnerabilityMetadataMutation) Collector() (r string, exists bool)

Collector returns the value of the "collector" field in the mutation.

func (*VulnerabilityMetadataMutation) DocumentRef added in v0.6.0

func (m *VulnerabilityMetadataMutation) DocumentRef() (r string, exists bool)

DocumentRef returns the value of the "document_ref" field in the mutation.

func (*VulnerabilityMetadataMutation) EdgeCleared added in v0.4.0

func (m *VulnerabilityMetadataMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*VulnerabilityMetadataMutation) Field added in v0.4.0

Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*VulnerabilityMetadataMutation) FieldCleared added in v0.4.0

func (m *VulnerabilityMetadataMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*VulnerabilityMetadataMutation) Fields added in v0.4.0

func (m *VulnerabilityMetadataMutation) Fields() []string

Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().

func (*VulnerabilityMetadataMutation) ID added in v0.4.0

func (m *VulnerabilityMetadataMutation) ID() (id uuid.UUID, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*VulnerabilityMetadataMutation) IDs added in v0.4.0

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*VulnerabilityMetadataMutation) OldCollector added in v0.4.0

func (m *VulnerabilityMetadataMutation) OldCollector(ctx context.Context) (v string, err error)

OldCollector returns the old "collector" field's value of the VulnerabilityMetadata entity. If the VulnerabilityMetadata object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*VulnerabilityMetadataMutation) OldDocumentRef added in v0.6.0

func (m *VulnerabilityMetadataMutation) OldDocumentRef(ctx context.Context) (v string, err error)

OldDocumentRef returns the old "document_ref" field's value of the VulnerabilityMetadata entity. If the VulnerabilityMetadata object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*VulnerabilityMetadataMutation) OldField added in v0.4.0

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*VulnerabilityMetadataMutation) OldOrigin added in v0.4.0

func (m *VulnerabilityMetadataMutation) OldOrigin(ctx context.Context) (v string, err error)

OldOrigin returns the old "origin" field's value of the VulnerabilityMetadata entity. If the VulnerabilityMetadata object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*VulnerabilityMetadataMutation) OldScoreType added in v0.4.0

OldScoreType returns the old "score_type" field's value of the VulnerabilityMetadata entity. If the VulnerabilityMetadata object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*VulnerabilityMetadataMutation) OldScoreValue added in v0.4.0

func (m *VulnerabilityMetadataMutation) OldScoreValue(ctx context.Context) (v float64, err error)

OldScoreValue returns the old "score_value" field's value of the VulnerabilityMetadata entity. If the VulnerabilityMetadata object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*VulnerabilityMetadataMutation) OldTimestamp added in v0.4.0

func (m *VulnerabilityMetadataMutation) OldTimestamp(ctx context.Context) (v time.Time, err error)

OldTimestamp returns the old "timestamp" field's value of the VulnerabilityMetadata entity. If the VulnerabilityMetadata object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*VulnerabilityMetadataMutation) OldVulnerabilityIDID added in v0.4.0

func (m *VulnerabilityMetadataMutation) OldVulnerabilityIDID(ctx context.Context) (v uuid.UUID, err error)

OldVulnerabilityIDID returns the old "vulnerability_id_id" field's value of the VulnerabilityMetadata entity. If the VulnerabilityMetadata object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*VulnerabilityMetadataMutation) Op added in v0.4.0

Op returns the operation name.

func (*VulnerabilityMetadataMutation) Origin added in v0.4.0

func (m *VulnerabilityMetadataMutation) Origin() (r string, exists bool)

Origin returns the value of the "origin" field in the mutation.

func (*VulnerabilityMetadataMutation) RemovedEdges added in v0.4.0

func (m *VulnerabilityMetadataMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*VulnerabilityMetadataMutation) RemovedIDs added in v0.4.0

func (m *VulnerabilityMetadataMutation) RemovedIDs(name string) []ent.Value

RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.

func (*VulnerabilityMetadataMutation) ResetCollector added in v0.4.0

func (m *VulnerabilityMetadataMutation) ResetCollector()

ResetCollector resets all changes to the "collector" field.

func (*VulnerabilityMetadataMutation) ResetDocumentRef added in v0.6.0

func (m *VulnerabilityMetadataMutation) ResetDocumentRef()

ResetDocumentRef resets all changes to the "document_ref" field.

func (*VulnerabilityMetadataMutation) ResetEdge added in v0.4.0

func (m *VulnerabilityMetadataMutation) ResetEdge(name string) error

ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.

func (*VulnerabilityMetadataMutation) ResetField added in v0.4.0

func (m *VulnerabilityMetadataMutation) ResetField(name string) error

ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.

func (*VulnerabilityMetadataMutation) ResetOrigin added in v0.4.0

func (m *VulnerabilityMetadataMutation) ResetOrigin()

ResetOrigin resets all changes to the "origin" field.

func (*VulnerabilityMetadataMutation) ResetScoreType added in v0.4.0

func (m *VulnerabilityMetadataMutation) ResetScoreType()

ResetScoreType resets all changes to the "score_type" field.

func (*VulnerabilityMetadataMutation) ResetScoreValue added in v0.4.0

func (m *VulnerabilityMetadataMutation) ResetScoreValue()

ResetScoreValue resets all changes to the "score_value" field.

func (*VulnerabilityMetadataMutation) ResetTimestamp added in v0.4.0

func (m *VulnerabilityMetadataMutation) ResetTimestamp()

ResetTimestamp resets all changes to the "timestamp" field.

func (*VulnerabilityMetadataMutation) ResetVulnerabilityID added in v0.4.0

func (m *VulnerabilityMetadataMutation) ResetVulnerabilityID()

ResetVulnerabilityID resets all changes to the "vulnerability_id" edge.

func (*VulnerabilityMetadataMutation) ResetVulnerabilityIDID added in v0.4.0

func (m *VulnerabilityMetadataMutation) ResetVulnerabilityIDID()

ResetVulnerabilityIDID resets all changes to the "vulnerability_id_id" field.

func (*VulnerabilityMetadataMutation) ScoreType added in v0.4.0

ScoreType returns the value of the "score_type" field in the mutation.

func (*VulnerabilityMetadataMutation) ScoreValue added in v0.4.0

func (m *VulnerabilityMetadataMutation) ScoreValue() (r float64, exists bool)

ScoreValue returns the value of the "score_value" field in the mutation.

func (*VulnerabilityMetadataMutation) SetCollector added in v0.4.0

func (m *VulnerabilityMetadataMutation) SetCollector(s string)

SetCollector sets the "collector" field.

func (*VulnerabilityMetadataMutation) SetDocumentRef added in v0.6.0

func (m *VulnerabilityMetadataMutation) SetDocumentRef(s string)

SetDocumentRef sets the "document_ref" field.

func (*VulnerabilityMetadataMutation) SetField added in v0.4.0

func (m *VulnerabilityMetadataMutation) SetField(name string, value ent.Value) error

SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*VulnerabilityMetadataMutation) SetID added in v0.5.0

SetID sets the value of the id field. Note that this operation is only accepted on creation of VulnerabilityMetadata entities.

func (*VulnerabilityMetadataMutation) SetOp added in v0.4.0

func (m *VulnerabilityMetadataMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*VulnerabilityMetadataMutation) SetOrigin added in v0.4.0

func (m *VulnerabilityMetadataMutation) SetOrigin(s string)

SetOrigin sets the "origin" field.

func (*VulnerabilityMetadataMutation) SetScoreType added in v0.4.0

SetScoreType sets the "score_type" field.

func (*VulnerabilityMetadataMutation) SetScoreValue added in v0.4.0

func (m *VulnerabilityMetadataMutation) SetScoreValue(f float64)

SetScoreValue sets the "score_value" field.

func (*VulnerabilityMetadataMutation) SetTimestamp added in v0.4.0

func (m *VulnerabilityMetadataMutation) SetTimestamp(t time.Time)

SetTimestamp sets the "timestamp" field.

func (*VulnerabilityMetadataMutation) SetVulnerabilityIDID added in v0.4.0

func (m *VulnerabilityMetadataMutation) SetVulnerabilityIDID(u uuid.UUID)

SetVulnerabilityIDID sets the "vulnerability_id_id" field.

func (*VulnerabilityMetadataMutation) Timestamp added in v0.4.0

func (m *VulnerabilityMetadataMutation) Timestamp() (r time.Time, exists bool)

Timestamp returns the value of the "timestamp" field in the mutation.

func (VulnerabilityMetadataMutation) Tx added in v0.4.0

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*VulnerabilityMetadataMutation) Type added in v0.4.0

Type returns the node type of this mutation (VulnerabilityMetadata).

func (*VulnerabilityMetadataMutation) VulnerabilityIDCleared added in v0.4.0

func (m *VulnerabilityMetadataMutation) VulnerabilityIDCleared() bool

VulnerabilityIDCleared reports if the "vulnerability_id" edge to the VulnerabilityID entity was cleared.

func (*VulnerabilityMetadataMutation) VulnerabilityIDID added in v0.4.0

func (m *VulnerabilityMetadataMutation) VulnerabilityIDID() (r uuid.UUID, exists bool)

VulnerabilityIDID returns the value of the "vulnerability_id_id" field in the mutation.

func (*VulnerabilityMetadataMutation) VulnerabilityIDIDs added in v0.4.0

func (m *VulnerabilityMetadataMutation) VulnerabilityIDIDs() (ids []uuid.UUID)

VulnerabilityIDIDs returns the "vulnerability_id" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use VulnerabilityIDID instead. It exists only for internal usage by the builders.

func (*VulnerabilityMetadataMutation) Where added in v0.4.0

Where appends a list predicates to the VulnerabilityMetadataMutation builder.

func (*VulnerabilityMetadataMutation) WhereP added in v0.4.0

func (m *VulnerabilityMetadataMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the VulnerabilityMetadataMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type VulnerabilityMetadataOrder added in v0.4.0

type VulnerabilityMetadataOrder struct {
	Direction OrderDirection                   `json:"direction"`
	Field     *VulnerabilityMetadataOrderField `json:"field"`
}

VulnerabilityMetadataOrder defines the ordering of VulnerabilityMetadata.

type VulnerabilityMetadataOrderField added in v0.4.0

type VulnerabilityMetadataOrderField struct {
	// Value extracts the ordering value from the given VulnerabilityMetadata.
	Value func(*VulnerabilityMetadata) (ent.Value, error)
	// contains filtered or unexported fields
}

VulnerabilityMetadataOrderField defines the ordering field of VulnerabilityMetadata.

type VulnerabilityMetadataPaginateOption added in v0.4.0

type VulnerabilityMetadataPaginateOption func(*vulnerabilitymetadataPager) error

VulnerabilityMetadataPaginateOption enables pagination customization.

func WithVulnerabilityMetadataFilter added in v0.4.0

WithVulnerabilityMetadataFilter configures pagination filter.

func WithVulnerabilityMetadataOrder added in v0.4.0

func WithVulnerabilityMetadataOrder(order *VulnerabilityMetadataOrder) VulnerabilityMetadataPaginateOption

WithVulnerabilityMetadataOrder configures pagination ordering.

type VulnerabilityMetadataQuery added in v0.4.0

type VulnerabilityMetadataQuery struct {
	// contains filtered or unexported fields
}

VulnerabilityMetadataQuery is the builder for querying VulnerabilityMetadata entities.

func (*VulnerabilityMetadataQuery) Aggregate added in v0.4.0

Aggregate returns a VulnerabilityMetadataSelect configured with the given aggregations.

func (*VulnerabilityMetadataQuery) All added in v0.4.0

All executes the query and returns a list of VulnerabilityMetadataSlice.

func (*VulnerabilityMetadataQuery) AllX added in v0.4.0

AllX is like All, but panics if an error occurs.

func (*VulnerabilityMetadataQuery) Clone added in v0.4.0

Clone returns a duplicate of the VulnerabilityMetadataQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*VulnerabilityMetadataQuery) CollectFields added in v0.4.0

func (vm *VulnerabilityMetadataQuery) CollectFields(ctx context.Context, satisfies ...string) (*VulnerabilityMetadataQuery, error)

CollectFields tells the query-builder to eagerly load connected nodes by resolver context.

func (*VulnerabilityMetadataQuery) Count added in v0.4.0

func (vmq *VulnerabilityMetadataQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*VulnerabilityMetadataQuery) CountX added in v0.4.0

func (vmq *VulnerabilityMetadataQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*VulnerabilityMetadataQuery) Exist added in v0.4.0

Exist returns true if the query has elements in the graph.

func (*VulnerabilityMetadataQuery) ExistX added in v0.4.0

ExistX is like Exist, but panics if an error occurs.

func (*VulnerabilityMetadataQuery) First added in v0.4.0

First returns the first VulnerabilityMetadata entity from the query. Returns a *NotFoundError when no VulnerabilityMetadata was found.

func (*VulnerabilityMetadataQuery) FirstID added in v0.4.0

func (vmq *VulnerabilityMetadataQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)

FirstID returns the first VulnerabilityMetadata ID from the query. Returns a *NotFoundError when no VulnerabilityMetadata ID was found.

func (*VulnerabilityMetadataQuery) FirstIDX added in v0.4.0

func (vmq *VulnerabilityMetadataQuery) FirstIDX(ctx context.Context) uuid.UUID

FirstIDX is like FirstID, but panics if an error occurs.

func (*VulnerabilityMetadataQuery) FirstX added in v0.4.0

FirstX is like First, but panics if an error occurs.

func (*VulnerabilityMetadataQuery) GroupBy added in v0.4.0

func (vmq *VulnerabilityMetadataQuery) GroupBy(field string, fields ...string) *VulnerabilityMetadataGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	VulnerabilityIDID uuid.UUID `json:"vulnerability_id_id,omitempty"`
	Count int `json:"count,omitempty"`
}

client.VulnerabilityMetadata.Query().
	GroupBy(vulnerabilitymetadata.FieldVulnerabilityIDID).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*VulnerabilityMetadataQuery) IDs added in v0.4.0

func (vmq *VulnerabilityMetadataQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)

IDs executes the query and returns a list of VulnerabilityMetadata IDs.

func (*VulnerabilityMetadataQuery) IDsX added in v0.4.0

IDsX is like IDs, but panics if an error occurs.

func (*VulnerabilityMetadataQuery) Limit added in v0.4.0

Limit the number of records to be returned by this query.

func (*VulnerabilityMetadataQuery) Offset added in v0.4.0

Offset to start from.

func (*VulnerabilityMetadataQuery) Only added in v0.4.0

Only returns a single VulnerabilityMetadata entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one VulnerabilityMetadata entity is found. Returns a *NotFoundError when no VulnerabilityMetadata entities are found.

func (*VulnerabilityMetadataQuery) OnlyID added in v0.4.0

func (vmq *VulnerabilityMetadataQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)

OnlyID is like Only, but returns the only VulnerabilityMetadata ID in the query. Returns a *NotSingularError when more than one VulnerabilityMetadata ID is found. Returns a *NotFoundError when no entities are found.

func (*VulnerabilityMetadataQuery) OnlyIDX added in v0.4.0

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*VulnerabilityMetadataQuery) OnlyX added in v0.4.0

OnlyX is like Only, but panics if an error occurs.

func (*VulnerabilityMetadataQuery) Order added in v0.4.0

Order specifies how the records should be ordered.

func (*VulnerabilityMetadataQuery) Paginate added in v0.4.0

Paginate executes the query and returns a relay based cursor connection to VulnerabilityMetadata.

func (*VulnerabilityMetadataQuery) QueryVulnerabilityID added in v0.4.0

func (vmq *VulnerabilityMetadataQuery) QueryVulnerabilityID() *VulnerabilityIDQuery

QueryVulnerabilityID chains the current query on the "vulnerability_id" edge.

func (*VulnerabilityMetadataQuery) Select added in v0.4.0

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	VulnerabilityIDID uuid.UUID `json:"vulnerability_id_id,omitempty"`
}

client.VulnerabilityMetadata.Query().
	Select(vulnerabilitymetadata.FieldVulnerabilityIDID).
	Scan(ctx, &v)

func (*VulnerabilityMetadataQuery) Unique added in v0.4.0

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*VulnerabilityMetadataQuery) Where added in v0.4.0

Where adds a new predicate for the VulnerabilityMetadataQuery builder.

func (*VulnerabilityMetadataQuery) WithVulnerabilityID added in v0.4.0

func (vmq *VulnerabilityMetadataQuery) WithVulnerabilityID(opts ...func(*VulnerabilityIDQuery)) *VulnerabilityMetadataQuery

WithVulnerabilityID tells the query-builder to eager-load the nodes that are connected to the "vulnerability_id" edge. The optional arguments are used to configure the query builder of the edge.

type VulnerabilityMetadataSelect added in v0.4.0

type VulnerabilityMetadataSelect struct {
	*VulnerabilityMetadataQuery
	// contains filtered or unexported fields
}

VulnerabilityMetadataSelect is the builder for selecting fields of VulnerabilityMetadata entities.

func (*VulnerabilityMetadataSelect) Aggregate added in v0.4.0

Aggregate adds the given aggregation functions to the selector query.

func (*VulnerabilityMetadataSelect) Bool added in v0.4.0

func (s *VulnerabilityMetadataSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*VulnerabilityMetadataSelect) BoolX added in v0.4.0

func (s *VulnerabilityMetadataSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*VulnerabilityMetadataSelect) Bools added in v0.4.0

func (s *VulnerabilityMetadataSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*VulnerabilityMetadataSelect) BoolsX added in v0.4.0

func (s *VulnerabilityMetadataSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*VulnerabilityMetadataSelect) Float64 added in v0.4.0

func (s *VulnerabilityMetadataSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*VulnerabilityMetadataSelect) Float64X added in v0.4.0

func (s *VulnerabilityMetadataSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*VulnerabilityMetadataSelect) Float64s added in v0.4.0

func (s *VulnerabilityMetadataSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*VulnerabilityMetadataSelect) Float64sX added in v0.4.0

func (s *VulnerabilityMetadataSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*VulnerabilityMetadataSelect) Int added in v0.4.0

func (s *VulnerabilityMetadataSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*VulnerabilityMetadataSelect) IntX added in v0.4.0

func (s *VulnerabilityMetadataSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*VulnerabilityMetadataSelect) Ints added in v0.4.0

func (s *VulnerabilityMetadataSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*VulnerabilityMetadataSelect) IntsX added in v0.4.0

func (s *VulnerabilityMetadataSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*VulnerabilityMetadataSelect) Scan added in v0.4.0

Scan applies the selector query and scans the result into the given value.

func (*VulnerabilityMetadataSelect) ScanX added in v0.4.0

func (s *VulnerabilityMetadataSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*VulnerabilityMetadataSelect) String added in v0.4.0

func (s *VulnerabilityMetadataSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*VulnerabilityMetadataSelect) StringX added in v0.4.0

func (s *VulnerabilityMetadataSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*VulnerabilityMetadataSelect) Strings added in v0.4.0

func (s *VulnerabilityMetadataSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*VulnerabilityMetadataSelect) StringsX added in v0.4.0

func (s *VulnerabilityMetadataSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type VulnerabilityMetadataSlice added in v0.4.0

type VulnerabilityMetadataSlice []*VulnerabilityMetadata

VulnerabilityMetadataSlice is a parsable slice of VulnerabilityMetadata.

type VulnerabilityMetadataUpdate added in v0.4.0

type VulnerabilityMetadataUpdate struct {
	// contains filtered or unexported fields
}

VulnerabilityMetadataUpdate is the builder for updating VulnerabilityMetadata entities.

func (*VulnerabilityMetadataUpdate) AddScoreValue added in v0.4.0

AddScoreValue adds f to the "score_value" field.

func (*VulnerabilityMetadataUpdate) ClearVulnerabilityID added in v0.4.0

func (vmu *VulnerabilityMetadataUpdate) ClearVulnerabilityID() *VulnerabilityMetadataUpdate

ClearVulnerabilityID clears the "vulnerability_id" edge to the VulnerabilityID entity.

func (*VulnerabilityMetadataUpdate) Exec added in v0.4.0

Exec executes the query.

func (*VulnerabilityMetadataUpdate) ExecX added in v0.4.0

ExecX is like Exec, but panics if an error occurs.

func (*VulnerabilityMetadataUpdate) Mutation added in v0.4.0

Mutation returns the VulnerabilityMetadataMutation object of the builder.

func (*VulnerabilityMetadataUpdate) Save added in v0.4.0

Save executes the query and returns the number of nodes affected by the update operation.

func (*VulnerabilityMetadataUpdate) SaveX added in v0.4.0

SaveX is like Save, but panics if an error occurs.

func (*VulnerabilityMetadataUpdate) SetCollector added in v0.4.0

SetCollector sets the "collector" field.

func (*VulnerabilityMetadataUpdate) SetDocumentRef added in v0.6.0

SetDocumentRef sets the "document_ref" field.

func (*VulnerabilityMetadataUpdate) SetNillableCollector added in v0.4.0

func (vmu *VulnerabilityMetadataUpdate) SetNillableCollector(s *string) *VulnerabilityMetadataUpdate

SetNillableCollector sets the "collector" field if the given value is not nil.

func (*VulnerabilityMetadataUpdate) SetNillableDocumentRef added in v0.6.0

func (vmu *VulnerabilityMetadataUpdate) SetNillableDocumentRef(s *string) *VulnerabilityMetadataUpdate

SetNillableDocumentRef sets the "document_ref" field if the given value is not nil.

func (*VulnerabilityMetadataUpdate) SetNillableOrigin added in v0.4.0

SetNillableOrigin sets the "origin" field if the given value is not nil.

func (*VulnerabilityMetadataUpdate) SetNillableScoreType added in v0.4.0

SetNillableScoreType sets the "score_type" field if the given value is not nil.

func (*VulnerabilityMetadataUpdate) SetNillableScoreValue added in v0.4.0

func (vmu *VulnerabilityMetadataUpdate) SetNillableScoreValue(f *float64) *VulnerabilityMetadataUpdate

SetNillableScoreValue sets the "score_value" field if the given value is not nil.

func (*VulnerabilityMetadataUpdate) SetNillableTimestamp added in v0.4.0

func (vmu *VulnerabilityMetadataUpdate) SetNillableTimestamp(t *time.Time) *VulnerabilityMetadataUpdate

SetNillableTimestamp sets the "timestamp" field if the given value is not nil.

func (*VulnerabilityMetadataUpdate) SetNillableVulnerabilityIDID added in v0.4.0

func (vmu *VulnerabilityMetadataUpdate) SetNillableVulnerabilityIDID(u *uuid.UUID) *VulnerabilityMetadataUpdate

SetNillableVulnerabilityIDID sets the "vulnerability_id_id" field if the given value is not nil.

func (*VulnerabilityMetadataUpdate) SetOrigin added in v0.4.0

SetOrigin sets the "origin" field.

func (*VulnerabilityMetadataUpdate) SetScoreType added in v0.4.0

SetScoreType sets the "score_type" field.

func (*VulnerabilityMetadataUpdate) SetScoreValue added in v0.4.0

SetScoreValue sets the "score_value" field.

func (*VulnerabilityMetadataUpdate) SetTimestamp added in v0.4.0

SetTimestamp sets the "timestamp" field.

func (*VulnerabilityMetadataUpdate) SetVulnerabilityID added in v0.4.0

SetVulnerabilityID sets the "vulnerability_id" edge to the VulnerabilityID entity.

func (*VulnerabilityMetadataUpdate) SetVulnerabilityIDID added in v0.4.0

func (vmu *VulnerabilityMetadataUpdate) SetVulnerabilityIDID(u uuid.UUID) *VulnerabilityMetadataUpdate

SetVulnerabilityIDID sets the "vulnerability_id_id" field.

func (*VulnerabilityMetadataUpdate) Where added in v0.4.0

Where appends a list predicates to the VulnerabilityMetadataUpdate builder.

type VulnerabilityMetadataUpdateOne added in v0.4.0

type VulnerabilityMetadataUpdateOne struct {
	// contains filtered or unexported fields
}

VulnerabilityMetadataUpdateOne is the builder for updating a single VulnerabilityMetadata entity.

func (*VulnerabilityMetadataUpdateOne) AddScoreValue added in v0.4.0

AddScoreValue adds f to the "score_value" field.

func (*VulnerabilityMetadataUpdateOne) ClearVulnerabilityID added in v0.4.0

func (vmuo *VulnerabilityMetadataUpdateOne) ClearVulnerabilityID() *VulnerabilityMetadataUpdateOne

ClearVulnerabilityID clears the "vulnerability_id" edge to the VulnerabilityID entity.

func (*VulnerabilityMetadataUpdateOne) Exec added in v0.4.0

Exec executes the query on the entity.

func (*VulnerabilityMetadataUpdateOne) ExecX added in v0.4.0

ExecX is like Exec, but panics if an error occurs.

func (*VulnerabilityMetadataUpdateOne) Mutation added in v0.4.0

Mutation returns the VulnerabilityMetadataMutation object of the builder.

func (*VulnerabilityMetadataUpdateOne) Save added in v0.4.0

Save executes the query and returns the updated VulnerabilityMetadata entity.

func (*VulnerabilityMetadataUpdateOne) SaveX added in v0.4.0

SaveX is like Save, but panics if an error occurs.

func (*VulnerabilityMetadataUpdateOne) Select added in v0.4.0

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*VulnerabilityMetadataUpdateOne) SetCollector added in v0.4.0

SetCollector sets the "collector" field.

func (*VulnerabilityMetadataUpdateOne) SetDocumentRef added in v0.6.0

SetDocumentRef sets the "document_ref" field.

func (*VulnerabilityMetadataUpdateOne) SetNillableCollector added in v0.4.0

SetNillableCollector sets the "collector" field if the given value is not nil.

func (*VulnerabilityMetadataUpdateOne) SetNillableDocumentRef added in v0.6.0

func (vmuo *VulnerabilityMetadataUpdateOne) SetNillableDocumentRef(s *string) *VulnerabilityMetadataUpdateOne

SetNillableDocumentRef sets the "document_ref" field if the given value is not nil.

func (*VulnerabilityMetadataUpdateOne) SetNillableOrigin added in v0.4.0

SetNillableOrigin sets the "origin" field if the given value is not nil.

func (*VulnerabilityMetadataUpdateOne) SetNillableScoreType added in v0.4.0

SetNillableScoreType sets the "score_type" field if the given value is not nil.

func (*VulnerabilityMetadataUpdateOne) SetNillableScoreValue added in v0.4.0

SetNillableScoreValue sets the "score_value" field if the given value is not nil.

func (*VulnerabilityMetadataUpdateOne) SetNillableTimestamp added in v0.4.0

SetNillableTimestamp sets the "timestamp" field if the given value is not nil.

func (*VulnerabilityMetadataUpdateOne) SetNillableVulnerabilityIDID added in v0.4.0

func (vmuo *VulnerabilityMetadataUpdateOne) SetNillableVulnerabilityIDID(u *uuid.UUID) *VulnerabilityMetadataUpdateOne

SetNillableVulnerabilityIDID sets the "vulnerability_id_id" field if the given value is not nil.

func (*VulnerabilityMetadataUpdateOne) SetOrigin added in v0.4.0

SetOrigin sets the "origin" field.

func (*VulnerabilityMetadataUpdateOne) SetScoreType added in v0.4.0

SetScoreType sets the "score_type" field.

func (*VulnerabilityMetadataUpdateOne) SetScoreValue added in v0.4.0

SetScoreValue sets the "score_value" field.

func (*VulnerabilityMetadataUpdateOne) SetTimestamp added in v0.4.0

SetTimestamp sets the "timestamp" field.

func (*VulnerabilityMetadataUpdateOne) SetVulnerabilityID added in v0.4.0

SetVulnerabilityID sets the "vulnerability_id" edge to the VulnerabilityID entity.

func (*VulnerabilityMetadataUpdateOne) SetVulnerabilityIDID added in v0.4.0

SetVulnerabilityIDID sets the "vulnerability_id_id" field.

func (*VulnerabilityMetadataUpdateOne) Where added in v0.4.0

Where appends a list predicates to the VulnerabilityMetadataUpdate builder.

type VulnerabilityMetadataUpsert added in v0.4.0

type VulnerabilityMetadataUpsert struct {
	*sql.UpdateSet
}

VulnerabilityMetadataUpsert is the "OnConflict" setter.

func (*VulnerabilityMetadataUpsert) AddScoreValue added in v0.4.0

AddScoreValue adds v to the "score_value" field.

func (*VulnerabilityMetadataUpsert) SetCollector added in v0.4.0

SetCollector sets the "collector" field.

func (*VulnerabilityMetadataUpsert) SetDocumentRef added in v0.6.0

SetDocumentRef sets the "document_ref" field.

func (*VulnerabilityMetadataUpsert) SetOrigin added in v0.4.0

SetOrigin sets the "origin" field.

func (*VulnerabilityMetadataUpsert) SetScoreType added in v0.4.0

SetScoreType sets the "score_type" field.

func (*VulnerabilityMetadataUpsert) SetScoreValue added in v0.4.0

SetScoreValue sets the "score_value" field.

func (*VulnerabilityMetadataUpsert) SetTimestamp added in v0.4.0

SetTimestamp sets the "timestamp" field.

func (*VulnerabilityMetadataUpsert) SetVulnerabilityIDID added in v0.4.0

SetVulnerabilityIDID sets the "vulnerability_id_id" field.

func (*VulnerabilityMetadataUpsert) UpdateCollector added in v0.4.0

UpdateCollector sets the "collector" field to the value that was provided on create.

func (*VulnerabilityMetadataUpsert) UpdateDocumentRef added in v0.6.0

UpdateDocumentRef sets the "document_ref" field to the value that was provided on create.

func (*VulnerabilityMetadataUpsert) UpdateOrigin added in v0.4.0

UpdateOrigin sets the "origin" field to the value that was provided on create.

func (*VulnerabilityMetadataUpsert) UpdateScoreType added in v0.4.0

UpdateScoreType sets the "score_type" field to the value that was provided on create.

func (*VulnerabilityMetadataUpsert) UpdateScoreValue added in v0.4.0

UpdateScoreValue sets the "score_value" field to the value that was provided on create.

func (*VulnerabilityMetadataUpsert) UpdateTimestamp added in v0.4.0

UpdateTimestamp sets the "timestamp" field to the value that was provided on create.

func (*VulnerabilityMetadataUpsert) UpdateVulnerabilityIDID added in v0.4.0

func (u *VulnerabilityMetadataUpsert) UpdateVulnerabilityIDID() *VulnerabilityMetadataUpsert

UpdateVulnerabilityIDID sets the "vulnerability_id_id" field to the value that was provided on create.

type VulnerabilityMetadataUpsertBulk added in v0.4.0

type VulnerabilityMetadataUpsertBulk struct {
	// contains filtered or unexported fields
}

VulnerabilityMetadataUpsertBulk is the builder for "upsert"-ing a bulk of VulnerabilityMetadata nodes.

func (*VulnerabilityMetadataUpsertBulk) AddScoreValue added in v0.4.0

AddScoreValue adds v to the "score_value" field.

func (*VulnerabilityMetadataUpsertBulk) DoNothing added in v0.4.0

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*VulnerabilityMetadataUpsertBulk) Exec added in v0.4.0

Exec executes the query.

func (*VulnerabilityMetadataUpsertBulk) ExecX added in v0.4.0

ExecX is like Exec, but panics if an error occurs.

func (*VulnerabilityMetadataUpsertBulk) Ignore added in v0.4.0

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.VulnerabilityMetadata.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*VulnerabilityMetadataUpsertBulk) SetCollector added in v0.4.0

SetCollector sets the "collector" field.

func (*VulnerabilityMetadataUpsertBulk) SetDocumentRef added in v0.6.0

SetDocumentRef sets the "document_ref" field.

func (*VulnerabilityMetadataUpsertBulk) SetOrigin added in v0.4.0

SetOrigin sets the "origin" field.

func (*VulnerabilityMetadataUpsertBulk) SetScoreType added in v0.4.0

SetScoreType sets the "score_type" field.

func (*VulnerabilityMetadataUpsertBulk) SetScoreValue added in v0.4.0

SetScoreValue sets the "score_value" field.

func (*VulnerabilityMetadataUpsertBulk) SetTimestamp added in v0.4.0

SetTimestamp sets the "timestamp" field.

func (*VulnerabilityMetadataUpsertBulk) SetVulnerabilityIDID added in v0.4.0

SetVulnerabilityIDID sets the "vulnerability_id_id" field.

func (*VulnerabilityMetadataUpsertBulk) Update added in v0.4.0

Update allows overriding fields `UPDATE` values. See the VulnerabilityMetadataCreateBulk.OnConflict documentation for more info.

func (*VulnerabilityMetadataUpsertBulk) UpdateCollector added in v0.4.0

UpdateCollector sets the "collector" field to the value that was provided on create.

func (*VulnerabilityMetadataUpsertBulk) UpdateDocumentRef added in v0.6.0

UpdateDocumentRef sets the "document_ref" field to the value that was provided on create.

func (*VulnerabilityMetadataUpsertBulk) UpdateNewValues added in v0.4.0

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.VulnerabilityMetadata.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(vulnerabilitymetadata.FieldID)
		}),
	).
	Exec(ctx)

func (*VulnerabilityMetadataUpsertBulk) UpdateOrigin added in v0.4.0

UpdateOrigin sets the "origin" field to the value that was provided on create.

func (*VulnerabilityMetadataUpsertBulk) UpdateScoreType added in v0.4.0

UpdateScoreType sets the "score_type" field to the value that was provided on create.

func (*VulnerabilityMetadataUpsertBulk) UpdateScoreValue added in v0.4.0

UpdateScoreValue sets the "score_value" field to the value that was provided on create.

func (*VulnerabilityMetadataUpsertBulk) UpdateTimestamp added in v0.4.0

UpdateTimestamp sets the "timestamp" field to the value that was provided on create.

func (*VulnerabilityMetadataUpsertBulk) UpdateVulnerabilityIDID added in v0.4.0

UpdateVulnerabilityIDID sets the "vulnerability_id_id" field to the value that was provided on create.

type VulnerabilityMetadataUpsertOne added in v0.4.0

type VulnerabilityMetadataUpsertOne struct {
	// contains filtered or unexported fields
}

VulnerabilityMetadataUpsertOne is the builder for "upsert"-ing

one VulnerabilityMetadata node.

func (*VulnerabilityMetadataUpsertOne) AddScoreValue added in v0.4.0

AddScoreValue adds v to the "score_value" field.

func (*VulnerabilityMetadataUpsertOne) DoNothing added in v0.4.0

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*VulnerabilityMetadataUpsertOne) Exec added in v0.4.0

Exec executes the query.

func (*VulnerabilityMetadataUpsertOne) ExecX added in v0.4.0

ExecX is like Exec, but panics if an error occurs.

func (*VulnerabilityMetadataUpsertOne) ID added in v0.4.0

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*VulnerabilityMetadataUpsertOne) IDX added in v0.4.0

IDX is like ID, but panics if an error occurs.

func (*VulnerabilityMetadataUpsertOne) Ignore added in v0.4.0

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.VulnerabilityMetadata.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*VulnerabilityMetadataUpsertOne) SetCollector added in v0.4.0

SetCollector sets the "collector" field.

func (*VulnerabilityMetadataUpsertOne) SetDocumentRef added in v0.6.0

SetDocumentRef sets the "document_ref" field.

func (*VulnerabilityMetadataUpsertOne) SetOrigin added in v0.4.0

SetOrigin sets the "origin" field.

func (*VulnerabilityMetadataUpsertOne) SetScoreType added in v0.4.0

SetScoreType sets the "score_type" field.

func (*VulnerabilityMetadataUpsertOne) SetScoreValue added in v0.4.0

SetScoreValue sets the "score_value" field.

func (*VulnerabilityMetadataUpsertOne) SetTimestamp added in v0.4.0

SetTimestamp sets the "timestamp" field.

func (*VulnerabilityMetadataUpsertOne) SetVulnerabilityIDID added in v0.4.0

SetVulnerabilityIDID sets the "vulnerability_id_id" field.

func (*VulnerabilityMetadataUpsertOne) Update added in v0.4.0

Update allows overriding fields `UPDATE` values. See the VulnerabilityMetadataCreate.OnConflict documentation for more info.

func (*VulnerabilityMetadataUpsertOne) UpdateCollector added in v0.4.0

UpdateCollector sets the "collector" field to the value that was provided on create.

func (*VulnerabilityMetadataUpsertOne) UpdateDocumentRef added in v0.6.0

UpdateDocumentRef sets the "document_ref" field to the value that was provided on create.

func (*VulnerabilityMetadataUpsertOne) UpdateNewValues added in v0.4.0

UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:

client.VulnerabilityMetadata.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(vulnerabilitymetadata.FieldID)
		}),
	).
	Exec(ctx)

func (*VulnerabilityMetadataUpsertOne) UpdateOrigin added in v0.4.0

UpdateOrigin sets the "origin" field to the value that was provided on create.

func (*VulnerabilityMetadataUpsertOne) UpdateScoreType added in v0.4.0

UpdateScoreType sets the "score_type" field to the value that was provided on create.

func (*VulnerabilityMetadataUpsertOne) UpdateScoreValue added in v0.4.0

UpdateScoreValue sets the "score_value" field to the value that was provided on create.

func (*VulnerabilityMetadataUpsertOne) UpdateTimestamp added in v0.4.0

UpdateTimestamp sets the "timestamp" field to the value that was provided on create.

func (*VulnerabilityMetadataUpsertOne) UpdateVulnerabilityIDID added in v0.4.0

func (u *VulnerabilityMetadataUpsertOne) UpdateVulnerabilityIDID() *VulnerabilityMetadataUpsertOne

UpdateVulnerabilityIDID sets the "vulnerability_id_id" field to the value that was provided on create.

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL