ent

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2026 License: MIT Imports: 22 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.
	TypeCacheEntry         = "CacheEntry"
	TypeStorageDeletion    = "StorageDeletion"
	TypeStorageLocation    = "StorageLocation"
	TypeStorageReaderLease = "StorageReaderLease"
	TypeUpload             = "Upload"
)

Variables

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.

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 CacheEntries

type CacheEntries []*CacheEntry

CacheEntries is a parsable slice of CacheEntry.

type CacheEntry

type CacheEntry struct {

	// ID of the ent.
	ID string `json:"id,omitempty"`
	// Key holds the value of the "key" field.
	Key string `json:"key,omitempty"`
	// Version holds the value of the "version" field.
	Version string `json:"version,omitempty"`
	// Scope holds the value of the "scope" field.
	Scope string `json:"scope,omitempty"`
	// RepoId holds the value of the "repoId" field.
	RepoId string `json:"repoId,omitempty"`
	// UpdatedAt holds the value of the "updatedAt" field.
	UpdatedAt int64 `json:"updatedAt,omitempty"`
	// LocationId holds the value of the "locationId" field.
	LocationId string `json:"locationId,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the CacheEntryQuery when eager-loading is set.
	Edges CacheEntryEdges `json:"edges"`
	// contains filtered or unexported fields
}

CacheEntry is the model entity for the CacheEntry schema.

func (*CacheEntry) QueryLocation

func (_m *CacheEntry) QueryLocation() *StorageLocationQuery

QueryLocation queries the "location" edge of the CacheEntry entity.

func (*CacheEntry) String

func (_m *CacheEntry) String() string

String implements the fmt.Stringer.

func (*CacheEntry) Unwrap

func (_m *CacheEntry) Unwrap() *CacheEntry

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

func (_m *CacheEntry) Update() *CacheEntryUpdateOne

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

func (*CacheEntry) Value

func (_m *CacheEntry) Value(name string) (ent.Value, error)

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

type CacheEntryClient

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

CacheEntryClient is a client for the CacheEntry schema.

func NewCacheEntryClient

func NewCacheEntryClient(c config) *CacheEntryClient

NewCacheEntryClient returns a client for the CacheEntry from the given config.

func (*CacheEntryClient) Create

func (c *CacheEntryClient) Create() *CacheEntryCreate

Create returns a builder for creating a CacheEntry entity.

func (*CacheEntryClient) CreateBulk

func (c *CacheEntryClient) CreateBulk(builders ...*CacheEntryCreate) *CacheEntryCreateBulk

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

func (*CacheEntryClient) Delete

func (c *CacheEntryClient) Delete() *CacheEntryDelete

Delete returns a delete builder for CacheEntry.

func (*CacheEntryClient) DeleteOne

func (c *CacheEntryClient) DeleteOne(_m *CacheEntry) *CacheEntryDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*CacheEntryClient) DeleteOneID

func (c *CacheEntryClient) DeleteOneID(id string) *CacheEntryDeleteOne

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

func (*CacheEntryClient) Get

func (c *CacheEntryClient) Get(ctx context.Context, id string) (*CacheEntry, error)

Get returns a CacheEntry entity by its id.

func (*CacheEntryClient) GetX

func (c *CacheEntryClient) GetX(ctx context.Context, id string) *CacheEntry

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

func (*CacheEntryClient) Hooks

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

Hooks returns the client hooks.

func (*CacheEntryClient) Intercept

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

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

func (*CacheEntryClient) Interceptors

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

Interceptors returns the client interceptors.

func (*CacheEntryClient) MapCreateBulk

func (c *CacheEntryClient) MapCreateBulk(slice any, setFunc func(*CacheEntryCreate, int)) *CacheEntryCreateBulk

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

func (c *CacheEntryClient) Query() *CacheEntryQuery

Query returns a query builder for CacheEntry.

func (*CacheEntryClient) QueryLocation

func (c *CacheEntryClient) QueryLocation(_m *CacheEntry) *StorageLocationQuery

QueryLocation queries the location edge of a CacheEntry.

func (*CacheEntryClient) Update

func (c *CacheEntryClient) Update() *CacheEntryUpdate

Update returns an update builder for CacheEntry.

func (*CacheEntryClient) UpdateOne

func (c *CacheEntryClient) UpdateOne(_m *CacheEntry) *CacheEntryUpdateOne

UpdateOne returns an update builder for the given entity.

func (*CacheEntryClient) UpdateOneID

func (c *CacheEntryClient) UpdateOneID(id string) *CacheEntryUpdateOne

UpdateOneID returns an update builder for the given id.

func (*CacheEntryClient) Use

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

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

type CacheEntryCreate

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

CacheEntryCreate is the builder for creating a CacheEntry entity.

func (*CacheEntryCreate) Exec

func (_c *CacheEntryCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*CacheEntryCreate) ExecX

func (_c *CacheEntryCreate) ExecX(ctx context.Context)

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

func (*CacheEntryCreate) Mutation

func (_c *CacheEntryCreate) Mutation() *CacheEntryMutation

Mutation returns the CacheEntryMutation object of the builder.

func (*CacheEntryCreate) Save

func (_c *CacheEntryCreate) Save(ctx context.Context) (*CacheEntry, error)

Save creates the CacheEntry in the database.

func (*CacheEntryCreate) SaveX

func (_c *CacheEntryCreate) SaveX(ctx context.Context) *CacheEntry

SaveX calls Save and panics if Save returns an error.

func (*CacheEntryCreate) SetID

SetID sets the "id" field.

func (*CacheEntryCreate) SetKey

func (_c *CacheEntryCreate) SetKey(v string) *CacheEntryCreate

SetKey sets the "key" field.

func (*CacheEntryCreate) SetLocation

func (_c *CacheEntryCreate) SetLocation(v *StorageLocation) *CacheEntryCreate

SetLocation sets the "location" edge to the StorageLocation entity.

func (*CacheEntryCreate) SetLocationID

func (_c *CacheEntryCreate) SetLocationID(id string) *CacheEntryCreate

SetLocationID sets the "location" edge to the StorageLocation entity by ID.

func (*CacheEntryCreate) SetLocationId

func (_c *CacheEntryCreate) SetLocationId(v string) *CacheEntryCreate

SetLocationId sets the "locationId" field.

func (*CacheEntryCreate) SetRepoId

func (_c *CacheEntryCreate) SetRepoId(v string) *CacheEntryCreate

SetRepoId sets the "repoId" field.

func (*CacheEntryCreate) SetScope

func (_c *CacheEntryCreate) SetScope(v string) *CacheEntryCreate

SetScope sets the "scope" field.

func (*CacheEntryCreate) SetUpdatedAt

func (_c *CacheEntryCreate) SetUpdatedAt(v int64) *CacheEntryCreate

SetUpdatedAt sets the "updatedAt" field.

func (*CacheEntryCreate) SetVersion

func (_c *CacheEntryCreate) SetVersion(v string) *CacheEntryCreate

SetVersion sets the "version" field.

type CacheEntryCreateBulk

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

CacheEntryCreateBulk is the builder for creating many CacheEntry entities in bulk.

func (*CacheEntryCreateBulk) Exec

func (_c *CacheEntryCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*CacheEntryCreateBulk) ExecX

func (_c *CacheEntryCreateBulk) ExecX(ctx context.Context)

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

func (*CacheEntryCreateBulk) Save

func (_c *CacheEntryCreateBulk) Save(ctx context.Context) ([]*CacheEntry, error)

Save creates the CacheEntry entities in the database.

func (*CacheEntryCreateBulk) SaveX

func (_c *CacheEntryCreateBulk) SaveX(ctx context.Context) []*CacheEntry

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

type CacheEntryDelete

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

CacheEntryDelete is the builder for deleting a CacheEntry entity.

func (*CacheEntryDelete) Exec

func (_d *CacheEntryDelete) Exec(ctx context.Context) (int, error)

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

func (*CacheEntryDelete) ExecX

func (_d *CacheEntryDelete) ExecX(ctx context.Context) int

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

func (*CacheEntryDelete) Where

Where appends a list predicates to the CacheEntryDelete builder.

type CacheEntryDeleteOne

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

CacheEntryDeleteOne is the builder for deleting a single CacheEntry entity.

func (*CacheEntryDeleteOne) Exec

func (_d *CacheEntryDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*CacheEntryDeleteOne) ExecX

func (_d *CacheEntryDeleteOne) ExecX(ctx context.Context)

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

func (*CacheEntryDeleteOne) Where

Where appends a list predicates to the CacheEntryDelete builder.

type CacheEntryEdges

type CacheEntryEdges struct {
	// Location holds the value of the location edge.
	Location *StorageLocation `json:"location,omitempty"`
	// contains filtered or unexported fields
}

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

func (CacheEntryEdges) LocationOrErr

func (e CacheEntryEdges) LocationOrErr() (*StorageLocation, error)

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

type CacheEntryGroupBy

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

CacheEntryGroupBy is the group-by builder for CacheEntry entities.

func (*CacheEntryGroupBy) Aggregate

func (_g *CacheEntryGroupBy) Aggregate(fns ...AggregateFunc) *CacheEntryGroupBy

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

func (*CacheEntryGroupBy) Bool

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

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

func (*CacheEntryGroupBy) BoolX

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

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

func (*CacheEntryGroupBy) Bools

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

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

func (*CacheEntryGroupBy) BoolsX

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

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

func (*CacheEntryGroupBy) Float64

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

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

func (*CacheEntryGroupBy) Float64X

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

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

func (*CacheEntryGroupBy) Float64s

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

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

func (*CacheEntryGroupBy) Float64sX

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

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

func (*CacheEntryGroupBy) Int

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

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

func (*CacheEntryGroupBy) IntX

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

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

func (*CacheEntryGroupBy) Ints

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

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

func (*CacheEntryGroupBy) IntsX

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

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

func (*CacheEntryGroupBy) Scan

func (_g *CacheEntryGroupBy) Scan(ctx context.Context, v any) error

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

func (*CacheEntryGroupBy) ScanX

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

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

func (*CacheEntryGroupBy) String

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

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

func (*CacheEntryGroupBy) StringX

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

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

func (*CacheEntryGroupBy) Strings

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

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

func (*CacheEntryGroupBy) StringsX

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

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

type CacheEntryMutation

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

CacheEntryMutation represents an operation that mutates the CacheEntry nodes in the graph.

func (*CacheEntryMutation) AddField

func (m *CacheEntryMutation) 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 (*CacheEntryMutation) AddUpdatedAt

func (m *CacheEntryMutation) AddUpdatedAt(i int64)

AddUpdatedAt adds i to the "updatedAt" field.

func (*CacheEntryMutation) AddedEdges

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

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

func (*CacheEntryMutation) AddedField

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

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

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

func (*CacheEntryMutation) AddedIDs

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

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

func (*CacheEntryMutation) AddedUpdatedAt

func (m *CacheEntryMutation) AddedUpdatedAt() (r int64, exists bool)

AddedUpdatedAt returns the value that was added to the "updatedAt" field in this mutation.

func (*CacheEntryMutation) ClearEdge

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

func (m *CacheEntryMutation) 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 (*CacheEntryMutation) ClearLocation

func (m *CacheEntryMutation) ClearLocation()

ClearLocation clears the "location" edge to the StorageLocation entity.

func (*CacheEntryMutation) ClearedEdges

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

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

func (*CacheEntryMutation) ClearedFields

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

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

func (CacheEntryMutation) Client

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

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

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

func (*CacheEntryMutation) Field

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

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

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

func (*CacheEntryMutation) Fields

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

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

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

func (m *CacheEntryMutation) Key() (r string, exists bool)

Key returns the value of the "key" field in the mutation.

func (*CacheEntryMutation) LocationCleared

func (m *CacheEntryMutation) LocationCleared() bool

LocationCleared reports if the "location" edge to the StorageLocation entity was cleared.

func (*CacheEntryMutation) LocationID

func (m *CacheEntryMutation) LocationID() (id string, exists bool)

LocationID returns the "location" edge ID in the mutation.

func (*CacheEntryMutation) LocationIDs

func (m *CacheEntryMutation) LocationIDs() (ids []string)

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

func (*CacheEntryMutation) LocationId

func (m *CacheEntryMutation) LocationId() (r string, exists bool)

LocationId returns the value of the "locationId" field in the mutation.

func (*CacheEntryMutation) OldField

func (m *CacheEntryMutation) 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 (*CacheEntryMutation) OldKey

func (m *CacheEntryMutation) OldKey(ctx context.Context) (v string, err error)

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

func (*CacheEntryMutation) OldLocationId

func (m *CacheEntryMutation) OldLocationId(ctx context.Context) (v string, err error)

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

func (*CacheEntryMutation) OldRepoId

func (m *CacheEntryMutation) OldRepoId(ctx context.Context) (v string, err error)

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

func (*CacheEntryMutation) OldScope

func (m *CacheEntryMutation) OldScope(ctx context.Context) (v string, err error)

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

func (*CacheEntryMutation) OldUpdatedAt

func (m *CacheEntryMutation) OldUpdatedAt(ctx context.Context) (v int64, err error)

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

func (*CacheEntryMutation) OldVersion

func (m *CacheEntryMutation) OldVersion(ctx context.Context) (v string, err error)

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

func (*CacheEntryMutation) Op

func (m *CacheEntryMutation) Op() Op

Op returns the operation name.

func (*CacheEntryMutation) RemovedEdges

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

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

func (*CacheEntryMutation) RemovedIDs

func (m *CacheEntryMutation) 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 (*CacheEntryMutation) RepoId

func (m *CacheEntryMutation) RepoId() (r string, exists bool)

RepoId returns the value of the "repoId" field in the mutation.

func (*CacheEntryMutation) ResetEdge

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

func (m *CacheEntryMutation) 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 (*CacheEntryMutation) ResetKey

func (m *CacheEntryMutation) ResetKey()

ResetKey resets all changes to the "key" field.

func (*CacheEntryMutation) ResetLocation

func (m *CacheEntryMutation) ResetLocation()

ResetLocation resets all changes to the "location" edge.

func (*CacheEntryMutation) ResetLocationId

func (m *CacheEntryMutation) ResetLocationId()

ResetLocationId resets all changes to the "locationId" field.

func (*CacheEntryMutation) ResetRepoId

func (m *CacheEntryMutation) ResetRepoId()

ResetRepoId resets all changes to the "repoId" field.

func (*CacheEntryMutation) ResetScope

func (m *CacheEntryMutation) ResetScope()

ResetScope resets all changes to the "scope" field.

func (*CacheEntryMutation) ResetUpdatedAt

func (m *CacheEntryMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updatedAt" field.

func (*CacheEntryMutation) ResetVersion

func (m *CacheEntryMutation) ResetVersion()

ResetVersion resets all changes to the "version" field.

func (*CacheEntryMutation) Scope

func (m *CacheEntryMutation) Scope() (r string, exists bool)

Scope returns the value of the "scope" field in the mutation.

func (*CacheEntryMutation) SetField

func (m *CacheEntryMutation) 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 (*CacheEntryMutation) SetID

func (m *CacheEntryMutation) SetID(id string)

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

func (*CacheEntryMutation) SetKey

func (m *CacheEntryMutation) SetKey(s string)

SetKey sets the "key" field.

func (*CacheEntryMutation) SetLocationID

func (m *CacheEntryMutation) SetLocationID(id string)

SetLocationID sets the "location" edge to the StorageLocation entity by id.

func (*CacheEntryMutation) SetLocationId

func (m *CacheEntryMutation) SetLocationId(s string)

SetLocationId sets the "locationId" field.

func (*CacheEntryMutation) SetOp

func (m *CacheEntryMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*CacheEntryMutation) SetRepoId

func (m *CacheEntryMutation) SetRepoId(s string)

SetRepoId sets the "repoId" field.

func (*CacheEntryMutation) SetScope

func (m *CacheEntryMutation) SetScope(s string)

SetScope sets the "scope" field.

func (*CacheEntryMutation) SetUpdatedAt

func (m *CacheEntryMutation) SetUpdatedAt(i int64)

SetUpdatedAt sets the "updatedAt" field.

func (*CacheEntryMutation) SetVersion

func (m *CacheEntryMutation) SetVersion(s string)

SetVersion sets the "version" field.

func (CacheEntryMutation) Tx

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

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

func (*CacheEntryMutation) Type

func (m *CacheEntryMutation) Type() string

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

func (*CacheEntryMutation) UpdatedAt

func (m *CacheEntryMutation) UpdatedAt() (r int64, exists bool)

UpdatedAt returns the value of the "updatedAt" field in the mutation.

func (*CacheEntryMutation) Version

func (m *CacheEntryMutation) Version() (r string, exists bool)

Version returns the value of the "version" field in the mutation.

func (*CacheEntryMutation) Where

func (m *CacheEntryMutation) Where(ps ...predicate.CacheEntry)

Where appends a list predicates to the CacheEntryMutation builder.

func (*CacheEntryMutation) WhereP

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

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

type CacheEntryQuery

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

CacheEntryQuery is the builder for querying CacheEntry entities.

func (*CacheEntryQuery) Aggregate

func (_q *CacheEntryQuery) Aggregate(fns ...AggregateFunc) *CacheEntrySelect

Aggregate returns a CacheEntrySelect configured with the given aggregations.

func (*CacheEntryQuery) All

func (_q *CacheEntryQuery) All(ctx context.Context) ([]*CacheEntry, error)

All executes the query and returns a list of CacheEntries.

func (*CacheEntryQuery) AllX

func (_q *CacheEntryQuery) AllX(ctx context.Context) []*CacheEntry

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

func (*CacheEntryQuery) Clone

func (_q *CacheEntryQuery) Clone() *CacheEntryQuery

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

func (*CacheEntryQuery) Count

func (_q *CacheEntryQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*CacheEntryQuery) CountX

func (_q *CacheEntryQuery) CountX(ctx context.Context) int

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

func (*CacheEntryQuery) Exist

func (_q *CacheEntryQuery) Exist(ctx context.Context) (bool, error)

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

func (*CacheEntryQuery) ExistX

func (_q *CacheEntryQuery) ExistX(ctx context.Context) bool

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

func (*CacheEntryQuery) First

func (_q *CacheEntryQuery) First(ctx context.Context) (*CacheEntry, error)

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

func (*CacheEntryQuery) FirstID

func (_q *CacheEntryQuery) FirstID(ctx context.Context) (id string, err error)

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

func (*CacheEntryQuery) FirstIDX

func (_q *CacheEntryQuery) FirstIDX(ctx context.Context) string

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

func (*CacheEntryQuery) FirstX

func (_q *CacheEntryQuery) FirstX(ctx context.Context) *CacheEntry

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

func (*CacheEntryQuery) GroupBy

func (_q *CacheEntryQuery) GroupBy(field string, fields ...string) *CacheEntryGroupBy

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

client.CacheEntry.Query().
	GroupBy(cacheentry.FieldKey).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*CacheEntryQuery) IDs

func (_q *CacheEntryQuery) IDs(ctx context.Context) (ids []string, err error)

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

func (*CacheEntryQuery) IDsX

func (_q *CacheEntryQuery) IDsX(ctx context.Context) []string

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

func (*CacheEntryQuery) Limit

func (_q *CacheEntryQuery) Limit(limit int) *CacheEntryQuery

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

func (*CacheEntryQuery) Offset

func (_q *CacheEntryQuery) Offset(offset int) *CacheEntryQuery

Offset to start from.

func (*CacheEntryQuery) Only

func (_q *CacheEntryQuery) Only(ctx context.Context) (*CacheEntry, error)

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

func (*CacheEntryQuery) OnlyID

func (_q *CacheEntryQuery) OnlyID(ctx context.Context) (id string, err error)

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

func (*CacheEntryQuery) OnlyIDX

func (_q *CacheEntryQuery) OnlyIDX(ctx context.Context) string

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

func (*CacheEntryQuery) OnlyX

func (_q *CacheEntryQuery) OnlyX(ctx context.Context) *CacheEntry

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

func (*CacheEntryQuery) Order

Order specifies how the records should be ordered.

func (*CacheEntryQuery) QueryLocation

func (_q *CacheEntryQuery) QueryLocation() *StorageLocationQuery

QueryLocation chains the current query on the "location" edge.

func (*CacheEntryQuery) Select

func (_q *CacheEntryQuery) Select(fields ...string) *CacheEntrySelect

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 {
	Key string `json:"key,omitempty"`
}

client.CacheEntry.Query().
	Select(cacheentry.FieldKey).
	Scan(ctx, &v)

func (*CacheEntryQuery) Unique

func (_q *CacheEntryQuery) Unique(unique bool) *CacheEntryQuery

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

Where adds a new predicate for the CacheEntryQuery builder.

func (*CacheEntryQuery) WithLocation

func (_q *CacheEntryQuery) WithLocation(opts ...func(*StorageLocationQuery)) *CacheEntryQuery

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

type CacheEntrySelect

type CacheEntrySelect struct {
	*CacheEntryQuery
	// contains filtered or unexported fields
}

CacheEntrySelect is the builder for selecting fields of CacheEntry entities.

func (*CacheEntrySelect) Aggregate

func (_s *CacheEntrySelect) Aggregate(fns ...AggregateFunc) *CacheEntrySelect

Aggregate adds the given aggregation functions to the selector query.

func (*CacheEntrySelect) Bool

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

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

func (*CacheEntrySelect) BoolX

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

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

func (*CacheEntrySelect) Bools

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

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

func (*CacheEntrySelect) BoolsX

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

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

func (*CacheEntrySelect) Float64

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

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

func (*CacheEntrySelect) Float64X

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

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

func (*CacheEntrySelect) Float64s

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

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

func (*CacheEntrySelect) Float64sX

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

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

func (*CacheEntrySelect) Int

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

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

func (*CacheEntrySelect) IntX

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

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

func (*CacheEntrySelect) Ints

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

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

func (*CacheEntrySelect) IntsX

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

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

func (*CacheEntrySelect) Scan

func (_s *CacheEntrySelect) Scan(ctx context.Context, v any) error

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

func (*CacheEntrySelect) ScanX

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

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

func (*CacheEntrySelect) String

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

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

func (*CacheEntrySelect) StringX

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

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

func (*CacheEntrySelect) Strings

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

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

func (*CacheEntrySelect) StringsX

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

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

type CacheEntryUpdate

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

CacheEntryUpdate is the builder for updating CacheEntry entities.

func (*CacheEntryUpdate) AddUpdatedAt

func (_u *CacheEntryUpdate) AddUpdatedAt(v int64) *CacheEntryUpdate

AddUpdatedAt adds value to the "updatedAt" field.

func (*CacheEntryUpdate) ClearLocation

func (_u *CacheEntryUpdate) ClearLocation() *CacheEntryUpdate

ClearLocation clears the "location" edge to the StorageLocation entity.

func (*CacheEntryUpdate) Exec

func (_u *CacheEntryUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*CacheEntryUpdate) ExecX

func (_u *CacheEntryUpdate) ExecX(ctx context.Context)

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

func (*CacheEntryUpdate) Mutation

func (_u *CacheEntryUpdate) Mutation() *CacheEntryMutation

Mutation returns the CacheEntryMutation object of the builder.

func (*CacheEntryUpdate) Save

func (_u *CacheEntryUpdate) Save(ctx context.Context) (int, error)

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

func (*CacheEntryUpdate) SaveX

func (_u *CacheEntryUpdate) SaveX(ctx context.Context) int

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

func (*CacheEntryUpdate) SetKey

func (_u *CacheEntryUpdate) SetKey(v string) *CacheEntryUpdate

SetKey sets the "key" field.

func (*CacheEntryUpdate) SetLocation

func (_u *CacheEntryUpdate) SetLocation(v *StorageLocation) *CacheEntryUpdate

SetLocation sets the "location" edge to the StorageLocation entity.

func (*CacheEntryUpdate) SetLocationID

func (_u *CacheEntryUpdate) SetLocationID(id string) *CacheEntryUpdate

SetLocationID sets the "location" edge to the StorageLocation entity by ID.

func (*CacheEntryUpdate) SetLocationId

func (_u *CacheEntryUpdate) SetLocationId(v string) *CacheEntryUpdate

SetLocationId sets the "locationId" field.

func (*CacheEntryUpdate) SetNillableKey

func (_u *CacheEntryUpdate) SetNillableKey(v *string) *CacheEntryUpdate

SetNillableKey sets the "key" field if the given value is not nil.

func (*CacheEntryUpdate) SetNillableLocationId

func (_u *CacheEntryUpdate) SetNillableLocationId(v *string) *CacheEntryUpdate

SetNillableLocationId sets the "locationId" field if the given value is not nil.

func (*CacheEntryUpdate) SetNillableRepoId

func (_u *CacheEntryUpdate) SetNillableRepoId(v *string) *CacheEntryUpdate

SetNillableRepoId sets the "repoId" field if the given value is not nil.

func (*CacheEntryUpdate) SetNillableScope

func (_u *CacheEntryUpdate) SetNillableScope(v *string) *CacheEntryUpdate

SetNillableScope sets the "scope" field if the given value is not nil.

func (*CacheEntryUpdate) SetNillableUpdatedAt

func (_u *CacheEntryUpdate) SetNillableUpdatedAt(v *int64) *CacheEntryUpdate

SetNillableUpdatedAt sets the "updatedAt" field if the given value is not nil.

func (*CacheEntryUpdate) SetNillableVersion

func (_u *CacheEntryUpdate) SetNillableVersion(v *string) *CacheEntryUpdate

SetNillableVersion sets the "version" field if the given value is not nil.

func (*CacheEntryUpdate) SetRepoId

func (_u *CacheEntryUpdate) SetRepoId(v string) *CacheEntryUpdate

SetRepoId sets the "repoId" field.

func (*CacheEntryUpdate) SetScope

func (_u *CacheEntryUpdate) SetScope(v string) *CacheEntryUpdate

SetScope sets the "scope" field.

func (*CacheEntryUpdate) SetUpdatedAt

func (_u *CacheEntryUpdate) SetUpdatedAt(v int64) *CacheEntryUpdate

SetUpdatedAt sets the "updatedAt" field.

func (*CacheEntryUpdate) SetVersion

func (_u *CacheEntryUpdate) SetVersion(v string) *CacheEntryUpdate

SetVersion sets the "version" field.

func (*CacheEntryUpdate) Where

Where appends a list predicates to the CacheEntryUpdate builder.

type CacheEntryUpdateOne

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

CacheEntryUpdateOne is the builder for updating a single CacheEntry entity.

func (*CacheEntryUpdateOne) AddUpdatedAt

func (_u *CacheEntryUpdateOne) AddUpdatedAt(v int64) *CacheEntryUpdateOne

AddUpdatedAt adds value to the "updatedAt" field.

func (*CacheEntryUpdateOne) ClearLocation

func (_u *CacheEntryUpdateOne) ClearLocation() *CacheEntryUpdateOne

ClearLocation clears the "location" edge to the StorageLocation entity.

func (*CacheEntryUpdateOne) Exec

func (_u *CacheEntryUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*CacheEntryUpdateOne) ExecX

func (_u *CacheEntryUpdateOne) ExecX(ctx context.Context)

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

func (*CacheEntryUpdateOne) Mutation

func (_u *CacheEntryUpdateOne) Mutation() *CacheEntryMutation

Mutation returns the CacheEntryMutation object of the builder.

func (*CacheEntryUpdateOne) Save

Save executes the query and returns the updated CacheEntry entity.

func (*CacheEntryUpdateOne) SaveX

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

func (*CacheEntryUpdateOne) Select

func (_u *CacheEntryUpdateOne) Select(field string, fields ...string) *CacheEntryUpdateOne

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

func (*CacheEntryUpdateOne) SetKey

SetKey sets the "key" field.

func (*CacheEntryUpdateOne) SetLocation

SetLocation sets the "location" edge to the StorageLocation entity.

func (*CacheEntryUpdateOne) SetLocationID

func (_u *CacheEntryUpdateOne) SetLocationID(id string) *CacheEntryUpdateOne

SetLocationID sets the "location" edge to the StorageLocation entity by ID.

func (*CacheEntryUpdateOne) SetLocationId

func (_u *CacheEntryUpdateOne) SetLocationId(v string) *CacheEntryUpdateOne

SetLocationId sets the "locationId" field.

func (*CacheEntryUpdateOne) SetNillableKey

func (_u *CacheEntryUpdateOne) SetNillableKey(v *string) *CacheEntryUpdateOne

SetNillableKey sets the "key" field if the given value is not nil.

func (*CacheEntryUpdateOne) SetNillableLocationId

func (_u *CacheEntryUpdateOne) SetNillableLocationId(v *string) *CacheEntryUpdateOne

SetNillableLocationId sets the "locationId" field if the given value is not nil.

func (*CacheEntryUpdateOne) SetNillableRepoId

func (_u *CacheEntryUpdateOne) SetNillableRepoId(v *string) *CacheEntryUpdateOne

SetNillableRepoId sets the "repoId" field if the given value is not nil.

func (*CacheEntryUpdateOne) SetNillableScope

func (_u *CacheEntryUpdateOne) SetNillableScope(v *string) *CacheEntryUpdateOne

SetNillableScope sets the "scope" field if the given value is not nil.

func (*CacheEntryUpdateOne) SetNillableUpdatedAt

func (_u *CacheEntryUpdateOne) SetNillableUpdatedAt(v *int64) *CacheEntryUpdateOne

SetNillableUpdatedAt sets the "updatedAt" field if the given value is not nil.

func (*CacheEntryUpdateOne) SetNillableVersion

func (_u *CacheEntryUpdateOne) SetNillableVersion(v *string) *CacheEntryUpdateOne

SetNillableVersion sets the "version" field if the given value is not nil.

func (*CacheEntryUpdateOne) SetRepoId

SetRepoId sets the "repoId" field.

func (*CacheEntryUpdateOne) SetScope

SetScope sets the "scope" field.

func (*CacheEntryUpdateOne) SetUpdatedAt

func (_u *CacheEntryUpdateOne) SetUpdatedAt(v int64) *CacheEntryUpdateOne

SetUpdatedAt sets the "updatedAt" field.

func (*CacheEntryUpdateOne) SetVersion

func (_u *CacheEntryUpdateOne) SetVersion(v string) *CacheEntryUpdateOne

SetVersion sets the "version" field.

func (*CacheEntryUpdateOne) Where

Where appends a list predicates to the CacheEntryUpdate builder.

type Client

type Client struct {

	// Schema is the client for creating, migrating and dropping schema.
	Schema *migrate.Schema
	// CacheEntry is the client for interacting with the CacheEntry builders.
	CacheEntry *CacheEntryClient
	// StorageDeletion is the client for interacting with the StorageDeletion builders.
	StorageDeletion *StorageDeletionClient
	// StorageLocation is the client for interacting with the StorageLocation builders.
	StorageLocation *StorageLocationClient
	// StorageReaderLease is the client for interacting with the StorageReaderLease builders.
	StorageReaderLease *StorageReaderLeaseClient
	// Upload is the client for interacting with the Upload builders.
	Upload *UploadClient
	// 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().
	CacheEntry.
	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) 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 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 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 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 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 StorageDeletion

type StorageDeletion struct {

	// ID of the ent.
	ID int64 `json:"id,omitempty"`
	// FolderName holds the value of the "folderName" field.
	FolderName string `json:"folderName,omitempty"`
	// CreatedAt holds the value of the "createdAt" field.
	CreatedAt int64 `json:"createdAt,omitempty"`
	// AttemptCount holds the value of the "attemptCount" field.
	AttemptCount int `json:"attemptCount,omitempty"`
	// LastAttemptedAt holds the value of the "lastAttemptedAt" field.
	LastAttemptedAt *int64 `json:"lastAttemptedAt,omitempty"`
	// LastError holds the value of the "lastError" field.
	LastError *string `json:"lastError,omitempty"`
	// contains filtered or unexported fields
}

StorageDeletion is the model entity for the StorageDeletion schema.

func (*StorageDeletion) String

func (_m *StorageDeletion) String() string

String implements the fmt.Stringer.

func (*StorageDeletion) Unwrap

func (_m *StorageDeletion) Unwrap() *StorageDeletion

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

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

func (*StorageDeletion) Value

func (_m *StorageDeletion) Value(name string) (ent.Value, error)

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

type StorageDeletionClient

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

StorageDeletionClient is a client for the StorageDeletion schema.

func NewStorageDeletionClient

func NewStorageDeletionClient(c config) *StorageDeletionClient

NewStorageDeletionClient returns a client for the StorageDeletion from the given config.

func (*StorageDeletionClient) Create

Create returns a builder for creating a StorageDeletion entity.

func (*StorageDeletionClient) CreateBulk

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

func (*StorageDeletionClient) Delete

Delete returns a delete builder for StorageDeletion.

func (*StorageDeletionClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*StorageDeletionClient) DeleteOneID

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

func (*StorageDeletionClient) Get

Get returns a StorageDeletion entity by its id.

func (*StorageDeletionClient) GetX

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

func (*StorageDeletionClient) Hooks

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

Hooks returns the client hooks.

func (*StorageDeletionClient) Intercept

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

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

func (*StorageDeletionClient) Interceptors

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

Interceptors returns the client interceptors.

func (*StorageDeletionClient) MapCreateBulk

func (c *StorageDeletionClient) MapCreateBulk(slice any, setFunc func(*StorageDeletionCreate, int)) *StorageDeletionCreateBulk

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

Query returns a query builder for StorageDeletion.

func (*StorageDeletionClient) Update

Update returns an update builder for StorageDeletion.

func (*StorageDeletionClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*StorageDeletionClient) UpdateOneID

UpdateOneID returns an update builder for the given id.

func (*StorageDeletionClient) Use

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

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

type StorageDeletionCreate

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

StorageDeletionCreate is the builder for creating a StorageDeletion entity.

func (*StorageDeletionCreate) Exec

Exec executes the query.

func (*StorageDeletionCreate) ExecX

func (_c *StorageDeletionCreate) ExecX(ctx context.Context)

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

func (*StorageDeletionCreate) Mutation

Mutation returns the StorageDeletionMutation object of the builder.

func (*StorageDeletionCreate) Save

Save creates the StorageDeletion in the database.

func (*StorageDeletionCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*StorageDeletionCreate) SetAttemptCount

func (_c *StorageDeletionCreate) SetAttemptCount(v int) *StorageDeletionCreate

SetAttemptCount sets the "attemptCount" field.

func (*StorageDeletionCreate) SetCreatedAt

func (_c *StorageDeletionCreate) SetCreatedAt(v int64) *StorageDeletionCreate

SetCreatedAt sets the "createdAt" field.

func (*StorageDeletionCreate) SetFolderName

func (_c *StorageDeletionCreate) SetFolderName(v string) *StorageDeletionCreate

SetFolderName sets the "folderName" field.

func (*StorageDeletionCreate) SetID

SetID sets the "id" field.

func (*StorageDeletionCreate) SetLastAttemptedAt

func (_c *StorageDeletionCreate) SetLastAttemptedAt(v int64) *StorageDeletionCreate

SetLastAttemptedAt sets the "lastAttemptedAt" field.

func (*StorageDeletionCreate) SetLastError

func (_c *StorageDeletionCreate) SetLastError(v string) *StorageDeletionCreate

SetLastError sets the "lastError" field.

func (*StorageDeletionCreate) SetNillableAttemptCount

func (_c *StorageDeletionCreate) SetNillableAttemptCount(v *int) *StorageDeletionCreate

SetNillableAttemptCount sets the "attemptCount" field if the given value is not nil.

func (*StorageDeletionCreate) SetNillableLastAttemptedAt

func (_c *StorageDeletionCreate) SetNillableLastAttemptedAt(v *int64) *StorageDeletionCreate

SetNillableLastAttemptedAt sets the "lastAttemptedAt" field if the given value is not nil.

func (*StorageDeletionCreate) SetNillableLastError

func (_c *StorageDeletionCreate) SetNillableLastError(v *string) *StorageDeletionCreate

SetNillableLastError sets the "lastError" field if the given value is not nil.

type StorageDeletionCreateBulk

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

StorageDeletionCreateBulk is the builder for creating many StorageDeletion entities in bulk.

func (*StorageDeletionCreateBulk) Exec

Exec executes the query.

func (*StorageDeletionCreateBulk) ExecX

func (_c *StorageDeletionCreateBulk) ExecX(ctx context.Context)

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

func (*StorageDeletionCreateBulk) Save

Save creates the StorageDeletion entities in the database.

func (*StorageDeletionCreateBulk) SaveX

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

type StorageDeletionDelete

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

StorageDeletionDelete is the builder for deleting a StorageDeletion entity.

func (*StorageDeletionDelete) Exec

func (_d *StorageDeletionDelete) Exec(ctx context.Context) (int, error)

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

func (*StorageDeletionDelete) ExecX

func (_d *StorageDeletionDelete) ExecX(ctx context.Context) int

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

func (*StorageDeletionDelete) Where

Where appends a list predicates to the StorageDeletionDelete builder.

type StorageDeletionDeleteOne

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

StorageDeletionDeleteOne is the builder for deleting a single StorageDeletion entity.

func (*StorageDeletionDeleteOne) Exec

Exec executes the deletion query.

func (*StorageDeletionDeleteOne) ExecX

func (_d *StorageDeletionDeleteOne) ExecX(ctx context.Context)

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

func (*StorageDeletionDeleteOne) Where

Where appends a list predicates to the StorageDeletionDelete builder.

type StorageDeletionGroupBy

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

StorageDeletionGroupBy is the group-by builder for StorageDeletion entities.

func (*StorageDeletionGroupBy) Aggregate

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

func (*StorageDeletionGroupBy) Bool

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

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

func (*StorageDeletionGroupBy) BoolX

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

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

func (*StorageDeletionGroupBy) Bools

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

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

func (*StorageDeletionGroupBy) BoolsX

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

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

func (*StorageDeletionGroupBy) Float64

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

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

func (*StorageDeletionGroupBy) Float64X

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

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

func (*StorageDeletionGroupBy) Float64s

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

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

func (*StorageDeletionGroupBy) Float64sX

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

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

func (*StorageDeletionGroupBy) Int

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

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

func (*StorageDeletionGroupBy) IntX

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

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

func (*StorageDeletionGroupBy) Ints

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

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

func (*StorageDeletionGroupBy) IntsX

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

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

func (*StorageDeletionGroupBy) Scan

func (_g *StorageDeletionGroupBy) Scan(ctx context.Context, v any) error

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

func (*StorageDeletionGroupBy) ScanX

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

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

func (*StorageDeletionGroupBy) String

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

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

func (*StorageDeletionGroupBy) StringX

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

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

func (*StorageDeletionGroupBy) Strings

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

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

func (*StorageDeletionGroupBy) StringsX

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

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

type StorageDeletionMutation

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

StorageDeletionMutation represents an operation that mutates the StorageDeletion nodes in the graph.

func (*StorageDeletionMutation) AddAttemptCount

func (m *StorageDeletionMutation) AddAttemptCount(i int)

AddAttemptCount adds i to the "attemptCount" field.

func (*StorageDeletionMutation) AddCreatedAt

func (m *StorageDeletionMutation) AddCreatedAt(i int64)

AddCreatedAt adds i to the "createdAt" field.

func (*StorageDeletionMutation) AddField

func (m *StorageDeletionMutation) 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 (*StorageDeletionMutation) AddLastAttemptedAt

func (m *StorageDeletionMutation) AddLastAttemptedAt(i int64)

AddLastAttemptedAt adds i to the "lastAttemptedAt" field.

func (*StorageDeletionMutation) AddedAttemptCount

func (m *StorageDeletionMutation) AddedAttemptCount() (r int, exists bool)

AddedAttemptCount returns the value that was added to the "attemptCount" field in this mutation.

func (*StorageDeletionMutation) AddedCreatedAt

func (m *StorageDeletionMutation) AddedCreatedAt() (r int64, exists bool)

AddedCreatedAt returns the value that was added to the "createdAt" field in this mutation.

func (*StorageDeletionMutation) AddedEdges

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

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

func (*StorageDeletionMutation) AddedField

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

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

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

func (*StorageDeletionMutation) AddedIDs

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

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

func (*StorageDeletionMutation) AddedLastAttemptedAt

func (m *StorageDeletionMutation) AddedLastAttemptedAt() (r int64, exists bool)

AddedLastAttemptedAt returns the value that was added to the "lastAttemptedAt" field in this mutation.

func (*StorageDeletionMutation) AttemptCount

func (m *StorageDeletionMutation) AttemptCount() (r int, exists bool)

AttemptCount returns the value of the "attemptCount" field in the mutation.

func (*StorageDeletionMutation) ClearEdge

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

func (m *StorageDeletionMutation) 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 (*StorageDeletionMutation) ClearLastAttemptedAt

func (m *StorageDeletionMutation) ClearLastAttemptedAt()

ClearLastAttemptedAt clears the value of the "lastAttemptedAt" field.

func (*StorageDeletionMutation) ClearLastError

func (m *StorageDeletionMutation) ClearLastError()

ClearLastError clears the value of the "lastError" field.

func (*StorageDeletionMutation) ClearedEdges

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

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

func (*StorageDeletionMutation) ClearedFields

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

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

func (StorageDeletionMutation) Client

func (m StorageDeletionMutation) 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 (*StorageDeletionMutation) CreatedAt

func (m *StorageDeletionMutation) CreatedAt() (r int64, exists bool)

CreatedAt returns the value of the "createdAt" field in the mutation.

func (*StorageDeletionMutation) EdgeCleared

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

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

func (*StorageDeletionMutation) Field

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

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

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

func (*StorageDeletionMutation) Fields

func (m *StorageDeletionMutation) 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 (*StorageDeletionMutation) FolderName

func (m *StorageDeletionMutation) FolderName() (r string, exists bool)

FolderName returns the value of the "folderName" field in the mutation.

func (*StorageDeletionMutation) ID

func (m *StorageDeletionMutation) ID() (id int64, 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 (*StorageDeletionMutation) 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 (*StorageDeletionMutation) LastAttemptedAt

func (m *StorageDeletionMutation) LastAttemptedAt() (r int64, exists bool)

LastAttemptedAt returns the value of the "lastAttemptedAt" field in the mutation.

func (*StorageDeletionMutation) LastAttemptedAtCleared

func (m *StorageDeletionMutation) LastAttemptedAtCleared() bool

LastAttemptedAtCleared returns if the "lastAttemptedAt" field was cleared in this mutation.

func (*StorageDeletionMutation) LastError

func (m *StorageDeletionMutation) LastError() (r string, exists bool)

LastError returns the value of the "lastError" field in the mutation.

func (*StorageDeletionMutation) LastErrorCleared

func (m *StorageDeletionMutation) LastErrorCleared() bool

LastErrorCleared returns if the "lastError" field was cleared in this mutation.

func (*StorageDeletionMutation) OldAttemptCount

func (m *StorageDeletionMutation) OldAttemptCount(ctx context.Context) (v int, err error)

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

func (*StorageDeletionMutation) OldCreatedAt

func (m *StorageDeletionMutation) OldCreatedAt(ctx context.Context) (v int64, err error)

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

func (*StorageDeletionMutation) OldField

func (m *StorageDeletionMutation) 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 (*StorageDeletionMutation) OldFolderName

func (m *StorageDeletionMutation) OldFolderName(ctx context.Context) (v string, err error)

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

func (*StorageDeletionMutation) OldLastAttemptedAt

func (m *StorageDeletionMutation) OldLastAttemptedAt(ctx context.Context) (v *int64, err error)

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

func (*StorageDeletionMutation) OldLastError

func (m *StorageDeletionMutation) OldLastError(ctx context.Context) (v *string, err error)

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

func (*StorageDeletionMutation) Op

func (m *StorageDeletionMutation) Op() Op

Op returns the operation name.

func (*StorageDeletionMutation) RemovedEdges

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

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

func (*StorageDeletionMutation) RemovedIDs

func (m *StorageDeletionMutation) 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 (*StorageDeletionMutation) ResetAttemptCount

func (m *StorageDeletionMutation) ResetAttemptCount()

ResetAttemptCount resets all changes to the "attemptCount" field.

func (*StorageDeletionMutation) ResetCreatedAt

func (m *StorageDeletionMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "createdAt" field.

func (*StorageDeletionMutation) ResetEdge

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

func (m *StorageDeletionMutation) 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 (*StorageDeletionMutation) ResetFolderName

func (m *StorageDeletionMutation) ResetFolderName()

ResetFolderName resets all changes to the "folderName" field.

func (*StorageDeletionMutation) ResetLastAttemptedAt

func (m *StorageDeletionMutation) ResetLastAttemptedAt()

ResetLastAttemptedAt resets all changes to the "lastAttemptedAt" field.

func (*StorageDeletionMutation) ResetLastError

func (m *StorageDeletionMutation) ResetLastError()

ResetLastError resets all changes to the "lastError" field.

func (*StorageDeletionMutation) SetAttemptCount

func (m *StorageDeletionMutation) SetAttemptCount(i int)

SetAttemptCount sets the "attemptCount" field.

func (*StorageDeletionMutation) SetCreatedAt

func (m *StorageDeletionMutation) SetCreatedAt(i int64)

SetCreatedAt sets the "createdAt" field.

func (*StorageDeletionMutation) SetField

func (m *StorageDeletionMutation) 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 (*StorageDeletionMutation) SetFolderName

func (m *StorageDeletionMutation) SetFolderName(s string)

SetFolderName sets the "folderName" field.

func (*StorageDeletionMutation) SetID

func (m *StorageDeletionMutation) SetID(id int64)

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

func (*StorageDeletionMutation) SetLastAttemptedAt

func (m *StorageDeletionMutation) SetLastAttemptedAt(i int64)

SetLastAttemptedAt sets the "lastAttemptedAt" field.

func (*StorageDeletionMutation) SetLastError

func (m *StorageDeletionMutation) SetLastError(s string)

SetLastError sets the "lastError" field.

func (*StorageDeletionMutation) SetOp

func (m *StorageDeletionMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (StorageDeletionMutation) Tx

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

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

func (*StorageDeletionMutation) Type

func (m *StorageDeletionMutation) Type() string

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

func (*StorageDeletionMutation) Where

Where appends a list predicates to the StorageDeletionMutation builder.

func (*StorageDeletionMutation) WhereP

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

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

type StorageDeletionQuery

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

StorageDeletionQuery is the builder for querying StorageDeletion entities.

func (*StorageDeletionQuery) Aggregate

Aggregate returns a StorageDeletionSelect configured with the given aggregations.

func (*StorageDeletionQuery) All

All executes the query and returns a list of StorageDeletions.

func (*StorageDeletionQuery) AllX

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

func (*StorageDeletionQuery) Clone

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

func (*StorageDeletionQuery) Count

func (_q *StorageDeletionQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*StorageDeletionQuery) CountX

func (_q *StorageDeletionQuery) CountX(ctx context.Context) int

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

func (*StorageDeletionQuery) Exist

func (_q *StorageDeletionQuery) Exist(ctx context.Context) (bool, error)

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

func (*StorageDeletionQuery) ExistX

func (_q *StorageDeletionQuery) ExistX(ctx context.Context) bool

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

func (*StorageDeletionQuery) First

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

func (*StorageDeletionQuery) FirstID

func (_q *StorageDeletionQuery) FirstID(ctx context.Context) (id int64, err error)

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

func (*StorageDeletionQuery) FirstIDX

func (_q *StorageDeletionQuery) FirstIDX(ctx context.Context) int64

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

func (*StorageDeletionQuery) FirstX

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

func (*StorageDeletionQuery) GroupBy

func (_q *StorageDeletionQuery) GroupBy(field string, fields ...string) *StorageDeletionGroupBy

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

client.StorageDeletion.Query().
	GroupBy(storagedeletion.FieldFolderName).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*StorageDeletionQuery) IDs

func (_q *StorageDeletionQuery) IDs(ctx context.Context) (ids []int64, err error)

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

func (*StorageDeletionQuery) IDsX

func (_q *StorageDeletionQuery) IDsX(ctx context.Context) []int64

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

func (*StorageDeletionQuery) Limit

func (_q *StorageDeletionQuery) Limit(limit int) *StorageDeletionQuery

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

func (*StorageDeletionQuery) Offset

func (_q *StorageDeletionQuery) Offset(offset int) *StorageDeletionQuery

Offset to start from.

func (*StorageDeletionQuery) Only

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

func (*StorageDeletionQuery) OnlyID

func (_q *StorageDeletionQuery) OnlyID(ctx context.Context) (id int64, err error)

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

func (*StorageDeletionQuery) OnlyIDX

func (_q *StorageDeletionQuery) OnlyIDX(ctx context.Context) int64

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

func (*StorageDeletionQuery) OnlyX

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

func (*StorageDeletionQuery) Order

Order specifies how the records should be ordered.

func (*StorageDeletionQuery) Select

func (_q *StorageDeletionQuery) Select(fields ...string) *StorageDeletionSelect

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 {
	FolderName string `json:"folderName,omitempty"`
}

client.StorageDeletion.Query().
	Select(storagedeletion.FieldFolderName).
	Scan(ctx, &v)

func (*StorageDeletionQuery) Unique

func (_q *StorageDeletionQuery) Unique(unique bool) *StorageDeletionQuery

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

Where adds a new predicate for the StorageDeletionQuery builder.

type StorageDeletionSelect

type StorageDeletionSelect struct {
	*StorageDeletionQuery
	// contains filtered or unexported fields
}

StorageDeletionSelect is the builder for selecting fields of StorageDeletion entities.

func (*StorageDeletionSelect) Aggregate

Aggregate adds the given aggregation functions to the selector query.

func (*StorageDeletionSelect) Bool

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

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

func (*StorageDeletionSelect) BoolX

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

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

func (*StorageDeletionSelect) Bools

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

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

func (*StorageDeletionSelect) BoolsX

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

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

func (*StorageDeletionSelect) Float64

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

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

func (*StorageDeletionSelect) Float64X

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

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

func (*StorageDeletionSelect) Float64s

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

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

func (*StorageDeletionSelect) Float64sX

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

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

func (*StorageDeletionSelect) Int

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

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

func (*StorageDeletionSelect) IntX

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

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

func (*StorageDeletionSelect) Ints

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

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

func (*StorageDeletionSelect) IntsX

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

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

func (*StorageDeletionSelect) Scan

func (_s *StorageDeletionSelect) Scan(ctx context.Context, v any) error

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

func (*StorageDeletionSelect) ScanX

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

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

func (*StorageDeletionSelect) String

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

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

func (*StorageDeletionSelect) StringX

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

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

func (*StorageDeletionSelect) Strings

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

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

func (*StorageDeletionSelect) StringsX

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

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

type StorageDeletionUpdate

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

StorageDeletionUpdate is the builder for updating StorageDeletion entities.

func (*StorageDeletionUpdate) AddAttemptCount

func (_u *StorageDeletionUpdate) AddAttemptCount(v int) *StorageDeletionUpdate

AddAttemptCount adds value to the "attemptCount" field.

func (*StorageDeletionUpdate) AddCreatedAt

func (_u *StorageDeletionUpdate) AddCreatedAt(v int64) *StorageDeletionUpdate

AddCreatedAt adds value to the "createdAt" field.

func (*StorageDeletionUpdate) AddLastAttemptedAt

func (_u *StorageDeletionUpdate) AddLastAttemptedAt(v int64) *StorageDeletionUpdate

AddLastAttemptedAt adds value to the "lastAttemptedAt" field.

func (*StorageDeletionUpdate) ClearLastAttemptedAt

func (_u *StorageDeletionUpdate) ClearLastAttemptedAt() *StorageDeletionUpdate

ClearLastAttemptedAt clears the value of the "lastAttemptedAt" field.

func (*StorageDeletionUpdate) ClearLastError

func (_u *StorageDeletionUpdate) ClearLastError() *StorageDeletionUpdate

ClearLastError clears the value of the "lastError" field.

func (*StorageDeletionUpdate) Exec

Exec executes the query.

func (*StorageDeletionUpdate) ExecX

func (_u *StorageDeletionUpdate) ExecX(ctx context.Context)

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

func (*StorageDeletionUpdate) Mutation

Mutation returns the StorageDeletionMutation object of the builder.

func (*StorageDeletionUpdate) Save

func (_u *StorageDeletionUpdate) Save(ctx context.Context) (int, error)

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

func (*StorageDeletionUpdate) SaveX

func (_u *StorageDeletionUpdate) SaveX(ctx context.Context) int

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

func (*StorageDeletionUpdate) SetAttemptCount

func (_u *StorageDeletionUpdate) SetAttemptCount(v int) *StorageDeletionUpdate

SetAttemptCount sets the "attemptCount" field.

func (*StorageDeletionUpdate) SetCreatedAt

func (_u *StorageDeletionUpdate) SetCreatedAt(v int64) *StorageDeletionUpdate

SetCreatedAt sets the "createdAt" field.

func (*StorageDeletionUpdate) SetFolderName

func (_u *StorageDeletionUpdate) SetFolderName(v string) *StorageDeletionUpdate

SetFolderName sets the "folderName" field.

func (*StorageDeletionUpdate) SetLastAttemptedAt

func (_u *StorageDeletionUpdate) SetLastAttemptedAt(v int64) *StorageDeletionUpdate

SetLastAttemptedAt sets the "lastAttemptedAt" field.

func (*StorageDeletionUpdate) SetLastError

func (_u *StorageDeletionUpdate) SetLastError(v string) *StorageDeletionUpdate

SetLastError sets the "lastError" field.

func (*StorageDeletionUpdate) SetNillableAttemptCount

func (_u *StorageDeletionUpdate) SetNillableAttemptCount(v *int) *StorageDeletionUpdate

SetNillableAttemptCount sets the "attemptCount" field if the given value is not nil.

func (*StorageDeletionUpdate) SetNillableCreatedAt

func (_u *StorageDeletionUpdate) SetNillableCreatedAt(v *int64) *StorageDeletionUpdate

SetNillableCreatedAt sets the "createdAt" field if the given value is not nil.

func (*StorageDeletionUpdate) SetNillableFolderName

func (_u *StorageDeletionUpdate) SetNillableFolderName(v *string) *StorageDeletionUpdate

SetNillableFolderName sets the "folderName" field if the given value is not nil.

func (*StorageDeletionUpdate) SetNillableLastAttemptedAt

func (_u *StorageDeletionUpdate) SetNillableLastAttemptedAt(v *int64) *StorageDeletionUpdate

SetNillableLastAttemptedAt sets the "lastAttemptedAt" field if the given value is not nil.

func (*StorageDeletionUpdate) SetNillableLastError

func (_u *StorageDeletionUpdate) SetNillableLastError(v *string) *StorageDeletionUpdate

SetNillableLastError sets the "lastError" field if the given value is not nil.

func (*StorageDeletionUpdate) Where

Where appends a list predicates to the StorageDeletionUpdate builder.

type StorageDeletionUpdateOne

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

StorageDeletionUpdateOne is the builder for updating a single StorageDeletion entity.

func (*StorageDeletionUpdateOne) AddAttemptCount

func (_u *StorageDeletionUpdateOne) AddAttemptCount(v int) *StorageDeletionUpdateOne

AddAttemptCount adds value to the "attemptCount" field.

func (*StorageDeletionUpdateOne) AddCreatedAt

AddCreatedAt adds value to the "createdAt" field.

func (*StorageDeletionUpdateOne) AddLastAttemptedAt

func (_u *StorageDeletionUpdateOne) AddLastAttemptedAt(v int64) *StorageDeletionUpdateOne

AddLastAttemptedAt adds value to the "lastAttemptedAt" field.

func (*StorageDeletionUpdateOne) ClearLastAttemptedAt

func (_u *StorageDeletionUpdateOne) ClearLastAttemptedAt() *StorageDeletionUpdateOne

ClearLastAttemptedAt clears the value of the "lastAttemptedAt" field.

func (*StorageDeletionUpdateOne) ClearLastError

func (_u *StorageDeletionUpdateOne) ClearLastError() *StorageDeletionUpdateOne

ClearLastError clears the value of the "lastError" field.

func (*StorageDeletionUpdateOne) Exec

Exec executes the query on the entity.

func (*StorageDeletionUpdateOne) ExecX

func (_u *StorageDeletionUpdateOne) ExecX(ctx context.Context)

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

func (*StorageDeletionUpdateOne) Mutation

Mutation returns the StorageDeletionMutation object of the builder.

func (*StorageDeletionUpdateOne) Save

Save executes the query and returns the updated StorageDeletion entity.

func (*StorageDeletionUpdateOne) SaveX

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

func (*StorageDeletionUpdateOne) Select

func (_u *StorageDeletionUpdateOne) Select(field string, fields ...string) *StorageDeletionUpdateOne

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

func (*StorageDeletionUpdateOne) SetAttemptCount

func (_u *StorageDeletionUpdateOne) SetAttemptCount(v int) *StorageDeletionUpdateOne

SetAttemptCount sets the "attemptCount" field.

func (*StorageDeletionUpdateOne) SetCreatedAt

SetCreatedAt sets the "createdAt" field.

func (*StorageDeletionUpdateOne) SetFolderName

SetFolderName sets the "folderName" field.

func (*StorageDeletionUpdateOne) SetLastAttemptedAt

func (_u *StorageDeletionUpdateOne) SetLastAttemptedAt(v int64) *StorageDeletionUpdateOne

SetLastAttemptedAt sets the "lastAttemptedAt" field.

func (*StorageDeletionUpdateOne) SetLastError

SetLastError sets the "lastError" field.

func (*StorageDeletionUpdateOne) SetNillableAttemptCount

func (_u *StorageDeletionUpdateOne) SetNillableAttemptCount(v *int) *StorageDeletionUpdateOne

SetNillableAttemptCount sets the "attemptCount" field if the given value is not nil.

func (*StorageDeletionUpdateOne) SetNillableCreatedAt

func (_u *StorageDeletionUpdateOne) SetNillableCreatedAt(v *int64) *StorageDeletionUpdateOne

SetNillableCreatedAt sets the "createdAt" field if the given value is not nil.

func (*StorageDeletionUpdateOne) SetNillableFolderName

func (_u *StorageDeletionUpdateOne) SetNillableFolderName(v *string) *StorageDeletionUpdateOne

SetNillableFolderName sets the "folderName" field if the given value is not nil.

func (*StorageDeletionUpdateOne) SetNillableLastAttemptedAt

func (_u *StorageDeletionUpdateOne) SetNillableLastAttemptedAt(v *int64) *StorageDeletionUpdateOne

SetNillableLastAttemptedAt sets the "lastAttemptedAt" field if the given value is not nil.

func (*StorageDeletionUpdateOne) SetNillableLastError

func (_u *StorageDeletionUpdateOne) SetNillableLastError(v *string) *StorageDeletionUpdateOne

SetNillableLastError sets the "lastError" field if the given value is not nil.

func (*StorageDeletionUpdateOne) Where

Where appends a list predicates to the StorageDeletionUpdate builder.

type StorageDeletions

type StorageDeletions []*StorageDeletion

StorageDeletions is a parsable slice of StorageDeletion.

type StorageLocation

type StorageLocation struct {

	// ID of the ent.
	ID string `json:"id,omitempty"`
	// FolderName holds the value of the "folderName" field.
	FolderName string `json:"folderName,omitempty"`
	// PartCount holds the value of the "partCount" field.
	PartCount int `json:"partCount,omitempty"`
	// SizeBytes holds the value of the "sizeBytes" field.
	SizeBytes *int64 `json:"sizeBytes,omitempty"`
	// LeaseVersion holds the value of the "leaseVersion" field.
	LeaseVersion int64 `json:"leaseVersion,omitempty"`
	// DeletionRequestedAt holds the value of the "deletionRequestedAt" field.
	DeletionRequestedAt *int64 `json:"deletionRequestedAt,omitempty"`
	// MergeStartedAt holds the value of the "mergeStartedAt" field.
	MergeStartedAt *int64 `json:"mergeStartedAt,omitempty"`
	// MergeLeaseToken holds the value of the "mergeLeaseToken" field.
	MergeLeaseToken *string `json:"mergeLeaseToken,omitempty"`
	// MergeLeaseExpiresAt holds the value of the "mergeLeaseExpiresAt" field.
	MergeLeaseExpiresAt *int64 `json:"mergeLeaseExpiresAt,omitempty"`
	// MergedAt holds the value of the "mergedAt" field.
	MergedAt *int64 `json:"mergedAt,omitempty"`
	// MaterializationUnsupportedAt holds the value of the "materializationUnsupportedAt" field.
	MaterializationUnsupportedAt *int64 `json:"materializationUnsupportedAt,omitempty"`
	// PartsDeletedAt holds the value of the "partsDeletedAt" field.
	PartsDeletedAt *int64 `json:"partsDeletedAt,omitempty"`
	// LastDownloadedAt holds the value of the "lastDownloadedAt" field.
	LastDownloadedAt *int64 `json:"lastDownloadedAt,omitempty"`
	// RecencyAt holds the value of the "recencyAt" field.
	RecencyAt int64 `json:"recencyAt,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the StorageLocationQuery when eager-loading is set.
	Edges StorageLocationEdges `json:"edges"`
	// contains filtered or unexported fields
}

StorageLocation is the model entity for the StorageLocation schema.

func (*StorageLocation) QueryCacheEntries

func (_m *StorageLocation) QueryCacheEntries() *CacheEntryQuery

QueryCacheEntries queries the "cacheEntries" edge of the StorageLocation entity.

func (*StorageLocation) QueryReaderLeases

func (_m *StorageLocation) QueryReaderLeases() *StorageReaderLeaseQuery

QueryReaderLeases queries the "readerLeases" edge of the StorageLocation entity.

func (*StorageLocation) String

func (_m *StorageLocation) String() string

String implements the fmt.Stringer.

func (*StorageLocation) Unwrap

func (_m *StorageLocation) Unwrap() *StorageLocation

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

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

func (*StorageLocation) Value

func (_m *StorageLocation) Value(name string) (ent.Value, error)

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

type StorageLocationClient

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

StorageLocationClient is a client for the StorageLocation schema.

func NewStorageLocationClient

func NewStorageLocationClient(c config) *StorageLocationClient

NewStorageLocationClient returns a client for the StorageLocation from the given config.

func (*StorageLocationClient) Create

Create returns a builder for creating a StorageLocation entity.

func (*StorageLocationClient) CreateBulk

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

func (*StorageLocationClient) Delete

Delete returns a delete builder for StorageLocation.

func (*StorageLocationClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*StorageLocationClient) DeleteOneID

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

func (*StorageLocationClient) Get

Get returns a StorageLocation entity by its id.

func (*StorageLocationClient) GetX

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

func (*StorageLocationClient) Hooks

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

Hooks returns the client hooks.

func (*StorageLocationClient) Intercept

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

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

func (*StorageLocationClient) Interceptors

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

Interceptors returns the client interceptors.

func (*StorageLocationClient) MapCreateBulk

func (c *StorageLocationClient) MapCreateBulk(slice any, setFunc func(*StorageLocationCreate, int)) *StorageLocationCreateBulk

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

Query returns a query builder for StorageLocation.

func (*StorageLocationClient) QueryCacheEntries

func (c *StorageLocationClient) QueryCacheEntries(_m *StorageLocation) *CacheEntryQuery

QueryCacheEntries queries the cacheEntries edge of a StorageLocation.

func (*StorageLocationClient) QueryReaderLeases

QueryReaderLeases queries the readerLeases edge of a StorageLocation.

func (*StorageLocationClient) Update

Update returns an update builder for StorageLocation.

func (*StorageLocationClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*StorageLocationClient) UpdateOneID

UpdateOneID returns an update builder for the given id.

func (*StorageLocationClient) Use

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

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

type StorageLocationCreate

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

StorageLocationCreate is the builder for creating a StorageLocation entity.

func (*StorageLocationCreate) AddCacheEntries

func (_c *StorageLocationCreate) AddCacheEntries(v ...*CacheEntry) *StorageLocationCreate

AddCacheEntries adds the "cacheEntries" edges to the CacheEntry entity.

func (*StorageLocationCreate) AddCacheEntryIDs

func (_c *StorageLocationCreate) AddCacheEntryIDs(ids ...string) *StorageLocationCreate

AddCacheEntryIDs adds the "cacheEntries" edge to the CacheEntry entity by IDs.

func (*StorageLocationCreate) AddReaderLeaseIDs

func (_c *StorageLocationCreate) AddReaderLeaseIDs(ids ...string) *StorageLocationCreate

AddReaderLeaseIDs adds the "readerLeases" edge to the StorageReaderLease entity by IDs.

func (*StorageLocationCreate) AddReaderLeases

AddReaderLeases adds the "readerLeases" edges to the StorageReaderLease entity.

func (*StorageLocationCreate) Exec

Exec executes the query.

func (*StorageLocationCreate) ExecX

func (_c *StorageLocationCreate) ExecX(ctx context.Context)

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

func (*StorageLocationCreate) Mutation

Mutation returns the StorageLocationMutation object of the builder.

func (*StorageLocationCreate) Save

Save creates the StorageLocation in the database.

func (*StorageLocationCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*StorageLocationCreate) SetDeletionRequestedAt

func (_c *StorageLocationCreate) SetDeletionRequestedAt(v int64) *StorageLocationCreate

SetDeletionRequestedAt sets the "deletionRequestedAt" field.

func (*StorageLocationCreate) SetFolderName

func (_c *StorageLocationCreate) SetFolderName(v string) *StorageLocationCreate

SetFolderName sets the "folderName" field.

func (*StorageLocationCreate) SetID

SetID sets the "id" field.

func (*StorageLocationCreate) SetLastDownloadedAt

func (_c *StorageLocationCreate) SetLastDownloadedAt(v int64) *StorageLocationCreate

SetLastDownloadedAt sets the "lastDownloadedAt" field.

func (*StorageLocationCreate) SetLeaseVersion

func (_c *StorageLocationCreate) SetLeaseVersion(v int64) *StorageLocationCreate

SetLeaseVersion sets the "leaseVersion" field.

func (*StorageLocationCreate) SetMaterializationUnsupportedAt

func (_c *StorageLocationCreate) SetMaterializationUnsupportedAt(v int64) *StorageLocationCreate

SetMaterializationUnsupportedAt sets the "materializationUnsupportedAt" field.

func (*StorageLocationCreate) SetMergeLeaseExpiresAt

func (_c *StorageLocationCreate) SetMergeLeaseExpiresAt(v int64) *StorageLocationCreate

SetMergeLeaseExpiresAt sets the "mergeLeaseExpiresAt" field.

func (*StorageLocationCreate) SetMergeLeaseToken

func (_c *StorageLocationCreate) SetMergeLeaseToken(v string) *StorageLocationCreate

SetMergeLeaseToken sets the "mergeLeaseToken" field.

func (*StorageLocationCreate) SetMergeStartedAt

func (_c *StorageLocationCreate) SetMergeStartedAt(v int64) *StorageLocationCreate

SetMergeStartedAt sets the "mergeStartedAt" field.

func (*StorageLocationCreate) SetMergedAt

SetMergedAt sets the "mergedAt" field.

func (*StorageLocationCreate) SetNillableDeletionRequestedAt

func (_c *StorageLocationCreate) SetNillableDeletionRequestedAt(v *int64) *StorageLocationCreate

SetNillableDeletionRequestedAt sets the "deletionRequestedAt" field if the given value is not nil.

func (*StorageLocationCreate) SetNillableLastDownloadedAt

func (_c *StorageLocationCreate) SetNillableLastDownloadedAt(v *int64) *StorageLocationCreate

SetNillableLastDownloadedAt sets the "lastDownloadedAt" field if the given value is not nil.

func (*StorageLocationCreate) SetNillableLeaseVersion

func (_c *StorageLocationCreate) SetNillableLeaseVersion(v *int64) *StorageLocationCreate

SetNillableLeaseVersion sets the "leaseVersion" field if the given value is not nil.

func (*StorageLocationCreate) SetNillableMaterializationUnsupportedAt

func (_c *StorageLocationCreate) SetNillableMaterializationUnsupportedAt(v *int64) *StorageLocationCreate

SetNillableMaterializationUnsupportedAt sets the "materializationUnsupportedAt" field if the given value is not nil.

func (*StorageLocationCreate) SetNillableMergeLeaseExpiresAt

func (_c *StorageLocationCreate) SetNillableMergeLeaseExpiresAt(v *int64) *StorageLocationCreate

SetNillableMergeLeaseExpiresAt sets the "mergeLeaseExpiresAt" field if the given value is not nil.

func (*StorageLocationCreate) SetNillableMergeLeaseToken

func (_c *StorageLocationCreate) SetNillableMergeLeaseToken(v *string) *StorageLocationCreate

SetNillableMergeLeaseToken sets the "mergeLeaseToken" field if the given value is not nil.

func (*StorageLocationCreate) SetNillableMergeStartedAt

func (_c *StorageLocationCreate) SetNillableMergeStartedAt(v *int64) *StorageLocationCreate

SetNillableMergeStartedAt sets the "mergeStartedAt" field if the given value is not nil.

func (*StorageLocationCreate) SetNillableMergedAt

func (_c *StorageLocationCreate) SetNillableMergedAt(v *int64) *StorageLocationCreate

SetNillableMergedAt sets the "mergedAt" field if the given value is not nil.

func (*StorageLocationCreate) SetNillablePartsDeletedAt

func (_c *StorageLocationCreate) SetNillablePartsDeletedAt(v *int64) *StorageLocationCreate

SetNillablePartsDeletedAt sets the "partsDeletedAt" field if the given value is not nil.

func (*StorageLocationCreate) SetNillableRecencyAt added in v1.1.2

func (_c *StorageLocationCreate) SetNillableRecencyAt(v *int64) *StorageLocationCreate

SetNillableRecencyAt sets the "recencyAt" field if the given value is not nil.

func (*StorageLocationCreate) SetNillableSizeBytes

func (_c *StorageLocationCreate) SetNillableSizeBytes(v *int64) *StorageLocationCreate

SetNillableSizeBytes sets the "sizeBytes" field if the given value is not nil.

func (*StorageLocationCreate) SetPartCount

func (_c *StorageLocationCreate) SetPartCount(v int) *StorageLocationCreate

SetPartCount sets the "partCount" field.

func (*StorageLocationCreate) SetPartsDeletedAt

func (_c *StorageLocationCreate) SetPartsDeletedAt(v int64) *StorageLocationCreate

SetPartsDeletedAt sets the "partsDeletedAt" field.

func (*StorageLocationCreate) SetRecencyAt added in v1.1.2

func (_c *StorageLocationCreate) SetRecencyAt(v int64) *StorageLocationCreate

SetRecencyAt sets the "recencyAt" field.

func (*StorageLocationCreate) SetSizeBytes

func (_c *StorageLocationCreate) SetSizeBytes(v int64) *StorageLocationCreate

SetSizeBytes sets the "sizeBytes" field.

type StorageLocationCreateBulk

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

StorageLocationCreateBulk is the builder for creating many StorageLocation entities in bulk.

func (*StorageLocationCreateBulk) Exec

Exec executes the query.

func (*StorageLocationCreateBulk) ExecX

func (_c *StorageLocationCreateBulk) ExecX(ctx context.Context)

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

func (*StorageLocationCreateBulk) Save

Save creates the StorageLocation entities in the database.

func (*StorageLocationCreateBulk) SaveX

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

type StorageLocationDelete

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

StorageLocationDelete is the builder for deleting a StorageLocation entity.

func (*StorageLocationDelete) Exec

func (_d *StorageLocationDelete) Exec(ctx context.Context) (int, error)

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

func (*StorageLocationDelete) ExecX

func (_d *StorageLocationDelete) ExecX(ctx context.Context) int

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

func (*StorageLocationDelete) Where

Where appends a list predicates to the StorageLocationDelete builder.

type StorageLocationDeleteOne

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

StorageLocationDeleteOne is the builder for deleting a single StorageLocation entity.

func (*StorageLocationDeleteOne) Exec

Exec executes the deletion query.

func (*StorageLocationDeleteOne) ExecX

func (_d *StorageLocationDeleteOne) ExecX(ctx context.Context)

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

func (*StorageLocationDeleteOne) Where

Where appends a list predicates to the StorageLocationDelete builder.

type StorageLocationEdges

type StorageLocationEdges struct {
	// CacheEntries holds the value of the cacheEntries edge.
	CacheEntries []*CacheEntry `json:"cacheEntries,omitempty"`
	// ReaderLeases holds the value of the readerLeases edge.
	ReaderLeases []*StorageReaderLease `json:"readerLeases,omitempty"`
	// contains filtered or unexported fields
}

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

func (StorageLocationEdges) CacheEntriesOrErr

func (e StorageLocationEdges) CacheEntriesOrErr() ([]*CacheEntry, error)

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

func (StorageLocationEdges) ReaderLeasesOrErr

func (e StorageLocationEdges) ReaderLeasesOrErr() ([]*StorageReaderLease, error)

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

type StorageLocationGroupBy

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

StorageLocationGroupBy is the group-by builder for StorageLocation entities.

func (*StorageLocationGroupBy) Aggregate

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

func (*StorageLocationGroupBy) Bool

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

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

func (*StorageLocationGroupBy) BoolX

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

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

func (*StorageLocationGroupBy) Bools

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

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

func (*StorageLocationGroupBy) BoolsX

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

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

func (*StorageLocationGroupBy) Float64

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

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

func (*StorageLocationGroupBy) Float64X

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

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

func (*StorageLocationGroupBy) Float64s

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

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

func (*StorageLocationGroupBy) Float64sX

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

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

func (*StorageLocationGroupBy) Int

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

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

func (*StorageLocationGroupBy) IntX

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

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

func (*StorageLocationGroupBy) Ints

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

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

func (*StorageLocationGroupBy) IntsX

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

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

func (*StorageLocationGroupBy) Scan

func (_g *StorageLocationGroupBy) Scan(ctx context.Context, v any) error

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

func (*StorageLocationGroupBy) ScanX

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

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

func (*StorageLocationGroupBy) String

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

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

func (*StorageLocationGroupBy) StringX

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

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

func (*StorageLocationGroupBy) Strings

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

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

func (*StorageLocationGroupBy) StringsX

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

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

type StorageLocationMutation

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

StorageLocationMutation represents an operation that mutates the StorageLocation nodes in the graph.

func (*StorageLocationMutation) AddCacheEntryIDs

func (m *StorageLocationMutation) AddCacheEntryIDs(ids ...string)

AddCacheEntryIDs adds the "cacheEntries" edge to the CacheEntry entity by ids.

func (*StorageLocationMutation) AddDeletionRequestedAt

func (m *StorageLocationMutation) AddDeletionRequestedAt(i int64)

AddDeletionRequestedAt adds i to the "deletionRequestedAt" field.

func (*StorageLocationMutation) AddField

func (m *StorageLocationMutation) 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 (*StorageLocationMutation) AddLastDownloadedAt

func (m *StorageLocationMutation) AddLastDownloadedAt(i int64)

AddLastDownloadedAt adds i to the "lastDownloadedAt" field.

func (*StorageLocationMutation) AddLeaseVersion

func (m *StorageLocationMutation) AddLeaseVersion(i int64)

AddLeaseVersion adds i to the "leaseVersion" field.

func (*StorageLocationMutation) AddMaterializationUnsupportedAt

func (m *StorageLocationMutation) AddMaterializationUnsupportedAt(i int64)

AddMaterializationUnsupportedAt adds i to the "materializationUnsupportedAt" field.

func (*StorageLocationMutation) AddMergeLeaseExpiresAt

func (m *StorageLocationMutation) AddMergeLeaseExpiresAt(i int64)

AddMergeLeaseExpiresAt adds i to the "mergeLeaseExpiresAt" field.

func (*StorageLocationMutation) AddMergeStartedAt

func (m *StorageLocationMutation) AddMergeStartedAt(i int64)

AddMergeStartedAt adds i to the "mergeStartedAt" field.

func (*StorageLocationMutation) AddMergedAt

func (m *StorageLocationMutation) AddMergedAt(i int64)

AddMergedAt adds i to the "mergedAt" field.

func (*StorageLocationMutation) AddPartCount

func (m *StorageLocationMutation) AddPartCount(i int)

AddPartCount adds i to the "partCount" field.

func (*StorageLocationMutation) AddPartsDeletedAt

func (m *StorageLocationMutation) AddPartsDeletedAt(i int64)

AddPartsDeletedAt adds i to the "partsDeletedAt" field.

func (*StorageLocationMutation) AddReaderLeaseIDs

func (m *StorageLocationMutation) AddReaderLeaseIDs(ids ...string)

AddReaderLeaseIDs adds the "readerLeases" edge to the StorageReaderLease entity by ids.

func (*StorageLocationMutation) AddRecencyAt added in v1.1.2

func (m *StorageLocationMutation) AddRecencyAt(i int64)

AddRecencyAt adds i to the "recencyAt" field.

func (*StorageLocationMutation) AddSizeBytes

func (m *StorageLocationMutation) AddSizeBytes(i int64)

AddSizeBytes adds i to the "sizeBytes" field.

func (*StorageLocationMutation) AddedDeletionRequestedAt

func (m *StorageLocationMutation) AddedDeletionRequestedAt() (r int64, exists bool)

AddedDeletionRequestedAt returns the value that was added to the "deletionRequestedAt" field in this mutation.

func (*StorageLocationMutation) AddedEdges

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

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

func (*StorageLocationMutation) AddedField

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

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

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

func (*StorageLocationMutation) AddedIDs

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

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

func (*StorageLocationMutation) AddedLastDownloadedAt

func (m *StorageLocationMutation) AddedLastDownloadedAt() (r int64, exists bool)

AddedLastDownloadedAt returns the value that was added to the "lastDownloadedAt" field in this mutation.

func (*StorageLocationMutation) AddedLeaseVersion

func (m *StorageLocationMutation) AddedLeaseVersion() (r int64, exists bool)

AddedLeaseVersion returns the value that was added to the "leaseVersion" field in this mutation.

func (*StorageLocationMutation) AddedMaterializationUnsupportedAt

func (m *StorageLocationMutation) AddedMaterializationUnsupportedAt() (r int64, exists bool)

AddedMaterializationUnsupportedAt returns the value that was added to the "materializationUnsupportedAt" field in this mutation.

func (*StorageLocationMutation) AddedMergeLeaseExpiresAt

func (m *StorageLocationMutation) AddedMergeLeaseExpiresAt() (r int64, exists bool)

AddedMergeLeaseExpiresAt returns the value that was added to the "mergeLeaseExpiresAt" field in this mutation.

func (*StorageLocationMutation) AddedMergeStartedAt

func (m *StorageLocationMutation) AddedMergeStartedAt() (r int64, exists bool)

AddedMergeStartedAt returns the value that was added to the "mergeStartedAt" field in this mutation.

func (*StorageLocationMutation) AddedMergedAt

func (m *StorageLocationMutation) AddedMergedAt() (r int64, exists bool)

AddedMergedAt returns the value that was added to the "mergedAt" field in this mutation.

func (*StorageLocationMutation) AddedPartCount

func (m *StorageLocationMutation) AddedPartCount() (r int, exists bool)

AddedPartCount returns the value that was added to the "partCount" field in this mutation.

func (*StorageLocationMutation) AddedPartsDeletedAt

func (m *StorageLocationMutation) AddedPartsDeletedAt() (r int64, exists bool)

AddedPartsDeletedAt returns the value that was added to the "partsDeletedAt" field in this mutation.

func (*StorageLocationMutation) AddedRecencyAt added in v1.1.2

func (m *StorageLocationMutation) AddedRecencyAt() (r int64, exists bool)

AddedRecencyAt returns the value that was added to the "recencyAt" field in this mutation.

func (*StorageLocationMutation) AddedSizeBytes

func (m *StorageLocationMutation) AddedSizeBytes() (r int64, exists bool)

AddedSizeBytes returns the value that was added to the "sizeBytes" field in this mutation.

func (*StorageLocationMutation) CacheEntriesCleared

func (m *StorageLocationMutation) CacheEntriesCleared() bool

CacheEntriesCleared reports if the "cacheEntries" edge to the CacheEntry entity was cleared.

func (*StorageLocationMutation) CacheEntriesIDs

func (m *StorageLocationMutation) CacheEntriesIDs() (ids []string)

CacheEntriesIDs returns the "cacheEntries" edge IDs in the mutation.

func (*StorageLocationMutation) ClearCacheEntries

func (m *StorageLocationMutation) ClearCacheEntries()

ClearCacheEntries clears the "cacheEntries" edge to the CacheEntry entity.

func (*StorageLocationMutation) ClearDeletionRequestedAt

func (m *StorageLocationMutation) ClearDeletionRequestedAt()

ClearDeletionRequestedAt clears the value of the "deletionRequestedAt" field.

func (*StorageLocationMutation) ClearEdge

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

func (m *StorageLocationMutation) 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 (*StorageLocationMutation) ClearLastDownloadedAt

func (m *StorageLocationMutation) ClearLastDownloadedAt()

ClearLastDownloadedAt clears the value of the "lastDownloadedAt" field.

func (*StorageLocationMutation) ClearMaterializationUnsupportedAt

func (m *StorageLocationMutation) ClearMaterializationUnsupportedAt()

ClearMaterializationUnsupportedAt clears the value of the "materializationUnsupportedAt" field.

func (*StorageLocationMutation) ClearMergeLeaseExpiresAt

func (m *StorageLocationMutation) ClearMergeLeaseExpiresAt()

ClearMergeLeaseExpiresAt clears the value of the "mergeLeaseExpiresAt" field.

func (*StorageLocationMutation) ClearMergeLeaseToken

func (m *StorageLocationMutation) ClearMergeLeaseToken()

ClearMergeLeaseToken clears the value of the "mergeLeaseToken" field.

func (*StorageLocationMutation) ClearMergeStartedAt

func (m *StorageLocationMutation) ClearMergeStartedAt()

ClearMergeStartedAt clears the value of the "mergeStartedAt" field.

func (*StorageLocationMutation) ClearMergedAt

func (m *StorageLocationMutation) ClearMergedAt()

ClearMergedAt clears the value of the "mergedAt" field.

func (*StorageLocationMutation) ClearPartsDeletedAt

func (m *StorageLocationMutation) ClearPartsDeletedAt()

ClearPartsDeletedAt clears the value of the "partsDeletedAt" field.

func (*StorageLocationMutation) ClearReaderLeases

func (m *StorageLocationMutation) ClearReaderLeases()

ClearReaderLeases clears the "readerLeases" edge to the StorageReaderLease entity.

func (*StorageLocationMutation) ClearSizeBytes

func (m *StorageLocationMutation) ClearSizeBytes()

ClearSizeBytes clears the value of the "sizeBytes" field.

func (*StorageLocationMutation) ClearedEdges

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

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

func (*StorageLocationMutation) ClearedFields

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

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

func (StorageLocationMutation) Client

func (m StorageLocationMutation) 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 (*StorageLocationMutation) DeletionRequestedAt

func (m *StorageLocationMutation) DeletionRequestedAt() (r int64, exists bool)

DeletionRequestedAt returns the value of the "deletionRequestedAt" field in the mutation.

func (*StorageLocationMutation) DeletionRequestedAtCleared

func (m *StorageLocationMutation) DeletionRequestedAtCleared() bool

DeletionRequestedAtCleared returns if the "deletionRequestedAt" field was cleared in this mutation.

func (*StorageLocationMutation) EdgeCleared

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

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

func (*StorageLocationMutation) Field

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

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

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

func (*StorageLocationMutation) Fields

func (m *StorageLocationMutation) 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 (*StorageLocationMutation) FolderName

func (m *StorageLocationMutation) FolderName() (r string, exists bool)

FolderName returns the value of the "folderName" field in the mutation.

func (*StorageLocationMutation) ID

func (m *StorageLocationMutation) ID() (id string, 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 (*StorageLocationMutation) 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 (*StorageLocationMutation) LastDownloadedAt

func (m *StorageLocationMutation) LastDownloadedAt() (r int64, exists bool)

LastDownloadedAt returns the value of the "lastDownloadedAt" field in the mutation.

func (*StorageLocationMutation) LastDownloadedAtCleared

func (m *StorageLocationMutation) LastDownloadedAtCleared() bool

LastDownloadedAtCleared returns if the "lastDownloadedAt" field was cleared in this mutation.

func (*StorageLocationMutation) LeaseVersion

func (m *StorageLocationMutation) LeaseVersion() (r int64, exists bool)

LeaseVersion returns the value of the "leaseVersion" field in the mutation.

func (*StorageLocationMutation) MaterializationUnsupportedAt

func (m *StorageLocationMutation) MaterializationUnsupportedAt() (r int64, exists bool)

MaterializationUnsupportedAt returns the value of the "materializationUnsupportedAt" field in the mutation.

func (*StorageLocationMutation) MaterializationUnsupportedAtCleared

func (m *StorageLocationMutation) MaterializationUnsupportedAtCleared() bool

MaterializationUnsupportedAtCleared returns if the "materializationUnsupportedAt" field was cleared in this mutation.

func (*StorageLocationMutation) MergeLeaseExpiresAt

func (m *StorageLocationMutation) MergeLeaseExpiresAt() (r int64, exists bool)

MergeLeaseExpiresAt returns the value of the "mergeLeaseExpiresAt" field in the mutation.

func (*StorageLocationMutation) MergeLeaseExpiresAtCleared

func (m *StorageLocationMutation) MergeLeaseExpiresAtCleared() bool

MergeLeaseExpiresAtCleared returns if the "mergeLeaseExpiresAt" field was cleared in this mutation.

func (*StorageLocationMutation) MergeLeaseToken

func (m *StorageLocationMutation) MergeLeaseToken() (r string, exists bool)

MergeLeaseToken returns the value of the "mergeLeaseToken" field in the mutation.

func (*StorageLocationMutation) MergeLeaseTokenCleared

func (m *StorageLocationMutation) MergeLeaseTokenCleared() bool

MergeLeaseTokenCleared returns if the "mergeLeaseToken" field was cleared in this mutation.

func (*StorageLocationMutation) MergeStartedAt

func (m *StorageLocationMutation) MergeStartedAt() (r int64, exists bool)

MergeStartedAt returns the value of the "mergeStartedAt" field in the mutation.

func (*StorageLocationMutation) MergeStartedAtCleared

func (m *StorageLocationMutation) MergeStartedAtCleared() bool

MergeStartedAtCleared returns if the "mergeStartedAt" field was cleared in this mutation.

func (*StorageLocationMutation) MergedAt

func (m *StorageLocationMutation) MergedAt() (r int64, exists bool)

MergedAt returns the value of the "mergedAt" field in the mutation.

func (*StorageLocationMutation) MergedAtCleared

func (m *StorageLocationMutation) MergedAtCleared() bool

MergedAtCleared returns if the "mergedAt" field was cleared in this mutation.

func (*StorageLocationMutation) OldDeletionRequestedAt

func (m *StorageLocationMutation) OldDeletionRequestedAt(ctx context.Context) (v *int64, err error)

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

func (*StorageLocationMutation) OldField

func (m *StorageLocationMutation) 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 (*StorageLocationMutation) OldFolderName

func (m *StorageLocationMutation) OldFolderName(ctx context.Context) (v string, err error)

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

func (*StorageLocationMutation) OldLastDownloadedAt

func (m *StorageLocationMutation) OldLastDownloadedAt(ctx context.Context) (v *int64, err error)

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

func (*StorageLocationMutation) OldLeaseVersion

func (m *StorageLocationMutation) OldLeaseVersion(ctx context.Context) (v int64, err error)

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

func (*StorageLocationMutation) OldMaterializationUnsupportedAt

func (m *StorageLocationMutation) OldMaterializationUnsupportedAt(ctx context.Context) (v *int64, err error)

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

func (*StorageLocationMutation) OldMergeLeaseExpiresAt

func (m *StorageLocationMutation) OldMergeLeaseExpiresAt(ctx context.Context) (v *int64, err error)

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

func (*StorageLocationMutation) OldMergeLeaseToken

func (m *StorageLocationMutation) OldMergeLeaseToken(ctx context.Context) (v *string, err error)

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

func (*StorageLocationMutation) OldMergeStartedAt

func (m *StorageLocationMutation) OldMergeStartedAt(ctx context.Context) (v *int64, err error)

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

func (*StorageLocationMutation) OldMergedAt

func (m *StorageLocationMutation) OldMergedAt(ctx context.Context) (v *int64, err error)

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

func (*StorageLocationMutation) OldPartCount

func (m *StorageLocationMutation) OldPartCount(ctx context.Context) (v int, err error)

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

func (*StorageLocationMutation) OldPartsDeletedAt

func (m *StorageLocationMutation) OldPartsDeletedAt(ctx context.Context) (v *int64, err error)

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

func (*StorageLocationMutation) OldRecencyAt added in v1.1.2

func (m *StorageLocationMutation) OldRecencyAt(ctx context.Context) (v int64, err error)

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

func (*StorageLocationMutation) OldSizeBytes

func (m *StorageLocationMutation) OldSizeBytes(ctx context.Context) (v *int64, err error)

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

func (*StorageLocationMutation) Op

func (m *StorageLocationMutation) Op() Op

Op returns the operation name.

func (*StorageLocationMutation) PartCount

func (m *StorageLocationMutation) PartCount() (r int, exists bool)

PartCount returns the value of the "partCount" field in the mutation.

func (*StorageLocationMutation) PartsDeletedAt

func (m *StorageLocationMutation) PartsDeletedAt() (r int64, exists bool)

PartsDeletedAt returns the value of the "partsDeletedAt" field in the mutation.

func (*StorageLocationMutation) PartsDeletedAtCleared

func (m *StorageLocationMutation) PartsDeletedAtCleared() bool

PartsDeletedAtCleared returns if the "partsDeletedAt" field was cleared in this mutation.

func (*StorageLocationMutation) ReaderLeasesCleared

func (m *StorageLocationMutation) ReaderLeasesCleared() bool

ReaderLeasesCleared reports if the "readerLeases" edge to the StorageReaderLease entity was cleared.

func (*StorageLocationMutation) ReaderLeasesIDs

func (m *StorageLocationMutation) ReaderLeasesIDs() (ids []string)

ReaderLeasesIDs returns the "readerLeases" edge IDs in the mutation.

func (*StorageLocationMutation) RecencyAt added in v1.1.2

func (m *StorageLocationMutation) RecencyAt() (r int64, exists bool)

RecencyAt returns the value of the "recencyAt" field in the mutation.

func (*StorageLocationMutation) RemoveCacheEntryIDs

func (m *StorageLocationMutation) RemoveCacheEntryIDs(ids ...string)

RemoveCacheEntryIDs removes the "cacheEntries" edge to the CacheEntry entity by IDs.

func (*StorageLocationMutation) RemoveReaderLeaseIDs

func (m *StorageLocationMutation) RemoveReaderLeaseIDs(ids ...string)

RemoveReaderLeaseIDs removes the "readerLeases" edge to the StorageReaderLease entity by IDs.

func (*StorageLocationMutation) RemovedCacheEntriesIDs

func (m *StorageLocationMutation) RemovedCacheEntriesIDs() (ids []string)

RemovedCacheEntries returns the removed IDs of the "cacheEntries" edge to the CacheEntry entity.

func (*StorageLocationMutation) RemovedEdges

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

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

func (*StorageLocationMutation) RemovedIDs

func (m *StorageLocationMutation) 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 (*StorageLocationMutation) RemovedReaderLeasesIDs

func (m *StorageLocationMutation) RemovedReaderLeasesIDs() (ids []string)

RemovedReaderLeases returns the removed IDs of the "readerLeases" edge to the StorageReaderLease entity.

func (*StorageLocationMutation) ResetCacheEntries

func (m *StorageLocationMutation) ResetCacheEntries()

ResetCacheEntries resets all changes to the "cacheEntries" edge.

func (*StorageLocationMutation) ResetDeletionRequestedAt

func (m *StorageLocationMutation) ResetDeletionRequestedAt()

ResetDeletionRequestedAt resets all changes to the "deletionRequestedAt" field.

func (*StorageLocationMutation) ResetEdge

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

func (m *StorageLocationMutation) 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 (*StorageLocationMutation) ResetFolderName

func (m *StorageLocationMutation) ResetFolderName()

ResetFolderName resets all changes to the "folderName" field.

func (*StorageLocationMutation) ResetLastDownloadedAt

func (m *StorageLocationMutation) ResetLastDownloadedAt()

ResetLastDownloadedAt resets all changes to the "lastDownloadedAt" field.

func (*StorageLocationMutation) ResetLeaseVersion

func (m *StorageLocationMutation) ResetLeaseVersion()

ResetLeaseVersion resets all changes to the "leaseVersion" field.

func (*StorageLocationMutation) ResetMaterializationUnsupportedAt

func (m *StorageLocationMutation) ResetMaterializationUnsupportedAt()

ResetMaterializationUnsupportedAt resets all changes to the "materializationUnsupportedAt" field.

func (*StorageLocationMutation) ResetMergeLeaseExpiresAt

func (m *StorageLocationMutation) ResetMergeLeaseExpiresAt()

ResetMergeLeaseExpiresAt resets all changes to the "mergeLeaseExpiresAt" field.

func (*StorageLocationMutation) ResetMergeLeaseToken

func (m *StorageLocationMutation) ResetMergeLeaseToken()

ResetMergeLeaseToken resets all changes to the "mergeLeaseToken" field.

func (*StorageLocationMutation) ResetMergeStartedAt

func (m *StorageLocationMutation) ResetMergeStartedAt()

ResetMergeStartedAt resets all changes to the "mergeStartedAt" field.

func (*StorageLocationMutation) ResetMergedAt

func (m *StorageLocationMutation) ResetMergedAt()

ResetMergedAt resets all changes to the "mergedAt" field.

func (*StorageLocationMutation) ResetPartCount

func (m *StorageLocationMutation) ResetPartCount()

ResetPartCount resets all changes to the "partCount" field.

func (*StorageLocationMutation) ResetPartsDeletedAt

func (m *StorageLocationMutation) ResetPartsDeletedAt()

ResetPartsDeletedAt resets all changes to the "partsDeletedAt" field.

func (*StorageLocationMutation) ResetReaderLeases

func (m *StorageLocationMutation) ResetReaderLeases()

ResetReaderLeases resets all changes to the "readerLeases" edge.

func (*StorageLocationMutation) ResetRecencyAt added in v1.1.2

func (m *StorageLocationMutation) ResetRecencyAt()

ResetRecencyAt resets all changes to the "recencyAt" field.

func (*StorageLocationMutation) ResetSizeBytes

func (m *StorageLocationMutation) ResetSizeBytes()

ResetSizeBytes resets all changes to the "sizeBytes" field.

func (*StorageLocationMutation) SetDeletionRequestedAt

func (m *StorageLocationMutation) SetDeletionRequestedAt(i int64)

SetDeletionRequestedAt sets the "deletionRequestedAt" field.

func (*StorageLocationMutation) SetField

func (m *StorageLocationMutation) 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 (*StorageLocationMutation) SetFolderName

func (m *StorageLocationMutation) SetFolderName(s string)

SetFolderName sets the "folderName" field.

func (*StorageLocationMutation) SetID

func (m *StorageLocationMutation) SetID(id string)

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

func (*StorageLocationMutation) SetLastDownloadedAt

func (m *StorageLocationMutation) SetLastDownloadedAt(i int64)

SetLastDownloadedAt sets the "lastDownloadedAt" field.

func (*StorageLocationMutation) SetLeaseVersion

func (m *StorageLocationMutation) SetLeaseVersion(i int64)

SetLeaseVersion sets the "leaseVersion" field.

func (*StorageLocationMutation) SetMaterializationUnsupportedAt

func (m *StorageLocationMutation) SetMaterializationUnsupportedAt(i int64)

SetMaterializationUnsupportedAt sets the "materializationUnsupportedAt" field.

func (*StorageLocationMutation) SetMergeLeaseExpiresAt

func (m *StorageLocationMutation) SetMergeLeaseExpiresAt(i int64)

SetMergeLeaseExpiresAt sets the "mergeLeaseExpiresAt" field.

func (*StorageLocationMutation) SetMergeLeaseToken

func (m *StorageLocationMutation) SetMergeLeaseToken(s string)

SetMergeLeaseToken sets the "mergeLeaseToken" field.

func (*StorageLocationMutation) SetMergeStartedAt

func (m *StorageLocationMutation) SetMergeStartedAt(i int64)

SetMergeStartedAt sets the "mergeStartedAt" field.

func (*StorageLocationMutation) SetMergedAt

func (m *StorageLocationMutation) SetMergedAt(i int64)

SetMergedAt sets the "mergedAt" field.

func (*StorageLocationMutation) SetOp

func (m *StorageLocationMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*StorageLocationMutation) SetPartCount

func (m *StorageLocationMutation) SetPartCount(i int)

SetPartCount sets the "partCount" field.

func (*StorageLocationMutation) SetPartsDeletedAt

func (m *StorageLocationMutation) SetPartsDeletedAt(i int64)

SetPartsDeletedAt sets the "partsDeletedAt" field.

func (*StorageLocationMutation) SetRecencyAt added in v1.1.2

func (m *StorageLocationMutation) SetRecencyAt(i int64)

SetRecencyAt sets the "recencyAt" field.

func (*StorageLocationMutation) SetSizeBytes

func (m *StorageLocationMutation) SetSizeBytes(i int64)

SetSizeBytes sets the "sizeBytes" field.

func (*StorageLocationMutation) SizeBytes

func (m *StorageLocationMutation) SizeBytes() (r int64, exists bool)

SizeBytes returns the value of the "sizeBytes" field in the mutation.

func (*StorageLocationMutation) SizeBytesCleared

func (m *StorageLocationMutation) SizeBytesCleared() bool

SizeBytesCleared returns if the "sizeBytes" field was cleared in this mutation.

func (StorageLocationMutation) Tx

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

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

func (*StorageLocationMutation) Type

func (m *StorageLocationMutation) Type() string

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

func (*StorageLocationMutation) Where

Where appends a list predicates to the StorageLocationMutation builder.

func (*StorageLocationMutation) WhereP

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

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

type StorageLocationQuery

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

StorageLocationQuery is the builder for querying StorageLocation entities.

func (*StorageLocationQuery) Aggregate

Aggregate returns a StorageLocationSelect configured with the given aggregations.

func (*StorageLocationQuery) All

All executes the query and returns a list of StorageLocations.

func (*StorageLocationQuery) AllX

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

func (*StorageLocationQuery) Clone

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

func (*StorageLocationQuery) Count

func (_q *StorageLocationQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*StorageLocationQuery) CountX

func (_q *StorageLocationQuery) CountX(ctx context.Context) int

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

func (*StorageLocationQuery) Exist

func (_q *StorageLocationQuery) Exist(ctx context.Context) (bool, error)

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

func (*StorageLocationQuery) ExistX

func (_q *StorageLocationQuery) ExistX(ctx context.Context) bool

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

func (*StorageLocationQuery) First

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

func (*StorageLocationQuery) FirstID

func (_q *StorageLocationQuery) FirstID(ctx context.Context) (id string, err error)

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

func (*StorageLocationQuery) FirstIDX

func (_q *StorageLocationQuery) FirstIDX(ctx context.Context) string

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

func (*StorageLocationQuery) FirstX

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

func (*StorageLocationQuery) GroupBy

func (_q *StorageLocationQuery) GroupBy(field string, fields ...string) *StorageLocationGroupBy

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

client.StorageLocation.Query().
	GroupBy(storagelocation.FieldFolderName).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*StorageLocationQuery) IDs

func (_q *StorageLocationQuery) IDs(ctx context.Context) (ids []string, err error)

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

func (*StorageLocationQuery) IDsX

func (_q *StorageLocationQuery) IDsX(ctx context.Context) []string

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

func (*StorageLocationQuery) Limit

func (_q *StorageLocationQuery) Limit(limit int) *StorageLocationQuery

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

func (*StorageLocationQuery) Offset

func (_q *StorageLocationQuery) Offset(offset int) *StorageLocationQuery

Offset to start from.

func (*StorageLocationQuery) Only

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

func (*StorageLocationQuery) OnlyID

func (_q *StorageLocationQuery) OnlyID(ctx context.Context) (id string, err error)

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

func (*StorageLocationQuery) OnlyIDX

func (_q *StorageLocationQuery) OnlyIDX(ctx context.Context) string

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

func (*StorageLocationQuery) OnlyX

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

func (*StorageLocationQuery) Order

Order specifies how the records should be ordered.

func (*StorageLocationQuery) QueryCacheEntries

func (_q *StorageLocationQuery) QueryCacheEntries() *CacheEntryQuery

QueryCacheEntries chains the current query on the "cacheEntries" edge.

func (*StorageLocationQuery) QueryReaderLeases

func (_q *StorageLocationQuery) QueryReaderLeases() *StorageReaderLeaseQuery

QueryReaderLeases chains the current query on the "readerLeases" edge.

func (*StorageLocationQuery) Select

func (_q *StorageLocationQuery) Select(fields ...string) *StorageLocationSelect

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 {
	FolderName string `json:"folderName,omitempty"`
}

client.StorageLocation.Query().
	Select(storagelocation.FieldFolderName).
	Scan(ctx, &v)

func (*StorageLocationQuery) Unique

func (_q *StorageLocationQuery) Unique(unique bool) *StorageLocationQuery

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

Where adds a new predicate for the StorageLocationQuery builder.

func (*StorageLocationQuery) WithCacheEntries

func (_q *StorageLocationQuery) WithCacheEntries(opts ...func(*CacheEntryQuery)) *StorageLocationQuery

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

func (*StorageLocationQuery) WithReaderLeases

func (_q *StorageLocationQuery) WithReaderLeases(opts ...func(*StorageReaderLeaseQuery)) *StorageLocationQuery

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

type StorageLocationSelect

type StorageLocationSelect struct {
	*StorageLocationQuery
	// contains filtered or unexported fields
}

StorageLocationSelect is the builder for selecting fields of StorageLocation entities.

func (*StorageLocationSelect) Aggregate

Aggregate adds the given aggregation functions to the selector query.

func (*StorageLocationSelect) Bool

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

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

func (*StorageLocationSelect) BoolX

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

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

func (*StorageLocationSelect) Bools

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

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

func (*StorageLocationSelect) BoolsX

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

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

func (*StorageLocationSelect) Float64

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

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

func (*StorageLocationSelect) Float64X

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

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

func (*StorageLocationSelect) Float64s

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

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

func (*StorageLocationSelect) Float64sX

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

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

func (*StorageLocationSelect) Int

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

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

func (*StorageLocationSelect) IntX

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

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

func (*StorageLocationSelect) Ints

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

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

func (*StorageLocationSelect) IntsX

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

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

func (*StorageLocationSelect) Scan

func (_s *StorageLocationSelect) Scan(ctx context.Context, v any) error

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

func (*StorageLocationSelect) ScanX

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

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

func (*StorageLocationSelect) String

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

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

func (*StorageLocationSelect) StringX

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

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

func (*StorageLocationSelect) Strings

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

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

func (*StorageLocationSelect) StringsX

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

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

type StorageLocationUpdate

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

StorageLocationUpdate is the builder for updating StorageLocation entities.

func (*StorageLocationUpdate) AddCacheEntries

func (_u *StorageLocationUpdate) AddCacheEntries(v ...*CacheEntry) *StorageLocationUpdate

AddCacheEntries adds the "cacheEntries" edges to the CacheEntry entity.

func (*StorageLocationUpdate) AddCacheEntryIDs

func (_u *StorageLocationUpdate) AddCacheEntryIDs(ids ...string) *StorageLocationUpdate

AddCacheEntryIDs adds the "cacheEntries" edge to the CacheEntry entity by IDs.

func (*StorageLocationUpdate) AddDeletionRequestedAt

func (_u *StorageLocationUpdate) AddDeletionRequestedAt(v int64) *StorageLocationUpdate

AddDeletionRequestedAt adds value to the "deletionRequestedAt" field.

func (*StorageLocationUpdate) AddLastDownloadedAt

func (_u *StorageLocationUpdate) AddLastDownloadedAt(v int64) *StorageLocationUpdate

AddLastDownloadedAt adds value to the "lastDownloadedAt" field.

func (*StorageLocationUpdate) AddLeaseVersion

func (_u *StorageLocationUpdate) AddLeaseVersion(v int64) *StorageLocationUpdate

AddLeaseVersion adds value to the "leaseVersion" field.

func (*StorageLocationUpdate) AddMaterializationUnsupportedAt

func (_u *StorageLocationUpdate) AddMaterializationUnsupportedAt(v int64) *StorageLocationUpdate

AddMaterializationUnsupportedAt adds value to the "materializationUnsupportedAt" field.

func (*StorageLocationUpdate) AddMergeLeaseExpiresAt

func (_u *StorageLocationUpdate) AddMergeLeaseExpiresAt(v int64) *StorageLocationUpdate

AddMergeLeaseExpiresAt adds value to the "mergeLeaseExpiresAt" field.

func (*StorageLocationUpdate) AddMergeStartedAt

func (_u *StorageLocationUpdate) AddMergeStartedAt(v int64) *StorageLocationUpdate

AddMergeStartedAt adds value to the "mergeStartedAt" field.

func (*StorageLocationUpdate) AddMergedAt

AddMergedAt adds value to the "mergedAt" field.

func (*StorageLocationUpdate) AddPartCount

func (_u *StorageLocationUpdate) AddPartCount(v int) *StorageLocationUpdate

AddPartCount adds value to the "partCount" field.

func (*StorageLocationUpdate) AddPartsDeletedAt

func (_u *StorageLocationUpdate) AddPartsDeletedAt(v int64) *StorageLocationUpdate

AddPartsDeletedAt adds value to the "partsDeletedAt" field.

func (*StorageLocationUpdate) AddReaderLeaseIDs

func (_u *StorageLocationUpdate) AddReaderLeaseIDs(ids ...string) *StorageLocationUpdate

AddReaderLeaseIDs adds the "readerLeases" edge to the StorageReaderLease entity by IDs.

func (*StorageLocationUpdate) AddReaderLeases

AddReaderLeases adds the "readerLeases" edges to the StorageReaderLease entity.

func (*StorageLocationUpdate) AddRecencyAt added in v1.1.2

func (_u *StorageLocationUpdate) AddRecencyAt(v int64) *StorageLocationUpdate

AddRecencyAt adds value to the "recencyAt" field.

func (*StorageLocationUpdate) AddSizeBytes

func (_u *StorageLocationUpdate) AddSizeBytes(v int64) *StorageLocationUpdate

AddSizeBytes adds value to the "sizeBytes" field.

func (*StorageLocationUpdate) ClearCacheEntries

func (_u *StorageLocationUpdate) ClearCacheEntries() *StorageLocationUpdate

ClearCacheEntries clears all "cacheEntries" edges to the CacheEntry entity.

func (*StorageLocationUpdate) ClearDeletionRequestedAt

func (_u *StorageLocationUpdate) ClearDeletionRequestedAt() *StorageLocationUpdate

ClearDeletionRequestedAt clears the value of the "deletionRequestedAt" field.

func (*StorageLocationUpdate) ClearLastDownloadedAt

func (_u *StorageLocationUpdate) ClearLastDownloadedAt() *StorageLocationUpdate

ClearLastDownloadedAt clears the value of the "lastDownloadedAt" field.

func (*StorageLocationUpdate) ClearMaterializationUnsupportedAt

func (_u *StorageLocationUpdate) ClearMaterializationUnsupportedAt() *StorageLocationUpdate

ClearMaterializationUnsupportedAt clears the value of the "materializationUnsupportedAt" field.

func (*StorageLocationUpdate) ClearMergeLeaseExpiresAt

func (_u *StorageLocationUpdate) ClearMergeLeaseExpiresAt() *StorageLocationUpdate

ClearMergeLeaseExpiresAt clears the value of the "mergeLeaseExpiresAt" field.

func (*StorageLocationUpdate) ClearMergeLeaseToken

func (_u *StorageLocationUpdate) ClearMergeLeaseToken() *StorageLocationUpdate

ClearMergeLeaseToken clears the value of the "mergeLeaseToken" field.

func (*StorageLocationUpdate) ClearMergeStartedAt

func (_u *StorageLocationUpdate) ClearMergeStartedAt() *StorageLocationUpdate

ClearMergeStartedAt clears the value of the "mergeStartedAt" field.

func (*StorageLocationUpdate) ClearMergedAt

func (_u *StorageLocationUpdate) ClearMergedAt() *StorageLocationUpdate

ClearMergedAt clears the value of the "mergedAt" field.

func (*StorageLocationUpdate) ClearPartsDeletedAt

func (_u *StorageLocationUpdate) ClearPartsDeletedAt() *StorageLocationUpdate

ClearPartsDeletedAt clears the value of the "partsDeletedAt" field.

func (*StorageLocationUpdate) ClearReaderLeases

func (_u *StorageLocationUpdate) ClearReaderLeases() *StorageLocationUpdate

ClearReaderLeases clears all "readerLeases" edges to the StorageReaderLease entity.

func (*StorageLocationUpdate) ClearSizeBytes

func (_u *StorageLocationUpdate) ClearSizeBytes() *StorageLocationUpdate

ClearSizeBytes clears the value of the "sizeBytes" field.

func (*StorageLocationUpdate) Exec

Exec executes the query.

func (*StorageLocationUpdate) ExecX

func (_u *StorageLocationUpdate) ExecX(ctx context.Context)

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

func (*StorageLocationUpdate) Mutation

Mutation returns the StorageLocationMutation object of the builder.

func (*StorageLocationUpdate) RemoveCacheEntries

func (_u *StorageLocationUpdate) RemoveCacheEntries(v ...*CacheEntry) *StorageLocationUpdate

RemoveCacheEntries removes "cacheEntries" edges to CacheEntry entities.

func (*StorageLocationUpdate) RemoveCacheEntryIDs

func (_u *StorageLocationUpdate) RemoveCacheEntryIDs(ids ...string) *StorageLocationUpdate

RemoveCacheEntryIDs removes the "cacheEntries" edge to CacheEntry entities by IDs.

func (*StorageLocationUpdate) RemoveReaderLeaseIDs

func (_u *StorageLocationUpdate) RemoveReaderLeaseIDs(ids ...string) *StorageLocationUpdate

RemoveReaderLeaseIDs removes the "readerLeases" edge to StorageReaderLease entities by IDs.

func (*StorageLocationUpdate) RemoveReaderLeases

func (_u *StorageLocationUpdate) RemoveReaderLeases(v ...*StorageReaderLease) *StorageLocationUpdate

RemoveReaderLeases removes "readerLeases" edges to StorageReaderLease entities.

func (*StorageLocationUpdate) Save

func (_u *StorageLocationUpdate) Save(ctx context.Context) (int, error)

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

func (*StorageLocationUpdate) SaveX

func (_u *StorageLocationUpdate) SaveX(ctx context.Context) int

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

func (*StorageLocationUpdate) SetDeletionRequestedAt

func (_u *StorageLocationUpdate) SetDeletionRequestedAt(v int64) *StorageLocationUpdate

SetDeletionRequestedAt sets the "deletionRequestedAt" field.

func (*StorageLocationUpdate) SetFolderName

func (_u *StorageLocationUpdate) SetFolderName(v string) *StorageLocationUpdate

SetFolderName sets the "folderName" field.

func (*StorageLocationUpdate) SetLastDownloadedAt

func (_u *StorageLocationUpdate) SetLastDownloadedAt(v int64) *StorageLocationUpdate

SetLastDownloadedAt sets the "lastDownloadedAt" field.

func (*StorageLocationUpdate) SetLeaseVersion

func (_u *StorageLocationUpdate) SetLeaseVersion(v int64) *StorageLocationUpdate

SetLeaseVersion sets the "leaseVersion" field.

func (*StorageLocationUpdate) SetMaterializationUnsupportedAt

func (_u *StorageLocationUpdate) SetMaterializationUnsupportedAt(v int64) *StorageLocationUpdate

SetMaterializationUnsupportedAt sets the "materializationUnsupportedAt" field.

func (*StorageLocationUpdate) SetMergeLeaseExpiresAt

func (_u *StorageLocationUpdate) SetMergeLeaseExpiresAt(v int64) *StorageLocationUpdate

SetMergeLeaseExpiresAt sets the "mergeLeaseExpiresAt" field.

func (*StorageLocationUpdate) SetMergeLeaseToken

func (_u *StorageLocationUpdate) SetMergeLeaseToken(v string) *StorageLocationUpdate

SetMergeLeaseToken sets the "mergeLeaseToken" field.

func (*StorageLocationUpdate) SetMergeStartedAt

func (_u *StorageLocationUpdate) SetMergeStartedAt(v int64) *StorageLocationUpdate

SetMergeStartedAt sets the "mergeStartedAt" field.

func (*StorageLocationUpdate) SetMergedAt

SetMergedAt sets the "mergedAt" field.

func (*StorageLocationUpdate) SetNillableDeletionRequestedAt

func (_u *StorageLocationUpdate) SetNillableDeletionRequestedAt(v *int64) *StorageLocationUpdate

SetNillableDeletionRequestedAt sets the "deletionRequestedAt" field if the given value is not nil.

func (*StorageLocationUpdate) SetNillableFolderName

func (_u *StorageLocationUpdate) SetNillableFolderName(v *string) *StorageLocationUpdate

SetNillableFolderName sets the "folderName" field if the given value is not nil.

func (*StorageLocationUpdate) SetNillableLastDownloadedAt

func (_u *StorageLocationUpdate) SetNillableLastDownloadedAt(v *int64) *StorageLocationUpdate

SetNillableLastDownloadedAt sets the "lastDownloadedAt" field if the given value is not nil.

func (*StorageLocationUpdate) SetNillableLeaseVersion

func (_u *StorageLocationUpdate) SetNillableLeaseVersion(v *int64) *StorageLocationUpdate

SetNillableLeaseVersion sets the "leaseVersion" field if the given value is not nil.

func (*StorageLocationUpdate) SetNillableMaterializationUnsupportedAt

func (_u *StorageLocationUpdate) SetNillableMaterializationUnsupportedAt(v *int64) *StorageLocationUpdate

SetNillableMaterializationUnsupportedAt sets the "materializationUnsupportedAt" field if the given value is not nil.

func (*StorageLocationUpdate) SetNillableMergeLeaseExpiresAt

func (_u *StorageLocationUpdate) SetNillableMergeLeaseExpiresAt(v *int64) *StorageLocationUpdate

SetNillableMergeLeaseExpiresAt sets the "mergeLeaseExpiresAt" field if the given value is not nil.

func (*StorageLocationUpdate) SetNillableMergeLeaseToken

func (_u *StorageLocationUpdate) SetNillableMergeLeaseToken(v *string) *StorageLocationUpdate

SetNillableMergeLeaseToken sets the "mergeLeaseToken" field if the given value is not nil.

func (*StorageLocationUpdate) SetNillableMergeStartedAt

func (_u *StorageLocationUpdate) SetNillableMergeStartedAt(v *int64) *StorageLocationUpdate

SetNillableMergeStartedAt sets the "mergeStartedAt" field if the given value is not nil.

func (*StorageLocationUpdate) SetNillableMergedAt

func (_u *StorageLocationUpdate) SetNillableMergedAt(v *int64) *StorageLocationUpdate

SetNillableMergedAt sets the "mergedAt" field if the given value is not nil.

func (*StorageLocationUpdate) SetNillablePartCount

func (_u *StorageLocationUpdate) SetNillablePartCount(v *int) *StorageLocationUpdate

SetNillablePartCount sets the "partCount" field if the given value is not nil.

func (*StorageLocationUpdate) SetNillablePartsDeletedAt

func (_u *StorageLocationUpdate) SetNillablePartsDeletedAt(v *int64) *StorageLocationUpdate

SetNillablePartsDeletedAt sets the "partsDeletedAt" field if the given value is not nil.

func (*StorageLocationUpdate) SetNillableRecencyAt added in v1.1.2

func (_u *StorageLocationUpdate) SetNillableRecencyAt(v *int64) *StorageLocationUpdate

SetNillableRecencyAt sets the "recencyAt" field if the given value is not nil.

func (*StorageLocationUpdate) SetNillableSizeBytes

func (_u *StorageLocationUpdate) SetNillableSizeBytes(v *int64) *StorageLocationUpdate

SetNillableSizeBytes sets the "sizeBytes" field if the given value is not nil.

func (*StorageLocationUpdate) SetPartCount

func (_u *StorageLocationUpdate) SetPartCount(v int) *StorageLocationUpdate

SetPartCount sets the "partCount" field.

func (*StorageLocationUpdate) SetPartsDeletedAt

func (_u *StorageLocationUpdate) SetPartsDeletedAt(v int64) *StorageLocationUpdate

SetPartsDeletedAt sets the "partsDeletedAt" field.

func (*StorageLocationUpdate) SetRecencyAt added in v1.1.2

func (_u *StorageLocationUpdate) SetRecencyAt(v int64) *StorageLocationUpdate

SetRecencyAt sets the "recencyAt" field.

func (*StorageLocationUpdate) SetSizeBytes

func (_u *StorageLocationUpdate) SetSizeBytes(v int64) *StorageLocationUpdate

SetSizeBytes sets the "sizeBytes" field.

func (*StorageLocationUpdate) Where

Where appends a list predicates to the StorageLocationUpdate builder.

type StorageLocationUpdateOne

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

StorageLocationUpdateOne is the builder for updating a single StorageLocation entity.

func (*StorageLocationUpdateOne) AddCacheEntries

func (_u *StorageLocationUpdateOne) AddCacheEntries(v ...*CacheEntry) *StorageLocationUpdateOne

AddCacheEntries adds the "cacheEntries" edges to the CacheEntry entity.

func (*StorageLocationUpdateOne) AddCacheEntryIDs

func (_u *StorageLocationUpdateOne) AddCacheEntryIDs(ids ...string) *StorageLocationUpdateOne

AddCacheEntryIDs adds the "cacheEntries" edge to the CacheEntry entity by IDs.

func (*StorageLocationUpdateOne) AddDeletionRequestedAt

func (_u *StorageLocationUpdateOne) AddDeletionRequestedAt(v int64) *StorageLocationUpdateOne

AddDeletionRequestedAt adds value to the "deletionRequestedAt" field.

func (*StorageLocationUpdateOne) AddLastDownloadedAt

func (_u *StorageLocationUpdateOne) AddLastDownloadedAt(v int64) *StorageLocationUpdateOne

AddLastDownloadedAt adds value to the "lastDownloadedAt" field.

func (*StorageLocationUpdateOne) AddLeaseVersion

AddLeaseVersion adds value to the "leaseVersion" field.

func (*StorageLocationUpdateOne) AddMaterializationUnsupportedAt

func (_u *StorageLocationUpdateOne) AddMaterializationUnsupportedAt(v int64) *StorageLocationUpdateOne

AddMaterializationUnsupportedAt adds value to the "materializationUnsupportedAt" field.

func (*StorageLocationUpdateOne) AddMergeLeaseExpiresAt

func (_u *StorageLocationUpdateOne) AddMergeLeaseExpiresAt(v int64) *StorageLocationUpdateOne

AddMergeLeaseExpiresAt adds value to the "mergeLeaseExpiresAt" field.

func (*StorageLocationUpdateOne) AddMergeStartedAt

func (_u *StorageLocationUpdateOne) AddMergeStartedAt(v int64) *StorageLocationUpdateOne

AddMergeStartedAt adds value to the "mergeStartedAt" field.

func (*StorageLocationUpdateOne) AddMergedAt

AddMergedAt adds value to the "mergedAt" field.

func (*StorageLocationUpdateOne) AddPartCount

AddPartCount adds value to the "partCount" field.

func (*StorageLocationUpdateOne) AddPartsDeletedAt

func (_u *StorageLocationUpdateOne) AddPartsDeletedAt(v int64) *StorageLocationUpdateOne

AddPartsDeletedAt adds value to the "partsDeletedAt" field.

func (*StorageLocationUpdateOne) AddReaderLeaseIDs

func (_u *StorageLocationUpdateOne) AddReaderLeaseIDs(ids ...string) *StorageLocationUpdateOne

AddReaderLeaseIDs adds the "readerLeases" edge to the StorageReaderLease entity by IDs.

func (*StorageLocationUpdateOne) AddReaderLeases

AddReaderLeases adds the "readerLeases" edges to the StorageReaderLease entity.

func (*StorageLocationUpdateOne) AddRecencyAt added in v1.1.2

AddRecencyAt adds value to the "recencyAt" field.

func (*StorageLocationUpdateOne) AddSizeBytes

AddSizeBytes adds value to the "sizeBytes" field.

func (*StorageLocationUpdateOne) ClearCacheEntries

func (_u *StorageLocationUpdateOne) ClearCacheEntries() *StorageLocationUpdateOne

ClearCacheEntries clears all "cacheEntries" edges to the CacheEntry entity.

func (*StorageLocationUpdateOne) ClearDeletionRequestedAt

func (_u *StorageLocationUpdateOne) ClearDeletionRequestedAt() *StorageLocationUpdateOne

ClearDeletionRequestedAt clears the value of the "deletionRequestedAt" field.

func (*StorageLocationUpdateOne) ClearLastDownloadedAt

func (_u *StorageLocationUpdateOne) ClearLastDownloadedAt() *StorageLocationUpdateOne

ClearLastDownloadedAt clears the value of the "lastDownloadedAt" field.

func (*StorageLocationUpdateOne) ClearMaterializationUnsupportedAt

func (_u *StorageLocationUpdateOne) ClearMaterializationUnsupportedAt() *StorageLocationUpdateOne

ClearMaterializationUnsupportedAt clears the value of the "materializationUnsupportedAt" field.

func (*StorageLocationUpdateOne) ClearMergeLeaseExpiresAt

func (_u *StorageLocationUpdateOne) ClearMergeLeaseExpiresAt() *StorageLocationUpdateOne

ClearMergeLeaseExpiresAt clears the value of the "mergeLeaseExpiresAt" field.

func (*StorageLocationUpdateOne) ClearMergeLeaseToken

func (_u *StorageLocationUpdateOne) ClearMergeLeaseToken() *StorageLocationUpdateOne

ClearMergeLeaseToken clears the value of the "mergeLeaseToken" field.

func (*StorageLocationUpdateOne) ClearMergeStartedAt

func (_u *StorageLocationUpdateOne) ClearMergeStartedAt() *StorageLocationUpdateOne

ClearMergeStartedAt clears the value of the "mergeStartedAt" field.

func (*StorageLocationUpdateOne) ClearMergedAt

ClearMergedAt clears the value of the "mergedAt" field.

func (*StorageLocationUpdateOne) ClearPartsDeletedAt

func (_u *StorageLocationUpdateOne) ClearPartsDeletedAt() *StorageLocationUpdateOne

ClearPartsDeletedAt clears the value of the "partsDeletedAt" field.

func (*StorageLocationUpdateOne) ClearReaderLeases

func (_u *StorageLocationUpdateOne) ClearReaderLeases() *StorageLocationUpdateOne

ClearReaderLeases clears all "readerLeases" edges to the StorageReaderLease entity.

func (*StorageLocationUpdateOne) ClearSizeBytes

func (_u *StorageLocationUpdateOne) ClearSizeBytes() *StorageLocationUpdateOne

ClearSizeBytes clears the value of the "sizeBytes" field.

func (*StorageLocationUpdateOne) Exec

Exec executes the query on the entity.

func (*StorageLocationUpdateOne) ExecX

func (_u *StorageLocationUpdateOne) ExecX(ctx context.Context)

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

func (*StorageLocationUpdateOne) Mutation

Mutation returns the StorageLocationMutation object of the builder.

func (*StorageLocationUpdateOne) RemoveCacheEntries

func (_u *StorageLocationUpdateOne) RemoveCacheEntries(v ...*CacheEntry) *StorageLocationUpdateOne

RemoveCacheEntries removes "cacheEntries" edges to CacheEntry entities.

func (*StorageLocationUpdateOne) RemoveCacheEntryIDs

func (_u *StorageLocationUpdateOne) RemoveCacheEntryIDs(ids ...string) *StorageLocationUpdateOne

RemoveCacheEntryIDs removes the "cacheEntries" edge to CacheEntry entities by IDs.

func (*StorageLocationUpdateOne) RemoveReaderLeaseIDs

func (_u *StorageLocationUpdateOne) RemoveReaderLeaseIDs(ids ...string) *StorageLocationUpdateOne

RemoveReaderLeaseIDs removes the "readerLeases" edge to StorageReaderLease entities by IDs.

func (*StorageLocationUpdateOne) RemoveReaderLeases

RemoveReaderLeases removes "readerLeases" edges to StorageReaderLease entities.

func (*StorageLocationUpdateOne) Save

Save executes the query and returns the updated StorageLocation entity.

func (*StorageLocationUpdateOne) SaveX

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

func (*StorageLocationUpdateOne) Select

func (_u *StorageLocationUpdateOne) Select(field string, fields ...string) *StorageLocationUpdateOne

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

func (*StorageLocationUpdateOne) SetDeletionRequestedAt

func (_u *StorageLocationUpdateOne) SetDeletionRequestedAt(v int64) *StorageLocationUpdateOne

SetDeletionRequestedAt sets the "deletionRequestedAt" field.

func (*StorageLocationUpdateOne) SetFolderName

SetFolderName sets the "folderName" field.

func (*StorageLocationUpdateOne) SetLastDownloadedAt

func (_u *StorageLocationUpdateOne) SetLastDownloadedAt(v int64) *StorageLocationUpdateOne

SetLastDownloadedAt sets the "lastDownloadedAt" field.

func (*StorageLocationUpdateOne) SetLeaseVersion

SetLeaseVersion sets the "leaseVersion" field.

func (*StorageLocationUpdateOne) SetMaterializationUnsupportedAt

func (_u *StorageLocationUpdateOne) SetMaterializationUnsupportedAt(v int64) *StorageLocationUpdateOne

SetMaterializationUnsupportedAt sets the "materializationUnsupportedAt" field.

func (*StorageLocationUpdateOne) SetMergeLeaseExpiresAt

func (_u *StorageLocationUpdateOne) SetMergeLeaseExpiresAt(v int64) *StorageLocationUpdateOne

SetMergeLeaseExpiresAt sets the "mergeLeaseExpiresAt" field.

func (*StorageLocationUpdateOne) SetMergeLeaseToken

func (_u *StorageLocationUpdateOne) SetMergeLeaseToken(v string) *StorageLocationUpdateOne

SetMergeLeaseToken sets the "mergeLeaseToken" field.

func (*StorageLocationUpdateOne) SetMergeStartedAt

func (_u *StorageLocationUpdateOne) SetMergeStartedAt(v int64) *StorageLocationUpdateOne

SetMergeStartedAt sets the "mergeStartedAt" field.

func (*StorageLocationUpdateOne) SetMergedAt

SetMergedAt sets the "mergedAt" field.

func (*StorageLocationUpdateOne) SetNillableDeletionRequestedAt

func (_u *StorageLocationUpdateOne) SetNillableDeletionRequestedAt(v *int64) *StorageLocationUpdateOne

SetNillableDeletionRequestedAt sets the "deletionRequestedAt" field if the given value is not nil.

func (*StorageLocationUpdateOne) SetNillableFolderName

func (_u *StorageLocationUpdateOne) SetNillableFolderName(v *string) *StorageLocationUpdateOne

SetNillableFolderName sets the "folderName" field if the given value is not nil.

func (*StorageLocationUpdateOne) SetNillableLastDownloadedAt

func (_u *StorageLocationUpdateOne) SetNillableLastDownloadedAt(v *int64) *StorageLocationUpdateOne

SetNillableLastDownloadedAt sets the "lastDownloadedAt" field if the given value is not nil.

func (*StorageLocationUpdateOne) SetNillableLeaseVersion

func (_u *StorageLocationUpdateOne) SetNillableLeaseVersion(v *int64) *StorageLocationUpdateOne

SetNillableLeaseVersion sets the "leaseVersion" field if the given value is not nil.

func (*StorageLocationUpdateOne) SetNillableMaterializationUnsupportedAt

func (_u *StorageLocationUpdateOne) SetNillableMaterializationUnsupportedAt(v *int64) *StorageLocationUpdateOne

SetNillableMaterializationUnsupportedAt sets the "materializationUnsupportedAt" field if the given value is not nil.

func (*StorageLocationUpdateOne) SetNillableMergeLeaseExpiresAt

func (_u *StorageLocationUpdateOne) SetNillableMergeLeaseExpiresAt(v *int64) *StorageLocationUpdateOne

SetNillableMergeLeaseExpiresAt sets the "mergeLeaseExpiresAt" field if the given value is not nil.

func (*StorageLocationUpdateOne) SetNillableMergeLeaseToken

func (_u *StorageLocationUpdateOne) SetNillableMergeLeaseToken(v *string) *StorageLocationUpdateOne

SetNillableMergeLeaseToken sets the "mergeLeaseToken" field if the given value is not nil.

func (*StorageLocationUpdateOne) SetNillableMergeStartedAt

func (_u *StorageLocationUpdateOne) SetNillableMergeStartedAt(v *int64) *StorageLocationUpdateOne

SetNillableMergeStartedAt sets the "mergeStartedAt" field if the given value is not nil.

func (*StorageLocationUpdateOne) SetNillableMergedAt

func (_u *StorageLocationUpdateOne) SetNillableMergedAt(v *int64) *StorageLocationUpdateOne

SetNillableMergedAt sets the "mergedAt" field if the given value is not nil.

func (*StorageLocationUpdateOne) SetNillablePartCount

func (_u *StorageLocationUpdateOne) SetNillablePartCount(v *int) *StorageLocationUpdateOne

SetNillablePartCount sets the "partCount" field if the given value is not nil.

func (*StorageLocationUpdateOne) SetNillablePartsDeletedAt

func (_u *StorageLocationUpdateOne) SetNillablePartsDeletedAt(v *int64) *StorageLocationUpdateOne

SetNillablePartsDeletedAt sets the "partsDeletedAt" field if the given value is not nil.

func (*StorageLocationUpdateOne) SetNillableRecencyAt added in v1.1.2

func (_u *StorageLocationUpdateOne) SetNillableRecencyAt(v *int64) *StorageLocationUpdateOne

SetNillableRecencyAt sets the "recencyAt" field if the given value is not nil.

func (*StorageLocationUpdateOne) SetNillableSizeBytes

func (_u *StorageLocationUpdateOne) SetNillableSizeBytes(v *int64) *StorageLocationUpdateOne

SetNillableSizeBytes sets the "sizeBytes" field if the given value is not nil.

func (*StorageLocationUpdateOne) SetPartCount

SetPartCount sets the "partCount" field.

func (*StorageLocationUpdateOne) SetPartsDeletedAt

func (_u *StorageLocationUpdateOne) SetPartsDeletedAt(v int64) *StorageLocationUpdateOne

SetPartsDeletedAt sets the "partsDeletedAt" field.

func (*StorageLocationUpdateOne) SetRecencyAt added in v1.1.2

SetRecencyAt sets the "recencyAt" field.

func (*StorageLocationUpdateOne) SetSizeBytes

SetSizeBytes sets the "sizeBytes" field.

func (*StorageLocationUpdateOne) Where

Where appends a list predicates to the StorageLocationUpdate builder.

type StorageLocations

type StorageLocations []*StorageLocation

StorageLocations is a parsable slice of StorageLocation.

type StorageReaderLease

type StorageReaderLease struct {

	// ID of the ent.
	ID string `json:"id,omitempty"`
	// StorageLocationId holds the value of the "storageLocationId" field.
	StorageLocationId string `json:"storageLocationId,omitempty"`
	// Scope holds the value of the "scope" field.
	Scope storagereaderlease.Scope `json:"scope,omitempty"`
	// ExpiresAt holds the value of the "expiresAt" field.
	ExpiresAt int64 `json:"expiresAt,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the StorageReaderLeaseQuery when eager-loading is set.
	Edges StorageReaderLeaseEdges `json:"edges"`
	// contains filtered or unexported fields
}

StorageReaderLease is the model entity for the StorageReaderLease schema.

func (*StorageReaderLease) QueryStorageLocation

func (_m *StorageReaderLease) QueryStorageLocation() *StorageLocationQuery

QueryStorageLocation queries the "storageLocation" edge of the StorageReaderLease entity.

func (*StorageReaderLease) String

func (_m *StorageReaderLease) String() string

String implements the fmt.Stringer.

func (*StorageReaderLease) Unwrap

func (_m *StorageReaderLease) Unwrap() *StorageReaderLease

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

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

func (*StorageReaderLease) Value

func (_m *StorageReaderLease) Value(name string) (ent.Value, error)

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

type StorageReaderLeaseClient

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

StorageReaderLeaseClient is a client for the StorageReaderLease schema.

func NewStorageReaderLeaseClient

func NewStorageReaderLeaseClient(c config) *StorageReaderLeaseClient

NewStorageReaderLeaseClient returns a client for the StorageReaderLease from the given config.

func (*StorageReaderLeaseClient) Create

Create returns a builder for creating a StorageReaderLease entity.

func (*StorageReaderLeaseClient) CreateBulk

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

func (*StorageReaderLeaseClient) Delete

Delete returns a delete builder for StorageReaderLease.

func (*StorageReaderLeaseClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*StorageReaderLeaseClient) DeleteOneID

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

func (*StorageReaderLeaseClient) Get

Get returns a StorageReaderLease entity by its id.

func (*StorageReaderLeaseClient) GetX

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

func (*StorageReaderLeaseClient) Hooks

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

Hooks returns the client hooks.

func (*StorageReaderLeaseClient) Intercept

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

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

func (*StorageReaderLeaseClient) Interceptors

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

Interceptors returns the client interceptors.

func (*StorageReaderLeaseClient) MapCreateBulk

func (c *StorageReaderLeaseClient) MapCreateBulk(slice any, setFunc func(*StorageReaderLeaseCreate, int)) *StorageReaderLeaseCreateBulk

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

Query returns a query builder for StorageReaderLease.

func (*StorageReaderLeaseClient) QueryStorageLocation

QueryStorageLocation queries the storageLocation edge of a StorageReaderLease.

func (*StorageReaderLeaseClient) Update

Update returns an update builder for StorageReaderLease.

func (*StorageReaderLeaseClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*StorageReaderLeaseClient) UpdateOneID

UpdateOneID returns an update builder for the given id.

func (*StorageReaderLeaseClient) Use

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

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

type StorageReaderLeaseCreate

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

StorageReaderLeaseCreate is the builder for creating a StorageReaderLease entity.

func (*StorageReaderLeaseCreate) Exec

Exec executes the query.

func (*StorageReaderLeaseCreate) ExecX

func (_c *StorageReaderLeaseCreate) ExecX(ctx context.Context)

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

func (*StorageReaderLeaseCreate) Mutation

Mutation returns the StorageReaderLeaseMutation object of the builder.

func (*StorageReaderLeaseCreate) Save

Save creates the StorageReaderLease in the database.

func (*StorageReaderLeaseCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*StorageReaderLeaseCreate) SetExpiresAt

SetExpiresAt sets the "expiresAt" field.

func (*StorageReaderLeaseCreate) SetID

SetID sets the "id" field.

func (*StorageReaderLeaseCreate) SetScope

SetScope sets the "scope" field.

func (*StorageReaderLeaseCreate) SetStorageLocation

SetStorageLocation sets the "storageLocation" edge to the StorageLocation entity.

func (*StorageReaderLeaseCreate) SetStorageLocationID

func (_c *StorageReaderLeaseCreate) SetStorageLocationID(id string) *StorageReaderLeaseCreate

SetStorageLocationID sets the "storageLocation" edge to the StorageLocation entity by ID.

func (*StorageReaderLeaseCreate) SetStorageLocationId

func (_c *StorageReaderLeaseCreate) SetStorageLocationId(v string) *StorageReaderLeaseCreate

SetStorageLocationId sets the "storageLocationId" field.

type StorageReaderLeaseCreateBulk

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

StorageReaderLeaseCreateBulk is the builder for creating many StorageReaderLease entities in bulk.

func (*StorageReaderLeaseCreateBulk) Exec

Exec executes the query.

func (*StorageReaderLeaseCreateBulk) ExecX

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

func (*StorageReaderLeaseCreateBulk) Save

Save creates the StorageReaderLease entities in the database.

func (*StorageReaderLeaseCreateBulk) SaveX

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

type StorageReaderLeaseDelete

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

StorageReaderLeaseDelete is the builder for deleting a StorageReaderLease entity.

func (*StorageReaderLeaseDelete) Exec

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

func (*StorageReaderLeaseDelete) ExecX

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

func (*StorageReaderLeaseDelete) Where

Where appends a list predicates to the StorageReaderLeaseDelete builder.

type StorageReaderLeaseDeleteOne

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

StorageReaderLeaseDeleteOne is the builder for deleting a single StorageReaderLease entity.

func (*StorageReaderLeaseDeleteOne) Exec

Exec executes the deletion query.

func (*StorageReaderLeaseDeleteOne) ExecX

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

func (*StorageReaderLeaseDeleteOne) Where

Where appends a list predicates to the StorageReaderLeaseDelete builder.

type StorageReaderLeaseEdges

type StorageReaderLeaseEdges struct {
	// StorageLocation holds the value of the storageLocation edge.
	StorageLocation *StorageLocation `json:"storageLocation,omitempty"`
	// contains filtered or unexported fields
}

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

func (StorageReaderLeaseEdges) StorageLocationOrErr

func (e StorageReaderLeaseEdges) StorageLocationOrErr() (*StorageLocation, error)

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

type StorageReaderLeaseGroupBy

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

StorageReaderLeaseGroupBy is the group-by builder for StorageReaderLease entities.

func (*StorageReaderLeaseGroupBy) Aggregate

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

func (*StorageReaderLeaseGroupBy) Bool

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

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

func (*StorageReaderLeaseGroupBy) BoolX

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

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

func (*StorageReaderLeaseGroupBy) Bools

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

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

func (*StorageReaderLeaseGroupBy) BoolsX

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

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

func (*StorageReaderLeaseGroupBy) Float64

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

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

func (*StorageReaderLeaseGroupBy) Float64X

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

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

func (*StorageReaderLeaseGroupBy) Float64s

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

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

func (*StorageReaderLeaseGroupBy) Float64sX

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

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

func (*StorageReaderLeaseGroupBy) Int

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

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

func (*StorageReaderLeaseGroupBy) IntX

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

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

func (*StorageReaderLeaseGroupBy) Ints

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

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

func (*StorageReaderLeaseGroupBy) IntsX

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

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

func (*StorageReaderLeaseGroupBy) Scan

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

func (*StorageReaderLeaseGroupBy) ScanX

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

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

func (*StorageReaderLeaseGroupBy) String

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

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

func (*StorageReaderLeaseGroupBy) StringX

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

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

func (*StorageReaderLeaseGroupBy) Strings

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

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

func (*StorageReaderLeaseGroupBy) StringsX

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

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

type StorageReaderLeaseMutation

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

StorageReaderLeaseMutation represents an operation that mutates the StorageReaderLease nodes in the graph.

func (*StorageReaderLeaseMutation) AddExpiresAt

func (m *StorageReaderLeaseMutation) AddExpiresAt(i int64)

AddExpiresAt adds i to the "expiresAt" field.

func (*StorageReaderLeaseMutation) AddField

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

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

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

func (*StorageReaderLeaseMutation) AddedExpiresAt

func (m *StorageReaderLeaseMutation) AddedExpiresAt() (r int64, exists bool)

AddedExpiresAt returns the value that was added to the "expiresAt" field in this mutation.

func (*StorageReaderLeaseMutation) AddedField

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

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

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

func (*StorageReaderLeaseMutation) AddedIDs

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

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

func (*StorageReaderLeaseMutation) ClearEdge

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

func (m *StorageReaderLeaseMutation) 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 (*StorageReaderLeaseMutation) ClearStorageLocation

func (m *StorageReaderLeaseMutation) ClearStorageLocation()

ClearStorageLocation clears the "storageLocation" edge to the StorageLocation entity.

func (*StorageReaderLeaseMutation) ClearedEdges

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

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

func (*StorageReaderLeaseMutation) ClearedFields

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

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

func (StorageReaderLeaseMutation) Client

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

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

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

func (*StorageReaderLeaseMutation) ExpiresAt

func (m *StorageReaderLeaseMutation) ExpiresAt() (r int64, exists bool)

ExpiresAt returns the value of the "expiresAt" field in the mutation.

func (*StorageReaderLeaseMutation) Field

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

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

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

func (*StorageReaderLeaseMutation) Fields

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

func (m *StorageReaderLeaseMutation) ID() (id string, 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 (*StorageReaderLeaseMutation) 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 (*StorageReaderLeaseMutation) OldExpiresAt

func (m *StorageReaderLeaseMutation) OldExpiresAt(ctx context.Context) (v int64, err error)

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

func (*StorageReaderLeaseMutation) OldField

func (m *StorageReaderLeaseMutation) 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 (*StorageReaderLeaseMutation) OldScope

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

func (*StorageReaderLeaseMutation) OldStorageLocationId

func (m *StorageReaderLeaseMutation) OldStorageLocationId(ctx context.Context) (v string, err error)

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

func (*StorageReaderLeaseMutation) Op

Op returns the operation name.

func (*StorageReaderLeaseMutation) RemovedEdges

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

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

func (*StorageReaderLeaseMutation) RemovedIDs

func (m *StorageReaderLeaseMutation) 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 (*StorageReaderLeaseMutation) ResetEdge

func (m *StorageReaderLeaseMutation) 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 (*StorageReaderLeaseMutation) ResetExpiresAt

func (m *StorageReaderLeaseMutation) ResetExpiresAt()

ResetExpiresAt resets all changes to the "expiresAt" field.

func (*StorageReaderLeaseMutation) ResetField

func (m *StorageReaderLeaseMutation) 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 (*StorageReaderLeaseMutation) ResetScope

func (m *StorageReaderLeaseMutation) ResetScope()

ResetScope resets all changes to the "scope" field.

func (*StorageReaderLeaseMutation) ResetStorageLocation

func (m *StorageReaderLeaseMutation) ResetStorageLocation()

ResetStorageLocation resets all changes to the "storageLocation" edge.

func (*StorageReaderLeaseMutation) ResetStorageLocationId

func (m *StorageReaderLeaseMutation) ResetStorageLocationId()

ResetStorageLocationId resets all changes to the "storageLocationId" field.

func (*StorageReaderLeaseMutation) Scope

Scope returns the value of the "scope" field in the mutation.

func (*StorageReaderLeaseMutation) SetExpiresAt

func (m *StorageReaderLeaseMutation) SetExpiresAt(i int64)

SetExpiresAt sets the "expiresAt" field.

func (*StorageReaderLeaseMutation) SetField

func (m *StorageReaderLeaseMutation) 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 (*StorageReaderLeaseMutation) SetID

func (m *StorageReaderLeaseMutation) SetID(id string)

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

func (*StorageReaderLeaseMutation) SetOp

func (m *StorageReaderLeaseMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*StorageReaderLeaseMutation) SetScope

SetScope sets the "scope" field.

func (*StorageReaderLeaseMutation) SetStorageLocationID

func (m *StorageReaderLeaseMutation) SetStorageLocationID(id string)

SetStorageLocationID sets the "storageLocation" edge to the StorageLocation entity by id.

func (*StorageReaderLeaseMutation) SetStorageLocationId

func (m *StorageReaderLeaseMutation) SetStorageLocationId(s string)

SetStorageLocationId sets the "storageLocationId" field.

func (*StorageReaderLeaseMutation) StorageLocationCleared

func (m *StorageReaderLeaseMutation) StorageLocationCleared() bool

StorageLocationCleared reports if the "storageLocation" edge to the StorageLocation entity was cleared.

func (*StorageReaderLeaseMutation) StorageLocationID

func (m *StorageReaderLeaseMutation) StorageLocationID() (id string, exists bool)

StorageLocationID returns the "storageLocation" edge ID in the mutation.

func (*StorageReaderLeaseMutation) StorageLocationIDs

func (m *StorageReaderLeaseMutation) StorageLocationIDs() (ids []string)

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

func (*StorageReaderLeaseMutation) StorageLocationId

func (m *StorageReaderLeaseMutation) StorageLocationId() (r string, exists bool)

StorageLocationId returns the value of the "storageLocationId" field in the mutation.

func (StorageReaderLeaseMutation) Tx

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

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

func (*StorageReaderLeaseMutation) Type

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

func (*StorageReaderLeaseMutation) Where

Where appends a list predicates to the StorageReaderLeaseMutation builder.

func (*StorageReaderLeaseMutation) WhereP

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

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

type StorageReaderLeaseQuery

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

StorageReaderLeaseQuery is the builder for querying StorageReaderLease entities.

func (*StorageReaderLeaseQuery) Aggregate

Aggregate returns a StorageReaderLeaseSelect configured with the given aggregations.

func (*StorageReaderLeaseQuery) All

All executes the query and returns a list of StorageReaderLeases.

func (*StorageReaderLeaseQuery) AllX

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

func (*StorageReaderLeaseQuery) Clone

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

func (*StorageReaderLeaseQuery) Count

func (_q *StorageReaderLeaseQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*StorageReaderLeaseQuery) CountX

func (_q *StorageReaderLeaseQuery) CountX(ctx context.Context) int

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

func (*StorageReaderLeaseQuery) Exist

func (_q *StorageReaderLeaseQuery) Exist(ctx context.Context) (bool, error)

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

func (*StorageReaderLeaseQuery) ExistX

func (_q *StorageReaderLeaseQuery) ExistX(ctx context.Context) bool

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

func (*StorageReaderLeaseQuery) First

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

func (*StorageReaderLeaseQuery) FirstID

func (_q *StorageReaderLeaseQuery) FirstID(ctx context.Context) (id string, err error)

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

func (*StorageReaderLeaseQuery) FirstIDX

func (_q *StorageReaderLeaseQuery) FirstIDX(ctx context.Context) string

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

func (*StorageReaderLeaseQuery) FirstX

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

func (*StorageReaderLeaseQuery) GroupBy

func (_q *StorageReaderLeaseQuery) GroupBy(field string, fields ...string) *StorageReaderLeaseGroupBy

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

client.StorageReaderLease.Query().
	GroupBy(storagereaderlease.FieldStorageLocationId).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*StorageReaderLeaseQuery) IDs

func (_q *StorageReaderLeaseQuery) IDs(ctx context.Context) (ids []string, err error)

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

func (*StorageReaderLeaseQuery) IDsX

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

func (*StorageReaderLeaseQuery) Limit

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

func (*StorageReaderLeaseQuery) Offset

Offset to start from.

func (*StorageReaderLeaseQuery) Only

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

func (*StorageReaderLeaseQuery) OnlyID

func (_q *StorageReaderLeaseQuery) OnlyID(ctx context.Context) (id string, err error)

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

func (*StorageReaderLeaseQuery) OnlyIDX

func (_q *StorageReaderLeaseQuery) OnlyIDX(ctx context.Context) string

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

func (*StorageReaderLeaseQuery) OnlyX

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

func (*StorageReaderLeaseQuery) Order

Order specifies how the records should be ordered.

func (*StorageReaderLeaseQuery) QueryStorageLocation

func (_q *StorageReaderLeaseQuery) QueryStorageLocation() *StorageLocationQuery

QueryStorageLocation chains the current query on the "storageLocation" edge.

func (*StorageReaderLeaseQuery) 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 {
	StorageLocationId string `json:"storageLocationId,omitempty"`
}

client.StorageReaderLease.Query().
	Select(storagereaderlease.FieldStorageLocationId).
	Scan(ctx, &v)

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

Where adds a new predicate for the StorageReaderLeaseQuery builder.

func (*StorageReaderLeaseQuery) WithStorageLocation

func (_q *StorageReaderLeaseQuery) WithStorageLocation(opts ...func(*StorageLocationQuery)) *StorageReaderLeaseQuery

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

type StorageReaderLeaseSelect

type StorageReaderLeaseSelect struct {
	*StorageReaderLeaseQuery
	// contains filtered or unexported fields
}

StorageReaderLeaseSelect is the builder for selecting fields of StorageReaderLease entities.

func (*StorageReaderLeaseSelect) Aggregate

Aggregate adds the given aggregation functions to the selector query.

func (*StorageReaderLeaseSelect) Bool

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

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

func (*StorageReaderLeaseSelect) BoolX

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

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

func (*StorageReaderLeaseSelect) Bools

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

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

func (*StorageReaderLeaseSelect) BoolsX

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

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

func (*StorageReaderLeaseSelect) Float64

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

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

func (*StorageReaderLeaseSelect) Float64X

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

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

func (*StorageReaderLeaseSelect) Float64s

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

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

func (*StorageReaderLeaseSelect) Float64sX

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

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

func (*StorageReaderLeaseSelect) Int

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

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

func (*StorageReaderLeaseSelect) IntX

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

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

func (*StorageReaderLeaseSelect) Ints

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

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

func (*StorageReaderLeaseSelect) IntsX

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

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

func (*StorageReaderLeaseSelect) Scan

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

func (*StorageReaderLeaseSelect) ScanX

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

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

func (*StorageReaderLeaseSelect) String

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

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

func (*StorageReaderLeaseSelect) StringX

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

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

func (*StorageReaderLeaseSelect) Strings

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

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

func (*StorageReaderLeaseSelect) StringsX

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

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

type StorageReaderLeaseUpdate

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

StorageReaderLeaseUpdate is the builder for updating StorageReaderLease entities.

func (*StorageReaderLeaseUpdate) AddExpiresAt

AddExpiresAt adds value to the "expiresAt" field.

func (*StorageReaderLeaseUpdate) ClearStorageLocation

func (_u *StorageReaderLeaseUpdate) ClearStorageLocation() *StorageReaderLeaseUpdate

ClearStorageLocation clears the "storageLocation" edge to the StorageLocation entity.

func (*StorageReaderLeaseUpdate) Exec

Exec executes the query.

func (*StorageReaderLeaseUpdate) ExecX

func (_u *StorageReaderLeaseUpdate) ExecX(ctx context.Context)

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

func (*StorageReaderLeaseUpdate) Mutation

Mutation returns the StorageReaderLeaseMutation object of the builder.

func (*StorageReaderLeaseUpdate) Save

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

func (*StorageReaderLeaseUpdate) SaveX

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

func (*StorageReaderLeaseUpdate) SetExpiresAt

SetExpiresAt sets the "expiresAt" field.

func (*StorageReaderLeaseUpdate) SetNillableExpiresAt

func (_u *StorageReaderLeaseUpdate) SetNillableExpiresAt(v *int64) *StorageReaderLeaseUpdate

SetNillableExpiresAt sets the "expiresAt" field if the given value is not nil.

func (*StorageReaderLeaseUpdate) SetNillableScope

SetNillableScope sets the "scope" field if the given value is not nil.

func (*StorageReaderLeaseUpdate) SetNillableStorageLocationId

func (_u *StorageReaderLeaseUpdate) SetNillableStorageLocationId(v *string) *StorageReaderLeaseUpdate

SetNillableStorageLocationId sets the "storageLocationId" field if the given value is not nil.

func (*StorageReaderLeaseUpdate) SetScope

SetScope sets the "scope" field.

func (*StorageReaderLeaseUpdate) SetStorageLocation

SetStorageLocation sets the "storageLocation" edge to the StorageLocation entity.

func (*StorageReaderLeaseUpdate) SetStorageLocationID

func (_u *StorageReaderLeaseUpdate) SetStorageLocationID(id string) *StorageReaderLeaseUpdate

SetStorageLocationID sets the "storageLocation" edge to the StorageLocation entity by ID.

func (*StorageReaderLeaseUpdate) SetStorageLocationId

func (_u *StorageReaderLeaseUpdate) SetStorageLocationId(v string) *StorageReaderLeaseUpdate

SetStorageLocationId sets the "storageLocationId" field.

func (*StorageReaderLeaseUpdate) Where

Where appends a list predicates to the StorageReaderLeaseUpdate builder.

type StorageReaderLeaseUpdateOne

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

StorageReaderLeaseUpdateOne is the builder for updating a single StorageReaderLease entity.

func (*StorageReaderLeaseUpdateOne) AddExpiresAt

AddExpiresAt adds value to the "expiresAt" field.

func (*StorageReaderLeaseUpdateOne) ClearStorageLocation

func (_u *StorageReaderLeaseUpdateOne) ClearStorageLocation() *StorageReaderLeaseUpdateOne

ClearStorageLocation clears the "storageLocation" edge to the StorageLocation entity.

func (*StorageReaderLeaseUpdateOne) Exec

Exec executes the query on the entity.

func (*StorageReaderLeaseUpdateOne) ExecX

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

func (*StorageReaderLeaseUpdateOne) Mutation

Mutation returns the StorageReaderLeaseMutation object of the builder.

func (*StorageReaderLeaseUpdateOne) Save

Save executes the query and returns the updated StorageReaderLease entity.

func (*StorageReaderLeaseUpdateOne) SaveX

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

func (*StorageReaderLeaseUpdateOne) 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 (*StorageReaderLeaseUpdateOne) SetExpiresAt

SetExpiresAt sets the "expiresAt" field.

func (*StorageReaderLeaseUpdateOne) SetNillableExpiresAt

func (_u *StorageReaderLeaseUpdateOne) SetNillableExpiresAt(v *int64) *StorageReaderLeaseUpdateOne

SetNillableExpiresAt sets the "expiresAt" field if the given value is not nil.

func (*StorageReaderLeaseUpdateOne) SetNillableScope

SetNillableScope sets the "scope" field if the given value is not nil.

func (*StorageReaderLeaseUpdateOne) SetNillableStorageLocationId

func (_u *StorageReaderLeaseUpdateOne) SetNillableStorageLocationId(v *string) *StorageReaderLeaseUpdateOne

SetNillableStorageLocationId sets the "storageLocationId" field if the given value is not nil.

func (*StorageReaderLeaseUpdateOne) SetScope

SetScope sets the "scope" field.

func (*StorageReaderLeaseUpdateOne) SetStorageLocation

SetStorageLocation sets the "storageLocation" edge to the StorageLocation entity.

func (*StorageReaderLeaseUpdateOne) SetStorageLocationID

func (_u *StorageReaderLeaseUpdateOne) SetStorageLocationID(id string) *StorageReaderLeaseUpdateOne

SetStorageLocationID sets the "storageLocation" edge to the StorageLocation entity by ID.

func (*StorageReaderLeaseUpdateOne) SetStorageLocationId

func (_u *StorageReaderLeaseUpdateOne) SetStorageLocationId(v string) *StorageReaderLeaseUpdateOne

SetStorageLocationId sets the "storageLocationId" field.

func (*StorageReaderLeaseUpdateOne) Where

Where appends a list predicates to the StorageReaderLeaseUpdate builder.

type StorageReaderLeases

type StorageReaderLeases []*StorageReaderLease

StorageReaderLeases is a parsable slice of StorageReaderLease.

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 {

	// CacheEntry is the client for interacting with the CacheEntry builders.
	CacheEntry *CacheEntryClient
	// StorageDeletion is the client for interacting with the StorageDeletion builders.
	StorageDeletion *StorageDeletionClient
	// StorageLocation is the client for interacting with the StorageLocation builders.
	StorageLocation *StorageLocationClient
	// StorageReaderLease is the client for interacting with the StorageReaderLease builders.
	StorageReaderLease *StorageReaderLeaseClient
	// Upload is the client for interacting with the Upload builders.
	Upload *UploadClient
	// 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 Upload

type Upload struct {

	// ID of the ent.
	ID int64 `json:"id,omitempty"`
	// Key holds the value of the "key" field.
	Key string `json:"key,omitempty"`
	// Version holds the value of the "version" field.
	Version string `json:"version,omitempty"`
	// Scope holds the value of the "scope" field.
	Scope string `json:"scope,omitempty"`
	// RepoId holds the value of the "repoId" field.
	RepoId string `json:"repoId,omitempty"`
	// CreatedAt holds the value of the "createdAt" field.
	CreatedAt int64 `json:"createdAt,omitempty"`
	// LastPartUploadedAt holds the value of the "lastPartUploadedAt" field.
	LastPartUploadedAt *int64 `json:"lastPartUploadedAt,omitempty"`
	// StartedPartUploadCount holds the value of the "startedPartUploadCount" field.
	StartedPartUploadCount int `json:"startedPartUploadCount,omitempty"`
	// FinishedPartUploadCount holds the value of the "finishedPartUploadCount" field.
	FinishedPartUploadCount int `json:"finishedPartUploadCount,omitempty"`
	// FolderName holds the value of the "folderName" field.
	FolderName string `json:"folderName,omitempty"`
	// CommittedPartCount holds the value of the "committedPartCount" field.
	CommittedPartCount *int `json:"committedPartCount,omitempty"`
	// TupleHash holds the value of the "tupleHash" field.
	TupleHash *string `json:"tupleHash,omitempty"`
	// contains filtered or unexported fields
}

Upload is the model entity for the Upload schema.

func (*Upload) String

func (_m *Upload) String() string

String implements the fmt.Stringer.

func (*Upload) Unwrap

func (_m *Upload) Unwrap() *Upload

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

func (_m *Upload) Update() *UploadUpdateOne

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

func (*Upload) Value

func (_m *Upload) Value(name string) (ent.Value, error)

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

type UploadClient

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

UploadClient is a client for the Upload schema.

func NewUploadClient

func NewUploadClient(c config) *UploadClient

NewUploadClient returns a client for the Upload from the given config.

func (*UploadClient) Create

func (c *UploadClient) Create() *UploadCreate

Create returns a builder for creating a Upload entity.

func (*UploadClient) CreateBulk

func (c *UploadClient) CreateBulk(builders ...*UploadCreate) *UploadCreateBulk

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

func (*UploadClient) Delete

func (c *UploadClient) Delete() *UploadDelete

Delete returns a delete builder for Upload.

func (*UploadClient) DeleteOne

func (c *UploadClient) DeleteOne(_m *Upload) *UploadDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*UploadClient) DeleteOneID

func (c *UploadClient) DeleteOneID(id int64) *UploadDeleteOne

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

func (*UploadClient) Get

func (c *UploadClient) Get(ctx context.Context, id int64) (*Upload, error)

Get returns a Upload entity by its id.

func (*UploadClient) GetX

func (c *UploadClient) GetX(ctx context.Context, id int64) *Upload

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

func (*UploadClient) Hooks

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

Hooks returns the client hooks.

func (*UploadClient) Intercept

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

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

func (*UploadClient) Interceptors

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

Interceptors returns the client interceptors.

func (*UploadClient) MapCreateBulk

func (c *UploadClient) MapCreateBulk(slice any, setFunc func(*UploadCreate, int)) *UploadCreateBulk

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

func (c *UploadClient) Query() *UploadQuery

Query returns a query builder for Upload.

func (*UploadClient) Update

func (c *UploadClient) Update() *UploadUpdate

Update returns an update builder for Upload.

func (*UploadClient) UpdateOne

func (c *UploadClient) UpdateOne(_m *Upload) *UploadUpdateOne

UpdateOne returns an update builder for the given entity.

func (*UploadClient) UpdateOneID

func (c *UploadClient) UpdateOneID(id int64) *UploadUpdateOne

UpdateOneID returns an update builder for the given id.

func (*UploadClient) Use

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

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

type UploadCreate

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

UploadCreate is the builder for creating a Upload entity.

func (*UploadCreate) Exec

func (_c *UploadCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*UploadCreate) ExecX

func (_c *UploadCreate) ExecX(ctx context.Context)

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

func (*UploadCreate) Mutation

func (_c *UploadCreate) Mutation() *UploadMutation

Mutation returns the UploadMutation object of the builder.

func (*UploadCreate) Save

func (_c *UploadCreate) Save(ctx context.Context) (*Upload, error)

Save creates the Upload in the database.

func (*UploadCreate) SaveX

func (_c *UploadCreate) SaveX(ctx context.Context) *Upload

SaveX calls Save and panics if Save returns an error.

func (*UploadCreate) SetCommittedPartCount

func (_c *UploadCreate) SetCommittedPartCount(v int) *UploadCreate

SetCommittedPartCount sets the "committedPartCount" field.

func (*UploadCreate) SetCreatedAt

func (_c *UploadCreate) SetCreatedAt(v int64) *UploadCreate

SetCreatedAt sets the "createdAt" field.

func (*UploadCreate) SetFinishedPartUploadCount

func (_c *UploadCreate) SetFinishedPartUploadCount(v int) *UploadCreate

SetFinishedPartUploadCount sets the "finishedPartUploadCount" field.

func (*UploadCreate) SetFolderName

func (_c *UploadCreate) SetFolderName(v string) *UploadCreate

SetFolderName sets the "folderName" field.

func (*UploadCreate) SetID

func (_c *UploadCreate) SetID(v int64) *UploadCreate

SetID sets the "id" field.

func (*UploadCreate) SetKey

func (_c *UploadCreate) SetKey(v string) *UploadCreate

SetKey sets the "key" field.

func (*UploadCreate) SetLastPartUploadedAt

func (_c *UploadCreate) SetLastPartUploadedAt(v int64) *UploadCreate

SetLastPartUploadedAt sets the "lastPartUploadedAt" field.

func (*UploadCreate) SetNillableCommittedPartCount

func (_c *UploadCreate) SetNillableCommittedPartCount(v *int) *UploadCreate

SetNillableCommittedPartCount sets the "committedPartCount" field if the given value is not nil.

func (*UploadCreate) SetNillableFinishedPartUploadCount

func (_c *UploadCreate) SetNillableFinishedPartUploadCount(v *int) *UploadCreate

SetNillableFinishedPartUploadCount sets the "finishedPartUploadCount" field if the given value is not nil.

func (*UploadCreate) SetNillableLastPartUploadedAt

func (_c *UploadCreate) SetNillableLastPartUploadedAt(v *int64) *UploadCreate

SetNillableLastPartUploadedAt sets the "lastPartUploadedAt" field if the given value is not nil.

func (*UploadCreate) SetNillableStartedPartUploadCount

func (_c *UploadCreate) SetNillableStartedPartUploadCount(v *int) *UploadCreate

SetNillableStartedPartUploadCount sets the "startedPartUploadCount" field if the given value is not nil.

func (*UploadCreate) SetNillableTupleHash

func (_c *UploadCreate) SetNillableTupleHash(v *string) *UploadCreate

SetNillableTupleHash sets the "tupleHash" field if the given value is not nil.

func (*UploadCreate) SetRepoId

func (_c *UploadCreate) SetRepoId(v string) *UploadCreate

SetRepoId sets the "repoId" field.

func (*UploadCreate) SetScope

func (_c *UploadCreate) SetScope(v string) *UploadCreate

SetScope sets the "scope" field.

func (*UploadCreate) SetStartedPartUploadCount

func (_c *UploadCreate) SetStartedPartUploadCount(v int) *UploadCreate

SetStartedPartUploadCount sets the "startedPartUploadCount" field.

func (*UploadCreate) SetTupleHash

func (_c *UploadCreate) SetTupleHash(v string) *UploadCreate

SetTupleHash sets the "tupleHash" field.

func (*UploadCreate) SetVersion

func (_c *UploadCreate) SetVersion(v string) *UploadCreate

SetVersion sets the "version" field.

type UploadCreateBulk

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

UploadCreateBulk is the builder for creating many Upload entities in bulk.

func (*UploadCreateBulk) Exec

func (_c *UploadCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*UploadCreateBulk) ExecX

func (_c *UploadCreateBulk) ExecX(ctx context.Context)

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

func (*UploadCreateBulk) Save

func (_c *UploadCreateBulk) Save(ctx context.Context) ([]*Upload, error)

Save creates the Upload entities in the database.

func (*UploadCreateBulk) SaveX

func (_c *UploadCreateBulk) SaveX(ctx context.Context) []*Upload

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

type UploadDelete

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

UploadDelete is the builder for deleting a Upload entity.

func (*UploadDelete) Exec

func (_d *UploadDelete) Exec(ctx context.Context) (int, error)

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

func (*UploadDelete) ExecX

func (_d *UploadDelete) ExecX(ctx context.Context) int

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

func (*UploadDelete) Where

func (_d *UploadDelete) Where(ps ...predicate.Upload) *UploadDelete

Where appends a list predicates to the UploadDelete builder.

type UploadDeleteOne

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

UploadDeleteOne is the builder for deleting a single Upload entity.

func (*UploadDeleteOne) Exec

func (_d *UploadDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*UploadDeleteOne) ExecX

func (_d *UploadDeleteOne) ExecX(ctx context.Context)

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

func (*UploadDeleteOne) Where

func (_d *UploadDeleteOne) Where(ps ...predicate.Upload) *UploadDeleteOne

Where appends a list predicates to the UploadDelete builder.

type UploadGroupBy

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

UploadGroupBy is the group-by builder for Upload entities.

func (*UploadGroupBy) Aggregate

func (_g *UploadGroupBy) Aggregate(fns ...AggregateFunc) *UploadGroupBy

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

func (*UploadGroupBy) Bool

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

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

func (*UploadGroupBy) BoolX

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

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

func (*UploadGroupBy) Bools

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

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

func (*UploadGroupBy) BoolsX

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

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

func (*UploadGroupBy) Float64

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

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

func (*UploadGroupBy) Float64X

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

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

func (*UploadGroupBy) Float64s

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

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

func (*UploadGroupBy) Float64sX

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

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

func (*UploadGroupBy) Int

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

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

func (*UploadGroupBy) IntX

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

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

func (*UploadGroupBy) Ints

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

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

func (*UploadGroupBy) IntsX

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

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

func (*UploadGroupBy) Scan

func (_g *UploadGroupBy) Scan(ctx context.Context, v any) error

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

func (*UploadGroupBy) ScanX

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

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

func (*UploadGroupBy) String

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

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

func (*UploadGroupBy) StringX

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

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

func (*UploadGroupBy) Strings

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

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

func (*UploadGroupBy) StringsX

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

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

type UploadMutation

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

UploadMutation represents an operation that mutates the Upload nodes in the graph.

func (*UploadMutation) AddCommittedPartCount

func (m *UploadMutation) AddCommittedPartCount(i int)

AddCommittedPartCount adds i to the "committedPartCount" field.

func (*UploadMutation) AddCreatedAt

func (m *UploadMutation) AddCreatedAt(i int64)

AddCreatedAt adds i to the "createdAt" field.

func (*UploadMutation) AddField

func (m *UploadMutation) 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 (*UploadMutation) AddFinishedPartUploadCount

func (m *UploadMutation) AddFinishedPartUploadCount(i int)

AddFinishedPartUploadCount adds i to the "finishedPartUploadCount" field.

func (*UploadMutation) AddLastPartUploadedAt

func (m *UploadMutation) AddLastPartUploadedAt(i int64)

AddLastPartUploadedAt adds i to the "lastPartUploadedAt" field.

func (*UploadMutation) AddStartedPartUploadCount

func (m *UploadMutation) AddStartedPartUploadCount(i int)

AddStartedPartUploadCount adds i to the "startedPartUploadCount" field.

func (*UploadMutation) AddedCommittedPartCount

func (m *UploadMutation) AddedCommittedPartCount() (r int, exists bool)

AddedCommittedPartCount returns the value that was added to the "committedPartCount" field in this mutation.

func (*UploadMutation) AddedCreatedAt

func (m *UploadMutation) AddedCreatedAt() (r int64, exists bool)

AddedCreatedAt returns the value that was added to the "createdAt" field in this mutation.

func (*UploadMutation) AddedEdges

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

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

func (*UploadMutation) AddedField

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

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

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

func (*UploadMutation) AddedFinishedPartUploadCount

func (m *UploadMutation) AddedFinishedPartUploadCount() (r int, exists bool)

AddedFinishedPartUploadCount returns the value that was added to the "finishedPartUploadCount" field in this mutation.

func (*UploadMutation) AddedIDs

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

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

func (*UploadMutation) AddedLastPartUploadedAt

func (m *UploadMutation) AddedLastPartUploadedAt() (r int64, exists bool)

AddedLastPartUploadedAt returns the value that was added to the "lastPartUploadedAt" field in this mutation.

func (*UploadMutation) AddedStartedPartUploadCount

func (m *UploadMutation) AddedStartedPartUploadCount() (r int, exists bool)

AddedStartedPartUploadCount returns the value that was added to the "startedPartUploadCount" field in this mutation.

func (*UploadMutation) ClearCommittedPartCount

func (m *UploadMutation) ClearCommittedPartCount()

ClearCommittedPartCount clears the value of the "committedPartCount" field.

func (*UploadMutation) ClearEdge

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

func (m *UploadMutation) 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 (*UploadMutation) ClearLastPartUploadedAt

func (m *UploadMutation) ClearLastPartUploadedAt()

ClearLastPartUploadedAt clears the value of the "lastPartUploadedAt" field.

func (*UploadMutation) ClearTupleHash

func (m *UploadMutation) ClearTupleHash()

ClearTupleHash clears the value of the "tupleHash" field.

func (*UploadMutation) ClearedEdges

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

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

func (*UploadMutation) ClearedFields

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

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

func (UploadMutation) Client

func (m UploadMutation) 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 (*UploadMutation) CommittedPartCount

func (m *UploadMutation) CommittedPartCount() (r int, exists bool)

CommittedPartCount returns the value of the "committedPartCount" field in the mutation.

func (*UploadMutation) CommittedPartCountCleared

func (m *UploadMutation) CommittedPartCountCleared() bool

CommittedPartCountCleared returns if the "committedPartCount" field was cleared in this mutation.

func (*UploadMutation) CreatedAt

func (m *UploadMutation) CreatedAt() (r int64, exists bool)

CreatedAt returns the value of the "createdAt" field in the mutation.

func (*UploadMutation) EdgeCleared

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

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

func (*UploadMutation) Field

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

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

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

func (*UploadMutation) Fields

func (m *UploadMutation) 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 (*UploadMutation) FinishedPartUploadCount

func (m *UploadMutation) FinishedPartUploadCount() (r int, exists bool)

FinishedPartUploadCount returns the value of the "finishedPartUploadCount" field in the mutation.

func (*UploadMutation) FolderName

func (m *UploadMutation) FolderName() (r string, exists bool)

FolderName returns the value of the "folderName" field in the mutation.

func (*UploadMutation) ID

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

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

func (m *UploadMutation) Key() (r string, exists bool)

Key returns the value of the "key" field in the mutation.

func (*UploadMutation) LastPartUploadedAt

func (m *UploadMutation) LastPartUploadedAt() (r int64, exists bool)

LastPartUploadedAt returns the value of the "lastPartUploadedAt" field in the mutation.

func (*UploadMutation) LastPartUploadedAtCleared

func (m *UploadMutation) LastPartUploadedAtCleared() bool

LastPartUploadedAtCleared returns if the "lastPartUploadedAt" field was cleared in this mutation.

func (*UploadMutation) OldCommittedPartCount

func (m *UploadMutation) OldCommittedPartCount(ctx context.Context) (v *int, err error)

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

func (*UploadMutation) OldCreatedAt

func (m *UploadMutation) OldCreatedAt(ctx context.Context) (v int64, err error)

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

func (*UploadMutation) OldField

func (m *UploadMutation) 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 (*UploadMutation) OldFinishedPartUploadCount

func (m *UploadMutation) OldFinishedPartUploadCount(ctx context.Context) (v int, err error)

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

func (*UploadMutation) OldFolderName

func (m *UploadMutation) OldFolderName(ctx context.Context) (v string, err error)

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

func (*UploadMutation) OldKey

func (m *UploadMutation) OldKey(ctx context.Context) (v string, err error)

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

func (*UploadMutation) OldLastPartUploadedAt

func (m *UploadMutation) OldLastPartUploadedAt(ctx context.Context) (v *int64, err error)

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

func (*UploadMutation) OldRepoId

func (m *UploadMutation) OldRepoId(ctx context.Context) (v string, err error)

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

func (*UploadMutation) OldScope

func (m *UploadMutation) OldScope(ctx context.Context) (v string, err error)

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

func (*UploadMutation) OldStartedPartUploadCount

func (m *UploadMutation) OldStartedPartUploadCount(ctx context.Context) (v int, err error)

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

func (*UploadMutation) OldTupleHash

func (m *UploadMutation) OldTupleHash(ctx context.Context) (v *string, err error)

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

func (*UploadMutation) OldVersion

func (m *UploadMutation) OldVersion(ctx context.Context) (v string, err error)

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

func (*UploadMutation) Op

func (m *UploadMutation) Op() Op

Op returns the operation name.

func (*UploadMutation) RemovedEdges

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

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

func (*UploadMutation) RemovedIDs

func (m *UploadMutation) 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 (*UploadMutation) RepoId

func (m *UploadMutation) RepoId() (r string, exists bool)

RepoId returns the value of the "repoId" field in the mutation.

func (*UploadMutation) ResetCommittedPartCount

func (m *UploadMutation) ResetCommittedPartCount()

ResetCommittedPartCount resets all changes to the "committedPartCount" field.

func (*UploadMutation) ResetCreatedAt

func (m *UploadMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "createdAt" field.

func (*UploadMutation) ResetEdge

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

func (m *UploadMutation) 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 (*UploadMutation) ResetFinishedPartUploadCount

func (m *UploadMutation) ResetFinishedPartUploadCount()

ResetFinishedPartUploadCount resets all changes to the "finishedPartUploadCount" field.

func (*UploadMutation) ResetFolderName

func (m *UploadMutation) ResetFolderName()

ResetFolderName resets all changes to the "folderName" field.

func (*UploadMutation) ResetKey

func (m *UploadMutation) ResetKey()

ResetKey resets all changes to the "key" field.

func (*UploadMutation) ResetLastPartUploadedAt

func (m *UploadMutation) ResetLastPartUploadedAt()

ResetLastPartUploadedAt resets all changes to the "lastPartUploadedAt" field.

func (*UploadMutation) ResetRepoId

func (m *UploadMutation) ResetRepoId()

ResetRepoId resets all changes to the "repoId" field.

func (*UploadMutation) ResetScope

func (m *UploadMutation) ResetScope()

ResetScope resets all changes to the "scope" field.

func (*UploadMutation) ResetStartedPartUploadCount

func (m *UploadMutation) ResetStartedPartUploadCount()

ResetStartedPartUploadCount resets all changes to the "startedPartUploadCount" field.

func (*UploadMutation) ResetTupleHash

func (m *UploadMutation) ResetTupleHash()

ResetTupleHash resets all changes to the "tupleHash" field.

func (*UploadMutation) ResetVersion

func (m *UploadMutation) ResetVersion()

ResetVersion resets all changes to the "version" field.

func (*UploadMutation) Scope

func (m *UploadMutation) Scope() (r string, exists bool)

Scope returns the value of the "scope" field in the mutation.

func (*UploadMutation) SetCommittedPartCount

func (m *UploadMutation) SetCommittedPartCount(i int)

SetCommittedPartCount sets the "committedPartCount" field.

func (*UploadMutation) SetCreatedAt

func (m *UploadMutation) SetCreatedAt(i int64)

SetCreatedAt sets the "createdAt" field.

func (*UploadMutation) SetField

func (m *UploadMutation) 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 (*UploadMutation) SetFinishedPartUploadCount

func (m *UploadMutation) SetFinishedPartUploadCount(i int)

SetFinishedPartUploadCount sets the "finishedPartUploadCount" field.

func (*UploadMutation) SetFolderName

func (m *UploadMutation) SetFolderName(s string)

SetFolderName sets the "folderName" field.

func (*UploadMutation) SetID

func (m *UploadMutation) SetID(id int64)

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

func (*UploadMutation) SetKey

func (m *UploadMutation) SetKey(s string)

SetKey sets the "key" field.

func (*UploadMutation) SetLastPartUploadedAt

func (m *UploadMutation) SetLastPartUploadedAt(i int64)

SetLastPartUploadedAt sets the "lastPartUploadedAt" field.

func (*UploadMutation) SetOp

func (m *UploadMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*UploadMutation) SetRepoId

func (m *UploadMutation) SetRepoId(s string)

SetRepoId sets the "repoId" field.

func (*UploadMutation) SetScope

func (m *UploadMutation) SetScope(s string)

SetScope sets the "scope" field.

func (*UploadMutation) SetStartedPartUploadCount

func (m *UploadMutation) SetStartedPartUploadCount(i int)

SetStartedPartUploadCount sets the "startedPartUploadCount" field.

func (*UploadMutation) SetTupleHash

func (m *UploadMutation) SetTupleHash(s string)

SetTupleHash sets the "tupleHash" field.

func (*UploadMutation) SetVersion

func (m *UploadMutation) SetVersion(s string)

SetVersion sets the "version" field.

func (*UploadMutation) StartedPartUploadCount

func (m *UploadMutation) StartedPartUploadCount() (r int, exists bool)

StartedPartUploadCount returns the value of the "startedPartUploadCount" field in the mutation.

func (*UploadMutation) TupleHash

func (m *UploadMutation) TupleHash() (r string, exists bool)

TupleHash returns the value of the "tupleHash" field in the mutation.

func (*UploadMutation) TupleHashCleared

func (m *UploadMutation) TupleHashCleared() bool

TupleHashCleared returns if the "tupleHash" field was cleared in this mutation.

func (UploadMutation) Tx

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

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

func (*UploadMutation) Type

func (m *UploadMutation) Type() string

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

func (*UploadMutation) Version

func (m *UploadMutation) Version() (r string, exists bool)

Version returns the value of the "version" field in the mutation.

func (*UploadMutation) Where

func (m *UploadMutation) Where(ps ...predicate.Upload)

Where appends a list predicates to the UploadMutation builder.

func (*UploadMutation) WhereP

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

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

type UploadQuery

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

UploadQuery is the builder for querying Upload entities.

func (*UploadQuery) Aggregate

func (_q *UploadQuery) Aggregate(fns ...AggregateFunc) *UploadSelect

Aggregate returns a UploadSelect configured with the given aggregations.

func (*UploadQuery) All

func (_q *UploadQuery) All(ctx context.Context) ([]*Upload, error)

All executes the query and returns a list of Uploads.

func (*UploadQuery) AllX

func (_q *UploadQuery) AllX(ctx context.Context) []*Upload

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

func (*UploadQuery) Clone

func (_q *UploadQuery) Clone() *UploadQuery

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

func (*UploadQuery) Count

func (_q *UploadQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*UploadQuery) CountX

func (_q *UploadQuery) CountX(ctx context.Context) int

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

func (*UploadQuery) Exist

func (_q *UploadQuery) Exist(ctx context.Context) (bool, error)

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

func (*UploadQuery) ExistX

func (_q *UploadQuery) ExistX(ctx context.Context) bool

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

func (*UploadQuery) First

func (_q *UploadQuery) First(ctx context.Context) (*Upload, error)

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

func (*UploadQuery) FirstID

func (_q *UploadQuery) FirstID(ctx context.Context) (id int64, err error)

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

func (*UploadQuery) FirstIDX

func (_q *UploadQuery) FirstIDX(ctx context.Context) int64

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

func (*UploadQuery) FirstX

func (_q *UploadQuery) FirstX(ctx context.Context) *Upload

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

func (*UploadQuery) GroupBy

func (_q *UploadQuery) GroupBy(field string, fields ...string) *UploadGroupBy

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

client.Upload.Query().
	GroupBy(upload.FieldKey).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*UploadQuery) IDs

func (_q *UploadQuery) IDs(ctx context.Context) (ids []int64, err error)

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

func (*UploadQuery) IDsX

func (_q *UploadQuery) IDsX(ctx context.Context) []int64

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

func (*UploadQuery) Limit

func (_q *UploadQuery) Limit(limit int) *UploadQuery

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

func (*UploadQuery) Offset

func (_q *UploadQuery) Offset(offset int) *UploadQuery

Offset to start from.

func (*UploadQuery) Only

func (_q *UploadQuery) Only(ctx context.Context) (*Upload, error)

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

func (*UploadQuery) OnlyID

func (_q *UploadQuery) OnlyID(ctx context.Context) (id int64, err error)

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

func (*UploadQuery) OnlyIDX

func (_q *UploadQuery) OnlyIDX(ctx context.Context) int64

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

func (*UploadQuery) OnlyX

func (_q *UploadQuery) OnlyX(ctx context.Context) *Upload

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

func (*UploadQuery) Order

func (_q *UploadQuery) Order(o ...upload.OrderOption) *UploadQuery

Order specifies how the records should be ordered.

func (*UploadQuery) Select

func (_q *UploadQuery) Select(fields ...string) *UploadSelect

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 {
	Key string `json:"key,omitempty"`
}

client.Upload.Query().
	Select(upload.FieldKey).
	Scan(ctx, &v)

func (*UploadQuery) Unique

func (_q *UploadQuery) Unique(unique bool) *UploadQuery

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

func (_q *UploadQuery) Where(ps ...predicate.Upload) *UploadQuery

Where adds a new predicate for the UploadQuery builder.

type UploadSelect

type UploadSelect struct {
	*UploadQuery
	// contains filtered or unexported fields
}

UploadSelect is the builder for selecting fields of Upload entities.

func (*UploadSelect) Aggregate

func (_s *UploadSelect) Aggregate(fns ...AggregateFunc) *UploadSelect

Aggregate adds the given aggregation functions to the selector query.

func (*UploadSelect) Bool

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

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

func (*UploadSelect) BoolX

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

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

func (*UploadSelect) Bools

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

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

func (*UploadSelect) BoolsX

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

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

func (*UploadSelect) Float64

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

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

func (*UploadSelect) Float64X

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

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

func (*UploadSelect) Float64s

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

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

func (*UploadSelect) Float64sX

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

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

func (*UploadSelect) Int

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

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

func (*UploadSelect) IntX

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

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

func (*UploadSelect) Ints

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

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

func (*UploadSelect) IntsX

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

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

func (*UploadSelect) Scan

func (_s *UploadSelect) Scan(ctx context.Context, v any) error

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

func (*UploadSelect) ScanX

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

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

func (*UploadSelect) String

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

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

func (*UploadSelect) StringX

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

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

func (*UploadSelect) Strings

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

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

func (*UploadSelect) StringsX

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

StringsX is like Strings, but panics if an error occurs.

type UploadUpdate

type UploadUpdate struct {
	// contains filtered or unexported fields
}

UploadUpdate is the builder for updating Upload entities.

func (*UploadUpdate) AddCommittedPartCount

func (_u *UploadUpdate) AddCommittedPartCount(v int) *UploadUpdate

AddCommittedPartCount adds value to the "committedPartCount" field.

func (*UploadUpdate) AddCreatedAt

func (_u *UploadUpdate) AddCreatedAt(v int64) *UploadUpdate

AddCreatedAt adds value to the "createdAt" field.

func (*UploadUpdate) AddFinishedPartUploadCount

func (_u *UploadUpdate) AddFinishedPartUploadCount(v int) *UploadUpdate

AddFinishedPartUploadCount adds value to the "finishedPartUploadCount" field.

func (*UploadUpdate) AddLastPartUploadedAt

func (_u *UploadUpdate) AddLastPartUploadedAt(v int64) *UploadUpdate

AddLastPartUploadedAt adds value to the "lastPartUploadedAt" field.

func (*UploadUpdate) AddStartedPartUploadCount

func (_u *UploadUpdate) AddStartedPartUploadCount(v int) *UploadUpdate

AddStartedPartUploadCount adds value to the "startedPartUploadCount" field.

func (*UploadUpdate) ClearCommittedPartCount

func (_u *UploadUpdate) ClearCommittedPartCount() *UploadUpdate

ClearCommittedPartCount clears the value of the "committedPartCount" field.

func (*UploadUpdate) ClearLastPartUploadedAt

func (_u *UploadUpdate) ClearLastPartUploadedAt() *UploadUpdate

ClearLastPartUploadedAt clears the value of the "lastPartUploadedAt" field.

func (*UploadUpdate) ClearTupleHash

func (_u *UploadUpdate) ClearTupleHash() *UploadUpdate

ClearTupleHash clears the value of the "tupleHash" field.

func (*UploadUpdate) Exec

func (_u *UploadUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*UploadUpdate) ExecX

func (_u *UploadUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UploadUpdate) Mutation

func (_u *UploadUpdate) Mutation() *UploadMutation

Mutation returns the UploadMutation object of the builder.

func (*UploadUpdate) Save

func (_u *UploadUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*UploadUpdate) SaveX

func (_u *UploadUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*UploadUpdate) SetCommittedPartCount

func (_u *UploadUpdate) SetCommittedPartCount(v int) *UploadUpdate

SetCommittedPartCount sets the "committedPartCount" field.

func (*UploadUpdate) SetCreatedAt

func (_u *UploadUpdate) SetCreatedAt(v int64) *UploadUpdate

SetCreatedAt sets the "createdAt" field.

func (*UploadUpdate) SetFinishedPartUploadCount

func (_u *UploadUpdate) SetFinishedPartUploadCount(v int) *UploadUpdate

SetFinishedPartUploadCount sets the "finishedPartUploadCount" field.

func (*UploadUpdate) SetFolderName

func (_u *UploadUpdate) SetFolderName(v string) *UploadUpdate

SetFolderName sets the "folderName" field.

func (*UploadUpdate) SetKey

func (_u *UploadUpdate) SetKey(v string) *UploadUpdate

SetKey sets the "key" field.

func (*UploadUpdate) SetLastPartUploadedAt

func (_u *UploadUpdate) SetLastPartUploadedAt(v int64) *UploadUpdate

SetLastPartUploadedAt sets the "lastPartUploadedAt" field.

func (*UploadUpdate) SetNillableCommittedPartCount

func (_u *UploadUpdate) SetNillableCommittedPartCount(v *int) *UploadUpdate

SetNillableCommittedPartCount sets the "committedPartCount" field if the given value is not nil.

func (*UploadUpdate) SetNillableCreatedAt

func (_u *UploadUpdate) SetNillableCreatedAt(v *int64) *UploadUpdate

SetNillableCreatedAt sets the "createdAt" field if the given value is not nil.

func (*UploadUpdate) SetNillableFinishedPartUploadCount

func (_u *UploadUpdate) SetNillableFinishedPartUploadCount(v *int) *UploadUpdate

SetNillableFinishedPartUploadCount sets the "finishedPartUploadCount" field if the given value is not nil.

func (*UploadUpdate) SetNillableFolderName

func (_u *UploadUpdate) SetNillableFolderName(v *string) *UploadUpdate

SetNillableFolderName sets the "folderName" field if the given value is not nil.

func (*UploadUpdate) SetNillableKey

func (_u *UploadUpdate) SetNillableKey(v *string) *UploadUpdate

SetNillableKey sets the "key" field if the given value is not nil.

func (*UploadUpdate) SetNillableLastPartUploadedAt

func (_u *UploadUpdate) SetNillableLastPartUploadedAt(v *int64) *UploadUpdate

SetNillableLastPartUploadedAt sets the "lastPartUploadedAt" field if the given value is not nil.

func (*UploadUpdate) SetNillableRepoId

func (_u *UploadUpdate) SetNillableRepoId(v *string) *UploadUpdate

SetNillableRepoId sets the "repoId" field if the given value is not nil.

func (*UploadUpdate) SetNillableScope

func (_u *UploadUpdate) SetNillableScope(v *string) *UploadUpdate

SetNillableScope sets the "scope" field if the given value is not nil.

func (*UploadUpdate) SetNillableStartedPartUploadCount

func (_u *UploadUpdate) SetNillableStartedPartUploadCount(v *int) *UploadUpdate

SetNillableStartedPartUploadCount sets the "startedPartUploadCount" field if the given value is not nil.

func (*UploadUpdate) SetNillableTupleHash

func (_u *UploadUpdate) SetNillableTupleHash(v *string) *UploadUpdate

SetNillableTupleHash sets the "tupleHash" field if the given value is not nil.

func (*UploadUpdate) SetNillableVersion

func (_u *UploadUpdate) SetNillableVersion(v *string) *UploadUpdate

SetNillableVersion sets the "version" field if the given value is not nil.

func (*UploadUpdate) SetRepoId

func (_u *UploadUpdate) SetRepoId(v string) *UploadUpdate

SetRepoId sets the "repoId" field.

func (*UploadUpdate) SetScope

func (_u *UploadUpdate) SetScope(v string) *UploadUpdate

SetScope sets the "scope" field.

func (*UploadUpdate) SetStartedPartUploadCount

func (_u *UploadUpdate) SetStartedPartUploadCount(v int) *UploadUpdate

SetStartedPartUploadCount sets the "startedPartUploadCount" field.

func (*UploadUpdate) SetTupleHash

func (_u *UploadUpdate) SetTupleHash(v string) *UploadUpdate

SetTupleHash sets the "tupleHash" field.

func (*UploadUpdate) SetVersion

func (_u *UploadUpdate) SetVersion(v string) *UploadUpdate

SetVersion sets the "version" field.

func (*UploadUpdate) Where

func (_u *UploadUpdate) Where(ps ...predicate.Upload) *UploadUpdate

Where appends a list predicates to the UploadUpdate builder.

type UploadUpdateOne

type UploadUpdateOne struct {
	// contains filtered or unexported fields
}

UploadUpdateOne is the builder for updating a single Upload entity.

func (*UploadUpdateOne) AddCommittedPartCount

func (_u *UploadUpdateOne) AddCommittedPartCount(v int) *UploadUpdateOne

AddCommittedPartCount adds value to the "committedPartCount" field.

func (*UploadUpdateOne) AddCreatedAt

func (_u *UploadUpdateOne) AddCreatedAt(v int64) *UploadUpdateOne

AddCreatedAt adds value to the "createdAt" field.

func (*UploadUpdateOne) AddFinishedPartUploadCount

func (_u *UploadUpdateOne) AddFinishedPartUploadCount(v int) *UploadUpdateOne

AddFinishedPartUploadCount adds value to the "finishedPartUploadCount" field.

func (*UploadUpdateOne) AddLastPartUploadedAt

func (_u *UploadUpdateOne) AddLastPartUploadedAt(v int64) *UploadUpdateOne

AddLastPartUploadedAt adds value to the "lastPartUploadedAt" field.

func (*UploadUpdateOne) AddStartedPartUploadCount

func (_u *UploadUpdateOne) AddStartedPartUploadCount(v int) *UploadUpdateOne

AddStartedPartUploadCount adds value to the "startedPartUploadCount" field.

func (*UploadUpdateOne) ClearCommittedPartCount

func (_u *UploadUpdateOne) ClearCommittedPartCount() *UploadUpdateOne

ClearCommittedPartCount clears the value of the "committedPartCount" field.

func (*UploadUpdateOne) ClearLastPartUploadedAt

func (_u *UploadUpdateOne) ClearLastPartUploadedAt() *UploadUpdateOne

ClearLastPartUploadedAt clears the value of the "lastPartUploadedAt" field.

func (*UploadUpdateOne) ClearTupleHash

func (_u *UploadUpdateOne) ClearTupleHash() *UploadUpdateOne

ClearTupleHash clears the value of the "tupleHash" field.

func (*UploadUpdateOne) Exec

func (_u *UploadUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*UploadUpdateOne) ExecX

func (_u *UploadUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UploadUpdateOne) Mutation

func (_u *UploadUpdateOne) Mutation() *UploadMutation

Mutation returns the UploadMutation object of the builder.

func (*UploadUpdateOne) Save

func (_u *UploadUpdateOne) Save(ctx context.Context) (*Upload, error)

Save executes the query and returns the updated Upload entity.

func (*UploadUpdateOne) SaveX

func (_u *UploadUpdateOne) SaveX(ctx context.Context) *Upload

SaveX is like Save, but panics if an error occurs.

func (*UploadUpdateOne) Select

func (_u *UploadUpdateOne) Select(field string, fields ...string) *UploadUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*UploadUpdateOne) SetCommittedPartCount

func (_u *UploadUpdateOne) SetCommittedPartCount(v int) *UploadUpdateOne

SetCommittedPartCount sets the "committedPartCount" field.

func (*UploadUpdateOne) SetCreatedAt

func (_u *UploadUpdateOne) SetCreatedAt(v int64) *UploadUpdateOne

SetCreatedAt sets the "createdAt" field.

func (*UploadUpdateOne) SetFinishedPartUploadCount

func (_u *UploadUpdateOne) SetFinishedPartUploadCount(v int) *UploadUpdateOne

SetFinishedPartUploadCount sets the "finishedPartUploadCount" field.

func (*UploadUpdateOne) SetFolderName

func (_u *UploadUpdateOne) SetFolderName(v string) *UploadUpdateOne

SetFolderName sets the "folderName" field.

func (*UploadUpdateOne) SetKey

func (_u *UploadUpdateOne) SetKey(v string) *UploadUpdateOne

SetKey sets the "key" field.

func (*UploadUpdateOne) SetLastPartUploadedAt

func (_u *UploadUpdateOne) SetLastPartUploadedAt(v int64) *UploadUpdateOne

SetLastPartUploadedAt sets the "lastPartUploadedAt" field.

func (*UploadUpdateOne) SetNillableCommittedPartCount

func (_u *UploadUpdateOne) SetNillableCommittedPartCount(v *int) *UploadUpdateOne

SetNillableCommittedPartCount sets the "committedPartCount" field if the given value is not nil.

func (*UploadUpdateOne) SetNillableCreatedAt

func (_u *UploadUpdateOne) SetNillableCreatedAt(v *int64) *UploadUpdateOne

SetNillableCreatedAt sets the "createdAt" field if the given value is not nil.

func (*UploadUpdateOne) SetNillableFinishedPartUploadCount

func (_u *UploadUpdateOne) SetNillableFinishedPartUploadCount(v *int) *UploadUpdateOne

SetNillableFinishedPartUploadCount sets the "finishedPartUploadCount" field if the given value is not nil.

func (*UploadUpdateOne) SetNillableFolderName

func (_u *UploadUpdateOne) SetNillableFolderName(v *string) *UploadUpdateOne

SetNillableFolderName sets the "folderName" field if the given value is not nil.

func (*UploadUpdateOne) SetNillableKey

func (_u *UploadUpdateOne) SetNillableKey(v *string) *UploadUpdateOne

SetNillableKey sets the "key" field if the given value is not nil.

func (*UploadUpdateOne) SetNillableLastPartUploadedAt

func (_u *UploadUpdateOne) SetNillableLastPartUploadedAt(v *int64) *UploadUpdateOne

SetNillableLastPartUploadedAt sets the "lastPartUploadedAt" field if the given value is not nil.

func (*UploadUpdateOne) SetNillableRepoId

func (_u *UploadUpdateOne) SetNillableRepoId(v *string) *UploadUpdateOne

SetNillableRepoId sets the "repoId" field if the given value is not nil.

func (*UploadUpdateOne) SetNillableScope

func (_u *UploadUpdateOne) SetNillableScope(v *string) *UploadUpdateOne

SetNillableScope sets the "scope" field if the given value is not nil.

func (*UploadUpdateOne) SetNillableStartedPartUploadCount

func (_u *UploadUpdateOne) SetNillableStartedPartUploadCount(v *int) *UploadUpdateOne

SetNillableStartedPartUploadCount sets the "startedPartUploadCount" field if the given value is not nil.

func (*UploadUpdateOne) SetNillableTupleHash

func (_u *UploadUpdateOne) SetNillableTupleHash(v *string) *UploadUpdateOne

SetNillableTupleHash sets the "tupleHash" field if the given value is not nil.

func (*UploadUpdateOne) SetNillableVersion

func (_u *UploadUpdateOne) SetNillableVersion(v *string) *UploadUpdateOne

SetNillableVersion sets the "version" field if the given value is not nil.

func (*UploadUpdateOne) SetRepoId

func (_u *UploadUpdateOne) SetRepoId(v string) *UploadUpdateOne

SetRepoId sets the "repoId" field.

func (*UploadUpdateOne) SetScope

func (_u *UploadUpdateOne) SetScope(v string) *UploadUpdateOne

SetScope sets the "scope" field.

func (*UploadUpdateOne) SetStartedPartUploadCount

func (_u *UploadUpdateOne) SetStartedPartUploadCount(v int) *UploadUpdateOne

SetStartedPartUploadCount sets the "startedPartUploadCount" field.

func (*UploadUpdateOne) SetTupleHash

func (_u *UploadUpdateOne) SetTupleHash(v string) *UploadUpdateOne

SetTupleHash sets the "tupleHash" field.

func (*UploadUpdateOne) SetVersion

func (_u *UploadUpdateOne) SetVersion(v string) *UploadUpdateOne

SetVersion sets the "version" field.

func (*UploadUpdateOne) Where

func (_u *UploadUpdateOne) Where(ps ...predicate.Upload) *UploadUpdateOne

Where appends a list predicates to the UploadUpdate builder.

type Uploads

type Uploads []*Upload

Uploads is a parsable slice of Upload.

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