ent

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2023 License: Apache-2.0 Imports: 58 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"
	TypeIsVulnerability   = "IsVulnerability"
	TypeLicense           = "License"
	TypeOccurrence        = "Occurrence"
	TypePackageName       = "PackageName"
	TypePackageNamespace  = "PackageNamespace"
	TypePackageType       = "PackageType"
	TypePackageVersion    = "PackageVersion"
	TypePkgEqual          = "PkgEqual"
	TypePointOfContact    = "PointOfContact"
	TypeSLSAAttestation   = "SLSAAttestation"
	TypeScorecard         = "Scorecard"
	TypeSourceName        = "SourceName"
	TypeSourceNamespace   = "SourceNamespace"
	TypeSourceType        = "SourceType"
	TypeVulnEqual         = "VulnEqual"
	TypeVulnerabilityID   = "VulnerabilityID"
	TypeVulnerabilityType = "VulnerabilityType"
)

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 DefaultIsVulnerabilityOrder = &IsVulnerabilityOrder{
	Direction: entgql.OrderDirectionAsc,
	Field: &IsVulnerabilityOrderField{
		Value: func(iv *IsVulnerability) (ent.Value, error) {
			return iv.ID, nil
		},
		column: isvulnerability.FieldID,
		toTerm: isvulnerability.ByID,
		toCursor: func(iv *IsVulnerability) Cursor {
			return Cursor{ID: iv.ID}
		},
	},
}

DefaultIsVulnerabilityOrder is the default ordering of IsVulnerability.

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 DefaultPackageNamespaceOrder = &PackageNamespaceOrder{
	Direction: entgql.OrderDirectionAsc,
	Field: &PackageNamespaceOrderField{
		Value: func(pn *PackageNamespace) (ent.Value, error) {
			return pn.ID, nil
		},
		column: packagenamespace.FieldID,
		toTerm: packagenamespace.ByID,
		toCursor: func(pn *PackageNamespace) Cursor {
			return Cursor{ID: pn.ID}
		},
	},
}

DefaultPackageNamespaceOrder is the default ordering of PackageNamespace.

View Source
var DefaultPackageTypeOrder = &PackageTypeOrder{
	Direction: entgql.OrderDirectionAsc,
	Field: &PackageTypeOrderField{
		Value: func(pt *PackageType) (ent.Value, error) {
			return pt.ID, nil
		},
		column: packagetype.FieldID,
		toTerm: packagetype.ByID,
		toCursor: func(pt *PackageType) Cursor {
			return Cursor{ID: pt.ID}
		},
	},
}

DefaultPackageTypeOrder is the default ordering of PackageType.

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 DefaultScorecardOrder = &ScorecardOrder{
	Direction: entgql.OrderDirectionAsc,
	Field: &ScorecardOrderField{
		Value: func(s *Scorecard) (ent.Value, error) {
			return s.ID, nil
		},
		column: scorecard.FieldID,
		toTerm: scorecard.ByID,
		toCursor: func(s *Scorecard) Cursor {
			return Cursor{ID: s.ID}
		},
	},
}

DefaultScorecardOrder is the default ordering of Scorecard.

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 DefaultSourceNamespaceOrder = &SourceNamespaceOrder{
	Direction: entgql.OrderDirectionAsc,
	Field: &SourceNamespaceOrderField{
		Value: func(sn *SourceNamespace) (ent.Value, error) {
			return sn.ID, nil
		},
		column: sourcenamespace.FieldID,
		toTerm: sourcenamespace.ByID,
		toCursor: func(sn *SourceNamespace) Cursor {
			return Cursor{ID: sn.ID}
		},
	},
}

DefaultSourceNamespaceOrder is the default ordering of SourceNamespace.

View Source
var DefaultSourceTypeOrder = &SourceTypeOrder{
	Direction: entgql.OrderDirectionAsc,
	Field: &SourceTypeOrderField{
		Value: func(st *SourceType) (ent.Value, error) {
			return st.ID, nil
		},
		column: sourcetype.FieldID,
		toTerm: sourcetype.ByID,
		toCursor: func(st *SourceType) Cursor {
			return Cursor{ID: st.ID}
		},
	},
}

DefaultSourceTypeOrder is the default ordering of SourceType.

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 DefaultVulnerabilityTypeOrder = &VulnerabilityTypeOrder{
	Direction: entgql.OrderDirectionAsc,
	Field: &VulnerabilityTypeOrderField{
		Value: func(vt *VulnerabilityType) (ent.Value, error) {
			return vt.ID, nil
		},
		column: vulnerabilitytype.FieldID,
		toTerm: vulnerabilitytype.ByID,
		toCursor: func(vt *VulnerabilityType) Cursor {
			return Cursor{ID: vt.ID}
		},
	},
}

DefaultVulnerabilityTypeOrder is the default ordering of VulnerabilityType.

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 int `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) IsNode

func (n *Artifact) IsNode()

IsNode implements the Node interface check for GQLGen.

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) 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) NamedSame

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

NamedSame returns the Same 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) Occurrences

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

func (*Artifact) QueryAttestations

func (a *Artifact) QueryAttestations() *SLSAAttestationQuery

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

func (*Artifact) QueryOccurrences

func (a *Artifact) QueryOccurrences() *OccurrenceQuery

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

func (*Artifact) QuerySame

func (a *Artifact) QuerySame() *HashEqualQuery

QuerySame queries the "same" edge of the Artifact entity.

func (*Artifact) QuerySbom

func (a *Artifact) QuerySbom() *BillOfMaterialsQuery

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

func (*Artifact) Same

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

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.

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 int) *ArtifactDeleteOne

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

func (*ArtifactClient) Get

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

Get returns a Artifact entity by its id.

func (*ArtifactClient) GetX

func (c *ArtifactClient) GetX(ctx context.Context, id int) *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) QueryOccurrences

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

QueryOccurrences queries the occurrences edge of a Artifact.

func (*ArtifactClient) QuerySame

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

QuerySame queries the same edge of a Artifact.

func (*ArtifactClient) QuerySbom

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

QuerySbom queries the sbom 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 int) *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 ...int) *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) AddOccurrenceIDs

func (ac *ArtifactCreate) AddOccurrenceIDs(ids ...int) *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) AddSame

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

AddSame adds the "same" edges to the HashEqual entity.

func (*ArtifactCreate) AddSameIDs

func (ac *ArtifactCreate) AddSameIDs(ids ...int) *ArtifactCreate

AddSameIDs adds the "same" edge to the HashEqual 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 ...int) *ArtifactCreate

AddSbomIDs adds the "sbom" edge to the BillOfMaterials 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.

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"`
	// Same holds the value of the same edge.
	Same []*HashEqual `json:"same,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) 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) SameOrErr

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

SameOrErr returns the Same 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.

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 ...int)

AddAttestationIDs adds the "attestations" edge to the SLSAAttestation 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) AddOccurrenceIDs

func (m *ArtifactMutation) AddOccurrenceIDs(ids ...int)

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

func (*ArtifactMutation) AddSameIDs

func (m *ArtifactMutation) AddSameIDs(ids ...int)

AddSameIDs adds the "same" edge to the HashEqual entity by ids.

func (*ArtifactMutation) AddSbomIDs

func (m *ArtifactMutation) AddSbomIDs(ids ...int)

AddSbomIDs adds the "sbom" edge to the BillOfMaterials 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 []int)

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

func (*ArtifactMutation) ClearAttestations

func (m *ArtifactMutation) ClearAttestations()

ClearAttestations clears the "attestations" edge to the SLSAAttestation 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) ClearOccurrences

func (m *ArtifactMutation) ClearOccurrences()

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

func (*ArtifactMutation) ClearSame

func (m *ArtifactMutation) ClearSame()

ClearSame clears the "same" edge to the HashEqual entity.

func (*ArtifactMutation) ClearSbom

func (m *ArtifactMutation) ClearSbom()

ClearSbom clears the "sbom" edge to the BillOfMaterials 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) ID

func (m *ArtifactMutation) ID() (id int, 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) ([]int, 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) 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 []int)

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) RemoveAttestationIDs

func (m *ArtifactMutation) RemoveAttestationIDs(ids ...int)

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

func (*ArtifactMutation) RemoveOccurrenceIDs

func (m *ArtifactMutation) RemoveOccurrenceIDs(ids ...int)

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

func (*ArtifactMutation) RemoveSameIDs

func (m *ArtifactMutation) RemoveSameIDs(ids ...int)

RemoveSameIDs removes the "same" edge to the HashEqual entity by IDs.

func (*ArtifactMutation) RemoveSbomIDs

func (m *ArtifactMutation) RemoveSbomIDs(ids ...int)

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

func (*ArtifactMutation) RemovedAttestationsIDs

func (m *ArtifactMutation) RemovedAttestationsIDs() (ids []int)

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

func (*ArtifactMutation) RemovedEdges

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

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

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) RemovedOccurrencesIDs

func (m *ArtifactMutation) RemovedOccurrencesIDs() (ids []int)

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

func (*ArtifactMutation) RemovedSameIDs

func (m *ArtifactMutation) RemovedSameIDs() (ids []int)

RemovedSame returns the removed IDs of the "same" edge to the HashEqual entity.

func (*ArtifactMutation) RemovedSbomIDs

func (m *ArtifactMutation) RemovedSbomIDs() (ids []int)

RemovedSbom returns the removed IDs of the "sbom" edge to the BillOfMaterials 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) 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) ResetOccurrences

func (m *ArtifactMutation) ResetOccurrences()

ResetOccurrences resets all changes to the "occurrences" edge.

func (*ArtifactMutation) ResetSame

func (m *ArtifactMutation) ResetSame()

ResetSame resets all changes to the "same" edge.

func (*ArtifactMutation) ResetSbom

func (m *ArtifactMutation) ResetSbom()

ResetSbom resets all changes to the "sbom" edge.

func (*ArtifactMutation) SameCleared

func (m *ArtifactMutation) SameCleared() bool

SameCleared reports if the "same" edge to the HashEqual entity was cleared.

func (*ArtifactMutation) SameIDs

func (m *ArtifactMutation) SameIDs() (ids []int)

SameIDs returns the "same" edge IDs in the mutation.

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 []int)

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) 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) 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 int, 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) int

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 []int, err error)

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

func (*ArtifactQuery) IDsX

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

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 int, 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) int

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) QueryOccurrences

func (aq *ArtifactQuery) QueryOccurrences() *OccurrenceQuery

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

func (*ArtifactQuery) QuerySame

func (aq *ArtifactQuery) QuerySame() *HashEqualQuery

QuerySame chains the current query on the "same" edge.

func (*ArtifactQuery) QuerySbom

func (aq *ArtifactQuery) QuerySbom() *BillOfMaterialsQuery

QuerySbom chains the current query on the "sbom" 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) 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) 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) WithNamedSame

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

WithNamedSame tells the query-builder to eager-load the nodes that are connected to the "same" 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) 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) WithSame

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

WithSame tells the query-builder to eager-load the nodes that are connected to the "same" 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.

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 ...int) *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) AddOccurrenceIDs

func (au *ArtifactUpdate) AddOccurrenceIDs(ids ...int) *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) AddSame

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

AddSame adds the "same" edges to the HashEqual entity.

func (*ArtifactUpdate) AddSameIDs

func (au *ArtifactUpdate) AddSameIDs(ids ...int) *ArtifactUpdate

AddSameIDs adds the "same" edge to the HashEqual 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 ...int) *ArtifactUpdate

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

func (*ArtifactUpdate) ClearAttestations

func (au *ArtifactUpdate) ClearAttestations() *ArtifactUpdate

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

func (*ArtifactUpdate) ClearOccurrences

func (au *ArtifactUpdate) ClearOccurrences() *ArtifactUpdate

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

func (*ArtifactUpdate) ClearSame

func (au *ArtifactUpdate) ClearSame() *ArtifactUpdate

ClearSame clears all "same" edges to the HashEqual entity.

func (*ArtifactUpdate) ClearSbom

func (au *ArtifactUpdate) ClearSbom() *ArtifactUpdate

ClearSbom clears all "sbom" edges to the BillOfMaterials 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 ...int) *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) RemoveOccurrenceIDs

func (au *ArtifactUpdate) RemoveOccurrenceIDs(ids ...int) *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) RemoveSame

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

RemoveSame removes "same" edges to HashEqual entities.

func (*ArtifactUpdate) RemoveSameIDs

func (au *ArtifactUpdate) RemoveSameIDs(ids ...int) *ArtifactUpdate

RemoveSameIDs removes the "same" edge to HashEqual 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 ...int) *ArtifactUpdate

RemoveSbomIDs removes the "sbom" edge to BillOfMaterials 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) 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 ...int) *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) AddOccurrenceIDs

func (auo *ArtifactUpdateOne) AddOccurrenceIDs(ids ...int) *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) AddSame

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

AddSame adds the "same" edges to the HashEqual entity.

func (*ArtifactUpdateOne) AddSameIDs

func (auo *ArtifactUpdateOne) AddSameIDs(ids ...int) *ArtifactUpdateOne

AddSameIDs adds the "same" edge to the HashEqual entity by IDs.

func (*ArtifactUpdateOne) AddSbom

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

func (*ArtifactUpdateOne) AddSbomIDs

func (auo *ArtifactUpdateOne) AddSbomIDs(ids ...int) *ArtifactUpdateOne

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

func (*ArtifactUpdateOne) ClearAttestations

func (auo *ArtifactUpdateOne) ClearAttestations() *ArtifactUpdateOne

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

func (*ArtifactUpdateOne) ClearOccurrences

func (auo *ArtifactUpdateOne) ClearOccurrences() *ArtifactUpdateOne

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

func (*ArtifactUpdateOne) ClearSame

func (auo *ArtifactUpdateOne) ClearSame() *ArtifactUpdateOne

ClearSame clears all "same" edges to the HashEqual entity.

func (*ArtifactUpdateOne) ClearSbom

func (auo *ArtifactUpdateOne) ClearSbom() *ArtifactUpdateOne

ClearSbom clears all "sbom" edges to the BillOfMaterials 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 ...int) *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) RemoveOccurrenceIDs

func (auo *ArtifactUpdateOne) RemoveOccurrenceIDs(ids ...int) *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) RemoveSame

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

RemoveSame removes "same" edges to HashEqual entities.

func (*ArtifactUpdateOne) RemoveSameIDs

func (auo *ArtifactUpdateOne) RemoveSameIDs(ids ...int) *ArtifactUpdateOne

RemoveSameIDs removes the "same" edge to HashEqual 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 ...int) *ArtifactUpdateOne

RemoveSbomIDs removes the "sbom" edge to BillOfMaterials 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) 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(),
	).
	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 int, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*ArtifactUpsertOne) IDX

func (u *ArtifactUpsertOne) IDX(ctx context.Context) int

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. Using this option is equivalent to using:

client.Artifact.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	Exec(ctx)

type Artifacts

type Artifacts []*Artifact

Artifacts is a parsable slice of Artifact.

type BillOfMaterials

type BillOfMaterials struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// PackageID holds the value of the "package_id" field.
	PackageID *int `json:"package_id,omitempty"`
	// ArtifactID holds the value of the "artifact_id" field.
	ArtifactID *int `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"`
	// 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) IsNode

func (n *BillOfMaterials) IsNode()

IsNode implements the Node interface check for GQLGen.

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) 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) 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) 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(i int) *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) SetDownloadLocation

func (bomc *BillOfMaterialsCreate) SetDownloadLocation(s string) *BillOfMaterialsCreate

SetDownloadLocation sets the "download_location" field.

func (*BillOfMaterialsCreate) SetNillableArtifactID

func (bomc *BillOfMaterialsCreate) SetNillableArtifactID(i *int) *BillOfMaterialsCreate

SetNillableArtifactID sets the "artifact_id" field if the given value is not nil.

func (*BillOfMaterialsCreate) SetNillablePackageID

func (bomc *BillOfMaterialsCreate) SetNillablePackageID(i *int) *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(i int) *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"`
	// 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) 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) 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 int, 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 []int)

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) 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) 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 int, 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

func (m *BillOfMaterialsMutation) IDs(ctx context.Context) ([]int, 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 (*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 *int, 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) 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) 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 *int, 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 int, 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 []int)

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) 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) 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) 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) 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(i int)

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) 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) 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(i int)

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 int, 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) int

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 int `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 []int, err error)

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

func (*BillOfMaterialsQuery) IDsX

func (bomq *BillOfMaterialsQuery) IDsX(ctx context.Context) []int

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 int, 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) int

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) 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 int `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) 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) 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) 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) 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(i int) *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) SetDownloadLocation

func (bomu *BillOfMaterialsUpdate) SetDownloadLocation(s string) *BillOfMaterialsUpdate

SetDownloadLocation sets the "download_location" field.

func (*BillOfMaterialsUpdate) SetNillableArtifactID

func (bomu *BillOfMaterialsUpdate) SetNillableArtifactID(i *int) *BillOfMaterialsUpdate

SetNillableArtifactID sets the "artifact_id" field if the given value is not nil.

func (*BillOfMaterialsUpdate) SetNillablePackageID

func (bomu *BillOfMaterialsUpdate) SetNillablePackageID(i *int) *BillOfMaterialsUpdate

SetNillablePackageID sets the "package_id" 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(i int) *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) 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) 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) 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

func (bomuo *BillOfMaterialsUpdateOne) SetArtifactID(i int) *BillOfMaterialsUpdateOne

SetArtifactID sets the "artifact_id" field.

func (*BillOfMaterialsUpdateOne) SetCollector

SetCollector sets the "collector" field.

func (*BillOfMaterialsUpdateOne) SetDigest

SetDigest sets the "digest" field.

func (*BillOfMaterialsUpdateOne) SetDownloadLocation

func (bomuo *BillOfMaterialsUpdateOne) SetDownloadLocation(s string) *BillOfMaterialsUpdateOne

SetDownloadLocation sets the "download_location" field.

func (*BillOfMaterialsUpdateOne) SetNillableArtifactID

func (bomuo *BillOfMaterialsUpdateOne) SetNillableArtifactID(i *int) *BillOfMaterialsUpdateOne

SetNillableArtifactID sets the "artifact_id" field if the given value is not nil.

func (*BillOfMaterialsUpdateOne) SetNillablePackageID

func (bomuo *BillOfMaterialsUpdateOne) SetNillablePackageID(i *int) *BillOfMaterialsUpdateOne

SetNillablePackageID sets the "package_id" 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

func (bomuo *BillOfMaterialsUpdateOne) SetPackageID(i int) *BillOfMaterialsUpdateOne

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

func (u *BillOfMaterialsUpsert) SetArtifactID(v int) *BillOfMaterialsUpsert

SetArtifactID sets the "artifact_id" field.

func (*BillOfMaterialsUpsert) SetCollector

SetCollector sets the "collector" field.

func (*BillOfMaterialsUpsert) SetDigest

SetDigest sets the "digest" field.

func (*BillOfMaterialsUpsert) SetDownloadLocation

func (u *BillOfMaterialsUpsert) SetDownloadLocation(v string) *BillOfMaterialsUpsert

SetDownloadLocation sets the "download_location" field.

func (*BillOfMaterialsUpsert) SetOrigin

SetOrigin sets the "origin" field.

func (*BillOfMaterialsUpsert) SetPackageID

func (u *BillOfMaterialsUpsert) SetPackageID(v int) *BillOfMaterialsUpsert

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) UpdateDownloadLocation

func (u *BillOfMaterialsUpsert) UpdateDownloadLocation() *BillOfMaterialsUpsert

UpdateDownloadLocation sets the "download_location" 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) SetDownloadLocation

func (u *BillOfMaterialsUpsertBulk) SetDownloadLocation(v string) *BillOfMaterialsUpsertBulk

SetDownloadLocation sets the "download_location" 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) UpdateDownloadLocation

func (u *BillOfMaterialsUpsertBulk) UpdateDownloadLocation() *BillOfMaterialsUpsertBulk

UpdateDownloadLocation sets the "download_location" 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(),
	).
	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 int, 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) SetDownloadLocation

func (u *BillOfMaterialsUpsertOne) SetDownloadLocation(v string) *BillOfMaterialsUpsertOne

SetDownloadLocation sets the "download_location" 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) UpdateDownloadLocation

func (u *BillOfMaterialsUpsertOne) UpdateDownloadLocation() *BillOfMaterialsUpsertOne

UpdateDownloadLocation sets the "download_location" 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. Using this option is equivalent to using:

client.BillOfMaterials.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	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 int `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 int) *BuilderDeleteOne

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

func (*BuilderClient) Get

func (c *BuilderClient) Get(ctx context.Context, id int) (*Builder, error)

Get returns a Builder entity by its id.

func (*BuilderClient) GetX

func (c *BuilderClient) GetX(ctx context.Context, id int) *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 int) *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 ...int) *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) 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 ...int)

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 int, 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) ([]int, 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 ...int)

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 []int)

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) 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 []int)

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 int, 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) int

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 []int, err error)

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

func (*BuilderQuery) IDsX

func (bq *BuilderQuery) IDsX(ctx context.Context) []int

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 int, 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) int

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 ...int) *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 ...int) *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 ...int) *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 ...int) *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(),
	).
	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 int, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*BuilderUpsertOne) IDX

func (u *BuilderUpsertOne) IDX(ctx context.Context) int

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. Using this option is equivalent to using:

client.Builder.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	Exec(ctx)

type Builders

type Builders []*Builder

Builders is a parsable slice of Builder.

type Certification

type Certification struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// SourceID holds the value of the "source_id" field.
	SourceID *int `json:"source_id,omitempty"`
	// PackageVersionID holds the value of the "package_version_id" field.
	PackageVersionID *int `json:"package_version_id,omitempty"`
	// PackageNameID holds the value of the "package_name_id" field.
	PackageNameID *int `json:"package_name_id,omitempty"`
	// ArtifactID holds the value of the "artifact_id" field.
	ArtifactID *int `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"`
	// 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"`
	// 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

func (c *CertificationClient) DeleteOneID(id int) *CertificationDeleteOne

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

func (c *CertificationClient) UpdateOneID(id int) *CertificationUpdateOne

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 int) *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(i int) *CertificationCreate

SetArtifactID sets the "artifact_id" field.

func (*CertificationCreate) SetCollector

func (cc *CertificationCreate) SetCollector(s string) *CertificationCreate

SetCollector sets the "collector" field.

func (*CertificationCreate) SetJustification

func (cc *CertificationCreate) SetJustification(s string) *CertificationCreate

SetJustification sets the "justification" field.

func (*CertificationCreate) SetNillableAllVersionsID

func (cc *CertificationCreate) SetNillableAllVersionsID(id *int) *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(i *int) *CertificationCreate

SetNillableArtifactID sets the "artifact_id" field if the given value is not nil.

func (*CertificationCreate) SetNillablePackageNameID

func (cc *CertificationCreate) SetNillablePackageNameID(i *int) *CertificationCreate

SetNillablePackageNameID sets the "package_name_id" field if the given value is not nil.

func (*CertificationCreate) SetNillablePackageVersionID

func (cc *CertificationCreate) SetNillablePackageVersionID(i *int) *CertificationCreate

SetNillablePackageVersionID sets the "package_version_id" field if the given value is not nil.

func (*CertificationCreate) SetNillableSourceID

func (cc *CertificationCreate) SetNillableSourceID(i *int) *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(i int) *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(i int) *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(i int) *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 int, exists bool)

AllVersionsID returns the "all_versions" edge ID in the mutation.

func (*CertificationMutation) AllVersionsIDs

func (m *CertificationMutation) AllVersionsIDs() (ids []int)

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 int, 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 []int)

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) 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 int, 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

func (m *CertificationMutation) IDs(ctx context.Context) ([]int, 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 (*CertificationMutation) Justification

func (m *CertificationMutation) Justification() (r string, exists bool)

Justification returns the value of the "justification" field in the mutation.

func (*CertificationMutation) OldArtifactID

func (m *CertificationMutation) OldArtifactID(ctx context.Context) (v *int, 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) 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) 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 *int, 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 *int, 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 *int, 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 int, 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 int, 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 []int)

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) 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) 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 int)

SetAllVersionsID sets the "all_versions" edge to the PackageName entity by id.

func (*CertificationMutation) SetArtifactID

func (m *CertificationMutation) SetArtifactID(i int)

SetArtifactID sets the "artifact_id" field.

func (*CertificationMutation) SetCollector

func (m *CertificationMutation) SetCollector(s string)

SetCollector sets the "collector" 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) SetJustification

func (m *CertificationMutation) SetJustification(s string)

SetJustification sets the "justification" 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(i int)

SetPackageNameID sets the "package_name_id" field.

func (*CertificationMutation) SetPackageVersionID

func (m *CertificationMutation) SetPackageVersionID(i int)

SetPackageVersionID sets the "package_version_id" field.

func (*CertificationMutation) SetSourceID

func (m *CertificationMutation) SetSourceID(i int)

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 int, 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 []int)

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 int, 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) int

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 int `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 []int, err error)

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

func (*CertificationQuery) IDsX

func (cq *CertificationQuery) IDsX(ctx context.Context) []int

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 int, 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) int

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 int `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 int) *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(i int) *CertificationUpdate

SetArtifactID sets the "artifact_id" field.

func (*CertificationUpdate) SetCollector

func (cu *CertificationUpdate) SetCollector(s string) *CertificationUpdate

SetCollector sets the "collector" field.

func (*CertificationUpdate) SetJustification

func (cu *CertificationUpdate) SetJustification(s string) *CertificationUpdate

SetJustification sets the "justification" field.

func (*CertificationUpdate) SetNillableAllVersionsID

func (cu *CertificationUpdate) SetNillableAllVersionsID(id *int) *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(i *int) *CertificationUpdate

SetNillableArtifactID sets the "artifact_id" field if the given value is not nil.

func (*CertificationUpdate) SetNillablePackageNameID

func (cu *CertificationUpdate) SetNillablePackageNameID(i *int) *CertificationUpdate

SetNillablePackageNameID sets the "package_name_id" field if the given value is not nil.

func (*CertificationUpdate) SetNillablePackageVersionID

func (cu *CertificationUpdate) SetNillablePackageVersionID(i *int) *CertificationUpdate

SetNillablePackageVersionID sets the "package_version_id" field if the given value is not nil.

func (*CertificationUpdate) SetNillableSourceID

func (cu *CertificationUpdate) SetNillableSourceID(i *int) *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(i int) *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(i int) *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(i int) *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 int) *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(i int) *CertificationUpdateOne

SetArtifactID sets the "artifact_id" field.

func (*CertificationUpdateOne) SetCollector

SetCollector sets the "collector" field.

func (*CertificationUpdateOne) SetJustification

func (cuo *CertificationUpdateOne) SetJustification(s string) *CertificationUpdateOne

SetJustification sets the "justification" field.

func (*CertificationUpdateOne) SetNillableAllVersionsID

func (cuo *CertificationUpdateOne) SetNillableAllVersionsID(id *int) *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(i *int) *CertificationUpdateOne

SetNillableArtifactID sets the "artifact_id" field if the given value is not nil.

func (*CertificationUpdateOne) SetNillablePackageNameID

func (cuo *CertificationUpdateOne) SetNillablePackageNameID(i *int) *CertificationUpdateOne

SetNillablePackageNameID sets the "package_name_id" field if the given value is not nil.

func (*CertificationUpdateOne) SetNillablePackageVersionID

func (cuo *CertificationUpdateOne) SetNillablePackageVersionID(i *int) *CertificationUpdateOne

SetNillablePackageVersionID sets the "package_version_id" field if the given value is not nil.

func (*CertificationUpdateOne) SetNillableSourceID

func (cuo *CertificationUpdateOne) SetNillableSourceID(i *int) *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(i int) *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(i int) *CertificationUpdateOne

SetPackageVersionID sets the "package_version_id" field.

func (*CertificationUpdateOne) SetSource

SetSource sets the "source" edge to the SourceName entity.

func (*CertificationUpdateOne) SetSourceID

func (cuo *CertificationUpdateOne) SetSourceID(i int) *CertificationUpdateOne

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 int) *CertificationUpsert

SetArtifactID sets the "artifact_id" field.

func (*CertificationUpsert) SetCollector

func (u *CertificationUpsert) SetCollector(v string) *CertificationUpsert

SetCollector sets the "collector" field.

func (*CertificationUpsert) SetJustification

func (u *CertificationUpsert) SetJustification(v string) *CertificationUpsert

SetJustification sets the "justification" field.

func (*CertificationUpsert) SetOrigin

SetOrigin sets the "origin" field.

func (*CertificationUpsert) SetPackageNameID

func (u *CertificationUpsert) SetPackageNameID(v int) *CertificationUpsert

SetPackageNameID sets the "package_name_id" field.

func (*CertificationUpsert) SetPackageVersionID

func (u *CertificationUpsert) SetPackageVersionID(v int) *CertificationUpsert

SetPackageVersionID sets the "package_version_id" field.

func (*CertificationUpsert) SetSourceID

func (u *CertificationUpsert) SetSourceID(v int) *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) UpdateJustification

func (u *CertificationUpsert) UpdateJustification() *CertificationUpsert

UpdateJustification sets the "justification" 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) SetJustification

func (u *CertificationUpsertBulk) SetJustification(v string) *CertificationUpsertBulk

SetJustification sets the "justification" field.

func (*CertificationUpsertBulk) SetOrigin

SetOrigin sets the "origin" field.

func (*CertificationUpsertBulk) SetPackageNameID

func (u *CertificationUpsertBulk) SetPackageNameID(v int) *CertificationUpsertBulk

SetPackageNameID sets the "package_name_id" field.

func (*CertificationUpsertBulk) SetPackageVersionID

func (u *CertificationUpsertBulk) SetPackageVersionID(v int) *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) UpdateJustification

func (u *CertificationUpsertBulk) UpdateJustification() *CertificationUpsertBulk

UpdateJustification sets the "justification" 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(),
	).
	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 int, 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

func (u *CertificationUpsertOne) SetArtifactID(v int) *CertificationUpsertOne

SetArtifactID sets the "artifact_id" field.

func (*CertificationUpsertOne) SetCollector

SetCollector sets the "collector" field.

func (*CertificationUpsertOne) SetJustification

func (u *CertificationUpsertOne) SetJustification(v string) *CertificationUpsertOne

SetJustification sets the "justification" field.

func (*CertificationUpsertOne) SetOrigin

SetOrigin sets the "origin" field.

func (*CertificationUpsertOne) SetPackageNameID

func (u *CertificationUpsertOne) SetPackageNameID(v int) *CertificationUpsertOne

SetPackageNameID sets the "package_name_id" field.

func (*CertificationUpsertOne) SetPackageVersionID

func (u *CertificationUpsertOne) SetPackageVersionID(v int) *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) UpdateJustification

func (u *CertificationUpsertOne) UpdateJustification() *CertificationUpsertOne

UpdateJustification sets the "justification" 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. Using this option is equivalent to using:

client.Certification.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	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 int `json:"id,omitempty"`
	// PackageID holds the value of the "package_id" field.
	PackageID *int `json:"package_id,omitempty"`
	// SourceID holds the value of the "source_id" field.
	SourceID *int `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"`
	// 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 int) *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 int) *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 ...int) *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 ...int) *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) SetJustification

func (clc *CertifyLegalCreate) SetJustification(s string) *CertifyLegalCreate

SetJustification sets the "justification" field.

func (*CertifyLegalCreate) SetNillablePackageID

func (clc *CertifyLegalCreate) SetNillablePackageID(i *int) *CertifyLegalCreate

SetNillablePackageID sets the "package_id" field if the given value is not nil.

func (*CertifyLegalCreate) SetNillableSourceID

func (clc *CertifyLegalCreate) SetNillableSourceID(i *int) *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(i int) *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(i int) *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 ...int)

AddDeclaredLicenseIDs adds the "declared_licenses" edge to the License entity by ids.

func (*CertifyLegalMutation) AddDiscoveredLicenseIDs

func (m *CertifyLegalMutation) AddDiscoveredLicenseIDs(ids ...int)

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 []int)

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 []int)

DiscoveredLicensesIDs returns the "discovered_licenses" edge IDs 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 int, 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

func (m *CertifyLegalMutation) IDs(ctx context.Context) ([]int, 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 (*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) 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 *int, 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 *int, 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 int, 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 []int)

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 ...int)

RemoveDeclaredLicenseIDs removes the "declared_licenses" edge to the License entity by IDs.

func (*CertifyLegalMutation) RemoveDiscoveredLicenseIDs

func (m *CertifyLegalMutation) RemoveDiscoveredLicenseIDs(ids ...int)

RemoveDiscoveredLicenseIDs removes the "discovered_licenses" edge to the License entity by IDs.

func (*CertifyLegalMutation) RemovedDeclaredLicensesIDs

func (m *CertifyLegalMutation) RemovedDeclaredLicensesIDs() (ids []int)

RemovedDeclaredLicenses returns the removed IDs of the "declared_licenses" edge to the License entity.

func (*CertifyLegalMutation) RemovedDiscoveredLicensesIDs

func (m *CertifyLegalMutation) RemovedDiscoveredLicensesIDs() (ids []int)

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) 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) 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) 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(i int)

SetPackageID sets the "package_id" field.

func (*CertifyLegalMutation) SetSourceID

func (m *CertifyLegalMutation) SetSourceID(i int)

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 int, 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 []int)

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 int, 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) int

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 int `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 []int, err error)

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

func (*CertifyLegalQuery) IDsX

func (clq *CertifyLegalQuery) IDsX(ctx context.Context) []int

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 int, 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) int

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 int `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 ...int) *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 ...int) *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 ...int) *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 ...int) *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) SetJustification

func (clu *CertifyLegalUpdate) SetJustification(s string) *CertifyLegalUpdate

SetJustification sets the "justification" field.

func (*CertifyLegalUpdate) SetNillablePackageID

func (clu *CertifyLegalUpdate) SetNillablePackageID(i *int) *CertifyLegalUpdate

SetNillablePackageID sets the "package_id" field if the given value is not nil.

func (*CertifyLegalUpdate) SetNillableSourceID

func (clu *CertifyLegalUpdate) SetNillableSourceID(i *int) *CertifyLegalUpdate

SetNillableSourceID sets the "source_id" 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(i int) *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(i int) *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 ...int) *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 ...int) *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 ...int) *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 ...int) *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) SetJustification

func (cluo *CertifyLegalUpdateOne) SetJustification(s string) *CertifyLegalUpdateOne

SetJustification sets the "justification" field.

func (*CertifyLegalUpdateOne) SetNillablePackageID

func (cluo *CertifyLegalUpdateOne) SetNillablePackageID(i *int) *CertifyLegalUpdateOne

SetNillablePackageID sets the "package_id" field if the given value is not nil.

func (*CertifyLegalUpdateOne) SetNillableSourceID

func (cluo *CertifyLegalUpdateOne) SetNillableSourceID(i *int) *CertifyLegalUpdateOne

SetNillableSourceID sets the "source_id" 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(i int) *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(i int) *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) 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 int) *CertifyLegalUpsert

SetPackageID sets the "package_id" field.

func (*CertifyLegalUpsert) SetSourceID

func (u *CertifyLegalUpsert) SetSourceID(v int) *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) 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) 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) 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(),
	).
	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 int, 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) SetJustification

func (u *CertifyLegalUpsertOne) SetJustification(v string) *CertifyLegalUpsertOne

SetJustification sets the "justification" field.

func (*CertifyLegalUpsertOne) SetOrigin

SetOrigin sets the "origin" field.

func (*CertifyLegalUpsertOne) SetPackageID

func (u *CertifyLegalUpsertOne) SetPackageID(v int) *CertifyLegalUpsertOne

SetPackageID sets the "package_id" field.

func (*CertifyLegalUpsertOne) SetSourceID

func (u *CertifyLegalUpsertOne) SetSourceID(v int) *CertifyLegalUpsertOne

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) 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. Using this option is equivalent to using:

client.CertifyLegal.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	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 int `json:"id,omitempty"`
	// SourceID holds the value of the "source_id" field.
	SourceID int `json:"source_id,omitempty"`
	// ScorecardID holds the value of the "scorecard_id" field.
	ScorecardID int `json:"scorecard_id,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) QueryScorecard

func (cs *CertifyScorecard) QueryScorecard() *ScorecardQuery

QueryScorecard queries the "scorecard" edge of the CertifyScorecard entity.

func (*CertifyScorecard) QuerySource

func (cs *CertifyScorecard) QuerySource() *SourceNameQuery

QuerySource queries the "source" edge of the CertifyScorecard entity.

func (*CertifyScorecard) Scorecard

func (cs *CertifyScorecard) Scorecard(ctx context.Context) (*Scorecard, error)

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) QueryScorecard

func (c *CertifyScorecardClient) QueryScorecard(cs *CertifyScorecard) *ScorecardQuery

QueryScorecard queries the scorecard edge of a 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) SetScorecard

SetScorecard sets the "scorecard" edge to the Scorecard entity.

func (*CertifyScorecardCreate) SetScorecardID

func (csc *CertifyScorecardCreate) SetScorecardID(i int) *CertifyScorecardCreate

SetScorecardID sets the "scorecard_id" field.

func (*CertifyScorecardCreate) SetSource

SetSource sets the "source" edge to the SourceName entity.

func (*CertifyScorecardCreate) SetSourceID

func (csc *CertifyScorecardCreate) SetSourceID(i int) *CertifyScorecardCreate

SetSourceID sets the "source_id" 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 {
	// Scorecard holds the value of the scorecard edge.
	Scorecard *Scorecard `json:"scorecard,omitempty"`
	// 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) ScorecardOrErr

func (e CertifyScorecardEdges) ScorecardOrErr() (*Scorecard, error)

ScorecardOrErr returns the Scorecard value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

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) 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) 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) 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) ClearScorecard

func (m *CertifyScorecardMutation) ClearScorecard()

ClearScorecard clears the "scorecard" edge to the Scorecard entity.

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) 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 int, 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) 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) OldScorecardID

func (m *CertifyScorecardMutation) OldScorecardID(ctx context.Context) (v int, err error)

OldScorecardID returns the old "scorecard_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) OldSourceID

func (m *CertifyScorecardMutation) OldSourceID(ctx context.Context) (v int, 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) Op

func (m *CertifyScorecardMutation) Op() Op

Op returns the operation name.

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) 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) ResetScorecard

func (m *CertifyScorecardMutation) ResetScorecard()

ResetScorecard resets all changes to the "scorecard" edge.

func (*CertifyScorecardMutation) ResetScorecardID

func (m *CertifyScorecardMutation) ResetScorecardID()

ResetScorecardID resets all changes to the "scorecard_id" 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) ScorecardCleared

func (m *CertifyScorecardMutation) ScorecardCleared() bool

ScorecardCleared reports if the "scorecard" edge to the Scorecard entity was cleared.

func (*CertifyScorecardMutation) ScorecardID

func (m *CertifyScorecardMutation) ScorecardID() (r int, exists bool)

ScorecardID returns the value of the "scorecard_id" field in the mutation.

func (*CertifyScorecardMutation) ScorecardIDs

func (m *CertifyScorecardMutation) ScorecardIDs() (ids []int)

ScorecardIDs returns the "scorecard" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use ScorecardID instead. It exists only for internal usage by the builders.

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) SetOp

func (m *CertifyScorecardMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*CertifyScorecardMutation) SetScorecardID

func (m *CertifyScorecardMutation) SetScorecardID(i int)

SetScorecardID sets the "scorecard_id" field.

func (*CertifyScorecardMutation) SetSourceID

func (m *CertifyScorecardMutation) SetSourceID(i int)

SetSourceID sets the "source_id" 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 int, exists bool)

SourceID returns the value of the "source_id" field in the mutation.

func (*CertifyScorecardMutation) SourceIDs

func (m *CertifyScorecardMutation) SourceIDs() (ids []int)

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) 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 int, 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) int

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 int `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 []int, err error)

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

func (*CertifyScorecardQuery) IDsX

func (csq *CertifyScorecardQuery) IDsX(ctx context.Context) []int

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 int, 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) int

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) QueryScorecard

func (csq *CertifyScorecardQuery) QueryScorecard() *ScorecardQuery

QueryScorecard chains the current query on the "scorecard" edge.

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 int `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) WithScorecard

func (csq *CertifyScorecardQuery) WithScorecard(opts ...func(*ScorecardQuery)) *CertifyScorecardQuery

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.

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) ClearScorecard

func (csu *CertifyScorecardUpdate) ClearScorecard() *CertifyScorecardUpdate

ClearScorecard clears the "scorecard" edge to the Scorecard entity.

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) SetScorecard

SetScorecard sets the "scorecard" edge to the Scorecard entity.

func (*CertifyScorecardUpdate) SetScorecardID

func (csu *CertifyScorecardUpdate) SetScorecardID(i int) *CertifyScorecardUpdate

SetScorecardID sets the "scorecard_id" field.

func (*CertifyScorecardUpdate) SetSource

SetSource sets the "source" edge to the SourceName entity.

func (*CertifyScorecardUpdate) SetSourceID

func (csu *CertifyScorecardUpdate) SetSourceID(i int) *CertifyScorecardUpdate

SetSourceID sets the "source_id" 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) ClearScorecard

func (csuo *CertifyScorecardUpdateOne) ClearScorecard() *CertifyScorecardUpdateOne

ClearScorecard clears the "scorecard" edge to the Scorecard entity.

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) SetScorecard

SetScorecard sets the "scorecard" edge to the Scorecard entity.

func (*CertifyScorecardUpdateOne) SetScorecardID

func (csuo *CertifyScorecardUpdateOne) SetScorecardID(i int) *CertifyScorecardUpdateOne

SetScorecardID sets the "scorecard_id" field.

func (*CertifyScorecardUpdateOne) SetSource

SetSource sets the "source" edge to the SourceName entity.

func (*CertifyScorecardUpdateOne) SetSourceID

SetSourceID sets the "source_id" 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) SetScorecardID

func (u *CertifyScorecardUpsert) SetScorecardID(v int) *CertifyScorecardUpsert

SetScorecardID sets the "scorecard_id" field.

func (*CertifyScorecardUpsert) SetSourceID

SetSourceID sets the "source_id" field.

func (*CertifyScorecardUpsert) UpdateScorecardID

func (u *CertifyScorecardUpsert) UpdateScorecardID() *CertifyScorecardUpsert

UpdateScorecardID sets the "scorecard_id" 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.

type CertifyScorecardUpsertBulk

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

CertifyScorecardUpsertBulk is the builder for "upsert"-ing a bulk of CertifyScorecard nodes.

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) SetScorecardID

SetScorecardID sets the "scorecard_id" field.

func (*CertifyScorecardUpsertBulk) SetSourceID

SetSourceID sets the "source_id" field.

func (*CertifyScorecardUpsertBulk) Update

Update allows overriding fields `UPDATE` values. See the CertifyScorecardCreateBulk.OnConflict documentation for more info.

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(),
	).
	Exec(ctx)

func (*CertifyScorecardUpsertBulk) UpdateScorecardID

UpdateScorecardID sets the "scorecard_id" 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.

type CertifyScorecardUpsertOne

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

CertifyScorecardUpsertOne is the builder for "upsert"-ing

one CertifyScorecard node.

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 int, 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) SetScorecardID

SetScorecardID sets the "scorecard_id" field.

func (*CertifyScorecardUpsertOne) SetSourceID

SetSourceID sets the "source_id" field.

func (*CertifyScorecardUpsertOne) Update

Update allows overriding fields `UPDATE` values. See the CertifyScorecardCreate.OnConflict documentation for more info.

func (*CertifyScorecardUpsertOne) 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(),
	).
	Exec(ctx)

func (*CertifyScorecardUpsertOne) UpdateScorecardID

func (u *CertifyScorecardUpsertOne) UpdateScorecardID() *CertifyScorecardUpsertOne

UpdateScorecardID sets the "scorecard_id" 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.

type CertifyScorecards

type CertifyScorecards []*CertifyScorecard

CertifyScorecards is a parsable slice of CertifyScorecard.

type CertifyVex

type CertifyVex struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// PackageID holds the value of the "package_id" field.
	PackageID *int `json:"package_id,omitempty"`
	// ArtifactID holds the value of the "artifact_id" field.
	ArtifactID *int `json:"artifact_id,omitempty"`
	// VulnerabilityID holds the value of the "vulnerability_id" field.
	VulnerabilityID int `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"`
	// 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 int) *CertifyVexDeleteOne

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

func (*CertifyVexClient) Get

func (c *CertifyVexClient) Get(ctx context.Context, id int) (*CertifyVex, error)

Get returns a CertifyVex entity by its id.

func (*CertifyVexClient) GetX

func (c *CertifyVexClient) GetX(ctx context.Context, id int) *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 int) *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(i int) *CertifyVexCreate

SetArtifactID sets the "artifact_id" field.

func (*CertifyVexCreate) SetCollector

func (cvc *CertifyVexCreate) SetCollector(s string) *CertifyVexCreate

SetCollector sets the "collector" 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(i *int) *CertifyVexCreate

SetNillableArtifactID sets the "artifact_id" field if the given value is not nil.

func (*CertifyVexCreate) SetNillablePackageID

func (cvc *CertifyVexCreate) SetNillablePackageID(i *int) *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(i int) *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(i int) *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 int, 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 []int)

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) 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 int, 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) ([]int, 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 *int, 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) 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 *int, 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 int, 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 int, 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 []int)

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) 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(i int)

SetArtifactID sets the "artifact_id" field.

func (*CertifyVexMutation) SetCollector

func (m *CertifyVexMutation) SetCollector(s string)

SetCollector sets the "collector" 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) 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(i int)

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(i int)

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 int, exists bool)

VulnerabilityID returns the value of the "vulnerability_id" field in the mutation.

func (*CertifyVexMutation) VulnerabilityIDs

func (m *CertifyVexMutation) VulnerabilityIDs() (ids []int)

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 int, 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) int

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 int `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 []int, err error)

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

func (*CertifyVexQuery) IDsX

func (cvq *CertifyVexQuery) IDsX(ctx context.Context) []int

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 int, 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) int

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 int `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(i int) *CertifyVexUpdate

SetArtifactID sets the "artifact_id" field.

func (*CertifyVexUpdate) SetCollector

func (cvu *CertifyVexUpdate) SetCollector(s string) *CertifyVexUpdate

SetCollector sets the "collector" 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(i *int) *CertifyVexUpdate

SetNillableArtifactID sets the "artifact_id" field if the given value is not nil.

func (*CertifyVexUpdate) SetNillablePackageID

func (cvu *CertifyVexUpdate) SetNillablePackageID(i *int) *CertifyVexUpdate

SetNillablePackageID sets the "package_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(i int) *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(i int) *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(i int) *CertifyVexUpdateOne

SetArtifactID sets the "artifact_id" field.

func (*CertifyVexUpdateOne) SetCollector

func (cvuo *CertifyVexUpdateOne) SetCollector(s string) *CertifyVexUpdateOne

SetCollector sets the "collector" 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(i *int) *CertifyVexUpdateOne

SetNillableArtifactID sets the "artifact_id" field if the given value is not nil.

func (*CertifyVexUpdateOne) SetNillablePackageID

func (cvuo *CertifyVexUpdateOne) SetNillablePackageID(i *int) *CertifyVexUpdateOne

SetNillablePackageID sets the "package_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(i int) *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(i int) *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 int) *CertifyVexUpsert

SetArtifactID sets the "artifact_id" field.

func (*CertifyVexUpsert) SetCollector

func (u *CertifyVexUpsert) SetCollector(v string) *CertifyVexUpsert

SetCollector sets the "collector" 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 int) *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 int) *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) 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 int) *CertifyVexUpsertBulk

SetArtifactID sets the "artifact_id" field.

func (*CertifyVexUpsertBulk) SetCollector

func (u *CertifyVexUpsertBulk) SetCollector(v string) *CertifyVexUpsertBulk

SetCollector sets the "collector" 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 int) *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 int) *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) 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(),
	).
	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 int, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*CertifyVexUpsertOne) IDX

func (u *CertifyVexUpsertOne) IDX(ctx context.Context) int

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 int) *CertifyVexUpsertOne

SetArtifactID sets the "artifact_id" field.

func (*CertifyVexUpsertOne) SetCollector

func (u *CertifyVexUpsertOne) SetCollector(v string) *CertifyVexUpsertOne

SetCollector sets the "collector" 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 int) *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 int) *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) 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. Using this option is equivalent to using:

client.CertifyVex.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	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 int `json:"id,omitempty"`
	// VulnerabilityID holds the value of the "vulnerability_id" field.
	VulnerabilityID int `json:"vulnerability_id,omitempty"`
	// PackageID holds the value of the "package_id" field.
	PackageID int `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"`
	// 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 int) *CertifyVulnDeleteOne

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

func (*CertifyVulnClient) Get

func (c *CertifyVulnClient) Get(ctx context.Context, id int) (*CertifyVuln, error)

Get returns a CertifyVuln entity by its id.

func (*CertifyVulnClient) GetX

func (c *CertifyVulnClient) GetX(ctx context.Context, id int) *CertifyVuln

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 int) *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) 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(i int) *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(i int) *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) 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 int, 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) ([]int, 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) 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 int, 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 int, 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 int, exists bool)

PackageID returns the value of the "package_id" field in the mutation.

func (*CertifyVulnMutation) PackageIDs

func (m *CertifyVulnMutation) PackageIDs() (ids []int)

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) 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) 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) 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(i int)

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(i int)

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 int, exists bool)

VulnerabilityID returns the value of the "vulnerability_id" field in the mutation.

func (*CertifyVulnMutation) VulnerabilityIDs

func (m *CertifyVulnMutation) VulnerabilityIDs() (ids []int)

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 int, 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) int

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 int `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 []int, err error)

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

func (*CertifyVulnQuery) IDsX

func (cvq *CertifyVulnQuery) IDsX(ctx context.Context) []int

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 int, 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) int

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 int `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) 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(i int) *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(i int) *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) 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(i int) *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(i int) *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) SetOrigin

func (u *CertifyVulnUpsert) SetOrigin(v string) *CertifyVulnUpsert

SetOrigin sets the "origin" field.

func (*CertifyVulnUpsert) SetPackageID

func (u *CertifyVulnUpsert) SetPackageID(v int) *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 int) *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) 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) SetOrigin

SetOrigin sets the "origin" field.

func (*CertifyVulnUpsertBulk) SetPackageID

func (u *CertifyVulnUpsertBulk) SetPackageID(v int) *CertifyVulnUpsertBulk

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 int) *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) 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(),
	).
	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 int, 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) SetOrigin

SetOrigin sets the "origin" field.

func (*CertifyVulnUpsertOne) SetPackageID

func (u *CertifyVulnUpsertOne) SetPackageID(v int) *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 int) *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) UpdateNewValues

func (u *CertifyVulnUpsertOne) UpdateNewValues() *CertifyVulnUpsertOne

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(),
	).
	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
	// IsVulnerability is the client for interacting with the IsVulnerability builders.
	IsVulnerability *IsVulnerabilityClient
	// 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
	// PackageNamespace is the client for interacting with the PackageNamespace builders.
	PackageNamespace *PackageNamespaceClient
	// PackageType is the client for interacting with the PackageType builders.
	PackageType *PackageTypeClient
	// 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
	// Scorecard is the client for interacting with the Scorecard builders.
	Scorecard *ScorecardClient
	// SourceName is the client for interacting with the SourceName builders.
	SourceName *SourceNameClient
	// SourceNamespace is the client for interacting with the SourceNamespace builders.
	SourceNamespace *SourceNamespaceClient
	// SourceType is the client for interacting with the SourceType builders.
	SourceType *SourceTypeClient
	// VulnEqual is the client for interacting with the VulnEqual builders.
	VulnEqual *VulnEqualClient
	// VulnerabilityID is the client for interacting with the VulnerabilityID builders.
	VulnerabilityID *VulnerabilityIDClient
	// VulnerabilityType is the client for interacting with the VulnerabilityType builders.
	VulnerabilityType *VulnerabilityTypeClient
	// 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 int, 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 []int, 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[int]

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 int `json:"id,omitempty"`
	// PackageID holds the value of the "package_id" field.
	PackageID int `json:"package_id,omitempty"`
	// DependentPackageNameID holds the value of the "dependent_package_name_id" field.
	DependentPackageNameID int `json:"dependent_package_name_id,omitempty"`
	// DependentPackageVersionID holds the value of the "dependent_package_version_id" field.
	DependentPackageVersionID int `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"`
	// 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) IsNode

func (n *Dependency) IsNode()

IsNode implements the Node interface check for GQLGen.

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) 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 int) *DependencyDeleteOne

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

func (*DependencyClient) Get

func (c *DependencyClient) Get(ctx context.Context, id int) (*Dependency, error)

Get returns a Dependency entity by its id.

func (*DependencyClient) GetX

func (c *DependencyClient) GetX(ctx context.Context, id int) *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) 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 int) *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) 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(i int) *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(i int) *DependencyCreate

SetDependentPackageVersionID sets the "dependent_package_version_id" field.

func (*DependencyCreate) SetJustification

func (dc *DependencyCreate) SetJustification(s string) *DependencyCreate

SetJustification sets the "justification" field.

func (*DependencyCreate) SetNillableDependentPackageNameID

func (dc *DependencyCreate) SetNillableDependentPackageNameID(i *int) *DependencyCreate

SetNillableDependentPackageNameID sets the "dependent_package_name_id" field if the given value is not nil.

func (*DependencyCreate) SetNillableDependentPackageVersionID

func (dc *DependencyCreate) SetNillableDependentPackageVersionID(i *int) *DependencyCreate

SetNillableDependentPackageVersionID sets the "dependent_package_version_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(i int) *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"`
	// 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) 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) 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) 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 int, 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 []int)

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 int, 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 []int)

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) 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 int, 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) ([]int, 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) 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 int, 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 int, 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) 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 int, 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 int, exists bool)

PackageID returns the value of the "package_id" field in the mutation.

func (*DependencyMutation) PackageIDs

func (m *DependencyMutation) PackageIDs() (ids []int)

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) 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) 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) 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) 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(i int)

SetDependentPackageNameID sets the "dependent_package_name_id" field.

func (*DependencyMutation) SetDependentPackageVersionID

func (m *DependencyMutation) SetDependentPackageVersionID(i int)

SetDependentPackageVersionID sets the "dependent_package_version_id" 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) 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(i int)

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 int, 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) int

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 int `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 []int, err error)

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

func (*DependencyQuery) IDsX

func (dq *DependencyQuery) IDsX(ctx context.Context) []int

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 int, 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) int

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) 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 int `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) 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) 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) 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) 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(i int) *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(i int) *DependencyUpdate

SetDependentPackageVersionID sets the "dependent_package_version_id" field.

func (*DependencyUpdate) SetJustification

func (du *DependencyUpdate) SetJustification(s string) *DependencyUpdate

SetJustification sets the "justification" field.

func (*DependencyUpdate) SetNillableDependentPackageNameID

func (du *DependencyUpdate) SetNillableDependentPackageNameID(i *int) *DependencyUpdate

SetNillableDependentPackageNameID sets the "dependent_package_name_id" field if the given value is not nil.

func (*DependencyUpdate) SetNillableDependentPackageVersionID

func (du *DependencyUpdate) SetNillableDependentPackageVersionID(i *int) *DependencyUpdate

SetNillableDependentPackageVersionID sets the "dependent_package_version_id" 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(i int) *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) 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) 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) 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(i int) *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(i int) *DependencyUpdateOne

SetDependentPackageVersionID sets the "dependent_package_version_id" field.

func (*DependencyUpdateOne) SetJustification

func (duo *DependencyUpdateOne) SetJustification(s string) *DependencyUpdateOne

SetJustification sets the "justification" field.

func (*DependencyUpdateOne) SetNillableDependentPackageNameID

func (duo *DependencyUpdateOne) SetNillableDependentPackageNameID(i *int) *DependencyUpdateOne

SetNillableDependentPackageNameID sets the "dependent_package_name_id" field if the given value is not nil.

func (*DependencyUpdateOne) SetNillableDependentPackageVersionID

func (duo *DependencyUpdateOne) SetNillableDependentPackageVersionID(i *int) *DependencyUpdateOne

SetNillableDependentPackageVersionID sets the "dependent_package_version_id" 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(i int) *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 int) *DependencyUpsert

SetDependentPackageNameID sets the "dependent_package_name_id" field.

func (*DependencyUpsert) SetDependentPackageVersionID

func (u *DependencyUpsert) SetDependentPackageVersionID(v int) *DependencyUpsert

SetDependentPackageVersionID sets the "dependent_package_version_id" 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 int) *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) 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 int) *DependencyUpsertBulk

SetDependentPackageNameID sets the "dependent_package_name_id" field.

func (*DependencyUpsertBulk) SetDependentPackageVersionID

func (u *DependencyUpsertBulk) SetDependentPackageVersionID(v int) *DependencyUpsertBulk

SetDependentPackageVersionID sets the "dependent_package_version_id" 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 int) *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) 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(),
	).
	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 int, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*DependencyUpsertOne) IDX

func (u *DependencyUpsertOne) IDX(ctx context.Context) int

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 int) *DependencyUpsertOne

SetDependentPackageNameID sets the "dependent_package_name_id" field.

func (*DependencyUpsertOne) SetDependentPackageVersionID

func (u *DependencyUpsertOne) SetDependentPackageVersionID(v int) *DependencyUpsertOne

SetDependentPackageVersionID sets the "dependent_package_version_id" 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 int) *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) 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. Using this option is equivalent to using:

client.Dependency.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	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 int `json:"id,omitempty"`
	// SourceID holds the value of the "source_id" field.
	SourceID *int `json:"source_id,omitempty"`
	// PackageVersionID holds the value of the "package_version_id" field.
	PackageVersionID *int `json:"package_version_id,omitempty"`
	// PackageNameID holds the value of the "package_name_id" field.
	PackageNameID *int `json:"package_name_id,omitempty"`
	// ArtifactID holds the value of the "artifact_id" field.
	ArtifactID *int `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"`
	// 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 int) *HasMetadataDeleteOne

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

func (*HasMetadataClient) Get added in v0.2.1

func (c *HasMetadataClient) Get(ctx context.Context, id int) (*HasMetadata, error)

Get returns a HasMetadata entity by its id.

func (*HasMetadataClient) GetX added in v0.2.1

func (c *HasMetadataClient) GetX(ctx context.Context, id int) *HasMetadata

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 int) *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 int) *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(i int) *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) 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 *int) *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(i *int) *HasMetadataCreate

SetNillableArtifactID sets the "artifact_id" field if the given value is not nil.

func (*HasMetadataCreate) SetNillablePackageNameID added in v0.2.1

func (hmc *HasMetadataCreate) SetNillablePackageNameID(i *int) *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(i *int) *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(i *int) *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(i int) *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(i int) *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(i int) *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 int, 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 []int)

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 int, 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 []int)

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) 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 int, 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) ([]int, 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 *int, 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) 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 *int, 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 *int, 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 *int, 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 int, 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 int, 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 []int)

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) 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 int)

SetAllVersionsID sets the "all_versions" edge to the PackageName entity by id.

func (*HasMetadataMutation) SetArtifactID added in v0.2.1

func (m *HasMetadataMutation) SetArtifactID(i int)

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) 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) 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(i int)

SetPackageNameID sets the "package_name_id" field.

func (*HasMetadataMutation) SetPackageVersionID added in v0.2.1

func (m *HasMetadataMutation) SetPackageVersionID(i int)

SetPackageVersionID sets the "package_version_id" field.

func (*HasMetadataMutation) SetSourceID added in v0.2.1

func (m *HasMetadataMutation) SetSourceID(i int)

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 int, 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 []int)

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 int, 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) int

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 int `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 []int, 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) []int

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 int, 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) int

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 int `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 int) *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(i int) *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) 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 *int) *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(i *int) *HasMetadataUpdate

SetNillableArtifactID sets the "artifact_id" field if the given value is not nil.

func (*HasMetadataUpdate) SetNillablePackageNameID added in v0.2.1

func (hmu *HasMetadataUpdate) SetNillablePackageNameID(i *int) *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(i *int) *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(i *int) *HasMetadataUpdate

SetNillableSourceID sets the "source_id" 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(i int) *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(i int) *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(i int) *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 int) *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(i int) *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) 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 *int) *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(i *int) *HasMetadataUpdateOne

SetNillableArtifactID sets the "artifact_id" field if the given value is not nil.

func (*HasMetadataUpdateOne) SetNillablePackageNameID added in v0.2.1

func (hmuo *HasMetadataUpdateOne) SetNillablePackageNameID(i *int) *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(i *int) *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(i *int) *HasMetadataUpdateOne

SetNillableSourceID sets the "source_id" 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(i int) *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(i int) *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(i int) *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 int) *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) 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 int) *HasMetadataUpsert

SetPackageNameID sets the "package_name_id" field.

func (*HasMetadataUpsert) SetPackageVersionID added in v0.2.1

func (u *HasMetadataUpsert) SetPackageVersionID(v int) *HasMetadataUpsert

SetPackageVersionID sets the "package_version_id" field.

func (*HasMetadataUpsert) SetSourceID added in v0.2.1

func (u *HasMetadataUpsert) SetSourceID(v int) *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) 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

func (u *HasMetadataUpsertBulk) SetArtifactID(v int) *HasMetadataUpsertBulk

SetArtifactID sets the "artifact_id" field.

func (*HasMetadataUpsertBulk) SetCollector added in v0.2.1

SetCollector sets the "collector" 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 int) *HasMetadataUpsertBulk

SetPackageNameID sets the "package_name_id" field.

func (*HasMetadataUpsertBulk) SetPackageVersionID added in v0.2.1

func (u *HasMetadataUpsertBulk) SetPackageVersionID(v int) *HasMetadataUpsertBulk

SetPackageVersionID sets the "package_version_id" field.

func (*HasMetadataUpsertBulk) SetSourceID added in v0.2.1

func (u *HasMetadataUpsertBulk) SetSourceID(v int) *HasMetadataUpsertBulk

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) 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(),
	).
	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 int, 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 int) *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) 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 int) *HasMetadataUpsertOne

SetPackageNameID sets the "package_name_id" field.

func (*HasMetadataUpsertOne) SetPackageVersionID added in v0.2.1

func (u *HasMetadataUpsertOne) SetPackageVersionID(v int) *HasMetadataUpsertOne

SetPackageVersionID sets the "package_version_id" field.

func (*HasMetadataUpsertOne) SetSourceID added in v0.2.1

func (u *HasMetadataUpsertOne) SetSourceID(v int) *HasMetadataUpsertOne

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) 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. Using this option is equivalent to using:

client.HasMetadata.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	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 int `json:"id,omitempty"`
	// PackageVersionID holds the value of the "package_version_id" field.
	PackageVersionID *int `json:"package_version_id,omitempty"`
	// PackageNameID holds the value of the "package_name_id" field.
	PackageNameID *int `json:"package_name_id,omitempty"`
	// SourceID holds the value of the "source_id" field.
	SourceID int `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"`
	// 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 int) *HasSourceAtDeleteOne

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

func (*HasSourceAtClient) Get

func (c *HasSourceAtClient) Get(ctx context.Context, id int) (*HasSourceAt, error)

Get returns a HasSourceAt entity by its id.

func (*HasSourceAtClient) GetX

func (c *HasSourceAtClient) GetX(ctx context.Context, id int) *HasSourceAt

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 int) *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 int) *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) 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 *int) *HasSourceAtCreate

SetNillableAllVersionsID sets the "all_versions" edge to the PackageName entity by ID if the given value is not nil.

func (*HasSourceAtCreate) SetNillablePackageNameID

func (hsac *HasSourceAtCreate) SetNillablePackageNameID(i *int) *HasSourceAtCreate

SetNillablePackageNameID sets the "package_name_id" field if the given value is not nil.

func (*HasSourceAtCreate) SetNillablePackageVersionID

func (hsac *HasSourceAtCreate) SetNillablePackageVersionID(i *int) *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(i int) *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(i int) *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(i int) *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 int, exists bool)

AllVersionsID returns the "all_versions" edge ID in the mutation.

func (*HasSourceAtMutation) AllVersionsIDs

func (m *HasSourceAtMutation) AllVersionsIDs() (ids []int)

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) 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 int, 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) ([]int, 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) 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 *int, 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 *int, 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 int, 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 int, 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 int, 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 []int)

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) 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 int)

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) 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) 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(i int)

SetPackageNameID sets the "package_name_id" field.

func (*HasSourceAtMutation) SetPackageVersionID

func (m *HasSourceAtMutation) SetPackageVersionID(i int)

SetPackageVersionID sets the "package_version_id" field.

func (*HasSourceAtMutation) SetSourceID

func (m *HasSourceAtMutation) SetSourceID(i int)

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 int, exists bool)

SourceID returns the value of the "source_id" field in the mutation.

func (*HasSourceAtMutation) SourceIDs

func (m *HasSourceAtMutation) SourceIDs() (ids []int)

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 int, 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) int

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 int `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 []int, err error)

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

func (*HasSourceAtQuery) IDsX

func (hsaq *HasSourceAtQuery) IDsX(ctx context.Context) []int

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 int, 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) int

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 int `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 int) *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) 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 *int) *HasSourceAtUpdate

SetNillableAllVersionsID sets the "all_versions" edge to the PackageName entity by ID if the given value is not nil.

func (*HasSourceAtUpdate) SetNillablePackageNameID

func (hsau *HasSourceAtUpdate) SetNillablePackageNameID(i *int) *HasSourceAtUpdate

SetNillablePackageNameID sets the "package_name_id" field if the given value is not nil.

func (*HasSourceAtUpdate) SetNillablePackageVersionID

func (hsau *HasSourceAtUpdate) SetNillablePackageVersionID(i *int) *HasSourceAtUpdate

SetNillablePackageVersionID sets the "package_version_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(i int) *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(i int) *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(i int) *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 int) *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) 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 *int) *HasSourceAtUpdateOne

SetNillableAllVersionsID sets the "all_versions" edge to the PackageName entity by ID if the given value is not nil.

func (*HasSourceAtUpdateOne) SetNillablePackageNameID

func (hsauo *HasSourceAtUpdateOne) SetNillablePackageNameID(i *int) *HasSourceAtUpdateOne

SetNillablePackageNameID sets the "package_name_id" field if the given value is not nil.

func (*HasSourceAtUpdateOne) SetNillablePackageVersionID

func (hsauo *HasSourceAtUpdateOne) SetNillablePackageVersionID(i *int) *HasSourceAtUpdateOne

SetNillablePackageVersionID sets the "package_version_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(i int) *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(i int) *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(i int) *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) 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 int) *HasSourceAtUpsert

SetPackageNameID sets the "package_name_id" field.

func (*HasSourceAtUpsert) SetPackageVersionID

func (u *HasSourceAtUpsert) SetPackageVersionID(v int) *HasSourceAtUpsert

SetPackageVersionID sets the "package_version_id" field.

func (*HasSourceAtUpsert) SetSourceID

func (u *HasSourceAtUpsert) SetSourceID(v int) *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) 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) 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 int) *HasSourceAtUpsertBulk

SetPackageNameID sets the "package_name_id" field.

func (*HasSourceAtUpsertBulk) SetPackageVersionID

func (u *HasSourceAtUpsertBulk) SetPackageVersionID(v int) *HasSourceAtUpsertBulk

SetPackageVersionID sets the "package_version_id" field.

func (*HasSourceAtUpsertBulk) SetSourceID

func (u *HasSourceAtUpsertBulk) SetSourceID(v int) *HasSourceAtUpsertBulk

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) 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(),
	).
	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 int, 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) 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 int) *HasSourceAtUpsertOne

SetPackageNameID sets the "package_name_id" field.

func (*HasSourceAtUpsertOne) SetPackageVersionID

func (u *HasSourceAtUpsertOne) SetPackageVersionID(v int) *HasSourceAtUpsertOne

SetPackageVersionID sets the "package_version_id" field.

func (*HasSourceAtUpsertOne) SetSourceID

func (u *HasSourceAtUpsertOne) SetSourceID(v int) *HasSourceAtUpsertOne

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) 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. Using this option is equivalent to using:

client.HasSourceAt.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	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 int `json:"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"`
	// 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) Artifacts

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

func (*HashEqual) IsNode

func (n *HashEqual) IsNode()

IsNode implements the Node interface check for GQLGen.

func (*HashEqual) NamedArtifacts

func (he *HashEqual) NamedArtifacts(name string) ([]*Artifact, error)

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

func (*HashEqual) QueryArtifacts

func (he *HashEqual) QueryArtifacts() *ArtifactQuery

QueryArtifacts queries the "artifacts" 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 int) *HashEqualDeleteOne

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

func (*HashEqualClient) Get

func (c *HashEqualClient) Get(ctx context.Context, id int) (*HashEqual, error)

Get returns a HashEqual entity by its id.

func (*HashEqualClient) GetX

func (c *HashEqualClient) GetX(ctx context.Context, id int) *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) QueryArtifacts

func (c *HashEqualClient) QueryArtifacts(he *HashEqual) *ArtifactQuery

QueryArtifacts queries the artifacts 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 int) *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) AddArtifactIDs

func (hec *HashEqualCreate) AddArtifactIDs(ids ...int) *HashEqualCreate

AddArtifactIDs adds the "artifacts" edge to the Artifact entity by IDs.

func (*HashEqualCreate) AddArtifacts

func (hec *HashEqualCreate) AddArtifacts(a ...*Artifact) *HashEqualCreate

AddArtifacts adds the "artifacts" edges to the Artifact 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().
	SetOrigin(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) {
		SetOrigin(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) SetCollector

func (hec *HashEqualCreate) SetCollector(s string) *HashEqualCreate

SetCollector sets the "collector" field.

func (*HashEqualCreate) SetJustification

func (hec *HashEqualCreate) SetJustification(s string) *HashEqualCreate

SetJustification sets the "justification" field.

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) {
		SetOrigin(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 {
	// Artifacts holds the value of the artifacts edge.
	Artifacts []*Artifact `json:"artifacts,omitempty"`
	// contains filtered or unexported fields
}

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

func (HashEqualEdges) ArtifactsOrErr

func (e HashEqualEdges) ArtifactsOrErr() ([]*Artifact, error)

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

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) AddArtifactIDs

func (m *HashEqualMutation) AddArtifactIDs(ids ...int)

AddArtifactIDs adds the "artifacts" edge to the Artifact entity by ids.

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) ArtifactsCleared

func (m *HashEqualMutation) ArtifactsCleared() bool

ArtifactsCleared reports if the "artifacts" edge to the Artifact entity was cleared.

func (*HashEqualMutation) ArtifactsIDs

func (m *HashEqualMutation) ArtifactsIDs() (ids []int)

ArtifactsIDs returns the "artifacts" edge IDs in the mutation.

func (*HashEqualMutation) ClearArtifacts

func (m *HashEqualMutation) ClearArtifacts()

ClearArtifacts clears the "artifacts" 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) 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) 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 int, 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) ([]int, 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) 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) 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) RemoveArtifactIDs

func (m *HashEqualMutation) RemoveArtifactIDs(ids ...int)

RemoveArtifactIDs removes the "artifacts" edge to the Artifact entity by IDs.

func (*HashEqualMutation) RemovedArtifactsIDs

func (m *HashEqualMutation) RemovedArtifactsIDs() (ids []int)

RemovedArtifacts returns the removed IDs of the "artifacts" edge to the Artifact entity.

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) ResetArtifacts

func (m *HashEqualMutation) ResetArtifacts()

ResetArtifacts resets all changes to the "artifacts" edge.

func (*HashEqualMutation) ResetCollector

func (m *HashEqualMutation) ResetCollector()

ResetCollector resets all changes to the "collector" 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) 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) SetCollector

func (m *HashEqualMutation) SetCollector(s string)

SetCollector sets the "collector" 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) 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 int, 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) int

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 {
	Origin string `json:"origin,omitempty"`
	Count int `json:"count,omitempty"`
}

client.HashEqual.Query().
	GroupBy(hashequal.FieldOrigin).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*HashEqualQuery) IDs

func (heq *HashEqualQuery) IDs(ctx context.Context) (ids []int, err error)

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

func (*HashEqualQuery) IDsX

func (heq *HashEqualQuery) IDsX(ctx context.Context) []int

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 int, 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) int

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) QueryArtifacts

func (heq *HashEqualQuery) QueryArtifacts() *ArtifactQuery

QueryArtifacts chains the current query on the "artifacts" 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 {
	Origin string `json:"origin,omitempty"`
}

client.HashEqual.Query().
	Select(hashequal.FieldOrigin).
	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) WithArtifacts

func (heq *HashEqualQuery) WithArtifacts(opts ...func(*ArtifactQuery)) *HashEqualQuery

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

func (*HashEqualQuery) WithNamedArtifacts

func (heq *HashEqualQuery) WithNamedArtifacts(name string, opts ...func(*ArtifactQuery)) *HashEqualQuery

WithNamedArtifacts tells the query-builder to eager-load the nodes that are connected to the "artifacts" edge with the given name. 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) AddArtifactIDs

func (heu *HashEqualUpdate) AddArtifactIDs(ids ...int) *HashEqualUpdate

AddArtifactIDs adds the "artifacts" edge to the Artifact entity by IDs.

func (*HashEqualUpdate) AddArtifacts

func (heu *HashEqualUpdate) AddArtifacts(a ...*Artifact) *HashEqualUpdate

AddArtifacts adds the "artifacts" edges to the Artifact entity.

func (*HashEqualUpdate) ClearArtifacts

func (heu *HashEqualUpdate) ClearArtifacts() *HashEqualUpdate

ClearArtifacts clears all "artifacts" edges 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) RemoveArtifactIDs

func (heu *HashEqualUpdate) RemoveArtifactIDs(ids ...int) *HashEqualUpdate

RemoveArtifactIDs removes the "artifacts" edge to Artifact entities by IDs.

func (*HashEqualUpdate) RemoveArtifacts

func (heu *HashEqualUpdate) RemoveArtifacts(a ...*Artifact) *HashEqualUpdate

RemoveArtifacts removes "artifacts" edges to Artifact entities.

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) SetCollector

func (heu *HashEqualUpdate) SetCollector(s string) *HashEqualUpdate

SetCollector sets the "collector" field.

func (*HashEqualUpdate) SetJustification

func (heu *HashEqualUpdate) SetJustification(s string) *HashEqualUpdate

SetJustification sets the "justification" field.

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) AddArtifactIDs

func (heuo *HashEqualUpdateOne) AddArtifactIDs(ids ...int) *HashEqualUpdateOne

AddArtifactIDs adds the "artifacts" edge to the Artifact entity by IDs.

func (*HashEqualUpdateOne) AddArtifacts

func (heuo *HashEqualUpdateOne) AddArtifacts(a ...*Artifact) *HashEqualUpdateOne

AddArtifacts adds the "artifacts" edges to the Artifact entity.

func (*HashEqualUpdateOne) ClearArtifacts

func (heuo *HashEqualUpdateOne) ClearArtifacts() *HashEqualUpdateOne

ClearArtifacts clears all "artifacts" edges 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) RemoveArtifactIDs

func (heuo *HashEqualUpdateOne) RemoveArtifactIDs(ids ...int) *HashEqualUpdateOne

RemoveArtifactIDs removes the "artifacts" edge to Artifact entities by IDs.

func (*HashEqualUpdateOne) RemoveArtifacts

func (heuo *HashEqualUpdateOne) RemoveArtifacts(a ...*Artifact) *HashEqualUpdateOne

RemoveArtifacts removes "artifacts" edges to Artifact entities.

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) SetCollector

func (heuo *HashEqualUpdateOne) SetCollector(s string) *HashEqualUpdateOne

SetCollector sets the "collector" field.

func (*HashEqualUpdateOne) SetJustification

func (heuo *HashEqualUpdateOne) SetJustification(s string) *HashEqualUpdateOne

SetJustification sets the "justification" field.

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) SetCollector

func (u *HashEqualUpsert) SetCollector(v string) *HashEqualUpsert

SetCollector sets the "collector" 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) UpdateCollector

func (u *HashEqualUpsert) UpdateCollector() *HashEqualUpsert

UpdateCollector sets the "collector" 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) SetCollector

func (u *HashEqualUpsertBulk) SetCollector(v string) *HashEqualUpsertBulk

SetCollector sets the "collector" 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) UpdateCollector

func (u *HashEqualUpsertBulk) UpdateCollector() *HashEqualUpsertBulk

UpdateCollector sets the "collector" 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(),
	).
	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 int, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*HashEqualUpsertOne) IDX

func (u *HashEqualUpsertOne) IDX(ctx context.Context) int

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) SetCollector

func (u *HashEqualUpsertOne) SetCollector(v string) *HashEqualUpsertOne

SetCollector sets the "collector" 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) UpdateCollector

func (u *HashEqualUpsertOne) UpdateCollector() *HashEqualUpsertOne

UpdateCollector sets the "collector" 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. Using this option is equivalent to using:

client.HashEqual.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	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 IsVulnerabilities

type IsVulnerabilities []*IsVulnerability

IsVulnerabilities is a parsable slice of IsVulnerability.

type IsVulnerability

type IsVulnerability struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// OsvID holds the value of the "osv_id" field.
	OsvID int `json:"osv_id,omitempty"`
	// VulnerabilityID holds the value of the "vulnerability_id" field.
	VulnerabilityID int `json:"vulnerability_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"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the IsVulnerabilityQuery when eager-loading is set.
	Edges IsVulnerabilityEdges `json:"edges"`
	// contains filtered or unexported fields
}

IsVulnerability is the model entity for the IsVulnerability schema.

func (*IsVulnerability) IsNode

func (n *IsVulnerability) IsNode()

IsNode implements the Node interface check for GQLGen.

func (*IsVulnerability) Osv

func (*IsVulnerability) QueryOsv

func (iv *IsVulnerability) QueryOsv() *VulnerabilityTypeQuery

QueryOsv queries the "osv" edge of the IsVulnerability entity.

func (*IsVulnerability) QueryVulnerability

func (iv *IsVulnerability) QueryVulnerability() *VulnerabilityTypeQuery

QueryVulnerability queries the "vulnerability" edge of the IsVulnerability entity.

func (*IsVulnerability) String

func (iv *IsVulnerability) String() string

String implements the fmt.Stringer.

func (*IsVulnerability) ToEdge

ToEdge converts IsVulnerability into IsVulnerabilityEdge.

func (*IsVulnerability) Unwrap

func (iv *IsVulnerability) Unwrap() *IsVulnerability

Unwrap unwraps the IsVulnerability 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 (*IsVulnerability) Update

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

func (*IsVulnerability) Value

func (iv *IsVulnerability) Value(name string) (ent.Value, error)

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

func (*IsVulnerability) Vulnerability

func (iv *IsVulnerability) Vulnerability(ctx context.Context) (*VulnerabilityType, error)

type IsVulnerabilityClient

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

IsVulnerabilityClient is a client for the IsVulnerability schema.

func NewIsVulnerabilityClient

func NewIsVulnerabilityClient(c config) *IsVulnerabilityClient

NewIsVulnerabilityClient returns a client for the IsVulnerability from the given config.

func (*IsVulnerabilityClient) Create

Create returns a builder for creating a IsVulnerability entity.

func (*IsVulnerabilityClient) CreateBulk

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

func (*IsVulnerabilityClient) Delete

Delete returns a delete builder for IsVulnerability.

func (*IsVulnerabilityClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*IsVulnerabilityClient) DeleteOneID

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

func (*IsVulnerabilityClient) Get

Get returns a IsVulnerability entity by its id.

func (*IsVulnerabilityClient) GetX

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

func (*IsVulnerabilityClient) Hooks

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

Hooks returns the client hooks.

func (*IsVulnerabilityClient) Intercept

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

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

func (*IsVulnerabilityClient) Interceptors

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

Interceptors returns the client interceptors.

func (*IsVulnerabilityClient) MapCreateBulk

func (c *IsVulnerabilityClient) MapCreateBulk(slice any, setFunc func(*IsVulnerabilityCreate, int)) *IsVulnerabilityCreateBulk

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 (*IsVulnerabilityClient) Query

Query returns a query builder for IsVulnerability.

func (*IsVulnerabilityClient) QueryOsv

QueryOsv queries the osv edge of a IsVulnerability.

func (*IsVulnerabilityClient) QueryVulnerability

func (c *IsVulnerabilityClient) QueryVulnerability(iv *IsVulnerability) *VulnerabilityTypeQuery

QueryVulnerability queries the vulnerability edge of a IsVulnerability.

func (*IsVulnerabilityClient) Update

Update returns an update builder for IsVulnerability.

func (*IsVulnerabilityClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*IsVulnerabilityClient) UpdateOneID

UpdateOneID returns an update builder for the given id.

func (*IsVulnerabilityClient) Use

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

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

type IsVulnerabilityConnection

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

IsVulnerabilityConnection is the connection containing edges to IsVulnerability.

type IsVulnerabilityCreate

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

IsVulnerabilityCreate is the builder for creating a IsVulnerability entity.

func (*IsVulnerabilityCreate) Exec

func (ivc *IsVulnerabilityCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*IsVulnerabilityCreate) ExecX

func (ivc *IsVulnerabilityCreate) ExecX(ctx context.Context)

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

func (*IsVulnerabilityCreate) Mutation

Mutation returns the IsVulnerabilityMutation object of the builder.

func (*IsVulnerabilityCreate) OnConflict

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

client.IsVulnerability.Create().
	SetOsvID(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.IsVulnerabilityUpsert) {
		SetOsvID(v+v).
	}).
	Exec(ctx)

func (*IsVulnerabilityCreate) OnConflictColumns

func (ivc *IsVulnerabilityCreate) OnConflictColumns(columns ...string) *IsVulnerabilityUpsertOne

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

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

func (*IsVulnerabilityCreate) Save

Save creates the IsVulnerability in the database.

func (*IsVulnerabilityCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*IsVulnerabilityCreate) SetCollector

func (ivc *IsVulnerabilityCreate) SetCollector(s string) *IsVulnerabilityCreate

SetCollector sets the "collector" field.

func (*IsVulnerabilityCreate) SetJustification

func (ivc *IsVulnerabilityCreate) SetJustification(s string) *IsVulnerabilityCreate

SetJustification sets the "justification" field.

func (*IsVulnerabilityCreate) SetOrigin

SetOrigin sets the "origin" field.

func (*IsVulnerabilityCreate) SetOsv

SetOsv sets the "osv" edge to the VulnerabilityType entity.

func (*IsVulnerabilityCreate) SetOsvID

SetOsvID sets the "osv_id" field.

func (*IsVulnerabilityCreate) SetVulnerability

SetVulnerability sets the "vulnerability" edge to the VulnerabilityType entity.

func (*IsVulnerabilityCreate) SetVulnerabilityID

func (ivc *IsVulnerabilityCreate) SetVulnerabilityID(i int) *IsVulnerabilityCreate

SetVulnerabilityID sets the "vulnerability_id" field.

type IsVulnerabilityCreateBulk

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

IsVulnerabilityCreateBulk is the builder for creating many IsVulnerability entities in bulk.

func (*IsVulnerabilityCreateBulk) Exec

Exec executes the query.

func (*IsVulnerabilityCreateBulk) ExecX

func (ivcb *IsVulnerabilityCreateBulk) ExecX(ctx context.Context)

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

func (*IsVulnerabilityCreateBulk) OnConflict

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

client.IsVulnerability.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.IsVulnerabilityUpsert) {
		SetOsvID(v+v).
	}).
	Exec(ctx)

func (*IsVulnerabilityCreateBulk) OnConflictColumns

func (ivcb *IsVulnerabilityCreateBulk) OnConflictColumns(columns ...string) *IsVulnerabilityUpsertBulk

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

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

func (*IsVulnerabilityCreateBulk) Save

Save creates the IsVulnerability entities in the database.

func (*IsVulnerabilityCreateBulk) SaveX

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

type IsVulnerabilityDelete

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

IsVulnerabilityDelete is the builder for deleting a IsVulnerability entity.

func (*IsVulnerabilityDelete) Exec

func (ivd *IsVulnerabilityDelete) Exec(ctx context.Context) (int, error)

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

func (*IsVulnerabilityDelete) ExecX

func (ivd *IsVulnerabilityDelete) ExecX(ctx context.Context) int

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

func (*IsVulnerabilityDelete) Where

Where appends a list predicates to the IsVulnerabilityDelete builder.

type IsVulnerabilityDeleteOne

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

IsVulnerabilityDeleteOne is the builder for deleting a single IsVulnerability entity.

func (*IsVulnerabilityDeleteOne) Exec

Exec executes the deletion query.

func (*IsVulnerabilityDeleteOne) ExecX

func (ivdo *IsVulnerabilityDeleteOne) ExecX(ctx context.Context)

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

func (*IsVulnerabilityDeleteOne) Where

Where appends a list predicates to the IsVulnerabilityDelete builder.

type IsVulnerabilityEdge

type IsVulnerabilityEdge struct {
	Node   *IsVulnerability `json:"node"`
	Cursor Cursor           `json:"cursor"`
}

IsVulnerabilityEdge is the edge representation of IsVulnerability.

type IsVulnerabilityEdges

type IsVulnerabilityEdges struct {
	// Osv holds the value of the osv edge.
	Osv *VulnerabilityType `json:"osv,omitempty"`
	// Vulnerability holds the value of the vulnerability edge.
	Vulnerability *VulnerabilityType `json:"vulnerability,omitempty"`
	// contains filtered or unexported fields
}

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

func (IsVulnerabilityEdges) OsvOrErr

func (e IsVulnerabilityEdges) OsvOrErr() (*VulnerabilityType, error)

OsvOrErr returns the Osv value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (IsVulnerabilityEdges) VulnerabilityOrErr

func (e IsVulnerabilityEdges) VulnerabilityOrErr() (*VulnerabilityType, 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 IsVulnerabilityGroupBy

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

IsVulnerabilityGroupBy is the group-by builder for IsVulnerability entities.

func (*IsVulnerabilityGroupBy) Aggregate

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

func (*IsVulnerabilityGroupBy) Bool

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

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

func (*IsVulnerabilityGroupBy) BoolX

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

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

func (*IsVulnerabilityGroupBy) Bools

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

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

func (*IsVulnerabilityGroupBy) BoolsX

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

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

func (*IsVulnerabilityGroupBy) Float64

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

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

func (*IsVulnerabilityGroupBy) Float64X

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

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

func (*IsVulnerabilityGroupBy) Float64s

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

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

func (*IsVulnerabilityGroupBy) Float64sX

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

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

func (*IsVulnerabilityGroupBy) Int

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

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

func (*IsVulnerabilityGroupBy) IntX

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

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

func (*IsVulnerabilityGroupBy) Ints

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

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

func (*IsVulnerabilityGroupBy) IntsX

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

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

func (*IsVulnerabilityGroupBy) Scan

func (ivgb *IsVulnerabilityGroupBy) Scan(ctx context.Context, v any) error

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

func (*IsVulnerabilityGroupBy) ScanX

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

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

func (*IsVulnerabilityGroupBy) String

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

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

func (*IsVulnerabilityGroupBy) StringX

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

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

func (*IsVulnerabilityGroupBy) Strings

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

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

func (*IsVulnerabilityGroupBy) StringsX

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

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

type IsVulnerabilityMutation

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

IsVulnerabilityMutation represents an operation that mutates the IsVulnerability nodes in the graph.

func (*IsVulnerabilityMutation) AddField

func (m *IsVulnerabilityMutation) 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 (*IsVulnerabilityMutation) AddedEdges

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

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

func (*IsVulnerabilityMutation) AddedField

func (m *IsVulnerabilityMutation) 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 (*IsVulnerabilityMutation) AddedFields

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

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

func (*IsVulnerabilityMutation) AddedIDs

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

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

func (*IsVulnerabilityMutation) ClearEdge

func (m *IsVulnerabilityMutation) 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 (*IsVulnerabilityMutation) ClearField

func (m *IsVulnerabilityMutation) 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 (*IsVulnerabilityMutation) ClearOsv

func (m *IsVulnerabilityMutation) ClearOsv()

ClearOsv clears the "osv" edge to the VulnerabilityType entity.

func (*IsVulnerabilityMutation) ClearVulnerability

func (m *IsVulnerabilityMutation) ClearVulnerability()

ClearVulnerability clears the "vulnerability" edge to the VulnerabilityType entity.

func (*IsVulnerabilityMutation) ClearedEdges

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

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

func (*IsVulnerabilityMutation) ClearedFields

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

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

func (IsVulnerabilityMutation) Client

func (m IsVulnerabilityMutation) 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 (*IsVulnerabilityMutation) Collector

func (m *IsVulnerabilityMutation) Collector() (r string, exists bool)

Collector returns the value of the "collector" field in the mutation.

func (*IsVulnerabilityMutation) EdgeCleared

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

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

func (*IsVulnerabilityMutation) Field

func (m *IsVulnerabilityMutation) 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 (*IsVulnerabilityMutation) FieldCleared

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

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

func (*IsVulnerabilityMutation) Fields

func (m *IsVulnerabilityMutation) 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 (*IsVulnerabilityMutation) ID

func (m *IsVulnerabilityMutation) ID() (id int, 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 (*IsVulnerabilityMutation) IDs

func (m *IsVulnerabilityMutation) IDs(ctx context.Context) ([]int, 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 (*IsVulnerabilityMutation) Justification

func (m *IsVulnerabilityMutation) Justification() (r string, exists bool)

Justification returns the value of the "justification" field in the mutation.

func (*IsVulnerabilityMutation) OldCollector

func (m *IsVulnerabilityMutation) OldCollector(ctx context.Context) (v string, err error)

OldCollector returns the old "collector" field's value of the IsVulnerability entity. If the IsVulnerability 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 (*IsVulnerabilityMutation) OldField

func (m *IsVulnerabilityMutation) 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 (*IsVulnerabilityMutation) OldJustification

func (m *IsVulnerabilityMutation) OldJustification(ctx context.Context) (v string, err error)

OldJustification returns the old "justification" field's value of the IsVulnerability entity. If the IsVulnerability 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 (*IsVulnerabilityMutation) OldOrigin

func (m *IsVulnerabilityMutation) OldOrigin(ctx context.Context) (v string, err error)

OldOrigin returns the old "origin" field's value of the IsVulnerability entity. If the IsVulnerability 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 (*IsVulnerabilityMutation) OldOsvID

func (m *IsVulnerabilityMutation) OldOsvID(ctx context.Context) (v int, err error)

OldOsvID returns the old "osv_id" field's value of the IsVulnerability entity. If the IsVulnerability 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 (*IsVulnerabilityMutation) OldVulnerabilityID

func (m *IsVulnerabilityMutation) OldVulnerabilityID(ctx context.Context) (v int, err error)

OldVulnerabilityID returns the old "vulnerability_id" field's value of the IsVulnerability entity. If the IsVulnerability 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 (*IsVulnerabilityMutation) Op

func (m *IsVulnerabilityMutation) Op() Op

Op returns the operation name.

func (*IsVulnerabilityMutation) Origin

func (m *IsVulnerabilityMutation) Origin() (r string, exists bool)

Origin returns the value of the "origin" field in the mutation.

func (*IsVulnerabilityMutation) OsvCleared

func (m *IsVulnerabilityMutation) OsvCleared() bool

OsvCleared reports if the "osv" edge to the VulnerabilityType entity was cleared.

func (*IsVulnerabilityMutation) OsvID

func (m *IsVulnerabilityMutation) OsvID() (r int, exists bool)

OsvID returns the value of the "osv_id" field in the mutation.

func (*IsVulnerabilityMutation) OsvIDs

func (m *IsVulnerabilityMutation) OsvIDs() (ids []int)

OsvIDs returns the "osv" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use OsvID instead. It exists only for internal usage by the builders.

func (*IsVulnerabilityMutation) RemovedEdges

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

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

func (*IsVulnerabilityMutation) RemovedIDs

func (m *IsVulnerabilityMutation) 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 (*IsVulnerabilityMutation) ResetCollector

func (m *IsVulnerabilityMutation) ResetCollector()

ResetCollector resets all changes to the "collector" field.

func (*IsVulnerabilityMutation) ResetEdge

func (m *IsVulnerabilityMutation) 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 (*IsVulnerabilityMutation) ResetField

func (m *IsVulnerabilityMutation) 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 (*IsVulnerabilityMutation) ResetJustification

func (m *IsVulnerabilityMutation) ResetJustification()

ResetJustification resets all changes to the "justification" field.

func (*IsVulnerabilityMutation) ResetOrigin

func (m *IsVulnerabilityMutation) ResetOrigin()

ResetOrigin resets all changes to the "origin" field.

func (*IsVulnerabilityMutation) ResetOsv

func (m *IsVulnerabilityMutation) ResetOsv()

ResetOsv resets all changes to the "osv" edge.

func (*IsVulnerabilityMutation) ResetOsvID

func (m *IsVulnerabilityMutation) ResetOsvID()

ResetOsvID resets all changes to the "osv_id" field.

func (*IsVulnerabilityMutation) ResetVulnerability

func (m *IsVulnerabilityMutation) ResetVulnerability()

ResetVulnerability resets all changes to the "vulnerability" edge.

func (*IsVulnerabilityMutation) ResetVulnerabilityID

func (m *IsVulnerabilityMutation) ResetVulnerabilityID()

ResetVulnerabilityID resets all changes to the "vulnerability_id" field.

func (*IsVulnerabilityMutation) SetCollector

func (m *IsVulnerabilityMutation) SetCollector(s string)

SetCollector sets the "collector" field.

func (*IsVulnerabilityMutation) SetField

func (m *IsVulnerabilityMutation) 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 (*IsVulnerabilityMutation) SetJustification

func (m *IsVulnerabilityMutation) SetJustification(s string)

SetJustification sets the "justification" field.

func (*IsVulnerabilityMutation) SetOp

func (m *IsVulnerabilityMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*IsVulnerabilityMutation) SetOrigin

func (m *IsVulnerabilityMutation) SetOrigin(s string)

SetOrigin sets the "origin" field.

func (*IsVulnerabilityMutation) SetOsvID

func (m *IsVulnerabilityMutation) SetOsvID(i int)

SetOsvID sets the "osv_id" field.

func (*IsVulnerabilityMutation) SetVulnerabilityID

func (m *IsVulnerabilityMutation) SetVulnerabilityID(i int)

SetVulnerabilityID sets the "vulnerability_id" field.

func (IsVulnerabilityMutation) Tx

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

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

func (*IsVulnerabilityMutation) Type

func (m *IsVulnerabilityMutation) Type() string

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

func (*IsVulnerabilityMutation) VulnerabilityCleared

func (m *IsVulnerabilityMutation) VulnerabilityCleared() bool

VulnerabilityCleared reports if the "vulnerability" edge to the VulnerabilityType entity was cleared.

func (*IsVulnerabilityMutation) VulnerabilityID

func (m *IsVulnerabilityMutation) VulnerabilityID() (r int, exists bool)

VulnerabilityID returns the value of the "vulnerability_id" field in the mutation.

func (*IsVulnerabilityMutation) VulnerabilityIDs

func (m *IsVulnerabilityMutation) VulnerabilityIDs() (ids []int)

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 (*IsVulnerabilityMutation) Where

Where appends a list predicates to the IsVulnerabilityMutation builder.

func (*IsVulnerabilityMutation) WhereP

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

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

type IsVulnerabilityOrder

type IsVulnerabilityOrder struct {
	Direction OrderDirection             `json:"direction"`
	Field     *IsVulnerabilityOrderField `json:"field"`
}

IsVulnerabilityOrder defines the ordering of IsVulnerability.

type IsVulnerabilityOrderField

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

IsVulnerabilityOrderField defines the ordering field of IsVulnerability.

type IsVulnerabilityPaginateOption

type IsVulnerabilityPaginateOption func(*isvulnerabilityPager) error

IsVulnerabilityPaginateOption enables pagination customization.

func WithIsVulnerabilityFilter

func WithIsVulnerabilityFilter(filter func(*IsVulnerabilityQuery) (*IsVulnerabilityQuery, error)) IsVulnerabilityPaginateOption

WithIsVulnerabilityFilter configures pagination filter.

func WithIsVulnerabilityOrder

func WithIsVulnerabilityOrder(order *IsVulnerabilityOrder) IsVulnerabilityPaginateOption

WithIsVulnerabilityOrder configures pagination ordering.

type IsVulnerabilityQuery

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

IsVulnerabilityQuery is the builder for querying IsVulnerability entities.

func (*IsVulnerabilityQuery) Aggregate

Aggregate returns a IsVulnerabilitySelect configured with the given aggregations.

func (*IsVulnerabilityQuery) All

All executes the query and returns a list of IsVulnerabilities.

func (*IsVulnerabilityQuery) AllX

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

func (*IsVulnerabilityQuery) Clone

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

func (*IsVulnerabilityQuery) CollectFields

func (iv *IsVulnerabilityQuery) CollectFields(ctx context.Context, satisfies ...string) (*IsVulnerabilityQuery, error)

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

func (*IsVulnerabilityQuery) Count

func (ivq *IsVulnerabilityQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*IsVulnerabilityQuery) CountX

func (ivq *IsVulnerabilityQuery) CountX(ctx context.Context) int

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

func (*IsVulnerabilityQuery) Exist

func (ivq *IsVulnerabilityQuery) Exist(ctx context.Context) (bool, error)

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

func (*IsVulnerabilityQuery) ExistX

func (ivq *IsVulnerabilityQuery) ExistX(ctx context.Context) bool

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

func (*IsVulnerabilityQuery) First

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

func (*IsVulnerabilityQuery) FirstID

func (ivq *IsVulnerabilityQuery) FirstID(ctx context.Context) (id int, err error)

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

func (*IsVulnerabilityQuery) FirstIDX

func (ivq *IsVulnerabilityQuery) FirstIDX(ctx context.Context) int

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

func (*IsVulnerabilityQuery) FirstX

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

func (*IsVulnerabilityQuery) GroupBy

func (ivq *IsVulnerabilityQuery) GroupBy(field string, fields ...string) *IsVulnerabilityGroupBy

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 {
	OsvID int `json:"osv_id,omitempty"`
	Count int `json:"count,omitempty"`
}

client.IsVulnerability.Query().
	GroupBy(isvulnerability.FieldOsvID).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*IsVulnerabilityQuery) IDs

func (ivq *IsVulnerabilityQuery) IDs(ctx context.Context) (ids []int, err error)

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

func (*IsVulnerabilityQuery) IDsX

func (ivq *IsVulnerabilityQuery) IDsX(ctx context.Context) []int

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

func (*IsVulnerabilityQuery) Limit

func (ivq *IsVulnerabilityQuery) Limit(limit int) *IsVulnerabilityQuery

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

func (*IsVulnerabilityQuery) Offset

func (ivq *IsVulnerabilityQuery) Offset(offset int) *IsVulnerabilityQuery

Offset to start from.

func (*IsVulnerabilityQuery) Only

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

func (*IsVulnerabilityQuery) OnlyID

func (ivq *IsVulnerabilityQuery) OnlyID(ctx context.Context) (id int, err error)

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

func (*IsVulnerabilityQuery) OnlyIDX

func (ivq *IsVulnerabilityQuery) OnlyIDX(ctx context.Context) int

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

func (*IsVulnerabilityQuery) OnlyX

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

func (*IsVulnerabilityQuery) Order

Order specifies how the records should be ordered.

func (*IsVulnerabilityQuery) Paginate

func (iv *IsVulnerabilityQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...IsVulnerabilityPaginateOption,
) (*IsVulnerabilityConnection, error)

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

func (*IsVulnerabilityQuery) QueryOsv

QueryOsv chains the current query on the "osv" edge.

func (*IsVulnerabilityQuery) QueryVulnerability

func (ivq *IsVulnerabilityQuery) QueryVulnerability() *VulnerabilityTypeQuery

QueryVulnerability chains the current query on the "vulnerability" edge.

func (*IsVulnerabilityQuery) Select

func (ivq *IsVulnerabilityQuery) Select(fields ...string) *IsVulnerabilitySelect

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 {
	OsvID int `json:"osv_id,omitempty"`
}

client.IsVulnerability.Query().
	Select(isvulnerability.FieldOsvID).
	Scan(ctx, &v)

func (*IsVulnerabilityQuery) Unique

func (ivq *IsVulnerabilityQuery) Unique(unique bool) *IsVulnerabilityQuery

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 (*IsVulnerabilityQuery) Where

Where adds a new predicate for the IsVulnerabilityQuery builder.

func (*IsVulnerabilityQuery) WithOsv

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

func (*IsVulnerabilityQuery) WithVulnerability

func (ivq *IsVulnerabilityQuery) WithVulnerability(opts ...func(*VulnerabilityTypeQuery)) *IsVulnerabilityQuery

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 IsVulnerabilitySelect

type IsVulnerabilitySelect struct {
	*IsVulnerabilityQuery
	// contains filtered or unexported fields
}

IsVulnerabilitySelect is the builder for selecting fields of IsVulnerability entities.

func (*IsVulnerabilitySelect) Aggregate

Aggregate adds the given aggregation functions to the selector query.

func (*IsVulnerabilitySelect) Bool

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

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

func (*IsVulnerabilitySelect) BoolX

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

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

func (*IsVulnerabilitySelect) Bools

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

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

func (*IsVulnerabilitySelect) BoolsX

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

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

func (*IsVulnerabilitySelect) Float64

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

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

func (*IsVulnerabilitySelect) Float64X

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

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

func (*IsVulnerabilitySelect) Float64s

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

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

func (*IsVulnerabilitySelect) Float64sX

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

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

func (*IsVulnerabilitySelect) Int

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

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

func (*IsVulnerabilitySelect) IntX

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

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

func (*IsVulnerabilitySelect) Ints

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

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

func (*IsVulnerabilitySelect) IntsX

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

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

func (*IsVulnerabilitySelect) Scan

func (ivs *IsVulnerabilitySelect) Scan(ctx context.Context, v any) error

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

func (*IsVulnerabilitySelect) ScanX

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

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

func (*IsVulnerabilitySelect) String

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

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

func (*IsVulnerabilitySelect) StringX

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

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

func (*IsVulnerabilitySelect) Strings

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

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

func (*IsVulnerabilitySelect) StringsX

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

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

type IsVulnerabilityUpdate

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

IsVulnerabilityUpdate is the builder for updating IsVulnerability entities.

func (*IsVulnerabilityUpdate) ClearOsv

ClearOsv clears the "osv" edge to the VulnerabilityType entity.

func (*IsVulnerabilityUpdate) ClearVulnerability

func (ivu *IsVulnerabilityUpdate) ClearVulnerability() *IsVulnerabilityUpdate

ClearVulnerability clears the "vulnerability" edge to the VulnerabilityType entity.

func (*IsVulnerabilityUpdate) Exec

func (ivu *IsVulnerabilityUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*IsVulnerabilityUpdate) ExecX

func (ivu *IsVulnerabilityUpdate) ExecX(ctx context.Context)

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

func (*IsVulnerabilityUpdate) Mutation

Mutation returns the IsVulnerabilityMutation object of the builder.

func (*IsVulnerabilityUpdate) Save

func (ivu *IsVulnerabilityUpdate) Save(ctx context.Context) (int, error)

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

func (*IsVulnerabilityUpdate) SaveX

func (ivu *IsVulnerabilityUpdate) SaveX(ctx context.Context) int

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

func (*IsVulnerabilityUpdate) SetCollector

func (ivu *IsVulnerabilityUpdate) SetCollector(s string) *IsVulnerabilityUpdate

SetCollector sets the "collector" field.

func (*IsVulnerabilityUpdate) SetJustification

func (ivu *IsVulnerabilityUpdate) SetJustification(s string) *IsVulnerabilityUpdate

SetJustification sets the "justification" field.

func (*IsVulnerabilityUpdate) SetOrigin

SetOrigin sets the "origin" field.

func (*IsVulnerabilityUpdate) SetOsv

SetOsv sets the "osv" edge to the VulnerabilityType entity.

func (*IsVulnerabilityUpdate) SetOsvID

SetOsvID sets the "osv_id" field.

func (*IsVulnerabilityUpdate) SetVulnerability

SetVulnerability sets the "vulnerability" edge to the VulnerabilityType entity.

func (*IsVulnerabilityUpdate) SetVulnerabilityID

func (ivu *IsVulnerabilityUpdate) SetVulnerabilityID(i int) *IsVulnerabilityUpdate

SetVulnerabilityID sets the "vulnerability_id" field.

func (*IsVulnerabilityUpdate) Where

Where appends a list predicates to the IsVulnerabilityUpdate builder.

type IsVulnerabilityUpdateOne

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

IsVulnerabilityUpdateOne is the builder for updating a single IsVulnerability entity.

func (*IsVulnerabilityUpdateOne) ClearOsv

ClearOsv clears the "osv" edge to the VulnerabilityType entity.

func (*IsVulnerabilityUpdateOne) ClearVulnerability

func (ivuo *IsVulnerabilityUpdateOne) ClearVulnerability() *IsVulnerabilityUpdateOne

ClearVulnerability clears the "vulnerability" edge to the VulnerabilityType entity.

func (*IsVulnerabilityUpdateOne) Exec

Exec executes the query on the entity.

func (*IsVulnerabilityUpdateOne) ExecX

func (ivuo *IsVulnerabilityUpdateOne) ExecX(ctx context.Context)

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

func (*IsVulnerabilityUpdateOne) Mutation

Mutation returns the IsVulnerabilityMutation object of the builder.

func (*IsVulnerabilityUpdateOne) Save

Save executes the query and returns the updated IsVulnerability entity.

func (*IsVulnerabilityUpdateOne) SaveX

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

func (*IsVulnerabilityUpdateOne) Select

func (ivuo *IsVulnerabilityUpdateOne) Select(field string, fields ...string) *IsVulnerabilityUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*IsVulnerabilityUpdateOne) SetCollector

SetCollector sets the "collector" field.

func (*IsVulnerabilityUpdateOne) SetJustification

func (ivuo *IsVulnerabilityUpdateOne) SetJustification(s string) *IsVulnerabilityUpdateOne

SetJustification sets the "justification" field.

func (*IsVulnerabilityUpdateOne) SetOrigin

SetOrigin sets the "origin" field.

func (*IsVulnerabilityUpdateOne) SetOsv

SetOsv sets the "osv" edge to the VulnerabilityType entity.

func (*IsVulnerabilityUpdateOne) SetOsvID

SetOsvID sets the "osv_id" field.

func (*IsVulnerabilityUpdateOne) SetVulnerability

SetVulnerability sets the "vulnerability" edge to the VulnerabilityType entity.

func (*IsVulnerabilityUpdateOne) SetVulnerabilityID

func (ivuo *IsVulnerabilityUpdateOne) SetVulnerabilityID(i int) *IsVulnerabilityUpdateOne

SetVulnerabilityID sets the "vulnerability_id" field.

func (*IsVulnerabilityUpdateOne) Where

Where appends a list predicates to the IsVulnerabilityUpdate builder.

type IsVulnerabilityUpsert

type IsVulnerabilityUpsert struct {
	*sql.UpdateSet
}

IsVulnerabilityUpsert is the "OnConflict" setter.

func (*IsVulnerabilityUpsert) SetCollector

SetCollector sets the "collector" field.

func (*IsVulnerabilityUpsert) SetJustification

func (u *IsVulnerabilityUpsert) SetJustification(v string) *IsVulnerabilityUpsert

SetJustification sets the "justification" field.

func (*IsVulnerabilityUpsert) SetOrigin

SetOrigin sets the "origin" field.

func (*IsVulnerabilityUpsert) SetOsvID

SetOsvID sets the "osv_id" field.

func (*IsVulnerabilityUpsert) SetVulnerabilityID

func (u *IsVulnerabilityUpsert) SetVulnerabilityID(v int) *IsVulnerabilityUpsert

SetVulnerabilityID sets the "vulnerability_id" field.

func (*IsVulnerabilityUpsert) UpdateCollector

func (u *IsVulnerabilityUpsert) UpdateCollector() *IsVulnerabilityUpsert

UpdateCollector sets the "collector" field to the value that was provided on create.

func (*IsVulnerabilityUpsert) UpdateJustification

func (u *IsVulnerabilityUpsert) UpdateJustification() *IsVulnerabilityUpsert

UpdateJustification sets the "justification" field to the value that was provided on create.

func (*IsVulnerabilityUpsert) UpdateOrigin

func (u *IsVulnerabilityUpsert) UpdateOrigin() *IsVulnerabilityUpsert

UpdateOrigin sets the "origin" field to the value that was provided on create.

func (*IsVulnerabilityUpsert) UpdateOsvID

func (u *IsVulnerabilityUpsert) UpdateOsvID() *IsVulnerabilityUpsert

UpdateOsvID sets the "osv_id" field to the value that was provided on create.

func (*IsVulnerabilityUpsert) UpdateVulnerabilityID

func (u *IsVulnerabilityUpsert) UpdateVulnerabilityID() *IsVulnerabilityUpsert

UpdateVulnerabilityID sets the "vulnerability_id" field to the value that was provided on create.

type IsVulnerabilityUpsertBulk

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

IsVulnerabilityUpsertBulk is the builder for "upsert"-ing a bulk of IsVulnerability nodes.

func (*IsVulnerabilityUpsertBulk) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*IsVulnerabilityUpsertBulk) Exec

Exec executes the query.

func (*IsVulnerabilityUpsertBulk) ExecX

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

func (*IsVulnerabilityUpsertBulk) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.IsVulnerability.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*IsVulnerabilityUpsertBulk) SetCollector

SetCollector sets the "collector" field.

func (*IsVulnerabilityUpsertBulk) SetJustification

SetJustification sets the "justification" field.

func (*IsVulnerabilityUpsertBulk) SetOrigin

SetOrigin sets the "origin" field.

func (*IsVulnerabilityUpsertBulk) SetOsvID

SetOsvID sets the "osv_id" field.

func (*IsVulnerabilityUpsertBulk) SetVulnerabilityID

func (u *IsVulnerabilityUpsertBulk) SetVulnerabilityID(v int) *IsVulnerabilityUpsertBulk

SetVulnerabilityID sets the "vulnerability_id" field.

func (*IsVulnerabilityUpsertBulk) Update

Update allows overriding fields `UPDATE` values. See the IsVulnerabilityCreateBulk.OnConflict documentation for more info.

func (*IsVulnerabilityUpsertBulk) UpdateCollector

UpdateCollector sets the "collector" field to the value that was provided on create.

func (*IsVulnerabilityUpsertBulk) UpdateJustification

func (u *IsVulnerabilityUpsertBulk) UpdateJustification() *IsVulnerabilityUpsertBulk

UpdateJustification sets the "justification" field to the value that was provided on create.

func (*IsVulnerabilityUpsertBulk) UpdateNewValues

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.IsVulnerability.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	Exec(ctx)

func (*IsVulnerabilityUpsertBulk) UpdateOrigin

UpdateOrigin sets the "origin" field to the value that was provided on create.

func (*IsVulnerabilityUpsertBulk) UpdateOsvID

UpdateOsvID sets the "osv_id" field to the value that was provided on create.

func (*IsVulnerabilityUpsertBulk) UpdateVulnerabilityID

func (u *IsVulnerabilityUpsertBulk) UpdateVulnerabilityID() *IsVulnerabilityUpsertBulk

UpdateVulnerabilityID sets the "vulnerability_id" field to the value that was provided on create.

type IsVulnerabilityUpsertOne

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

IsVulnerabilityUpsertOne is the builder for "upsert"-ing

one IsVulnerability node.

func (*IsVulnerabilityUpsertOne) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*IsVulnerabilityUpsertOne) Exec

Exec executes the query.

func (*IsVulnerabilityUpsertOne) ExecX

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

func (*IsVulnerabilityUpsertOne) ID

func (u *IsVulnerabilityUpsertOne) ID(ctx context.Context) (id int, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*IsVulnerabilityUpsertOne) IDX

IDX is like ID, but panics if an error occurs.

func (*IsVulnerabilityUpsertOne) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.IsVulnerability.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*IsVulnerabilityUpsertOne) SetCollector

SetCollector sets the "collector" field.

func (*IsVulnerabilityUpsertOne) SetJustification

SetJustification sets the "justification" field.

func (*IsVulnerabilityUpsertOne) SetOrigin

SetOrigin sets the "origin" field.

func (*IsVulnerabilityUpsertOne) SetOsvID

SetOsvID sets the "osv_id" field.

func (*IsVulnerabilityUpsertOne) SetVulnerabilityID

func (u *IsVulnerabilityUpsertOne) SetVulnerabilityID(v int) *IsVulnerabilityUpsertOne

SetVulnerabilityID sets the "vulnerability_id" field.

func (*IsVulnerabilityUpsertOne) Update

Update allows overriding fields `UPDATE` values. See the IsVulnerabilityCreate.OnConflict documentation for more info.

func (*IsVulnerabilityUpsertOne) UpdateCollector

func (u *IsVulnerabilityUpsertOne) UpdateCollector() *IsVulnerabilityUpsertOne

UpdateCollector sets the "collector" field to the value that was provided on create.

func (*IsVulnerabilityUpsertOne) UpdateJustification

func (u *IsVulnerabilityUpsertOne) UpdateJustification() *IsVulnerabilityUpsertOne

UpdateJustification sets the "justification" field to the value that was provided on create.

func (*IsVulnerabilityUpsertOne) UpdateNewValues

func (u *IsVulnerabilityUpsertOne) UpdateNewValues() *IsVulnerabilityUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.IsVulnerability.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	Exec(ctx)

func (*IsVulnerabilityUpsertOne) UpdateOrigin

UpdateOrigin sets the "origin" field to the value that was provided on create.

func (*IsVulnerabilityUpsertOne) UpdateOsvID

UpdateOsvID sets the "osv_id" field to the value that was provided on create.

func (*IsVulnerabilityUpsertOne) UpdateVulnerabilityID

func (u *IsVulnerabilityUpsertOne) UpdateVulnerabilityID() *IsVulnerabilityUpsertOne

UpdateVulnerabilityID sets the "vulnerability_id" field to the value that was provided on create.

type License

type License struct {

	// ID of the ent.
	ID int `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 int) *LicenseDeleteOne

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

func (*LicenseClient) Get

func (c *LicenseClient) Get(ctx context.Context, id int) (*License, error)

Get returns a License entity by its id.

func (*LicenseClient) GetX

func (c *LicenseClient) GetX(ctx context.Context, id int) *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 int) *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 ...int) *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 ...int) *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) 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) 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 ...int)

AddDeclaredInCertifyLegalIDs adds the "declared_in_certify_legals" edge to the CertifyLegal entity by ids.

func (*LicenseMutation) AddDiscoveredInCertifyLegalIDs

func (m *LicenseMutation) AddDiscoveredInCertifyLegalIDs(ids ...int)

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 []int)

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 []int)

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 int, 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) ([]int, 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 ...int)

RemoveDeclaredInCertifyLegalIDs removes the "declared_in_certify_legals" edge to the CertifyLegal entity by IDs.

func (*LicenseMutation) RemoveDiscoveredInCertifyLegalIDs

func (m *LicenseMutation) RemoveDiscoveredInCertifyLegalIDs(ids ...int)

RemoveDiscoveredInCertifyLegalIDs removes the "discovered_in_certify_legals" edge to the CertifyLegal entity by IDs.

func (*LicenseMutation) RemovedDeclaredInCertifyLegalsIDs

func (m *LicenseMutation) RemovedDeclaredInCertifyLegalsIDs() (ids []int)

RemovedDeclaredInCertifyLegals returns the removed IDs of the "declared_in_certify_legals" edge to the CertifyLegal entity.

func (*LicenseMutation) RemovedDiscoveredInCertifyLegalsIDs

func (m *LicenseMutation) RemovedDiscoveredInCertifyLegalsIDs() (ids []int)

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) 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 int, 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) int

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 []int, err error)

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

func (*LicenseQuery) IDsX

func (lq *LicenseQuery) IDsX(ctx context.Context) []int

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 int, 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) int

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 ...int) *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 ...int) *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 ...int) *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 ...int) *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) 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 ...int) *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 ...int) *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 ...int) *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 ...int) *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) 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(),
	).
	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 int, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*LicenseUpsertOne) IDX

func (u *LicenseUpsertOne) IDX(ctx context.Context) int

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. Using this option is equivalent to using:

client.License.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	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, int) (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 int `json:"id,omitempty"`
	// The artifact in the relationship
	ArtifactID int `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"`
	// SourceID holds the value of the "source_id" field.
	SourceID *int `json:"source_id,omitempty"`
	// PackageID holds the value of the "package_id" field.
	PackageID *int `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) IsNode

func (n *Occurrence) IsNode()

IsNode implements the Node interface check for GQLGen.

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) 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 int) *OccurrenceDeleteOne

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

func (*OccurrenceClient) Get

func (c *OccurrenceClient) Get(ctx context.Context, id int) (*Occurrence, error)

Get returns a Occurrence entity by its id.

func (*OccurrenceClient) GetX

func (c *OccurrenceClient) GetX(ctx context.Context, id int) *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) 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 int) *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) 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(i int) *OccurrenceCreate

SetArtifactID sets the "artifact_id" field.

func (*OccurrenceCreate) SetCollector

func (oc *OccurrenceCreate) SetCollector(s string) *OccurrenceCreate

SetCollector sets the "collector" field.

func (*OccurrenceCreate) SetJustification

func (oc *OccurrenceCreate) SetJustification(s string) *OccurrenceCreate

SetJustification sets the "justification" field.

func (*OccurrenceCreate) SetNillablePackageID

func (oc *OccurrenceCreate) SetNillablePackageID(i *int) *OccurrenceCreate

SetNillablePackageID sets the "package_id" field if the given value is not nil.

func (*OccurrenceCreate) SetNillableSourceID

func (oc *OccurrenceCreate) SetNillableSourceID(i *int) *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(i int) *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(i int) *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"`
	// 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) 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) 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 int, exists bool)

ArtifactID returns the value of the "artifact_id" field in the mutation.

func (*OccurrenceMutation) ArtifactIDs

func (m *OccurrenceMutation) ArtifactIDs() (ids []int)

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) 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) 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 int, 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) ([]int, 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) 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 int, 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) 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 *int, 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 *int, 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 int, 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 []int)

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) 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) 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) 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) 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(i int)

SetArtifactID sets the "artifact_id" field.

func (*OccurrenceMutation) SetCollector

func (m *OccurrenceMutation) SetCollector(s string)

SetCollector sets the "collector" 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) 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(i int)

SetPackageID sets the "package_id" field.

func (*OccurrenceMutation) SetSourceID

func (m *OccurrenceMutation) SetSourceID(i int)

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 int, 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 []int)

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 int, 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) int

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 int `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 []int, err error)

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

func (*OccurrenceQuery) IDsX

func (oq *OccurrenceQuery) IDsX(ctx context.Context) []int

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 int, 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) int

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) 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 int `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) 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) ClearArtifact

func (ou *OccurrenceUpdate) ClearArtifact() *OccurrenceUpdate

ClearArtifact clears the "artifact" edge to the Artifact 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) 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(i int) *OccurrenceUpdate

SetArtifactID sets the "artifact_id" field.

func (*OccurrenceUpdate) SetCollector

func (ou *OccurrenceUpdate) SetCollector(s string) *OccurrenceUpdate

SetCollector sets the "collector" field.

func (*OccurrenceUpdate) SetJustification

func (ou *OccurrenceUpdate) SetJustification(s string) *OccurrenceUpdate

SetJustification sets the "justification" field.

func (*OccurrenceUpdate) SetNillablePackageID

func (ou *OccurrenceUpdate) SetNillablePackageID(i *int) *OccurrenceUpdate

SetNillablePackageID sets the "package_id" field if the given value is not nil.

func (*OccurrenceUpdate) SetNillableSourceID

func (ou *OccurrenceUpdate) SetNillableSourceID(i *int) *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(i int) *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(i int) *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) ClearArtifact

func (ouo *OccurrenceUpdateOne) ClearArtifact() *OccurrenceUpdateOne

ClearArtifact clears the "artifact" edge to the Artifact 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) 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(i int) *OccurrenceUpdateOne

SetArtifactID sets the "artifact_id" field.

func (*OccurrenceUpdateOne) SetCollector

func (ouo *OccurrenceUpdateOne) SetCollector(s string) *OccurrenceUpdateOne

SetCollector sets the "collector" field.

func (*OccurrenceUpdateOne) SetJustification

func (ouo *OccurrenceUpdateOne) SetJustification(s string) *OccurrenceUpdateOne

SetJustification sets the "justification" field.

func (*OccurrenceUpdateOne) SetNillablePackageID

func (ouo *OccurrenceUpdateOne) SetNillablePackageID(i *int) *OccurrenceUpdateOne

SetNillablePackageID sets the "package_id" field if the given value is not nil.

func (*OccurrenceUpdateOne) SetNillableSourceID

func (ouo *OccurrenceUpdateOne) SetNillableSourceID(i *int) *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(i int) *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(i int) *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 int) *OccurrenceUpsert

SetArtifactID sets the "artifact_id" field.

func (*OccurrenceUpsert) SetCollector

func (u *OccurrenceUpsert) SetCollector(v string) *OccurrenceUpsert

SetCollector sets the "collector" 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 int) *OccurrenceUpsert

SetPackageID sets the "package_id" field.

func (*OccurrenceUpsert) SetSourceID

func (u *OccurrenceUpsert) SetSourceID(v int) *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) 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 int) *OccurrenceUpsertBulk

SetArtifactID sets the "artifact_id" field.

func (*OccurrenceUpsertBulk) SetCollector

func (u *OccurrenceUpsertBulk) SetCollector(v string) *OccurrenceUpsertBulk

SetCollector sets the "collector" 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 int) *OccurrenceUpsertBulk

SetPackageID sets the "package_id" field.

func (*OccurrenceUpsertBulk) SetSourceID

func (u *OccurrenceUpsertBulk) SetSourceID(v int) *OccurrenceUpsertBulk

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) 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(),
	).
	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 int, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*OccurrenceUpsertOne) IDX

func (u *OccurrenceUpsertOne) IDX(ctx context.Context) int

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 int) *OccurrenceUpsertOne

SetArtifactID sets the "artifact_id" field.

func (*OccurrenceUpsertOne) SetCollector

func (u *OccurrenceUpsertOne) SetCollector(v string) *OccurrenceUpsertOne

SetCollector sets the "collector" 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 int) *OccurrenceUpsertOne

SetPackageID sets the "package_id" field.

func (*OccurrenceUpsertOne) SetSourceID

func (u *OccurrenceUpsertOne) SetSourceID(v int) *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) 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. Using this option is equivalent to using:

client.Occurrence.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	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 int `json:"id,omitempty"`
	// NamespaceID holds the value of the "namespace_id" field.
	NamespaceID int `json:"namespace_id,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) IsNode

func (n *PackageName) IsNode()

IsNode implements the Node interface check for GQLGen.

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) Namespace

func (pn *PackageName) Namespace(ctx context.Context) (*PackageNamespace, error)

func (*PackageName) QueryNamespace

func (pn *PackageName) QueryNamespace() *PackageNamespaceQuery

QueryNamespace queries the "namespace" 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 int) *PackageNameDeleteOne

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

func (*PackageNameClient) Get

func (c *PackageNameClient) Get(ctx context.Context, id int) (*PackageName, error)

Get returns a PackageName entity by its id.

func (*PackageNameClient) GetX

func (c *PackageNameClient) GetX(ctx context.Context, id int) *PackageName

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) QueryNamespace

func (c *PackageNameClient) QueryNamespace(pn *PackageName) *PackageNamespaceQuery

QueryNamespace queries the namespace 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 int) *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) AddVersionIDs

func (pnc *PackageNameCreate) AddVersionIDs(ids ...int) *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().
	SetNamespaceID(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) {
		SetNamespaceID(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) SetName

func (pnc *PackageNameCreate) SetName(s string) *PackageNameCreate

SetName sets the "name" field.

func (*PackageNameCreate) SetNamespace

func (pnc *PackageNameCreate) SetNamespace(p *PackageNamespace) *PackageNameCreate

SetNamespace sets the "namespace" edge to the PackageNamespace entity.

func (*PackageNameCreate) SetNamespaceID

func (pnc *PackageNameCreate) SetNamespaceID(i int) *PackageNameCreate

SetNamespaceID sets the "namespace_id" 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) {
		SetNamespaceID(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 {
	// Namespace holds the value of the namespace edge.
	Namespace *PackageNamespace `json:"namespace,omitempty"`
	// Versions holds the value of the versions edge.
	Versions []*PackageVersion `json:"versions,omitempty"`
	// contains filtered or unexported fields
}

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

func (PackageNameEdges) NamespaceOrErr

func (e PackageNameEdges) NamespaceOrErr() (*PackageNamespace, error)

NamespaceOrErr returns the Namespace value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

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) 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) AddVersionIDs

func (m *PackageNameMutation) AddVersionIDs(ids ...int)

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) 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) ClearNamespace

func (m *PackageNameMutation) ClearNamespace()

ClearNamespace clears the "namespace" edge to the PackageNamespace 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) 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) ID

func (m *PackageNameMutation) ID() (id int, 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) ([]int, 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) Name

func (m *PackageNameMutation) Name() (r string, exists bool)

Name returns the value of the "name" field in the mutation.

func (*PackageNameMutation) NamespaceCleared

func (m *PackageNameMutation) NamespaceCleared() bool

NamespaceCleared reports if the "namespace" edge to the PackageNamespace entity was cleared.

func (*PackageNameMutation) NamespaceID

func (m *PackageNameMutation) NamespaceID() (r int, exists bool)

NamespaceID returns the value of the "namespace_id" field in the mutation.

func (*PackageNameMutation) NamespaceIDs

func (m *PackageNameMutation) NamespaceIDs() (ids []int)

NamespaceIDs returns the "namespace" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use NamespaceID instead. It exists only for internal usage by the builders.

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) OldNamespaceID

func (m *PackageNameMutation) OldNamespaceID(ctx context.Context) (v int, err error)

OldNamespaceID returns the old "namespace_id" 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) RemoveVersionIDs

func (m *PackageNameMutation) RemoveVersionIDs(ids ...int)

RemoveVersionIDs removes the "versions" edge to the PackageVersion entity by IDs.

func (*PackageNameMutation) RemovedEdges

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

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

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) RemovedVersionsIDs

func (m *PackageNameMutation) RemovedVersionsIDs() (ids []int)

RemovedVersions returns the removed IDs of the "versions" edge to the PackageVersion entity.

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) 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" edge.

func (*PackageNameMutation) ResetNamespaceID

func (m *PackageNameMutation) ResetNamespaceID()

ResetNamespaceID resets all changes to the "namespace_id" 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) SetName

func (m *PackageNameMutation) SetName(s string)

SetName sets the "name" field.

func (*PackageNameMutation) SetNamespaceID

func (m *PackageNameMutation) SetNamespaceID(i int)

SetNamespaceID sets the "namespace_id" field.

func (*PackageNameMutation) SetOp

func (m *PackageNameMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

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 []int)

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 int, 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) int

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 {
	NamespaceID int `json:"namespace_id,omitempty"`
	Count int `json:"count,omitempty"`
}

client.PackageName.Query().
	GroupBy(packagename.FieldNamespaceID).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*PackageNameQuery) IDs

func (pnq *PackageNameQuery) IDs(ctx context.Context) (ids []int, err error)

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

func (*PackageNameQuery) IDsX

func (pnq *PackageNameQuery) IDsX(ctx context.Context) []int

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 int, 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) int

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) QueryNamespace

func (pnq *PackageNameQuery) QueryNamespace() *PackageNamespaceQuery

QueryNamespace chains the current query on the "namespace" 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 {
	NamespaceID int `json:"namespace_id,omitempty"`
}

client.PackageName.Query().
	Select(packagename.FieldNamespaceID).
	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) 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) WithNamespace

func (pnq *PackageNameQuery) WithNamespace(opts ...func(*PackageNamespaceQuery)) *PackageNameQuery

WithNamespace tells the query-builder to eager-load the nodes that are connected to the "namespace" 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) AddVersionIDs

func (pnu *PackageNameUpdate) AddVersionIDs(ids ...int) *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) ClearNamespace

func (pnu *PackageNameUpdate) ClearNamespace() *PackageNameUpdate

ClearNamespace clears the "namespace" edge to the PackageNamespace 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) RemoveVersionIDs

func (pnu *PackageNameUpdate) RemoveVersionIDs(ids ...int) *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(p *PackageNamespace) *PackageNameUpdate

SetNamespace sets the "namespace" edge to the PackageNamespace entity.

func (*PackageNameUpdate) SetNamespaceID

func (pnu *PackageNameUpdate) SetNamespaceID(i int) *PackageNameUpdate

SetNamespaceID sets the "namespace_id" 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) AddVersionIDs

func (pnuo *PackageNameUpdateOne) AddVersionIDs(ids ...int) *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) ClearNamespace

func (pnuo *PackageNameUpdateOne) ClearNamespace() *PackageNameUpdateOne

ClearNamespace clears the "namespace" edge to the PackageNamespace 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) RemoveVersionIDs

func (pnuo *PackageNameUpdateOne) RemoveVersionIDs(ids ...int) *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

SetNamespace sets the "namespace" edge to the PackageNamespace entity.

func (*PackageNameUpdateOne) SetNamespaceID

func (pnuo *PackageNameUpdateOne) SetNamespaceID(i int) *PackageNameUpdateOne

SetNamespaceID sets the "namespace_id" 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) SetNamespaceID

func (u *PackageNameUpsert) SetNamespaceID(v int) *PackageNameUpsert

SetNamespaceID sets the "namespace_id" field.

func (*PackageNameUpsert) UpdateName

func (u *PackageNameUpsert) UpdateName() *PackageNameUpsert

UpdateName sets the "name" field to the value that was provided on create.

func (*PackageNameUpsert) UpdateNamespaceID

func (u *PackageNameUpsert) UpdateNamespaceID() *PackageNameUpsert

UpdateNamespaceID sets the "namespace_id" 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) SetNamespaceID

func (u *PackageNameUpsertBulk) SetNamespaceID(v int) *PackageNameUpsertBulk

SetNamespaceID sets the "namespace_id" 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) UpdateNamespaceID

func (u *PackageNameUpsertBulk) UpdateNamespaceID() *PackageNameUpsertBulk

UpdateNamespaceID sets the "namespace_id" 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(),
	).
	Exec(ctx)

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 int, 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) SetNamespaceID

func (u *PackageNameUpsertOne) SetNamespaceID(v int) *PackageNameUpsertOne

SetNamespaceID sets the "namespace_id" 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) UpdateNamespaceID

func (u *PackageNameUpsertOne) UpdateNamespaceID() *PackageNameUpsertOne

UpdateNamespaceID sets the "namespace_id" 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. Using this option is equivalent to using:

client.PackageName.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	Exec(ctx)

type PackageNames

type PackageNames []*PackageName

PackageNames is a parsable slice of PackageName.

type PackageNamespace

type PackageNamespace struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// PackageID holds the value of the "package_id" field.
	PackageID int `json:"package_id,omitempty"`
	// In the pURL representation, each PackageNamespace matches the pkg:<type>/<namespace>/ partial pURL
	Namespace string `json:"namespace,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the PackageNamespaceQuery when eager-loading is set.
	Edges PackageNamespaceEdges `json:"edges"`
	// contains filtered or unexported fields
}

PackageNamespace is the model entity for the PackageNamespace schema.

func (*PackageNamespace) IsNode

func (n *PackageNamespace) IsNode()

IsNode implements the Node interface check for GQLGen.

func (*PackageNamespace) NamedNames

func (pn *PackageNamespace) NamedNames(name string) ([]*PackageName, error)

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

func (*PackageNamespace) Names

func (pn *PackageNamespace) Names(ctx context.Context) (result []*PackageName, err error)

func (*PackageNamespace) Package

func (pn *PackageNamespace) Package(ctx context.Context) (*PackageType, error)

func (*PackageNamespace) QueryNames

func (pn *PackageNamespace) QueryNames() *PackageNameQuery

QueryNames queries the "names" edge of the PackageNamespace entity.

func (*PackageNamespace) QueryPackage

func (pn *PackageNamespace) QueryPackage() *PackageTypeQuery

QueryPackage queries the "package" edge of the PackageNamespace entity.

func (*PackageNamespace) String

func (pn *PackageNamespace) String() string

String implements the fmt.Stringer.

func (*PackageNamespace) ToEdge

ToEdge converts PackageNamespace into PackageNamespaceEdge.

func (*PackageNamespace) Unwrap

func (pn *PackageNamespace) Unwrap() *PackageNamespace

Unwrap unwraps the PackageNamespace 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 (*PackageNamespace) Update

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

func (*PackageNamespace) Value

func (pn *PackageNamespace) Value(name string) (ent.Value, error)

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

type PackageNamespaceClient

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

PackageNamespaceClient is a client for the PackageNamespace schema.

func NewPackageNamespaceClient

func NewPackageNamespaceClient(c config) *PackageNamespaceClient

NewPackageNamespaceClient returns a client for the PackageNamespace from the given config.

func (*PackageNamespaceClient) Create

Create returns a builder for creating a PackageNamespace entity.

func (*PackageNamespaceClient) CreateBulk

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

func (*PackageNamespaceClient) Delete

Delete returns a delete builder for PackageNamespace.

func (*PackageNamespaceClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*PackageNamespaceClient) DeleteOneID

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

func (*PackageNamespaceClient) Get

Get returns a PackageNamespace entity by its id.

func (*PackageNamespaceClient) GetX

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

func (*PackageNamespaceClient) Hooks

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

Hooks returns the client hooks.

func (*PackageNamespaceClient) Intercept

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

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

func (*PackageNamespaceClient) Interceptors

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

Interceptors returns the client interceptors.

func (*PackageNamespaceClient) MapCreateBulk

func (c *PackageNamespaceClient) MapCreateBulk(slice any, setFunc func(*PackageNamespaceCreate, int)) *PackageNamespaceCreateBulk

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 (*PackageNamespaceClient) Query

Query returns a query builder for PackageNamespace.

func (*PackageNamespaceClient) QueryNames

QueryNames queries the names edge of a PackageNamespace.

func (*PackageNamespaceClient) QueryPackage

QueryPackage queries the package edge of a PackageNamespace.

func (*PackageNamespaceClient) Update

Update returns an update builder for PackageNamespace.

func (*PackageNamespaceClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*PackageNamespaceClient) UpdateOneID

UpdateOneID returns an update builder for the given id.

func (*PackageNamespaceClient) Use

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

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

type PackageNamespaceConnection

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

PackageNamespaceConnection is the connection containing edges to PackageNamespace.

type PackageNamespaceCreate

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

PackageNamespaceCreate is the builder for creating a PackageNamespace entity.

func (*PackageNamespaceCreate) AddNameIDs

func (pnc *PackageNamespaceCreate) AddNameIDs(ids ...int) *PackageNamespaceCreate

AddNameIDs adds the "names" edge to the PackageName entity by IDs.

func (*PackageNamespaceCreate) AddNames

AddNames adds the "names" edges to the PackageName entity.

func (*PackageNamespaceCreate) Exec

Exec executes the query.

func (*PackageNamespaceCreate) ExecX

func (pnc *PackageNamespaceCreate) ExecX(ctx context.Context)

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

func (*PackageNamespaceCreate) Mutation

Mutation returns the PackageNamespaceMutation object of the builder.

func (*PackageNamespaceCreate) OnConflict

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

client.PackageNamespace.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.PackageNamespaceUpsert) {
		SetPackageID(v+v).
	}).
	Exec(ctx)

func (*PackageNamespaceCreate) OnConflictColumns

func (pnc *PackageNamespaceCreate) OnConflictColumns(columns ...string) *PackageNamespaceUpsertOne

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

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

func (*PackageNamespaceCreate) Save

Save creates the PackageNamespace in the database.

func (*PackageNamespaceCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*PackageNamespaceCreate) SetNamespace

SetNamespace sets the "namespace" field.

func (*PackageNamespaceCreate) SetPackage

SetPackage sets the "package" edge to the PackageType entity.

func (*PackageNamespaceCreate) SetPackageID

func (pnc *PackageNamespaceCreate) SetPackageID(i int) *PackageNamespaceCreate

SetPackageID sets the "package_id" field.

type PackageNamespaceCreateBulk

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

PackageNamespaceCreateBulk is the builder for creating many PackageNamespace entities in bulk.

func (*PackageNamespaceCreateBulk) Exec

Exec executes the query.

func (*PackageNamespaceCreateBulk) ExecX

func (pncb *PackageNamespaceCreateBulk) ExecX(ctx context.Context)

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

func (*PackageNamespaceCreateBulk) OnConflict

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

client.PackageNamespace.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.PackageNamespaceUpsert) {
		SetPackageID(v+v).
	}).
	Exec(ctx)

func (*PackageNamespaceCreateBulk) OnConflictColumns

func (pncb *PackageNamespaceCreateBulk) OnConflictColumns(columns ...string) *PackageNamespaceUpsertBulk

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

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

func (*PackageNamespaceCreateBulk) Save

Save creates the PackageNamespace entities in the database.

func (*PackageNamespaceCreateBulk) SaveX

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

type PackageNamespaceDelete

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

PackageNamespaceDelete is the builder for deleting a PackageNamespace entity.

func (*PackageNamespaceDelete) Exec

func (pnd *PackageNamespaceDelete) Exec(ctx context.Context) (int, error)

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

func (*PackageNamespaceDelete) ExecX

func (pnd *PackageNamespaceDelete) ExecX(ctx context.Context) int

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

func (*PackageNamespaceDelete) Where

Where appends a list predicates to the PackageNamespaceDelete builder.

type PackageNamespaceDeleteOne

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

PackageNamespaceDeleteOne is the builder for deleting a single PackageNamespace entity.

func (*PackageNamespaceDeleteOne) Exec

Exec executes the deletion query.

func (*PackageNamespaceDeleteOne) ExecX

func (pndo *PackageNamespaceDeleteOne) ExecX(ctx context.Context)

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

func (*PackageNamespaceDeleteOne) Where

Where appends a list predicates to the PackageNamespaceDelete builder.

type PackageNamespaceEdge

type PackageNamespaceEdge struct {
	Node   *PackageNamespace `json:"node"`
	Cursor Cursor            `json:"cursor"`
}

PackageNamespaceEdge is the edge representation of PackageNamespace.

type PackageNamespaceEdges

type PackageNamespaceEdges struct {
	// Package holds the value of the package edge.
	Package *PackageType `json:"package,omitempty"`
	// Names holds the value of the names edge.
	Names []*PackageName `json:"names,omitempty"`
	// contains filtered or unexported fields
}

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

func (PackageNamespaceEdges) NamesOrErr

func (e PackageNamespaceEdges) NamesOrErr() ([]*PackageName, error)

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

func (PackageNamespaceEdges) PackageOrErr

func (e PackageNamespaceEdges) PackageOrErr() (*PackageType, 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 PackageNamespaceGroupBy

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

PackageNamespaceGroupBy is the group-by builder for PackageNamespace entities.

func (*PackageNamespaceGroupBy) Aggregate

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

func (*PackageNamespaceGroupBy) Bool

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

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

func (*PackageNamespaceGroupBy) BoolX

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

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

func (*PackageNamespaceGroupBy) Bools

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

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

func (*PackageNamespaceGroupBy) BoolsX

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

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

func (*PackageNamespaceGroupBy) Float64

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

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

func (*PackageNamespaceGroupBy) Float64X

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

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

func (*PackageNamespaceGroupBy) Float64s

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

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

func (*PackageNamespaceGroupBy) Float64sX

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

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

func (*PackageNamespaceGroupBy) Int

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

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

func (*PackageNamespaceGroupBy) IntX

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

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

func (*PackageNamespaceGroupBy) Ints

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

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

func (*PackageNamespaceGroupBy) IntsX

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

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

func (*PackageNamespaceGroupBy) Scan

func (pngb *PackageNamespaceGroupBy) Scan(ctx context.Context, v any) error

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

func (*PackageNamespaceGroupBy) ScanX

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

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

func (*PackageNamespaceGroupBy) String

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

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

func (*PackageNamespaceGroupBy) StringX

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

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

func (*PackageNamespaceGroupBy) Strings

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

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

func (*PackageNamespaceGroupBy) StringsX

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

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

type PackageNamespaceMutation

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

PackageNamespaceMutation represents an operation that mutates the PackageNamespace nodes in the graph.

func (*PackageNamespaceMutation) AddField

func (m *PackageNamespaceMutation) 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 (*PackageNamespaceMutation) AddNameIDs

func (m *PackageNamespaceMutation) AddNameIDs(ids ...int)

AddNameIDs adds the "names" edge to the PackageName entity by ids.

func (*PackageNamespaceMutation) AddedEdges

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

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

func (*PackageNamespaceMutation) AddedField

func (m *PackageNamespaceMutation) 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 (*PackageNamespaceMutation) AddedFields

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

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

func (*PackageNamespaceMutation) AddedIDs

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

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

func (*PackageNamespaceMutation) ClearEdge

func (m *PackageNamespaceMutation) 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 (*PackageNamespaceMutation) ClearField

func (m *PackageNamespaceMutation) 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 (*PackageNamespaceMutation) ClearNames

func (m *PackageNamespaceMutation) ClearNames()

ClearNames clears the "names" edge to the PackageName entity.

func (*PackageNamespaceMutation) ClearPackage

func (m *PackageNamespaceMutation) ClearPackage()

ClearPackage clears the "package" edge to the PackageType entity.

func (*PackageNamespaceMutation) ClearedEdges

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

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

func (*PackageNamespaceMutation) ClearedFields

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

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

func (PackageNamespaceMutation) Client

func (m PackageNamespaceMutation) 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 (*PackageNamespaceMutation) EdgeCleared

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

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

func (*PackageNamespaceMutation) Field

func (m *PackageNamespaceMutation) 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 (*PackageNamespaceMutation) FieldCleared

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

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

func (*PackageNamespaceMutation) Fields

func (m *PackageNamespaceMutation) 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 (*PackageNamespaceMutation) ID

func (m *PackageNamespaceMutation) ID() (id int, 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 (*PackageNamespaceMutation) 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 (*PackageNamespaceMutation) NamesCleared

func (m *PackageNamespaceMutation) NamesCleared() bool

NamesCleared reports if the "names" edge to the PackageName entity was cleared.

func (*PackageNamespaceMutation) NamesIDs

func (m *PackageNamespaceMutation) NamesIDs() (ids []int)

NamesIDs returns the "names" edge IDs in the mutation.

func (*PackageNamespaceMutation) Namespace

func (m *PackageNamespaceMutation) Namespace() (r string, exists bool)

Namespace returns the value of the "namespace" field in the mutation.

func (*PackageNamespaceMutation) OldField

func (m *PackageNamespaceMutation) 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 (*PackageNamespaceMutation) OldNamespace

func (m *PackageNamespaceMutation) OldNamespace(ctx context.Context) (v string, err error)

OldNamespace returns the old "namespace" field's value of the PackageNamespace entity. If the PackageNamespace 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 (*PackageNamespaceMutation) OldPackageID

func (m *PackageNamespaceMutation) OldPackageID(ctx context.Context) (v int, err error)

OldPackageID returns the old "package_id" field's value of the PackageNamespace entity. If the PackageNamespace 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 (*PackageNamespaceMutation) Op

func (m *PackageNamespaceMutation) Op() Op

Op returns the operation name.

func (*PackageNamespaceMutation) PackageCleared

func (m *PackageNamespaceMutation) PackageCleared() bool

PackageCleared reports if the "package" edge to the PackageType entity was cleared.

func (*PackageNamespaceMutation) PackageID

func (m *PackageNamespaceMutation) PackageID() (r int, exists bool)

PackageID returns the value of the "package_id" field in the mutation.

func (*PackageNamespaceMutation) PackageIDs

func (m *PackageNamespaceMutation) PackageIDs() (ids []int)

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 (*PackageNamespaceMutation) RemoveNameIDs

func (m *PackageNamespaceMutation) RemoveNameIDs(ids ...int)

RemoveNameIDs removes the "names" edge to the PackageName entity by IDs.

func (*PackageNamespaceMutation) RemovedEdges

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

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

func (*PackageNamespaceMutation) RemovedIDs

func (m *PackageNamespaceMutation) 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 (*PackageNamespaceMutation) RemovedNamesIDs

func (m *PackageNamespaceMutation) RemovedNamesIDs() (ids []int)

RemovedNames returns the removed IDs of the "names" edge to the PackageName entity.

func (*PackageNamespaceMutation) ResetEdge

func (m *PackageNamespaceMutation) 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 (*PackageNamespaceMutation) ResetField

func (m *PackageNamespaceMutation) 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 (*PackageNamespaceMutation) ResetNames

func (m *PackageNamespaceMutation) ResetNames()

ResetNames resets all changes to the "names" edge.

func (*PackageNamespaceMutation) ResetNamespace

func (m *PackageNamespaceMutation) ResetNamespace()

ResetNamespace resets all changes to the "namespace" field.

func (*PackageNamespaceMutation) ResetPackage

func (m *PackageNamespaceMutation) ResetPackage()

ResetPackage resets all changes to the "package" edge.

func (*PackageNamespaceMutation) ResetPackageID

func (m *PackageNamespaceMutation) ResetPackageID()

ResetPackageID resets all changes to the "package_id" field.

func (*PackageNamespaceMutation) SetField

func (m *PackageNamespaceMutation) 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 (*PackageNamespaceMutation) SetNamespace

func (m *PackageNamespaceMutation) SetNamespace(s string)

SetNamespace sets the "namespace" field.

func (*PackageNamespaceMutation) SetOp

func (m *PackageNamespaceMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*PackageNamespaceMutation) SetPackageID

func (m *PackageNamespaceMutation) SetPackageID(i int)

SetPackageID sets the "package_id" field.

func (PackageNamespaceMutation) Tx

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

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

func (*PackageNamespaceMutation) Type

func (m *PackageNamespaceMutation) Type() string

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

func (*PackageNamespaceMutation) Where

Where appends a list predicates to the PackageNamespaceMutation builder.

func (*PackageNamespaceMutation) WhereP

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

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

type PackageNamespaceOrder

type PackageNamespaceOrder struct {
	Direction OrderDirection              `json:"direction"`
	Field     *PackageNamespaceOrderField `json:"field"`
}

PackageNamespaceOrder defines the ordering of PackageNamespace.

type PackageNamespaceOrderField

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

PackageNamespaceOrderField defines the ordering field of PackageNamespace.

type PackageNamespacePaginateOption

type PackageNamespacePaginateOption func(*packagenamespacePager) error

PackageNamespacePaginateOption enables pagination customization.

func WithPackageNamespaceFilter

func WithPackageNamespaceFilter(filter func(*PackageNamespaceQuery) (*PackageNamespaceQuery, error)) PackageNamespacePaginateOption

WithPackageNamespaceFilter configures pagination filter.

func WithPackageNamespaceOrder

func WithPackageNamespaceOrder(order *PackageNamespaceOrder) PackageNamespacePaginateOption

WithPackageNamespaceOrder configures pagination ordering.

type PackageNamespaceQuery

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

PackageNamespaceQuery is the builder for querying PackageNamespace entities.

func (*PackageNamespaceQuery) Aggregate

Aggregate returns a PackageNamespaceSelect configured with the given aggregations.

func (*PackageNamespaceQuery) All

All executes the query and returns a list of PackageNamespaces.

func (*PackageNamespaceQuery) AllX

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

func (*PackageNamespaceQuery) Clone

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

func (*PackageNamespaceQuery) CollectFields

func (pn *PackageNamespaceQuery) CollectFields(ctx context.Context, satisfies ...string) (*PackageNamespaceQuery, error)

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

func (*PackageNamespaceQuery) Count

func (pnq *PackageNamespaceQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*PackageNamespaceQuery) CountX

func (pnq *PackageNamespaceQuery) CountX(ctx context.Context) int

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

func (*PackageNamespaceQuery) Exist

func (pnq *PackageNamespaceQuery) Exist(ctx context.Context) (bool, error)

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

func (*PackageNamespaceQuery) ExistX

func (pnq *PackageNamespaceQuery) ExistX(ctx context.Context) bool

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

func (*PackageNamespaceQuery) First

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

func (*PackageNamespaceQuery) FirstID

func (pnq *PackageNamespaceQuery) FirstID(ctx context.Context) (id int, err error)

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

func (*PackageNamespaceQuery) FirstIDX

func (pnq *PackageNamespaceQuery) FirstIDX(ctx context.Context) int

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

func (*PackageNamespaceQuery) FirstX

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

func (*PackageNamespaceQuery) GroupBy

func (pnq *PackageNamespaceQuery) GroupBy(field string, fields ...string) *PackageNamespaceGroupBy

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 int `json:"package_id,omitempty"`
	Count int `json:"count,omitempty"`
}

client.PackageNamespace.Query().
	GroupBy(packagenamespace.FieldPackageID).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*PackageNamespaceQuery) IDs

func (pnq *PackageNamespaceQuery) IDs(ctx context.Context) (ids []int, err error)

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

func (*PackageNamespaceQuery) IDsX

func (pnq *PackageNamespaceQuery) IDsX(ctx context.Context) []int

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

func (*PackageNamespaceQuery) Limit

func (pnq *PackageNamespaceQuery) Limit(limit int) *PackageNamespaceQuery

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

func (*PackageNamespaceQuery) Offset

func (pnq *PackageNamespaceQuery) Offset(offset int) *PackageNamespaceQuery

Offset to start from.

func (*PackageNamespaceQuery) Only

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

func (*PackageNamespaceQuery) OnlyID

func (pnq *PackageNamespaceQuery) OnlyID(ctx context.Context) (id int, err error)

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

func (*PackageNamespaceQuery) OnlyIDX

func (pnq *PackageNamespaceQuery) OnlyIDX(ctx context.Context) int

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

func (*PackageNamespaceQuery) OnlyX

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

func (*PackageNamespaceQuery) Order

Order specifies how the records should be ordered.

func (*PackageNamespaceQuery) Paginate

func (pn *PackageNamespaceQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...PackageNamespacePaginateOption,
) (*PackageNamespaceConnection, error)

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

func (*PackageNamespaceQuery) QueryNames

func (pnq *PackageNamespaceQuery) QueryNames() *PackageNameQuery

QueryNames chains the current query on the "names" edge.

func (*PackageNamespaceQuery) QueryPackage

func (pnq *PackageNamespaceQuery) QueryPackage() *PackageTypeQuery

QueryPackage chains the current query on the "package" edge.

func (*PackageNamespaceQuery) Select

func (pnq *PackageNamespaceQuery) Select(fields ...string) *PackageNamespaceSelect

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 int `json:"package_id,omitempty"`
}

client.PackageNamespace.Query().
	Select(packagenamespace.FieldPackageID).
	Scan(ctx, &v)

func (*PackageNamespaceQuery) Unique

func (pnq *PackageNamespaceQuery) Unique(unique bool) *PackageNamespaceQuery

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 (*PackageNamespaceQuery) Where

Where adds a new predicate for the PackageNamespaceQuery builder.

func (*PackageNamespaceQuery) WithNamedNames

func (pnq *PackageNamespaceQuery) WithNamedNames(name string, opts ...func(*PackageNameQuery)) *PackageNamespaceQuery

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

func (*PackageNamespaceQuery) WithNames

func (pnq *PackageNamespaceQuery) WithNames(opts ...func(*PackageNameQuery)) *PackageNamespaceQuery

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

func (*PackageNamespaceQuery) WithPackage

func (pnq *PackageNamespaceQuery) WithPackage(opts ...func(*PackageTypeQuery)) *PackageNamespaceQuery

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 PackageNamespaceSelect

type PackageNamespaceSelect struct {
	*PackageNamespaceQuery
	// contains filtered or unexported fields
}

PackageNamespaceSelect is the builder for selecting fields of PackageNamespace entities.

func (*PackageNamespaceSelect) Aggregate

Aggregate adds the given aggregation functions to the selector query.

func (*PackageNamespaceSelect) Bool

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

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

func (*PackageNamespaceSelect) BoolX

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

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

func (*PackageNamespaceSelect) Bools

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

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

func (*PackageNamespaceSelect) BoolsX

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

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

func (*PackageNamespaceSelect) Float64

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

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

func (*PackageNamespaceSelect) Float64X

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

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

func (*PackageNamespaceSelect) Float64s

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

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

func (*PackageNamespaceSelect) Float64sX

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

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

func (*PackageNamespaceSelect) Int

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

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

func (*PackageNamespaceSelect) IntX

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

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

func (*PackageNamespaceSelect) Ints

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

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

func (*PackageNamespaceSelect) IntsX

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

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

func (*PackageNamespaceSelect) Scan

func (pns *PackageNamespaceSelect) Scan(ctx context.Context, v any) error

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

func (*PackageNamespaceSelect) ScanX

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

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

func (*PackageNamespaceSelect) String

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

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

func (*PackageNamespaceSelect) StringX

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

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

func (*PackageNamespaceSelect) Strings

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

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

func (*PackageNamespaceSelect) StringsX

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

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

type PackageNamespaceUpdate

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

PackageNamespaceUpdate is the builder for updating PackageNamespace entities.

func (*PackageNamespaceUpdate) AddNameIDs

func (pnu *PackageNamespaceUpdate) AddNameIDs(ids ...int) *PackageNamespaceUpdate

AddNameIDs adds the "names" edge to the PackageName entity by IDs.

func (*PackageNamespaceUpdate) AddNames

AddNames adds the "names" edges to the PackageName entity.

func (*PackageNamespaceUpdate) ClearNames

ClearNames clears all "names" edges to the PackageName entity.

func (*PackageNamespaceUpdate) ClearPackage

func (pnu *PackageNamespaceUpdate) ClearPackage() *PackageNamespaceUpdate

ClearPackage clears the "package" edge to the PackageType entity.

func (*PackageNamespaceUpdate) Exec

Exec executes the query.

func (*PackageNamespaceUpdate) ExecX

func (pnu *PackageNamespaceUpdate) ExecX(ctx context.Context)

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

func (*PackageNamespaceUpdate) Mutation

Mutation returns the PackageNamespaceMutation object of the builder.

func (*PackageNamespaceUpdate) RemoveNameIDs

func (pnu *PackageNamespaceUpdate) RemoveNameIDs(ids ...int) *PackageNamespaceUpdate

RemoveNameIDs removes the "names" edge to PackageName entities by IDs.

func (*PackageNamespaceUpdate) RemoveNames

RemoveNames removes "names" edges to PackageName entities.

func (*PackageNamespaceUpdate) Save

func (pnu *PackageNamespaceUpdate) Save(ctx context.Context) (int, error)

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

func (*PackageNamespaceUpdate) SaveX

func (pnu *PackageNamespaceUpdate) SaveX(ctx context.Context) int

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

func (*PackageNamespaceUpdate) SetNamespace

SetNamespace sets the "namespace" field.

func (*PackageNamespaceUpdate) SetPackage

SetPackage sets the "package" edge to the PackageType entity.

func (*PackageNamespaceUpdate) SetPackageID

func (pnu *PackageNamespaceUpdate) SetPackageID(i int) *PackageNamespaceUpdate

SetPackageID sets the "package_id" field.

func (*PackageNamespaceUpdate) Where

Where appends a list predicates to the PackageNamespaceUpdate builder.

type PackageNamespaceUpdateOne

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

PackageNamespaceUpdateOne is the builder for updating a single PackageNamespace entity.

func (*PackageNamespaceUpdateOne) AddNameIDs

func (pnuo *PackageNamespaceUpdateOne) AddNameIDs(ids ...int) *PackageNamespaceUpdateOne

AddNameIDs adds the "names" edge to the PackageName entity by IDs.

func (*PackageNamespaceUpdateOne) AddNames

AddNames adds the "names" edges to the PackageName entity.

func (*PackageNamespaceUpdateOne) ClearNames

ClearNames clears all "names" edges to the PackageName entity.

func (*PackageNamespaceUpdateOne) ClearPackage

ClearPackage clears the "package" edge to the PackageType entity.

func (*PackageNamespaceUpdateOne) Exec

Exec executes the query on the entity.

func (*PackageNamespaceUpdateOne) ExecX

func (pnuo *PackageNamespaceUpdateOne) ExecX(ctx context.Context)

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

func (*PackageNamespaceUpdateOne) Mutation

Mutation returns the PackageNamespaceMutation object of the builder.

func (*PackageNamespaceUpdateOne) RemoveNameIDs

func (pnuo *PackageNamespaceUpdateOne) RemoveNameIDs(ids ...int) *PackageNamespaceUpdateOne

RemoveNameIDs removes the "names" edge to PackageName entities by IDs.

func (*PackageNamespaceUpdateOne) RemoveNames

RemoveNames removes "names" edges to PackageName entities.

func (*PackageNamespaceUpdateOne) Save

Save executes the query and returns the updated PackageNamespace entity.

func (*PackageNamespaceUpdateOne) SaveX

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

func (*PackageNamespaceUpdateOne) Select

func (pnuo *PackageNamespaceUpdateOne) Select(field string, fields ...string) *PackageNamespaceUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*PackageNamespaceUpdateOne) SetNamespace

SetNamespace sets the "namespace" field.

func (*PackageNamespaceUpdateOne) SetPackage

SetPackage sets the "package" edge to the PackageType entity.

func (*PackageNamespaceUpdateOne) SetPackageID

SetPackageID sets the "package_id" field.

func (*PackageNamespaceUpdateOne) Where

Where appends a list predicates to the PackageNamespaceUpdate builder.

type PackageNamespaceUpsert

type PackageNamespaceUpsert struct {
	*sql.UpdateSet
}

PackageNamespaceUpsert is the "OnConflict" setter.

func (*PackageNamespaceUpsert) SetNamespace

SetNamespace sets the "namespace" field.

func (*PackageNamespaceUpsert) SetPackageID

SetPackageID sets the "package_id" field.

func (*PackageNamespaceUpsert) UpdateNamespace

func (u *PackageNamespaceUpsert) UpdateNamespace() *PackageNamespaceUpsert

UpdateNamespace sets the "namespace" field to the value that was provided on create.

func (*PackageNamespaceUpsert) UpdatePackageID

func (u *PackageNamespaceUpsert) UpdatePackageID() *PackageNamespaceUpsert

UpdatePackageID sets the "package_id" field to the value that was provided on create.

type PackageNamespaceUpsertBulk

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

PackageNamespaceUpsertBulk is the builder for "upsert"-ing a bulk of PackageNamespace nodes.

func (*PackageNamespaceUpsertBulk) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*PackageNamespaceUpsertBulk) Exec

Exec executes the query.

func (*PackageNamespaceUpsertBulk) ExecX

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

func (*PackageNamespaceUpsertBulk) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.PackageNamespace.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*PackageNamespaceUpsertBulk) SetNamespace

SetNamespace sets the "namespace" field.

func (*PackageNamespaceUpsertBulk) SetPackageID

SetPackageID sets the "package_id" field.

func (*PackageNamespaceUpsertBulk) Update

Update allows overriding fields `UPDATE` values. See the PackageNamespaceCreateBulk.OnConflict documentation for more info.

func (*PackageNamespaceUpsertBulk) UpdateNamespace

UpdateNamespace sets the "namespace" field to the value that was provided on create.

func (*PackageNamespaceUpsertBulk) UpdateNewValues

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.PackageNamespace.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	Exec(ctx)

func (*PackageNamespaceUpsertBulk) UpdatePackageID

UpdatePackageID sets the "package_id" field to the value that was provided on create.

type PackageNamespaceUpsertOne

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

PackageNamespaceUpsertOne is the builder for "upsert"-ing

one PackageNamespace node.

func (*PackageNamespaceUpsertOne) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*PackageNamespaceUpsertOne) Exec

Exec executes the query.

func (*PackageNamespaceUpsertOne) ExecX

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

func (*PackageNamespaceUpsertOne) ID

func (u *PackageNamespaceUpsertOne) ID(ctx context.Context) (id int, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*PackageNamespaceUpsertOne) IDX

IDX is like ID, but panics if an error occurs.

func (*PackageNamespaceUpsertOne) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.PackageNamespace.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*PackageNamespaceUpsertOne) SetNamespace

SetNamespace sets the "namespace" field.

func (*PackageNamespaceUpsertOne) SetPackageID

SetPackageID sets the "package_id" field.

func (*PackageNamespaceUpsertOne) Update

Update allows overriding fields `UPDATE` values. See the PackageNamespaceCreate.OnConflict documentation for more info.

func (*PackageNamespaceUpsertOne) UpdateNamespace

UpdateNamespace sets the "namespace" field to the value that was provided on create.

func (*PackageNamespaceUpsertOne) UpdateNewValues

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.PackageNamespace.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	Exec(ctx)

func (*PackageNamespaceUpsertOne) UpdatePackageID

UpdatePackageID sets the "package_id" field to the value that was provided on create.

type PackageNamespaces

type PackageNamespaces []*PackageNamespace

PackageNamespaces is a parsable slice of PackageNamespace.

type PackageType

type PackageType struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// This node matches a pkg:<type> partial pURL
	Type string `json:"type,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the PackageTypeQuery when eager-loading is set.
	Edges PackageTypeEdges `json:"edges"`
	// contains filtered or unexported fields
}

PackageType is the model entity for the PackageType schema.

func (*PackageType) IsNode

func (n *PackageType) IsNode()

IsNode implements the Node interface check for GQLGen.

func (*PackageType) NamedNamespaces

func (pt *PackageType) NamedNamespaces(name string) ([]*PackageNamespace, error)

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

func (*PackageType) Namespaces

func (pt *PackageType) Namespaces(ctx context.Context) (result []*PackageNamespace, err error)

func (*PackageType) QueryNamespaces

func (pt *PackageType) QueryNamespaces() *PackageNamespaceQuery

QueryNamespaces queries the "namespaces" edge of the PackageType entity.

func (*PackageType) String

func (pt *PackageType) String() string

String implements the fmt.Stringer.

func (*PackageType) ToEdge

func (pt *PackageType) ToEdge(order *PackageTypeOrder) *PackageTypeEdge

ToEdge converts PackageType into PackageTypeEdge.

func (*PackageType) Unwrap

func (pt *PackageType) Unwrap() *PackageType

Unwrap unwraps the PackageType 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 (*PackageType) Update

func (pt *PackageType) Update() *PackageTypeUpdateOne

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

func (*PackageType) Value

func (pt *PackageType) Value(name string) (ent.Value, error)

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

type PackageTypeClient

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

PackageTypeClient is a client for the PackageType schema.

func NewPackageTypeClient

func NewPackageTypeClient(c config) *PackageTypeClient

NewPackageTypeClient returns a client for the PackageType from the given config.

func (*PackageTypeClient) Create

func (c *PackageTypeClient) Create() *PackageTypeCreate

Create returns a builder for creating a PackageType entity.

func (*PackageTypeClient) CreateBulk

func (c *PackageTypeClient) CreateBulk(builders ...*PackageTypeCreate) *PackageTypeCreateBulk

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

func (*PackageTypeClient) Delete

func (c *PackageTypeClient) Delete() *PackageTypeDelete

Delete returns a delete builder for PackageType.

func (*PackageTypeClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*PackageTypeClient) DeleteOneID

func (c *PackageTypeClient) DeleteOneID(id int) *PackageTypeDeleteOne

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

func (*PackageTypeClient) Get

func (c *PackageTypeClient) Get(ctx context.Context, id int) (*PackageType, error)

Get returns a PackageType entity by its id.

func (*PackageTypeClient) GetX

func (c *PackageTypeClient) GetX(ctx context.Context, id int) *PackageType

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

func (*PackageTypeClient) Hooks

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

Hooks returns the client hooks.

func (*PackageTypeClient) Intercept

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

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

func (*PackageTypeClient) Interceptors

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

Interceptors returns the client interceptors.

func (*PackageTypeClient) MapCreateBulk

func (c *PackageTypeClient) MapCreateBulk(slice any, setFunc func(*PackageTypeCreate, int)) *PackageTypeCreateBulk

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 (*PackageTypeClient) Query

func (c *PackageTypeClient) Query() *PackageTypeQuery

Query returns a query builder for PackageType.

func (*PackageTypeClient) QueryNamespaces

func (c *PackageTypeClient) QueryNamespaces(pt *PackageType) *PackageNamespaceQuery

QueryNamespaces queries the namespaces edge of a PackageType.

func (*PackageTypeClient) Update

func (c *PackageTypeClient) Update() *PackageTypeUpdate

Update returns an update builder for PackageType.

func (*PackageTypeClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*PackageTypeClient) UpdateOneID

func (c *PackageTypeClient) UpdateOneID(id int) *PackageTypeUpdateOne

UpdateOneID returns an update builder for the given id.

func (*PackageTypeClient) Use

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

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

type PackageTypeConnection

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

PackageTypeConnection is the connection containing edges to PackageType.

type PackageTypeCreate

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

PackageTypeCreate is the builder for creating a PackageType entity.

func (*PackageTypeCreate) AddNamespaceIDs

func (ptc *PackageTypeCreate) AddNamespaceIDs(ids ...int) *PackageTypeCreate

AddNamespaceIDs adds the "namespaces" edge to the PackageNamespace entity by IDs.

func (*PackageTypeCreate) AddNamespaces

func (ptc *PackageTypeCreate) AddNamespaces(p ...*PackageNamespace) *PackageTypeCreate

AddNamespaces adds the "namespaces" edges to the PackageNamespace entity.

func (*PackageTypeCreate) Exec

func (ptc *PackageTypeCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*PackageTypeCreate) ExecX

func (ptc *PackageTypeCreate) ExecX(ctx context.Context)

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

func (*PackageTypeCreate) Mutation

func (ptc *PackageTypeCreate) Mutation() *PackageTypeMutation

Mutation returns the PackageTypeMutation object of the builder.

func (*PackageTypeCreate) OnConflict

func (ptc *PackageTypeCreate) OnConflict(opts ...sql.ConflictOption) *PackageTypeUpsertOne

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

client.PackageType.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.PackageTypeUpsert) {
		SetType(v+v).
	}).
	Exec(ctx)

func (*PackageTypeCreate) OnConflictColumns

func (ptc *PackageTypeCreate) OnConflictColumns(columns ...string) *PackageTypeUpsertOne

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

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

func (*PackageTypeCreate) Save

func (ptc *PackageTypeCreate) Save(ctx context.Context) (*PackageType, error)

Save creates the PackageType in the database.

func (*PackageTypeCreate) SaveX

func (ptc *PackageTypeCreate) SaveX(ctx context.Context) *PackageType

SaveX calls Save and panics if Save returns an error.

func (*PackageTypeCreate) SetType

func (ptc *PackageTypeCreate) SetType(s string) *PackageTypeCreate

SetType sets the "type" field.

type PackageTypeCreateBulk

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

PackageTypeCreateBulk is the builder for creating many PackageType entities in bulk.

func (*PackageTypeCreateBulk) Exec

func (ptcb *PackageTypeCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*PackageTypeCreateBulk) ExecX

func (ptcb *PackageTypeCreateBulk) ExecX(ctx context.Context)

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

func (*PackageTypeCreateBulk) OnConflict

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

client.PackageType.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.PackageTypeUpsert) {
		SetType(v+v).
	}).
	Exec(ctx)

func (*PackageTypeCreateBulk) OnConflictColumns

func (ptcb *PackageTypeCreateBulk) OnConflictColumns(columns ...string) *PackageTypeUpsertBulk

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

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

func (*PackageTypeCreateBulk) Save

func (ptcb *PackageTypeCreateBulk) Save(ctx context.Context) ([]*PackageType, error)

Save creates the PackageType entities in the database.

func (*PackageTypeCreateBulk) SaveX

func (ptcb *PackageTypeCreateBulk) SaveX(ctx context.Context) []*PackageType

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

type PackageTypeDelete

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

PackageTypeDelete is the builder for deleting a PackageType entity.

func (*PackageTypeDelete) Exec

func (ptd *PackageTypeDelete) Exec(ctx context.Context) (int, error)

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

func (*PackageTypeDelete) ExecX

func (ptd *PackageTypeDelete) ExecX(ctx context.Context) int

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

func (*PackageTypeDelete) Where

Where appends a list predicates to the PackageTypeDelete builder.

type PackageTypeDeleteOne

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

PackageTypeDeleteOne is the builder for deleting a single PackageType entity.

func (*PackageTypeDeleteOne) Exec

func (ptdo *PackageTypeDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*PackageTypeDeleteOne) ExecX

func (ptdo *PackageTypeDeleteOne) ExecX(ctx context.Context)

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

func (*PackageTypeDeleteOne) Where

Where appends a list predicates to the PackageTypeDelete builder.

type PackageTypeEdge

type PackageTypeEdge struct {
	Node   *PackageType `json:"node"`
	Cursor Cursor       `json:"cursor"`
}

PackageTypeEdge is the edge representation of PackageType.

type PackageTypeEdges

type PackageTypeEdges struct {
	// Namespaces holds the value of the namespaces edge.
	Namespaces []*PackageNamespace `json:"namespaces,omitempty"`
	// contains filtered or unexported fields
}

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

func (PackageTypeEdges) NamespacesOrErr

func (e PackageTypeEdges) NamespacesOrErr() ([]*PackageNamespace, error)

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

type PackageTypeGroupBy

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

PackageTypeGroupBy is the group-by builder for PackageType entities.

func (*PackageTypeGroupBy) Aggregate

func (ptgb *PackageTypeGroupBy) Aggregate(fns ...AggregateFunc) *PackageTypeGroupBy

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

func (*PackageTypeGroupBy) Bool

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

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

func (*PackageTypeGroupBy) BoolX

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

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

func (*PackageTypeGroupBy) Bools

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

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

func (*PackageTypeGroupBy) BoolsX

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

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

func (*PackageTypeGroupBy) Float64

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

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

func (*PackageTypeGroupBy) Float64X

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

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

func (*PackageTypeGroupBy) Float64s

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

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

func (*PackageTypeGroupBy) Float64sX

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

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

func (*PackageTypeGroupBy) Int

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

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

func (*PackageTypeGroupBy) IntX

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

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

func (*PackageTypeGroupBy) Ints

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

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

func (*PackageTypeGroupBy) IntsX

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

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

func (*PackageTypeGroupBy) Scan

func (ptgb *PackageTypeGroupBy) Scan(ctx context.Context, v any) error

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

func (*PackageTypeGroupBy) ScanX

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

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

func (*PackageTypeGroupBy) String

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

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

func (*PackageTypeGroupBy) StringX

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

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

func (*PackageTypeGroupBy) Strings

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

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

func (*PackageTypeGroupBy) StringsX

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

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

type PackageTypeMutation

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

PackageTypeMutation represents an operation that mutates the PackageType nodes in the graph.

func (*PackageTypeMutation) AddField

func (m *PackageTypeMutation) 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 (*PackageTypeMutation) AddNamespaceIDs

func (m *PackageTypeMutation) AddNamespaceIDs(ids ...int)

AddNamespaceIDs adds the "namespaces" edge to the PackageNamespace entity by ids.

func (*PackageTypeMutation) AddedEdges

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

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

func (*PackageTypeMutation) AddedField

func (m *PackageTypeMutation) 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 (*PackageTypeMutation) AddedFields

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

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

func (*PackageTypeMutation) AddedIDs

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

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

func (*PackageTypeMutation) ClearEdge

func (m *PackageTypeMutation) 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 (*PackageTypeMutation) ClearField

func (m *PackageTypeMutation) 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 (*PackageTypeMutation) ClearNamespaces

func (m *PackageTypeMutation) ClearNamespaces()

ClearNamespaces clears the "namespaces" edge to the PackageNamespace entity.

func (*PackageTypeMutation) ClearedEdges

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

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

func (*PackageTypeMutation) ClearedFields

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

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

func (PackageTypeMutation) Client

func (m PackageTypeMutation) 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 (*PackageTypeMutation) EdgeCleared

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

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

func (*PackageTypeMutation) Field

func (m *PackageTypeMutation) 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 (*PackageTypeMutation) FieldCleared

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

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

func (*PackageTypeMutation) Fields

func (m *PackageTypeMutation) 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 (*PackageTypeMutation) GetType

func (m *PackageTypeMutation) GetType() (r string, exists bool)

GetType returns the value of the "type" field in the mutation.

func (*PackageTypeMutation) ID

func (m *PackageTypeMutation) ID() (id int, 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 (*PackageTypeMutation) IDs

func (m *PackageTypeMutation) IDs(ctx context.Context) ([]int, 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 (*PackageTypeMutation) NamespacesCleared

func (m *PackageTypeMutation) NamespacesCleared() bool

NamespacesCleared reports if the "namespaces" edge to the PackageNamespace entity was cleared.

func (*PackageTypeMutation) NamespacesIDs

func (m *PackageTypeMutation) NamespacesIDs() (ids []int)

NamespacesIDs returns the "namespaces" edge IDs in the mutation.

func (*PackageTypeMutation) OldField

func (m *PackageTypeMutation) 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 (*PackageTypeMutation) OldType

func (m *PackageTypeMutation) OldType(ctx context.Context) (v string, err error)

OldType returns the old "type" field's value of the PackageType entity. If the PackageType 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 (*PackageTypeMutation) Op

func (m *PackageTypeMutation) Op() Op

Op returns the operation name.

func (*PackageTypeMutation) RemoveNamespaceIDs

func (m *PackageTypeMutation) RemoveNamespaceIDs(ids ...int)

RemoveNamespaceIDs removes the "namespaces" edge to the PackageNamespace entity by IDs.

func (*PackageTypeMutation) RemovedEdges

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

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

func (*PackageTypeMutation) RemovedIDs

func (m *PackageTypeMutation) 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 (*PackageTypeMutation) RemovedNamespacesIDs

func (m *PackageTypeMutation) RemovedNamespacesIDs() (ids []int)

RemovedNamespaces returns the removed IDs of the "namespaces" edge to the PackageNamespace entity.

func (*PackageTypeMutation) ResetEdge

func (m *PackageTypeMutation) 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 (*PackageTypeMutation) ResetField

func (m *PackageTypeMutation) 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 (*PackageTypeMutation) ResetNamespaces

func (m *PackageTypeMutation) ResetNamespaces()

ResetNamespaces resets all changes to the "namespaces" edge.

func (*PackageTypeMutation) ResetType

func (m *PackageTypeMutation) ResetType()

ResetType resets all changes to the "type" field.

func (*PackageTypeMutation) SetField

func (m *PackageTypeMutation) 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 (*PackageTypeMutation) SetOp

func (m *PackageTypeMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*PackageTypeMutation) SetType

func (m *PackageTypeMutation) SetType(s string)

SetType sets the "type" field.

func (PackageTypeMutation) Tx

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

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

func (*PackageTypeMutation) Type

func (m *PackageTypeMutation) Type() string

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

func (*PackageTypeMutation) Where

func (m *PackageTypeMutation) Where(ps ...predicate.PackageType)

Where appends a list predicates to the PackageTypeMutation builder.

func (*PackageTypeMutation) WhereP

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

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

type PackageTypeOrder

type PackageTypeOrder struct {
	Direction OrderDirection         `json:"direction"`
	Field     *PackageTypeOrderField `json:"field"`
}

PackageTypeOrder defines the ordering of PackageType.

type PackageTypeOrderField

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

PackageTypeOrderField defines the ordering field of PackageType.

type PackageTypePaginateOption

type PackageTypePaginateOption func(*packagetypePager) error

PackageTypePaginateOption enables pagination customization.

func WithPackageTypeFilter

func WithPackageTypeFilter(filter func(*PackageTypeQuery) (*PackageTypeQuery, error)) PackageTypePaginateOption

WithPackageTypeFilter configures pagination filter.

func WithPackageTypeOrder

func WithPackageTypeOrder(order *PackageTypeOrder) PackageTypePaginateOption

WithPackageTypeOrder configures pagination ordering.

type PackageTypeQuery

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

PackageTypeQuery is the builder for querying PackageType entities.

func (*PackageTypeQuery) Aggregate

func (ptq *PackageTypeQuery) Aggregate(fns ...AggregateFunc) *PackageTypeSelect

Aggregate returns a PackageTypeSelect configured with the given aggregations.

func (*PackageTypeQuery) All

func (ptq *PackageTypeQuery) All(ctx context.Context) ([]*PackageType, error)

All executes the query and returns a list of PackageTypes.

func (*PackageTypeQuery) AllX

func (ptq *PackageTypeQuery) AllX(ctx context.Context) []*PackageType

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

func (*PackageTypeQuery) Clone

func (ptq *PackageTypeQuery) Clone() *PackageTypeQuery

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

func (*PackageTypeQuery) CollectFields

func (pt *PackageTypeQuery) CollectFields(ctx context.Context, satisfies ...string) (*PackageTypeQuery, error)

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

func (*PackageTypeQuery) Count

func (ptq *PackageTypeQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*PackageTypeQuery) CountX

func (ptq *PackageTypeQuery) CountX(ctx context.Context) int

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

func (*PackageTypeQuery) Exist

func (ptq *PackageTypeQuery) Exist(ctx context.Context) (bool, error)

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

func (*PackageTypeQuery) ExistX

func (ptq *PackageTypeQuery) ExistX(ctx context.Context) bool

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

func (*PackageTypeQuery) First

func (ptq *PackageTypeQuery) First(ctx context.Context) (*PackageType, error)

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

func (*PackageTypeQuery) FirstID

func (ptq *PackageTypeQuery) FirstID(ctx context.Context) (id int, err error)

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

func (*PackageTypeQuery) FirstIDX

func (ptq *PackageTypeQuery) FirstIDX(ctx context.Context) int

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

func (*PackageTypeQuery) FirstX

func (ptq *PackageTypeQuery) FirstX(ctx context.Context) *PackageType

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

func (*PackageTypeQuery) GroupBy

func (ptq *PackageTypeQuery) GroupBy(field string, fields ...string) *PackageTypeGroupBy

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.PackageType.Query().
	GroupBy(packagetype.FieldType).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*PackageTypeQuery) IDs

func (ptq *PackageTypeQuery) IDs(ctx context.Context) (ids []int, err error)

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

func (*PackageTypeQuery) IDsX

func (ptq *PackageTypeQuery) IDsX(ctx context.Context) []int

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

func (*PackageTypeQuery) Limit

func (ptq *PackageTypeQuery) Limit(limit int) *PackageTypeQuery

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

func (*PackageTypeQuery) Offset

func (ptq *PackageTypeQuery) Offset(offset int) *PackageTypeQuery

Offset to start from.

func (*PackageTypeQuery) Only

func (ptq *PackageTypeQuery) Only(ctx context.Context) (*PackageType, error)

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

func (*PackageTypeQuery) OnlyID

func (ptq *PackageTypeQuery) OnlyID(ctx context.Context) (id int, err error)

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

func (*PackageTypeQuery) OnlyIDX

func (ptq *PackageTypeQuery) OnlyIDX(ctx context.Context) int

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

func (*PackageTypeQuery) OnlyX

func (ptq *PackageTypeQuery) OnlyX(ctx context.Context) *PackageType

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

func (*PackageTypeQuery) Order

Order specifies how the records should be ordered.

func (*PackageTypeQuery) Paginate

func (pt *PackageTypeQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...PackageTypePaginateOption,
) (*PackageTypeConnection, error)

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

func (*PackageTypeQuery) QueryNamespaces

func (ptq *PackageTypeQuery) QueryNamespaces() *PackageNamespaceQuery

QueryNamespaces chains the current query on the "namespaces" edge.

func (*PackageTypeQuery) Select

func (ptq *PackageTypeQuery) Select(fields ...string) *PackageTypeSelect

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.PackageType.Query().
	Select(packagetype.FieldType).
	Scan(ctx, &v)

func (*PackageTypeQuery) Unique

func (ptq *PackageTypeQuery) Unique(unique bool) *PackageTypeQuery

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 (*PackageTypeQuery) Where

Where adds a new predicate for the PackageTypeQuery builder.

func (*PackageTypeQuery) WithNamedNamespaces

func (ptq *PackageTypeQuery) WithNamedNamespaces(name string, opts ...func(*PackageNamespaceQuery)) *PackageTypeQuery

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

func (*PackageTypeQuery) WithNamespaces

func (ptq *PackageTypeQuery) WithNamespaces(opts ...func(*PackageNamespaceQuery)) *PackageTypeQuery

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

type PackageTypeSelect

type PackageTypeSelect struct {
	*PackageTypeQuery
	// contains filtered or unexported fields
}

PackageTypeSelect is the builder for selecting fields of PackageType entities.

func (*PackageTypeSelect) Aggregate

func (pts *PackageTypeSelect) Aggregate(fns ...AggregateFunc) *PackageTypeSelect

Aggregate adds the given aggregation functions to the selector query.

func (*PackageTypeSelect) Bool

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

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

func (*PackageTypeSelect) BoolX

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

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

func (*PackageTypeSelect) Bools

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

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

func (*PackageTypeSelect) BoolsX

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

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

func (*PackageTypeSelect) Float64

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

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

func (*PackageTypeSelect) Float64X

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

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

func (*PackageTypeSelect) Float64s

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

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

func (*PackageTypeSelect) Float64sX

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

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

func (*PackageTypeSelect) Int

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

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

func (*PackageTypeSelect) IntX

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

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

func (*PackageTypeSelect) Ints

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

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

func (*PackageTypeSelect) IntsX

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

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

func (*PackageTypeSelect) Scan

func (pts *PackageTypeSelect) Scan(ctx context.Context, v any) error

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

func (*PackageTypeSelect) ScanX

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

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

func (*PackageTypeSelect) String

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

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

func (*PackageTypeSelect) StringX

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

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

func (*PackageTypeSelect) Strings

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

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

func (*PackageTypeSelect) StringsX

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

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

type PackageTypeUpdate

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

PackageTypeUpdate is the builder for updating PackageType entities.

func (*PackageTypeUpdate) AddNamespaceIDs

func (ptu *PackageTypeUpdate) AddNamespaceIDs(ids ...int) *PackageTypeUpdate

AddNamespaceIDs adds the "namespaces" edge to the PackageNamespace entity by IDs.

func (*PackageTypeUpdate) AddNamespaces

func (ptu *PackageTypeUpdate) AddNamespaces(p ...*PackageNamespace) *PackageTypeUpdate

AddNamespaces adds the "namespaces" edges to the PackageNamespace entity.

func (*PackageTypeUpdate) ClearNamespaces

func (ptu *PackageTypeUpdate) ClearNamespaces() *PackageTypeUpdate

ClearNamespaces clears all "namespaces" edges to the PackageNamespace entity.

func (*PackageTypeUpdate) Exec

func (ptu *PackageTypeUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*PackageTypeUpdate) ExecX

func (ptu *PackageTypeUpdate) ExecX(ctx context.Context)

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

func (*PackageTypeUpdate) Mutation

func (ptu *PackageTypeUpdate) Mutation() *PackageTypeMutation

Mutation returns the PackageTypeMutation object of the builder.

func (*PackageTypeUpdate) RemoveNamespaceIDs

func (ptu *PackageTypeUpdate) RemoveNamespaceIDs(ids ...int) *PackageTypeUpdate

RemoveNamespaceIDs removes the "namespaces" edge to PackageNamespace entities by IDs.

func (*PackageTypeUpdate) RemoveNamespaces

func (ptu *PackageTypeUpdate) RemoveNamespaces(p ...*PackageNamespace) *PackageTypeUpdate

RemoveNamespaces removes "namespaces" edges to PackageNamespace entities.

func (*PackageTypeUpdate) Save

func (ptu *PackageTypeUpdate) Save(ctx context.Context) (int, error)

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

func (*PackageTypeUpdate) SaveX

func (ptu *PackageTypeUpdate) SaveX(ctx context.Context) int

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

func (*PackageTypeUpdate) SetType

func (ptu *PackageTypeUpdate) SetType(s string) *PackageTypeUpdate

SetType sets the "type" field.

func (*PackageTypeUpdate) Where

Where appends a list predicates to the PackageTypeUpdate builder.

type PackageTypeUpdateOne

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

PackageTypeUpdateOne is the builder for updating a single PackageType entity.

func (*PackageTypeUpdateOne) AddNamespaceIDs

func (ptuo *PackageTypeUpdateOne) AddNamespaceIDs(ids ...int) *PackageTypeUpdateOne

AddNamespaceIDs adds the "namespaces" edge to the PackageNamespace entity by IDs.

func (*PackageTypeUpdateOne) AddNamespaces

func (ptuo *PackageTypeUpdateOne) AddNamespaces(p ...*PackageNamespace) *PackageTypeUpdateOne

AddNamespaces adds the "namespaces" edges to the PackageNamespace entity.

func (*PackageTypeUpdateOne) ClearNamespaces

func (ptuo *PackageTypeUpdateOne) ClearNamespaces() *PackageTypeUpdateOne

ClearNamespaces clears all "namespaces" edges to the PackageNamespace entity.

func (*PackageTypeUpdateOne) Exec

func (ptuo *PackageTypeUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*PackageTypeUpdateOne) ExecX

func (ptuo *PackageTypeUpdateOne) ExecX(ctx context.Context)

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

func (*PackageTypeUpdateOne) Mutation

func (ptuo *PackageTypeUpdateOne) Mutation() *PackageTypeMutation

Mutation returns the PackageTypeMutation object of the builder.

func (*PackageTypeUpdateOne) RemoveNamespaceIDs

func (ptuo *PackageTypeUpdateOne) RemoveNamespaceIDs(ids ...int) *PackageTypeUpdateOne

RemoveNamespaceIDs removes the "namespaces" edge to PackageNamespace entities by IDs.

func (*PackageTypeUpdateOne) RemoveNamespaces

func (ptuo *PackageTypeUpdateOne) RemoveNamespaces(p ...*PackageNamespace) *PackageTypeUpdateOne

RemoveNamespaces removes "namespaces" edges to PackageNamespace entities.

func (*PackageTypeUpdateOne) Save

Save executes the query and returns the updated PackageType entity.

func (*PackageTypeUpdateOne) SaveX

func (ptuo *PackageTypeUpdateOne) SaveX(ctx context.Context) *PackageType

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

func (*PackageTypeUpdateOne) Select

func (ptuo *PackageTypeUpdateOne) Select(field string, fields ...string) *PackageTypeUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*PackageTypeUpdateOne) SetType

SetType sets the "type" field.

func (*PackageTypeUpdateOne) Where

Where appends a list predicates to the PackageTypeUpdate builder.

type PackageTypeUpsert

type PackageTypeUpsert struct {
	*sql.UpdateSet
}

PackageTypeUpsert is the "OnConflict" setter.

func (*PackageTypeUpsert) SetType

SetType sets the "type" field.

func (*PackageTypeUpsert) UpdateType

func (u *PackageTypeUpsert) UpdateType() *PackageTypeUpsert

UpdateType sets the "type" field to the value that was provided on create.

type PackageTypeUpsertBulk

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

PackageTypeUpsertBulk is the builder for "upsert"-ing a bulk of PackageType nodes.

func (*PackageTypeUpsertBulk) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*PackageTypeUpsertBulk) Exec

Exec executes the query.

func (*PackageTypeUpsertBulk) ExecX

func (u *PackageTypeUpsertBulk) ExecX(ctx context.Context)

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

func (*PackageTypeUpsertBulk) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.PackageType.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*PackageTypeUpsertBulk) SetType

SetType sets the "type" field.

func (*PackageTypeUpsertBulk) Update

Update allows overriding fields `UPDATE` values. See the PackageTypeCreateBulk.OnConflict documentation for more info.

func (*PackageTypeUpsertBulk) UpdateNewValues

func (u *PackageTypeUpsertBulk) UpdateNewValues() *PackageTypeUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.PackageType.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	Exec(ctx)

func (*PackageTypeUpsertBulk) UpdateType

UpdateType sets the "type" field to the value that was provided on create.

type PackageTypeUpsertOne

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

PackageTypeUpsertOne is the builder for "upsert"-ing

one PackageType node.

func (*PackageTypeUpsertOne) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*PackageTypeUpsertOne) Exec

Exec executes the query.

func (*PackageTypeUpsertOne) ExecX

func (u *PackageTypeUpsertOne) ExecX(ctx context.Context)

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

func (*PackageTypeUpsertOne) ID

func (u *PackageTypeUpsertOne) ID(ctx context.Context) (id int, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*PackageTypeUpsertOne) IDX

IDX is like ID, but panics if an error occurs.

func (*PackageTypeUpsertOne) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.PackageType.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*PackageTypeUpsertOne) SetType

SetType sets the "type" field.

func (*PackageTypeUpsertOne) Update

Update allows overriding fields `UPDATE` values. See the PackageTypeCreate.OnConflict documentation for more info.

func (*PackageTypeUpsertOne) UpdateNewValues

func (u *PackageTypeUpsertOne) UpdateNewValues() *PackageTypeUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.PackageType.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	Exec(ctx)

func (*PackageTypeUpsertOne) UpdateType

func (u *PackageTypeUpsertOne) UpdateType() *PackageTypeUpsertOne

UpdateType sets the "type" field to the value that was provided on create.

type PackageTypes

type PackageTypes []*PackageType

PackageTypes is a parsable slice of PackageType.

type PackageVersion

type PackageVersion struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// NameID holds the value of the "name_id" field.
	NameID int `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) EqualPackages

func (pv *PackageVersion) EqualPackages(ctx context.Context) (result []*PkgEqual, err error)

func (*PackageVersion) IsNode

func (n *PackageVersion) IsNode()

IsNode implements the Node interface check for GQLGen.

func (*PackageVersion) Name

func (pv *PackageVersion) Name(ctx context.Context) (*PackageName, error)

func (*PackageVersion) NamedEqualPackages

func (pv *PackageVersion) NamedEqualPackages(name string) ([]*PkgEqual, error)

NamedEqualPackages returns the EqualPackages 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) 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) Occurrences

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

func (*PackageVersion) QueryEqualPackages

func (pv *PackageVersion) QueryEqualPackages() *PkgEqualQuery

QueryEqualPackages queries the "equal_packages" 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) QuerySbom

func (pv *PackageVersion) QuerySbom() *BillOfMaterialsQuery

QuerySbom queries the "sbom" 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.

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

func (c *PackageVersionClient) DeleteOneID(id int) *PackageVersionDeleteOne

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) QueryEqualPackages

func (c *PackageVersionClient) QueryEqualPackages(pv *PackageVersion) *PkgEqualQuery

QueryEqualPackages queries the equal_packages 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) QuerySbom

QuerySbom queries the sbom 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

func (c *PackageVersionClient) UpdateOneID(id int) *PackageVersionUpdateOne

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) AddEqualPackageIDs

func (pvc *PackageVersionCreate) AddEqualPackageIDs(ids ...int) *PackageVersionCreate

AddEqualPackageIDs adds the "equal_packages" edge to the PkgEqual entity by IDs.

func (*PackageVersionCreate) AddEqualPackages

func (pvc *PackageVersionCreate) AddEqualPackages(p ...*PkgEqual) *PackageVersionCreate

AddEqualPackages adds the "equal_packages" edges to the PkgEqual entity.

func (*PackageVersionCreate) AddOccurrenceIDs

func (pvc *PackageVersionCreate) AddOccurrenceIDs(ids ...int) *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) AddSbom

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

func (*PackageVersionCreate) AddSbomIDs

func (pvc *PackageVersionCreate) AddSbomIDs(ids ...int) *PackageVersionCreate

AddSbomIDs adds the "sbom" edge to the BillOfMaterials 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) SetName

SetName sets the "name" edge to the PackageName entity.

func (*PackageVersionCreate) SetNameID

func (pvc *PackageVersionCreate) SetNameID(i int) *PackageVersionCreate

SetNameID sets the "name_id" field.

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"`
	// EqualPackages holds the value of the equal_packages edge.
	EqualPackages []*PkgEqual `json:"equal_packages,omitempty"`
	// contains filtered or unexported fields
}

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

func (PackageVersionEdges) EqualPackagesOrErr

func (e PackageVersionEdges) EqualPackagesOrErr() ([]*PkgEqual, error)

EqualPackagesOrErr returns the EqualPackages 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) SbomOrErr

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

SbomOrErr returns the Sbom 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) AddEqualPackageIDs

func (m *PackageVersionMutation) AddEqualPackageIDs(ids ...int)

AddEqualPackageIDs adds the "equal_packages" edge to the PkgEqual 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) AddOccurrenceIDs

func (m *PackageVersionMutation) AddOccurrenceIDs(ids ...int)

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

func (*PackageVersionMutation) AddSbomIDs

func (m *PackageVersionMutation) AddSbomIDs(ids ...int)

AddSbomIDs adds the "sbom" edge to the BillOfMaterials 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) 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) ClearEqualPackages

func (m *PackageVersionMutation) ClearEqualPackages()

ClearEqualPackages clears the "equal_packages" edge to the PkgEqual entity.

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) 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) 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) 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) 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) EqualPackagesCleared

func (m *PackageVersionMutation) EqualPackagesCleared() bool

EqualPackagesCleared reports if the "equal_packages" edge to the PkgEqual entity was cleared.

func (*PackageVersionMutation) EqualPackagesIDs

func (m *PackageVersionMutation) EqualPackagesIDs() (ids []int)

EqualPackagesIDs returns the "equal_packages" edge IDs in the 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) 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 int, 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

func (m *PackageVersionMutation) IDs(ctx context.Context) ([]int, 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 (*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 int, exists bool)

NameID returns the value of the "name_id" field in the mutation.

func (*PackageVersionMutation) NameIDs

func (m *PackageVersionMutation) NameIDs() (ids []int)

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 []int)

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 int, 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) 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) RemoveEqualPackageIDs

func (m *PackageVersionMutation) RemoveEqualPackageIDs(ids ...int)

RemoveEqualPackageIDs removes the "equal_packages" edge to the PkgEqual entity by IDs.

func (*PackageVersionMutation) RemoveOccurrenceIDs

func (m *PackageVersionMutation) RemoveOccurrenceIDs(ids ...int)

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

func (*PackageVersionMutation) RemoveSbomIDs

func (m *PackageVersionMutation) RemoveSbomIDs(ids ...int)

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

func (*PackageVersionMutation) RemovedEdges

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

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

func (*PackageVersionMutation) RemovedEqualPackagesIDs

func (m *PackageVersionMutation) RemovedEqualPackagesIDs() (ids []int)

RemovedEqualPackages returns the removed IDs of the "equal_packages" edge to the PkgEqual 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) RemovedOccurrencesIDs

func (m *PackageVersionMutation) RemovedOccurrencesIDs() (ids []int)

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

func (*PackageVersionMutation) RemovedSbomIDs

func (m *PackageVersionMutation) RemovedSbomIDs() (ids []int)

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

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) ResetEqualPackages

func (m *PackageVersionMutation) ResetEqualPackages()

ResetEqualPackages resets all changes to the "equal_packages" edge.

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) ResetHash

func (m *PackageVersionMutation) ResetHash()

ResetHash resets all changes to the "hash" field.

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) 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) 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 []int)

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) SetNameID

func (m *PackageVersionMutation) SetNameID(i int)

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) 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 int, 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) int

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 int `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 []int, err error)

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

func (*PackageVersionQuery) IDsX

func (pvq *PackageVersionQuery) IDsX(ctx context.Context) []int

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 int, 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) int

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) QueryEqualPackages

func (pvq *PackageVersionQuery) QueryEqualPackages() *PkgEqualQuery

QueryEqualPackages chains the current query on the "equal_packages" 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) QuerySbom

func (pvq *PackageVersionQuery) QuerySbom() *BillOfMaterialsQuery

QuerySbom chains the current query on the "sbom" 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 int `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) WithEqualPackages

func (pvq *PackageVersionQuery) WithEqualPackages(opts ...func(*PkgEqualQuery)) *PackageVersionQuery

WithEqualPackages tells the query-builder to eager-load the nodes that are connected to the "equal_packages" 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) WithNamedEqualPackages

func (pvq *PackageVersionQuery) WithNamedEqualPackages(name string, opts ...func(*PkgEqualQuery)) *PackageVersionQuery

WithNamedEqualPackages tells the query-builder to eager-load the nodes that are connected to the "equal_packages" 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) 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) 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) 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.

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) AddEqualPackageIDs

func (pvu *PackageVersionUpdate) AddEqualPackageIDs(ids ...int) *PackageVersionUpdate

AddEqualPackageIDs adds the "equal_packages" edge to the PkgEqual entity by IDs.

func (*PackageVersionUpdate) AddEqualPackages

func (pvu *PackageVersionUpdate) AddEqualPackages(p ...*PkgEqual) *PackageVersionUpdate

AddEqualPackages adds the "equal_packages" edges to the PkgEqual entity.

func (*PackageVersionUpdate) AddOccurrenceIDs

func (pvu *PackageVersionUpdate) AddOccurrenceIDs(ids ...int) *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) AddSbom

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

func (*PackageVersionUpdate) AddSbomIDs

func (pvu *PackageVersionUpdate) AddSbomIDs(ids ...int) *PackageVersionUpdate

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

func (*PackageVersionUpdate) AppendQualifiers

func (pvu *PackageVersionUpdate) AppendQualifiers(mq []model.PackageQualifier) *PackageVersionUpdate

AppendQualifiers appends mq to the "qualifiers" field.

func (*PackageVersionUpdate) ClearEqualPackages

func (pvu *PackageVersionUpdate) ClearEqualPackages() *PackageVersionUpdate

ClearEqualPackages clears all "equal_packages" edges to the PkgEqual 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) 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) 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) RemoveEqualPackageIDs

func (pvu *PackageVersionUpdate) RemoveEqualPackageIDs(ids ...int) *PackageVersionUpdate

RemoveEqualPackageIDs removes the "equal_packages" edge to PkgEqual entities by IDs.

func (*PackageVersionUpdate) RemoveEqualPackages

func (pvu *PackageVersionUpdate) RemoveEqualPackages(p ...*PkgEqual) *PackageVersionUpdate

RemoveEqualPackages removes "equal_packages" edges to PkgEqual entities.

func (*PackageVersionUpdate) RemoveOccurrenceIDs

func (pvu *PackageVersionUpdate) RemoveOccurrenceIDs(ids ...int) *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) RemoveSbom

RemoveSbom removes "sbom" edges to BillOfMaterials entities.

func (*PackageVersionUpdate) RemoveSbomIDs

func (pvu *PackageVersionUpdate) RemoveSbomIDs(ids ...int) *PackageVersionUpdate

RemoveSbomIDs removes the "sbom" edge to BillOfMaterials 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

func (pvu *PackageVersionUpdate) SetNameID(i int) *PackageVersionUpdate

SetNameID sets the "name_id" field.

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) AddEqualPackageIDs

func (pvuo *PackageVersionUpdateOne) AddEqualPackageIDs(ids ...int) *PackageVersionUpdateOne

AddEqualPackageIDs adds the "equal_packages" edge to the PkgEqual entity by IDs.

func (*PackageVersionUpdateOne) AddEqualPackages

func (pvuo *PackageVersionUpdateOne) AddEqualPackages(p ...*PkgEqual) *PackageVersionUpdateOne

AddEqualPackages adds the "equal_packages" edges to the PkgEqual entity.

func (*PackageVersionUpdateOne) AddOccurrenceIDs

func (pvuo *PackageVersionUpdateOne) AddOccurrenceIDs(ids ...int) *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) AddSbom

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

func (*PackageVersionUpdateOne) AddSbomIDs

func (pvuo *PackageVersionUpdateOne) AddSbomIDs(ids ...int) *PackageVersionUpdateOne

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

func (*PackageVersionUpdateOne) AppendQualifiers

AppendQualifiers appends mq to the "qualifiers" field.

func (*PackageVersionUpdateOne) ClearEqualPackages

func (pvuo *PackageVersionUpdateOne) ClearEqualPackages() *PackageVersionUpdateOne

ClearEqualPackages clears all "equal_packages" edges to the PkgEqual 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) 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) 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) RemoveEqualPackageIDs

func (pvuo *PackageVersionUpdateOne) RemoveEqualPackageIDs(ids ...int) *PackageVersionUpdateOne

RemoveEqualPackageIDs removes the "equal_packages" edge to PkgEqual entities by IDs.

func (*PackageVersionUpdateOne) RemoveEqualPackages

func (pvuo *PackageVersionUpdateOne) RemoveEqualPackages(p ...*PkgEqual) *PackageVersionUpdateOne

RemoveEqualPackages removes "equal_packages" edges to PkgEqual entities.

func (*PackageVersionUpdateOne) RemoveOccurrenceIDs

func (pvuo *PackageVersionUpdateOne) RemoveOccurrenceIDs(ids ...int) *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) RemoveSbom

RemoveSbom removes "sbom" edges to BillOfMaterials entities.

func (*PackageVersionUpdateOne) RemoveSbomIDs

func (pvuo *PackageVersionUpdateOne) RemoveSbomIDs(ids ...int) *PackageVersionUpdateOne

RemoveSbomIDs removes the "sbom" edge to BillOfMaterials 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) 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(),
	).
	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 int, 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. Using this option is equivalent to using:

client.PackageVersion.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	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[int]

Common entgql types.

type PkgEqual

type PkgEqual struct {

	// ID of the ent.
	ID int `json:"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"`
	// An opaque hash of the packages 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) NamedPackages

func (pe *PkgEqual) NamedPackages(name string) ([]*PackageVersion, error)

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

func (*PkgEqual) Packages

func (pe *PkgEqual) Packages(ctx context.Context) (result []*PackageVersion, err error)

func (*PkgEqual) QueryPackages

func (pe *PkgEqual) QueryPackages() *PackageVersionQuery

QueryPackages queries the "packages" 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 int) *PkgEqualDeleteOne

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

func (*PkgEqualClient) Get

func (c *PkgEqualClient) Get(ctx context.Context, id int) (*PkgEqual, error)

Get returns a PkgEqual entity by its id.

func (*PkgEqualClient) GetX

func (c *PkgEqualClient) GetX(ctx context.Context, id int) *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) QueryPackages

func (c *PkgEqualClient) QueryPackages(pe *PkgEqual) *PackageVersionQuery

QueryPackages queries the packages 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 int) *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) AddPackageIDs

func (pec *PkgEqualCreate) AddPackageIDs(ids ...int) *PkgEqualCreate

AddPackageIDs adds the "packages" edge to the PackageVersion entity by IDs.

func (*PkgEqualCreate) AddPackages

func (pec *PkgEqualCreate) AddPackages(p ...*PackageVersion) *PkgEqualCreate

AddPackages adds the "packages" edges to the PackageVersion 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().
	SetOrigin(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) {
		SetOrigin(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) SetJustification

func (pec *PkgEqualCreate) SetJustification(s string) *PkgEqualCreate

SetJustification sets the "justification" field.

func (*PkgEqualCreate) SetOrigin

func (pec *PkgEqualCreate) SetOrigin(s string) *PkgEqualCreate

SetOrigin sets the "origin" field.

func (*PkgEqualCreate) SetPackagesHash

func (pec *PkgEqualCreate) SetPackagesHash(s string) *PkgEqualCreate

SetPackagesHash sets the "packages_hash" 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) {
		SetOrigin(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 {
	// Packages holds the value of the packages edge.
	Packages []*PackageVersion `json:"packages,omitempty"`
	// contains filtered or unexported fields
}

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

func (PkgEqualEdges) PackagesOrErr

func (e PkgEqualEdges) PackagesOrErr() ([]*PackageVersion, error)

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

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) AddPackageIDs

func (m *PkgEqualMutation) AddPackageIDs(ids ...int)

AddPackageIDs adds the "packages" edge to the PackageVersion entity by ids.

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) ClearPackages

func (m *PkgEqualMutation) ClearPackages()

ClearPackages clears the "packages" 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) 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) 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 int, 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) ([]int, 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) 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) 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) PackagesCleared

func (m *PkgEqualMutation) PackagesCleared() bool

PackagesCleared reports if the "packages" edge to the PackageVersion entity was cleared.

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) PackagesIDs

func (m *PkgEqualMutation) PackagesIDs() (ids []int)

PackagesIDs returns the "packages" edge IDs in the mutation.

func (*PkgEqualMutation) RemovePackageIDs

func (m *PkgEqualMutation) RemovePackageIDs(ids ...int)

RemovePackageIDs removes the "packages" edge to the PackageVersion entity by IDs.

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) RemovedPackagesIDs

func (m *PkgEqualMutation) RemovedPackagesIDs() (ids []int)

RemovedPackages returns the removed IDs of the "packages" edge to the PackageVersion entity.

func (*PkgEqualMutation) ResetCollector

func (m *PkgEqualMutation) ResetCollector()

ResetCollector resets all changes to the "collector" 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) 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) ResetPackages

func (m *PkgEqualMutation) ResetPackages()

ResetPackages resets all changes to the "packages" edge.

func (*PkgEqualMutation) ResetPackagesHash

func (m *PkgEqualMutation) ResetPackagesHash()

ResetPackagesHash resets all changes to the "packages_hash" field.

func (*PkgEqualMutation) SetCollector

func (m *PkgEqualMutation) SetCollector(s string)

SetCollector sets the "collector" 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) 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) SetPackagesHash

func (m *PkgEqualMutation) SetPackagesHash(s string)

SetPackagesHash sets the "packages_hash" 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 int, 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) int

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 {
	Origin string `json:"origin,omitempty"`
	Count int `json:"count,omitempty"`
}

client.PkgEqual.Query().
	GroupBy(pkgequal.FieldOrigin).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*PkgEqualQuery) IDs

func (peq *PkgEqualQuery) IDs(ctx context.Context) (ids []int, err error)

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

func (*PkgEqualQuery) IDsX

func (peq *PkgEqualQuery) IDsX(ctx context.Context) []int

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 int, 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) int

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) QueryPackages

func (peq *PkgEqualQuery) QueryPackages() *PackageVersionQuery

QueryPackages chains the current query on the "packages" 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 {
	Origin string `json:"origin,omitempty"`
}

client.PkgEqual.Query().
	Select(pkgequal.FieldOrigin).
	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) WithNamedPackages

func (peq *PkgEqualQuery) WithNamedPackages(name string, opts ...func(*PackageVersionQuery)) *PkgEqualQuery

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

func (*PkgEqualQuery) WithPackages

func (peq *PkgEqualQuery) WithPackages(opts ...func(*PackageVersionQuery)) *PkgEqualQuery

WithPackages tells the query-builder to eager-load the nodes that are connected to the "packages" 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) AddPackageIDs

func (peu *PkgEqualUpdate) AddPackageIDs(ids ...int) *PkgEqualUpdate

AddPackageIDs adds the "packages" edge to the PackageVersion entity by IDs.

func (*PkgEqualUpdate) AddPackages

func (peu *PkgEqualUpdate) AddPackages(p ...*PackageVersion) *PkgEqualUpdate

AddPackages adds the "packages" edges to the PackageVersion entity.

func (*PkgEqualUpdate) ClearPackages

func (peu *PkgEqualUpdate) ClearPackages() *PkgEqualUpdate

ClearPackages clears all "packages" edges 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) RemovePackageIDs

func (peu *PkgEqualUpdate) RemovePackageIDs(ids ...int) *PkgEqualUpdate

RemovePackageIDs removes the "packages" edge to PackageVersion entities by IDs.

func (*PkgEqualUpdate) RemovePackages

func (peu *PkgEqualUpdate) RemovePackages(p ...*PackageVersion) *PkgEqualUpdate

RemovePackages removes "packages" edges to PackageVersion entities.

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) SetJustification

func (peu *PkgEqualUpdate) SetJustification(s string) *PkgEqualUpdate

SetJustification sets the "justification" field.

func (*PkgEqualUpdate) SetOrigin

func (peu *PkgEqualUpdate) SetOrigin(s string) *PkgEqualUpdate

SetOrigin sets the "origin" field.

func (*PkgEqualUpdate) SetPackagesHash

func (peu *PkgEqualUpdate) SetPackagesHash(s string) *PkgEqualUpdate

SetPackagesHash sets the "packages_hash" 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) AddPackageIDs

func (peuo *PkgEqualUpdateOne) AddPackageIDs(ids ...int) *PkgEqualUpdateOne

AddPackageIDs adds the "packages" edge to the PackageVersion entity by IDs.

func (*PkgEqualUpdateOne) AddPackages

func (peuo *PkgEqualUpdateOne) AddPackages(p ...*PackageVersion) *PkgEqualUpdateOne

AddPackages adds the "packages" edges to the PackageVersion entity.

func (*PkgEqualUpdateOne) ClearPackages

func (peuo *PkgEqualUpdateOne) ClearPackages() *PkgEqualUpdateOne

ClearPackages clears all "packages" edges 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) RemovePackageIDs

func (peuo *PkgEqualUpdateOne) RemovePackageIDs(ids ...int) *PkgEqualUpdateOne

RemovePackageIDs removes the "packages" edge to PackageVersion entities by IDs.

func (*PkgEqualUpdateOne) RemovePackages

func (peuo *PkgEqualUpdateOne) RemovePackages(p ...*PackageVersion) *PkgEqualUpdateOne

RemovePackages removes "packages" edges to PackageVersion entities.

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) SetJustification

func (peuo *PkgEqualUpdateOne) SetJustification(s string) *PkgEqualUpdateOne

SetJustification sets the "justification" field.

func (*PkgEqualUpdateOne) SetOrigin

func (peuo *PkgEqualUpdateOne) SetOrigin(s string) *PkgEqualUpdateOne

SetOrigin sets the "origin" field.

func (*PkgEqualUpdateOne) SetPackagesHash

func (peuo *PkgEqualUpdateOne) SetPackagesHash(s string) *PkgEqualUpdateOne

SetPackagesHash sets the "packages_hash" 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) 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) UpdateCollector

func (u *PkgEqualUpsert) UpdateCollector() *PkgEqualUpsert

UpdateCollector sets the "collector" 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.

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) 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) 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) 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(),
	).
	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.

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 int, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*PkgEqualUpsertOne) IDX

func (u *PkgEqualUpsertOne) IDX(ctx context.Context) int

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) 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) 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) 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. Using this option is equivalent to using:

client.PkgEqual.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	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.

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 int `json:"id,omitempty"`
	// SourceID holds the value of the "source_id" field.
	SourceID *int `json:"source_id,omitempty"`
	// PackageVersionID holds the value of the "package_version_id" field.
	PackageVersionID *int `json:"package_version_id,omitempty"`
	// PackageNameID holds the value of the "package_name_id" field.
	PackageNameID *int `json:"package_name_id,omitempty"`
	// ArtifactID holds the value of the "artifact_id" field.
	ArtifactID *int `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"`
	// 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

func (c *PointOfContactClient) DeleteOneID(id int) *PointOfContactDeleteOne

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

func (c *PointOfContactClient) UpdateOneID(id int) *PointOfContactUpdateOne

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 int) *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(i int) *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) SetEmail added in v0.2.1

SetEmail sets the "email" 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 *int) *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(i *int) *PointOfContactCreate

SetNillableArtifactID sets the "artifact_id" field if the given value is not nil.

func (*PointOfContactCreate) SetNillablePackageNameID added in v0.2.1

func (pocc *PointOfContactCreate) SetNillablePackageNameID(i *int) *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(i *int) *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(i *int) *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(i int) *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(i int) *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(i int) *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 int, 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 []int)

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 int, 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 []int)

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) 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 int, 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

func (m *PointOfContactMutation) IDs(ctx context.Context) ([]int, 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 (*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 *int, 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) 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 *int, 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 *int, 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 *int, 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 int, 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 int, 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 []int)

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) 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 int)

SetAllVersionsID sets the "all_versions" edge to the PackageName entity by id.

func (*PointOfContactMutation) SetArtifactID added in v0.2.1

func (m *PointOfContactMutation) SetArtifactID(i int)

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) 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) 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(i int)

SetPackageNameID sets the "package_name_id" field.

func (*PointOfContactMutation) SetPackageVersionID added in v0.2.1

func (m *PointOfContactMutation) SetPackageVersionID(i int)

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(i int)

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 int, 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 []int)

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 int, 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) int

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 int `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 []int, 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) []int

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 int, 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) int

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 int `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 int) *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(i int) *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) 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 *int) *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(i *int) *PointOfContactUpdate

SetNillableArtifactID sets the "artifact_id" field if the given value is not nil.

func (*PointOfContactUpdate) SetNillablePackageNameID added in v0.2.1

func (pocu *PointOfContactUpdate) SetNillablePackageNameID(i *int) *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(i *int) *PointOfContactUpdate

SetNillablePackageVersionID sets the "package_version_id" field if the given value is not nil.

func (*PointOfContactUpdate) SetNillableSourceID added in v0.2.1

func (pocu *PointOfContactUpdate) SetNillableSourceID(i *int) *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(i int) *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(i int) *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(i int) *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 int) *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(i int) *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) 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 *int) *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(i *int) *PointOfContactUpdateOne

SetNillableArtifactID sets the "artifact_id" field if the given value is not nil.

func (*PointOfContactUpdateOne) SetNillablePackageNameID added in v0.2.1

func (pocuo *PointOfContactUpdateOne) SetNillablePackageNameID(i *int) *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(i *int) *PointOfContactUpdateOne

SetNillablePackageVersionID sets the "package_version_id" field if the given value is not nil.

func (*PointOfContactUpdateOne) SetNillableSourceID added in v0.2.1

func (pocuo *PointOfContactUpdateOne) SetNillableSourceID(i *int) *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(i int) *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(i int) *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

func (pocuo *PointOfContactUpdateOne) SetSourceID(i int) *PointOfContactUpdateOne

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 int) *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) 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 int) *PointOfContactUpsert

SetPackageNameID sets the "package_name_id" field.

func (*PointOfContactUpsert) SetPackageVersionID added in v0.2.1

func (u *PointOfContactUpsert) SetPackageVersionID(v int) *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

func (u *PointOfContactUpsert) SetSourceID(v int) *PointOfContactUpsert

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) 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) 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

func (u *PointOfContactUpsertBulk) SetPackageNameID(v int) *PointOfContactUpsertBulk

SetPackageNameID sets the "package_name_id" field.

func (*PointOfContactUpsertBulk) SetPackageVersionID added in v0.2.1

func (u *PointOfContactUpsertBulk) SetPackageVersionID(v int) *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) 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(),
	).
	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 int, 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) 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 int) *PointOfContactUpsertOne

SetPackageNameID sets the "package_name_id" field.

func (*PointOfContactUpsertOne) SetPackageVersionID added in v0.2.1

func (u *PointOfContactUpsertOne) SetPackageVersionID(v int) *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) 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. Using this option is equivalent to using:

client.PointOfContact.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	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 int `json:"id,omitempty"`
	// Type of the builder
	BuildType string `json:"build_type,omitempty"`
	// ID of the builder
	BuiltByID int `json:"built_by_id,omitempty"`
	// ID of the subject artifact
	SubjectID int `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"`
	// 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 ...int) *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(i int) *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) SetFinishedOn

func (sac *SLSAAttestationCreate) SetFinishedOn(t time.Time) *SLSAAttestationCreate

SetFinishedOn sets the "finished_on" field.

func (*SLSAAttestationCreate) SetNillableFinishedOn

func (sac *SLSAAttestationCreate) SetNillableFinishedOn(t *time.Time) *SLSAAttestationCreate

SetNillableFinishedOn sets the "finished_on" field if the given value is not nil.

func (*SLSAAttestationCreate) SetNillableStartedOn

func (sac *SLSAAttestationCreate) SetNillableStartedOn(t *time.Time) *SLSAAttestationCreate

SetNillableStartedOn sets the "started_on" 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(i int) *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 ...int)

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 int, exists bool)

BuiltByID returns the value of the "built_by_id" field in the mutation.

func (*SLSAAttestationMutation) BuiltByIDs

func (m *SLSAAttestationMutation) BuiltByIDs() (ids []int)

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 []int)

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) ClearFinishedOn

func (m *SLSAAttestationMutation) ClearFinishedOn()

ClearFinishedOn clears the value of the "finished_on" field.

func (*SLSAAttestationMutation) ClearSlsaPredicate

func (m *SLSAAttestationMutation) ClearSlsaPredicate()

ClearSlsaPredicate clears the value of the "slsa_predicate" field.

func (*SLSAAttestationMutation) ClearStartedOn

func (m *SLSAAttestationMutation) ClearStartedOn()

ClearStartedOn clears the value of the "started_on" 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) 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) FinishedOnCleared

func (m *SLSAAttestationMutation) FinishedOnCleared() bool

FinishedOnCleared returns if the "finished_on" field was cleared in this mutation.

func (*SLSAAttestationMutation) ID

func (m *SLSAAttestationMutation) ID() (id int, 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

func (m *SLSAAttestationMutation) IDs(ctx context.Context) ([]int, 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 (*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 int, 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) 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 int, 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 ...int)

RemoveBuiltFromIDs removes the "built_from" edge to the Artifact entity by IDs.

func (*SLSAAttestationMutation) RemovedBuiltFromIDs

func (m *SLSAAttestationMutation) RemovedBuiltFromIDs() (ids []int)

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) 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(i int)

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) 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) 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(i int)

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) StartedOnCleared

func (m *SLSAAttestationMutation) StartedOnCleared() bool

StartedOnCleared returns if the "started_on" field was cleared in this 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 int, exists bool)

SubjectID returns the value of the "subject_id" field in the mutation.

func (*SLSAAttestationMutation) SubjectIDs

func (m *SLSAAttestationMutation) SubjectIDs() (ids []int)

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 int, 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) int

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 []int, err error)

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

func (*SLSAAttestationQuery) IDsX

func (saq *SLSAAttestationQuery) IDsX(ctx context.Context) []int

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 int, 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) int

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 ...int) *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) ClearFinishedOn

func (sau *SLSAAttestationUpdate) ClearFinishedOn() *SLSAAttestationUpdate

ClearFinishedOn clears the value of the "finished_on" field.

func (*SLSAAttestationUpdate) ClearSlsaPredicate

func (sau *SLSAAttestationUpdate) ClearSlsaPredicate() *SLSAAttestationUpdate

ClearSlsaPredicate clears the value of the "slsa_predicate" field.

func (*SLSAAttestationUpdate) ClearStartedOn

func (sau *SLSAAttestationUpdate) ClearStartedOn() *SLSAAttestationUpdate

ClearStartedOn clears the value of the "started_on" 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 ...int) *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(i int) *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) SetFinishedOn

func (sau *SLSAAttestationUpdate) SetFinishedOn(t time.Time) *SLSAAttestationUpdate

SetFinishedOn sets the "finished_on" field.

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) SetNillableStartedOn

func (sau *SLSAAttestationUpdate) SetNillableStartedOn(t *time.Time) *SLSAAttestationUpdate

SetNillableStartedOn sets the "started_on" 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(i int) *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 ...int) *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) ClearFinishedOn

func (sauo *SLSAAttestationUpdateOne) ClearFinishedOn() *SLSAAttestationUpdateOne

ClearFinishedOn clears the value of the "finished_on" field.

func (*SLSAAttestationUpdateOne) ClearSlsaPredicate

func (sauo *SLSAAttestationUpdateOne) ClearSlsaPredicate() *SLSAAttestationUpdateOne

ClearSlsaPredicate clears the value of the "slsa_predicate" field.

func (*SLSAAttestationUpdateOne) ClearStartedOn

func (sauo *SLSAAttestationUpdateOne) ClearStartedOn() *SLSAAttestationUpdateOne

ClearStartedOn clears the value of the "started_on" 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 ...int) *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

func (sauo *SLSAAttestationUpdateOne) SetBuiltByID(i int) *SLSAAttestationUpdateOne

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) SetFinishedOn

SetFinishedOn sets the "finished_on" field.

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) SetNillableStartedOn

func (sauo *SLSAAttestationUpdateOne) SetNillableStartedOn(t *time.Time) *SLSAAttestationUpdateOne

SetNillableStartedOn sets the "started_on" 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

func (sauo *SLSAAttestationUpdateOne) SetSubjectID(i int) *SLSAAttestationUpdateOne

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) ClearFinishedOn

func (u *SLSAAttestationUpsert) ClearFinishedOn() *SLSAAttestationUpsert

ClearFinishedOn clears the value of the "finished_on" field.

func (*SLSAAttestationUpsert) ClearSlsaPredicate

func (u *SLSAAttestationUpsert) ClearSlsaPredicate() *SLSAAttestationUpsert

ClearSlsaPredicate clears the value of the "slsa_predicate" field.

func (*SLSAAttestationUpsert) ClearStartedOn

func (u *SLSAAttestationUpsert) ClearStartedOn() *SLSAAttestationUpsert

ClearStartedOn clears the value of the "started_on" field.

func (*SLSAAttestationUpsert) SetBuildType

SetBuildType sets the "build_type" field.

func (*SLSAAttestationUpsert) SetBuiltByID

func (u *SLSAAttestationUpsert) SetBuiltByID(v int) *SLSAAttestationUpsert

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) 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

func (u *SLSAAttestationUpsert) SetSubjectID(v int) *SLSAAttestationUpsert

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) 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) ClearFinishedOn

ClearFinishedOn clears the value of the "finished_on" field.

func (*SLSAAttestationUpsertBulk) ClearSlsaPredicate

func (u *SLSAAttestationUpsertBulk) ClearSlsaPredicate() *SLSAAttestationUpsertBulk

ClearSlsaPredicate clears the value of the "slsa_predicate" field.

func (*SLSAAttestationUpsertBulk) ClearStartedOn

ClearStartedOn clears the value of the "started_on" 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) 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) 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(),
	).
	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) ClearFinishedOn

func (u *SLSAAttestationUpsertOne) ClearFinishedOn() *SLSAAttestationUpsertOne

ClearFinishedOn clears the value of the "finished_on" field.

func (*SLSAAttestationUpsertOne) ClearSlsaPredicate

func (u *SLSAAttestationUpsertOne) ClearSlsaPredicate() *SLSAAttestationUpsertOne

ClearSlsaPredicate clears the value of the "slsa_predicate" field.

func (*SLSAAttestationUpsertOne) ClearStartedOn

ClearStartedOn clears the value of the "started_on" 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 int, 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) 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) 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. Using this option is equivalent to using:

client.SLSAAttestation.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	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 Scorecard

type Scorecard struct {

	// ID of the ent.
	ID int `json:"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"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the ScorecardQuery when eager-loading is set.
	Edges ScorecardEdges `json:"edges"`
	// contains filtered or unexported fields
}

Scorecard is the model entity for the Scorecard schema.

func (*Scorecard) Certifications

func (s *Scorecard) Certifications(ctx context.Context) (result []*CertifyScorecard, err error)

func (*Scorecard) IsNode

func (n *Scorecard) IsNode()

IsNode implements the Node interface check for GQLGen.

func (*Scorecard) NamedCertifications

func (s *Scorecard) NamedCertifications(name string) ([]*CertifyScorecard, error)

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

func (*Scorecard) QueryCertifications

func (s *Scorecard) QueryCertifications() *CertifyScorecardQuery

QueryCertifications queries the "certifications" edge of the Scorecard entity.

func (*Scorecard) String

func (s *Scorecard) String() string

String implements the fmt.Stringer.

func (*Scorecard) ToEdge

func (s *Scorecard) ToEdge(order *ScorecardOrder) *ScorecardEdge

ToEdge converts Scorecard into ScorecardEdge.

func (*Scorecard) Unwrap

func (s *Scorecard) Unwrap() *Scorecard

Unwrap unwraps the Scorecard 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 (*Scorecard) Update

func (s *Scorecard) Update() *ScorecardUpdateOne

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

func (*Scorecard) Value

func (s *Scorecard) Value(name string) (ent.Value, error)

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

type ScorecardClient

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

ScorecardClient is a client for the Scorecard schema.

func NewScorecardClient

func NewScorecardClient(c config) *ScorecardClient

NewScorecardClient returns a client for the Scorecard from the given config.

func (*ScorecardClient) Create

func (c *ScorecardClient) Create() *ScorecardCreate

Create returns a builder for creating a Scorecard entity.

func (*ScorecardClient) CreateBulk

func (c *ScorecardClient) CreateBulk(builders ...*ScorecardCreate) *ScorecardCreateBulk

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

func (*ScorecardClient) Delete

func (c *ScorecardClient) Delete() *ScorecardDelete

Delete returns a delete builder for Scorecard.

func (*ScorecardClient) DeleteOne

func (c *ScorecardClient) DeleteOne(s *Scorecard) *ScorecardDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*ScorecardClient) DeleteOneID

func (c *ScorecardClient) DeleteOneID(id int) *ScorecardDeleteOne

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

func (*ScorecardClient) Get

func (c *ScorecardClient) Get(ctx context.Context, id int) (*Scorecard, error)

Get returns a Scorecard entity by its id.

func (*ScorecardClient) GetX

func (c *ScorecardClient) GetX(ctx context.Context, id int) *Scorecard

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

func (*ScorecardClient) Hooks

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

Hooks returns the client hooks.

func (*ScorecardClient) Intercept

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

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

func (*ScorecardClient) Interceptors

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

Interceptors returns the client interceptors.

func (*ScorecardClient) MapCreateBulk

func (c *ScorecardClient) MapCreateBulk(slice any, setFunc func(*ScorecardCreate, int)) *ScorecardCreateBulk

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 (*ScorecardClient) Query

func (c *ScorecardClient) Query() *ScorecardQuery

Query returns a query builder for Scorecard.

func (*ScorecardClient) QueryCertifications

func (c *ScorecardClient) QueryCertifications(s *Scorecard) *CertifyScorecardQuery

QueryCertifications queries the certifications edge of a Scorecard.

func (*ScorecardClient) Update

func (c *ScorecardClient) Update() *ScorecardUpdate

Update returns an update builder for Scorecard.

func (*ScorecardClient) UpdateOne

func (c *ScorecardClient) UpdateOne(s *Scorecard) *ScorecardUpdateOne

UpdateOne returns an update builder for the given entity.

func (*ScorecardClient) UpdateOneID

func (c *ScorecardClient) UpdateOneID(id int) *ScorecardUpdateOne

UpdateOneID returns an update builder for the given id.

func (*ScorecardClient) Use

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

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

type ScorecardConnection

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

ScorecardConnection is the connection containing edges to Scorecard.

type ScorecardCreate

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

ScorecardCreate is the builder for creating a Scorecard entity.

func (*ScorecardCreate) AddCertificationIDs

func (sc *ScorecardCreate) AddCertificationIDs(ids ...int) *ScorecardCreate

AddCertificationIDs adds the "certifications" edge to the CertifyScorecard entity by IDs.

func (*ScorecardCreate) AddCertifications

func (sc *ScorecardCreate) AddCertifications(c ...*CertifyScorecard) *ScorecardCreate

AddCertifications adds the "certifications" edges to the CertifyScorecard entity.

func (*ScorecardCreate) Exec

func (sc *ScorecardCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*ScorecardCreate) ExecX

func (sc *ScorecardCreate) ExecX(ctx context.Context)

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

func (*ScorecardCreate) Mutation

func (sc *ScorecardCreate) Mutation() *ScorecardMutation

Mutation returns the ScorecardMutation object of the builder.

func (*ScorecardCreate) OnConflict

func (sc *ScorecardCreate) OnConflict(opts ...sql.ConflictOption) *ScorecardUpsertOne

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

client.Scorecard.Create().
	SetChecks(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.ScorecardUpsert) {
		SetChecks(v+v).
	}).
	Exec(ctx)

func (*ScorecardCreate) OnConflictColumns

func (sc *ScorecardCreate) OnConflictColumns(columns ...string) *ScorecardUpsertOne

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

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

func (*ScorecardCreate) Save

func (sc *ScorecardCreate) Save(ctx context.Context) (*Scorecard, error)

Save creates the Scorecard in the database.

func (*ScorecardCreate) SaveX

func (sc *ScorecardCreate) SaveX(ctx context.Context) *Scorecard

SaveX calls Save and panics if Save returns an error.

func (*ScorecardCreate) SetAggregateScore

func (sc *ScorecardCreate) SetAggregateScore(f float64) *ScorecardCreate

SetAggregateScore sets the "aggregate_score" field.

func (*ScorecardCreate) SetChecks

func (sc *ScorecardCreate) SetChecks(mc []*model.ScorecardCheck) *ScorecardCreate

SetChecks sets the "checks" field.

func (*ScorecardCreate) SetCollector

func (sc *ScorecardCreate) SetCollector(s string) *ScorecardCreate

SetCollector sets the "collector" field.

func (*ScorecardCreate) SetNillableAggregateScore

func (sc *ScorecardCreate) SetNillableAggregateScore(f *float64) *ScorecardCreate

SetNillableAggregateScore sets the "aggregate_score" field if the given value is not nil.

func (*ScorecardCreate) SetNillableTimeScanned

func (sc *ScorecardCreate) SetNillableTimeScanned(t *time.Time) *ScorecardCreate

SetNillableTimeScanned sets the "time_scanned" field if the given value is not nil.

func (*ScorecardCreate) SetOrigin

func (sc *ScorecardCreate) SetOrigin(s string) *ScorecardCreate

SetOrigin sets the "origin" field.

func (*ScorecardCreate) SetScorecardCommit

func (sc *ScorecardCreate) SetScorecardCommit(s string) *ScorecardCreate

SetScorecardCommit sets the "scorecard_commit" field.

func (*ScorecardCreate) SetScorecardVersion

func (sc *ScorecardCreate) SetScorecardVersion(s string) *ScorecardCreate

SetScorecardVersion sets the "scorecard_version" field.

func (*ScorecardCreate) SetTimeScanned

func (sc *ScorecardCreate) SetTimeScanned(t time.Time) *ScorecardCreate

SetTimeScanned sets the "time_scanned" field.

type ScorecardCreateBulk

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

ScorecardCreateBulk is the builder for creating many Scorecard entities in bulk.

func (*ScorecardCreateBulk) Exec

func (scb *ScorecardCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*ScorecardCreateBulk) ExecX

func (scb *ScorecardCreateBulk) ExecX(ctx context.Context)

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

func (*ScorecardCreateBulk) OnConflict

func (scb *ScorecardCreateBulk) OnConflict(opts ...sql.ConflictOption) *ScorecardUpsertBulk

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

client.Scorecard.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.ScorecardUpsert) {
		SetChecks(v+v).
	}).
	Exec(ctx)

func (*ScorecardCreateBulk) OnConflictColumns

func (scb *ScorecardCreateBulk) OnConflictColumns(columns ...string) *ScorecardUpsertBulk

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

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

func (*ScorecardCreateBulk) Save

func (scb *ScorecardCreateBulk) Save(ctx context.Context) ([]*Scorecard, error)

Save creates the Scorecard entities in the database.

func (*ScorecardCreateBulk) SaveX

func (scb *ScorecardCreateBulk) SaveX(ctx context.Context) []*Scorecard

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

type ScorecardDelete

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

ScorecardDelete is the builder for deleting a Scorecard entity.

func (*ScorecardDelete) Exec

func (sd *ScorecardDelete) Exec(ctx context.Context) (int, error)

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

func (*ScorecardDelete) ExecX

func (sd *ScorecardDelete) ExecX(ctx context.Context) int

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

func (*ScorecardDelete) Where

Where appends a list predicates to the ScorecardDelete builder.

type ScorecardDeleteOne

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

ScorecardDeleteOne is the builder for deleting a single Scorecard entity.

func (*ScorecardDeleteOne) Exec

func (sdo *ScorecardDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*ScorecardDeleteOne) ExecX

func (sdo *ScorecardDeleteOne) ExecX(ctx context.Context)

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

func (*ScorecardDeleteOne) Where

Where appends a list predicates to the ScorecardDelete builder.

type ScorecardEdge

type ScorecardEdge struct {
	Node   *Scorecard `json:"node"`
	Cursor Cursor     `json:"cursor"`
}

ScorecardEdge is the edge representation of Scorecard.

type ScorecardEdges

type ScorecardEdges struct {
	// Certifications holds the value of the certifications edge.
	Certifications []*CertifyScorecard `json:"certifications,omitempty"`
	// contains filtered or unexported fields
}

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

func (ScorecardEdges) CertificationsOrErr

func (e ScorecardEdges) CertificationsOrErr() ([]*CertifyScorecard, error)

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

type ScorecardGroupBy

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

ScorecardGroupBy is the group-by builder for Scorecard entities.

func (*ScorecardGroupBy) Aggregate

func (sgb *ScorecardGroupBy) Aggregate(fns ...AggregateFunc) *ScorecardGroupBy

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

func (*ScorecardGroupBy) Bool

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

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

func (*ScorecardGroupBy) BoolX

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

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

func (*ScorecardGroupBy) Bools

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

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

func (*ScorecardGroupBy) BoolsX

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

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

func (*ScorecardGroupBy) Float64

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

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

func (*ScorecardGroupBy) Float64X

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

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

func (*ScorecardGroupBy) Float64s

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

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

func (*ScorecardGroupBy) Float64sX

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

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

func (*ScorecardGroupBy) Int

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

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

func (*ScorecardGroupBy) IntX

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

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

func (*ScorecardGroupBy) Ints

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

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

func (*ScorecardGroupBy) IntsX

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

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

func (*ScorecardGroupBy) Scan

func (sgb *ScorecardGroupBy) Scan(ctx context.Context, v any) error

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

func (*ScorecardGroupBy) ScanX

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

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

func (*ScorecardGroupBy) String

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

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

func (*ScorecardGroupBy) StringX

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

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

func (*ScorecardGroupBy) Strings

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

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

func (*ScorecardGroupBy) StringsX

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

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

type ScorecardMutation

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

ScorecardMutation represents an operation that mutates the Scorecard nodes in the graph.

func (*ScorecardMutation) AddAggregateScore

func (m *ScorecardMutation) AddAggregateScore(f float64)

AddAggregateScore adds f to the "aggregate_score" field.

func (*ScorecardMutation) AddCertificationIDs

func (m *ScorecardMutation) AddCertificationIDs(ids ...int)

AddCertificationIDs adds the "certifications" edge to the CertifyScorecard entity by ids.

func (*ScorecardMutation) AddField

func (m *ScorecardMutation) 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 (*ScorecardMutation) AddedAggregateScore

func (m *ScorecardMutation) AddedAggregateScore() (r float64, exists bool)

AddedAggregateScore returns the value that was added to the "aggregate_score" field in this mutation.

func (*ScorecardMutation) AddedEdges

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

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

func (*ScorecardMutation) AddedField

func (m *ScorecardMutation) 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 (*ScorecardMutation) AddedFields

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

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

func (*ScorecardMutation) AddedIDs

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

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

func (*ScorecardMutation) AggregateScore

func (m *ScorecardMutation) AggregateScore() (r float64, exists bool)

AggregateScore returns the value of the "aggregate_score" field in the mutation.

func (*ScorecardMutation) AppendChecks

func (m *ScorecardMutation) AppendChecks(mc []*model.ScorecardCheck)

AppendChecks adds mc to the "checks" field.

func (*ScorecardMutation) AppendedChecks

func (m *ScorecardMutation) AppendedChecks() ([]*model.ScorecardCheck, bool)

AppendedChecks returns the list of values that were appended to the "checks" field in this mutation.

func (*ScorecardMutation) CertificationsCleared

func (m *ScorecardMutation) CertificationsCleared() bool

CertificationsCleared reports if the "certifications" edge to the CertifyScorecard entity was cleared.

func (*ScorecardMutation) CertificationsIDs

func (m *ScorecardMutation) CertificationsIDs() (ids []int)

CertificationsIDs returns the "certifications" edge IDs in the mutation.

func (*ScorecardMutation) Checks

func (m *ScorecardMutation) Checks() (r []*model.ScorecardCheck, exists bool)

Checks returns the value of the "checks" field in the mutation.

func (*ScorecardMutation) ClearCertifications

func (m *ScorecardMutation) ClearCertifications()

ClearCertifications clears the "certifications" edge to the CertifyScorecard entity.

func (*ScorecardMutation) ClearEdge

func (m *ScorecardMutation) 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 (*ScorecardMutation) ClearField

func (m *ScorecardMutation) 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 (*ScorecardMutation) ClearedEdges

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

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

func (*ScorecardMutation) ClearedFields

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

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

func (ScorecardMutation) Client

func (m ScorecardMutation) 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 (*ScorecardMutation) Collector

func (m *ScorecardMutation) Collector() (r string, exists bool)

Collector returns the value of the "collector" field in the mutation.

func (*ScorecardMutation) EdgeCleared

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

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

func (*ScorecardMutation) Field

func (m *ScorecardMutation) 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 (*ScorecardMutation) FieldCleared

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

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

func (*ScorecardMutation) Fields

func (m *ScorecardMutation) 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 (*ScorecardMutation) ID

func (m *ScorecardMutation) ID() (id int, 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 (*ScorecardMutation) IDs

func (m *ScorecardMutation) IDs(ctx context.Context) ([]int, 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 (*ScorecardMutation) OldAggregateScore

func (m *ScorecardMutation) OldAggregateScore(ctx context.Context) (v float64, err error)

OldAggregateScore returns the old "aggregate_score" field's value of the Scorecard entity. If the Scorecard 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 (*ScorecardMutation) OldChecks

func (m *ScorecardMutation) OldChecks(ctx context.Context) (v []*model.ScorecardCheck, err error)

OldChecks returns the old "checks" field's value of the Scorecard entity. If the Scorecard 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 (*ScorecardMutation) OldCollector

func (m *ScorecardMutation) OldCollector(ctx context.Context) (v string, err error)

OldCollector returns the old "collector" field's value of the Scorecard entity. If the Scorecard 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 (*ScorecardMutation) OldField

func (m *ScorecardMutation) 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 (*ScorecardMutation) OldOrigin

func (m *ScorecardMutation) OldOrigin(ctx context.Context) (v string, err error)

OldOrigin returns the old "origin" field's value of the Scorecard entity. If the Scorecard 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 (*ScorecardMutation) OldScorecardCommit

func (m *ScorecardMutation) OldScorecardCommit(ctx context.Context) (v string, err error)

OldScorecardCommit returns the old "scorecard_commit" field's value of the Scorecard entity. If the Scorecard 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 (*ScorecardMutation) OldScorecardVersion

func (m *ScorecardMutation) OldScorecardVersion(ctx context.Context) (v string, err error)

OldScorecardVersion returns the old "scorecard_version" field's value of the Scorecard entity. If the Scorecard 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 (*ScorecardMutation) OldTimeScanned

func (m *ScorecardMutation) OldTimeScanned(ctx context.Context) (v time.Time, err error)

OldTimeScanned returns the old "time_scanned" field's value of the Scorecard entity. If the Scorecard 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 (*ScorecardMutation) Op

func (m *ScorecardMutation) Op() Op

Op returns the operation name.

func (*ScorecardMutation) Origin

func (m *ScorecardMutation) Origin() (r string, exists bool)

Origin returns the value of the "origin" field in the mutation.

func (*ScorecardMutation) RemoveCertificationIDs

func (m *ScorecardMutation) RemoveCertificationIDs(ids ...int)

RemoveCertificationIDs removes the "certifications" edge to the CertifyScorecard entity by IDs.

func (*ScorecardMutation) RemovedCertificationsIDs

func (m *ScorecardMutation) RemovedCertificationsIDs() (ids []int)

RemovedCertifications returns the removed IDs of the "certifications" edge to the CertifyScorecard entity.

func (*ScorecardMutation) RemovedEdges

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

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

func (*ScorecardMutation) RemovedIDs

func (m *ScorecardMutation) 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 (*ScorecardMutation) ResetAggregateScore

func (m *ScorecardMutation) ResetAggregateScore()

ResetAggregateScore resets all changes to the "aggregate_score" field.

func (*ScorecardMutation) ResetCertifications

func (m *ScorecardMutation) ResetCertifications()

ResetCertifications resets all changes to the "certifications" edge.

func (*ScorecardMutation) ResetChecks

func (m *ScorecardMutation) ResetChecks()

ResetChecks resets all changes to the "checks" field.

func (*ScorecardMutation) ResetCollector

func (m *ScorecardMutation) ResetCollector()

ResetCollector resets all changes to the "collector" field.

func (*ScorecardMutation) ResetEdge

func (m *ScorecardMutation) 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 (*ScorecardMutation) ResetField

func (m *ScorecardMutation) 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 (*ScorecardMutation) ResetOrigin

func (m *ScorecardMutation) ResetOrigin()

ResetOrigin resets all changes to the "origin" field.

func (*ScorecardMutation) ResetScorecardCommit

func (m *ScorecardMutation) ResetScorecardCommit()

ResetScorecardCommit resets all changes to the "scorecard_commit" field.

func (*ScorecardMutation) ResetScorecardVersion

func (m *ScorecardMutation) ResetScorecardVersion()

ResetScorecardVersion resets all changes to the "scorecard_version" field.

func (*ScorecardMutation) ResetTimeScanned

func (m *ScorecardMutation) ResetTimeScanned()

ResetTimeScanned resets all changes to the "time_scanned" field.

func (*ScorecardMutation) ScorecardCommit

func (m *ScorecardMutation) ScorecardCommit() (r string, exists bool)

ScorecardCommit returns the value of the "scorecard_commit" field in the mutation.

func (*ScorecardMutation) ScorecardVersion

func (m *ScorecardMutation) ScorecardVersion() (r string, exists bool)

ScorecardVersion returns the value of the "scorecard_version" field in the mutation.

func (*ScorecardMutation) SetAggregateScore

func (m *ScorecardMutation) SetAggregateScore(f float64)

SetAggregateScore sets the "aggregate_score" field.

func (*ScorecardMutation) SetChecks

func (m *ScorecardMutation) SetChecks(mc []*model.ScorecardCheck)

SetChecks sets the "checks" field.

func (*ScorecardMutation) SetCollector

func (m *ScorecardMutation) SetCollector(s string)

SetCollector sets the "collector" field.

func (*ScorecardMutation) SetField

func (m *ScorecardMutation) 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 (*ScorecardMutation) SetOp

func (m *ScorecardMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*ScorecardMutation) SetOrigin

func (m *ScorecardMutation) SetOrigin(s string)

SetOrigin sets the "origin" field.

func (*ScorecardMutation) SetScorecardCommit

func (m *ScorecardMutation) SetScorecardCommit(s string)

SetScorecardCommit sets the "scorecard_commit" field.

func (*ScorecardMutation) SetScorecardVersion

func (m *ScorecardMutation) SetScorecardVersion(s string)

SetScorecardVersion sets the "scorecard_version" field.

func (*ScorecardMutation) SetTimeScanned

func (m *ScorecardMutation) SetTimeScanned(t time.Time)

SetTimeScanned sets the "time_scanned" field.

func (*ScorecardMutation) TimeScanned

func (m *ScorecardMutation) TimeScanned() (r time.Time, exists bool)

TimeScanned returns the value of the "time_scanned" field in the mutation.

func (ScorecardMutation) Tx

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

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

func (*ScorecardMutation) Type

func (m *ScorecardMutation) Type() string

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

func (*ScorecardMutation) Where

func (m *ScorecardMutation) Where(ps ...predicate.Scorecard)

Where appends a list predicates to the ScorecardMutation builder.

func (*ScorecardMutation) WhereP

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

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

type ScorecardOrder

type ScorecardOrder struct {
	Direction OrderDirection       `json:"direction"`
	Field     *ScorecardOrderField `json:"field"`
}

ScorecardOrder defines the ordering of Scorecard.

type ScorecardOrderField

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

ScorecardOrderField defines the ordering field of Scorecard.

type ScorecardPaginateOption

type ScorecardPaginateOption func(*scorecardPager) error

ScorecardPaginateOption enables pagination customization.

func WithScorecardFilter

func WithScorecardFilter(filter func(*ScorecardQuery) (*ScorecardQuery, error)) ScorecardPaginateOption

WithScorecardFilter configures pagination filter.

func WithScorecardOrder

func WithScorecardOrder(order *ScorecardOrder) ScorecardPaginateOption

WithScorecardOrder configures pagination ordering.

type ScorecardQuery

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

ScorecardQuery is the builder for querying Scorecard entities.

func (*ScorecardQuery) Aggregate

func (sq *ScorecardQuery) Aggregate(fns ...AggregateFunc) *ScorecardSelect

Aggregate returns a ScorecardSelect configured with the given aggregations.

func (*ScorecardQuery) All

func (sq *ScorecardQuery) All(ctx context.Context) ([]*Scorecard, error)

All executes the query and returns a list of Scorecards.

func (*ScorecardQuery) AllX

func (sq *ScorecardQuery) AllX(ctx context.Context) []*Scorecard

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

func (*ScorecardQuery) Clone

func (sq *ScorecardQuery) Clone() *ScorecardQuery

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

func (*ScorecardQuery) CollectFields

func (s *ScorecardQuery) CollectFields(ctx context.Context, satisfies ...string) (*ScorecardQuery, error)

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

func (*ScorecardQuery) Count

func (sq *ScorecardQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*ScorecardQuery) CountX

func (sq *ScorecardQuery) CountX(ctx context.Context) int

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

func (*ScorecardQuery) Exist

func (sq *ScorecardQuery) Exist(ctx context.Context) (bool, error)

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

func (*ScorecardQuery) ExistX

func (sq *ScorecardQuery) ExistX(ctx context.Context) bool

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

func (*ScorecardQuery) First

func (sq *ScorecardQuery) First(ctx context.Context) (*Scorecard, error)

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

func (*ScorecardQuery) FirstID

func (sq *ScorecardQuery) FirstID(ctx context.Context) (id int, err error)

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

func (*ScorecardQuery) FirstIDX

func (sq *ScorecardQuery) FirstIDX(ctx context.Context) int

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

func (*ScorecardQuery) FirstX

func (sq *ScorecardQuery) FirstX(ctx context.Context) *Scorecard

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

func (*ScorecardQuery) GroupBy

func (sq *ScorecardQuery) GroupBy(field string, fields ...string) *ScorecardGroupBy

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 {
	Checks []*model.ScorecardCheck `json:"checks,omitempty"`
	Count int `json:"count,omitempty"`
}

client.Scorecard.Query().
	GroupBy(scorecard.FieldChecks).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*ScorecardQuery) IDs

func (sq *ScorecardQuery) IDs(ctx context.Context) (ids []int, err error)

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

func (*ScorecardQuery) IDsX

func (sq *ScorecardQuery) IDsX(ctx context.Context) []int

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

func (*ScorecardQuery) Limit

func (sq *ScorecardQuery) Limit(limit int) *ScorecardQuery

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

func (*ScorecardQuery) Offset

func (sq *ScorecardQuery) Offset(offset int) *ScorecardQuery

Offset to start from.

func (*ScorecardQuery) Only

func (sq *ScorecardQuery) Only(ctx context.Context) (*Scorecard, error)

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

func (*ScorecardQuery) OnlyID

func (sq *ScorecardQuery) OnlyID(ctx context.Context) (id int, err error)

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

func (*ScorecardQuery) OnlyIDX

func (sq *ScorecardQuery) OnlyIDX(ctx context.Context) int

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

func (*ScorecardQuery) OnlyX

func (sq *ScorecardQuery) OnlyX(ctx context.Context) *Scorecard

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

func (*ScorecardQuery) Order

Order specifies how the records should be ordered.

func (*ScorecardQuery) Paginate

func (s *ScorecardQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...ScorecardPaginateOption,
) (*ScorecardConnection, error)

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

func (*ScorecardQuery) QueryCertifications

func (sq *ScorecardQuery) QueryCertifications() *CertifyScorecardQuery

QueryCertifications chains the current query on the "certifications" edge.

func (*ScorecardQuery) Select

func (sq *ScorecardQuery) Select(fields ...string) *ScorecardSelect

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 {
	Checks []*model.ScorecardCheck `json:"checks,omitempty"`
}

client.Scorecard.Query().
	Select(scorecard.FieldChecks).
	Scan(ctx, &v)

func (*ScorecardQuery) Unique

func (sq *ScorecardQuery) Unique(unique bool) *ScorecardQuery

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 (*ScorecardQuery) Where

Where adds a new predicate for the ScorecardQuery builder.

func (*ScorecardQuery) WithCertifications

func (sq *ScorecardQuery) WithCertifications(opts ...func(*CertifyScorecardQuery)) *ScorecardQuery

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

func (*ScorecardQuery) WithNamedCertifications

func (sq *ScorecardQuery) WithNamedCertifications(name string, opts ...func(*CertifyScorecardQuery)) *ScorecardQuery

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

type ScorecardSelect

type ScorecardSelect struct {
	*ScorecardQuery
	// contains filtered or unexported fields
}

ScorecardSelect is the builder for selecting fields of Scorecard entities.

func (*ScorecardSelect) Aggregate

func (ss *ScorecardSelect) Aggregate(fns ...AggregateFunc) *ScorecardSelect

Aggregate adds the given aggregation functions to the selector query.

func (*ScorecardSelect) Bool

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

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

func (*ScorecardSelect) BoolX

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

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

func (*ScorecardSelect) Bools

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

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

func (*ScorecardSelect) BoolsX

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

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

func (*ScorecardSelect) Float64

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

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

func (*ScorecardSelect) Float64X

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

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

func (*ScorecardSelect) Float64s

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

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

func (*ScorecardSelect) Float64sX

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

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

func (*ScorecardSelect) Int

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

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

func (*ScorecardSelect) IntX

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

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

func (*ScorecardSelect) Ints

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

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

func (*ScorecardSelect) IntsX

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

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

func (*ScorecardSelect) Scan

func (ss *ScorecardSelect) Scan(ctx context.Context, v any) error

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

func (*ScorecardSelect) ScanX

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

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

func (*ScorecardSelect) String

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

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

func (*ScorecardSelect) StringX

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

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

func (*ScorecardSelect) Strings

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

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

func (*ScorecardSelect) StringsX

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

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

type ScorecardUpdate

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

ScorecardUpdate is the builder for updating Scorecard entities.

func (*ScorecardUpdate) AddAggregateScore

func (su *ScorecardUpdate) AddAggregateScore(f float64) *ScorecardUpdate

AddAggregateScore adds f to the "aggregate_score" field.

func (*ScorecardUpdate) AddCertificationIDs

func (su *ScorecardUpdate) AddCertificationIDs(ids ...int) *ScorecardUpdate

AddCertificationIDs adds the "certifications" edge to the CertifyScorecard entity by IDs.

func (*ScorecardUpdate) AddCertifications

func (su *ScorecardUpdate) AddCertifications(c ...*CertifyScorecard) *ScorecardUpdate

AddCertifications adds the "certifications" edges to the CertifyScorecard entity.

func (*ScorecardUpdate) AppendChecks

func (su *ScorecardUpdate) AppendChecks(mc []*model.ScorecardCheck) *ScorecardUpdate

AppendChecks appends mc to the "checks" field.

func (*ScorecardUpdate) ClearCertifications

func (su *ScorecardUpdate) ClearCertifications() *ScorecardUpdate

ClearCertifications clears all "certifications" edges to the CertifyScorecard entity.

func (*ScorecardUpdate) Exec

func (su *ScorecardUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*ScorecardUpdate) ExecX

func (su *ScorecardUpdate) ExecX(ctx context.Context)

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

func (*ScorecardUpdate) Mutation

func (su *ScorecardUpdate) Mutation() *ScorecardMutation

Mutation returns the ScorecardMutation object of the builder.

func (*ScorecardUpdate) RemoveCertificationIDs

func (su *ScorecardUpdate) RemoveCertificationIDs(ids ...int) *ScorecardUpdate

RemoveCertificationIDs removes the "certifications" edge to CertifyScorecard entities by IDs.

func (*ScorecardUpdate) RemoveCertifications

func (su *ScorecardUpdate) RemoveCertifications(c ...*CertifyScorecard) *ScorecardUpdate

RemoveCertifications removes "certifications" edges to CertifyScorecard entities.

func (*ScorecardUpdate) Save

func (su *ScorecardUpdate) Save(ctx context.Context) (int, error)

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

func (*ScorecardUpdate) SaveX

func (su *ScorecardUpdate) SaveX(ctx context.Context) int

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

func (*ScorecardUpdate) SetAggregateScore

func (su *ScorecardUpdate) SetAggregateScore(f float64) *ScorecardUpdate

SetAggregateScore sets the "aggregate_score" field.

func (*ScorecardUpdate) SetChecks

func (su *ScorecardUpdate) SetChecks(mc []*model.ScorecardCheck) *ScorecardUpdate

SetChecks sets the "checks" field.

func (*ScorecardUpdate) SetCollector

func (su *ScorecardUpdate) SetCollector(s string) *ScorecardUpdate

SetCollector sets the "collector" field.

func (*ScorecardUpdate) SetNillableAggregateScore

func (su *ScorecardUpdate) SetNillableAggregateScore(f *float64) *ScorecardUpdate

SetNillableAggregateScore sets the "aggregate_score" field if the given value is not nil.

func (*ScorecardUpdate) SetNillableTimeScanned

func (su *ScorecardUpdate) SetNillableTimeScanned(t *time.Time) *ScorecardUpdate

SetNillableTimeScanned sets the "time_scanned" field if the given value is not nil.

func (*ScorecardUpdate) SetOrigin

func (su *ScorecardUpdate) SetOrigin(s string) *ScorecardUpdate

SetOrigin sets the "origin" field.

func (*ScorecardUpdate) SetScorecardCommit

func (su *ScorecardUpdate) SetScorecardCommit(s string) *ScorecardUpdate

SetScorecardCommit sets the "scorecard_commit" field.

func (*ScorecardUpdate) SetScorecardVersion

func (su *ScorecardUpdate) SetScorecardVersion(s string) *ScorecardUpdate

SetScorecardVersion sets the "scorecard_version" field.

func (*ScorecardUpdate) SetTimeScanned

func (su *ScorecardUpdate) SetTimeScanned(t time.Time) *ScorecardUpdate

SetTimeScanned sets the "time_scanned" field.

func (*ScorecardUpdate) Where

Where appends a list predicates to the ScorecardUpdate builder.

type ScorecardUpdateOne

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

ScorecardUpdateOne is the builder for updating a single Scorecard entity.

func (*ScorecardUpdateOne) AddAggregateScore

func (suo *ScorecardUpdateOne) AddAggregateScore(f float64) *ScorecardUpdateOne

AddAggregateScore adds f to the "aggregate_score" field.

func (*ScorecardUpdateOne) AddCertificationIDs

func (suo *ScorecardUpdateOne) AddCertificationIDs(ids ...int) *ScorecardUpdateOne

AddCertificationIDs adds the "certifications" edge to the CertifyScorecard entity by IDs.

func (*ScorecardUpdateOne) AddCertifications

func (suo *ScorecardUpdateOne) AddCertifications(c ...*CertifyScorecard) *ScorecardUpdateOne

AddCertifications adds the "certifications" edges to the CertifyScorecard entity.

func (*ScorecardUpdateOne) AppendChecks

func (suo *ScorecardUpdateOne) AppendChecks(mc []*model.ScorecardCheck) *ScorecardUpdateOne

AppendChecks appends mc to the "checks" field.

func (*ScorecardUpdateOne) ClearCertifications

func (suo *ScorecardUpdateOne) ClearCertifications() *ScorecardUpdateOne

ClearCertifications clears all "certifications" edges to the CertifyScorecard entity.

func (*ScorecardUpdateOne) Exec

func (suo *ScorecardUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*ScorecardUpdateOne) ExecX

func (suo *ScorecardUpdateOne) ExecX(ctx context.Context)

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

func (*ScorecardUpdateOne) Mutation

func (suo *ScorecardUpdateOne) Mutation() *ScorecardMutation

Mutation returns the ScorecardMutation object of the builder.

func (*ScorecardUpdateOne) RemoveCertificationIDs

func (suo *ScorecardUpdateOne) RemoveCertificationIDs(ids ...int) *ScorecardUpdateOne

RemoveCertificationIDs removes the "certifications" edge to CertifyScorecard entities by IDs.

func (*ScorecardUpdateOne) RemoveCertifications

func (suo *ScorecardUpdateOne) RemoveCertifications(c ...*CertifyScorecard) *ScorecardUpdateOne

RemoveCertifications removes "certifications" edges to CertifyScorecard entities.

func (*ScorecardUpdateOne) Save

func (suo *ScorecardUpdateOne) Save(ctx context.Context) (*Scorecard, error)

Save executes the query and returns the updated Scorecard entity.

func (*ScorecardUpdateOne) SaveX

func (suo *ScorecardUpdateOne) SaveX(ctx context.Context) *Scorecard

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

func (*ScorecardUpdateOne) Select

func (suo *ScorecardUpdateOne) Select(field string, fields ...string) *ScorecardUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*ScorecardUpdateOne) SetAggregateScore

func (suo *ScorecardUpdateOne) SetAggregateScore(f float64) *ScorecardUpdateOne

SetAggregateScore sets the "aggregate_score" field.

func (*ScorecardUpdateOne) SetChecks

SetChecks sets the "checks" field.

func (*ScorecardUpdateOne) SetCollector

func (suo *ScorecardUpdateOne) SetCollector(s string) *ScorecardUpdateOne

SetCollector sets the "collector" field.

func (*ScorecardUpdateOne) SetNillableAggregateScore

func (suo *ScorecardUpdateOne) SetNillableAggregateScore(f *float64) *ScorecardUpdateOne

SetNillableAggregateScore sets the "aggregate_score" field if the given value is not nil.

func (*ScorecardUpdateOne) SetNillableTimeScanned

func (suo *ScorecardUpdateOne) SetNillableTimeScanned(t *time.Time) *ScorecardUpdateOne

SetNillableTimeScanned sets the "time_scanned" field if the given value is not nil.

func (*ScorecardUpdateOne) SetOrigin

func (suo *ScorecardUpdateOne) SetOrigin(s string) *ScorecardUpdateOne

SetOrigin sets the "origin" field.

func (*ScorecardUpdateOne) SetScorecardCommit

func (suo *ScorecardUpdateOne) SetScorecardCommit(s string) *ScorecardUpdateOne

SetScorecardCommit sets the "scorecard_commit" field.

func (*ScorecardUpdateOne) SetScorecardVersion

func (suo *ScorecardUpdateOne) SetScorecardVersion(s string) *ScorecardUpdateOne

SetScorecardVersion sets the "scorecard_version" field.

func (*ScorecardUpdateOne) SetTimeScanned

func (suo *ScorecardUpdateOne) SetTimeScanned(t time.Time) *ScorecardUpdateOne

SetTimeScanned sets the "time_scanned" field.

func (*ScorecardUpdateOne) Where

Where appends a list predicates to the ScorecardUpdate builder.

type ScorecardUpsert

type ScorecardUpsert struct {
	*sql.UpdateSet
}

ScorecardUpsert is the "OnConflict" setter.

func (*ScorecardUpsert) AddAggregateScore

func (u *ScorecardUpsert) AddAggregateScore(v float64) *ScorecardUpsert

AddAggregateScore adds v to the "aggregate_score" field.

func (*ScorecardUpsert) SetAggregateScore

func (u *ScorecardUpsert) SetAggregateScore(v float64) *ScorecardUpsert

SetAggregateScore sets the "aggregate_score" field.

func (*ScorecardUpsert) SetChecks

SetChecks sets the "checks" field.

func (*ScorecardUpsert) SetCollector

func (u *ScorecardUpsert) SetCollector(v string) *ScorecardUpsert

SetCollector sets the "collector" field.

func (*ScorecardUpsert) SetOrigin

func (u *ScorecardUpsert) SetOrigin(v string) *ScorecardUpsert

SetOrigin sets the "origin" field.

func (*ScorecardUpsert) SetScorecardCommit

func (u *ScorecardUpsert) SetScorecardCommit(v string) *ScorecardUpsert

SetScorecardCommit sets the "scorecard_commit" field.

func (*ScorecardUpsert) SetScorecardVersion

func (u *ScorecardUpsert) SetScorecardVersion(v string) *ScorecardUpsert

SetScorecardVersion sets the "scorecard_version" field.

func (*ScorecardUpsert) SetTimeScanned

func (u *ScorecardUpsert) SetTimeScanned(v time.Time) *ScorecardUpsert

SetTimeScanned sets the "time_scanned" field.

func (*ScorecardUpsert) UpdateAggregateScore

func (u *ScorecardUpsert) UpdateAggregateScore() *ScorecardUpsert

UpdateAggregateScore sets the "aggregate_score" field to the value that was provided on create.

func (*ScorecardUpsert) UpdateChecks

func (u *ScorecardUpsert) UpdateChecks() *ScorecardUpsert

UpdateChecks sets the "checks" field to the value that was provided on create.

func (*ScorecardUpsert) UpdateCollector

func (u *ScorecardUpsert) UpdateCollector() *ScorecardUpsert

UpdateCollector sets the "collector" field to the value that was provided on create.

func (*ScorecardUpsert) UpdateOrigin

func (u *ScorecardUpsert) UpdateOrigin() *ScorecardUpsert

UpdateOrigin sets the "origin" field to the value that was provided on create.

func (*ScorecardUpsert) UpdateScorecardCommit

func (u *ScorecardUpsert) UpdateScorecardCommit() *ScorecardUpsert

UpdateScorecardCommit sets the "scorecard_commit" field to the value that was provided on create.

func (*ScorecardUpsert) UpdateScorecardVersion

func (u *ScorecardUpsert) UpdateScorecardVersion() *ScorecardUpsert

UpdateScorecardVersion sets the "scorecard_version" field to the value that was provided on create.

func (*ScorecardUpsert) UpdateTimeScanned

func (u *ScorecardUpsert) UpdateTimeScanned() *ScorecardUpsert

UpdateTimeScanned sets the "time_scanned" field to the value that was provided on create.

type ScorecardUpsertBulk

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

ScorecardUpsertBulk is the builder for "upsert"-ing a bulk of Scorecard nodes.

func (*ScorecardUpsertBulk) AddAggregateScore

func (u *ScorecardUpsertBulk) AddAggregateScore(v float64) *ScorecardUpsertBulk

AddAggregateScore adds v to the "aggregate_score" field.

func (*ScorecardUpsertBulk) DoNothing

func (u *ScorecardUpsertBulk) DoNothing() *ScorecardUpsertBulk

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*ScorecardUpsertBulk) Exec

Exec executes the query.

func (*ScorecardUpsertBulk) ExecX

func (u *ScorecardUpsertBulk) ExecX(ctx context.Context)

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

func (*ScorecardUpsertBulk) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Scorecard.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*ScorecardUpsertBulk) SetAggregateScore

func (u *ScorecardUpsertBulk) SetAggregateScore(v float64) *ScorecardUpsertBulk

SetAggregateScore sets the "aggregate_score" field.

func (*ScorecardUpsertBulk) SetChecks

SetChecks sets the "checks" field.

func (*ScorecardUpsertBulk) SetCollector

func (u *ScorecardUpsertBulk) SetCollector(v string) *ScorecardUpsertBulk

SetCollector sets the "collector" field.

func (*ScorecardUpsertBulk) SetOrigin

SetOrigin sets the "origin" field.

func (*ScorecardUpsertBulk) SetScorecardCommit

func (u *ScorecardUpsertBulk) SetScorecardCommit(v string) *ScorecardUpsertBulk

SetScorecardCommit sets the "scorecard_commit" field.

func (*ScorecardUpsertBulk) SetScorecardVersion

func (u *ScorecardUpsertBulk) SetScorecardVersion(v string) *ScorecardUpsertBulk

SetScorecardVersion sets the "scorecard_version" field.

func (*ScorecardUpsertBulk) SetTimeScanned

func (u *ScorecardUpsertBulk) SetTimeScanned(v time.Time) *ScorecardUpsertBulk

SetTimeScanned sets the "time_scanned" field.

func (*ScorecardUpsertBulk) Update

Update allows overriding fields `UPDATE` values. See the ScorecardCreateBulk.OnConflict documentation for more info.

func (*ScorecardUpsertBulk) UpdateAggregateScore

func (u *ScorecardUpsertBulk) UpdateAggregateScore() *ScorecardUpsertBulk

UpdateAggregateScore sets the "aggregate_score" field to the value that was provided on create.

func (*ScorecardUpsertBulk) UpdateChecks

func (u *ScorecardUpsertBulk) UpdateChecks() *ScorecardUpsertBulk

UpdateChecks sets the "checks" field to the value that was provided on create.

func (*ScorecardUpsertBulk) UpdateCollector

func (u *ScorecardUpsertBulk) UpdateCollector() *ScorecardUpsertBulk

UpdateCollector sets the "collector" field to the value that was provided on create.

func (*ScorecardUpsertBulk) UpdateNewValues

func (u *ScorecardUpsertBulk) UpdateNewValues() *ScorecardUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.Scorecard.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	Exec(ctx)

func (*ScorecardUpsertBulk) UpdateOrigin

func (u *ScorecardUpsertBulk) UpdateOrigin() *ScorecardUpsertBulk

UpdateOrigin sets the "origin" field to the value that was provided on create.

func (*ScorecardUpsertBulk) UpdateScorecardCommit

func (u *ScorecardUpsertBulk) UpdateScorecardCommit() *ScorecardUpsertBulk

UpdateScorecardCommit sets the "scorecard_commit" field to the value that was provided on create.

func (*ScorecardUpsertBulk) UpdateScorecardVersion

func (u *ScorecardUpsertBulk) UpdateScorecardVersion() *ScorecardUpsertBulk

UpdateScorecardVersion sets the "scorecard_version" field to the value that was provided on create.

func (*ScorecardUpsertBulk) UpdateTimeScanned

func (u *ScorecardUpsertBulk) UpdateTimeScanned() *ScorecardUpsertBulk

UpdateTimeScanned sets the "time_scanned" field to the value that was provided on create.

type ScorecardUpsertOne

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

ScorecardUpsertOne is the builder for "upsert"-ing

one Scorecard node.

func (*ScorecardUpsertOne) AddAggregateScore

func (u *ScorecardUpsertOne) AddAggregateScore(v float64) *ScorecardUpsertOne

AddAggregateScore adds v to the "aggregate_score" field.

func (*ScorecardUpsertOne) DoNothing

func (u *ScorecardUpsertOne) DoNothing() *ScorecardUpsertOne

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*ScorecardUpsertOne) Exec

func (u *ScorecardUpsertOne) Exec(ctx context.Context) error

Exec executes the query.

func (*ScorecardUpsertOne) ExecX

func (u *ScorecardUpsertOne) ExecX(ctx context.Context)

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

func (*ScorecardUpsertOne) ID

func (u *ScorecardUpsertOne) ID(ctx context.Context) (id int, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*ScorecardUpsertOne) IDX

func (u *ScorecardUpsertOne) IDX(ctx context.Context) int

IDX is like ID, but panics if an error occurs.

func (*ScorecardUpsertOne) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Scorecard.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*ScorecardUpsertOne) SetAggregateScore

func (u *ScorecardUpsertOne) SetAggregateScore(v float64) *ScorecardUpsertOne

SetAggregateScore sets the "aggregate_score" field.

func (*ScorecardUpsertOne) SetChecks

SetChecks sets the "checks" field.

func (*ScorecardUpsertOne) SetCollector

func (u *ScorecardUpsertOne) SetCollector(v string) *ScorecardUpsertOne

SetCollector sets the "collector" field.

func (*ScorecardUpsertOne) SetOrigin

func (u *ScorecardUpsertOne) SetOrigin(v string) *ScorecardUpsertOne

SetOrigin sets the "origin" field.

func (*ScorecardUpsertOne) SetScorecardCommit

func (u *ScorecardUpsertOne) SetScorecardCommit(v string) *ScorecardUpsertOne

SetScorecardCommit sets the "scorecard_commit" field.

func (*ScorecardUpsertOne) SetScorecardVersion

func (u *ScorecardUpsertOne) SetScorecardVersion(v string) *ScorecardUpsertOne

SetScorecardVersion sets the "scorecard_version" field.

func (*ScorecardUpsertOne) SetTimeScanned

func (u *ScorecardUpsertOne) SetTimeScanned(v time.Time) *ScorecardUpsertOne

SetTimeScanned sets the "time_scanned" field.

func (*ScorecardUpsertOne) Update

func (u *ScorecardUpsertOne) Update(set func(*ScorecardUpsert)) *ScorecardUpsertOne

Update allows overriding fields `UPDATE` values. See the ScorecardCreate.OnConflict documentation for more info.

func (*ScorecardUpsertOne) UpdateAggregateScore

func (u *ScorecardUpsertOne) UpdateAggregateScore() *ScorecardUpsertOne

UpdateAggregateScore sets the "aggregate_score" field to the value that was provided on create.

func (*ScorecardUpsertOne) UpdateChecks

func (u *ScorecardUpsertOne) UpdateChecks() *ScorecardUpsertOne

UpdateChecks sets the "checks" field to the value that was provided on create.

func (*ScorecardUpsertOne) UpdateCollector

func (u *ScorecardUpsertOne) UpdateCollector() *ScorecardUpsertOne

UpdateCollector sets the "collector" field to the value that was provided on create.

func (*ScorecardUpsertOne) UpdateNewValues

func (u *ScorecardUpsertOne) UpdateNewValues() *ScorecardUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.Scorecard.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	Exec(ctx)

func (*ScorecardUpsertOne) UpdateOrigin

func (u *ScorecardUpsertOne) UpdateOrigin() *ScorecardUpsertOne

UpdateOrigin sets the "origin" field to the value that was provided on create.

func (*ScorecardUpsertOne) UpdateScorecardCommit

func (u *ScorecardUpsertOne) UpdateScorecardCommit() *ScorecardUpsertOne

UpdateScorecardCommit sets the "scorecard_commit" field to the value that was provided on create.

func (*ScorecardUpsertOne) UpdateScorecardVersion

func (u *ScorecardUpsertOne) UpdateScorecardVersion() *ScorecardUpsertOne

UpdateScorecardVersion sets the "scorecard_version" field to the value that was provided on create.

func (*ScorecardUpsertOne) UpdateTimeScanned

func (u *ScorecardUpsertOne) UpdateTimeScanned() *ScorecardUpsertOne

UpdateTimeScanned sets the "time_scanned" field to the value that was provided on create.

type Scorecards

type Scorecards []*Scorecard

Scorecards is a parsable slice of Scorecard.

type SourceName

type SourceName struct {

	// ID of the ent.
	ID int `json:"id,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"`
	// NamespaceID holds the value of the "namespace_id" field.
	NamespaceID int `json:"namespace_id,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) IsNode

func (n *SourceName) IsNode()

IsNode implements the Node interface check for GQLGen.

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) Namespace

func (sn *SourceName) Namespace(ctx context.Context) (*SourceNamespace, error)

func (*SourceName) Occurrences

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

func (*SourceName) QueryNamespace

func (sn *SourceName) QueryNamespace() *SourceNamespaceQuery

QueryNamespace queries the "namespace" edge of the SourceName entity.

func (*SourceName) QueryOccurrences

func (sn *SourceName) QueryOccurrences() *OccurrenceQuery

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

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 int) *SourceNameDeleteOne

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

func (*SourceNameClient) Get

func (c *SourceNameClient) Get(ctx context.Context, id int) (*SourceName, error)

Get returns a SourceName entity by its id.

func (*SourceNameClient) GetX

func (c *SourceNameClient) GetX(ctx context.Context, id int) *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) QueryNamespace

func (c *SourceNameClient) QueryNamespace(sn *SourceName) *SourceNamespaceQuery

QueryNamespace queries the namespace edge of a SourceName.

func (*SourceNameClient) QueryOccurrences

func (c *SourceNameClient) QueryOccurrences(sn *SourceName) *OccurrenceQuery

QueryOccurrences queries the occurrences 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 int) *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) AddOccurrenceIDs

func (snc *SourceNameCreate) AddOccurrenceIDs(ids ...int) *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) 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().
	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.SourceNameUpsert) {
		SetName(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) SetName

func (snc *SourceNameCreate) SetName(s string) *SourceNameCreate

SetName sets the "name" field.

func (*SourceNameCreate) SetNamespace

func (snc *SourceNameCreate) SetNamespace(s *SourceNamespace) *SourceNameCreate

SetNamespace sets the "namespace" edge to the SourceNamespace entity.

func (*SourceNameCreate) SetNamespaceID

func (snc *SourceNameCreate) SetNamespaceID(i int) *SourceNameCreate

SetNamespaceID sets the "namespace_id" 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) 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.

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) {
		SetName(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 {
	// Namespace holds the value of the namespace edge.
	Namespace *SourceNamespace `json:"namespace,omitempty"`
	// Occurrences holds the value of the occurrences edge.
	Occurrences []*Occurrence `json:"occurrences,omitempty"`
	// contains filtered or unexported fields
}

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

func (SourceNameEdges) NamespaceOrErr

func (e SourceNameEdges) NamespaceOrErr() (*SourceNamespace, error)

NamespaceOrErr returns the Namespace value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

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.

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) 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) AddOccurrenceIDs

func (m *SourceNameMutation) AddOccurrenceIDs(ids ...int)

AddOccurrenceIDs adds the "occurrences" edge to the Occurrence 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) 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) ClearNamespace

func (m *SourceNameMutation) ClearNamespace()

ClearNamespace clears the "namespace" edge to the SourceNamespace entity.

func (*SourceNameMutation) ClearOccurrences

func (m *SourceNameMutation) ClearOccurrences()

ClearOccurrences clears the "occurrences" edge to the Occurrence 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) ID

func (m *SourceNameMutation) ID() (id int, 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) ([]int, 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) Name

func (m *SourceNameMutation) Name() (r string, exists bool)

Name returns the value of the "name" field in the mutation.

func (*SourceNameMutation) NamespaceCleared

func (m *SourceNameMutation) NamespaceCleared() bool

NamespaceCleared reports if the "namespace" edge to the SourceNamespace entity was cleared.

func (*SourceNameMutation) NamespaceID

func (m *SourceNameMutation) NamespaceID() (r int, exists bool)

NamespaceID returns the value of the "namespace_id" field in the mutation.

func (*SourceNameMutation) NamespaceIDs

func (m *SourceNameMutation) NamespaceIDs() (ids []int)

NamespaceIDs returns the "namespace" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use NamespaceID instead. It exists only for internal usage by the builders.

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 []int)

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) OldNamespaceID

func (m *SourceNameMutation) OldNamespaceID(ctx context.Context) (v int, err error)

OldNamespaceID returns the old "namespace_id" 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) Op

func (m *SourceNameMutation) Op() Op

Op returns the operation name.

func (*SourceNameMutation) RemoveOccurrenceIDs

func (m *SourceNameMutation) RemoveOccurrenceIDs(ids ...int)

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

func (*SourceNameMutation) RemovedEdges

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

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

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) RemovedOccurrencesIDs

func (m *SourceNameMutation) RemovedOccurrencesIDs() (ids []int)

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

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) 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" edge.

func (*SourceNameMutation) ResetNamespaceID

func (m *SourceNameMutation) ResetNamespaceID()

ResetNamespaceID resets all changes to the "namespace_id" field.

func (*SourceNameMutation) ResetOccurrences

func (m *SourceNameMutation) ResetOccurrences()

ResetOccurrences resets all changes to the "occurrences" edge.

func (*SourceNameMutation) ResetTag

func (m *SourceNameMutation) ResetTag()

ResetTag resets all changes to the "tag" field.

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) SetName

func (m *SourceNameMutation) SetName(s string)

SetName sets the "name" field.

func (*SourceNameMutation) SetNamespaceID

func (m *SourceNameMutation) SetNamespaceID(i int)

SetNamespaceID sets the "namespace_id" 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) 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 int, 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) int

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 {
	Name string `json:"name,omitempty"`
	Count int `json:"count,omitempty"`
}

client.SourceName.Query().
	GroupBy(sourcename.FieldName).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*SourceNameQuery) IDs

func (snq *SourceNameQuery) IDs(ctx context.Context) (ids []int, err error)

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

func (*SourceNameQuery) IDsX

func (snq *SourceNameQuery) IDsX(ctx context.Context) []int

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 int, 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) int

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) QueryNamespace

func (snq *SourceNameQuery) QueryNamespace() *SourceNamespaceQuery

QueryNamespace chains the current query on the "namespace" edge.

func (*SourceNameQuery) QueryOccurrences

func (snq *SourceNameQuery) QueryOccurrences() *OccurrenceQuery

QueryOccurrences chains the current query on the "occurrences" 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 {
	Name string `json:"name,omitempty"`
}

client.SourceName.Query().
	Select(sourcename.FieldName).
	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) 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) WithNamespace

func (snq *SourceNameQuery) WithNamespace(opts ...func(*SourceNamespaceQuery)) *SourceNameQuery

WithNamespace tells the query-builder to eager-load the nodes that are connected to the "namespace" edge. 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.

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) AddOccurrenceIDs

func (snu *SourceNameUpdate) AddOccurrenceIDs(ids ...int) *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) ClearCommit

func (snu *SourceNameUpdate) ClearCommit() *SourceNameUpdate

ClearCommit clears the value of the "commit" field.

func (*SourceNameUpdate) ClearNamespace

func (snu *SourceNameUpdate) ClearNamespace() *SourceNameUpdate

ClearNamespace clears the "namespace" edge to the SourceNamespace entity.

func (*SourceNameUpdate) ClearOccurrences

func (snu *SourceNameUpdate) ClearOccurrences() *SourceNameUpdate

ClearOccurrences clears all "occurrences" edges to the Occurrence 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) RemoveOccurrenceIDs

func (snu *SourceNameUpdate) RemoveOccurrenceIDs(ids ...int) *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) 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 *SourceNamespace) *SourceNameUpdate

SetNamespace sets the "namespace" edge to the SourceNamespace entity.

func (*SourceNameUpdate) SetNamespaceID

func (snu *SourceNameUpdate) SetNamespaceID(i int) *SourceNameUpdate

SetNamespaceID sets the "namespace_id" 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) SetNillableTag

func (snu *SourceNameUpdate) SetNillableTag(s *string) *SourceNameUpdate

SetNillableTag sets the "tag" 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) 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) AddOccurrenceIDs

func (snuo *SourceNameUpdateOne) AddOccurrenceIDs(ids ...int) *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) ClearCommit

func (snuo *SourceNameUpdateOne) ClearCommit() *SourceNameUpdateOne

ClearCommit clears the value of the "commit" field.

func (*SourceNameUpdateOne) ClearNamespace

func (snuo *SourceNameUpdateOne) ClearNamespace() *SourceNameUpdateOne

ClearNamespace clears the "namespace" edge to the SourceNamespace entity.

func (*SourceNameUpdateOne) ClearOccurrences

func (snuo *SourceNameUpdateOne) ClearOccurrences() *SourceNameUpdateOne

ClearOccurrences clears all "occurrences" edges to the Occurrence 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) RemoveOccurrenceIDs

func (snuo *SourceNameUpdateOne) RemoveOccurrenceIDs(ids ...int) *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) 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

SetNamespace sets the "namespace" edge to the SourceNamespace entity.

func (*SourceNameUpdateOne) SetNamespaceID

func (snuo *SourceNameUpdateOne) SetNamespaceID(i int) *SourceNameUpdateOne

SetNamespaceID sets the "namespace_id" 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) SetNillableTag

func (snuo *SourceNameUpdateOne) SetNillableTag(s *string) *SourceNameUpdateOne

SetNillableTag sets the "tag" field if the given value is not nil.

func (*SourceNameUpdateOne) SetTag

SetTag sets the "tag" 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) SetNamespaceID

func (u *SourceNameUpsert) SetNamespaceID(v int) *SourceNameUpsert

SetNamespaceID sets the "namespace_id" field.

func (*SourceNameUpsert) SetTag

SetTag sets the "tag" 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) UpdateNamespaceID

func (u *SourceNameUpsert) UpdateNamespaceID() *SourceNameUpsert

UpdateNamespaceID sets the "namespace_id" 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.

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) SetNamespaceID

func (u *SourceNameUpsertBulk) SetNamespaceID(v int) *SourceNameUpsertBulk

SetNamespaceID sets the "namespace_id" field.

func (*SourceNameUpsertBulk) SetTag

SetTag sets the "tag" 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) UpdateNamespaceID

func (u *SourceNameUpsertBulk) UpdateNamespaceID() *SourceNameUpsertBulk

UpdateNamespaceID sets the "namespace_id" 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(),
	).
	Exec(ctx)

func (*SourceNameUpsertBulk) UpdateTag

UpdateTag sets the "tag" 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 int, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*SourceNameUpsertOne) IDX

func (u *SourceNameUpsertOne) IDX(ctx context.Context) int

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) SetNamespaceID

func (u *SourceNameUpsertOne) SetNamespaceID(v int) *SourceNameUpsertOne

SetNamespaceID sets the "namespace_id" field.

func (*SourceNameUpsertOne) SetTag

SetTag sets the "tag" 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) UpdateNamespaceID

func (u *SourceNameUpsertOne) UpdateNamespaceID() *SourceNameUpsertOne

UpdateNamespaceID sets the "namespace_id" 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. Using this option is equivalent to using:

client.SourceName.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	Exec(ctx)

func (*SourceNameUpsertOne) UpdateTag

func (u *SourceNameUpsertOne) UpdateTag() *SourceNameUpsertOne

UpdateTag sets the "tag" field to the value that was provided on create.

type SourceNames

type SourceNames []*SourceName

SourceNames is a parsable slice of SourceName.

type SourceNamespace

type SourceNamespace struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// Namespace holds the value of the "namespace" field.
	Namespace string `json:"namespace,omitempty"`
	// SourceID holds the value of the "source_id" field.
	SourceID int `json:"source_id,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the SourceNamespaceQuery when eager-loading is set.
	Edges SourceNamespaceEdges `json:"edges"`
	// contains filtered or unexported fields
}

SourceNamespace is the model entity for the SourceNamespace schema.

func (*SourceNamespace) IsNode

func (n *SourceNamespace) IsNode()

IsNode implements the Node interface check for GQLGen.

func (*SourceNamespace) NamedNames

func (sn *SourceNamespace) NamedNames(name string) ([]*SourceName, error)

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

func (*SourceNamespace) Names

func (sn *SourceNamespace) Names(ctx context.Context) (result []*SourceName, err error)

func (*SourceNamespace) QueryNames

func (sn *SourceNamespace) QueryNames() *SourceNameQuery

QueryNames queries the "names" edge of the SourceNamespace entity.

func (*SourceNamespace) QuerySourceType

func (sn *SourceNamespace) QuerySourceType() *SourceTypeQuery

QuerySourceType queries the "source_type" edge of the SourceNamespace entity.

func (*SourceNamespace) SourceType

func (sn *SourceNamespace) SourceType(ctx context.Context) (*SourceType, error)

func (*SourceNamespace) String

func (sn *SourceNamespace) String() string

String implements the fmt.Stringer.

func (*SourceNamespace) ToEdge

ToEdge converts SourceNamespace into SourceNamespaceEdge.

func (*SourceNamespace) Unwrap

func (sn *SourceNamespace) Unwrap() *SourceNamespace

Unwrap unwraps the SourceNamespace 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 (*SourceNamespace) Update

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

func (*SourceNamespace) Value

func (sn *SourceNamespace) Value(name string) (ent.Value, error)

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

type SourceNamespaceClient

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

SourceNamespaceClient is a client for the SourceNamespace schema.

func NewSourceNamespaceClient

func NewSourceNamespaceClient(c config) *SourceNamespaceClient

NewSourceNamespaceClient returns a client for the SourceNamespace from the given config.

func (*SourceNamespaceClient) Create

Create returns a builder for creating a SourceNamespace entity.

func (*SourceNamespaceClient) CreateBulk

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

func (*SourceNamespaceClient) Delete

Delete returns a delete builder for SourceNamespace.

func (*SourceNamespaceClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*SourceNamespaceClient) DeleteOneID

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

func (*SourceNamespaceClient) Get

Get returns a SourceNamespace entity by its id.

func (*SourceNamespaceClient) GetX

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

func (*SourceNamespaceClient) Hooks

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

Hooks returns the client hooks.

func (*SourceNamespaceClient) Intercept

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

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

func (*SourceNamespaceClient) Interceptors

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

Interceptors returns the client interceptors.

func (*SourceNamespaceClient) MapCreateBulk

func (c *SourceNamespaceClient) MapCreateBulk(slice any, setFunc func(*SourceNamespaceCreate, int)) *SourceNamespaceCreateBulk

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 (*SourceNamespaceClient) Query

Query returns a query builder for SourceNamespace.

func (*SourceNamespaceClient) QueryNames

QueryNames queries the names edge of a SourceNamespace.

func (*SourceNamespaceClient) QuerySourceType

func (c *SourceNamespaceClient) QuerySourceType(sn *SourceNamespace) *SourceTypeQuery

QuerySourceType queries the source_type edge of a SourceNamespace.

func (*SourceNamespaceClient) Update

Update returns an update builder for SourceNamespace.

func (*SourceNamespaceClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*SourceNamespaceClient) UpdateOneID

UpdateOneID returns an update builder for the given id.

func (*SourceNamespaceClient) Use

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

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

type SourceNamespaceConnection

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

SourceNamespaceConnection is the connection containing edges to SourceNamespace.

type SourceNamespaceCreate

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

SourceNamespaceCreate is the builder for creating a SourceNamespace entity.

func (*SourceNamespaceCreate) AddNameIDs

func (snc *SourceNamespaceCreate) AddNameIDs(ids ...int) *SourceNamespaceCreate

AddNameIDs adds the "names" edge to the SourceName entity by IDs.

func (*SourceNamespaceCreate) AddNames

AddNames adds the "names" edges to the SourceName entity.

func (*SourceNamespaceCreate) Exec

func (snc *SourceNamespaceCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*SourceNamespaceCreate) ExecX

func (snc *SourceNamespaceCreate) ExecX(ctx context.Context)

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

func (*SourceNamespaceCreate) Mutation

Mutation returns the SourceNamespaceMutation object of the builder.

func (*SourceNamespaceCreate) OnConflict

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

client.SourceNamespace.Create().
	SetNamespace(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.SourceNamespaceUpsert) {
		SetNamespace(v+v).
	}).
	Exec(ctx)

func (*SourceNamespaceCreate) OnConflictColumns

func (snc *SourceNamespaceCreate) OnConflictColumns(columns ...string) *SourceNamespaceUpsertOne

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

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

func (*SourceNamespaceCreate) Save

Save creates the SourceNamespace in the database.

func (*SourceNamespaceCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*SourceNamespaceCreate) SetNamespace

func (snc *SourceNamespaceCreate) SetNamespace(s string) *SourceNamespaceCreate

SetNamespace sets the "namespace" field.

func (*SourceNamespaceCreate) SetSourceID

func (snc *SourceNamespaceCreate) SetSourceID(i int) *SourceNamespaceCreate

SetSourceID sets the "source_id" field.

func (*SourceNamespaceCreate) SetSourceType

func (snc *SourceNamespaceCreate) SetSourceType(s *SourceType) *SourceNamespaceCreate

SetSourceType sets the "source_type" edge to the SourceType entity.

func (*SourceNamespaceCreate) SetSourceTypeID

func (snc *SourceNamespaceCreate) SetSourceTypeID(id int) *SourceNamespaceCreate

SetSourceTypeID sets the "source_type" edge to the SourceType entity by ID.

type SourceNamespaceCreateBulk

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

SourceNamespaceCreateBulk is the builder for creating many SourceNamespace entities in bulk.

func (*SourceNamespaceCreateBulk) Exec

Exec executes the query.

func (*SourceNamespaceCreateBulk) ExecX

func (sncb *SourceNamespaceCreateBulk) ExecX(ctx context.Context)

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

func (*SourceNamespaceCreateBulk) OnConflict

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

client.SourceNamespace.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.SourceNamespaceUpsert) {
		SetNamespace(v+v).
	}).
	Exec(ctx)

func (*SourceNamespaceCreateBulk) OnConflictColumns

func (sncb *SourceNamespaceCreateBulk) OnConflictColumns(columns ...string) *SourceNamespaceUpsertBulk

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

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

func (*SourceNamespaceCreateBulk) Save

Save creates the SourceNamespace entities in the database.

func (*SourceNamespaceCreateBulk) SaveX

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

type SourceNamespaceDelete

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

SourceNamespaceDelete is the builder for deleting a SourceNamespace entity.

func (*SourceNamespaceDelete) Exec

func (snd *SourceNamespaceDelete) Exec(ctx context.Context) (int, error)

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

func (*SourceNamespaceDelete) ExecX

func (snd *SourceNamespaceDelete) ExecX(ctx context.Context) int

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

func (*SourceNamespaceDelete) Where

Where appends a list predicates to the SourceNamespaceDelete builder.

type SourceNamespaceDeleteOne

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

SourceNamespaceDeleteOne is the builder for deleting a single SourceNamespace entity.

func (*SourceNamespaceDeleteOne) Exec

Exec executes the deletion query.

func (*SourceNamespaceDeleteOne) ExecX

func (sndo *SourceNamespaceDeleteOne) ExecX(ctx context.Context)

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

func (*SourceNamespaceDeleteOne) Where

Where appends a list predicates to the SourceNamespaceDelete builder.

type SourceNamespaceEdge

type SourceNamespaceEdge struct {
	Node   *SourceNamespace `json:"node"`
	Cursor Cursor           `json:"cursor"`
}

SourceNamespaceEdge is the edge representation of SourceNamespace.

type SourceNamespaceEdges

type SourceNamespaceEdges struct {
	// SourceType holds the value of the source_type edge.
	SourceType *SourceType `json:"source_type,omitempty"`
	// Names holds the value of the names edge.
	Names []*SourceName `json:"names,omitempty"`
	// contains filtered or unexported fields
}

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

func (SourceNamespaceEdges) NamesOrErr

func (e SourceNamespaceEdges) NamesOrErr() ([]*SourceName, error)

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

func (SourceNamespaceEdges) SourceTypeOrErr

func (e SourceNamespaceEdges) SourceTypeOrErr() (*SourceType, error)

SourceTypeOrErr returns the SourceType value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type SourceNamespaceGroupBy

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

SourceNamespaceGroupBy is the group-by builder for SourceNamespace entities.

func (*SourceNamespaceGroupBy) Aggregate

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

func (*SourceNamespaceGroupBy) Bool

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

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

func (*SourceNamespaceGroupBy) BoolX

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

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

func (*SourceNamespaceGroupBy) Bools

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

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

func (*SourceNamespaceGroupBy) BoolsX

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

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

func (*SourceNamespaceGroupBy) Float64

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

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

func (*SourceNamespaceGroupBy) Float64X

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

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

func (*SourceNamespaceGroupBy) Float64s

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

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

func (*SourceNamespaceGroupBy) Float64sX

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

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

func (*SourceNamespaceGroupBy) Int

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

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

func (*SourceNamespaceGroupBy) IntX

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

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

func (*SourceNamespaceGroupBy) Ints

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

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

func (*SourceNamespaceGroupBy) IntsX

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

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

func (*SourceNamespaceGroupBy) Scan

func (sngb *SourceNamespaceGroupBy) Scan(ctx context.Context, v any) error

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

func (*SourceNamespaceGroupBy) ScanX

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

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

func (*SourceNamespaceGroupBy) String

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

String returns a single string from a selector. It is only allowed when selecting one field.

func (*SourceNamespaceGroupBy) StringX

func (s *SourceNamespaceGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*SourceNamespaceGroupBy) Strings

func (s *SourceNamespaceGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*SourceNamespaceGroupBy) StringsX

func (s *SourceNamespaceGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type SourceNamespaceMutation

type SourceNamespaceMutation struct {
	// contains filtered or unexported fields
}

SourceNamespaceMutation represents an operation that mutates the SourceNamespace nodes in the graph.

func (*SourceNamespaceMutation) AddField

func (m *SourceNamespaceMutation) 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 (*SourceNamespaceMutation) AddNameIDs

func (m *SourceNamespaceMutation) AddNameIDs(ids ...int)

AddNameIDs adds the "names" edge to the SourceName entity by ids.

func (*SourceNamespaceMutation) AddedEdges

func (m *SourceNamespaceMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*SourceNamespaceMutation) AddedField

func (m *SourceNamespaceMutation) 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 (*SourceNamespaceMutation) AddedFields

func (m *SourceNamespaceMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*SourceNamespaceMutation) AddedIDs

func (m *SourceNamespaceMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*SourceNamespaceMutation) ClearEdge

func (m *SourceNamespaceMutation) 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 (*SourceNamespaceMutation) ClearField

func (m *SourceNamespaceMutation) 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 (*SourceNamespaceMutation) ClearNames

func (m *SourceNamespaceMutation) ClearNames()

ClearNames clears the "names" edge to the SourceName entity.

func (*SourceNamespaceMutation) ClearSourceType

func (m *SourceNamespaceMutation) ClearSourceType()

ClearSourceType clears the "source_type" edge to the SourceType entity.

func (*SourceNamespaceMutation) ClearedEdges

func (m *SourceNamespaceMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*SourceNamespaceMutation) ClearedFields

func (m *SourceNamespaceMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (SourceNamespaceMutation) Client

func (m SourceNamespaceMutation) 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 (*SourceNamespaceMutation) EdgeCleared

func (m *SourceNamespaceMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*SourceNamespaceMutation) Field

func (m *SourceNamespaceMutation) 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 (*SourceNamespaceMutation) FieldCleared

func (m *SourceNamespaceMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*SourceNamespaceMutation) Fields

func (m *SourceNamespaceMutation) 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 (*SourceNamespaceMutation) ID

func (m *SourceNamespaceMutation) ID() (id int, 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 (*SourceNamespaceMutation) IDs

func (m *SourceNamespaceMutation) IDs(ctx context.Context) ([]int, 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 (*SourceNamespaceMutation) NamesCleared

func (m *SourceNamespaceMutation) NamesCleared() bool

NamesCleared reports if the "names" edge to the SourceName entity was cleared.

func (*SourceNamespaceMutation) NamesIDs

func (m *SourceNamespaceMutation) NamesIDs() (ids []int)

NamesIDs returns the "names" edge IDs in the mutation.

func (*SourceNamespaceMutation) Namespace

func (m *SourceNamespaceMutation) Namespace() (r string, exists bool)

Namespace returns the value of the "namespace" field in the mutation.

func (*SourceNamespaceMutation) OldField

func (m *SourceNamespaceMutation) 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 (*SourceNamespaceMutation) OldNamespace

func (m *SourceNamespaceMutation) OldNamespace(ctx context.Context) (v string, err error)

OldNamespace returns the old "namespace" field's value of the SourceNamespace entity. If the SourceNamespace 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 (*SourceNamespaceMutation) OldSourceID

func (m *SourceNamespaceMutation) OldSourceID(ctx context.Context) (v int, err error)

OldSourceID returns the old "source_id" field's value of the SourceNamespace entity. If the SourceNamespace 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 (*SourceNamespaceMutation) Op

func (m *SourceNamespaceMutation) Op() Op

Op returns the operation name.

func (*SourceNamespaceMutation) RemoveNameIDs

func (m *SourceNamespaceMutation) RemoveNameIDs(ids ...int)

RemoveNameIDs removes the "names" edge to the SourceName entity by IDs.

func (*SourceNamespaceMutation) RemovedEdges

func (m *SourceNamespaceMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*SourceNamespaceMutation) RemovedIDs

func (m *SourceNamespaceMutation) 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 (*SourceNamespaceMutation) RemovedNamesIDs

func (m *SourceNamespaceMutation) RemovedNamesIDs() (ids []int)

RemovedNames returns the removed IDs of the "names" edge to the SourceName entity.

func (*SourceNamespaceMutation) ResetEdge

func (m *SourceNamespaceMutation) 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 (*SourceNamespaceMutation) ResetField

func (m *SourceNamespaceMutation) 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 (*SourceNamespaceMutation) ResetNames

func (m *SourceNamespaceMutation) ResetNames()

ResetNames resets all changes to the "names" edge.

func (*SourceNamespaceMutation) ResetNamespace

func (m *SourceNamespaceMutation) ResetNamespace()

ResetNamespace resets all changes to the "namespace" field.

func (*SourceNamespaceMutation) ResetSourceID

func (m *SourceNamespaceMutation) ResetSourceID()

ResetSourceID resets all changes to the "source_id" field.

func (*SourceNamespaceMutation) ResetSourceType

func (m *SourceNamespaceMutation) ResetSourceType()

ResetSourceType resets all changes to the "source_type" edge.

func (*SourceNamespaceMutation) SetField

func (m *SourceNamespaceMutation) 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 (*SourceNamespaceMutation) SetNamespace

func (m *SourceNamespaceMutation) SetNamespace(s string)

SetNamespace sets the "namespace" field.

func (*SourceNamespaceMutation) SetOp

func (m *SourceNamespaceMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*SourceNamespaceMutation) SetSourceID

func (m *SourceNamespaceMutation) SetSourceID(i int)

SetSourceID sets the "source_id" field.

func (*SourceNamespaceMutation) SetSourceTypeID

func (m *SourceNamespaceMutation) SetSourceTypeID(id int)

SetSourceTypeID sets the "source_type" edge to the SourceType entity by id.

func (*SourceNamespaceMutation) SourceID

func (m *SourceNamespaceMutation) SourceID() (r int, exists bool)

SourceID returns the value of the "source_id" field in the mutation.

func (*SourceNamespaceMutation) SourceTypeCleared

func (m *SourceNamespaceMutation) SourceTypeCleared() bool

SourceTypeCleared reports if the "source_type" edge to the SourceType entity was cleared.

func (*SourceNamespaceMutation) SourceTypeID

func (m *SourceNamespaceMutation) SourceTypeID() (id int, exists bool)

SourceTypeID returns the "source_type" edge ID in the mutation.

func (*SourceNamespaceMutation) SourceTypeIDs

func (m *SourceNamespaceMutation) SourceTypeIDs() (ids []int)

SourceTypeIDs returns the "source_type" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use SourceTypeID instead. It exists only for internal usage by the builders.

func (SourceNamespaceMutation) Tx

func (m SourceNamespaceMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*SourceNamespaceMutation) Type

func (m *SourceNamespaceMutation) Type() string

Type returns the node type of this mutation (SourceNamespace).

func (*SourceNamespaceMutation) Where

Where appends a list predicates to the SourceNamespaceMutation builder.

func (*SourceNamespaceMutation) WhereP

func (m *SourceNamespaceMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the SourceNamespaceMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type SourceNamespaceOrder

type SourceNamespaceOrder struct {
	Direction OrderDirection             `json:"direction"`
	Field     *SourceNamespaceOrderField `json:"field"`
}

SourceNamespaceOrder defines the ordering of SourceNamespace.

type SourceNamespaceOrderField

type SourceNamespaceOrderField struct {
	// Value extracts the ordering value from the given SourceNamespace.
	Value func(*SourceNamespace) (ent.Value, error)
	// contains filtered or unexported fields
}

SourceNamespaceOrderField defines the ordering field of SourceNamespace.

type SourceNamespacePaginateOption

type SourceNamespacePaginateOption func(*sourcenamespacePager) error

SourceNamespacePaginateOption enables pagination customization.

func WithSourceNamespaceFilter

func WithSourceNamespaceFilter(filter func(*SourceNamespaceQuery) (*SourceNamespaceQuery, error)) SourceNamespacePaginateOption

WithSourceNamespaceFilter configures pagination filter.

func WithSourceNamespaceOrder

func WithSourceNamespaceOrder(order *SourceNamespaceOrder) SourceNamespacePaginateOption

WithSourceNamespaceOrder configures pagination ordering.

type SourceNamespaceQuery

type SourceNamespaceQuery struct {
	// contains filtered or unexported fields
}

SourceNamespaceQuery is the builder for querying SourceNamespace entities.

func (*SourceNamespaceQuery) Aggregate

Aggregate returns a SourceNamespaceSelect configured with the given aggregations.

func (*SourceNamespaceQuery) All

All executes the query and returns a list of SourceNamespaces.

func (*SourceNamespaceQuery) AllX

AllX is like All, but panics if an error occurs.

func (*SourceNamespaceQuery) Clone

Clone returns a duplicate of the SourceNamespaceQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*SourceNamespaceQuery) CollectFields

func (sn *SourceNamespaceQuery) CollectFields(ctx context.Context, satisfies ...string) (*SourceNamespaceQuery, error)

CollectFields tells the query-builder to eagerly load connected nodes by resolver context.

func (*SourceNamespaceQuery) Count

func (snq *SourceNamespaceQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*SourceNamespaceQuery) CountX

func (snq *SourceNamespaceQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*SourceNamespaceQuery) Exist

func (snq *SourceNamespaceQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*SourceNamespaceQuery) ExistX

func (snq *SourceNamespaceQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*SourceNamespaceQuery) First

First returns the first SourceNamespace entity from the query. Returns a *NotFoundError when no SourceNamespace was found.

func (*SourceNamespaceQuery) FirstID

func (snq *SourceNamespaceQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first SourceNamespace ID from the query. Returns a *NotFoundError when no SourceNamespace ID was found.

func (*SourceNamespaceQuery) FirstIDX

func (snq *SourceNamespaceQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*SourceNamespaceQuery) FirstX

FirstX is like First, but panics if an error occurs.

func (*SourceNamespaceQuery) GroupBy

func (snq *SourceNamespaceQuery) GroupBy(field string, fields ...string) *SourceNamespaceGroupBy

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 {
	Namespace string `json:"namespace,omitempty"`
	Count int `json:"count,omitempty"`
}

client.SourceNamespace.Query().
	GroupBy(sourcenamespace.FieldNamespace).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*SourceNamespaceQuery) IDs

func (snq *SourceNamespaceQuery) IDs(ctx context.Context) (ids []int, err error)

IDs executes the query and returns a list of SourceNamespace IDs.

func (*SourceNamespaceQuery) IDsX

func (snq *SourceNamespaceQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*SourceNamespaceQuery) Limit

func (snq *SourceNamespaceQuery) Limit(limit int) *SourceNamespaceQuery

Limit the number of records to be returned by this query.

func (*SourceNamespaceQuery) Offset

func (snq *SourceNamespaceQuery) Offset(offset int) *SourceNamespaceQuery

Offset to start from.

func (*SourceNamespaceQuery) Only

Only returns a single SourceNamespace entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one SourceNamespace entity is found. Returns a *NotFoundError when no SourceNamespace entities are found.

func (*SourceNamespaceQuery) OnlyID

func (snq *SourceNamespaceQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only SourceNamespace ID in the query. Returns a *NotSingularError when more than one SourceNamespace ID is found. Returns a *NotFoundError when no entities are found.

func (*SourceNamespaceQuery) OnlyIDX

func (snq *SourceNamespaceQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*SourceNamespaceQuery) OnlyX

OnlyX is like Only, but panics if an error occurs.

func (*SourceNamespaceQuery) Order

Order specifies how the records should be ordered.

func (*SourceNamespaceQuery) Paginate

func (sn *SourceNamespaceQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...SourceNamespacePaginateOption,
) (*SourceNamespaceConnection, error)

Paginate executes the query and returns a relay based cursor connection to SourceNamespace.

func (*SourceNamespaceQuery) QueryNames

func (snq *SourceNamespaceQuery) QueryNames() *SourceNameQuery

QueryNames chains the current query on the "names" edge.

func (*SourceNamespaceQuery) QuerySourceType

func (snq *SourceNamespaceQuery) QuerySourceType() *SourceTypeQuery

QuerySourceType chains the current query on the "source_type" edge.

func (*SourceNamespaceQuery) Select

func (snq *SourceNamespaceQuery) Select(fields ...string) *SourceNamespaceSelect

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 {
	Namespace string `json:"namespace,omitempty"`
}

client.SourceNamespace.Query().
	Select(sourcenamespace.FieldNamespace).
	Scan(ctx, &v)

func (*SourceNamespaceQuery) Unique

func (snq *SourceNamespaceQuery) Unique(unique bool) *SourceNamespaceQuery

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 (*SourceNamespaceQuery) Where

Where adds a new predicate for the SourceNamespaceQuery builder.

func (*SourceNamespaceQuery) WithNamedNames

func (snq *SourceNamespaceQuery) WithNamedNames(name string, opts ...func(*SourceNameQuery)) *SourceNamespaceQuery

WithNamedNames tells the query-builder to eager-load the nodes that are connected to the "names" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*SourceNamespaceQuery) WithNames

func (snq *SourceNamespaceQuery) WithNames(opts ...func(*SourceNameQuery)) *SourceNamespaceQuery

WithNames tells the query-builder to eager-load the nodes that are connected to the "names" edge. The optional arguments are used to configure the query builder of the edge.

func (*SourceNamespaceQuery) WithSourceType

func (snq *SourceNamespaceQuery) WithSourceType(opts ...func(*SourceTypeQuery)) *SourceNamespaceQuery

WithSourceType tells the query-builder to eager-load the nodes that are connected to the "source_type" edge. The optional arguments are used to configure the query builder of the edge.

type SourceNamespaceSelect

type SourceNamespaceSelect struct {
	*SourceNamespaceQuery
	// contains filtered or unexported fields
}

SourceNamespaceSelect is the builder for selecting fields of SourceNamespace entities.

func (*SourceNamespaceSelect) Aggregate

Aggregate adds the given aggregation functions to the selector query.

func (*SourceNamespaceSelect) Bool

func (s *SourceNamespaceSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*SourceNamespaceSelect) BoolX

func (s *SourceNamespaceSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*SourceNamespaceSelect) Bools

func (s *SourceNamespaceSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*SourceNamespaceSelect) BoolsX

func (s *SourceNamespaceSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*SourceNamespaceSelect) Float64

func (s *SourceNamespaceSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*SourceNamespaceSelect) Float64X

func (s *SourceNamespaceSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*SourceNamespaceSelect) Float64s

func (s *SourceNamespaceSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*SourceNamespaceSelect) Float64sX

func (s *SourceNamespaceSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*SourceNamespaceSelect) Int

func (s *SourceNamespaceSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*SourceNamespaceSelect) IntX

func (s *SourceNamespaceSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*SourceNamespaceSelect) Ints

func (s *SourceNamespaceSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*SourceNamespaceSelect) IntsX

func (s *SourceNamespaceSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*SourceNamespaceSelect) Scan

func (sns *SourceNamespaceSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*SourceNamespaceSelect) ScanX

func (s *SourceNamespaceSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*SourceNamespaceSelect) String

func (s *SourceNamespaceSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*SourceNamespaceSelect) StringX

func (s *SourceNamespaceSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*SourceNamespaceSelect) Strings

func (s *SourceNamespaceSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*SourceNamespaceSelect) StringsX

func (s *SourceNamespaceSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type SourceNamespaceUpdate

type SourceNamespaceUpdate struct {
	// contains filtered or unexported fields
}

SourceNamespaceUpdate is the builder for updating SourceNamespace entities.

func (*SourceNamespaceUpdate) AddNameIDs

func (snu *SourceNamespaceUpdate) AddNameIDs(ids ...int) *SourceNamespaceUpdate

AddNameIDs adds the "names" edge to the SourceName entity by IDs.

func (*SourceNamespaceUpdate) AddNames

AddNames adds the "names" edges to the SourceName entity.

func (*SourceNamespaceUpdate) ClearNames

func (snu *SourceNamespaceUpdate) ClearNames() *SourceNamespaceUpdate

ClearNames clears all "names" edges to the SourceName entity.

func (*SourceNamespaceUpdate) ClearSourceType

func (snu *SourceNamespaceUpdate) ClearSourceType() *SourceNamespaceUpdate

ClearSourceType clears the "source_type" edge to the SourceType entity.

func (*SourceNamespaceUpdate) Exec

func (snu *SourceNamespaceUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*SourceNamespaceUpdate) ExecX

func (snu *SourceNamespaceUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SourceNamespaceUpdate) Mutation

Mutation returns the SourceNamespaceMutation object of the builder.

func (*SourceNamespaceUpdate) RemoveNameIDs

func (snu *SourceNamespaceUpdate) RemoveNameIDs(ids ...int) *SourceNamespaceUpdate

RemoveNameIDs removes the "names" edge to SourceName entities by IDs.

func (*SourceNamespaceUpdate) RemoveNames

func (snu *SourceNamespaceUpdate) RemoveNames(s ...*SourceName) *SourceNamespaceUpdate

RemoveNames removes "names" edges to SourceName entities.

func (*SourceNamespaceUpdate) Save

func (snu *SourceNamespaceUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*SourceNamespaceUpdate) SaveX

func (snu *SourceNamespaceUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*SourceNamespaceUpdate) SetNamespace

func (snu *SourceNamespaceUpdate) SetNamespace(s string) *SourceNamespaceUpdate

SetNamespace sets the "namespace" field.

func (*SourceNamespaceUpdate) SetSourceID

func (snu *SourceNamespaceUpdate) SetSourceID(i int) *SourceNamespaceUpdate

SetSourceID sets the "source_id" field.

func (*SourceNamespaceUpdate) SetSourceType

func (snu *SourceNamespaceUpdate) SetSourceType(s *SourceType) *SourceNamespaceUpdate

SetSourceType sets the "source_type" edge to the SourceType entity.

func (*SourceNamespaceUpdate) SetSourceTypeID

func (snu *SourceNamespaceUpdate) SetSourceTypeID(id int) *SourceNamespaceUpdate

SetSourceTypeID sets the "source_type" edge to the SourceType entity by ID.

func (*SourceNamespaceUpdate) Where

Where appends a list predicates to the SourceNamespaceUpdate builder.

type SourceNamespaceUpdateOne

type SourceNamespaceUpdateOne struct {
	// contains filtered or unexported fields
}

SourceNamespaceUpdateOne is the builder for updating a single SourceNamespace entity.

func (*SourceNamespaceUpdateOne) AddNameIDs

func (snuo *SourceNamespaceUpdateOne) AddNameIDs(ids ...int) *SourceNamespaceUpdateOne

AddNameIDs adds the "names" edge to the SourceName entity by IDs.

func (*SourceNamespaceUpdateOne) AddNames

AddNames adds the "names" edges to the SourceName entity.

func (*SourceNamespaceUpdateOne) ClearNames

ClearNames clears all "names" edges to the SourceName entity.

func (*SourceNamespaceUpdateOne) ClearSourceType

func (snuo *SourceNamespaceUpdateOne) ClearSourceType() *SourceNamespaceUpdateOne

ClearSourceType clears the "source_type" edge to the SourceType entity.

func (*SourceNamespaceUpdateOne) Exec

Exec executes the query on the entity.

func (*SourceNamespaceUpdateOne) ExecX

func (snuo *SourceNamespaceUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SourceNamespaceUpdateOne) Mutation

Mutation returns the SourceNamespaceMutation object of the builder.

func (*SourceNamespaceUpdateOne) RemoveNameIDs

func (snuo *SourceNamespaceUpdateOne) RemoveNameIDs(ids ...int) *SourceNamespaceUpdateOne

RemoveNameIDs removes the "names" edge to SourceName entities by IDs.

func (*SourceNamespaceUpdateOne) RemoveNames

RemoveNames removes "names" edges to SourceName entities.

func (*SourceNamespaceUpdateOne) Save

Save executes the query and returns the updated SourceNamespace entity.

func (*SourceNamespaceUpdateOne) SaveX

SaveX is like Save, but panics if an error occurs.

func (*SourceNamespaceUpdateOne) Select

func (snuo *SourceNamespaceUpdateOne) Select(field string, fields ...string) *SourceNamespaceUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*SourceNamespaceUpdateOne) SetNamespace

SetNamespace sets the "namespace" field.

func (*SourceNamespaceUpdateOne) SetSourceID

SetSourceID sets the "source_id" field.

func (*SourceNamespaceUpdateOne) SetSourceType

SetSourceType sets the "source_type" edge to the SourceType entity.

func (*SourceNamespaceUpdateOne) SetSourceTypeID

func (snuo *SourceNamespaceUpdateOne) SetSourceTypeID(id int) *SourceNamespaceUpdateOne

SetSourceTypeID sets the "source_type" edge to the SourceType entity by ID.

func (*SourceNamespaceUpdateOne) Where

Where appends a list predicates to the SourceNamespaceUpdate builder.

type SourceNamespaceUpsert

type SourceNamespaceUpsert struct {
	*sql.UpdateSet
}

SourceNamespaceUpsert is the "OnConflict" setter.

func (*SourceNamespaceUpsert) SetNamespace

SetNamespace sets the "namespace" field.

func (*SourceNamespaceUpsert) SetSourceID

func (u *SourceNamespaceUpsert) SetSourceID(v int) *SourceNamespaceUpsert

SetSourceID sets the "source_id" field.

func (*SourceNamespaceUpsert) UpdateNamespace

func (u *SourceNamespaceUpsert) UpdateNamespace() *SourceNamespaceUpsert

UpdateNamespace sets the "namespace" field to the value that was provided on create.

func (*SourceNamespaceUpsert) UpdateSourceID

func (u *SourceNamespaceUpsert) UpdateSourceID() *SourceNamespaceUpsert

UpdateSourceID sets the "source_id" field to the value that was provided on create.

type SourceNamespaceUpsertBulk

type SourceNamespaceUpsertBulk struct {
	// contains filtered or unexported fields
}

SourceNamespaceUpsertBulk is the builder for "upsert"-ing a bulk of SourceNamespace nodes.

func (*SourceNamespaceUpsertBulk) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*SourceNamespaceUpsertBulk) Exec

Exec executes the query.

func (*SourceNamespaceUpsertBulk) ExecX

ExecX is like Exec, but panics if an error occurs.

func (*SourceNamespaceUpsertBulk) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.SourceNamespace.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*SourceNamespaceUpsertBulk) SetNamespace

SetNamespace sets the "namespace" field.

func (*SourceNamespaceUpsertBulk) SetSourceID

SetSourceID sets the "source_id" field.

func (*SourceNamespaceUpsertBulk) Update

Update allows overriding fields `UPDATE` values. See the SourceNamespaceCreateBulk.OnConflict documentation for more info.

func (*SourceNamespaceUpsertBulk) UpdateNamespace

UpdateNamespace sets the "namespace" field to the value that was provided on create.

func (*SourceNamespaceUpsertBulk) UpdateNewValues

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.SourceNamespace.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	Exec(ctx)

func (*SourceNamespaceUpsertBulk) UpdateSourceID

UpdateSourceID sets the "source_id" field to the value that was provided on create.

type SourceNamespaceUpsertOne

type SourceNamespaceUpsertOne struct {
	// contains filtered or unexported fields
}

SourceNamespaceUpsertOne is the builder for "upsert"-ing

one SourceNamespace node.

func (*SourceNamespaceUpsertOne) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*SourceNamespaceUpsertOne) Exec

Exec executes the query.

func (*SourceNamespaceUpsertOne) ExecX

ExecX is like Exec, but panics if an error occurs.

func (*SourceNamespaceUpsertOne) ID

func (u *SourceNamespaceUpsertOne) ID(ctx context.Context) (id int, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*SourceNamespaceUpsertOne) IDX

IDX is like ID, but panics if an error occurs.

func (*SourceNamespaceUpsertOne) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.SourceNamespace.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*SourceNamespaceUpsertOne) SetNamespace

SetNamespace sets the "namespace" field.

func (*SourceNamespaceUpsertOne) SetSourceID

SetSourceID sets the "source_id" field.

func (*SourceNamespaceUpsertOne) Update

Update allows overriding fields `UPDATE` values. See the SourceNamespaceCreate.OnConflict documentation for more info.

func (*SourceNamespaceUpsertOne) UpdateNamespace

func (u *SourceNamespaceUpsertOne) UpdateNamespace() *SourceNamespaceUpsertOne

UpdateNamespace sets the "namespace" field to the value that was provided on create.

func (*SourceNamespaceUpsertOne) UpdateNewValues

func (u *SourceNamespaceUpsertOne) UpdateNewValues() *SourceNamespaceUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.SourceNamespace.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	Exec(ctx)

func (*SourceNamespaceUpsertOne) UpdateSourceID

UpdateSourceID sets the "source_id" field to the value that was provided on create.

type SourceNamespaces

type SourceNamespaces []*SourceNamespace

SourceNamespaces is a parsable slice of SourceNamespace.

type SourceType

type SourceType struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// Type holds the value of the "type" field.
	Type string `json:"type,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the SourceTypeQuery when eager-loading is set.
	Edges SourceTypeEdges `json:"edges"`
	// contains filtered or unexported fields
}

SourceType is the model entity for the SourceType schema.

func (*SourceType) IsNode

func (n *SourceType) IsNode()

IsNode implements the Node interface check for GQLGen.

func (*SourceType) NamedNamespaces

func (st *SourceType) NamedNamespaces(name string) ([]*SourceNamespace, error)

NamedNamespaces returns the Namespaces named value or an error if the edge was not loaded in eager-loading with this name.

func (*SourceType) Namespaces

func (st *SourceType) Namespaces(ctx context.Context) (result []*SourceNamespace, err error)

func (*SourceType) QueryNamespaces

func (st *SourceType) QueryNamespaces() *SourceNamespaceQuery

QueryNamespaces queries the "namespaces" edge of the SourceType entity.

func (*SourceType) String

func (st *SourceType) String() string

String implements the fmt.Stringer.

func (*SourceType) ToEdge

func (st *SourceType) ToEdge(order *SourceTypeOrder) *SourceTypeEdge

ToEdge converts SourceType into SourceTypeEdge.

func (*SourceType) Unwrap

func (st *SourceType) Unwrap() *SourceType

Unwrap unwraps the SourceType 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 (*SourceType) Update

func (st *SourceType) Update() *SourceTypeUpdateOne

Update returns a builder for updating this SourceType. Note that you need to call SourceType.Unwrap() before calling this method if this SourceType was returned from a transaction, and the transaction was committed or rolled back.

func (*SourceType) Value

func (st *SourceType) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the SourceType. This includes values selected through modifiers, order, etc.

type SourceTypeClient

type SourceTypeClient struct {
	// contains filtered or unexported fields
}

SourceTypeClient is a client for the SourceType schema.

func NewSourceTypeClient

func NewSourceTypeClient(c config) *SourceTypeClient

NewSourceTypeClient returns a client for the SourceType from the given config.

func (*SourceTypeClient) Create

func (c *SourceTypeClient) Create() *SourceTypeCreate

Create returns a builder for creating a SourceType entity.

func (*SourceTypeClient) CreateBulk

func (c *SourceTypeClient) CreateBulk(builders ...*SourceTypeCreate) *SourceTypeCreateBulk

CreateBulk returns a builder for creating a bulk of SourceType entities.

func (*SourceTypeClient) Delete

func (c *SourceTypeClient) Delete() *SourceTypeDelete

Delete returns a delete builder for SourceType.

func (*SourceTypeClient) DeleteOne

func (c *SourceTypeClient) DeleteOne(st *SourceType) *SourceTypeDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*SourceTypeClient) DeleteOneID

func (c *SourceTypeClient) DeleteOneID(id int) *SourceTypeDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*SourceTypeClient) Get

func (c *SourceTypeClient) Get(ctx context.Context, id int) (*SourceType, error)

Get returns a SourceType entity by its id.

func (*SourceTypeClient) GetX

func (c *SourceTypeClient) GetX(ctx context.Context, id int) *SourceType

GetX is like Get, but panics if an error occurs.

func (*SourceTypeClient) Hooks

func (c *SourceTypeClient) Hooks() []Hook

Hooks returns the client hooks.

func (*SourceTypeClient) Intercept

func (c *SourceTypeClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `sourcetype.Intercept(f(g(h())))`.

func (*SourceTypeClient) Interceptors

func (c *SourceTypeClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*SourceTypeClient) MapCreateBulk

func (c *SourceTypeClient) MapCreateBulk(slice any, setFunc func(*SourceTypeCreate, int)) *SourceTypeCreateBulk

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 (*SourceTypeClient) Query

func (c *SourceTypeClient) Query() *SourceTypeQuery

Query returns a query builder for SourceType.

func (*SourceTypeClient) QueryNamespaces

func (c *SourceTypeClient) QueryNamespaces(st *SourceType) *SourceNamespaceQuery

QueryNamespaces queries the namespaces edge of a SourceType.

func (*SourceTypeClient) Update

func (c *SourceTypeClient) Update() *SourceTypeUpdate

Update returns an update builder for SourceType.

func (*SourceTypeClient) UpdateOne

func (c *SourceTypeClient) UpdateOne(st *SourceType) *SourceTypeUpdateOne

UpdateOne returns an update builder for the given entity.

func (*SourceTypeClient) UpdateOneID

func (c *SourceTypeClient) UpdateOneID(id int) *SourceTypeUpdateOne

UpdateOneID returns an update builder for the given id.

func (*SourceTypeClient) Use

func (c *SourceTypeClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `sourcetype.Hooks(f(g(h())))`.

type SourceTypeConnection

type SourceTypeConnection struct {
	Edges      []*SourceTypeEdge `json:"edges"`
	PageInfo   PageInfo          `json:"pageInfo"`
	TotalCount int               `json:"totalCount"`
}

SourceTypeConnection is the connection containing edges to SourceType.

type SourceTypeCreate

type SourceTypeCreate struct {
	// contains filtered or unexported fields
}

SourceTypeCreate is the builder for creating a SourceType entity.

func (*SourceTypeCreate) AddNamespaceIDs

func (stc *SourceTypeCreate) AddNamespaceIDs(ids ...int) *SourceTypeCreate

AddNamespaceIDs adds the "namespaces" edge to the SourceNamespace entity by IDs.

func (*SourceTypeCreate) AddNamespaces

func (stc *SourceTypeCreate) AddNamespaces(s ...*SourceNamespace) *SourceTypeCreate

AddNamespaces adds the "namespaces" edges to the SourceNamespace entity.

func (*SourceTypeCreate) Exec

func (stc *SourceTypeCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*SourceTypeCreate) ExecX

func (stc *SourceTypeCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SourceTypeCreate) Mutation

func (stc *SourceTypeCreate) Mutation() *SourceTypeMutation

Mutation returns the SourceTypeMutation object of the builder.

func (*SourceTypeCreate) OnConflict

func (stc *SourceTypeCreate) OnConflict(opts ...sql.ConflictOption) *SourceTypeUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.SourceType.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.SourceTypeUpsert) {
		SetType(v+v).
	}).
	Exec(ctx)

func (*SourceTypeCreate) OnConflictColumns

func (stc *SourceTypeCreate) OnConflictColumns(columns ...string) *SourceTypeUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.SourceType.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*SourceTypeCreate) Save

func (stc *SourceTypeCreate) Save(ctx context.Context) (*SourceType, error)

Save creates the SourceType in the database.

func (*SourceTypeCreate) SaveX

func (stc *SourceTypeCreate) SaveX(ctx context.Context) *SourceType

SaveX calls Save and panics if Save returns an error.

func (*SourceTypeCreate) SetType

func (stc *SourceTypeCreate) SetType(s string) *SourceTypeCreate

SetType sets the "type" field.

type SourceTypeCreateBulk

type SourceTypeCreateBulk struct {
	// contains filtered or unexported fields
}

SourceTypeCreateBulk is the builder for creating many SourceType entities in bulk.

func (*SourceTypeCreateBulk) Exec

func (stcb *SourceTypeCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*SourceTypeCreateBulk) ExecX

func (stcb *SourceTypeCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SourceTypeCreateBulk) OnConflict

func (stcb *SourceTypeCreateBulk) OnConflict(opts ...sql.ConflictOption) *SourceTypeUpsertBulk

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.SourceType.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.SourceTypeUpsert) {
		SetType(v+v).
	}).
	Exec(ctx)

func (*SourceTypeCreateBulk) OnConflictColumns

func (stcb *SourceTypeCreateBulk) OnConflictColumns(columns ...string) *SourceTypeUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.SourceType.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*SourceTypeCreateBulk) Save

func (stcb *SourceTypeCreateBulk) Save(ctx context.Context) ([]*SourceType, error)

Save creates the SourceType entities in the database.

func (*SourceTypeCreateBulk) SaveX

func (stcb *SourceTypeCreateBulk) SaveX(ctx context.Context) []*SourceType

SaveX is like Save, but panics if an error occurs.

type SourceTypeDelete

type SourceTypeDelete struct {
	// contains filtered or unexported fields
}

SourceTypeDelete is the builder for deleting a SourceType entity.

func (*SourceTypeDelete) Exec

func (std *SourceTypeDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*SourceTypeDelete) ExecX

func (std *SourceTypeDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*SourceTypeDelete) Where

Where appends a list predicates to the SourceTypeDelete builder.

type SourceTypeDeleteOne

type SourceTypeDeleteOne struct {
	// contains filtered or unexported fields
}

SourceTypeDeleteOne is the builder for deleting a single SourceType entity.

func (*SourceTypeDeleteOne) Exec

func (stdo *SourceTypeDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*SourceTypeDeleteOne) ExecX

func (stdo *SourceTypeDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SourceTypeDeleteOne) Where

Where appends a list predicates to the SourceTypeDelete builder.

type SourceTypeEdge

type SourceTypeEdge struct {
	Node   *SourceType `json:"node"`
	Cursor Cursor      `json:"cursor"`
}

SourceTypeEdge is the edge representation of SourceType.

type SourceTypeEdges

type SourceTypeEdges struct {
	// Namespaces holds the value of the namespaces edge.
	Namespaces []*SourceNamespace `json:"namespaces,omitempty"`
	// contains filtered or unexported fields
}

SourceTypeEdges holds the relations/edges for other nodes in the graph.

func (SourceTypeEdges) NamespacesOrErr

func (e SourceTypeEdges) NamespacesOrErr() ([]*SourceNamespace, error)

NamespacesOrErr returns the Namespaces value or an error if the edge was not loaded in eager-loading.

type SourceTypeGroupBy

type SourceTypeGroupBy struct {
	// contains filtered or unexported fields
}

SourceTypeGroupBy is the group-by builder for SourceType entities.

func (*SourceTypeGroupBy) Aggregate

func (stgb *SourceTypeGroupBy) Aggregate(fns ...AggregateFunc) *SourceTypeGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*SourceTypeGroupBy) Bool

func (s *SourceTypeGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*SourceTypeGroupBy) BoolX

func (s *SourceTypeGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*SourceTypeGroupBy) Bools

func (s *SourceTypeGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*SourceTypeGroupBy) BoolsX

func (s *SourceTypeGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*SourceTypeGroupBy) Float64

func (s *SourceTypeGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*SourceTypeGroupBy) Float64X

func (s *SourceTypeGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*SourceTypeGroupBy) Float64s

func (s *SourceTypeGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*SourceTypeGroupBy) Float64sX

func (s *SourceTypeGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*SourceTypeGroupBy) Int

func (s *SourceTypeGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*SourceTypeGroupBy) IntX

func (s *SourceTypeGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*SourceTypeGroupBy) Ints

func (s *SourceTypeGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*SourceTypeGroupBy) IntsX

func (s *SourceTypeGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*SourceTypeGroupBy) Scan

func (stgb *SourceTypeGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*SourceTypeGroupBy) ScanX

func (s *SourceTypeGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*SourceTypeGroupBy) String

func (s *SourceTypeGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*SourceTypeGroupBy) StringX

func (s *SourceTypeGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*SourceTypeGroupBy) Strings

func (s *SourceTypeGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*SourceTypeGroupBy) StringsX

func (s *SourceTypeGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type SourceTypeMutation

type SourceTypeMutation struct {
	// contains filtered or unexported fields
}

SourceTypeMutation represents an operation that mutates the SourceType nodes in the graph.

func (*SourceTypeMutation) AddField

func (m *SourceTypeMutation) 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 (*SourceTypeMutation) AddNamespaceIDs

func (m *SourceTypeMutation) AddNamespaceIDs(ids ...int)

AddNamespaceIDs adds the "namespaces" edge to the SourceNamespace entity by ids.

func (*SourceTypeMutation) AddedEdges

func (m *SourceTypeMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*SourceTypeMutation) AddedField

func (m *SourceTypeMutation) 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 (*SourceTypeMutation) AddedFields

func (m *SourceTypeMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*SourceTypeMutation) AddedIDs

func (m *SourceTypeMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*SourceTypeMutation) ClearEdge

func (m *SourceTypeMutation) 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 (*SourceTypeMutation) ClearField

func (m *SourceTypeMutation) 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 (*SourceTypeMutation) ClearNamespaces

func (m *SourceTypeMutation) ClearNamespaces()

ClearNamespaces clears the "namespaces" edge to the SourceNamespace entity.

func (*SourceTypeMutation) ClearedEdges

func (m *SourceTypeMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*SourceTypeMutation) ClearedFields

func (m *SourceTypeMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (SourceTypeMutation) Client

func (m SourceTypeMutation) 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 (*SourceTypeMutation) EdgeCleared

func (m *SourceTypeMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*SourceTypeMutation) Field

func (m *SourceTypeMutation) 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 (*SourceTypeMutation) FieldCleared

func (m *SourceTypeMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*SourceTypeMutation) Fields

func (m *SourceTypeMutation) 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 (*SourceTypeMutation) GetType

func (m *SourceTypeMutation) GetType() (r string, exists bool)

GetType returns the value of the "type" field in the mutation.

func (*SourceTypeMutation) ID

func (m *SourceTypeMutation) ID() (id int, 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 (*SourceTypeMutation) IDs

func (m *SourceTypeMutation) IDs(ctx context.Context) ([]int, 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 (*SourceTypeMutation) NamespacesCleared

func (m *SourceTypeMutation) NamespacesCleared() bool

NamespacesCleared reports if the "namespaces" edge to the SourceNamespace entity was cleared.

func (*SourceTypeMutation) NamespacesIDs

func (m *SourceTypeMutation) NamespacesIDs() (ids []int)

NamespacesIDs returns the "namespaces" edge IDs in the mutation.

func (*SourceTypeMutation) OldField

func (m *SourceTypeMutation) 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 (*SourceTypeMutation) OldType

func (m *SourceTypeMutation) OldType(ctx context.Context) (v string, err error)

OldType returns the old "type" field's value of the SourceType entity. If the SourceType 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 (*SourceTypeMutation) Op

func (m *SourceTypeMutation) Op() Op

Op returns the operation name.

func (*SourceTypeMutation) RemoveNamespaceIDs

func (m *SourceTypeMutation) RemoveNamespaceIDs(ids ...int)

RemoveNamespaceIDs removes the "namespaces" edge to the SourceNamespace entity by IDs.

func (*SourceTypeMutation) RemovedEdges

func (m *SourceTypeMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*SourceTypeMutation) RemovedIDs

func (m *SourceTypeMutation) 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 (*SourceTypeMutation) RemovedNamespacesIDs

func (m *SourceTypeMutation) RemovedNamespacesIDs() (ids []int)

RemovedNamespaces returns the removed IDs of the "namespaces" edge to the SourceNamespace entity.

func (*SourceTypeMutation) ResetEdge

func (m *SourceTypeMutation) 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 (*SourceTypeMutation) ResetField

func (m *SourceTypeMutation) 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 (*SourceTypeMutation) ResetNamespaces

func (m *SourceTypeMutation) ResetNamespaces()

ResetNamespaces resets all changes to the "namespaces" edge.

func (*SourceTypeMutation) ResetType

func (m *SourceTypeMutation) ResetType()

ResetType resets all changes to the "type" field.

func (*SourceTypeMutation) SetField

func (m *SourceTypeMutation) 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 (*SourceTypeMutation) SetOp

func (m *SourceTypeMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*SourceTypeMutation) SetType

func (m *SourceTypeMutation) SetType(s string)

SetType sets the "type" field.

func (SourceTypeMutation) Tx

func (m SourceTypeMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*SourceTypeMutation) Type

func (m *SourceTypeMutation) Type() string

Type returns the node type of this mutation (SourceType).

func (*SourceTypeMutation) Where

func (m *SourceTypeMutation) Where(ps ...predicate.SourceType)

Where appends a list predicates to the SourceTypeMutation builder.

func (*SourceTypeMutation) WhereP

func (m *SourceTypeMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the SourceTypeMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type SourceTypeOrder

type SourceTypeOrder struct {
	Direction OrderDirection        `json:"direction"`
	Field     *SourceTypeOrderField `json:"field"`
}

SourceTypeOrder defines the ordering of SourceType.

type SourceTypeOrderField

type SourceTypeOrderField struct {
	// Value extracts the ordering value from the given SourceType.
	Value func(*SourceType) (ent.Value, error)
	// contains filtered or unexported fields
}

SourceTypeOrderField defines the ordering field of SourceType.

type SourceTypePaginateOption

type SourceTypePaginateOption func(*sourcetypePager) error

SourceTypePaginateOption enables pagination customization.

func WithSourceTypeFilter

func WithSourceTypeFilter(filter func(*SourceTypeQuery) (*SourceTypeQuery, error)) SourceTypePaginateOption

WithSourceTypeFilter configures pagination filter.

func WithSourceTypeOrder

func WithSourceTypeOrder(order *SourceTypeOrder) SourceTypePaginateOption

WithSourceTypeOrder configures pagination ordering.

type SourceTypeQuery

type SourceTypeQuery struct {
	// contains filtered or unexported fields
}

SourceTypeQuery is the builder for querying SourceType entities.

func (*SourceTypeQuery) Aggregate

func (stq *SourceTypeQuery) Aggregate(fns ...AggregateFunc) *SourceTypeSelect

Aggregate returns a SourceTypeSelect configured with the given aggregations.

func (*SourceTypeQuery) All

func (stq *SourceTypeQuery) All(ctx context.Context) ([]*SourceType, error)

All executes the query and returns a list of SourceTypes.

func (*SourceTypeQuery) AllX

func (stq *SourceTypeQuery) AllX(ctx context.Context) []*SourceType

AllX is like All, but panics if an error occurs.

func (*SourceTypeQuery) Clone

func (stq *SourceTypeQuery) Clone() *SourceTypeQuery

Clone returns a duplicate of the SourceTypeQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*SourceTypeQuery) CollectFields

func (st *SourceTypeQuery) CollectFields(ctx context.Context, satisfies ...string) (*SourceTypeQuery, error)

CollectFields tells the query-builder to eagerly load connected nodes by resolver context.

func (*SourceTypeQuery) Count

func (stq *SourceTypeQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*SourceTypeQuery) CountX

func (stq *SourceTypeQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*SourceTypeQuery) Exist

func (stq *SourceTypeQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*SourceTypeQuery) ExistX

func (stq *SourceTypeQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*SourceTypeQuery) First

func (stq *SourceTypeQuery) First(ctx context.Context) (*SourceType, error)

First returns the first SourceType entity from the query. Returns a *NotFoundError when no SourceType was found.

func (*SourceTypeQuery) FirstID

func (stq *SourceTypeQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first SourceType ID from the query. Returns a *NotFoundError when no SourceType ID was found.

func (*SourceTypeQuery) FirstIDX

func (stq *SourceTypeQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*SourceTypeQuery) FirstX

func (stq *SourceTypeQuery) FirstX(ctx context.Context) *SourceType

FirstX is like First, but panics if an error occurs.

func (*SourceTypeQuery) GroupBy

func (stq *SourceTypeQuery) GroupBy(field string, fields ...string) *SourceTypeGroupBy

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.SourceType.Query().
	GroupBy(sourcetype.FieldType).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*SourceTypeQuery) IDs

func (stq *SourceTypeQuery) IDs(ctx context.Context) (ids []int, err error)

IDs executes the query and returns a list of SourceType IDs.

func (*SourceTypeQuery) IDsX

func (stq *SourceTypeQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*SourceTypeQuery) Limit

func (stq *SourceTypeQuery) Limit(limit int) *SourceTypeQuery

Limit the number of records to be returned by this query.

func (*SourceTypeQuery) Offset

func (stq *SourceTypeQuery) Offset(offset int) *SourceTypeQuery

Offset to start from.

func (*SourceTypeQuery) Only

func (stq *SourceTypeQuery) Only(ctx context.Context) (*SourceType, error)

Only returns a single SourceType entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one SourceType entity is found. Returns a *NotFoundError when no SourceType entities are found.

func (*SourceTypeQuery) OnlyID

func (stq *SourceTypeQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only SourceType ID in the query. Returns a *NotSingularError when more than one SourceType ID is found. Returns a *NotFoundError when no entities are found.

func (*SourceTypeQuery) OnlyIDX

func (stq *SourceTypeQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*SourceTypeQuery) OnlyX

func (stq *SourceTypeQuery) OnlyX(ctx context.Context) *SourceType

OnlyX is like Only, but panics if an error occurs.

func (*SourceTypeQuery) Order

Order specifies how the records should be ordered.

func (*SourceTypeQuery) Paginate

func (st *SourceTypeQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...SourceTypePaginateOption,
) (*SourceTypeConnection, error)

Paginate executes the query and returns a relay based cursor connection to SourceType.

func (*SourceTypeQuery) QueryNamespaces

func (stq *SourceTypeQuery) QueryNamespaces() *SourceNamespaceQuery

QueryNamespaces chains the current query on the "namespaces" edge.

func (*SourceTypeQuery) Select

func (stq *SourceTypeQuery) Select(fields ...string) *SourceTypeSelect

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.SourceType.Query().
	Select(sourcetype.FieldType).
	Scan(ctx, &v)

func (*SourceTypeQuery) Unique

func (stq *SourceTypeQuery) Unique(unique bool) *SourceTypeQuery

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 (*SourceTypeQuery) Where

Where adds a new predicate for the SourceTypeQuery builder.

func (*SourceTypeQuery) WithNamedNamespaces

func (stq *SourceTypeQuery) WithNamedNamespaces(name string, opts ...func(*SourceNamespaceQuery)) *SourceTypeQuery

WithNamedNamespaces tells the query-builder to eager-load the nodes that are connected to the "namespaces" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*SourceTypeQuery) WithNamespaces

func (stq *SourceTypeQuery) WithNamespaces(opts ...func(*SourceNamespaceQuery)) *SourceTypeQuery

WithNamespaces tells the query-builder to eager-load the nodes that are connected to the "namespaces" edge. The optional arguments are used to configure the query builder of the edge.

type SourceTypeSelect

type SourceTypeSelect struct {
	*SourceTypeQuery
	// contains filtered or unexported fields
}

SourceTypeSelect is the builder for selecting fields of SourceType entities.

func (*SourceTypeSelect) Aggregate

func (sts *SourceTypeSelect) Aggregate(fns ...AggregateFunc) *SourceTypeSelect

Aggregate adds the given aggregation functions to the selector query.

func (*SourceTypeSelect) Bool

func (s *SourceTypeSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*SourceTypeSelect) BoolX

func (s *SourceTypeSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*SourceTypeSelect) Bools

func (s *SourceTypeSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*SourceTypeSelect) BoolsX

func (s *SourceTypeSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*SourceTypeSelect) Float64

func (s *SourceTypeSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*SourceTypeSelect) Float64X

func (s *SourceTypeSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*SourceTypeSelect) Float64s

func (s *SourceTypeSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*SourceTypeSelect) Float64sX

func (s *SourceTypeSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*SourceTypeSelect) Int

func (s *SourceTypeSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*SourceTypeSelect) IntX

func (s *SourceTypeSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*SourceTypeSelect) Ints

func (s *SourceTypeSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*SourceTypeSelect) IntsX

func (s *SourceTypeSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*SourceTypeSelect) Scan

func (sts *SourceTypeSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*SourceTypeSelect) ScanX

func (s *SourceTypeSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*SourceTypeSelect) String

func (s *SourceTypeSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*SourceTypeSelect) StringX

func (s *SourceTypeSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*SourceTypeSelect) Strings

func (s *SourceTypeSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*SourceTypeSelect) StringsX

func (s *SourceTypeSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type SourceTypeUpdate

type SourceTypeUpdate struct {
	// contains filtered or unexported fields
}

SourceTypeUpdate is the builder for updating SourceType entities.

func (*SourceTypeUpdate) AddNamespaceIDs

func (stu *SourceTypeUpdate) AddNamespaceIDs(ids ...int) *SourceTypeUpdate

AddNamespaceIDs adds the "namespaces" edge to the SourceNamespace entity by IDs.

func (*SourceTypeUpdate) AddNamespaces

func (stu *SourceTypeUpdate) AddNamespaces(s ...*SourceNamespace) *SourceTypeUpdate

AddNamespaces adds the "namespaces" edges to the SourceNamespace entity.

func (*SourceTypeUpdate) ClearNamespaces

func (stu *SourceTypeUpdate) ClearNamespaces() *SourceTypeUpdate

ClearNamespaces clears all "namespaces" edges to the SourceNamespace entity.

func (*SourceTypeUpdate) Exec

func (stu *SourceTypeUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*SourceTypeUpdate) ExecX

func (stu *SourceTypeUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SourceTypeUpdate) Mutation

func (stu *SourceTypeUpdate) Mutation() *SourceTypeMutation

Mutation returns the SourceTypeMutation object of the builder.

func (*SourceTypeUpdate) RemoveNamespaceIDs

func (stu *SourceTypeUpdate) RemoveNamespaceIDs(ids ...int) *SourceTypeUpdate

RemoveNamespaceIDs removes the "namespaces" edge to SourceNamespace entities by IDs.

func (*SourceTypeUpdate) RemoveNamespaces

func (stu *SourceTypeUpdate) RemoveNamespaces(s ...*SourceNamespace) *SourceTypeUpdate

RemoveNamespaces removes "namespaces" edges to SourceNamespace entities.

func (*SourceTypeUpdate) Save

func (stu *SourceTypeUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*SourceTypeUpdate) SaveX

func (stu *SourceTypeUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*SourceTypeUpdate) SetType

func (stu *SourceTypeUpdate) SetType(s string) *SourceTypeUpdate

SetType sets the "type" field.

func (*SourceTypeUpdate) Where

Where appends a list predicates to the SourceTypeUpdate builder.

type SourceTypeUpdateOne

type SourceTypeUpdateOne struct {
	// contains filtered or unexported fields
}

SourceTypeUpdateOne is the builder for updating a single SourceType entity.

func (*SourceTypeUpdateOne) AddNamespaceIDs

func (stuo *SourceTypeUpdateOne) AddNamespaceIDs(ids ...int) *SourceTypeUpdateOne

AddNamespaceIDs adds the "namespaces" edge to the SourceNamespace entity by IDs.

func (*SourceTypeUpdateOne) AddNamespaces

func (stuo *SourceTypeUpdateOne) AddNamespaces(s ...*SourceNamespace) *SourceTypeUpdateOne

AddNamespaces adds the "namespaces" edges to the SourceNamespace entity.

func (*SourceTypeUpdateOne) ClearNamespaces

func (stuo *SourceTypeUpdateOne) ClearNamespaces() *SourceTypeUpdateOne

ClearNamespaces clears all "namespaces" edges to the SourceNamespace entity.

func (*SourceTypeUpdateOne) Exec

func (stuo *SourceTypeUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*SourceTypeUpdateOne) ExecX

func (stuo *SourceTypeUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SourceTypeUpdateOne) Mutation

func (stuo *SourceTypeUpdateOne) Mutation() *SourceTypeMutation

Mutation returns the SourceTypeMutation object of the builder.

func (*SourceTypeUpdateOne) RemoveNamespaceIDs

func (stuo *SourceTypeUpdateOne) RemoveNamespaceIDs(ids ...int) *SourceTypeUpdateOne

RemoveNamespaceIDs removes the "namespaces" edge to SourceNamespace entities by IDs.

func (*SourceTypeUpdateOne) RemoveNamespaces

func (stuo *SourceTypeUpdateOne) RemoveNamespaces(s ...*SourceNamespace) *SourceTypeUpdateOne

RemoveNamespaces removes "namespaces" edges to SourceNamespace entities.

func (*SourceTypeUpdateOne) Save

func (stuo *SourceTypeUpdateOne) Save(ctx context.Context) (*SourceType, error)

Save executes the query and returns the updated SourceType entity.

func (*SourceTypeUpdateOne) SaveX

func (stuo *SourceTypeUpdateOne) SaveX(ctx context.Context) *SourceType

SaveX is like Save, but panics if an error occurs.

func (*SourceTypeUpdateOne) Select

func (stuo *SourceTypeUpdateOne) Select(field string, fields ...string) *SourceTypeUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*SourceTypeUpdateOne) SetType

SetType sets the "type" field.

func (*SourceTypeUpdateOne) Where

Where appends a list predicates to the SourceTypeUpdate builder.

type SourceTypeUpsert

type SourceTypeUpsert struct {
	*sql.UpdateSet
}

SourceTypeUpsert is the "OnConflict" setter.

func (*SourceTypeUpsert) SetType

func (u *SourceTypeUpsert) SetType(v string) *SourceTypeUpsert

SetType sets the "type" field.

func (*SourceTypeUpsert) UpdateType

func (u *SourceTypeUpsert) UpdateType() *SourceTypeUpsert

UpdateType sets the "type" field to the value that was provided on create.

type SourceTypeUpsertBulk

type SourceTypeUpsertBulk struct {
	// contains filtered or unexported fields
}

SourceTypeUpsertBulk is the builder for "upsert"-ing a bulk of SourceType nodes.

func (*SourceTypeUpsertBulk) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*SourceTypeUpsertBulk) Exec

Exec executes the query.

func (*SourceTypeUpsertBulk) ExecX

func (u *SourceTypeUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SourceTypeUpsertBulk) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.SourceType.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*SourceTypeUpsertBulk) SetType

SetType sets the "type" field.

func (*SourceTypeUpsertBulk) Update

Update allows overriding fields `UPDATE` values. See the SourceTypeCreateBulk.OnConflict documentation for more info.

func (*SourceTypeUpsertBulk) UpdateNewValues

func (u *SourceTypeUpsertBulk) UpdateNewValues() *SourceTypeUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.SourceType.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	Exec(ctx)

func (*SourceTypeUpsertBulk) UpdateType

func (u *SourceTypeUpsertBulk) UpdateType() *SourceTypeUpsertBulk

UpdateType sets the "type" field to the value that was provided on create.

type SourceTypeUpsertOne

type SourceTypeUpsertOne struct {
	// contains filtered or unexported fields
}

SourceTypeUpsertOne is the builder for "upsert"-ing

one SourceType node.

func (*SourceTypeUpsertOne) DoNothing

func (u *SourceTypeUpsertOne) DoNothing() *SourceTypeUpsertOne

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*SourceTypeUpsertOne) Exec

Exec executes the query.

func (*SourceTypeUpsertOne) ExecX

func (u *SourceTypeUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SourceTypeUpsertOne) ID

func (u *SourceTypeUpsertOne) ID(ctx context.Context) (id int, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*SourceTypeUpsertOne) IDX

func (u *SourceTypeUpsertOne) IDX(ctx context.Context) int

IDX is like ID, but panics if an error occurs.

func (*SourceTypeUpsertOne) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.SourceType.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*SourceTypeUpsertOne) SetType

SetType sets the "type" field.

func (*SourceTypeUpsertOne) Update

Update allows overriding fields `UPDATE` values. See the SourceTypeCreate.OnConflict documentation for more info.

func (*SourceTypeUpsertOne) UpdateNewValues

func (u *SourceTypeUpsertOne) UpdateNewValues() *SourceTypeUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.SourceType.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	Exec(ctx)

func (*SourceTypeUpsertOne) UpdateType

func (u *SourceTypeUpsertOne) UpdateType() *SourceTypeUpsertOne

UpdateType sets the "type" field to the value that was provided on create.

type SourceTypes

type SourceTypes []*SourceType

SourceTypes is a parsable slice of SourceType.

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
	// IsVulnerability is the client for interacting with the IsVulnerability builders.
	IsVulnerability *IsVulnerabilityClient
	// 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
	// PackageNamespace is the client for interacting with the PackageNamespace builders.
	PackageNamespace *PackageNamespaceClient
	// PackageType is the client for interacting with the PackageType builders.
	PackageType *PackageTypeClient
	// 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
	// Scorecard is the client for interacting with the Scorecard builders.
	Scorecard *ScorecardClient
	// SourceName is the client for interacting with the SourceName builders.
	SourceName *SourceNameClient
	// SourceNamespace is the client for interacting with the SourceNamespace builders.
	SourceNamespace *SourceNamespaceClient
	// SourceType is the client for interacting with the SourceType builders.
	SourceType *SourceTypeClient
	// VulnEqual is the client for interacting with the VulnEqual builders.
	VulnEqual *VulnEqualClient
	// VulnerabilityID is the client for interacting with the VulnerabilityID builders.
	VulnerabilityID *VulnerabilityIDClient
	// VulnerabilityType is the client for interacting with the VulnerabilityType builders.
	VulnerabilityType *VulnerabilityTypeClient
	// 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 int `json:"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"`
	// 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) NamedVulnerabilityIds

func (ve *VulnEqual) NamedVulnerabilityIds(name string) ([]*VulnerabilityID, error)

NamedVulnerabilityIds returns the VulnerabilityIds named value or an error if the edge was not loaded in eager-loading with this name.

func (*VulnEqual) QueryVulnerabilityIds

func (ve *VulnEqual) QueryVulnerabilityIds() *VulnerabilityIDQuery

QueryVulnerabilityIds queries the "vulnerability_ids" 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) VulnerabilityIds

func (ve *VulnEqual) VulnerabilityIds(ctx context.Context) (result []*VulnerabilityID, err 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 int) *VulnEqualDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*VulnEqualClient) Get

func (c *VulnEqualClient) Get(ctx context.Context, id int) (*VulnEqual, error)

Get returns a VulnEqual entity by its id.

func (*VulnEqualClient) GetX

func (c *VulnEqualClient) GetX(ctx context.Context, id int) *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) QueryVulnerabilityIds

func (c *VulnEqualClient) QueryVulnerabilityIds(ve *VulnEqual) *VulnerabilityIDQuery

QueryVulnerabilityIds queries the vulnerability_ids 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 int) *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) AddVulnerabilityIDIDs

func (vec *VulnEqualCreate) AddVulnerabilityIDIDs(ids ...int) *VulnEqualCreate

AddVulnerabilityIDIDs adds the "vulnerability_ids" edge to the VulnerabilityID entity by IDs.

func (*VulnEqualCreate) AddVulnerabilityIds

func (vec *VulnEqualCreate) AddVulnerabilityIds(v ...*VulnerabilityID) *VulnEqualCreate

AddVulnerabilityIds adds the "vulnerability_ids" edges to the VulnerabilityID 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().
	SetJustification(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) {
		SetJustification(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) SetJustification

func (vec *VulnEqualCreate) SetJustification(s string) *VulnEqualCreate

SetJustification sets the "justification" field.

func (*VulnEqualCreate) SetOrigin

func (vec *VulnEqualCreate) SetOrigin(s string) *VulnEqualCreate

SetOrigin sets the "origin" field.

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) {
		SetJustification(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 {
	// VulnerabilityIds holds the value of the vulnerability_ids edge.
	VulnerabilityIds []*VulnerabilityID `json:"vulnerability_ids,omitempty"`
	// contains filtered or unexported fields
}

VulnEqualEdges holds the relations/edges for other nodes in the graph.

func (VulnEqualEdges) VulnerabilityIdsOrErr

func (e VulnEqualEdges) VulnerabilityIdsOrErr() ([]*VulnerabilityID, error)

VulnerabilityIdsOrErr returns the VulnerabilityIds value or an error if the edge was not loaded in eager-loading.

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) AddVulnerabilityIDIDs

func (m *VulnEqualMutation) AddVulnerabilityIDIDs(ids ...int)

AddVulnerabilityIDIDs adds the "vulnerability_ids" edge to the VulnerabilityID entity by ids.

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) ClearVulnerabilityIds

func (m *VulnEqualMutation) ClearVulnerabilityIds()

ClearVulnerabilityIds clears the "vulnerability_ids" 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) 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) 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 int, 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) ([]int, 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) 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) 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) RemoveVulnerabilityIDIDs

func (m *VulnEqualMutation) RemoveVulnerabilityIDIDs(ids ...int)

RemoveVulnerabilityIDIDs removes the "vulnerability_ids" edge to the VulnerabilityID entity by IDs.

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) RemovedVulnerabilityIdsIDs

func (m *VulnEqualMutation) RemovedVulnerabilityIdsIDs() (ids []int)

RemovedVulnerabilityIds returns the removed IDs of the "vulnerability_ids" edge to the VulnerabilityID entity.

func (*VulnEqualMutation) ResetCollector

func (m *VulnEqualMutation) ResetCollector()

ResetCollector resets all changes to the "collector" 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) 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) ResetVulnerabilityIds

func (m *VulnEqualMutation) ResetVulnerabilityIds()

ResetVulnerabilityIds resets all changes to the "vulnerability_ids" edge.

func (*VulnEqualMutation) SetCollector

func (m *VulnEqualMutation) SetCollector(s string)

SetCollector sets the "collector" 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) 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) 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) VulnerabilityIdsCleared

func (m *VulnEqualMutation) VulnerabilityIdsCleared() bool

VulnerabilityIdsCleared reports if the "vulnerability_ids" edge to the VulnerabilityID entity was cleared.

func (*VulnEqualMutation) VulnerabilityIdsIDs

func (m *VulnEqualMutation) VulnerabilityIdsIDs() (ids []int)

VulnerabilityIdsIDs returns the "vulnerability_ids" edge IDs in the mutation.

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 int, 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) int

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 {
	Justification string `json:"justification,omitempty"`
	Count int `json:"count,omitempty"`
}

client.VulnEqual.Query().
	GroupBy(vulnequal.FieldJustification).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*VulnEqualQuery) IDs

func (veq *VulnEqualQuery) IDs(ctx context.Context) (ids []int, err error)

IDs executes the query and returns a list of VulnEqual IDs.

func (*VulnEqualQuery) IDsX

func (veq *VulnEqualQuery) IDsX(ctx context.Context) []int

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 int, 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) int

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) QueryVulnerabilityIds

func (veq *VulnEqualQuery) QueryVulnerabilityIds() *VulnerabilityIDQuery

QueryVulnerabilityIds chains the current query on the "vulnerability_ids" 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 {
	Justification string `json:"justification,omitempty"`
}

client.VulnEqual.Query().
	Select(vulnequal.FieldJustification).
	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) WithNamedVulnerabilityIds

func (veq *VulnEqualQuery) WithNamedVulnerabilityIds(name string, opts ...func(*VulnerabilityIDQuery)) *VulnEqualQuery

WithNamedVulnerabilityIds tells the query-builder to eager-load the nodes that are connected to the "vulnerability_ids" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*VulnEqualQuery) WithVulnerabilityIds

func (veq *VulnEqualQuery) WithVulnerabilityIds(opts ...func(*VulnerabilityIDQuery)) *VulnEqualQuery

WithVulnerabilityIds tells the query-builder to eager-load the nodes that are connected to the "vulnerability_ids" 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) AddVulnerabilityIDIDs

func (veu *VulnEqualUpdate) AddVulnerabilityIDIDs(ids ...int) *VulnEqualUpdate

AddVulnerabilityIDIDs adds the "vulnerability_ids" edge to the VulnerabilityID entity by IDs.

func (*VulnEqualUpdate) AddVulnerabilityIds

func (veu *VulnEqualUpdate) AddVulnerabilityIds(v ...*VulnerabilityID) *VulnEqualUpdate

AddVulnerabilityIds adds the "vulnerability_ids" edges to the VulnerabilityID entity.

func (*VulnEqualUpdate) ClearVulnerabilityIds

func (veu *VulnEqualUpdate) ClearVulnerabilityIds() *VulnEqualUpdate

ClearVulnerabilityIds clears all "vulnerability_ids" edges 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) RemoveVulnerabilityIDIDs

func (veu *VulnEqualUpdate) RemoveVulnerabilityIDIDs(ids ...int) *VulnEqualUpdate

RemoveVulnerabilityIDIDs removes the "vulnerability_ids" edge to VulnerabilityID entities by IDs.

func (*VulnEqualUpdate) RemoveVulnerabilityIds

func (veu *VulnEqualUpdate) RemoveVulnerabilityIds(v ...*VulnerabilityID) *VulnEqualUpdate

RemoveVulnerabilityIds removes "vulnerability_ids" edges to VulnerabilityID entities.

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) SetJustification

func (veu *VulnEqualUpdate) SetJustification(s string) *VulnEqualUpdate

SetJustification sets the "justification" field.

func (*VulnEqualUpdate) SetOrigin

func (veu *VulnEqualUpdate) SetOrigin(s string) *VulnEqualUpdate

SetOrigin sets the "origin" field.

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) AddVulnerabilityIDIDs

func (veuo *VulnEqualUpdateOne) AddVulnerabilityIDIDs(ids ...int) *VulnEqualUpdateOne

AddVulnerabilityIDIDs adds the "vulnerability_ids" edge to the VulnerabilityID entity by IDs.

func (*VulnEqualUpdateOne) AddVulnerabilityIds

func (veuo *VulnEqualUpdateOne) AddVulnerabilityIds(v ...*VulnerabilityID) *VulnEqualUpdateOne

AddVulnerabilityIds adds the "vulnerability_ids" edges to the VulnerabilityID entity.

func (*VulnEqualUpdateOne) ClearVulnerabilityIds

func (veuo *VulnEqualUpdateOne) ClearVulnerabilityIds() *VulnEqualUpdateOne

ClearVulnerabilityIds clears all "vulnerability_ids" edges 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) RemoveVulnerabilityIDIDs

func (veuo *VulnEqualUpdateOne) RemoveVulnerabilityIDIDs(ids ...int) *VulnEqualUpdateOne

RemoveVulnerabilityIDIDs removes the "vulnerability_ids" edge to VulnerabilityID entities by IDs.

func (*VulnEqualUpdateOne) RemoveVulnerabilityIds

func (veuo *VulnEqualUpdateOne) RemoveVulnerabilityIds(v ...*VulnerabilityID) *VulnEqualUpdateOne

RemoveVulnerabilityIds removes "vulnerability_ids" edges to VulnerabilityID entities.

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) SetJustification

func (veuo *VulnEqualUpdateOne) SetJustification(s string) *VulnEqualUpdateOne

SetJustification sets the "justification" field.

func (*VulnEqualUpdateOne) SetOrigin

func (veuo *VulnEqualUpdateOne) SetOrigin(s string) *VulnEqualUpdateOne

SetOrigin sets the "origin" field.

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) 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) UpdateCollector

func (u *VulnEqualUpsert) UpdateCollector() *VulnEqualUpsert

UpdateCollector sets the "collector" 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.

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) SetJustification

func (u *VulnEqualUpsertBulk) SetJustification(v string) *VulnEqualUpsertBulk

SetJustification sets the "justification" field.

func (*VulnEqualUpsertBulk) SetOrigin

SetOrigin sets the "origin" 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) 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(),
	).
	Exec(ctx)

func (*VulnEqualUpsertBulk) UpdateOrigin

func (u *VulnEqualUpsertBulk) UpdateOrigin() *VulnEqualUpsertBulk

UpdateOrigin sets the "origin" 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 int, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*VulnEqualUpsertOne) IDX

func (u *VulnEqualUpsertOne) IDX(ctx context.Context) int

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) 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) 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) 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. Using this option is equivalent to using:

client.VulnEqual.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	Exec(ctx)

func (*VulnEqualUpsertOne) UpdateOrigin

func (u *VulnEqualUpsertOne) UpdateOrigin() *VulnEqualUpsertOne

UpdateOrigin sets the "origin" 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 int `json:"id,omitempty"`
	// ID of the vulnerability, one of OSV, GHSA, CVE, or custom
	VulnerabilityID string `json:"vulnerability_id,omitempty"`
	// TypeID holds the value of the "type_id" field.
	TypeID int `json:"type_id,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) IsNode

func (n *VulnerabilityID) IsNode()

IsNode implements the Node interface check for GQLGen.

func (*VulnerabilityID) NamedVulnEquals

func (vi *VulnerabilityID) NamedVulnEquals(name string) ([]*VulnEqual, error)

NamedVulnEquals returns the VulnEquals named value or an error if the edge was not loaded in eager-loading with this name.

func (*VulnerabilityID) QueryType

func (vi *VulnerabilityID) QueryType() *VulnerabilityTypeQuery

QueryType queries the "type" edge of the VulnerabilityID entity.

func (*VulnerabilityID) QueryVulnEquals

func (vi *VulnerabilityID) QueryVulnEquals() *VulnEqualQuery

QueryVulnEquals queries the "vuln_equals" 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) Type

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) VulnEquals

func (vi *VulnerabilityID) VulnEquals(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) QueryType

QueryType queries the type edge of a VulnerabilityID.

func (*VulnerabilityIDClient) QueryVulnEquals

func (c *VulnerabilityIDClient) QueryVulnEquals(vi *VulnerabilityID) *VulnEqualQuery

QueryVulnEquals queries the vuln_equals 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) AddVulnEqualIDs

func (vic *VulnerabilityIDCreate) AddVulnEqualIDs(ids ...int) *VulnerabilityIDCreate

AddVulnEqualIDs adds the "vuln_equals" edge to the VulnEqual entity by IDs.

func (*VulnerabilityIDCreate) AddVulnEquals

func (vic *VulnerabilityIDCreate) AddVulnEquals(v ...*VulnEqual) *VulnerabilityIDCreate

AddVulnEquals adds the "vuln_equals" edges to the VulnEqual entity.

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) SetType

SetType sets the "type" edge to the VulnerabilityType entity.

func (*VulnerabilityIDCreate) SetTypeID

func (vic *VulnerabilityIDCreate) SetTypeID(i int) *VulnerabilityIDCreate

SetTypeID sets the "type_id" 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 {
	// Type holds the value of the type edge.
	Type *VulnerabilityType `json:"type,omitempty"`
	// VulnEquals holds the value of the vuln_equals edge.
	VulnEquals []*VulnEqual `json:"vuln_equals,omitempty"`
	// contains filtered or unexported fields
}

VulnerabilityIDEdges holds the relations/edges for other nodes in the graph.

func (VulnerabilityIDEdges) TypeOrErr

func (e VulnerabilityIDEdges) TypeOrErr() (*VulnerabilityType, error)

TypeOrErr returns the Type value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (VulnerabilityIDEdges) VulnEqualsOrErr

func (e VulnerabilityIDEdges) VulnEqualsOrErr() ([]*VulnEqual, error)

VulnEqualsOrErr returns the VulnEquals 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) 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) AddVulnEqualIDs

func (m *VulnerabilityIDMutation) AddVulnEqualIDs(ids ...int)

AddVulnEqualIDs adds the "vuln_equals" 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) 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) ClearType

func (m *VulnerabilityIDMutation) ClearType()

ClearType clears the "type" edge to the VulnerabilityType entity.

func (*VulnerabilityIDMutation) ClearVulnEquals

func (m *VulnerabilityIDMutation) ClearVulnEquals()

ClearVulnEquals clears the "vuln_equals" 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) ID

func (m *VulnerabilityIDMutation) ID() (id int, 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

func (m *VulnerabilityIDMutation) IDs(ctx context.Context) ([]int, 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 (*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) OldTypeID

func (m *VulnerabilityIDMutation) OldTypeID(ctx context.Context) (v int, err error)

OldTypeID returns the old "type_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) 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) RemoveVulnEqualIDs

func (m *VulnerabilityIDMutation) RemoveVulnEqualIDs(ids ...int)

RemoveVulnEqualIDs removes the "vuln_equals" edge to the VulnEqual entity by IDs.

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) RemovedVulnEqualsIDs

func (m *VulnerabilityIDMutation) RemovedVulnEqualsIDs() (ids []int)

RemovedVulnEquals returns the removed IDs of the "vuln_equals" edge to the VulnEqual entity.

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) ResetType

func (m *VulnerabilityIDMutation) ResetType()

ResetType resets all changes to the "type" edge.

func (*VulnerabilityIDMutation) ResetTypeID

func (m *VulnerabilityIDMutation) ResetTypeID()

ResetTypeID resets all changes to the "type_id" field.

func (*VulnerabilityIDMutation) ResetVulnEquals

func (m *VulnerabilityIDMutation) ResetVulnEquals()

ResetVulnEquals resets all changes to the "vuln_equals" 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) SetOp

func (m *VulnerabilityIDMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*VulnerabilityIDMutation) SetTypeID

func (m *VulnerabilityIDMutation) SetTypeID(i int)

SetTypeID sets the "type_id" 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) TypeCleared

func (m *VulnerabilityIDMutation) TypeCleared() bool

TypeCleared reports if the "type" edge to the VulnerabilityType entity was cleared.

func (*VulnerabilityIDMutation) TypeID

func (m *VulnerabilityIDMutation) TypeID() (r int, exists bool)

TypeID returns the value of the "type_id" field in the mutation.

func (*VulnerabilityIDMutation) TypeIDs

func (m *VulnerabilityIDMutation) TypeIDs() (ids []int)

TypeIDs returns the "type" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use TypeID instead. It exists only for internal usage by the builders.

func (*VulnerabilityIDMutation) VulnEqualsCleared

func (m *VulnerabilityIDMutation) VulnEqualsCleared() bool

VulnEqualsCleared reports if the "vuln_equals" edge to the VulnEqual entity was cleared.

func (*VulnerabilityIDMutation) VulnEqualsIDs

func (m *VulnerabilityIDMutation) VulnEqualsIDs() (ids []int)

VulnEqualsIDs returns the "vuln_equals" 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 int, 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) int

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 []int, err error)

IDs executes the query and returns a list of VulnerabilityID IDs.

func (*VulnerabilityIDQuery) IDsX

func (viq *VulnerabilityIDQuery) IDsX(ctx context.Context) []int

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 int, 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) int

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) QueryType

func (viq *VulnerabilityIDQuery) QueryType() *VulnerabilityTypeQuery

QueryType chains the current query on the "type" edge.

func (*VulnerabilityIDQuery) QueryVulnEquals

func (viq *VulnerabilityIDQuery) QueryVulnEquals() *VulnEqualQuery

QueryVulnEquals chains the current query on the "vuln_equals" 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) WithNamedVulnEquals

func (viq *VulnerabilityIDQuery) WithNamedVulnEquals(name string, opts ...func(*VulnEqualQuery)) *VulnerabilityIDQuery

WithNamedVulnEquals tells the query-builder to eager-load the nodes that are connected to the "vuln_equals" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*VulnerabilityIDQuery) WithType

func (viq *VulnerabilityIDQuery) WithType(opts ...func(*VulnerabilityTypeQuery)) *VulnerabilityIDQuery

WithType tells the query-builder to eager-load the nodes that are connected to the "type" edge. The optional arguments are used to configure the query builder of the edge.

func (*VulnerabilityIDQuery) WithVulnEquals

func (viq *VulnerabilityIDQuery) WithVulnEquals(opts ...func(*VulnEqualQuery)) *VulnerabilityIDQuery

WithVulnEquals tells the query-builder to eager-load the nodes that are connected to the "vuln_equals" 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) AddVulnEqualIDs

func (viu *VulnerabilityIDUpdate) AddVulnEqualIDs(ids ...int) *VulnerabilityIDUpdate

AddVulnEqualIDs adds the "vuln_equals" edge to the VulnEqual entity by IDs.

func (*VulnerabilityIDUpdate) AddVulnEquals

func (viu *VulnerabilityIDUpdate) AddVulnEquals(v ...*VulnEqual) *VulnerabilityIDUpdate

AddVulnEquals adds the "vuln_equals" edges to the VulnEqual entity.

func (*VulnerabilityIDUpdate) ClearType

func (viu *VulnerabilityIDUpdate) ClearType() *VulnerabilityIDUpdate

ClearType clears the "type" edge to the VulnerabilityType entity.

func (*VulnerabilityIDUpdate) ClearVulnEquals

func (viu *VulnerabilityIDUpdate) ClearVulnEquals() *VulnerabilityIDUpdate

ClearVulnEquals clears all "vuln_equals" 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) RemoveVulnEqualIDs

func (viu *VulnerabilityIDUpdate) RemoveVulnEqualIDs(ids ...int) *VulnerabilityIDUpdate

RemoveVulnEqualIDs removes the "vuln_equals" edge to VulnEqual entities by IDs.

func (*VulnerabilityIDUpdate) RemoveVulnEquals

func (viu *VulnerabilityIDUpdate) RemoveVulnEquals(v ...*VulnEqual) *VulnerabilityIDUpdate

RemoveVulnEquals removes "vuln_equals" edges to VulnEqual entities.

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) SetType

SetType sets the "type" edge to the VulnerabilityType entity.

func (*VulnerabilityIDUpdate) SetTypeID

func (viu *VulnerabilityIDUpdate) SetTypeID(i int) *VulnerabilityIDUpdate

SetTypeID sets the "type_id" 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) AddVulnEqualIDs

func (viuo *VulnerabilityIDUpdateOne) AddVulnEqualIDs(ids ...int) *VulnerabilityIDUpdateOne

AddVulnEqualIDs adds the "vuln_equals" edge to the VulnEqual entity by IDs.

func (*VulnerabilityIDUpdateOne) AddVulnEquals

func (viuo *VulnerabilityIDUpdateOne) AddVulnEquals(v ...*VulnEqual) *VulnerabilityIDUpdateOne

AddVulnEquals adds the "vuln_equals" edges to the VulnEqual entity.

func (*VulnerabilityIDUpdateOne) ClearType

ClearType clears the "type" edge to the VulnerabilityType entity.

func (*VulnerabilityIDUpdateOne) ClearVulnEquals

func (viuo *VulnerabilityIDUpdateOne) ClearVulnEquals() *VulnerabilityIDUpdateOne

ClearVulnEquals clears all "vuln_equals" 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) RemoveVulnEqualIDs

func (viuo *VulnerabilityIDUpdateOne) RemoveVulnEqualIDs(ids ...int) *VulnerabilityIDUpdateOne

RemoveVulnEqualIDs removes the "vuln_equals" edge to VulnEqual entities by IDs.

func (*VulnerabilityIDUpdateOne) RemoveVulnEquals

func (viuo *VulnerabilityIDUpdateOne) RemoveVulnEquals(v ...*VulnEqual) *VulnerabilityIDUpdateOne

RemoveVulnEquals removes "vuln_equals" edges to VulnEqual entities.

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) SetType

SetType sets the "type" edge to the VulnerabilityType entity.

func (*VulnerabilityIDUpdateOne) SetTypeID

SetTypeID sets the "type_id" 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) SetTypeID

SetTypeID sets the "type_id" field.

func (*VulnerabilityIDUpsert) SetVulnerabilityID

func (u *VulnerabilityIDUpsert) SetVulnerabilityID(v string) *VulnerabilityIDUpsert

SetVulnerabilityID sets the "vulnerability_id" field.

func (*VulnerabilityIDUpsert) UpdateTypeID

func (u *VulnerabilityIDUpsert) UpdateTypeID() *VulnerabilityIDUpsert

UpdateTypeID sets the "type_id" 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) SetTypeID

SetTypeID sets the "type_id" 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(),
	).
	Exec(ctx)

func (*VulnerabilityIDUpsertBulk) UpdateTypeID

UpdateTypeID sets the "type_id" 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 int, 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) SetTypeID

SetTypeID sets the "type_id" 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. Using this option is equivalent to using:

client.VulnerabilityID.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	Exec(ctx)

func (*VulnerabilityIDUpsertOne) UpdateTypeID

UpdateTypeID sets the "type_id" 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 VulnerabilityType

type VulnerabilityType struct {

	// ID of the ent.
	ID int `json:"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 VulnerabilityTypeQuery when eager-loading is set.
	Edges VulnerabilityTypeEdges `json:"edges"`
	// contains filtered or unexported fields
}

VulnerabilityType is the model entity for the VulnerabilityType schema.

func (*VulnerabilityType) IsNode

func (n *VulnerabilityType) IsNode()

IsNode implements the Node interface check for GQLGen.

func (*VulnerabilityType) NamedVulnerabilityIds

func (vt *VulnerabilityType) NamedVulnerabilityIds(name string) ([]*VulnerabilityID, error)

NamedVulnerabilityIds returns the VulnerabilityIds named value or an error if the edge was not loaded in eager-loading with this name.

func (*VulnerabilityType) QueryVulnerabilityIds

func (vt *VulnerabilityType) QueryVulnerabilityIds() *VulnerabilityIDQuery

QueryVulnerabilityIds queries the "vulnerability_ids" edge of the VulnerabilityType entity.

func (*VulnerabilityType) String

func (vt *VulnerabilityType) String() string

String implements the fmt.Stringer.

func (*VulnerabilityType) ToEdge

ToEdge converts VulnerabilityType into VulnerabilityTypeEdge.

func (*VulnerabilityType) Unwrap

func (vt *VulnerabilityType) Unwrap() *VulnerabilityType

Unwrap unwraps the VulnerabilityType 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 (*VulnerabilityType) Update

Update returns a builder for updating this VulnerabilityType. Note that you need to call VulnerabilityType.Unwrap() before calling this method if this VulnerabilityType was returned from a transaction, and the transaction was committed or rolled back.

func (*VulnerabilityType) Value

func (vt *VulnerabilityType) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the VulnerabilityType. This includes values selected through modifiers, order, etc.

func (*VulnerabilityType) VulnerabilityIds

func (vt *VulnerabilityType) VulnerabilityIds(ctx context.Context) (result []*VulnerabilityID, err error)

type VulnerabilityTypeClient

type VulnerabilityTypeClient struct {
	// contains filtered or unexported fields
}

VulnerabilityTypeClient is a client for the VulnerabilityType schema.

func NewVulnerabilityTypeClient

func NewVulnerabilityTypeClient(c config) *VulnerabilityTypeClient

NewVulnerabilityTypeClient returns a client for the VulnerabilityType from the given config.

func (*VulnerabilityTypeClient) Create

Create returns a builder for creating a VulnerabilityType entity.

func (*VulnerabilityTypeClient) CreateBulk

CreateBulk returns a builder for creating a bulk of VulnerabilityType entities.

func (*VulnerabilityTypeClient) Delete

Delete returns a delete builder for VulnerabilityType.

func (*VulnerabilityTypeClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*VulnerabilityTypeClient) DeleteOneID

DeleteOneID returns a builder for deleting the given entity by its id.

func (*VulnerabilityTypeClient) Get

Get returns a VulnerabilityType entity by its id.

func (*VulnerabilityTypeClient) GetX

GetX is like Get, but panics if an error occurs.

func (*VulnerabilityTypeClient) Hooks

func (c *VulnerabilityTypeClient) Hooks() []Hook

Hooks returns the client hooks.

func (*VulnerabilityTypeClient) Intercept

func (c *VulnerabilityTypeClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `vulnerabilitytype.Intercept(f(g(h())))`.

func (*VulnerabilityTypeClient) Interceptors

func (c *VulnerabilityTypeClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*VulnerabilityTypeClient) MapCreateBulk

func (c *VulnerabilityTypeClient) MapCreateBulk(slice any, setFunc func(*VulnerabilityTypeCreate, int)) *VulnerabilityTypeCreateBulk

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 (*VulnerabilityTypeClient) Query

Query returns a query builder for VulnerabilityType.

func (*VulnerabilityTypeClient) QueryVulnerabilityIds

func (c *VulnerabilityTypeClient) QueryVulnerabilityIds(vt *VulnerabilityType) *VulnerabilityIDQuery

QueryVulnerabilityIds queries the vulnerability_ids edge of a VulnerabilityType.

func (*VulnerabilityTypeClient) Update

Update returns an update builder for VulnerabilityType.

func (*VulnerabilityTypeClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*VulnerabilityTypeClient) UpdateOneID

UpdateOneID returns an update builder for the given id.

func (*VulnerabilityTypeClient) Use

func (c *VulnerabilityTypeClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `vulnerabilitytype.Hooks(f(g(h())))`.

type VulnerabilityTypeConnection

type VulnerabilityTypeConnection struct {
	Edges      []*VulnerabilityTypeEdge `json:"edges"`
	PageInfo   PageInfo                 `json:"pageInfo"`
	TotalCount int                      `json:"totalCount"`
}

VulnerabilityTypeConnection is the connection containing edges to VulnerabilityType.

type VulnerabilityTypeCreate

type VulnerabilityTypeCreate struct {
	// contains filtered or unexported fields
}

VulnerabilityTypeCreate is the builder for creating a VulnerabilityType entity.

func (*VulnerabilityTypeCreate) AddVulnerabilityIDIDs

func (vtc *VulnerabilityTypeCreate) AddVulnerabilityIDIDs(ids ...int) *VulnerabilityTypeCreate

AddVulnerabilityIDIDs adds the "vulnerability_ids" edge to the VulnerabilityID entity by IDs.

func (*VulnerabilityTypeCreate) AddVulnerabilityIds

func (vtc *VulnerabilityTypeCreate) AddVulnerabilityIds(v ...*VulnerabilityID) *VulnerabilityTypeCreate

AddVulnerabilityIds adds the "vulnerability_ids" edges to the VulnerabilityID entity.

func (*VulnerabilityTypeCreate) Exec

Exec executes the query.

func (*VulnerabilityTypeCreate) ExecX

func (vtc *VulnerabilityTypeCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*VulnerabilityTypeCreate) Mutation

Mutation returns the VulnerabilityTypeMutation object of the builder.

func (*VulnerabilityTypeCreate) OnConflict

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.VulnerabilityType.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.VulnerabilityTypeUpsert) {
		SetType(v+v).
	}).
	Exec(ctx)

func (*VulnerabilityTypeCreate) OnConflictColumns

func (vtc *VulnerabilityTypeCreate) OnConflictColumns(columns ...string) *VulnerabilityTypeUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.VulnerabilityType.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*VulnerabilityTypeCreate) Save

Save creates the VulnerabilityType in the database.

func (*VulnerabilityTypeCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*VulnerabilityTypeCreate) SetType

SetType sets the "type" field.

type VulnerabilityTypeCreateBulk

type VulnerabilityTypeCreateBulk struct {
	// contains filtered or unexported fields
}

VulnerabilityTypeCreateBulk is the builder for creating many VulnerabilityType entities in bulk.

func (*VulnerabilityTypeCreateBulk) Exec

Exec executes the query.

func (*VulnerabilityTypeCreateBulk) ExecX

func (vtcb *VulnerabilityTypeCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*VulnerabilityTypeCreateBulk) OnConflict

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.VulnerabilityType.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.VulnerabilityTypeUpsert) {
		SetType(v+v).
	}).
	Exec(ctx)

func (*VulnerabilityTypeCreateBulk) OnConflictColumns

func (vtcb *VulnerabilityTypeCreateBulk) OnConflictColumns(columns ...string) *VulnerabilityTypeUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.VulnerabilityType.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*VulnerabilityTypeCreateBulk) Save

Save creates the VulnerabilityType entities in the database.

func (*VulnerabilityTypeCreateBulk) SaveX

SaveX is like Save, but panics if an error occurs.

type VulnerabilityTypeDelete

type VulnerabilityTypeDelete struct {
	// contains filtered or unexported fields
}

VulnerabilityTypeDelete is the builder for deleting a VulnerabilityType entity.

func (*VulnerabilityTypeDelete) Exec

func (vtd *VulnerabilityTypeDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*VulnerabilityTypeDelete) ExecX

func (vtd *VulnerabilityTypeDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*VulnerabilityTypeDelete) Where

Where appends a list predicates to the VulnerabilityTypeDelete builder.

type VulnerabilityTypeDeleteOne

type VulnerabilityTypeDeleteOne struct {
	// contains filtered or unexported fields
}

VulnerabilityTypeDeleteOne is the builder for deleting a single VulnerabilityType entity.

func (*VulnerabilityTypeDeleteOne) Exec

Exec executes the deletion query.

func (*VulnerabilityTypeDeleteOne) ExecX

func (vtdo *VulnerabilityTypeDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*VulnerabilityTypeDeleteOne) Where

Where appends a list predicates to the VulnerabilityTypeDelete builder.

type VulnerabilityTypeEdge

type VulnerabilityTypeEdge struct {
	Node   *VulnerabilityType `json:"node"`
	Cursor Cursor             `json:"cursor"`
}

VulnerabilityTypeEdge is the edge representation of VulnerabilityType.

type VulnerabilityTypeEdges

type VulnerabilityTypeEdges struct {
	// VulnerabilityIds holds the value of the vulnerability_ids edge.
	VulnerabilityIds []*VulnerabilityID `json:"vulnerability_ids,omitempty"`
	// contains filtered or unexported fields
}

VulnerabilityTypeEdges holds the relations/edges for other nodes in the graph.

func (VulnerabilityTypeEdges) VulnerabilityIdsOrErr

func (e VulnerabilityTypeEdges) VulnerabilityIdsOrErr() ([]*VulnerabilityID, error)

VulnerabilityIdsOrErr returns the VulnerabilityIds value or an error if the edge was not loaded in eager-loading.

type VulnerabilityTypeGroupBy

type VulnerabilityTypeGroupBy struct {
	// contains filtered or unexported fields
}

VulnerabilityTypeGroupBy is the group-by builder for VulnerabilityType entities.

func (*VulnerabilityTypeGroupBy) Aggregate

Aggregate adds the given aggregation functions to the group-by query.

func (*VulnerabilityTypeGroupBy) Bool

func (s *VulnerabilityTypeGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*VulnerabilityTypeGroupBy) BoolX

func (s *VulnerabilityTypeGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*VulnerabilityTypeGroupBy) Bools

func (s *VulnerabilityTypeGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*VulnerabilityTypeGroupBy) BoolsX

func (s *VulnerabilityTypeGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*VulnerabilityTypeGroupBy) Float64

func (s *VulnerabilityTypeGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*VulnerabilityTypeGroupBy) Float64X

func (s *VulnerabilityTypeGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*VulnerabilityTypeGroupBy) Float64s

func (s *VulnerabilityTypeGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*VulnerabilityTypeGroupBy) Float64sX

func (s *VulnerabilityTypeGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*VulnerabilityTypeGroupBy) Int

func (s *VulnerabilityTypeGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*VulnerabilityTypeGroupBy) IntX

func (s *VulnerabilityTypeGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*VulnerabilityTypeGroupBy) Ints

func (s *VulnerabilityTypeGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*VulnerabilityTypeGroupBy) IntsX

func (s *VulnerabilityTypeGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*VulnerabilityTypeGroupBy) Scan

func (vtgb *VulnerabilityTypeGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*VulnerabilityTypeGroupBy) ScanX

func (s *VulnerabilityTypeGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*VulnerabilityTypeGroupBy) String

func (s *VulnerabilityTypeGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*VulnerabilityTypeGroupBy) StringX

func (s *VulnerabilityTypeGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*VulnerabilityTypeGroupBy) Strings

func (s *VulnerabilityTypeGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*VulnerabilityTypeGroupBy) StringsX

func (s *VulnerabilityTypeGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type VulnerabilityTypeMutation

type VulnerabilityTypeMutation struct {
	// contains filtered or unexported fields
}

VulnerabilityTypeMutation represents an operation that mutates the VulnerabilityType nodes in the graph.

func (*VulnerabilityTypeMutation) AddField

func (m *VulnerabilityTypeMutation) 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 (*VulnerabilityTypeMutation) AddVulnerabilityIDIDs

func (m *VulnerabilityTypeMutation) AddVulnerabilityIDIDs(ids ...int)

AddVulnerabilityIDIDs adds the "vulnerability_ids" edge to the VulnerabilityID entity by ids.

func (*VulnerabilityTypeMutation) AddedEdges

func (m *VulnerabilityTypeMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*VulnerabilityTypeMutation) AddedField

func (m *VulnerabilityTypeMutation) 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 (*VulnerabilityTypeMutation) AddedFields

func (m *VulnerabilityTypeMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*VulnerabilityTypeMutation) AddedIDs

func (m *VulnerabilityTypeMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*VulnerabilityTypeMutation) ClearEdge

func (m *VulnerabilityTypeMutation) 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 (*VulnerabilityTypeMutation) ClearField

func (m *VulnerabilityTypeMutation) 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 (*VulnerabilityTypeMutation) ClearVulnerabilityIds

func (m *VulnerabilityTypeMutation) ClearVulnerabilityIds()

ClearVulnerabilityIds clears the "vulnerability_ids" edge to the VulnerabilityID entity.

func (*VulnerabilityTypeMutation) ClearedEdges

func (m *VulnerabilityTypeMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*VulnerabilityTypeMutation) ClearedFields

func (m *VulnerabilityTypeMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (VulnerabilityTypeMutation) Client

func (m VulnerabilityTypeMutation) 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 (*VulnerabilityTypeMutation) EdgeCleared

func (m *VulnerabilityTypeMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*VulnerabilityTypeMutation) Field

func (m *VulnerabilityTypeMutation) 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 (*VulnerabilityTypeMutation) FieldCleared

func (m *VulnerabilityTypeMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*VulnerabilityTypeMutation) Fields

func (m *VulnerabilityTypeMutation) 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 (*VulnerabilityTypeMutation) GetType

func (m *VulnerabilityTypeMutation) GetType() (r string, exists bool)

GetType returns the value of the "type" field in the mutation.

func (*VulnerabilityTypeMutation) ID

func (m *VulnerabilityTypeMutation) ID() (id int, 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 (*VulnerabilityTypeMutation) 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 (*VulnerabilityTypeMutation) OldField

func (m *VulnerabilityTypeMutation) 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 (*VulnerabilityTypeMutation) OldType

func (m *VulnerabilityTypeMutation) OldType(ctx context.Context) (v string, err error)

OldType returns the old "type" field's value of the VulnerabilityType entity. If the VulnerabilityType 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 (*VulnerabilityTypeMutation) Op

func (m *VulnerabilityTypeMutation) Op() Op

Op returns the operation name.

func (*VulnerabilityTypeMutation) RemoveVulnerabilityIDIDs

func (m *VulnerabilityTypeMutation) RemoveVulnerabilityIDIDs(ids ...int)

RemoveVulnerabilityIDIDs removes the "vulnerability_ids" edge to the VulnerabilityID entity by IDs.

func (*VulnerabilityTypeMutation) RemovedEdges

func (m *VulnerabilityTypeMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*VulnerabilityTypeMutation) RemovedIDs

func (m *VulnerabilityTypeMutation) 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 (*VulnerabilityTypeMutation) RemovedVulnerabilityIdsIDs

func (m *VulnerabilityTypeMutation) RemovedVulnerabilityIdsIDs() (ids []int)

RemovedVulnerabilityIds returns the removed IDs of the "vulnerability_ids" edge to the VulnerabilityID entity.

func (*VulnerabilityTypeMutation) ResetEdge

func (m *VulnerabilityTypeMutation) 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 (*VulnerabilityTypeMutation) ResetField

func (m *VulnerabilityTypeMutation) 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 (*VulnerabilityTypeMutation) ResetType

func (m *VulnerabilityTypeMutation) ResetType()

ResetType resets all changes to the "type" field.

func (*VulnerabilityTypeMutation) ResetVulnerabilityIds

func (m *VulnerabilityTypeMutation) ResetVulnerabilityIds()

ResetVulnerabilityIds resets all changes to the "vulnerability_ids" edge.

func (*VulnerabilityTypeMutation) SetField

func (m *VulnerabilityTypeMutation) 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 (*VulnerabilityTypeMutation) SetOp

func (m *VulnerabilityTypeMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*VulnerabilityTypeMutation) SetType

func (m *VulnerabilityTypeMutation) SetType(s string)

SetType sets the "type" field.

func (VulnerabilityTypeMutation) Tx

func (m VulnerabilityTypeMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*VulnerabilityTypeMutation) Type

Type returns the node type of this mutation (VulnerabilityType).

func (*VulnerabilityTypeMutation) VulnerabilityIdsCleared

func (m *VulnerabilityTypeMutation) VulnerabilityIdsCleared() bool

VulnerabilityIdsCleared reports if the "vulnerability_ids" edge to the VulnerabilityID entity was cleared.

func (*VulnerabilityTypeMutation) VulnerabilityIdsIDs

func (m *VulnerabilityTypeMutation) VulnerabilityIdsIDs() (ids []int)

VulnerabilityIdsIDs returns the "vulnerability_ids" edge IDs in the mutation.

func (*VulnerabilityTypeMutation) Where

Where appends a list predicates to the VulnerabilityTypeMutation builder.

func (*VulnerabilityTypeMutation) WhereP

func (m *VulnerabilityTypeMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the VulnerabilityTypeMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type VulnerabilityTypeOrder

type VulnerabilityTypeOrder struct {
	Direction OrderDirection               `json:"direction"`
	Field     *VulnerabilityTypeOrderField `json:"field"`
}

VulnerabilityTypeOrder defines the ordering of VulnerabilityType.

type VulnerabilityTypeOrderField

type VulnerabilityTypeOrderField struct {
	// Value extracts the ordering value from the given VulnerabilityType.
	Value func(*VulnerabilityType) (ent.Value, error)
	// contains filtered or unexported fields
}

VulnerabilityTypeOrderField defines the ordering field of VulnerabilityType.

type VulnerabilityTypePaginateOption

type VulnerabilityTypePaginateOption func(*vulnerabilitytypePager) error

VulnerabilityTypePaginateOption enables pagination customization.

func WithVulnerabilityTypeFilter

func WithVulnerabilityTypeFilter(filter func(*VulnerabilityTypeQuery) (*VulnerabilityTypeQuery, error)) VulnerabilityTypePaginateOption

WithVulnerabilityTypeFilter configures pagination filter.

func WithVulnerabilityTypeOrder

func WithVulnerabilityTypeOrder(order *VulnerabilityTypeOrder) VulnerabilityTypePaginateOption

WithVulnerabilityTypeOrder configures pagination ordering.

type VulnerabilityTypeQuery

type VulnerabilityTypeQuery struct {
	// contains filtered or unexported fields
}

VulnerabilityTypeQuery is the builder for querying VulnerabilityType entities.

func (*VulnerabilityTypeQuery) Aggregate

Aggregate returns a VulnerabilityTypeSelect configured with the given aggregations.

func (*VulnerabilityTypeQuery) All

All executes the query and returns a list of VulnerabilityTypes.

func (*VulnerabilityTypeQuery) AllX

AllX is like All, but panics if an error occurs.

func (*VulnerabilityTypeQuery) Clone

Clone returns a duplicate of the VulnerabilityTypeQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*VulnerabilityTypeQuery) CollectFields

func (vt *VulnerabilityTypeQuery) CollectFields(ctx context.Context, satisfies ...string) (*VulnerabilityTypeQuery, error)

CollectFields tells the query-builder to eagerly load connected nodes by resolver context.

func (*VulnerabilityTypeQuery) Count

func (vtq *VulnerabilityTypeQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*VulnerabilityTypeQuery) CountX

func (vtq *VulnerabilityTypeQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*VulnerabilityTypeQuery) Exist

func (vtq *VulnerabilityTypeQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*VulnerabilityTypeQuery) ExistX

func (vtq *VulnerabilityTypeQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*VulnerabilityTypeQuery) First

First returns the first VulnerabilityType entity from the query. Returns a *NotFoundError when no VulnerabilityType was found.

func (*VulnerabilityTypeQuery) FirstID

func (vtq *VulnerabilityTypeQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first VulnerabilityType ID from the query. Returns a *NotFoundError when no VulnerabilityType ID was found.

func (*VulnerabilityTypeQuery) FirstIDX

func (vtq *VulnerabilityTypeQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*VulnerabilityTypeQuery) FirstX

FirstX is like First, but panics if an error occurs.

func (*VulnerabilityTypeQuery) GroupBy

func (vtq *VulnerabilityTypeQuery) GroupBy(field string, fields ...string) *VulnerabilityTypeGroupBy

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.VulnerabilityType.Query().
	GroupBy(vulnerabilitytype.FieldType).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*VulnerabilityTypeQuery) IDs

func (vtq *VulnerabilityTypeQuery) IDs(ctx context.Context) (ids []int, err error)

IDs executes the query and returns a list of VulnerabilityType IDs.

func (*VulnerabilityTypeQuery) IDsX

func (vtq *VulnerabilityTypeQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*VulnerabilityTypeQuery) Limit

Limit the number of records to be returned by this query.

func (*VulnerabilityTypeQuery) Offset

func (vtq *VulnerabilityTypeQuery) Offset(offset int) *VulnerabilityTypeQuery

Offset to start from.

func (*VulnerabilityTypeQuery) Only

Only returns a single VulnerabilityType entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one VulnerabilityType entity is found. Returns a *NotFoundError when no VulnerabilityType entities are found.

func (*VulnerabilityTypeQuery) OnlyID

func (vtq *VulnerabilityTypeQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only VulnerabilityType ID in the query. Returns a *NotSingularError when more than one VulnerabilityType ID is found. Returns a *NotFoundError when no entities are found.

func (*VulnerabilityTypeQuery) OnlyIDX

func (vtq *VulnerabilityTypeQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*VulnerabilityTypeQuery) OnlyX

OnlyX is like Only, but panics if an error occurs.

func (*VulnerabilityTypeQuery) Order

Order specifies how the records should be ordered.

func (*VulnerabilityTypeQuery) Paginate

func (vt *VulnerabilityTypeQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...VulnerabilityTypePaginateOption,
) (*VulnerabilityTypeConnection, error)

Paginate executes the query and returns a relay based cursor connection to VulnerabilityType.

func (*VulnerabilityTypeQuery) QueryVulnerabilityIds

func (vtq *VulnerabilityTypeQuery) QueryVulnerabilityIds() *VulnerabilityIDQuery

QueryVulnerabilityIds chains the current query on the "vulnerability_ids" edge.

func (*VulnerabilityTypeQuery) Select

func (vtq *VulnerabilityTypeQuery) Select(fields ...string) *VulnerabilityTypeSelect

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.VulnerabilityType.Query().
	Select(vulnerabilitytype.FieldType).
	Scan(ctx, &v)

func (*VulnerabilityTypeQuery) Unique

func (vtq *VulnerabilityTypeQuery) Unique(unique bool) *VulnerabilityTypeQuery

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 (*VulnerabilityTypeQuery) Where

Where adds a new predicate for the VulnerabilityTypeQuery builder.

func (*VulnerabilityTypeQuery) WithNamedVulnerabilityIds

func (vtq *VulnerabilityTypeQuery) WithNamedVulnerabilityIds(name string, opts ...func(*VulnerabilityIDQuery)) *VulnerabilityTypeQuery

WithNamedVulnerabilityIds tells the query-builder to eager-load the nodes that are connected to the "vulnerability_ids" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*VulnerabilityTypeQuery) WithVulnerabilityIds

func (vtq *VulnerabilityTypeQuery) WithVulnerabilityIds(opts ...func(*VulnerabilityIDQuery)) *VulnerabilityTypeQuery

WithVulnerabilityIds tells the query-builder to eager-load the nodes that are connected to the "vulnerability_ids" edge. The optional arguments are used to configure the query builder of the edge.

type VulnerabilityTypeSelect

type VulnerabilityTypeSelect struct {
	*VulnerabilityTypeQuery
	// contains filtered or unexported fields
}

VulnerabilityTypeSelect is the builder for selecting fields of VulnerabilityType entities.

func (*VulnerabilityTypeSelect) Aggregate

Aggregate adds the given aggregation functions to the selector query.

func (*VulnerabilityTypeSelect) Bool

func (s *VulnerabilityTypeSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*VulnerabilityTypeSelect) BoolX

func (s *VulnerabilityTypeSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*VulnerabilityTypeSelect) Bools

func (s *VulnerabilityTypeSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*VulnerabilityTypeSelect) BoolsX

func (s *VulnerabilityTypeSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*VulnerabilityTypeSelect) Float64

func (s *VulnerabilityTypeSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*VulnerabilityTypeSelect) Float64X

func (s *VulnerabilityTypeSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*VulnerabilityTypeSelect) Float64s

func (s *VulnerabilityTypeSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*VulnerabilityTypeSelect) Float64sX

func (s *VulnerabilityTypeSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*VulnerabilityTypeSelect) Int

func (s *VulnerabilityTypeSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*VulnerabilityTypeSelect) IntX

func (s *VulnerabilityTypeSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*VulnerabilityTypeSelect) Ints

func (s *VulnerabilityTypeSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*VulnerabilityTypeSelect) IntsX

func (s *VulnerabilityTypeSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*VulnerabilityTypeSelect) Scan

func (vts *VulnerabilityTypeSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*VulnerabilityTypeSelect) ScanX

func (s *VulnerabilityTypeSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*VulnerabilityTypeSelect) String

func (s *VulnerabilityTypeSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*VulnerabilityTypeSelect) StringX

func (s *VulnerabilityTypeSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*VulnerabilityTypeSelect) Strings

func (s *VulnerabilityTypeSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*VulnerabilityTypeSelect) StringsX

func (s *VulnerabilityTypeSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type VulnerabilityTypeUpdate

type VulnerabilityTypeUpdate struct {
	// contains filtered or unexported fields
}

VulnerabilityTypeUpdate is the builder for updating VulnerabilityType entities.

func (*VulnerabilityTypeUpdate) AddVulnerabilityIDIDs

func (vtu *VulnerabilityTypeUpdate) AddVulnerabilityIDIDs(ids ...int) *VulnerabilityTypeUpdate

AddVulnerabilityIDIDs adds the "vulnerability_ids" edge to the VulnerabilityID entity by IDs.

func (*VulnerabilityTypeUpdate) AddVulnerabilityIds

func (vtu *VulnerabilityTypeUpdate) AddVulnerabilityIds(v ...*VulnerabilityID) *VulnerabilityTypeUpdate

AddVulnerabilityIds adds the "vulnerability_ids" edges to the VulnerabilityID entity.

func (*VulnerabilityTypeUpdate) ClearVulnerabilityIds

func (vtu *VulnerabilityTypeUpdate) ClearVulnerabilityIds() *VulnerabilityTypeUpdate

ClearVulnerabilityIds clears all "vulnerability_ids" edges to the VulnerabilityID entity.

func (*VulnerabilityTypeUpdate) Exec

Exec executes the query.

func (*VulnerabilityTypeUpdate) ExecX

func (vtu *VulnerabilityTypeUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*VulnerabilityTypeUpdate) Mutation

Mutation returns the VulnerabilityTypeMutation object of the builder.

func (*VulnerabilityTypeUpdate) RemoveVulnerabilityIDIDs

func (vtu *VulnerabilityTypeUpdate) RemoveVulnerabilityIDIDs(ids ...int) *VulnerabilityTypeUpdate

RemoveVulnerabilityIDIDs removes the "vulnerability_ids" edge to VulnerabilityID entities by IDs.

func (*VulnerabilityTypeUpdate) RemoveVulnerabilityIds

func (vtu *VulnerabilityTypeUpdate) RemoveVulnerabilityIds(v ...*VulnerabilityID) *VulnerabilityTypeUpdate

RemoveVulnerabilityIds removes "vulnerability_ids" edges to VulnerabilityID entities.

func (*VulnerabilityTypeUpdate) Save

func (vtu *VulnerabilityTypeUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*VulnerabilityTypeUpdate) SaveX

func (vtu *VulnerabilityTypeUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*VulnerabilityTypeUpdate) SetType

SetType sets the "type" field.

func (*VulnerabilityTypeUpdate) Where

Where appends a list predicates to the VulnerabilityTypeUpdate builder.

type VulnerabilityTypeUpdateOne

type VulnerabilityTypeUpdateOne struct {
	// contains filtered or unexported fields
}

VulnerabilityTypeUpdateOne is the builder for updating a single VulnerabilityType entity.

func (*VulnerabilityTypeUpdateOne) AddVulnerabilityIDIDs

func (vtuo *VulnerabilityTypeUpdateOne) AddVulnerabilityIDIDs(ids ...int) *VulnerabilityTypeUpdateOne

AddVulnerabilityIDIDs adds the "vulnerability_ids" edge to the VulnerabilityID entity by IDs.

func (*VulnerabilityTypeUpdateOne) AddVulnerabilityIds

func (vtuo *VulnerabilityTypeUpdateOne) AddVulnerabilityIds(v ...*VulnerabilityID) *VulnerabilityTypeUpdateOne

AddVulnerabilityIds adds the "vulnerability_ids" edges to the VulnerabilityID entity.

func (*VulnerabilityTypeUpdateOne) ClearVulnerabilityIds

func (vtuo *VulnerabilityTypeUpdateOne) ClearVulnerabilityIds() *VulnerabilityTypeUpdateOne

ClearVulnerabilityIds clears all "vulnerability_ids" edges to the VulnerabilityID entity.

func (*VulnerabilityTypeUpdateOne) Exec

Exec executes the query on the entity.

func (*VulnerabilityTypeUpdateOne) ExecX

func (vtuo *VulnerabilityTypeUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*VulnerabilityTypeUpdateOne) Mutation

Mutation returns the VulnerabilityTypeMutation object of the builder.

func (*VulnerabilityTypeUpdateOne) RemoveVulnerabilityIDIDs

func (vtuo *VulnerabilityTypeUpdateOne) RemoveVulnerabilityIDIDs(ids ...int) *VulnerabilityTypeUpdateOne

RemoveVulnerabilityIDIDs removes the "vulnerability_ids" edge to VulnerabilityID entities by IDs.

func (*VulnerabilityTypeUpdateOne) RemoveVulnerabilityIds

func (vtuo *VulnerabilityTypeUpdateOne) RemoveVulnerabilityIds(v ...*VulnerabilityID) *VulnerabilityTypeUpdateOne

RemoveVulnerabilityIds removes "vulnerability_ids" edges to VulnerabilityID entities.

func (*VulnerabilityTypeUpdateOne) Save

Save executes the query and returns the updated VulnerabilityType entity.

func (*VulnerabilityTypeUpdateOne) SaveX

SaveX is like Save, but panics if an error occurs.

func (*VulnerabilityTypeUpdateOne) Select

func (vtuo *VulnerabilityTypeUpdateOne) Select(field string, fields ...string) *VulnerabilityTypeUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*VulnerabilityTypeUpdateOne) SetType

SetType sets the "type" field.

func (*VulnerabilityTypeUpdateOne) Where

Where appends a list predicates to the VulnerabilityTypeUpdate builder.

type VulnerabilityTypeUpsert

type VulnerabilityTypeUpsert struct {
	*sql.UpdateSet
}

VulnerabilityTypeUpsert is the "OnConflict" setter.

func (*VulnerabilityTypeUpsert) SetType

SetType sets the "type" field.

func (*VulnerabilityTypeUpsert) UpdateType

UpdateType sets the "type" field to the value that was provided on create.

type VulnerabilityTypeUpsertBulk

type VulnerabilityTypeUpsertBulk struct {
	// contains filtered or unexported fields
}

VulnerabilityTypeUpsertBulk is the builder for "upsert"-ing a bulk of VulnerabilityType nodes.

func (*VulnerabilityTypeUpsertBulk) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*VulnerabilityTypeUpsertBulk) Exec

Exec executes the query.

func (*VulnerabilityTypeUpsertBulk) ExecX

ExecX is like Exec, but panics if an error occurs.

func (*VulnerabilityTypeUpsertBulk) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.VulnerabilityType.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*VulnerabilityTypeUpsertBulk) SetType

SetType sets the "type" field.

func (*VulnerabilityTypeUpsertBulk) Update

Update allows overriding fields `UPDATE` values. See the VulnerabilityTypeCreateBulk.OnConflict documentation for more info.

func (*VulnerabilityTypeUpsertBulk) UpdateNewValues

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.VulnerabilityType.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	Exec(ctx)

func (*VulnerabilityTypeUpsertBulk) UpdateType

UpdateType sets the "type" field to the value that was provided on create.

type VulnerabilityTypeUpsertOne

type VulnerabilityTypeUpsertOne struct {
	// contains filtered or unexported fields
}

VulnerabilityTypeUpsertOne is the builder for "upsert"-ing

one VulnerabilityType node.

func (*VulnerabilityTypeUpsertOne) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*VulnerabilityTypeUpsertOne) Exec

Exec executes the query.

func (*VulnerabilityTypeUpsertOne) ExecX

ExecX is like Exec, but panics if an error occurs.

func (*VulnerabilityTypeUpsertOne) ID

func (u *VulnerabilityTypeUpsertOne) ID(ctx context.Context) (id int, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*VulnerabilityTypeUpsertOne) IDX

IDX is like ID, but panics if an error occurs.

func (*VulnerabilityTypeUpsertOne) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.VulnerabilityType.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*VulnerabilityTypeUpsertOne) SetType

SetType sets the "type" field.

func (*VulnerabilityTypeUpsertOne) Update

Update allows overriding fields `UPDATE` values. See the VulnerabilityTypeCreate.OnConflict documentation for more info.

func (*VulnerabilityTypeUpsertOne) UpdateNewValues

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.VulnerabilityType.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	Exec(ctx)

func (*VulnerabilityTypeUpsertOne) UpdateType

UpdateType sets the "type" field to the value that was provided on create.

type VulnerabilityTypes

type VulnerabilityTypes []*VulnerabilityType

VulnerabilityTypes is a parsable slice of VulnerabilityType.

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL