Documentation
¶
Index ¶
- Constants
- Variables
- func Asc(fields ...string) func(*sql.Selector)
- func Desc(fields ...string) func(*sql.Selector)
- func IsConstraintError(err error) bool
- func IsNotFound(err error) bool
- func IsNotLoaded(err error) bool
- func IsNotSingular(err error) bool
- func IsValidationError(err error) bool
- func MaskNotFound(err error) error
- func NewContext(parent context.Context, c *Client) context.Context
- func NewTxContext(parent context.Context, tx *Tx) context.Context
- type AggregateFunc
- type Client
- func (c *Client) BeginTx(ctx context.Context, opts *sql.TxOptions) (*Tx, error)
- func (c *Client) Close() error
- func (c *Client) Debug() *Client
- func (c *Client) Intercept(interceptors ...Interceptor)
- func (c *Client) Mutate(ctx context.Context, m Mutation) (Value, error)
- func (c *Client) Tx(ctx context.Context) (*Tx, error)
- func (c *Client) Use(hooks ...Hook)
- type CommitFunc
- type CommitHook
- type Committer
- type ConstraintError
- type DownloadEvent
- type DownloadEventClient
- func (c *DownloadEventClient) Create() *DownloadEventCreate
- func (c *DownloadEventClient) CreateBulk(builders ...*DownloadEventCreate) *DownloadEventCreateBulk
- func (c *DownloadEventClient) Delete() *DownloadEventDelete
- func (c *DownloadEventClient) DeleteOne(_m *DownloadEvent) *DownloadEventDeleteOne
- func (c *DownloadEventClient) DeleteOneID(id int64) *DownloadEventDeleteOne
- func (c *DownloadEventClient) Get(ctx context.Context, id int64) (*DownloadEvent, error)
- func (c *DownloadEventClient) GetX(ctx context.Context, id int64) *DownloadEvent
- func (c *DownloadEventClient) Hooks() []Hook
- func (c *DownloadEventClient) Intercept(interceptors ...Interceptor)
- func (c *DownloadEventClient) Interceptors() []Interceptor
- func (c *DownloadEventClient) MapCreateBulk(slice any, setFunc func(*DownloadEventCreate, int)) *DownloadEventCreateBulk
- func (c *DownloadEventClient) Query() *DownloadEventQuery
- func (c *DownloadEventClient) Update() *DownloadEventUpdate
- func (c *DownloadEventClient) UpdateOne(_m *DownloadEvent) *DownloadEventUpdateOne
- func (c *DownloadEventClient) UpdateOneID(id int64) *DownloadEventUpdateOne
- func (c *DownloadEventClient) Use(hooks ...Hook)
- type DownloadEventCreate
- func (_c *DownloadEventCreate) Exec(ctx context.Context) error
- func (_c *DownloadEventCreate) ExecX(ctx context.Context)
- func (_c *DownloadEventCreate) Mutation() *DownloadEventMutation
- func (_c *DownloadEventCreate) Save(ctx context.Context) (*DownloadEvent, error)
- func (_c *DownloadEventCreate) SaveX(ctx context.Context) *DownloadEvent
- func (_c *DownloadEventCreate) SetBytesTransferred(v int64) *DownloadEventCreate
- func (_c *DownloadEventCreate) SetCreatedAt(v time.Time) *DownloadEventCreate
- func (_c *DownloadEventCreate) SetID(v int64) *DownloadEventCreate
- func (_c *DownloadEventCreate) SetNillableBytesTransferred(v *int64) *DownloadEventCreate
- func (_c *DownloadEventCreate) SetNillableCreatedAt(v *time.Time) *DownloadEventCreate
- func (_c *DownloadEventCreate) SetNillableShareID(v *string) *DownloadEventCreate
- func (_c *DownloadEventCreate) SetOutcome(v string) *DownloadEventCreate
- func (_c *DownloadEventCreate) SetPhase(v string) *DownloadEventCreate
- func (_c *DownloadEventCreate) SetShareID(v string) *DownloadEventCreate
- type DownloadEventCreateBulk
- type DownloadEventDelete
- type DownloadEventDeleteOne
- type DownloadEventGroupBy
- func (_g *DownloadEventGroupBy) Aggregate(fns ...AggregateFunc) *DownloadEventGroupBy
- func (s *DownloadEventGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *DownloadEventGroupBy) BoolX(ctx context.Context) bool
- func (s *DownloadEventGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *DownloadEventGroupBy) BoolsX(ctx context.Context) []bool
- func (s *DownloadEventGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *DownloadEventGroupBy) Float64X(ctx context.Context) float64
- func (s *DownloadEventGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *DownloadEventGroupBy) Float64sX(ctx context.Context) []float64
- func (s *DownloadEventGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *DownloadEventGroupBy) IntX(ctx context.Context) int
- func (s *DownloadEventGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *DownloadEventGroupBy) IntsX(ctx context.Context) []int
- func (_g *DownloadEventGroupBy) Scan(ctx context.Context, v any) error
- func (s *DownloadEventGroupBy) ScanX(ctx context.Context, v any)
- func (s *DownloadEventGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *DownloadEventGroupBy) StringX(ctx context.Context) string
- func (s *DownloadEventGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *DownloadEventGroupBy) StringsX(ctx context.Context) []string
- type DownloadEventMutation
- func (m *DownloadEventMutation) AddBytesTransferred(i int64)
- func (m *DownloadEventMutation) AddField(name string, value ent.Value) error
- func (m *DownloadEventMutation) AddedBytesTransferred() (r int64, exists bool)
- func (m *DownloadEventMutation) AddedEdges() []string
- func (m *DownloadEventMutation) AddedField(name string) (ent.Value, bool)
- func (m *DownloadEventMutation) AddedFields() []string
- func (m *DownloadEventMutation) AddedIDs(name string) []ent.Value
- func (m *DownloadEventMutation) BytesTransferred() (r int64, exists bool)
- func (m *DownloadEventMutation) ClearEdge(name string) error
- func (m *DownloadEventMutation) ClearField(name string) error
- func (m *DownloadEventMutation) ClearShareID()
- func (m *DownloadEventMutation) ClearedEdges() []string
- func (m *DownloadEventMutation) ClearedFields() []string
- func (m DownloadEventMutation) Client() *Client
- func (m *DownloadEventMutation) CreatedAt() (r time.Time, exists bool)
- func (m *DownloadEventMutation) EdgeCleared(name string) bool
- func (m *DownloadEventMutation) Field(name string) (ent.Value, bool)
- func (m *DownloadEventMutation) FieldCleared(name string) bool
- func (m *DownloadEventMutation) Fields() []string
- func (m *DownloadEventMutation) ID() (id int64, exists bool)
- func (m *DownloadEventMutation) IDs(ctx context.Context) ([]int64, error)
- func (m *DownloadEventMutation) OldBytesTransferred(ctx context.Context) (v int64, err error)
- func (m *DownloadEventMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *DownloadEventMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *DownloadEventMutation) OldOutcome(ctx context.Context) (v string, err error)
- func (m *DownloadEventMutation) OldPhase(ctx context.Context) (v string, err error)
- func (m *DownloadEventMutation) OldShareID(ctx context.Context) (v *string, err error)
- func (m *DownloadEventMutation) Op() Op
- func (m *DownloadEventMutation) Outcome() (r string, exists bool)
- func (m *DownloadEventMutation) Phase() (r string, exists bool)
- func (m *DownloadEventMutation) RemovedEdges() []string
- func (m *DownloadEventMutation) RemovedIDs(name string) []ent.Value
- func (m *DownloadEventMutation) ResetBytesTransferred()
- func (m *DownloadEventMutation) ResetCreatedAt()
- func (m *DownloadEventMutation) ResetEdge(name string) error
- func (m *DownloadEventMutation) ResetField(name string) error
- func (m *DownloadEventMutation) ResetOutcome()
- func (m *DownloadEventMutation) ResetPhase()
- func (m *DownloadEventMutation) ResetShareID()
- func (m *DownloadEventMutation) SetBytesTransferred(i int64)
- func (m *DownloadEventMutation) SetCreatedAt(t time.Time)
- func (m *DownloadEventMutation) SetField(name string, value ent.Value) error
- func (m *DownloadEventMutation) SetID(id int64)
- func (m *DownloadEventMutation) SetOp(op Op)
- func (m *DownloadEventMutation) SetOutcome(s string)
- func (m *DownloadEventMutation) SetPhase(s string)
- func (m *DownloadEventMutation) SetShareID(s string)
- func (m *DownloadEventMutation) ShareID() (r string, exists bool)
- func (m *DownloadEventMutation) ShareIDCleared() bool
- func (m DownloadEventMutation) Tx() (*Tx, error)
- func (m *DownloadEventMutation) Type() string
- func (m *DownloadEventMutation) Where(ps ...predicate.DownloadEvent)
- func (m *DownloadEventMutation) WhereP(ps ...func(*sql.Selector))
- type DownloadEventQuery
- func (_q *DownloadEventQuery) Aggregate(fns ...AggregateFunc) *DownloadEventSelect
- func (_q *DownloadEventQuery) All(ctx context.Context) ([]*DownloadEvent, error)
- func (_q *DownloadEventQuery) AllX(ctx context.Context) []*DownloadEvent
- func (_q *DownloadEventQuery) Clone() *DownloadEventQuery
- func (_q *DownloadEventQuery) Count(ctx context.Context) (int, error)
- func (_q *DownloadEventQuery) CountX(ctx context.Context) int
- func (_q *DownloadEventQuery) Exist(ctx context.Context) (bool, error)
- func (_q *DownloadEventQuery) ExistX(ctx context.Context) bool
- func (_q *DownloadEventQuery) First(ctx context.Context) (*DownloadEvent, error)
- func (_q *DownloadEventQuery) FirstID(ctx context.Context) (id int64, err error)
- func (_q *DownloadEventQuery) FirstIDX(ctx context.Context) int64
- func (_q *DownloadEventQuery) FirstX(ctx context.Context) *DownloadEvent
- func (_q *DownloadEventQuery) GroupBy(field string, fields ...string) *DownloadEventGroupBy
- func (_q *DownloadEventQuery) IDs(ctx context.Context) (ids []int64, err error)
- func (_q *DownloadEventQuery) IDsX(ctx context.Context) []int64
- func (_q *DownloadEventQuery) Limit(limit int) *DownloadEventQuery
- func (_q *DownloadEventQuery) Offset(offset int) *DownloadEventQuery
- func (_q *DownloadEventQuery) Only(ctx context.Context) (*DownloadEvent, error)
- func (_q *DownloadEventQuery) OnlyID(ctx context.Context) (id int64, err error)
- func (_q *DownloadEventQuery) OnlyIDX(ctx context.Context) int64
- func (_q *DownloadEventQuery) OnlyX(ctx context.Context) *DownloadEvent
- func (_q *DownloadEventQuery) Order(o ...downloadevent.OrderOption) *DownloadEventQuery
- func (_q *DownloadEventQuery) Select(fields ...string) *DownloadEventSelect
- func (_q *DownloadEventQuery) Unique(unique bool) *DownloadEventQuery
- func (_q *DownloadEventQuery) Where(ps ...predicate.DownloadEvent) *DownloadEventQuery
- type DownloadEventSelect
- func (_s *DownloadEventSelect) Aggregate(fns ...AggregateFunc) *DownloadEventSelect
- func (s *DownloadEventSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *DownloadEventSelect) BoolX(ctx context.Context) bool
- func (s *DownloadEventSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *DownloadEventSelect) BoolsX(ctx context.Context) []bool
- func (s *DownloadEventSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *DownloadEventSelect) Float64X(ctx context.Context) float64
- func (s *DownloadEventSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *DownloadEventSelect) Float64sX(ctx context.Context) []float64
- func (s *DownloadEventSelect) Int(ctx context.Context) (_ int, err error)
- func (s *DownloadEventSelect) IntX(ctx context.Context) int
- func (s *DownloadEventSelect) Ints(ctx context.Context) ([]int, error)
- func (s *DownloadEventSelect) IntsX(ctx context.Context) []int
- func (_s *DownloadEventSelect) Scan(ctx context.Context, v any) error
- func (s *DownloadEventSelect) ScanX(ctx context.Context, v any)
- func (s *DownloadEventSelect) String(ctx context.Context) (_ string, err error)
- func (s *DownloadEventSelect) StringX(ctx context.Context) string
- func (s *DownloadEventSelect) Strings(ctx context.Context) ([]string, error)
- func (s *DownloadEventSelect) StringsX(ctx context.Context) []string
- type DownloadEventUpdate
- func (_u *DownloadEventUpdate) AddBytesTransferred(v int64) *DownloadEventUpdate
- func (_u *DownloadEventUpdate) ClearShareID() *DownloadEventUpdate
- func (_u *DownloadEventUpdate) Exec(ctx context.Context) error
- func (_u *DownloadEventUpdate) ExecX(ctx context.Context)
- func (_u *DownloadEventUpdate) Mutation() *DownloadEventMutation
- func (_u *DownloadEventUpdate) Save(ctx context.Context) (int, error)
- func (_u *DownloadEventUpdate) SaveX(ctx context.Context) int
- func (_u *DownloadEventUpdate) SetBytesTransferred(v int64) *DownloadEventUpdate
- func (_u *DownloadEventUpdate) SetNillableBytesTransferred(v *int64) *DownloadEventUpdate
- func (_u *DownloadEventUpdate) SetNillableOutcome(v *string) *DownloadEventUpdate
- func (_u *DownloadEventUpdate) SetNillablePhase(v *string) *DownloadEventUpdate
- func (_u *DownloadEventUpdate) SetNillableShareID(v *string) *DownloadEventUpdate
- func (_u *DownloadEventUpdate) SetOutcome(v string) *DownloadEventUpdate
- func (_u *DownloadEventUpdate) SetPhase(v string) *DownloadEventUpdate
- func (_u *DownloadEventUpdate) SetShareID(v string) *DownloadEventUpdate
- func (_u *DownloadEventUpdate) Where(ps ...predicate.DownloadEvent) *DownloadEventUpdate
- type DownloadEventUpdateOne
- func (_u *DownloadEventUpdateOne) AddBytesTransferred(v int64) *DownloadEventUpdateOne
- func (_u *DownloadEventUpdateOne) ClearShareID() *DownloadEventUpdateOne
- func (_u *DownloadEventUpdateOne) Exec(ctx context.Context) error
- func (_u *DownloadEventUpdateOne) ExecX(ctx context.Context)
- func (_u *DownloadEventUpdateOne) Mutation() *DownloadEventMutation
- func (_u *DownloadEventUpdateOne) Save(ctx context.Context) (*DownloadEvent, error)
- func (_u *DownloadEventUpdateOne) SaveX(ctx context.Context) *DownloadEvent
- func (_u *DownloadEventUpdateOne) Select(field string, fields ...string) *DownloadEventUpdateOne
- func (_u *DownloadEventUpdateOne) SetBytesTransferred(v int64) *DownloadEventUpdateOne
- func (_u *DownloadEventUpdateOne) SetNillableBytesTransferred(v *int64) *DownloadEventUpdateOne
- func (_u *DownloadEventUpdateOne) SetNillableOutcome(v *string) *DownloadEventUpdateOne
- func (_u *DownloadEventUpdateOne) SetNillablePhase(v *string) *DownloadEventUpdateOne
- func (_u *DownloadEventUpdateOne) SetNillableShareID(v *string) *DownloadEventUpdateOne
- func (_u *DownloadEventUpdateOne) SetOutcome(v string) *DownloadEventUpdateOne
- func (_u *DownloadEventUpdateOne) SetPhase(v string) *DownloadEventUpdateOne
- func (_u *DownloadEventUpdateOne) SetShareID(v string) *DownloadEventUpdateOne
- func (_u *DownloadEventUpdateOne) Where(ps ...predicate.DownloadEvent) *DownloadEventUpdateOne
- type DownloadEvents
- type DownloadIssuer
- type DownloadIssuerClient
- func (c *DownloadIssuerClient) Create() *DownloadIssuerCreate
- func (c *DownloadIssuerClient) CreateBulk(builders ...*DownloadIssuerCreate) *DownloadIssuerCreateBulk
- func (c *DownloadIssuerClient) Delete() *DownloadIssuerDelete
- func (c *DownloadIssuerClient) DeleteOne(_m *DownloadIssuer) *DownloadIssuerDeleteOne
- func (c *DownloadIssuerClient) DeleteOneID(id string) *DownloadIssuerDeleteOne
- func (c *DownloadIssuerClient) Get(ctx context.Context, id string) (*DownloadIssuer, error)
- func (c *DownloadIssuerClient) GetX(ctx context.Context, id string) *DownloadIssuer
- func (c *DownloadIssuerClient) Hooks() []Hook
- func (c *DownloadIssuerClient) Intercept(interceptors ...Interceptor)
- func (c *DownloadIssuerClient) Interceptors() []Interceptor
- func (c *DownloadIssuerClient) MapCreateBulk(slice any, setFunc func(*DownloadIssuerCreate, int)) *DownloadIssuerCreateBulk
- func (c *DownloadIssuerClient) Query() *DownloadIssuerQuery
- func (c *DownloadIssuerClient) Update() *DownloadIssuerUpdate
- func (c *DownloadIssuerClient) UpdateOne(_m *DownloadIssuer) *DownloadIssuerUpdateOne
- func (c *DownloadIssuerClient) UpdateOneID(id string) *DownloadIssuerUpdateOne
- func (c *DownloadIssuerClient) Use(hooks ...Hook)
- type DownloadIssuerCreate
- func (_c *DownloadIssuerCreate) Exec(ctx context.Context) error
- func (_c *DownloadIssuerCreate) ExecX(ctx context.Context)
- func (_c *DownloadIssuerCreate) Mutation() *DownloadIssuerMutation
- func (_c *DownloadIssuerCreate) Save(ctx context.Context) (*DownloadIssuer, error)
- func (_c *DownloadIssuerCreate) SaveX(ctx context.Context) *DownloadIssuer
- func (_c *DownloadIssuerCreate) SetEnabled(v bool) *DownloadIssuerCreate
- func (_c *DownloadIssuerCreate) SetID(v string) *DownloadIssuerCreate
- func (_c *DownloadIssuerCreate) SetNillableEnabled(v *bool) *DownloadIssuerCreate
- type DownloadIssuerCreateBulk
- func (_c *DownloadIssuerCreateBulk) Exec(ctx context.Context) error
- func (_c *DownloadIssuerCreateBulk) ExecX(ctx context.Context)
- func (_c *DownloadIssuerCreateBulk) Save(ctx context.Context) ([]*DownloadIssuer, error)
- func (_c *DownloadIssuerCreateBulk) SaveX(ctx context.Context) []*DownloadIssuer
- type DownloadIssuerDelete
- type DownloadIssuerDeleteOne
- type DownloadIssuerGroupBy
- func (_g *DownloadIssuerGroupBy) Aggregate(fns ...AggregateFunc) *DownloadIssuerGroupBy
- func (s *DownloadIssuerGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *DownloadIssuerGroupBy) BoolX(ctx context.Context) bool
- func (s *DownloadIssuerGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *DownloadIssuerGroupBy) BoolsX(ctx context.Context) []bool
- func (s *DownloadIssuerGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *DownloadIssuerGroupBy) Float64X(ctx context.Context) float64
- func (s *DownloadIssuerGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *DownloadIssuerGroupBy) Float64sX(ctx context.Context) []float64
- func (s *DownloadIssuerGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *DownloadIssuerGroupBy) IntX(ctx context.Context) int
- func (s *DownloadIssuerGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *DownloadIssuerGroupBy) IntsX(ctx context.Context) []int
- func (_g *DownloadIssuerGroupBy) Scan(ctx context.Context, v any) error
- func (s *DownloadIssuerGroupBy) ScanX(ctx context.Context, v any)
- func (s *DownloadIssuerGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *DownloadIssuerGroupBy) StringX(ctx context.Context) string
- func (s *DownloadIssuerGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *DownloadIssuerGroupBy) StringsX(ctx context.Context) []string
- type DownloadIssuerMutation
- func (m *DownloadIssuerMutation) AddField(name string, value ent.Value) error
- func (m *DownloadIssuerMutation) AddedEdges() []string
- func (m *DownloadIssuerMutation) AddedField(name string) (ent.Value, bool)
- func (m *DownloadIssuerMutation) AddedFields() []string
- func (m *DownloadIssuerMutation) AddedIDs(name string) []ent.Value
- func (m *DownloadIssuerMutation) ClearEdge(name string) error
- func (m *DownloadIssuerMutation) ClearField(name string) error
- func (m *DownloadIssuerMutation) ClearedEdges() []string
- func (m *DownloadIssuerMutation) ClearedFields() []string
- func (m DownloadIssuerMutation) Client() *Client
- func (m *DownloadIssuerMutation) EdgeCleared(name string) bool
- func (m *DownloadIssuerMutation) Enabled() (r bool, exists bool)
- func (m *DownloadIssuerMutation) Field(name string) (ent.Value, bool)
- func (m *DownloadIssuerMutation) FieldCleared(name string) bool
- func (m *DownloadIssuerMutation) Fields() []string
- func (m *DownloadIssuerMutation) ID() (id string, exists bool)
- func (m *DownloadIssuerMutation) IDs(ctx context.Context) ([]string, error)
- func (m *DownloadIssuerMutation) OldEnabled(ctx context.Context) (v bool, err error)
- func (m *DownloadIssuerMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *DownloadIssuerMutation) Op() Op
- func (m *DownloadIssuerMutation) RemovedEdges() []string
- func (m *DownloadIssuerMutation) RemovedIDs(name string) []ent.Value
- func (m *DownloadIssuerMutation) ResetEdge(name string) error
- func (m *DownloadIssuerMutation) ResetEnabled()
- func (m *DownloadIssuerMutation) ResetField(name string) error
- func (m *DownloadIssuerMutation) SetEnabled(b bool)
- func (m *DownloadIssuerMutation) SetField(name string, value ent.Value) error
- func (m *DownloadIssuerMutation) SetID(id string)
- func (m *DownloadIssuerMutation) SetOp(op Op)
- func (m DownloadIssuerMutation) Tx() (*Tx, error)
- func (m *DownloadIssuerMutation) Type() string
- func (m *DownloadIssuerMutation) Where(ps ...predicate.DownloadIssuer)
- func (m *DownloadIssuerMutation) WhereP(ps ...func(*sql.Selector))
- type DownloadIssuerQuery
- func (_q *DownloadIssuerQuery) Aggregate(fns ...AggregateFunc) *DownloadIssuerSelect
- func (_q *DownloadIssuerQuery) All(ctx context.Context) ([]*DownloadIssuer, error)
- func (_q *DownloadIssuerQuery) AllX(ctx context.Context) []*DownloadIssuer
- func (_q *DownloadIssuerQuery) Clone() *DownloadIssuerQuery
- func (_q *DownloadIssuerQuery) Count(ctx context.Context) (int, error)
- func (_q *DownloadIssuerQuery) CountX(ctx context.Context) int
- func (_q *DownloadIssuerQuery) Exist(ctx context.Context) (bool, error)
- func (_q *DownloadIssuerQuery) ExistX(ctx context.Context) bool
- func (_q *DownloadIssuerQuery) First(ctx context.Context) (*DownloadIssuer, error)
- func (_q *DownloadIssuerQuery) FirstID(ctx context.Context) (id string, err error)
- func (_q *DownloadIssuerQuery) FirstIDX(ctx context.Context) string
- func (_q *DownloadIssuerQuery) FirstX(ctx context.Context) *DownloadIssuer
- func (_q *DownloadIssuerQuery) GroupBy(field string, fields ...string) *DownloadIssuerGroupBy
- func (_q *DownloadIssuerQuery) IDs(ctx context.Context) (ids []string, err error)
- func (_q *DownloadIssuerQuery) IDsX(ctx context.Context) []string
- func (_q *DownloadIssuerQuery) Limit(limit int) *DownloadIssuerQuery
- func (_q *DownloadIssuerQuery) Offset(offset int) *DownloadIssuerQuery
- func (_q *DownloadIssuerQuery) Only(ctx context.Context) (*DownloadIssuer, error)
- func (_q *DownloadIssuerQuery) OnlyID(ctx context.Context) (id string, err error)
- func (_q *DownloadIssuerQuery) OnlyIDX(ctx context.Context) string
- func (_q *DownloadIssuerQuery) OnlyX(ctx context.Context) *DownloadIssuer
- func (_q *DownloadIssuerQuery) Order(o ...downloadissuer.OrderOption) *DownloadIssuerQuery
- func (_q *DownloadIssuerQuery) Select(fields ...string) *DownloadIssuerSelect
- func (_q *DownloadIssuerQuery) Unique(unique bool) *DownloadIssuerQuery
- func (_q *DownloadIssuerQuery) Where(ps ...predicate.DownloadIssuer) *DownloadIssuerQuery
- type DownloadIssuerSelect
- func (_s *DownloadIssuerSelect) Aggregate(fns ...AggregateFunc) *DownloadIssuerSelect
- func (s *DownloadIssuerSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *DownloadIssuerSelect) BoolX(ctx context.Context) bool
- func (s *DownloadIssuerSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *DownloadIssuerSelect) BoolsX(ctx context.Context) []bool
- func (s *DownloadIssuerSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *DownloadIssuerSelect) Float64X(ctx context.Context) float64
- func (s *DownloadIssuerSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *DownloadIssuerSelect) Float64sX(ctx context.Context) []float64
- func (s *DownloadIssuerSelect) Int(ctx context.Context) (_ int, err error)
- func (s *DownloadIssuerSelect) IntX(ctx context.Context) int
- func (s *DownloadIssuerSelect) Ints(ctx context.Context) ([]int, error)
- func (s *DownloadIssuerSelect) IntsX(ctx context.Context) []int
- func (_s *DownloadIssuerSelect) Scan(ctx context.Context, v any) error
- func (s *DownloadIssuerSelect) ScanX(ctx context.Context, v any)
- func (s *DownloadIssuerSelect) String(ctx context.Context) (_ string, err error)
- func (s *DownloadIssuerSelect) StringX(ctx context.Context) string
- func (s *DownloadIssuerSelect) Strings(ctx context.Context) ([]string, error)
- func (s *DownloadIssuerSelect) StringsX(ctx context.Context) []string
- type DownloadIssuerUpdate
- func (_u *DownloadIssuerUpdate) Exec(ctx context.Context) error
- func (_u *DownloadIssuerUpdate) ExecX(ctx context.Context)
- func (_u *DownloadIssuerUpdate) Mutation() *DownloadIssuerMutation
- func (_u *DownloadIssuerUpdate) Save(ctx context.Context) (int, error)
- func (_u *DownloadIssuerUpdate) SaveX(ctx context.Context) int
- func (_u *DownloadIssuerUpdate) SetEnabled(v bool) *DownloadIssuerUpdate
- func (_u *DownloadIssuerUpdate) SetNillableEnabled(v *bool) *DownloadIssuerUpdate
- func (_u *DownloadIssuerUpdate) Where(ps ...predicate.DownloadIssuer) *DownloadIssuerUpdate
- type DownloadIssuerUpdateOne
- func (_u *DownloadIssuerUpdateOne) Exec(ctx context.Context) error
- func (_u *DownloadIssuerUpdateOne) ExecX(ctx context.Context)
- func (_u *DownloadIssuerUpdateOne) Mutation() *DownloadIssuerMutation
- func (_u *DownloadIssuerUpdateOne) Save(ctx context.Context) (*DownloadIssuer, error)
- func (_u *DownloadIssuerUpdateOne) SaveX(ctx context.Context) *DownloadIssuer
- func (_u *DownloadIssuerUpdateOne) Select(field string, fields ...string) *DownloadIssuerUpdateOne
- func (_u *DownloadIssuerUpdateOne) SetEnabled(v bool) *DownloadIssuerUpdateOne
- func (_u *DownloadIssuerUpdateOne) SetNillableEnabled(v *bool) *DownloadIssuerUpdateOne
- func (_u *DownloadIssuerUpdateOne) Where(ps ...predicate.DownloadIssuer) *DownloadIssuerUpdateOne
- type DownloadIssuers
- type DownloadShare
- type DownloadShareClient
- func (c *DownloadShareClient) Create() *DownloadShareCreate
- func (c *DownloadShareClient) CreateBulk(builders ...*DownloadShareCreate) *DownloadShareCreateBulk
- func (c *DownloadShareClient) Delete() *DownloadShareDelete
- func (c *DownloadShareClient) DeleteOne(_m *DownloadShare) *DownloadShareDeleteOne
- func (c *DownloadShareClient) DeleteOneID(id string) *DownloadShareDeleteOne
- func (c *DownloadShareClient) Get(ctx context.Context, id string) (*DownloadShare, error)
- func (c *DownloadShareClient) GetX(ctx context.Context, id string) *DownloadShare
- func (c *DownloadShareClient) Hooks() []Hook
- func (c *DownloadShareClient) Intercept(interceptors ...Interceptor)
- func (c *DownloadShareClient) Interceptors() []Interceptor
- func (c *DownloadShareClient) MapCreateBulk(slice any, setFunc func(*DownloadShareCreate, int)) *DownloadShareCreateBulk
- func (c *DownloadShareClient) Query() *DownloadShareQuery
- func (c *DownloadShareClient) Update() *DownloadShareUpdate
- func (c *DownloadShareClient) UpdateOne(_m *DownloadShare) *DownloadShareUpdateOne
- func (c *DownloadShareClient) UpdateOneID(id string) *DownloadShareUpdateOne
- func (c *DownloadShareClient) Use(hooks ...Hook)
- type DownloadShareCreate
- func (_c *DownloadShareCreate) Exec(ctx context.Context) error
- func (_c *DownloadShareCreate) ExecX(ctx context.Context)
- func (_c *DownloadShareCreate) Mutation() *DownloadShareMutation
- func (_c *DownloadShareCreate) Save(ctx context.Context) (*DownloadShare, error)
- func (_c *DownloadShareCreate) SaveX(ctx context.Context) *DownloadShare
- func (_c *DownloadShareCreate) SetBlobDigest(v string) *DownloadShareCreate
- func (_c *DownloadShareCreate) SetBlobSize(v int64) *DownloadShareCreate
- func (_c *DownloadShareCreate) SetCreatedAt(v time.Time) *DownloadShareCreate
- func (_c *DownloadShareCreate) SetCustomerID(v string) *DownloadShareCreate
- func (_c *DownloadShareCreate) SetExpiresAt(v time.Time) *DownloadShareCreate
- func (_c *DownloadShareCreate) SetFilename(v string) *DownloadShareCreate
- func (_c *DownloadShareCreate) SetID(v string) *DownloadShareCreate
- func (_c *DownloadShareCreate) SetIssuedBy(v string) *DownloadShareCreate
- func (_c *DownloadShareCreate) SetManifestDigest(v string) *DownloadShareCreate
- func (_c *DownloadShareCreate) SetMaxSessions(v int) *DownloadShareCreate
- func (_c *DownloadShareCreate) SetMediaType(v string) *DownloadShareCreate
- func (_c *DownloadShareCreate) SetNillableMaxSessions(v *int) *DownloadShareCreate
- func (_c *DownloadShareCreate) SetNillableRevokedAt(v *time.Time) *DownloadShareCreate
- func (_c *DownloadShareCreate) SetNillableSessionsStarted(v *int64) *DownloadShareCreate
- func (_c *DownloadShareCreate) SetPurpose(v string) *DownloadShareCreate
- func (_c *DownloadShareCreate) SetRepository(v string) *DownloadShareCreate
- func (_c *DownloadShareCreate) SetRevokedAt(v time.Time) *DownloadShareCreate
- func (_c *DownloadShareCreate) SetSessionsStarted(v int64) *DownloadShareCreate
- func (_c *DownloadShareCreate) SetSourceTag(v string) *DownloadShareCreate
- func (_c *DownloadShareCreate) SetTokenHash(v []byte) *DownloadShareCreate
- type DownloadShareCreateBulk
- type DownloadShareDelete
- type DownloadShareDeleteOne
- type DownloadShareGroupBy
- func (_g *DownloadShareGroupBy) Aggregate(fns ...AggregateFunc) *DownloadShareGroupBy
- func (s *DownloadShareGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *DownloadShareGroupBy) BoolX(ctx context.Context) bool
- func (s *DownloadShareGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *DownloadShareGroupBy) BoolsX(ctx context.Context) []bool
- func (s *DownloadShareGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *DownloadShareGroupBy) Float64X(ctx context.Context) float64
- func (s *DownloadShareGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *DownloadShareGroupBy) Float64sX(ctx context.Context) []float64
- func (s *DownloadShareGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *DownloadShareGroupBy) IntX(ctx context.Context) int
- func (s *DownloadShareGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *DownloadShareGroupBy) IntsX(ctx context.Context) []int
- func (_g *DownloadShareGroupBy) Scan(ctx context.Context, v any) error
- func (s *DownloadShareGroupBy) ScanX(ctx context.Context, v any)
- func (s *DownloadShareGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *DownloadShareGroupBy) StringX(ctx context.Context) string
- func (s *DownloadShareGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *DownloadShareGroupBy) StringsX(ctx context.Context) []string
- type DownloadShareMutation
- func (m *DownloadShareMutation) AddBlobSize(i int64)
- func (m *DownloadShareMutation) AddField(name string, value ent.Value) error
- func (m *DownloadShareMutation) AddMaxSessions(i int)
- func (m *DownloadShareMutation) AddSessionsStarted(i int64)
- func (m *DownloadShareMutation) AddedBlobSize() (r int64, exists bool)
- func (m *DownloadShareMutation) AddedEdges() []string
- func (m *DownloadShareMutation) AddedField(name string) (ent.Value, bool)
- func (m *DownloadShareMutation) AddedFields() []string
- func (m *DownloadShareMutation) AddedIDs(name string) []ent.Value
- func (m *DownloadShareMutation) AddedMaxSessions() (r int, exists bool)
- func (m *DownloadShareMutation) AddedSessionsStarted() (r int64, exists bool)
- func (m *DownloadShareMutation) BlobDigest() (r string, exists bool)
- func (m *DownloadShareMutation) BlobSize() (r int64, exists bool)
- func (m *DownloadShareMutation) ClearEdge(name string) error
- func (m *DownloadShareMutation) ClearField(name string) error
- func (m *DownloadShareMutation) ClearMaxSessions()
- func (m *DownloadShareMutation) ClearRevokedAt()
- func (m *DownloadShareMutation) ClearedEdges() []string
- func (m *DownloadShareMutation) ClearedFields() []string
- func (m DownloadShareMutation) Client() *Client
- func (m *DownloadShareMutation) CreatedAt() (r time.Time, exists bool)
- func (m *DownloadShareMutation) CustomerID() (r string, exists bool)
- func (m *DownloadShareMutation) EdgeCleared(name string) bool
- func (m *DownloadShareMutation) ExpiresAt() (r time.Time, exists bool)
- func (m *DownloadShareMutation) Field(name string) (ent.Value, bool)
- func (m *DownloadShareMutation) FieldCleared(name string) bool
- func (m *DownloadShareMutation) Fields() []string
- func (m *DownloadShareMutation) Filename() (r string, exists bool)
- func (m *DownloadShareMutation) ID() (id string, exists bool)
- func (m *DownloadShareMutation) IDs(ctx context.Context) ([]string, error)
- func (m *DownloadShareMutation) IssuedBy() (r string, exists bool)
- func (m *DownloadShareMutation) ManifestDigest() (r string, exists bool)
- func (m *DownloadShareMutation) MaxSessions() (r int, exists bool)
- func (m *DownloadShareMutation) MaxSessionsCleared() bool
- func (m *DownloadShareMutation) MediaType() (r string, exists bool)
- func (m *DownloadShareMutation) OldBlobDigest(ctx context.Context) (v string, err error)
- func (m *DownloadShareMutation) OldBlobSize(ctx context.Context) (v int64, err error)
- func (m *DownloadShareMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *DownloadShareMutation) OldCustomerID(ctx context.Context) (v string, err error)
- func (m *DownloadShareMutation) OldExpiresAt(ctx context.Context) (v time.Time, err error)
- func (m *DownloadShareMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *DownloadShareMutation) OldFilename(ctx context.Context) (v string, err error)
- func (m *DownloadShareMutation) OldIssuedBy(ctx context.Context) (v string, err error)
- func (m *DownloadShareMutation) OldManifestDigest(ctx context.Context) (v string, err error)
- func (m *DownloadShareMutation) OldMaxSessions(ctx context.Context) (v *int, err error)
- func (m *DownloadShareMutation) OldMediaType(ctx context.Context) (v string, err error)
- func (m *DownloadShareMutation) OldPurpose(ctx context.Context) (v string, err error)
- func (m *DownloadShareMutation) OldRepository(ctx context.Context) (v string, err error)
- func (m *DownloadShareMutation) OldRevokedAt(ctx context.Context) (v *time.Time, err error)
- func (m *DownloadShareMutation) OldSessionsStarted(ctx context.Context) (v int64, err error)
- func (m *DownloadShareMutation) OldSourceTag(ctx context.Context) (v string, err error)
- func (m *DownloadShareMutation) OldTokenHash(ctx context.Context) (v []byte, err error)
- func (m *DownloadShareMutation) Op() Op
- func (m *DownloadShareMutation) Purpose() (r string, exists bool)
- func (m *DownloadShareMutation) RemovedEdges() []string
- func (m *DownloadShareMutation) RemovedIDs(name string) []ent.Value
- func (m *DownloadShareMutation) Repository() (r string, exists bool)
- func (m *DownloadShareMutation) ResetBlobDigest()
- func (m *DownloadShareMutation) ResetBlobSize()
- func (m *DownloadShareMutation) ResetCreatedAt()
- func (m *DownloadShareMutation) ResetCustomerID()
- func (m *DownloadShareMutation) ResetEdge(name string) error
- func (m *DownloadShareMutation) ResetExpiresAt()
- func (m *DownloadShareMutation) ResetField(name string) error
- func (m *DownloadShareMutation) ResetFilename()
- func (m *DownloadShareMutation) ResetIssuedBy()
- func (m *DownloadShareMutation) ResetManifestDigest()
- func (m *DownloadShareMutation) ResetMaxSessions()
- func (m *DownloadShareMutation) ResetMediaType()
- func (m *DownloadShareMutation) ResetPurpose()
- func (m *DownloadShareMutation) ResetRepository()
- func (m *DownloadShareMutation) ResetRevokedAt()
- func (m *DownloadShareMutation) ResetSessionsStarted()
- func (m *DownloadShareMutation) ResetSourceTag()
- func (m *DownloadShareMutation) ResetTokenHash()
- func (m *DownloadShareMutation) RevokedAt() (r time.Time, exists bool)
- func (m *DownloadShareMutation) RevokedAtCleared() bool
- func (m *DownloadShareMutation) SessionsStarted() (r int64, exists bool)
- func (m *DownloadShareMutation) SetBlobDigest(s string)
- func (m *DownloadShareMutation) SetBlobSize(i int64)
- func (m *DownloadShareMutation) SetCreatedAt(t time.Time)
- func (m *DownloadShareMutation) SetCustomerID(s string)
- func (m *DownloadShareMutation) SetExpiresAt(t time.Time)
- func (m *DownloadShareMutation) SetField(name string, value ent.Value) error
- func (m *DownloadShareMutation) SetFilename(s string)
- func (m *DownloadShareMutation) SetID(id string)
- func (m *DownloadShareMutation) SetIssuedBy(s string)
- func (m *DownloadShareMutation) SetManifestDigest(s string)
- func (m *DownloadShareMutation) SetMaxSessions(i int)
- func (m *DownloadShareMutation) SetMediaType(s string)
- func (m *DownloadShareMutation) SetOp(op Op)
- func (m *DownloadShareMutation) SetPurpose(s string)
- func (m *DownloadShareMutation) SetRepository(s string)
- func (m *DownloadShareMutation) SetRevokedAt(t time.Time)
- func (m *DownloadShareMutation) SetSessionsStarted(i int64)
- func (m *DownloadShareMutation) SetSourceTag(s string)
- func (m *DownloadShareMutation) SetTokenHash(b []byte)
- func (m *DownloadShareMutation) SourceTag() (r string, exists bool)
- func (m *DownloadShareMutation) TokenHash() (r []byte, exists bool)
- func (m DownloadShareMutation) Tx() (*Tx, error)
- func (m *DownloadShareMutation) Type() string
- func (m *DownloadShareMutation) Where(ps ...predicate.DownloadShare)
- func (m *DownloadShareMutation) WhereP(ps ...func(*sql.Selector))
- type DownloadShareQuery
- func (_q *DownloadShareQuery) Aggregate(fns ...AggregateFunc) *DownloadShareSelect
- func (_q *DownloadShareQuery) All(ctx context.Context) ([]*DownloadShare, error)
- func (_q *DownloadShareQuery) AllX(ctx context.Context) []*DownloadShare
- func (_q *DownloadShareQuery) Clone() *DownloadShareQuery
- func (_q *DownloadShareQuery) Count(ctx context.Context) (int, error)
- func (_q *DownloadShareQuery) CountX(ctx context.Context) int
- func (_q *DownloadShareQuery) Exist(ctx context.Context) (bool, error)
- func (_q *DownloadShareQuery) ExistX(ctx context.Context) bool
- func (_q *DownloadShareQuery) First(ctx context.Context) (*DownloadShare, error)
- func (_q *DownloadShareQuery) FirstID(ctx context.Context) (id string, err error)
- func (_q *DownloadShareQuery) FirstIDX(ctx context.Context) string
- func (_q *DownloadShareQuery) FirstX(ctx context.Context) *DownloadShare
- func (_q *DownloadShareQuery) GroupBy(field string, fields ...string) *DownloadShareGroupBy
- func (_q *DownloadShareQuery) IDs(ctx context.Context) (ids []string, err error)
- func (_q *DownloadShareQuery) IDsX(ctx context.Context) []string
- func (_q *DownloadShareQuery) Limit(limit int) *DownloadShareQuery
- func (_q *DownloadShareQuery) Offset(offset int) *DownloadShareQuery
- func (_q *DownloadShareQuery) Only(ctx context.Context) (*DownloadShare, error)
- func (_q *DownloadShareQuery) OnlyID(ctx context.Context) (id string, err error)
- func (_q *DownloadShareQuery) OnlyIDX(ctx context.Context) string
- func (_q *DownloadShareQuery) OnlyX(ctx context.Context) *DownloadShare
- func (_q *DownloadShareQuery) Order(o ...downloadshare.OrderOption) *DownloadShareQuery
- func (_q *DownloadShareQuery) Select(fields ...string) *DownloadShareSelect
- func (_q *DownloadShareQuery) Unique(unique bool) *DownloadShareQuery
- func (_q *DownloadShareQuery) Where(ps ...predicate.DownloadShare) *DownloadShareQuery
- type DownloadShareSelect
- func (_s *DownloadShareSelect) Aggregate(fns ...AggregateFunc) *DownloadShareSelect
- func (s *DownloadShareSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *DownloadShareSelect) BoolX(ctx context.Context) bool
- func (s *DownloadShareSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *DownloadShareSelect) BoolsX(ctx context.Context) []bool
- func (s *DownloadShareSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *DownloadShareSelect) Float64X(ctx context.Context) float64
- func (s *DownloadShareSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *DownloadShareSelect) Float64sX(ctx context.Context) []float64
- func (s *DownloadShareSelect) Int(ctx context.Context) (_ int, err error)
- func (s *DownloadShareSelect) IntX(ctx context.Context) int
- func (s *DownloadShareSelect) Ints(ctx context.Context) ([]int, error)
- func (s *DownloadShareSelect) IntsX(ctx context.Context) []int
- func (_s *DownloadShareSelect) Scan(ctx context.Context, v any) error
- func (s *DownloadShareSelect) ScanX(ctx context.Context, v any)
- func (s *DownloadShareSelect) String(ctx context.Context) (_ string, err error)
- func (s *DownloadShareSelect) StringX(ctx context.Context) string
- func (s *DownloadShareSelect) Strings(ctx context.Context) ([]string, error)
- func (s *DownloadShareSelect) StringsX(ctx context.Context) []string
- type DownloadShareUpdate
- func (_u *DownloadShareUpdate) AddSessionsStarted(v int64) *DownloadShareUpdate
- func (_u *DownloadShareUpdate) ClearRevokedAt() *DownloadShareUpdate
- func (_u *DownloadShareUpdate) Exec(ctx context.Context) error
- func (_u *DownloadShareUpdate) ExecX(ctx context.Context)
- func (_u *DownloadShareUpdate) Mutation() *DownloadShareMutation
- func (_u *DownloadShareUpdate) Save(ctx context.Context) (int, error)
- func (_u *DownloadShareUpdate) SaveX(ctx context.Context) int
- func (_u *DownloadShareUpdate) SetNillableRevokedAt(v *time.Time) *DownloadShareUpdate
- func (_u *DownloadShareUpdate) SetNillableSessionsStarted(v *int64) *DownloadShareUpdate
- func (_u *DownloadShareUpdate) SetRevokedAt(v time.Time) *DownloadShareUpdate
- func (_u *DownloadShareUpdate) SetSessionsStarted(v int64) *DownloadShareUpdate
- func (_u *DownloadShareUpdate) Where(ps ...predicate.DownloadShare) *DownloadShareUpdate
- type DownloadShareUpdateOne
- func (_u *DownloadShareUpdateOne) AddSessionsStarted(v int64) *DownloadShareUpdateOne
- func (_u *DownloadShareUpdateOne) ClearRevokedAt() *DownloadShareUpdateOne
- func (_u *DownloadShareUpdateOne) Exec(ctx context.Context) error
- func (_u *DownloadShareUpdateOne) ExecX(ctx context.Context)
- func (_u *DownloadShareUpdateOne) Mutation() *DownloadShareMutation
- func (_u *DownloadShareUpdateOne) Save(ctx context.Context) (*DownloadShare, error)
- func (_u *DownloadShareUpdateOne) SaveX(ctx context.Context) *DownloadShare
- func (_u *DownloadShareUpdateOne) Select(field string, fields ...string) *DownloadShareUpdateOne
- func (_u *DownloadShareUpdateOne) SetNillableRevokedAt(v *time.Time) *DownloadShareUpdateOne
- func (_u *DownloadShareUpdateOne) SetNillableSessionsStarted(v *int64) *DownloadShareUpdateOne
- func (_u *DownloadShareUpdateOne) SetRevokedAt(v time.Time) *DownloadShareUpdateOne
- func (_u *DownloadShareUpdateOne) SetSessionsStarted(v int64) *DownloadShareUpdateOne
- func (_u *DownloadShareUpdateOne) Where(ps ...predicate.DownloadShare) *DownloadShareUpdateOne
- type DownloadShares
- type Hook
- type InterceptFunc
- type Interceptor
- type MutateFunc
- type Mutation
- type Mutator
- type NotFoundError
- type NotLoadedError
- type NotSingularError
- type Op
- type Option
- type OrderFunc
- type Policy
- type Querier
- type QuerierFunc
- type Query
- type QueryContext
- type RollbackFunc
- type RollbackHook
- type Rollbacker
- type TraverseFunc
- type Traverser
- type Tx
- type ValidationError
- type Value
Constants ¶
const ( // Operation types. OpCreate = ent.OpCreate OpDelete = ent.OpDelete OpDeleteOne = ent.OpDeleteOne OpUpdate = ent.OpUpdate OpUpdateOne = ent.OpUpdateOne // Node types. TypeDownloadEvent = "DownloadEvent" TypeDownloadIssuer = "DownloadIssuer" )
Variables ¶
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 IsConstraintError ¶
IsConstraintError returns a boolean indicating whether the error is a constraint failure.
func IsNotFound ¶
IsNotFound returns a boolean indicating whether the error is a not found error.
func IsNotLoaded ¶
IsNotLoaded returns a boolean indicating whether the error is a not loaded error.
func IsNotSingular ¶
IsNotSingular returns a boolean indicating whether the error is a not singular error.
func IsValidationError ¶
IsValidationError returns a boolean indicating whether the error is a validation error.
func NewContext ¶
NewContext returns a new context with the given Client attached.
Types ¶
type AggregateFunc ¶
AggregateFunc applies an aggregation step on the group-by traversal/selector.
func As ¶
func As(fn AggregateFunc, end string) AggregateFunc
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 Client ¶
type Client struct {
// Schema is the client for creating, migrating and dropping schema.
Schema *migrate.Schema
// DownloadEvent is the client for interacting with the DownloadEvent builders.
DownloadEvent *DownloadEventClient
// DownloadIssuer is the client for interacting with the DownloadIssuer builders.
DownloadIssuer *DownloadIssuerClient
DownloadShare *DownloadShareClient
// contains filtered or unexported fields
}
Client is the client that holds all ent builders.
func FromContext ¶
FromContext returns a Client stored inside a context, or nil if there isn't one.
func Open ¶
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) Debug ¶
Debug returns a new debug-client. It's used to get verbose logging on specific operations.
client.Debug(). DownloadEvent. 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(...)`.
type CommitFunc ¶
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.
type CommitHook ¶
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 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 DownloadEvent ¶
type DownloadEvent struct {
// ID of the ent.
ID int64 `json:"id,omitempty"`
ShareID *string `json:"share_id,omitempty"`
// Phase holds the value of the "phase" field.
Phase string `json:"phase,omitempty"`
// Outcome holds the value of the "outcome" field.
Outcome string `json:"outcome,omitempty"`
// BytesTransferred holds the value of the "bytes_transferred" field.
BytesTransferred int64 `json:"bytes_transferred,omitempty"`
// CreatedAt holds the value of the "created_at" field.
CreatedAt time.Time `json:"created_at,omitempty"`
// contains filtered or unexported fields
}
DownloadEvent is the model entity for the DownloadEvent schema.
func (*DownloadEvent) String ¶
func (_m *DownloadEvent) String() string
String implements the fmt.Stringer.
func (*DownloadEvent) Unwrap ¶
func (_m *DownloadEvent) Unwrap() *DownloadEvent
Unwrap unwraps the DownloadEvent 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 (*DownloadEvent) Update ¶
func (_m *DownloadEvent) Update() *DownloadEventUpdateOne
Update returns a builder for updating this DownloadEvent. Note that you need to call DownloadEvent.Unwrap() before calling this method if this DownloadEvent was returned from a transaction, and the transaction was committed or rolled back.
type DownloadEventClient ¶
type DownloadEventClient struct {
// contains filtered or unexported fields
}
DownloadEventClient is a client for the DownloadEvent schema.
func NewDownloadEventClient ¶
func NewDownloadEventClient(c config) *DownloadEventClient
NewDownloadEventClient returns a client for the DownloadEvent from the given config.
func (*DownloadEventClient) Create ¶
func (c *DownloadEventClient) Create() *DownloadEventCreate
Create returns a builder for creating a DownloadEvent entity.
func (*DownloadEventClient) CreateBulk ¶
func (c *DownloadEventClient) CreateBulk(builders ...*DownloadEventCreate) *DownloadEventCreateBulk
CreateBulk returns a builder for creating a bulk of DownloadEvent entities.
func (*DownloadEventClient) Delete ¶
func (c *DownloadEventClient) Delete() *DownloadEventDelete
Delete returns a delete builder for DownloadEvent.
func (*DownloadEventClient) DeleteOne ¶
func (c *DownloadEventClient) DeleteOne(_m *DownloadEvent) *DownloadEventDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*DownloadEventClient) DeleteOneID ¶
func (c *DownloadEventClient) DeleteOneID(id int64) *DownloadEventDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*DownloadEventClient) Get ¶
func (c *DownloadEventClient) Get(ctx context.Context, id int64) (*DownloadEvent, error)
Get returns a DownloadEvent entity by its id.
func (*DownloadEventClient) GetX ¶
func (c *DownloadEventClient) GetX(ctx context.Context, id int64) *DownloadEvent
GetX is like Get, but panics if an error occurs.
func (*DownloadEventClient) Hooks ¶
func (c *DownloadEventClient) Hooks() []Hook
Hooks returns the client hooks.
func (*DownloadEventClient) Intercept ¶
func (c *DownloadEventClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `downloadevent.Intercept(f(g(h())))`.
func (*DownloadEventClient) Interceptors ¶
func (c *DownloadEventClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*DownloadEventClient) MapCreateBulk ¶
func (c *DownloadEventClient) MapCreateBulk(slice any, setFunc func(*DownloadEventCreate, int)) *DownloadEventCreateBulk
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 (*DownloadEventClient) Query ¶
func (c *DownloadEventClient) Query() *DownloadEventQuery
Query returns a query builder for DownloadEvent.
func (*DownloadEventClient) Update ¶
func (c *DownloadEventClient) Update() *DownloadEventUpdate
Update returns an update builder for DownloadEvent.
func (*DownloadEventClient) UpdateOne ¶
func (c *DownloadEventClient) UpdateOne(_m *DownloadEvent) *DownloadEventUpdateOne
UpdateOne returns an update builder for the given entity.
func (*DownloadEventClient) UpdateOneID ¶
func (c *DownloadEventClient) UpdateOneID(id int64) *DownloadEventUpdateOne
UpdateOneID returns an update builder for the given id.
func (*DownloadEventClient) Use ¶
func (c *DownloadEventClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `downloadevent.Hooks(f(g(h())))`.
type DownloadEventCreate ¶
type DownloadEventCreate struct {
// contains filtered or unexported fields
}
DownloadEventCreate is the builder for creating a DownloadEvent entity.
func (*DownloadEventCreate) Exec ¶
func (_c *DownloadEventCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*DownloadEventCreate) ExecX ¶
func (_c *DownloadEventCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DownloadEventCreate) Mutation ¶
func (_c *DownloadEventCreate) Mutation() *DownloadEventMutation
Mutation returns the DownloadEventMutation object of the builder.
func (*DownloadEventCreate) Save ¶
func (_c *DownloadEventCreate) Save(ctx context.Context) (*DownloadEvent, error)
Save creates the DownloadEvent in the database.
func (*DownloadEventCreate) SaveX ¶
func (_c *DownloadEventCreate) SaveX(ctx context.Context) *DownloadEvent
SaveX calls Save and panics if Save returns an error.
func (*DownloadEventCreate) SetBytesTransferred ¶
func (_c *DownloadEventCreate) SetBytesTransferred(v int64) *DownloadEventCreate
SetBytesTransferred sets the "bytes_transferred" field.
func (*DownloadEventCreate) SetCreatedAt ¶
func (_c *DownloadEventCreate) SetCreatedAt(v time.Time) *DownloadEventCreate
SetCreatedAt sets the "created_at" field.
func (*DownloadEventCreate) SetID ¶
func (_c *DownloadEventCreate) SetID(v int64) *DownloadEventCreate
SetID sets the "id" field.
func (*DownloadEventCreate) SetNillableBytesTransferred ¶
func (_c *DownloadEventCreate) SetNillableBytesTransferred(v *int64) *DownloadEventCreate
SetNillableBytesTransferred sets the "bytes_transferred" field if the given value is not nil.
func (*DownloadEventCreate) SetNillableCreatedAt ¶
func (_c *DownloadEventCreate) SetNillableCreatedAt(v *time.Time) *DownloadEventCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*DownloadEventCreate) SetNillableShareID ¶
func (_c *DownloadEventCreate) SetNillableShareID(v *string) *DownloadEventCreate
SetNillableShareID sets the "share_id" field if the given value is not nil.
func (*DownloadEventCreate) SetOutcome ¶
func (_c *DownloadEventCreate) SetOutcome(v string) *DownloadEventCreate
SetOutcome sets the "outcome" field.
func (*DownloadEventCreate) SetPhase ¶
func (_c *DownloadEventCreate) SetPhase(v string) *DownloadEventCreate
SetPhase sets the "phase" field.
func (*DownloadEventCreate) SetShareID ¶
func (_c *DownloadEventCreate) SetShareID(v string) *DownloadEventCreate
SetShareID sets the "share_id" field.
type DownloadEventCreateBulk ¶
type DownloadEventCreateBulk struct {
// contains filtered or unexported fields
}
DownloadEventCreateBulk is the builder for creating many DownloadEvent entities in bulk.
func (*DownloadEventCreateBulk) Exec ¶
func (_c *DownloadEventCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*DownloadEventCreateBulk) ExecX ¶
func (_c *DownloadEventCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DownloadEventCreateBulk) Save ¶
func (_c *DownloadEventCreateBulk) Save(ctx context.Context) ([]*DownloadEvent, error)
Save creates the DownloadEvent entities in the database.
func (*DownloadEventCreateBulk) SaveX ¶
func (_c *DownloadEventCreateBulk) SaveX(ctx context.Context) []*DownloadEvent
SaveX is like Save, but panics if an error occurs.
type DownloadEventDelete ¶
type DownloadEventDelete struct {
// contains filtered or unexported fields
}
DownloadEventDelete is the builder for deleting a DownloadEvent entity.
func (*DownloadEventDelete) Exec ¶
func (_d *DownloadEventDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*DownloadEventDelete) ExecX ¶
func (_d *DownloadEventDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*DownloadEventDelete) Where ¶
func (_d *DownloadEventDelete) Where(ps ...predicate.DownloadEvent) *DownloadEventDelete
Where appends a list predicates to the DownloadEventDelete builder.
type DownloadEventDeleteOne ¶
type DownloadEventDeleteOne struct {
// contains filtered or unexported fields
}
DownloadEventDeleteOne is the builder for deleting a single DownloadEvent entity.
func (*DownloadEventDeleteOne) Exec ¶
func (_d *DownloadEventDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*DownloadEventDeleteOne) ExecX ¶
func (_d *DownloadEventDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DownloadEventDeleteOne) Where ¶
func (_d *DownloadEventDeleteOne) Where(ps ...predicate.DownloadEvent) *DownloadEventDeleteOne
Where appends a list predicates to the DownloadEventDelete builder.
type DownloadEventGroupBy ¶
type DownloadEventGroupBy struct {
// contains filtered or unexported fields
}
DownloadEventGroupBy is the group-by builder for DownloadEvent entities.
func (*DownloadEventGroupBy) Aggregate ¶
func (_g *DownloadEventGroupBy) Aggregate(fns ...AggregateFunc) *DownloadEventGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*DownloadEventGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*DownloadEventGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*DownloadEventGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*DownloadEventGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*DownloadEventGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*DownloadEventGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*DownloadEventGroupBy) Scan ¶
func (_g *DownloadEventGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*DownloadEventGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type DownloadEventMutation ¶
type DownloadEventMutation struct {
// contains filtered or unexported fields
}
DownloadEventMutation represents an operation that mutates the DownloadEvent nodes in the graph.
func (*DownloadEventMutation) AddBytesTransferred ¶
func (m *DownloadEventMutation) AddBytesTransferred(i int64)
AddBytesTransferred adds i to the "bytes_transferred" field.
func (*DownloadEventMutation) AddField ¶
func (m *DownloadEventMutation) 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 (*DownloadEventMutation) AddedBytesTransferred ¶
func (m *DownloadEventMutation) AddedBytesTransferred() (r int64, exists bool)
AddedBytesTransferred returns the value that was added to the "bytes_transferred" field in this mutation.
func (*DownloadEventMutation) AddedEdges ¶
func (m *DownloadEventMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*DownloadEventMutation) AddedField ¶
func (m *DownloadEventMutation) 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 (*DownloadEventMutation) AddedFields ¶
func (m *DownloadEventMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*DownloadEventMutation) AddedIDs ¶
func (m *DownloadEventMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*DownloadEventMutation) BytesTransferred ¶
func (m *DownloadEventMutation) BytesTransferred() (r int64, exists bool)
BytesTransferred returns the value of the "bytes_transferred" field in the mutation.
func (*DownloadEventMutation) ClearEdge ¶
func (m *DownloadEventMutation) 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 (*DownloadEventMutation) ClearField ¶
func (m *DownloadEventMutation) 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 (*DownloadEventMutation) ClearShareID ¶
func (m *DownloadEventMutation) ClearShareID()
ClearShareID clears the value of the "share_id" field.
func (*DownloadEventMutation) ClearedEdges ¶
func (m *DownloadEventMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*DownloadEventMutation) ClearedFields ¶
func (m *DownloadEventMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (DownloadEventMutation) Client ¶
func (m DownloadEventMutation) 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 (*DownloadEventMutation) CreatedAt ¶
func (m *DownloadEventMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*DownloadEventMutation) EdgeCleared ¶
func (m *DownloadEventMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*DownloadEventMutation) Field ¶
func (m *DownloadEventMutation) 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 (*DownloadEventMutation) FieldCleared ¶
func (m *DownloadEventMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*DownloadEventMutation) Fields ¶
func (m *DownloadEventMutation) 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 (*DownloadEventMutation) ID ¶
func (m *DownloadEventMutation) 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 (*DownloadEventMutation) IDs ¶
func (m *DownloadEventMutation) 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 (*DownloadEventMutation) OldBytesTransferred ¶
func (m *DownloadEventMutation) OldBytesTransferred(ctx context.Context) (v int64, err error)
OldBytesTransferred returns the old "bytes_transferred" field's value of the DownloadEvent entity. If the DownloadEvent object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*DownloadEventMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the DownloadEvent entity. If the DownloadEvent object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*DownloadEventMutation) OldField ¶
OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.
func (*DownloadEventMutation) OldOutcome ¶
func (m *DownloadEventMutation) OldOutcome(ctx context.Context) (v string, err error)
OldOutcome returns the old "outcome" field's value of the DownloadEvent entity. If the DownloadEvent object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*DownloadEventMutation) OldPhase ¶
func (m *DownloadEventMutation) OldPhase(ctx context.Context) (v string, err error)
OldPhase returns the old "phase" field's value of the DownloadEvent entity. If the DownloadEvent object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*DownloadEventMutation) OldShareID ¶
func (m *DownloadEventMutation) OldShareID(ctx context.Context) (v *string, err error)
OldShareID returns the old "share_id" field's value of the DownloadEvent entity. If the DownloadEvent object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*DownloadEventMutation) Op ¶
func (m *DownloadEventMutation) Op() Op
Op returns the operation name.
func (*DownloadEventMutation) Outcome ¶
func (m *DownloadEventMutation) Outcome() (r string, exists bool)
Outcome returns the value of the "outcome" field in the mutation.
func (*DownloadEventMutation) Phase ¶
func (m *DownloadEventMutation) Phase() (r string, exists bool)
Phase returns the value of the "phase" field in the mutation.
func (*DownloadEventMutation) RemovedEdges ¶
func (m *DownloadEventMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*DownloadEventMutation) RemovedIDs ¶
func (m *DownloadEventMutation) 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 (*DownloadEventMutation) ResetBytesTransferred ¶
func (m *DownloadEventMutation) ResetBytesTransferred()
ResetBytesTransferred resets all changes to the "bytes_transferred" field.
func (*DownloadEventMutation) ResetCreatedAt ¶
func (m *DownloadEventMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*DownloadEventMutation) ResetEdge ¶
func (m *DownloadEventMutation) 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 (*DownloadEventMutation) ResetField ¶
func (m *DownloadEventMutation) 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 (*DownloadEventMutation) ResetOutcome ¶
func (m *DownloadEventMutation) ResetOutcome()
ResetOutcome resets all changes to the "outcome" field.
func (*DownloadEventMutation) ResetPhase ¶
func (m *DownloadEventMutation) ResetPhase()
ResetPhase resets all changes to the "phase" field.
func (*DownloadEventMutation) ResetShareID ¶
func (m *DownloadEventMutation) ResetShareID()
ResetShareID resets all changes to the "share_id" field.
func (*DownloadEventMutation) SetBytesTransferred ¶
func (m *DownloadEventMutation) SetBytesTransferred(i int64)
SetBytesTransferred sets the "bytes_transferred" field.
func (*DownloadEventMutation) SetCreatedAt ¶
func (m *DownloadEventMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*DownloadEventMutation) SetField ¶
func (m *DownloadEventMutation) 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 (*DownloadEventMutation) SetID ¶
func (m *DownloadEventMutation) SetID(id int64)
SetID sets the value of the id field. Note that this operation is only accepted on creation of DownloadEvent entities.
func (*DownloadEventMutation) SetOp ¶
func (m *DownloadEventMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*DownloadEventMutation) SetOutcome ¶
func (m *DownloadEventMutation) SetOutcome(s string)
SetOutcome sets the "outcome" field.
func (*DownloadEventMutation) SetPhase ¶
func (m *DownloadEventMutation) SetPhase(s string)
SetPhase sets the "phase" field.
func (*DownloadEventMutation) SetShareID ¶
func (m *DownloadEventMutation) SetShareID(s string)
SetShareID sets the "share_id" field.
func (*DownloadEventMutation) ShareID ¶
func (m *DownloadEventMutation) ShareID() (r string, exists bool)
ShareID returns the value of the "share_id" field in the mutation.
func (*DownloadEventMutation) ShareIDCleared ¶
func (m *DownloadEventMutation) ShareIDCleared() bool
ShareIDCleared returns if the "share_id" field was cleared in this mutation.
func (DownloadEventMutation) Tx ¶
func (m DownloadEventMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*DownloadEventMutation) Type ¶
func (m *DownloadEventMutation) Type() string
Type returns the node type of this mutation (DownloadEvent).
func (*DownloadEventMutation) Where ¶
func (m *DownloadEventMutation) Where(ps ...predicate.DownloadEvent)
Where appends a list predicates to the DownloadEventMutation builder.
func (*DownloadEventMutation) WhereP ¶
func (m *DownloadEventMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the DownloadEventMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type DownloadEventQuery ¶
type DownloadEventQuery struct {
// contains filtered or unexported fields
}
DownloadEventQuery is the builder for querying DownloadEvent entities.
func (*DownloadEventQuery) Aggregate ¶
func (_q *DownloadEventQuery) Aggregate(fns ...AggregateFunc) *DownloadEventSelect
Aggregate returns a DownloadEventSelect configured with the given aggregations.
func (*DownloadEventQuery) All ¶
func (_q *DownloadEventQuery) All(ctx context.Context) ([]*DownloadEvent, error)
All executes the query and returns a list of DownloadEvents.
func (*DownloadEventQuery) AllX ¶
func (_q *DownloadEventQuery) AllX(ctx context.Context) []*DownloadEvent
AllX is like All, but panics if an error occurs.
func (*DownloadEventQuery) Clone ¶
func (_q *DownloadEventQuery) Clone() *DownloadEventQuery
Clone returns a duplicate of the DownloadEventQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*DownloadEventQuery) Count ¶
func (_q *DownloadEventQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*DownloadEventQuery) CountX ¶
func (_q *DownloadEventQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*DownloadEventQuery) Exist ¶
func (_q *DownloadEventQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*DownloadEventQuery) ExistX ¶
func (_q *DownloadEventQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*DownloadEventQuery) First ¶
func (_q *DownloadEventQuery) First(ctx context.Context) (*DownloadEvent, error)
First returns the first DownloadEvent entity from the query. Returns a *NotFoundError when no DownloadEvent was found.
func (*DownloadEventQuery) FirstID ¶
func (_q *DownloadEventQuery) FirstID(ctx context.Context) (id int64, err error)
FirstID returns the first DownloadEvent ID from the query. Returns a *NotFoundError when no DownloadEvent ID was found.
func (*DownloadEventQuery) FirstIDX ¶
func (_q *DownloadEventQuery) FirstIDX(ctx context.Context) int64
FirstIDX is like FirstID, but panics if an error occurs.
func (*DownloadEventQuery) FirstX ¶
func (_q *DownloadEventQuery) FirstX(ctx context.Context) *DownloadEvent
FirstX is like First, but panics if an error occurs.
func (*DownloadEventQuery) GroupBy ¶
func (_q *DownloadEventQuery) GroupBy(field string, fields ...string) *DownloadEventGroupBy
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 {
ShareID string `json:"share_id,omitempty"`
Count int `json:"count,omitempty"`
}
client.DownloadEvent.Query().
GroupBy(downloadevent.FieldShareID).
Aggregate(ent.Count()).
Scan(ctx, &v)
func (*DownloadEventQuery) IDs ¶
func (_q *DownloadEventQuery) IDs(ctx context.Context) (ids []int64, err error)
IDs executes the query and returns a list of DownloadEvent IDs.
func (*DownloadEventQuery) IDsX ¶
func (_q *DownloadEventQuery) IDsX(ctx context.Context) []int64
IDsX is like IDs, but panics if an error occurs.
func (*DownloadEventQuery) Limit ¶
func (_q *DownloadEventQuery) Limit(limit int) *DownloadEventQuery
Limit the number of records to be returned by this query.
func (*DownloadEventQuery) Offset ¶
func (_q *DownloadEventQuery) Offset(offset int) *DownloadEventQuery
Offset to start from.
func (*DownloadEventQuery) Only ¶
func (_q *DownloadEventQuery) Only(ctx context.Context) (*DownloadEvent, error)
Only returns a single DownloadEvent entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one DownloadEvent entity is found. Returns a *NotFoundError when no DownloadEvent entities are found.
func (*DownloadEventQuery) OnlyID ¶
func (_q *DownloadEventQuery) OnlyID(ctx context.Context) (id int64, err error)
OnlyID is like Only, but returns the only DownloadEvent ID in the query. Returns a *NotSingularError when more than one DownloadEvent ID is found. Returns a *NotFoundError when no entities are found.
func (*DownloadEventQuery) OnlyIDX ¶
func (_q *DownloadEventQuery) OnlyIDX(ctx context.Context) int64
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*DownloadEventQuery) OnlyX ¶
func (_q *DownloadEventQuery) OnlyX(ctx context.Context) *DownloadEvent
OnlyX is like Only, but panics if an error occurs.
func (*DownloadEventQuery) Order ¶
func (_q *DownloadEventQuery) Order(o ...downloadevent.OrderOption) *DownloadEventQuery
Order specifies how the records should be ordered.
func (*DownloadEventQuery) Select ¶
func (_q *DownloadEventQuery) Select(fields ...string) *DownloadEventSelect
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 {
ShareID string `json:"share_id,omitempty"`
}
client.DownloadEvent.Query().
Select(downloadevent.FieldShareID).
Scan(ctx, &v)
func (*DownloadEventQuery) Unique ¶
func (_q *DownloadEventQuery) Unique(unique bool) *DownloadEventQuery
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 (*DownloadEventQuery) Where ¶
func (_q *DownloadEventQuery) Where(ps ...predicate.DownloadEvent) *DownloadEventQuery
Where adds a new predicate for the DownloadEventQuery builder.
type DownloadEventSelect ¶
type DownloadEventSelect struct {
*DownloadEventQuery
// contains filtered or unexported fields
}
DownloadEventSelect is the builder for selecting fields of DownloadEvent entities.
func (*DownloadEventSelect) Aggregate ¶
func (_s *DownloadEventSelect) Aggregate(fns ...AggregateFunc) *DownloadEventSelect
Aggregate adds the given aggregation functions to the selector query.
func (*DownloadEventSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*DownloadEventSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*DownloadEventSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*DownloadEventSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*DownloadEventSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*DownloadEventSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*DownloadEventSelect) Scan ¶
func (_s *DownloadEventSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*DownloadEventSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type DownloadEventUpdate ¶
type DownloadEventUpdate struct {
// contains filtered or unexported fields
}
DownloadEventUpdate is the builder for updating DownloadEvent entities.
func (*DownloadEventUpdate) AddBytesTransferred ¶
func (_u *DownloadEventUpdate) AddBytesTransferred(v int64) *DownloadEventUpdate
AddBytesTransferred adds value to the "bytes_transferred" field.
func (*DownloadEventUpdate) ClearShareID ¶
func (_u *DownloadEventUpdate) ClearShareID() *DownloadEventUpdate
ClearShareID clears the value of the "share_id" field.
func (*DownloadEventUpdate) Exec ¶
func (_u *DownloadEventUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*DownloadEventUpdate) ExecX ¶
func (_u *DownloadEventUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DownloadEventUpdate) Mutation ¶
func (_u *DownloadEventUpdate) Mutation() *DownloadEventMutation
Mutation returns the DownloadEventMutation object of the builder.
func (*DownloadEventUpdate) Save ¶
func (_u *DownloadEventUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*DownloadEventUpdate) SaveX ¶
func (_u *DownloadEventUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*DownloadEventUpdate) SetBytesTransferred ¶
func (_u *DownloadEventUpdate) SetBytesTransferred(v int64) *DownloadEventUpdate
SetBytesTransferred sets the "bytes_transferred" field.
func (*DownloadEventUpdate) SetNillableBytesTransferred ¶
func (_u *DownloadEventUpdate) SetNillableBytesTransferred(v *int64) *DownloadEventUpdate
SetNillableBytesTransferred sets the "bytes_transferred" field if the given value is not nil.
func (*DownloadEventUpdate) SetNillableOutcome ¶
func (_u *DownloadEventUpdate) SetNillableOutcome(v *string) *DownloadEventUpdate
SetNillableOutcome sets the "outcome" field if the given value is not nil.
func (*DownloadEventUpdate) SetNillablePhase ¶
func (_u *DownloadEventUpdate) SetNillablePhase(v *string) *DownloadEventUpdate
SetNillablePhase sets the "phase" field if the given value is not nil.
func (*DownloadEventUpdate) SetNillableShareID ¶
func (_u *DownloadEventUpdate) SetNillableShareID(v *string) *DownloadEventUpdate
SetNillableShareID sets the "share_id" field if the given value is not nil.
func (*DownloadEventUpdate) SetOutcome ¶
func (_u *DownloadEventUpdate) SetOutcome(v string) *DownloadEventUpdate
SetOutcome sets the "outcome" field.
func (*DownloadEventUpdate) SetPhase ¶
func (_u *DownloadEventUpdate) SetPhase(v string) *DownloadEventUpdate
SetPhase sets the "phase" field.
func (*DownloadEventUpdate) SetShareID ¶
func (_u *DownloadEventUpdate) SetShareID(v string) *DownloadEventUpdate
SetShareID sets the "share_id" field.
func (*DownloadEventUpdate) Where ¶
func (_u *DownloadEventUpdate) Where(ps ...predicate.DownloadEvent) *DownloadEventUpdate
Where appends a list predicates to the DownloadEventUpdate builder.
type DownloadEventUpdateOne ¶
type DownloadEventUpdateOne struct {
// contains filtered or unexported fields
}
DownloadEventUpdateOne is the builder for updating a single DownloadEvent entity.
func (*DownloadEventUpdateOne) AddBytesTransferred ¶
func (_u *DownloadEventUpdateOne) AddBytesTransferred(v int64) *DownloadEventUpdateOne
AddBytesTransferred adds value to the "bytes_transferred" field.
func (*DownloadEventUpdateOne) ClearShareID ¶
func (_u *DownloadEventUpdateOne) ClearShareID() *DownloadEventUpdateOne
ClearShareID clears the value of the "share_id" field.
func (*DownloadEventUpdateOne) Exec ¶
func (_u *DownloadEventUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*DownloadEventUpdateOne) ExecX ¶
func (_u *DownloadEventUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DownloadEventUpdateOne) Mutation ¶
func (_u *DownloadEventUpdateOne) Mutation() *DownloadEventMutation
Mutation returns the DownloadEventMutation object of the builder.
func (*DownloadEventUpdateOne) Save ¶
func (_u *DownloadEventUpdateOne) Save(ctx context.Context) (*DownloadEvent, error)
Save executes the query and returns the updated DownloadEvent entity.
func (*DownloadEventUpdateOne) SaveX ¶
func (_u *DownloadEventUpdateOne) SaveX(ctx context.Context) *DownloadEvent
SaveX is like Save, but panics if an error occurs.
func (*DownloadEventUpdateOne) Select ¶
func (_u *DownloadEventUpdateOne) Select(field string, fields ...string) *DownloadEventUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*DownloadEventUpdateOne) SetBytesTransferred ¶
func (_u *DownloadEventUpdateOne) SetBytesTransferred(v int64) *DownloadEventUpdateOne
SetBytesTransferred sets the "bytes_transferred" field.
func (*DownloadEventUpdateOne) SetNillableBytesTransferred ¶
func (_u *DownloadEventUpdateOne) SetNillableBytesTransferred(v *int64) *DownloadEventUpdateOne
SetNillableBytesTransferred sets the "bytes_transferred" field if the given value is not nil.
func (*DownloadEventUpdateOne) SetNillableOutcome ¶
func (_u *DownloadEventUpdateOne) SetNillableOutcome(v *string) *DownloadEventUpdateOne
SetNillableOutcome sets the "outcome" field if the given value is not nil.
func (*DownloadEventUpdateOne) SetNillablePhase ¶
func (_u *DownloadEventUpdateOne) SetNillablePhase(v *string) *DownloadEventUpdateOne
SetNillablePhase sets the "phase" field if the given value is not nil.
func (*DownloadEventUpdateOne) SetNillableShareID ¶
func (_u *DownloadEventUpdateOne) SetNillableShareID(v *string) *DownloadEventUpdateOne
SetNillableShareID sets the "share_id" field if the given value is not nil.
func (*DownloadEventUpdateOne) SetOutcome ¶
func (_u *DownloadEventUpdateOne) SetOutcome(v string) *DownloadEventUpdateOne
SetOutcome sets the "outcome" field.
func (*DownloadEventUpdateOne) SetPhase ¶
func (_u *DownloadEventUpdateOne) SetPhase(v string) *DownloadEventUpdateOne
SetPhase sets the "phase" field.
func (*DownloadEventUpdateOne) SetShareID ¶
func (_u *DownloadEventUpdateOne) SetShareID(v string) *DownloadEventUpdateOne
SetShareID sets the "share_id" field.
func (*DownloadEventUpdateOne) Where ¶
func (_u *DownloadEventUpdateOne) Where(ps ...predicate.DownloadEvent) *DownloadEventUpdateOne
Where appends a list predicates to the DownloadEventUpdate builder.
type DownloadEvents ¶
type DownloadEvents []*DownloadEvent
DownloadEvents is a parsable slice of DownloadEvent.
type DownloadIssuer ¶
type DownloadIssuer struct {
// ID of the ent.
ID string `json:"id,omitempty"`
// Enabled holds the value of the "enabled" field.
Enabled bool `json:"enabled,omitempty"`
// contains filtered or unexported fields
}
DownloadIssuer is the model entity for the DownloadIssuer schema.
func (*DownloadIssuer) String ¶
func (_m *DownloadIssuer) String() string
String implements the fmt.Stringer.
func (*DownloadIssuer) Unwrap ¶
func (_m *DownloadIssuer) Unwrap() *DownloadIssuer
Unwrap unwraps the DownloadIssuer 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 (*DownloadIssuer) Update ¶
func (_m *DownloadIssuer) Update() *DownloadIssuerUpdateOne
Update returns a builder for updating this DownloadIssuer. Note that you need to call DownloadIssuer.Unwrap() before calling this method if this DownloadIssuer was returned from a transaction, and the transaction was committed or rolled back.
type DownloadIssuerClient ¶
type DownloadIssuerClient struct {
// contains filtered or unexported fields
}
DownloadIssuerClient is a client for the DownloadIssuer schema.
func NewDownloadIssuerClient ¶
func NewDownloadIssuerClient(c config) *DownloadIssuerClient
NewDownloadIssuerClient returns a client for the DownloadIssuer from the given config.
func (*DownloadIssuerClient) Create ¶
func (c *DownloadIssuerClient) Create() *DownloadIssuerCreate
Create returns a builder for creating a DownloadIssuer entity.
func (*DownloadIssuerClient) CreateBulk ¶
func (c *DownloadIssuerClient) CreateBulk(builders ...*DownloadIssuerCreate) *DownloadIssuerCreateBulk
CreateBulk returns a builder for creating a bulk of DownloadIssuer entities.
func (*DownloadIssuerClient) Delete ¶
func (c *DownloadIssuerClient) Delete() *DownloadIssuerDelete
Delete returns a delete builder for DownloadIssuer.
func (*DownloadIssuerClient) DeleteOne ¶
func (c *DownloadIssuerClient) DeleteOne(_m *DownloadIssuer) *DownloadIssuerDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*DownloadIssuerClient) DeleteOneID ¶
func (c *DownloadIssuerClient) DeleteOneID(id string) *DownloadIssuerDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*DownloadIssuerClient) Get ¶
func (c *DownloadIssuerClient) Get(ctx context.Context, id string) (*DownloadIssuer, error)
Get returns a DownloadIssuer entity by its id.
func (*DownloadIssuerClient) GetX ¶
func (c *DownloadIssuerClient) GetX(ctx context.Context, id string) *DownloadIssuer
GetX is like Get, but panics if an error occurs.
func (*DownloadIssuerClient) Hooks ¶
func (c *DownloadIssuerClient) Hooks() []Hook
Hooks returns the client hooks.
func (*DownloadIssuerClient) Intercept ¶
func (c *DownloadIssuerClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `downloadissuer.Intercept(f(g(h())))`.
func (*DownloadIssuerClient) Interceptors ¶
func (c *DownloadIssuerClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*DownloadIssuerClient) MapCreateBulk ¶
func (c *DownloadIssuerClient) MapCreateBulk(slice any, setFunc func(*DownloadIssuerCreate, int)) *DownloadIssuerCreateBulk
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 (*DownloadIssuerClient) Query ¶
func (c *DownloadIssuerClient) Query() *DownloadIssuerQuery
Query returns a query builder for DownloadIssuer.
func (*DownloadIssuerClient) Update ¶
func (c *DownloadIssuerClient) Update() *DownloadIssuerUpdate
Update returns an update builder for DownloadIssuer.
func (*DownloadIssuerClient) UpdateOne ¶
func (c *DownloadIssuerClient) UpdateOne(_m *DownloadIssuer) *DownloadIssuerUpdateOne
UpdateOne returns an update builder for the given entity.
func (*DownloadIssuerClient) UpdateOneID ¶
func (c *DownloadIssuerClient) UpdateOneID(id string) *DownloadIssuerUpdateOne
UpdateOneID returns an update builder for the given id.
func (*DownloadIssuerClient) Use ¶
func (c *DownloadIssuerClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `downloadissuer.Hooks(f(g(h())))`.
type DownloadIssuerCreate ¶
type DownloadIssuerCreate struct {
// contains filtered or unexported fields
}
DownloadIssuerCreate is the builder for creating a DownloadIssuer entity.
func (*DownloadIssuerCreate) Exec ¶
func (_c *DownloadIssuerCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*DownloadIssuerCreate) ExecX ¶
func (_c *DownloadIssuerCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DownloadIssuerCreate) Mutation ¶
func (_c *DownloadIssuerCreate) Mutation() *DownloadIssuerMutation
Mutation returns the DownloadIssuerMutation object of the builder.
func (*DownloadIssuerCreate) Save ¶
func (_c *DownloadIssuerCreate) Save(ctx context.Context) (*DownloadIssuer, error)
Save creates the DownloadIssuer in the database.
func (*DownloadIssuerCreate) SaveX ¶
func (_c *DownloadIssuerCreate) SaveX(ctx context.Context) *DownloadIssuer
SaveX calls Save and panics if Save returns an error.
func (*DownloadIssuerCreate) SetEnabled ¶
func (_c *DownloadIssuerCreate) SetEnabled(v bool) *DownloadIssuerCreate
SetEnabled sets the "enabled" field.
func (*DownloadIssuerCreate) SetID ¶
func (_c *DownloadIssuerCreate) SetID(v string) *DownloadIssuerCreate
SetID sets the "id" field.
func (*DownloadIssuerCreate) SetNillableEnabled ¶
func (_c *DownloadIssuerCreate) SetNillableEnabled(v *bool) *DownloadIssuerCreate
SetNillableEnabled sets the "enabled" field if the given value is not nil.
type DownloadIssuerCreateBulk ¶
type DownloadIssuerCreateBulk struct {
// contains filtered or unexported fields
}
DownloadIssuerCreateBulk is the builder for creating many DownloadIssuer entities in bulk.
func (*DownloadIssuerCreateBulk) Exec ¶
func (_c *DownloadIssuerCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*DownloadIssuerCreateBulk) ExecX ¶
func (_c *DownloadIssuerCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DownloadIssuerCreateBulk) Save ¶
func (_c *DownloadIssuerCreateBulk) Save(ctx context.Context) ([]*DownloadIssuer, error)
Save creates the DownloadIssuer entities in the database.
func (*DownloadIssuerCreateBulk) SaveX ¶
func (_c *DownloadIssuerCreateBulk) SaveX(ctx context.Context) []*DownloadIssuer
SaveX is like Save, but panics if an error occurs.
type DownloadIssuerDelete ¶
type DownloadIssuerDelete struct {
// contains filtered or unexported fields
}
DownloadIssuerDelete is the builder for deleting a DownloadIssuer entity.
func (*DownloadIssuerDelete) Exec ¶
func (_d *DownloadIssuerDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*DownloadIssuerDelete) ExecX ¶
func (_d *DownloadIssuerDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*DownloadIssuerDelete) Where ¶
func (_d *DownloadIssuerDelete) Where(ps ...predicate.DownloadIssuer) *DownloadIssuerDelete
Where appends a list predicates to the DownloadIssuerDelete builder.
type DownloadIssuerDeleteOne ¶
type DownloadIssuerDeleteOne struct {
// contains filtered or unexported fields
}
DownloadIssuerDeleteOne is the builder for deleting a single DownloadIssuer entity.
func (*DownloadIssuerDeleteOne) Exec ¶
func (_d *DownloadIssuerDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*DownloadIssuerDeleteOne) ExecX ¶
func (_d *DownloadIssuerDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DownloadIssuerDeleteOne) Where ¶
func (_d *DownloadIssuerDeleteOne) Where(ps ...predicate.DownloadIssuer) *DownloadIssuerDeleteOne
Where appends a list predicates to the DownloadIssuerDelete builder.
type DownloadIssuerGroupBy ¶
type DownloadIssuerGroupBy struct {
// contains filtered or unexported fields
}
DownloadIssuerGroupBy is the group-by builder for DownloadIssuer entities.
func (*DownloadIssuerGroupBy) Aggregate ¶
func (_g *DownloadIssuerGroupBy) Aggregate(fns ...AggregateFunc) *DownloadIssuerGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*DownloadIssuerGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*DownloadIssuerGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*DownloadIssuerGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*DownloadIssuerGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*DownloadIssuerGroupBy) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*DownloadIssuerGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*DownloadIssuerGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*DownloadIssuerGroupBy) Scan ¶
func (_g *DownloadIssuerGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*DownloadIssuerGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type DownloadIssuerMutation ¶
type DownloadIssuerMutation struct {
// contains filtered or unexported fields
}
DownloadIssuerMutation represents an operation that mutates the DownloadIssuer nodes in the graph.
func (*DownloadIssuerMutation) AddField ¶
func (m *DownloadIssuerMutation) 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 (*DownloadIssuerMutation) AddedEdges ¶
func (m *DownloadIssuerMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*DownloadIssuerMutation) AddedField ¶
func (m *DownloadIssuerMutation) 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 (*DownloadIssuerMutation) AddedFields ¶
func (m *DownloadIssuerMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*DownloadIssuerMutation) AddedIDs ¶
func (m *DownloadIssuerMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*DownloadIssuerMutation) ClearEdge ¶
func (m *DownloadIssuerMutation) 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 (*DownloadIssuerMutation) ClearField ¶
func (m *DownloadIssuerMutation) 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 (*DownloadIssuerMutation) ClearedEdges ¶
func (m *DownloadIssuerMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*DownloadIssuerMutation) ClearedFields ¶
func (m *DownloadIssuerMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (DownloadIssuerMutation) Client ¶
func (m DownloadIssuerMutation) 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 (*DownloadIssuerMutation) EdgeCleared ¶
func (m *DownloadIssuerMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*DownloadIssuerMutation) Enabled ¶
func (m *DownloadIssuerMutation) Enabled() (r bool, exists bool)
Enabled returns the value of the "enabled" field in the mutation.
func (*DownloadIssuerMutation) Field ¶
func (m *DownloadIssuerMutation) 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 (*DownloadIssuerMutation) FieldCleared ¶
func (m *DownloadIssuerMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*DownloadIssuerMutation) Fields ¶
func (m *DownloadIssuerMutation) 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 (*DownloadIssuerMutation) ID ¶
func (m *DownloadIssuerMutation) 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 (*DownloadIssuerMutation) IDs ¶
func (m *DownloadIssuerMutation) 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 (*DownloadIssuerMutation) OldEnabled ¶
func (m *DownloadIssuerMutation) OldEnabled(ctx context.Context) (v bool, err error)
OldEnabled returns the old "enabled" field's value of the DownloadIssuer entity. If the DownloadIssuer object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*DownloadIssuerMutation) OldField ¶
OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.
func (*DownloadIssuerMutation) Op ¶
func (m *DownloadIssuerMutation) Op() Op
Op returns the operation name.
func (*DownloadIssuerMutation) RemovedEdges ¶
func (m *DownloadIssuerMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*DownloadIssuerMutation) RemovedIDs ¶
func (m *DownloadIssuerMutation) 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 (*DownloadIssuerMutation) ResetEdge ¶
func (m *DownloadIssuerMutation) 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 (*DownloadIssuerMutation) ResetEnabled ¶
func (m *DownloadIssuerMutation) ResetEnabled()
ResetEnabled resets all changes to the "enabled" field.
func (*DownloadIssuerMutation) ResetField ¶
func (m *DownloadIssuerMutation) 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 (*DownloadIssuerMutation) SetEnabled ¶
func (m *DownloadIssuerMutation) SetEnabled(b bool)
SetEnabled sets the "enabled" field.
func (*DownloadIssuerMutation) SetField ¶
func (m *DownloadIssuerMutation) 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 (*DownloadIssuerMutation) SetID ¶
func (m *DownloadIssuerMutation) SetID(id string)
SetID sets the value of the id field. Note that this operation is only accepted on creation of DownloadIssuer entities.
func (*DownloadIssuerMutation) SetOp ¶
func (m *DownloadIssuerMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (DownloadIssuerMutation) Tx ¶
func (m DownloadIssuerMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*DownloadIssuerMutation) Type ¶
func (m *DownloadIssuerMutation) Type() string
Type returns the node type of this mutation (DownloadIssuer).
func (*DownloadIssuerMutation) Where ¶
func (m *DownloadIssuerMutation) Where(ps ...predicate.DownloadIssuer)
Where appends a list predicates to the DownloadIssuerMutation builder.
func (*DownloadIssuerMutation) WhereP ¶
func (m *DownloadIssuerMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the DownloadIssuerMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type DownloadIssuerQuery ¶
type DownloadIssuerQuery struct {
// contains filtered or unexported fields
}
DownloadIssuerQuery is the builder for querying DownloadIssuer entities.
func (*DownloadIssuerQuery) Aggregate ¶
func (_q *DownloadIssuerQuery) Aggregate(fns ...AggregateFunc) *DownloadIssuerSelect
Aggregate returns a DownloadIssuerSelect configured with the given aggregations.
func (*DownloadIssuerQuery) All ¶
func (_q *DownloadIssuerQuery) All(ctx context.Context) ([]*DownloadIssuer, error)
All executes the query and returns a list of DownloadIssuers.
func (*DownloadIssuerQuery) AllX ¶
func (_q *DownloadIssuerQuery) AllX(ctx context.Context) []*DownloadIssuer
AllX is like All, but panics if an error occurs.
func (*DownloadIssuerQuery) Clone ¶
func (_q *DownloadIssuerQuery) Clone() *DownloadIssuerQuery
Clone returns a duplicate of the DownloadIssuerQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*DownloadIssuerQuery) Count ¶
func (_q *DownloadIssuerQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*DownloadIssuerQuery) CountX ¶
func (_q *DownloadIssuerQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*DownloadIssuerQuery) Exist ¶
func (_q *DownloadIssuerQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*DownloadIssuerQuery) ExistX ¶
func (_q *DownloadIssuerQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*DownloadIssuerQuery) First ¶
func (_q *DownloadIssuerQuery) First(ctx context.Context) (*DownloadIssuer, error)
First returns the first DownloadIssuer entity from the query. Returns a *NotFoundError when no DownloadIssuer was found.
func (*DownloadIssuerQuery) FirstID ¶
func (_q *DownloadIssuerQuery) FirstID(ctx context.Context) (id string, err error)
FirstID returns the first DownloadIssuer ID from the query. Returns a *NotFoundError when no DownloadIssuer ID was found.
func (*DownloadIssuerQuery) FirstIDX ¶
func (_q *DownloadIssuerQuery) FirstIDX(ctx context.Context) string
FirstIDX is like FirstID, but panics if an error occurs.
func (*DownloadIssuerQuery) FirstX ¶
func (_q *DownloadIssuerQuery) FirstX(ctx context.Context) *DownloadIssuer
FirstX is like First, but panics if an error occurs.
func (*DownloadIssuerQuery) GroupBy ¶
func (_q *DownloadIssuerQuery) GroupBy(field string, fields ...string) *DownloadIssuerGroupBy
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 {
Enabled bool `json:"enabled,omitempty"`
Count int `json:"count,omitempty"`
}
client.DownloadIssuer.Query().
GroupBy(downloadissuer.FieldEnabled).
Aggregate(ent.Count()).
Scan(ctx, &v)
func (*DownloadIssuerQuery) IDs ¶
func (_q *DownloadIssuerQuery) IDs(ctx context.Context) (ids []string, err error)
IDs executes the query and returns a list of DownloadIssuer IDs.
func (*DownloadIssuerQuery) IDsX ¶
func (_q *DownloadIssuerQuery) IDsX(ctx context.Context) []string
IDsX is like IDs, but panics if an error occurs.
func (*DownloadIssuerQuery) Limit ¶
func (_q *DownloadIssuerQuery) Limit(limit int) *DownloadIssuerQuery
Limit the number of records to be returned by this query.
func (*DownloadIssuerQuery) Offset ¶
func (_q *DownloadIssuerQuery) Offset(offset int) *DownloadIssuerQuery
Offset to start from.
func (*DownloadIssuerQuery) Only ¶
func (_q *DownloadIssuerQuery) Only(ctx context.Context) (*DownloadIssuer, error)
Only returns a single DownloadIssuer entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one DownloadIssuer entity is found. Returns a *NotFoundError when no DownloadIssuer entities are found.
func (*DownloadIssuerQuery) OnlyID ¶
func (_q *DownloadIssuerQuery) OnlyID(ctx context.Context) (id string, err error)
OnlyID is like Only, but returns the only DownloadIssuer ID in the query. Returns a *NotSingularError when more than one DownloadIssuer ID is found. Returns a *NotFoundError when no entities are found.
func (*DownloadIssuerQuery) OnlyIDX ¶
func (_q *DownloadIssuerQuery) OnlyIDX(ctx context.Context) string
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*DownloadIssuerQuery) OnlyX ¶
func (_q *DownloadIssuerQuery) OnlyX(ctx context.Context) *DownloadIssuer
OnlyX is like Only, but panics if an error occurs.
func (*DownloadIssuerQuery) Order ¶
func (_q *DownloadIssuerQuery) Order(o ...downloadissuer.OrderOption) *DownloadIssuerQuery
Order specifies how the records should be ordered.
func (*DownloadIssuerQuery) Select ¶
func (_q *DownloadIssuerQuery) Select(fields ...string) *DownloadIssuerSelect
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 {
Enabled bool `json:"enabled,omitempty"`
}
client.DownloadIssuer.Query().
Select(downloadissuer.FieldEnabled).
Scan(ctx, &v)
func (*DownloadIssuerQuery) Unique ¶
func (_q *DownloadIssuerQuery) Unique(unique bool) *DownloadIssuerQuery
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 (*DownloadIssuerQuery) Where ¶
func (_q *DownloadIssuerQuery) Where(ps ...predicate.DownloadIssuer) *DownloadIssuerQuery
Where adds a new predicate for the DownloadIssuerQuery builder.
type DownloadIssuerSelect ¶
type DownloadIssuerSelect struct {
*DownloadIssuerQuery
// contains filtered or unexported fields
}
DownloadIssuerSelect is the builder for selecting fields of DownloadIssuer entities.
func (*DownloadIssuerSelect) Aggregate ¶
func (_s *DownloadIssuerSelect) Aggregate(fns ...AggregateFunc) *DownloadIssuerSelect
Aggregate adds the given aggregation functions to the selector query.
func (*DownloadIssuerSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*DownloadIssuerSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*DownloadIssuerSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*DownloadIssuerSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*DownloadIssuerSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*DownloadIssuerSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*DownloadIssuerSelect) Scan ¶
func (_s *DownloadIssuerSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*DownloadIssuerSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type DownloadIssuerUpdate ¶
type DownloadIssuerUpdate struct {
// contains filtered or unexported fields
}
DownloadIssuerUpdate is the builder for updating DownloadIssuer entities.
func (*DownloadIssuerUpdate) Exec ¶
func (_u *DownloadIssuerUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*DownloadIssuerUpdate) ExecX ¶
func (_u *DownloadIssuerUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DownloadIssuerUpdate) Mutation ¶
func (_u *DownloadIssuerUpdate) Mutation() *DownloadIssuerMutation
Mutation returns the DownloadIssuerMutation object of the builder.
func (*DownloadIssuerUpdate) Save ¶
func (_u *DownloadIssuerUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*DownloadIssuerUpdate) SaveX ¶
func (_u *DownloadIssuerUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*DownloadIssuerUpdate) SetEnabled ¶
func (_u *DownloadIssuerUpdate) SetEnabled(v bool) *DownloadIssuerUpdate
SetEnabled sets the "enabled" field.
func (*DownloadIssuerUpdate) SetNillableEnabled ¶
func (_u *DownloadIssuerUpdate) SetNillableEnabled(v *bool) *DownloadIssuerUpdate
SetNillableEnabled sets the "enabled" field if the given value is not nil.
func (*DownloadIssuerUpdate) Where ¶
func (_u *DownloadIssuerUpdate) Where(ps ...predicate.DownloadIssuer) *DownloadIssuerUpdate
Where appends a list predicates to the DownloadIssuerUpdate builder.
type DownloadIssuerUpdateOne ¶
type DownloadIssuerUpdateOne struct {
// contains filtered or unexported fields
}
DownloadIssuerUpdateOne is the builder for updating a single DownloadIssuer entity.
func (*DownloadIssuerUpdateOne) Exec ¶
func (_u *DownloadIssuerUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*DownloadIssuerUpdateOne) ExecX ¶
func (_u *DownloadIssuerUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DownloadIssuerUpdateOne) Mutation ¶
func (_u *DownloadIssuerUpdateOne) Mutation() *DownloadIssuerMutation
Mutation returns the DownloadIssuerMutation object of the builder.
func (*DownloadIssuerUpdateOne) Save ¶
func (_u *DownloadIssuerUpdateOne) Save(ctx context.Context) (*DownloadIssuer, error)
Save executes the query and returns the updated DownloadIssuer entity.
func (*DownloadIssuerUpdateOne) SaveX ¶
func (_u *DownloadIssuerUpdateOne) SaveX(ctx context.Context) *DownloadIssuer
SaveX is like Save, but panics if an error occurs.
func (*DownloadIssuerUpdateOne) Select ¶
func (_u *DownloadIssuerUpdateOne) Select(field string, fields ...string) *DownloadIssuerUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*DownloadIssuerUpdateOne) SetEnabled ¶
func (_u *DownloadIssuerUpdateOne) SetEnabled(v bool) *DownloadIssuerUpdateOne
SetEnabled sets the "enabled" field.
func (*DownloadIssuerUpdateOne) SetNillableEnabled ¶
func (_u *DownloadIssuerUpdateOne) SetNillableEnabled(v *bool) *DownloadIssuerUpdateOne
SetNillableEnabled sets the "enabled" field if the given value is not nil.
func (*DownloadIssuerUpdateOne) Where ¶
func (_u *DownloadIssuerUpdateOne) Where(ps ...predicate.DownloadIssuer) *DownloadIssuerUpdateOne
Where appends a list predicates to the DownloadIssuerUpdate builder.
type DownloadIssuers ¶
type DownloadIssuers []*DownloadIssuer
DownloadIssuers is a parsable slice of DownloadIssuer.
type DownloadShare ¶
type DownloadShare struct {
ID string `json:"id,omitempty"`
TokenHash []byte `json:"token_hash,omitempty"`
Repository string `json:"repository,omitempty"`
SourceTag string `json:"source_tag,omitempty"`
ManifestDigest string `json:"manifest_digest,omitempty"`
BlobDigest string `json:"blob_digest,omitempty"`
BlobSize int64 `json:"blob_size,omitempty"`
MediaType string `json:"media_type,omitempty"`
Filename string `json:"filename,omitempty"`
CustomerID string `json:"customer_id,omitempty"`
Purpose string `json:"purpose,omitempty"`
IssuedBy string `json:"issued_by,omitempty"`
CreatedAt time.Time `json:"created_at,omitempty"`
ExpiresAt time.Time `json:"expires_at,omitempty"`
RevokedAt *time.Time `json:"revoked_at,omitempty"`
MaxSessions *int `json:"max_sessions,omitempty"`
SessionsStarted int64 `json:"sessions_started,omitempty"`
// contains filtered or unexported fields
}
DownloadShare is the model entity for the DownloadShare schema.
func (*DownloadShare) String ¶
func (_m *DownloadShare) String() string
String implements the fmt.Stringer.
func (*DownloadShare) Unwrap ¶
func (_m *DownloadShare) Unwrap() *DownloadShare
Unwrap unwraps the DownloadShare 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 (*DownloadShare) Update ¶
func (_m *DownloadShare) Update() *DownloadShareUpdateOne
Update returns a builder for updating this DownloadShare. Note that you need to call DownloadShare.Unwrap() before calling this method if this DownloadShare was returned from a transaction, and the transaction was committed or rolled back.
type DownloadShareClient ¶
type DownloadShareClient struct {
// contains filtered or unexported fields
}
DownloadShareClient is a client for the DownloadShare schema.
func NewDownloadShareClient ¶
func NewDownloadShareClient(c config) *DownloadShareClient
NewDownloadShareClient returns a client for the DownloadShare from the given config.
func (*DownloadShareClient) Create ¶
func (c *DownloadShareClient) Create() *DownloadShareCreate
Create returns a builder for creating a DownloadShare entity.
func (*DownloadShareClient) CreateBulk ¶
func (c *DownloadShareClient) CreateBulk(builders ...*DownloadShareCreate) *DownloadShareCreateBulk
CreateBulk returns a builder for creating a bulk of DownloadShare entities.
func (*DownloadShareClient) Delete ¶
func (c *DownloadShareClient) Delete() *DownloadShareDelete
Delete returns a delete builder for DownloadShare.
func (*DownloadShareClient) DeleteOne ¶
func (c *DownloadShareClient) DeleteOne(_m *DownloadShare) *DownloadShareDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*DownloadShareClient) DeleteOneID ¶
func (c *DownloadShareClient) DeleteOneID(id string) *DownloadShareDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*DownloadShareClient) Get ¶
func (c *DownloadShareClient) Get(ctx context.Context, id string) (*DownloadShare, error)
Get returns a DownloadShare entity by its id.
func (*DownloadShareClient) GetX ¶
func (c *DownloadShareClient) GetX(ctx context.Context, id string) *DownloadShare
GetX is like Get, but panics if an error occurs.
func (*DownloadShareClient) Hooks ¶
func (c *DownloadShareClient) Hooks() []Hook
Hooks returns the client hooks.
func (*DownloadShareClient) Intercept ¶
func (c *DownloadShareClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `downloadshare.Intercept(f(g(h())))`.
func (*DownloadShareClient) Interceptors ¶
func (c *DownloadShareClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*DownloadShareClient) MapCreateBulk ¶
func (c *DownloadShareClient) MapCreateBulk(slice any, setFunc func(*DownloadShareCreate, int)) *DownloadShareCreateBulk
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 (*DownloadShareClient) Query ¶
func (c *DownloadShareClient) Query() *DownloadShareQuery
Query returns a query builder for DownloadShare.
func (*DownloadShareClient) Update ¶
func (c *DownloadShareClient) Update() *DownloadShareUpdate
Update returns an update builder for DownloadShare.
func (*DownloadShareClient) UpdateOne ¶
func (c *DownloadShareClient) UpdateOne(_m *DownloadShare) *DownloadShareUpdateOne
UpdateOne returns an update builder for the given entity.
func (*DownloadShareClient) UpdateOneID ¶
func (c *DownloadShareClient) UpdateOneID(id string) *DownloadShareUpdateOne
UpdateOneID returns an update builder for the given id.
func (*DownloadShareClient) Use ¶
func (c *DownloadShareClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `downloadshare.Hooks(f(g(h())))`.
type DownloadShareCreate ¶
type DownloadShareCreate struct {
// contains filtered or unexported fields
}
DownloadShareCreate is the builder for creating a DownloadShare entity.
func (*DownloadShareCreate) Exec ¶
func (_c *DownloadShareCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*DownloadShareCreate) ExecX ¶
func (_c *DownloadShareCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DownloadShareCreate) Mutation ¶
func (_c *DownloadShareCreate) Mutation() *DownloadShareMutation
Mutation returns the DownloadShareMutation object of the builder.
func (*DownloadShareCreate) Save ¶
func (_c *DownloadShareCreate) Save(ctx context.Context) (*DownloadShare, error)
Save creates the DownloadShare in the database.
func (*DownloadShareCreate) SaveX ¶
func (_c *DownloadShareCreate) SaveX(ctx context.Context) *DownloadShare
SaveX calls Save and panics if Save returns an error.
func (*DownloadShareCreate) SetBlobDigest ¶
func (_c *DownloadShareCreate) SetBlobDigest(v string) *DownloadShareCreate
SetBlobDigest sets the "blob_digest" field.
func (*DownloadShareCreate) SetBlobSize ¶
func (_c *DownloadShareCreate) SetBlobSize(v int64) *DownloadShareCreate
SetBlobSize sets the "blob_size" field.
func (*DownloadShareCreate) SetCreatedAt ¶
func (_c *DownloadShareCreate) SetCreatedAt(v time.Time) *DownloadShareCreate
SetCreatedAt sets the "created_at" field.
func (*DownloadShareCreate) SetCustomerID ¶
func (_c *DownloadShareCreate) SetCustomerID(v string) *DownloadShareCreate
SetCustomerID sets the "customer_id" field.
func (*DownloadShareCreate) SetExpiresAt ¶
func (_c *DownloadShareCreate) SetExpiresAt(v time.Time) *DownloadShareCreate
SetExpiresAt sets the "expires_at" field.
func (*DownloadShareCreate) SetFilename ¶
func (_c *DownloadShareCreate) SetFilename(v string) *DownloadShareCreate
SetFilename sets the "filename" field.
func (*DownloadShareCreate) SetID ¶
func (_c *DownloadShareCreate) SetID(v string) *DownloadShareCreate
SetID sets the "id" field.
func (*DownloadShareCreate) SetIssuedBy ¶
func (_c *DownloadShareCreate) SetIssuedBy(v string) *DownloadShareCreate
SetIssuedBy sets the "issued_by" field.
func (*DownloadShareCreate) SetManifestDigest ¶
func (_c *DownloadShareCreate) SetManifestDigest(v string) *DownloadShareCreate
SetManifestDigest sets the "manifest_digest" field.
func (*DownloadShareCreate) SetMaxSessions ¶
func (_c *DownloadShareCreate) SetMaxSessions(v int) *DownloadShareCreate
SetMaxSessions sets the "max_sessions" field.
func (*DownloadShareCreate) SetMediaType ¶
func (_c *DownloadShareCreate) SetMediaType(v string) *DownloadShareCreate
SetMediaType sets the "media_type" field.
func (*DownloadShareCreate) SetNillableMaxSessions ¶
func (_c *DownloadShareCreate) SetNillableMaxSessions(v *int) *DownloadShareCreate
SetNillableMaxSessions sets the "max_sessions" field if the given value is not nil.
func (*DownloadShareCreate) SetNillableRevokedAt ¶
func (_c *DownloadShareCreate) SetNillableRevokedAt(v *time.Time) *DownloadShareCreate
SetNillableRevokedAt sets the "revoked_at" field if the given value is not nil.
func (*DownloadShareCreate) SetNillableSessionsStarted ¶
func (_c *DownloadShareCreate) SetNillableSessionsStarted(v *int64) *DownloadShareCreate
SetNillableSessionsStarted sets the "sessions_started" field if the given value is not nil.
func (*DownloadShareCreate) SetPurpose ¶
func (_c *DownloadShareCreate) SetPurpose(v string) *DownloadShareCreate
SetPurpose sets the "purpose" field.
func (*DownloadShareCreate) SetRepository ¶
func (_c *DownloadShareCreate) SetRepository(v string) *DownloadShareCreate
SetRepository sets the "repository" field.
func (*DownloadShareCreate) SetRevokedAt ¶
func (_c *DownloadShareCreate) SetRevokedAt(v time.Time) *DownloadShareCreate
SetRevokedAt sets the "revoked_at" field.
func (*DownloadShareCreate) SetSessionsStarted ¶
func (_c *DownloadShareCreate) SetSessionsStarted(v int64) *DownloadShareCreate
SetSessionsStarted sets the "sessions_started" field.
func (*DownloadShareCreate) SetSourceTag ¶
func (_c *DownloadShareCreate) SetSourceTag(v string) *DownloadShareCreate
SetSourceTag sets the "source_tag" field.
func (*DownloadShareCreate) SetTokenHash ¶
func (_c *DownloadShareCreate) SetTokenHash(v []byte) *DownloadShareCreate
SetTokenHash sets the "token_hash" field.
type DownloadShareCreateBulk ¶
type DownloadShareCreateBulk struct {
// contains filtered or unexported fields
}
DownloadShareCreateBulk is the builder for creating many DownloadShare entities in bulk.
func (*DownloadShareCreateBulk) Exec ¶
func (_c *DownloadShareCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*DownloadShareCreateBulk) ExecX ¶
func (_c *DownloadShareCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DownloadShareCreateBulk) Save ¶
func (_c *DownloadShareCreateBulk) Save(ctx context.Context) ([]*DownloadShare, error)
Save creates the DownloadShare entities in the database.
func (*DownloadShareCreateBulk) SaveX ¶
func (_c *DownloadShareCreateBulk) SaveX(ctx context.Context) []*DownloadShare
SaveX is like Save, but panics if an error occurs.
type DownloadShareDelete ¶
type DownloadShareDelete struct {
// contains filtered or unexported fields
}
DownloadShareDelete is the builder for deleting a DownloadShare entity.
func (*DownloadShareDelete) Exec ¶
func (_d *DownloadShareDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*DownloadShareDelete) ExecX ¶
func (_d *DownloadShareDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*DownloadShareDelete) Where ¶
func (_d *DownloadShareDelete) Where(ps ...predicate.DownloadShare) *DownloadShareDelete
Where appends a list predicates to the DownloadShareDelete builder.
type DownloadShareDeleteOne ¶
type DownloadShareDeleteOne struct {
// contains filtered or unexported fields
}
DownloadShareDeleteOne is the builder for deleting a single DownloadShare entity.
func (*DownloadShareDeleteOne) Exec ¶
func (_d *DownloadShareDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*DownloadShareDeleteOne) ExecX ¶
func (_d *DownloadShareDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DownloadShareDeleteOne) Where ¶
func (_d *DownloadShareDeleteOne) Where(ps ...predicate.DownloadShare) *DownloadShareDeleteOne
Where appends a list predicates to the DownloadShareDelete builder.
type DownloadShareGroupBy ¶
type DownloadShareGroupBy struct {
// contains filtered or unexported fields
}
DownloadShareGroupBy is the group-by builder for DownloadShare entities.
func (*DownloadShareGroupBy) Aggregate ¶
func (_g *DownloadShareGroupBy) Aggregate(fns ...AggregateFunc) *DownloadShareGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*DownloadShareGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*DownloadShareGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*DownloadShareGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*DownloadShareGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*DownloadShareGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*DownloadShareGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*DownloadShareGroupBy) Scan ¶
func (_g *DownloadShareGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*DownloadShareGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type DownloadShareMutation ¶
type DownloadShareMutation struct {
// contains filtered or unexported fields
}
DownloadShareMutation represents an operation that mutates the DownloadShare nodes in the graph.
func (*DownloadShareMutation) AddBlobSize ¶
func (m *DownloadShareMutation) AddBlobSize(i int64)
AddBlobSize adds i to the "blob_size" field.
func (*DownloadShareMutation) AddField ¶
func (m *DownloadShareMutation) 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 (*DownloadShareMutation) AddMaxSessions ¶
func (m *DownloadShareMutation) AddMaxSessions(i int)
AddMaxSessions adds i to the "max_sessions" field.
func (*DownloadShareMutation) AddSessionsStarted ¶
func (m *DownloadShareMutation) AddSessionsStarted(i int64)
AddSessionsStarted adds i to the "sessions_started" field.
func (*DownloadShareMutation) AddedBlobSize ¶
func (m *DownloadShareMutation) AddedBlobSize() (r int64, exists bool)
AddedBlobSize returns the value that was added to the "blob_size" field in this mutation.
func (*DownloadShareMutation) AddedEdges ¶
func (m *DownloadShareMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*DownloadShareMutation) AddedField ¶
func (m *DownloadShareMutation) 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 (*DownloadShareMutation) AddedFields ¶
func (m *DownloadShareMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*DownloadShareMutation) AddedIDs ¶
func (m *DownloadShareMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*DownloadShareMutation) AddedMaxSessions ¶
func (m *DownloadShareMutation) AddedMaxSessions() (r int, exists bool)
AddedMaxSessions returns the value that was added to the "max_sessions" field in this mutation.
func (*DownloadShareMutation) AddedSessionsStarted ¶
func (m *DownloadShareMutation) AddedSessionsStarted() (r int64, exists bool)
AddedSessionsStarted returns the value that was added to the "sessions_started" field in this mutation.
func (*DownloadShareMutation) BlobDigest ¶
func (m *DownloadShareMutation) BlobDigest() (r string, exists bool)
BlobDigest returns the value of the "blob_digest" field in the mutation.
func (*DownloadShareMutation) BlobSize ¶
func (m *DownloadShareMutation) BlobSize() (r int64, exists bool)
BlobSize returns the value of the "blob_size" field in the mutation.
func (*DownloadShareMutation) ClearEdge ¶
func (m *DownloadShareMutation) 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 (*DownloadShareMutation) ClearField ¶
func (m *DownloadShareMutation) 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 (*DownloadShareMutation) ClearMaxSessions ¶
func (m *DownloadShareMutation) ClearMaxSessions()
ClearMaxSessions clears the value of the "max_sessions" field.
func (*DownloadShareMutation) ClearRevokedAt ¶
func (m *DownloadShareMutation) ClearRevokedAt()
ClearRevokedAt clears the value of the "revoked_at" field.
func (*DownloadShareMutation) ClearedEdges ¶
func (m *DownloadShareMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*DownloadShareMutation) ClearedFields ¶
func (m *DownloadShareMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (DownloadShareMutation) Client ¶
func (m DownloadShareMutation) 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 (*DownloadShareMutation) CreatedAt ¶
func (m *DownloadShareMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*DownloadShareMutation) CustomerID ¶
func (m *DownloadShareMutation) CustomerID() (r string, exists bool)
CustomerID returns the value of the "customer_id" field in the mutation.
func (*DownloadShareMutation) EdgeCleared ¶
func (m *DownloadShareMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*DownloadShareMutation) ExpiresAt ¶
func (m *DownloadShareMutation) ExpiresAt() (r time.Time, exists bool)
ExpiresAt returns the value of the "expires_at" field in the mutation.
func (*DownloadShareMutation) Field ¶
func (m *DownloadShareMutation) 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 (*DownloadShareMutation) FieldCleared ¶
func (m *DownloadShareMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*DownloadShareMutation) Fields ¶
func (m *DownloadShareMutation) 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 (*DownloadShareMutation) Filename ¶
func (m *DownloadShareMutation) Filename() (r string, exists bool)
Filename returns the value of the "filename" field in the mutation.
func (*DownloadShareMutation) ID ¶
func (m *DownloadShareMutation) 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 (*DownloadShareMutation) IDs ¶
func (m *DownloadShareMutation) 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 (*DownloadShareMutation) IssuedBy ¶
func (m *DownloadShareMutation) IssuedBy() (r string, exists bool)
IssuedBy returns the value of the "issued_by" field in the mutation.
func (*DownloadShareMutation) ManifestDigest ¶
func (m *DownloadShareMutation) ManifestDigest() (r string, exists bool)
ManifestDigest returns the value of the "manifest_digest" field in the mutation.
func (*DownloadShareMutation) MaxSessions ¶
func (m *DownloadShareMutation) MaxSessions() (r int, exists bool)
MaxSessions returns the value of the "max_sessions" field in the mutation.
func (*DownloadShareMutation) MaxSessionsCleared ¶
func (m *DownloadShareMutation) MaxSessionsCleared() bool
MaxSessionsCleared returns if the "max_sessions" field was cleared in this mutation.
func (*DownloadShareMutation) MediaType ¶
func (m *DownloadShareMutation) MediaType() (r string, exists bool)
MediaType returns the value of the "media_type" field in the mutation.
func (*DownloadShareMutation) OldBlobDigest ¶
func (m *DownloadShareMutation) OldBlobDigest(ctx context.Context) (v string, err error)
OldBlobDigest returns the old "blob_digest" field's value of the DownloadShare entity. If the DownloadShare object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*DownloadShareMutation) OldBlobSize ¶
func (m *DownloadShareMutation) OldBlobSize(ctx context.Context) (v int64, err error)
OldBlobSize returns the old "blob_size" field's value of the DownloadShare entity. If the DownloadShare object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*DownloadShareMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the DownloadShare entity. If the DownloadShare object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*DownloadShareMutation) OldCustomerID ¶
func (m *DownloadShareMutation) OldCustomerID(ctx context.Context) (v string, err error)
OldCustomerID returns the old "customer_id" field's value of the DownloadShare entity. If the DownloadShare object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*DownloadShareMutation) OldExpiresAt ¶
OldExpiresAt returns the old "expires_at" field's value of the DownloadShare entity. If the DownloadShare object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*DownloadShareMutation) OldField ¶
OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.
func (*DownloadShareMutation) OldFilename ¶
func (m *DownloadShareMutation) OldFilename(ctx context.Context) (v string, err error)
OldFilename returns the old "filename" field's value of the DownloadShare entity. If the DownloadShare object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*DownloadShareMutation) OldIssuedBy ¶
func (m *DownloadShareMutation) OldIssuedBy(ctx context.Context) (v string, err error)
OldIssuedBy returns the old "issued_by" field's value of the DownloadShare entity. If the DownloadShare object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*DownloadShareMutation) OldManifestDigest ¶
func (m *DownloadShareMutation) OldManifestDigest(ctx context.Context) (v string, err error)
OldManifestDigest returns the old "manifest_digest" field's value of the DownloadShare entity. If the DownloadShare object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*DownloadShareMutation) OldMaxSessions ¶
func (m *DownloadShareMutation) OldMaxSessions(ctx context.Context) (v *int, err error)
OldMaxSessions returns the old "max_sessions" field's value of the DownloadShare entity. If the DownloadShare object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*DownloadShareMutation) OldMediaType ¶
func (m *DownloadShareMutation) OldMediaType(ctx context.Context) (v string, err error)
OldMediaType returns the old "media_type" field's value of the DownloadShare entity. If the DownloadShare object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*DownloadShareMutation) OldPurpose ¶
func (m *DownloadShareMutation) OldPurpose(ctx context.Context) (v string, err error)
OldPurpose returns the old "purpose" field's value of the DownloadShare entity. If the DownloadShare object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*DownloadShareMutation) OldRepository ¶
func (m *DownloadShareMutation) OldRepository(ctx context.Context) (v string, err error)
OldRepository returns the old "repository" field's value of the DownloadShare entity. If the DownloadShare object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*DownloadShareMutation) OldRevokedAt ¶
OldRevokedAt returns the old "revoked_at" field's value of the DownloadShare entity. If the DownloadShare object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*DownloadShareMutation) OldSessionsStarted ¶
func (m *DownloadShareMutation) OldSessionsStarted(ctx context.Context) (v int64, err error)
OldSessionsStarted returns the old "sessions_started" field's value of the DownloadShare entity. If the DownloadShare object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*DownloadShareMutation) OldSourceTag ¶
func (m *DownloadShareMutation) OldSourceTag(ctx context.Context) (v string, err error)
OldSourceTag returns the old "source_tag" field's value of the DownloadShare entity. If the DownloadShare object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*DownloadShareMutation) OldTokenHash ¶
func (m *DownloadShareMutation) OldTokenHash(ctx context.Context) (v []byte, err error)
OldTokenHash returns the old "token_hash" field's value of the DownloadShare entity. If the DownloadShare object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*DownloadShareMutation) Op ¶
func (m *DownloadShareMutation) Op() Op
Op returns the operation name.
func (*DownloadShareMutation) Purpose ¶
func (m *DownloadShareMutation) Purpose() (r string, exists bool)
Purpose returns the value of the "purpose" field in the mutation.
func (*DownloadShareMutation) RemovedEdges ¶
func (m *DownloadShareMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*DownloadShareMutation) RemovedIDs ¶
func (m *DownloadShareMutation) 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 (*DownloadShareMutation) Repository ¶
func (m *DownloadShareMutation) Repository() (r string, exists bool)
Repository returns the value of the "repository" field in the mutation.
func (*DownloadShareMutation) ResetBlobDigest ¶
func (m *DownloadShareMutation) ResetBlobDigest()
ResetBlobDigest resets all changes to the "blob_digest" field.
func (*DownloadShareMutation) ResetBlobSize ¶
func (m *DownloadShareMutation) ResetBlobSize()
ResetBlobSize resets all changes to the "blob_size" field.
func (*DownloadShareMutation) ResetCreatedAt ¶
func (m *DownloadShareMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*DownloadShareMutation) ResetCustomerID ¶
func (m *DownloadShareMutation) ResetCustomerID()
ResetCustomerID resets all changes to the "customer_id" field.
func (*DownloadShareMutation) ResetEdge ¶
func (m *DownloadShareMutation) 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 (*DownloadShareMutation) ResetExpiresAt ¶
func (m *DownloadShareMutation) ResetExpiresAt()
ResetExpiresAt resets all changes to the "expires_at" field.
func (*DownloadShareMutation) ResetField ¶
func (m *DownloadShareMutation) 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 (*DownloadShareMutation) ResetFilename ¶
func (m *DownloadShareMutation) ResetFilename()
ResetFilename resets all changes to the "filename" field.
func (*DownloadShareMutation) ResetIssuedBy ¶
func (m *DownloadShareMutation) ResetIssuedBy()
ResetIssuedBy resets all changes to the "issued_by" field.
func (*DownloadShareMutation) ResetManifestDigest ¶
func (m *DownloadShareMutation) ResetManifestDigest()
ResetManifestDigest resets all changes to the "manifest_digest" field.
func (*DownloadShareMutation) ResetMaxSessions ¶
func (m *DownloadShareMutation) ResetMaxSessions()
ResetMaxSessions resets all changes to the "max_sessions" field.
func (*DownloadShareMutation) ResetMediaType ¶
func (m *DownloadShareMutation) ResetMediaType()
ResetMediaType resets all changes to the "media_type" field.
func (*DownloadShareMutation) ResetPurpose ¶
func (m *DownloadShareMutation) ResetPurpose()
ResetPurpose resets all changes to the "purpose" field.
func (*DownloadShareMutation) ResetRepository ¶
func (m *DownloadShareMutation) ResetRepository()
ResetRepository resets all changes to the "repository" field.
func (*DownloadShareMutation) ResetRevokedAt ¶
func (m *DownloadShareMutation) ResetRevokedAt()
ResetRevokedAt resets all changes to the "revoked_at" field.
func (*DownloadShareMutation) ResetSessionsStarted ¶
func (m *DownloadShareMutation) ResetSessionsStarted()
ResetSessionsStarted resets all changes to the "sessions_started" field.
func (*DownloadShareMutation) ResetSourceTag ¶
func (m *DownloadShareMutation) ResetSourceTag()
ResetSourceTag resets all changes to the "source_tag" field.
func (*DownloadShareMutation) ResetTokenHash ¶
func (m *DownloadShareMutation) ResetTokenHash()
ResetTokenHash resets all changes to the "token_hash" field.
func (*DownloadShareMutation) RevokedAt ¶
func (m *DownloadShareMutation) RevokedAt() (r time.Time, exists bool)
RevokedAt returns the value of the "revoked_at" field in the mutation.
func (*DownloadShareMutation) RevokedAtCleared ¶
func (m *DownloadShareMutation) RevokedAtCleared() bool
RevokedAtCleared returns if the "revoked_at" field was cleared in this mutation.
func (*DownloadShareMutation) SessionsStarted ¶
func (m *DownloadShareMutation) SessionsStarted() (r int64, exists bool)
SessionsStarted returns the value of the "sessions_started" field in the mutation.
func (*DownloadShareMutation) SetBlobDigest ¶
func (m *DownloadShareMutation) SetBlobDigest(s string)
SetBlobDigest sets the "blob_digest" field.
func (*DownloadShareMutation) SetBlobSize ¶
func (m *DownloadShareMutation) SetBlobSize(i int64)
SetBlobSize sets the "blob_size" field.
func (*DownloadShareMutation) SetCreatedAt ¶
func (m *DownloadShareMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*DownloadShareMutation) SetCustomerID ¶
func (m *DownloadShareMutation) SetCustomerID(s string)
SetCustomerID sets the "customer_id" field.
func (*DownloadShareMutation) SetExpiresAt ¶
func (m *DownloadShareMutation) SetExpiresAt(t time.Time)
SetExpiresAt sets the "expires_at" field.
func (*DownloadShareMutation) SetField ¶
func (m *DownloadShareMutation) 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 (*DownloadShareMutation) SetFilename ¶
func (m *DownloadShareMutation) SetFilename(s string)
SetFilename sets the "filename" field.
func (*DownloadShareMutation) SetID ¶
func (m *DownloadShareMutation) SetID(id string)
SetID sets the value of the id field. Note that this operation is only accepted on creation of DownloadShare entities.
func (*DownloadShareMutation) SetIssuedBy ¶
func (m *DownloadShareMutation) SetIssuedBy(s string)
SetIssuedBy sets the "issued_by" field.
func (*DownloadShareMutation) SetManifestDigest ¶
func (m *DownloadShareMutation) SetManifestDigest(s string)
SetManifestDigest sets the "manifest_digest" field.
func (*DownloadShareMutation) SetMaxSessions ¶
func (m *DownloadShareMutation) SetMaxSessions(i int)
SetMaxSessions sets the "max_sessions" field.
func (*DownloadShareMutation) SetMediaType ¶
func (m *DownloadShareMutation) SetMediaType(s string)
SetMediaType sets the "media_type" field.
func (*DownloadShareMutation) SetOp ¶
func (m *DownloadShareMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*DownloadShareMutation) SetPurpose ¶
func (m *DownloadShareMutation) SetPurpose(s string)
SetPurpose sets the "purpose" field.
func (*DownloadShareMutation) SetRepository ¶
func (m *DownloadShareMutation) SetRepository(s string)
SetRepository sets the "repository" field.
func (*DownloadShareMutation) SetRevokedAt ¶
func (m *DownloadShareMutation) SetRevokedAt(t time.Time)
SetRevokedAt sets the "revoked_at" field.
func (*DownloadShareMutation) SetSessionsStarted ¶
func (m *DownloadShareMutation) SetSessionsStarted(i int64)
SetSessionsStarted sets the "sessions_started" field.
func (*DownloadShareMutation) SetSourceTag ¶
func (m *DownloadShareMutation) SetSourceTag(s string)
SetSourceTag sets the "source_tag" field.
func (*DownloadShareMutation) SetTokenHash ¶
func (m *DownloadShareMutation) SetTokenHash(b []byte)
SetTokenHash sets the "token_hash" field.
func (*DownloadShareMutation) SourceTag ¶
func (m *DownloadShareMutation) SourceTag() (r string, exists bool)
SourceTag returns the value of the "source_tag" field in the mutation.
func (*DownloadShareMutation) TokenHash ¶
func (m *DownloadShareMutation) TokenHash() (r []byte, exists bool)
TokenHash returns the value of the "token_hash" field in the mutation.
func (DownloadShareMutation) Tx ¶
func (m DownloadShareMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*DownloadShareMutation) Type ¶
func (m *DownloadShareMutation) Type() string
Type returns the node type of this mutation (DownloadShare).
func (*DownloadShareMutation) Where ¶
func (m *DownloadShareMutation) Where(ps ...predicate.DownloadShare)
Where appends a list predicates to the DownloadShareMutation builder.
func (*DownloadShareMutation) WhereP ¶
func (m *DownloadShareMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the DownloadShareMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type DownloadShareQuery ¶
type DownloadShareQuery struct {
// contains filtered or unexported fields
}
DownloadShareQuery is the builder for querying DownloadShare entities.
func (*DownloadShareQuery) Aggregate ¶
func (_q *DownloadShareQuery) Aggregate(fns ...AggregateFunc) *DownloadShareSelect
Aggregate returns a DownloadShareSelect configured with the given aggregations.
func (*DownloadShareQuery) All ¶
func (_q *DownloadShareQuery) All(ctx context.Context) ([]*DownloadShare, error)
All executes the query and returns a list of DownloadShares.
func (*DownloadShareQuery) AllX ¶
func (_q *DownloadShareQuery) AllX(ctx context.Context) []*DownloadShare
AllX is like All, but panics if an error occurs.
func (*DownloadShareQuery) Clone ¶
func (_q *DownloadShareQuery) Clone() *DownloadShareQuery
Clone returns a duplicate of the DownloadShareQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*DownloadShareQuery) Count ¶
func (_q *DownloadShareQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*DownloadShareQuery) CountX ¶
func (_q *DownloadShareQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*DownloadShareQuery) Exist ¶
func (_q *DownloadShareQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*DownloadShareQuery) ExistX ¶
func (_q *DownloadShareQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*DownloadShareQuery) First ¶
func (_q *DownloadShareQuery) First(ctx context.Context) (*DownloadShare, error)
First returns the first DownloadShare entity from the query. Returns a *NotFoundError when no DownloadShare was found.
func (*DownloadShareQuery) FirstID ¶
func (_q *DownloadShareQuery) FirstID(ctx context.Context) (id string, err error)
FirstID returns the first DownloadShare ID from the query. Returns a *NotFoundError when no DownloadShare ID was found.
func (*DownloadShareQuery) FirstIDX ¶
func (_q *DownloadShareQuery) FirstIDX(ctx context.Context) string
FirstIDX is like FirstID, but panics if an error occurs.
func (*DownloadShareQuery) FirstX ¶
func (_q *DownloadShareQuery) FirstX(ctx context.Context) *DownloadShare
FirstX is like First, but panics if an error occurs.
func (*DownloadShareQuery) GroupBy ¶
func (_q *DownloadShareQuery) GroupBy(field string, fields ...string) *DownloadShareGroupBy
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 {
TokenHash []byte `json:"token_hash,omitempty"`
Count int `json:"count,omitempty"`
}
client.DownloadShare.Query().
GroupBy(downloadshare.FieldTokenHash).
Aggregate(ent.Count()).
Scan(ctx, &v)
func (*DownloadShareQuery) IDs ¶
func (_q *DownloadShareQuery) IDs(ctx context.Context) (ids []string, err error)
IDs executes the query and returns a list of DownloadShare IDs.
func (*DownloadShareQuery) IDsX ¶
func (_q *DownloadShareQuery) IDsX(ctx context.Context) []string
IDsX is like IDs, but panics if an error occurs.
func (*DownloadShareQuery) Limit ¶
func (_q *DownloadShareQuery) Limit(limit int) *DownloadShareQuery
Limit the number of records to be returned by this query.
func (*DownloadShareQuery) Offset ¶
func (_q *DownloadShareQuery) Offset(offset int) *DownloadShareQuery
Offset to start from.
func (*DownloadShareQuery) Only ¶
func (_q *DownloadShareQuery) Only(ctx context.Context) (*DownloadShare, error)
Only returns a single DownloadShare entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one DownloadShare entity is found. Returns a *NotFoundError when no DownloadShare entities are found.
func (*DownloadShareQuery) OnlyID ¶
func (_q *DownloadShareQuery) OnlyID(ctx context.Context) (id string, err error)
OnlyID is like Only, but returns the only DownloadShare ID in the query. Returns a *NotSingularError when more than one DownloadShare ID is found. Returns a *NotFoundError when no entities are found.
func (*DownloadShareQuery) OnlyIDX ¶
func (_q *DownloadShareQuery) OnlyIDX(ctx context.Context) string
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*DownloadShareQuery) OnlyX ¶
func (_q *DownloadShareQuery) OnlyX(ctx context.Context) *DownloadShare
OnlyX is like Only, but panics if an error occurs.
func (*DownloadShareQuery) Order ¶
func (_q *DownloadShareQuery) Order(o ...downloadshare.OrderOption) *DownloadShareQuery
Order specifies how the records should be ordered.
func (*DownloadShareQuery) Select ¶
func (_q *DownloadShareQuery) Select(fields ...string) *DownloadShareSelect
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 {
TokenHash []byte `json:"token_hash,omitempty"`
}
client.DownloadShare.Query().
Select(downloadshare.FieldTokenHash).
Scan(ctx, &v)
func (*DownloadShareQuery) Unique ¶
func (_q *DownloadShareQuery) Unique(unique bool) *DownloadShareQuery
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 (*DownloadShareQuery) Where ¶
func (_q *DownloadShareQuery) Where(ps ...predicate.DownloadShare) *DownloadShareQuery
Where adds a new predicate for the DownloadShareQuery builder.
type DownloadShareSelect ¶
type DownloadShareSelect struct {
// contains filtered or unexported fields
}
DownloadShareSelect is the builder for selecting fields of DownloadShare entities.
func (*DownloadShareSelect) Aggregate ¶
func (_s *DownloadShareSelect) Aggregate(fns ...AggregateFunc) *DownloadShareSelect
Aggregate adds the given aggregation functions to the selector query.
func (*DownloadShareSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*DownloadShareSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*DownloadShareSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*DownloadShareSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*DownloadShareSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*DownloadShareSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*DownloadShareSelect) Scan ¶
func (_s *DownloadShareSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*DownloadShareSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type DownloadShareUpdate ¶
type DownloadShareUpdate struct {
// contains filtered or unexported fields
}
DownloadShareUpdate is the builder for updating DownloadShare entities.
func (*DownloadShareUpdate) AddSessionsStarted ¶
func (_u *DownloadShareUpdate) AddSessionsStarted(v int64) *DownloadShareUpdate
AddSessionsStarted adds value to the "sessions_started" field.
func (*DownloadShareUpdate) ClearRevokedAt ¶
func (_u *DownloadShareUpdate) ClearRevokedAt() *DownloadShareUpdate
ClearRevokedAt clears the value of the "revoked_at" field.
func (*DownloadShareUpdate) Exec ¶
func (_u *DownloadShareUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*DownloadShareUpdate) ExecX ¶
func (_u *DownloadShareUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DownloadShareUpdate) Mutation ¶
func (_u *DownloadShareUpdate) Mutation() *DownloadShareMutation
Mutation returns the DownloadShareMutation object of the builder.
func (*DownloadShareUpdate) Save ¶
func (_u *DownloadShareUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*DownloadShareUpdate) SaveX ¶
func (_u *DownloadShareUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*DownloadShareUpdate) SetNillableRevokedAt ¶
func (_u *DownloadShareUpdate) SetNillableRevokedAt(v *time.Time) *DownloadShareUpdate
SetNillableRevokedAt sets the "revoked_at" field if the given value is not nil.
func (*DownloadShareUpdate) SetNillableSessionsStarted ¶
func (_u *DownloadShareUpdate) SetNillableSessionsStarted(v *int64) *DownloadShareUpdate
SetNillableSessionsStarted sets the "sessions_started" field if the given value is not nil.
func (*DownloadShareUpdate) SetRevokedAt ¶
func (_u *DownloadShareUpdate) SetRevokedAt(v time.Time) *DownloadShareUpdate
SetRevokedAt sets the "revoked_at" field.
func (*DownloadShareUpdate) SetSessionsStarted ¶
func (_u *DownloadShareUpdate) SetSessionsStarted(v int64) *DownloadShareUpdate
SetSessionsStarted sets the "sessions_started" field.
func (*DownloadShareUpdate) Where ¶
func (_u *DownloadShareUpdate) Where(ps ...predicate.DownloadShare) *DownloadShareUpdate
Where appends a list predicates to the DownloadShareUpdate builder.
type DownloadShareUpdateOne ¶
type DownloadShareUpdateOne struct {
// contains filtered or unexported fields
}
DownloadShareUpdateOne is the builder for updating a single DownloadShare entity.
func (*DownloadShareUpdateOne) AddSessionsStarted ¶
func (_u *DownloadShareUpdateOne) AddSessionsStarted(v int64) *DownloadShareUpdateOne
AddSessionsStarted adds value to the "sessions_started" field.
func (*DownloadShareUpdateOne) ClearRevokedAt ¶
func (_u *DownloadShareUpdateOne) ClearRevokedAt() *DownloadShareUpdateOne
ClearRevokedAt clears the value of the "revoked_at" field.
func (*DownloadShareUpdateOne) Exec ¶
func (_u *DownloadShareUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*DownloadShareUpdateOne) ExecX ¶
func (_u *DownloadShareUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DownloadShareUpdateOne) Mutation ¶
func (_u *DownloadShareUpdateOne) Mutation() *DownloadShareMutation
Mutation returns the DownloadShareMutation object of the builder.
func (*DownloadShareUpdateOne) Save ¶
func (_u *DownloadShareUpdateOne) Save(ctx context.Context) (*DownloadShare, error)
Save executes the query and returns the updated DownloadShare entity.
func (*DownloadShareUpdateOne) SaveX ¶
func (_u *DownloadShareUpdateOne) SaveX(ctx context.Context) *DownloadShare
SaveX is like Save, but panics if an error occurs.
func (*DownloadShareUpdateOne) Select ¶
func (_u *DownloadShareUpdateOne) Select(field string, fields ...string) *DownloadShareUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*DownloadShareUpdateOne) SetNillableRevokedAt ¶
func (_u *DownloadShareUpdateOne) SetNillableRevokedAt(v *time.Time) *DownloadShareUpdateOne
SetNillableRevokedAt sets the "revoked_at" field if the given value is not nil.
func (*DownloadShareUpdateOne) SetNillableSessionsStarted ¶
func (_u *DownloadShareUpdateOne) SetNillableSessionsStarted(v *int64) *DownloadShareUpdateOne
SetNillableSessionsStarted sets the "sessions_started" field if the given value is not nil.
func (*DownloadShareUpdateOne) SetRevokedAt ¶
func (_u *DownloadShareUpdateOne) SetRevokedAt(v time.Time) *DownloadShareUpdateOne
SetRevokedAt sets the "revoked_at" field.
func (*DownloadShareUpdateOne) SetSessionsStarted ¶
func (_u *DownloadShareUpdateOne) SetSessionsStarted(v int64) *DownloadShareUpdateOne
SetSessionsStarted sets the "sessions_started" field.
func (*DownloadShareUpdateOne) Where ¶
func (_u *DownloadShareUpdateOne) Where(ps ...predicate.DownloadShare) *DownloadShareUpdateOne
Where appends a list predicates to the DownloadShareUpdate builder.
type DownloadShares ¶
type DownloadShares []*DownloadShare
DownloadShares is a parsable slice of DownloadShare.
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 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 OrderFunc ¶
OrderFunc applies an ordering on the sql selector. Deprecated: Use Asc/Desc functions or the package builders instead.
type QuerierFunc ¶
type QuerierFunc = ent.QuerierFunc
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 ¶
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.
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 ¶
Rollbacker is the interface that wraps the Rollback method.
type TraverseFunc ¶
type TraverseFunc = ent.TraverseFunc
ent aliases to avoid import conflicts in user's code.
type Tx ¶
type Tx struct {
// DownloadEvent is the client for interacting with the DownloadEvent builders.
DownloadEvent *DownloadEventClient
// DownloadIssuer is the client for interacting with the DownloadIssuer builders.
DownloadIssuer *DownloadIssuerClient
DownloadShare *DownloadShareClient
// contains filtered or unexported fields
}
Tx is a transactional client that is created by calling Client.Tx().
func TxFromContext ¶
TxFromContext returns a Tx stored inside a context, or nil if there isn't one.
func (*Tx) OnRollback ¶
func (tx *Tx) OnRollback(f RollbackHook)
OnRollback adds a hook to call on rollback.
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.
Source Files
¶
- client.go
- downloadevent.go
- downloadevent_create.go
- downloadevent_delete.go
- downloadevent_query.go
- downloadevent_update.go
- downloadissuer.go
- downloadissuer_create.go
- downloadissuer_delete.go
- downloadissuer_query.go
- downloadissuer_update.go
- downloadshare.go
- downloadshare_create.go
- downloadshare_delete.go
- downloadshare_query.go
- downloadshare_update.go
- ent.go
- mutation.go
- runtime.go
- tx.go