ent

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2024 License: Apache-2.0 Imports: 34 Imported by: 0

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.
	TypeAttestation           = "Attestation"
	TypeAttestationCollection = "AttestationCollection"
	TypeAttestationPolicy     = "AttestationPolicy"
	TypeDsse                  = "Dsse"
	TypePayloadDigest         = "PayloadDigest"
	TypeSignature             = "Signature"
	TypeStatement             = "Statement"
	TypeSubject               = "Subject"
	TypeSubjectDigest         = "SubjectDigest"
	TypeTimestamp             = "Timestamp"
)

Variables

View Source
var DefaultAttestationCollectionOrder = &AttestationCollectionOrder{
	Direction: entgql.OrderDirectionAsc,
	Field: &AttestationCollectionOrderField{
		Value: func(ac *AttestationCollection) (ent.Value, error) {
			return ac.ID, nil
		},
		column: attestationcollection.FieldID,
		toTerm: attestationcollection.ByID,
		toCursor: func(ac *AttestationCollection) Cursor {
			return Cursor{ID: ac.ID}
		},
	},
}

DefaultAttestationCollectionOrder is the default ordering of AttestationCollection.

View Source
var DefaultAttestationOrder = &AttestationOrder{
	Direction: entgql.OrderDirectionAsc,
	Field: &AttestationOrderField{
		Value: func(a *Attestation) (ent.Value, error) {
			return a.ID, nil
		},
		column: attestation.FieldID,
		toTerm: attestation.ByID,
		toCursor: func(a *Attestation) Cursor {
			return Cursor{ID: a.ID}
		},
	},
}

DefaultAttestationOrder is the default ordering of Attestation.

View Source
var DefaultAttestationPolicyOrder = &AttestationPolicyOrder{
	Direction: entgql.OrderDirectionAsc,
	Field: &AttestationPolicyOrderField{
		Value: func(ap *AttestationPolicy) (ent.Value, error) {
			return ap.ID, nil
		},
		column: attestationpolicy.FieldID,
		toTerm: attestationpolicy.ByID,
		toCursor: func(ap *AttestationPolicy) Cursor {
			return Cursor{ID: ap.ID}
		},
	},
}

DefaultAttestationPolicyOrder is the default ordering of AttestationPolicy.

View Source
var DefaultDsseOrder = &DsseOrder{
	Direction: entgql.OrderDirectionAsc,
	Field: &DsseOrderField{
		Value: func(d *Dsse) (ent.Value, error) {
			return d.ID, nil
		},
		column: dsse.FieldID,
		toTerm: dsse.ByID,
		toCursor: func(d *Dsse) Cursor {
			return Cursor{ID: d.ID}
		},
	},
}

DefaultDsseOrder is the default ordering of Dsse.

View Source
var DefaultPayloadDigestOrder = &PayloadDigestOrder{
	Direction: entgql.OrderDirectionAsc,
	Field: &PayloadDigestOrderField{
		Value: func(pd *PayloadDigest) (ent.Value, error) {
			return pd.ID, nil
		},
		column: payloaddigest.FieldID,
		toTerm: payloaddigest.ByID,
		toCursor: func(pd *PayloadDigest) Cursor {
			return Cursor{ID: pd.ID}
		},
	},
}

DefaultPayloadDigestOrder is the default ordering of PayloadDigest.

View Source
var DefaultSignatureOrder = &SignatureOrder{
	Direction: entgql.OrderDirectionAsc,
	Field: &SignatureOrderField{
		Value: func(s *Signature) (ent.Value, error) {
			return s.ID, nil
		},
		column: signature.FieldID,
		toTerm: signature.ByID,
		toCursor: func(s *Signature) Cursor {
			return Cursor{ID: s.ID}
		},
	},
}

DefaultSignatureOrder is the default ordering of Signature.

View Source
var DefaultStatementOrder = &StatementOrder{
	Direction: entgql.OrderDirectionAsc,
	Field: &StatementOrderField{
		Value: func(s *Statement) (ent.Value, error) {
			return s.ID, nil
		},
		column: statement.FieldID,
		toTerm: statement.ByID,
		toCursor: func(s *Statement) Cursor {
			return Cursor{ID: s.ID}
		},
	},
}

DefaultStatementOrder is the default ordering of Statement.

View Source
var DefaultSubjectDigestOrder = &SubjectDigestOrder{
	Direction: entgql.OrderDirectionAsc,
	Field: &SubjectDigestOrderField{
		Value: func(sd *SubjectDigest) (ent.Value, error) {
			return sd.ID, nil
		},
		column: subjectdigest.FieldID,
		toTerm: subjectdigest.ByID,
		toCursor: func(sd *SubjectDigest) Cursor {
			return Cursor{ID: sd.ID}
		},
	},
}

DefaultSubjectDigestOrder is the default ordering of SubjectDigest.

View Source
var DefaultSubjectOrder = &SubjectOrder{
	Direction: entgql.OrderDirectionAsc,
	Field: &SubjectOrderField{
		Value: func(s *Subject) (ent.Value, error) {
			return s.ID, nil
		},
		column: subject.FieldID,
		toTerm: subject.ByID,
		toCursor: func(s *Subject) Cursor {
			return Cursor{ID: s.ID}
		},
	},
}

DefaultSubjectOrder is the default ordering of Subject.

View Source
var DefaultTimestampOrder = &TimestampOrder{
	Direction: entgql.OrderDirectionAsc,
	Field: &TimestampOrderField{
		Value: func(t *Timestamp) (ent.Value, error) {
			return t.ID, nil
		},
		column: timestamp.FieldID,
		toTerm: timestamp.ByID,
		toCursor: func(t *Timestamp) Cursor {
			return Cursor{ID: t.ID}
		},
	},
}

DefaultTimestampOrder is the default ordering of Timestamp.

View Source
var ErrEmptyAttestationCollectionWhereInput = errors.New("ent: empty predicate AttestationCollectionWhereInput")

ErrEmptyAttestationCollectionWhereInput is returned in case the AttestationCollectionWhereInput is empty.

View Source
var ErrEmptyAttestationPolicyWhereInput = errors.New("ent: empty predicate AttestationPolicyWhereInput")

ErrEmptyAttestationPolicyWhereInput is returned in case the AttestationPolicyWhereInput is empty.

View Source
var ErrEmptyAttestationWhereInput = errors.New("ent: empty predicate AttestationWhereInput")

ErrEmptyAttestationWhereInput is returned in case the AttestationWhereInput is empty.

View Source
var ErrEmptyDsseWhereInput = errors.New("ent: empty predicate DsseWhereInput")

ErrEmptyDsseWhereInput is returned in case the DsseWhereInput is empty.

View Source
var ErrEmptyPayloadDigestWhereInput = errors.New("ent: empty predicate PayloadDigestWhereInput")

ErrEmptyPayloadDigestWhereInput is returned in case the PayloadDigestWhereInput is empty.

View Source
var ErrEmptySignatureWhereInput = errors.New("ent: empty predicate SignatureWhereInput")

ErrEmptySignatureWhereInput is returned in case the SignatureWhereInput is empty.

View Source
var ErrEmptyStatementWhereInput = errors.New("ent: empty predicate StatementWhereInput")

ErrEmptyStatementWhereInput is returned in case the StatementWhereInput is empty.

View Source
var ErrEmptySubjectDigestWhereInput = errors.New("ent: empty predicate SubjectDigestWhereInput")

ErrEmptySubjectDigestWhereInput is returned in case the SubjectDigestWhereInput is empty.

View Source
var ErrEmptySubjectWhereInput = errors.New("ent: empty predicate SubjectWhereInput")

ErrEmptySubjectWhereInput is returned in case the SubjectWhereInput is empty.

View Source
var ErrEmptyTimestampWhereInput = errors.New("ent: empty predicate TimestampWhereInput")

ErrEmptyTimestampWhereInput is returned in case the TimestampWhereInput is empty.

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 Attestation

type Attestation struct {

	// ID of the ent.
	ID uuid.UUID `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 AttestationQuery when eager-loading is set.
	Edges AttestationEdges `json:"edges"`
	// contains filtered or unexported fields
}

Attestation is the model entity for the Attestation schema.

func (*Attestation) AttestationCollection

func (a *Attestation) AttestationCollection(ctx context.Context) (*AttestationCollection, error)

func (*Attestation) IsNode

func (*Attestation) IsNode()

IsNode implements the Node interface check for GQLGen.

func (*Attestation) QueryAttestationCollection

func (a *Attestation) QueryAttestationCollection() *AttestationCollectionQuery

QueryAttestationCollection queries the "attestation_collection" edge of the Attestation entity.

func (*Attestation) String

func (a *Attestation) String() string

String implements the fmt.Stringer.

func (*Attestation) ToEdge

func (a *Attestation) ToEdge(order *AttestationOrder) *AttestationEdge

ToEdge converts Attestation into AttestationEdge.

func (*Attestation) Unwrap

func (a *Attestation) Unwrap() *Attestation

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

func (a *Attestation) Update() *AttestationUpdateOne

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

func (*Attestation) Value

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

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

type AttestationClient

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

AttestationClient is a client for the Attestation schema.

func NewAttestationClient

func NewAttestationClient(c config) *AttestationClient

NewAttestationClient returns a client for the Attestation from the given config.

func (*AttestationClient) Create

func (c *AttestationClient) Create() *AttestationCreate

Create returns a builder for creating a Attestation entity.

func (*AttestationClient) CreateBulk

func (c *AttestationClient) CreateBulk(builders ...*AttestationCreate) *AttestationCreateBulk

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

func (*AttestationClient) Delete

func (c *AttestationClient) Delete() *AttestationDelete

Delete returns a delete builder for Attestation.

func (*AttestationClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*AttestationClient) DeleteOneID

func (c *AttestationClient) DeleteOneID(id uuid.UUID) *AttestationDeleteOne

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

func (*AttestationClient) Get

Get returns a Attestation entity by its id.

func (*AttestationClient) GetX

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

func (*AttestationClient) Hooks

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

Hooks returns the client hooks.

func (*AttestationClient) Intercept

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

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

func (*AttestationClient) Interceptors

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

Interceptors returns the client interceptors.

func (*AttestationClient) MapCreateBulk

func (c *AttestationClient) MapCreateBulk(slice any, setFunc func(*AttestationCreate, int)) *AttestationCreateBulk

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

func (c *AttestationClient) Query() *AttestationQuery

Query returns a query builder for Attestation.

func (*AttestationClient) QueryAttestationCollection

func (c *AttestationClient) QueryAttestationCollection(a *Attestation) *AttestationCollectionQuery

QueryAttestationCollection queries the attestation_collection edge of a Attestation.

func (*AttestationClient) Update

func (c *AttestationClient) Update() *AttestationUpdate

Update returns an update builder for Attestation.

func (*AttestationClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*AttestationClient) UpdateOneID

func (c *AttestationClient) UpdateOneID(id uuid.UUID) *AttestationUpdateOne

UpdateOneID returns an update builder for the given id.

func (*AttestationClient) Use

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

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

type AttestationCollection

type AttestationCollection struct {

	// ID of the ent.
	ID uuid.UUID `json:"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 AttestationCollectionQuery when eager-loading is set.
	Edges AttestationCollectionEdges `json:"edges"`
	// contains filtered or unexported fields
}

AttestationCollection is the model entity for the AttestationCollection schema.

func (*AttestationCollection) Attestations

func (ac *AttestationCollection) Attestations(ctx context.Context) (result []*Attestation, err error)

func (*AttestationCollection) IsNode

func (*AttestationCollection) IsNode()

IsNode implements the Node interface check for GQLGen.

func (*AttestationCollection) NamedAttestations

func (ac *AttestationCollection) NamedAttestations(name string) ([]*Attestation, error)

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

func (*AttestationCollection) QueryAttestations

func (ac *AttestationCollection) QueryAttestations() *AttestationQuery

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

func (*AttestationCollection) QueryStatement

func (ac *AttestationCollection) QueryStatement() *StatementQuery

QueryStatement queries the "statement" edge of the AttestationCollection entity.

func (*AttestationCollection) Statement

func (ac *AttestationCollection) Statement(ctx context.Context) (*Statement, error)

func (*AttestationCollection) String

func (ac *AttestationCollection) String() string

String implements the fmt.Stringer.

func (*AttestationCollection) ToEdge

ToEdge converts AttestationCollection into AttestationCollectionEdge.

func (*AttestationCollection) Unwrap

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

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

func (*AttestationCollection) Value

func (ac *AttestationCollection) Value(name string) (ent.Value, error)

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

type AttestationCollectionClient

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

AttestationCollectionClient is a client for the AttestationCollection schema.

func NewAttestationCollectionClient

func NewAttestationCollectionClient(c config) *AttestationCollectionClient

NewAttestationCollectionClient returns a client for the AttestationCollection from the given config.

func (*AttestationCollectionClient) Create

Create returns a builder for creating a AttestationCollection entity.

func (*AttestationCollectionClient) CreateBulk

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

func (*AttestationCollectionClient) Delete

Delete returns a delete builder for AttestationCollection.

func (*AttestationCollectionClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*AttestationCollectionClient) DeleteOneID

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

func (*AttestationCollectionClient) Get

Get returns a AttestationCollection entity by its id.

func (*AttestationCollectionClient) GetX

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

func (*AttestationCollectionClient) Hooks

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

Hooks returns the client hooks.

func (*AttestationCollectionClient) Intercept

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

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

func (*AttestationCollectionClient) Interceptors

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

Interceptors returns the client interceptors.

func (*AttestationCollectionClient) MapCreateBulk

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

Query returns a query builder for AttestationCollection.

func (*AttestationCollectionClient) QueryAttestations

QueryAttestations queries the attestations edge of a AttestationCollection.

func (*AttestationCollectionClient) QueryStatement

QueryStatement queries the statement edge of a AttestationCollection.

func (*AttestationCollectionClient) Update

Update returns an update builder for AttestationCollection.

func (*AttestationCollectionClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*AttestationCollectionClient) UpdateOneID

UpdateOneID returns an update builder for the given id.

func (*AttestationCollectionClient) Use

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

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

type AttestationCollectionConnection

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

AttestationCollectionConnection is the connection containing edges to AttestationCollection.

type AttestationCollectionCreate

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

AttestationCollectionCreate is the builder for creating a AttestationCollection entity.

func (*AttestationCollectionCreate) AddAttestationIDs

func (acc *AttestationCollectionCreate) AddAttestationIDs(ids ...uuid.UUID) *AttestationCollectionCreate

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

func (*AttestationCollectionCreate) AddAttestations

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

func (*AttestationCollectionCreate) Exec

Exec executes the query.

func (*AttestationCollectionCreate) ExecX

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

func (*AttestationCollectionCreate) Mutation

Mutation returns the AttestationCollectionMutation object of the builder.

func (*AttestationCollectionCreate) Save

Save creates the AttestationCollection in the database.

func (*AttestationCollectionCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*AttestationCollectionCreate) SetID added in v0.5.0

SetID sets the "id" field.

func (*AttestationCollectionCreate) SetName

SetName sets the "name" field.

func (*AttestationCollectionCreate) SetNillableID added in v0.5.0

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

func (*AttestationCollectionCreate) SetStatement

SetStatement sets the "statement" edge to the Statement entity.

func (*AttestationCollectionCreate) SetStatementID

SetStatementID sets the "statement" edge to the Statement entity by ID.

type AttestationCollectionCreateBulk

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

AttestationCollectionCreateBulk is the builder for creating many AttestationCollection entities in bulk.

func (*AttestationCollectionCreateBulk) Exec

Exec executes the query.

func (*AttestationCollectionCreateBulk) ExecX

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

func (*AttestationCollectionCreateBulk) Save

Save creates the AttestationCollection entities in the database.

func (*AttestationCollectionCreateBulk) SaveX

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

type AttestationCollectionDelete

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

AttestationCollectionDelete is the builder for deleting a AttestationCollection entity.

func (*AttestationCollectionDelete) Exec

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

func (*AttestationCollectionDelete) ExecX

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

func (*AttestationCollectionDelete) Where

Where appends a list predicates to the AttestationCollectionDelete builder.

type AttestationCollectionDeleteOne

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

AttestationCollectionDeleteOne is the builder for deleting a single AttestationCollection entity.

func (*AttestationCollectionDeleteOne) Exec

Exec executes the deletion query.

func (*AttestationCollectionDeleteOne) ExecX

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

func (*AttestationCollectionDeleteOne) Where

Where appends a list predicates to the AttestationCollectionDelete builder.

type AttestationCollectionEdge

type AttestationCollectionEdge struct {
	Node   *AttestationCollection `json:"node"`
	Cursor Cursor                 `json:"cursor"`
}

AttestationCollectionEdge is the edge representation of AttestationCollection.

type AttestationCollectionEdges

type AttestationCollectionEdges struct {
	// Attestations holds the value of the attestations edge.
	Attestations []*Attestation `json:"attestations,omitempty"`
	// Statement holds the value of the statement edge.
	Statement *Statement `json:"statement,omitempty"`
	// contains filtered or unexported fields
}

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

func (AttestationCollectionEdges) AttestationsOrErr

func (e AttestationCollectionEdges) AttestationsOrErr() ([]*Attestation, error)

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

func (AttestationCollectionEdges) StatementOrErr

func (e AttestationCollectionEdges) StatementOrErr() (*Statement, error)

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

type AttestationCollectionGroupBy

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

AttestationCollectionGroupBy is the group-by builder for AttestationCollection entities.

func (*AttestationCollectionGroupBy) Aggregate

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

func (*AttestationCollectionGroupBy) Bool

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

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

func (*AttestationCollectionGroupBy) BoolX

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

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

func (*AttestationCollectionGroupBy) Bools

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

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

func (*AttestationCollectionGroupBy) BoolsX

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

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

func (*AttestationCollectionGroupBy) Float64

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

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

func (*AttestationCollectionGroupBy) Float64X

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

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

func (*AttestationCollectionGroupBy) Float64s

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

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

func (*AttestationCollectionGroupBy) Float64sX

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

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

func (*AttestationCollectionGroupBy) Int

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

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

func (*AttestationCollectionGroupBy) IntX

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

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

func (*AttestationCollectionGroupBy) Ints

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

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

func (*AttestationCollectionGroupBy) IntsX

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

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

func (*AttestationCollectionGroupBy) Scan

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

func (*AttestationCollectionGroupBy) ScanX

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

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

func (*AttestationCollectionGroupBy) String

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

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

func (*AttestationCollectionGroupBy) StringX

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

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

func (*AttestationCollectionGroupBy) Strings

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

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

func (*AttestationCollectionGroupBy) StringsX

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

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

type AttestationCollectionMutation

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

AttestationCollectionMutation represents an operation that mutates the AttestationCollection nodes in the graph.

func (*AttestationCollectionMutation) AddAttestationIDs

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

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

func (*AttestationCollectionMutation) AddField

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

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

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

func (*AttestationCollectionMutation) AddedField

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

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

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

func (*AttestationCollectionMutation) AddedIDs

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

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

func (*AttestationCollectionMutation) AttestationsCleared

func (m *AttestationCollectionMutation) AttestationsCleared() bool

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

func (*AttestationCollectionMutation) AttestationsIDs

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

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

func (*AttestationCollectionMutation) ClearAttestations

func (m *AttestationCollectionMutation) ClearAttestations()

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

func (*AttestationCollectionMutation) ClearEdge

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

func (m *AttestationCollectionMutation) 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 (*AttestationCollectionMutation) ClearStatement

func (m *AttestationCollectionMutation) ClearStatement()

ClearStatement clears the "statement" edge to the Statement entity.

func (*AttestationCollectionMutation) ClearedEdges

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

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

func (*AttestationCollectionMutation) ClearedFields

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

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

func (AttestationCollectionMutation) 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 (*AttestationCollectionMutation) EdgeCleared

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

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

func (*AttestationCollectionMutation) Field

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 (*AttestationCollectionMutation) FieldCleared

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

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

func (*AttestationCollectionMutation) Fields

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

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

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

func (*AttestationCollectionMutation) 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 (*AttestationCollectionMutation) Name

func (m *AttestationCollectionMutation) Name() (r string, exists bool)

Name returns the value of the "name" field in the mutation.

func (*AttestationCollectionMutation) OldField

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 (*AttestationCollectionMutation) OldName

func (m *AttestationCollectionMutation) OldName(ctx context.Context) (v string, err error)

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

func (*AttestationCollectionMutation) Op

Op returns the operation name.

func (*AttestationCollectionMutation) RemoveAttestationIDs

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

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

func (*AttestationCollectionMutation) RemovedAttestationsIDs

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

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

func (*AttestationCollectionMutation) RemovedEdges

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

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

func (*AttestationCollectionMutation) RemovedIDs

func (m *AttestationCollectionMutation) 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 (*AttestationCollectionMutation) ResetAttestations

func (m *AttestationCollectionMutation) ResetAttestations()

ResetAttestations resets all changes to the "attestations" edge.

func (*AttestationCollectionMutation) ResetEdge

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

func (m *AttestationCollectionMutation) 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 (*AttestationCollectionMutation) ResetName

func (m *AttestationCollectionMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*AttestationCollectionMutation) ResetStatement

func (m *AttestationCollectionMutation) ResetStatement()

ResetStatement resets all changes to the "statement" edge.

func (*AttestationCollectionMutation) SetField

func (m *AttestationCollectionMutation) 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 (*AttestationCollectionMutation) SetID added in v0.5.0

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

func (*AttestationCollectionMutation) SetName

func (m *AttestationCollectionMutation) SetName(s string)

SetName sets the "name" field.

func (*AttestationCollectionMutation) SetOp

func (m *AttestationCollectionMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*AttestationCollectionMutation) SetStatementID

func (m *AttestationCollectionMutation) SetStatementID(id uuid.UUID)

SetStatementID sets the "statement" edge to the Statement entity by id.

func (*AttestationCollectionMutation) StatementCleared

func (m *AttestationCollectionMutation) StatementCleared() bool

StatementCleared reports if the "statement" edge to the Statement entity was cleared.

func (*AttestationCollectionMutation) StatementID

func (m *AttestationCollectionMutation) StatementID() (id uuid.UUID, exists bool)

StatementID returns the "statement" edge ID in the mutation.

func (*AttestationCollectionMutation) StatementIDs

func (m *AttestationCollectionMutation) StatementIDs() (ids []uuid.UUID)

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

func (AttestationCollectionMutation) Tx

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

func (*AttestationCollectionMutation) Type

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

func (*AttestationCollectionMutation) Where

Where appends a list predicates to the AttestationCollectionMutation builder.

func (*AttestationCollectionMutation) WhereP

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

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

type AttestationCollectionOrder

type AttestationCollectionOrder struct {
	Direction OrderDirection                   `json:"direction"`
	Field     *AttestationCollectionOrderField `json:"field"`
}

AttestationCollectionOrder defines the ordering of AttestationCollection.

type AttestationCollectionOrderField

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

AttestationCollectionOrderField defines the ordering field of AttestationCollection.

type AttestationCollectionPaginateOption

type AttestationCollectionPaginateOption func(*attestationcollectionPager) error

AttestationCollectionPaginateOption enables pagination customization.

func WithAttestationCollectionFilter

WithAttestationCollectionFilter configures pagination filter.

func WithAttestationCollectionOrder

func WithAttestationCollectionOrder(order *AttestationCollectionOrder) AttestationCollectionPaginateOption

WithAttestationCollectionOrder configures pagination ordering.

type AttestationCollectionQuery

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

AttestationCollectionQuery is the builder for querying AttestationCollection entities.

func (*AttestationCollectionQuery) Aggregate

Aggregate returns a AttestationCollectionSelect configured with the given aggregations.

func (*AttestationCollectionQuery) All

All executes the query and returns a list of AttestationCollections.

func (*AttestationCollectionQuery) AllX

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

func (*AttestationCollectionQuery) Clone

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

func (*AttestationCollectionQuery) CollectFields

func (ac *AttestationCollectionQuery) CollectFields(ctx context.Context, satisfies ...string) (*AttestationCollectionQuery, error)

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

func (*AttestationCollectionQuery) Count

func (acq *AttestationCollectionQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*AttestationCollectionQuery) CountX

func (acq *AttestationCollectionQuery) CountX(ctx context.Context) int

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

func (*AttestationCollectionQuery) Exist

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

func (*AttestationCollectionQuery) ExistX

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

func (*AttestationCollectionQuery) First

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

func (*AttestationCollectionQuery) FirstID

func (acq *AttestationCollectionQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)

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

func (*AttestationCollectionQuery) FirstIDX

func (acq *AttestationCollectionQuery) FirstIDX(ctx context.Context) uuid.UUID

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

func (*AttestationCollectionQuery) FirstX

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

func (*AttestationCollectionQuery) GroupBy

func (acq *AttestationCollectionQuery) GroupBy(field string, fields ...string) *AttestationCollectionGroupBy

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.AttestationCollection.Query().
	GroupBy(attestationcollection.FieldName).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*AttestationCollectionQuery) IDs

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

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

func (*AttestationCollectionQuery) IDsX

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

func (*AttestationCollectionQuery) Limit

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

func (*AttestationCollectionQuery) Offset

Offset to start from.

func (*AttestationCollectionQuery) Only

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

func (*AttestationCollectionQuery) OnlyID

func (acq *AttestationCollectionQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)

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

func (*AttestationCollectionQuery) OnlyIDX

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

func (*AttestationCollectionQuery) OnlyX

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

func (*AttestationCollectionQuery) Order

Order specifies how the records should be ordered.

func (*AttestationCollectionQuery) Paginate

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

func (*AttestationCollectionQuery) QueryAttestations

func (acq *AttestationCollectionQuery) QueryAttestations() *AttestationQuery

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

func (*AttestationCollectionQuery) QueryStatement

func (acq *AttestationCollectionQuery) QueryStatement() *StatementQuery

QueryStatement chains the current query on the "statement" edge.

func (*AttestationCollectionQuery) Select

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.AttestationCollection.Query().
	Select(attestationcollection.FieldName).
	Scan(ctx, &v)

func (*AttestationCollectionQuery) Unique

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

Where adds a new predicate for the AttestationCollectionQuery builder.

func (*AttestationCollectionQuery) WithAttestations

func (acq *AttestationCollectionQuery) WithAttestations(opts ...func(*AttestationQuery)) *AttestationCollectionQuery

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 (*AttestationCollectionQuery) WithNamedAttestations

func (acq *AttestationCollectionQuery) WithNamedAttestations(name string, opts ...func(*AttestationQuery)) *AttestationCollectionQuery

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 (*AttestationCollectionQuery) WithStatement

func (acq *AttestationCollectionQuery) WithStatement(opts ...func(*StatementQuery)) *AttestationCollectionQuery

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

type AttestationCollectionSelect

type AttestationCollectionSelect struct {
	*AttestationCollectionQuery
	// contains filtered or unexported fields
}

AttestationCollectionSelect is the builder for selecting fields of AttestationCollection entities.

func (*AttestationCollectionSelect) Aggregate

Aggregate adds the given aggregation functions to the selector query.

func (*AttestationCollectionSelect) Bool

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

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

func (*AttestationCollectionSelect) BoolX

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

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

func (*AttestationCollectionSelect) Bools

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

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

func (*AttestationCollectionSelect) BoolsX

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

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

func (*AttestationCollectionSelect) Float64

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

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

func (*AttestationCollectionSelect) Float64X

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

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

func (*AttestationCollectionSelect) Float64s

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

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

func (*AttestationCollectionSelect) Float64sX

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

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

func (*AttestationCollectionSelect) Int

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

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

func (*AttestationCollectionSelect) IntX

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

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

func (*AttestationCollectionSelect) Ints

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

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

func (*AttestationCollectionSelect) IntsX

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

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

func (*AttestationCollectionSelect) Scan

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

func (*AttestationCollectionSelect) ScanX

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

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

func (*AttestationCollectionSelect) String

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

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

func (*AttestationCollectionSelect) StringX

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

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

func (*AttestationCollectionSelect) Strings

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

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

func (*AttestationCollectionSelect) StringsX

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

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

type AttestationCollectionUpdate

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

AttestationCollectionUpdate is the builder for updating AttestationCollection entities.

func (*AttestationCollectionUpdate) AddAttestationIDs

func (acu *AttestationCollectionUpdate) AddAttestationIDs(ids ...uuid.UUID) *AttestationCollectionUpdate

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

func (*AttestationCollectionUpdate) AddAttestations

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

func (*AttestationCollectionUpdate) ClearAttestations

func (acu *AttestationCollectionUpdate) ClearAttestations() *AttestationCollectionUpdate

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

func (*AttestationCollectionUpdate) ClearStatement

ClearStatement clears the "statement" edge to the Statement entity.

func (*AttestationCollectionUpdate) Exec

Exec executes the query.

func (*AttestationCollectionUpdate) ExecX

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

func (*AttestationCollectionUpdate) Mutation

Mutation returns the AttestationCollectionMutation object of the builder.

func (*AttestationCollectionUpdate) RemoveAttestationIDs

func (acu *AttestationCollectionUpdate) RemoveAttestationIDs(ids ...uuid.UUID) *AttestationCollectionUpdate

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

func (*AttestationCollectionUpdate) RemoveAttestations

RemoveAttestations removes "attestations" edges to Attestation entities.

func (*AttestationCollectionUpdate) Save

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

func (*AttestationCollectionUpdate) SaveX

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

func (*AttestationCollectionUpdate) SetName

SetName sets the "name" field.

func (*AttestationCollectionUpdate) SetNillableName

SetNillableName sets the "name" field if the given value is not nil.

func (*AttestationCollectionUpdate) SetStatement

SetStatement sets the "statement" edge to the Statement entity.

func (*AttestationCollectionUpdate) SetStatementID

SetStatementID sets the "statement" edge to the Statement entity by ID.

func (*AttestationCollectionUpdate) Where

Where appends a list predicates to the AttestationCollectionUpdate builder.

type AttestationCollectionUpdateOne

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

AttestationCollectionUpdateOne is the builder for updating a single AttestationCollection entity.

func (*AttestationCollectionUpdateOne) AddAttestationIDs

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

func (*AttestationCollectionUpdateOne) AddAttestations

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

func (*AttestationCollectionUpdateOne) ClearAttestations

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

func (*AttestationCollectionUpdateOne) ClearStatement

ClearStatement clears the "statement" edge to the Statement entity.

func (*AttestationCollectionUpdateOne) Exec

Exec executes the query on the entity.

func (*AttestationCollectionUpdateOne) ExecX

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

func (*AttestationCollectionUpdateOne) Mutation

Mutation returns the AttestationCollectionMutation object of the builder.

func (*AttestationCollectionUpdateOne) RemoveAttestationIDs

func (acuo *AttestationCollectionUpdateOne) RemoveAttestationIDs(ids ...uuid.UUID) *AttestationCollectionUpdateOne

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

func (*AttestationCollectionUpdateOne) RemoveAttestations

RemoveAttestations removes "attestations" edges to Attestation entities.

func (*AttestationCollectionUpdateOne) Save

Save executes the query and returns the updated AttestationCollection entity.

func (*AttestationCollectionUpdateOne) SaveX

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

func (*AttestationCollectionUpdateOne) Select

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*AttestationCollectionUpdateOne) SetName

SetName sets the "name" field.

func (*AttestationCollectionUpdateOne) SetNillableName

SetNillableName sets the "name" field if the given value is not nil.

func (*AttestationCollectionUpdateOne) SetStatement

SetStatement sets the "statement" edge to the Statement entity.

func (*AttestationCollectionUpdateOne) SetStatementID

SetStatementID sets the "statement" edge to the Statement entity by ID.

func (*AttestationCollectionUpdateOne) Where

Where appends a list predicates to the AttestationCollectionUpdate builder.

type AttestationCollectionWhereInput

type AttestationCollectionWhereInput struct {
	Predicates []predicate.AttestationCollection  `json:"-"`
	Not        *AttestationCollectionWhereInput   `json:"not,omitempty"`
	Or         []*AttestationCollectionWhereInput `json:"or,omitempty"`
	And        []*AttestationCollectionWhereInput `json:"and,omitempty"`

	// "id" field predicates.
	ID      *uuid.UUID  `json:"id,omitempty"`
	IDNEQ   *uuid.UUID  `json:"idNEQ,omitempty"`
	IDIn    []uuid.UUID `json:"idIn,omitempty"`
	IDNotIn []uuid.UUID `json:"idNotIn,omitempty"`
	IDGT    *uuid.UUID  `json:"idGT,omitempty"`
	IDGTE   *uuid.UUID  `json:"idGTE,omitempty"`
	IDLT    *uuid.UUID  `json:"idLT,omitempty"`
	IDLTE   *uuid.UUID  `json:"idLTE,omitempty"`

	// "name" field predicates.
	Name             *string  `json:"name,omitempty"`
	NameNEQ          *string  `json:"nameNEQ,omitempty"`
	NameIn           []string `json:"nameIn,omitempty"`
	NameNotIn        []string `json:"nameNotIn,omitempty"`
	NameGT           *string  `json:"nameGT,omitempty"`
	NameGTE          *string  `json:"nameGTE,omitempty"`
	NameLT           *string  `json:"nameLT,omitempty"`
	NameLTE          *string  `json:"nameLTE,omitempty"`
	NameContains     *string  `json:"nameContains,omitempty"`
	NameHasPrefix    *string  `json:"nameHasPrefix,omitempty"`
	NameHasSuffix    *string  `json:"nameHasSuffix,omitempty"`
	NameEqualFold    *string  `json:"nameEqualFold,omitempty"`
	NameContainsFold *string  `json:"nameContainsFold,omitempty"`

	// "attestations" edge predicates.
	HasAttestations     *bool                    `json:"hasAttestations,omitempty"`
	HasAttestationsWith []*AttestationWhereInput `json:"hasAttestationsWith,omitempty"`

	// "statement" edge predicates.
	HasStatement     *bool                  `json:"hasStatement,omitempty"`
	HasStatementWith []*StatementWhereInput `json:"hasStatementWith,omitempty"`
}

AttestationCollectionWhereInput represents a where input for filtering AttestationCollection queries.

func (*AttestationCollectionWhereInput) AddPredicates

func (i *AttestationCollectionWhereInput) AddPredicates(predicates ...predicate.AttestationCollection)

AddPredicates adds custom predicates to the where input to be used during the filtering phase.

func (*AttestationCollectionWhereInput) Filter

Filter applies the AttestationCollectionWhereInput filter on the AttestationCollectionQuery builder.

func (*AttestationCollectionWhereInput) P

P returns a predicate for filtering attestationcollections. An error is returned if the input is empty or invalid.

type AttestationCollections

type AttestationCollections []*AttestationCollection

AttestationCollections is a parsable slice of AttestationCollection.

type AttestationConnection

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

AttestationConnection is the connection containing edges to Attestation.

type AttestationCreate

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

AttestationCreate is the builder for creating a Attestation entity.

func (*AttestationCreate) Exec

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

Exec executes the query.

func (*AttestationCreate) ExecX

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

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

func (*AttestationCreate) Mutation

func (ac *AttestationCreate) Mutation() *AttestationMutation

Mutation returns the AttestationMutation object of the builder.

func (*AttestationCreate) Save

Save creates the Attestation in the database.

func (*AttestationCreate) SaveX

func (ac *AttestationCreate) SaveX(ctx context.Context) *Attestation

SaveX calls Save and panics if Save returns an error.

func (*AttestationCreate) SetAttestationCollection

func (ac *AttestationCreate) SetAttestationCollection(a *AttestationCollection) *AttestationCreate

SetAttestationCollection sets the "attestation_collection" edge to the AttestationCollection entity.

func (*AttestationCreate) SetAttestationCollectionID

func (ac *AttestationCreate) SetAttestationCollectionID(id uuid.UUID) *AttestationCreate

SetAttestationCollectionID sets the "attestation_collection" edge to the AttestationCollection entity by ID.

func (*AttestationCreate) SetID added in v0.5.0

SetID sets the "id" field.

func (*AttestationCreate) SetNillableID added in v0.5.0

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

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

func (*AttestationCreate) SetType

func (ac *AttestationCreate) SetType(s string) *AttestationCreate

SetType sets the "type" field.

type AttestationCreateBulk

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

AttestationCreateBulk is the builder for creating many Attestation entities in bulk.

func (*AttestationCreateBulk) Exec

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

Exec executes the query.

func (*AttestationCreateBulk) ExecX

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

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

func (*AttestationCreateBulk) Save

func (acb *AttestationCreateBulk) Save(ctx context.Context) ([]*Attestation, error)

Save creates the Attestation entities in the database.

func (*AttestationCreateBulk) SaveX

func (acb *AttestationCreateBulk) SaveX(ctx context.Context) []*Attestation

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

type AttestationDelete

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

AttestationDelete is the builder for deleting a Attestation entity.

func (*AttestationDelete) Exec

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

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

func (*AttestationDelete) ExecX

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

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

func (*AttestationDelete) Where

Where appends a list predicates to the AttestationDelete builder.

type AttestationDeleteOne

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

AttestationDeleteOne is the builder for deleting a single Attestation entity.

func (*AttestationDeleteOne) Exec

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

Exec executes the deletion query.

func (*AttestationDeleteOne) ExecX

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

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

func (*AttestationDeleteOne) Where

Where appends a list predicates to the AttestationDelete builder.

type AttestationEdge

type AttestationEdge struct {
	Node   *Attestation `json:"node"`
	Cursor Cursor       `json:"cursor"`
}

AttestationEdge is the edge representation of Attestation.

type AttestationEdges

type AttestationEdges struct {
	// AttestationCollection holds the value of the attestation_collection edge.
	AttestationCollection *AttestationCollection `json:"attestation_collection,omitempty"`
	// contains filtered or unexported fields
}

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

func (AttestationEdges) AttestationCollectionOrErr

func (e AttestationEdges) AttestationCollectionOrErr() (*AttestationCollection, error)

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

type AttestationGroupBy

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

AttestationGroupBy is the group-by builder for Attestation entities.

func (*AttestationGroupBy) Aggregate

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

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

func (*AttestationGroupBy) Bool

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

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

func (*AttestationGroupBy) BoolX

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

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

func (*AttestationGroupBy) Bools

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

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

func (*AttestationGroupBy) BoolsX

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

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

func (*AttestationGroupBy) Float64

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

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

func (*AttestationGroupBy) Float64X

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

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

func (*AttestationGroupBy) Float64s

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

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

func (*AttestationGroupBy) Float64sX

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

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

func (*AttestationGroupBy) Int

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

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

func (*AttestationGroupBy) IntX

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

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

func (*AttestationGroupBy) Ints

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

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

func (*AttestationGroupBy) IntsX

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

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

func (*AttestationGroupBy) Scan

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

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

func (*AttestationGroupBy) ScanX

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

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

func (*AttestationGroupBy) String

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

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

func (*AttestationGroupBy) StringX

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

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

func (*AttestationGroupBy) Strings

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

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

func (*AttestationGroupBy) StringsX

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

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

type AttestationMutation

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

AttestationMutation represents an operation that mutates the Attestation nodes in the graph.

func (*AttestationMutation) AddField

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

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

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

func (*AttestationMutation) AddedField

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

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

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

func (*AttestationMutation) AddedIDs

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

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

func (*AttestationMutation) AttestationCollectionCleared

func (m *AttestationMutation) AttestationCollectionCleared() bool

AttestationCollectionCleared reports if the "attestation_collection" edge to the AttestationCollection entity was cleared.

func (*AttestationMutation) AttestationCollectionID

func (m *AttestationMutation) AttestationCollectionID() (id uuid.UUID, exists bool)

AttestationCollectionID returns the "attestation_collection" edge ID in the mutation.

func (*AttestationMutation) AttestationCollectionIDs

func (m *AttestationMutation) AttestationCollectionIDs() (ids []uuid.UUID)

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

func (*AttestationMutation) ClearAttestationCollection

func (m *AttestationMutation) ClearAttestationCollection()

ClearAttestationCollection clears the "attestation_collection" edge to the AttestationCollection entity.

func (*AttestationMutation) ClearEdge

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

func (m *AttestationMutation) 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 (*AttestationMutation) ClearedEdges

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

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

func (*AttestationMutation) ClearedFields

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

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

func (AttestationMutation) Client

func (m AttestationMutation) 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 (*AttestationMutation) EdgeCleared

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

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

func (*AttestationMutation) Field

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

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

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

func (*AttestationMutation) Fields

func (m *AttestationMutation) 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 (*AttestationMutation) GetType

func (m *AttestationMutation) GetType() (r string, exists bool)

GetType returns the value of the "type" field in the mutation.

func (*AttestationMutation) ID

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

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

func (*AttestationMutation) IDs

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

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

func (*AttestationMutation) OldField

func (m *AttestationMutation) 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 (*AttestationMutation) OldType

func (m *AttestationMutation) OldType(ctx context.Context) (v string, err error)

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

func (*AttestationMutation) Op

func (m *AttestationMutation) Op() Op

Op returns the operation name.

func (*AttestationMutation) RemovedEdges

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

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

func (*AttestationMutation) RemovedIDs

func (m *AttestationMutation) 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 (*AttestationMutation) ResetAttestationCollection

func (m *AttestationMutation) ResetAttestationCollection()

ResetAttestationCollection resets all changes to the "attestation_collection" edge.

func (*AttestationMutation) ResetEdge

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

func (m *AttestationMutation) 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 (*AttestationMutation) ResetType

func (m *AttestationMutation) ResetType()

ResetType resets all changes to the "type" field.

func (*AttestationMutation) SetAttestationCollectionID

func (m *AttestationMutation) SetAttestationCollectionID(id uuid.UUID)

SetAttestationCollectionID sets the "attestation_collection" edge to the AttestationCollection entity by id.

func (*AttestationMutation) SetField

func (m *AttestationMutation) 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 (*AttestationMutation) SetID added in v0.5.0

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

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

func (*AttestationMutation) SetOp

func (m *AttestationMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*AttestationMutation) SetType

func (m *AttestationMutation) SetType(s string)

SetType sets the "type" field.

func (AttestationMutation) Tx

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

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

func (*AttestationMutation) Type

func (m *AttestationMutation) Type() string

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

func (*AttestationMutation) Where

func (m *AttestationMutation) Where(ps ...predicate.Attestation)

Where appends a list predicates to the AttestationMutation builder.

func (*AttestationMutation) WhereP

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

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

type AttestationOrder

type AttestationOrder struct {
	Direction OrderDirection         `json:"direction"`
	Field     *AttestationOrderField `json:"field"`
}

AttestationOrder defines the ordering of Attestation.

type AttestationOrderField

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

AttestationOrderField defines the ordering field of Attestation.

type AttestationPaginateOption

type AttestationPaginateOption func(*attestationPager) error

AttestationPaginateOption enables pagination customization.

func WithAttestationFilter

func WithAttestationFilter(filter func(*AttestationQuery) (*AttestationQuery, error)) AttestationPaginateOption

WithAttestationFilter configures pagination filter.

func WithAttestationOrder

func WithAttestationOrder(order *AttestationOrder) AttestationPaginateOption

WithAttestationOrder configures pagination ordering.

type AttestationPolicies added in v0.5.0

type AttestationPolicies []*AttestationPolicy

AttestationPolicies is a parsable slice of AttestationPolicy.

type AttestationPolicy added in v0.5.0

type AttestationPolicy struct {

	// ID of the ent.
	ID uuid.UUID `json:"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 AttestationPolicyQuery when eager-loading is set.
	Edges AttestationPolicyEdges `json:"edges"`
	// contains filtered or unexported fields
}

AttestationPolicy is the model entity for the AttestationPolicy schema.

func (*AttestationPolicy) IsNode added in v0.5.0

func (*AttestationPolicy) IsNode()

IsNode implements the Node interface check for GQLGen.

func (*AttestationPolicy) QueryStatement added in v0.5.0

func (ap *AttestationPolicy) QueryStatement() *StatementQuery

QueryStatement queries the "statement" edge of the AttestationPolicy entity.

func (*AttestationPolicy) Statement added in v0.5.0

func (ap *AttestationPolicy) Statement(ctx context.Context) (*Statement, error)

func (*AttestationPolicy) String added in v0.5.0

func (ap *AttestationPolicy) String() string

String implements the fmt.Stringer.

func (*AttestationPolicy) ToEdge added in v0.5.0

ToEdge converts AttestationPolicy into AttestationPolicyEdge.

func (*AttestationPolicy) Unwrap added in v0.5.0

func (ap *AttestationPolicy) Unwrap() *AttestationPolicy

Unwrap unwraps the AttestationPolicy 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 (*AttestationPolicy) Update added in v0.5.0

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

func (*AttestationPolicy) Value added in v0.5.0

func (ap *AttestationPolicy) Value(name string) (ent.Value, error)

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

type AttestationPolicyClient added in v0.5.0

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

AttestationPolicyClient is a client for the AttestationPolicy schema.

func NewAttestationPolicyClient added in v0.5.0

func NewAttestationPolicyClient(c config) *AttestationPolicyClient

NewAttestationPolicyClient returns a client for the AttestationPolicy from the given config.

func (*AttestationPolicyClient) Create added in v0.5.0

Create returns a builder for creating a AttestationPolicy entity.

func (*AttestationPolicyClient) CreateBulk added in v0.5.0

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

func (*AttestationPolicyClient) Delete added in v0.5.0

Delete returns a delete builder for AttestationPolicy.

func (*AttestationPolicyClient) DeleteOne added in v0.5.0

DeleteOne returns a builder for deleting the given entity.

func (*AttestationPolicyClient) DeleteOneID added in v0.5.0

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

func (*AttestationPolicyClient) Get added in v0.5.0

Get returns a AttestationPolicy entity by its id.

func (*AttestationPolicyClient) GetX added in v0.5.0

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

func (*AttestationPolicyClient) Hooks added in v0.5.0

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

Hooks returns the client hooks.

func (*AttestationPolicyClient) Intercept added in v0.5.0

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

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

func (*AttestationPolicyClient) Interceptors added in v0.5.0

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

Interceptors returns the client interceptors.

func (*AttestationPolicyClient) MapCreateBulk added in v0.5.0

func (c *AttestationPolicyClient) MapCreateBulk(slice any, setFunc func(*AttestationPolicyCreate, int)) *AttestationPolicyCreateBulk

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 (*AttestationPolicyClient) Query added in v0.5.0

Query returns a query builder for AttestationPolicy.

func (*AttestationPolicyClient) QueryStatement added in v0.5.0

QueryStatement queries the statement edge of a AttestationPolicy.

func (*AttestationPolicyClient) Update added in v0.5.0

Update returns an update builder for AttestationPolicy.

func (*AttestationPolicyClient) UpdateOne added in v0.5.0

UpdateOne returns an update builder for the given entity.

func (*AttestationPolicyClient) UpdateOneID added in v0.5.0

UpdateOneID returns an update builder for the given id.

func (*AttestationPolicyClient) Use added in v0.5.0

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

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

type AttestationPolicyConnection added in v0.5.0

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

AttestationPolicyConnection is the connection containing edges to AttestationPolicy.

type AttestationPolicyCreate added in v0.5.0

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

AttestationPolicyCreate is the builder for creating a AttestationPolicy entity.

func (*AttestationPolicyCreate) Exec added in v0.5.0

Exec executes the query.

func (*AttestationPolicyCreate) ExecX added in v0.5.0

func (apc *AttestationPolicyCreate) ExecX(ctx context.Context)

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

func (*AttestationPolicyCreate) Mutation added in v0.5.0

Mutation returns the AttestationPolicyMutation object of the builder.

func (*AttestationPolicyCreate) Save added in v0.5.0

Save creates the AttestationPolicy in the database.

func (*AttestationPolicyCreate) SaveX added in v0.5.0

SaveX calls Save and panics if Save returns an error.

func (*AttestationPolicyCreate) SetID added in v0.5.0

SetID sets the "id" field.

func (*AttestationPolicyCreate) SetName added in v0.5.0

SetName sets the "name" field.

func (*AttestationPolicyCreate) SetNillableID added in v0.5.0

func (apc *AttestationPolicyCreate) SetNillableID(u *uuid.UUID) *AttestationPolicyCreate

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

func (*AttestationPolicyCreate) SetNillableStatementID added in v0.5.0

func (apc *AttestationPolicyCreate) SetNillableStatementID(id *uuid.UUID) *AttestationPolicyCreate

SetNillableStatementID sets the "statement" edge to the Statement entity by ID if the given value is not nil.

func (*AttestationPolicyCreate) SetStatement added in v0.5.0

SetStatement sets the "statement" edge to the Statement entity.

func (*AttestationPolicyCreate) SetStatementID added in v0.5.0

func (apc *AttestationPolicyCreate) SetStatementID(id uuid.UUID) *AttestationPolicyCreate

SetStatementID sets the "statement" edge to the Statement entity by ID.

type AttestationPolicyCreateBulk added in v0.5.0

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

AttestationPolicyCreateBulk is the builder for creating many AttestationPolicy entities in bulk.

func (*AttestationPolicyCreateBulk) Exec added in v0.5.0

Exec executes the query.

func (*AttestationPolicyCreateBulk) ExecX added in v0.5.0

func (apcb *AttestationPolicyCreateBulk) ExecX(ctx context.Context)

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

func (*AttestationPolicyCreateBulk) Save added in v0.5.0

Save creates the AttestationPolicy entities in the database.

func (*AttestationPolicyCreateBulk) SaveX added in v0.5.0

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

type AttestationPolicyDelete added in v0.5.0

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

AttestationPolicyDelete is the builder for deleting a AttestationPolicy entity.

func (*AttestationPolicyDelete) Exec added in v0.5.0

func (apd *AttestationPolicyDelete) Exec(ctx context.Context) (int, error)

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

func (*AttestationPolicyDelete) ExecX added in v0.5.0

func (apd *AttestationPolicyDelete) ExecX(ctx context.Context) int

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

func (*AttestationPolicyDelete) Where added in v0.5.0

Where appends a list predicates to the AttestationPolicyDelete builder.

type AttestationPolicyDeleteOne added in v0.5.0

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

AttestationPolicyDeleteOne is the builder for deleting a single AttestationPolicy entity.

func (*AttestationPolicyDeleteOne) Exec added in v0.5.0

Exec executes the deletion query.

func (*AttestationPolicyDeleteOne) ExecX added in v0.5.0

func (apdo *AttestationPolicyDeleteOne) ExecX(ctx context.Context)

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

func (*AttestationPolicyDeleteOne) Where added in v0.5.0

Where appends a list predicates to the AttestationPolicyDelete builder.

type AttestationPolicyEdge added in v0.5.0

type AttestationPolicyEdge struct {
	Node   *AttestationPolicy `json:"node"`
	Cursor Cursor             `json:"cursor"`
}

AttestationPolicyEdge is the edge representation of AttestationPolicy.

type AttestationPolicyEdges added in v0.5.0

type AttestationPolicyEdges struct {
	// Statement holds the value of the statement edge.
	Statement *Statement `json:"statement,omitempty"`
	// contains filtered or unexported fields
}

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

func (AttestationPolicyEdges) StatementOrErr added in v0.5.0

func (e AttestationPolicyEdges) StatementOrErr() (*Statement, error)

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

type AttestationPolicyGroupBy added in v0.5.0

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

AttestationPolicyGroupBy is the group-by builder for AttestationPolicy entities.

func (*AttestationPolicyGroupBy) Aggregate added in v0.5.0

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

func (*AttestationPolicyGroupBy) Bool added in v0.5.0

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

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

func (*AttestationPolicyGroupBy) BoolX added in v0.5.0

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

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

func (*AttestationPolicyGroupBy) Bools added in v0.5.0

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

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

func (*AttestationPolicyGroupBy) BoolsX added in v0.5.0

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

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

func (*AttestationPolicyGroupBy) Float64 added in v0.5.0

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

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

func (*AttestationPolicyGroupBy) Float64X added in v0.5.0

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

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

func (*AttestationPolicyGroupBy) Float64s added in v0.5.0

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

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

func (*AttestationPolicyGroupBy) Float64sX added in v0.5.0

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

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

func (*AttestationPolicyGroupBy) Int added in v0.5.0

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

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

func (*AttestationPolicyGroupBy) IntX added in v0.5.0

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

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

func (*AttestationPolicyGroupBy) Ints added in v0.5.0

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

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

func (*AttestationPolicyGroupBy) IntsX added in v0.5.0

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

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

func (*AttestationPolicyGroupBy) Scan added in v0.5.0

func (apgb *AttestationPolicyGroupBy) Scan(ctx context.Context, v any) error

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

func (*AttestationPolicyGroupBy) ScanX added in v0.5.0

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

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

func (*AttestationPolicyGroupBy) String added in v0.5.0

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

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

func (*AttestationPolicyGroupBy) StringX added in v0.5.0

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

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

func (*AttestationPolicyGroupBy) Strings added in v0.5.0

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

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

func (*AttestationPolicyGroupBy) StringsX added in v0.5.0

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

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

type AttestationPolicyMutation added in v0.5.0

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

AttestationPolicyMutation represents an operation that mutates the AttestationPolicy nodes in the graph.

func (*AttestationPolicyMutation) AddField added in v0.5.0

func (m *AttestationPolicyMutation) 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 (*AttestationPolicyMutation) AddedEdges added in v0.5.0

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

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

func (*AttestationPolicyMutation) AddedField added in v0.5.0

func (m *AttestationPolicyMutation) 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 (*AttestationPolicyMutation) AddedFields added in v0.5.0

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

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

func (*AttestationPolicyMutation) AddedIDs added in v0.5.0

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

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

func (*AttestationPolicyMutation) ClearEdge added in v0.5.0

func (m *AttestationPolicyMutation) 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 (*AttestationPolicyMutation) ClearField added in v0.5.0

func (m *AttestationPolicyMutation) 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 (*AttestationPolicyMutation) ClearStatement added in v0.5.0

func (m *AttestationPolicyMutation) ClearStatement()

ClearStatement clears the "statement" edge to the Statement entity.

func (*AttestationPolicyMutation) ClearedEdges added in v0.5.0

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

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

func (*AttestationPolicyMutation) ClearedFields added in v0.5.0

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

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

func (AttestationPolicyMutation) Client added in v0.5.0

func (m AttestationPolicyMutation) 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 (*AttestationPolicyMutation) EdgeCleared added in v0.5.0

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

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

func (*AttestationPolicyMutation) Field added in v0.5.0

func (m *AttestationPolicyMutation) 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 (*AttestationPolicyMutation) FieldCleared added in v0.5.0

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

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

func (*AttestationPolicyMutation) Fields added in v0.5.0

func (m *AttestationPolicyMutation) 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 (*AttestationPolicyMutation) ID added in v0.5.0

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

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

func (*AttestationPolicyMutation) IDs added in v0.5.0

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

func (*AttestationPolicyMutation) Name added in v0.5.0

func (m *AttestationPolicyMutation) Name() (r string, exists bool)

Name returns the value of the "name" field in the mutation.

func (*AttestationPolicyMutation) OldField added in v0.5.0

func (m *AttestationPolicyMutation) 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 (*AttestationPolicyMutation) OldName added in v0.5.0

func (m *AttestationPolicyMutation) OldName(ctx context.Context) (v string, err error)

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

func (*AttestationPolicyMutation) Op added in v0.5.0

func (m *AttestationPolicyMutation) Op() Op

Op returns the operation name.

func (*AttestationPolicyMutation) RemovedEdges added in v0.5.0

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

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

func (*AttestationPolicyMutation) RemovedIDs added in v0.5.0

func (m *AttestationPolicyMutation) 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 (*AttestationPolicyMutation) ResetEdge added in v0.5.0

func (m *AttestationPolicyMutation) 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 (*AttestationPolicyMutation) ResetField added in v0.5.0

func (m *AttestationPolicyMutation) 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 (*AttestationPolicyMutation) ResetName added in v0.5.0

func (m *AttestationPolicyMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*AttestationPolicyMutation) ResetStatement added in v0.5.0

func (m *AttestationPolicyMutation) ResetStatement()

ResetStatement resets all changes to the "statement" edge.

func (*AttestationPolicyMutation) SetField added in v0.5.0

func (m *AttestationPolicyMutation) 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 (*AttestationPolicyMutation) SetID added in v0.5.0

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

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

func (*AttestationPolicyMutation) SetName added in v0.5.0

func (m *AttestationPolicyMutation) SetName(s string)

SetName sets the "name" field.

func (*AttestationPolicyMutation) SetOp added in v0.5.0

func (m *AttestationPolicyMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*AttestationPolicyMutation) SetStatementID added in v0.5.0

func (m *AttestationPolicyMutation) SetStatementID(id uuid.UUID)

SetStatementID sets the "statement" edge to the Statement entity by id.

func (*AttestationPolicyMutation) StatementCleared added in v0.5.0

func (m *AttestationPolicyMutation) StatementCleared() bool

StatementCleared reports if the "statement" edge to the Statement entity was cleared.

func (*AttestationPolicyMutation) StatementID added in v0.5.0

func (m *AttestationPolicyMutation) StatementID() (id uuid.UUID, exists bool)

StatementID returns the "statement" edge ID in the mutation.

func (*AttestationPolicyMutation) StatementIDs added in v0.5.0

func (m *AttestationPolicyMutation) StatementIDs() (ids []uuid.UUID)

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

func (AttestationPolicyMutation) Tx added in v0.5.0

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

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

func (*AttestationPolicyMutation) Type added in v0.5.0

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

func (*AttestationPolicyMutation) Where added in v0.5.0

Where appends a list predicates to the AttestationPolicyMutation builder.

func (*AttestationPolicyMutation) WhereP added in v0.5.0

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

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

type AttestationPolicyOrder added in v0.5.0

type AttestationPolicyOrder struct {
	Direction OrderDirection               `json:"direction"`
	Field     *AttestationPolicyOrderField `json:"field"`
}

AttestationPolicyOrder defines the ordering of AttestationPolicy.

type AttestationPolicyOrderField added in v0.5.0

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

AttestationPolicyOrderField defines the ordering field of AttestationPolicy.

type AttestationPolicyPaginateOption added in v0.5.0

type AttestationPolicyPaginateOption func(*attestationpolicyPager) error

AttestationPolicyPaginateOption enables pagination customization.

func WithAttestationPolicyFilter added in v0.5.0

func WithAttestationPolicyFilter(filter func(*AttestationPolicyQuery) (*AttestationPolicyQuery, error)) AttestationPolicyPaginateOption

WithAttestationPolicyFilter configures pagination filter.

func WithAttestationPolicyOrder added in v0.5.0

func WithAttestationPolicyOrder(order *AttestationPolicyOrder) AttestationPolicyPaginateOption

WithAttestationPolicyOrder configures pagination ordering.

type AttestationPolicyQuery added in v0.5.0

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

AttestationPolicyQuery is the builder for querying AttestationPolicy entities.

func (*AttestationPolicyQuery) Aggregate added in v0.5.0

Aggregate returns a AttestationPolicySelect configured with the given aggregations.

func (*AttestationPolicyQuery) All added in v0.5.0

All executes the query and returns a list of AttestationPolicies.

func (*AttestationPolicyQuery) AllX added in v0.5.0

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

func (*AttestationPolicyQuery) Clone added in v0.5.0

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

func (*AttestationPolicyQuery) CollectFields added in v0.5.0

func (ap *AttestationPolicyQuery) CollectFields(ctx context.Context, satisfies ...string) (*AttestationPolicyQuery, error)

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

func (*AttestationPolicyQuery) Count added in v0.5.0

func (apq *AttestationPolicyQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*AttestationPolicyQuery) CountX added in v0.5.0

func (apq *AttestationPolicyQuery) CountX(ctx context.Context) int

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

func (*AttestationPolicyQuery) Exist added in v0.5.0

func (apq *AttestationPolicyQuery) Exist(ctx context.Context) (bool, error)

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

func (*AttestationPolicyQuery) ExistX added in v0.5.0

func (apq *AttestationPolicyQuery) ExistX(ctx context.Context) bool

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

func (*AttestationPolicyQuery) First added in v0.5.0

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

func (*AttestationPolicyQuery) FirstID added in v0.5.0

func (apq *AttestationPolicyQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)

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

func (*AttestationPolicyQuery) FirstIDX added in v0.5.0

func (apq *AttestationPolicyQuery) FirstIDX(ctx context.Context) uuid.UUID

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

func (*AttestationPolicyQuery) FirstX added in v0.5.0

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

func (*AttestationPolicyQuery) GroupBy added in v0.5.0

func (apq *AttestationPolicyQuery) GroupBy(field string, fields ...string) *AttestationPolicyGroupBy

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.AttestationPolicy.Query().
	GroupBy(attestationpolicy.FieldName).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*AttestationPolicyQuery) IDs added in v0.5.0

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

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

func (*AttestationPolicyQuery) IDsX added in v0.5.0

func (apq *AttestationPolicyQuery) IDsX(ctx context.Context) []uuid.UUID

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

func (*AttestationPolicyQuery) Limit added in v0.5.0

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

func (*AttestationPolicyQuery) Offset added in v0.5.0

func (apq *AttestationPolicyQuery) Offset(offset int) *AttestationPolicyQuery

Offset to start from.

func (*AttestationPolicyQuery) Only added in v0.5.0

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

func (*AttestationPolicyQuery) OnlyID added in v0.5.0

func (apq *AttestationPolicyQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)

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

func (*AttestationPolicyQuery) OnlyIDX added in v0.5.0

func (apq *AttestationPolicyQuery) OnlyIDX(ctx context.Context) uuid.UUID

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

func (*AttestationPolicyQuery) OnlyX added in v0.5.0

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

func (*AttestationPolicyQuery) Order added in v0.5.0

Order specifies how the records should be ordered.

func (*AttestationPolicyQuery) Paginate added in v0.5.0

func (ap *AttestationPolicyQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...AttestationPolicyPaginateOption,
) (*AttestationPolicyConnection, error)

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

func (*AttestationPolicyQuery) QueryStatement added in v0.5.0

func (apq *AttestationPolicyQuery) QueryStatement() *StatementQuery

QueryStatement chains the current query on the "statement" edge.

func (*AttestationPolicyQuery) Select added in v0.5.0

func (apq *AttestationPolicyQuery) Select(fields ...string) *AttestationPolicySelect

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.AttestationPolicy.Query().
	Select(attestationpolicy.FieldName).
	Scan(ctx, &v)

func (*AttestationPolicyQuery) Unique added in v0.5.0

func (apq *AttestationPolicyQuery) Unique(unique bool) *AttestationPolicyQuery

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 (*AttestationPolicyQuery) Where added in v0.5.0

Where adds a new predicate for the AttestationPolicyQuery builder.

func (*AttestationPolicyQuery) WithStatement added in v0.5.0

func (apq *AttestationPolicyQuery) WithStatement(opts ...func(*StatementQuery)) *AttestationPolicyQuery

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

type AttestationPolicySelect added in v0.5.0

type AttestationPolicySelect struct {
	*AttestationPolicyQuery
	// contains filtered or unexported fields
}

AttestationPolicySelect is the builder for selecting fields of AttestationPolicy entities.

func (*AttestationPolicySelect) Aggregate added in v0.5.0

Aggregate adds the given aggregation functions to the selector query.

func (*AttestationPolicySelect) Bool added in v0.5.0

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

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

func (*AttestationPolicySelect) BoolX added in v0.5.0

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

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

func (*AttestationPolicySelect) Bools added in v0.5.0

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

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

func (*AttestationPolicySelect) BoolsX added in v0.5.0

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

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

func (*AttestationPolicySelect) Float64 added in v0.5.0

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

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

func (*AttestationPolicySelect) Float64X added in v0.5.0

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

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

func (*AttestationPolicySelect) Float64s added in v0.5.0

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

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

func (*AttestationPolicySelect) Float64sX added in v0.5.0

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

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

func (*AttestationPolicySelect) Int added in v0.5.0

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

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

func (*AttestationPolicySelect) IntX added in v0.5.0

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

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

func (*AttestationPolicySelect) Ints added in v0.5.0

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

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

func (*AttestationPolicySelect) IntsX added in v0.5.0

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

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

func (*AttestationPolicySelect) Scan added in v0.5.0

func (aps *AttestationPolicySelect) Scan(ctx context.Context, v any) error

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

func (*AttestationPolicySelect) ScanX added in v0.5.0

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

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

func (*AttestationPolicySelect) String added in v0.5.0

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

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

func (*AttestationPolicySelect) StringX added in v0.5.0

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

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

func (*AttestationPolicySelect) Strings added in v0.5.0

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

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

func (*AttestationPolicySelect) StringsX added in v0.5.0

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

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

type AttestationPolicyUpdate added in v0.5.0

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

AttestationPolicyUpdate is the builder for updating AttestationPolicy entities.

func (*AttestationPolicyUpdate) ClearStatement added in v0.5.0

func (apu *AttestationPolicyUpdate) ClearStatement() *AttestationPolicyUpdate

ClearStatement clears the "statement" edge to the Statement entity.

func (*AttestationPolicyUpdate) Exec added in v0.5.0

Exec executes the query.

func (*AttestationPolicyUpdate) ExecX added in v0.5.0

func (apu *AttestationPolicyUpdate) ExecX(ctx context.Context)

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

func (*AttestationPolicyUpdate) Mutation added in v0.5.0

Mutation returns the AttestationPolicyMutation object of the builder.

func (*AttestationPolicyUpdate) Save added in v0.5.0

func (apu *AttestationPolicyUpdate) Save(ctx context.Context) (int, error)

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

func (*AttestationPolicyUpdate) SaveX added in v0.5.0

func (apu *AttestationPolicyUpdate) SaveX(ctx context.Context) int

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

func (*AttestationPolicyUpdate) SetName added in v0.5.0

SetName sets the "name" field.

func (*AttestationPolicyUpdate) SetNillableName added in v0.5.0

func (apu *AttestationPolicyUpdate) SetNillableName(s *string) *AttestationPolicyUpdate

SetNillableName sets the "name" field if the given value is not nil.

func (*AttestationPolicyUpdate) SetNillableStatementID added in v0.5.0

func (apu *AttestationPolicyUpdate) SetNillableStatementID(id *uuid.UUID) *AttestationPolicyUpdate

SetNillableStatementID sets the "statement" edge to the Statement entity by ID if the given value is not nil.

func (*AttestationPolicyUpdate) SetStatement added in v0.5.0

SetStatement sets the "statement" edge to the Statement entity.

func (*AttestationPolicyUpdate) SetStatementID added in v0.5.0

func (apu *AttestationPolicyUpdate) SetStatementID(id uuid.UUID) *AttestationPolicyUpdate

SetStatementID sets the "statement" edge to the Statement entity by ID.

func (*AttestationPolicyUpdate) Where added in v0.5.0

Where appends a list predicates to the AttestationPolicyUpdate builder.

type AttestationPolicyUpdateOne added in v0.5.0

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

AttestationPolicyUpdateOne is the builder for updating a single AttestationPolicy entity.

func (*AttestationPolicyUpdateOne) ClearStatement added in v0.5.0

ClearStatement clears the "statement" edge to the Statement entity.

func (*AttestationPolicyUpdateOne) Exec added in v0.5.0

Exec executes the query on the entity.

func (*AttestationPolicyUpdateOne) ExecX added in v0.5.0

func (apuo *AttestationPolicyUpdateOne) ExecX(ctx context.Context)

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

func (*AttestationPolicyUpdateOne) Mutation added in v0.5.0

Mutation returns the AttestationPolicyMutation object of the builder.

func (*AttestationPolicyUpdateOne) Save added in v0.5.0

Save executes the query and returns the updated AttestationPolicy entity.

func (*AttestationPolicyUpdateOne) SaveX added in v0.5.0

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

func (*AttestationPolicyUpdateOne) Select added in v0.5.0

func (apuo *AttestationPolicyUpdateOne) Select(field string, fields ...string) *AttestationPolicyUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*AttestationPolicyUpdateOne) SetName added in v0.5.0

SetName sets the "name" field.

func (*AttestationPolicyUpdateOne) SetNillableName added in v0.5.0

SetNillableName sets the "name" field if the given value is not nil.

func (*AttestationPolicyUpdateOne) SetNillableStatementID added in v0.5.0

func (apuo *AttestationPolicyUpdateOne) SetNillableStatementID(id *uuid.UUID) *AttestationPolicyUpdateOne

SetNillableStatementID sets the "statement" edge to the Statement entity by ID if the given value is not nil.

func (*AttestationPolicyUpdateOne) SetStatement added in v0.5.0

SetStatement sets the "statement" edge to the Statement entity.

func (*AttestationPolicyUpdateOne) SetStatementID added in v0.5.0

SetStatementID sets the "statement" edge to the Statement entity by ID.

func (*AttestationPolicyUpdateOne) Where added in v0.5.0

Where appends a list predicates to the AttestationPolicyUpdate builder.

type AttestationPolicyWhereInput added in v0.5.0

type AttestationPolicyWhereInput struct {
	Predicates []predicate.AttestationPolicy  `json:"-"`
	Not        *AttestationPolicyWhereInput   `json:"not,omitempty"`
	Or         []*AttestationPolicyWhereInput `json:"or,omitempty"`
	And        []*AttestationPolicyWhereInput `json:"and,omitempty"`

	// "id" field predicates.
	ID      *uuid.UUID  `json:"id,omitempty"`
	IDNEQ   *uuid.UUID  `json:"idNEQ,omitempty"`
	IDIn    []uuid.UUID `json:"idIn,omitempty"`
	IDNotIn []uuid.UUID `json:"idNotIn,omitempty"`
	IDGT    *uuid.UUID  `json:"idGT,omitempty"`
	IDGTE   *uuid.UUID  `json:"idGTE,omitempty"`
	IDLT    *uuid.UUID  `json:"idLT,omitempty"`
	IDLTE   *uuid.UUID  `json:"idLTE,omitempty"`

	// "name" field predicates.
	Name             *string  `json:"name,omitempty"`
	NameNEQ          *string  `json:"nameNEQ,omitempty"`
	NameIn           []string `json:"nameIn,omitempty"`
	NameNotIn        []string `json:"nameNotIn,omitempty"`
	NameGT           *string  `json:"nameGT,omitempty"`
	NameGTE          *string  `json:"nameGTE,omitempty"`
	NameLT           *string  `json:"nameLT,omitempty"`
	NameLTE          *string  `json:"nameLTE,omitempty"`
	NameContains     *string  `json:"nameContains,omitempty"`
	NameHasPrefix    *string  `json:"nameHasPrefix,omitempty"`
	NameHasSuffix    *string  `json:"nameHasSuffix,omitempty"`
	NameEqualFold    *string  `json:"nameEqualFold,omitempty"`
	NameContainsFold *string  `json:"nameContainsFold,omitempty"`

	// "statement" edge predicates.
	HasStatement     *bool                  `json:"hasStatement,omitempty"`
	HasStatementWith []*StatementWhereInput `json:"hasStatementWith,omitempty"`
}

AttestationPolicyWhereInput represents a where input for filtering AttestationPolicy queries.

func (*AttestationPolicyWhereInput) AddPredicates added in v0.5.0

func (i *AttestationPolicyWhereInput) AddPredicates(predicates ...predicate.AttestationPolicy)

AddPredicates adds custom predicates to the where input to be used during the filtering phase.

func (*AttestationPolicyWhereInput) Filter added in v0.5.0

Filter applies the AttestationPolicyWhereInput filter on the AttestationPolicyQuery builder.

func (*AttestationPolicyWhereInput) P added in v0.5.0

P returns a predicate for filtering attestationpolicies. An error is returned if the input is empty or invalid.

type AttestationQuery

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

AttestationQuery is the builder for querying Attestation entities.

func (*AttestationQuery) Aggregate

func (aq *AttestationQuery) Aggregate(fns ...AggregateFunc) *AttestationSelect

Aggregate returns a AttestationSelect configured with the given aggregations.

func (*AttestationQuery) All

func (aq *AttestationQuery) All(ctx context.Context) ([]*Attestation, error)

All executes the query and returns a list of Attestations.

func (*AttestationQuery) AllX

func (aq *AttestationQuery) AllX(ctx context.Context) []*Attestation

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

func (*AttestationQuery) Clone

func (aq *AttestationQuery) Clone() *AttestationQuery

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

func (*AttestationQuery) CollectFields

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

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

func (*AttestationQuery) Count

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

Count returns the count of the given query.

func (*AttestationQuery) CountX

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

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

func (*AttestationQuery) Exist

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

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

func (*AttestationQuery) ExistX

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

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

func (*AttestationQuery) First

func (aq *AttestationQuery) First(ctx context.Context) (*Attestation, error)

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

func (*AttestationQuery) FirstID

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

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

func (*AttestationQuery) FirstIDX

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

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

func (*AttestationQuery) FirstX

func (aq *AttestationQuery) FirstX(ctx context.Context) *Attestation

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

func (*AttestationQuery) GroupBy

func (aq *AttestationQuery) GroupBy(field string, fields ...string) *AttestationGroupBy

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.Attestation.Query().
	GroupBy(attestation.FieldType).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*AttestationQuery) IDs

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

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

func (*AttestationQuery) IDsX

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

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

func (*AttestationQuery) Limit

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

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

func (*AttestationQuery) Offset

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

Offset to start from.

func (*AttestationQuery) Only

func (aq *AttestationQuery) Only(ctx context.Context) (*Attestation, error)

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

func (*AttestationQuery) OnlyID

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

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

func (*AttestationQuery) OnlyIDX

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

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

func (*AttestationQuery) OnlyX

func (aq *AttestationQuery) OnlyX(ctx context.Context) *Attestation

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

func (*AttestationQuery) Order

Order specifies how the records should be ordered.

func (*AttestationQuery) Paginate

func (a *AttestationQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...AttestationPaginateOption,
) (*AttestationConnection, error)

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

func (*AttestationQuery) QueryAttestationCollection

func (aq *AttestationQuery) QueryAttestationCollection() *AttestationCollectionQuery

QueryAttestationCollection chains the current query on the "attestation_collection" edge.

func (*AttestationQuery) Select

func (aq *AttestationQuery) Select(fields ...string) *AttestationSelect

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.Attestation.Query().
	Select(attestation.FieldType).
	Scan(ctx, &v)

func (*AttestationQuery) Unique

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

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

Where adds a new predicate for the AttestationQuery builder.

func (*AttestationQuery) WithAttestationCollection

func (aq *AttestationQuery) WithAttestationCollection(opts ...func(*AttestationCollectionQuery)) *AttestationQuery

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

type AttestationSelect

type AttestationSelect struct {
	*AttestationQuery
	// contains filtered or unexported fields
}

AttestationSelect is the builder for selecting fields of Attestation entities.

func (*AttestationSelect) Aggregate

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

Aggregate adds the given aggregation functions to the selector query.

func (*AttestationSelect) Bool

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

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

func (*AttestationSelect) BoolX

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

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

func (*AttestationSelect) Bools

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

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

func (*AttestationSelect) BoolsX

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

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

func (*AttestationSelect) Float64

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

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

func (*AttestationSelect) Float64X

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

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

func (*AttestationSelect) Float64s

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

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

func (*AttestationSelect) Float64sX

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

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

func (*AttestationSelect) Int

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

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

func (*AttestationSelect) IntX

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

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

func (*AttestationSelect) Ints

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

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

func (*AttestationSelect) IntsX

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

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

func (*AttestationSelect) Scan

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

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

func (*AttestationSelect) ScanX

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

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

func (*AttestationSelect) String

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

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

func (*AttestationSelect) StringX

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

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

func (*AttestationSelect) Strings

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

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

func (*AttestationSelect) StringsX

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

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

type AttestationUpdate

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

AttestationUpdate is the builder for updating Attestation entities.

func (*AttestationUpdate) ClearAttestationCollection

func (au *AttestationUpdate) ClearAttestationCollection() *AttestationUpdate

ClearAttestationCollection clears the "attestation_collection" edge to the AttestationCollection entity.

func (*AttestationUpdate) Exec

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

Exec executes the query.

func (*AttestationUpdate) ExecX

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

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

func (*AttestationUpdate) Mutation

func (au *AttestationUpdate) Mutation() *AttestationMutation

Mutation returns the AttestationMutation object of the builder.

func (*AttestationUpdate) Save

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

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

func (*AttestationUpdate) SaveX

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

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

func (*AttestationUpdate) SetAttestationCollection

func (au *AttestationUpdate) SetAttestationCollection(a *AttestationCollection) *AttestationUpdate

SetAttestationCollection sets the "attestation_collection" edge to the AttestationCollection entity.

func (*AttestationUpdate) SetAttestationCollectionID

func (au *AttestationUpdate) SetAttestationCollectionID(id uuid.UUID) *AttestationUpdate

SetAttestationCollectionID sets the "attestation_collection" edge to the AttestationCollection entity by ID.

func (*AttestationUpdate) SetNillableType

func (au *AttestationUpdate) SetNillableType(s *string) *AttestationUpdate

SetNillableType sets the "type" field if the given value is not nil.

func (*AttestationUpdate) SetType

func (au *AttestationUpdate) SetType(s string) *AttestationUpdate

SetType sets the "type" field.

func (*AttestationUpdate) Where

Where appends a list predicates to the AttestationUpdate builder.

type AttestationUpdateOne

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

AttestationUpdateOne is the builder for updating a single Attestation entity.

func (*AttestationUpdateOne) ClearAttestationCollection

func (auo *AttestationUpdateOne) ClearAttestationCollection() *AttestationUpdateOne

ClearAttestationCollection clears the "attestation_collection" edge to the AttestationCollection entity.

func (*AttestationUpdateOne) Exec

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

Exec executes the query on the entity.

func (*AttestationUpdateOne) ExecX

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

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

func (*AttestationUpdateOne) Mutation

func (auo *AttestationUpdateOne) Mutation() *AttestationMutation

Mutation returns the AttestationMutation object of the builder.

func (*AttestationUpdateOne) Save

Save executes the query and returns the updated Attestation entity.

func (*AttestationUpdateOne) SaveX

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

func (*AttestationUpdateOne) Select

func (auo *AttestationUpdateOne) Select(field string, fields ...string) *AttestationUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*AttestationUpdateOne) SetAttestationCollection

func (auo *AttestationUpdateOne) SetAttestationCollection(a *AttestationCollection) *AttestationUpdateOne

SetAttestationCollection sets the "attestation_collection" edge to the AttestationCollection entity.

func (*AttestationUpdateOne) SetAttestationCollectionID

func (auo *AttestationUpdateOne) SetAttestationCollectionID(id uuid.UUID) *AttestationUpdateOne

SetAttestationCollectionID sets the "attestation_collection" edge to the AttestationCollection entity by ID.

func (*AttestationUpdateOne) SetNillableType

func (auo *AttestationUpdateOne) SetNillableType(s *string) *AttestationUpdateOne

SetNillableType sets the "type" field if the given value is not nil.

func (*AttestationUpdateOne) SetType

SetType sets the "type" field.

func (*AttestationUpdateOne) Where

Where appends a list predicates to the AttestationUpdate builder.

type AttestationWhereInput

type AttestationWhereInput struct {
	Predicates []predicate.Attestation  `json:"-"`
	Not        *AttestationWhereInput   `json:"not,omitempty"`
	Or         []*AttestationWhereInput `json:"or,omitempty"`
	And        []*AttestationWhereInput `json:"and,omitempty"`

	// "id" field predicates.
	ID      *uuid.UUID  `json:"id,omitempty"`
	IDNEQ   *uuid.UUID  `json:"idNEQ,omitempty"`
	IDIn    []uuid.UUID `json:"idIn,omitempty"`
	IDNotIn []uuid.UUID `json:"idNotIn,omitempty"`
	IDGT    *uuid.UUID  `json:"idGT,omitempty"`
	IDGTE   *uuid.UUID  `json:"idGTE,omitempty"`
	IDLT    *uuid.UUID  `json:"idLT,omitempty"`
	IDLTE   *uuid.UUID  `json:"idLTE,omitempty"`

	// "type" field predicates.
	Type             *string  `json:"type,omitempty"`
	TypeNEQ          *string  `json:"typeNEQ,omitempty"`
	TypeIn           []string `json:"typeIn,omitempty"`
	TypeNotIn        []string `json:"typeNotIn,omitempty"`
	TypeGT           *string  `json:"typeGT,omitempty"`
	TypeGTE          *string  `json:"typeGTE,omitempty"`
	TypeLT           *string  `json:"typeLT,omitempty"`
	TypeLTE          *string  `json:"typeLTE,omitempty"`
	TypeContains     *string  `json:"typeContains,omitempty"`
	TypeHasPrefix    *string  `json:"typeHasPrefix,omitempty"`
	TypeHasSuffix    *string  `json:"typeHasSuffix,omitempty"`
	TypeEqualFold    *string  `json:"typeEqualFold,omitempty"`
	TypeContainsFold *string  `json:"typeContainsFold,omitempty"`

	// "attestation_collection" edge predicates.
	HasAttestationCollection     *bool                              `json:"hasAttestationCollection,omitempty"`
	HasAttestationCollectionWith []*AttestationCollectionWhereInput `json:"hasAttestationCollectionWith,omitempty"`
}

AttestationWhereInput represents a where input for filtering Attestation queries.

func (*AttestationWhereInput) AddPredicates

func (i *AttestationWhereInput) AddPredicates(predicates ...predicate.Attestation)

AddPredicates adds custom predicates to the where input to be used during the filtering phase.

func (*AttestationWhereInput) Filter

Filter applies the AttestationWhereInput filter on the AttestationQuery builder.

func (*AttestationWhereInput) P

P returns a predicate for filtering attestations. An error is returned if the input is empty or invalid.

type Attestations

type Attestations []*Attestation

Attestations is a parsable slice of Attestation.

type Client

type Client struct {

	// Schema is the client for creating, migrating and dropping schema.
	Schema *migrate.Schema
	// Attestation is the client for interacting with the Attestation builders.
	Attestation *AttestationClient
	// AttestationCollection is the client for interacting with the AttestationCollection builders.
	AttestationCollection *AttestationCollectionClient
	// AttestationPolicy is the client for interacting with the AttestationPolicy builders.
	AttestationPolicy *AttestationPolicyClient
	// Dsse is the client for interacting with the Dsse builders.
	Dsse *DsseClient
	// PayloadDigest is the client for interacting with the PayloadDigest builders.
	PayloadDigest *PayloadDigestClient
	// Signature is the client for interacting with the Signature builders.
	Signature *SignatureClient
	// Statement is the client for interacting with the Statement builders.
	Statement *StatementClient
	// Subject is the client for interacting with the Subject builders.
	Subject *SubjectClient
	// SubjectDigest is the client for interacting with the SubjectDigest builders.
	SubjectDigest *SubjectDigestClient
	// Timestamp is the client for interacting with the Timestamp builders.
	Timestamp *TimestampClient
	// 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().
	Attestation.
	Query().
	Count(ctx)

func (*Client) Intercept

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

Intercept adds the query interceptors to all the entity clients. In order to add interceptors to a specific client, call: `client.Node.Intercept(...)`.

func (*Client) Mutate

func (c *Client) Mutate(ctx context.Context, m Mutation) (Value, error)

Mutate implements the ent.Mutator interface.

func (*Client) Noder

func (c *Client) Noder(ctx context.Context, id uuid.UUID, opts ...NodeOption) (_ Noder, err error)

Noder returns a Node by its id. If the NodeType was not provided, it will be derived from the id value according to the universal-id configuration.

c.Noder(ctx, id)
c.Noder(ctx, id, ent.WithNodeType(typeResolver))

func (*Client) Noders

func (c *Client) Noders(ctx context.Context, ids []uuid.UUID, opts ...NodeOption) ([]Noder, error)

func (*Client) OpenTx

func (c *Client) OpenTx(ctx context.Context) (context.Context, driver.Tx, error)

OpenTx opens a transaction and returns a transactional context along with the created transaction.

func (*Client) Tx

func (c *Client) Tx(ctx context.Context) (*Tx, error)

Tx returns a new transactional client. The provided context is used until the transaction is committed or rolled back.

func (*Client) Use

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

Use adds the mutation hooks to all the entity clients. In order to add hooks to a specific client, call: `client.Node.Use(...)`.

type CommitFunc

type CommitFunc func(context.Context, *Tx) error

The CommitFunc type is an adapter to allow the use of ordinary function as a Committer. If f is a function with the appropriate signature, CommitFunc(f) is a Committer that calls f.

func (CommitFunc) Commit

func (f CommitFunc) Commit(ctx context.Context, tx *Tx) error

Commit calls f(ctx, m).

type CommitHook

type CommitHook func(Committer) Committer

CommitHook defines the "commit middleware". A function that gets a Committer and returns a Committer. For example:

hook := func(next ent.Committer) ent.Committer {
	return ent.CommitFunc(func(ctx context.Context, tx *ent.Tx) error {
		// Do some stuff before.
		if err := next.Commit(ctx, tx); err != nil {
			return err
		}
		// Do some stuff after.
		return nil
	})
}

type Committer

type Committer interface {
	Commit(context.Context, *Tx) error
}

Committer is the interface that wraps the Commit method.

type ConstraintError

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

ConstraintError returns when trying to create/update one or more entities and one or more of their constraints failed. For example, violation of edge or field uniqueness.

func (ConstraintError) Error

func (e ConstraintError) Error() string

Error implements the error interface.

func (*ConstraintError) Unwrap

func (e *ConstraintError) Unwrap() error

Unwrap implements the errors.Wrapper interface.

type Cursor

type Cursor = entgql.Cursor[uuid.UUID]

Common entgql types.

type Dsse

type Dsse struct {

	// ID of the ent.
	ID uuid.UUID `json:"id,omitempty"`
	// GitoidSha256 holds the value of the "gitoid_sha256" field.
	GitoidSha256 string `json:"gitoid_sha256,omitempty"`
	// PayloadType holds the value of the "payload_type" field.
	PayloadType string `json:"payload_type,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the DsseQuery when eager-loading is set.
	Edges DsseEdges `json:"edges"`
	// contains filtered or unexported fields
}

Dsse is the model entity for the Dsse schema.

func (*Dsse) IsNode

func (*Dsse) IsNode()

IsNode implements the Node interface check for GQLGen.

func (*Dsse) NamedPayloadDigests

func (d *Dsse) NamedPayloadDigests(name string) ([]*PayloadDigest, error)

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

func (*Dsse) NamedSignatures

func (d *Dsse) NamedSignatures(name string) ([]*Signature, error)

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

func (*Dsse) PayloadDigests

func (d *Dsse) PayloadDigests(ctx context.Context) (result []*PayloadDigest, err error)

func (*Dsse) QueryPayloadDigests

func (d *Dsse) QueryPayloadDigests() *PayloadDigestQuery

QueryPayloadDigests queries the "payload_digests" edge of the Dsse entity.

func (*Dsse) QuerySignatures

func (d *Dsse) QuerySignatures() *SignatureQuery

QuerySignatures queries the "signatures" edge of the Dsse entity.

func (*Dsse) QueryStatement

func (d *Dsse) QueryStatement() *StatementQuery

QueryStatement queries the "statement" edge of the Dsse entity.

func (*Dsse) Signatures

func (d *Dsse) Signatures(ctx context.Context) (result []*Signature, err error)

func (*Dsse) Statement

func (d *Dsse) Statement(ctx context.Context) (*Statement, error)

func (*Dsse) String

func (d *Dsse) String() string

String implements the fmt.Stringer.

func (*Dsse) ToEdge

func (d *Dsse) ToEdge(order *DsseOrder) *DsseEdge

ToEdge converts Dsse into DsseEdge.

func (*Dsse) Unwrap

func (d *Dsse) Unwrap() *Dsse

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

func (d *Dsse) Update() *DsseUpdateOne

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

func (*Dsse) Value

func (d *Dsse) Value(name string) (ent.Value, error)

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

type DsseClient

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

DsseClient is a client for the Dsse schema.

func NewDsseClient

func NewDsseClient(c config) *DsseClient

NewDsseClient returns a client for the Dsse from the given config.

func (*DsseClient) Create

func (c *DsseClient) Create() *DsseCreate

Create returns a builder for creating a Dsse entity.

func (*DsseClient) CreateBulk

func (c *DsseClient) CreateBulk(builders ...*DsseCreate) *DsseCreateBulk

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

func (*DsseClient) Delete

func (c *DsseClient) Delete() *DsseDelete

Delete returns a delete builder for Dsse.

func (*DsseClient) DeleteOne

func (c *DsseClient) DeleteOne(d *Dsse) *DsseDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*DsseClient) DeleteOneID

func (c *DsseClient) DeleteOneID(id uuid.UUID) *DsseDeleteOne

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

func (*DsseClient) Get

func (c *DsseClient) Get(ctx context.Context, id uuid.UUID) (*Dsse, error)

Get returns a Dsse entity by its id.

func (*DsseClient) GetX

func (c *DsseClient) GetX(ctx context.Context, id uuid.UUID) *Dsse

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

func (*DsseClient) Hooks

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

Hooks returns the client hooks.

func (*DsseClient) Intercept

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

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

func (*DsseClient) Interceptors

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

Interceptors returns the client interceptors.

func (*DsseClient) MapCreateBulk

func (c *DsseClient) MapCreateBulk(slice any, setFunc func(*DsseCreate, int)) *DsseCreateBulk

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

func (c *DsseClient) Query() *DsseQuery

Query returns a query builder for Dsse.

func (*DsseClient) QueryPayloadDigests

func (c *DsseClient) QueryPayloadDigests(d *Dsse) *PayloadDigestQuery

QueryPayloadDigests queries the payload_digests edge of a Dsse.

func (*DsseClient) QuerySignatures

func (c *DsseClient) QuerySignatures(d *Dsse) *SignatureQuery

QuerySignatures queries the signatures edge of a Dsse.

func (*DsseClient) QueryStatement

func (c *DsseClient) QueryStatement(d *Dsse) *StatementQuery

QueryStatement queries the statement edge of a Dsse.

func (*DsseClient) Update

func (c *DsseClient) Update() *DsseUpdate

Update returns an update builder for Dsse.

func (*DsseClient) UpdateOne

func (c *DsseClient) UpdateOne(d *Dsse) *DsseUpdateOne

UpdateOne returns an update builder for the given entity.

func (*DsseClient) UpdateOneID

func (c *DsseClient) UpdateOneID(id uuid.UUID) *DsseUpdateOne

UpdateOneID returns an update builder for the given id.

func (*DsseClient) Use

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

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

type DsseConnection

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

DsseConnection is the connection containing edges to Dsse.

type DsseCreate

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

DsseCreate is the builder for creating a Dsse entity.

func (*DsseCreate) AddPayloadDigestIDs

func (dc *DsseCreate) AddPayloadDigestIDs(ids ...uuid.UUID) *DsseCreate

AddPayloadDigestIDs adds the "payload_digests" edge to the PayloadDigest entity by IDs.

func (*DsseCreate) AddPayloadDigests

func (dc *DsseCreate) AddPayloadDigests(p ...*PayloadDigest) *DsseCreate

AddPayloadDigests adds the "payload_digests" edges to the PayloadDigest entity.

func (*DsseCreate) AddSignatureIDs

func (dc *DsseCreate) AddSignatureIDs(ids ...uuid.UUID) *DsseCreate

AddSignatureIDs adds the "signatures" edge to the Signature entity by IDs.

func (*DsseCreate) AddSignatures

func (dc *DsseCreate) AddSignatures(s ...*Signature) *DsseCreate

AddSignatures adds the "signatures" edges to the Signature entity.

func (*DsseCreate) Exec

func (dc *DsseCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*DsseCreate) ExecX

func (dc *DsseCreate) ExecX(ctx context.Context)

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

func (*DsseCreate) Mutation

func (dc *DsseCreate) Mutation() *DsseMutation

Mutation returns the DsseMutation object of the builder.

func (*DsseCreate) Save

func (dc *DsseCreate) Save(ctx context.Context) (*Dsse, error)

Save creates the Dsse in the database.

func (*DsseCreate) SaveX

func (dc *DsseCreate) SaveX(ctx context.Context) *Dsse

SaveX calls Save and panics if Save returns an error.

func (*DsseCreate) SetGitoidSha256

func (dc *DsseCreate) SetGitoidSha256(s string) *DsseCreate

SetGitoidSha256 sets the "gitoid_sha256" field.

func (*DsseCreate) SetID added in v0.5.0

func (dc *DsseCreate) SetID(u uuid.UUID) *DsseCreate

SetID sets the "id" field.

func (*DsseCreate) SetNillableID added in v0.5.0

func (dc *DsseCreate) SetNillableID(u *uuid.UUID) *DsseCreate

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

func (*DsseCreate) SetNillableStatementID

func (dc *DsseCreate) SetNillableStatementID(id *uuid.UUID) *DsseCreate

SetNillableStatementID sets the "statement" edge to the Statement entity by ID if the given value is not nil.

func (*DsseCreate) SetPayloadType

func (dc *DsseCreate) SetPayloadType(s string) *DsseCreate

SetPayloadType sets the "payload_type" field.

func (*DsseCreate) SetStatement

func (dc *DsseCreate) SetStatement(s *Statement) *DsseCreate

SetStatement sets the "statement" edge to the Statement entity.

func (*DsseCreate) SetStatementID

func (dc *DsseCreate) SetStatementID(id uuid.UUID) *DsseCreate

SetStatementID sets the "statement" edge to the Statement entity by ID.

type DsseCreateBulk

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

DsseCreateBulk is the builder for creating many Dsse entities in bulk.

func (*DsseCreateBulk) Exec

func (dcb *DsseCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*DsseCreateBulk) ExecX

func (dcb *DsseCreateBulk) ExecX(ctx context.Context)

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

func (*DsseCreateBulk) Save

func (dcb *DsseCreateBulk) Save(ctx context.Context) ([]*Dsse, error)

Save creates the Dsse entities in the database.

func (*DsseCreateBulk) SaveX

func (dcb *DsseCreateBulk) SaveX(ctx context.Context) []*Dsse

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

type DsseDelete

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

DsseDelete is the builder for deleting a Dsse entity.

func (*DsseDelete) Exec

func (dd *DsseDelete) Exec(ctx context.Context) (int, error)

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

func (*DsseDelete) ExecX

func (dd *DsseDelete) ExecX(ctx context.Context) int

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

func (*DsseDelete) Where

func (dd *DsseDelete) Where(ps ...predicate.Dsse) *DsseDelete

Where appends a list predicates to the DsseDelete builder.

type DsseDeleteOne

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

DsseDeleteOne is the builder for deleting a single Dsse entity.

func (*DsseDeleteOne) Exec

func (ddo *DsseDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*DsseDeleteOne) ExecX

func (ddo *DsseDeleteOne) ExecX(ctx context.Context)

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

func (*DsseDeleteOne) Where

func (ddo *DsseDeleteOne) Where(ps ...predicate.Dsse) *DsseDeleteOne

Where appends a list predicates to the DsseDelete builder.

type DsseEdge

type DsseEdge struct {
	Node   *Dsse  `json:"node"`
	Cursor Cursor `json:"cursor"`
}

DsseEdge is the edge representation of Dsse.

type DsseEdges

type DsseEdges struct {
	// Statement holds the value of the statement edge.
	Statement *Statement `json:"statement,omitempty"`
	// Signatures holds the value of the signatures edge.
	Signatures []*Signature `json:"signatures,omitempty"`
	// PayloadDigests holds the value of the payload_digests edge.
	PayloadDigests []*PayloadDigest `json:"payload_digests,omitempty"`
	// contains filtered or unexported fields
}

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

func (DsseEdges) PayloadDigestsOrErr

func (e DsseEdges) PayloadDigestsOrErr() ([]*PayloadDigest, error)

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

func (DsseEdges) SignaturesOrErr

func (e DsseEdges) SignaturesOrErr() ([]*Signature, error)

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

func (DsseEdges) StatementOrErr

func (e DsseEdges) StatementOrErr() (*Statement, error)

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

type DsseGroupBy

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

DsseGroupBy is the group-by builder for Dsse entities.

func (*DsseGroupBy) Aggregate

func (dgb *DsseGroupBy) Aggregate(fns ...AggregateFunc) *DsseGroupBy

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

func (*DsseGroupBy) Bool

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

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

func (*DsseGroupBy) BoolX

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

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

func (*DsseGroupBy) Bools

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

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

func (*DsseGroupBy) BoolsX

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

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

func (*DsseGroupBy) Float64

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

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

func (*DsseGroupBy) Float64X

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

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

func (*DsseGroupBy) Float64s

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

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

func (*DsseGroupBy) Float64sX

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

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

func (*DsseGroupBy) Int

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

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

func (*DsseGroupBy) IntX

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

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

func (*DsseGroupBy) Ints

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

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

func (*DsseGroupBy) IntsX

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

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

func (*DsseGroupBy) Scan

func (dgb *DsseGroupBy) Scan(ctx context.Context, v any) error

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

func (*DsseGroupBy) ScanX

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

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

func (*DsseGroupBy) String

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

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

func (*DsseGroupBy) StringX

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

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

func (*DsseGroupBy) Strings

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

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

func (*DsseGroupBy) StringsX

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

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

type DsseMutation

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

DsseMutation represents an operation that mutates the Dsse nodes in the graph.

func (*DsseMutation) AddField

func (m *DsseMutation) 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 (*DsseMutation) AddPayloadDigestIDs

func (m *DsseMutation) AddPayloadDigestIDs(ids ...uuid.UUID)

AddPayloadDigestIDs adds the "payload_digests" edge to the PayloadDigest entity by ids.

func (*DsseMutation) AddSignatureIDs

func (m *DsseMutation) AddSignatureIDs(ids ...uuid.UUID)

AddSignatureIDs adds the "signatures" edge to the Signature entity by ids.

func (*DsseMutation) AddedEdges

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

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

func (*DsseMutation) AddedField

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

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

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

func (*DsseMutation) AddedIDs

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

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

func (*DsseMutation) ClearEdge

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

func (m *DsseMutation) 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 (*DsseMutation) ClearPayloadDigests

func (m *DsseMutation) ClearPayloadDigests()

ClearPayloadDigests clears the "payload_digests" edge to the PayloadDigest entity.

func (*DsseMutation) ClearSignatures

func (m *DsseMutation) ClearSignatures()

ClearSignatures clears the "signatures" edge to the Signature entity.

func (*DsseMutation) ClearStatement

func (m *DsseMutation) ClearStatement()

ClearStatement clears the "statement" edge to the Statement entity.

func (*DsseMutation) ClearedEdges

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

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

func (*DsseMutation) ClearedFields

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

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

func (DsseMutation) Client

func (m DsseMutation) 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 (*DsseMutation) EdgeCleared

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

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

func (*DsseMutation) Field

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

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

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

func (*DsseMutation) Fields

func (m *DsseMutation) 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 (*DsseMutation) GitoidSha256

func (m *DsseMutation) GitoidSha256() (r string, exists bool)

GitoidSha256 returns the value of the "gitoid_sha256" field in the mutation.

func (*DsseMutation) ID

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

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

func (*DsseMutation) IDs

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

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

func (*DsseMutation) OldField

func (m *DsseMutation) 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 (*DsseMutation) OldGitoidSha256

func (m *DsseMutation) OldGitoidSha256(ctx context.Context) (v string, err error)

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

func (*DsseMutation) OldPayloadType

func (m *DsseMutation) OldPayloadType(ctx context.Context) (v string, err error)

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

func (*DsseMutation) Op

func (m *DsseMutation) Op() Op

Op returns the operation name.

func (*DsseMutation) PayloadDigestsCleared

func (m *DsseMutation) PayloadDigestsCleared() bool

PayloadDigestsCleared reports if the "payload_digests" edge to the PayloadDigest entity was cleared.

func (*DsseMutation) PayloadDigestsIDs

func (m *DsseMutation) PayloadDigestsIDs() (ids []uuid.UUID)

PayloadDigestsIDs returns the "payload_digests" edge IDs in the mutation.

func (*DsseMutation) PayloadType

func (m *DsseMutation) PayloadType() (r string, exists bool)

PayloadType returns the value of the "payload_type" field in the mutation.

func (*DsseMutation) RemovePayloadDigestIDs

func (m *DsseMutation) RemovePayloadDigestIDs(ids ...uuid.UUID)

RemovePayloadDigestIDs removes the "payload_digests" edge to the PayloadDigest entity by IDs.

func (*DsseMutation) RemoveSignatureIDs

func (m *DsseMutation) RemoveSignatureIDs(ids ...uuid.UUID)

RemoveSignatureIDs removes the "signatures" edge to the Signature entity by IDs.

func (*DsseMutation) RemovedEdges

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

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

func (*DsseMutation) RemovedIDs

func (m *DsseMutation) 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 (*DsseMutation) RemovedPayloadDigestsIDs

func (m *DsseMutation) RemovedPayloadDigestsIDs() (ids []uuid.UUID)

RemovedPayloadDigests returns the removed IDs of the "payload_digests" edge to the PayloadDigest entity.

func (*DsseMutation) RemovedSignaturesIDs

func (m *DsseMutation) RemovedSignaturesIDs() (ids []uuid.UUID)

RemovedSignatures returns the removed IDs of the "signatures" edge to the Signature entity.

func (*DsseMutation) ResetEdge

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

func (m *DsseMutation) 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 (*DsseMutation) ResetGitoidSha256

func (m *DsseMutation) ResetGitoidSha256()

ResetGitoidSha256 resets all changes to the "gitoid_sha256" field.

func (*DsseMutation) ResetPayloadDigests

func (m *DsseMutation) ResetPayloadDigests()

ResetPayloadDigests resets all changes to the "payload_digests" edge.

func (*DsseMutation) ResetPayloadType

func (m *DsseMutation) ResetPayloadType()

ResetPayloadType resets all changes to the "payload_type" field.

func (*DsseMutation) ResetSignatures

func (m *DsseMutation) ResetSignatures()

ResetSignatures resets all changes to the "signatures" edge.

func (*DsseMutation) ResetStatement

func (m *DsseMutation) ResetStatement()

ResetStatement resets all changes to the "statement" edge.

func (*DsseMutation) SetField

func (m *DsseMutation) 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 (*DsseMutation) SetGitoidSha256

func (m *DsseMutation) SetGitoidSha256(s string)

SetGitoidSha256 sets the "gitoid_sha256" field.

func (*DsseMutation) SetID added in v0.5.0

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

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

func (*DsseMutation) SetOp

func (m *DsseMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*DsseMutation) SetPayloadType

func (m *DsseMutation) SetPayloadType(s string)

SetPayloadType sets the "payload_type" field.

func (*DsseMutation) SetStatementID

func (m *DsseMutation) SetStatementID(id uuid.UUID)

SetStatementID sets the "statement" edge to the Statement entity by id.

func (*DsseMutation) SignaturesCleared

func (m *DsseMutation) SignaturesCleared() bool

SignaturesCleared reports if the "signatures" edge to the Signature entity was cleared.

func (*DsseMutation) SignaturesIDs

func (m *DsseMutation) SignaturesIDs() (ids []uuid.UUID)

SignaturesIDs returns the "signatures" edge IDs in the mutation.

func (*DsseMutation) StatementCleared

func (m *DsseMutation) StatementCleared() bool

StatementCleared reports if the "statement" edge to the Statement entity was cleared.

func (*DsseMutation) StatementID

func (m *DsseMutation) StatementID() (id uuid.UUID, exists bool)

StatementID returns the "statement" edge ID in the mutation.

func (*DsseMutation) StatementIDs

func (m *DsseMutation) StatementIDs() (ids []uuid.UUID)

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

func (DsseMutation) Tx

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

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

func (*DsseMutation) Type

func (m *DsseMutation) Type() string

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

func (*DsseMutation) Where

func (m *DsseMutation) Where(ps ...predicate.Dsse)

Where appends a list predicates to the DsseMutation builder.

func (*DsseMutation) WhereP

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

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

type DsseOrder

type DsseOrder struct {
	Direction OrderDirection  `json:"direction"`
	Field     *DsseOrderField `json:"field"`
}

DsseOrder defines the ordering of Dsse.

type DsseOrderField

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

DsseOrderField defines the ordering field of Dsse.

type DssePaginateOption

type DssePaginateOption func(*dssePager) error

DssePaginateOption enables pagination customization.

func WithDsseFilter

func WithDsseFilter(filter func(*DsseQuery) (*DsseQuery, error)) DssePaginateOption

WithDsseFilter configures pagination filter.

func WithDsseOrder

func WithDsseOrder(order *DsseOrder) DssePaginateOption

WithDsseOrder configures pagination ordering.

type DsseQuery

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

DsseQuery is the builder for querying Dsse entities.

func (*DsseQuery) Aggregate

func (dq *DsseQuery) Aggregate(fns ...AggregateFunc) *DsseSelect

Aggregate returns a DsseSelect configured with the given aggregations.

func (*DsseQuery) All

func (dq *DsseQuery) All(ctx context.Context) ([]*Dsse, error)

All executes the query and returns a list of Dsses.

func (*DsseQuery) AllX

func (dq *DsseQuery) AllX(ctx context.Context) []*Dsse

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

func (*DsseQuery) Clone

func (dq *DsseQuery) Clone() *DsseQuery

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

func (*DsseQuery) CollectFields

func (d *DsseQuery) CollectFields(ctx context.Context, satisfies ...string) (*DsseQuery, error)

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

func (*DsseQuery) Count

func (dq *DsseQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*DsseQuery) CountX

func (dq *DsseQuery) CountX(ctx context.Context) int

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

func (*DsseQuery) Exist

func (dq *DsseQuery) Exist(ctx context.Context) (bool, error)

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

func (*DsseQuery) ExistX

func (dq *DsseQuery) ExistX(ctx context.Context) bool

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

func (*DsseQuery) First

func (dq *DsseQuery) First(ctx context.Context) (*Dsse, error)

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

func (*DsseQuery) FirstID

func (dq *DsseQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)

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

func (*DsseQuery) FirstIDX

func (dq *DsseQuery) FirstIDX(ctx context.Context) uuid.UUID

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

func (*DsseQuery) FirstX

func (dq *DsseQuery) FirstX(ctx context.Context) *Dsse

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

func (*DsseQuery) GroupBy

func (dq *DsseQuery) GroupBy(field string, fields ...string) *DsseGroupBy

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

client.Dsse.Query().
	GroupBy(dsse.FieldGitoidSha256).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*DsseQuery) IDs

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

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

func (*DsseQuery) IDsX

func (dq *DsseQuery) IDsX(ctx context.Context) []uuid.UUID

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

func (*DsseQuery) Limit

func (dq *DsseQuery) Limit(limit int) *DsseQuery

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

func (*DsseQuery) Offset

func (dq *DsseQuery) Offset(offset int) *DsseQuery

Offset to start from.

func (*DsseQuery) Only

func (dq *DsseQuery) Only(ctx context.Context) (*Dsse, error)

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

func (*DsseQuery) OnlyID

func (dq *DsseQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)

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

func (*DsseQuery) OnlyIDX

func (dq *DsseQuery) OnlyIDX(ctx context.Context) uuid.UUID

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

func (*DsseQuery) OnlyX

func (dq *DsseQuery) OnlyX(ctx context.Context) *Dsse

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

func (*DsseQuery) Order

func (dq *DsseQuery) Order(o ...dsse.OrderOption) *DsseQuery

Order specifies how the records should be ordered.

func (*DsseQuery) Paginate

func (d *DsseQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...DssePaginateOption,
) (*DsseConnection, error)

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

func (*DsseQuery) QueryPayloadDigests

func (dq *DsseQuery) QueryPayloadDigests() *PayloadDigestQuery

QueryPayloadDigests chains the current query on the "payload_digests" edge.

func (*DsseQuery) QuerySignatures

func (dq *DsseQuery) QuerySignatures() *SignatureQuery

QuerySignatures chains the current query on the "signatures" edge.

func (*DsseQuery) QueryStatement

func (dq *DsseQuery) QueryStatement() *StatementQuery

QueryStatement chains the current query on the "statement" edge.

func (*DsseQuery) Select

func (dq *DsseQuery) Select(fields ...string) *DsseSelect

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 {
	GitoidSha256 string `json:"gitoid_sha256,omitempty"`
}

client.Dsse.Query().
	Select(dsse.FieldGitoidSha256).
	Scan(ctx, &v)

func (*DsseQuery) Unique

func (dq *DsseQuery) Unique(unique bool) *DsseQuery

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

func (dq *DsseQuery) Where(ps ...predicate.Dsse) *DsseQuery

Where adds a new predicate for the DsseQuery builder.

func (*DsseQuery) WithNamedPayloadDigests

func (dq *DsseQuery) WithNamedPayloadDigests(name string, opts ...func(*PayloadDigestQuery)) *DsseQuery

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

func (*DsseQuery) WithNamedSignatures

func (dq *DsseQuery) WithNamedSignatures(name string, opts ...func(*SignatureQuery)) *DsseQuery

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

func (*DsseQuery) WithPayloadDigests

func (dq *DsseQuery) WithPayloadDigests(opts ...func(*PayloadDigestQuery)) *DsseQuery

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

func (*DsseQuery) WithSignatures

func (dq *DsseQuery) WithSignatures(opts ...func(*SignatureQuery)) *DsseQuery

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

func (*DsseQuery) WithStatement

func (dq *DsseQuery) WithStatement(opts ...func(*StatementQuery)) *DsseQuery

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

type DsseSelect

type DsseSelect struct {
	*DsseQuery
	// contains filtered or unexported fields
}

DsseSelect is the builder for selecting fields of Dsse entities.

func (*DsseSelect) Aggregate

func (ds *DsseSelect) Aggregate(fns ...AggregateFunc) *DsseSelect

Aggregate adds the given aggregation functions to the selector query.

func (*DsseSelect) Bool

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

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

func (*DsseSelect) BoolX

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

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

func (*DsseSelect) Bools

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

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

func (*DsseSelect) BoolsX

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

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

func (*DsseSelect) Float64

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

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

func (*DsseSelect) Float64X

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

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

func (*DsseSelect) Float64s

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

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

func (*DsseSelect) Float64sX

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

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

func (*DsseSelect) Int

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

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

func (*DsseSelect) IntX

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

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

func (*DsseSelect) Ints

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

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

func (*DsseSelect) IntsX

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

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

func (*DsseSelect) Scan

func (ds *DsseSelect) Scan(ctx context.Context, v any) error

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

func (*DsseSelect) ScanX

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

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

func (*DsseSelect) String

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

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

func (*DsseSelect) StringX

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

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

func (*DsseSelect) Strings

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

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

func (*DsseSelect) StringsX

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

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

type DsseUpdate

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

DsseUpdate is the builder for updating Dsse entities.

func (*DsseUpdate) AddPayloadDigestIDs

func (du *DsseUpdate) AddPayloadDigestIDs(ids ...uuid.UUID) *DsseUpdate

AddPayloadDigestIDs adds the "payload_digests" edge to the PayloadDigest entity by IDs.

func (*DsseUpdate) AddPayloadDigests

func (du *DsseUpdate) AddPayloadDigests(p ...*PayloadDigest) *DsseUpdate

AddPayloadDigests adds the "payload_digests" edges to the PayloadDigest entity.

func (*DsseUpdate) AddSignatureIDs

func (du *DsseUpdate) AddSignatureIDs(ids ...uuid.UUID) *DsseUpdate

AddSignatureIDs adds the "signatures" edge to the Signature entity by IDs.

func (*DsseUpdate) AddSignatures

func (du *DsseUpdate) AddSignatures(s ...*Signature) *DsseUpdate

AddSignatures adds the "signatures" edges to the Signature entity.

func (*DsseUpdate) ClearPayloadDigests

func (du *DsseUpdate) ClearPayloadDigests() *DsseUpdate

ClearPayloadDigests clears all "payload_digests" edges to the PayloadDigest entity.

func (*DsseUpdate) ClearSignatures

func (du *DsseUpdate) ClearSignatures() *DsseUpdate

ClearSignatures clears all "signatures" edges to the Signature entity.

func (*DsseUpdate) ClearStatement

func (du *DsseUpdate) ClearStatement() *DsseUpdate

ClearStatement clears the "statement" edge to the Statement entity.

func (*DsseUpdate) Exec

func (du *DsseUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*DsseUpdate) ExecX

func (du *DsseUpdate) ExecX(ctx context.Context)

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

func (*DsseUpdate) Mutation

func (du *DsseUpdate) Mutation() *DsseMutation

Mutation returns the DsseMutation object of the builder.

func (*DsseUpdate) RemovePayloadDigestIDs

func (du *DsseUpdate) RemovePayloadDigestIDs(ids ...uuid.UUID) *DsseUpdate

RemovePayloadDigestIDs removes the "payload_digests" edge to PayloadDigest entities by IDs.

func (*DsseUpdate) RemovePayloadDigests

func (du *DsseUpdate) RemovePayloadDigests(p ...*PayloadDigest) *DsseUpdate

RemovePayloadDigests removes "payload_digests" edges to PayloadDigest entities.

func (*DsseUpdate) RemoveSignatureIDs

func (du *DsseUpdate) RemoveSignatureIDs(ids ...uuid.UUID) *DsseUpdate

RemoveSignatureIDs removes the "signatures" edge to Signature entities by IDs.

func (*DsseUpdate) RemoveSignatures

func (du *DsseUpdate) RemoveSignatures(s ...*Signature) *DsseUpdate

RemoveSignatures removes "signatures" edges to Signature entities.

func (*DsseUpdate) Save

func (du *DsseUpdate) Save(ctx context.Context) (int, error)

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

func (*DsseUpdate) SaveX

func (du *DsseUpdate) SaveX(ctx context.Context) int

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

func (*DsseUpdate) SetGitoidSha256

func (du *DsseUpdate) SetGitoidSha256(s string) *DsseUpdate

SetGitoidSha256 sets the "gitoid_sha256" field.

func (*DsseUpdate) SetNillableGitoidSha256

func (du *DsseUpdate) SetNillableGitoidSha256(s *string) *DsseUpdate

SetNillableGitoidSha256 sets the "gitoid_sha256" field if the given value is not nil.

func (*DsseUpdate) SetNillablePayloadType

func (du *DsseUpdate) SetNillablePayloadType(s *string) *DsseUpdate

SetNillablePayloadType sets the "payload_type" field if the given value is not nil.

func (*DsseUpdate) SetNillableStatementID

func (du *DsseUpdate) SetNillableStatementID(id *uuid.UUID) *DsseUpdate

SetNillableStatementID sets the "statement" edge to the Statement entity by ID if the given value is not nil.

func (*DsseUpdate) SetPayloadType

func (du *DsseUpdate) SetPayloadType(s string) *DsseUpdate

SetPayloadType sets the "payload_type" field.

func (*DsseUpdate) SetStatement

func (du *DsseUpdate) SetStatement(s *Statement) *DsseUpdate

SetStatement sets the "statement" edge to the Statement entity.

func (*DsseUpdate) SetStatementID

func (du *DsseUpdate) SetStatementID(id uuid.UUID) *DsseUpdate

SetStatementID sets the "statement" edge to the Statement entity by ID.

func (*DsseUpdate) Where

func (du *DsseUpdate) Where(ps ...predicate.Dsse) *DsseUpdate

Where appends a list predicates to the DsseUpdate builder.

type DsseUpdateOne

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

DsseUpdateOne is the builder for updating a single Dsse entity.

func (*DsseUpdateOne) AddPayloadDigestIDs

func (duo *DsseUpdateOne) AddPayloadDigestIDs(ids ...uuid.UUID) *DsseUpdateOne

AddPayloadDigestIDs adds the "payload_digests" edge to the PayloadDigest entity by IDs.

func (*DsseUpdateOne) AddPayloadDigests

func (duo *DsseUpdateOne) AddPayloadDigests(p ...*PayloadDigest) *DsseUpdateOne

AddPayloadDigests adds the "payload_digests" edges to the PayloadDigest entity.

func (*DsseUpdateOne) AddSignatureIDs

func (duo *DsseUpdateOne) AddSignatureIDs(ids ...uuid.UUID) *DsseUpdateOne

AddSignatureIDs adds the "signatures" edge to the Signature entity by IDs.

func (*DsseUpdateOne) AddSignatures

func (duo *DsseUpdateOne) AddSignatures(s ...*Signature) *DsseUpdateOne

AddSignatures adds the "signatures" edges to the Signature entity.

func (*DsseUpdateOne) ClearPayloadDigests

func (duo *DsseUpdateOne) ClearPayloadDigests() *DsseUpdateOne

ClearPayloadDigests clears all "payload_digests" edges to the PayloadDigest entity.

func (*DsseUpdateOne) ClearSignatures

func (duo *DsseUpdateOne) ClearSignatures() *DsseUpdateOne

ClearSignatures clears all "signatures" edges to the Signature entity.

func (*DsseUpdateOne) ClearStatement

func (duo *DsseUpdateOne) ClearStatement() *DsseUpdateOne

ClearStatement clears the "statement" edge to the Statement entity.

func (*DsseUpdateOne) Exec

func (duo *DsseUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*DsseUpdateOne) ExecX

func (duo *DsseUpdateOne) ExecX(ctx context.Context)

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

func (*DsseUpdateOne) Mutation

func (duo *DsseUpdateOne) Mutation() *DsseMutation

Mutation returns the DsseMutation object of the builder.

func (*DsseUpdateOne) RemovePayloadDigestIDs

func (duo *DsseUpdateOne) RemovePayloadDigestIDs(ids ...uuid.UUID) *DsseUpdateOne

RemovePayloadDigestIDs removes the "payload_digests" edge to PayloadDigest entities by IDs.

func (*DsseUpdateOne) RemovePayloadDigests

func (duo *DsseUpdateOne) RemovePayloadDigests(p ...*PayloadDigest) *DsseUpdateOne

RemovePayloadDigests removes "payload_digests" edges to PayloadDigest entities.

func (*DsseUpdateOne) RemoveSignatureIDs

func (duo *DsseUpdateOne) RemoveSignatureIDs(ids ...uuid.UUID) *DsseUpdateOne

RemoveSignatureIDs removes the "signatures" edge to Signature entities by IDs.

func (*DsseUpdateOne) RemoveSignatures

func (duo *DsseUpdateOne) RemoveSignatures(s ...*Signature) *DsseUpdateOne

RemoveSignatures removes "signatures" edges to Signature entities.

func (*DsseUpdateOne) Save

func (duo *DsseUpdateOne) Save(ctx context.Context) (*Dsse, error)

Save executes the query and returns the updated Dsse entity.

func (*DsseUpdateOne) SaveX

func (duo *DsseUpdateOne) SaveX(ctx context.Context) *Dsse

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

func (*DsseUpdateOne) Select

func (duo *DsseUpdateOne) Select(field string, fields ...string) *DsseUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*DsseUpdateOne) SetGitoidSha256

func (duo *DsseUpdateOne) SetGitoidSha256(s string) *DsseUpdateOne

SetGitoidSha256 sets the "gitoid_sha256" field.

func (*DsseUpdateOne) SetNillableGitoidSha256

func (duo *DsseUpdateOne) SetNillableGitoidSha256(s *string) *DsseUpdateOne

SetNillableGitoidSha256 sets the "gitoid_sha256" field if the given value is not nil.

func (*DsseUpdateOne) SetNillablePayloadType

func (duo *DsseUpdateOne) SetNillablePayloadType(s *string) *DsseUpdateOne

SetNillablePayloadType sets the "payload_type" field if the given value is not nil.

func (*DsseUpdateOne) SetNillableStatementID

func (duo *DsseUpdateOne) SetNillableStatementID(id *uuid.UUID) *DsseUpdateOne

SetNillableStatementID sets the "statement" edge to the Statement entity by ID if the given value is not nil.

func (*DsseUpdateOne) SetPayloadType

func (duo *DsseUpdateOne) SetPayloadType(s string) *DsseUpdateOne

SetPayloadType sets the "payload_type" field.

func (*DsseUpdateOne) SetStatement

func (duo *DsseUpdateOne) SetStatement(s *Statement) *DsseUpdateOne

SetStatement sets the "statement" edge to the Statement entity.

func (*DsseUpdateOne) SetStatementID

func (duo *DsseUpdateOne) SetStatementID(id uuid.UUID) *DsseUpdateOne

SetStatementID sets the "statement" edge to the Statement entity by ID.

func (*DsseUpdateOne) Where

func (duo *DsseUpdateOne) Where(ps ...predicate.Dsse) *DsseUpdateOne

Where appends a list predicates to the DsseUpdate builder.

type DsseWhereInput

type DsseWhereInput struct {
	Predicates []predicate.Dsse  `json:"-"`
	Not        *DsseWhereInput   `json:"not,omitempty"`
	Or         []*DsseWhereInput `json:"or,omitempty"`
	And        []*DsseWhereInput `json:"and,omitempty"`

	// "id" field predicates.
	ID      *uuid.UUID  `json:"id,omitempty"`
	IDNEQ   *uuid.UUID  `json:"idNEQ,omitempty"`
	IDIn    []uuid.UUID `json:"idIn,omitempty"`
	IDNotIn []uuid.UUID `json:"idNotIn,omitempty"`
	IDGT    *uuid.UUID  `json:"idGT,omitempty"`
	IDGTE   *uuid.UUID  `json:"idGTE,omitempty"`
	IDLT    *uuid.UUID  `json:"idLT,omitempty"`
	IDLTE   *uuid.UUID  `json:"idLTE,omitempty"`

	// "gitoid_sha256" field predicates.
	GitoidSha256             *string  `json:"gitoidSha256,omitempty"`
	GitoidSha256NEQ          *string  `json:"gitoidSha256NEQ,omitempty"`
	GitoidSha256In           []string `json:"gitoidSha256In,omitempty"`
	GitoidSha256NotIn        []string `json:"gitoidSha256NotIn,omitempty"`
	GitoidSha256GT           *string  `json:"gitoidSha256GT,omitempty"`
	GitoidSha256GTE          *string  `json:"gitoidSha256GTE,omitempty"`
	GitoidSha256LT           *string  `json:"gitoidSha256LT,omitempty"`
	GitoidSha256LTE          *string  `json:"gitoidSha256LTE,omitempty"`
	GitoidSha256Contains     *string  `json:"gitoidSha256Contains,omitempty"`
	GitoidSha256HasPrefix    *string  `json:"gitoidSha256HasPrefix,omitempty"`
	GitoidSha256HasSuffix    *string  `json:"gitoidSha256HasSuffix,omitempty"`
	GitoidSha256EqualFold    *string  `json:"gitoidSha256EqualFold,omitempty"`
	GitoidSha256ContainsFold *string  `json:"gitoidSha256ContainsFold,omitempty"`

	// "payload_type" field predicates.
	PayloadType             *string  `json:"payloadType,omitempty"`
	PayloadTypeNEQ          *string  `json:"payloadTypeNEQ,omitempty"`
	PayloadTypeIn           []string `json:"payloadTypeIn,omitempty"`
	PayloadTypeNotIn        []string `json:"payloadTypeNotIn,omitempty"`
	PayloadTypeGT           *string  `json:"payloadTypeGT,omitempty"`
	PayloadTypeGTE          *string  `json:"payloadTypeGTE,omitempty"`
	PayloadTypeLT           *string  `json:"payloadTypeLT,omitempty"`
	PayloadTypeLTE          *string  `json:"payloadTypeLTE,omitempty"`
	PayloadTypeContains     *string  `json:"payloadTypeContains,omitempty"`
	PayloadTypeHasPrefix    *string  `json:"payloadTypeHasPrefix,omitempty"`
	PayloadTypeHasSuffix    *string  `json:"payloadTypeHasSuffix,omitempty"`
	PayloadTypeEqualFold    *string  `json:"payloadTypeEqualFold,omitempty"`
	PayloadTypeContainsFold *string  `json:"payloadTypeContainsFold,omitempty"`

	// "statement" edge predicates.
	HasStatement     *bool                  `json:"hasStatement,omitempty"`
	HasStatementWith []*StatementWhereInput `json:"hasStatementWith,omitempty"`

	// "signatures" edge predicates.
	HasSignatures     *bool                  `json:"hasSignatures,omitempty"`
	HasSignaturesWith []*SignatureWhereInput `json:"hasSignaturesWith,omitempty"`

	// "payload_digests" edge predicates.
	HasPayloadDigests     *bool                      `json:"hasPayloadDigests,omitempty"`
	HasPayloadDigestsWith []*PayloadDigestWhereInput `json:"hasPayloadDigestsWith,omitempty"`
}

DsseWhereInput represents a where input for filtering Dsse queries.

func (*DsseWhereInput) AddPredicates

func (i *DsseWhereInput) AddPredicates(predicates ...predicate.Dsse)

AddPredicates adds custom predicates to the where input to be used during the filtering phase.

func (*DsseWhereInput) Filter

func (i *DsseWhereInput) Filter(q *DsseQuery) (*DsseQuery, error)

Filter applies the DsseWhereInput filter on the DsseQuery builder.

func (*DsseWhereInput) P

func (i *DsseWhereInput) P() (predicate.Dsse, error)

P returns a predicate for filtering dsses. An error is returned if the input is empty or invalid.

type Dsses

type Dsses []*Dsse

Dsses is a parsable slice of Dsse.

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 MutateFunc

type MutateFunc = ent.MutateFunc

ent aliases to avoid import conflicts in user's code.

type Mutation

type Mutation = ent.Mutation

ent aliases to avoid import conflicts in user's code.

type Mutator

type Mutator = ent.Mutator

ent aliases to avoid import conflicts in user's code.

type NodeOption

type NodeOption func(*nodeOptions)

NodeOption allows configuring the Noder execution using functional options.

func WithFixedNodeType

func WithFixedNodeType(t string) NodeOption

WithFixedNodeType sets the Type of the node to a fixed value.

func WithNodeType

func WithNodeType(f func(context.Context, uuid.UUID) (string, error)) NodeOption

WithNodeType sets the node Type resolver function (i.e. the table to query). If was not provided, the table will be derived from the universal-id configuration as described in: https://entgo.io/docs/migrate/#universal-ids.

type Noder

type Noder interface {
	IsNode()
}

Noder wraps the basic Node method.

type NotFoundError

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

NotFoundError returns when trying to fetch a specific entity and it was not found in the database.

func (*NotFoundError) Error

func (e *NotFoundError) Error() string

Error implements the error interface.

type NotLoadedError

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

NotLoadedError returns when trying to get a node that was not loaded by the query.

func (*NotLoadedError) Error

func (e *NotLoadedError) Error() string

Error implements the error interface.

type NotSingularError

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

NotSingularError returns when trying to fetch a singular entity and more then one was found in the database.

func (*NotSingularError) Error

func (e *NotSingularError) Error() string

Error implements the error interface.

type 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 PageInfo

type PageInfo = entgql.PageInfo[uuid.UUID]

Common entgql types.

type PayloadDigest

type PayloadDigest struct {

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

PayloadDigest is the model entity for the PayloadDigest schema.

func (*PayloadDigest) Dsse

func (pd *PayloadDigest) Dsse(ctx context.Context) (*Dsse, error)

func (*PayloadDigest) GetValue

func (pd *PayloadDigest) GetValue(name string) (ent.Value, error)

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

func (*PayloadDigest) IsNode

func (*PayloadDigest) IsNode()

IsNode implements the Node interface check for GQLGen.

func (*PayloadDigest) QueryDsse

func (pd *PayloadDigest) QueryDsse() *DsseQuery

QueryDsse queries the "dsse" edge of the PayloadDigest entity.

func (*PayloadDigest) String

func (pd *PayloadDigest) String() string

String implements the fmt.Stringer.

func (*PayloadDigest) ToEdge

ToEdge converts PayloadDigest into PayloadDigestEdge.

func (*PayloadDigest) Unwrap

func (pd *PayloadDigest) Unwrap() *PayloadDigest

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

func (pd *PayloadDigest) Update() *PayloadDigestUpdateOne

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

type PayloadDigestClient

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

PayloadDigestClient is a client for the PayloadDigest schema.

func NewPayloadDigestClient

func NewPayloadDigestClient(c config) *PayloadDigestClient

NewPayloadDigestClient returns a client for the PayloadDigest from the given config.

func (*PayloadDigestClient) Create

Create returns a builder for creating a PayloadDigest entity.

func (*PayloadDigestClient) CreateBulk

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

func (*PayloadDigestClient) Delete

Delete returns a delete builder for PayloadDigest.

func (*PayloadDigestClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*PayloadDigestClient) DeleteOneID

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

func (*PayloadDigestClient) Get

Get returns a PayloadDigest entity by its id.

func (*PayloadDigestClient) GetX

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

func (*PayloadDigestClient) Hooks

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

Hooks returns the client hooks.

func (*PayloadDigestClient) Intercept

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

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

func (*PayloadDigestClient) Interceptors

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

Interceptors returns the client interceptors.

func (*PayloadDigestClient) MapCreateBulk

func (c *PayloadDigestClient) MapCreateBulk(slice any, setFunc func(*PayloadDigestCreate, int)) *PayloadDigestCreateBulk

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

Query returns a query builder for PayloadDigest.

func (*PayloadDigestClient) QueryDsse

func (c *PayloadDigestClient) QueryDsse(pd *PayloadDigest) *DsseQuery

QueryDsse queries the dsse edge of a PayloadDigest.

func (*PayloadDigestClient) Update

Update returns an update builder for PayloadDigest.

func (*PayloadDigestClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*PayloadDigestClient) UpdateOneID

UpdateOneID returns an update builder for the given id.

func (*PayloadDigestClient) Use

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

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

type PayloadDigestConnection

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

PayloadDigestConnection is the connection containing edges to PayloadDigest.

type PayloadDigestCreate

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

PayloadDigestCreate is the builder for creating a PayloadDigest entity.

func (*PayloadDigestCreate) Exec

func (pdc *PayloadDigestCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*PayloadDigestCreate) ExecX

func (pdc *PayloadDigestCreate) ExecX(ctx context.Context)

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

func (*PayloadDigestCreate) Mutation

func (pdc *PayloadDigestCreate) Mutation() *PayloadDigestMutation

Mutation returns the PayloadDigestMutation object of the builder.

func (*PayloadDigestCreate) Save

Save creates the PayloadDigest in the database.

func (*PayloadDigestCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*PayloadDigestCreate) SetAlgorithm

func (pdc *PayloadDigestCreate) SetAlgorithm(s string) *PayloadDigestCreate

SetAlgorithm sets the "algorithm" field.

func (*PayloadDigestCreate) SetDsse

func (pdc *PayloadDigestCreate) SetDsse(d *Dsse) *PayloadDigestCreate

SetDsse sets the "dsse" edge to the Dsse entity.

func (*PayloadDigestCreate) SetDsseID

func (pdc *PayloadDigestCreate) SetDsseID(id uuid.UUID) *PayloadDigestCreate

SetDsseID sets the "dsse" edge to the Dsse entity by ID.

func (*PayloadDigestCreate) SetID added in v0.5.0

SetID sets the "id" field.

func (*PayloadDigestCreate) SetNillableDsseID

func (pdc *PayloadDigestCreate) SetNillableDsseID(id *uuid.UUID) *PayloadDigestCreate

SetNillableDsseID sets the "dsse" edge to the Dsse entity by ID if the given value is not nil.

func (*PayloadDigestCreate) SetNillableID added in v0.5.0

func (pdc *PayloadDigestCreate) SetNillableID(u *uuid.UUID) *PayloadDigestCreate

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

func (*PayloadDigestCreate) SetValue

SetValue sets the "value" field.

type PayloadDigestCreateBulk

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

PayloadDigestCreateBulk is the builder for creating many PayloadDigest entities in bulk.

func (*PayloadDigestCreateBulk) Exec

func (pdcb *PayloadDigestCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*PayloadDigestCreateBulk) ExecX

func (pdcb *PayloadDigestCreateBulk) ExecX(ctx context.Context)

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

func (*PayloadDigestCreateBulk) Save

Save creates the PayloadDigest entities in the database.

func (*PayloadDigestCreateBulk) SaveX

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

type PayloadDigestDelete

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

PayloadDigestDelete is the builder for deleting a PayloadDigest entity.

func (*PayloadDigestDelete) Exec

func (pdd *PayloadDigestDelete) Exec(ctx context.Context) (int, error)

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

func (*PayloadDigestDelete) ExecX

func (pdd *PayloadDigestDelete) ExecX(ctx context.Context) int

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

func (*PayloadDigestDelete) Where

Where appends a list predicates to the PayloadDigestDelete builder.

type PayloadDigestDeleteOne

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

PayloadDigestDeleteOne is the builder for deleting a single PayloadDigest entity.

func (*PayloadDigestDeleteOne) Exec

func (pddo *PayloadDigestDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*PayloadDigestDeleteOne) ExecX

func (pddo *PayloadDigestDeleteOne) ExecX(ctx context.Context)

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

func (*PayloadDigestDeleteOne) Where

Where appends a list predicates to the PayloadDigestDelete builder.

type PayloadDigestEdge

type PayloadDigestEdge struct {
	Node   *PayloadDigest `json:"node"`
	Cursor Cursor         `json:"cursor"`
}

PayloadDigestEdge is the edge representation of PayloadDigest.

type PayloadDigestEdges

type PayloadDigestEdges struct {
	// Dsse holds the value of the dsse edge.
	Dsse *Dsse `json:"dsse,omitempty"`
	// contains filtered or unexported fields
}

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

func (PayloadDigestEdges) DsseOrErr

func (e PayloadDigestEdges) DsseOrErr() (*Dsse, error)

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

type PayloadDigestGroupBy

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

PayloadDigestGroupBy is the group-by builder for PayloadDigest entities.

func (*PayloadDigestGroupBy) Aggregate

func (pdgb *PayloadDigestGroupBy) Aggregate(fns ...AggregateFunc) *PayloadDigestGroupBy

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

func (*PayloadDigestGroupBy) Bool

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

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

func (*PayloadDigestGroupBy) BoolX

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

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

func (*PayloadDigestGroupBy) Bools

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

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

func (*PayloadDigestGroupBy) BoolsX

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

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

func (*PayloadDigestGroupBy) Float64

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

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

func (*PayloadDigestGroupBy) Float64X

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

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

func (*PayloadDigestGroupBy) Float64s

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

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

func (*PayloadDigestGroupBy) Float64sX

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

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

func (*PayloadDigestGroupBy) Int

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

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

func (*PayloadDigestGroupBy) IntX

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

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

func (*PayloadDigestGroupBy) Ints

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

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

func (*PayloadDigestGroupBy) IntsX

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

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

func (*PayloadDigestGroupBy) Scan

func (pdgb *PayloadDigestGroupBy) Scan(ctx context.Context, v any) error

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

func (*PayloadDigestGroupBy) ScanX

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

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

func (*PayloadDigestGroupBy) String

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

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

func (*PayloadDigestGroupBy) StringX

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

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

func (*PayloadDigestGroupBy) Strings

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

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

func (*PayloadDigestGroupBy) StringsX

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

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

type PayloadDigestMutation

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

PayloadDigestMutation represents an operation that mutates the PayloadDigest nodes in the graph.

func (*PayloadDigestMutation) AddField

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

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

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

func (*PayloadDigestMutation) AddedField

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

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

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

func (*PayloadDigestMutation) AddedIDs

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

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

func (*PayloadDigestMutation) Algorithm

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

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

func (*PayloadDigestMutation) ClearDsse

func (m *PayloadDigestMutation) ClearDsse()

ClearDsse clears the "dsse" edge to the Dsse entity.

func (*PayloadDigestMutation) ClearEdge

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

func (m *PayloadDigestMutation) 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 (*PayloadDigestMutation) ClearedEdges

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

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

func (*PayloadDigestMutation) ClearedFields

func (m *PayloadDigestMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (PayloadDigestMutation) Client

func (m PayloadDigestMutation) 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 (*PayloadDigestMutation) DsseCleared

func (m *PayloadDigestMutation) DsseCleared() bool

DsseCleared reports if the "dsse" edge to the Dsse entity was cleared.

func (*PayloadDigestMutation) DsseID

func (m *PayloadDigestMutation) DsseID() (id uuid.UUID, exists bool)

DsseID returns the "dsse" edge ID in the mutation.

func (*PayloadDigestMutation) DsseIDs

func (m *PayloadDigestMutation) DsseIDs() (ids []uuid.UUID)

DsseIDs returns the "dsse" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use DsseID instead. It exists only for internal usage by the builders.

func (*PayloadDigestMutation) EdgeCleared

func (m *PayloadDigestMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*PayloadDigestMutation) Field

func (m *PayloadDigestMutation) 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 (*PayloadDigestMutation) FieldCleared

func (m *PayloadDigestMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*PayloadDigestMutation) Fields

func (m *PayloadDigestMutation) 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 (*PayloadDigestMutation) ID

func (m *PayloadDigestMutation) ID() (id uuid.UUID, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*PayloadDigestMutation) 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 (*PayloadDigestMutation) OldAlgorithm

func (m *PayloadDigestMutation) OldAlgorithm(ctx context.Context) (v string, err error)

OldAlgorithm returns the old "algorithm" field's value of the PayloadDigest entity. If the PayloadDigest object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*PayloadDigestMutation) OldField

func (m *PayloadDigestMutation) 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 (*PayloadDigestMutation) OldValue

func (m *PayloadDigestMutation) OldValue(ctx context.Context) (v string, err error)

OldValue returns the old "value" field's value of the PayloadDigest entity. If the PayloadDigest object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*PayloadDigestMutation) Op

func (m *PayloadDigestMutation) Op() Op

Op returns the operation name.

func (*PayloadDigestMutation) RemovedEdges

func (m *PayloadDigestMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*PayloadDigestMutation) RemovedIDs

func (m *PayloadDigestMutation) 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 (*PayloadDigestMutation) ResetAlgorithm

func (m *PayloadDigestMutation) ResetAlgorithm()

ResetAlgorithm resets all changes to the "algorithm" field.

func (*PayloadDigestMutation) ResetDsse

func (m *PayloadDigestMutation) ResetDsse()

ResetDsse resets all changes to the "dsse" edge.

func (*PayloadDigestMutation) ResetEdge

func (m *PayloadDigestMutation) 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 (*PayloadDigestMutation) ResetField

func (m *PayloadDigestMutation) 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 (*PayloadDigestMutation) ResetValue

func (m *PayloadDigestMutation) ResetValue()

ResetValue resets all changes to the "value" field.

func (*PayloadDigestMutation) SetAlgorithm

func (m *PayloadDigestMutation) SetAlgorithm(s string)

SetAlgorithm sets the "algorithm" field.

func (*PayloadDigestMutation) SetDsseID

func (m *PayloadDigestMutation) SetDsseID(id uuid.UUID)

SetDsseID sets the "dsse" edge to the Dsse entity by id.

func (*PayloadDigestMutation) SetField

func (m *PayloadDigestMutation) 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 (*PayloadDigestMutation) SetID added in v0.5.0

func (m *PayloadDigestMutation) SetID(id uuid.UUID)

SetID sets the value of the id field. Note that this operation is only accepted on creation of PayloadDigest entities.

func (*PayloadDigestMutation) SetOp

func (m *PayloadDigestMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*PayloadDigestMutation) SetValue

func (m *PayloadDigestMutation) SetValue(s string)

SetValue sets the "value" field.

func (PayloadDigestMutation) Tx

func (m PayloadDigestMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*PayloadDigestMutation) Type

func (m *PayloadDigestMutation) Type() string

Type returns the node type of this mutation (PayloadDigest).

func (*PayloadDigestMutation) Value

func (m *PayloadDigestMutation) Value() (r string, exists bool)

Value returns the value of the "value" field in the mutation.

func (*PayloadDigestMutation) Where

Where appends a list predicates to the PayloadDigestMutation builder.

func (*PayloadDigestMutation) WhereP

func (m *PayloadDigestMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the PayloadDigestMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type PayloadDigestOrder

type PayloadDigestOrder struct {
	Direction OrderDirection           `json:"direction"`
	Field     *PayloadDigestOrderField `json:"field"`
}

PayloadDigestOrder defines the ordering of PayloadDigest.

type PayloadDigestOrderField

type PayloadDigestOrderField struct {
	// Value extracts the ordering value from the given PayloadDigest.
	Value func(*PayloadDigest) (ent.Value, error)
	// contains filtered or unexported fields
}

PayloadDigestOrderField defines the ordering field of PayloadDigest.

type PayloadDigestPaginateOption

type PayloadDigestPaginateOption func(*payloaddigestPager) error

PayloadDigestPaginateOption enables pagination customization.

func WithPayloadDigestFilter

func WithPayloadDigestFilter(filter func(*PayloadDigestQuery) (*PayloadDigestQuery, error)) PayloadDigestPaginateOption

WithPayloadDigestFilter configures pagination filter.

func WithPayloadDigestOrder

func WithPayloadDigestOrder(order *PayloadDigestOrder) PayloadDigestPaginateOption

WithPayloadDigestOrder configures pagination ordering.

type PayloadDigestQuery

type PayloadDigestQuery struct {
	// contains filtered or unexported fields
}

PayloadDigestQuery is the builder for querying PayloadDigest entities.

func (*PayloadDigestQuery) Aggregate

func (pdq *PayloadDigestQuery) Aggregate(fns ...AggregateFunc) *PayloadDigestSelect

Aggregate returns a PayloadDigestSelect configured with the given aggregations.

func (*PayloadDigestQuery) All

All executes the query and returns a list of PayloadDigests.

func (*PayloadDigestQuery) AllX

func (pdq *PayloadDigestQuery) AllX(ctx context.Context) []*PayloadDigest

AllX is like All, but panics if an error occurs.

func (*PayloadDigestQuery) Clone

func (pdq *PayloadDigestQuery) Clone() *PayloadDigestQuery

Clone returns a duplicate of the PayloadDigestQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*PayloadDigestQuery) CollectFields

func (pd *PayloadDigestQuery) CollectFields(ctx context.Context, satisfies ...string) (*PayloadDigestQuery, error)

CollectFields tells the query-builder to eagerly load connected nodes by resolver context.

func (*PayloadDigestQuery) Count

func (pdq *PayloadDigestQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*PayloadDigestQuery) CountX

func (pdq *PayloadDigestQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*PayloadDigestQuery) Exist

func (pdq *PayloadDigestQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*PayloadDigestQuery) ExistX

func (pdq *PayloadDigestQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*PayloadDigestQuery) First

First returns the first PayloadDigest entity from the query. Returns a *NotFoundError when no PayloadDigest was found.

func (*PayloadDigestQuery) FirstID

func (pdq *PayloadDigestQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)

FirstID returns the first PayloadDigest ID from the query. Returns a *NotFoundError when no PayloadDigest ID was found.

func (*PayloadDigestQuery) FirstIDX

func (pdq *PayloadDigestQuery) FirstIDX(ctx context.Context) uuid.UUID

FirstIDX is like FirstID, but panics if an error occurs.

func (*PayloadDigestQuery) FirstX

func (pdq *PayloadDigestQuery) FirstX(ctx context.Context) *PayloadDigest

FirstX is like First, but panics if an error occurs.

func (*PayloadDigestQuery) GroupBy

func (pdq *PayloadDigestQuery) GroupBy(field string, fields ...string) *PayloadDigestGroupBy

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.PayloadDigest.Query().
	GroupBy(payloaddigest.FieldAlgorithm).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*PayloadDigestQuery) IDs

func (pdq *PayloadDigestQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)

IDs executes the query and returns a list of PayloadDigest IDs.

func (*PayloadDigestQuery) IDsX

func (pdq *PayloadDigestQuery) IDsX(ctx context.Context) []uuid.UUID

IDsX is like IDs, but panics if an error occurs.

func (*PayloadDigestQuery) Limit

func (pdq *PayloadDigestQuery) Limit(limit int) *PayloadDigestQuery

Limit the number of records to be returned by this query.

func (*PayloadDigestQuery) Offset

func (pdq *PayloadDigestQuery) Offset(offset int) *PayloadDigestQuery

Offset to start from.

func (*PayloadDigestQuery) Only

Only returns a single PayloadDigest entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one PayloadDigest entity is found. Returns a *NotFoundError when no PayloadDigest entities are found.

func (*PayloadDigestQuery) OnlyID

func (pdq *PayloadDigestQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)

OnlyID is like Only, but returns the only PayloadDigest ID in the query. Returns a *NotSingularError when more than one PayloadDigest ID is found. Returns a *NotFoundError when no entities are found.

func (*PayloadDigestQuery) OnlyIDX

func (pdq *PayloadDigestQuery) OnlyIDX(ctx context.Context) uuid.UUID

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*PayloadDigestQuery) OnlyX

OnlyX is like Only, but panics if an error occurs.

func (*PayloadDigestQuery) Order

Order specifies how the records should be ordered.

func (*PayloadDigestQuery) Paginate

func (pd *PayloadDigestQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...PayloadDigestPaginateOption,
) (*PayloadDigestConnection, error)

Paginate executes the query and returns a relay based cursor connection to PayloadDigest.

func (*PayloadDigestQuery) QueryDsse

func (pdq *PayloadDigestQuery) QueryDsse() *DsseQuery

QueryDsse chains the current query on the "dsse" edge.

func (*PayloadDigestQuery) Select

func (pdq *PayloadDigestQuery) Select(fields ...string) *PayloadDigestSelect

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.PayloadDigest.Query().
	Select(payloaddigest.FieldAlgorithm).
	Scan(ctx, &v)

func (*PayloadDigestQuery) Unique

func (pdq *PayloadDigestQuery) Unique(unique bool) *PayloadDigestQuery

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 (*PayloadDigestQuery) Where

Where adds a new predicate for the PayloadDigestQuery builder.

func (*PayloadDigestQuery) WithDsse

func (pdq *PayloadDigestQuery) WithDsse(opts ...func(*DsseQuery)) *PayloadDigestQuery

WithDsse tells the query-builder to eager-load the nodes that are connected to the "dsse" edge. The optional arguments are used to configure the query builder of the edge.

type PayloadDigestSelect

type PayloadDigestSelect struct {
	*PayloadDigestQuery
	// contains filtered or unexported fields
}

PayloadDigestSelect is the builder for selecting fields of PayloadDigest entities.

func (*PayloadDigestSelect) Aggregate

func (pds *PayloadDigestSelect) Aggregate(fns ...AggregateFunc) *PayloadDigestSelect

Aggregate adds the given aggregation functions to the selector query.

func (*PayloadDigestSelect) Bool

func (s *PayloadDigestSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*PayloadDigestSelect) BoolX

func (s *PayloadDigestSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*PayloadDigestSelect) Bools

func (s *PayloadDigestSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*PayloadDigestSelect) BoolsX

func (s *PayloadDigestSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*PayloadDigestSelect) Float64

func (s *PayloadDigestSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*PayloadDigestSelect) Float64X

func (s *PayloadDigestSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*PayloadDigestSelect) Float64s

func (s *PayloadDigestSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*PayloadDigestSelect) Float64sX

func (s *PayloadDigestSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*PayloadDigestSelect) Int

func (s *PayloadDigestSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*PayloadDigestSelect) IntX

func (s *PayloadDigestSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*PayloadDigestSelect) Ints

func (s *PayloadDigestSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*PayloadDigestSelect) IntsX

func (s *PayloadDigestSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*PayloadDigestSelect) Scan

func (pds *PayloadDigestSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*PayloadDigestSelect) ScanX

func (s *PayloadDigestSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*PayloadDigestSelect) String

func (s *PayloadDigestSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*PayloadDigestSelect) StringX

func (s *PayloadDigestSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*PayloadDigestSelect) Strings

func (s *PayloadDigestSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*PayloadDigestSelect) StringsX

func (s *PayloadDigestSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type PayloadDigestUpdate

type PayloadDigestUpdate struct {
	// contains filtered or unexported fields
}

PayloadDigestUpdate is the builder for updating PayloadDigest entities.

func (*PayloadDigestUpdate) ClearDsse

func (pdu *PayloadDigestUpdate) ClearDsse() *PayloadDigestUpdate

ClearDsse clears the "dsse" edge to the Dsse entity.

func (*PayloadDigestUpdate) Exec

func (pdu *PayloadDigestUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*PayloadDigestUpdate) ExecX

func (pdu *PayloadDigestUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*PayloadDigestUpdate) Mutation

func (pdu *PayloadDigestUpdate) Mutation() *PayloadDigestMutation

Mutation returns the PayloadDigestMutation object of the builder.

func (*PayloadDigestUpdate) Save

func (pdu *PayloadDigestUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*PayloadDigestUpdate) SaveX

func (pdu *PayloadDigestUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*PayloadDigestUpdate) SetAlgorithm

func (pdu *PayloadDigestUpdate) SetAlgorithm(s string) *PayloadDigestUpdate

SetAlgorithm sets the "algorithm" field.

func (*PayloadDigestUpdate) SetDsse

func (pdu *PayloadDigestUpdate) SetDsse(d *Dsse) *PayloadDigestUpdate

SetDsse sets the "dsse" edge to the Dsse entity.

func (*PayloadDigestUpdate) SetDsseID

func (pdu *PayloadDigestUpdate) SetDsseID(id uuid.UUID) *PayloadDigestUpdate

SetDsseID sets the "dsse" edge to the Dsse entity by ID.

func (*PayloadDigestUpdate) SetNillableAlgorithm

func (pdu *PayloadDigestUpdate) SetNillableAlgorithm(s *string) *PayloadDigestUpdate

SetNillableAlgorithm sets the "algorithm" field if the given value is not nil.

func (*PayloadDigestUpdate) SetNillableDsseID

func (pdu *PayloadDigestUpdate) SetNillableDsseID(id *uuid.UUID) *PayloadDigestUpdate

SetNillableDsseID sets the "dsse" edge to the Dsse entity by ID if the given value is not nil.

func (*PayloadDigestUpdate) SetNillableValue

func (pdu *PayloadDigestUpdate) SetNillableValue(s *string) *PayloadDigestUpdate

SetNillableValue sets the "value" field if the given value is not nil.

func (*PayloadDigestUpdate) SetValue

SetValue sets the "value" field.

func (*PayloadDigestUpdate) Where

Where appends a list predicates to the PayloadDigestUpdate builder.

type PayloadDigestUpdateOne

type PayloadDigestUpdateOne struct {
	// contains filtered or unexported fields
}

PayloadDigestUpdateOne is the builder for updating a single PayloadDigest entity.

func (*PayloadDigestUpdateOne) ClearDsse

ClearDsse clears the "dsse" edge to the Dsse entity.

func (*PayloadDigestUpdateOne) Exec

func (pduo *PayloadDigestUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*PayloadDigestUpdateOne) ExecX

func (pduo *PayloadDigestUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*PayloadDigestUpdateOne) Mutation

Mutation returns the PayloadDigestMutation object of the builder.

func (*PayloadDigestUpdateOne) Save

Save executes the query and returns the updated PayloadDigest entity.

func (*PayloadDigestUpdateOne) SaveX

SaveX is like Save, but panics if an error occurs.

func (*PayloadDigestUpdateOne) Select

func (pduo *PayloadDigestUpdateOne) Select(field string, fields ...string) *PayloadDigestUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*PayloadDigestUpdateOne) SetAlgorithm

func (pduo *PayloadDigestUpdateOne) SetAlgorithm(s string) *PayloadDigestUpdateOne

SetAlgorithm sets the "algorithm" field.

func (*PayloadDigestUpdateOne) SetDsse

SetDsse sets the "dsse" edge to the Dsse entity.

func (*PayloadDigestUpdateOne) SetDsseID

SetDsseID sets the "dsse" edge to the Dsse entity by ID.

func (*PayloadDigestUpdateOne) SetNillableAlgorithm

func (pduo *PayloadDigestUpdateOne) SetNillableAlgorithm(s *string) *PayloadDigestUpdateOne

SetNillableAlgorithm sets the "algorithm" field if the given value is not nil.

func (*PayloadDigestUpdateOne) SetNillableDsseID

func (pduo *PayloadDigestUpdateOne) SetNillableDsseID(id *uuid.UUID) *PayloadDigestUpdateOne

SetNillableDsseID sets the "dsse" edge to the Dsse entity by ID if the given value is not nil.

func (*PayloadDigestUpdateOne) SetNillableValue

func (pduo *PayloadDigestUpdateOne) SetNillableValue(s *string) *PayloadDigestUpdateOne

SetNillableValue sets the "value" field if the given value is not nil.

func (*PayloadDigestUpdateOne) SetValue

SetValue sets the "value" field.

func (*PayloadDigestUpdateOne) Where

Where appends a list predicates to the PayloadDigestUpdate builder.

type PayloadDigestWhereInput

type PayloadDigestWhereInput struct {
	Predicates []predicate.PayloadDigest  `json:"-"`
	Not        *PayloadDigestWhereInput   `json:"not,omitempty"`
	Or         []*PayloadDigestWhereInput `json:"or,omitempty"`
	And        []*PayloadDigestWhereInput `json:"and,omitempty"`

	// "id" field predicates.
	ID      *uuid.UUID  `json:"id,omitempty"`
	IDNEQ   *uuid.UUID  `json:"idNEQ,omitempty"`
	IDIn    []uuid.UUID `json:"idIn,omitempty"`
	IDNotIn []uuid.UUID `json:"idNotIn,omitempty"`
	IDGT    *uuid.UUID  `json:"idGT,omitempty"`
	IDGTE   *uuid.UUID  `json:"idGTE,omitempty"`
	IDLT    *uuid.UUID  `json:"idLT,omitempty"`
	IDLTE   *uuid.UUID  `json:"idLTE,omitempty"`

	// "algorithm" field predicates.
	Algorithm             *string  `json:"algorithm,omitempty"`
	AlgorithmNEQ          *string  `json:"algorithmNEQ,omitempty"`
	AlgorithmIn           []string `json:"algorithmIn,omitempty"`
	AlgorithmNotIn        []string `json:"algorithmNotIn,omitempty"`
	AlgorithmGT           *string  `json:"algorithmGT,omitempty"`
	AlgorithmGTE          *string  `json:"algorithmGTE,omitempty"`
	AlgorithmLT           *string  `json:"algorithmLT,omitempty"`
	AlgorithmLTE          *string  `json:"algorithmLTE,omitempty"`
	AlgorithmContains     *string  `json:"algorithmContains,omitempty"`
	AlgorithmHasPrefix    *string  `json:"algorithmHasPrefix,omitempty"`
	AlgorithmHasSuffix    *string  `json:"algorithmHasSuffix,omitempty"`
	AlgorithmEqualFold    *string  `json:"algorithmEqualFold,omitempty"`
	AlgorithmContainsFold *string  `json:"algorithmContainsFold,omitempty"`

	// "value" field predicates.
	Value             *string  `json:"value,omitempty"`
	ValueNEQ          *string  `json:"valueNEQ,omitempty"`
	ValueIn           []string `json:"valueIn,omitempty"`
	ValueNotIn        []string `json:"valueNotIn,omitempty"`
	ValueGT           *string  `json:"valueGT,omitempty"`
	ValueGTE          *string  `json:"valueGTE,omitempty"`
	ValueLT           *string  `json:"valueLT,omitempty"`
	ValueLTE          *string  `json:"valueLTE,omitempty"`
	ValueContains     *string  `json:"valueContains,omitempty"`
	ValueHasPrefix    *string  `json:"valueHasPrefix,omitempty"`
	ValueHasSuffix    *string  `json:"valueHasSuffix,omitempty"`
	ValueEqualFold    *string  `json:"valueEqualFold,omitempty"`
	ValueContainsFold *string  `json:"valueContainsFold,omitempty"`

	// "dsse" edge predicates.
	HasDsse     *bool             `json:"hasDsse,omitempty"`
	HasDsseWith []*DsseWhereInput `json:"hasDsseWith,omitempty"`
}

PayloadDigestWhereInput represents a where input for filtering PayloadDigest queries.

func (*PayloadDigestWhereInput) AddPredicates

func (i *PayloadDigestWhereInput) AddPredicates(predicates ...predicate.PayloadDigest)

AddPredicates adds custom predicates to the where input to be used during the filtering phase.

func (*PayloadDigestWhereInput) Filter

Filter applies the PayloadDigestWhereInput filter on the PayloadDigestQuery builder.

func (*PayloadDigestWhereInput) P

P returns a predicate for filtering payloaddigests. An error is returned if the input is empty or invalid.

type PayloadDigests

type PayloadDigests []*PayloadDigest

PayloadDigests is a parsable slice of PayloadDigest.

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 Signature

type Signature struct {

	// ID of the ent.
	ID uuid.UUID `json:"id,omitempty"`
	// KeyID holds the value of the "key_id" field.
	KeyID string `json:"key_id,omitempty"`
	// Signature holds the value of the "signature" field.
	Signature string `json:"signature,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the SignatureQuery when eager-loading is set.
	Edges SignatureEdges `json:"edges"`
	// contains filtered or unexported fields
}

Signature is the model entity for the Signature schema.

func (*Signature) Dsse

func (s *Signature) Dsse(ctx context.Context) (*Dsse, error)

func (*Signature) IsNode

func (*Signature) IsNode()

IsNode implements the Node interface check for GQLGen.

func (*Signature) NamedTimestamps

func (s *Signature) NamedTimestamps(name string) ([]*Timestamp, error)

NamedTimestamps returns the Timestamps named value or an error if the edge was not loaded in eager-loading with this name.

func (*Signature) QueryDsse

func (s *Signature) QueryDsse() *DsseQuery

QueryDsse queries the "dsse" edge of the Signature entity.

func (*Signature) QueryTimestamps

func (s *Signature) QueryTimestamps() *TimestampQuery

QueryTimestamps queries the "timestamps" edge of the Signature entity.

func (*Signature) String

func (s *Signature) String() string

String implements the fmt.Stringer.

func (*Signature) Timestamps

func (s *Signature) Timestamps(ctx context.Context) (result []*Timestamp, err error)

func (*Signature) ToEdge

func (s *Signature) ToEdge(order *SignatureOrder) *SignatureEdge

ToEdge converts Signature into SignatureEdge.

func (*Signature) Unwrap

func (s *Signature) Unwrap() *Signature

Unwrap unwraps the Signature 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 (*Signature) Update

func (s *Signature) Update() *SignatureUpdateOne

Update returns a builder for updating this Signature. Note that you need to call Signature.Unwrap() before calling this method if this Signature was returned from a transaction, and the transaction was committed or rolled back.

func (*Signature) Value

func (s *Signature) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the Signature. This includes values selected through modifiers, order, etc.

type SignatureClient

type SignatureClient struct {
	// contains filtered or unexported fields
}

SignatureClient is a client for the Signature schema.

func NewSignatureClient

func NewSignatureClient(c config) *SignatureClient

NewSignatureClient returns a client for the Signature from the given config.

func (*SignatureClient) Create

func (c *SignatureClient) Create() *SignatureCreate

Create returns a builder for creating a Signature entity.

func (*SignatureClient) CreateBulk

func (c *SignatureClient) CreateBulk(builders ...*SignatureCreate) *SignatureCreateBulk

CreateBulk returns a builder for creating a bulk of Signature entities.

func (*SignatureClient) Delete

func (c *SignatureClient) Delete() *SignatureDelete

Delete returns a delete builder for Signature.

func (*SignatureClient) DeleteOne

func (c *SignatureClient) DeleteOne(s *Signature) *SignatureDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*SignatureClient) DeleteOneID

func (c *SignatureClient) DeleteOneID(id uuid.UUID) *SignatureDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*SignatureClient) Get

func (c *SignatureClient) Get(ctx context.Context, id uuid.UUID) (*Signature, error)

Get returns a Signature entity by its id.

func (*SignatureClient) GetX

func (c *SignatureClient) GetX(ctx context.Context, id uuid.UUID) *Signature

GetX is like Get, but panics if an error occurs.

func (*SignatureClient) Hooks

func (c *SignatureClient) Hooks() []Hook

Hooks returns the client hooks.

func (*SignatureClient) Intercept

func (c *SignatureClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `signature.Intercept(f(g(h())))`.

func (*SignatureClient) Interceptors

func (c *SignatureClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*SignatureClient) MapCreateBulk

func (c *SignatureClient) MapCreateBulk(slice any, setFunc func(*SignatureCreate, int)) *SignatureCreateBulk

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 (*SignatureClient) Query

func (c *SignatureClient) Query() *SignatureQuery

Query returns a query builder for Signature.

func (*SignatureClient) QueryDsse

func (c *SignatureClient) QueryDsse(s *Signature) *DsseQuery

QueryDsse queries the dsse edge of a Signature.

func (*SignatureClient) QueryTimestamps

func (c *SignatureClient) QueryTimestamps(s *Signature) *TimestampQuery

QueryTimestamps queries the timestamps edge of a Signature.

func (*SignatureClient) Update

func (c *SignatureClient) Update() *SignatureUpdate

Update returns an update builder for Signature.

func (*SignatureClient) UpdateOne

func (c *SignatureClient) UpdateOne(s *Signature) *SignatureUpdateOne

UpdateOne returns an update builder for the given entity.

func (*SignatureClient) UpdateOneID

func (c *SignatureClient) UpdateOneID(id uuid.UUID) *SignatureUpdateOne

UpdateOneID returns an update builder for the given id.

func (*SignatureClient) Use

func (c *SignatureClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `signature.Hooks(f(g(h())))`.

type SignatureConnection

type SignatureConnection struct {
	Edges      []*SignatureEdge `json:"edges"`
	PageInfo   PageInfo         `json:"pageInfo"`
	TotalCount int              `json:"totalCount"`
}

SignatureConnection is the connection containing edges to Signature.

type SignatureCreate

type SignatureCreate struct {
	// contains filtered or unexported fields
}

SignatureCreate is the builder for creating a Signature entity.

func (*SignatureCreate) AddTimestampIDs

func (sc *SignatureCreate) AddTimestampIDs(ids ...uuid.UUID) *SignatureCreate

AddTimestampIDs adds the "timestamps" edge to the Timestamp entity by IDs.

func (*SignatureCreate) AddTimestamps

func (sc *SignatureCreate) AddTimestamps(t ...*Timestamp) *SignatureCreate

AddTimestamps adds the "timestamps" edges to the Timestamp entity.

func (*SignatureCreate) Exec

func (sc *SignatureCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*SignatureCreate) ExecX

func (sc *SignatureCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SignatureCreate) Mutation

func (sc *SignatureCreate) Mutation() *SignatureMutation

Mutation returns the SignatureMutation object of the builder.

func (*SignatureCreate) Save

func (sc *SignatureCreate) Save(ctx context.Context) (*Signature, error)

Save creates the Signature in the database.

func (*SignatureCreate) SaveX

func (sc *SignatureCreate) SaveX(ctx context.Context) *Signature

SaveX calls Save and panics if Save returns an error.

func (*SignatureCreate) SetDsse

func (sc *SignatureCreate) SetDsse(d *Dsse) *SignatureCreate

SetDsse sets the "dsse" edge to the Dsse entity.

func (*SignatureCreate) SetDsseID

func (sc *SignatureCreate) SetDsseID(id uuid.UUID) *SignatureCreate

SetDsseID sets the "dsse" edge to the Dsse entity by ID.

func (*SignatureCreate) SetID added in v0.5.0

func (sc *SignatureCreate) SetID(u uuid.UUID) *SignatureCreate

SetID sets the "id" field.

func (*SignatureCreate) SetKeyID

func (sc *SignatureCreate) SetKeyID(s string) *SignatureCreate

SetKeyID sets the "key_id" field.

func (*SignatureCreate) SetNillableDsseID

func (sc *SignatureCreate) SetNillableDsseID(id *uuid.UUID) *SignatureCreate

SetNillableDsseID sets the "dsse" edge to the Dsse entity by ID if the given value is not nil.

func (*SignatureCreate) SetNillableID added in v0.5.0

func (sc *SignatureCreate) SetNillableID(u *uuid.UUID) *SignatureCreate

SetNillableID sets the "id" field if the given value is not nil.

func (*SignatureCreate) SetSignature

func (sc *SignatureCreate) SetSignature(s string) *SignatureCreate

SetSignature sets the "signature" field.

type SignatureCreateBulk

type SignatureCreateBulk struct {
	// contains filtered or unexported fields
}

SignatureCreateBulk is the builder for creating many Signature entities in bulk.

func (*SignatureCreateBulk) Exec

func (scb *SignatureCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*SignatureCreateBulk) ExecX

func (scb *SignatureCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SignatureCreateBulk) Save

func (scb *SignatureCreateBulk) Save(ctx context.Context) ([]*Signature, error)

Save creates the Signature entities in the database.

func (*SignatureCreateBulk) SaveX

func (scb *SignatureCreateBulk) SaveX(ctx context.Context) []*Signature

SaveX is like Save, but panics if an error occurs.

type SignatureDelete

type SignatureDelete struct {
	// contains filtered or unexported fields
}

SignatureDelete is the builder for deleting a Signature entity.

func (*SignatureDelete) Exec

func (sd *SignatureDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*SignatureDelete) ExecX

func (sd *SignatureDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*SignatureDelete) Where

Where appends a list predicates to the SignatureDelete builder.

type SignatureDeleteOne

type SignatureDeleteOne struct {
	// contains filtered or unexported fields
}

SignatureDeleteOne is the builder for deleting a single Signature entity.

func (*SignatureDeleteOne) Exec

func (sdo *SignatureDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*SignatureDeleteOne) ExecX

func (sdo *SignatureDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SignatureDeleteOne) Where

Where appends a list predicates to the SignatureDelete builder.

type SignatureEdge

type SignatureEdge struct {
	Node   *Signature `json:"node"`
	Cursor Cursor     `json:"cursor"`
}

SignatureEdge is the edge representation of Signature.

type SignatureEdges

type SignatureEdges struct {
	// Dsse holds the value of the dsse edge.
	Dsse *Dsse `json:"dsse,omitempty"`
	// Timestamps holds the value of the timestamps edge.
	Timestamps []*Timestamp `json:"timestamps,omitempty"`
	// contains filtered or unexported fields
}

SignatureEdges holds the relations/edges for other nodes in the graph.

func (SignatureEdges) DsseOrErr

func (e SignatureEdges) DsseOrErr() (*Dsse, error)

DsseOrErr returns the Dsse value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (SignatureEdges) TimestampsOrErr

func (e SignatureEdges) TimestampsOrErr() ([]*Timestamp, error)

TimestampsOrErr returns the Timestamps value or an error if the edge was not loaded in eager-loading.

type SignatureGroupBy

type SignatureGroupBy struct {
	// contains filtered or unexported fields
}

SignatureGroupBy is the group-by builder for Signature entities.

func (*SignatureGroupBy) Aggregate

func (sgb *SignatureGroupBy) Aggregate(fns ...AggregateFunc) *SignatureGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*SignatureGroupBy) Bool

func (s *SignatureGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*SignatureGroupBy) BoolX

func (s *SignatureGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*SignatureGroupBy) Bools

func (s *SignatureGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*SignatureGroupBy) BoolsX

func (s *SignatureGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*SignatureGroupBy) Float64

func (s *SignatureGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*SignatureGroupBy) Float64X

func (s *SignatureGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*SignatureGroupBy) Float64s

func (s *SignatureGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*SignatureGroupBy) Float64sX

func (s *SignatureGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*SignatureGroupBy) Int

func (s *SignatureGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*SignatureGroupBy) IntX

func (s *SignatureGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*SignatureGroupBy) Ints

func (s *SignatureGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*SignatureGroupBy) IntsX

func (s *SignatureGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*SignatureGroupBy) Scan

func (sgb *SignatureGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*SignatureGroupBy) ScanX

func (s *SignatureGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*SignatureGroupBy) String

func (s *SignatureGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*SignatureGroupBy) StringX

func (s *SignatureGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*SignatureGroupBy) Strings

func (s *SignatureGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*SignatureGroupBy) StringsX

func (s *SignatureGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type SignatureMutation

type SignatureMutation struct {
	// contains filtered or unexported fields
}

SignatureMutation represents an operation that mutates the Signature nodes in the graph.

func (*SignatureMutation) AddField

func (m *SignatureMutation) 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 (*SignatureMutation) AddTimestampIDs

func (m *SignatureMutation) AddTimestampIDs(ids ...uuid.UUID)

AddTimestampIDs adds the "timestamps" edge to the Timestamp entity by ids.

func (*SignatureMutation) AddedEdges

func (m *SignatureMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*SignatureMutation) AddedField

func (m *SignatureMutation) 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 (*SignatureMutation) AddedFields

func (m *SignatureMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*SignatureMutation) AddedIDs

func (m *SignatureMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*SignatureMutation) ClearDsse

func (m *SignatureMutation) ClearDsse()

ClearDsse clears the "dsse" edge to the Dsse entity.

func (*SignatureMutation) ClearEdge

func (m *SignatureMutation) 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 (*SignatureMutation) ClearField

func (m *SignatureMutation) 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 (*SignatureMutation) ClearTimestamps

func (m *SignatureMutation) ClearTimestamps()

ClearTimestamps clears the "timestamps" edge to the Timestamp entity.

func (*SignatureMutation) ClearedEdges

func (m *SignatureMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*SignatureMutation) ClearedFields

func (m *SignatureMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (SignatureMutation) Client

func (m SignatureMutation) 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 (*SignatureMutation) DsseCleared

func (m *SignatureMutation) DsseCleared() bool

DsseCleared reports if the "dsse" edge to the Dsse entity was cleared.

func (*SignatureMutation) DsseID

func (m *SignatureMutation) DsseID() (id uuid.UUID, exists bool)

DsseID returns the "dsse" edge ID in the mutation.

func (*SignatureMutation) DsseIDs

func (m *SignatureMutation) DsseIDs() (ids []uuid.UUID)

DsseIDs returns the "dsse" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use DsseID instead. It exists only for internal usage by the builders.

func (*SignatureMutation) EdgeCleared

func (m *SignatureMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*SignatureMutation) Field

func (m *SignatureMutation) 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 (*SignatureMutation) FieldCleared

func (m *SignatureMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*SignatureMutation) Fields

func (m *SignatureMutation) 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 (*SignatureMutation) ID

func (m *SignatureMutation) ID() (id uuid.UUID, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*SignatureMutation) IDs

func (m *SignatureMutation) IDs(ctx context.Context) ([]uuid.UUID, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*SignatureMutation) KeyID

func (m *SignatureMutation) KeyID() (r string, exists bool)

KeyID returns the value of the "key_id" field in the mutation.

func (*SignatureMutation) OldField

func (m *SignatureMutation) 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 (*SignatureMutation) OldKeyID

func (m *SignatureMutation) OldKeyID(ctx context.Context) (v string, err error)

OldKeyID returns the old "key_id" field's value of the Signature entity. If the Signature object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*SignatureMutation) OldSignature

func (m *SignatureMutation) OldSignature(ctx context.Context) (v string, err error)

OldSignature returns the old "signature" field's value of the Signature entity. If the Signature object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*SignatureMutation) Op

func (m *SignatureMutation) Op() Op

Op returns the operation name.

func (*SignatureMutation) RemoveTimestampIDs

func (m *SignatureMutation) RemoveTimestampIDs(ids ...uuid.UUID)

RemoveTimestampIDs removes the "timestamps" edge to the Timestamp entity by IDs.

func (*SignatureMutation) RemovedEdges

func (m *SignatureMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*SignatureMutation) RemovedIDs

func (m *SignatureMutation) 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 (*SignatureMutation) RemovedTimestampsIDs

func (m *SignatureMutation) RemovedTimestampsIDs() (ids []uuid.UUID)

RemovedTimestamps returns the removed IDs of the "timestamps" edge to the Timestamp entity.

func (*SignatureMutation) ResetDsse

func (m *SignatureMutation) ResetDsse()

ResetDsse resets all changes to the "dsse" edge.

func (*SignatureMutation) ResetEdge

func (m *SignatureMutation) 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 (*SignatureMutation) ResetField

func (m *SignatureMutation) 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 (*SignatureMutation) ResetKeyID

func (m *SignatureMutation) ResetKeyID()

ResetKeyID resets all changes to the "key_id" field.

func (*SignatureMutation) ResetSignature

func (m *SignatureMutation) ResetSignature()

ResetSignature resets all changes to the "signature" field.

func (*SignatureMutation) ResetTimestamps

func (m *SignatureMutation) ResetTimestamps()

ResetTimestamps resets all changes to the "timestamps" edge.

func (*SignatureMutation) SetDsseID

func (m *SignatureMutation) SetDsseID(id uuid.UUID)

SetDsseID sets the "dsse" edge to the Dsse entity by id.

func (*SignatureMutation) SetField

func (m *SignatureMutation) 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 (*SignatureMutation) SetID added in v0.5.0

func (m *SignatureMutation) SetID(id uuid.UUID)

SetID sets the value of the id field. Note that this operation is only accepted on creation of Signature entities.

func (*SignatureMutation) SetKeyID

func (m *SignatureMutation) SetKeyID(s string)

SetKeyID sets the "key_id" field.

func (*SignatureMutation) SetOp

func (m *SignatureMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*SignatureMutation) SetSignature

func (m *SignatureMutation) SetSignature(s string)

SetSignature sets the "signature" field.

func (*SignatureMutation) Signature

func (m *SignatureMutation) Signature() (r string, exists bool)

Signature returns the value of the "signature" field in the mutation.

func (*SignatureMutation) TimestampsCleared

func (m *SignatureMutation) TimestampsCleared() bool

TimestampsCleared reports if the "timestamps" edge to the Timestamp entity was cleared.

func (*SignatureMutation) TimestampsIDs

func (m *SignatureMutation) TimestampsIDs() (ids []uuid.UUID)

TimestampsIDs returns the "timestamps" edge IDs in the mutation.

func (SignatureMutation) Tx

func (m SignatureMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*SignatureMutation) Type

func (m *SignatureMutation) Type() string

Type returns the node type of this mutation (Signature).

func (*SignatureMutation) Where

func (m *SignatureMutation) Where(ps ...predicate.Signature)

Where appends a list predicates to the SignatureMutation builder.

func (*SignatureMutation) WhereP

func (m *SignatureMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the SignatureMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type SignatureOrder

type SignatureOrder struct {
	Direction OrderDirection       `json:"direction"`
	Field     *SignatureOrderField `json:"field"`
}

SignatureOrder defines the ordering of Signature.

type SignatureOrderField

type SignatureOrderField struct {
	// Value extracts the ordering value from the given Signature.
	Value func(*Signature) (ent.Value, error)
	// contains filtered or unexported fields
}

SignatureOrderField defines the ordering field of Signature.

type SignaturePaginateOption

type SignaturePaginateOption func(*signaturePager) error

SignaturePaginateOption enables pagination customization.

func WithSignatureFilter

func WithSignatureFilter(filter func(*SignatureQuery) (*SignatureQuery, error)) SignaturePaginateOption

WithSignatureFilter configures pagination filter.

func WithSignatureOrder

func WithSignatureOrder(order *SignatureOrder) SignaturePaginateOption

WithSignatureOrder configures pagination ordering.

type SignatureQuery

type SignatureQuery struct {
	// contains filtered or unexported fields
}

SignatureQuery is the builder for querying Signature entities.

func (*SignatureQuery) Aggregate

func (sq *SignatureQuery) Aggregate(fns ...AggregateFunc) *SignatureSelect

Aggregate returns a SignatureSelect configured with the given aggregations.

func (*SignatureQuery) All

func (sq *SignatureQuery) All(ctx context.Context) ([]*Signature, error)

All executes the query and returns a list of Signatures.

func (*SignatureQuery) AllX

func (sq *SignatureQuery) AllX(ctx context.Context) []*Signature

AllX is like All, but panics if an error occurs.

func (*SignatureQuery) Clone

func (sq *SignatureQuery) Clone() *SignatureQuery

Clone returns a duplicate of the SignatureQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*SignatureQuery) CollectFields

func (s *SignatureQuery) CollectFields(ctx context.Context, satisfies ...string) (*SignatureQuery, error)

CollectFields tells the query-builder to eagerly load connected nodes by resolver context.

func (*SignatureQuery) Count

func (sq *SignatureQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*SignatureQuery) CountX

func (sq *SignatureQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*SignatureQuery) Exist

func (sq *SignatureQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*SignatureQuery) ExistX

func (sq *SignatureQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*SignatureQuery) First

func (sq *SignatureQuery) First(ctx context.Context) (*Signature, error)

First returns the first Signature entity from the query. Returns a *NotFoundError when no Signature was found.

func (*SignatureQuery) FirstID

func (sq *SignatureQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)

FirstID returns the first Signature ID from the query. Returns a *NotFoundError when no Signature ID was found.

func (*SignatureQuery) FirstIDX

func (sq *SignatureQuery) FirstIDX(ctx context.Context) uuid.UUID

FirstIDX is like FirstID, but panics if an error occurs.

func (*SignatureQuery) FirstX

func (sq *SignatureQuery) FirstX(ctx context.Context) *Signature

FirstX is like First, but panics if an error occurs.

func (*SignatureQuery) GroupBy

func (sq *SignatureQuery) GroupBy(field string, fields ...string) *SignatureGroupBy

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 {
	KeyID string `json:"key_id,omitempty"`
	Count int `json:"count,omitempty"`
}

client.Signature.Query().
	GroupBy(signature.FieldKeyID).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*SignatureQuery) IDs

func (sq *SignatureQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)

IDs executes the query and returns a list of Signature IDs.

func (*SignatureQuery) IDsX

func (sq *SignatureQuery) IDsX(ctx context.Context) []uuid.UUID

IDsX is like IDs, but panics if an error occurs.

func (*SignatureQuery) Limit

func (sq *SignatureQuery) Limit(limit int) *SignatureQuery

Limit the number of records to be returned by this query.

func (*SignatureQuery) Offset

func (sq *SignatureQuery) Offset(offset int) *SignatureQuery

Offset to start from.

func (*SignatureQuery) Only

func (sq *SignatureQuery) Only(ctx context.Context) (*Signature, error)

Only returns a single Signature entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Signature entity is found. Returns a *NotFoundError when no Signature entities are found.

func (*SignatureQuery) OnlyID

func (sq *SignatureQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)

OnlyID is like Only, but returns the only Signature ID in the query. Returns a *NotSingularError when more than one Signature ID is found. Returns a *NotFoundError when no entities are found.

func (*SignatureQuery) OnlyIDX

func (sq *SignatureQuery) OnlyIDX(ctx context.Context) uuid.UUID

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*SignatureQuery) OnlyX

func (sq *SignatureQuery) OnlyX(ctx context.Context) *Signature

OnlyX is like Only, but panics if an error occurs.

func (*SignatureQuery) Order

Order specifies how the records should be ordered.

func (*SignatureQuery) Paginate

func (s *SignatureQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...SignaturePaginateOption,
) (*SignatureConnection, error)

Paginate executes the query and returns a relay based cursor connection to Signature.

func (*SignatureQuery) QueryDsse

func (sq *SignatureQuery) QueryDsse() *DsseQuery

QueryDsse chains the current query on the "dsse" edge.

func (*SignatureQuery) QueryTimestamps

func (sq *SignatureQuery) QueryTimestamps() *TimestampQuery

QueryTimestamps chains the current query on the "timestamps" edge.

func (*SignatureQuery) Select

func (sq *SignatureQuery) Select(fields ...string) *SignatureSelect

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 {
	KeyID string `json:"key_id,omitempty"`
}

client.Signature.Query().
	Select(signature.FieldKeyID).
	Scan(ctx, &v)

func (*SignatureQuery) Unique

func (sq *SignatureQuery) Unique(unique bool) *SignatureQuery

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 (*SignatureQuery) Where

Where adds a new predicate for the SignatureQuery builder.

func (*SignatureQuery) WithDsse

func (sq *SignatureQuery) WithDsse(opts ...func(*DsseQuery)) *SignatureQuery

WithDsse tells the query-builder to eager-load the nodes that are connected to the "dsse" edge. The optional arguments are used to configure the query builder of the edge.

func (*SignatureQuery) WithNamedTimestamps

func (sq *SignatureQuery) WithNamedTimestamps(name string, opts ...func(*TimestampQuery)) *SignatureQuery

WithNamedTimestamps tells the query-builder to eager-load the nodes that are connected to the "timestamps" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*SignatureQuery) WithTimestamps

func (sq *SignatureQuery) WithTimestamps(opts ...func(*TimestampQuery)) *SignatureQuery

WithTimestamps tells the query-builder to eager-load the nodes that are connected to the "timestamps" edge. The optional arguments are used to configure the query builder of the edge.

type SignatureSelect

type SignatureSelect struct {
	*SignatureQuery
	// contains filtered or unexported fields
}

SignatureSelect is the builder for selecting fields of Signature entities.

func (*SignatureSelect) Aggregate

func (ss *SignatureSelect) Aggregate(fns ...AggregateFunc) *SignatureSelect

Aggregate adds the given aggregation functions to the selector query.

func (*SignatureSelect) Bool

func (s *SignatureSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*SignatureSelect) BoolX

func (s *SignatureSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*SignatureSelect) Bools

func (s *SignatureSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*SignatureSelect) BoolsX

func (s *SignatureSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*SignatureSelect) Float64

func (s *SignatureSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*SignatureSelect) Float64X

func (s *SignatureSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*SignatureSelect) Float64s

func (s *SignatureSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*SignatureSelect) Float64sX

func (s *SignatureSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*SignatureSelect) Int

func (s *SignatureSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*SignatureSelect) IntX

func (s *SignatureSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*SignatureSelect) Ints

func (s *SignatureSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*SignatureSelect) IntsX

func (s *SignatureSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*SignatureSelect) Scan

func (ss *SignatureSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*SignatureSelect) ScanX

func (s *SignatureSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*SignatureSelect) String

func (s *SignatureSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*SignatureSelect) StringX

func (s *SignatureSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*SignatureSelect) Strings

func (s *SignatureSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*SignatureSelect) StringsX

func (s *SignatureSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type SignatureUpdate

type SignatureUpdate struct {
	// contains filtered or unexported fields
}

SignatureUpdate is the builder for updating Signature entities.

func (*SignatureUpdate) AddTimestampIDs

func (su *SignatureUpdate) AddTimestampIDs(ids ...uuid.UUID) *SignatureUpdate

AddTimestampIDs adds the "timestamps" edge to the Timestamp entity by IDs.

func (*SignatureUpdate) AddTimestamps

func (su *SignatureUpdate) AddTimestamps(t ...*Timestamp) *SignatureUpdate

AddTimestamps adds the "timestamps" edges to the Timestamp entity.

func (*SignatureUpdate) ClearDsse

func (su *SignatureUpdate) ClearDsse() *SignatureUpdate

ClearDsse clears the "dsse" edge to the Dsse entity.

func (*SignatureUpdate) ClearTimestamps

func (su *SignatureUpdate) ClearTimestamps() *SignatureUpdate

ClearTimestamps clears all "timestamps" edges to the Timestamp entity.

func (*SignatureUpdate) Exec

func (su *SignatureUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*SignatureUpdate) ExecX

func (su *SignatureUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SignatureUpdate) Mutation

func (su *SignatureUpdate) Mutation() *SignatureMutation

Mutation returns the SignatureMutation object of the builder.

func (*SignatureUpdate) RemoveTimestampIDs

func (su *SignatureUpdate) RemoveTimestampIDs(ids ...uuid.UUID) *SignatureUpdate

RemoveTimestampIDs removes the "timestamps" edge to Timestamp entities by IDs.

func (*SignatureUpdate) RemoveTimestamps

func (su *SignatureUpdate) RemoveTimestamps(t ...*Timestamp) *SignatureUpdate

RemoveTimestamps removes "timestamps" edges to Timestamp entities.

func (*SignatureUpdate) Save

func (su *SignatureUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*SignatureUpdate) SaveX

func (su *SignatureUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*SignatureUpdate) SetDsse

func (su *SignatureUpdate) SetDsse(d *Dsse) *SignatureUpdate

SetDsse sets the "dsse" edge to the Dsse entity.

func (*SignatureUpdate) SetDsseID

func (su *SignatureUpdate) SetDsseID(id uuid.UUID) *SignatureUpdate

SetDsseID sets the "dsse" edge to the Dsse entity by ID.

func (*SignatureUpdate) SetKeyID

func (su *SignatureUpdate) SetKeyID(s string) *SignatureUpdate

SetKeyID sets the "key_id" field.

func (*SignatureUpdate) SetNillableDsseID

func (su *SignatureUpdate) SetNillableDsseID(id *uuid.UUID) *SignatureUpdate

SetNillableDsseID sets the "dsse" edge to the Dsse entity by ID if the given value is not nil.

func (*SignatureUpdate) SetNillableKeyID

func (su *SignatureUpdate) SetNillableKeyID(s *string) *SignatureUpdate

SetNillableKeyID sets the "key_id" field if the given value is not nil.

func (*SignatureUpdate) SetNillableSignature

func (su *SignatureUpdate) SetNillableSignature(s *string) *SignatureUpdate

SetNillableSignature sets the "signature" field if the given value is not nil.

func (*SignatureUpdate) SetSignature

func (su *SignatureUpdate) SetSignature(s string) *SignatureUpdate

SetSignature sets the "signature" field.

func (*SignatureUpdate) Where

Where appends a list predicates to the SignatureUpdate builder.

type SignatureUpdateOne

type SignatureUpdateOne struct {
	// contains filtered or unexported fields
}

SignatureUpdateOne is the builder for updating a single Signature entity.

func (*SignatureUpdateOne) AddTimestampIDs

func (suo *SignatureUpdateOne) AddTimestampIDs(ids ...uuid.UUID) *SignatureUpdateOne

AddTimestampIDs adds the "timestamps" edge to the Timestamp entity by IDs.

func (*SignatureUpdateOne) AddTimestamps

func (suo *SignatureUpdateOne) AddTimestamps(t ...*Timestamp) *SignatureUpdateOne

AddTimestamps adds the "timestamps" edges to the Timestamp entity.

func (*SignatureUpdateOne) ClearDsse

func (suo *SignatureUpdateOne) ClearDsse() *SignatureUpdateOne

ClearDsse clears the "dsse" edge to the Dsse entity.

func (*SignatureUpdateOne) ClearTimestamps

func (suo *SignatureUpdateOne) ClearTimestamps() *SignatureUpdateOne

ClearTimestamps clears all "timestamps" edges to the Timestamp entity.

func (*SignatureUpdateOne) Exec

func (suo *SignatureUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*SignatureUpdateOne) ExecX

func (suo *SignatureUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SignatureUpdateOne) Mutation

func (suo *SignatureUpdateOne) Mutation() *SignatureMutation

Mutation returns the SignatureMutation object of the builder.

func (*SignatureUpdateOne) RemoveTimestampIDs

func (suo *SignatureUpdateOne) RemoveTimestampIDs(ids ...uuid.UUID) *SignatureUpdateOne

RemoveTimestampIDs removes the "timestamps" edge to Timestamp entities by IDs.

func (*SignatureUpdateOne) RemoveTimestamps

func (suo *SignatureUpdateOne) RemoveTimestamps(t ...*Timestamp) *SignatureUpdateOne

RemoveTimestamps removes "timestamps" edges to Timestamp entities.

func (*SignatureUpdateOne) Save

func (suo *SignatureUpdateOne) Save(ctx context.Context) (*Signature, error)

Save executes the query and returns the updated Signature entity.

func (*SignatureUpdateOne) SaveX

func (suo *SignatureUpdateOne) SaveX(ctx context.Context) *Signature

SaveX is like Save, but panics if an error occurs.

func (*SignatureUpdateOne) Select

func (suo *SignatureUpdateOne) Select(field string, fields ...string) *SignatureUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*SignatureUpdateOne) SetDsse

func (suo *SignatureUpdateOne) SetDsse(d *Dsse) *SignatureUpdateOne

SetDsse sets the "dsse" edge to the Dsse entity.

func (*SignatureUpdateOne) SetDsseID

func (suo *SignatureUpdateOne) SetDsseID(id uuid.UUID) *SignatureUpdateOne

SetDsseID sets the "dsse" edge to the Dsse entity by ID.

func (*SignatureUpdateOne) SetKeyID

func (suo *SignatureUpdateOne) SetKeyID(s string) *SignatureUpdateOne

SetKeyID sets the "key_id" field.

func (*SignatureUpdateOne) SetNillableDsseID

func (suo *SignatureUpdateOne) SetNillableDsseID(id *uuid.UUID) *SignatureUpdateOne

SetNillableDsseID sets the "dsse" edge to the Dsse entity by ID if the given value is not nil.

func (*SignatureUpdateOne) SetNillableKeyID

func (suo *SignatureUpdateOne) SetNillableKeyID(s *string) *SignatureUpdateOne

SetNillableKeyID sets the "key_id" field if the given value is not nil.

func (*SignatureUpdateOne) SetNillableSignature

func (suo *SignatureUpdateOne) SetNillableSignature(s *string) *SignatureUpdateOne

SetNillableSignature sets the "signature" field if the given value is not nil.

func (*SignatureUpdateOne) SetSignature

func (suo *SignatureUpdateOne) SetSignature(s string) *SignatureUpdateOne

SetSignature sets the "signature" field.

func (*SignatureUpdateOne) Where

Where appends a list predicates to the SignatureUpdate builder.

type SignatureWhereInput

type SignatureWhereInput struct {
	Predicates []predicate.Signature  `json:"-"`
	Not        *SignatureWhereInput   `json:"not,omitempty"`
	Or         []*SignatureWhereInput `json:"or,omitempty"`
	And        []*SignatureWhereInput `json:"and,omitempty"`

	// "id" field predicates.
	ID      *uuid.UUID  `json:"id,omitempty"`
	IDNEQ   *uuid.UUID  `json:"idNEQ,omitempty"`
	IDIn    []uuid.UUID `json:"idIn,omitempty"`
	IDNotIn []uuid.UUID `json:"idNotIn,omitempty"`
	IDGT    *uuid.UUID  `json:"idGT,omitempty"`
	IDGTE   *uuid.UUID  `json:"idGTE,omitempty"`
	IDLT    *uuid.UUID  `json:"idLT,omitempty"`
	IDLTE   *uuid.UUID  `json:"idLTE,omitempty"`

	// "key_id" field predicates.
	KeyID             *string  `json:"keyID,omitempty"`
	KeyIDNEQ          *string  `json:"keyIDNEQ,omitempty"`
	KeyIDIn           []string `json:"keyIDIn,omitempty"`
	KeyIDNotIn        []string `json:"keyIDNotIn,omitempty"`
	KeyIDGT           *string  `json:"keyIDGT,omitempty"`
	KeyIDGTE          *string  `json:"keyIDGTE,omitempty"`
	KeyIDLT           *string  `json:"keyIDLT,omitempty"`
	KeyIDLTE          *string  `json:"keyIDLTE,omitempty"`
	KeyIDContains     *string  `json:"keyIDContains,omitempty"`
	KeyIDHasPrefix    *string  `json:"keyIDHasPrefix,omitempty"`
	KeyIDHasSuffix    *string  `json:"keyIDHasSuffix,omitempty"`
	KeyIDEqualFold    *string  `json:"keyIDEqualFold,omitempty"`
	KeyIDContainsFold *string  `json:"keyIDContainsFold,omitempty"`

	// "signature" field predicates.
	Signature             *string  `json:"signature,omitempty"`
	SignatureNEQ          *string  `json:"signatureNEQ,omitempty"`
	SignatureIn           []string `json:"signatureIn,omitempty"`
	SignatureNotIn        []string `json:"signatureNotIn,omitempty"`
	SignatureGT           *string  `json:"signatureGT,omitempty"`
	SignatureGTE          *string  `json:"signatureGTE,omitempty"`
	SignatureLT           *string  `json:"signatureLT,omitempty"`
	SignatureLTE          *string  `json:"signatureLTE,omitempty"`
	SignatureContains     *string  `json:"signatureContains,omitempty"`
	SignatureHasPrefix    *string  `json:"signatureHasPrefix,omitempty"`
	SignatureHasSuffix    *string  `json:"signatureHasSuffix,omitempty"`
	SignatureEqualFold    *string  `json:"signatureEqualFold,omitempty"`
	SignatureContainsFold *string  `json:"signatureContainsFold,omitempty"`

	// "dsse" edge predicates.
	HasDsse     *bool             `json:"hasDsse,omitempty"`
	HasDsseWith []*DsseWhereInput `json:"hasDsseWith,omitempty"`

	// "timestamps" edge predicates.
	HasTimestamps     *bool                  `json:"hasTimestamps,omitempty"`
	HasTimestampsWith []*TimestampWhereInput `json:"hasTimestampsWith,omitempty"`
}

SignatureWhereInput represents a where input for filtering Signature queries.

func (*SignatureWhereInput) AddPredicates

func (i *SignatureWhereInput) AddPredicates(predicates ...predicate.Signature)

AddPredicates adds custom predicates to the where input to be used during the filtering phase.

func (*SignatureWhereInput) Filter

Filter applies the SignatureWhereInput filter on the SignatureQuery builder.

func (*SignatureWhereInput) P

P returns a predicate for filtering signatures. An error is returned if the input is empty or invalid.

type Signatures

type Signatures []*Signature

Signatures is a parsable slice of Signature.

type Statement

type Statement struct {

	// ID of the ent.
	ID uuid.UUID `json:"id,omitempty"`
	// Predicate holds the value of the "predicate" field.
	Predicate string `json:"predicate,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the StatementQuery when eager-loading is set.
	Edges StatementEdges `json:"edges"`
	// contains filtered or unexported fields
}

Statement is the model entity for the Statement schema.

func (*Statement) AttestationCollections

func (s *Statement) AttestationCollections(ctx context.Context) (*AttestationCollection, error)

func (*Statement) Dsse

func (s *Statement) Dsse(ctx context.Context) (result []*Dsse, err error)

func (*Statement) IsNode

func (*Statement) IsNode()

IsNode implements the Node interface check for GQLGen.

func (*Statement) NamedDsse

func (s *Statement) NamedDsse(name string) ([]*Dsse, error)

NamedDsse returns the Dsse named value or an error if the edge was not loaded in eager-loading with this name.

func (*Statement) NamedSubjects

func (s *Statement) NamedSubjects(name string) ([]*Subject, error)

NamedSubjects returns the Subjects named value or an error if the edge was not loaded in eager-loading with this name.

func (*Statement) Policy added in v0.5.0

func (s *Statement) Policy(ctx context.Context) (*AttestationPolicy, error)

func (*Statement) QueryAttestationCollections

func (s *Statement) QueryAttestationCollections() *AttestationCollectionQuery

QueryAttestationCollections queries the "attestation_collections" edge of the Statement entity.

func (*Statement) QueryDsse

func (s *Statement) QueryDsse() *DsseQuery

QueryDsse queries the "dsse" edge of the Statement entity.

func (*Statement) QueryPolicy added in v0.5.0

func (s *Statement) QueryPolicy() *AttestationPolicyQuery

QueryPolicy queries the "policy" edge of the Statement entity.

func (*Statement) QuerySubjects

func (s *Statement) QuerySubjects() *SubjectQuery

QuerySubjects queries the "subjects" edge of the Statement entity.

func (*Statement) String

func (s *Statement) String() string

String implements the fmt.Stringer.

func (*Statement) Subjects

func (s *Statement) Subjects(
	ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, where *SubjectWhereInput,
) (*SubjectConnection, error)

func (*Statement) ToEdge

func (s *Statement) ToEdge(order *StatementOrder) *StatementEdge

ToEdge converts Statement into StatementEdge.

func (*Statement) Unwrap

func (s *Statement) Unwrap() *Statement

Unwrap unwraps the Statement 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 (*Statement) Update

func (s *Statement) Update() *StatementUpdateOne

Update returns a builder for updating this Statement. Note that you need to call Statement.Unwrap() before calling this method if this Statement was returned from a transaction, and the transaction was committed or rolled back.

func (*Statement) Value

func (s *Statement) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the Statement. This includes values selected through modifiers, order, etc.

type StatementClient

type StatementClient struct {
	// contains filtered or unexported fields
}

StatementClient is a client for the Statement schema.

func NewStatementClient

func NewStatementClient(c config) *StatementClient

NewStatementClient returns a client for the Statement from the given config.

func (*StatementClient) Create

func (c *StatementClient) Create() *StatementCreate

Create returns a builder for creating a Statement entity.

func (*StatementClient) CreateBulk

func (c *StatementClient) CreateBulk(builders ...*StatementCreate) *StatementCreateBulk

CreateBulk returns a builder for creating a bulk of Statement entities.

func (*StatementClient) Delete

func (c *StatementClient) Delete() *StatementDelete

Delete returns a delete builder for Statement.

func (*StatementClient) DeleteOne

func (c *StatementClient) DeleteOne(s *Statement) *StatementDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*StatementClient) DeleteOneID

func (c *StatementClient) DeleteOneID(id uuid.UUID) *StatementDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*StatementClient) Get

func (c *StatementClient) Get(ctx context.Context, id uuid.UUID) (*Statement, error)

Get returns a Statement entity by its id.

func (*StatementClient) GetX

func (c *StatementClient) GetX(ctx context.Context, id uuid.UUID) *Statement

GetX is like Get, but panics if an error occurs.

func (*StatementClient) Hooks

func (c *StatementClient) Hooks() []Hook

Hooks returns the client hooks.

func (*StatementClient) Intercept

func (c *StatementClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `statement.Intercept(f(g(h())))`.

func (*StatementClient) Interceptors

func (c *StatementClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*StatementClient) MapCreateBulk

func (c *StatementClient) MapCreateBulk(slice any, setFunc func(*StatementCreate, int)) *StatementCreateBulk

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 (*StatementClient) Query

func (c *StatementClient) Query() *StatementQuery

Query returns a query builder for Statement.

func (*StatementClient) QueryAttestationCollections

func (c *StatementClient) QueryAttestationCollections(s *Statement) *AttestationCollectionQuery

QueryAttestationCollections queries the attestation_collections edge of a Statement.

func (*StatementClient) QueryDsse

func (c *StatementClient) QueryDsse(s *Statement) *DsseQuery

QueryDsse queries the dsse edge of a Statement.

func (*StatementClient) QueryPolicy added in v0.5.0

func (c *StatementClient) QueryPolicy(s *Statement) *AttestationPolicyQuery

QueryPolicy queries the policy edge of a Statement.

func (*StatementClient) QuerySubjects

func (c *StatementClient) QuerySubjects(s *Statement) *SubjectQuery

QuerySubjects queries the subjects edge of a Statement.

func (*StatementClient) Update

func (c *StatementClient) Update() *StatementUpdate

Update returns an update builder for Statement.

func (*StatementClient) UpdateOne

func (c *StatementClient) UpdateOne(s *Statement) *StatementUpdateOne

UpdateOne returns an update builder for the given entity.

func (*StatementClient) UpdateOneID

func (c *StatementClient) UpdateOneID(id uuid.UUID) *StatementUpdateOne

UpdateOneID returns an update builder for the given id.

func (*StatementClient) Use

func (c *StatementClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `statement.Hooks(f(g(h())))`.

type StatementConnection

type StatementConnection struct {
	Edges      []*StatementEdge `json:"edges"`
	PageInfo   PageInfo         `json:"pageInfo"`
	TotalCount int              `json:"totalCount"`
}

StatementConnection is the connection containing edges to Statement.

type StatementCreate

type StatementCreate struct {
	// contains filtered or unexported fields
}

StatementCreate is the builder for creating a Statement entity.

func (*StatementCreate) AddDsse

func (sc *StatementCreate) AddDsse(d ...*Dsse) *StatementCreate

AddDsse adds the "dsse" edges to the Dsse entity.

func (*StatementCreate) AddDsseIDs

func (sc *StatementCreate) AddDsseIDs(ids ...uuid.UUID) *StatementCreate

AddDsseIDs adds the "dsse" edge to the Dsse entity by IDs.

func (*StatementCreate) AddSubjectIDs

func (sc *StatementCreate) AddSubjectIDs(ids ...uuid.UUID) *StatementCreate

AddSubjectIDs adds the "subjects" edge to the Subject entity by IDs.

func (*StatementCreate) AddSubjects

func (sc *StatementCreate) AddSubjects(s ...*Subject) *StatementCreate

AddSubjects adds the "subjects" edges to the Subject entity.

func (*StatementCreate) Exec

func (sc *StatementCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*StatementCreate) ExecX

func (sc *StatementCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*StatementCreate) Mutation

func (sc *StatementCreate) Mutation() *StatementMutation

Mutation returns the StatementMutation object of the builder.

func (*StatementCreate) Save

func (sc *StatementCreate) Save(ctx context.Context) (*Statement, error)

Save creates the Statement in the database.

func (*StatementCreate) SaveX

func (sc *StatementCreate) SaveX(ctx context.Context) *Statement

SaveX calls Save and panics if Save returns an error.

func (*StatementCreate) SetAttestationCollections

func (sc *StatementCreate) SetAttestationCollections(a *AttestationCollection) *StatementCreate

SetAttestationCollections sets the "attestation_collections" edge to the AttestationCollection entity.

func (*StatementCreate) SetAttestationCollectionsID

func (sc *StatementCreate) SetAttestationCollectionsID(id uuid.UUID) *StatementCreate

SetAttestationCollectionsID sets the "attestation_collections" edge to the AttestationCollection entity by ID.

func (*StatementCreate) SetID added in v0.5.0

func (sc *StatementCreate) SetID(u uuid.UUID) *StatementCreate

SetID sets the "id" field.

func (*StatementCreate) SetNillableAttestationCollectionsID

func (sc *StatementCreate) SetNillableAttestationCollectionsID(id *uuid.UUID) *StatementCreate

SetNillableAttestationCollectionsID sets the "attestation_collections" edge to the AttestationCollection entity by ID if the given value is not nil.

func (*StatementCreate) SetNillableID added in v0.5.0

func (sc *StatementCreate) SetNillableID(u *uuid.UUID) *StatementCreate

SetNillableID sets the "id" field if the given value is not nil.

func (*StatementCreate) SetNillablePolicyID added in v0.5.0

func (sc *StatementCreate) SetNillablePolicyID(id *uuid.UUID) *StatementCreate

SetNillablePolicyID sets the "policy" edge to the AttestationPolicy entity by ID if the given value is not nil.

func (*StatementCreate) SetPolicy added in v0.5.0

SetPolicy sets the "policy" edge to the AttestationPolicy entity.

func (*StatementCreate) SetPolicyID added in v0.5.0

func (sc *StatementCreate) SetPolicyID(id uuid.UUID) *StatementCreate

SetPolicyID sets the "policy" edge to the AttestationPolicy entity by ID.

func (*StatementCreate) SetPredicate

func (sc *StatementCreate) SetPredicate(s string) *StatementCreate

SetPredicate sets the "predicate" field.

type StatementCreateBulk

type StatementCreateBulk struct {
	// contains filtered or unexported fields
}

StatementCreateBulk is the builder for creating many Statement entities in bulk.

func (*StatementCreateBulk) Exec

func (scb *StatementCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*StatementCreateBulk) ExecX

func (scb *StatementCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*StatementCreateBulk) Save

func (scb *StatementCreateBulk) Save(ctx context.Context) ([]*Statement, error)

Save creates the Statement entities in the database.

func (*StatementCreateBulk) SaveX

func (scb *StatementCreateBulk) SaveX(ctx context.Context) []*Statement

SaveX is like Save, but panics if an error occurs.

type StatementDelete

type StatementDelete struct {
	// contains filtered or unexported fields
}

StatementDelete is the builder for deleting a Statement entity.

func (*StatementDelete) Exec

func (sd *StatementDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*StatementDelete) ExecX

func (sd *StatementDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*StatementDelete) Where

Where appends a list predicates to the StatementDelete builder.

type StatementDeleteOne

type StatementDeleteOne struct {
	// contains filtered or unexported fields
}

StatementDeleteOne is the builder for deleting a single Statement entity.

func (*StatementDeleteOne) Exec

func (sdo *StatementDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*StatementDeleteOne) ExecX

func (sdo *StatementDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*StatementDeleteOne) Where

Where appends a list predicates to the StatementDelete builder.

type StatementEdge

type StatementEdge struct {
	Node   *Statement `json:"node"`
	Cursor Cursor     `json:"cursor"`
}

StatementEdge is the edge representation of Statement.

type StatementEdges

type StatementEdges struct {
	// Subjects holds the value of the subjects edge.
	Subjects []*Subject `json:"subjects,omitempty"`
	// Policy holds the value of the policy edge.
	Policy *AttestationPolicy `json:"policy,omitempty"`
	// AttestationCollections holds the value of the attestation_collections edge.
	AttestationCollections *AttestationCollection `json:"attestation_collections,omitempty"`
	// Dsse holds the value of the dsse edge.
	Dsse []*Dsse `json:"dsse,omitempty"`
	// contains filtered or unexported fields
}

StatementEdges holds the relations/edges for other nodes in the graph.

func (StatementEdges) AttestationCollectionsOrErr

func (e StatementEdges) AttestationCollectionsOrErr() (*AttestationCollection, error)

AttestationCollectionsOrErr returns the AttestationCollections value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (StatementEdges) DsseOrErr

func (e StatementEdges) DsseOrErr() ([]*Dsse, error)

DsseOrErr returns the Dsse value or an error if the edge was not loaded in eager-loading.

func (StatementEdges) PolicyOrErr added in v0.5.0

func (e StatementEdges) PolicyOrErr() (*AttestationPolicy, error)

PolicyOrErr returns the Policy value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (StatementEdges) SubjectsOrErr

func (e StatementEdges) SubjectsOrErr() ([]*Subject, error)

SubjectsOrErr returns the Subjects value or an error if the edge was not loaded in eager-loading.

type StatementGroupBy

type StatementGroupBy struct {
	// contains filtered or unexported fields
}

StatementGroupBy is the group-by builder for Statement entities.

func (*StatementGroupBy) Aggregate

func (sgb *StatementGroupBy) Aggregate(fns ...AggregateFunc) *StatementGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*StatementGroupBy) Bool

func (s *StatementGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*StatementGroupBy) BoolX

func (s *StatementGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*StatementGroupBy) Bools

func (s *StatementGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*StatementGroupBy) BoolsX

func (s *StatementGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*StatementGroupBy) Float64

func (s *StatementGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*StatementGroupBy) Float64X

func (s *StatementGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*StatementGroupBy) Float64s

func (s *StatementGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*StatementGroupBy) Float64sX

func (s *StatementGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*StatementGroupBy) Int

func (s *StatementGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*StatementGroupBy) IntX

func (s *StatementGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*StatementGroupBy) Ints

func (s *StatementGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*StatementGroupBy) IntsX

func (s *StatementGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*StatementGroupBy) Scan

func (sgb *StatementGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*StatementGroupBy) ScanX

func (s *StatementGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*StatementGroupBy) String

func (s *StatementGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*StatementGroupBy) StringX

func (s *StatementGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*StatementGroupBy) Strings

func (s *StatementGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*StatementGroupBy) StringsX

func (s *StatementGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type StatementMutation

type StatementMutation struct {
	// contains filtered or unexported fields
}

StatementMutation represents an operation that mutates the Statement nodes in the graph.

func (*StatementMutation) AddDsseIDs

func (m *StatementMutation) AddDsseIDs(ids ...uuid.UUID)

AddDsseIDs adds the "dsse" edge to the Dsse entity by ids.

func (*StatementMutation) AddField

func (m *StatementMutation) 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 (*StatementMutation) AddSubjectIDs

func (m *StatementMutation) AddSubjectIDs(ids ...uuid.UUID)

AddSubjectIDs adds the "subjects" edge to the Subject entity by ids.

func (*StatementMutation) AddedEdges

func (m *StatementMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*StatementMutation) AddedField

func (m *StatementMutation) 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 (*StatementMutation) AddedFields

func (m *StatementMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*StatementMutation) AddedIDs

func (m *StatementMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*StatementMutation) AttestationCollectionsCleared

func (m *StatementMutation) AttestationCollectionsCleared() bool

AttestationCollectionsCleared reports if the "attestation_collections" edge to the AttestationCollection entity was cleared.

func (*StatementMutation) AttestationCollectionsID

func (m *StatementMutation) AttestationCollectionsID() (id uuid.UUID, exists bool)

AttestationCollectionsID returns the "attestation_collections" edge ID in the mutation.

func (*StatementMutation) AttestationCollectionsIDs

func (m *StatementMutation) AttestationCollectionsIDs() (ids []uuid.UUID)

AttestationCollectionsIDs returns the "attestation_collections" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use AttestationCollectionsID instead. It exists only for internal usage by the builders.

func (*StatementMutation) ClearAttestationCollections

func (m *StatementMutation) ClearAttestationCollections()

ClearAttestationCollections clears the "attestation_collections" edge to the AttestationCollection entity.

func (*StatementMutation) ClearDsse

func (m *StatementMutation) ClearDsse()

ClearDsse clears the "dsse" edge to the Dsse entity.

func (*StatementMutation) ClearEdge

func (m *StatementMutation) 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 (*StatementMutation) ClearField

func (m *StatementMutation) 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 (*StatementMutation) ClearPolicy added in v0.5.0

func (m *StatementMutation) ClearPolicy()

ClearPolicy clears the "policy" edge to the AttestationPolicy entity.

func (*StatementMutation) ClearSubjects

func (m *StatementMutation) ClearSubjects()

ClearSubjects clears the "subjects" edge to the Subject entity.

func (*StatementMutation) ClearedEdges

func (m *StatementMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*StatementMutation) ClearedFields

func (m *StatementMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (StatementMutation) Client

func (m StatementMutation) 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 (*StatementMutation) DsseCleared

func (m *StatementMutation) DsseCleared() bool

DsseCleared reports if the "dsse" edge to the Dsse entity was cleared.

func (*StatementMutation) DsseIDs

func (m *StatementMutation) DsseIDs() (ids []uuid.UUID)

DsseIDs returns the "dsse" edge IDs in the mutation.

func (*StatementMutation) EdgeCleared

func (m *StatementMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*StatementMutation) Field

func (m *StatementMutation) 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 (*StatementMutation) FieldCleared

func (m *StatementMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*StatementMutation) Fields

func (m *StatementMutation) 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 (*StatementMutation) ID

func (m *StatementMutation) ID() (id uuid.UUID, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*StatementMutation) IDs

func (m *StatementMutation) IDs(ctx context.Context) ([]uuid.UUID, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*StatementMutation) OldField

func (m *StatementMutation) 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 (*StatementMutation) OldPredicate

func (m *StatementMutation) OldPredicate(ctx context.Context) (v string, err error)

OldPredicate returns the old "predicate" field's value of the Statement entity. If the Statement object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*StatementMutation) Op

func (m *StatementMutation) Op() Op

Op returns the operation name.

func (*StatementMutation) PolicyCleared added in v0.5.0

func (m *StatementMutation) PolicyCleared() bool

PolicyCleared reports if the "policy" edge to the AttestationPolicy entity was cleared.

func (*StatementMutation) PolicyID added in v0.5.0

func (m *StatementMutation) PolicyID() (id uuid.UUID, exists bool)

PolicyID returns the "policy" edge ID in the mutation.

func (*StatementMutation) PolicyIDs added in v0.5.0

func (m *StatementMutation) PolicyIDs() (ids []uuid.UUID)

PolicyIDs returns the "policy" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use PolicyID instead. It exists only for internal usage by the builders.

func (*StatementMutation) Predicate

func (m *StatementMutation) Predicate() (r string, exists bool)

Predicate returns the value of the "predicate" field in the mutation.

func (*StatementMutation) RemoveDsseIDs

func (m *StatementMutation) RemoveDsseIDs(ids ...uuid.UUID)

RemoveDsseIDs removes the "dsse" edge to the Dsse entity by IDs.

func (*StatementMutation) RemoveSubjectIDs

func (m *StatementMutation) RemoveSubjectIDs(ids ...uuid.UUID)

RemoveSubjectIDs removes the "subjects" edge to the Subject entity by IDs.

func (*StatementMutation) RemovedDsseIDs

func (m *StatementMutation) RemovedDsseIDs() (ids []uuid.UUID)

RemovedDsse returns the removed IDs of the "dsse" edge to the Dsse entity.

func (*StatementMutation) RemovedEdges

func (m *StatementMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*StatementMutation) RemovedIDs

func (m *StatementMutation) 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 (*StatementMutation) RemovedSubjectsIDs

func (m *StatementMutation) RemovedSubjectsIDs() (ids []uuid.UUID)

RemovedSubjects returns the removed IDs of the "subjects" edge to the Subject entity.

func (*StatementMutation) ResetAttestationCollections

func (m *StatementMutation) ResetAttestationCollections()

ResetAttestationCollections resets all changes to the "attestation_collections" edge.

func (*StatementMutation) ResetDsse

func (m *StatementMutation) ResetDsse()

ResetDsse resets all changes to the "dsse" edge.

func (*StatementMutation) ResetEdge

func (m *StatementMutation) 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 (*StatementMutation) ResetField

func (m *StatementMutation) 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 (*StatementMutation) ResetPolicy added in v0.5.0

func (m *StatementMutation) ResetPolicy()

ResetPolicy resets all changes to the "policy" edge.

func (*StatementMutation) ResetPredicate

func (m *StatementMutation) ResetPredicate()

ResetPredicate resets all changes to the "predicate" field.

func (*StatementMutation) ResetSubjects

func (m *StatementMutation) ResetSubjects()

ResetSubjects resets all changes to the "subjects" edge.

func (*StatementMutation) SetAttestationCollectionsID

func (m *StatementMutation) SetAttestationCollectionsID(id uuid.UUID)

SetAttestationCollectionsID sets the "attestation_collections" edge to the AttestationCollection entity by id.

func (*StatementMutation) SetField

func (m *StatementMutation) 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 (*StatementMutation) SetID added in v0.5.0

func (m *StatementMutation) SetID(id uuid.UUID)

SetID sets the value of the id field. Note that this operation is only accepted on creation of Statement entities.

func (*StatementMutation) SetOp

func (m *StatementMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*StatementMutation) SetPolicyID added in v0.5.0

func (m *StatementMutation) SetPolicyID(id uuid.UUID)

SetPolicyID sets the "policy" edge to the AttestationPolicy entity by id.

func (*StatementMutation) SetPredicate

func (m *StatementMutation) SetPredicate(s string)

SetPredicate sets the "predicate" field.

func (*StatementMutation) SubjectsCleared

func (m *StatementMutation) SubjectsCleared() bool

SubjectsCleared reports if the "subjects" edge to the Subject entity was cleared.

func (*StatementMutation) SubjectsIDs

func (m *StatementMutation) SubjectsIDs() (ids []uuid.UUID)

SubjectsIDs returns the "subjects" edge IDs in the mutation.

func (StatementMutation) Tx

func (m StatementMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*StatementMutation) Type

func (m *StatementMutation) Type() string

Type returns the node type of this mutation (Statement).

func (*StatementMutation) Where

func (m *StatementMutation) Where(ps ...predicate.Statement)

Where appends a list predicates to the StatementMutation builder.

func (*StatementMutation) WhereP

func (m *StatementMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the StatementMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type StatementOrder

type StatementOrder struct {
	Direction OrderDirection       `json:"direction"`
	Field     *StatementOrderField `json:"field"`
}

StatementOrder defines the ordering of Statement.

type StatementOrderField

type StatementOrderField struct {
	// Value extracts the ordering value from the given Statement.
	Value func(*Statement) (ent.Value, error)
	// contains filtered or unexported fields
}

StatementOrderField defines the ordering field of Statement.

type StatementPaginateOption

type StatementPaginateOption func(*statementPager) error

StatementPaginateOption enables pagination customization.

func WithStatementFilter

func WithStatementFilter(filter func(*StatementQuery) (*StatementQuery, error)) StatementPaginateOption

WithStatementFilter configures pagination filter.

func WithStatementOrder

func WithStatementOrder(order *StatementOrder) StatementPaginateOption

WithStatementOrder configures pagination ordering.

type StatementQuery

type StatementQuery struct {
	// contains filtered or unexported fields
}

StatementQuery is the builder for querying Statement entities.

func (*StatementQuery) Aggregate

func (sq *StatementQuery) Aggregate(fns ...AggregateFunc) *StatementSelect

Aggregate returns a StatementSelect configured with the given aggregations.

func (*StatementQuery) All

func (sq *StatementQuery) All(ctx context.Context) ([]*Statement, error)

All executes the query and returns a list of Statements.

func (*StatementQuery) AllX

func (sq *StatementQuery) AllX(ctx context.Context) []*Statement

AllX is like All, but panics if an error occurs.

func (*StatementQuery) Clone

func (sq *StatementQuery) Clone() *StatementQuery

Clone returns a duplicate of the StatementQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*StatementQuery) CollectFields

func (s *StatementQuery) CollectFields(ctx context.Context, satisfies ...string) (*StatementQuery, error)

CollectFields tells the query-builder to eagerly load connected nodes by resolver context.

func (*StatementQuery) Count

func (sq *StatementQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*StatementQuery) CountX

func (sq *StatementQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*StatementQuery) Exist

func (sq *StatementQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*StatementQuery) ExistX

func (sq *StatementQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*StatementQuery) First

func (sq *StatementQuery) First(ctx context.Context) (*Statement, error)

First returns the first Statement entity from the query. Returns a *NotFoundError when no Statement was found.

func (*StatementQuery) FirstID

func (sq *StatementQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)

FirstID returns the first Statement ID from the query. Returns a *NotFoundError when no Statement ID was found.

func (*StatementQuery) FirstIDX

func (sq *StatementQuery) FirstIDX(ctx context.Context) uuid.UUID

FirstIDX is like FirstID, but panics if an error occurs.

func (*StatementQuery) FirstX

func (sq *StatementQuery) FirstX(ctx context.Context) *Statement

FirstX is like First, but panics if an error occurs.

func (*StatementQuery) GroupBy

func (sq *StatementQuery) GroupBy(field string, fields ...string) *StatementGroupBy

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 {
	Predicate string `json:"predicate,omitempty"`
	Count int `json:"count,omitempty"`
}

client.Statement.Query().
	GroupBy(statement.FieldPredicate).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*StatementQuery) IDs

func (sq *StatementQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)

IDs executes the query and returns a list of Statement IDs.

func (*StatementQuery) IDsX

func (sq *StatementQuery) IDsX(ctx context.Context) []uuid.UUID

IDsX is like IDs, but panics if an error occurs.

func (*StatementQuery) Limit

func (sq *StatementQuery) Limit(limit int) *StatementQuery

Limit the number of records to be returned by this query.

func (*StatementQuery) Offset

func (sq *StatementQuery) Offset(offset int) *StatementQuery

Offset to start from.

func (*StatementQuery) Only

func (sq *StatementQuery) Only(ctx context.Context) (*Statement, error)

Only returns a single Statement entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Statement entity is found. Returns a *NotFoundError when no Statement entities are found.

func (*StatementQuery) OnlyID

func (sq *StatementQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)

OnlyID is like Only, but returns the only Statement ID in the query. Returns a *NotSingularError when more than one Statement ID is found. Returns a *NotFoundError when no entities are found.

func (*StatementQuery) OnlyIDX

func (sq *StatementQuery) OnlyIDX(ctx context.Context) uuid.UUID

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*StatementQuery) OnlyX

func (sq *StatementQuery) OnlyX(ctx context.Context) *Statement

OnlyX is like Only, but panics if an error occurs.

func (*StatementQuery) Order

Order specifies how the records should be ordered.

func (*StatementQuery) Paginate

func (s *StatementQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...StatementPaginateOption,
) (*StatementConnection, error)

Paginate executes the query and returns a relay based cursor connection to Statement.

func (*StatementQuery) QueryAttestationCollections

func (sq *StatementQuery) QueryAttestationCollections() *AttestationCollectionQuery

QueryAttestationCollections chains the current query on the "attestation_collections" edge.

func (*StatementQuery) QueryDsse

func (sq *StatementQuery) QueryDsse() *DsseQuery

QueryDsse chains the current query on the "dsse" edge.

func (*StatementQuery) QueryPolicy added in v0.5.0

func (sq *StatementQuery) QueryPolicy() *AttestationPolicyQuery

QueryPolicy chains the current query on the "policy" edge.

func (*StatementQuery) QuerySubjects

func (sq *StatementQuery) QuerySubjects() *SubjectQuery

QuerySubjects chains the current query on the "subjects" edge.

func (*StatementQuery) Select

func (sq *StatementQuery) Select(fields ...string) *StatementSelect

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 {
	Predicate string `json:"predicate,omitempty"`
}

client.Statement.Query().
	Select(statement.FieldPredicate).
	Scan(ctx, &v)

func (*StatementQuery) Unique

func (sq *StatementQuery) Unique(unique bool) *StatementQuery

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 (*StatementQuery) Where

Where adds a new predicate for the StatementQuery builder.

func (*StatementQuery) WithAttestationCollections

func (sq *StatementQuery) WithAttestationCollections(opts ...func(*AttestationCollectionQuery)) *StatementQuery

WithAttestationCollections tells the query-builder to eager-load the nodes that are connected to the "attestation_collections" edge. The optional arguments are used to configure the query builder of the edge.

func (*StatementQuery) WithDsse

func (sq *StatementQuery) WithDsse(opts ...func(*DsseQuery)) *StatementQuery

WithDsse tells the query-builder to eager-load the nodes that are connected to the "dsse" edge. The optional arguments are used to configure the query builder of the edge.

func (*StatementQuery) WithNamedDsse

func (sq *StatementQuery) WithNamedDsse(name string, opts ...func(*DsseQuery)) *StatementQuery

WithNamedDsse tells the query-builder to eager-load the nodes that are connected to the "dsse" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*StatementQuery) WithNamedSubjects

func (sq *StatementQuery) WithNamedSubjects(name string, opts ...func(*SubjectQuery)) *StatementQuery

WithNamedSubjects tells the query-builder to eager-load the nodes that are connected to the "subjects" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*StatementQuery) WithPolicy added in v0.5.0

func (sq *StatementQuery) WithPolicy(opts ...func(*AttestationPolicyQuery)) *StatementQuery

WithPolicy tells the query-builder to eager-load the nodes that are connected to the "policy" edge. The optional arguments are used to configure the query builder of the edge.

func (*StatementQuery) WithSubjects

func (sq *StatementQuery) WithSubjects(opts ...func(*SubjectQuery)) *StatementQuery

WithSubjects tells the query-builder to eager-load the nodes that are connected to the "subjects" edge. The optional arguments are used to configure the query builder of the edge.

type StatementSelect

type StatementSelect struct {
	*StatementQuery
	// contains filtered or unexported fields
}

StatementSelect is the builder for selecting fields of Statement entities.

func (*StatementSelect) Aggregate

func (ss *StatementSelect) Aggregate(fns ...AggregateFunc) *StatementSelect

Aggregate adds the given aggregation functions to the selector query.

func (*StatementSelect) Bool

func (s *StatementSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*StatementSelect) BoolX

func (s *StatementSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*StatementSelect) Bools

func (s *StatementSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*StatementSelect) BoolsX

func (s *StatementSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*StatementSelect) Float64

func (s *StatementSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*StatementSelect) Float64X

func (s *StatementSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*StatementSelect) Float64s

func (s *StatementSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*StatementSelect) Float64sX

func (s *StatementSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*StatementSelect) Int

func (s *StatementSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*StatementSelect) IntX

func (s *StatementSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*StatementSelect) Ints

func (s *StatementSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*StatementSelect) IntsX

func (s *StatementSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*StatementSelect) Scan

func (ss *StatementSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*StatementSelect) ScanX

func (s *StatementSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*StatementSelect) String

func (s *StatementSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*StatementSelect) StringX

func (s *StatementSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*StatementSelect) Strings

func (s *StatementSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*StatementSelect) StringsX

func (s *StatementSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type StatementUpdate

type StatementUpdate struct {
	// contains filtered or unexported fields
}

StatementUpdate is the builder for updating Statement entities.

func (*StatementUpdate) AddDsse

func (su *StatementUpdate) AddDsse(d ...*Dsse) *StatementUpdate

AddDsse adds the "dsse" edges to the Dsse entity.

func (*StatementUpdate) AddDsseIDs

func (su *StatementUpdate) AddDsseIDs(ids ...uuid.UUID) *StatementUpdate

AddDsseIDs adds the "dsse" edge to the Dsse entity by IDs.

func (*StatementUpdate) AddSubjectIDs

func (su *StatementUpdate) AddSubjectIDs(ids ...uuid.UUID) *StatementUpdate

AddSubjectIDs adds the "subjects" edge to the Subject entity by IDs.

func (*StatementUpdate) AddSubjects

func (su *StatementUpdate) AddSubjects(s ...*Subject) *StatementUpdate

AddSubjects adds the "subjects" edges to the Subject entity.

func (*StatementUpdate) ClearAttestationCollections

func (su *StatementUpdate) ClearAttestationCollections() *StatementUpdate

ClearAttestationCollections clears the "attestation_collections" edge to the AttestationCollection entity.

func (*StatementUpdate) ClearDsse

func (su *StatementUpdate) ClearDsse() *StatementUpdate

ClearDsse clears all "dsse" edges to the Dsse entity.

func (*StatementUpdate) ClearPolicy added in v0.5.0

func (su *StatementUpdate) ClearPolicy() *StatementUpdate

ClearPolicy clears the "policy" edge to the AttestationPolicy entity.

func (*StatementUpdate) ClearSubjects

func (su *StatementUpdate) ClearSubjects() *StatementUpdate

ClearSubjects clears all "subjects" edges to the Subject entity.

func (*StatementUpdate) Exec

func (su *StatementUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*StatementUpdate) ExecX

func (su *StatementUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*StatementUpdate) Mutation

func (su *StatementUpdate) Mutation() *StatementMutation

Mutation returns the StatementMutation object of the builder.

func (*StatementUpdate) RemoveDsse

func (su *StatementUpdate) RemoveDsse(d ...*Dsse) *StatementUpdate

RemoveDsse removes "dsse" edges to Dsse entities.

func (*StatementUpdate) RemoveDsseIDs

func (su *StatementUpdate) RemoveDsseIDs(ids ...uuid.UUID) *StatementUpdate

RemoveDsseIDs removes the "dsse" edge to Dsse entities by IDs.

func (*StatementUpdate) RemoveSubjectIDs

func (su *StatementUpdate) RemoveSubjectIDs(ids ...uuid.UUID) *StatementUpdate

RemoveSubjectIDs removes the "subjects" edge to Subject entities by IDs.

func (*StatementUpdate) RemoveSubjects

func (su *StatementUpdate) RemoveSubjects(s ...*Subject) *StatementUpdate

RemoveSubjects removes "subjects" edges to Subject entities.

func (*StatementUpdate) Save

func (su *StatementUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*StatementUpdate) SaveX

func (su *StatementUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*StatementUpdate) SetAttestationCollections

func (su *StatementUpdate) SetAttestationCollections(a *AttestationCollection) *StatementUpdate

SetAttestationCollections sets the "attestation_collections" edge to the AttestationCollection entity.

func (*StatementUpdate) SetAttestationCollectionsID

func (su *StatementUpdate) SetAttestationCollectionsID(id uuid.UUID) *StatementUpdate

SetAttestationCollectionsID sets the "attestation_collections" edge to the AttestationCollection entity by ID.

func (*StatementUpdate) SetNillableAttestationCollectionsID

func (su *StatementUpdate) SetNillableAttestationCollectionsID(id *uuid.UUID) *StatementUpdate

SetNillableAttestationCollectionsID sets the "attestation_collections" edge to the AttestationCollection entity by ID if the given value is not nil.

func (*StatementUpdate) SetNillablePolicyID added in v0.5.0

func (su *StatementUpdate) SetNillablePolicyID(id *uuid.UUID) *StatementUpdate

SetNillablePolicyID sets the "policy" edge to the AttestationPolicy entity by ID if the given value is not nil.

func (*StatementUpdate) SetNillablePredicate

func (su *StatementUpdate) SetNillablePredicate(s *string) *StatementUpdate

SetNillablePredicate sets the "predicate" field if the given value is not nil.

func (*StatementUpdate) SetPolicy added in v0.5.0

SetPolicy sets the "policy" edge to the AttestationPolicy entity.

func (*StatementUpdate) SetPolicyID added in v0.5.0

func (su *StatementUpdate) SetPolicyID(id uuid.UUID) *StatementUpdate

SetPolicyID sets the "policy" edge to the AttestationPolicy entity by ID.

func (*StatementUpdate) SetPredicate

func (su *StatementUpdate) SetPredicate(s string) *StatementUpdate

SetPredicate sets the "predicate" field.

func (*StatementUpdate) Where

Where appends a list predicates to the StatementUpdate builder.

type StatementUpdateOne

type StatementUpdateOne struct {
	// contains filtered or unexported fields
}

StatementUpdateOne is the builder for updating a single Statement entity.

func (*StatementUpdateOne) AddDsse

func (suo *StatementUpdateOne) AddDsse(d ...*Dsse) *StatementUpdateOne

AddDsse adds the "dsse" edges to the Dsse entity.

func (*StatementUpdateOne) AddDsseIDs

func (suo *StatementUpdateOne) AddDsseIDs(ids ...uuid.UUID) *StatementUpdateOne

AddDsseIDs adds the "dsse" edge to the Dsse entity by IDs.

func (*StatementUpdateOne) AddSubjectIDs

func (suo *StatementUpdateOne) AddSubjectIDs(ids ...uuid.UUID) *StatementUpdateOne

AddSubjectIDs adds the "subjects" edge to the Subject entity by IDs.

func (*StatementUpdateOne) AddSubjects

func (suo *StatementUpdateOne) AddSubjects(s ...*Subject) *StatementUpdateOne

AddSubjects adds the "subjects" edges to the Subject entity.

func (*StatementUpdateOne) ClearAttestationCollections

func (suo *StatementUpdateOne) ClearAttestationCollections() *StatementUpdateOne

ClearAttestationCollections clears the "attestation_collections" edge to the AttestationCollection entity.

func (*StatementUpdateOne) ClearDsse

func (suo *StatementUpdateOne) ClearDsse() *StatementUpdateOne

ClearDsse clears all "dsse" edges to the Dsse entity.

func (*StatementUpdateOne) ClearPolicy added in v0.5.0

func (suo *StatementUpdateOne) ClearPolicy() *StatementUpdateOne

ClearPolicy clears the "policy" edge to the AttestationPolicy entity.

func (*StatementUpdateOne) ClearSubjects

func (suo *StatementUpdateOne) ClearSubjects() *StatementUpdateOne

ClearSubjects clears all "subjects" edges to the Subject entity.

func (*StatementUpdateOne) Exec

func (suo *StatementUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*StatementUpdateOne) ExecX

func (suo *StatementUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*StatementUpdateOne) Mutation

func (suo *StatementUpdateOne) Mutation() *StatementMutation

Mutation returns the StatementMutation object of the builder.

func (*StatementUpdateOne) RemoveDsse

func (suo *StatementUpdateOne) RemoveDsse(d ...*Dsse) *StatementUpdateOne

RemoveDsse removes "dsse" edges to Dsse entities.

func (*StatementUpdateOne) RemoveDsseIDs

func (suo *StatementUpdateOne) RemoveDsseIDs(ids ...uuid.UUID) *StatementUpdateOne

RemoveDsseIDs removes the "dsse" edge to Dsse entities by IDs.

func (*StatementUpdateOne) RemoveSubjectIDs

func (suo *StatementUpdateOne) RemoveSubjectIDs(ids ...uuid.UUID) *StatementUpdateOne

RemoveSubjectIDs removes the "subjects" edge to Subject entities by IDs.

func (*StatementUpdateOne) RemoveSubjects

func (suo *StatementUpdateOne) RemoveSubjects(s ...*Subject) *StatementUpdateOne

RemoveSubjects removes "subjects" edges to Subject entities.

func (*StatementUpdateOne) Save

func (suo *StatementUpdateOne) Save(ctx context.Context) (*Statement, error)

Save executes the query and returns the updated Statement entity.

func (*StatementUpdateOne) SaveX

func (suo *StatementUpdateOne) SaveX(ctx context.Context) *Statement

SaveX is like Save, but panics if an error occurs.

func (*StatementUpdateOne) Select

func (suo *StatementUpdateOne) Select(field string, fields ...string) *StatementUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*StatementUpdateOne) SetAttestationCollections

func (suo *StatementUpdateOne) SetAttestationCollections(a *AttestationCollection) *StatementUpdateOne

SetAttestationCollections sets the "attestation_collections" edge to the AttestationCollection entity.

func (*StatementUpdateOne) SetAttestationCollectionsID

func (suo *StatementUpdateOne) SetAttestationCollectionsID(id uuid.UUID) *StatementUpdateOne

SetAttestationCollectionsID sets the "attestation_collections" edge to the AttestationCollection entity by ID.

func (*StatementUpdateOne) SetNillableAttestationCollectionsID

func (suo *StatementUpdateOne) SetNillableAttestationCollectionsID(id *uuid.UUID) *StatementUpdateOne

SetNillableAttestationCollectionsID sets the "attestation_collections" edge to the AttestationCollection entity by ID if the given value is not nil.

func (*StatementUpdateOne) SetNillablePolicyID added in v0.5.0

func (suo *StatementUpdateOne) SetNillablePolicyID(id *uuid.UUID) *StatementUpdateOne

SetNillablePolicyID sets the "policy" edge to the AttestationPolicy entity by ID if the given value is not nil.

func (*StatementUpdateOne) SetNillablePredicate

func (suo *StatementUpdateOne) SetNillablePredicate(s *string) *StatementUpdateOne

SetNillablePredicate sets the "predicate" field if the given value is not nil.

func (*StatementUpdateOne) SetPolicy added in v0.5.0

SetPolicy sets the "policy" edge to the AttestationPolicy entity.

func (*StatementUpdateOne) SetPolicyID added in v0.5.0

func (suo *StatementUpdateOne) SetPolicyID(id uuid.UUID) *StatementUpdateOne

SetPolicyID sets the "policy" edge to the AttestationPolicy entity by ID.

func (*StatementUpdateOne) SetPredicate

func (suo *StatementUpdateOne) SetPredicate(s string) *StatementUpdateOne

SetPredicate sets the "predicate" field.

func (*StatementUpdateOne) Where

Where appends a list predicates to the StatementUpdate builder.

type StatementWhereInput

type StatementWhereInput struct {
	Predicates []predicate.Statement  `json:"-"`
	Not        *StatementWhereInput   `json:"not,omitempty"`
	Or         []*StatementWhereInput `json:"or,omitempty"`
	And        []*StatementWhereInput `json:"and,omitempty"`

	// "id" field predicates.
	ID      *uuid.UUID  `json:"id,omitempty"`
	IDNEQ   *uuid.UUID  `json:"idNEQ,omitempty"`
	IDIn    []uuid.UUID `json:"idIn,omitempty"`
	IDNotIn []uuid.UUID `json:"idNotIn,omitempty"`
	IDGT    *uuid.UUID  `json:"idGT,omitempty"`
	IDGTE   *uuid.UUID  `json:"idGTE,omitempty"`
	IDLT    *uuid.UUID  `json:"idLT,omitempty"`
	IDLTE   *uuid.UUID  `json:"idLTE,omitempty"`

	// "predicate" field predicates.
	Predicate             *string  `json:"predicate,omitempty"`
	PredicateNEQ          *string  `json:"predicateNEQ,omitempty"`
	PredicateIn           []string `json:"predicateIn,omitempty"`
	PredicateNotIn        []string `json:"predicateNotIn,omitempty"`
	PredicateGT           *string  `json:"predicateGT,omitempty"`
	PredicateGTE          *string  `json:"predicateGTE,omitempty"`
	PredicateLT           *string  `json:"predicateLT,omitempty"`
	PredicateLTE          *string  `json:"predicateLTE,omitempty"`
	PredicateContains     *string  `json:"predicateContains,omitempty"`
	PredicateHasPrefix    *string  `json:"predicateHasPrefix,omitempty"`
	PredicateHasSuffix    *string  `json:"predicateHasSuffix,omitempty"`
	PredicateEqualFold    *string  `json:"predicateEqualFold,omitempty"`
	PredicateContainsFold *string  `json:"predicateContainsFold,omitempty"`

	// "subjects" edge predicates.
	HasSubjects     *bool                `json:"hasSubjects,omitempty"`
	HasSubjectsWith []*SubjectWhereInput `json:"hasSubjectsWith,omitempty"`

	// "policy" edge predicates.
	HasPolicy     *bool                          `json:"hasPolicy,omitempty"`
	HasPolicyWith []*AttestationPolicyWhereInput `json:"hasPolicyWith,omitempty"`

	// "attestation_collections" edge predicates.
	HasAttestationCollections     *bool                              `json:"hasAttestationCollections,omitempty"`
	HasAttestationCollectionsWith []*AttestationCollectionWhereInput `json:"hasAttestationCollectionsWith,omitempty"`

	// "dsse" edge predicates.
	HasDsse     *bool             `json:"hasDsse,omitempty"`
	HasDsseWith []*DsseWhereInput `json:"hasDsseWith,omitempty"`
}

StatementWhereInput represents a where input for filtering Statement queries.

func (*StatementWhereInput) AddPredicates

func (i *StatementWhereInput) AddPredicates(predicates ...predicate.Statement)

AddPredicates adds custom predicates to the where input to be used during the filtering phase.

func (*StatementWhereInput) Filter

Filter applies the StatementWhereInput filter on the StatementQuery builder.

func (*StatementWhereInput) P

P returns a predicate for filtering statements. An error is returned if the input is empty or invalid.

type Statements

type Statements []*Statement

Statements is a parsable slice of Statement.

type Subject

type Subject struct {

	// ID of the ent.
	ID uuid.UUID `json:"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 SubjectQuery when eager-loading is set.
	Edges SubjectEdges `json:"edges"`
	// contains filtered or unexported fields
}

Subject is the model entity for the Subject schema.

func (*Subject) IsNode

func (*Subject) IsNode()

IsNode implements the Node interface check for GQLGen.

func (*Subject) NamedSubjectDigests

func (s *Subject) NamedSubjectDigests(name string) ([]*SubjectDigest, error)

NamedSubjectDigests returns the SubjectDigests named value or an error if the edge was not loaded in eager-loading with this name.

func (*Subject) QueryStatement

func (s *Subject) QueryStatement() *StatementQuery

QueryStatement queries the "statement" edge of the Subject entity.

func (*Subject) QuerySubjectDigests

func (s *Subject) QuerySubjectDigests() *SubjectDigestQuery

QuerySubjectDigests queries the "subject_digests" edge of the Subject entity.

func (*Subject) Statement

func (s *Subject) Statement(ctx context.Context) (*Statement, error)

func (*Subject) String

func (s *Subject) String() string

String implements the fmt.Stringer.

func (*Subject) SubjectDigests

func (s *Subject) SubjectDigests(ctx context.Context) (result []*SubjectDigest, err error)

func (*Subject) ToEdge

func (s *Subject) ToEdge(order *SubjectOrder) *SubjectEdge

ToEdge converts Subject into SubjectEdge.

func (*Subject) Unwrap

func (s *Subject) Unwrap() *Subject

Unwrap unwraps the Subject 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 (*Subject) Update

func (s *Subject) Update() *SubjectUpdateOne

Update returns a builder for updating this Subject. Note that you need to call Subject.Unwrap() before calling this method if this Subject was returned from a transaction, and the transaction was committed or rolled back.

func (*Subject) Value

func (s *Subject) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the Subject. This includes values selected through modifiers, order, etc.

type SubjectClient

type SubjectClient struct {
	// contains filtered or unexported fields
}

SubjectClient is a client for the Subject schema.

func NewSubjectClient

func NewSubjectClient(c config) *SubjectClient

NewSubjectClient returns a client for the Subject from the given config.

func (*SubjectClient) Create

func (c *SubjectClient) Create() *SubjectCreate

Create returns a builder for creating a Subject entity.

func (*SubjectClient) CreateBulk

func (c *SubjectClient) CreateBulk(builders ...*SubjectCreate) *SubjectCreateBulk

CreateBulk returns a builder for creating a bulk of Subject entities.

func (*SubjectClient) Delete

func (c *SubjectClient) Delete() *SubjectDelete

Delete returns a delete builder for Subject.

func (*SubjectClient) DeleteOne

func (c *SubjectClient) DeleteOne(s *Subject) *SubjectDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*SubjectClient) DeleteOneID

func (c *SubjectClient) DeleteOneID(id uuid.UUID) *SubjectDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*SubjectClient) Get

func (c *SubjectClient) Get(ctx context.Context, id uuid.UUID) (*Subject, error)

Get returns a Subject entity by its id.

func (*SubjectClient) GetX

func (c *SubjectClient) GetX(ctx context.Context, id uuid.UUID) *Subject

GetX is like Get, but panics if an error occurs.

func (*SubjectClient) Hooks

func (c *SubjectClient) Hooks() []Hook

Hooks returns the client hooks.

func (*SubjectClient) Intercept

func (c *SubjectClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `subject.Intercept(f(g(h())))`.

func (*SubjectClient) Interceptors

func (c *SubjectClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*SubjectClient) MapCreateBulk

func (c *SubjectClient) MapCreateBulk(slice any, setFunc func(*SubjectCreate, int)) *SubjectCreateBulk

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 (*SubjectClient) Query

func (c *SubjectClient) Query() *SubjectQuery

Query returns a query builder for Subject.

func (*SubjectClient) QueryStatement

func (c *SubjectClient) QueryStatement(s *Subject) *StatementQuery

QueryStatement queries the statement edge of a Subject.

func (*SubjectClient) QuerySubjectDigests

func (c *SubjectClient) QuerySubjectDigests(s *Subject) *SubjectDigestQuery

QuerySubjectDigests queries the subject_digests edge of a Subject.

func (*SubjectClient) Update

func (c *SubjectClient) Update() *SubjectUpdate

Update returns an update builder for Subject.

func (*SubjectClient) UpdateOne

func (c *SubjectClient) UpdateOne(s *Subject) *SubjectUpdateOne

UpdateOne returns an update builder for the given entity.

func (*SubjectClient) UpdateOneID

func (c *SubjectClient) UpdateOneID(id uuid.UUID) *SubjectUpdateOne

UpdateOneID returns an update builder for the given id.

func (*SubjectClient) Use

func (c *SubjectClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `subject.Hooks(f(g(h())))`.

type SubjectConnection

type SubjectConnection struct {
	Edges      []*SubjectEdge `json:"edges"`
	PageInfo   PageInfo       `json:"pageInfo"`
	TotalCount int            `json:"totalCount"`
}

SubjectConnection is the connection containing edges to Subject.

type SubjectCreate

type SubjectCreate struct {
	// contains filtered or unexported fields
}

SubjectCreate is the builder for creating a Subject entity.

func (*SubjectCreate) AddSubjectDigestIDs

func (sc *SubjectCreate) AddSubjectDigestIDs(ids ...uuid.UUID) *SubjectCreate

AddSubjectDigestIDs adds the "subject_digests" edge to the SubjectDigest entity by IDs.

func (*SubjectCreate) AddSubjectDigests

func (sc *SubjectCreate) AddSubjectDigests(s ...*SubjectDigest) *SubjectCreate

AddSubjectDigests adds the "subject_digests" edges to the SubjectDigest entity.

func (*SubjectCreate) Exec

func (sc *SubjectCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*SubjectCreate) ExecX

func (sc *SubjectCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SubjectCreate) Mutation

func (sc *SubjectCreate) Mutation() *SubjectMutation

Mutation returns the SubjectMutation object of the builder.

func (*SubjectCreate) Save

func (sc *SubjectCreate) Save(ctx context.Context) (*Subject, error)

Save creates the Subject in the database.

func (*SubjectCreate) SaveX

func (sc *SubjectCreate) SaveX(ctx context.Context) *Subject

SaveX calls Save and panics if Save returns an error.

func (*SubjectCreate) SetID added in v0.5.0

func (sc *SubjectCreate) SetID(u uuid.UUID) *SubjectCreate

SetID sets the "id" field.

func (*SubjectCreate) SetName

func (sc *SubjectCreate) SetName(s string) *SubjectCreate

SetName sets the "name" field.

func (*SubjectCreate) SetNillableID added in v0.5.0

func (sc *SubjectCreate) SetNillableID(u *uuid.UUID) *SubjectCreate

SetNillableID sets the "id" field if the given value is not nil.

func (*SubjectCreate) SetNillableStatementID

func (sc *SubjectCreate) SetNillableStatementID(id *uuid.UUID) *SubjectCreate

SetNillableStatementID sets the "statement" edge to the Statement entity by ID if the given value is not nil.

func (*SubjectCreate) SetStatement

func (sc *SubjectCreate) SetStatement(s *Statement) *SubjectCreate

SetStatement sets the "statement" edge to the Statement entity.

func (*SubjectCreate) SetStatementID

func (sc *SubjectCreate) SetStatementID(id uuid.UUID) *SubjectCreate

SetStatementID sets the "statement" edge to the Statement entity by ID.

type SubjectCreateBulk

type SubjectCreateBulk struct {
	// contains filtered or unexported fields
}

SubjectCreateBulk is the builder for creating many Subject entities in bulk.

func (*SubjectCreateBulk) Exec

func (scb *SubjectCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*SubjectCreateBulk) ExecX

func (scb *SubjectCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SubjectCreateBulk) Save

func (scb *SubjectCreateBulk) Save(ctx context.Context) ([]*Subject, error)

Save creates the Subject entities in the database.

func (*SubjectCreateBulk) SaveX

func (scb *SubjectCreateBulk) SaveX(ctx context.Context) []*Subject

SaveX is like Save, but panics if an error occurs.

type SubjectDelete

type SubjectDelete struct {
	// contains filtered or unexported fields
}

SubjectDelete is the builder for deleting a Subject entity.

func (*SubjectDelete) Exec

func (sd *SubjectDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*SubjectDelete) ExecX

func (sd *SubjectDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*SubjectDelete) Where

func (sd *SubjectDelete) Where(ps ...predicate.Subject) *SubjectDelete

Where appends a list predicates to the SubjectDelete builder.

type SubjectDeleteOne

type SubjectDeleteOne struct {
	// contains filtered or unexported fields
}

SubjectDeleteOne is the builder for deleting a single Subject entity.

func (*SubjectDeleteOne) Exec

func (sdo *SubjectDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*SubjectDeleteOne) ExecX

func (sdo *SubjectDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SubjectDeleteOne) Where

Where appends a list predicates to the SubjectDelete builder.

type SubjectDigest

type SubjectDigest struct {

	// ID of the ent.
	ID uuid.UUID `json:"id,omitempty"`
	// Algorithm holds the value of the "algorithm" field.
	Algorithm string `json:"algorithm,omitempty"`
	// Value holds the value of the "value" field.
	Value string `json:"value,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the SubjectDigestQuery when eager-loading is set.
	Edges SubjectDigestEdges `json:"edges"`
	// contains filtered or unexported fields
}

SubjectDigest is the model entity for the SubjectDigest schema.

func (*SubjectDigest) GetValue

func (sd *SubjectDigest) GetValue(name string) (ent.Value, error)

GetValue returns the ent.Value that was dynamically selected and assigned to the SubjectDigest. This includes values selected through modifiers, order, etc.

func (*SubjectDigest) IsNode

func (*SubjectDigest) IsNode()

IsNode implements the Node interface check for GQLGen.

func (*SubjectDigest) QuerySubject

func (sd *SubjectDigest) QuerySubject() *SubjectQuery

QuerySubject queries the "subject" edge of the SubjectDigest entity.

func (*SubjectDigest) String

func (sd *SubjectDigest) String() string

String implements the fmt.Stringer.

func (*SubjectDigest) Subject

func (sd *SubjectDigest) Subject(ctx context.Context) (*Subject, error)

func (*SubjectDigest) ToEdge

ToEdge converts SubjectDigest into SubjectDigestEdge.

func (*SubjectDigest) Unwrap

func (sd *SubjectDigest) Unwrap() *SubjectDigest

Unwrap unwraps the SubjectDigest 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 (*SubjectDigest) Update

func (sd *SubjectDigest) Update() *SubjectDigestUpdateOne

Update returns a builder for updating this SubjectDigest. Note that you need to call SubjectDigest.Unwrap() before calling this method if this SubjectDigest was returned from a transaction, and the transaction was committed or rolled back.

type SubjectDigestClient

type SubjectDigestClient struct {
	// contains filtered or unexported fields
}

SubjectDigestClient is a client for the SubjectDigest schema.

func NewSubjectDigestClient

func NewSubjectDigestClient(c config) *SubjectDigestClient

NewSubjectDigestClient returns a client for the SubjectDigest from the given config.

func (*SubjectDigestClient) Create

Create returns a builder for creating a SubjectDigest entity.

func (*SubjectDigestClient) CreateBulk

CreateBulk returns a builder for creating a bulk of SubjectDigest entities.

func (*SubjectDigestClient) Delete

Delete returns a delete builder for SubjectDigest.

func (*SubjectDigestClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*SubjectDigestClient) DeleteOneID

DeleteOneID returns a builder for deleting the given entity by its id.

func (*SubjectDigestClient) Get

Get returns a SubjectDigest entity by its id.

func (*SubjectDigestClient) GetX

GetX is like Get, but panics if an error occurs.

func (*SubjectDigestClient) Hooks

func (c *SubjectDigestClient) Hooks() []Hook

Hooks returns the client hooks.

func (*SubjectDigestClient) Intercept

func (c *SubjectDigestClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `subjectdigest.Intercept(f(g(h())))`.

func (*SubjectDigestClient) Interceptors

func (c *SubjectDigestClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*SubjectDigestClient) MapCreateBulk

func (c *SubjectDigestClient) MapCreateBulk(slice any, setFunc func(*SubjectDigestCreate, int)) *SubjectDigestCreateBulk

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 (*SubjectDigestClient) Query

Query returns a query builder for SubjectDigest.

func (*SubjectDigestClient) QuerySubject

func (c *SubjectDigestClient) QuerySubject(sd *SubjectDigest) *SubjectQuery

QuerySubject queries the subject edge of a SubjectDigest.

func (*SubjectDigestClient) Update

Update returns an update builder for SubjectDigest.

func (*SubjectDigestClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*SubjectDigestClient) UpdateOneID

UpdateOneID returns an update builder for the given id.

func (*SubjectDigestClient) Use

func (c *SubjectDigestClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `subjectdigest.Hooks(f(g(h())))`.

type SubjectDigestConnection

type SubjectDigestConnection struct {
	Edges      []*SubjectDigestEdge `json:"edges"`
	PageInfo   PageInfo             `json:"pageInfo"`
	TotalCount int                  `json:"totalCount"`
}

SubjectDigestConnection is the connection containing edges to SubjectDigest.

type SubjectDigestCreate

type SubjectDigestCreate struct {
	// contains filtered or unexported fields
}

SubjectDigestCreate is the builder for creating a SubjectDigest entity.

func (*SubjectDigestCreate) Exec

func (sdc *SubjectDigestCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*SubjectDigestCreate) ExecX

func (sdc *SubjectDigestCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SubjectDigestCreate) Mutation

func (sdc *SubjectDigestCreate) Mutation() *SubjectDigestMutation

Mutation returns the SubjectDigestMutation object of the builder.

func (*SubjectDigestCreate) Save

Save creates the SubjectDigest in the database.

func (*SubjectDigestCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*SubjectDigestCreate) SetAlgorithm

func (sdc *SubjectDigestCreate) SetAlgorithm(s string) *SubjectDigestCreate

SetAlgorithm sets the "algorithm" field.

func (*SubjectDigestCreate) SetID added in v0.5.0

SetID sets the "id" field.

func (*SubjectDigestCreate) SetNillableID added in v0.5.0

func (sdc *SubjectDigestCreate) SetNillableID(u *uuid.UUID) *SubjectDigestCreate

SetNillableID sets the "id" field if the given value is not nil.

func (*SubjectDigestCreate) SetNillableSubjectID

func (sdc *SubjectDigestCreate) SetNillableSubjectID(id *uuid.UUID) *SubjectDigestCreate

SetNillableSubjectID sets the "subject" edge to the Subject entity by ID if the given value is not nil.

func (*SubjectDigestCreate) SetSubject

func (sdc *SubjectDigestCreate) SetSubject(s *Subject) *SubjectDigestCreate

SetSubject sets the "subject" edge to the Subject entity.

func (*SubjectDigestCreate) SetSubjectID

func (sdc *SubjectDigestCreate) SetSubjectID(id uuid.UUID) *SubjectDigestCreate

SetSubjectID sets the "subject" edge to the Subject entity by ID.

func (*SubjectDigestCreate) SetValue

SetValue sets the "value" field.

type SubjectDigestCreateBulk

type SubjectDigestCreateBulk struct {
	// contains filtered or unexported fields
}

SubjectDigestCreateBulk is the builder for creating many SubjectDigest entities in bulk.

func (*SubjectDigestCreateBulk) Exec

func (sdcb *SubjectDigestCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*SubjectDigestCreateBulk) ExecX

func (sdcb *SubjectDigestCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SubjectDigestCreateBulk) Save

Save creates the SubjectDigest entities in the database.

func (*SubjectDigestCreateBulk) SaveX

SaveX is like Save, but panics if an error occurs.

type SubjectDigestDelete

type SubjectDigestDelete struct {
	// contains filtered or unexported fields
}

SubjectDigestDelete is the builder for deleting a SubjectDigest entity.

func (*SubjectDigestDelete) Exec

func (sdd *SubjectDigestDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*SubjectDigestDelete) ExecX

func (sdd *SubjectDigestDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*SubjectDigestDelete) Where

Where appends a list predicates to the SubjectDigestDelete builder.

type SubjectDigestDeleteOne

type SubjectDigestDeleteOne struct {
	// contains filtered or unexported fields
}

SubjectDigestDeleteOne is the builder for deleting a single SubjectDigest entity.

func (*SubjectDigestDeleteOne) Exec

func (sddo *SubjectDigestDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*SubjectDigestDeleteOne) ExecX

func (sddo *SubjectDigestDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SubjectDigestDeleteOne) Where

Where appends a list predicates to the SubjectDigestDelete builder.

type SubjectDigestEdge

type SubjectDigestEdge struct {
	Node   *SubjectDigest `json:"node"`
	Cursor Cursor         `json:"cursor"`
}

SubjectDigestEdge is the edge representation of SubjectDigest.

type SubjectDigestEdges

type SubjectDigestEdges struct {
	// Subject holds the value of the subject edge.
	Subject *Subject `json:"subject,omitempty"`
	// contains filtered or unexported fields
}

SubjectDigestEdges holds the relations/edges for other nodes in the graph.

func (SubjectDigestEdges) SubjectOrErr

func (e SubjectDigestEdges) SubjectOrErr() (*Subject, 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 SubjectDigestGroupBy

type SubjectDigestGroupBy struct {
	// contains filtered or unexported fields
}

SubjectDigestGroupBy is the group-by builder for SubjectDigest entities.

func (*SubjectDigestGroupBy) Aggregate

func (sdgb *SubjectDigestGroupBy) Aggregate(fns ...AggregateFunc) *SubjectDigestGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*SubjectDigestGroupBy) Bool

func (s *SubjectDigestGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*SubjectDigestGroupBy) BoolX

func (s *SubjectDigestGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*SubjectDigestGroupBy) Bools

func (s *SubjectDigestGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*SubjectDigestGroupBy) BoolsX

func (s *SubjectDigestGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*SubjectDigestGroupBy) Float64

func (s *SubjectDigestGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*SubjectDigestGroupBy) Float64X

func (s *SubjectDigestGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*SubjectDigestGroupBy) Float64s

func (s *SubjectDigestGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*SubjectDigestGroupBy) Float64sX

func (s *SubjectDigestGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*SubjectDigestGroupBy) Int

func (s *SubjectDigestGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*SubjectDigestGroupBy) IntX

func (s *SubjectDigestGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*SubjectDigestGroupBy) Ints

func (s *SubjectDigestGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*SubjectDigestGroupBy) IntsX

func (s *SubjectDigestGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*SubjectDigestGroupBy) Scan

func (sdgb *SubjectDigestGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*SubjectDigestGroupBy) ScanX

func (s *SubjectDigestGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*SubjectDigestGroupBy) String

func (s *SubjectDigestGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*SubjectDigestGroupBy) StringX

func (s *SubjectDigestGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*SubjectDigestGroupBy) Strings

func (s *SubjectDigestGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*SubjectDigestGroupBy) StringsX

func (s *SubjectDigestGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type SubjectDigestMutation

type SubjectDigestMutation struct {
	// contains filtered or unexported fields
}

SubjectDigestMutation represents an operation that mutates the SubjectDigest nodes in the graph.

func (*SubjectDigestMutation) AddField

func (m *SubjectDigestMutation) 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 (*SubjectDigestMutation) AddedEdges

func (m *SubjectDigestMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*SubjectDigestMutation) AddedField

func (m *SubjectDigestMutation) 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 (*SubjectDigestMutation) AddedFields

func (m *SubjectDigestMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*SubjectDigestMutation) AddedIDs

func (m *SubjectDigestMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*SubjectDigestMutation) Algorithm

func (m *SubjectDigestMutation) Algorithm() (r string, exists bool)

Algorithm returns the value of the "algorithm" field in the mutation.

func (*SubjectDigestMutation) ClearEdge

func (m *SubjectDigestMutation) 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 (*SubjectDigestMutation) ClearField

func (m *SubjectDigestMutation) 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 (*SubjectDigestMutation) ClearSubject

func (m *SubjectDigestMutation) ClearSubject()

ClearSubject clears the "subject" edge to the Subject entity.

func (*SubjectDigestMutation) ClearedEdges

func (m *SubjectDigestMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*SubjectDigestMutation) ClearedFields

func (m *SubjectDigestMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (SubjectDigestMutation) Client

func (m SubjectDigestMutation) 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 (*SubjectDigestMutation) EdgeCleared

func (m *SubjectDigestMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*SubjectDigestMutation) Field

func (m *SubjectDigestMutation) 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 (*SubjectDigestMutation) FieldCleared

func (m *SubjectDigestMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*SubjectDigestMutation) Fields

func (m *SubjectDigestMutation) 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 (*SubjectDigestMutation) ID

func (m *SubjectDigestMutation) ID() (id uuid.UUID, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*SubjectDigestMutation) 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 (*SubjectDigestMutation) OldAlgorithm

func (m *SubjectDigestMutation) OldAlgorithm(ctx context.Context) (v string, err error)

OldAlgorithm returns the old "algorithm" field's value of the SubjectDigest entity. If the SubjectDigest object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*SubjectDigestMutation) OldField

func (m *SubjectDigestMutation) 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 (*SubjectDigestMutation) OldValue

func (m *SubjectDigestMutation) OldValue(ctx context.Context) (v string, err error)

OldValue returns the old "value" field's value of the SubjectDigest entity. If the SubjectDigest object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*SubjectDigestMutation) Op

func (m *SubjectDigestMutation) Op() Op

Op returns the operation name.

func (*SubjectDigestMutation) RemovedEdges

func (m *SubjectDigestMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*SubjectDigestMutation) RemovedIDs

func (m *SubjectDigestMutation) 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 (*SubjectDigestMutation) ResetAlgorithm

func (m *SubjectDigestMutation) ResetAlgorithm()

ResetAlgorithm resets all changes to the "algorithm" field.

func (*SubjectDigestMutation) ResetEdge

func (m *SubjectDigestMutation) 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 (*SubjectDigestMutation) ResetField

func (m *SubjectDigestMutation) 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 (*SubjectDigestMutation) ResetSubject

func (m *SubjectDigestMutation) ResetSubject()

ResetSubject resets all changes to the "subject" edge.

func (*SubjectDigestMutation) ResetValue

func (m *SubjectDigestMutation) ResetValue()

ResetValue resets all changes to the "value" field.

func (*SubjectDigestMutation) SetAlgorithm

func (m *SubjectDigestMutation) SetAlgorithm(s string)

SetAlgorithm sets the "algorithm" field.

func (*SubjectDigestMutation) SetField

func (m *SubjectDigestMutation) 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 (*SubjectDigestMutation) SetID added in v0.5.0

func (m *SubjectDigestMutation) SetID(id uuid.UUID)

SetID sets the value of the id field. Note that this operation is only accepted on creation of SubjectDigest entities.

func (*SubjectDigestMutation) SetOp

func (m *SubjectDigestMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*SubjectDigestMutation) SetSubjectID

func (m *SubjectDigestMutation) SetSubjectID(id uuid.UUID)

SetSubjectID sets the "subject" edge to the Subject entity by id.

func (*SubjectDigestMutation) SetValue

func (m *SubjectDigestMutation) SetValue(s string)

SetValue sets the "value" field.

func (*SubjectDigestMutation) SubjectCleared

func (m *SubjectDigestMutation) SubjectCleared() bool

SubjectCleared reports if the "subject" edge to the Subject entity was cleared.

func (*SubjectDigestMutation) SubjectID

func (m *SubjectDigestMutation) SubjectID() (id uuid.UUID, exists bool)

SubjectID returns the "subject" edge ID in the mutation.

func (*SubjectDigestMutation) SubjectIDs

func (m *SubjectDigestMutation) SubjectIDs() (ids []uuid.UUID)

SubjectIDs returns the "subject" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use SubjectID instead. It exists only for internal usage by the builders.

func (SubjectDigestMutation) Tx

func (m SubjectDigestMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*SubjectDigestMutation) Type

func (m *SubjectDigestMutation) Type() string

Type returns the node type of this mutation (SubjectDigest).

func (*SubjectDigestMutation) Value

func (m *SubjectDigestMutation) Value() (r string, exists bool)

Value returns the value of the "value" field in the mutation.

func (*SubjectDigestMutation) Where

Where appends a list predicates to the SubjectDigestMutation builder.

func (*SubjectDigestMutation) WhereP

func (m *SubjectDigestMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the SubjectDigestMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type SubjectDigestOrder

type SubjectDigestOrder struct {
	Direction OrderDirection           `json:"direction"`
	Field     *SubjectDigestOrderField `json:"field"`
}

SubjectDigestOrder defines the ordering of SubjectDigest.

type SubjectDigestOrderField

type SubjectDigestOrderField struct {
	// Value extracts the ordering value from the given SubjectDigest.
	Value func(*SubjectDigest) (ent.Value, error)
	// contains filtered or unexported fields
}

SubjectDigestOrderField defines the ordering field of SubjectDigest.

type SubjectDigestPaginateOption

type SubjectDigestPaginateOption func(*subjectdigestPager) error

SubjectDigestPaginateOption enables pagination customization.

func WithSubjectDigestFilter

func WithSubjectDigestFilter(filter func(*SubjectDigestQuery) (*SubjectDigestQuery, error)) SubjectDigestPaginateOption

WithSubjectDigestFilter configures pagination filter.

func WithSubjectDigestOrder

func WithSubjectDigestOrder(order *SubjectDigestOrder) SubjectDigestPaginateOption

WithSubjectDigestOrder configures pagination ordering.

type SubjectDigestQuery

type SubjectDigestQuery struct {
	// contains filtered or unexported fields
}

SubjectDigestQuery is the builder for querying SubjectDigest entities.

func (*SubjectDigestQuery) Aggregate

func (sdq *SubjectDigestQuery) Aggregate(fns ...AggregateFunc) *SubjectDigestSelect

Aggregate returns a SubjectDigestSelect configured with the given aggregations.

func (*SubjectDigestQuery) All

All executes the query and returns a list of SubjectDigests.

func (*SubjectDigestQuery) AllX

func (sdq *SubjectDigestQuery) AllX(ctx context.Context) []*SubjectDigest

AllX is like All, but panics if an error occurs.

func (*SubjectDigestQuery) Clone

func (sdq *SubjectDigestQuery) Clone() *SubjectDigestQuery

Clone returns a duplicate of the SubjectDigestQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*SubjectDigestQuery) CollectFields

func (sd *SubjectDigestQuery) CollectFields(ctx context.Context, satisfies ...string) (*SubjectDigestQuery, error)

CollectFields tells the query-builder to eagerly load connected nodes by resolver context.

func (*SubjectDigestQuery) Count

func (sdq *SubjectDigestQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*SubjectDigestQuery) CountX

func (sdq *SubjectDigestQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*SubjectDigestQuery) Exist

func (sdq *SubjectDigestQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*SubjectDigestQuery) ExistX

func (sdq *SubjectDigestQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*SubjectDigestQuery) First

First returns the first SubjectDigest entity from the query. Returns a *NotFoundError when no SubjectDigest was found.

func (*SubjectDigestQuery) FirstID

func (sdq *SubjectDigestQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)

FirstID returns the first SubjectDigest ID from the query. Returns a *NotFoundError when no SubjectDigest ID was found.

func (*SubjectDigestQuery) FirstIDX

func (sdq *SubjectDigestQuery) FirstIDX(ctx context.Context) uuid.UUID

FirstIDX is like FirstID, but panics if an error occurs.

func (*SubjectDigestQuery) FirstX

func (sdq *SubjectDigestQuery) FirstX(ctx context.Context) *SubjectDigest

FirstX is like First, but panics if an error occurs.

func (*SubjectDigestQuery) GroupBy

func (sdq *SubjectDigestQuery) GroupBy(field string, fields ...string) *SubjectDigestGroupBy

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.SubjectDigest.Query().
	GroupBy(subjectdigest.FieldAlgorithm).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*SubjectDigestQuery) IDs

func (sdq *SubjectDigestQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)

IDs executes the query and returns a list of SubjectDigest IDs.

func (*SubjectDigestQuery) IDsX

func (sdq *SubjectDigestQuery) IDsX(ctx context.Context) []uuid.UUID

IDsX is like IDs, but panics if an error occurs.

func (*SubjectDigestQuery) Limit

func (sdq *SubjectDigestQuery) Limit(limit int) *SubjectDigestQuery

Limit the number of records to be returned by this query.

func (*SubjectDigestQuery) Offset

func (sdq *SubjectDigestQuery) Offset(offset int) *SubjectDigestQuery

Offset to start from.

func (*SubjectDigestQuery) Only

Only returns a single SubjectDigest entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one SubjectDigest entity is found. Returns a *NotFoundError when no SubjectDigest entities are found.

func (*SubjectDigestQuery) OnlyID

func (sdq *SubjectDigestQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)

OnlyID is like Only, but returns the only SubjectDigest ID in the query. Returns a *NotSingularError when more than one SubjectDigest ID is found. Returns a *NotFoundError when no entities are found.

func (*SubjectDigestQuery) OnlyIDX

func (sdq *SubjectDigestQuery) OnlyIDX(ctx context.Context) uuid.UUID

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*SubjectDigestQuery) OnlyX

OnlyX is like Only, but panics if an error occurs.

func (*SubjectDigestQuery) Order

Order specifies how the records should be ordered.

func (*SubjectDigestQuery) Paginate

func (sd *SubjectDigestQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...SubjectDigestPaginateOption,
) (*SubjectDigestConnection, error)

Paginate executes the query and returns a relay based cursor connection to SubjectDigest.

func (*SubjectDigestQuery) QuerySubject

func (sdq *SubjectDigestQuery) QuerySubject() *SubjectQuery

QuerySubject chains the current query on the "subject" edge.

func (*SubjectDigestQuery) Select

func (sdq *SubjectDigestQuery) Select(fields ...string) *SubjectDigestSelect

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.SubjectDigest.Query().
	Select(subjectdigest.FieldAlgorithm).
	Scan(ctx, &v)

func (*SubjectDigestQuery) Unique

func (sdq *SubjectDigestQuery) Unique(unique bool) *SubjectDigestQuery

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 (*SubjectDigestQuery) Where

Where adds a new predicate for the SubjectDigestQuery builder.

func (*SubjectDigestQuery) WithSubject

func (sdq *SubjectDigestQuery) WithSubject(opts ...func(*SubjectQuery)) *SubjectDigestQuery

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 SubjectDigestSelect

type SubjectDigestSelect struct {
	*SubjectDigestQuery
	// contains filtered or unexported fields
}

SubjectDigestSelect is the builder for selecting fields of SubjectDigest entities.

func (*SubjectDigestSelect) Aggregate

func (sds *SubjectDigestSelect) Aggregate(fns ...AggregateFunc) *SubjectDigestSelect

Aggregate adds the given aggregation functions to the selector query.

func (*SubjectDigestSelect) Bool

func (s *SubjectDigestSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*SubjectDigestSelect) BoolX

func (s *SubjectDigestSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*SubjectDigestSelect) Bools

func (s *SubjectDigestSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*SubjectDigestSelect) BoolsX

func (s *SubjectDigestSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*SubjectDigestSelect) Float64

func (s *SubjectDigestSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*SubjectDigestSelect) Float64X

func (s *SubjectDigestSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*SubjectDigestSelect) Float64s

func (s *SubjectDigestSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*SubjectDigestSelect) Float64sX

func (s *SubjectDigestSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*SubjectDigestSelect) Int

func (s *SubjectDigestSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*SubjectDigestSelect) IntX

func (s *SubjectDigestSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*SubjectDigestSelect) Ints

func (s *SubjectDigestSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*SubjectDigestSelect) IntsX

func (s *SubjectDigestSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*SubjectDigestSelect) Scan

func (sds *SubjectDigestSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*SubjectDigestSelect) ScanX

func (s *SubjectDigestSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*SubjectDigestSelect) String

func (s *SubjectDigestSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*SubjectDigestSelect) StringX

func (s *SubjectDigestSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*SubjectDigestSelect) Strings

func (s *SubjectDigestSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*SubjectDigestSelect) StringsX

func (s *SubjectDigestSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type SubjectDigestUpdate

type SubjectDigestUpdate struct {
	// contains filtered or unexported fields
}

SubjectDigestUpdate is the builder for updating SubjectDigest entities.

func (*SubjectDigestUpdate) ClearSubject

func (sdu *SubjectDigestUpdate) ClearSubject() *SubjectDigestUpdate

ClearSubject clears the "subject" edge to the Subject entity.

func (*SubjectDigestUpdate) Exec

func (sdu *SubjectDigestUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*SubjectDigestUpdate) ExecX

func (sdu *SubjectDigestUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SubjectDigestUpdate) Mutation

func (sdu *SubjectDigestUpdate) Mutation() *SubjectDigestMutation

Mutation returns the SubjectDigestMutation object of the builder.

func (*SubjectDigestUpdate) Save

func (sdu *SubjectDigestUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*SubjectDigestUpdate) SaveX

func (sdu *SubjectDigestUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*SubjectDigestUpdate) SetAlgorithm

func (sdu *SubjectDigestUpdate) SetAlgorithm(s string) *SubjectDigestUpdate

SetAlgorithm sets the "algorithm" field.

func (*SubjectDigestUpdate) SetNillableAlgorithm

func (sdu *SubjectDigestUpdate) SetNillableAlgorithm(s *string) *SubjectDigestUpdate

SetNillableAlgorithm sets the "algorithm" field if the given value is not nil.

func (*SubjectDigestUpdate) SetNillableSubjectID

func (sdu *SubjectDigestUpdate) SetNillableSubjectID(id *uuid.UUID) *SubjectDigestUpdate

SetNillableSubjectID sets the "subject" edge to the Subject entity by ID if the given value is not nil.

func (*SubjectDigestUpdate) SetNillableValue

func (sdu *SubjectDigestUpdate) SetNillableValue(s *string) *SubjectDigestUpdate

SetNillableValue sets the "value" field if the given value is not nil.

func (*SubjectDigestUpdate) SetSubject

func (sdu *SubjectDigestUpdate) SetSubject(s *Subject) *SubjectDigestUpdate

SetSubject sets the "subject" edge to the Subject entity.

func (*SubjectDigestUpdate) SetSubjectID

func (sdu *SubjectDigestUpdate) SetSubjectID(id uuid.UUID) *SubjectDigestUpdate

SetSubjectID sets the "subject" edge to the Subject entity by ID.

func (*SubjectDigestUpdate) SetValue

SetValue sets the "value" field.

func (*SubjectDigestUpdate) Where

Where appends a list predicates to the SubjectDigestUpdate builder.

type SubjectDigestUpdateOne

type SubjectDigestUpdateOne struct {
	// contains filtered or unexported fields
}

SubjectDigestUpdateOne is the builder for updating a single SubjectDigest entity.

func (*SubjectDigestUpdateOne) ClearSubject

func (sduo *SubjectDigestUpdateOne) ClearSubject() *SubjectDigestUpdateOne

ClearSubject clears the "subject" edge to the Subject entity.

func (*SubjectDigestUpdateOne) Exec

func (sduo *SubjectDigestUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*SubjectDigestUpdateOne) ExecX

func (sduo *SubjectDigestUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SubjectDigestUpdateOne) Mutation

Mutation returns the SubjectDigestMutation object of the builder.

func (*SubjectDigestUpdateOne) Save

Save executes the query and returns the updated SubjectDigest entity.

func (*SubjectDigestUpdateOne) SaveX

SaveX is like Save, but panics if an error occurs.

func (*SubjectDigestUpdateOne) Select

func (sduo *SubjectDigestUpdateOne) Select(field string, fields ...string) *SubjectDigestUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*SubjectDigestUpdateOne) SetAlgorithm

func (sduo *SubjectDigestUpdateOne) SetAlgorithm(s string) *SubjectDigestUpdateOne

SetAlgorithm sets the "algorithm" field.

func (*SubjectDigestUpdateOne) SetNillableAlgorithm

func (sduo *SubjectDigestUpdateOne) SetNillableAlgorithm(s *string) *SubjectDigestUpdateOne

SetNillableAlgorithm sets the "algorithm" field if the given value is not nil.

func (*SubjectDigestUpdateOne) SetNillableSubjectID

func (sduo *SubjectDigestUpdateOne) SetNillableSubjectID(id *uuid.UUID) *SubjectDigestUpdateOne

SetNillableSubjectID sets the "subject" edge to the Subject entity by ID if the given value is not nil.

func (*SubjectDigestUpdateOne) SetNillableValue

func (sduo *SubjectDigestUpdateOne) SetNillableValue(s *string) *SubjectDigestUpdateOne

SetNillableValue sets the "value" field if the given value is not nil.

func (*SubjectDigestUpdateOne) SetSubject

SetSubject sets the "subject" edge to the Subject entity.

func (*SubjectDigestUpdateOne) SetSubjectID

func (sduo *SubjectDigestUpdateOne) SetSubjectID(id uuid.UUID) *SubjectDigestUpdateOne

SetSubjectID sets the "subject" edge to the Subject entity by ID.

func (*SubjectDigestUpdateOne) SetValue

SetValue sets the "value" field.

func (*SubjectDigestUpdateOne) Where

Where appends a list predicates to the SubjectDigestUpdate builder.

type SubjectDigestWhereInput

type SubjectDigestWhereInput struct {
	Predicates []predicate.SubjectDigest  `json:"-"`
	Not        *SubjectDigestWhereInput   `json:"not,omitempty"`
	Or         []*SubjectDigestWhereInput `json:"or,omitempty"`
	And        []*SubjectDigestWhereInput `json:"and,omitempty"`

	// "id" field predicates.
	ID      *uuid.UUID  `json:"id,omitempty"`
	IDNEQ   *uuid.UUID  `json:"idNEQ,omitempty"`
	IDIn    []uuid.UUID `json:"idIn,omitempty"`
	IDNotIn []uuid.UUID `json:"idNotIn,omitempty"`
	IDGT    *uuid.UUID  `json:"idGT,omitempty"`
	IDGTE   *uuid.UUID  `json:"idGTE,omitempty"`
	IDLT    *uuid.UUID  `json:"idLT,omitempty"`
	IDLTE   *uuid.UUID  `json:"idLTE,omitempty"`

	// "algorithm" field predicates.
	Algorithm             *string  `json:"algorithm,omitempty"`
	AlgorithmNEQ          *string  `json:"algorithmNEQ,omitempty"`
	AlgorithmIn           []string `json:"algorithmIn,omitempty"`
	AlgorithmNotIn        []string `json:"algorithmNotIn,omitempty"`
	AlgorithmGT           *string  `json:"algorithmGT,omitempty"`
	AlgorithmGTE          *string  `json:"algorithmGTE,omitempty"`
	AlgorithmLT           *string  `json:"algorithmLT,omitempty"`
	AlgorithmLTE          *string  `json:"algorithmLTE,omitempty"`
	AlgorithmContains     *string  `json:"algorithmContains,omitempty"`
	AlgorithmHasPrefix    *string  `json:"algorithmHasPrefix,omitempty"`
	AlgorithmHasSuffix    *string  `json:"algorithmHasSuffix,omitempty"`
	AlgorithmEqualFold    *string  `json:"algorithmEqualFold,omitempty"`
	AlgorithmContainsFold *string  `json:"algorithmContainsFold,omitempty"`

	// "value" field predicates.
	Value             *string  `json:"value,omitempty"`
	ValueNEQ          *string  `json:"valueNEQ,omitempty"`
	ValueIn           []string `json:"valueIn,omitempty"`
	ValueNotIn        []string `json:"valueNotIn,omitempty"`
	ValueGT           *string  `json:"valueGT,omitempty"`
	ValueGTE          *string  `json:"valueGTE,omitempty"`
	ValueLT           *string  `json:"valueLT,omitempty"`
	ValueLTE          *string  `json:"valueLTE,omitempty"`
	ValueContains     *string  `json:"valueContains,omitempty"`
	ValueHasPrefix    *string  `json:"valueHasPrefix,omitempty"`
	ValueHasSuffix    *string  `json:"valueHasSuffix,omitempty"`
	ValueEqualFold    *string  `json:"valueEqualFold,omitempty"`
	ValueContainsFold *string  `json:"valueContainsFold,omitempty"`

	// "subject" edge predicates.
	HasSubject     *bool                `json:"hasSubject,omitempty"`
	HasSubjectWith []*SubjectWhereInput `json:"hasSubjectWith,omitempty"`
}

SubjectDigestWhereInput represents a where input for filtering SubjectDigest queries.

func (*SubjectDigestWhereInput) AddPredicates

func (i *SubjectDigestWhereInput) AddPredicates(predicates ...predicate.SubjectDigest)

AddPredicates adds custom predicates to the where input to be used during the filtering phase.

func (*SubjectDigestWhereInput) Filter

Filter applies the SubjectDigestWhereInput filter on the SubjectDigestQuery builder.

func (*SubjectDigestWhereInput) P

P returns a predicate for filtering subjectdigests. An error is returned if the input is empty or invalid.

type SubjectDigests

type SubjectDigests []*SubjectDigest

SubjectDigests is a parsable slice of SubjectDigest.

type SubjectEdge

type SubjectEdge struct {
	Node   *Subject `json:"node"`
	Cursor Cursor   `json:"cursor"`
}

SubjectEdge is the edge representation of Subject.

type SubjectEdges

type SubjectEdges struct {
	// SubjectDigests holds the value of the subject_digests edge.
	SubjectDigests []*SubjectDigest `json:"subject_digests,omitempty"`
	// Statement holds the value of the statement edge.
	Statement *Statement `json:"statement,omitempty"`
	// contains filtered or unexported fields
}

SubjectEdges holds the relations/edges for other nodes in the graph.

func (SubjectEdges) StatementOrErr

func (e SubjectEdges) StatementOrErr() (*Statement, error)

StatementOrErr returns the Statement value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (SubjectEdges) SubjectDigestsOrErr

func (e SubjectEdges) SubjectDigestsOrErr() ([]*SubjectDigest, error)

SubjectDigestsOrErr returns the SubjectDigests value or an error if the edge was not loaded in eager-loading.

type SubjectGroupBy

type SubjectGroupBy struct {
	// contains filtered or unexported fields
}

SubjectGroupBy is the group-by builder for Subject entities.

func (*SubjectGroupBy) Aggregate

func (sgb *SubjectGroupBy) Aggregate(fns ...AggregateFunc) *SubjectGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*SubjectGroupBy) Bool

func (s *SubjectGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*SubjectGroupBy) BoolX

func (s *SubjectGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*SubjectGroupBy) Bools

func (s *SubjectGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*SubjectGroupBy) BoolsX

func (s *SubjectGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*SubjectGroupBy) Float64

func (s *SubjectGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*SubjectGroupBy) Float64X

func (s *SubjectGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*SubjectGroupBy) Float64s

func (s *SubjectGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*SubjectGroupBy) Float64sX

func (s *SubjectGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*SubjectGroupBy) Int

func (s *SubjectGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*SubjectGroupBy) IntX

func (s *SubjectGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*SubjectGroupBy) Ints

func (s *SubjectGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*SubjectGroupBy) IntsX

func (s *SubjectGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*SubjectGroupBy) Scan

func (sgb *SubjectGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*SubjectGroupBy) ScanX

func (s *SubjectGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*SubjectGroupBy) String

func (s *SubjectGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*SubjectGroupBy) StringX

func (s *SubjectGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*SubjectGroupBy) Strings

func (s *SubjectGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*SubjectGroupBy) StringsX

func (s *SubjectGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type SubjectMutation

type SubjectMutation struct {
	// contains filtered or unexported fields
}

SubjectMutation represents an operation that mutates the Subject nodes in the graph.

func (*SubjectMutation) AddField

func (m *SubjectMutation) 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 (*SubjectMutation) AddSubjectDigestIDs

func (m *SubjectMutation) AddSubjectDigestIDs(ids ...uuid.UUID)

AddSubjectDigestIDs adds the "subject_digests" edge to the SubjectDigest entity by ids.

func (*SubjectMutation) AddedEdges

func (m *SubjectMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*SubjectMutation) AddedField

func (m *SubjectMutation) 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 (*SubjectMutation) AddedFields

func (m *SubjectMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*SubjectMutation) AddedIDs

func (m *SubjectMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*SubjectMutation) ClearEdge

func (m *SubjectMutation) 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 (*SubjectMutation) ClearField

func (m *SubjectMutation) 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 (*SubjectMutation) ClearStatement

func (m *SubjectMutation) ClearStatement()

ClearStatement clears the "statement" edge to the Statement entity.

func (*SubjectMutation) ClearSubjectDigests

func (m *SubjectMutation) ClearSubjectDigests()

ClearSubjectDigests clears the "subject_digests" edge to the SubjectDigest entity.

func (*SubjectMutation) ClearedEdges

func (m *SubjectMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*SubjectMutation) ClearedFields

func (m *SubjectMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (SubjectMutation) Client

func (m SubjectMutation) 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 (*SubjectMutation) EdgeCleared

func (m *SubjectMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*SubjectMutation) Field

func (m *SubjectMutation) 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 (*SubjectMutation) FieldCleared

func (m *SubjectMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*SubjectMutation) Fields

func (m *SubjectMutation) 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 (*SubjectMutation) ID

func (m *SubjectMutation) ID() (id uuid.UUID, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*SubjectMutation) IDs

func (m *SubjectMutation) IDs(ctx context.Context) ([]uuid.UUID, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*SubjectMutation) Name

func (m *SubjectMutation) Name() (r string, exists bool)

Name returns the value of the "name" field in the mutation.

func (*SubjectMutation) OldField

func (m *SubjectMutation) 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 (*SubjectMutation) OldName

func (m *SubjectMutation) OldName(ctx context.Context) (v string, err error)

OldName returns the old "name" field's value of the Subject entity. If the Subject object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*SubjectMutation) Op

func (m *SubjectMutation) Op() Op

Op returns the operation name.

func (*SubjectMutation) RemoveSubjectDigestIDs

func (m *SubjectMutation) RemoveSubjectDigestIDs(ids ...uuid.UUID)

RemoveSubjectDigestIDs removes the "subject_digests" edge to the SubjectDigest entity by IDs.

func (*SubjectMutation) RemovedEdges

func (m *SubjectMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*SubjectMutation) RemovedIDs

func (m *SubjectMutation) 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 (*SubjectMutation) RemovedSubjectDigestsIDs

func (m *SubjectMutation) RemovedSubjectDigestsIDs() (ids []uuid.UUID)

RemovedSubjectDigests returns the removed IDs of the "subject_digests" edge to the SubjectDigest entity.

func (*SubjectMutation) ResetEdge

func (m *SubjectMutation) 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 (*SubjectMutation) ResetField

func (m *SubjectMutation) 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 (*SubjectMutation) ResetName

func (m *SubjectMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*SubjectMutation) ResetStatement

func (m *SubjectMutation) ResetStatement()

ResetStatement resets all changes to the "statement" edge.

func (*SubjectMutation) ResetSubjectDigests

func (m *SubjectMutation) ResetSubjectDigests()

ResetSubjectDigests resets all changes to the "subject_digests" edge.

func (*SubjectMutation) SetField

func (m *SubjectMutation) 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 (*SubjectMutation) SetID added in v0.5.0

func (m *SubjectMutation) SetID(id uuid.UUID)

SetID sets the value of the id field. Note that this operation is only accepted on creation of Subject entities.

func (*SubjectMutation) SetName

func (m *SubjectMutation) SetName(s string)

SetName sets the "name" field.

func (*SubjectMutation) SetOp

func (m *SubjectMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*SubjectMutation) SetStatementID

func (m *SubjectMutation) SetStatementID(id uuid.UUID)

SetStatementID sets the "statement" edge to the Statement entity by id.

func (*SubjectMutation) StatementCleared

func (m *SubjectMutation) StatementCleared() bool

StatementCleared reports if the "statement" edge to the Statement entity was cleared.

func (*SubjectMutation) StatementID

func (m *SubjectMutation) StatementID() (id uuid.UUID, exists bool)

StatementID returns the "statement" edge ID in the mutation.

func (*SubjectMutation) StatementIDs

func (m *SubjectMutation) StatementIDs() (ids []uuid.UUID)

StatementIDs returns the "statement" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use StatementID instead. It exists only for internal usage by the builders.

func (*SubjectMutation) SubjectDigestsCleared

func (m *SubjectMutation) SubjectDigestsCleared() bool

SubjectDigestsCleared reports if the "subject_digests" edge to the SubjectDigest entity was cleared.

func (*SubjectMutation) SubjectDigestsIDs

func (m *SubjectMutation) SubjectDigestsIDs() (ids []uuid.UUID)

SubjectDigestsIDs returns the "subject_digests" edge IDs in the mutation.

func (SubjectMutation) Tx

func (m SubjectMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*SubjectMutation) Type

func (m *SubjectMutation) Type() string

Type returns the node type of this mutation (Subject).

func (*SubjectMutation) Where

func (m *SubjectMutation) Where(ps ...predicate.Subject)

Where appends a list predicates to the SubjectMutation builder.

func (*SubjectMutation) WhereP

func (m *SubjectMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the SubjectMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type SubjectOrder

type SubjectOrder struct {
	Direction OrderDirection     `json:"direction"`
	Field     *SubjectOrderField `json:"field"`
}

SubjectOrder defines the ordering of Subject.

type SubjectOrderField

type SubjectOrderField struct {
	// Value extracts the ordering value from the given Subject.
	Value func(*Subject) (ent.Value, error)
	// contains filtered or unexported fields
}

SubjectOrderField defines the ordering field of Subject.

type SubjectPaginateOption

type SubjectPaginateOption func(*subjectPager) error

SubjectPaginateOption enables pagination customization.

func WithSubjectFilter

func WithSubjectFilter(filter func(*SubjectQuery) (*SubjectQuery, error)) SubjectPaginateOption

WithSubjectFilter configures pagination filter.

func WithSubjectOrder

func WithSubjectOrder(order *SubjectOrder) SubjectPaginateOption

WithSubjectOrder configures pagination ordering.

type SubjectQuery

type SubjectQuery struct {
	// contains filtered or unexported fields
}

SubjectQuery is the builder for querying Subject entities.

func (*SubjectQuery) Aggregate

func (sq *SubjectQuery) Aggregate(fns ...AggregateFunc) *SubjectSelect

Aggregate returns a SubjectSelect configured with the given aggregations.

func (*SubjectQuery) All

func (sq *SubjectQuery) All(ctx context.Context) ([]*Subject, error)

All executes the query and returns a list of Subjects.

func (*SubjectQuery) AllX

func (sq *SubjectQuery) AllX(ctx context.Context) []*Subject

AllX is like All, but panics if an error occurs.

func (*SubjectQuery) Clone

func (sq *SubjectQuery) Clone() *SubjectQuery

Clone returns a duplicate of the SubjectQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*SubjectQuery) CollectFields

func (s *SubjectQuery) CollectFields(ctx context.Context, satisfies ...string) (*SubjectQuery, error)

CollectFields tells the query-builder to eagerly load connected nodes by resolver context.

func (*SubjectQuery) Count

func (sq *SubjectQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*SubjectQuery) CountX

func (sq *SubjectQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*SubjectQuery) Exist

func (sq *SubjectQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*SubjectQuery) ExistX

func (sq *SubjectQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*SubjectQuery) First

func (sq *SubjectQuery) First(ctx context.Context) (*Subject, error)

First returns the first Subject entity from the query. Returns a *NotFoundError when no Subject was found.

func (*SubjectQuery) FirstID

func (sq *SubjectQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)

FirstID returns the first Subject ID from the query. Returns a *NotFoundError when no Subject ID was found.

func (*SubjectQuery) FirstIDX

func (sq *SubjectQuery) FirstIDX(ctx context.Context) uuid.UUID

FirstIDX is like FirstID, but panics if an error occurs.

func (*SubjectQuery) FirstX

func (sq *SubjectQuery) FirstX(ctx context.Context) *Subject

FirstX is like First, but panics if an error occurs.

func (*SubjectQuery) GroupBy

func (sq *SubjectQuery) GroupBy(field string, fields ...string) *SubjectGroupBy

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.Subject.Query().
	GroupBy(subject.FieldName).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*SubjectQuery) IDs

func (sq *SubjectQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)

IDs executes the query and returns a list of Subject IDs.

func (*SubjectQuery) IDsX

func (sq *SubjectQuery) IDsX(ctx context.Context) []uuid.UUID

IDsX is like IDs, but panics if an error occurs.

func (*SubjectQuery) Limit

func (sq *SubjectQuery) Limit(limit int) *SubjectQuery

Limit the number of records to be returned by this query.

func (*SubjectQuery) Offset

func (sq *SubjectQuery) Offset(offset int) *SubjectQuery

Offset to start from.

func (*SubjectQuery) Only

func (sq *SubjectQuery) Only(ctx context.Context) (*Subject, error)

Only returns a single Subject entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Subject entity is found. Returns a *NotFoundError when no Subject entities are found.

func (*SubjectQuery) OnlyID

func (sq *SubjectQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)

OnlyID is like Only, but returns the only Subject ID in the query. Returns a *NotSingularError when more than one Subject ID is found. Returns a *NotFoundError when no entities are found.

func (*SubjectQuery) OnlyIDX

func (sq *SubjectQuery) OnlyIDX(ctx context.Context) uuid.UUID

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*SubjectQuery) OnlyX

func (sq *SubjectQuery) OnlyX(ctx context.Context) *Subject

OnlyX is like Only, but panics if an error occurs.

func (*SubjectQuery) Order

func (sq *SubjectQuery) Order(o ...subject.OrderOption) *SubjectQuery

Order specifies how the records should be ordered.

func (*SubjectQuery) Paginate

func (s *SubjectQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...SubjectPaginateOption,
) (*SubjectConnection, error)

Paginate executes the query and returns a relay based cursor connection to Subject.

func (*SubjectQuery) QueryStatement

func (sq *SubjectQuery) QueryStatement() *StatementQuery

QueryStatement chains the current query on the "statement" edge.

func (*SubjectQuery) QuerySubjectDigests

func (sq *SubjectQuery) QuerySubjectDigests() *SubjectDigestQuery

QuerySubjectDigests chains the current query on the "subject_digests" edge.

func (*SubjectQuery) Select

func (sq *SubjectQuery) Select(fields ...string) *SubjectSelect

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.Subject.Query().
	Select(subject.FieldName).
	Scan(ctx, &v)

func (*SubjectQuery) Unique

func (sq *SubjectQuery) Unique(unique bool) *SubjectQuery

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 (*SubjectQuery) Where

func (sq *SubjectQuery) Where(ps ...predicate.Subject) *SubjectQuery

Where adds a new predicate for the SubjectQuery builder.

func (*SubjectQuery) WithNamedSubjectDigests

func (sq *SubjectQuery) WithNamedSubjectDigests(name string, opts ...func(*SubjectDigestQuery)) *SubjectQuery

WithNamedSubjectDigests tells the query-builder to eager-load the nodes that are connected to the "subject_digests" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*SubjectQuery) WithStatement

func (sq *SubjectQuery) WithStatement(opts ...func(*StatementQuery)) *SubjectQuery

WithStatement tells the query-builder to eager-load the nodes that are connected to the "statement" edge. The optional arguments are used to configure the query builder of the edge.

func (*SubjectQuery) WithSubjectDigests

func (sq *SubjectQuery) WithSubjectDigests(opts ...func(*SubjectDigestQuery)) *SubjectQuery

WithSubjectDigests tells the query-builder to eager-load the nodes that are connected to the "subject_digests" edge. The optional arguments are used to configure the query builder of the edge.

type SubjectSelect

type SubjectSelect struct {
	*SubjectQuery
	// contains filtered or unexported fields
}

SubjectSelect is the builder for selecting fields of Subject entities.

func (*SubjectSelect) Aggregate

func (ss *SubjectSelect) Aggregate(fns ...AggregateFunc) *SubjectSelect

Aggregate adds the given aggregation functions to the selector query.

func (*SubjectSelect) Bool

func (s *SubjectSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*SubjectSelect) BoolX

func (s *SubjectSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*SubjectSelect) Bools

func (s *SubjectSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*SubjectSelect) BoolsX

func (s *SubjectSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*SubjectSelect) Float64

func (s *SubjectSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*SubjectSelect) Float64X

func (s *SubjectSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*SubjectSelect) Float64s

func (s *SubjectSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*SubjectSelect) Float64sX

func (s *SubjectSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*SubjectSelect) Int

func (s *SubjectSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*SubjectSelect) IntX

func (s *SubjectSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*SubjectSelect) Ints

func (s *SubjectSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*SubjectSelect) IntsX

func (s *SubjectSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*SubjectSelect) Scan

func (ss *SubjectSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*SubjectSelect) ScanX

func (s *SubjectSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*SubjectSelect) String

func (s *SubjectSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*SubjectSelect) StringX

func (s *SubjectSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*SubjectSelect) Strings

func (s *SubjectSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*SubjectSelect) StringsX

func (s *SubjectSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type SubjectUpdate

type SubjectUpdate struct {
	// contains filtered or unexported fields
}

SubjectUpdate is the builder for updating Subject entities.

func (*SubjectUpdate) AddSubjectDigestIDs

func (su *SubjectUpdate) AddSubjectDigestIDs(ids ...uuid.UUID) *SubjectUpdate

AddSubjectDigestIDs adds the "subject_digests" edge to the SubjectDigest entity by IDs.

func (*SubjectUpdate) AddSubjectDigests

func (su *SubjectUpdate) AddSubjectDigests(s ...*SubjectDigest) *SubjectUpdate

AddSubjectDigests adds the "subject_digests" edges to the SubjectDigest entity.

func (*SubjectUpdate) ClearStatement

func (su *SubjectUpdate) ClearStatement() *SubjectUpdate

ClearStatement clears the "statement" edge to the Statement entity.

func (*SubjectUpdate) ClearSubjectDigests

func (su *SubjectUpdate) ClearSubjectDigests() *SubjectUpdate

ClearSubjectDigests clears all "subject_digests" edges to the SubjectDigest entity.

func (*SubjectUpdate) Exec

func (su *SubjectUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*SubjectUpdate) ExecX

func (su *SubjectUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SubjectUpdate) Mutation

func (su *SubjectUpdate) Mutation() *SubjectMutation

Mutation returns the SubjectMutation object of the builder.

func (*SubjectUpdate) RemoveSubjectDigestIDs

func (su *SubjectUpdate) RemoveSubjectDigestIDs(ids ...uuid.UUID) *SubjectUpdate

RemoveSubjectDigestIDs removes the "subject_digests" edge to SubjectDigest entities by IDs.

func (*SubjectUpdate) RemoveSubjectDigests

func (su *SubjectUpdate) RemoveSubjectDigests(s ...*SubjectDigest) *SubjectUpdate

RemoveSubjectDigests removes "subject_digests" edges to SubjectDigest entities.

func (*SubjectUpdate) Save

func (su *SubjectUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*SubjectUpdate) SaveX

func (su *SubjectUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*SubjectUpdate) SetName

func (su *SubjectUpdate) SetName(s string) *SubjectUpdate

SetName sets the "name" field.

func (*SubjectUpdate) SetNillableName

func (su *SubjectUpdate) SetNillableName(s *string) *SubjectUpdate

SetNillableName sets the "name" field if the given value is not nil.

func (*SubjectUpdate) SetNillableStatementID

func (su *SubjectUpdate) SetNillableStatementID(id *uuid.UUID) *SubjectUpdate

SetNillableStatementID sets the "statement" edge to the Statement entity by ID if the given value is not nil.

func (*SubjectUpdate) SetStatement

func (su *SubjectUpdate) SetStatement(s *Statement) *SubjectUpdate

SetStatement sets the "statement" edge to the Statement entity.

func (*SubjectUpdate) SetStatementID

func (su *SubjectUpdate) SetStatementID(id uuid.UUID) *SubjectUpdate

SetStatementID sets the "statement" edge to the Statement entity by ID.

func (*SubjectUpdate) Where

func (su *SubjectUpdate) Where(ps ...predicate.Subject) *SubjectUpdate

Where appends a list predicates to the SubjectUpdate builder.

type SubjectUpdateOne

type SubjectUpdateOne struct {
	// contains filtered or unexported fields
}

SubjectUpdateOne is the builder for updating a single Subject entity.

func (*SubjectUpdateOne) AddSubjectDigestIDs

func (suo *SubjectUpdateOne) AddSubjectDigestIDs(ids ...uuid.UUID) *SubjectUpdateOne

AddSubjectDigestIDs adds the "subject_digests" edge to the SubjectDigest entity by IDs.

func (*SubjectUpdateOne) AddSubjectDigests

func (suo *SubjectUpdateOne) AddSubjectDigests(s ...*SubjectDigest) *SubjectUpdateOne

AddSubjectDigests adds the "subject_digests" edges to the SubjectDigest entity.

func (*SubjectUpdateOne) ClearStatement

func (suo *SubjectUpdateOne) ClearStatement() *SubjectUpdateOne

ClearStatement clears the "statement" edge to the Statement entity.

func (*SubjectUpdateOne) ClearSubjectDigests

func (suo *SubjectUpdateOne) ClearSubjectDigests() *SubjectUpdateOne

ClearSubjectDigests clears all "subject_digests" edges to the SubjectDigest entity.

func (*SubjectUpdateOne) Exec

func (suo *SubjectUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*SubjectUpdateOne) ExecX

func (suo *SubjectUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SubjectUpdateOne) Mutation

func (suo *SubjectUpdateOne) Mutation() *SubjectMutation

Mutation returns the SubjectMutation object of the builder.

func (*SubjectUpdateOne) RemoveSubjectDigestIDs

func (suo *SubjectUpdateOne) RemoveSubjectDigestIDs(ids ...uuid.UUID) *SubjectUpdateOne

RemoveSubjectDigestIDs removes the "subject_digests" edge to SubjectDigest entities by IDs.

func (*SubjectUpdateOne) RemoveSubjectDigests

func (suo *SubjectUpdateOne) RemoveSubjectDigests(s ...*SubjectDigest) *SubjectUpdateOne

RemoveSubjectDigests removes "subject_digests" edges to SubjectDigest entities.

func (*SubjectUpdateOne) Save

func (suo *SubjectUpdateOne) Save(ctx context.Context) (*Subject, error)

Save executes the query and returns the updated Subject entity.

func (*SubjectUpdateOne) SaveX

func (suo *SubjectUpdateOne) SaveX(ctx context.Context) *Subject

SaveX is like Save, but panics if an error occurs.

func (*SubjectUpdateOne) Select

func (suo *SubjectUpdateOne) Select(field string, fields ...string) *SubjectUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*SubjectUpdateOne) SetName

func (suo *SubjectUpdateOne) SetName(s string) *SubjectUpdateOne

SetName sets the "name" field.

func (*SubjectUpdateOne) SetNillableName

func (suo *SubjectUpdateOne) SetNillableName(s *string) *SubjectUpdateOne

SetNillableName sets the "name" field if the given value is not nil.

func (*SubjectUpdateOne) SetNillableStatementID

func (suo *SubjectUpdateOne) SetNillableStatementID(id *uuid.UUID) *SubjectUpdateOne

SetNillableStatementID sets the "statement" edge to the Statement entity by ID if the given value is not nil.

func (*SubjectUpdateOne) SetStatement

func (suo *SubjectUpdateOne) SetStatement(s *Statement) *SubjectUpdateOne

SetStatement sets the "statement" edge to the Statement entity.

func (*SubjectUpdateOne) SetStatementID

func (suo *SubjectUpdateOne) SetStatementID(id uuid.UUID) *SubjectUpdateOne

SetStatementID sets the "statement" edge to the Statement entity by ID.

func (*SubjectUpdateOne) Where

Where appends a list predicates to the SubjectUpdate builder.

type SubjectWhereInput

type SubjectWhereInput struct {
	Predicates []predicate.Subject  `json:"-"`
	Not        *SubjectWhereInput   `json:"not,omitempty"`
	Or         []*SubjectWhereInput `json:"or,omitempty"`
	And        []*SubjectWhereInput `json:"and,omitempty"`

	// "id" field predicates.
	ID      *uuid.UUID  `json:"id,omitempty"`
	IDNEQ   *uuid.UUID  `json:"idNEQ,omitempty"`
	IDIn    []uuid.UUID `json:"idIn,omitempty"`
	IDNotIn []uuid.UUID `json:"idNotIn,omitempty"`
	IDGT    *uuid.UUID  `json:"idGT,omitempty"`
	IDGTE   *uuid.UUID  `json:"idGTE,omitempty"`
	IDLT    *uuid.UUID  `json:"idLT,omitempty"`
	IDLTE   *uuid.UUID  `json:"idLTE,omitempty"`

	// "name" field predicates.
	Name             *string  `json:"name,omitempty"`
	NameNEQ          *string  `json:"nameNEQ,omitempty"`
	NameIn           []string `json:"nameIn,omitempty"`
	NameNotIn        []string `json:"nameNotIn,omitempty"`
	NameGT           *string  `json:"nameGT,omitempty"`
	NameGTE          *string  `json:"nameGTE,omitempty"`
	NameLT           *string  `json:"nameLT,omitempty"`
	NameLTE          *string  `json:"nameLTE,omitempty"`
	NameContains     *string  `json:"nameContains,omitempty"`
	NameHasPrefix    *string  `json:"nameHasPrefix,omitempty"`
	NameHasSuffix    *string  `json:"nameHasSuffix,omitempty"`
	NameEqualFold    *string  `json:"nameEqualFold,omitempty"`
	NameContainsFold *string  `json:"nameContainsFold,omitempty"`

	// "subject_digests" edge predicates.
	HasSubjectDigests     *bool                      `json:"hasSubjectDigests,omitempty"`
	HasSubjectDigestsWith []*SubjectDigestWhereInput `json:"hasSubjectDigestsWith,omitempty"`

	// "statement" edge predicates.
	HasStatement     *bool                  `json:"hasStatement,omitempty"`
	HasStatementWith []*StatementWhereInput `json:"hasStatementWith,omitempty"`
}

SubjectWhereInput represents a where input for filtering Subject queries.

func (*SubjectWhereInput) AddPredicates

func (i *SubjectWhereInput) AddPredicates(predicates ...predicate.Subject)

AddPredicates adds custom predicates to the where input to be used during the filtering phase.

func (*SubjectWhereInput) Filter

Filter applies the SubjectWhereInput filter on the SubjectQuery builder.

func (*SubjectWhereInput) P

P returns a predicate for filtering subjects. An error is returned if the input is empty or invalid.

type Subjects

type Subjects []*Subject

Subjects is a parsable slice of Subject.

type Timestamp

type Timestamp struct {

	// ID of the ent.
	ID uuid.UUID `json:"id,omitempty"`
	// Type holds the value of the "type" field.
	Type string `json:"type,omitempty"`
	// Timestamp holds the value of the "timestamp" field.
	Timestamp time.Time `json:"timestamp,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the TimestampQuery when eager-loading is set.
	Edges TimestampEdges `json:"edges"`
	// contains filtered or unexported fields
}

Timestamp is the model entity for the Timestamp schema.

func (*Timestamp) IsNode

func (*Timestamp) IsNode()

IsNode implements the Node interface check for GQLGen.

func (*Timestamp) QuerySignature

func (t *Timestamp) QuerySignature() *SignatureQuery

QuerySignature queries the "signature" edge of the Timestamp entity.

func (*Timestamp) Signature

func (t *Timestamp) Signature(ctx context.Context) (*Signature, error)

func (*Timestamp) String

func (t *Timestamp) String() string

String implements the fmt.Stringer.

func (*Timestamp) ToEdge

func (t *Timestamp) ToEdge(order *TimestampOrder) *TimestampEdge

ToEdge converts Timestamp into TimestampEdge.

func (*Timestamp) Unwrap

func (t *Timestamp) Unwrap() *Timestamp

Unwrap unwraps the Timestamp 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 (*Timestamp) Update

func (t *Timestamp) Update() *TimestampUpdateOne

Update returns a builder for updating this Timestamp. Note that you need to call Timestamp.Unwrap() before calling this method if this Timestamp was returned from a transaction, and the transaction was committed or rolled back.

func (*Timestamp) Value

func (t *Timestamp) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the Timestamp. This includes values selected through modifiers, order, etc.

type TimestampClient

type TimestampClient struct {
	// contains filtered or unexported fields
}

TimestampClient is a client for the Timestamp schema.

func NewTimestampClient

func NewTimestampClient(c config) *TimestampClient

NewTimestampClient returns a client for the Timestamp from the given config.

func (*TimestampClient) Create

func (c *TimestampClient) Create() *TimestampCreate

Create returns a builder for creating a Timestamp entity.

func (*TimestampClient) CreateBulk

func (c *TimestampClient) CreateBulk(builders ...*TimestampCreate) *TimestampCreateBulk

CreateBulk returns a builder for creating a bulk of Timestamp entities.

func (*TimestampClient) Delete

func (c *TimestampClient) Delete() *TimestampDelete

Delete returns a delete builder for Timestamp.

func (*TimestampClient) DeleteOne

func (c *TimestampClient) DeleteOne(t *Timestamp) *TimestampDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*TimestampClient) DeleteOneID

func (c *TimestampClient) DeleteOneID(id uuid.UUID) *TimestampDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*TimestampClient) Get

func (c *TimestampClient) Get(ctx context.Context, id uuid.UUID) (*Timestamp, error)

Get returns a Timestamp entity by its id.

func (*TimestampClient) GetX

func (c *TimestampClient) GetX(ctx context.Context, id uuid.UUID) *Timestamp

GetX is like Get, but panics if an error occurs.

func (*TimestampClient) Hooks

func (c *TimestampClient) Hooks() []Hook

Hooks returns the client hooks.

func (*TimestampClient) Intercept

func (c *TimestampClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `timestamp.Intercept(f(g(h())))`.

func (*TimestampClient) Interceptors

func (c *TimestampClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*TimestampClient) MapCreateBulk

func (c *TimestampClient) MapCreateBulk(slice any, setFunc func(*TimestampCreate, int)) *TimestampCreateBulk

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 (*TimestampClient) Query

func (c *TimestampClient) Query() *TimestampQuery

Query returns a query builder for Timestamp.

func (*TimestampClient) QuerySignature

func (c *TimestampClient) QuerySignature(t *Timestamp) *SignatureQuery

QuerySignature queries the signature edge of a Timestamp.

func (*TimestampClient) Update

func (c *TimestampClient) Update() *TimestampUpdate

Update returns an update builder for Timestamp.

func (*TimestampClient) UpdateOne

func (c *TimestampClient) UpdateOne(t *Timestamp) *TimestampUpdateOne

UpdateOne returns an update builder for the given entity.

func (*TimestampClient) UpdateOneID

func (c *TimestampClient) UpdateOneID(id uuid.UUID) *TimestampUpdateOne

UpdateOneID returns an update builder for the given id.

func (*TimestampClient) Use

func (c *TimestampClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `timestamp.Hooks(f(g(h())))`.

type TimestampConnection

type TimestampConnection struct {
	Edges      []*TimestampEdge `json:"edges"`
	PageInfo   PageInfo         `json:"pageInfo"`
	TotalCount int              `json:"totalCount"`
}

TimestampConnection is the connection containing edges to Timestamp.

type TimestampCreate

type TimestampCreate struct {
	// contains filtered or unexported fields
}

TimestampCreate is the builder for creating a Timestamp entity.

func (*TimestampCreate) Exec

func (tc *TimestampCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*TimestampCreate) ExecX

func (tc *TimestampCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*TimestampCreate) Mutation

func (tc *TimestampCreate) Mutation() *TimestampMutation

Mutation returns the TimestampMutation object of the builder.

func (*TimestampCreate) Save

func (tc *TimestampCreate) Save(ctx context.Context) (*Timestamp, error)

Save creates the Timestamp in the database.

func (*TimestampCreate) SaveX

func (tc *TimestampCreate) SaveX(ctx context.Context) *Timestamp

SaveX calls Save and panics if Save returns an error.

func (*TimestampCreate) SetID added in v0.5.0

func (tc *TimestampCreate) SetID(u uuid.UUID) *TimestampCreate

SetID sets the "id" field.

func (*TimestampCreate) SetNillableID added in v0.5.0

func (tc *TimestampCreate) SetNillableID(u *uuid.UUID) *TimestampCreate

SetNillableID sets the "id" field if the given value is not nil.

func (*TimestampCreate) SetNillableSignatureID

func (tc *TimestampCreate) SetNillableSignatureID(id *uuid.UUID) *TimestampCreate

SetNillableSignatureID sets the "signature" edge to the Signature entity by ID if the given value is not nil.

func (*TimestampCreate) SetSignature

func (tc *TimestampCreate) SetSignature(s *Signature) *TimestampCreate

SetSignature sets the "signature" edge to the Signature entity.

func (*TimestampCreate) SetSignatureID

func (tc *TimestampCreate) SetSignatureID(id uuid.UUID) *TimestampCreate

SetSignatureID sets the "signature" edge to the Signature entity by ID.

func (*TimestampCreate) SetTimestamp

func (tc *TimestampCreate) SetTimestamp(t time.Time) *TimestampCreate

SetTimestamp sets the "timestamp" field.

func (*TimestampCreate) SetType

func (tc *TimestampCreate) SetType(s string) *TimestampCreate

SetType sets the "type" field.

type TimestampCreateBulk

type TimestampCreateBulk struct {
	// contains filtered or unexported fields
}

TimestampCreateBulk is the builder for creating many Timestamp entities in bulk.

func (*TimestampCreateBulk) Exec

func (tcb *TimestampCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*TimestampCreateBulk) ExecX

func (tcb *TimestampCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*TimestampCreateBulk) Save

func (tcb *TimestampCreateBulk) Save(ctx context.Context) ([]*Timestamp, error)

Save creates the Timestamp entities in the database.

func (*TimestampCreateBulk) SaveX

func (tcb *TimestampCreateBulk) SaveX(ctx context.Context) []*Timestamp

SaveX is like Save, but panics if an error occurs.

type TimestampDelete

type TimestampDelete struct {
	// contains filtered or unexported fields
}

TimestampDelete is the builder for deleting a Timestamp entity.

func (*TimestampDelete) Exec

func (td *TimestampDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*TimestampDelete) ExecX

func (td *TimestampDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*TimestampDelete) Where

Where appends a list predicates to the TimestampDelete builder.

type TimestampDeleteOne

type TimestampDeleteOne struct {
	// contains filtered or unexported fields
}

TimestampDeleteOne is the builder for deleting a single Timestamp entity.

func (*TimestampDeleteOne) Exec

func (tdo *TimestampDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*TimestampDeleteOne) ExecX

func (tdo *TimestampDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*TimestampDeleteOne) Where

Where appends a list predicates to the TimestampDelete builder.

type TimestampEdge

type TimestampEdge struct {
	Node   *Timestamp `json:"node"`
	Cursor Cursor     `json:"cursor"`
}

TimestampEdge is the edge representation of Timestamp.

type TimestampEdges

type TimestampEdges struct {
	// Signature holds the value of the signature edge.
	Signature *Signature `json:"signature,omitempty"`
	// contains filtered or unexported fields
}

TimestampEdges holds the relations/edges for other nodes in the graph.

func (TimestampEdges) SignatureOrErr

func (e TimestampEdges) SignatureOrErr() (*Signature, error)

SignatureOrErr returns the Signature value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type TimestampGroupBy

type TimestampGroupBy struct {
	// contains filtered or unexported fields
}

TimestampGroupBy is the group-by builder for Timestamp entities.

func (*TimestampGroupBy) Aggregate

func (tgb *TimestampGroupBy) Aggregate(fns ...AggregateFunc) *TimestampGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*TimestampGroupBy) Bool

func (s *TimestampGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*TimestampGroupBy) BoolX

func (s *TimestampGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*TimestampGroupBy) Bools

func (s *TimestampGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*TimestampGroupBy) BoolsX

func (s *TimestampGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*TimestampGroupBy) Float64

func (s *TimestampGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*TimestampGroupBy) Float64X

func (s *TimestampGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*TimestampGroupBy) Float64s

func (s *TimestampGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*TimestampGroupBy) Float64sX

func (s *TimestampGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*TimestampGroupBy) Int

func (s *TimestampGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*TimestampGroupBy) IntX

func (s *TimestampGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*TimestampGroupBy) Ints

func (s *TimestampGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*TimestampGroupBy) IntsX

func (s *TimestampGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*TimestampGroupBy) Scan

func (tgb *TimestampGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*TimestampGroupBy) ScanX

func (s *TimestampGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*TimestampGroupBy) String

func (s *TimestampGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*TimestampGroupBy) StringX

func (s *TimestampGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*TimestampGroupBy) Strings

func (s *TimestampGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*TimestampGroupBy) StringsX

func (s *TimestampGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type TimestampMutation

type TimestampMutation struct {
	// contains filtered or unexported fields
}

TimestampMutation represents an operation that mutates the Timestamp nodes in the graph.

func (*TimestampMutation) AddField

func (m *TimestampMutation) 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 (*TimestampMutation) AddedEdges

func (m *TimestampMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*TimestampMutation) AddedField

func (m *TimestampMutation) 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 (*TimestampMutation) AddedFields

func (m *TimestampMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*TimestampMutation) AddedIDs

func (m *TimestampMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*TimestampMutation) ClearEdge

func (m *TimestampMutation) 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 (*TimestampMutation) ClearField

func (m *TimestampMutation) 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 (*TimestampMutation) ClearSignature

func (m *TimestampMutation) ClearSignature()

ClearSignature clears the "signature" edge to the Signature entity.

func (*TimestampMutation) ClearedEdges

func (m *TimestampMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*TimestampMutation) ClearedFields

func (m *TimestampMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (TimestampMutation) Client

func (m TimestampMutation) 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 (*TimestampMutation) EdgeCleared

func (m *TimestampMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*TimestampMutation) Field

func (m *TimestampMutation) 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 (*TimestampMutation) FieldCleared

func (m *TimestampMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*TimestampMutation) Fields

func (m *TimestampMutation) 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 (*TimestampMutation) GetType

func (m *TimestampMutation) GetType() (r string, exists bool)

GetType returns the value of the "type" field in the mutation.

func (*TimestampMutation) ID

func (m *TimestampMutation) ID() (id uuid.UUID, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*TimestampMutation) IDs

func (m *TimestampMutation) IDs(ctx context.Context) ([]uuid.UUID, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*TimestampMutation) OldField

func (m *TimestampMutation) 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 (*TimestampMutation) OldTimestamp

func (m *TimestampMutation) OldTimestamp(ctx context.Context) (v time.Time, err error)

OldTimestamp returns the old "timestamp" field's value of the Timestamp entity. If the Timestamp object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*TimestampMutation) OldType

func (m *TimestampMutation) OldType(ctx context.Context) (v string, err error)

OldType returns the old "type" field's value of the Timestamp entity. If the Timestamp object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*TimestampMutation) Op

func (m *TimestampMutation) Op() Op

Op returns the operation name.

func (*TimestampMutation) RemovedEdges

func (m *TimestampMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*TimestampMutation) RemovedIDs

func (m *TimestampMutation) 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 (*TimestampMutation) ResetEdge

func (m *TimestampMutation) 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 (*TimestampMutation) ResetField

func (m *TimestampMutation) 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 (*TimestampMutation) ResetSignature

func (m *TimestampMutation) ResetSignature()

ResetSignature resets all changes to the "signature" edge.

func (*TimestampMutation) ResetTimestamp

func (m *TimestampMutation) ResetTimestamp()

ResetTimestamp resets all changes to the "timestamp" field.

func (*TimestampMutation) ResetType

func (m *TimestampMutation) ResetType()

ResetType resets all changes to the "type" field.

func (*TimestampMutation) SetField

func (m *TimestampMutation) 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 (*TimestampMutation) SetID added in v0.5.0

func (m *TimestampMutation) SetID(id uuid.UUID)

SetID sets the value of the id field. Note that this operation is only accepted on creation of Timestamp entities.

func (*TimestampMutation) SetOp

func (m *TimestampMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*TimestampMutation) SetSignatureID

func (m *TimestampMutation) SetSignatureID(id uuid.UUID)

SetSignatureID sets the "signature" edge to the Signature entity by id.

func (*TimestampMutation) SetTimestamp

func (m *TimestampMutation) SetTimestamp(t time.Time)

SetTimestamp sets the "timestamp" field.

func (*TimestampMutation) SetType

func (m *TimestampMutation) SetType(s string)

SetType sets the "type" field.

func (*TimestampMutation) SignatureCleared

func (m *TimestampMutation) SignatureCleared() bool

SignatureCleared reports if the "signature" edge to the Signature entity was cleared.

func (*TimestampMutation) SignatureID

func (m *TimestampMutation) SignatureID() (id uuid.UUID, exists bool)

SignatureID returns the "signature" edge ID in the mutation.

func (*TimestampMutation) SignatureIDs

func (m *TimestampMutation) SignatureIDs() (ids []uuid.UUID)

SignatureIDs returns the "signature" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use SignatureID instead. It exists only for internal usage by the builders.

func (*TimestampMutation) Timestamp

func (m *TimestampMutation) Timestamp() (r time.Time, exists bool)

Timestamp returns the value of the "timestamp" field in the mutation.

func (TimestampMutation) Tx

func (m TimestampMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*TimestampMutation) Type

func (m *TimestampMutation) Type() string

Type returns the node type of this mutation (Timestamp).

func (*TimestampMutation) Where

func (m *TimestampMutation) Where(ps ...predicate.Timestamp)

Where appends a list predicates to the TimestampMutation builder.

func (*TimestampMutation) WhereP

func (m *TimestampMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the TimestampMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type TimestampOrder

type TimestampOrder struct {
	Direction OrderDirection       `json:"direction"`
	Field     *TimestampOrderField `json:"field"`
}

TimestampOrder defines the ordering of Timestamp.

type TimestampOrderField

type TimestampOrderField struct {
	// Value extracts the ordering value from the given Timestamp.
	Value func(*Timestamp) (ent.Value, error)
	// contains filtered or unexported fields
}

TimestampOrderField defines the ordering field of Timestamp.

type TimestampPaginateOption

type TimestampPaginateOption func(*timestampPager) error

TimestampPaginateOption enables pagination customization.

func WithTimestampFilter

func WithTimestampFilter(filter func(*TimestampQuery) (*TimestampQuery, error)) TimestampPaginateOption

WithTimestampFilter configures pagination filter.

func WithTimestampOrder

func WithTimestampOrder(order *TimestampOrder) TimestampPaginateOption

WithTimestampOrder configures pagination ordering.

type TimestampQuery

type TimestampQuery struct {
	// contains filtered or unexported fields
}

TimestampQuery is the builder for querying Timestamp entities.

func (*TimestampQuery) Aggregate

func (tq *TimestampQuery) Aggregate(fns ...AggregateFunc) *TimestampSelect

Aggregate returns a TimestampSelect configured with the given aggregations.

func (*TimestampQuery) All

func (tq *TimestampQuery) All(ctx context.Context) ([]*Timestamp, error)

All executes the query and returns a list of Timestamps.

func (*TimestampQuery) AllX

func (tq *TimestampQuery) AllX(ctx context.Context) []*Timestamp

AllX is like All, but panics if an error occurs.

func (*TimestampQuery) Clone

func (tq *TimestampQuery) Clone() *TimestampQuery

Clone returns a duplicate of the TimestampQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*TimestampQuery) CollectFields

func (t *TimestampQuery) CollectFields(ctx context.Context, satisfies ...string) (*TimestampQuery, error)

CollectFields tells the query-builder to eagerly load connected nodes by resolver context.

func (*TimestampQuery) Count

func (tq *TimestampQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*TimestampQuery) CountX

func (tq *TimestampQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*TimestampQuery) Exist

func (tq *TimestampQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*TimestampQuery) ExistX

func (tq *TimestampQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*TimestampQuery) First

func (tq *TimestampQuery) First(ctx context.Context) (*Timestamp, error)

First returns the first Timestamp entity from the query. Returns a *NotFoundError when no Timestamp was found.

func (*TimestampQuery) FirstID

func (tq *TimestampQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)

FirstID returns the first Timestamp ID from the query. Returns a *NotFoundError when no Timestamp ID was found.

func (*TimestampQuery) FirstIDX

func (tq *TimestampQuery) FirstIDX(ctx context.Context) uuid.UUID

FirstIDX is like FirstID, but panics if an error occurs.

func (*TimestampQuery) FirstX

func (tq *TimestampQuery) FirstX(ctx context.Context) *Timestamp

FirstX is like First, but panics if an error occurs.

func (*TimestampQuery) GroupBy

func (tq *TimestampQuery) GroupBy(field string, fields ...string) *TimestampGroupBy

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.Timestamp.Query().
	GroupBy(timestamp.FieldType).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*TimestampQuery) IDs

func (tq *TimestampQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)

IDs executes the query and returns a list of Timestamp IDs.

func (*TimestampQuery) IDsX

func (tq *TimestampQuery) IDsX(ctx context.Context) []uuid.UUID

IDsX is like IDs, but panics if an error occurs.

func (*TimestampQuery) Limit

func (tq *TimestampQuery) Limit(limit int) *TimestampQuery

Limit the number of records to be returned by this query.

func (*TimestampQuery) Offset

func (tq *TimestampQuery) Offset(offset int) *TimestampQuery

Offset to start from.

func (*TimestampQuery) Only

func (tq *TimestampQuery) Only(ctx context.Context) (*Timestamp, error)

Only returns a single Timestamp entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Timestamp entity is found. Returns a *NotFoundError when no Timestamp entities are found.

func (*TimestampQuery) OnlyID

func (tq *TimestampQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)

OnlyID is like Only, but returns the only Timestamp ID in the query. Returns a *NotSingularError when more than one Timestamp ID is found. Returns a *NotFoundError when no entities are found.

func (*TimestampQuery) OnlyIDX

func (tq *TimestampQuery) OnlyIDX(ctx context.Context) uuid.UUID

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*TimestampQuery) OnlyX

func (tq *TimestampQuery) OnlyX(ctx context.Context) *Timestamp

OnlyX is like Only, but panics if an error occurs.

func (*TimestampQuery) Order

Order specifies how the records should be ordered.

func (*TimestampQuery) Paginate

func (t *TimestampQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...TimestampPaginateOption,
) (*TimestampConnection, error)

Paginate executes the query and returns a relay based cursor connection to Timestamp.

func (*TimestampQuery) QuerySignature

func (tq *TimestampQuery) QuerySignature() *SignatureQuery

QuerySignature chains the current query on the "signature" edge.

func (*TimestampQuery) Select

func (tq *TimestampQuery) Select(fields ...string) *TimestampSelect

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.Timestamp.Query().
	Select(timestamp.FieldType).
	Scan(ctx, &v)

func (*TimestampQuery) Unique

func (tq *TimestampQuery) Unique(unique bool) *TimestampQuery

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 (*TimestampQuery) Where

Where adds a new predicate for the TimestampQuery builder.

func (*TimestampQuery) WithSignature

func (tq *TimestampQuery) WithSignature(opts ...func(*SignatureQuery)) *TimestampQuery

WithSignature tells the query-builder to eager-load the nodes that are connected to the "signature" edge. The optional arguments are used to configure the query builder of the edge.

type TimestampSelect

type TimestampSelect struct {
	*TimestampQuery
	// contains filtered or unexported fields
}

TimestampSelect is the builder for selecting fields of Timestamp entities.

func (*TimestampSelect) Aggregate

func (ts *TimestampSelect) Aggregate(fns ...AggregateFunc) *TimestampSelect

Aggregate adds the given aggregation functions to the selector query.

func (*TimestampSelect) Bool

func (s *TimestampSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*TimestampSelect) BoolX

func (s *TimestampSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*TimestampSelect) Bools

func (s *TimestampSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*TimestampSelect) BoolsX

func (s *TimestampSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*TimestampSelect) Float64

func (s *TimestampSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*TimestampSelect) Float64X

func (s *TimestampSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*TimestampSelect) Float64s

func (s *TimestampSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*TimestampSelect) Float64sX

func (s *TimestampSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*TimestampSelect) Int

func (s *TimestampSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*TimestampSelect) IntX

func (s *TimestampSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*TimestampSelect) Ints

func (s *TimestampSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*TimestampSelect) IntsX

func (s *TimestampSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*TimestampSelect) Scan

func (ts *TimestampSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*TimestampSelect) ScanX

func (s *TimestampSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*TimestampSelect) String

func (s *TimestampSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*TimestampSelect) StringX

func (s *TimestampSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*TimestampSelect) Strings

func (s *TimestampSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*TimestampSelect) StringsX

func (s *TimestampSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type TimestampUpdate

type TimestampUpdate struct {
	// contains filtered or unexported fields
}

TimestampUpdate is the builder for updating Timestamp entities.

func (*TimestampUpdate) ClearSignature

func (tu *TimestampUpdate) ClearSignature() *TimestampUpdate

ClearSignature clears the "signature" edge to the Signature entity.

func (*TimestampUpdate) Exec

func (tu *TimestampUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*TimestampUpdate) ExecX

func (tu *TimestampUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*TimestampUpdate) Mutation

func (tu *TimestampUpdate) Mutation() *TimestampMutation

Mutation returns the TimestampMutation object of the builder.

func (*TimestampUpdate) Save

func (tu *TimestampUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*TimestampUpdate) SaveX

func (tu *TimestampUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*TimestampUpdate) SetNillableSignatureID

func (tu *TimestampUpdate) SetNillableSignatureID(id *uuid.UUID) *TimestampUpdate

SetNillableSignatureID sets the "signature" edge to the Signature entity by ID if the given value is not nil.

func (*TimestampUpdate) SetNillableTimestamp

func (tu *TimestampUpdate) SetNillableTimestamp(t *time.Time) *TimestampUpdate

SetNillableTimestamp sets the "timestamp" field if the given value is not nil.

func (*TimestampUpdate) SetNillableType

func (tu *TimestampUpdate) SetNillableType(s *string) *TimestampUpdate

SetNillableType sets the "type" field if the given value is not nil.

func (*TimestampUpdate) SetSignature

func (tu *TimestampUpdate) SetSignature(s *Signature) *TimestampUpdate

SetSignature sets the "signature" edge to the Signature entity.

func (*TimestampUpdate) SetSignatureID

func (tu *TimestampUpdate) SetSignatureID(id uuid.UUID) *TimestampUpdate

SetSignatureID sets the "signature" edge to the Signature entity by ID.

func (*TimestampUpdate) SetTimestamp

func (tu *TimestampUpdate) SetTimestamp(t time.Time) *TimestampUpdate

SetTimestamp sets the "timestamp" field.

func (*TimestampUpdate) SetType

func (tu *TimestampUpdate) SetType(s string) *TimestampUpdate

SetType sets the "type" field.

func (*TimestampUpdate) Where

Where appends a list predicates to the TimestampUpdate builder.

type TimestampUpdateOne

type TimestampUpdateOne struct {
	// contains filtered or unexported fields
}

TimestampUpdateOne is the builder for updating a single Timestamp entity.

func (*TimestampUpdateOne) ClearSignature

func (tuo *TimestampUpdateOne) ClearSignature() *TimestampUpdateOne

ClearSignature clears the "signature" edge to the Signature entity.

func (*TimestampUpdateOne) Exec

func (tuo *TimestampUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*TimestampUpdateOne) ExecX

func (tuo *TimestampUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*TimestampUpdateOne) Mutation

func (tuo *TimestampUpdateOne) Mutation() *TimestampMutation

Mutation returns the TimestampMutation object of the builder.

func (*TimestampUpdateOne) Save

func (tuo *TimestampUpdateOne) Save(ctx context.Context) (*Timestamp, error)

Save executes the query and returns the updated Timestamp entity.

func (*TimestampUpdateOne) SaveX

func (tuo *TimestampUpdateOne) SaveX(ctx context.Context) *Timestamp

SaveX is like Save, but panics if an error occurs.

func (*TimestampUpdateOne) Select

func (tuo *TimestampUpdateOne) Select(field string, fields ...string) *TimestampUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*TimestampUpdateOne) SetNillableSignatureID

func (tuo *TimestampUpdateOne) SetNillableSignatureID(id *uuid.UUID) *TimestampUpdateOne

SetNillableSignatureID sets the "signature" edge to the Signature entity by ID if the given value is not nil.

func (*TimestampUpdateOne) SetNillableTimestamp

func (tuo *TimestampUpdateOne) SetNillableTimestamp(t *time.Time) *TimestampUpdateOne

SetNillableTimestamp sets the "timestamp" field if the given value is not nil.

func (*TimestampUpdateOne) SetNillableType

func (tuo *TimestampUpdateOne) SetNillableType(s *string) *TimestampUpdateOne

SetNillableType sets the "type" field if the given value is not nil.

func (*TimestampUpdateOne) SetSignature

func (tuo *TimestampUpdateOne) SetSignature(s *Signature) *TimestampUpdateOne

SetSignature sets the "signature" edge to the Signature entity.

func (*TimestampUpdateOne) SetSignatureID

func (tuo *TimestampUpdateOne) SetSignatureID(id uuid.UUID) *TimestampUpdateOne

SetSignatureID sets the "signature" edge to the Signature entity by ID.

func (*TimestampUpdateOne) SetTimestamp

func (tuo *TimestampUpdateOne) SetTimestamp(t time.Time) *TimestampUpdateOne

SetTimestamp sets the "timestamp" field.

func (*TimestampUpdateOne) SetType

func (tuo *TimestampUpdateOne) SetType(s string) *TimestampUpdateOne

SetType sets the "type" field.

func (*TimestampUpdateOne) Where

Where appends a list predicates to the TimestampUpdate builder.

type TimestampWhereInput

type TimestampWhereInput struct {
	Predicates []predicate.Timestamp  `json:"-"`
	Not        *TimestampWhereInput   `json:"not,omitempty"`
	Or         []*TimestampWhereInput `json:"or,omitempty"`
	And        []*TimestampWhereInput `json:"and,omitempty"`

	// "id" field predicates.
	ID      *uuid.UUID  `json:"id,omitempty"`
	IDNEQ   *uuid.UUID  `json:"idNEQ,omitempty"`
	IDIn    []uuid.UUID `json:"idIn,omitempty"`
	IDNotIn []uuid.UUID `json:"idNotIn,omitempty"`
	IDGT    *uuid.UUID  `json:"idGT,omitempty"`
	IDGTE   *uuid.UUID  `json:"idGTE,omitempty"`
	IDLT    *uuid.UUID  `json:"idLT,omitempty"`
	IDLTE   *uuid.UUID  `json:"idLTE,omitempty"`

	// "type" field predicates.
	Type             *string  `json:"type,omitempty"`
	TypeNEQ          *string  `json:"typeNEQ,omitempty"`
	TypeIn           []string `json:"typeIn,omitempty"`
	TypeNotIn        []string `json:"typeNotIn,omitempty"`
	TypeGT           *string  `json:"typeGT,omitempty"`
	TypeGTE          *string  `json:"typeGTE,omitempty"`
	TypeLT           *string  `json:"typeLT,omitempty"`
	TypeLTE          *string  `json:"typeLTE,omitempty"`
	TypeContains     *string  `json:"typeContains,omitempty"`
	TypeHasPrefix    *string  `json:"typeHasPrefix,omitempty"`
	TypeHasSuffix    *string  `json:"typeHasSuffix,omitempty"`
	TypeEqualFold    *string  `json:"typeEqualFold,omitempty"`
	TypeContainsFold *string  `json:"typeContainsFold,omitempty"`

	// "timestamp" field predicates.
	Timestamp      *time.Time  `json:"timestamp,omitempty"`
	TimestampNEQ   *time.Time  `json:"timestampNEQ,omitempty"`
	TimestampIn    []time.Time `json:"timestampIn,omitempty"`
	TimestampNotIn []time.Time `json:"timestampNotIn,omitempty"`
	TimestampGT    *time.Time  `json:"timestampGT,omitempty"`
	TimestampGTE   *time.Time  `json:"timestampGTE,omitempty"`
	TimestampLT    *time.Time  `json:"timestampLT,omitempty"`
	TimestampLTE   *time.Time  `json:"timestampLTE,omitempty"`

	// "signature" edge predicates.
	HasSignature     *bool                  `json:"hasSignature,omitempty"`
	HasSignatureWith []*SignatureWhereInput `json:"hasSignatureWith,omitempty"`
}

TimestampWhereInput represents a where input for filtering Timestamp queries.

func (*TimestampWhereInput) AddPredicates

func (i *TimestampWhereInput) AddPredicates(predicates ...predicate.Timestamp)

AddPredicates adds custom predicates to the where input to be used during the filtering phase.

func (*TimestampWhereInput) Filter

Filter applies the TimestampWhereInput filter on the TimestampQuery builder.

func (*TimestampWhereInput) P

P returns a predicate for filtering timestamps. An error is returned if the input is empty or invalid.

type Timestamps

type Timestamps []*Timestamp

Timestamps is a parsable slice of Timestamp.

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 {

	// Attestation is the client for interacting with the Attestation builders.
	Attestation *AttestationClient
	// AttestationCollection is the client for interacting with the AttestationCollection builders.
	AttestationCollection *AttestationCollectionClient
	// AttestationPolicy is the client for interacting with the AttestationPolicy builders.
	AttestationPolicy *AttestationPolicyClient
	// Dsse is the client for interacting with the Dsse builders.
	Dsse *DsseClient
	// PayloadDigest is the client for interacting with the PayloadDigest builders.
	PayloadDigest *PayloadDigestClient
	// Signature is the client for interacting with the Signature builders.
	Signature *SignatureClient
	// Statement is the client for interacting with the Statement builders.
	Statement *StatementClient
	// Subject is the client for interacting with the Subject builders.
	Subject *SubjectClient
	// SubjectDigest is the client for interacting with the SubjectDigest builders.
	SubjectDigest *SubjectDigestClient
	// Timestamp is the client for interacting with the Timestamp builders.
	Timestamp *TimestampClient
	// 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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL