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) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (c *Client) Intercept(interceptors ...Interceptor)
- func (c *Client) Mutate(ctx context.Context, m Mutation) (Value, error)
- func (c *Client) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, 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 DataKey
- func (c *DataKey) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (c *DataKey) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (_m *DataKey) QueryKek() *KEKQuery
- func (_m *DataKey) String() string
- func (_m *DataKey) Unwrap() *DataKey
- func (_m *DataKey) Update() *DataKeyUpdateOne
- func (_m *DataKey) Value(name string) (ent.Value, error)
- type DataKeyClient
- func (c *DataKeyClient) Create() *DataKeyCreate
- func (c *DataKeyClient) CreateBulk(builders ...*DataKeyCreate) *DataKeyCreateBulk
- func (c *DataKeyClient) Delete() *DataKeyDelete
- func (c *DataKeyClient) DeleteOne(_m *DataKey) *DataKeyDeleteOne
- func (c *DataKeyClient) DeleteOneID(id envelope.ID) *DataKeyDeleteOne
- func (c *DataKeyClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (c *DataKeyClient) Get(ctx context.Context, id envelope.ID) (*DataKey, error)
- func (c *DataKeyClient) GetX(ctx context.Context, id envelope.ID) *DataKey
- func (c *DataKeyClient) Hooks() []Hook
- func (c *DataKeyClient) Intercept(interceptors ...Interceptor)
- func (c *DataKeyClient) Interceptors() []Interceptor
- func (c *DataKeyClient) MapCreateBulk(slice any, setFunc func(*DataKeyCreate, int)) *DataKeyCreateBulk
- func (c *DataKeyClient) Query() *DataKeyQuery
- func (c *DataKeyClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (c *DataKeyClient) QueryKek(_m *DataKey) *KEKQuery
- func (c *DataKeyClient) Update() *DataKeyUpdate
- func (c *DataKeyClient) UpdateOne(_m *DataKey) *DataKeyUpdateOne
- func (c *DataKeyClient) UpdateOneID(id envelope.ID) *DataKeyUpdateOne
- func (c *DataKeyClient) Use(hooks ...Hook)
- type DataKeyCreate
- func (_c *DataKeyCreate) Exec(ctx context.Context) error
- func (c *DataKeyCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (_c *DataKeyCreate) ExecX(ctx context.Context)
- func (_c *DataKeyCreate) Mutation() *DataKeyMutation
- func (_c *DataKeyCreate) OnConflict(opts ...sql.ConflictOption) *DataKeyUpsertOne
- func (_c *DataKeyCreate) OnConflictColumns(columns ...string) *DataKeyUpsertOne
- func (c *DataKeyCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (_c *DataKeyCreate) Save(ctx context.Context) (*DataKey, error)
- func (_c *DataKeyCreate) SaveX(ctx context.Context) *DataKey
- func (_c *DataKeyCreate) SetAlgorithm(v uint8) *DataKeyCreate
- func (_c *DataKeyCreate) SetCreatedAt(v time.Time) *DataKeyCreate
- func (_c *DataKeyCreate) SetEpoch(v uint32) *DataKeyCreate
- func (_c *DataKeyCreate) SetID(v envelope.ID) *DataKeyCreate
- func (_c *DataKeyCreate) SetIsCurrent(v bool) *DataKeyCreate
- func (_c *DataKeyCreate) SetKek(v *KEK) *DataKeyCreate
- func (_c *DataKeyCreate) SetKekID(v envelope.ID) *DataKeyCreate
- func (_c *DataKeyCreate) SetKekVersion(v uint32) *DataKeyCreate
- func (_c *DataKeyCreate) SetNillableIsCurrent(v *bool) *DataKeyCreate
- func (_c *DataKeyCreate) SetNillableReserved(v *uint64) *DataKeyCreate
- func (_c *DataKeyCreate) SetNillableSubject(v *string) *DataKeyCreate
- func (_c *DataKeyCreate) SetPurpose(v string) *DataKeyCreate
- func (_c *DataKeyCreate) SetReserved(v uint64) *DataKeyCreate
- func (_c *DataKeyCreate) SetState(v uint8) *DataKeyCreate
- func (_c *DataKeyCreate) SetSubject(v string) *DataKeyCreate
- func (_c *DataKeyCreate) SetWrapped(v []byte) *DataKeyCreate
- func (_c *DataKeyCreate) SetWrappedUnder(v []keyforge.KEKVersionRef) *DataKeyCreate
- type DataKeyCreateBulk
- func (_c *DataKeyCreateBulk) Exec(ctx context.Context) error
- func (c *DataKeyCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (_c *DataKeyCreateBulk) ExecX(ctx context.Context)
- func (_c *DataKeyCreateBulk) OnConflict(opts ...sql.ConflictOption) *DataKeyUpsertBulk
- func (_c *DataKeyCreateBulk) OnConflictColumns(columns ...string) *DataKeyUpsertBulk
- func (c *DataKeyCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (_c *DataKeyCreateBulk) Save(ctx context.Context) ([]*DataKey, error)
- func (_c *DataKeyCreateBulk) SaveX(ctx context.Context) []*DataKey
- type DataKeyDelete
- func (_d *DataKeyDelete) Exec(ctx context.Context) (int, error)
- func (c *DataKeyDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (_d *DataKeyDelete) ExecX(ctx context.Context) int
- func (c *DataKeyDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (_d *DataKeyDelete) Where(ps ...predicate.DataKey) *DataKeyDelete
- type DataKeyDeleteOne
- type DataKeyEdges
- type DataKeyGroupBy
- func (_g *DataKeyGroupBy) Aggregate(fns ...AggregateFunc) *DataKeyGroupBy
- func (s *DataKeyGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *DataKeyGroupBy) BoolX(ctx context.Context) bool
- func (s *DataKeyGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *DataKeyGroupBy) BoolsX(ctx context.Context) []bool
- func (s *DataKeyGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *DataKeyGroupBy) Float64X(ctx context.Context) float64
- func (s *DataKeyGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *DataKeyGroupBy) Float64sX(ctx context.Context) []float64
- func (s *DataKeyGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *DataKeyGroupBy) IntX(ctx context.Context) int
- func (s *DataKeyGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *DataKeyGroupBy) IntsX(ctx context.Context) []int
- func (_g *DataKeyGroupBy) Scan(ctx context.Context, v any) error
- func (s *DataKeyGroupBy) ScanX(ctx context.Context, v any)
- func (s *DataKeyGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *DataKeyGroupBy) StringX(ctx context.Context) string
- func (s *DataKeyGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *DataKeyGroupBy) StringsX(ctx context.Context) []string
- type DataKeyMutation
- func (m *DataKeyMutation) AddAlgorithm(u int8)
- func (m *DataKeyMutation) AddEpoch(u int32)
- func (m *DataKeyMutation) AddField(name string, value ent.Value) error
- func (m *DataKeyMutation) AddKekVersion(u int32)
- func (m *DataKeyMutation) AddReserved(u int64)
- func (m *DataKeyMutation) AddState(u int8)
- func (m *DataKeyMutation) AddedAlgorithm() (r int8, exists bool)
- func (m *DataKeyMutation) AddedEdges() []string
- func (m *DataKeyMutation) AddedEpoch() (r int32, exists bool)
- func (m *DataKeyMutation) AddedField(name string) (ent.Value, bool)
- func (m *DataKeyMutation) AddedFields() []string
- func (m *DataKeyMutation) AddedIDs(name string) []ent.Value
- func (m *DataKeyMutation) AddedKekVersion() (r int32, exists bool)
- func (m *DataKeyMutation) AddedReserved() (r int64, exists bool)
- func (m *DataKeyMutation) AddedState() (r int8, exists bool)
- func (m *DataKeyMutation) Algorithm() (r uint8, exists bool)
- func (m *DataKeyMutation) AppendWrappedUnder(kvr []keyforge.KEKVersionRef)
- func (m *DataKeyMutation) AppendedWrappedUnder() ([]keyforge.KEKVersionRef, bool)
- func (m *DataKeyMutation) ClearEdge(name string) error
- func (m *DataKeyMutation) ClearField(name string) error
- func (m *DataKeyMutation) ClearKek()
- func (m *DataKeyMutation) ClearWrapped()
- func (m *DataKeyMutation) ClearedEdges() []string
- func (m *DataKeyMutation) ClearedFields() []string
- func (m DataKeyMutation) Client() *Client
- func (m *DataKeyMutation) CreatedAt() (r time.Time, exists bool)
- func (m *DataKeyMutation) EdgeCleared(name string) bool
- func (m *DataKeyMutation) Epoch() (r uint32, exists bool)
- func (c *DataKeyMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (m *DataKeyMutation) Field(name string) (ent.Value, bool)
- func (m *DataKeyMutation) FieldCleared(name string) bool
- func (m *DataKeyMutation) Fields() []string
- func (m *DataKeyMutation) ID() (id envelope.ID, exists bool)
- func (m *DataKeyMutation) IDs(ctx context.Context) ([]envelope.ID, error)
- func (m *DataKeyMutation) IsCurrent() (r bool, exists bool)
- func (m *DataKeyMutation) KekCleared() bool
- func (m *DataKeyMutation) KekID() (r envelope.ID, exists bool)
- func (m *DataKeyMutation) KekIDs() (ids []envelope.ID)
- func (m *DataKeyMutation) KekVersion() (r uint32, exists bool)
- func (m *DataKeyMutation) OldAlgorithm(ctx context.Context) (v uint8, err error)
- func (m *DataKeyMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *DataKeyMutation) OldEpoch(ctx context.Context) (v uint32, err error)
- func (m *DataKeyMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *DataKeyMutation) OldIsCurrent(ctx context.Context) (v bool, err error)
- func (m *DataKeyMutation) OldKekID(ctx context.Context) (v envelope.ID, err error)
- func (m *DataKeyMutation) OldKekVersion(ctx context.Context) (v uint32, err error)
- func (m *DataKeyMutation) OldPurpose(ctx context.Context) (v string, err error)
- func (m *DataKeyMutation) OldReserved(ctx context.Context) (v uint64, err error)
- func (m *DataKeyMutation) OldState(ctx context.Context) (v uint8, err error)
- func (m *DataKeyMutation) OldSubject(ctx context.Context) (v string, err error)
- func (m *DataKeyMutation) OldWrapped(ctx context.Context) (v []byte, err error)
- func (m *DataKeyMutation) OldWrappedUnder(ctx context.Context) (v []keyforge.KEKVersionRef, err error)
- func (m *DataKeyMutation) Op() Op
- func (m *DataKeyMutation) Purpose() (r string, exists bool)
- func (c *DataKeyMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (m *DataKeyMutation) RemovedEdges() []string
- func (m *DataKeyMutation) RemovedIDs(name string) []ent.Value
- func (m *DataKeyMutation) Reserved() (r uint64, exists bool)
- func (m *DataKeyMutation) ResetAlgorithm()
- func (m *DataKeyMutation) ResetCreatedAt()
- func (m *DataKeyMutation) ResetEdge(name string) error
- func (m *DataKeyMutation) ResetEpoch()
- func (m *DataKeyMutation) ResetField(name string) error
- func (m *DataKeyMutation) ResetIsCurrent()
- func (m *DataKeyMutation) ResetKek()
- func (m *DataKeyMutation) ResetKekID()
- func (m *DataKeyMutation) ResetKekVersion()
- func (m *DataKeyMutation) ResetPurpose()
- func (m *DataKeyMutation) ResetReserved()
- func (m *DataKeyMutation) ResetState()
- func (m *DataKeyMutation) ResetSubject()
- func (m *DataKeyMutation) ResetWrapped()
- func (m *DataKeyMutation) ResetWrappedUnder()
- func (m *DataKeyMutation) SetAlgorithm(u uint8)
- func (m *DataKeyMutation) SetCreatedAt(t time.Time)
- func (m *DataKeyMutation) SetEpoch(u uint32)
- func (m *DataKeyMutation) SetField(name string, value ent.Value) error
- func (m *DataKeyMutation) SetID(id envelope.ID)
- func (m *DataKeyMutation) SetIsCurrent(b bool)
- func (m *DataKeyMutation) SetKekID(e envelope.ID)
- func (m *DataKeyMutation) SetKekVersion(u uint32)
- func (m *DataKeyMutation) SetOp(op Op)
- func (m *DataKeyMutation) SetPurpose(s string)
- func (m *DataKeyMutation) SetReserved(u uint64)
- func (m *DataKeyMutation) SetState(u uint8)
- func (m *DataKeyMutation) SetSubject(s string)
- func (m *DataKeyMutation) SetWrapped(b []byte)
- func (m *DataKeyMutation) SetWrappedUnder(kvr []keyforge.KEKVersionRef)
- func (m *DataKeyMutation) State() (r uint8, exists bool)
- func (m *DataKeyMutation) Subject() (r string, exists bool)
- func (m DataKeyMutation) Tx() (*Tx, error)
- func (m *DataKeyMutation) Type() string
- func (m *DataKeyMutation) Where(ps ...predicate.DataKey)
- func (m *DataKeyMutation) WhereP(ps ...func(*sql.Selector))
- func (m *DataKeyMutation) Wrapped() (r []byte, exists bool)
- func (m *DataKeyMutation) WrappedCleared() bool
- func (m *DataKeyMutation) WrappedUnder() (r []keyforge.KEKVersionRef, exists bool)
- type DataKeyQuery
- func (_q *DataKeyQuery) Aggregate(fns ...AggregateFunc) *DataKeySelect
- func (_q *DataKeyQuery) All(ctx context.Context) ([]*DataKey, error)
- func (_q *DataKeyQuery) AllX(ctx context.Context) []*DataKey
- func (_q *DataKeyQuery) Clone() *DataKeyQuery
- func (_q *DataKeyQuery) Count(ctx context.Context) (int, error)
- func (_q *DataKeyQuery) CountX(ctx context.Context) int
- func (c *DataKeyQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (_q *DataKeyQuery) Exist(ctx context.Context) (bool, error)
- func (_q *DataKeyQuery) ExistX(ctx context.Context) bool
- func (_q *DataKeyQuery) First(ctx context.Context) (*DataKey, error)
- func (_q *DataKeyQuery) FirstID(ctx context.Context) (id envelope.ID, err error)
- func (_q *DataKeyQuery) FirstIDX(ctx context.Context) envelope.ID
- func (_q *DataKeyQuery) FirstX(ctx context.Context) *DataKey
- func (_q *DataKeyQuery) ForShare(opts ...sql.LockOption) *DataKeyQuery
- func (_q *DataKeyQuery) ForUpdate(opts ...sql.LockOption) *DataKeyQuery
- func (_q *DataKeyQuery) GroupBy(field string, fields ...string) *DataKeyGroupBy
- func (_q *DataKeyQuery) IDs(ctx context.Context) (ids []envelope.ID, err error)
- func (_q *DataKeyQuery) IDsX(ctx context.Context) []envelope.ID
- func (_q *DataKeyQuery) Limit(limit int) *DataKeyQuery
- func (_q *DataKeyQuery) Offset(offset int) *DataKeyQuery
- func (_q *DataKeyQuery) Only(ctx context.Context) (*DataKey, error)
- func (_q *DataKeyQuery) OnlyID(ctx context.Context) (id envelope.ID, err error)
- func (_q *DataKeyQuery) OnlyIDX(ctx context.Context) envelope.ID
- func (_q *DataKeyQuery) OnlyX(ctx context.Context) *DataKey
- func (_q *DataKeyQuery) Order(o ...datakey.OrderOption) *DataKeyQuery
- func (c *DataKeyQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (_q *DataKeyQuery) QueryKek() *KEKQuery
- func (_q *DataKeyQuery) Select(fields ...string) *DataKeySelect
- func (_q *DataKeyQuery) Unique(unique bool) *DataKeyQuery
- func (_q *DataKeyQuery) Where(ps ...predicate.DataKey) *DataKeyQuery
- func (_q *DataKeyQuery) WithKek(opts ...func(*KEKQuery)) *DataKeyQuery
- type DataKeySelect
- func (_s *DataKeySelect) Aggregate(fns ...AggregateFunc) *DataKeySelect
- func (s *DataKeySelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *DataKeySelect) BoolX(ctx context.Context) bool
- func (s *DataKeySelect) Bools(ctx context.Context) ([]bool, error)
- func (s *DataKeySelect) BoolsX(ctx context.Context) []bool
- func (c DataKeySelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (s *DataKeySelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *DataKeySelect) Float64X(ctx context.Context) float64
- func (s *DataKeySelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *DataKeySelect) Float64sX(ctx context.Context) []float64
- func (s *DataKeySelect) Int(ctx context.Context) (_ int, err error)
- func (s *DataKeySelect) IntX(ctx context.Context) int
- func (s *DataKeySelect) Ints(ctx context.Context) ([]int, error)
- func (s *DataKeySelect) IntsX(ctx context.Context) []int
- func (c DataKeySelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (_s *DataKeySelect) Scan(ctx context.Context, v any) error
- func (s *DataKeySelect) ScanX(ctx context.Context, v any)
- func (s *DataKeySelect) String(ctx context.Context) (_ string, err error)
- func (s *DataKeySelect) StringX(ctx context.Context) string
- func (s *DataKeySelect) Strings(ctx context.Context) ([]string, error)
- func (s *DataKeySelect) StringsX(ctx context.Context) []string
- type DataKeyUpdate
- func (_u *DataKeyUpdate) AddAlgorithm(v int8) *DataKeyUpdate
- func (_u *DataKeyUpdate) AddEpoch(v int32) *DataKeyUpdate
- func (_u *DataKeyUpdate) AddKekVersion(v int32) *DataKeyUpdate
- func (_u *DataKeyUpdate) AddReserved(v int64) *DataKeyUpdate
- func (_u *DataKeyUpdate) AddState(v int8) *DataKeyUpdate
- func (_u *DataKeyUpdate) AppendWrappedUnder(v []keyforge.KEKVersionRef) *DataKeyUpdate
- func (_u *DataKeyUpdate) ClearKek() *DataKeyUpdate
- func (_u *DataKeyUpdate) ClearWrapped() *DataKeyUpdate
- func (_u *DataKeyUpdate) Exec(ctx context.Context) error
- func (c *DataKeyUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (_u *DataKeyUpdate) ExecX(ctx context.Context)
- func (_u *DataKeyUpdate) Mutation() *DataKeyMutation
- func (c *DataKeyUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (_u *DataKeyUpdate) Save(ctx context.Context) (int, error)
- func (_u *DataKeyUpdate) SaveX(ctx context.Context) int
- func (_u *DataKeyUpdate) SetAlgorithm(v uint8) *DataKeyUpdate
- func (_u *DataKeyUpdate) SetCreatedAt(v time.Time) *DataKeyUpdate
- func (_u *DataKeyUpdate) SetEpoch(v uint32) *DataKeyUpdate
- func (_u *DataKeyUpdate) SetIsCurrent(v bool) *DataKeyUpdate
- func (_u *DataKeyUpdate) SetKek(v *KEK) *DataKeyUpdate
- func (_u *DataKeyUpdate) SetKekID(v envelope.ID) *DataKeyUpdate
- func (_u *DataKeyUpdate) SetKekVersion(v uint32) *DataKeyUpdate
- func (_u *DataKeyUpdate) SetNillableAlgorithm(v *uint8) *DataKeyUpdate
- func (_u *DataKeyUpdate) SetNillableCreatedAt(v *time.Time) *DataKeyUpdate
- func (_u *DataKeyUpdate) SetNillableEpoch(v *uint32) *DataKeyUpdate
- func (_u *DataKeyUpdate) SetNillableIsCurrent(v *bool) *DataKeyUpdate
- func (_u *DataKeyUpdate) SetNillableKekID(v *envelope.ID) *DataKeyUpdate
- func (_u *DataKeyUpdate) SetNillableKekVersion(v *uint32) *DataKeyUpdate
- func (_u *DataKeyUpdate) SetNillablePurpose(v *string) *DataKeyUpdate
- func (_u *DataKeyUpdate) SetNillableReserved(v *uint64) *DataKeyUpdate
- func (_u *DataKeyUpdate) SetNillableState(v *uint8) *DataKeyUpdate
- func (_u *DataKeyUpdate) SetNillableSubject(v *string) *DataKeyUpdate
- func (_u *DataKeyUpdate) SetPurpose(v string) *DataKeyUpdate
- func (_u *DataKeyUpdate) SetReserved(v uint64) *DataKeyUpdate
- func (_u *DataKeyUpdate) SetState(v uint8) *DataKeyUpdate
- func (_u *DataKeyUpdate) SetSubject(v string) *DataKeyUpdate
- func (_u *DataKeyUpdate) SetWrapped(v []byte) *DataKeyUpdate
- func (_u *DataKeyUpdate) SetWrappedUnder(v []keyforge.KEKVersionRef) *DataKeyUpdate
- func (_u *DataKeyUpdate) Where(ps ...predicate.DataKey) *DataKeyUpdate
- type DataKeyUpdateOne
- func (_u *DataKeyUpdateOne) AddAlgorithm(v int8) *DataKeyUpdateOne
- func (_u *DataKeyUpdateOne) AddEpoch(v int32) *DataKeyUpdateOne
- func (_u *DataKeyUpdateOne) AddKekVersion(v int32) *DataKeyUpdateOne
- func (_u *DataKeyUpdateOne) AddReserved(v int64) *DataKeyUpdateOne
- func (_u *DataKeyUpdateOne) AddState(v int8) *DataKeyUpdateOne
- func (_u *DataKeyUpdateOne) AppendWrappedUnder(v []keyforge.KEKVersionRef) *DataKeyUpdateOne
- func (_u *DataKeyUpdateOne) ClearKek() *DataKeyUpdateOne
- func (_u *DataKeyUpdateOne) ClearWrapped() *DataKeyUpdateOne
- func (_u *DataKeyUpdateOne) Exec(ctx context.Context) error
- func (c *DataKeyUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (_u *DataKeyUpdateOne) ExecX(ctx context.Context)
- func (_u *DataKeyUpdateOne) Mutation() *DataKeyMutation
- func (c *DataKeyUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (_u *DataKeyUpdateOne) Save(ctx context.Context) (*DataKey, error)
- func (_u *DataKeyUpdateOne) SaveX(ctx context.Context) *DataKey
- func (_u *DataKeyUpdateOne) Select(field string, fields ...string) *DataKeyUpdateOne
- func (_u *DataKeyUpdateOne) SetAlgorithm(v uint8) *DataKeyUpdateOne
- func (_u *DataKeyUpdateOne) SetCreatedAt(v time.Time) *DataKeyUpdateOne
- func (_u *DataKeyUpdateOne) SetEpoch(v uint32) *DataKeyUpdateOne
- func (_u *DataKeyUpdateOne) SetIsCurrent(v bool) *DataKeyUpdateOne
- func (_u *DataKeyUpdateOne) SetKek(v *KEK) *DataKeyUpdateOne
- func (_u *DataKeyUpdateOne) SetKekID(v envelope.ID) *DataKeyUpdateOne
- func (_u *DataKeyUpdateOne) SetKekVersion(v uint32) *DataKeyUpdateOne
- func (_u *DataKeyUpdateOne) SetNillableAlgorithm(v *uint8) *DataKeyUpdateOne
- func (_u *DataKeyUpdateOne) SetNillableCreatedAt(v *time.Time) *DataKeyUpdateOne
- func (_u *DataKeyUpdateOne) SetNillableEpoch(v *uint32) *DataKeyUpdateOne
- func (_u *DataKeyUpdateOne) SetNillableIsCurrent(v *bool) *DataKeyUpdateOne
- func (_u *DataKeyUpdateOne) SetNillableKekID(v *envelope.ID) *DataKeyUpdateOne
- func (_u *DataKeyUpdateOne) SetNillableKekVersion(v *uint32) *DataKeyUpdateOne
- func (_u *DataKeyUpdateOne) SetNillablePurpose(v *string) *DataKeyUpdateOne
- func (_u *DataKeyUpdateOne) SetNillableReserved(v *uint64) *DataKeyUpdateOne
- func (_u *DataKeyUpdateOne) SetNillableState(v *uint8) *DataKeyUpdateOne
- func (_u *DataKeyUpdateOne) SetNillableSubject(v *string) *DataKeyUpdateOne
- func (_u *DataKeyUpdateOne) SetPurpose(v string) *DataKeyUpdateOne
- func (_u *DataKeyUpdateOne) SetReserved(v uint64) *DataKeyUpdateOne
- func (_u *DataKeyUpdateOne) SetState(v uint8) *DataKeyUpdateOne
- func (_u *DataKeyUpdateOne) SetSubject(v string) *DataKeyUpdateOne
- func (_u *DataKeyUpdateOne) SetWrapped(v []byte) *DataKeyUpdateOne
- func (_u *DataKeyUpdateOne) SetWrappedUnder(v []keyforge.KEKVersionRef) *DataKeyUpdateOne
- func (_u *DataKeyUpdateOne) Where(ps ...predicate.DataKey) *DataKeyUpdateOne
- type DataKeyUpsert
- func (u *DataKeyUpsert) AddAlgorithm(v uint8) *DataKeyUpsert
- func (u *DataKeyUpsert) AddEpoch(v uint32) *DataKeyUpsert
- func (u *DataKeyUpsert) AddKekVersion(v uint32) *DataKeyUpsert
- func (u *DataKeyUpsert) AddReserved(v uint64) *DataKeyUpsert
- func (u *DataKeyUpsert) AddState(v uint8) *DataKeyUpsert
- func (u *DataKeyUpsert) ClearWrapped() *DataKeyUpsert
- func (u *DataKeyUpsert) SetAlgorithm(v uint8) *DataKeyUpsert
- func (u *DataKeyUpsert) SetCreatedAt(v time.Time) *DataKeyUpsert
- func (u *DataKeyUpsert) SetEpoch(v uint32) *DataKeyUpsert
- func (u *DataKeyUpsert) SetIsCurrent(v bool) *DataKeyUpsert
- func (u *DataKeyUpsert) SetKekID(v envelope.ID) *DataKeyUpsert
- func (u *DataKeyUpsert) SetKekVersion(v uint32) *DataKeyUpsert
- func (u *DataKeyUpsert) SetPurpose(v string) *DataKeyUpsert
- func (u *DataKeyUpsert) SetReserved(v uint64) *DataKeyUpsert
- func (u *DataKeyUpsert) SetState(v uint8) *DataKeyUpsert
- func (u *DataKeyUpsert) SetSubject(v string) *DataKeyUpsert
- func (u *DataKeyUpsert) SetWrapped(v []byte) *DataKeyUpsert
- func (u *DataKeyUpsert) SetWrappedUnder(v []keyforge.KEKVersionRef) *DataKeyUpsert
- func (u *DataKeyUpsert) UpdateAlgorithm() *DataKeyUpsert
- func (u *DataKeyUpsert) UpdateCreatedAt() *DataKeyUpsert
- func (u *DataKeyUpsert) UpdateEpoch() *DataKeyUpsert
- func (u *DataKeyUpsert) UpdateIsCurrent() *DataKeyUpsert
- func (u *DataKeyUpsert) UpdateKekID() *DataKeyUpsert
- func (u *DataKeyUpsert) UpdateKekVersion() *DataKeyUpsert
- func (u *DataKeyUpsert) UpdatePurpose() *DataKeyUpsert
- func (u *DataKeyUpsert) UpdateReserved() *DataKeyUpsert
- func (u *DataKeyUpsert) UpdateState() *DataKeyUpsert
- func (u *DataKeyUpsert) UpdateSubject() *DataKeyUpsert
- func (u *DataKeyUpsert) UpdateWrapped() *DataKeyUpsert
- func (u *DataKeyUpsert) UpdateWrappedUnder() *DataKeyUpsert
- type DataKeyUpsertBulk
- func (u *DataKeyUpsertBulk) AddAlgorithm(v uint8) *DataKeyUpsertBulk
- func (u *DataKeyUpsertBulk) AddEpoch(v uint32) *DataKeyUpsertBulk
- func (u *DataKeyUpsertBulk) AddKekVersion(v uint32) *DataKeyUpsertBulk
- func (u *DataKeyUpsertBulk) AddReserved(v uint64) *DataKeyUpsertBulk
- func (u *DataKeyUpsertBulk) AddState(v uint8) *DataKeyUpsertBulk
- func (u *DataKeyUpsertBulk) ClearWrapped() *DataKeyUpsertBulk
- func (u *DataKeyUpsertBulk) DoNothing() *DataKeyUpsertBulk
- func (u *DataKeyUpsertBulk) Exec(ctx context.Context) error
- func (u *DataKeyUpsertBulk) ExecX(ctx context.Context)
- func (u *DataKeyUpsertBulk) Ignore() *DataKeyUpsertBulk
- func (u *DataKeyUpsertBulk) SetAlgorithm(v uint8) *DataKeyUpsertBulk
- func (u *DataKeyUpsertBulk) SetCreatedAt(v time.Time) *DataKeyUpsertBulk
- func (u *DataKeyUpsertBulk) SetEpoch(v uint32) *DataKeyUpsertBulk
- func (u *DataKeyUpsertBulk) SetIsCurrent(v bool) *DataKeyUpsertBulk
- func (u *DataKeyUpsertBulk) SetKekID(v envelope.ID) *DataKeyUpsertBulk
- func (u *DataKeyUpsertBulk) SetKekVersion(v uint32) *DataKeyUpsertBulk
- func (u *DataKeyUpsertBulk) SetPurpose(v string) *DataKeyUpsertBulk
- func (u *DataKeyUpsertBulk) SetReserved(v uint64) *DataKeyUpsertBulk
- func (u *DataKeyUpsertBulk) SetState(v uint8) *DataKeyUpsertBulk
- func (u *DataKeyUpsertBulk) SetSubject(v string) *DataKeyUpsertBulk
- func (u *DataKeyUpsertBulk) SetWrapped(v []byte) *DataKeyUpsertBulk
- func (u *DataKeyUpsertBulk) SetWrappedUnder(v []keyforge.KEKVersionRef) *DataKeyUpsertBulk
- func (u *DataKeyUpsertBulk) Update(set func(*DataKeyUpsert)) *DataKeyUpsertBulk
- func (u *DataKeyUpsertBulk) UpdateAlgorithm() *DataKeyUpsertBulk
- func (u *DataKeyUpsertBulk) UpdateCreatedAt() *DataKeyUpsertBulk
- func (u *DataKeyUpsertBulk) UpdateEpoch() *DataKeyUpsertBulk
- func (u *DataKeyUpsertBulk) UpdateIsCurrent() *DataKeyUpsertBulk
- func (u *DataKeyUpsertBulk) UpdateKekID() *DataKeyUpsertBulk
- func (u *DataKeyUpsertBulk) UpdateKekVersion() *DataKeyUpsertBulk
- func (u *DataKeyUpsertBulk) UpdateNewValues() *DataKeyUpsertBulk
- func (u *DataKeyUpsertBulk) UpdatePurpose() *DataKeyUpsertBulk
- func (u *DataKeyUpsertBulk) UpdateReserved() *DataKeyUpsertBulk
- func (u *DataKeyUpsertBulk) UpdateState() *DataKeyUpsertBulk
- func (u *DataKeyUpsertBulk) UpdateSubject() *DataKeyUpsertBulk
- func (u *DataKeyUpsertBulk) UpdateWrapped() *DataKeyUpsertBulk
- func (u *DataKeyUpsertBulk) UpdateWrappedUnder() *DataKeyUpsertBulk
- type DataKeyUpsertOne
- func (u *DataKeyUpsertOne) AddAlgorithm(v uint8) *DataKeyUpsertOne
- func (u *DataKeyUpsertOne) AddEpoch(v uint32) *DataKeyUpsertOne
- func (u *DataKeyUpsertOne) AddKekVersion(v uint32) *DataKeyUpsertOne
- func (u *DataKeyUpsertOne) AddReserved(v uint64) *DataKeyUpsertOne
- func (u *DataKeyUpsertOne) AddState(v uint8) *DataKeyUpsertOne
- func (u *DataKeyUpsertOne) ClearWrapped() *DataKeyUpsertOne
- func (u *DataKeyUpsertOne) DoNothing() *DataKeyUpsertOne
- func (u *DataKeyUpsertOne) Exec(ctx context.Context) error
- func (u *DataKeyUpsertOne) ExecX(ctx context.Context)
- func (u *DataKeyUpsertOne) ID(ctx context.Context) (id envelope.ID, err error)
- func (u *DataKeyUpsertOne) IDX(ctx context.Context) envelope.ID
- func (u *DataKeyUpsertOne) Ignore() *DataKeyUpsertOne
- func (u *DataKeyUpsertOne) SetAlgorithm(v uint8) *DataKeyUpsertOne
- func (u *DataKeyUpsertOne) SetCreatedAt(v time.Time) *DataKeyUpsertOne
- func (u *DataKeyUpsertOne) SetEpoch(v uint32) *DataKeyUpsertOne
- func (u *DataKeyUpsertOne) SetIsCurrent(v bool) *DataKeyUpsertOne
- func (u *DataKeyUpsertOne) SetKekID(v envelope.ID) *DataKeyUpsertOne
- func (u *DataKeyUpsertOne) SetKekVersion(v uint32) *DataKeyUpsertOne
- func (u *DataKeyUpsertOne) SetPurpose(v string) *DataKeyUpsertOne
- func (u *DataKeyUpsertOne) SetReserved(v uint64) *DataKeyUpsertOne
- func (u *DataKeyUpsertOne) SetState(v uint8) *DataKeyUpsertOne
- func (u *DataKeyUpsertOne) SetSubject(v string) *DataKeyUpsertOne
- func (u *DataKeyUpsertOne) SetWrapped(v []byte) *DataKeyUpsertOne
- func (u *DataKeyUpsertOne) SetWrappedUnder(v []keyforge.KEKVersionRef) *DataKeyUpsertOne
- func (u *DataKeyUpsertOne) Update(set func(*DataKeyUpsert)) *DataKeyUpsertOne
- func (u *DataKeyUpsertOne) UpdateAlgorithm() *DataKeyUpsertOne
- func (u *DataKeyUpsertOne) UpdateCreatedAt() *DataKeyUpsertOne
- func (u *DataKeyUpsertOne) UpdateEpoch() *DataKeyUpsertOne
- func (u *DataKeyUpsertOne) UpdateIsCurrent() *DataKeyUpsertOne
- func (u *DataKeyUpsertOne) UpdateKekID() *DataKeyUpsertOne
- func (u *DataKeyUpsertOne) UpdateKekVersion() *DataKeyUpsertOne
- func (u *DataKeyUpsertOne) UpdateNewValues() *DataKeyUpsertOne
- func (u *DataKeyUpsertOne) UpdatePurpose() *DataKeyUpsertOne
- func (u *DataKeyUpsertOne) UpdateReserved() *DataKeyUpsertOne
- func (u *DataKeyUpsertOne) UpdateState() *DataKeyUpsertOne
- func (u *DataKeyUpsertOne) UpdateSubject() *DataKeyUpsertOne
- func (u *DataKeyUpsertOne) UpdateWrapped() *DataKeyUpsertOne
- func (u *DataKeyUpsertOne) UpdateWrappedUnder() *DataKeyUpsertOne
- type DataKeys
- type Hook
- type InterceptFunc
- type Interceptor
- type KEK
- func (c *KEK) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (c *KEK) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (_m *KEK) QueryDataKeys() *DataKeyQuery
- func (_m *KEK) QuerySentinels() *SentinelQuery
- func (_m *KEK) QueryVersions() *KEKVersionQuery
- func (_m *KEK) String() string
- func (_m *KEK) Unwrap() *KEK
- func (_m *KEK) Update() *KEKUpdateOne
- func (_m *KEK) Value(name string) (ent.Value, error)
- type KEKClient
- func (c *KEKClient) Create() *KEKCreate
- func (c *KEKClient) CreateBulk(builders ...*KEKCreate) *KEKCreateBulk
- func (c *KEKClient) Delete() *KEKDelete
- func (c *KEKClient) DeleteOne(_m *KEK) *KEKDeleteOne
- func (c *KEKClient) DeleteOneID(id envelope.ID) *KEKDeleteOne
- func (c *KEKClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (c *KEKClient) Get(ctx context.Context, id envelope.ID) (*KEK, error)
- func (c *KEKClient) GetX(ctx context.Context, id envelope.ID) *KEK
- func (c *KEKClient) Hooks() []Hook
- func (c *KEKClient) Intercept(interceptors ...Interceptor)
- func (c *KEKClient) Interceptors() []Interceptor
- func (c *KEKClient) MapCreateBulk(slice any, setFunc func(*KEKCreate, int)) *KEKCreateBulk
- func (c *KEKClient) Query() *KEKQuery
- func (c *KEKClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (c *KEKClient) QueryDataKeys(_m *KEK) *DataKeyQuery
- func (c *KEKClient) QuerySentinels(_m *KEK) *SentinelQuery
- func (c *KEKClient) QueryVersions(_m *KEK) *KEKVersionQuery
- func (c *KEKClient) Update() *KEKUpdate
- func (c *KEKClient) UpdateOne(_m *KEK) *KEKUpdateOne
- func (c *KEKClient) UpdateOneID(id envelope.ID) *KEKUpdateOne
- func (c *KEKClient) Use(hooks ...Hook)
- type KEKCreate
- func (_c *KEKCreate) AddDataKeyIDs(ids ...envelope.ID) *KEKCreate
- func (_c *KEKCreate) AddDataKeys(v ...*DataKey) *KEKCreate
- func (_c *KEKCreate) AddSentinelIDs(ids ...int) *KEKCreate
- func (_c *KEKCreate) AddSentinels(v ...*Sentinel) *KEKCreate
- func (_c *KEKCreate) AddVersionIDs(ids ...int) *KEKCreate
- func (_c *KEKCreate) AddVersions(v ...*KEKVersion) *KEKCreate
- func (_c *KEKCreate) Exec(ctx context.Context) error
- func (c *KEKCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (_c *KEKCreate) ExecX(ctx context.Context)
- func (_c *KEKCreate) Mutation() *KEKMutation
- func (_c *KEKCreate) OnConflict(opts ...sql.ConflictOption) *KEKUpsertOne
- func (_c *KEKCreate) OnConflictColumns(columns ...string) *KEKUpsertOne
- func (c *KEKCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (_c *KEKCreate) Save(ctx context.Context) (*KEK, error)
- func (_c *KEKCreate) SaveX(ctx context.Context) *KEK
- func (_c *KEKCreate) SetCreatedAt(v time.Time) *KEKCreate
- func (_c *KEKCreate) SetID(v envelope.ID) *KEKCreate
- func (_c *KEKCreate) SetProvider(v string) *KEKCreate
- func (_c *KEKCreate) SetProviderRef(v string) *KEKCreate
- func (_c *KEKCreate) SetPurpose(v string) *KEKCreate
- func (_c *KEKCreate) SetState(v uint8) *KEKCreate
- type KEKCreateBulk
- func (_c *KEKCreateBulk) Exec(ctx context.Context) error
- func (c *KEKCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (_c *KEKCreateBulk) ExecX(ctx context.Context)
- func (_c *KEKCreateBulk) OnConflict(opts ...sql.ConflictOption) *KEKUpsertBulk
- func (_c *KEKCreateBulk) OnConflictColumns(columns ...string) *KEKUpsertBulk
- func (c *KEKCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (_c *KEKCreateBulk) Save(ctx context.Context) ([]*KEK, error)
- func (_c *KEKCreateBulk) SaveX(ctx context.Context) []*KEK
- type KEKDelete
- func (_d *KEKDelete) Exec(ctx context.Context) (int, error)
- func (c *KEKDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (_d *KEKDelete) ExecX(ctx context.Context) int
- func (c *KEKDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (_d *KEKDelete) Where(ps ...predicate.KEK) *KEKDelete
- type KEKDeleteOne
- type KEKEdges
- type KEKGroupBy
- func (_g *KEKGroupBy) Aggregate(fns ...AggregateFunc) *KEKGroupBy
- func (s *KEKGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *KEKGroupBy) BoolX(ctx context.Context) bool
- func (s *KEKGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *KEKGroupBy) BoolsX(ctx context.Context) []bool
- func (s *KEKGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *KEKGroupBy) Float64X(ctx context.Context) float64
- func (s *KEKGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *KEKGroupBy) Float64sX(ctx context.Context) []float64
- func (s *KEKGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *KEKGroupBy) IntX(ctx context.Context) int
- func (s *KEKGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *KEKGroupBy) IntsX(ctx context.Context) []int
- func (_g *KEKGroupBy) Scan(ctx context.Context, v any) error
- func (s *KEKGroupBy) ScanX(ctx context.Context, v any)
- func (s *KEKGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *KEKGroupBy) StringX(ctx context.Context) string
- func (s *KEKGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *KEKGroupBy) StringsX(ctx context.Context) []string
- type KEKMutation
- func (m *KEKMutation) AddDataKeyIDs(ids ...envelope.ID)
- func (m *KEKMutation) AddField(name string, value ent.Value) error
- func (m *KEKMutation) AddSentinelIDs(ids ...int)
- func (m *KEKMutation) AddState(u int8)
- func (m *KEKMutation) AddVersionIDs(ids ...int)
- func (m *KEKMutation) AddedEdges() []string
- func (m *KEKMutation) AddedField(name string) (ent.Value, bool)
- func (m *KEKMutation) AddedFields() []string
- func (m *KEKMutation) AddedIDs(name string) []ent.Value
- func (m *KEKMutation) AddedState() (r int8, exists bool)
- func (m *KEKMutation) ClearDataKeys()
- func (m *KEKMutation) ClearEdge(name string) error
- func (m *KEKMutation) ClearField(name string) error
- func (m *KEKMutation) ClearSentinels()
- func (m *KEKMutation) ClearVersions()
- func (m *KEKMutation) ClearedEdges() []string
- func (m *KEKMutation) ClearedFields() []string
- func (m KEKMutation) Client() *Client
- func (m *KEKMutation) CreatedAt() (r time.Time, exists bool)
- func (m *KEKMutation) DataKeysCleared() bool
- func (m *KEKMutation) DataKeysIDs() (ids []envelope.ID)
- func (m *KEKMutation) EdgeCleared(name string) bool
- func (c *KEKMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (m *KEKMutation) Field(name string) (ent.Value, bool)
- func (m *KEKMutation) FieldCleared(name string) bool
- func (m *KEKMutation) Fields() []string
- func (m *KEKMutation) ID() (id envelope.ID, exists bool)
- func (m *KEKMutation) IDs(ctx context.Context) ([]envelope.ID, error)
- func (m *KEKMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *KEKMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *KEKMutation) OldProvider(ctx context.Context) (v string, err error)
- func (m *KEKMutation) OldProviderRef(ctx context.Context) (v string, err error)
- func (m *KEKMutation) OldPurpose(ctx context.Context) (v string, err error)
- func (m *KEKMutation) OldState(ctx context.Context) (v uint8, err error)
- func (m *KEKMutation) Op() Op
- func (m *KEKMutation) Provider() (r string, exists bool)
- func (m *KEKMutation) ProviderRef() (r string, exists bool)
- func (m *KEKMutation) Purpose() (r string, exists bool)
- func (c *KEKMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (m *KEKMutation) RemoveDataKeyIDs(ids ...envelope.ID)
- func (m *KEKMutation) RemoveSentinelIDs(ids ...int)
- func (m *KEKMutation) RemoveVersionIDs(ids ...int)
- func (m *KEKMutation) RemovedDataKeysIDs() (ids []envelope.ID)
- func (m *KEKMutation) RemovedEdges() []string
- func (m *KEKMutation) RemovedIDs(name string) []ent.Value
- func (m *KEKMutation) RemovedSentinelsIDs() (ids []int)
- func (m *KEKMutation) RemovedVersionsIDs() (ids []int)
- func (m *KEKMutation) ResetCreatedAt()
- func (m *KEKMutation) ResetDataKeys()
- func (m *KEKMutation) ResetEdge(name string) error
- func (m *KEKMutation) ResetField(name string) error
- func (m *KEKMutation) ResetProvider()
- func (m *KEKMutation) ResetProviderRef()
- func (m *KEKMutation) ResetPurpose()
- func (m *KEKMutation) ResetSentinels()
- func (m *KEKMutation) ResetState()
- func (m *KEKMutation) ResetVersions()
- func (m *KEKMutation) SentinelsCleared() bool
- func (m *KEKMutation) SentinelsIDs() (ids []int)
- func (m *KEKMutation) SetCreatedAt(t time.Time)
- func (m *KEKMutation) SetField(name string, value ent.Value) error
- func (m *KEKMutation) SetID(id envelope.ID)
- func (m *KEKMutation) SetOp(op Op)
- func (m *KEKMutation) SetProvider(s string)
- func (m *KEKMutation) SetProviderRef(s string)
- func (m *KEKMutation) SetPurpose(s string)
- func (m *KEKMutation) SetState(u uint8)
- func (m *KEKMutation) State() (r uint8, exists bool)
- func (m KEKMutation) Tx() (*Tx, error)
- func (m *KEKMutation) Type() string
- func (m *KEKMutation) VersionsCleared() bool
- func (m *KEKMutation) VersionsIDs() (ids []int)
- func (m *KEKMutation) Where(ps ...predicate.KEK)
- func (m *KEKMutation) WhereP(ps ...func(*sql.Selector))
- type KEKQuery
- func (_q *KEKQuery) Aggregate(fns ...AggregateFunc) *KEKSelect
- func (_q *KEKQuery) All(ctx context.Context) ([]*KEK, error)
- func (_q *KEKQuery) AllX(ctx context.Context) []*KEK
- func (_q *KEKQuery) Clone() *KEKQuery
- func (_q *KEKQuery) Count(ctx context.Context) (int, error)
- func (_q *KEKQuery) CountX(ctx context.Context) int
- func (c *KEKQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (_q *KEKQuery) Exist(ctx context.Context) (bool, error)
- func (_q *KEKQuery) ExistX(ctx context.Context) bool
- func (_q *KEKQuery) First(ctx context.Context) (*KEK, error)
- func (_q *KEKQuery) FirstID(ctx context.Context) (id envelope.ID, err error)
- func (_q *KEKQuery) FirstIDX(ctx context.Context) envelope.ID
- func (_q *KEKQuery) FirstX(ctx context.Context) *KEK
- func (_q *KEKQuery) ForShare(opts ...sql.LockOption) *KEKQuery
- func (_q *KEKQuery) ForUpdate(opts ...sql.LockOption) *KEKQuery
- func (_q *KEKQuery) GroupBy(field string, fields ...string) *KEKGroupBy
- func (_q *KEKQuery) IDs(ctx context.Context) (ids []envelope.ID, err error)
- func (_q *KEKQuery) IDsX(ctx context.Context) []envelope.ID
- func (_q *KEKQuery) Limit(limit int) *KEKQuery
- func (_q *KEKQuery) Offset(offset int) *KEKQuery
- func (_q *KEKQuery) Only(ctx context.Context) (*KEK, error)
- func (_q *KEKQuery) OnlyID(ctx context.Context) (id envelope.ID, err error)
- func (_q *KEKQuery) OnlyIDX(ctx context.Context) envelope.ID
- func (_q *KEKQuery) OnlyX(ctx context.Context) *KEK
- func (_q *KEKQuery) Order(o ...kek.OrderOption) *KEKQuery
- func (c *KEKQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (_q *KEKQuery) QueryDataKeys() *DataKeyQuery
- func (_q *KEKQuery) QuerySentinels() *SentinelQuery
- func (_q *KEKQuery) QueryVersions() *KEKVersionQuery
- func (_q *KEKQuery) Select(fields ...string) *KEKSelect
- func (_q *KEKQuery) Unique(unique bool) *KEKQuery
- func (_q *KEKQuery) Where(ps ...predicate.KEK) *KEKQuery
- func (_q *KEKQuery) WithDataKeys(opts ...func(*DataKeyQuery)) *KEKQuery
- func (_q *KEKQuery) WithSentinels(opts ...func(*SentinelQuery)) *KEKQuery
- func (_q *KEKQuery) WithVersions(opts ...func(*KEKVersionQuery)) *KEKQuery
- type KEKSelect
- func (_s *KEKSelect) Aggregate(fns ...AggregateFunc) *KEKSelect
- func (s *KEKSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *KEKSelect) BoolX(ctx context.Context) bool
- func (s *KEKSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *KEKSelect) BoolsX(ctx context.Context) []bool
- func (c KEKSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (s *KEKSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *KEKSelect) Float64X(ctx context.Context) float64
- func (s *KEKSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *KEKSelect) Float64sX(ctx context.Context) []float64
- func (s *KEKSelect) Int(ctx context.Context) (_ int, err error)
- func (s *KEKSelect) IntX(ctx context.Context) int
- func (s *KEKSelect) Ints(ctx context.Context) ([]int, error)
- func (s *KEKSelect) IntsX(ctx context.Context) []int
- func (c KEKSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (_s *KEKSelect) Scan(ctx context.Context, v any) error
- func (s *KEKSelect) ScanX(ctx context.Context, v any)
- func (s *KEKSelect) String(ctx context.Context) (_ string, err error)
- func (s *KEKSelect) StringX(ctx context.Context) string
- func (s *KEKSelect) Strings(ctx context.Context) ([]string, error)
- func (s *KEKSelect) StringsX(ctx context.Context) []string
- type KEKUpdate
- func (_u *KEKUpdate) AddDataKeyIDs(ids ...envelope.ID) *KEKUpdate
- func (_u *KEKUpdate) AddDataKeys(v ...*DataKey) *KEKUpdate
- func (_u *KEKUpdate) AddSentinelIDs(ids ...int) *KEKUpdate
- func (_u *KEKUpdate) AddSentinels(v ...*Sentinel) *KEKUpdate
- func (_u *KEKUpdate) AddState(v int8) *KEKUpdate
- func (_u *KEKUpdate) AddVersionIDs(ids ...int) *KEKUpdate
- func (_u *KEKUpdate) AddVersions(v ...*KEKVersion) *KEKUpdate
- func (_u *KEKUpdate) ClearDataKeys() *KEKUpdate
- func (_u *KEKUpdate) ClearSentinels() *KEKUpdate
- func (_u *KEKUpdate) ClearVersions() *KEKUpdate
- func (_u *KEKUpdate) Exec(ctx context.Context) error
- func (c *KEKUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (_u *KEKUpdate) ExecX(ctx context.Context)
- func (_u *KEKUpdate) Mutation() *KEKMutation
- func (c *KEKUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (_u *KEKUpdate) RemoveDataKeyIDs(ids ...envelope.ID) *KEKUpdate
- func (_u *KEKUpdate) RemoveDataKeys(v ...*DataKey) *KEKUpdate
- func (_u *KEKUpdate) RemoveSentinelIDs(ids ...int) *KEKUpdate
- func (_u *KEKUpdate) RemoveSentinels(v ...*Sentinel) *KEKUpdate
- func (_u *KEKUpdate) RemoveVersionIDs(ids ...int) *KEKUpdate
- func (_u *KEKUpdate) RemoveVersions(v ...*KEKVersion) *KEKUpdate
- func (_u *KEKUpdate) Save(ctx context.Context) (int, error)
- func (_u *KEKUpdate) SaveX(ctx context.Context) int
- func (_u *KEKUpdate) SetCreatedAt(v time.Time) *KEKUpdate
- func (_u *KEKUpdate) SetNillableCreatedAt(v *time.Time) *KEKUpdate
- func (_u *KEKUpdate) SetNillableProvider(v *string) *KEKUpdate
- func (_u *KEKUpdate) SetNillableProviderRef(v *string) *KEKUpdate
- func (_u *KEKUpdate) SetNillablePurpose(v *string) *KEKUpdate
- func (_u *KEKUpdate) SetNillableState(v *uint8) *KEKUpdate
- func (_u *KEKUpdate) SetProvider(v string) *KEKUpdate
- func (_u *KEKUpdate) SetProviderRef(v string) *KEKUpdate
- func (_u *KEKUpdate) SetPurpose(v string) *KEKUpdate
- func (_u *KEKUpdate) SetState(v uint8) *KEKUpdate
- func (_u *KEKUpdate) Where(ps ...predicate.KEK) *KEKUpdate
- type KEKUpdateOne
- func (_u *KEKUpdateOne) AddDataKeyIDs(ids ...envelope.ID) *KEKUpdateOne
- func (_u *KEKUpdateOne) AddDataKeys(v ...*DataKey) *KEKUpdateOne
- func (_u *KEKUpdateOne) AddSentinelIDs(ids ...int) *KEKUpdateOne
- func (_u *KEKUpdateOne) AddSentinels(v ...*Sentinel) *KEKUpdateOne
- func (_u *KEKUpdateOne) AddState(v int8) *KEKUpdateOne
- func (_u *KEKUpdateOne) AddVersionIDs(ids ...int) *KEKUpdateOne
- func (_u *KEKUpdateOne) AddVersions(v ...*KEKVersion) *KEKUpdateOne
- func (_u *KEKUpdateOne) ClearDataKeys() *KEKUpdateOne
- func (_u *KEKUpdateOne) ClearSentinels() *KEKUpdateOne
- func (_u *KEKUpdateOne) ClearVersions() *KEKUpdateOne
- func (_u *KEKUpdateOne) Exec(ctx context.Context) error
- func (c *KEKUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (_u *KEKUpdateOne) ExecX(ctx context.Context)
- func (_u *KEKUpdateOne) Mutation() *KEKMutation
- func (c *KEKUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (_u *KEKUpdateOne) RemoveDataKeyIDs(ids ...envelope.ID) *KEKUpdateOne
- func (_u *KEKUpdateOne) RemoveDataKeys(v ...*DataKey) *KEKUpdateOne
- func (_u *KEKUpdateOne) RemoveSentinelIDs(ids ...int) *KEKUpdateOne
- func (_u *KEKUpdateOne) RemoveSentinels(v ...*Sentinel) *KEKUpdateOne
- func (_u *KEKUpdateOne) RemoveVersionIDs(ids ...int) *KEKUpdateOne
- func (_u *KEKUpdateOne) RemoveVersions(v ...*KEKVersion) *KEKUpdateOne
- func (_u *KEKUpdateOne) Save(ctx context.Context) (*KEK, error)
- func (_u *KEKUpdateOne) SaveX(ctx context.Context) *KEK
- func (_u *KEKUpdateOne) Select(field string, fields ...string) *KEKUpdateOne
- func (_u *KEKUpdateOne) SetCreatedAt(v time.Time) *KEKUpdateOne
- func (_u *KEKUpdateOne) SetNillableCreatedAt(v *time.Time) *KEKUpdateOne
- func (_u *KEKUpdateOne) SetNillableProvider(v *string) *KEKUpdateOne
- func (_u *KEKUpdateOne) SetNillableProviderRef(v *string) *KEKUpdateOne
- func (_u *KEKUpdateOne) SetNillablePurpose(v *string) *KEKUpdateOne
- func (_u *KEKUpdateOne) SetNillableState(v *uint8) *KEKUpdateOne
- func (_u *KEKUpdateOne) SetProvider(v string) *KEKUpdateOne
- func (_u *KEKUpdateOne) SetProviderRef(v string) *KEKUpdateOne
- func (_u *KEKUpdateOne) SetPurpose(v string) *KEKUpdateOne
- func (_u *KEKUpdateOne) SetState(v uint8) *KEKUpdateOne
- func (_u *KEKUpdateOne) Where(ps ...predicate.KEK) *KEKUpdateOne
- type KEKUpsert
- func (u *KEKUpsert) AddState(v uint8) *KEKUpsert
- func (u *KEKUpsert) SetCreatedAt(v time.Time) *KEKUpsert
- func (u *KEKUpsert) SetProvider(v string) *KEKUpsert
- func (u *KEKUpsert) SetProviderRef(v string) *KEKUpsert
- func (u *KEKUpsert) SetPurpose(v string) *KEKUpsert
- func (u *KEKUpsert) SetState(v uint8) *KEKUpsert
- func (u *KEKUpsert) UpdateCreatedAt() *KEKUpsert
- func (u *KEKUpsert) UpdateProvider() *KEKUpsert
- func (u *KEKUpsert) UpdateProviderRef() *KEKUpsert
- func (u *KEKUpsert) UpdatePurpose() *KEKUpsert
- func (u *KEKUpsert) UpdateState() *KEKUpsert
- type KEKUpsertBulk
- func (u *KEKUpsertBulk) AddState(v uint8) *KEKUpsertBulk
- func (u *KEKUpsertBulk) DoNothing() *KEKUpsertBulk
- func (u *KEKUpsertBulk) Exec(ctx context.Context) error
- func (u *KEKUpsertBulk) ExecX(ctx context.Context)
- func (u *KEKUpsertBulk) Ignore() *KEKUpsertBulk
- func (u *KEKUpsertBulk) SetCreatedAt(v time.Time) *KEKUpsertBulk
- func (u *KEKUpsertBulk) SetProvider(v string) *KEKUpsertBulk
- func (u *KEKUpsertBulk) SetProviderRef(v string) *KEKUpsertBulk
- func (u *KEKUpsertBulk) SetPurpose(v string) *KEKUpsertBulk
- func (u *KEKUpsertBulk) SetState(v uint8) *KEKUpsertBulk
- func (u *KEKUpsertBulk) Update(set func(*KEKUpsert)) *KEKUpsertBulk
- func (u *KEKUpsertBulk) UpdateCreatedAt() *KEKUpsertBulk
- func (u *KEKUpsertBulk) UpdateNewValues() *KEKUpsertBulk
- func (u *KEKUpsertBulk) UpdateProvider() *KEKUpsertBulk
- func (u *KEKUpsertBulk) UpdateProviderRef() *KEKUpsertBulk
- func (u *KEKUpsertBulk) UpdatePurpose() *KEKUpsertBulk
- func (u *KEKUpsertBulk) UpdateState() *KEKUpsertBulk
- type KEKUpsertOne
- func (u *KEKUpsertOne) AddState(v uint8) *KEKUpsertOne
- func (u *KEKUpsertOne) DoNothing() *KEKUpsertOne
- func (u *KEKUpsertOne) Exec(ctx context.Context) error
- func (u *KEKUpsertOne) ExecX(ctx context.Context)
- func (u *KEKUpsertOne) ID(ctx context.Context) (id envelope.ID, err error)
- func (u *KEKUpsertOne) IDX(ctx context.Context) envelope.ID
- func (u *KEKUpsertOne) Ignore() *KEKUpsertOne
- func (u *KEKUpsertOne) SetCreatedAt(v time.Time) *KEKUpsertOne
- func (u *KEKUpsertOne) SetProvider(v string) *KEKUpsertOne
- func (u *KEKUpsertOne) SetProviderRef(v string) *KEKUpsertOne
- func (u *KEKUpsertOne) SetPurpose(v string) *KEKUpsertOne
- func (u *KEKUpsertOne) SetState(v uint8) *KEKUpsertOne
- func (u *KEKUpsertOne) Update(set func(*KEKUpsert)) *KEKUpsertOne
- func (u *KEKUpsertOne) UpdateCreatedAt() *KEKUpsertOne
- func (u *KEKUpsertOne) UpdateNewValues() *KEKUpsertOne
- func (u *KEKUpsertOne) UpdateProvider() *KEKUpsertOne
- func (u *KEKUpsertOne) UpdateProviderRef() *KEKUpsertOne
- func (u *KEKUpsertOne) UpdatePurpose() *KEKUpsertOne
- func (u *KEKUpsertOne) UpdateState() *KEKUpsertOne
- type KEKVersion
- func (c *KEKVersion) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (c *KEKVersion) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (_m *KEKVersion) QueryKek() *KEKQuery
- func (_m *KEKVersion) String() string
- func (_m *KEKVersion) Unwrap() *KEKVersion
- func (_m *KEKVersion) Update() *KEKVersionUpdateOne
- func (_m *KEKVersion) Value(name string) (ent.Value, error)
- type KEKVersionClient
- func (c *KEKVersionClient) Create() *KEKVersionCreate
- func (c *KEKVersionClient) CreateBulk(builders ...*KEKVersionCreate) *KEKVersionCreateBulk
- func (c *KEKVersionClient) Delete() *KEKVersionDelete
- func (c *KEKVersionClient) DeleteOne(_m *KEKVersion) *KEKVersionDeleteOne
- func (c *KEKVersionClient) DeleteOneID(id int) *KEKVersionDeleteOne
- func (c *KEKVersionClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (c *KEKVersionClient) Get(ctx context.Context, id int) (*KEKVersion, error)
- func (c *KEKVersionClient) GetX(ctx context.Context, id int) *KEKVersion
- func (c *KEKVersionClient) Hooks() []Hook
- func (c *KEKVersionClient) Intercept(interceptors ...Interceptor)
- func (c *KEKVersionClient) Interceptors() []Interceptor
- func (c *KEKVersionClient) MapCreateBulk(slice any, setFunc func(*KEKVersionCreate, int)) *KEKVersionCreateBulk
- func (c *KEKVersionClient) Query() *KEKVersionQuery
- func (c *KEKVersionClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (c *KEKVersionClient) QueryKek(_m *KEKVersion) *KEKQuery
- func (c *KEKVersionClient) Update() *KEKVersionUpdate
- func (c *KEKVersionClient) UpdateOne(_m *KEKVersion) *KEKVersionUpdateOne
- func (c *KEKVersionClient) UpdateOneID(id int) *KEKVersionUpdateOne
- func (c *KEKVersionClient) Use(hooks ...Hook)
- type KEKVersionCreate
- func (_c *KEKVersionCreate) Exec(ctx context.Context) error
- func (c *KEKVersionCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (_c *KEKVersionCreate) ExecX(ctx context.Context)
- func (_c *KEKVersionCreate) Mutation() *KEKVersionMutation
- func (_c *KEKVersionCreate) OnConflict(opts ...sql.ConflictOption) *KEKVersionUpsertOne
- func (_c *KEKVersionCreate) OnConflictColumns(columns ...string) *KEKVersionUpsertOne
- func (c *KEKVersionCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (_c *KEKVersionCreate) Save(ctx context.Context) (*KEKVersion, error)
- func (_c *KEKVersionCreate) SaveX(ctx context.Context) *KEKVersion
- func (_c *KEKVersionCreate) SetActivatedAt(v time.Time) *KEKVersionCreate
- func (_c *KEKVersionCreate) SetCreatedAt(v time.Time) *KEKVersionCreate
- func (_c *KEKVersionCreate) SetKek(v *KEK) *KEKVersionCreate
- func (_c *KEKVersionCreate) SetKekID(v envelope.ID) *KEKVersionCreate
- func (_c *KEKVersionCreate) SetNillableActivatedAt(v *time.Time) *KEKVersionCreate
- func (_c *KEKVersionCreate) SetNillableProviderRef(v *string) *KEKVersionCreate
- func (_c *KEKVersionCreate) SetNillableRetireAfter(v *time.Time) *KEKVersionCreate
- func (_c *KEKVersionCreate) SetNillableRotatedAt(v *time.Time) *KEKVersionCreate
- func (_c *KEKVersionCreate) SetProviderRef(v string) *KEKVersionCreate
- func (_c *KEKVersionCreate) SetRetireAfter(v time.Time) *KEKVersionCreate
- func (_c *KEKVersionCreate) SetRotatedAt(v time.Time) *KEKVersionCreate
- func (_c *KEKVersionCreate) SetState(v uint8) *KEKVersionCreate
- func (_c *KEKVersionCreate) SetVersion(v uint32) *KEKVersionCreate
- type KEKVersionCreateBulk
- func (_c *KEKVersionCreateBulk) Exec(ctx context.Context) error
- func (c *KEKVersionCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (_c *KEKVersionCreateBulk) ExecX(ctx context.Context)
- func (_c *KEKVersionCreateBulk) OnConflict(opts ...sql.ConflictOption) *KEKVersionUpsertBulk
- func (_c *KEKVersionCreateBulk) OnConflictColumns(columns ...string) *KEKVersionUpsertBulk
- func (c *KEKVersionCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (_c *KEKVersionCreateBulk) Save(ctx context.Context) ([]*KEKVersion, error)
- func (_c *KEKVersionCreateBulk) SaveX(ctx context.Context) []*KEKVersion
- type KEKVersionDelete
- func (_d *KEKVersionDelete) Exec(ctx context.Context) (int, error)
- func (c *KEKVersionDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (_d *KEKVersionDelete) ExecX(ctx context.Context) int
- func (c *KEKVersionDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (_d *KEKVersionDelete) Where(ps ...predicate.KEKVersion) *KEKVersionDelete
- type KEKVersionDeleteOne
- type KEKVersionEdges
- type KEKVersionGroupBy
- func (_g *KEKVersionGroupBy) Aggregate(fns ...AggregateFunc) *KEKVersionGroupBy
- func (s *KEKVersionGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *KEKVersionGroupBy) BoolX(ctx context.Context) bool
- func (s *KEKVersionGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *KEKVersionGroupBy) BoolsX(ctx context.Context) []bool
- func (s *KEKVersionGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *KEKVersionGroupBy) Float64X(ctx context.Context) float64
- func (s *KEKVersionGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *KEKVersionGroupBy) Float64sX(ctx context.Context) []float64
- func (s *KEKVersionGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *KEKVersionGroupBy) IntX(ctx context.Context) int
- func (s *KEKVersionGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *KEKVersionGroupBy) IntsX(ctx context.Context) []int
- func (_g *KEKVersionGroupBy) Scan(ctx context.Context, v any) error
- func (s *KEKVersionGroupBy) ScanX(ctx context.Context, v any)
- func (s *KEKVersionGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *KEKVersionGroupBy) StringX(ctx context.Context) string
- func (s *KEKVersionGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *KEKVersionGroupBy) StringsX(ctx context.Context) []string
- type KEKVersionMutation
- func (m *KEKVersionMutation) ActivatedAt() (r time.Time, exists bool)
- func (m *KEKVersionMutation) ActivatedAtCleared() bool
- func (m *KEKVersionMutation) AddField(name string, value ent.Value) error
- func (m *KEKVersionMutation) AddState(u int8)
- func (m *KEKVersionMutation) AddVersion(u int32)
- func (m *KEKVersionMutation) AddedEdges() []string
- func (m *KEKVersionMutation) AddedField(name string) (ent.Value, bool)
- func (m *KEKVersionMutation) AddedFields() []string
- func (m *KEKVersionMutation) AddedIDs(name string) []ent.Value
- func (m *KEKVersionMutation) AddedState() (r int8, exists bool)
- func (m *KEKVersionMutation) AddedVersion() (r int32, exists bool)
- func (m *KEKVersionMutation) ClearActivatedAt()
- func (m *KEKVersionMutation) ClearEdge(name string) error
- func (m *KEKVersionMutation) ClearField(name string) error
- func (m *KEKVersionMutation) ClearKek()
- func (m *KEKVersionMutation) ClearRetireAfter()
- func (m *KEKVersionMutation) ClearRotatedAt()
- func (m *KEKVersionMutation) ClearedEdges() []string
- func (m *KEKVersionMutation) ClearedFields() []string
- func (m KEKVersionMutation) Client() *Client
- func (m *KEKVersionMutation) CreatedAt() (r time.Time, exists bool)
- func (m *KEKVersionMutation) EdgeCleared(name string) bool
- func (c *KEKVersionMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (m *KEKVersionMutation) Field(name string) (ent.Value, bool)
- func (m *KEKVersionMutation) FieldCleared(name string) bool
- func (m *KEKVersionMutation) Fields() []string
- func (m *KEKVersionMutation) ID() (id int, exists bool)
- func (m *KEKVersionMutation) IDs(ctx context.Context) ([]int, error)
- func (m *KEKVersionMutation) KekCleared() bool
- func (m *KEKVersionMutation) KekID() (r envelope.ID, exists bool)
- func (m *KEKVersionMutation) KekIDs() (ids []envelope.ID)
- func (m *KEKVersionMutation) OldActivatedAt(ctx context.Context) (v *time.Time, err error)
- func (m *KEKVersionMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *KEKVersionMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *KEKVersionMutation) OldKekID(ctx context.Context) (v envelope.ID, err error)
- func (m *KEKVersionMutation) OldProviderRef(ctx context.Context) (v string, err error)
- func (m *KEKVersionMutation) OldRetireAfter(ctx context.Context) (v *time.Time, err error)
- func (m *KEKVersionMutation) OldRotatedAt(ctx context.Context) (v *time.Time, err error)
- func (m *KEKVersionMutation) OldState(ctx context.Context) (v uint8, err error)
- func (m *KEKVersionMutation) OldVersion(ctx context.Context) (v uint32, err error)
- func (m *KEKVersionMutation) Op() Op
- func (m *KEKVersionMutation) ProviderRef() (r string, exists bool)
- func (c *KEKVersionMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (m *KEKVersionMutation) RemovedEdges() []string
- func (m *KEKVersionMutation) RemovedIDs(name string) []ent.Value
- func (m *KEKVersionMutation) ResetActivatedAt()
- func (m *KEKVersionMutation) ResetCreatedAt()
- func (m *KEKVersionMutation) ResetEdge(name string) error
- func (m *KEKVersionMutation) ResetField(name string) error
- func (m *KEKVersionMutation) ResetKek()
- func (m *KEKVersionMutation) ResetKekID()
- func (m *KEKVersionMutation) ResetProviderRef()
- func (m *KEKVersionMutation) ResetRetireAfter()
- func (m *KEKVersionMutation) ResetRotatedAt()
- func (m *KEKVersionMutation) ResetState()
- func (m *KEKVersionMutation) ResetVersion()
- func (m *KEKVersionMutation) RetireAfter() (r time.Time, exists bool)
- func (m *KEKVersionMutation) RetireAfterCleared() bool
- func (m *KEKVersionMutation) RotatedAt() (r time.Time, exists bool)
- func (m *KEKVersionMutation) RotatedAtCleared() bool
- func (m *KEKVersionMutation) SetActivatedAt(t time.Time)
- func (m *KEKVersionMutation) SetCreatedAt(t time.Time)
- func (m *KEKVersionMutation) SetField(name string, value ent.Value) error
- func (m *KEKVersionMutation) SetKekID(e envelope.ID)
- func (m *KEKVersionMutation) SetOp(op Op)
- func (m *KEKVersionMutation) SetProviderRef(s string)
- func (m *KEKVersionMutation) SetRetireAfter(t time.Time)
- func (m *KEKVersionMutation) SetRotatedAt(t time.Time)
- func (m *KEKVersionMutation) SetState(u uint8)
- func (m *KEKVersionMutation) SetVersion(u uint32)
- func (m *KEKVersionMutation) State() (r uint8, exists bool)
- func (m KEKVersionMutation) Tx() (*Tx, error)
- func (m *KEKVersionMutation) Type() string
- func (m *KEKVersionMutation) Version() (r uint32, exists bool)
- func (m *KEKVersionMutation) Where(ps ...predicate.KEKVersion)
- func (m *KEKVersionMutation) WhereP(ps ...func(*sql.Selector))
- type KEKVersionQuery
- func (_q *KEKVersionQuery) Aggregate(fns ...AggregateFunc) *KEKVersionSelect
- func (_q *KEKVersionQuery) All(ctx context.Context) ([]*KEKVersion, error)
- func (_q *KEKVersionQuery) AllX(ctx context.Context) []*KEKVersion
- func (_q *KEKVersionQuery) Clone() *KEKVersionQuery
- func (_q *KEKVersionQuery) Count(ctx context.Context) (int, error)
- func (_q *KEKVersionQuery) CountX(ctx context.Context) int
- func (c *KEKVersionQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (_q *KEKVersionQuery) Exist(ctx context.Context) (bool, error)
- func (_q *KEKVersionQuery) ExistX(ctx context.Context) bool
- func (_q *KEKVersionQuery) First(ctx context.Context) (*KEKVersion, error)
- func (_q *KEKVersionQuery) FirstID(ctx context.Context) (id int, err error)
- func (_q *KEKVersionQuery) FirstIDX(ctx context.Context) int
- func (_q *KEKVersionQuery) FirstX(ctx context.Context) *KEKVersion
- func (_q *KEKVersionQuery) ForShare(opts ...sql.LockOption) *KEKVersionQuery
- func (_q *KEKVersionQuery) ForUpdate(opts ...sql.LockOption) *KEKVersionQuery
- func (_q *KEKVersionQuery) GroupBy(field string, fields ...string) *KEKVersionGroupBy
- func (_q *KEKVersionQuery) IDs(ctx context.Context) (ids []int, err error)
- func (_q *KEKVersionQuery) IDsX(ctx context.Context) []int
- func (_q *KEKVersionQuery) Limit(limit int) *KEKVersionQuery
- func (_q *KEKVersionQuery) Offset(offset int) *KEKVersionQuery
- func (_q *KEKVersionQuery) Only(ctx context.Context) (*KEKVersion, error)
- func (_q *KEKVersionQuery) OnlyID(ctx context.Context) (id int, err error)
- func (_q *KEKVersionQuery) OnlyIDX(ctx context.Context) int
- func (_q *KEKVersionQuery) OnlyX(ctx context.Context) *KEKVersion
- func (_q *KEKVersionQuery) Order(o ...kekversion.OrderOption) *KEKVersionQuery
- func (c *KEKVersionQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (_q *KEKVersionQuery) QueryKek() *KEKQuery
- func (_q *KEKVersionQuery) Select(fields ...string) *KEKVersionSelect
- func (_q *KEKVersionQuery) Unique(unique bool) *KEKVersionQuery
- func (_q *KEKVersionQuery) Where(ps ...predicate.KEKVersion) *KEKVersionQuery
- func (_q *KEKVersionQuery) WithKek(opts ...func(*KEKQuery)) *KEKVersionQuery
- type KEKVersionSelect
- func (_s *KEKVersionSelect) Aggregate(fns ...AggregateFunc) *KEKVersionSelect
- func (s *KEKVersionSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *KEKVersionSelect) BoolX(ctx context.Context) bool
- func (s *KEKVersionSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *KEKVersionSelect) BoolsX(ctx context.Context) []bool
- func (c KEKVersionSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (s *KEKVersionSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *KEKVersionSelect) Float64X(ctx context.Context) float64
- func (s *KEKVersionSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *KEKVersionSelect) Float64sX(ctx context.Context) []float64
- func (s *KEKVersionSelect) Int(ctx context.Context) (_ int, err error)
- func (s *KEKVersionSelect) IntX(ctx context.Context) int
- func (s *KEKVersionSelect) Ints(ctx context.Context) ([]int, error)
- func (s *KEKVersionSelect) IntsX(ctx context.Context) []int
- func (c KEKVersionSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (_s *KEKVersionSelect) Scan(ctx context.Context, v any) error
- func (s *KEKVersionSelect) ScanX(ctx context.Context, v any)
- func (s *KEKVersionSelect) String(ctx context.Context) (_ string, err error)
- func (s *KEKVersionSelect) StringX(ctx context.Context) string
- func (s *KEKVersionSelect) Strings(ctx context.Context) ([]string, error)
- func (s *KEKVersionSelect) StringsX(ctx context.Context) []string
- type KEKVersionUpdate
- func (_u *KEKVersionUpdate) AddState(v int8) *KEKVersionUpdate
- func (_u *KEKVersionUpdate) AddVersion(v int32) *KEKVersionUpdate
- func (_u *KEKVersionUpdate) ClearActivatedAt() *KEKVersionUpdate
- func (_u *KEKVersionUpdate) ClearKek() *KEKVersionUpdate
- func (_u *KEKVersionUpdate) ClearRetireAfter() *KEKVersionUpdate
- func (_u *KEKVersionUpdate) ClearRotatedAt() *KEKVersionUpdate
- func (_u *KEKVersionUpdate) Exec(ctx context.Context) error
- func (c *KEKVersionUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (_u *KEKVersionUpdate) ExecX(ctx context.Context)
- func (_u *KEKVersionUpdate) Mutation() *KEKVersionMutation
- func (c *KEKVersionUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (_u *KEKVersionUpdate) Save(ctx context.Context) (int, error)
- func (_u *KEKVersionUpdate) SaveX(ctx context.Context) int
- func (_u *KEKVersionUpdate) SetActivatedAt(v time.Time) *KEKVersionUpdate
- func (_u *KEKVersionUpdate) SetCreatedAt(v time.Time) *KEKVersionUpdate
- func (_u *KEKVersionUpdate) SetKek(v *KEK) *KEKVersionUpdate
- func (_u *KEKVersionUpdate) SetKekID(v envelope.ID) *KEKVersionUpdate
- func (_u *KEKVersionUpdate) SetNillableActivatedAt(v *time.Time) *KEKVersionUpdate
- func (_u *KEKVersionUpdate) SetNillableCreatedAt(v *time.Time) *KEKVersionUpdate
- func (_u *KEKVersionUpdate) SetNillableKekID(v *envelope.ID) *KEKVersionUpdate
- func (_u *KEKVersionUpdate) SetNillableProviderRef(v *string) *KEKVersionUpdate
- func (_u *KEKVersionUpdate) SetNillableRetireAfter(v *time.Time) *KEKVersionUpdate
- func (_u *KEKVersionUpdate) SetNillableRotatedAt(v *time.Time) *KEKVersionUpdate
- func (_u *KEKVersionUpdate) SetNillableState(v *uint8) *KEKVersionUpdate
- func (_u *KEKVersionUpdate) SetNillableVersion(v *uint32) *KEKVersionUpdate
- func (_u *KEKVersionUpdate) SetProviderRef(v string) *KEKVersionUpdate
- func (_u *KEKVersionUpdate) SetRetireAfter(v time.Time) *KEKVersionUpdate
- func (_u *KEKVersionUpdate) SetRotatedAt(v time.Time) *KEKVersionUpdate
- func (_u *KEKVersionUpdate) SetState(v uint8) *KEKVersionUpdate
- func (_u *KEKVersionUpdate) SetVersion(v uint32) *KEKVersionUpdate
- func (_u *KEKVersionUpdate) Where(ps ...predicate.KEKVersion) *KEKVersionUpdate
- type KEKVersionUpdateOne
- func (_u *KEKVersionUpdateOne) AddState(v int8) *KEKVersionUpdateOne
- func (_u *KEKVersionUpdateOne) AddVersion(v int32) *KEKVersionUpdateOne
- func (_u *KEKVersionUpdateOne) ClearActivatedAt() *KEKVersionUpdateOne
- func (_u *KEKVersionUpdateOne) ClearKek() *KEKVersionUpdateOne
- func (_u *KEKVersionUpdateOne) ClearRetireAfter() *KEKVersionUpdateOne
- func (_u *KEKVersionUpdateOne) ClearRotatedAt() *KEKVersionUpdateOne
- func (_u *KEKVersionUpdateOne) Exec(ctx context.Context) error
- func (c *KEKVersionUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (_u *KEKVersionUpdateOne) ExecX(ctx context.Context)
- func (_u *KEKVersionUpdateOne) Mutation() *KEKVersionMutation
- func (c *KEKVersionUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (_u *KEKVersionUpdateOne) Save(ctx context.Context) (*KEKVersion, error)
- func (_u *KEKVersionUpdateOne) SaveX(ctx context.Context) *KEKVersion
- func (_u *KEKVersionUpdateOne) Select(field string, fields ...string) *KEKVersionUpdateOne
- func (_u *KEKVersionUpdateOne) SetActivatedAt(v time.Time) *KEKVersionUpdateOne
- func (_u *KEKVersionUpdateOne) SetCreatedAt(v time.Time) *KEKVersionUpdateOne
- func (_u *KEKVersionUpdateOne) SetKek(v *KEK) *KEKVersionUpdateOne
- func (_u *KEKVersionUpdateOne) SetKekID(v envelope.ID) *KEKVersionUpdateOne
- func (_u *KEKVersionUpdateOne) SetNillableActivatedAt(v *time.Time) *KEKVersionUpdateOne
- func (_u *KEKVersionUpdateOne) SetNillableCreatedAt(v *time.Time) *KEKVersionUpdateOne
- func (_u *KEKVersionUpdateOne) SetNillableKekID(v *envelope.ID) *KEKVersionUpdateOne
- func (_u *KEKVersionUpdateOne) SetNillableProviderRef(v *string) *KEKVersionUpdateOne
- func (_u *KEKVersionUpdateOne) SetNillableRetireAfter(v *time.Time) *KEKVersionUpdateOne
- func (_u *KEKVersionUpdateOne) SetNillableRotatedAt(v *time.Time) *KEKVersionUpdateOne
- func (_u *KEKVersionUpdateOne) SetNillableState(v *uint8) *KEKVersionUpdateOne
- func (_u *KEKVersionUpdateOne) SetNillableVersion(v *uint32) *KEKVersionUpdateOne
- func (_u *KEKVersionUpdateOne) SetProviderRef(v string) *KEKVersionUpdateOne
- func (_u *KEKVersionUpdateOne) SetRetireAfter(v time.Time) *KEKVersionUpdateOne
- func (_u *KEKVersionUpdateOne) SetRotatedAt(v time.Time) *KEKVersionUpdateOne
- func (_u *KEKVersionUpdateOne) SetState(v uint8) *KEKVersionUpdateOne
- func (_u *KEKVersionUpdateOne) SetVersion(v uint32) *KEKVersionUpdateOne
- func (_u *KEKVersionUpdateOne) Where(ps ...predicate.KEKVersion) *KEKVersionUpdateOne
- type KEKVersionUpsert
- func (u *KEKVersionUpsert) AddState(v uint8) *KEKVersionUpsert
- func (u *KEKVersionUpsert) AddVersion(v uint32) *KEKVersionUpsert
- func (u *KEKVersionUpsert) ClearActivatedAt() *KEKVersionUpsert
- func (u *KEKVersionUpsert) ClearRetireAfter() *KEKVersionUpsert
- func (u *KEKVersionUpsert) ClearRotatedAt() *KEKVersionUpsert
- func (u *KEKVersionUpsert) SetActivatedAt(v time.Time) *KEKVersionUpsert
- func (u *KEKVersionUpsert) SetCreatedAt(v time.Time) *KEKVersionUpsert
- func (u *KEKVersionUpsert) SetKekID(v envelope.ID) *KEKVersionUpsert
- func (u *KEKVersionUpsert) SetProviderRef(v string) *KEKVersionUpsert
- func (u *KEKVersionUpsert) SetRetireAfter(v time.Time) *KEKVersionUpsert
- func (u *KEKVersionUpsert) SetRotatedAt(v time.Time) *KEKVersionUpsert
- func (u *KEKVersionUpsert) SetState(v uint8) *KEKVersionUpsert
- func (u *KEKVersionUpsert) SetVersion(v uint32) *KEKVersionUpsert
- func (u *KEKVersionUpsert) UpdateActivatedAt() *KEKVersionUpsert
- func (u *KEKVersionUpsert) UpdateCreatedAt() *KEKVersionUpsert
- func (u *KEKVersionUpsert) UpdateKekID() *KEKVersionUpsert
- func (u *KEKVersionUpsert) UpdateProviderRef() *KEKVersionUpsert
- func (u *KEKVersionUpsert) UpdateRetireAfter() *KEKVersionUpsert
- func (u *KEKVersionUpsert) UpdateRotatedAt() *KEKVersionUpsert
- func (u *KEKVersionUpsert) UpdateState() *KEKVersionUpsert
- func (u *KEKVersionUpsert) UpdateVersion() *KEKVersionUpsert
- type KEKVersionUpsertBulk
- func (u *KEKVersionUpsertBulk) AddState(v uint8) *KEKVersionUpsertBulk
- func (u *KEKVersionUpsertBulk) AddVersion(v uint32) *KEKVersionUpsertBulk
- func (u *KEKVersionUpsertBulk) ClearActivatedAt() *KEKVersionUpsertBulk
- func (u *KEKVersionUpsertBulk) ClearRetireAfter() *KEKVersionUpsertBulk
- func (u *KEKVersionUpsertBulk) ClearRotatedAt() *KEKVersionUpsertBulk
- func (u *KEKVersionUpsertBulk) DoNothing() *KEKVersionUpsertBulk
- func (u *KEKVersionUpsertBulk) Exec(ctx context.Context) error
- func (u *KEKVersionUpsertBulk) ExecX(ctx context.Context)
- func (u *KEKVersionUpsertBulk) Ignore() *KEKVersionUpsertBulk
- func (u *KEKVersionUpsertBulk) SetActivatedAt(v time.Time) *KEKVersionUpsertBulk
- func (u *KEKVersionUpsertBulk) SetCreatedAt(v time.Time) *KEKVersionUpsertBulk
- func (u *KEKVersionUpsertBulk) SetKekID(v envelope.ID) *KEKVersionUpsertBulk
- func (u *KEKVersionUpsertBulk) SetProviderRef(v string) *KEKVersionUpsertBulk
- func (u *KEKVersionUpsertBulk) SetRetireAfter(v time.Time) *KEKVersionUpsertBulk
- func (u *KEKVersionUpsertBulk) SetRotatedAt(v time.Time) *KEKVersionUpsertBulk
- func (u *KEKVersionUpsertBulk) SetState(v uint8) *KEKVersionUpsertBulk
- func (u *KEKVersionUpsertBulk) SetVersion(v uint32) *KEKVersionUpsertBulk
- func (u *KEKVersionUpsertBulk) Update(set func(*KEKVersionUpsert)) *KEKVersionUpsertBulk
- func (u *KEKVersionUpsertBulk) UpdateActivatedAt() *KEKVersionUpsertBulk
- func (u *KEKVersionUpsertBulk) UpdateCreatedAt() *KEKVersionUpsertBulk
- func (u *KEKVersionUpsertBulk) UpdateKekID() *KEKVersionUpsertBulk
- func (u *KEKVersionUpsertBulk) UpdateNewValues() *KEKVersionUpsertBulk
- func (u *KEKVersionUpsertBulk) UpdateProviderRef() *KEKVersionUpsertBulk
- func (u *KEKVersionUpsertBulk) UpdateRetireAfter() *KEKVersionUpsertBulk
- func (u *KEKVersionUpsertBulk) UpdateRotatedAt() *KEKVersionUpsertBulk
- func (u *KEKVersionUpsertBulk) UpdateState() *KEKVersionUpsertBulk
- func (u *KEKVersionUpsertBulk) UpdateVersion() *KEKVersionUpsertBulk
- type KEKVersionUpsertOne
- func (u *KEKVersionUpsertOne) AddState(v uint8) *KEKVersionUpsertOne
- func (u *KEKVersionUpsertOne) AddVersion(v uint32) *KEKVersionUpsertOne
- func (u *KEKVersionUpsertOne) ClearActivatedAt() *KEKVersionUpsertOne
- func (u *KEKVersionUpsertOne) ClearRetireAfter() *KEKVersionUpsertOne
- func (u *KEKVersionUpsertOne) ClearRotatedAt() *KEKVersionUpsertOne
- func (u *KEKVersionUpsertOne) DoNothing() *KEKVersionUpsertOne
- func (u *KEKVersionUpsertOne) Exec(ctx context.Context) error
- func (u *KEKVersionUpsertOne) ExecX(ctx context.Context)
- func (u *KEKVersionUpsertOne) ID(ctx context.Context) (id int, err error)
- func (u *KEKVersionUpsertOne) IDX(ctx context.Context) int
- func (u *KEKVersionUpsertOne) Ignore() *KEKVersionUpsertOne
- func (u *KEKVersionUpsertOne) SetActivatedAt(v time.Time) *KEKVersionUpsertOne
- func (u *KEKVersionUpsertOne) SetCreatedAt(v time.Time) *KEKVersionUpsertOne
- func (u *KEKVersionUpsertOne) SetKekID(v envelope.ID) *KEKVersionUpsertOne
- func (u *KEKVersionUpsertOne) SetProviderRef(v string) *KEKVersionUpsertOne
- func (u *KEKVersionUpsertOne) SetRetireAfter(v time.Time) *KEKVersionUpsertOne
- func (u *KEKVersionUpsertOne) SetRotatedAt(v time.Time) *KEKVersionUpsertOne
- func (u *KEKVersionUpsertOne) SetState(v uint8) *KEKVersionUpsertOne
- func (u *KEKVersionUpsertOne) SetVersion(v uint32) *KEKVersionUpsertOne
- func (u *KEKVersionUpsertOne) Update(set func(*KEKVersionUpsert)) *KEKVersionUpsertOne
- func (u *KEKVersionUpsertOne) UpdateActivatedAt() *KEKVersionUpsertOne
- func (u *KEKVersionUpsertOne) UpdateCreatedAt() *KEKVersionUpsertOne
- func (u *KEKVersionUpsertOne) UpdateKekID() *KEKVersionUpsertOne
- func (u *KEKVersionUpsertOne) UpdateNewValues() *KEKVersionUpsertOne
- func (u *KEKVersionUpsertOne) UpdateProviderRef() *KEKVersionUpsertOne
- func (u *KEKVersionUpsertOne) UpdateRetireAfter() *KEKVersionUpsertOne
- func (u *KEKVersionUpsertOne) UpdateRotatedAt() *KEKVersionUpsertOne
- func (u *KEKVersionUpsertOne) UpdateState() *KEKVersionUpsertOne
- func (u *KEKVersionUpsertOne) UpdateVersion() *KEKVersionUpsertOne
- type KEKVersions
- type KEKs
- 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 Sentinel
- func (c *Sentinel) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (c *Sentinel) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (_m *Sentinel) QueryKek() *KEKQuery
- func (_m *Sentinel) String() string
- func (_m *Sentinel) Unwrap() *Sentinel
- func (_m *Sentinel) Update() *SentinelUpdateOne
- func (_m *Sentinel) Value(name string) (ent.Value, error)
- type SentinelClient
- func (c *SentinelClient) Create() *SentinelCreate
- func (c *SentinelClient) CreateBulk(builders ...*SentinelCreate) *SentinelCreateBulk
- func (c *SentinelClient) Delete() *SentinelDelete
- func (c *SentinelClient) DeleteOne(_m *Sentinel) *SentinelDeleteOne
- func (c *SentinelClient) DeleteOneID(id int) *SentinelDeleteOne
- func (c *SentinelClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (c *SentinelClient) Get(ctx context.Context, id int) (*Sentinel, error)
- func (c *SentinelClient) GetX(ctx context.Context, id int) *Sentinel
- func (c *SentinelClient) Hooks() []Hook
- func (c *SentinelClient) Intercept(interceptors ...Interceptor)
- func (c *SentinelClient) Interceptors() []Interceptor
- func (c *SentinelClient) MapCreateBulk(slice any, setFunc func(*SentinelCreate, int)) *SentinelCreateBulk
- func (c *SentinelClient) Query() *SentinelQuery
- func (c *SentinelClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (c *SentinelClient) QueryKek(_m *Sentinel) *KEKQuery
- func (c *SentinelClient) Update() *SentinelUpdate
- func (c *SentinelClient) UpdateOne(_m *Sentinel) *SentinelUpdateOne
- func (c *SentinelClient) UpdateOneID(id int) *SentinelUpdateOne
- func (c *SentinelClient) Use(hooks ...Hook)
- type SentinelCreate
- func (_c *SentinelCreate) Exec(ctx context.Context) error
- func (c *SentinelCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (_c *SentinelCreate) ExecX(ctx context.Context)
- func (_c *SentinelCreate) Mutation() *SentinelMutation
- func (_c *SentinelCreate) OnConflict(opts ...sql.ConflictOption) *SentinelUpsertOne
- func (_c *SentinelCreate) OnConflictColumns(columns ...string) *SentinelUpsertOne
- func (c *SentinelCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (_c *SentinelCreate) Save(ctx context.Context) (*Sentinel, error)
- func (_c *SentinelCreate) SaveX(ctx context.Context) *Sentinel
- func (_c *SentinelCreate) SetCreatedAt(v time.Time) *SentinelCreate
- func (_c *SentinelCreate) SetEnvelope(v string) *SentinelCreate
- func (_c *SentinelCreate) SetKek(v *KEK) *SentinelCreate
- func (_c *SentinelCreate) SetKekID(v envelope.ID) *SentinelCreate
- func (_c *SentinelCreate) SetVersion(v uint32) *SentinelCreate
- type SentinelCreateBulk
- func (_c *SentinelCreateBulk) Exec(ctx context.Context) error
- func (c *SentinelCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (_c *SentinelCreateBulk) ExecX(ctx context.Context)
- func (_c *SentinelCreateBulk) OnConflict(opts ...sql.ConflictOption) *SentinelUpsertBulk
- func (_c *SentinelCreateBulk) OnConflictColumns(columns ...string) *SentinelUpsertBulk
- func (c *SentinelCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (_c *SentinelCreateBulk) Save(ctx context.Context) ([]*Sentinel, error)
- func (_c *SentinelCreateBulk) SaveX(ctx context.Context) []*Sentinel
- type SentinelDelete
- func (_d *SentinelDelete) Exec(ctx context.Context) (int, error)
- func (c *SentinelDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (_d *SentinelDelete) ExecX(ctx context.Context) int
- func (c *SentinelDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (_d *SentinelDelete) Where(ps ...predicate.Sentinel) *SentinelDelete
- type SentinelDeleteOne
- type SentinelEdges
- type SentinelGroupBy
- func (_g *SentinelGroupBy) Aggregate(fns ...AggregateFunc) *SentinelGroupBy
- func (s *SentinelGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *SentinelGroupBy) BoolX(ctx context.Context) bool
- func (s *SentinelGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *SentinelGroupBy) BoolsX(ctx context.Context) []bool
- func (s *SentinelGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *SentinelGroupBy) Float64X(ctx context.Context) float64
- func (s *SentinelGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *SentinelGroupBy) Float64sX(ctx context.Context) []float64
- func (s *SentinelGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *SentinelGroupBy) IntX(ctx context.Context) int
- func (s *SentinelGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *SentinelGroupBy) IntsX(ctx context.Context) []int
- func (_g *SentinelGroupBy) Scan(ctx context.Context, v any) error
- func (s *SentinelGroupBy) ScanX(ctx context.Context, v any)
- func (s *SentinelGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *SentinelGroupBy) StringX(ctx context.Context) string
- func (s *SentinelGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *SentinelGroupBy) StringsX(ctx context.Context) []string
- type SentinelMutation
- func (m *SentinelMutation) AddField(name string, value ent.Value) error
- func (m *SentinelMutation) AddVersion(u int32)
- func (m *SentinelMutation) AddedEdges() []string
- func (m *SentinelMutation) AddedField(name string) (ent.Value, bool)
- func (m *SentinelMutation) AddedFields() []string
- func (m *SentinelMutation) AddedIDs(name string) []ent.Value
- func (m *SentinelMutation) AddedVersion() (r int32, exists bool)
- func (m *SentinelMutation) ClearEdge(name string) error
- func (m *SentinelMutation) ClearField(name string) error
- func (m *SentinelMutation) ClearKek()
- func (m *SentinelMutation) ClearedEdges() []string
- func (m *SentinelMutation) ClearedFields() []string
- func (m SentinelMutation) Client() *Client
- func (m *SentinelMutation) CreatedAt() (r time.Time, exists bool)
- func (m *SentinelMutation) EdgeCleared(name string) bool
- func (m *SentinelMutation) Envelope() (r string, exists bool)
- func (c *SentinelMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (m *SentinelMutation) Field(name string) (ent.Value, bool)
- func (m *SentinelMutation) FieldCleared(name string) bool
- func (m *SentinelMutation) Fields() []string
- func (m *SentinelMutation) ID() (id int, exists bool)
- func (m *SentinelMutation) IDs(ctx context.Context) ([]int, error)
- func (m *SentinelMutation) KekCleared() bool
- func (m *SentinelMutation) KekID() (r envelope.ID, exists bool)
- func (m *SentinelMutation) KekIDs() (ids []envelope.ID)
- func (m *SentinelMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *SentinelMutation) OldEnvelope(ctx context.Context) (v string, err error)
- func (m *SentinelMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *SentinelMutation) OldKekID(ctx context.Context) (v envelope.ID, err error)
- func (m *SentinelMutation) OldVersion(ctx context.Context) (v uint32, err error)
- func (m *SentinelMutation) Op() Op
- func (c *SentinelMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (m *SentinelMutation) RemovedEdges() []string
- func (m *SentinelMutation) RemovedIDs(name string) []ent.Value
- func (m *SentinelMutation) ResetCreatedAt()
- func (m *SentinelMutation) ResetEdge(name string) error
- func (m *SentinelMutation) ResetEnvelope()
- func (m *SentinelMutation) ResetField(name string) error
- func (m *SentinelMutation) ResetKek()
- func (m *SentinelMutation) ResetKekID()
- func (m *SentinelMutation) ResetVersion()
- func (m *SentinelMutation) SetCreatedAt(t time.Time)
- func (m *SentinelMutation) SetEnvelope(s string)
- func (m *SentinelMutation) SetField(name string, value ent.Value) error
- func (m *SentinelMutation) SetKekID(e envelope.ID)
- func (m *SentinelMutation) SetOp(op Op)
- func (m *SentinelMutation) SetVersion(u uint32)
- func (m SentinelMutation) Tx() (*Tx, error)
- func (m *SentinelMutation) Type() string
- func (m *SentinelMutation) Version() (r uint32, exists bool)
- func (m *SentinelMutation) Where(ps ...predicate.Sentinel)
- func (m *SentinelMutation) WhereP(ps ...func(*sql.Selector))
- type SentinelQuery
- func (_q *SentinelQuery) Aggregate(fns ...AggregateFunc) *SentinelSelect
- func (_q *SentinelQuery) All(ctx context.Context) ([]*Sentinel, error)
- func (_q *SentinelQuery) AllX(ctx context.Context) []*Sentinel
- func (_q *SentinelQuery) Clone() *SentinelQuery
- func (_q *SentinelQuery) Count(ctx context.Context) (int, error)
- func (_q *SentinelQuery) CountX(ctx context.Context) int
- func (c *SentinelQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (_q *SentinelQuery) Exist(ctx context.Context) (bool, error)
- func (_q *SentinelQuery) ExistX(ctx context.Context) bool
- func (_q *SentinelQuery) First(ctx context.Context) (*Sentinel, error)
- func (_q *SentinelQuery) FirstID(ctx context.Context) (id int, err error)
- func (_q *SentinelQuery) FirstIDX(ctx context.Context) int
- func (_q *SentinelQuery) FirstX(ctx context.Context) *Sentinel
- func (_q *SentinelQuery) ForShare(opts ...sql.LockOption) *SentinelQuery
- func (_q *SentinelQuery) ForUpdate(opts ...sql.LockOption) *SentinelQuery
- func (_q *SentinelQuery) GroupBy(field string, fields ...string) *SentinelGroupBy
- func (_q *SentinelQuery) IDs(ctx context.Context) (ids []int, err error)
- func (_q *SentinelQuery) IDsX(ctx context.Context) []int
- func (_q *SentinelQuery) Limit(limit int) *SentinelQuery
- func (_q *SentinelQuery) Offset(offset int) *SentinelQuery
- func (_q *SentinelQuery) Only(ctx context.Context) (*Sentinel, error)
- func (_q *SentinelQuery) OnlyID(ctx context.Context) (id int, err error)
- func (_q *SentinelQuery) OnlyIDX(ctx context.Context) int
- func (_q *SentinelQuery) OnlyX(ctx context.Context) *Sentinel
- func (_q *SentinelQuery) Order(o ...sentinel.OrderOption) *SentinelQuery
- func (c *SentinelQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (_q *SentinelQuery) QueryKek() *KEKQuery
- func (_q *SentinelQuery) Select(fields ...string) *SentinelSelect
- func (_q *SentinelQuery) Unique(unique bool) *SentinelQuery
- func (_q *SentinelQuery) Where(ps ...predicate.Sentinel) *SentinelQuery
- func (_q *SentinelQuery) WithKek(opts ...func(*KEKQuery)) *SentinelQuery
- type SentinelSelect
- func (_s *SentinelSelect) Aggregate(fns ...AggregateFunc) *SentinelSelect
- func (s *SentinelSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *SentinelSelect) BoolX(ctx context.Context) bool
- func (s *SentinelSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *SentinelSelect) BoolsX(ctx context.Context) []bool
- func (c SentinelSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (s *SentinelSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *SentinelSelect) Float64X(ctx context.Context) float64
- func (s *SentinelSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *SentinelSelect) Float64sX(ctx context.Context) []float64
- func (s *SentinelSelect) Int(ctx context.Context) (_ int, err error)
- func (s *SentinelSelect) IntX(ctx context.Context) int
- func (s *SentinelSelect) Ints(ctx context.Context) ([]int, error)
- func (s *SentinelSelect) IntsX(ctx context.Context) []int
- func (c SentinelSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (_s *SentinelSelect) Scan(ctx context.Context, v any) error
- func (s *SentinelSelect) ScanX(ctx context.Context, v any)
- func (s *SentinelSelect) String(ctx context.Context) (_ string, err error)
- func (s *SentinelSelect) StringX(ctx context.Context) string
- func (s *SentinelSelect) Strings(ctx context.Context) ([]string, error)
- func (s *SentinelSelect) StringsX(ctx context.Context) []string
- type SentinelUpdate
- func (_u *SentinelUpdate) AddVersion(v int32) *SentinelUpdate
- func (_u *SentinelUpdate) ClearKek() *SentinelUpdate
- func (_u *SentinelUpdate) Exec(ctx context.Context) error
- func (c *SentinelUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (_u *SentinelUpdate) ExecX(ctx context.Context)
- func (_u *SentinelUpdate) Mutation() *SentinelMutation
- func (c *SentinelUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (_u *SentinelUpdate) Save(ctx context.Context) (int, error)
- func (_u *SentinelUpdate) SaveX(ctx context.Context) int
- func (_u *SentinelUpdate) SetCreatedAt(v time.Time) *SentinelUpdate
- func (_u *SentinelUpdate) SetEnvelope(v string) *SentinelUpdate
- func (_u *SentinelUpdate) SetKek(v *KEK) *SentinelUpdate
- func (_u *SentinelUpdate) SetKekID(v envelope.ID) *SentinelUpdate
- func (_u *SentinelUpdate) SetNillableCreatedAt(v *time.Time) *SentinelUpdate
- func (_u *SentinelUpdate) SetNillableEnvelope(v *string) *SentinelUpdate
- func (_u *SentinelUpdate) SetNillableKekID(v *envelope.ID) *SentinelUpdate
- func (_u *SentinelUpdate) SetNillableVersion(v *uint32) *SentinelUpdate
- func (_u *SentinelUpdate) SetVersion(v uint32) *SentinelUpdate
- func (_u *SentinelUpdate) Where(ps ...predicate.Sentinel) *SentinelUpdate
- type SentinelUpdateOne
- func (_u *SentinelUpdateOne) AddVersion(v int32) *SentinelUpdateOne
- func (_u *SentinelUpdateOne) ClearKek() *SentinelUpdateOne
- func (_u *SentinelUpdateOne) Exec(ctx context.Context) error
- func (c *SentinelUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (_u *SentinelUpdateOne) ExecX(ctx context.Context)
- func (_u *SentinelUpdateOne) Mutation() *SentinelMutation
- func (c *SentinelUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (_u *SentinelUpdateOne) Save(ctx context.Context) (*Sentinel, error)
- func (_u *SentinelUpdateOne) SaveX(ctx context.Context) *Sentinel
- func (_u *SentinelUpdateOne) Select(field string, fields ...string) *SentinelUpdateOne
- func (_u *SentinelUpdateOne) SetCreatedAt(v time.Time) *SentinelUpdateOne
- func (_u *SentinelUpdateOne) SetEnvelope(v string) *SentinelUpdateOne
- func (_u *SentinelUpdateOne) SetKek(v *KEK) *SentinelUpdateOne
- func (_u *SentinelUpdateOne) SetKekID(v envelope.ID) *SentinelUpdateOne
- func (_u *SentinelUpdateOne) SetNillableCreatedAt(v *time.Time) *SentinelUpdateOne
- func (_u *SentinelUpdateOne) SetNillableEnvelope(v *string) *SentinelUpdateOne
- func (_u *SentinelUpdateOne) SetNillableKekID(v *envelope.ID) *SentinelUpdateOne
- func (_u *SentinelUpdateOne) SetNillableVersion(v *uint32) *SentinelUpdateOne
- func (_u *SentinelUpdateOne) SetVersion(v uint32) *SentinelUpdateOne
- func (_u *SentinelUpdateOne) Where(ps ...predicate.Sentinel) *SentinelUpdateOne
- type SentinelUpsert
- func (u *SentinelUpsert) AddVersion(v uint32) *SentinelUpsert
- func (u *SentinelUpsert) SetCreatedAt(v time.Time) *SentinelUpsert
- func (u *SentinelUpsert) SetEnvelope(v string) *SentinelUpsert
- func (u *SentinelUpsert) SetKekID(v envelope.ID) *SentinelUpsert
- func (u *SentinelUpsert) SetVersion(v uint32) *SentinelUpsert
- func (u *SentinelUpsert) UpdateCreatedAt() *SentinelUpsert
- func (u *SentinelUpsert) UpdateEnvelope() *SentinelUpsert
- func (u *SentinelUpsert) UpdateKekID() *SentinelUpsert
- func (u *SentinelUpsert) UpdateVersion() *SentinelUpsert
- type SentinelUpsertBulk
- func (u *SentinelUpsertBulk) AddVersion(v uint32) *SentinelUpsertBulk
- func (u *SentinelUpsertBulk) DoNothing() *SentinelUpsertBulk
- func (u *SentinelUpsertBulk) Exec(ctx context.Context) error
- func (u *SentinelUpsertBulk) ExecX(ctx context.Context)
- func (u *SentinelUpsertBulk) Ignore() *SentinelUpsertBulk
- func (u *SentinelUpsertBulk) SetCreatedAt(v time.Time) *SentinelUpsertBulk
- func (u *SentinelUpsertBulk) SetEnvelope(v string) *SentinelUpsertBulk
- func (u *SentinelUpsertBulk) SetKekID(v envelope.ID) *SentinelUpsertBulk
- func (u *SentinelUpsertBulk) SetVersion(v uint32) *SentinelUpsertBulk
- func (u *SentinelUpsertBulk) Update(set func(*SentinelUpsert)) *SentinelUpsertBulk
- func (u *SentinelUpsertBulk) UpdateCreatedAt() *SentinelUpsertBulk
- func (u *SentinelUpsertBulk) UpdateEnvelope() *SentinelUpsertBulk
- func (u *SentinelUpsertBulk) UpdateKekID() *SentinelUpsertBulk
- func (u *SentinelUpsertBulk) UpdateNewValues() *SentinelUpsertBulk
- func (u *SentinelUpsertBulk) UpdateVersion() *SentinelUpsertBulk
- type SentinelUpsertOne
- func (u *SentinelUpsertOne) AddVersion(v uint32) *SentinelUpsertOne
- func (u *SentinelUpsertOne) DoNothing() *SentinelUpsertOne
- func (u *SentinelUpsertOne) Exec(ctx context.Context) error
- func (u *SentinelUpsertOne) ExecX(ctx context.Context)
- func (u *SentinelUpsertOne) ID(ctx context.Context) (id int, err error)
- func (u *SentinelUpsertOne) IDX(ctx context.Context) int
- func (u *SentinelUpsertOne) Ignore() *SentinelUpsertOne
- func (u *SentinelUpsertOne) SetCreatedAt(v time.Time) *SentinelUpsertOne
- func (u *SentinelUpsertOne) SetEnvelope(v string) *SentinelUpsertOne
- func (u *SentinelUpsertOne) SetKekID(v envelope.ID) *SentinelUpsertOne
- func (u *SentinelUpsertOne) SetVersion(v uint32) *SentinelUpsertOne
- func (u *SentinelUpsertOne) Update(set func(*SentinelUpsert)) *SentinelUpsertOne
- func (u *SentinelUpsertOne) UpdateCreatedAt() *SentinelUpsertOne
- func (u *SentinelUpsertOne) UpdateEnvelope() *SentinelUpsertOne
- func (u *SentinelUpsertOne) UpdateKekID() *SentinelUpsertOne
- func (u *SentinelUpsertOne) UpdateNewValues() *SentinelUpsertOne
- func (u *SentinelUpsertOne) UpdateVersion() *SentinelUpsertOne
- type Sentinels
- type Shred
- func (c *Shred) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (c *Shred) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (_m *Shred) String() string
- func (_m *Shred) Unwrap() *Shred
- func (_m *Shred) Update() *ShredUpdateOne
- func (_m *Shred) Value(name string) (ent.Value, error)
- type ShredClient
- func (c *ShredClient) Create() *ShredCreate
- func (c *ShredClient) CreateBulk(builders ...*ShredCreate) *ShredCreateBulk
- func (c *ShredClient) Delete() *ShredDelete
- func (c *ShredClient) DeleteOne(_m *Shred) *ShredDeleteOne
- func (c *ShredClient) DeleteOneID(id int) *ShredDeleteOne
- func (c *ShredClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (c *ShredClient) Get(ctx context.Context, id int) (*Shred, error)
- func (c *ShredClient) GetX(ctx context.Context, id int) *Shred
- func (c *ShredClient) Hooks() []Hook
- func (c *ShredClient) Intercept(interceptors ...Interceptor)
- func (c *ShredClient) Interceptors() []Interceptor
- func (c *ShredClient) MapCreateBulk(slice any, setFunc func(*ShredCreate, int)) *ShredCreateBulk
- func (c *ShredClient) Query() *ShredQuery
- func (c *ShredClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (c *ShredClient) Update() *ShredUpdate
- func (c *ShredClient) UpdateOne(_m *Shred) *ShredUpdateOne
- func (c *ShredClient) UpdateOneID(id int) *ShredUpdateOne
- func (c *ShredClient) Use(hooks ...Hook)
- type ShredCreate
- func (_c *ShredCreate) Exec(ctx context.Context) error
- func (c *ShredCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (_c *ShredCreate) ExecX(ctx context.Context)
- func (_c *ShredCreate) Mutation() *ShredMutation
- func (_c *ShredCreate) OnConflict(opts ...sql.ConflictOption) *ShredUpsertOne
- func (_c *ShredCreate) OnConflictColumns(columns ...string) *ShredUpsertOne
- func (c *ShredCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (_c *ShredCreate) Save(ctx context.Context) (*Shred, error)
- func (_c *ShredCreate) SaveX(ctx context.Context) *Shred
- func (_c *ShredCreate) SetCompletedAt(v time.Time) *ShredCreate
- func (_c *ShredCreate) SetDeks(v int) *ShredCreate
- func (_c *ShredCreate) SetNillableCompletedAt(v *time.Time) *ShredCreate
- func (_c *ShredCreate) SetNillableDeks(v *int) *ShredCreate
- func (_c *ShredCreate) SetPurpose(v string) *ShredCreate
- func (_c *ShredCreate) SetRequestedAt(v time.Time) *ShredCreate
- func (_c *ShredCreate) SetSubject(v string) *ShredCreate
- func (_c *ShredCreate) SetVersions(v []keyforge.KEKVersionRef) *ShredCreate
- type ShredCreateBulk
- func (_c *ShredCreateBulk) Exec(ctx context.Context) error
- func (c *ShredCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (_c *ShredCreateBulk) ExecX(ctx context.Context)
- func (_c *ShredCreateBulk) OnConflict(opts ...sql.ConflictOption) *ShredUpsertBulk
- func (_c *ShredCreateBulk) OnConflictColumns(columns ...string) *ShredUpsertBulk
- func (c *ShredCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (_c *ShredCreateBulk) Save(ctx context.Context) ([]*Shred, error)
- func (_c *ShredCreateBulk) SaveX(ctx context.Context) []*Shred
- type ShredDelete
- func (_d *ShredDelete) Exec(ctx context.Context) (int, error)
- func (c *ShredDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (_d *ShredDelete) ExecX(ctx context.Context) int
- func (c *ShredDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (_d *ShredDelete) Where(ps ...predicate.Shred) *ShredDelete
- type ShredDeleteOne
- type ShredGroupBy
- func (_g *ShredGroupBy) Aggregate(fns ...AggregateFunc) *ShredGroupBy
- func (s *ShredGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *ShredGroupBy) BoolX(ctx context.Context) bool
- func (s *ShredGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *ShredGroupBy) BoolsX(ctx context.Context) []bool
- func (s *ShredGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *ShredGroupBy) Float64X(ctx context.Context) float64
- func (s *ShredGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *ShredGroupBy) Float64sX(ctx context.Context) []float64
- func (s *ShredGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *ShredGroupBy) IntX(ctx context.Context) int
- func (s *ShredGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *ShredGroupBy) IntsX(ctx context.Context) []int
- func (_g *ShredGroupBy) Scan(ctx context.Context, v any) error
- func (s *ShredGroupBy) ScanX(ctx context.Context, v any)
- func (s *ShredGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *ShredGroupBy) StringX(ctx context.Context) string
- func (s *ShredGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *ShredGroupBy) StringsX(ctx context.Context) []string
- type ShredMutation
- func (m *ShredMutation) AddDeks(i int)
- func (m *ShredMutation) AddField(name string, value ent.Value) error
- func (m *ShredMutation) AddedDeks() (r int, exists bool)
- func (m *ShredMutation) AddedEdges() []string
- func (m *ShredMutation) AddedField(name string) (ent.Value, bool)
- func (m *ShredMutation) AddedFields() []string
- func (m *ShredMutation) AddedIDs(name string) []ent.Value
- func (m *ShredMutation) AppendVersions(kvr []keyforge.KEKVersionRef)
- func (m *ShredMutation) AppendedVersions() ([]keyforge.KEKVersionRef, bool)
- func (m *ShredMutation) ClearCompletedAt()
- func (m *ShredMutation) ClearEdge(name string) error
- func (m *ShredMutation) ClearField(name string) error
- func (m *ShredMutation) ClearedEdges() []string
- func (m *ShredMutation) ClearedFields() []string
- func (m ShredMutation) Client() *Client
- func (m *ShredMutation) CompletedAt() (r time.Time, exists bool)
- func (m *ShredMutation) CompletedAtCleared() bool
- func (m *ShredMutation) Deks() (r int, exists bool)
- func (m *ShredMutation) EdgeCleared(name string) bool
- func (c *ShredMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (m *ShredMutation) Field(name string) (ent.Value, bool)
- func (m *ShredMutation) FieldCleared(name string) bool
- func (m *ShredMutation) Fields() []string
- func (m *ShredMutation) ID() (id int, exists bool)
- func (m *ShredMutation) IDs(ctx context.Context) ([]int, error)
- func (m *ShredMutation) OldCompletedAt(ctx context.Context) (v *time.Time, err error)
- func (m *ShredMutation) OldDeks(ctx context.Context) (v int, err error)
- func (m *ShredMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *ShredMutation) OldPurpose(ctx context.Context) (v string, err error)
- func (m *ShredMutation) OldRequestedAt(ctx context.Context) (v time.Time, err error)
- func (m *ShredMutation) OldSubject(ctx context.Context) (v string, err error)
- func (m *ShredMutation) OldVersions(ctx context.Context) (v []keyforge.KEKVersionRef, err error)
- func (m *ShredMutation) Op() Op
- func (m *ShredMutation) Purpose() (r string, exists bool)
- func (c *ShredMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (m *ShredMutation) RemovedEdges() []string
- func (m *ShredMutation) RemovedIDs(name string) []ent.Value
- func (m *ShredMutation) RequestedAt() (r time.Time, exists bool)
- func (m *ShredMutation) ResetCompletedAt()
- func (m *ShredMutation) ResetDeks()
- func (m *ShredMutation) ResetEdge(name string) error
- func (m *ShredMutation) ResetField(name string) error
- func (m *ShredMutation) ResetPurpose()
- func (m *ShredMutation) ResetRequestedAt()
- func (m *ShredMutation) ResetSubject()
- func (m *ShredMutation) ResetVersions()
- func (m *ShredMutation) SetCompletedAt(t time.Time)
- func (m *ShredMutation) SetDeks(i int)
- func (m *ShredMutation) SetField(name string, value ent.Value) error
- func (m *ShredMutation) SetOp(op Op)
- func (m *ShredMutation) SetPurpose(s string)
- func (m *ShredMutation) SetRequestedAt(t time.Time)
- func (m *ShredMutation) SetSubject(s string)
- func (m *ShredMutation) SetVersions(kvr []keyforge.KEKVersionRef)
- func (m *ShredMutation) Subject() (r string, exists bool)
- func (m ShredMutation) Tx() (*Tx, error)
- func (m *ShredMutation) Type() string
- func (m *ShredMutation) Versions() (r []keyforge.KEKVersionRef, exists bool)
- func (m *ShredMutation) Where(ps ...predicate.Shred)
- func (m *ShredMutation) WhereP(ps ...func(*sql.Selector))
- type ShredQuery
- func (_q *ShredQuery) Aggregate(fns ...AggregateFunc) *ShredSelect
- func (_q *ShredQuery) All(ctx context.Context) ([]*Shred, error)
- func (_q *ShredQuery) AllX(ctx context.Context) []*Shred
- func (_q *ShredQuery) Clone() *ShredQuery
- func (_q *ShredQuery) Count(ctx context.Context) (int, error)
- func (_q *ShredQuery) CountX(ctx context.Context) int
- func (c *ShredQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (_q *ShredQuery) Exist(ctx context.Context) (bool, error)
- func (_q *ShredQuery) ExistX(ctx context.Context) bool
- func (_q *ShredQuery) First(ctx context.Context) (*Shred, error)
- func (_q *ShredQuery) FirstID(ctx context.Context) (id int, err error)
- func (_q *ShredQuery) FirstIDX(ctx context.Context) int
- func (_q *ShredQuery) FirstX(ctx context.Context) *Shred
- func (_q *ShredQuery) ForShare(opts ...sql.LockOption) *ShredQuery
- func (_q *ShredQuery) ForUpdate(opts ...sql.LockOption) *ShredQuery
- func (_q *ShredQuery) GroupBy(field string, fields ...string) *ShredGroupBy
- func (_q *ShredQuery) IDs(ctx context.Context) (ids []int, err error)
- func (_q *ShredQuery) IDsX(ctx context.Context) []int
- func (_q *ShredQuery) Limit(limit int) *ShredQuery
- func (_q *ShredQuery) Offset(offset int) *ShredQuery
- func (_q *ShredQuery) Only(ctx context.Context) (*Shred, error)
- func (_q *ShredQuery) OnlyID(ctx context.Context) (id int, err error)
- func (_q *ShredQuery) OnlyIDX(ctx context.Context) int
- func (_q *ShredQuery) OnlyX(ctx context.Context) *Shred
- func (_q *ShredQuery) Order(o ...shred.OrderOption) *ShredQuery
- func (c *ShredQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (_q *ShredQuery) Select(fields ...string) *ShredSelect
- func (_q *ShredQuery) Unique(unique bool) *ShredQuery
- func (_q *ShredQuery) Where(ps ...predicate.Shred) *ShredQuery
- type ShredSelect
- func (_s *ShredSelect) Aggregate(fns ...AggregateFunc) *ShredSelect
- func (s *ShredSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *ShredSelect) BoolX(ctx context.Context) bool
- func (s *ShredSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *ShredSelect) BoolsX(ctx context.Context) []bool
- func (c ShredSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (s *ShredSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *ShredSelect) Float64X(ctx context.Context) float64
- func (s *ShredSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *ShredSelect) Float64sX(ctx context.Context) []float64
- func (s *ShredSelect) Int(ctx context.Context) (_ int, err error)
- func (s *ShredSelect) IntX(ctx context.Context) int
- func (s *ShredSelect) Ints(ctx context.Context) ([]int, error)
- func (s *ShredSelect) IntsX(ctx context.Context) []int
- func (c ShredSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (_s *ShredSelect) Scan(ctx context.Context, v any) error
- func (s *ShredSelect) ScanX(ctx context.Context, v any)
- func (s *ShredSelect) String(ctx context.Context) (_ string, err error)
- func (s *ShredSelect) StringX(ctx context.Context) string
- func (s *ShredSelect) Strings(ctx context.Context) ([]string, error)
- func (s *ShredSelect) StringsX(ctx context.Context) []string
- type ShredUpdate
- func (_u *ShredUpdate) AddDeks(v int) *ShredUpdate
- func (_u *ShredUpdate) AppendVersions(v []keyforge.KEKVersionRef) *ShredUpdate
- func (_u *ShredUpdate) ClearCompletedAt() *ShredUpdate
- func (_u *ShredUpdate) Exec(ctx context.Context) error
- func (c *ShredUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (_u *ShredUpdate) ExecX(ctx context.Context)
- func (_u *ShredUpdate) Mutation() *ShredMutation
- func (c *ShredUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (_u *ShredUpdate) Save(ctx context.Context) (int, error)
- func (_u *ShredUpdate) SaveX(ctx context.Context) int
- func (_u *ShredUpdate) SetCompletedAt(v time.Time) *ShredUpdate
- func (_u *ShredUpdate) SetDeks(v int) *ShredUpdate
- func (_u *ShredUpdate) SetNillableCompletedAt(v *time.Time) *ShredUpdate
- func (_u *ShredUpdate) SetNillableDeks(v *int) *ShredUpdate
- func (_u *ShredUpdate) SetNillablePurpose(v *string) *ShredUpdate
- func (_u *ShredUpdate) SetNillableRequestedAt(v *time.Time) *ShredUpdate
- func (_u *ShredUpdate) SetNillableSubject(v *string) *ShredUpdate
- func (_u *ShredUpdate) SetPurpose(v string) *ShredUpdate
- func (_u *ShredUpdate) SetRequestedAt(v time.Time) *ShredUpdate
- func (_u *ShredUpdate) SetSubject(v string) *ShredUpdate
- func (_u *ShredUpdate) SetVersions(v []keyforge.KEKVersionRef) *ShredUpdate
- func (_u *ShredUpdate) Where(ps ...predicate.Shred) *ShredUpdate
- type ShredUpdateOne
- func (_u *ShredUpdateOne) AddDeks(v int) *ShredUpdateOne
- func (_u *ShredUpdateOne) AppendVersions(v []keyforge.KEKVersionRef) *ShredUpdateOne
- func (_u *ShredUpdateOne) ClearCompletedAt() *ShredUpdateOne
- func (_u *ShredUpdateOne) Exec(ctx context.Context) error
- func (c *ShredUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (_u *ShredUpdateOne) ExecX(ctx context.Context)
- func (_u *ShredUpdateOne) Mutation() *ShredMutation
- func (c *ShredUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (_u *ShredUpdateOne) Save(ctx context.Context) (*Shred, error)
- func (_u *ShredUpdateOne) SaveX(ctx context.Context) *Shred
- func (_u *ShredUpdateOne) Select(field string, fields ...string) *ShredUpdateOne
- func (_u *ShredUpdateOne) SetCompletedAt(v time.Time) *ShredUpdateOne
- func (_u *ShredUpdateOne) SetDeks(v int) *ShredUpdateOne
- func (_u *ShredUpdateOne) SetNillableCompletedAt(v *time.Time) *ShredUpdateOne
- func (_u *ShredUpdateOne) SetNillableDeks(v *int) *ShredUpdateOne
- func (_u *ShredUpdateOne) SetNillablePurpose(v *string) *ShredUpdateOne
- func (_u *ShredUpdateOne) SetNillableRequestedAt(v *time.Time) *ShredUpdateOne
- func (_u *ShredUpdateOne) SetNillableSubject(v *string) *ShredUpdateOne
- func (_u *ShredUpdateOne) SetPurpose(v string) *ShredUpdateOne
- func (_u *ShredUpdateOne) SetRequestedAt(v time.Time) *ShredUpdateOne
- func (_u *ShredUpdateOne) SetSubject(v string) *ShredUpdateOne
- func (_u *ShredUpdateOne) SetVersions(v []keyforge.KEKVersionRef) *ShredUpdateOne
- func (_u *ShredUpdateOne) Where(ps ...predicate.Shred) *ShredUpdateOne
- type ShredUpsert
- func (u *ShredUpsert) AddDeks(v int) *ShredUpsert
- func (u *ShredUpsert) ClearCompletedAt() *ShredUpsert
- func (u *ShredUpsert) SetCompletedAt(v time.Time) *ShredUpsert
- func (u *ShredUpsert) SetDeks(v int) *ShredUpsert
- func (u *ShredUpsert) SetPurpose(v string) *ShredUpsert
- func (u *ShredUpsert) SetRequestedAt(v time.Time) *ShredUpsert
- func (u *ShredUpsert) SetSubject(v string) *ShredUpsert
- func (u *ShredUpsert) SetVersions(v []keyforge.KEKVersionRef) *ShredUpsert
- func (u *ShredUpsert) UpdateCompletedAt() *ShredUpsert
- func (u *ShredUpsert) UpdateDeks() *ShredUpsert
- func (u *ShredUpsert) UpdatePurpose() *ShredUpsert
- func (u *ShredUpsert) UpdateRequestedAt() *ShredUpsert
- func (u *ShredUpsert) UpdateSubject() *ShredUpsert
- func (u *ShredUpsert) UpdateVersions() *ShredUpsert
- type ShredUpsertBulk
- func (u *ShredUpsertBulk) AddDeks(v int) *ShredUpsertBulk
- func (u *ShredUpsertBulk) ClearCompletedAt() *ShredUpsertBulk
- func (u *ShredUpsertBulk) DoNothing() *ShredUpsertBulk
- func (u *ShredUpsertBulk) Exec(ctx context.Context) error
- func (u *ShredUpsertBulk) ExecX(ctx context.Context)
- func (u *ShredUpsertBulk) Ignore() *ShredUpsertBulk
- func (u *ShredUpsertBulk) SetCompletedAt(v time.Time) *ShredUpsertBulk
- func (u *ShredUpsertBulk) SetDeks(v int) *ShredUpsertBulk
- func (u *ShredUpsertBulk) SetPurpose(v string) *ShredUpsertBulk
- func (u *ShredUpsertBulk) SetRequestedAt(v time.Time) *ShredUpsertBulk
- func (u *ShredUpsertBulk) SetSubject(v string) *ShredUpsertBulk
- func (u *ShredUpsertBulk) SetVersions(v []keyforge.KEKVersionRef) *ShredUpsertBulk
- func (u *ShredUpsertBulk) Update(set func(*ShredUpsert)) *ShredUpsertBulk
- func (u *ShredUpsertBulk) UpdateCompletedAt() *ShredUpsertBulk
- func (u *ShredUpsertBulk) UpdateDeks() *ShredUpsertBulk
- func (u *ShredUpsertBulk) UpdateNewValues() *ShredUpsertBulk
- func (u *ShredUpsertBulk) UpdatePurpose() *ShredUpsertBulk
- func (u *ShredUpsertBulk) UpdateRequestedAt() *ShredUpsertBulk
- func (u *ShredUpsertBulk) UpdateSubject() *ShredUpsertBulk
- func (u *ShredUpsertBulk) UpdateVersions() *ShredUpsertBulk
- type ShredUpsertOne
- func (u *ShredUpsertOne) AddDeks(v int) *ShredUpsertOne
- func (u *ShredUpsertOne) ClearCompletedAt() *ShredUpsertOne
- func (u *ShredUpsertOne) DoNothing() *ShredUpsertOne
- func (u *ShredUpsertOne) Exec(ctx context.Context) error
- func (u *ShredUpsertOne) ExecX(ctx context.Context)
- func (u *ShredUpsertOne) ID(ctx context.Context) (id int, err error)
- func (u *ShredUpsertOne) IDX(ctx context.Context) int
- func (u *ShredUpsertOne) Ignore() *ShredUpsertOne
- func (u *ShredUpsertOne) SetCompletedAt(v time.Time) *ShredUpsertOne
- func (u *ShredUpsertOne) SetDeks(v int) *ShredUpsertOne
- func (u *ShredUpsertOne) SetPurpose(v string) *ShredUpsertOne
- func (u *ShredUpsertOne) SetRequestedAt(v time.Time) *ShredUpsertOne
- func (u *ShredUpsertOne) SetSubject(v string) *ShredUpsertOne
- func (u *ShredUpsertOne) SetVersions(v []keyforge.KEKVersionRef) *ShredUpsertOne
- func (u *ShredUpsertOne) Update(set func(*ShredUpsert)) *ShredUpsertOne
- func (u *ShredUpsertOne) UpdateCompletedAt() *ShredUpsertOne
- func (u *ShredUpsertOne) UpdateDeks() *ShredUpsertOne
- func (u *ShredUpsertOne) UpdateNewValues() *ShredUpsertOne
- func (u *ShredUpsertOne) UpdatePurpose() *ShredUpsertOne
- func (u *ShredUpsertOne) UpdateRequestedAt() *ShredUpsertOne
- func (u *ShredUpsertOne) UpdateSubject() *ShredUpsertOne
- func (u *ShredUpsertOne) UpdateVersions() *ShredUpsertOne
- type Shreds
- type TraverseFunc
- type Traverser
- type Tx
- func (tx *Tx) Client() *Client
- func (tx *Tx) Commit() error
- func (c *Tx) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (tx *Tx) OnCommit(f CommitHook)
- func (tx *Tx) OnRollback(f RollbackHook)
- func (c *Tx) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (tx *Tx) Rollback() error
- 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. TypeDataKey = "DataKey" TypeKEK = "KEK" TypeKEKVersion = "KEKVersion" TypeSentinel = "Sentinel" TypeShred = "Shred" )
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
// DataKey is the client for interacting with the DataKey builders.
DataKey *DataKeyClient
// KEK is the client for interacting with the KEK builders.
KEK *KEKClient
// KEKVersion is the client for interacting with the KEKVersion builders.
KEKVersion *KEKVersionClient
// Sentinel is the client for interacting with the Sentinel builders.
Sentinel *SentinelClient
// Shred is the client for interacting with the Shred builders.
Shred *ShredClient
// 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(). DataKey. Query(). Count(ctx)
func (*Client) ExecContext ¶
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*Client) Intercept ¶
func (c *Client) Intercept(interceptors ...Interceptor)
Intercept adds the query interceptors to all the entity clients. In order to add interceptors to a specific client, call: `client.Node.Intercept(...)`.
func (*Client) QueryContext ¶
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
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 DataKey ¶
type DataKey struct {
// ID of the ent.
ID envelope.ID `json:"id,omitempty"`
// Purpose holds the value of the "purpose" field.
Purpose string `json:"purpose,omitempty"`
// Subject holds the value of the "subject" field.
Subject string `json:"subject,omitempty"`
// Epoch holds the value of the "epoch" field.
Epoch uint32 `json:"epoch,omitempty"`
// Algorithm holds the value of the "algorithm" field.
Algorithm uint8 `json:"algorithm,omitempty"`
// KekID holds the value of the "kek_id" field.
KekID envelope.ID `json:"kek_id,omitempty"`
// KekVersion holds the value of the "kek_version" field.
KekVersion uint32 `json:"kek_version,omitempty"`
// Wrapped holds the value of the "wrapped" field.
Wrapped []byte `json:"wrapped,omitempty"`
// State holds the value of the "state" field.
State uint8 `json:"state,omitempty"`
// Reserved holds the value of the "reserved" field.
Reserved uint64 `json:"reserved,omitempty"`
// CreatedAt holds the value of the "created_at" field.
CreatedAt time.Time `json:"created_at,omitempty"`
// WrappedUnder holds the value of the "wrapped_under" field.
WrappedUnder []keyforge.KEKVersionRef `json:"wrapped_under,omitempty"`
// IsCurrent holds the value of the "is_current" field.
IsCurrent bool `json:"is_current,omitempty"`
// Edges holds the relations/edges for other nodes in the graph.
// The values are being populated by the DataKeyQuery when eager-loading is set.
Edges DataKeyEdges `json:"edges"`
// contains filtered or unexported fields
}
DataKey is the model entity for the DataKey schema.
func (*DataKey) ExecContext ¶
func (c *DataKey) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*DataKey) QueryContext ¶
func (c *DataKey) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*DataKey) Unwrap ¶
Unwrap unwraps the DataKey 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 (*DataKey) Update ¶
func (_m *DataKey) Update() *DataKeyUpdateOne
Update returns a builder for updating this DataKey. Note that you need to call DataKey.Unwrap() before calling this method if this DataKey was returned from a transaction, and the transaction was committed or rolled back.
type DataKeyClient ¶
type DataKeyClient struct {
// contains filtered or unexported fields
}
DataKeyClient is a client for the DataKey schema.
func NewDataKeyClient ¶
func NewDataKeyClient(c config) *DataKeyClient
NewDataKeyClient returns a client for the DataKey from the given config.
func (*DataKeyClient) Create ¶
func (c *DataKeyClient) Create() *DataKeyCreate
Create returns a builder for creating a DataKey entity.
func (*DataKeyClient) CreateBulk ¶
func (c *DataKeyClient) CreateBulk(builders ...*DataKeyCreate) *DataKeyCreateBulk
CreateBulk returns a builder for creating a bulk of DataKey entities.
func (*DataKeyClient) Delete ¶
func (c *DataKeyClient) Delete() *DataKeyDelete
Delete returns a delete builder for DataKey.
func (*DataKeyClient) DeleteOne ¶
func (c *DataKeyClient) DeleteOne(_m *DataKey) *DataKeyDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*DataKeyClient) DeleteOneID ¶
func (c *DataKeyClient) DeleteOneID(id envelope.ID) *DataKeyDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*DataKeyClient) ExecContext ¶
func (c *DataKeyClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*DataKeyClient) Hooks ¶
func (c *DataKeyClient) Hooks() []Hook
Hooks returns the client hooks.
func (*DataKeyClient) Intercept ¶
func (c *DataKeyClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `datakey.Intercept(f(g(h())))`.
func (*DataKeyClient) Interceptors ¶
func (c *DataKeyClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*DataKeyClient) MapCreateBulk ¶
func (c *DataKeyClient) MapCreateBulk(slice any, setFunc func(*DataKeyCreate, int)) *DataKeyCreateBulk
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 (*DataKeyClient) Query ¶
func (c *DataKeyClient) Query() *DataKeyQuery
Query returns a query builder for DataKey.
func (*DataKeyClient) QueryContext ¶
func (c *DataKeyClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*DataKeyClient) QueryKek ¶
func (c *DataKeyClient) QueryKek(_m *DataKey) *KEKQuery
QueryKek queries the kek edge of a DataKey.
func (*DataKeyClient) Update ¶
func (c *DataKeyClient) Update() *DataKeyUpdate
Update returns an update builder for DataKey.
func (*DataKeyClient) UpdateOne ¶
func (c *DataKeyClient) UpdateOne(_m *DataKey) *DataKeyUpdateOne
UpdateOne returns an update builder for the given entity.
func (*DataKeyClient) UpdateOneID ¶
func (c *DataKeyClient) UpdateOneID(id envelope.ID) *DataKeyUpdateOne
UpdateOneID returns an update builder for the given id.
func (*DataKeyClient) Use ¶
func (c *DataKeyClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `datakey.Hooks(f(g(h())))`.
type DataKeyCreate ¶
type DataKeyCreate struct {
// contains filtered or unexported fields
}
DataKeyCreate is the builder for creating a DataKey entity.
func (*DataKeyCreate) Exec ¶
func (_c *DataKeyCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*DataKeyCreate) ExecContext ¶
func (c *DataKeyCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*DataKeyCreate) ExecX ¶
func (_c *DataKeyCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DataKeyCreate) Mutation ¶
func (_c *DataKeyCreate) Mutation() *DataKeyMutation
Mutation returns the DataKeyMutation object of the builder.
func (*DataKeyCreate) OnConflict ¶
func (_c *DataKeyCreate) OnConflict(opts ...sql.ConflictOption) *DataKeyUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.DataKey.Create().
SetPurpose(v).
OnConflict(
// Update the row with the new values
// the was proposed for insertion.
sql.ResolveWithNewValues(),
).
// Override some of the fields with custom
// update values.
Update(func(u *ent.DataKeyUpsert) {
SetPurpose(v+v).
}).
Exec(ctx)
func (*DataKeyCreate) OnConflictColumns ¶
func (_c *DataKeyCreate) OnConflictColumns(columns ...string) *DataKeyUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.DataKey.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*DataKeyCreate) QueryContext ¶
func (c *DataKeyCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*DataKeyCreate) Save ¶
func (_c *DataKeyCreate) Save(ctx context.Context) (*DataKey, error)
Save creates the DataKey in the database.
func (*DataKeyCreate) SaveX ¶
func (_c *DataKeyCreate) SaveX(ctx context.Context) *DataKey
SaveX calls Save and panics if Save returns an error.
func (*DataKeyCreate) SetAlgorithm ¶
func (_c *DataKeyCreate) SetAlgorithm(v uint8) *DataKeyCreate
SetAlgorithm sets the "algorithm" field.
func (*DataKeyCreate) SetCreatedAt ¶
func (_c *DataKeyCreate) SetCreatedAt(v time.Time) *DataKeyCreate
SetCreatedAt sets the "created_at" field.
func (*DataKeyCreate) SetEpoch ¶
func (_c *DataKeyCreate) SetEpoch(v uint32) *DataKeyCreate
SetEpoch sets the "epoch" field.
func (*DataKeyCreate) SetID ¶
func (_c *DataKeyCreate) SetID(v envelope.ID) *DataKeyCreate
SetID sets the "id" field.
func (*DataKeyCreate) SetIsCurrent ¶
func (_c *DataKeyCreate) SetIsCurrent(v bool) *DataKeyCreate
SetIsCurrent sets the "is_current" field.
func (*DataKeyCreate) SetKek ¶
func (_c *DataKeyCreate) SetKek(v *KEK) *DataKeyCreate
SetKek sets the "kek" edge to the KEK entity.
func (*DataKeyCreate) SetKekID ¶
func (_c *DataKeyCreate) SetKekID(v envelope.ID) *DataKeyCreate
SetKekID sets the "kek_id" field.
func (*DataKeyCreate) SetKekVersion ¶
func (_c *DataKeyCreate) SetKekVersion(v uint32) *DataKeyCreate
SetKekVersion sets the "kek_version" field.
func (*DataKeyCreate) SetNillableIsCurrent ¶
func (_c *DataKeyCreate) SetNillableIsCurrent(v *bool) *DataKeyCreate
SetNillableIsCurrent sets the "is_current" field if the given value is not nil.
func (*DataKeyCreate) SetNillableReserved ¶
func (_c *DataKeyCreate) SetNillableReserved(v *uint64) *DataKeyCreate
SetNillableReserved sets the "reserved" field if the given value is not nil.
func (*DataKeyCreate) SetNillableSubject ¶
func (_c *DataKeyCreate) SetNillableSubject(v *string) *DataKeyCreate
SetNillableSubject sets the "subject" field if the given value is not nil.
func (*DataKeyCreate) SetPurpose ¶
func (_c *DataKeyCreate) SetPurpose(v string) *DataKeyCreate
SetPurpose sets the "purpose" field.
func (*DataKeyCreate) SetReserved ¶
func (_c *DataKeyCreate) SetReserved(v uint64) *DataKeyCreate
SetReserved sets the "reserved" field.
func (*DataKeyCreate) SetState ¶
func (_c *DataKeyCreate) SetState(v uint8) *DataKeyCreate
SetState sets the "state" field.
func (*DataKeyCreate) SetSubject ¶
func (_c *DataKeyCreate) SetSubject(v string) *DataKeyCreate
SetSubject sets the "subject" field.
func (*DataKeyCreate) SetWrapped ¶
func (_c *DataKeyCreate) SetWrapped(v []byte) *DataKeyCreate
SetWrapped sets the "wrapped" field.
func (*DataKeyCreate) SetWrappedUnder ¶
func (_c *DataKeyCreate) SetWrappedUnder(v []keyforge.KEKVersionRef) *DataKeyCreate
SetWrappedUnder sets the "wrapped_under" field.
type DataKeyCreateBulk ¶
type DataKeyCreateBulk struct {
// contains filtered or unexported fields
}
DataKeyCreateBulk is the builder for creating many DataKey entities in bulk.
func (*DataKeyCreateBulk) Exec ¶
func (_c *DataKeyCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*DataKeyCreateBulk) ExecContext ¶
func (c *DataKeyCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*DataKeyCreateBulk) ExecX ¶
func (_c *DataKeyCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DataKeyCreateBulk) OnConflict ¶
func (_c *DataKeyCreateBulk) OnConflict(opts ...sql.ConflictOption) *DataKeyUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.DataKey.CreateBulk(builders...).
OnConflict(
// Update the row with the new values
// the was proposed for insertion.
sql.ResolveWithNewValues(),
).
// Override some of the fields with custom
// update values.
Update(func(u *ent.DataKeyUpsert) {
SetPurpose(v+v).
}).
Exec(ctx)
func (*DataKeyCreateBulk) OnConflictColumns ¶
func (_c *DataKeyCreateBulk) OnConflictColumns(columns ...string) *DataKeyUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.DataKey.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*DataKeyCreateBulk) QueryContext ¶
func (c *DataKeyCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
type DataKeyDelete ¶
type DataKeyDelete struct {
// contains filtered or unexported fields
}
DataKeyDelete is the builder for deleting a DataKey entity.
func (*DataKeyDelete) Exec ¶
func (_d *DataKeyDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*DataKeyDelete) ExecContext ¶
func (c *DataKeyDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*DataKeyDelete) ExecX ¶
func (_d *DataKeyDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*DataKeyDelete) QueryContext ¶
func (c *DataKeyDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*DataKeyDelete) Where ¶
func (_d *DataKeyDelete) Where(ps ...predicate.DataKey) *DataKeyDelete
Where appends a list predicates to the DataKeyDelete builder.
type DataKeyDeleteOne ¶
type DataKeyDeleteOne struct {
// contains filtered or unexported fields
}
DataKeyDeleteOne is the builder for deleting a single DataKey entity.
func (*DataKeyDeleteOne) Exec ¶
func (_d *DataKeyDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*DataKeyDeleteOne) ExecX ¶
func (_d *DataKeyDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DataKeyDeleteOne) Where ¶
func (_d *DataKeyDeleteOne) Where(ps ...predicate.DataKey) *DataKeyDeleteOne
Where appends a list predicates to the DataKeyDelete builder.
type DataKeyEdges ¶
type DataKeyEdges struct {
// Kek holds the value of the kek edge.
Kek *KEK `json:"kek,omitempty"`
// contains filtered or unexported fields
}
DataKeyEdges holds the relations/edges for other nodes in the graph.
func (DataKeyEdges) KekOrErr ¶
func (e DataKeyEdges) KekOrErr() (*KEK, error)
KekOrErr returns the Kek value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type DataKeyGroupBy ¶
type DataKeyGroupBy struct {
// contains filtered or unexported fields
}
DataKeyGroupBy is the group-by builder for DataKey entities.
func (*DataKeyGroupBy) Aggregate ¶
func (_g *DataKeyGroupBy) Aggregate(fns ...AggregateFunc) *DataKeyGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*DataKeyGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*DataKeyGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*DataKeyGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*DataKeyGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*DataKeyGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*DataKeyGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*DataKeyGroupBy) Scan ¶
func (_g *DataKeyGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*DataKeyGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type DataKeyMutation ¶
type DataKeyMutation struct {
// contains filtered or unexported fields
}
DataKeyMutation represents an operation that mutates the DataKey nodes in the graph.
func (*DataKeyMutation) AddAlgorithm ¶
func (m *DataKeyMutation) AddAlgorithm(u int8)
AddAlgorithm adds u to the "algorithm" field.
func (*DataKeyMutation) AddEpoch ¶
func (m *DataKeyMutation) AddEpoch(u int32)
AddEpoch adds u to the "epoch" field.
func (*DataKeyMutation) AddField ¶
func (m *DataKeyMutation) 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 (*DataKeyMutation) AddKekVersion ¶
func (m *DataKeyMutation) AddKekVersion(u int32)
AddKekVersion adds u to the "kek_version" field.
func (*DataKeyMutation) AddReserved ¶
func (m *DataKeyMutation) AddReserved(u int64)
AddReserved adds u to the "reserved" field.
func (*DataKeyMutation) AddState ¶
func (m *DataKeyMutation) AddState(u int8)
AddState adds u to the "state" field.
func (*DataKeyMutation) AddedAlgorithm ¶
func (m *DataKeyMutation) AddedAlgorithm() (r int8, exists bool)
AddedAlgorithm returns the value that was added to the "algorithm" field in this mutation.
func (*DataKeyMutation) AddedEdges ¶
func (m *DataKeyMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*DataKeyMutation) AddedEpoch ¶
func (m *DataKeyMutation) AddedEpoch() (r int32, exists bool)
AddedEpoch returns the value that was added to the "epoch" field in this mutation.
func (*DataKeyMutation) AddedField ¶
func (m *DataKeyMutation) 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 (*DataKeyMutation) AddedFields ¶
func (m *DataKeyMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*DataKeyMutation) AddedIDs ¶
func (m *DataKeyMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*DataKeyMutation) AddedKekVersion ¶
func (m *DataKeyMutation) AddedKekVersion() (r int32, exists bool)
AddedKekVersion returns the value that was added to the "kek_version" field in this mutation.
func (*DataKeyMutation) AddedReserved ¶
func (m *DataKeyMutation) AddedReserved() (r int64, exists bool)
AddedReserved returns the value that was added to the "reserved" field in this mutation.
func (*DataKeyMutation) AddedState ¶
func (m *DataKeyMutation) AddedState() (r int8, exists bool)
AddedState returns the value that was added to the "state" field in this mutation.
func (*DataKeyMutation) Algorithm ¶
func (m *DataKeyMutation) Algorithm() (r uint8, exists bool)
Algorithm returns the value of the "algorithm" field in the mutation.
func (*DataKeyMutation) AppendWrappedUnder ¶
func (m *DataKeyMutation) AppendWrappedUnder(kvr []keyforge.KEKVersionRef)
AppendWrappedUnder adds kvr to the "wrapped_under" field.
func (*DataKeyMutation) AppendedWrappedUnder ¶
func (m *DataKeyMutation) AppendedWrappedUnder() ([]keyforge.KEKVersionRef, bool)
AppendedWrappedUnder returns the list of values that were appended to the "wrapped_under" field in this mutation.
func (*DataKeyMutation) ClearEdge ¶
func (m *DataKeyMutation) 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 (*DataKeyMutation) ClearField ¶
func (m *DataKeyMutation) 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 (*DataKeyMutation) ClearKek ¶
func (m *DataKeyMutation) ClearKek()
ClearKek clears the "kek" edge to the KEK entity.
func (*DataKeyMutation) ClearWrapped ¶
func (m *DataKeyMutation) ClearWrapped()
ClearWrapped clears the value of the "wrapped" field.
func (*DataKeyMutation) ClearedEdges ¶
func (m *DataKeyMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*DataKeyMutation) ClearedFields ¶
func (m *DataKeyMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (DataKeyMutation) Client ¶
func (m DataKeyMutation) 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 (*DataKeyMutation) CreatedAt ¶
func (m *DataKeyMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*DataKeyMutation) EdgeCleared ¶
func (m *DataKeyMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*DataKeyMutation) Epoch ¶
func (m *DataKeyMutation) Epoch() (r uint32, exists bool)
Epoch returns the value of the "epoch" field in the mutation.
func (*DataKeyMutation) ExecContext ¶
func (c *DataKeyMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*DataKeyMutation) Field ¶
func (m *DataKeyMutation) 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 (*DataKeyMutation) FieldCleared ¶
func (m *DataKeyMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*DataKeyMutation) Fields ¶
func (m *DataKeyMutation) 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 (*DataKeyMutation) ID ¶
func (m *DataKeyMutation) ID() (id envelope.ID, 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 (*DataKeyMutation) IDs ¶
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*DataKeyMutation) IsCurrent ¶
func (m *DataKeyMutation) IsCurrent() (r bool, exists bool)
IsCurrent returns the value of the "is_current" field in the mutation.
func (*DataKeyMutation) KekCleared ¶
func (m *DataKeyMutation) KekCleared() bool
KekCleared reports if the "kek" edge to the KEK entity was cleared.
func (*DataKeyMutation) KekID ¶
func (m *DataKeyMutation) KekID() (r envelope.ID, exists bool)
KekID returns the value of the "kek_id" field in the mutation.
func (*DataKeyMutation) KekIDs ¶
func (m *DataKeyMutation) KekIDs() (ids []envelope.ID)
KekIDs returns the "kek" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use KekID instead. It exists only for internal usage by the builders.
func (*DataKeyMutation) KekVersion ¶
func (m *DataKeyMutation) KekVersion() (r uint32, exists bool)
KekVersion returns the value of the "kek_version" field in the mutation.
func (*DataKeyMutation) OldAlgorithm ¶
func (m *DataKeyMutation) OldAlgorithm(ctx context.Context) (v uint8, err error)
OldAlgorithm returns the old "algorithm" field's value of the DataKey entity. If the DataKey object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*DataKeyMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the DataKey entity. If the DataKey object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*DataKeyMutation) OldEpoch ¶
func (m *DataKeyMutation) OldEpoch(ctx context.Context) (v uint32, err error)
OldEpoch returns the old "epoch" field's value of the DataKey entity. If the DataKey object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*DataKeyMutation) 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 (*DataKeyMutation) OldIsCurrent ¶
func (m *DataKeyMutation) OldIsCurrent(ctx context.Context) (v bool, err error)
OldIsCurrent returns the old "is_current" field's value of the DataKey entity. If the DataKey object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*DataKeyMutation) OldKekID ¶
OldKekID returns the old "kek_id" field's value of the DataKey entity. If the DataKey object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*DataKeyMutation) OldKekVersion ¶
func (m *DataKeyMutation) OldKekVersion(ctx context.Context) (v uint32, err error)
OldKekVersion returns the old "kek_version" field's value of the DataKey entity. If the DataKey object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*DataKeyMutation) OldPurpose ¶
func (m *DataKeyMutation) OldPurpose(ctx context.Context) (v string, err error)
OldPurpose returns the old "purpose" field's value of the DataKey entity. If the DataKey object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*DataKeyMutation) OldReserved ¶
func (m *DataKeyMutation) OldReserved(ctx context.Context) (v uint64, err error)
OldReserved returns the old "reserved" field's value of the DataKey entity. If the DataKey object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*DataKeyMutation) OldState ¶
func (m *DataKeyMutation) OldState(ctx context.Context) (v uint8, err error)
OldState returns the old "state" field's value of the DataKey entity. If the DataKey object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*DataKeyMutation) OldSubject ¶
func (m *DataKeyMutation) OldSubject(ctx context.Context) (v string, err error)
OldSubject returns the old "subject" field's value of the DataKey entity. If the DataKey object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*DataKeyMutation) OldWrapped ¶
func (m *DataKeyMutation) OldWrapped(ctx context.Context) (v []byte, err error)
OldWrapped returns the old "wrapped" field's value of the DataKey entity. If the DataKey object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*DataKeyMutation) OldWrappedUnder ¶
func (m *DataKeyMutation) OldWrappedUnder(ctx context.Context) (v []keyforge.KEKVersionRef, err error)
OldWrappedUnder returns the old "wrapped_under" field's value of the DataKey entity. If the DataKey object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*DataKeyMutation) Purpose ¶
func (m *DataKeyMutation) Purpose() (r string, exists bool)
Purpose returns the value of the "purpose" field in the mutation.
func (*DataKeyMutation) QueryContext ¶
func (c *DataKeyMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*DataKeyMutation) RemovedEdges ¶
func (m *DataKeyMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*DataKeyMutation) RemovedIDs ¶
func (m *DataKeyMutation) 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 (*DataKeyMutation) Reserved ¶
func (m *DataKeyMutation) Reserved() (r uint64, exists bool)
Reserved returns the value of the "reserved" field in the mutation.
func (*DataKeyMutation) ResetAlgorithm ¶
func (m *DataKeyMutation) ResetAlgorithm()
ResetAlgorithm resets all changes to the "algorithm" field.
func (*DataKeyMutation) ResetCreatedAt ¶
func (m *DataKeyMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*DataKeyMutation) ResetEdge ¶
func (m *DataKeyMutation) 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 (*DataKeyMutation) ResetEpoch ¶
func (m *DataKeyMutation) ResetEpoch()
ResetEpoch resets all changes to the "epoch" field.
func (*DataKeyMutation) ResetField ¶
func (m *DataKeyMutation) 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 (*DataKeyMutation) ResetIsCurrent ¶
func (m *DataKeyMutation) ResetIsCurrent()
ResetIsCurrent resets all changes to the "is_current" field.
func (*DataKeyMutation) ResetKek ¶
func (m *DataKeyMutation) ResetKek()
ResetKek resets all changes to the "kek" edge.
func (*DataKeyMutation) ResetKekID ¶
func (m *DataKeyMutation) ResetKekID()
ResetKekID resets all changes to the "kek_id" field.
func (*DataKeyMutation) ResetKekVersion ¶
func (m *DataKeyMutation) ResetKekVersion()
ResetKekVersion resets all changes to the "kek_version" field.
func (*DataKeyMutation) ResetPurpose ¶
func (m *DataKeyMutation) ResetPurpose()
ResetPurpose resets all changes to the "purpose" field.
func (*DataKeyMutation) ResetReserved ¶
func (m *DataKeyMutation) ResetReserved()
ResetReserved resets all changes to the "reserved" field.
func (*DataKeyMutation) ResetState ¶
func (m *DataKeyMutation) ResetState()
ResetState resets all changes to the "state" field.
func (*DataKeyMutation) ResetSubject ¶
func (m *DataKeyMutation) ResetSubject()
ResetSubject resets all changes to the "subject" field.
func (*DataKeyMutation) ResetWrapped ¶
func (m *DataKeyMutation) ResetWrapped()
ResetWrapped resets all changes to the "wrapped" field.
func (*DataKeyMutation) ResetWrappedUnder ¶
func (m *DataKeyMutation) ResetWrappedUnder()
ResetWrappedUnder resets all changes to the "wrapped_under" field.
func (*DataKeyMutation) SetAlgorithm ¶
func (m *DataKeyMutation) SetAlgorithm(u uint8)
SetAlgorithm sets the "algorithm" field.
func (*DataKeyMutation) SetCreatedAt ¶
func (m *DataKeyMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*DataKeyMutation) SetEpoch ¶
func (m *DataKeyMutation) SetEpoch(u uint32)
SetEpoch sets the "epoch" field.
func (*DataKeyMutation) SetField ¶
func (m *DataKeyMutation) 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 (*DataKeyMutation) SetID ¶
func (m *DataKeyMutation) SetID(id envelope.ID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of DataKey entities.
func (*DataKeyMutation) SetIsCurrent ¶
func (m *DataKeyMutation) SetIsCurrent(b bool)
SetIsCurrent sets the "is_current" field.
func (*DataKeyMutation) SetKekID ¶
func (m *DataKeyMutation) SetKekID(e envelope.ID)
SetKekID sets the "kek_id" field.
func (*DataKeyMutation) SetKekVersion ¶
func (m *DataKeyMutation) SetKekVersion(u uint32)
SetKekVersion sets the "kek_version" field.
func (*DataKeyMutation) SetOp ¶
func (m *DataKeyMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*DataKeyMutation) SetPurpose ¶
func (m *DataKeyMutation) SetPurpose(s string)
SetPurpose sets the "purpose" field.
func (*DataKeyMutation) SetReserved ¶
func (m *DataKeyMutation) SetReserved(u uint64)
SetReserved sets the "reserved" field.
func (*DataKeyMutation) SetState ¶
func (m *DataKeyMutation) SetState(u uint8)
SetState sets the "state" field.
func (*DataKeyMutation) SetSubject ¶
func (m *DataKeyMutation) SetSubject(s string)
SetSubject sets the "subject" field.
func (*DataKeyMutation) SetWrapped ¶
func (m *DataKeyMutation) SetWrapped(b []byte)
SetWrapped sets the "wrapped" field.
func (*DataKeyMutation) SetWrappedUnder ¶
func (m *DataKeyMutation) SetWrappedUnder(kvr []keyforge.KEKVersionRef)
SetWrappedUnder sets the "wrapped_under" field.
func (*DataKeyMutation) State ¶
func (m *DataKeyMutation) State() (r uint8, exists bool)
State returns the value of the "state" field in the mutation.
func (*DataKeyMutation) Subject ¶
func (m *DataKeyMutation) Subject() (r string, exists bool)
Subject returns the value of the "subject" field in the mutation.
func (DataKeyMutation) Tx ¶
func (m DataKeyMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*DataKeyMutation) Type ¶
func (m *DataKeyMutation) Type() string
Type returns the node type of this mutation (DataKey).
func (*DataKeyMutation) Where ¶
func (m *DataKeyMutation) Where(ps ...predicate.DataKey)
Where appends a list predicates to the DataKeyMutation builder.
func (*DataKeyMutation) WhereP ¶
func (m *DataKeyMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the DataKeyMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
func (*DataKeyMutation) Wrapped ¶
func (m *DataKeyMutation) Wrapped() (r []byte, exists bool)
Wrapped returns the value of the "wrapped" field in the mutation.
func (*DataKeyMutation) WrappedCleared ¶
func (m *DataKeyMutation) WrappedCleared() bool
WrappedCleared returns if the "wrapped" field was cleared in this mutation.
func (*DataKeyMutation) WrappedUnder ¶
func (m *DataKeyMutation) WrappedUnder() (r []keyforge.KEKVersionRef, exists bool)
WrappedUnder returns the value of the "wrapped_under" field in the mutation.
type DataKeyQuery ¶
type DataKeyQuery struct {
// contains filtered or unexported fields
}
DataKeyQuery is the builder for querying DataKey entities.
func (*DataKeyQuery) Aggregate ¶
func (_q *DataKeyQuery) Aggregate(fns ...AggregateFunc) *DataKeySelect
Aggregate returns a DataKeySelect configured with the given aggregations.
func (*DataKeyQuery) All ¶
func (_q *DataKeyQuery) All(ctx context.Context) ([]*DataKey, error)
All executes the query and returns a list of DataKeys.
func (*DataKeyQuery) AllX ¶
func (_q *DataKeyQuery) AllX(ctx context.Context) []*DataKey
AllX is like All, but panics if an error occurs.
func (*DataKeyQuery) Clone ¶
func (_q *DataKeyQuery) Clone() *DataKeyQuery
Clone returns a duplicate of the DataKeyQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*DataKeyQuery) Count ¶
func (_q *DataKeyQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*DataKeyQuery) CountX ¶
func (_q *DataKeyQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*DataKeyQuery) ExecContext ¶
func (c *DataKeyQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*DataKeyQuery) Exist ¶
func (_q *DataKeyQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*DataKeyQuery) ExistX ¶
func (_q *DataKeyQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*DataKeyQuery) First ¶
func (_q *DataKeyQuery) First(ctx context.Context) (*DataKey, error)
First returns the first DataKey entity from the query. Returns a *NotFoundError when no DataKey was found.
func (*DataKeyQuery) FirstID ¶
FirstID returns the first DataKey ID from the query. Returns a *NotFoundError when no DataKey ID was found.
func (*DataKeyQuery) FirstIDX ¶
func (_q *DataKeyQuery) FirstIDX(ctx context.Context) envelope.ID
FirstIDX is like FirstID, but panics if an error occurs.
func (*DataKeyQuery) FirstX ¶
func (_q *DataKeyQuery) FirstX(ctx context.Context) *DataKey
FirstX is like First, but panics if an error occurs.
func (*DataKeyQuery) ForShare ¶
func (_q *DataKeyQuery) ForShare(opts ...sql.LockOption) *DataKeyQuery
ForShare behaves similarly to ForUpdate, except that it acquires a shared mode lock on any rows that are read. Other sessions can read the rows, but cannot modify them until your transaction commits.
func (*DataKeyQuery) ForUpdate ¶
func (_q *DataKeyQuery) ForUpdate(opts ...sql.LockOption) *DataKeyQuery
ForUpdate locks the selected rows against concurrent updates, and prevent them from being updated, deleted or "selected ... for update" by other sessions, until the transaction is either committed or rolled-back.
func (*DataKeyQuery) GroupBy ¶
func (_q *DataKeyQuery) GroupBy(field string, fields ...string) *DataKeyGroupBy
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 {
Purpose string `json:"purpose,omitempty"`
Count int `json:"count,omitempty"`
}
client.DataKey.Query().
GroupBy(datakey.FieldPurpose).
Aggregate(ent.Count()).
Scan(ctx, &v)
func (*DataKeyQuery) IDsX ¶
func (_q *DataKeyQuery) IDsX(ctx context.Context) []envelope.ID
IDsX is like IDs, but panics if an error occurs.
func (*DataKeyQuery) Limit ¶
func (_q *DataKeyQuery) Limit(limit int) *DataKeyQuery
Limit the number of records to be returned by this query.
func (*DataKeyQuery) Offset ¶
func (_q *DataKeyQuery) Offset(offset int) *DataKeyQuery
Offset to start from.
func (*DataKeyQuery) Only ¶
func (_q *DataKeyQuery) Only(ctx context.Context) (*DataKey, error)
Only returns a single DataKey entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one DataKey entity is found. Returns a *NotFoundError when no DataKey entities are found.
func (*DataKeyQuery) OnlyID ¶
OnlyID is like Only, but returns the only DataKey ID in the query. Returns a *NotSingularError when more than one DataKey ID is found. Returns a *NotFoundError when no entities are found.
func (*DataKeyQuery) OnlyIDX ¶
func (_q *DataKeyQuery) OnlyIDX(ctx context.Context) envelope.ID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*DataKeyQuery) OnlyX ¶
func (_q *DataKeyQuery) OnlyX(ctx context.Context) *DataKey
OnlyX is like Only, but panics if an error occurs.
func (*DataKeyQuery) Order ¶
func (_q *DataKeyQuery) Order(o ...datakey.OrderOption) *DataKeyQuery
Order specifies how the records should be ordered.
func (*DataKeyQuery) QueryContext ¶
func (c *DataKeyQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*DataKeyQuery) QueryKek ¶
func (_q *DataKeyQuery) QueryKek() *KEKQuery
QueryKek chains the current query on the "kek" edge.
func (*DataKeyQuery) Select ¶
func (_q *DataKeyQuery) Select(fields ...string) *DataKeySelect
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 {
Purpose string `json:"purpose,omitempty"`
}
client.DataKey.Query().
Select(datakey.FieldPurpose).
Scan(ctx, &v)
func (*DataKeyQuery) Unique ¶
func (_q *DataKeyQuery) Unique(unique bool) *DataKeyQuery
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 (*DataKeyQuery) Where ¶
func (_q *DataKeyQuery) Where(ps ...predicate.DataKey) *DataKeyQuery
Where adds a new predicate for the DataKeyQuery builder.
func (*DataKeyQuery) WithKek ¶
func (_q *DataKeyQuery) WithKek(opts ...func(*KEKQuery)) *DataKeyQuery
WithKek tells the query-builder to eager-load the nodes that are connected to the "kek" edge. The optional arguments are used to configure the query builder of the edge.
type DataKeySelect ¶
type DataKeySelect struct {
*DataKeyQuery
// contains filtered or unexported fields
}
DataKeySelect is the builder for selecting fields of DataKey entities.
func (*DataKeySelect) Aggregate ¶
func (_s *DataKeySelect) Aggregate(fns ...AggregateFunc) *DataKeySelect
Aggregate adds the given aggregation functions to the selector query.
func (*DataKeySelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*DataKeySelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (DataKeySelect) ExecContext ¶
func (c DataKeySelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*DataKeySelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*DataKeySelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*DataKeySelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*DataKeySelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (DataKeySelect) QueryContext ¶
func (c DataKeySelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*DataKeySelect) Scan ¶
func (_s *DataKeySelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*DataKeySelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type DataKeyUpdate ¶
type DataKeyUpdate struct {
// contains filtered or unexported fields
}
DataKeyUpdate is the builder for updating DataKey entities.
func (*DataKeyUpdate) AddAlgorithm ¶
func (_u *DataKeyUpdate) AddAlgorithm(v int8) *DataKeyUpdate
AddAlgorithm adds value to the "algorithm" field.
func (*DataKeyUpdate) AddEpoch ¶
func (_u *DataKeyUpdate) AddEpoch(v int32) *DataKeyUpdate
AddEpoch adds value to the "epoch" field.
func (*DataKeyUpdate) AddKekVersion ¶
func (_u *DataKeyUpdate) AddKekVersion(v int32) *DataKeyUpdate
AddKekVersion adds value to the "kek_version" field.
func (*DataKeyUpdate) AddReserved ¶
func (_u *DataKeyUpdate) AddReserved(v int64) *DataKeyUpdate
AddReserved adds value to the "reserved" field.
func (*DataKeyUpdate) AddState ¶
func (_u *DataKeyUpdate) AddState(v int8) *DataKeyUpdate
AddState adds value to the "state" field.
func (*DataKeyUpdate) AppendWrappedUnder ¶
func (_u *DataKeyUpdate) AppendWrappedUnder(v []keyforge.KEKVersionRef) *DataKeyUpdate
AppendWrappedUnder appends value to the "wrapped_under" field.
func (*DataKeyUpdate) ClearKek ¶
func (_u *DataKeyUpdate) ClearKek() *DataKeyUpdate
ClearKek clears the "kek" edge to the KEK entity.
func (*DataKeyUpdate) ClearWrapped ¶
func (_u *DataKeyUpdate) ClearWrapped() *DataKeyUpdate
ClearWrapped clears the value of the "wrapped" field.
func (*DataKeyUpdate) Exec ¶
func (_u *DataKeyUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*DataKeyUpdate) ExecContext ¶
func (c *DataKeyUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*DataKeyUpdate) ExecX ¶
func (_u *DataKeyUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DataKeyUpdate) Mutation ¶
func (_u *DataKeyUpdate) Mutation() *DataKeyMutation
Mutation returns the DataKeyMutation object of the builder.
func (*DataKeyUpdate) QueryContext ¶
func (c *DataKeyUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*DataKeyUpdate) Save ¶
func (_u *DataKeyUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*DataKeyUpdate) SaveX ¶
func (_u *DataKeyUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*DataKeyUpdate) SetAlgorithm ¶
func (_u *DataKeyUpdate) SetAlgorithm(v uint8) *DataKeyUpdate
SetAlgorithm sets the "algorithm" field.
func (*DataKeyUpdate) SetCreatedAt ¶
func (_u *DataKeyUpdate) SetCreatedAt(v time.Time) *DataKeyUpdate
SetCreatedAt sets the "created_at" field.
func (*DataKeyUpdate) SetEpoch ¶
func (_u *DataKeyUpdate) SetEpoch(v uint32) *DataKeyUpdate
SetEpoch sets the "epoch" field.
func (*DataKeyUpdate) SetIsCurrent ¶
func (_u *DataKeyUpdate) SetIsCurrent(v bool) *DataKeyUpdate
SetIsCurrent sets the "is_current" field.
func (*DataKeyUpdate) SetKek ¶
func (_u *DataKeyUpdate) SetKek(v *KEK) *DataKeyUpdate
SetKek sets the "kek" edge to the KEK entity.
func (*DataKeyUpdate) SetKekID ¶
func (_u *DataKeyUpdate) SetKekID(v envelope.ID) *DataKeyUpdate
SetKekID sets the "kek_id" field.
func (*DataKeyUpdate) SetKekVersion ¶
func (_u *DataKeyUpdate) SetKekVersion(v uint32) *DataKeyUpdate
SetKekVersion sets the "kek_version" field.
func (*DataKeyUpdate) SetNillableAlgorithm ¶
func (_u *DataKeyUpdate) SetNillableAlgorithm(v *uint8) *DataKeyUpdate
SetNillableAlgorithm sets the "algorithm" field if the given value is not nil.
func (*DataKeyUpdate) SetNillableCreatedAt ¶
func (_u *DataKeyUpdate) SetNillableCreatedAt(v *time.Time) *DataKeyUpdate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*DataKeyUpdate) SetNillableEpoch ¶
func (_u *DataKeyUpdate) SetNillableEpoch(v *uint32) *DataKeyUpdate
SetNillableEpoch sets the "epoch" field if the given value is not nil.
func (*DataKeyUpdate) SetNillableIsCurrent ¶
func (_u *DataKeyUpdate) SetNillableIsCurrent(v *bool) *DataKeyUpdate
SetNillableIsCurrent sets the "is_current" field if the given value is not nil.
func (*DataKeyUpdate) SetNillableKekID ¶
func (_u *DataKeyUpdate) SetNillableKekID(v *envelope.ID) *DataKeyUpdate
SetNillableKekID sets the "kek_id" field if the given value is not nil.
func (*DataKeyUpdate) SetNillableKekVersion ¶
func (_u *DataKeyUpdate) SetNillableKekVersion(v *uint32) *DataKeyUpdate
SetNillableKekVersion sets the "kek_version" field if the given value is not nil.
func (*DataKeyUpdate) SetNillablePurpose ¶
func (_u *DataKeyUpdate) SetNillablePurpose(v *string) *DataKeyUpdate
SetNillablePurpose sets the "purpose" field if the given value is not nil.
func (*DataKeyUpdate) SetNillableReserved ¶
func (_u *DataKeyUpdate) SetNillableReserved(v *uint64) *DataKeyUpdate
SetNillableReserved sets the "reserved" field if the given value is not nil.
func (*DataKeyUpdate) SetNillableState ¶
func (_u *DataKeyUpdate) SetNillableState(v *uint8) *DataKeyUpdate
SetNillableState sets the "state" field if the given value is not nil.
func (*DataKeyUpdate) SetNillableSubject ¶
func (_u *DataKeyUpdate) SetNillableSubject(v *string) *DataKeyUpdate
SetNillableSubject sets the "subject" field if the given value is not nil.
func (*DataKeyUpdate) SetPurpose ¶
func (_u *DataKeyUpdate) SetPurpose(v string) *DataKeyUpdate
SetPurpose sets the "purpose" field.
func (*DataKeyUpdate) SetReserved ¶
func (_u *DataKeyUpdate) SetReserved(v uint64) *DataKeyUpdate
SetReserved sets the "reserved" field.
func (*DataKeyUpdate) SetState ¶
func (_u *DataKeyUpdate) SetState(v uint8) *DataKeyUpdate
SetState sets the "state" field.
func (*DataKeyUpdate) SetSubject ¶
func (_u *DataKeyUpdate) SetSubject(v string) *DataKeyUpdate
SetSubject sets the "subject" field.
func (*DataKeyUpdate) SetWrapped ¶
func (_u *DataKeyUpdate) SetWrapped(v []byte) *DataKeyUpdate
SetWrapped sets the "wrapped" field.
func (*DataKeyUpdate) SetWrappedUnder ¶
func (_u *DataKeyUpdate) SetWrappedUnder(v []keyforge.KEKVersionRef) *DataKeyUpdate
SetWrappedUnder sets the "wrapped_under" field.
func (*DataKeyUpdate) Where ¶
func (_u *DataKeyUpdate) Where(ps ...predicate.DataKey) *DataKeyUpdate
Where appends a list predicates to the DataKeyUpdate builder.
type DataKeyUpdateOne ¶
type DataKeyUpdateOne struct {
// contains filtered or unexported fields
}
DataKeyUpdateOne is the builder for updating a single DataKey entity.
func (*DataKeyUpdateOne) AddAlgorithm ¶
func (_u *DataKeyUpdateOne) AddAlgorithm(v int8) *DataKeyUpdateOne
AddAlgorithm adds value to the "algorithm" field.
func (*DataKeyUpdateOne) AddEpoch ¶
func (_u *DataKeyUpdateOne) AddEpoch(v int32) *DataKeyUpdateOne
AddEpoch adds value to the "epoch" field.
func (*DataKeyUpdateOne) AddKekVersion ¶
func (_u *DataKeyUpdateOne) AddKekVersion(v int32) *DataKeyUpdateOne
AddKekVersion adds value to the "kek_version" field.
func (*DataKeyUpdateOne) AddReserved ¶
func (_u *DataKeyUpdateOne) AddReserved(v int64) *DataKeyUpdateOne
AddReserved adds value to the "reserved" field.
func (*DataKeyUpdateOne) AddState ¶
func (_u *DataKeyUpdateOne) AddState(v int8) *DataKeyUpdateOne
AddState adds value to the "state" field.
func (*DataKeyUpdateOne) AppendWrappedUnder ¶
func (_u *DataKeyUpdateOne) AppendWrappedUnder(v []keyforge.KEKVersionRef) *DataKeyUpdateOne
AppendWrappedUnder appends value to the "wrapped_under" field.
func (*DataKeyUpdateOne) ClearKek ¶
func (_u *DataKeyUpdateOne) ClearKek() *DataKeyUpdateOne
ClearKek clears the "kek" edge to the KEK entity.
func (*DataKeyUpdateOne) ClearWrapped ¶
func (_u *DataKeyUpdateOne) ClearWrapped() *DataKeyUpdateOne
ClearWrapped clears the value of the "wrapped" field.
func (*DataKeyUpdateOne) Exec ¶
func (_u *DataKeyUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*DataKeyUpdateOne) ExecContext ¶
func (c *DataKeyUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*DataKeyUpdateOne) ExecX ¶
func (_u *DataKeyUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DataKeyUpdateOne) Mutation ¶
func (_u *DataKeyUpdateOne) Mutation() *DataKeyMutation
Mutation returns the DataKeyMutation object of the builder.
func (*DataKeyUpdateOne) QueryContext ¶
func (c *DataKeyUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*DataKeyUpdateOne) Save ¶
func (_u *DataKeyUpdateOne) Save(ctx context.Context) (*DataKey, error)
Save executes the query and returns the updated DataKey entity.
func (*DataKeyUpdateOne) SaveX ¶
func (_u *DataKeyUpdateOne) SaveX(ctx context.Context) *DataKey
SaveX is like Save, but panics if an error occurs.
func (*DataKeyUpdateOne) Select ¶
func (_u *DataKeyUpdateOne) Select(field string, fields ...string) *DataKeyUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*DataKeyUpdateOne) SetAlgorithm ¶
func (_u *DataKeyUpdateOne) SetAlgorithm(v uint8) *DataKeyUpdateOne
SetAlgorithm sets the "algorithm" field.
func (*DataKeyUpdateOne) SetCreatedAt ¶
func (_u *DataKeyUpdateOne) SetCreatedAt(v time.Time) *DataKeyUpdateOne
SetCreatedAt sets the "created_at" field.
func (*DataKeyUpdateOne) SetEpoch ¶
func (_u *DataKeyUpdateOne) SetEpoch(v uint32) *DataKeyUpdateOne
SetEpoch sets the "epoch" field.
func (*DataKeyUpdateOne) SetIsCurrent ¶
func (_u *DataKeyUpdateOne) SetIsCurrent(v bool) *DataKeyUpdateOne
SetIsCurrent sets the "is_current" field.
func (*DataKeyUpdateOne) SetKek ¶
func (_u *DataKeyUpdateOne) SetKek(v *KEK) *DataKeyUpdateOne
SetKek sets the "kek" edge to the KEK entity.
func (*DataKeyUpdateOne) SetKekID ¶
func (_u *DataKeyUpdateOne) SetKekID(v envelope.ID) *DataKeyUpdateOne
SetKekID sets the "kek_id" field.
func (*DataKeyUpdateOne) SetKekVersion ¶
func (_u *DataKeyUpdateOne) SetKekVersion(v uint32) *DataKeyUpdateOne
SetKekVersion sets the "kek_version" field.
func (*DataKeyUpdateOne) SetNillableAlgorithm ¶
func (_u *DataKeyUpdateOne) SetNillableAlgorithm(v *uint8) *DataKeyUpdateOne
SetNillableAlgorithm sets the "algorithm" field if the given value is not nil.
func (*DataKeyUpdateOne) SetNillableCreatedAt ¶
func (_u *DataKeyUpdateOne) SetNillableCreatedAt(v *time.Time) *DataKeyUpdateOne
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*DataKeyUpdateOne) SetNillableEpoch ¶
func (_u *DataKeyUpdateOne) SetNillableEpoch(v *uint32) *DataKeyUpdateOne
SetNillableEpoch sets the "epoch" field if the given value is not nil.
func (*DataKeyUpdateOne) SetNillableIsCurrent ¶
func (_u *DataKeyUpdateOne) SetNillableIsCurrent(v *bool) *DataKeyUpdateOne
SetNillableIsCurrent sets the "is_current" field if the given value is not nil.
func (*DataKeyUpdateOne) SetNillableKekID ¶
func (_u *DataKeyUpdateOne) SetNillableKekID(v *envelope.ID) *DataKeyUpdateOne
SetNillableKekID sets the "kek_id" field if the given value is not nil.
func (*DataKeyUpdateOne) SetNillableKekVersion ¶
func (_u *DataKeyUpdateOne) SetNillableKekVersion(v *uint32) *DataKeyUpdateOne
SetNillableKekVersion sets the "kek_version" field if the given value is not nil.
func (*DataKeyUpdateOne) SetNillablePurpose ¶
func (_u *DataKeyUpdateOne) SetNillablePurpose(v *string) *DataKeyUpdateOne
SetNillablePurpose sets the "purpose" field if the given value is not nil.
func (*DataKeyUpdateOne) SetNillableReserved ¶
func (_u *DataKeyUpdateOne) SetNillableReserved(v *uint64) *DataKeyUpdateOne
SetNillableReserved sets the "reserved" field if the given value is not nil.
func (*DataKeyUpdateOne) SetNillableState ¶
func (_u *DataKeyUpdateOne) SetNillableState(v *uint8) *DataKeyUpdateOne
SetNillableState sets the "state" field if the given value is not nil.
func (*DataKeyUpdateOne) SetNillableSubject ¶
func (_u *DataKeyUpdateOne) SetNillableSubject(v *string) *DataKeyUpdateOne
SetNillableSubject sets the "subject" field if the given value is not nil.
func (*DataKeyUpdateOne) SetPurpose ¶
func (_u *DataKeyUpdateOne) SetPurpose(v string) *DataKeyUpdateOne
SetPurpose sets the "purpose" field.
func (*DataKeyUpdateOne) SetReserved ¶
func (_u *DataKeyUpdateOne) SetReserved(v uint64) *DataKeyUpdateOne
SetReserved sets the "reserved" field.
func (*DataKeyUpdateOne) SetState ¶
func (_u *DataKeyUpdateOne) SetState(v uint8) *DataKeyUpdateOne
SetState sets the "state" field.
func (*DataKeyUpdateOne) SetSubject ¶
func (_u *DataKeyUpdateOne) SetSubject(v string) *DataKeyUpdateOne
SetSubject sets the "subject" field.
func (*DataKeyUpdateOne) SetWrapped ¶
func (_u *DataKeyUpdateOne) SetWrapped(v []byte) *DataKeyUpdateOne
SetWrapped sets the "wrapped" field.
func (*DataKeyUpdateOne) SetWrappedUnder ¶
func (_u *DataKeyUpdateOne) SetWrappedUnder(v []keyforge.KEKVersionRef) *DataKeyUpdateOne
SetWrappedUnder sets the "wrapped_under" field.
func (*DataKeyUpdateOne) Where ¶
func (_u *DataKeyUpdateOne) Where(ps ...predicate.DataKey) *DataKeyUpdateOne
Where appends a list predicates to the DataKeyUpdate builder.
type DataKeyUpsert ¶
DataKeyUpsert is the "OnConflict" setter.
func (*DataKeyUpsert) AddAlgorithm ¶
func (u *DataKeyUpsert) AddAlgorithm(v uint8) *DataKeyUpsert
AddAlgorithm adds v to the "algorithm" field.
func (*DataKeyUpsert) AddEpoch ¶
func (u *DataKeyUpsert) AddEpoch(v uint32) *DataKeyUpsert
AddEpoch adds v to the "epoch" field.
func (*DataKeyUpsert) AddKekVersion ¶
func (u *DataKeyUpsert) AddKekVersion(v uint32) *DataKeyUpsert
AddKekVersion adds v to the "kek_version" field.
func (*DataKeyUpsert) AddReserved ¶
func (u *DataKeyUpsert) AddReserved(v uint64) *DataKeyUpsert
AddReserved adds v to the "reserved" field.
func (*DataKeyUpsert) AddState ¶
func (u *DataKeyUpsert) AddState(v uint8) *DataKeyUpsert
AddState adds v to the "state" field.
func (*DataKeyUpsert) ClearWrapped ¶
func (u *DataKeyUpsert) ClearWrapped() *DataKeyUpsert
ClearWrapped clears the value of the "wrapped" field.
func (*DataKeyUpsert) SetAlgorithm ¶
func (u *DataKeyUpsert) SetAlgorithm(v uint8) *DataKeyUpsert
SetAlgorithm sets the "algorithm" field.
func (*DataKeyUpsert) SetCreatedAt ¶
func (u *DataKeyUpsert) SetCreatedAt(v time.Time) *DataKeyUpsert
SetCreatedAt sets the "created_at" field.
func (*DataKeyUpsert) SetEpoch ¶
func (u *DataKeyUpsert) SetEpoch(v uint32) *DataKeyUpsert
SetEpoch sets the "epoch" field.
func (*DataKeyUpsert) SetIsCurrent ¶
func (u *DataKeyUpsert) SetIsCurrent(v bool) *DataKeyUpsert
SetIsCurrent sets the "is_current" field.
func (*DataKeyUpsert) SetKekID ¶
func (u *DataKeyUpsert) SetKekID(v envelope.ID) *DataKeyUpsert
SetKekID sets the "kek_id" field.
func (*DataKeyUpsert) SetKekVersion ¶
func (u *DataKeyUpsert) SetKekVersion(v uint32) *DataKeyUpsert
SetKekVersion sets the "kek_version" field.
func (*DataKeyUpsert) SetPurpose ¶
func (u *DataKeyUpsert) SetPurpose(v string) *DataKeyUpsert
SetPurpose sets the "purpose" field.
func (*DataKeyUpsert) SetReserved ¶
func (u *DataKeyUpsert) SetReserved(v uint64) *DataKeyUpsert
SetReserved sets the "reserved" field.
func (*DataKeyUpsert) SetState ¶
func (u *DataKeyUpsert) SetState(v uint8) *DataKeyUpsert
SetState sets the "state" field.
func (*DataKeyUpsert) SetSubject ¶
func (u *DataKeyUpsert) SetSubject(v string) *DataKeyUpsert
SetSubject sets the "subject" field.
func (*DataKeyUpsert) SetWrapped ¶
func (u *DataKeyUpsert) SetWrapped(v []byte) *DataKeyUpsert
SetWrapped sets the "wrapped" field.
func (*DataKeyUpsert) SetWrappedUnder ¶
func (u *DataKeyUpsert) SetWrappedUnder(v []keyforge.KEKVersionRef) *DataKeyUpsert
SetWrappedUnder sets the "wrapped_under" field.
func (*DataKeyUpsert) UpdateAlgorithm ¶
func (u *DataKeyUpsert) UpdateAlgorithm() *DataKeyUpsert
UpdateAlgorithm sets the "algorithm" field to the value that was provided on create.
func (*DataKeyUpsert) UpdateCreatedAt ¶
func (u *DataKeyUpsert) UpdateCreatedAt() *DataKeyUpsert
UpdateCreatedAt sets the "created_at" field to the value that was provided on create.
func (*DataKeyUpsert) UpdateEpoch ¶
func (u *DataKeyUpsert) UpdateEpoch() *DataKeyUpsert
UpdateEpoch sets the "epoch" field to the value that was provided on create.
func (*DataKeyUpsert) UpdateIsCurrent ¶
func (u *DataKeyUpsert) UpdateIsCurrent() *DataKeyUpsert
UpdateIsCurrent sets the "is_current" field to the value that was provided on create.
func (*DataKeyUpsert) UpdateKekID ¶
func (u *DataKeyUpsert) UpdateKekID() *DataKeyUpsert
UpdateKekID sets the "kek_id" field to the value that was provided on create.
func (*DataKeyUpsert) UpdateKekVersion ¶
func (u *DataKeyUpsert) UpdateKekVersion() *DataKeyUpsert
UpdateKekVersion sets the "kek_version" field to the value that was provided on create.
func (*DataKeyUpsert) UpdatePurpose ¶
func (u *DataKeyUpsert) UpdatePurpose() *DataKeyUpsert
UpdatePurpose sets the "purpose" field to the value that was provided on create.
func (*DataKeyUpsert) UpdateReserved ¶
func (u *DataKeyUpsert) UpdateReserved() *DataKeyUpsert
UpdateReserved sets the "reserved" field to the value that was provided on create.
func (*DataKeyUpsert) UpdateState ¶
func (u *DataKeyUpsert) UpdateState() *DataKeyUpsert
UpdateState sets the "state" field to the value that was provided on create.
func (*DataKeyUpsert) UpdateSubject ¶
func (u *DataKeyUpsert) UpdateSubject() *DataKeyUpsert
UpdateSubject sets the "subject" field to the value that was provided on create.
func (*DataKeyUpsert) UpdateWrapped ¶
func (u *DataKeyUpsert) UpdateWrapped() *DataKeyUpsert
UpdateWrapped sets the "wrapped" field to the value that was provided on create.
func (*DataKeyUpsert) UpdateWrappedUnder ¶
func (u *DataKeyUpsert) UpdateWrappedUnder() *DataKeyUpsert
UpdateWrappedUnder sets the "wrapped_under" field to the value that was provided on create.
type DataKeyUpsertBulk ¶
type DataKeyUpsertBulk struct {
// contains filtered or unexported fields
}
DataKeyUpsertBulk is the builder for "upsert"-ing a bulk of DataKey nodes.
func (*DataKeyUpsertBulk) AddAlgorithm ¶
func (u *DataKeyUpsertBulk) AddAlgorithm(v uint8) *DataKeyUpsertBulk
AddAlgorithm adds v to the "algorithm" field.
func (*DataKeyUpsertBulk) AddEpoch ¶
func (u *DataKeyUpsertBulk) AddEpoch(v uint32) *DataKeyUpsertBulk
AddEpoch adds v to the "epoch" field.
func (*DataKeyUpsertBulk) AddKekVersion ¶
func (u *DataKeyUpsertBulk) AddKekVersion(v uint32) *DataKeyUpsertBulk
AddKekVersion adds v to the "kek_version" field.
func (*DataKeyUpsertBulk) AddReserved ¶
func (u *DataKeyUpsertBulk) AddReserved(v uint64) *DataKeyUpsertBulk
AddReserved adds v to the "reserved" field.
func (*DataKeyUpsertBulk) AddState ¶
func (u *DataKeyUpsertBulk) AddState(v uint8) *DataKeyUpsertBulk
AddState adds v to the "state" field.
func (*DataKeyUpsertBulk) ClearWrapped ¶
func (u *DataKeyUpsertBulk) ClearWrapped() *DataKeyUpsertBulk
ClearWrapped clears the value of the "wrapped" field.
func (*DataKeyUpsertBulk) DoNothing ¶
func (u *DataKeyUpsertBulk) DoNothing() *DataKeyUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*DataKeyUpsertBulk) Exec ¶
func (u *DataKeyUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*DataKeyUpsertBulk) ExecX ¶
func (u *DataKeyUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DataKeyUpsertBulk) Ignore ¶
func (u *DataKeyUpsertBulk) Ignore() *DataKeyUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.DataKey.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*DataKeyUpsertBulk) SetAlgorithm ¶
func (u *DataKeyUpsertBulk) SetAlgorithm(v uint8) *DataKeyUpsertBulk
SetAlgorithm sets the "algorithm" field.
func (*DataKeyUpsertBulk) SetCreatedAt ¶
func (u *DataKeyUpsertBulk) SetCreatedAt(v time.Time) *DataKeyUpsertBulk
SetCreatedAt sets the "created_at" field.
func (*DataKeyUpsertBulk) SetEpoch ¶
func (u *DataKeyUpsertBulk) SetEpoch(v uint32) *DataKeyUpsertBulk
SetEpoch sets the "epoch" field.
func (*DataKeyUpsertBulk) SetIsCurrent ¶
func (u *DataKeyUpsertBulk) SetIsCurrent(v bool) *DataKeyUpsertBulk
SetIsCurrent sets the "is_current" field.
func (*DataKeyUpsertBulk) SetKekID ¶
func (u *DataKeyUpsertBulk) SetKekID(v envelope.ID) *DataKeyUpsertBulk
SetKekID sets the "kek_id" field.
func (*DataKeyUpsertBulk) SetKekVersion ¶
func (u *DataKeyUpsertBulk) SetKekVersion(v uint32) *DataKeyUpsertBulk
SetKekVersion sets the "kek_version" field.
func (*DataKeyUpsertBulk) SetPurpose ¶
func (u *DataKeyUpsertBulk) SetPurpose(v string) *DataKeyUpsertBulk
SetPurpose sets the "purpose" field.
func (*DataKeyUpsertBulk) SetReserved ¶
func (u *DataKeyUpsertBulk) SetReserved(v uint64) *DataKeyUpsertBulk
SetReserved sets the "reserved" field.
func (*DataKeyUpsertBulk) SetState ¶
func (u *DataKeyUpsertBulk) SetState(v uint8) *DataKeyUpsertBulk
SetState sets the "state" field.
func (*DataKeyUpsertBulk) SetSubject ¶
func (u *DataKeyUpsertBulk) SetSubject(v string) *DataKeyUpsertBulk
SetSubject sets the "subject" field.
func (*DataKeyUpsertBulk) SetWrapped ¶
func (u *DataKeyUpsertBulk) SetWrapped(v []byte) *DataKeyUpsertBulk
SetWrapped sets the "wrapped" field.
func (*DataKeyUpsertBulk) SetWrappedUnder ¶
func (u *DataKeyUpsertBulk) SetWrappedUnder(v []keyforge.KEKVersionRef) *DataKeyUpsertBulk
SetWrappedUnder sets the "wrapped_under" field.
func (*DataKeyUpsertBulk) Update ¶
func (u *DataKeyUpsertBulk) Update(set func(*DataKeyUpsert)) *DataKeyUpsertBulk
Update allows overriding fields `UPDATE` values. See the DataKeyCreateBulk.OnConflict documentation for more info.
func (*DataKeyUpsertBulk) UpdateAlgorithm ¶
func (u *DataKeyUpsertBulk) UpdateAlgorithm() *DataKeyUpsertBulk
UpdateAlgorithm sets the "algorithm" field to the value that was provided on create.
func (*DataKeyUpsertBulk) UpdateCreatedAt ¶
func (u *DataKeyUpsertBulk) UpdateCreatedAt() *DataKeyUpsertBulk
UpdateCreatedAt sets the "created_at" field to the value that was provided on create.
func (*DataKeyUpsertBulk) UpdateEpoch ¶
func (u *DataKeyUpsertBulk) UpdateEpoch() *DataKeyUpsertBulk
UpdateEpoch sets the "epoch" field to the value that was provided on create.
func (*DataKeyUpsertBulk) UpdateIsCurrent ¶
func (u *DataKeyUpsertBulk) UpdateIsCurrent() *DataKeyUpsertBulk
UpdateIsCurrent sets the "is_current" field to the value that was provided on create.
func (*DataKeyUpsertBulk) UpdateKekID ¶
func (u *DataKeyUpsertBulk) UpdateKekID() *DataKeyUpsertBulk
UpdateKekID sets the "kek_id" field to the value that was provided on create.
func (*DataKeyUpsertBulk) UpdateKekVersion ¶
func (u *DataKeyUpsertBulk) UpdateKekVersion() *DataKeyUpsertBulk
UpdateKekVersion sets the "kek_version" field to the value that was provided on create.
func (*DataKeyUpsertBulk) UpdateNewValues ¶
func (u *DataKeyUpsertBulk) UpdateNewValues() *DataKeyUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.DataKey.Create().
OnConflict(
sql.ResolveWithNewValues(),
sql.ResolveWith(func(u *sql.UpdateSet) {
u.SetIgnore(datakey.FieldID)
}),
).
Exec(ctx)
func (*DataKeyUpsertBulk) UpdatePurpose ¶
func (u *DataKeyUpsertBulk) UpdatePurpose() *DataKeyUpsertBulk
UpdatePurpose sets the "purpose" field to the value that was provided on create.
func (*DataKeyUpsertBulk) UpdateReserved ¶
func (u *DataKeyUpsertBulk) UpdateReserved() *DataKeyUpsertBulk
UpdateReserved sets the "reserved" field to the value that was provided on create.
func (*DataKeyUpsertBulk) UpdateState ¶
func (u *DataKeyUpsertBulk) UpdateState() *DataKeyUpsertBulk
UpdateState sets the "state" field to the value that was provided on create.
func (*DataKeyUpsertBulk) UpdateSubject ¶
func (u *DataKeyUpsertBulk) UpdateSubject() *DataKeyUpsertBulk
UpdateSubject sets the "subject" field to the value that was provided on create.
func (*DataKeyUpsertBulk) UpdateWrapped ¶
func (u *DataKeyUpsertBulk) UpdateWrapped() *DataKeyUpsertBulk
UpdateWrapped sets the "wrapped" field to the value that was provided on create.
func (*DataKeyUpsertBulk) UpdateWrappedUnder ¶
func (u *DataKeyUpsertBulk) UpdateWrappedUnder() *DataKeyUpsertBulk
UpdateWrappedUnder sets the "wrapped_under" field to the value that was provided on create.
type DataKeyUpsertOne ¶
type DataKeyUpsertOne struct {
// contains filtered or unexported fields
}
DataKeyUpsertOne is the builder for "upsert"-ing
one DataKey node.
func (*DataKeyUpsertOne) AddAlgorithm ¶
func (u *DataKeyUpsertOne) AddAlgorithm(v uint8) *DataKeyUpsertOne
AddAlgorithm adds v to the "algorithm" field.
func (*DataKeyUpsertOne) AddEpoch ¶
func (u *DataKeyUpsertOne) AddEpoch(v uint32) *DataKeyUpsertOne
AddEpoch adds v to the "epoch" field.
func (*DataKeyUpsertOne) AddKekVersion ¶
func (u *DataKeyUpsertOne) AddKekVersion(v uint32) *DataKeyUpsertOne
AddKekVersion adds v to the "kek_version" field.
func (*DataKeyUpsertOne) AddReserved ¶
func (u *DataKeyUpsertOne) AddReserved(v uint64) *DataKeyUpsertOne
AddReserved adds v to the "reserved" field.
func (*DataKeyUpsertOne) AddState ¶
func (u *DataKeyUpsertOne) AddState(v uint8) *DataKeyUpsertOne
AddState adds v to the "state" field.
func (*DataKeyUpsertOne) ClearWrapped ¶
func (u *DataKeyUpsertOne) ClearWrapped() *DataKeyUpsertOne
ClearWrapped clears the value of the "wrapped" field.
func (*DataKeyUpsertOne) DoNothing ¶
func (u *DataKeyUpsertOne) DoNothing() *DataKeyUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*DataKeyUpsertOne) Exec ¶
func (u *DataKeyUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*DataKeyUpsertOne) ExecX ¶
func (u *DataKeyUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DataKeyUpsertOne) IDX ¶
func (u *DataKeyUpsertOne) IDX(ctx context.Context) envelope.ID
IDX is like ID, but panics if an error occurs.
func (*DataKeyUpsertOne) Ignore ¶
func (u *DataKeyUpsertOne) Ignore() *DataKeyUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.DataKey.Create().
OnConflict(sql.ResolveWithIgnore()).
Exec(ctx)
func (*DataKeyUpsertOne) SetAlgorithm ¶
func (u *DataKeyUpsertOne) SetAlgorithm(v uint8) *DataKeyUpsertOne
SetAlgorithm sets the "algorithm" field.
func (*DataKeyUpsertOne) SetCreatedAt ¶
func (u *DataKeyUpsertOne) SetCreatedAt(v time.Time) *DataKeyUpsertOne
SetCreatedAt sets the "created_at" field.
func (*DataKeyUpsertOne) SetEpoch ¶
func (u *DataKeyUpsertOne) SetEpoch(v uint32) *DataKeyUpsertOne
SetEpoch sets the "epoch" field.
func (*DataKeyUpsertOne) SetIsCurrent ¶
func (u *DataKeyUpsertOne) SetIsCurrent(v bool) *DataKeyUpsertOne
SetIsCurrent sets the "is_current" field.
func (*DataKeyUpsertOne) SetKekID ¶
func (u *DataKeyUpsertOne) SetKekID(v envelope.ID) *DataKeyUpsertOne
SetKekID sets the "kek_id" field.
func (*DataKeyUpsertOne) SetKekVersion ¶
func (u *DataKeyUpsertOne) SetKekVersion(v uint32) *DataKeyUpsertOne
SetKekVersion sets the "kek_version" field.
func (*DataKeyUpsertOne) SetPurpose ¶
func (u *DataKeyUpsertOne) SetPurpose(v string) *DataKeyUpsertOne
SetPurpose sets the "purpose" field.
func (*DataKeyUpsertOne) SetReserved ¶
func (u *DataKeyUpsertOne) SetReserved(v uint64) *DataKeyUpsertOne
SetReserved sets the "reserved" field.
func (*DataKeyUpsertOne) SetState ¶
func (u *DataKeyUpsertOne) SetState(v uint8) *DataKeyUpsertOne
SetState sets the "state" field.
func (*DataKeyUpsertOne) SetSubject ¶
func (u *DataKeyUpsertOne) SetSubject(v string) *DataKeyUpsertOne
SetSubject sets the "subject" field.
func (*DataKeyUpsertOne) SetWrapped ¶
func (u *DataKeyUpsertOne) SetWrapped(v []byte) *DataKeyUpsertOne
SetWrapped sets the "wrapped" field.
func (*DataKeyUpsertOne) SetWrappedUnder ¶
func (u *DataKeyUpsertOne) SetWrappedUnder(v []keyforge.KEKVersionRef) *DataKeyUpsertOne
SetWrappedUnder sets the "wrapped_under" field.
func (*DataKeyUpsertOne) Update ¶
func (u *DataKeyUpsertOne) Update(set func(*DataKeyUpsert)) *DataKeyUpsertOne
Update allows overriding fields `UPDATE` values. See the DataKeyCreate.OnConflict documentation for more info.
func (*DataKeyUpsertOne) UpdateAlgorithm ¶
func (u *DataKeyUpsertOne) UpdateAlgorithm() *DataKeyUpsertOne
UpdateAlgorithm sets the "algorithm" field to the value that was provided on create.
func (*DataKeyUpsertOne) UpdateCreatedAt ¶
func (u *DataKeyUpsertOne) UpdateCreatedAt() *DataKeyUpsertOne
UpdateCreatedAt sets the "created_at" field to the value that was provided on create.
func (*DataKeyUpsertOne) UpdateEpoch ¶
func (u *DataKeyUpsertOne) UpdateEpoch() *DataKeyUpsertOne
UpdateEpoch sets the "epoch" field to the value that was provided on create.
func (*DataKeyUpsertOne) UpdateIsCurrent ¶
func (u *DataKeyUpsertOne) UpdateIsCurrent() *DataKeyUpsertOne
UpdateIsCurrent sets the "is_current" field to the value that was provided on create.
func (*DataKeyUpsertOne) UpdateKekID ¶
func (u *DataKeyUpsertOne) UpdateKekID() *DataKeyUpsertOne
UpdateKekID sets the "kek_id" field to the value that was provided on create.
func (*DataKeyUpsertOne) UpdateKekVersion ¶
func (u *DataKeyUpsertOne) UpdateKekVersion() *DataKeyUpsertOne
UpdateKekVersion sets the "kek_version" field to the value that was provided on create.
func (*DataKeyUpsertOne) UpdateNewValues ¶
func (u *DataKeyUpsertOne) UpdateNewValues() *DataKeyUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:
client.DataKey.Create().
OnConflict(
sql.ResolveWithNewValues(),
sql.ResolveWith(func(u *sql.UpdateSet) {
u.SetIgnore(datakey.FieldID)
}),
).
Exec(ctx)
func (*DataKeyUpsertOne) UpdatePurpose ¶
func (u *DataKeyUpsertOne) UpdatePurpose() *DataKeyUpsertOne
UpdatePurpose sets the "purpose" field to the value that was provided on create.
func (*DataKeyUpsertOne) UpdateReserved ¶
func (u *DataKeyUpsertOne) UpdateReserved() *DataKeyUpsertOne
UpdateReserved sets the "reserved" field to the value that was provided on create.
func (*DataKeyUpsertOne) UpdateState ¶
func (u *DataKeyUpsertOne) UpdateState() *DataKeyUpsertOne
UpdateState sets the "state" field to the value that was provided on create.
func (*DataKeyUpsertOne) UpdateSubject ¶
func (u *DataKeyUpsertOne) UpdateSubject() *DataKeyUpsertOne
UpdateSubject sets the "subject" field to the value that was provided on create.
func (*DataKeyUpsertOne) UpdateWrapped ¶
func (u *DataKeyUpsertOne) UpdateWrapped() *DataKeyUpsertOne
UpdateWrapped sets the "wrapped" field to the value that was provided on create.
func (*DataKeyUpsertOne) UpdateWrappedUnder ¶
func (u *DataKeyUpsertOne) UpdateWrappedUnder() *DataKeyUpsertOne
UpdateWrappedUnder sets the "wrapped_under" field to the value that was provided on create.
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 KEK ¶
type KEK struct {
// ID of the ent.
ID envelope.ID `json:"id,omitempty"`
// Purpose holds the value of the "purpose" field.
Purpose string `json:"purpose,omitempty"`
// Provider holds the value of the "provider" field.
Provider string `json:"provider,omitempty"`
// ProviderRef holds the value of the "provider_ref" field.
ProviderRef string `json:"provider_ref,omitempty"`
// State holds the value of the "state" field.
State uint8 `json:"state,omitempty"`
// CreatedAt holds the value of the "created_at" field.
CreatedAt time.Time `json:"created_at,omitempty"`
// Edges holds the relations/edges for other nodes in the graph.
// The values are being populated by the KEKQuery when eager-loading is set.
Edges KEKEdges `json:"edges"`
// contains filtered or unexported fields
}
KEK is the model entity for the KEK schema.
func (*KEK) ExecContext ¶
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*KEK) QueryContext ¶
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*KEK) QueryDataKeys ¶
func (_m *KEK) QueryDataKeys() *DataKeyQuery
QueryDataKeys queries the "data_keys" edge of the KEK entity.
func (*KEK) QuerySentinels ¶
func (_m *KEK) QuerySentinels() *SentinelQuery
QuerySentinels queries the "sentinels" edge of the KEK entity.
func (*KEK) QueryVersions ¶
func (_m *KEK) QueryVersions() *KEKVersionQuery
QueryVersions queries the "versions" edge of the KEK entity.
func (*KEK) Unwrap ¶
Unwrap unwraps the KEK 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 (*KEK) Update ¶
func (_m *KEK) Update() *KEKUpdateOne
Update returns a builder for updating this KEK. Note that you need to call KEK.Unwrap() before calling this method if this KEK was returned from a transaction, and the transaction was committed or rolled back.
type KEKClient ¶
type KEKClient struct {
// contains filtered or unexported fields
}
KEKClient is a client for the KEK schema.
func NewKEKClient ¶
func NewKEKClient(c config) *KEKClient
NewKEKClient returns a client for the KEK from the given config.
func (*KEKClient) CreateBulk ¶
func (c *KEKClient) CreateBulk(builders ...*KEKCreate) *KEKCreateBulk
CreateBulk returns a builder for creating a bulk of KEK entities.
func (*KEKClient) DeleteOne ¶
func (c *KEKClient) DeleteOne(_m *KEK) *KEKDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*KEKClient) DeleteOneID ¶
func (c *KEKClient) DeleteOneID(id envelope.ID) *KEKDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*KEKClient) ExecContext ¶
func (c *KEKClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*KEKClient) Intercept ¶
func (c *KEKClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `kek.Intercept(f(g(h())))`.
func (*KEKClient) Interceptors ¶
func (c *KEKClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*KEKClient) MapCreateBulk ¶
func (c *KEKClient) MapCreateBulk(slice any, setFunc func(*KEKCreate, int)) *KEKCreateBulk
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 (*KEKClient) QueryContext ¶
func (c *KEKClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*KEKClient) QueryDataKeys ¶
func (c *KEKClient) QueryDataKeys(_m *KEK) *DataKeyQuery
QueryDataKeys queries the data_keys edge of a KEK.
func (*KEKClient) QuerySentinels ¶
func (c *KEKClient) QuerySentinels(_m *KEK) *SentinelQuery
QuerySentinels queries the sentinels edge of a KEK.
func (*KEKClient) QueryVersions ¶
func (c *KEKClient) QueryVersions(_m *KEK) *KEKVersionQuery
QueryVersions queries the versions edge of a KEK.
func (*KEKClient) UpdateOne ¶
func (c *KEKClient) UpdateOne(_m *KEK) *KEKUpdateOne
UpdateOne returns an update builder for the given entity.
func (*KEKClient) UpdateOneID ¶
func (c *KEKClient) UpdateOneID(id envelope.ID) *KEKUpdateOne
UpdateOneID returns an update builder for the given id.
type KEKCreate ¶
type KEKCreate struct {
// contains filtered or unexported fields
}
KEKCreate is the builder for creating a KEK entity.
func (*KEKCreate) AddDataKeyIDs ¶
AddDataKeyIDs adds the "data_keys" edge to the DataKey entity by IDs.
func (*KEKCreate) AddDataKeys ¶
AddDataKeys adds the "data_keys" edges to the DataKey entity.
func (*KEKCreate) AddSentinelIDs ¶
AddSentinelIDs adds the "sentinels" edge to the Sentinel entity by IDs.
func (*KEKCreate) AddSentinels ¶
AddSentinels adds the "sentinels" edges to the Sentinel entity.
func (*KEKCreate) AddVersionIDs ¶
AddVersionIDs adds the "versions" edge to the KEKVersion entity by IDs.
func (*KEKCreate) AddVersions ¶
func (_c *KEKCreate) AddVersions(v ...*KEKVersion) *KEKCreate
AddVersions adds the "versions" edges to the KEKVersion entity.
func (*KEKCreate) ExecContext ¶
func (c *KEKCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*KEKCreate) Mutation ¶
func (_c *KEKCreate) Mutation() *KEKMutation
Mutation returns the KEKMutation object of the builder.
func (*KEKCreate) OnConflict ¶
func (_c *KEKCreate) OnConflict(opts ...sql.ConflictOption) *KEKUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.KEK.Create().
SetPurpose(v).
OnConflict(
// Update the row with the new values
// the was proposed for insertion.
sql.ResolveWithNewValues(),
).
// Override some of the fields with custom
// update values.
Update(func(u *ent.KEKUpsert) {
SetPurpose(v+v).
}).
Exec(ctx)
func (*KEKCreate) OnConflictColumns ¶
func (_c *KEKCreate) OnConflictColumns(columns ...string) *KEKUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.KEK.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*KEKCreate) QueryContext ¶
func (c *KEKCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*KEKCreate) SetCreatedAt ¶
SetCreatedAt sets the "created_at" field.
func (*KEKCreate) SetProvider ¶
SetProvider sets the "provider" field.
func (*KEKCreate) SetProviderRef ¶
SetProviderRef sets the "provider_ref" field.
func (*KEKCreate) SetPurpose ¶
SetPurpose sets the "purpose" field.
type KEKCreateBulk ¶
type KEKCreateBulk struct {
// contains filtered or unexported fields
}
KEKCreateBulk is the builder for creating many KEK entities in bulk.
func (*KEKCreateBulk) Exec ¶
func (_c *KEKCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*KEKCreateBulk) ExecContext ¶
func (c *KEKCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*KEKCreateBulk) ExecX ¶
func (_c *KEKCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*KEKCreateBulk) OnConflict ¶
func (_c *KEKCreateBulk) OnConflict(opts ...sql.ConflictOption) *KEKUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.KEK.CreateBulk(builders...).
OnConflict(
// Update the row with the new values
// the was proposed for insertion.
sql.ResolveWithNewValues(),
).
// Override some of the fields with custom
// update values.
Update(func(u *ent.KEKUpsert) {
SetPurpose(v+v).
}).
Exec(ctx)
func (*KEKCreateBulk) OnConflictColumns ¶
func (_c *KEKCreateBulk) OnConflictColumns(columns ...string) *KEKUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.KEK.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*KEKCreateBulk) QueryContext ¶
func (c *KEKCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
type KEKDelete ¶
type KEKDelete struct {
// contains filtered or unexported fields
}
KEKDelete is the builder for deleting a KEK entity.
func (*KEKDelete) Exec ¶
Exec executes the deletion query and returns how many vertices were deleted.
func (*KEKDelete) ExecContext ¶
func (c *KEKDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
type KEKDeleteOne ¶
type KEKDeleteOne struct {
// contains filtered or unexported fields
}
KEKDeleteOne is the builder for deleting a single KEK entity.
func (*KEKDeleteOne) Exec ¶
func (_d *KEKDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*KEKDeleteOne) ExecX ¶
func (_d *KEKDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*KEKDeleteOne) Where ¶
func (_d *KEKDeleteOne) Where(ps ...predicate.KEK) *KEKDeleteOne
Where appends a list predicates to the KEKDelete builder.
type KEKEdges ¶
type KEKEdges struct {
// Versions holds the value of the versions edge.
Versions []*KEKVersion `json:"versions,omitempty"`
// DataKeys holds the value of the data_keys edge.
DataKeys []*DataKey `json:"data_keys,omitempty"`
// Sentinels holds the value of the sentinels edge.
Sentinels []*Sentinel `json:"sentinels,omitempty"`
// contains filtered or unexported fields
}
KEKEdges holds the relations/edges for other nodes in the graph.
func (KEKEdges) DataKeysOrErr ¶
DataKeysOrErr returns the DataKeys value or an error if the edge was not loaded in eager-loading.
func (KEKEdges) SentinelsOrErr ¶
SentinelsOrErr returns the Sentinels value or an error if the edge was not loaded in eager-loading.
func (KEKEdges) VersionsOrErr ¶
func (e KEKEdges) VersionsOrErr() ([]*KEKVersion, error)
VersionsOrErr returns the Versions value or an error if the edge was not loaded in eager-loading.
type KEKGroupBy ¶
type KEKGroupBy struct {
// contains filtered or unexported fields
}
KEKGroupBy is the group-by builder for KEK entities.
func (*KEKGroupBy) Aggregate ¶
func (_g *KEKGroupBy) Aggregate(fns ...AggregateFunc) *KEKGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*KEKGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*KEKGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*KEKGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*KEKGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*KEKGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*KEKGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*KEKGroupBy) Scan ¶
func (_g *KEKGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*KEKGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type KEKMutation ¶
type KEKMutation struct {
// contains filtered or unexported fields
}
KEKMutation represents an operation that mutates the KEK nodes in the graph.
func (*KEKMutation) AddDataKeyIDs ¶
func (m *KEKMutation) AddDataKeyIDs(ids ...envelope.ID)
AddDataKeyIDs adds the "data_keys" edge to the DataKey entity by ids.
func (*KEKMutation) AddField ¶
func (m *KEKMutation) 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 (*KEKMutation) AddSentinelIDs ¶
func (m *KEKMutation) AddSentinelIDs(ids ...int)
AddSentinelIDs adds the "sentinels" edge to the Sentinel entity by ids.
func (*KEKMutation) AddState ¶
func (m *KEKMutation) AddState(u int8)
AddState adds u to the "state" field.
func (*KEKMutation) AddVersionIDs ¶
func (m *KEKMutation) AddVersionIDs(ids ...int)
AddVersionIDs adds the "versions" edge to the KEKVersion entity by ids.
func (*KEKMutation) AddedEdges ¶
func (m *KEKMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*KEKMutation) AddedField ¶
func (m *KEKMutation) 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 (*KEKMutation) AddedFields ¶
func (m *KEKMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*KEKMutation) AddedIDs ¶
func (m *KEKMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*KEKMutation) AddedState ¶
func (m *KEKMutation) AddedState() (r int8, exists bool)
AddedState returns the value that was added to the "state" field in this mutation.
func (*KEKMutation) ClearDataKeys ¶
func (m *KEKMutation) ClearDataKeys()
ClearDataKeys clears the "data_keys" edge to the DataKey entity.
func (*KEKMutation) ClearEdge ¶
func (m *KEKMutation) 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 (*KEKMutation) ClearField ¶
func (m *KEKMutation) 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 (*KEKMutation) ClearSentinels ¶
func (m *KEKMutation) ClearSentinels()
ClearSentinels clears the "sentinels" edge to the Sentinel entity.
func (*KEKMutation) ClearVersions ¶
func (m *KEKMutation) ClearVersions()
ClearVersions clears the "versions" edge to the KEKVersion entity.
func (*KEKMutation) ClearedEdges ¶
func (m *KEKMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*KEKMutation) ClearedFields ¶
func (m *KEKMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (KEKMutation) Client ¶
func (m KEKMutation) 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 (*KEKMutation) CreatedAt ¶
func (m *KEKMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*KEKMutation) DataKeysCleared ¶
func (m *KEKMutation) DataKeysCleared() bool
DataKeysCleared reports if the "data_keys" edge to the DataKey entity was cleared.
func (*KEKMutation) DataKeysIDs ¶
func (m *KEKMutation) DataKeysIDs() (ids []envelope.ID)
DataKeysIDs returns the "data_keys" edge IDs in the mutation.
func (*KEKMutation) EdgeCleared ¶
func (m *KEKMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*KEKMutation) ExecContext ¶
func (c *KEKMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*KEKMutation) Field ¶
func (m *KEKMutation) 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 (*KEKMutation) FieldCleared ¶
func (m *KEKMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*KEKMutation) Fields ¶
func (m *KEKMutation) 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 (*KEKMutation) ID ¶
func (m *KEKMutation) ID() (id envelope.ID, 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 (*KEKMutation) IDs ¶
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*KEKMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the KEK entity. If the KEK object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*KEKMutation) 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 (*KEKMutation) OldProvider ¶
func (m *KEKMutation) OldProvider(ctx context.Context) (v string, err error)
OldProvider returns the old "provider" field's value of the KEK entity. If the KEK object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*KEKMutation) OldProviderRef ¶
func (m *KEKMutation) OldProviderRef(ctx context.Context) (v string, err error)
OldProviderRef returns the old "provider_ref" field's value of the KEK entity. If the KEK object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*KEKMutation) OldPurpose ¶
func (m *KEKMutation) OldPurpose(ctx context.Context) (v string, err error)
OldPurpose returns the old "purpose" field's value of the KEK entity. If the KEK object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*KEKMutation) OldState ¶
func (m *KEKMutation) OldState(ctx context.Context) (v uint8, err error)
OldState returns the old "state" field's value of the KEK entity. If the KEK object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*KEKMutation) Provider ¶
func (m *KEKMutation) Provider() (r string, exists bool)
Provider returns the value of the "provider" field in the mutation.
func (*KEKMutation) ProviderRef ¶
func (m *KEKMutation) ProviderRef() (r string, exists bool)
ProviderRef returns the value of the "provider_ref" field in the mutation.
func (*KEKMutation) Purpose ¶
func (m *KEKMutation) Purpose() (r string, exists bool)
Purpose returns the value of the "purpose" field in the mutation.
func (*KEKMutation) QueryContext ¶
func (c *KEKMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*KEKMutation) RemoveDataKeyIDs ¶
func (m *KEKMutation) RemoveDataKeyIDs(ids ...envelope.ID)
RemoveDataKeyIDs removes the "data_keys" edge to the DataKey entity by IDs.
func (*KEKMutation) RemoveSentinelIDs ¶
func (m *KEKMutation) RemoveSentinelIDs(ids ...int)
RemoveSentinelIDs removes the "sentinels" edge to the Sentinel entity by IDs.
func (*KEKMutation) RemoveVersionIDs ¶
func (m *KEKMutation) RemoveVersionIDs(ids ...int)
RemoveVersionIDs removes the "versions" edge to the KEKVersion entity by IDs.
func (*KEKMutation) RemovedDataKeysIDs ¶
func (m *KEKMutation) RemovedDataKeysIDs() (ids []envelope.ID)
RemovedDataKeys returns the removed IDs of the "data_keys" edge to the DataKey entity.
func (*KEKMutation) RemovedEdges ¶
func (m *KEKMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*KEKMutation) RemovedIDs ¶
func (m *KEKMutation) 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 (*KEKMutation) RemovedSentinelsIDs ¶
func (m *KEKMutation) RemovedSentinelsIDs() (ids []int)
RemovedSentinels returns the removed IDs of the "sentinels" edge to the Sentinel entity.
func (*KEKMutation) RemovedVersionsIDs ¶
func (m *KEKMutation) RemovedVersionsIDs() (ids []int)
RemovedVersions returns the removed IDs of the "versions" edge to the KEKVersion entity.
func (*KEKMutation) ResetCreatedAt ¶
func (m *KEKMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*KEKMutation) ResetDataKeys ¶
func (m *KEKMutation) ResetDataKeys()
ResetDataKeys resets all changes to the "data_keys" edge.
func (*KEKMutation) ResetEdge ¶
func (m *KEKMutation) 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 (*KEKMutation) ResetField ¶
func (m *KEKMutation) 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 (*KEKMutation) ResetProvider ¶
func (m *KEKMutation) ResetProvider()
ResetProvider resets all changes to the "provider" field.
func (*KEKMutation) ResetProviderRef ¶
func (m *KEKMutation) ResetProviderRef()
ResetProviderRef resets all changes to the "provider_ref" field.
func (*KEKMutation) ResetPurpose ¶
func (m *KEKMutation) ResetPurpose()
ResetPurpose resets all changes to the "purpose" field.
func (*KEKMutation) ResetSentinels ¶
func (m *KEKMutation) ResetSentinels()
ResetSentinels resets all changes to the "sentinels" edge.
func (*KEKMutation) ResetState ¶
func (m *KEKMutation) ResetState()
ResetState resets all changes to the "state" field.
func (*KEKMutation) ResetVersions ¶
func (m *KEKMutation) ResetVersions()
ResetVersions resets all changes to the "versions" edge.
func (*KEKMutation) SentinelsCleared ¶
func (m *KEKMutation) SentinelsCleared() bool
SentinelsCleared reports if the "sentinels" edge to the Sentinel entity was cleared.
func (*KEKMutation) SentinelsIDs ¶
func (m *KEKMutation) SentinelsIDs() (ids []int)
SentinelsIDs returns the "sentinels" edge IDs in the mutation.
func (*KEKMutation) SetCreatedAt ¶
func (m *KEKMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*KEKMutation) SetField ¶
func (m *KEKMutation) 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 (*KEKMutation) SetID ¶
func (m *KEKMutation) SetID(id envelope.ID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of KEK entities.
func (*KEKMutation) SetOp ¶
func (m *KEKMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*KEKMutation) SetProvider ¶
func (m *KEKMutation) SetProvider(s string)
SetProvider sets the "provider" field.
func (*KEKMutation) SetProviderRef ¶
func (m *KEKMutation) SetProviderRef(s string)
SetProviderRef sets the "provider_ref" field.
func (*KEKMutation) SetPurpose ¶
func (m *KEKMutation) SetPurpose(s string)
SetPurpose sets the "purpose" field.
func (*KEKMutation) SetState ¶
func (m *KEKMutation) SetState(u uint8)
SetState sets the "state" field.
func (*KEKMutation) State ¶
func (m *KEKMutation) State() (r uint8, exists bool)
State returns the value of the "state" field in the mutation.
func (KEKMutation) Tx ¶
func (m KEKMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*KEKMutation) Type ¶
func (m *KEKMutation) Type() string
Type returns the node type of this mutation (KEK).
func (*KEKMutation) VersionsCleared ¶
func (m *KEKMutation) VersionsCleared() bool
VersionsCleared reports if the "versions" edge to the KEKVersion entity was cleared.
func (*KEKMutation) VersionsIDs ¶
func (m *KEKMutation) VersionsIDs() (ids []int)
VersionsIDs returns the "versions" edge IDs in the mutation.
func (*KEKMutation) Where ¶
func (m *KEKMutation) Where(ps ...predicate.KEK)
Where appends a list predicates to the KEKMutation builder.
func (*KEKMutation) WhereP ¶
func (m *KEKMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the KEKMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type KEKQuery ¶
type KEKQuery struct {
// contains filtered or unexported fields
}
KEKQuery is the builder for querying KEK entities.
func (*KEKQuery) Aggregate ¶
func (_q *KEKQuery) Aggregate(fns ...AggregateFunc) *KEKSelect
Aggregate returns a KEKSelect configured with the given aggregations.
func (*KEKQuery) Clone ¶
Clone returns a duplicate of the KEKQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*KEKQuery) ExecContext ¶
func (c *KEKQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*KEKQuery) First ¶
First returns the first KEK entity from the query. Returns a *NotFoundError when no KEK was found.
func (*KEKQuery) FirstID ¶
FirstID returns the first KEK ID from the query. Returns a *NotFoundError when no KEK ID was found.
func (*KEKQuery) ForShare ¶
func (_q *KEKQuery) ForShare(opts ...sql.LockOption) *KEKQuery
ForShare behaves similarly to ForUpdate, except that it acquires a shared mode lock on any rows that are read. Other sessions can read the rows, but cannot modify them until your transaction commits.
func (*KEKQuery) ForUpdate ¶
func (_q *KEKQuery) ForUpdate(opts ...sql.LockOption) *KEKQuery
ForUpdate locks the selected rows against concurrent updates, and prevent them from being updated, deleted or "selected ... for update" by other sessions, until the transaction is either committed or rolled-back.
func (*KEKQuery) GroupBy ¶
func (_q *KEKQuery) GroupBy(field string, fields ...string) *KEKGroupBy
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 {
Purpose string `json:"purpose,omitempty"`
Count int `json:"count,omitempty"`
}
client.KEK.Query().
GroupBy(kek.FieldPurpose).
Aggregate(ent.Count()).
Scan(ctx, &v)
func (*KEKQuery) Only ¶
Only returns a single KEK entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one KEK entity is found. Returns a *NotFoundError when no KEK entities are found.
func (*KEKQuery) OnlyID ¶
OnlyID is like Only, but returns the only KEK ID in the query. Returns a *NotSingularError when more than one KEK ID is found. Returns a *NotFoundError when no entities are found.
func (*KEKQuery) Order ¶
func (_q *KEKQuery) Order(o ...kek.OrderOption) *KEKQuery
Order specifies how the records should be ordered.
func (*KEKQuery) QueryContext ¶
func (c *KEKQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*KEKQuery) QueryDataKeys ¶
func (_q *KEKQuery) QueryDataKeys() *DataKeyQuery
QueryDataKeys chains the current query on the "data_keys" edge.
func (*KEKQuery) QuerySentinels ¶
func (_q *KEKQuery) QuerySentinels() *SentinelQuery
QuerySentinels chains the current query on the "sentinels" edge.
func (*KEKQuery) QueryVersions ¶
func (_q *KEKQuery) QueryVersions() *KEKVersionQuery
QueryVersions chains the current query on the "versions" edge.
func (*KEKQuery) Select ¶
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct {
Purpose string `json:"purpose,omitempty"`
}
client.KEK.Query().
Select(kek.FieldPurpose).
Scan(ctx, &v)
func (*KEKQuery) Unique ¶
Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.
func (*KEKQuery) WithDataKeys ¶
func (_q *KEKQuery) WithDataKeys(opts ...func(*DataKeyQuery)) *KEKQuery
WithDataKeys tells the query-builder to eager-load the nodes that are connected to the "data_keys" edge. The optional arguments are used to configure the query builder of the edge.
func (*KEKQuery) WithSentinels ¶
func (_q *KEKQuery) WithSentinels(opts ...func(*SentinelQuery)) *KEKQuery
WithSentinels tells the query-builder to eager-load the nodes that are connected to the "sentinels" edge. The optional arguments are used to configure the query builder of the edge.
func (*KEKQuery) WithVersions ¶
func (_q *KEKQuery) WithVersions(opts ...func(*KEKVersionQuery)) *KEKQuery
WithVersions tells the query-builder to eager-load the nodes that are connected to the "versions" edge. The optional arguments are used to configure the query builder of the edge.
type KEKSelect ¶
type KEKSelect struct {
*KEKQuery
// contains filtered or unexported fields
}
KEKSelect is the builder for selecting fields of KEK entities.
func (*KEKSelect) Aggregate ¶
func (_s *KEKSelect) Aggregate(fns ...AggregateFunc) *KEKSelect
Aggregate adds the given aggregation functions to the selector query.
func (*KEKSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*KEKSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (KEKSelect) ExecContext ¶
func (c KEKSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*KEKSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*KEKSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*KEKSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*KEKSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (KEKSelect) QueryContext ¶
func (c KEKSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*KEKSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type KEKUpdate ¶
type KEKUpdate struct {
// contains filtered or unexported fields
}
KEKUpdate is the builder for updating KEK entities.
func (*KEKUpdate) AddDataKeyIDs ¶
AddDataKeyIDs adds the "data_keys" edge to the DataKey entity by IDs.
func (*KEKUpdate) AddDataKeys ¶
AddDataKeys adds the "data_keys" edges to the DataKey entity.
func (*KEKUpdate) AddSentinelIDs ¶
AddSentinelIDs adds the "sentinels" edge to the Sentinel entity by IDs.
func (*KEKUpdate) AddSentinels ¶
AddSentinels adds the "sentinels" edges to the Sentinel entity.
func (*KEKUpdate) AddVersionIDs ¶
AddVersionIDs adds the "versions" edge to the KEKVersion entity by IDs.
func (*KEKUpdate) AddVersions ¶
func (_u *KEKUpdate) AddVersions(v ...*KEKVersion) *KEKUpdate
AddVersions adds the "versions" edges to the KEKVersion entity.
func (*KEKUpdate) ClearDataKeys ¶
ClearDataKeys clears all "data_keys" edges to the DataKey entity.
func (*KEKUpdate) ClearSentinels ¶
ClearSentinels clears all "sentinels" edges to the Sentinel entity.
func (*KEKUpdate) ClearVersions ¶
ClearVersions clears all "versions" edges to the KEKVersion entity.
func (*KEKUpdate) ExecContext ¶
func (c *KEKUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*KEKUpdate) Mutation ¶
func (_u *KEKUpdate) Mutation() *KEKMutation
Mutation returns the KEKMutation object of the builder.
func (*KEKUpdate) QueryContext ¶
func (c *KEKUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*KEKUpdate) RemoveDataKeyIDs ¶
RemoveDataKeyIDs removes the "data_keys" edge to DataKey entities by IDs.
func (*KEKUpdate) RemoveDataKeys ¶
RemoveDataKeys removes "data_keys" edges to DataKey entities.
func (*KEKUpdate) RemoveSentinelIDs ¶
RemoveSentinelIDs removes the "sentinels" edge to Sentinel entities by IDs.
func (*KEKUpdate) RemoveSentinels ¶
RemoveSentinels removes "sentinels" edges to Sentinel entities.
func (*KEKUpdate) RemoveVersionIDs ¶
RemoveVersionIDs removes the "versions" edge to KEKVersion entities by IDs.
func (*KEKUpdate) RemoveVersions ¶
func (_u *KEKUpdate) RemoveVersions(v ...*KEKVersion) *KEKUpdate
RemoveVersions removes "versions" edges to KEKVersion entities.
func (*KEKUpdate) Save ¶
Save executes the query and returns the number of nodes affected by the update operation.
func (*KEKUpdate) SetCreatedAt ¶
SetCreatedAt sets the "created_at" field.
func (*KEKUpdate) SetNillableCreatedAt ¶
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*KEKUpdate) SetNillableProvider ¶
SetNillableProvider sets the "provider" field if the given value is not nil.
func (*KEKUpdate) SetNillableProviderRef ¶
SetNillableProviderRef sets the "provider_ref" field if the given value is not nil.
func (*KEKUpdate) SetNillablePurpose ¶
SetNillablePurpose sets the "purpose" field if the given value is not nil.
func (*KEKUpdate) SetNillableState ¶
SetNillableState sets the "state" field if the given value is not nil.
func (*KEKUpdate) SetProvider ¶
SetProvider sets the "provider" field.
func (*KEKUpdate) SetProviderRef ¶
SetProviderRef sets the "provider_ref" field.
func (*KEKUpdate) SetPurpose ¶
SetPurpose sets the "purpose" field.
type KEKUpdateOne ¶
type KEKUpdateOne struct {
// contains filtered or unexported fields
}
KEKUpdateOne is the builder for updating a single KEK entity.
func (*KEKUpdateOne) AddDataKeyIDs ¶
func (_u *KEKUpdateOne) AddDataKeyIDs(ids ...envelope.ID) *KEKUpdateOne
AddDataKeyIDs adds the "data_keys" edge to the DataKey entity by IDs.
func (*KEKUpdateOne) AddDataKeys ¶
func (_u *KEKUpdateOne) AddDataKeys(v ...*DataKey) *KEKUpdateOne
AddDataKeys adds the "data_keys" edges to the DataKey entity.
func (*KEKUpdateOne) AddSentinelIDs ¶
func (_u *KEKUpdateOne) AddSentinelIDs(ids ...int) *KEKUpdateOne
AddSentinelIDs adds the "sentinels" edge to the Sentinel entity by IDs.
func (*KEKUpdateOne) AddSentinels ¶
func (_u *KEKUpdateOne) AddSentinels(v ...*Sentinel) *KEKUpdateOne
AddSentinels adds the "sentinels" edges to the Sentinel entity.
func (*KEKUpdateOne) AddState ¶
func (_u *KEKUpdateOne) AddState(v int8) *KEKUpdateOne
AddState adds value to the "state" field.
func (*KEKUpdateOne) AddVersionIDs ¶
func (_u *KEKUpdateOne) AddVersionIDs(ids ...int) *KEKUpdateOne
AddVersionIDs adds the "versions" edge to the KEKVersion entity by IDs.
func (*KEKUpdateOne) AddVersions ¶
func (_u *KEKUpdateOne) AddVersions(v ...*KEKVersion) *KEKUpdateOne
AddVersions adds the "versions" edges to the KEKVersion entity.
func (*KEKUpdateOne) ClearDataKeys ¶
func (_u *KEKUpdateOne) ClearDataKeys() *KEKUpdateOne
ClearDataKeys clears all "data_keys" edges to the DataKey entity.
func (*KEKUpdateOne) ClearSentinels ¶
func (_u *KEKUpdateOne) ClearSentinels() *KEKUpdateOne
ClearSentinels clears all "sentinels" edges to the Sentinel entity.
func (*KEKUpdateOne) ClearVersions ¶
func (_u *KEKUpdateOne) ClearVersions() *KEKUpdateOne
ClearVersions clears all "versions" edges to the KEKVersion entity.
func (*KEKUpdateOne) Exec ¶
func (_u *KEKUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*KEKUpdateOne) ExecContext ¶
func (c *KEKUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*KEKUpdateOne) ExecX ¶
func (_u *KEKUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*KEKUpdateOne) Mutation ¶
func (_u *KEKUpdateOne) Mutation() *KEKMutation
Mutation returns the KEKMutation object of the builder.
func (*KEKUpdateOne) QueryContext ¶
func (c *KEKUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*KEKUpdateOne) RemoveDataKeyIDs ¶
func (_u *KEKUpdateOne) RemoveDataKeyIDs(ids ...envelope.ID) *KEKUpdateOne
RemoveDataKeyIDs removes the "data_keys" edge to DataKey entities by IDs.
func (*KEKUpdateOne) RemoveDataKeys ¶
func (_u *KEKUpdateOne) RemoveDataKeys(v ...*DataKey) *KEKUpdateOne
RemoveDataKeys removes "data_keys" edges to DataKey entities.
func (*KEKUpdateOne) RemoveSentinelIDs ¶
func (_u *KEKUpdateOne) RemoveSentinelIDs(ids ...int) *KEKUpdateOne
RemoveSentinelIDs removes the "sentinels" edge to Sentinel entities by IDs.
func (*KEKUpdateOne) RemoveSentinels ¶
func (_u *KEKUpdateOne) RemoveSentinels(v ...*Sentinel) *KEKUpdateOne
RemoveSentinels removes "sentinels" edges to Sentinel entities.
func (*KEKUpdateOne) RemoveVersionIDs ¶
func (_u *KEKUpdateOne) RemoveVersionIDs(ids ...int) *KEKUpdateOne
RemoveVersionIDs removes the "versions" edge to KEKVersion entities by IDs.
func (*KEKUpdateOne) RemoveVersions ¶
func (_u *KEKUpdateOne) RemoveVersions(v ...*KEKVersion) *KEKUpdateOne
RemoveVersions removes "versions" edges to KEKVersion entities.
func (*KEKUpdateOne) Save ¶
func (_u *KEKUpdateOne) Save(ctx context.Context) (*KEK, error)
Save executes the query and returns the updated KEK entity.
func (*KEKUpdateOne) SaveX ¶
func (_u *KEKUpdateOne) SaveX(ctx context.Context) *KEK
SaveX is like Save, but panics if an error occurs.
func (*KEKUpdateOne) Select ¶
func (_u *KEKUpdateOne) Select(field string, fields ...string) *KEKUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*KEKUpdateOne) SetCreatedAt ¶
func (_u *KEKUpdateOne) SetCreatedAt(v time.Time) *KEKUpdateOne
SetCreatedAt sets the "created_at" field.
func (*KEKUpdateOne) SetNillableCreatedAt ¶
func (_u *KEKUpdateOne) SetNillableCreatedAt(v *time.Time) *KEKUpdateOne
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*KEKUpdateOne) SetNillableProvider ¶
func (_u *KEKUpdateOne) SetNillableProvider(v *string) *KEKUpdateOne
SetNillableProvider sets the "provider" field if the given value is not nil.
func (*KEKUpdateOne) SetNillableProviderRef ¶
func (_u *KEKUpdateOne) SetNillableProviderRef(v *string) *KEKUpdateOne
SetNillableProviderRef sets the "provider_ref" field if the given value is not nil.
func (*KEKUpdateOne) SetNillablePurpose ¶
func (_u *KEKUpdateOne) SetNillablePurpose(v *string) *KEKUpdateOne
SetNillablePurpose sets the "purpose" field if the given value is not nil.
func (*KEKUpdateOne) SetNillableState ¶
func (_u *KEKUpdateOne) SetNillableState(v *uint8) *KEKUpdateOne
SetNillableState sets the "state" field if the given value is not nil.
func (*KEKUpdateOne) SetProvider ¶
func (_u *KEKUpdateOne) SetProvider(v string) *KEKUpdateOne
SetProvider sets the "provider" field.
func (*KEKUpdateOne) SetProviderRef ¶
func (_u *KEKUpdateOne) SetProviderRef(v string) *KEKUpdateOne
SetProviderRef sets the "provider_ref" field.
func (*KEKUpdateOne) SetPurpose ¶
func (_u *KEKUpdateOne) SetPurpose(v string) *KEKUpdateOne
SetPurpose sets the "purpose" field.
func (*KEKUpdateOne) SetState ¶
func (_u *KEKUpdateOne) SetState(v uint8) *KEKUpdateOne
SetState sets the "state" field.
func (*KEKUpdateOne) Where ¶
func (_u *KEKUpdateOne) Where(ps ...predicate.KEK) *KEKUpdateOne
Where appends a list predicates to the KEKUpdate builder.
type KEKUpsert ¶
KEKUpsert is the "OnConflict" setter.
func (*KEKUpsert) SetCreatedAt ¶
SetCreatedAt sets the "created_at" field.
func (*KEKUpsert) SetProvider ¶
SetProvider sets the "provider" field.
func (*KEKUpsert) SetProviderRef ¶
SetProviderRef sets the "provider_ref" field.
func (*KEKUpsert) SetPurpose ¶
SetPurpose sets the "purpose" field.
func (*KEKUpsert) UpdateCreatedAt ¶
UpdateCreatedAt sets the "created_at" field to the value that was provided on create.
func (*KEKUpsert) UpdateProvider ¶
UpdateProvider sets the "provider" field to the value that was provided on create.
func (*KEKUpsert) UpdateProviderRef ¶
UpdateProviderRef sets the "provider_ref" field to the value that was provided on create.
func (*KEKUpsert) UpdatePurpose ¶
UpdatePurpose sets the "purpose" field to the value that was provided on create.
func (*KEKUpsert) UpdateState ¶
UpdateState sets the "state" field to the value that was provided on create.
type KEKUpsertBulk ¶
type KEKUpsertBulk struct {
// contains filtered or unexported fields
}
KEKUpsertBulk is the builder for "upsert"-ing a bulk of KEK nodes.
func (*KEKUpsertBulk) AddState ¶
func (u *KEKUpsertBulk) AddState(v uint8) *KEKUpsertBulk
AddState adds v to the "state" field.
func (*KEKUpsertBulk) DoNothing ¶
func (u *KEKUpsertBulk) DoNothing() *KEKUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*KEKUpsertBulk) Exec ¶
func (u *KEKUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*KEKUpsertBulk) ExecX ¶
func (u *KEKUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*KEKUpsertBulk) Ignore ¶
func (u *KEKUpsertBulk) Ignore() *KEKUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.KEK.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*KEKUpsertBulk) SetCreatedAt ¶
func (u *KEKUpsertBulk) SetCreatedAt(v time.Time) *KEKUpsertBulk
SetCreatedAt sets the "created_at" field.
func (*KEKUpsertBulk) SetProvider ¶
func (u *KEKUpsertBulk) SetProvider(v string) *KEKUpsertBulk
SetProvider sets the "provider" field.
func (*KEKUpsertBulk) SetProviderRef ¶
func (u *KEKUpsertBulk) SetProviderRef(v string) *KEKUpsertBulk
SetProviderRef sets the "provider_ref" field.
func (*KEKUpsertBulk) SetPurpose ¶
func (u *KEKUpsertBulk) SetPurpose(v string) *KEKUpsertBulk
SetPurpose sets the "purpose" field.
func (*KEKUpsertBulk) SetState ¶
func (u *KEKUpsertBulk) SetState(v uint8) *KEKUpsertBulk
SetState sets the "state" field.
func (*KEKUpsertBulk) Update ¶
func (u *KEKUpsertBulk) Update(set func(*KEKUpsert)) *KEKUpsertBulk
Update allows overriding fields `UPDATE` values. See the KEKCreateBulk.OnConflict documentation for more info.
func (*KEKUpsertBulk) UpdateCreatedAt ¶
func (u *KEKUpsertBulk) UpdateCreatedAt() *KEKUpsertBulk
UpdateCreatedAt sets the "created_at" field to the value that was provided on create.
func (*KEKUpsertBulk) UpdateNewValues ¶
func (u *KEKUpsertBulk) UpdateNewValues() *KEKUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.KEK.Create().
OnConflict(
sql.ResolveWithNewValues(),
sql.ResolveWith(func(u *sql.UpdateSet) {
u.SetIgnore(kek.FieldID)
}),
).
Exec(ctx)
func (*KEKUpsertBulk) UpdateProvider ¶
func (u *KEKUpsertBulk) UpdateProvider() *KEKUpsertBulk
UpdateProvider sets the "provider" field to the value that was provided on create.
func (*KEKUpsertBulk) UpdateProviderRef ¶
func (u *KEKUpsertBulk) UpdateProviderRef() *KEKUpsertBulk
UpdateProviderRef sets the "provider_ref" field to the value that was provided on create.
func (*KEKUpsertBulk) UpdatePurpose ¶
func (u *KEKUpsertBulk) UpdatePurpose() *KEKUpsertBulk
UpdatePurpose sets the "purpose" field to the value that was provided on create.
func (*KEKUpsertBulk) UpdateState ¶
func (u *KEKUpsertBulk) UpdateState() *KEKUpsertBulk
UpdateState sets the "state" field to the value that was provided on create.
type KEKUpsertOne ¶
type KEKUpsertOne struct {
// contains filtered or unexported fields
}
KEKUpsertOne is the builder for "upsert"-ing
one KEK node.
func (*KEKUpsertOne) AddState ¶
func (u *KEKUpsertOne) AddState(v uint8) *KEKUpsertOne
AddState adds v to the "state" field.
func (*KEKUpsertOne) DoNothing ¶
func (u *KEKUpsertOne) DoNothing() *KEKUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*KEKUpsertOne) Exec ¶
func (u *KEKUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*KEKUpsertOne) ExecX ¶
func (u *KEKUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*KEKUpsertOne) IDX ¶
func (u *KEKUpsertOne) IDX(ctx context.Context) envelope.ID
IDX is like ID, but panics if an error occurs.
func (*KEKUpsertOne) Ignore ¶
func (u *KEKUpsertOne) Ignore() *KEKUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.KEK.Create().
OnConflict(sql.ResolveWithIgnore()).
Exec(ctx)
func (*KEKUpsertOne) SetCreatedAt ¶
func (u *KEKUpsertOne) SetCreatedAt(v time.Time) *KEKUpsertOne
SetCreatedAt sets the "created_at" field.
func (*KEKUpsertOne) SetProvider ¶
func (u *KEKUpsertOne) SetProvider(v string) *KEKUpsertOne
SetProvider sets the "provider" field.
func (*KEKUpsertOne) SetProviderRef ¶
func (u *KEKUpsertOne) SetProviderRef(v string) *KEKUpsertOne
SetProviderRef sets the "provider_ref" field.
func (*KEKUpsertOne) SetPurpose ¶
func (u *KEKUpsertOne) SetPurpose(v string) *KEKUpsertOne
SetPurpose sets the "purpose" field.
func (*KEKUpsertOne) SetState ¶
func (u *KEKUpsertOne) SetState(v uint8) *KEKUpsertOne
SetState sets the "state" field.
func (*KEKUpsertOne) Update ¶
func (u *KEKUpsertOne) Update(set func(*KEKUpsert)) *KEKUpsertOne
Update allows overriding fields `UPDATE` values. See the KEKCreate.OnConflict documentation for more info.
func (*KEKUpsertOne) UpdateCreatedAt ¶
func (u *KEKUpsertOne) UpdateCreatedAt() *KEKUpsertOne
UpdateCreatedAt sets the "created_at" field to the value that was provided on create.
func (*KEKUpsertOne) UpdateNewValues ¶
func (u *KEKUpsertOne) UpdateNewValues() *KEKUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:
client.KEK.Create().
OnConflict(
sql.ResolveWithNewValues(),
sql.ResolveWith(func(u *sql.UpdateSet) {
u.SetIgnore(kek.FieldID)
}),
).
Exec(ctx)
func (*KEKUpsertOne) UpdateProvider ¶
func (u *KEKUpsertOne) UpdateProvider() *KEKUpsertOne
UpdateProvider sets the "provider" field to the value that was provided on create.
func (*KEKUpsertOne) UpdateProviderRef ¶
func (u *KEKUpsertOne) UpdateProviderRef() *KEKUpsertOne
UpdateProviderRef sets the "provider_ref" field to the value that was provided on create.
func (*KEKUpsertOne) UpdatePurpose ¶
func (u *KEKUpsertOne) UpdatePurpose() *KEKUpsertOne
UpdatePurpose sets the "purpose" field to the value that was provided on create.
func (*KEKUpsertOne) UpdateState ¶
func (u *KEKUpsertOne) UpdateState() *KEKUpsertOne
UpdateState sets the "state" field to the value that was provided on create.
type KEKVersion ¶
type KEKVersion struct {
// ID of the ent.
ID int `json:"id,omitempty"`
// KekID holds the value of the "kek_id" field.
KekID envelope.ID `json:"kek_id,omitempty"`
// Version holds the value of the "version" field.
Version uint32 `json:"version,omitempty"`
// State holds the value of the "state" field.
State uint8 `json:"state,omitempty"`
// ProviderRef holds the value of the "provider_ref" field.
ProviderRef string `json:"provider_ref,omitempty"`
// CreatedAt holds the value of the "created_at" field.
CreatedAt time.Time `json:"created_at,omitempty"`
// ActivatedAt holds the value of the "activated_at" field.
ActivatedAt *time.Time `json:"activated_at,omitempty"`
// RotatedAt holds the value of the "rotated_at" field.
RotatedAt *time.Time `json:"rotated_at,omitempty"`
// RetireAfter holds the value of the "retire_after" field.
RetireAfter *time.Time `json:"retire_after,omitempty"`
// Edges holds the relations/edges for other nodes in the graph.
// The values are being populated by the KEKVersionQuery when eager-loading is set.
Edges KEKVersionEdges `json:"edges"`
// contains filtered or unexported fields
}
KEKVersion is the model entity for the KEKVersion schema.
func (*KEKVersion) ExecContext ¶
func (c *KEKVersion) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*KEKVersion) QueryContext ¶
func (c *KEKVersion) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*KEKVersion) QueryKek ¶
func (_m *KEKVersion) QueryKek() *KEKQuery
QueryKek queries the "kek" edge of the KEKVersion entity.
func (*KEKVersion) String ¶
func (_m *KEKVersion) String() string
String implements the fmt.Stringer.
func (*KEKVersion) Unwrap ¶
func (_m *KEKVersion) Unwrap() *KEKVersion
Unwrap unwraps the KEKVersion 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 (*KEKVersion) Update ¶
func (_m *KEKVersion) Update() *KEKVersionUpdateOne
Update returns a builder for updating this KEKVersion. Note that you need to call KEKVersion.Unwrap() before calling this method if this KEKVersion was returned from a transaction, and the transaction was committed or rolled back.
type KEKVersionClient ¶
type KEKVersionClient struct {
// contains filtered or unexported fields
}
KEKVersionClient is a client for the KEKVersion schema.
func NewKEKVersionClient ¶
func NewKEKVersionClient(c config) *KEKVersionClient
NewKEKVersionClient returns a client for the KEKVersion from the given config.
func (*KEKVersionClient) Create ¶
func (c *KEKVersionClient) Create() *KEKVersionCreate
Create returns a builder for creating a KEKVersion entity.
func (*KEKVersionClient) CreateBulk ¶
func (c *KEKVersionClient) CreateBulk(builders ...*KEKVersionCreate) *KEKVersionCreateBulk
CreateBulk returns a builder for creating a bulk of KEKVersion entities.
func (*KEKVersionClient) Delete ¶
func (c *KEKVersionClient) Delete() *KEKVersionDelete
Delete returns a delete builder for KEKVersion.
func (*KEKVersionClient) DeleteOne ¶
func (c *KEKVersionClient) DeleteOne(_m *KEKVersion) *KEKVersionDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*KEKVersionClient) DeleteOneID ¶
func (c *KEKVersionClient) DeleteOneID(id int) *KEKVersionDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*KEKVersionClient) ExecContext ¶
func (c *KEKVersionClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*KEKVersionClient) Get ¶
func (c *KEKVersionClient) Get(ctx context.Context, id int) (*KEKVersion, error)
Get returns a KEKVersion entity by its id.
func (*KEKVersionClient) GetX ¶
func (c *KEKVersionClient) GetX(ctx context.Context, id int) *KEKVersion
GetX is like Get, but panics if an error occurs.
func (*KEKVersionClient) Hooks ¶
func (c *KEKVersionClient) Hooks() []Hook
Hooks returns the client hooks.
func (*KEKVersionClient) Intercept ¶
func (c *KEKVersionClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `kekversion.Intercept(f(g(h())))`.
func (*KEKVersionClient) Interceptors ¶
func (c *KEKVersionClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*KEKVersionClient) MapCreateBulk ¶
func (c *KEKVersionClient) MapCreateBulk(slice any, setFunc func(*KEKVersionCreate, int)) *KEKVersionCreateBulk
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 (*KEKVersionClient) Query ¶
func (c *KEKVersionClient) Query() *KEKVersionQuery
Query returns a query builder for KEKVersion.
func (*KEKVersionClient) QueryContext ¶
func (c *KEKVersionClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*KEKVersionClient) QueryKek ¶
func (c *KEKVersionClient) QueryKek(_m *KEKVersion) *KEKQuery
QueryKek queries the kek edge of a KEKVersion.
func (*KEKVersionClient) Update ¶
func (c *KEKVersionClient) Update() *KEKVersionUpdate
Update returns an update builder for KEKVersion.
func (*KEKVersionClient) UpdateOne ¶
func (c *KEKVersionClient) UpdateOne(_m *KEKVersion) *KEKVersionUpdateOne
UpdateOne returns an update builder for the given entity.
func (*KEKVersionClient) UpdateOneID ¶
func (c *KEKVersionClient) UpdateOneID(id int) *KEKVersionUpdateOne
UpdateOneID returns an update builder for the given id.
func (*KEKVersionClient) Use ¶
func (c *KEKVersionClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `kekversion.Hooks(f(g(h())))`.
type KEKVersionCreate ¶
type KEKVersionCreate struct {
// contains filtered or unexported fields
}
KEKVersionCreate is the builder for creating a KEKVersion entity.
func (*KEKVersionCreate) Exec ¶
func (_c *KEKVersionCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*KEKVersionCreate) ExecContext ¶
func (c *KEKVersionCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*KEKVersionCreate) ExecX ¶
func (_c *KEKVersionCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*KEKVersionCreate) Mutation ¶
func (_c *KEKVersionCreate) Mutation() *KEKVersionMutation
Mutation returns the KEKVersionMutation object of the builder.
func (*KEKVersionCreate) OnConflict ¶
func (_c *KEKVersionCreate) OnConflict(opts ...sql.ConflictOption) *KEKVersionUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.KEKVersion.Create().
SetKekID(v).
OnConflict(
// Update the row with the new values
// the was proposed for insertion.
sql.ResolveWithNewValues(),
).
// Override some of the fields with custom
// update values.
Update(func(u *ent.KEKVersionUpsert) {
SetKekID(v+v).
}).
Exec(ctx)
func (*KEKVersionCreate) OnConflictColumns ¶
func (_c *KEKVersionCreate) OnConflictColumns(columns ...string) *KEKVersionUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.KEKVersion.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*KEKVersionCreate) QueryContext ¶
func (c *KEKVersionCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*KEKVersionCreate) Save ¶
func (_c *KEKVersionCreate) Save(ctx context.Context) (*KEKVersion, error)
Save creates the KEKVersion in the database.
func (*KEKVersionCreate) SaveX ¶
func (_c *KEKVersionCreate) SaveX(ctx context.Context) *KEKVersion
SaveX calls Save and panics if Save returns an error.
func (*KEKVersionCreate) SetActivatedAt ¶
func (_c *KEKVersionCreate) SetActivatedAt(v time.Time) *KEKVersionCreate
SetActivatedAt sets the "activated_at" field.
func (*KEKVersionCreate) SetCreatedAt ¶
func (_c *KEKVersionCreate) SetCreatedAt(v time.Time) *KEKVersionCreate
SetCreatedAt sets the "created_at" field.
func (*KEKVersionCreate) SetKek ¶
func (_c *KEKVersionCreate) SetKek(v *KEK) *KEKVersionCreate
SetKek sets the "kek" edge to the KEK entity.
func (*KEKVersionCreate) SetKekID ¶
func (_c *KEKVersionCreate) SetKekID(v envelope.ID) *KEKVersionCreate
SetKekID sets the "kek_id" field.
func (*KEKVersionCreate) SetNillableActivatedAt ¶
func (_c *KEKVersionCreate) SetNillableActivatedAt(v *time.Time) *KEKVersionCreate
SetNillableActivatedAt sets the "activated_at" field if the given value is not nil.
func (*KEKVersionCreate) SetNillableProviderRef ¶
func (_c *KEKVersionCreate) SetNillableProviderRef(v *string) *KEKVersionCreate
SetNillableProviderRef sets the "provider_ref" field if the given value is not nil.
func (*KEKVersionCreate) SetNillableRetireAfter ¶
func (_c *KEKVersionCreate) SetNillableRetireAfter(v *time.Time) *KEKVersionCreate
SetNillableRetireAfter sets the "retire_after" field if the given value is not nil.
func (*KEKVersionCreate) SetNillableRotatedAt ¶
func (_c *KEKVersionCreate) SetNillableRotatedAt(v *time.Time) *KEKVersionCreate
SetNillableRotatedAt sets the "rotated_at" field if the given value is not nil.
func (*KEKVersionCreate) SetProviderRef ¶
func (_c *KEKVersionCreate) SetProviderRef(v string) *KEKVersionCreate
SetProviderRef sets the "provider_ref" field.
func (*KEKVersionCreate) SetRetireAfter ¶
func (_c *KEKVersionCreate) SetRetireAfter(v time.Time) *KEKVersionCreate
SetRetireAfter sets the "retire_after" field.
func (*KEKVersionCreate) SetRotatedAt ¶
func (_c *KEKVersionCreate) SetRotatedAt(v time.Time) *KEKVersionCreate
SetRotatedAt sets the "rotated_at" field.
func (*KEKVersionCreate) SetState ¶
func (_c *KEKVersionCreate) SetState(v uint8) *KEKVersionCreate
SetState sets the "state" field.
func (*KEKVersionCreate) SetVersion ¶
func (_c *KEKVersionCreate) SetVersion(v uint32) *KEKVersionCreate
SetVersion sets the "version" field.
type KEKVersionCreateBulk ¶
type KEKVersionCreateBulk struct {
// contains filtered or unexported fields
}
KEKVersionCreateBulk is the builder for creating many KEKVersion entities in bulk.
func (*KEKVersionCreateBulk) Exec ¶
func (_c *KEKVersionCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*KEKVersionCreateBulk) ExecContext ¶
func (c *KEKVersionCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*KEKVersionCreateBulk) ExecX ¶
func (_c *KEKVersionCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*KEKVersionCreateBulk) OnConflict ¶
func (_c *KEKVersionCreateBulk) OnConflict(opts ...sql.ConflictOption) *KEKVersionUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.KEKVersion.CreateBulk(builders...).
OnConflict(
// Update the row with the new values
// the was proposed for insertion.
sql.ResolveWithNewValues(),
).
// Override some of the fields with custom
// update values.
Update(func(u *ent.KEKVersionUpsert) {
SetKekID(v+v).
}).
Exec(ctx)
func (*KEKVersionCreateBulk) OnConflictColumns ¶
func (_c *KEKVersionCreateBulk) OnConflictColumns(columns ...string) *KEKVersionUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.KEKVersion.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*KEKVersionCreateBulk) QueryContext ¶
func (c *KEKVersionCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*KEKVersionCreateBulk) Save ¶
func (_c *KEKVersionCreateBulk) Save(ctx context.Context) ([]*KEKVersion, error)
Save creates the KEKVersion entities in the database.
func (*KEKVersionCreateBulk) SaveX ¶
func (_c *KEKVersionCreateBulk) SaveX(ctx context.Context) []*KEKVersion
SaveX is like Save, but panics if an error occurs.
type KEKVersionDelete ¶
type KEKVersionDelete struct {
// contains filtered or unexported fields
}
KEKVersionDelete is the builder for deleting a KEKVersion entity.
func (*KEKVersionDelete) Exec ¶
func (_d *KEKVersionDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*KEKVersionDelete) ExecContext ¶
func (c *KEKVersionDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*KEKVersionDelete) ExecX ¶
func (_d *KEKVersionDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*KEKVersionDelete) QueryContext ¶
func (c *KEKVersionDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*KEKVersionDelete) Where ¶
func (_d *KEKVersionDelete) Where(ps ...predicate.KEKVersion) *KEKVersionDelete
Where appends a list predicates to the KEKVersionDelete builder.
type KEKVersionDeleteOne ¶
type KEKVersionDeleteOne struct {
// contains filtered or unexported fields
}
KEKVersionDeleteOne is the builder for deleting a single KEKVersion entity.
func (*KEKVersionDeleteOne) Exec ¶
func (_d *KEKVersionDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*KEKVersionDeleteOne) ExecX ¶
func (_d *KEKVersionDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*KEKVersionDeleteOne) Where ¶
func (_d *KEKVersionDeleteOne) Where(ps ...predicate.KEKVersion) *KEKVersionDeleteOne
Where appends a list predicates to the KEKVersionDelete builder.
type KEKVersionEdges ¶
type KEKVersionEdges struct {
// Kek holds the value of the kek edge.
Kek *KEK `json:"kek,omitempty"`
// contains filtered or unexported fields
}
KEKVersionEdges holds the relations/edges for other nodes in the graph.
func (KEKVersionEdges) KekOrErr ¶
func (e KEKVersionEdges) KekOrErr() (*KEK, error)
KekOrErr returns the Kek value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type KEKVersionGroupBy ¶
type KEKVersionGroupBy struct {
// contains filtered or unexported fields
}
KEKVersionGroupBy is the group-by builder for KEKVersion entities.
func (*KEKVersionGroupBy) Aggregate ¶
func (_g *KEKVersionGroupBy) Aggregate(fns ...AggregateFunc) *KEKVersionGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*KEKVersionGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*KEKVersionGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*KEKVersionGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*KEKVersionGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*KEKVersionGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*KEKVersionGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*KEKVersionGroupBy) Scan ¶
func (_g *KEKVersionGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*KEKVersionGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type KEKVersionMutation ¶
type KEKVersionMutation struct {
// contains filtered or unexported fields
}
KEKVersionMutation represents an operation that mutates the KEKVersion nodes in the graph.
func (*KEKVersionMutation) ActivatedAt ¶
func (m *KEKVersionMutation) ActivatedAt() (r time.Time, exists bool)
ActivatedAt returns the value of the "activated_at" field in the mutation.
func (*KEKVersionMutation) ActivatedAtCleared ¶
func (m *KEKVersionMutation) ActivatedAtCleared() bool
ActivatedAtCleared returns if the "activated_at" field was cleared in this mutation.
func (*KEKVersionMutation) AddField ¶
func (m *KEKVersionMutation) 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 (*KEKVersionMutation) AddState ¶
func (m *KEKVersionMutation) AddState(u int8)
AddState adds u to the "state" field.
func (*KEKVersionMutation) AddVersion ¶
func (m *KEKVersionMutation) AddVersion(u int32)
AddVersion adds u to the "version" field.
func (*KEKVersionMutation) AddedEdges ¶
func (m *KEKVersionMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*KEKVersionMutation) AddedField ¶
func (m *KEKVersionMutation) 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 (*KEKVersionMutation) AddedFields ¶
func (m *KEKVersionMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*KEKVersionMutation) AddedIDs ¶
func (m *KEKVersionMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*KEKVersionMutation) AddedState ¶
func (m *KEKVersionMutation) AddedState() (r int8, exists bool)
AddedState returns the value that was added to the "state" field in this mutation.
func (*KEKVersionMutation) AddedVersion ¶
func (m *KEKVersionMutation) AddedVersion() (r int32, exists bool)
AddedVersion returns the value that was added to the "version" field in this mutation.
func (*KEKVersionMutation) ClearActivatedAt ¶
func (m *KEKVersionMutation) ClearActivatedAt()
ClearActivatedAt clears the value of the "activated_at" field.
func (*KEKVersionMutation) ClearEdge ¶
func (m *KEKVersionMutation) 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 (*KEKVersionMutation) ClearField ¶
func (m *KEKVersionMutation) 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 (*KEKVersionMutation) ClearKek ¶
func (m *KEKVersionMutation) ClearKek()
ClearKek clears the "kek" edge to the KEK entity.
func (*KEKVersionMutation) ClearRetireAfter ¶
func (m *KEKVersionMutation) ClearRetireAfter()
ClearRetireAfter clears the value of the "retire_after" field.
func (*KEKVersionMutation) ClearRotatedAt ¶
func (m *KEKVersionMutation) ClearRotatedAt()
ClearRotatedAt clears the value of the "rotated_at" field.
func (*KEKVersionMutation) ClearedEdges ¶
func (m *KEKVersionMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*KEKVersionMutation) ClearedFields ¶
func (m *KEKVersionMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (KEKVersionMutation) Client ¶
func (m KEKVersionMutation) 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 (*KEKVersionMutation) CreatedAt ¶
func (m *KEKVersionMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*KEKVersionMutation) EdgeCleared ¶
func (m *KEKVersionMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*KEKVersionMutation) ExecContext ¶
func (c *KEKVersionMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*KEKVersionMutation) Field ¶
func (m *KEKVersionMutation) 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 (*KEKVersionMutation) FieldCleared ¶
func (m *KEKVersionMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*KEKVersionMutation) Fields ¶
func (m *KEKVersionMutation) 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 (*KEKVersionMutation) ID ¶
func (m *KEKVersionMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*KEKVersionMutation) IDs ¶
func (m *KEKVersionMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*KEKVersionMutation) KekCleared ¶
func (m *KEKVersionMutation) KekCleared() bool
KekCleared reports if the "kek" edge to the KEK entity was cleared.
func (*KEKVersionMutation) KekID ¶
func (m *KEKVersionMutation) KekID() (r envelope.ID, exists bool)
KekID returns the value of the "kek_id" field in the mutation.
func (*KEKVersionMutation) KekIDs ¶
func (m *KEKVersionMutation) KekIDs() (ids []envelope.ID)
KekIDs returns the "kek" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use KekID instead. It exists only for internal usage by the builders.
func (*KEKVersionMutation) OldActivatedAt ¶
OldActivatedAt returns the old "activated_at" field's value of the KEKVersion entity. If the KEKVersion object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*KEKVersionMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the KEKVersion entity. If the KEKVersion object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*KEKVersionMutation) 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 (*KEKVersionMutation) OldKekID ¶
OldKekID returns the old "kek_id" field's value of the KEKVersion entity. If the KEKVersion object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*KEKVersionMutation) OldProviderRef ¶
func (m *KEKVersionMutation) OldProviderRef(ctx context.Context) (v string, err error)
OldProviderRef returns the old "provider_ref" field's value of the KEKVersion entity. If the KEKVersion object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*KEKVersionMutation) OldRetireAfter ¶
OldRetireAfter returns the old "retire_after" field's value of the KEKVersion entity. If the KEKVersion object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*KEKVersionMutation) OldRotatedAt ¶
OldRotatedAt returns the old "rotated_at" field's value of the KEKVersion entity. If the KEKVersion object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*KEKVersionMutation) OldState ¶
func (m *KEKVersionMutation) OldState(ctx context.Context) (v uint8, err error)
OldState returns the old "state" field's value of the KEKVersion entity. If the KEKVersion object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*KEKVersionMutation) OldVersion ¶
func (m *KEKVersionMutation) OldVersion(ctx context.Context) (v uint32, err error)
OldVersion returns the old "version" field's value of the KEKVersion entity. If the KEKVersion object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*KEKVersionMutation) ProviderRef ¶
func (m *KEKVersionMutation) ProviderRef() (r string, exists bool)
ProviderRef returns the value of the "provider_ref" field in the mutation.
func (*KEKVersionMutation) QueryContext ¶
func (c *KEKVersionMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*KEKVersionMutation) RemovedEdges ¶
func (m *KEKVersionMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*KEKVersionMutation) RemovedIDs ¶
func (m *KEKVersionMutation) 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 (*KEKVersionMutation) ResetActivatedAt ¶
func (m *KEKVersionMutation) ResetActivatedAt()
ResetActivatedAt resets all changes to the "activated_at" field.
func (*KEKVersionMutation) ResetCreatedAt ¶
func (m *KEKVersionMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*KEKVersionMutation) ResetEdge ¶
func (m *KEKVersionMutation) 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 (*KEKVersionMutation) ResetField ¶
func (m *KEKVersionMutation) 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 (*KEKVersionMutation) ResetKek ¶
func (m *KEKVersionMutation) ResetKek()
ResetKek resets all changes to the "kek" edge.
func (*KEKVersionMutation) ResetKekID ¶
func (m *KEKVersionMutation) ResetKekID()
ResetKekID resets all changes to the "kek_id" field.
func (*KEKVersionMutation) ResetProviderRef ¶
func (m *KEKVersionMutation) ResetProviderRef()
ResetProviderRef resets all changes to the "provider_ref" field.
func (*KEKVersionMutation) ResetRetireAfter ¶
func (m *KEKVersionMutation) ResetRetireAfter()
ResetRetireAfter resets all changes to the "retire_after" field.
func (*KEKVersionMutation) ResetRotatedAt ¶
func (m *KEKVersionMutation) ResetRotatedAt()
ResetRotatedAt resets all changes to the "rotated_at" field.
func (*KEKVersionMutation) ResetState ¶
func (m *KEKVersionMutation) ResetState()
ResetState resets all changes to the "state" field.
func (*KEKVersionMutation) ResetVersion ¶
func (m *KEKVersionMutation) ResetVersion()
ResetVersion resets all changes to the "version" field.
func (*KEKVersionMutation) RetireAfter ¶
func (m *KEKVersionMutation) RetireAfter() (r time.Time, exists bool)
RetireAfter returns the value of the "retire_after" field in the mutation.
func (*KEKVersionMutation) RetireAfterCleared ¶
func (m *KEKVersionMutation) RetireAfterCleared() bool
RetireAfterCleared returns if the "retire_after" field was cleared in this mutation.
func (*KEKVersionMutation) RotatedAt ¶
func (m *KEKVersionMutation) RotatedAt() (r time.Time, exists bool)
RotatedAt returns the value of the "rotated_at" field in the mutation.
func (*KEKVersionMutation) RotatedAtCleared ¶
func (m *KEKVersionMutation) RotatedAtCleared() bool
RotatedAtCleared returns if the "rotated_at" field was cleared in this mutation.
func (*KEKVersionMutation) SetActivatedAt ¶
func (m *KEKVersionMutation) SetActivatedAt(t time.Time)
SetActivatedAt sets the "activated_at" field.
func (*KEKVersionMutation) SetCreatedAt ¶
func (m *KEKVersionMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*KEKVersionMutation) SetField ¶
func (m *KEKVersionMutation) 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 (*KEKVersionMutation) SetKekID ¶
func (m *KEKVersionMutation) SetKekID(e envelope.ID)
SetKekID sets the "kek_id" field.
func (*KEKVersionMutation) SetOp ¶
func (m *KEKVersionMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*KEKVersionMutation) SetProviderRef ¶
func (m *KEKVersionMutation) SetProviderRef(s string)
SetProviderRef sets the "provider_ref" field.
func (*KEKVersionMutation) SetRetireAfter ¶
func (m *KEKVersionMutation) SetRetireAfter(t time.Time)
SetRetireAfter sets the "retire_after" field.
func (*KEKVersionMutation) SetRotatedAt ¶
func (m *KEKVersionMutation) SetRotatedAt(t time.Time)
SetRotatedAt sets the "rotated_at" field.
func (*KEKVersionMutation) SetState ¶
func (m *KEKVersionMutation) SetState(u uint8)
SetState sets the "state" field.
func (*KEKVersionMutation) SetVersion ¶
func (m *KEKVersionMutation) SetVersion(u uint32)
SetVersion sets the "version" field.
func (*KEKVersionMutation) State ¶
func (m *KEKVersionMutation) State() (r uint8, exists bool)
State returns the value of the "state" field in the mutation.
func (KEKVersionMutation) Tx ¶
func (m KEKVersionMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*KEKVersionMutation) Type ¶
func (m *KEKVersionMutation) Type() string
Type returns the node type of this mutation (KEKVersion).
func (*KEKVersionMutation) Version ¶
func (m *KEKVersionMutation) Version() (r uint32, exists bool)
Version returns the value of the "version" field in the mutation.
func (*KEKVersionMutation) Where ¶
func (m *KEKVersionMutation) Where(ps ...predicate.KEKVersion)
Where appends a list predicates to the KEKVersionMutation builder.
func (*KEKVersionMutation) WhereP ¶
func (m *KEKVersionMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the KEKVersionMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type KEKVersionQuery ¶
type KEKVersionQuery struct {
// contains filtered or unexported fields
}
KEKVersionQuery is the builder for querying KEKVersion entities.
func (*KEKVersionQuery) Aggregate ¶
func (_q *KEKVersionQuery) Aggregate(fns ...AggregateFunc) *KEKVersionSelect
Aggregate returns a KEKVersionSelect configured with the given aggregations.
func (*KEKVersionQuery) All ¶
func (_q *KEKVersionQuery) All(ctx context.Context) ([]*KEKVersion, error)
All executes the query and returns a list of KEKVersions.
func (*KEKVersionQuery) AllX ¶
func (_q *KEKVersionQuery) AllX(ctx context.Context) []*KEKVersion
AllX is like All, but panics if an error occurs.
func (*KEKVersionQuery) Clone ¶
func (_q *KEKVersionQuery) Clone() *KEKVersionQuery
Clone returns a duplicate of the KEKVersionQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*KEKVersionQuery) Count ¶
func (_q *KEKVersionQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*KEKVersionQuery) CountX ¶
func (_q *KEKVersionQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*KEKVersionQuery) ExecContext ¶
func (c *KEKVersionQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*KEKVersionQuery) Exist ¶
func (_q *KEKVersionQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*KEKVersionQuery) ExistX ¶
func (_q *KEKVersionQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*KEKVersionQuery) First ¶
func (_q *KEKVersionQuery) First(ctx context.Context) (*KEKVersion, error)
First returns the first KEKVersion entity from the query. Returns a *NotFoundError when no KEKVersion was found.
func (*KEKVersionQuery) FirstID ¶
func (_q *KEKVersionQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first KEKVersion ID from the query. Returns a *NotFoundError when no KEKVersion ID was found.
func (*KEKVersionQuery) FirstIDX ¶
func (_q *KEKVersionQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*KEKVersionQuery) FirstX ¶
func (_q *KEKVersionQuery) FirstX(ctx context.Context) *KEKVersion
FirstX is like First, but panics if an error occurs.
func (*KEKVersionQuery) ForShare ¶
func (_q *KEKVersionQuery) ForShare(opts ...sql.LockOption) *KEKVersionQuery
ForShare behaves similarly to ForUpdate, except that it acquires a shared mode lock on any rows that are read. Other sessions can read the rows, but cannot modify them until your transaction commits.
func (*KEKVersionQuery) ForUpdate ¶
func (_q *KEKVersionQuery) ForUpdate(opts ...sql.LockOption) *KEKVersionQuery
ForUpdate locks the selected rows against concurrent updates, and prevent them from being updated, deleted or "selected ... for update" by other sessions, until the transaction is either committed or rolled-back.
func (*KEKVersionQuery) GroupBy ¶
func (_q *KEKVersionQuery) GroupBy(field string, fields ...string) *KEKVersionGroupBy
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 {
KekID envelope.ID `json:"kek_id,omitempty"`
Count int `json:"count,omitempty"`
}
client.KEKVersion.Query().
GroupBy(kekversion.FieldKekID).
Aggregate(ent.Count()).
Scan(ctx, &v)
func (*KEKVersionQuery) IDs ¶
func (_q *KEKVersionQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of KEKVersion IDs.
func (*KEKVersionQuery) IDsX ¶
func (_q *KEKVersionQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*KEKVersionQuery) Limit ¶
func (_q *KEKVersionQuery) Limit(limit int) *KEKVersionQuery
Limit the number of records to be returned by this query.
func (*KEKVersionQuery) Offset ¶
func (_q *KEKVersionQuery) Offset(offset int) *KEKVersionQuery
Offset to start from.
func (*KEKVersionQuery) Only ¶
func (_q *KEKVersionQuery) Only(ctx context.Context) (*KEKVersion, error)
Only returns a single KEKVersion entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one KEKVersion entity is found. Returns a *NotFoundError when no KEKVersion entities are found.
func (*KEKVersionQuery) OnlyID ¶
func (_q *KEKVersionQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only KEKVersion ID in the query. Returns a *NotSingularError when more than one KEKVersion ID is found. Returns a *NotFoundError when no entities are found.
func (*KEKVersionQuery) OnlyIDX ¶
func (_q *KEKVersionQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*KEKVersionQuery) OnlyX ¶
func (_q *KEKVersionQuery) OnlyX(ctx context.Context) *KEKVersion
OnlyX is like Only, but panics if an error occurs.
func (*KEKVersionQuery) Order ¶
func (_q *KEKVersionQuery) Order(o ...kekversion.OrderOption) *KEKVersionQuery
Order specifies how the records should be ordered.
func (*KEKVersionQuery) QueryContext ¶
func (c *KEKVersionQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*KEKVersionQuery) QueryKek ¶
func (_q *KEKVersionQuery) QueryKek() *KEKQuery
QueryKek chains the current query on the "kek" edge.
func (*KEKVersionQuery) Select ¶
func (_q *KEKVersionQuery) Select(fields ...string) *KEKVersionSelect
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 {
KekID envelope.ID `json:"kek_id,omitempty"`
}
client.KEKVersion.Query().
Select(kekversion.FieldKekID).
Scan(ctx, &v)
func (*KEKVersionQuery) Unique ¶
func (_q *KEKVersionQuery) Unique(unique bool) *KEKVersionQuery
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 (*KEKVersionQuery) Where ¶
func (_q *KEKVersionQuery) Where(ps ...predicate.KEKVersion) *KEKVersionQuery
Where adds a new predicate for the KEKVersionQuery builder.
func (*KEKVersionQuery) WithKek ¶
func (_q *KEKVersionQuery) WithKek(opts ...func(*KEKQuery)) *KEKVersionQuery
WithKek tells the query-builder to eager-load the nodes that are connected to the "kek" edge. The optional arguments are used to configure the query builder of the edge.
type KEKVersionSelect ¶
type KEKVersionSelect struct {
*KEKVersionQuery
// contains filtered or unexported fields
}
KEKVersionSelect is the builder for selecting fields of KEKVersion entities.
func (*KEKVersionSelect) Aggregate ¶
func (_s *KEKVersionSelect) Aggregate(fns ...AggregateFunc) *KEKVersionSelect
Aggregate adds the given aggregation functions to the selector query.
func (*KEKVersionSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*KEKVersionSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (KEKVersionSelect) ExecContext ¶
func (c KEKVersionSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*KEKVersionSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*KEKVersionSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*KEKVersionSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*KEKVersionSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (KEKVersionSelect) QueryContext ¶
func (c KEKVersionSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*KEKVersionSelect) Scan ¶
func (_s *KEKVersionSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*KEKVersionSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type KEKVersionUpdate ¶
type KEKVersionUpdate struct {
// contains filtered or unexported fields
}
KEKVersionUpdate is the builder for updating KEKVersion entities.
func (*KEKVersionUpdate) AddState ¶
func (_u *KEKVersionUpdate) AddState(v int8) *KEKVersionUpdate
AddState adds value to the "state" field.
func (*KEKVersionUpdate) AddVersion ¶
func (_u *KEKVersionUpdate) AddVersion(v int32) *KEKVersionUpdate
AddVersion adds value to the "version" field.
func (*KEKVersionUpdate) ClearActivatedAt ¶
func (_u *KEKVersionUpdate) ClearActivatedAt() *KEKVersionUpdate
ClearActivatedAt clears the value of the "activated_at" field.
func (*KEKVersionUpdate) ClearKek ¶
func (_u *KEKVersionUpdate) ClearKek() *KEKVersionUpdate
ClearKek clears the "kek" edge to the KEK entity.
func (*KEKVersionUpdate) ClearRetireAfter ¶
func (_u *KEKVersionUpdate) ClearRetireAfter() *KEKVersionUpdate
ClearRetireAfter clears the value of the "retire_after" field.
func (*KEKVersionUpdate) ClearRotatedAt ¶
func (_u *KEKVersionUpdate) ClearRotatedAt() *KEKVersionUpdate
ClearRotatedAt clears the value of the "rotated_at" field.
func (*KEKVersionUpdate) Exec ¶
func (_u *KEKVersionUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*KEKVersionUpdate) ExecContext ¶
func (c *KEKVersionUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*KEKVersionUpdate) ExecX ¶
func (_u *KEKVersionUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*KEKVersionUpdate) Mutation ¶
func (_u *KEKVersionUpdate) Mutation() *KEKVersionMutation
Mutation returns the KEKVersionMutation object of the builder.
func (*KEKVersionUpdate) QueryContext ¶
func (c *KEKVersionUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*KEKVersionUpdate) Save ¶
func (_u *KEKVersionUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*KEKVersionUpdate) SaveX ¶
func (_u *KEKVersionUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*KEKVersionUpdate) SetActivatedAt ¶
func (_u *KEKVersionUpdate) SetActivatedAt(v time.Time) *KEKVersionUpdate
SetActivatedAt sets the "activated_at" field.
func (*KEKVersionUpdate) SetCreatedAt ¶
func (_u *KEKVersionUpdate) SetCreatedAt(v time.Time) *KEKVersionUpdate
SetCreatedAt sets the "created_at" field.
func (*KEKVersionUpdate) SetKek ¶
func (_u *KEKVersionUpdate) SetKek(v *KEK) *KEKVersionUpdate
SetKek sets the "kek" edge to the KEK entity.
func (*KEKVersionUpdate) SetKekID ¶
func (_u *KEKVersionUpdate) SetKekID(v envelope.ID) *KEKVersionUpdate
SetKekID sets the "kek_id" field.
func (*KEKVersionUpdate) SetNillableActivatedAt ¶
func (_u *KEKVersionUpdate) SetNillableActivatedAt(v *time.Time) *KEKVersionUpdate
SetNillableActivatedAt sets the "activated_at" field if the given value is not nil.
func (*KEKVersionUpdate) SetNillableCreatedAt ¶
func (_u *KEKVersionUpdate) SetNillableCreatedAt(v *time.Time) *KEKVersionUpdate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*KEKVersionUpdate) SetNillableKekID ¶
func (_u *KEKVersionUpdate) SetNillableKekID(v *envelope.ID) *KEKVersionUpdate
SetNillableKekID sets the "kek_id" field if the given value is not nil.
func (*KEKVersionUpdate) SetNillableProviderRef ¶
func (_u *KEKVersionUpdate) SetNillableProviderRef(v *string) *KEKVersionUpdate
SetNillableProviderRef sets the "provider_ref" field if the given value is not nil.
func (*KEKVersionUpdate) SetNillableRetireAfter ¶
func (_u *KEKVersionUpdate) SetNillableRetireAfter(v *time.Time) *KEKVersionUpdate
SetNillableRetireAfter sets the "retire_after" field if the given value is not nil.
func (*KEKVersionUpdate) SetNillableRotatedAt ¶
func (_u *KEKVersionUpdate) SetNillableRotatedAt(v *time.Time) *KEKVersionUpdate
SetNillableRotatedAt sets the "rotated_at" field if the given value is not nil.
func (*KEKVersionUpdate) SetNillableState ¶
func (_u *KEKVersionUpdate) SetNillableState(v *uint8) *KEKVersionUpdate
SetNillableState sets the "state" field if the given value is not nil.
func (*KEKVersionUpdate) SetNillableVersion ¶
func (_u *KEKVersionUpdate) SetNillableVersion(v *uint32) *KEKVersionUpdate
SetNillableVersion sets the "version" field if the given value is not nil.
func (*KEKVersionUpdate) SetProviderRef ¶
func (_u *KEKVersionUpdate) SetProviderRef(v string) *KEKVersionUpdate
SetProviderRef sets the "provider_ref" field.
func (*KEKVersionUpdate) SetRetireAfter ¶
func (_u *KEKVersionUpdate) SetRetireAfter(v time.Time) *KEKVersionUpdate
SetRetireAfter sets the "retire_after" field.
func (*KEKVersionUpdate) SetRotatedAt ¶
func (_u *KEKVersionUpdate) SetRotatedAt(v time.Time) *KEKVersionUpdate
SetRotatedAt sets the "rotated_at" field.
func (*KEKVersionUpdate) SetState ¶
func (_u *KEKVersionUpdate) SetState(v uint8) *KEKVersionUpdate
SetState sets the "state" field.
func (*KEKVersionUpdate) SetVersion ¶
func (_u *KEKVersionUpdate) SetVersion(v uint32) *KEKVersionUpdate
SetVersion sets the "version" field.
func (*KEKVersionUpdate) Where ¶
func (_u *KEKVersionUpdate) Where(ps ...predicate.KEKVersion) *KEKVersionUpdate
Where appends a list predicates to the KEKVersionUpdate builder.
type KEKVersionUpdateOne ¶
type KEKVersionUpdateOne struct {
// contains filtered or unexported fields
}
KEKVersionUpdateOne is the builder for updating a single KEKVersion entity.
func (*KEKVersionUpdateOne) AddState ¶
func (_u *KEKVersionUpdateOne) AddState(v int8) *KEKVersionUpdateOne
AddState adds value to the "state" field.
func (*KEKVersionUpdateOne) AddVersion ¶
func (_u *KEKVersionUpdateOne) AddVersion(v int32) *KEKVersionUpdateOne
AddVersion adds value to the "version" field.
func (*KEKVersionUpdateOne) ClearActivatedAt ¶
func (_u *KEKVersionUpdateOne) ClearActivatedAt() *KEKVersionUpdateOne
ClearActivatedAt clears the value of the "activated_at" field.
func (*KEKVersionUpdateOne) ClearKek ¶
func (_u *KEKVersionUpdateOne) ClearKek() *KEKVersionUpdateOne
ClearKek clears the "kek" edge to the KEK entity.
func (*KEKVersionUpdateOne) ClearRetireAfter ¶
func (_u *KEKVersionUpdateOne) ClearRetireAfter() *KEKVersionUpdateOne
ClearRetireAfter clears the value of the "retire_after" field.
func (*KEKVersionUpdateOne) ClearRotatedAt ¶
func (_u *KEKVersionUpdateOne) ClearRotatedAt() *KEKVersionUpdateOne
ClearRotatedAt clears the value of the "rotated_at" field.
func (*KEKVersionUpdateOne) Exec ¶
func (_u *KEKVersionUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*KEKVersionUpdateOne) ExecContext ¶
func (c *KEKVersionUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*KEKVersionUpdateOne) ExecX ¶
func (_u *KEKVersionUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*KEKVersionUpdateOne) Mutation ¶
func (_u *KEKVersionUpdateOne) Mutation() *KEKVersionMutation
Mutation returns the KEKVersionMutation object of the builder.
func (*KEKVersionUpdateOne) QueryContext ¶
func (c *KEKVersionUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*KEKVersionUpdateOne) Save ¶
func (_u *KEKVersionUpdateOne) Save(ctx context.Context) (*KEKVersion, error)
Save executes the query and returns the updated KEKVersion entity.
func (*KEKVersionUpdateOne) SaveX ¶
func (_u *KEKVersionUpdateOne) SaveX(ctx context.Context) *KEKVersion
SaveX is like Save, but panics if an error occurs.
func (*KEKVersionUpdateOne) Select ¶
func (_u *KEKVersionUpdateOne) Select(field string, fields ...string) *KEKVersionUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*KEKVersionUpdateOne) SetActivatedAt ¶
func (_u *KEKVersionUpdateOne) SetActivatedAt(v time.Time) *KEKVersionUpdateOne
SetActivatedAt sets the "activated_at" field.
func (*KEKVersionUpdateOne) SetCreatedAt ¶
func (_u *KEKVersionUpdateOne) SetCreatedAt(v time.Time) *KEKVersionUpdateOne
SetCreatedAt sets the "created_at" field.
func (*KEKVersionUpdateOne) SetKek ¶
func (_u *KEKVersionUpdateOne) SetKek(v *KEK) *KEKVersionUpdateOne
SetKek sets the "kek" edge to the KEK entity.
func (*KEKVersionUpdateOne) SetKekID ¶
func (_u *KEKVersionUpdateOne) SetKekID(v envelope.ID) *KEKVersionUpdateOne
SetKekID sets the "kek_id" field.
func (*KEKVersionUpdateOne) SetNillableActivatedAt ¶
func (_u *KEKVersionUpdateOne) SetNillableActivatedAt(v *time.Time) *KEKVersionUpdateOne
SetNillableActivatedAt sets the "activated_at" field if the given value is not nil.
func (*KEKVersionUpdateOne) SetNillableCreatedAt ¶
func (_u *KEKVersionUpdateOne) SetNillableCreatedAt(v *time.Time) *KEKVersionUpdateOne
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*KEKVersionUpdateOne) SetNillableKekID ¶
func (_u *KEKVersionUpdateOne) SetNillableKekID(v *envelope.ID) *KEKVersionUpdateOne
SetNillableKekID sets the "kek_id" field if the given value is not nil.
func (*KEKVersionUpdateOne) SetNillableProviderRef ¶
func (_u *KEKVersionUpdateOne) SetNillableProviderRef(v *string) *KEKVersionUpdateOne
SetNillableProviderRef sets the "provider_ref" field if the given value is not nil.
func (*KEKVersionUpdateOne) SetNillableRetireAfter ¶
func (_u *KEKVersionUpdateOne) SetNillableRetireAfter(v *time.Time) *KEKVersionUpdateOne
SetNillableRetireAfter sets the "retire_after" field if the given value is not nil.
func (*KEKVersionUpdateOne) SetNillableRotatedAt ¶
func (_u *KEKVersionUpdateOne) SetNillableRotatedAt(v *time.Time) *KEKVersionUpdateOne
SetNillableRotatedAt sets the "rotated_at" field if the given value is not nil.
func (*KEKVersionUpdateOne) SetNillableState ¶
func (_u *KEKVersionUpdateOne) SetNillableState(v *uint8) *KEKVersionUpdateOne
SetNillableState sets the "state" field if the given value is not nil.
func (*KEKVersionUpdateOne) SetNillableVersion ¶
func (_u *KEKVersionUpdateOne) SetNillableVersion(v *uint32) *KEKVersionUpdateOne
SetNillableVersion sets the "version" field if the given value is not nil.
func (*KEKVersionUpdateOne) SetProviderRef ¶
func (_u *KEKVersionUpdateOne) SetProviderRef(v string) *KEKVersionUpdateOne
SetProviderRef sets the "provider_ref" field.
func (*KEKVersionUpdateOne) SetRetireAfter ¶
func (_u *KEKVersionUpdateOne) SetRetireAfter(v time.Time) *KEKVersionUpdateOne
SetRetireAfter sets the "retire_after" field.
func (*KEKVersionUpdateOne) SetRotatedAt ¶
func (_u *KEKVersionUpdateOne) SetRotatedAt(v time.Time) *KEKVersionUpdateOne
SetRotatedAt sets the "rotated_at" field.
func (*KEKVersionUpdateOne) SetState ¶
func (_u *KEKVersionUpdateOne) SetState(v uint8) *KEKVersionUpdateOne
SetState sets the "state" field.
func (*KEKVersionUpdateOne) SetVersion ¶
func (_u *KEKVersionUpdateOne) SetVersion(v uint32) *KEKVersionUpdateOne
SetVersion sets the "version" field.
func (*KEKVersionUpdateOne) Where ¶
func (_u *KEKVersionUpdateOne) Where(ps ...predicate.KEKVersion) *KEKVersionUpdateOne
Where appends a list predicates to the KEKVersionUpdate builder.
type KEKVersionUpsert ¶
KEKVersionUpsert is the "OnConflict" setter.
func (*KEKVersionUpsert) AddState ¶
func (u *KEKVersionUpsert) AddState(v uint8) *KEKVersionUpsert
AddState adds v to the "state" field.
func (*KEKVersionUpsert) AddVersion ¶
func (u *KEKVersionUpsert) AddVersion(v uint32) *KEKVersionUpsert
AddVersion adds v to the "version" field.
func (*KEKVersionUpsert) ClearActivatedAt ¶
func (u *KEKVersionUpsert) ClearActivatedAt() *KEKVersionUpsert
ClearActivatedAt clears the value of the "activated_at" field.
func (*KEKVersionUpsert) ClearRetireAfter ¶
func (u *KEKVersionUpsert) ClearRetireAfter() *KEKVersionUpsert
ClearRetireAfter clears the value of the "retire_after" field.
func (*KEKVersionUpsert) ClearRotatedAt ¶
func (u *KEKVersionUpsert) ClearRotatedAt() *KEKVersionUpsert
ClearRotatedAt clears the value of the "rotated_at" field.
func (*KEKVersionUpsert) SetActivatedAt ¶
func (u *KEKVersionUpsert) SetActivatedAt(v time.Time) *KEKVersionUpsert
SetActivatedAt sets the "activated_at" field.
func (*KEKVersionUpsert) SetCreatedAt ¶
func (u *KEKVersionUpsert) SetCreatedAt(v time.Time) *KEKVersionUpsert
SetCreatedAt sets the "created_at" field.
func (*KEKVersionUpsert) SetKekID ¶
func (u *KEKVersionUpsert) SetKekID(v envelope.ID) *KEKVersionUpsert
SetKekID sets the "kek_id" field.
func (*KEKVersionUpsert) SetProviderRef ¶
func (u *KEKVersionUpsert) SetProviderRef(v string) *KEKVersionUpsert
SetProviderRef sets the "provider_ref" field.
func (*KEKVersionUpsert) SetRetireAfter ¶
func (u *KEKVersionUpsert) SetRetireAfter(v time.Time) *KEKVersionUpsert
SetRetireAfter sets the "retire_after" field.
func (*KEKVersionUpsert) SetRotatedAt ¶
func (u *KEKVersionUpsert) SetRotatedAt(v time.Time) *KEKVersionUpsert
SetRotatedAt sets the "rotated_at" field.
func (*KEKVersionUpsert) SetState ¶
func (u *KEKVersionUpsert) SetState(v uint8) *KEKVersionUpsert
SetState sets the "state" field.
func (*KEKVersionUpsert) SetVersion ¶
func (u *KEKVersionUpsert) SetVersion(v uint32) *KEKVersionUpsert
SetVersion sets the "version" field.
func (*KEKVersionUpsert) UpdateActivatedAt ¶
func (u *KEKVersionUpsert) UpdateActivatedAt() *KEKVersionUpsert
UpdateActivatedAt sets the "activated_at" field to the value that was provided on create.
func (*KEKVersionUpsert) UpdateCreatedAt ¶
func (u *KEKVersionUpsert) UpdateCreatedAt() *KEKVersionUpsert
UpdateCreatedAt sets the "created_at" field to the value that was provided on create.
func (*KEKVersionUpsert) UpdateKekID ¶
func (u *KEKVersionUpsert) UpdateKekID() *KEKVersionUpsert
UpdateKekID sets the "kek_id" field to the value that was provided on create.
func (*KEKVersionUpsert) UpdateProviderRef ¶
func (u *KEKVersionUpsert) UpdateProviderRef() *KEKVersionUpsert
UpdateProviderRef sets the "provider_ref" field to the value that was provided on create.
func (*KEKVersionUpsert) UpdateRetireAfter ¶
func (u *KEKVersionUpsert) UpdateRetireAfter() *KEKVersionUpsert
UpdateRetireAfter sets the "retire_after" field to the value that was provided on create.
func (*KEKVersionUpsert) UpdateRotatedAt ¶
func (u *KEKVersionUpsert) UpdateRotatedAt() *KEKVersionUpsert
UpdateRotatedAt sets the "rotated_at" field to the value that was provided on create.
func (*KEKVersionUpsert) UpdateState ¶
func (u *KEKVersionUpsert) UpdateState() *KEKVersionUpsert
UpdateState sets the "state" field to the value that was provided on create.
func (*KEKVersionUpsert) UpdateVersion ¶
func (u *KEKVersionUpsert) UpdateVersion() *KEKVersionUpsert
UpdateVersion sets the "version" field to the value that was provided on create.
type KEKVersionUpsertBulk ¶
type KEKVersionUpsertBulk struct {
// contains filtered or unexported fields
}
KEKVersionUpsertBulk is the builder for "upsert"-ing a bulk of KEKVersion nodes.
func (*KEKVersionUpsertBulk) AddState ¶
func (u *KEKVersionUpsertBulk) AddState(v uint8) *KEKVersionUpsertBulk
AddState adds v to the "state" field.
func (*KEKVersionUpsertBulk) AddVersion ¶
func (u *KEKVersionUpsertBulk) AddVersion(v uint32) *KEKVersionUpsertBulk
AddVersion adds v to the "version" field.
func (*KEKVersionUpsertBulk) ClearActivatedAt ¶
func (u *KEKVersionUpsertBulk) ClearActivatedAt() *KEKVersionUpsertBulk
ClearActivatedAt clears the value of the "activated_at" field.
func (*KEKVersionUpsertBulk) ClearRetireAfter ¶
func (u *KEKVersionUpsertBulk) ClearRetireAfter() *KEKVersionUpsertBulk
ClearRetireAfter clears the value of the "retire_after" field.
func (*KEKVersionUpsertBulk) ClearRotatedAt ¶
func (u *KEKVersionUpsertBulk) ClearRotatedAt() *KEKVersionUpsertBulk
ClearRotatedAt clears the value of the "rotated_at" field.
func (*KEKVersionUpsertBulk) DoNothing ¶
func (u *KEKVersionUpsertBulk) DoNothing() *KEKVersionUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*KEKVersionUpsertBulk) Exec ¶
func (u *KEKVersionUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*KEKVersionUpsertBulk) ExecX ¶
func (u *KEKVersionUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*KEKVersionUpsertBulk) Ignore ¶
func (u *KEKVersionUpsertBulk) Ignore() *KEKVersionUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.KEKVersion.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*KEKVersionUpsertBulk) SetActivatedAt ¶
func (u *KEKVersionUpsertBulk) SetActivatedAt(v time.Time) *KEKVersionUpsertBulk
SetActivatedAt sets the "activated_at" field.
func (*KEKVersionUpsertBulk) SetCreatedAt ¶
func (u *KEKVersionUpsertBulk) SetCreatedAt(v time.Time) *KEKVersionUpsertBulk
SetCreatedAt sets the "created_at" field.
func (*KEKVersionUpsertBulk) SetKekID ¶
func (u *KEKVersionUpsertBulk) SetKekID(v envelope.ID) *KEKVersionUpsertBulk
SetKekID sets the "kek_id" field.
func (*KEKVersionUpsertBulk) SetProviderRef ¶
func (u *KEKVersionUpsertBulk) SetProviderRef(v string) *KEKVersionUpsertBulk
SetProviderRef sets the "provider_ref" field.
func (*KEKVersionUpsertBulk) SetRetireAfter ¶
func (u *KEKVersionUpsertBulk) SetRetireAfter(v time.Time) *KEKVersionUpsertBulk
SetRetireAfter sets the "retire_after" field.
func (*KEKVersionUpsertBulk) SetRotatedAt ¶
func (u *KEKVersionUpsertBulk) SetRotatedAt(v time.Time) *KEKVersionUpsertBulk
SetRotatedAt sets the "rotated_at" field.
func (*KEKVersionUpsertBulk) SetState ¶
func (u *KEKVersionUpsertBulk) SetState(v uint8) *KEKVersionUpsertBulk
SetState sets the "state" field.
func (*KEKVersionUpsertBulk) SetVersion ¶
func (u *KEKVersionUpsertBulk) SetVersion(v uint32) *KEKVersionUpsertBulk
SetVersion sets the "version" field.
func (*KEKVersionUpsertBulk) Update ¶
func (u *KEKVersionUpsertBulk) Update(set func(*KEKVersionUpsert)) *KEKVersionUpsertBulk
Update allows overriding fields `UPDATE` values. See the KEKVersionCreateBulk.OnConflict documentation for more info.
func (*KEKVersionUpsertBulk) UpdateActivatedAt ¶
func (u *KEKVersionUpsertBulk) UpdateActivatedAt() *KEKVersionUpsertBulk
UpdateActivatedAt sets the "activated_at" field to the value that was provided on create.
func (*KEKVersionUpsertBulk) UpdateCreatedAt ¶
func (u *KEKVersionUpsertBulk) UpdateCreatedAt() *KEKVersionUpsertBulk
UpdateCreatedAt sets the "created_at" field to the value that was provided on create.
func (*KEKVersionUpsertBulk) UpdateKekID ¶
func (u *KEKVersionUpsertBulk) UpdateKekID() *KEKVersionUpsertBulk
UpdateKekID sets the "kek_id" field to the value that was provided on create.
func (*KEKVersionUpsertBulk) UpdateNewValues ¶
func (u *KEKVersionUpsertBulk) UpdateNewValues() *KEKVersionUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.KEKVersion.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*KEKVersionUpsertBulk) UpdateProviderRef ¶
func (u *KEKVersionUpsertBulk) UpdateProviderRef() *KEKVersionUpsertBulk
UpdateProviderRef sets the "provider_ref" field to the value that was provided on create.
func (*KEKVersionUpsertBulk) UpdateRetireAfter ¶
func (u *KEKVersionUpsertBulk) UpdateRetireAfter() *KEKVersionUpsertBulk
UpdateRetireAfter sets the "retire_after" field to the value that was provided on create.
func (*KEKVersionUpsertBulk) UpdateRotatedAt ¶
func (u *KEKVersionUpsertBulk) UpdateRotatedAt() *KEKVersionUpsertBulk
UpdateRotatedAt sets the "rotated_at" field to the value that was provided on create.
func (*KEKVersionUpsertBulk) UpdateState ¶
func (u *KEKVersionUpsertBulk) UpdateState() *KEKVersionUpsertBulk
UpdateState sets the "state" field to the value that was provided on create.
func (*KEKVersionUpsertBulk) UpdateVersion ¶
func (u *KEKVersionUpsertBulk) UpdateVersion() *KEKVersionUpsertBulk
UpdateVersion sets the "version" field to the value that was provided on create.
type KEKVersionUpsertOne ¶
type KEKVersionUpsertOne struct {
// contains filtered or unexported fields
}
KEKVersionUpsertOne is the builder for "upsert"-ing
one KEKVersion node.
func (*KEKVersionUpsertOne) AddState ¶
func (u *KEKVersionUpsertOne) AddState(v uint8) *KEKVersionUpsertOne
AddState adds v to the "state" field.
func (*KEKVersionUpsertOne) AddVersion ¶
func (u *KEKVersionUpsertOne) AddVersion(v uint32) *KEKVersionUpsertOne
AddVersion adds v to the "version" field.
func (*KEKVersionUpsertOne) ClearActivatedAt ¶
func (u *KEKVersionUpsertOne) ClearActivatedAt() *KEKVersionUpsertOne
ClearActivatedAt clears the value of the "activated_at" field.
func (*KEKVersionUpsertOne) ClearRetireAfter ¶
func (u *KEKVersionUpsertOne) ClearRetireAfter() *KEKVersionUpsertOne
ClearRetireAfter clears the value of the "retire_after" field.
func (*KEKVersionUpsertOne) ClearRotatedAt ¶
func (u *KEKVersionUpsertOne) ClearRotatedAt() *KEKVersionUpsertOne
ClearRotatedAt clears the value of the "rotated_at" field.
func (*KEKVersionUpsertOne) DoNothing ¶
func (u *KEKVersionUpsertOne) DoNothing() *KEKVersionUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*KEKVersionUpsertOne) Exec ¶
func (u *KEKVersionUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*KEKVersionUpsertOne) ExecX ¶
func (u *KEKVersionUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*KEKVersionUpsertOne) ID ¶
func (u *KEKVersionUpsertOne) ID(ctx context.Context) (id int, err error)
Exec executes the UPSERT query and returns the inserted/updated ID.
func (*KEKVersionUpsertOne) IDX ¶
func (u *KEKVersionUpsertOne) IDX(ctx context.Context) int
IDX is like ID, but panics if an error occurs.
func (*KEKVersionUpsertOne) Ignore ¶
func (u *KEKVersionUpsertOne) Ignore() *KEKVersionUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.KEKVersion.Create().
OnConflict(sql.ResolveWithIgnore()).
Exec(ctx)
func (*KEKVersionUpsertOne) SetActivatedAt ¶
func (u *KEKVersionUpsertOne) SetActivatedAt(v time.Time) *KEKVersionUpsertOne
SetActivatedAt sets the "activated_at" field.
func (*KEKVersionUpsertOne) SetCreatedAt ¶
func (u *KEKVersionUpsertOne) SetCreatedAt(v time.Time) *KEKVersionUpsertOne
SetCreatedAt sets the "created_at" field.
func (*KEKVersionUpsertOne) SetKekID ¶
func (u *KEKVersionUpsertOne) SetKekID(v envelope.ID) *KEKVersionUpsertOne
SetKekID sets the "kek_id" field.
func (*KEKVersionUpsertOne) SetProviderRef ¶
func (u *KEKVersionUpsertOne) SetProviderRef(v string) *KEKVersionUpsertOne
SetProviderRef sets the "provider_ref" field.
func (*KEKVersionUpsertOne) SetRetireAfter ¶
func (u *KEKVersionUpsertOne) SetRetireAfter(v time.Time) *KEKVersionUpsertOne
SetRetireAfter sets the "retire_after" field.
func (*KEKVersionUpsertOne) SetRotatedAt ¶
func (u *KEKVersionUpsertOne) SetRotatedAt(v time.Time) *KEKVersionUpsertOne
SetRotatedAt sets the "rotated_at" field.
func (*KEKVersionUpsertOne) SetState ¶
func (u *KEKVersionUpsertOne) SetState(v uint8) *KEKVersionUpsertOne
SetState sets the "state" field.
func (*KEKVersionUpsertOne) SetVersion ¶
func (u *KEKVersionUpsertOne) SetVersion(v uint32) *KEKVersionUpsertOne
SetVersion sets the "version" field.
func (*KEKVersionUpsertOne) Update ¶
func (u *KEKVersionUpsertOne) Update(set func(*KEKVersionUpsert)) *KEKVersionUpsertOne
Update allows overriding fields `UPDATE` values. See the KEKVersionCreate.OnConflict documentation for more info.
func (*KEKVersionUpsertOne) UpdateActivatedAt ¶
func (u *KEKVersionUpsertOne) UpdateActivatedAt() *KEKVersionUpsertOne
UpdateActivatedAt sets the "activated_at" field to the value that was provided on create.
func (*KEKVersionUpsertOne) UpdateCreatedAt ¶
func (u *KEKVersionUpsertOne) UpdateCreatedAt() *KEKVersionUpsertOne
UpdateCreatedAt sets the "created_at" field to the value that was provided on create.
func (*KEKVersionUpsertOne) UpdateKekID ¶
func (u *KEKVersionUpsertOne) UpdateKekID() *KEKVersionUpsertOne
UpdateKekID sets the "kek_id" field to the value that was provided on create.
func (*KEKVersionUpsertOne) UpdateNewValues ¶
func (u *KEKVersionUpsertOne) UpdateNewValues() *KEKVersionUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.KEKVersion.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*KEKVersionUpsertOne) UpdateProviderRef ¶
func (u *KEKVersionUpsertOne) UpdateProviderRef() *KEKVersionUpsertOne
UpdateProviderRef sets the "provider_ref" field to the value that was provided on create.
func (*KEKVersionUpsertOne) UpdateRetireAfter ¶
func (u *KEKVersionUpsertOne) UpdateRetireAfter() *KEKVersionUpsertOne
UpdateRetireAfter sets the "retire_after" field to the value that was provided on create.
func (*KEKVersionUpsertOne) UpdateRotatedAt ¶
func (u *KEKVersionUpsertOne) UpdateRotatedAt() *KEKVersionUpsertOne
UpdateRotatedAt sets the "rotated_at" field to the value that was provided on create.
func (*KEKVersionUpsertOne) UpdateState ¶
func (u *KEKVersionUpsertOne) UpdateState() *KEKVersionUpsertOne
UpdateState sets the "state" field to the value that was provided on create.
func (*KEKVersionUpsertOne) UpdateVersion ¶
func (u *KEKVersionUpsertOne) UpdateVersion() *KEKVersionUpsertOne
UpdateVersion sets the "version" field to the value that was provided on create.
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 Sentinel ¶
type Sentinel struct {
// ID of the ent.
ID int `json:"id,omitempty"`
// KekID holds the value of the "kek_id" field.
KekID envelope.ID `json:"kek_id,omitempty"`
// Version holds the value of the "version" field.
Version uint32 `json:"version,omitempty"`
// Envelope holds the value of the "envelope" field.
Envelope string `json:"envelope,omitempty"`
// CreatedAt holds the value of the "created_at" field.
CreatedAt time.Time `json:"created_at,omitempty"`
// Edges holds the relations/edges for other nodes in the graph.
// The values are being populated by the SentinelQuery when eager-loading is set.
Edges SentinelEdges `json:"edges"`
// contains filtered or unexported fields
}
Sentinel is the model entity for the Sentinel schema.
func (*Sentinel) ExecContext ¶
func (c *Sentinel) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*Sentinel) QueryContext ¶
func (c *Sentinel) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*Sentinel) Unwrap ¶
Unwrap unwraps the Sentinel 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 (*Sentinel) Update ¶
func (_m *Sentinel) Update() *SentinelUpdateOne
Update returns a builder for updating this Sentinel. Note that you need to call Sentinel.Unwrap() before calling this method if this Sentinel was returned from a transaction, and the transaction was committed or rolled back.
type SentinelClient ¶
type SentinelClient struct {
// contains filtered or unexported fields
}
SentinelClient is a client for the Sentinel schema.
func NewSentinelClient ¶
func NewSentinelClient(c config) *SentinelClient
NewSentinelClient returns a client for the Sentinel from the given config.
func (*SentinelClient) Create ¶
func (c *SentinelClient) Create() *SentinelCreate
Create returns a builder for creating a Sentinel entity.
func (*SentinelClient) CreateBulk ¶
func (c *SentinelClient) CreateBulk(builders ...*SentinelCreate) *SentinelCreateBulk
CreateBulk returns a builder for creating a bulk of Sentinel entities.
func (*SentinelClient) Delete ¶
func (c *SentinelClient) Delete() *SentinelDelete
Delete returns a delete builder for Sentinel.
func (*SentinelClient) DeleteOne ¶
func (c *SentinelClient) DeleteOne(_m *Sentinel) *SentinelDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*SentinelClient) DeleteOneID ¶
func (c *SentinelClient) DeleteOneID(id int) *SentinelDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*SentinelClient) ExecContext ¶
func (c *SentinelClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*SentinelClient) GetX ¶
func (c *SentinelClient) GetX(ctx context.Context, id int) *Sentinel
GetX is like Get, but panics if an error occurs.
func (*SentinelClient) Hooks ¶
func (c *SentinelClient) Hooks() []Hook
Hooks returns the client hooks.
func (*SentinelClient) Intercept ¶
func (c *SentinelClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `sentinel.Intercept(f(g(h())))`.
func (*SentinelClient) Interceptors ¶
func (c *SentinelClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*SentinelClient) MapCreateBulk ¶
func (c *SentinelClient) MapCreateBulk(slice any, setFunc func(*SentinelCreate, int)) *SentinelCreateBulk
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 (*SentinelClient) Query ¶
func (c *SentinelClient) Query() *SentinelQuery
Query returns a query builder for Sentinel.
func (*SentinelClient) QueryContext ¶
func (c *SentinelClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*SentinelClient) QueryKek ¶
func (c *SentinelClient) QueryKek(_m *Sentinel) *KEKQuery
QueryKek queries the kek edge of a Sentinel.
func (*SentinelClient) Update ¶
func (c *SentinelClient) Update() *SentinelUpdate
Update returns an update builder for Sentinel.
func (*SentinelClient) UpdateOne ¶
func (c *SentinelClient) UpdateOne(_m *Sentinel) *SentinelUpdateOne
UpdateOne returns an update builder for the given entity.
func (*SentinelClient) UpdateOneID ¶
func (c *SentinelClient) UpdateOneID(id int) *SentinelUpdateOne
UpdateOneID returns an update builder for the given id.
func (*SentinelClient) Use ¶
func (c *SentinelClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `sentinel.Hooks(f(g(h())))`.
type SentinelCreate ¶
type SentinelCreate struct {
// contains filtered or unexported fields
}
SentinelCreate is the builder for creating a Sentinel entity.
func (*SentinelCreate) Exec ¶
func (_c *SentinelCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*SentinelCreate) ExecContext ¶
func (c *SentinelCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*SentinelCreate) ExecX ¶
func (_c *SentinelCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SentinelCreate) Mutation ¶
func (_c *SentinelCreate) Mutation() *SentinelMutation
Mutation returns the SentinelMutation object of the builder.
func (*SentinelCreate) OnConflict ¶
func (_c *SentinelCreate) OnConflict(opts ...sql.ConflictOption) *SentinelUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Sentinel.Create().
SetKekID(v).
OnConflict(
// Update the row with the new values
// the was proposed for insertion.
sql.ResolveWithNewValues(),
).
// Override some of the fields with custom
// update values.
Update(func(u *ent.SentinelUpsert) {
SetKekID(v+v).
}).
Exec(ctx)
func (*SentinelCreate) OnConflictColumns ¶
func (_c *SentinelCreate) OnConflictColumns(columns ...string) *SentinelUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Sentinel.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*SentinelCreate) QueryContext ¶
func (c *SentinelCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*SentinelCreate) Save ¶
func (_c *SentinelCreate) Save(ctx context.Context) (*Sentinel, error)
Save creates the Sentinel in the database.
func (*SentinelCreate) SaveX ¶
func (_c *SentinelCreate) SaveX(ctx context.Context) *Sentinel
SaveX calls Save and panics if Save returns an error.
func (*SentinelCreate) SetCreatedAt ¶
func (_c *SentinelCreate) SetCreatedAt(v time.Time) *SentinelCreate
SetCreatedAt sets the "created_at" field.
func (*SentinelCreate) SetEnvelope ¶
func (_c *SentinelCreate) SetEnvelope(v string) *SentinelCreate
SetEnvelope sets the "envelope" field.
func (*SentinelCreate) SetKek ¶
func (_c *SentinelCreate) SetKek(v *KEK) *SentinelCreate
SetKek sets the "kek" edge to the KEK entity.
func (*SentinelCreate) SetKekID ¶
func (_c *SentinelCreate) SetKekID(v envelope.ID) *SentinelCreate
SetKekID sets the "kek_id" field.
func (*SentinelCreate) SetVersion ¶
func (_c *SentinelCreate) SetVersion(v uint32) *SentinelCreate
SetVersion sets the "version" field.
type SentinelCreateBulk ¶
type SentinelCreateBulk struct {
// contains filtered or unexported fields
}
SentinelCreateBulk is the builder for creating many Sentinel entities in bulk.
func (*SentinelCreateBulk) Exec ¶
func (_c *SentinelCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*SentinelCreateBulk) ExecContext ¶
func (c *SentinelCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*SentinelCreateBulk) ExecX ¶
func (_c *SentinelCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SentinelCreateBulk) OnConflict ¶
func (_c *SentinelCreateBulk) OnConflict(opts ...sql.ConflictOption) *SentinelUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Sentinel.CreateBulk(builders...).
OnConflict(
// Update the row with the new values
// the was proposed for insertion.
sql.ResolveWithNewValues(),
).
// Override some of the fields with custom
// update values.
Update(func(u *ent.SentinelUpsert) {
SetKekID(v+v).
}).
Exec(ctx)
func (*SentinelCreateBulk) OnConflictColumns ¶
func (_c *SentinelCreateBulk) OnConflictColumns(columns ...string) *SentinelUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Sentinel.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*SentinelCreateBulk) QueryContext ¶
func (c *SentinelCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
type SentinelDelete ¶
type SentinelDelete struct {
// contains filtered or unexported fields
}
SentinelDelete is the builder for deleting a Sentinel entity.
func (*SentinelDelete) Exec ¶
func (_d *SentinelDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*SentinelDelete) ExecContext ¶
func (c *SentinelDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*SentinelDelete) ExecX ¶
func (_d *SentinelDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*SentinelDelete) QueryContext ¶
func (c *SentinelDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*SentinelDelete) Where ¶
func (_d *SentinelDelete) Where(ps ...predicate.Sentinel) *SentinelDelete
Where appends a list predicates to the SentinelDelete builder.
type SentinelDeleteOne ¶
type SentinelDeleteOne struct {
// contains filtered or unexported fields
}
SentinelDeleteOne is the builder for deleting a single Sentinel entity.
func (*SentinelDeleteOne) Exec ¶
func (_d *SentinelDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*SentinelDeleteOne) ExecX ¶
func (_d *SentinelDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SentinelDeleteOne) Where ¶
func (_d *SentinelDeleteOne) Where(ps ...predicate.Sentinel) *SentinelDeleteOne
Where appends a list predicates to the SentinelDelete builder.
type SentinelEdges ¶
type SentinelEdges struct {
// Kek holds the value of the kek edge.
Kek *KEK `json:"kek,omitempty"`
// contains filtered or unexported fields
}
SentinelEdges holds the relations/edges for other nodes in the graph.
func (SentinelEdges) KekOrErr ¶
func (e SentinelEdges) KekOrErr() (*KEK, error)
KekOrErr returns the Kek value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type SentinelGroupBy ¶
type SentinelGroupBy struct {
// contains filtered or unexported fields
}
SentinelGroupBy is the group-by builder for Sentinel entities.
func (*SentinelGroupBy) Aggregate ¶
func (_g *SentinelGroupBy) Aggregate(fns ...AggregateFunc) *SentinelGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*SentinelGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*SentinelGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*SentinelGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*SentinelGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*SentinelGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*SentinelGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*SentinelGroupBy) Scan ¶
func (_g *SentinelGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*SentinelGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type SentinelMutation ¶
type SentinelMutation struct {
// contains filtered or unexported fields
}
SentinelMutation represents an operation that mutates the Sentinel nodes in the graph.
func (*SentinelMutation) AddField ¶
func (m *SentinelMutation) 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 (*SentinelMutation) AddVersion ¶
func (m *SentinelMutation) AddVersion(u int32)
AddVersion adds u to the "version" field.
func (*SentinelMutation) AddedEdges ¶
func (m *SentinelMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*SentinelMutation) AddedField ¶
func (m *SentinelMutation) 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 (*SentinelMutation) AddedFields ¶
func (m *SentinelMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*SentinelMutation) AddedIDs ¶
func (m *SentinelMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*SentinelMutation) AddedVersion ¶
func (m *SentinelMutation) AddedVersion() (r int32, exists bool)
AddedVersion returns the value that was added to the "version" field in this mutation.
func (*SentinelMutation) ClearEdge ¶
func (m *SentinelMutation) 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 (*SentinelMutation) ClearField ¶
func (m *SentinelMutation) 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 (*SentinelMutation) ClearKek ¶
func (m *SentinelMutation) ClearKek()
ClearKek clears the "kek" edge to the KEK entity.
func (*SentinelMutation) ClearedEdges ¶
func (m *SentinelMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*SentinelMutation) ClearedFields ¶
func (m *SentinelMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (SentinelMutation) Client ¶
func (m SentinelMutation) 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 (*SentinelMutation) CreatedAt ¶
func (m *SentinelMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*SentinelMutation) EdgeCleared ¶
func (m *SentinelMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*SentinelMutation) Envelope ¶
func (m *SentinelMutation) Envelope() (r string, exists bool)
Envelope returns the value of the "envelope" field in the mutation.
func (*SentinelMutation) ExecContext ¶
func (c *SentinelMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*SentinelMutation) Field ¶
func (m *SentinelMutation) 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 (*SentinelMutation) FieldCleared ¶
func (m *SentinelMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*SentinelMutation) Fields ¶
func (m *SentinelMutation) 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 (*SentinelMutation) ID ¶
func (m *SentinelMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*SentinelMutation) IDs ¶
func (m *SentinelMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*SentinelMutation) KekCleared ¶
func (m *SentinelMutation) KekCleared() bool
KekCleared reports if the "kek" edge to the KEK entity was cleared.
func (*SentinelMutation) KekID ¶
func (m *SentinelMutation) KekID() (r envelope.ID, exists bool)
KekID returns the value of the "kek_id" field in the mutation.
func (*SentinelMutation) KekIDs ¶
func (m *SentinelMutation) KekIDs() (ids []envelope.ID)
KekIDs returns the "kek" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use KekID instead. It exists only for internal usage by the builders.
func (*SentinelMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the Sentinel entity. If the Sentinel object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*SentinelMutation) OldEnvelope ¶
func (m *SentinelMutation) OldEnvelope(ctx context.Context) (v string, err error)
OldEnvelope returns the old "envelope" field's value of the Sentinel entity. If the Sentinel object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*SentinelMutation) 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 (*SentinelMutation) OldKekID ¶
OldKekID returns the old "kek_id" field's value of the Sentinel entity. If the Sentinel object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*SentinelMutation) OldVersion ¶
func (m *SentinelMutation) OldVersion(ctx context.Context) (v uint32, err error)
OldVersion returns the old "version" field's value of the Sentinel entity. If the Sentinel object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*SentinelMutation) QueryContext ¶
func (c *SentinelMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*SentinelMutation) RemovedEdges ¶
func (m *SentinelMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*SentinelMutation) RemovedIDs ¶
func (m *SentinelMutation) 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 (*SentinelMutation) ResetCreatedAt ¶
func (m *SentinelMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*SentinelMutation) ResetEdge ¶
func (m *SentinelMutation) 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 (*SentinelMutation) ResetEnvelope ¶
func (m *SentinelMutation) ResetEnvelope()
ResetEnvelope resets all changes to the "envelope" field.
func (*SentinelMutation) ResetField ¶
func (m *SentinelMutation) 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 (*SentinelMutation) ResetKek ¶
func (m *SentinelMutation) ResetKek()
ResetKek resets all changes to the "kek" edge.
func (*SentinelMutation) ResetKekID ¶
func (m *SentinelMutation) ResetKekID()
ResetKekID resets all changes to the "kek_id" field.
func (*SentinelMutation) ResetVersion ¶
func (m *SentinelMutation) ResetVersion()
ResetVersion resets all changes to the "version" field.
func (*SentinelMutation) SetCreatedAt ¶
func (m *SentinelMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*SentinelMutation) SetEnvelope ¶
func (m *SentinelMutation) SetEnvelope(s string)
SetEnvelope sets the "envelope" field.
func (*SentinelMutation) SetField ¶
func (m *SentinelMutation) 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 (*SentinelMutation) SetKekID ¶
func (m *SentinelMutation) SetKekID(e envelope.ID)
SetKekID sets the "kek_id" field.
func (*SentinelMutation) SetOp ¶
func (m *SentinelMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*SentinelMutation) SetVersion ¶
func (m *SentinelMutation) SetVersion(u uint32)
SetVersion sets the "version" field.
func (SentinelMutation) Tx ¶
func (m SentinelMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*SentinelMutation) Type ¶
func (m *SentinelMutation) Type() string
Type returns the node type of this mutation (Sentinel).
func (*SentinelMutation) Version ¶
func (m *SentinelMutation) Version() (r uint32, exists bool)
Version returns the value of the "version" field in the mutation.
func (*SentinelMutation) Where ¶
func (m *SentinelMutation) Where(ps ...predicate.Sentinel)
Where appends a list predicates to the SentinelMutation builder.
func (*SentinelMutation) WhereP ¶
func (m *SentinelMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the SentinelMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type SentinelQuery ¶
type SentinelQuery struct {
// contains filtered or unexported fields
}
SentinelQuery is the builder for querying Sentinel entities.
func (*SentinelQuery) Aggregate ¶
func (_q *SentinelQuery) Aggregate(fns ...AggregateFunc) *SentinelSelect
Aggregate returns a SentinelSelect configured with the given aggregations.
func (*SentinelQuery) All ¶
func (_q *SentinelQuery) All(ctx context.Context) ([]*Sentinel, error)
All executes the query and returns a list of Sentinels.
func (*SentinelQuery) AllX ¶
func (_q *SentinelQuery) AllX(ctx context.Context) []*Sentinel
AllX is like All, but panics if an error occurs.
func (*SentinelQuery) Clone ¶
func (_q *SentinelQuery) Clone() *SentinelQuery
Clone returns a duplicate of the SentinelQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*SentinelQuery) Count ¶
func (_q *SentinelQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*SentinelQuery) CountX ¶
func (_q *SentinelQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*SentinelQuery) ExecContext ¶
func (c *SentinelQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*SentinelQuery) Exist ¶
func (_q *SentinelQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*SentinelQuery) ExistX ¶
func (_q *SentinelQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*SentinelQuery) First ¶
func (_q *SentinelQuery) First(ctx context.Context) (*Sentinel, error)
First returns the first Sentinel entity from the query. Returns a *NotFoundError when no Sentinel was found.
func (*SentinelQuery) FirstID ¶
func (_q *SentinelQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first Sentinel ID from the query. Returns a *NotFoundError when no Sentinel ID was found.
func (*SentinelQuery) FirstIDX ¶
func (_q *SentinelQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*SentinelQuery) FirstX ¶
func (_q *SentinelQuery) FirstX(ctx context.Context) *Sentinel
FirstX is like First, but panics if an error occurs.
func (*SentinelQuery) ForShare ¶
func (_q *SentinelQuery) ForShare(opts ...sql.LockOption) *SentinelQuery
ForShare behaves similarly to ForUpdate, except that it acquires a shared mode lock on any rows that are read. Other sessions can read the rows, but cannot modify them until your transaction commits.
func (*SentinelQuery) ForUpdate ¶
func (_q *SentinelQuery) ForUpdate(opts ...sql.LockOption) *SentinelQuery
ForUpdate locks the selected rows against concurrent updates, and prevent them from being updated, deleted or "selected ... for update" by other sessions, until the transaction is either committed or rolled-back.
func (*SentinelQuery) GroupBy ¶
func (_q *SentinelQuery) GroupBy(field string, fields ...string) *SentinelGroupBy
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 {
KekID envelope.ID `json:"kek_id,omitempty"`
Count int `json:"count,omitempty"`
}
client.Sentinel.Query().
GroupBy(sentinel.FieldKekID).
Aggregate(ent.Count()).
Scan(ctx, &v)
func (*SentinelQuery) IDs ¶
func (_q *SentinelQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of Sentinel IDs.
func (*SentinelQuery) IDsX ¶
func (_q *SentinelQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*SentinelQuery) Limit ¶
func (_q *SentinelQuery) Limit(limit int) *SentinelQuery
Limit the number of records to be returned by this query.
func (*SentinelQuery) Offset ¶
func (_q *SentinelQuery) Offset(offset int) *SentinelQuery
Offset to start from.
func (*SentinelQuery) Only ¶
func (_q *SentinelQuery) Only(ctx context.Context) (*Sentinel, error)
Only returns a single Sentinel entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Sentinel entity is found. Returns a *NotFoundError when no Sentinel entities are found.
func (*SentinelQuery) OnlyID ¶
func (_q *SentinelQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only Sentinel ID in the query. Returns a *NotSingularError when more than one Sentinel ID is found. Returns a *NotFoundError when no entities are found.
func (*SentinelQuery) OnlyIDX ¶
func (_q *SentinelQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*SentinelQuery) OnlyX ¶
func (_q *SentinelQuery) OnlyX(ctx context.Context) *Sentinel
OnlyX is like Only, but panics if an error occurs.
func (*SentinelQuery) Order ¶
func (_q *SentinelQuery) Order(o ...sentinel.OrderOption) *SentinelQuery
Order specifies how the records should be ordered.
func (*SentinelQuery) QueryContext ¶
func (c *SentinelQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*SentinelQuery) QueryKek ¶
func (_q *SentinelQuery) QueryKek() *KEKQuery
QueryKek chains the current query on the "kek" edge.
func (*SentinelQuery) Select ¶
func (_q *SentinelQuery) Select(fields ...string) *SentinelSelect
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 {
KekID envelope.ID `json:"kek_id,omitempty"`
}
client.Sentinel.Query().
Select(sentinel.FieldKekID).
Scan(ctx, &v)
func (*SentinelQuery) Unique ¶
func (_q *SentinelQuery) Unique(unique bool) *SentinelQuery
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 (*SentinelQuery) Where ¶
func (_q *SentinelQuery) Where(ps ...predicate.Sentinel) *SentinelQuery
Where adds a new predicate for the SentinelQuery builder.
func (*SentinelQuery) WithKek ¶
func (_q *SentinelQuery) WithKek(opts ...func(*KEKQuery)) *SentinelQuery
WithKek tells the query-builder to eager-load the nodes that are connected to the "kek" edge. The optional arguments are used to configure the query builder of the edge.
type SentinelSelect ¶
type SentinelSelect struct {
*SentinelQuery
// contains filtered or unexported fields
}
SentinelSelect is the builder for selecting fields of Sentinel entities.
func (*SentinelSelect) Aggregate ¶
func (_s *SentinelSelect) Aggregate(fns ...AggregateFunc) *SentinelSelect
Aggregate adds the given aggregation functions to the selector query.
func (*SentinelSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*SentinelSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (SentinelSelect) ExecContext ¶
func (c SentinelSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*SentinelSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*SentinelSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*SentinelSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*SentinelSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (SentinelSelect) QueryContext ¶
func (c SentinelSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*SentinelSelect) Scan ¶
func (_s *SentinelSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*SentinelSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type SentinelUpdate ¶
type SentinelUpdate struct {
// contains filtered or unexported fields
}
SentinelUpdate is the builder for updating Sentinel entities.
func (*SentinelUpdate) AddVersion ¶
func (_u *SentinelUpdate) AddVersion(v int32) *SentinelUpdate
AddVersion adds value to the "version" field.
func (*SentinelUpdate) ClearKek ¶
func (_u *SentinelUpdate) ClearKek() *SentinelUpdate
ClearKek clears the "kek" edge to the KEK entity.
func (*SentinelUpdate) Exec ¶
func (_u *SentinelUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*SentinelUpdate) ExecContext ¶
func (c *SentinelUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*SentinelUpdate) ExecX ¶
func (_u *SentinelUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SentinelUpdate) Mutation ¶
func (_u *SentinelUpdate) Mutation() *SentinelMutation
Mutation returns the SentinelMutation object of the builder.
func (*SentinelUpdate) QueryContext ¶
func (c *SentinelUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*SentinelUpdate) Save ¶
func (_u *SentinelUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*SentinelUpdate) SaveX ¶
func (_u *SentinelUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*SentinelUpdate) SetCreatedAt ¶
func (_u *SentinelUpdate) SetCreatedAt(v time.Time) *SentinelUpdate
SetCreatedAt sets the "created_at" field.
func (*SentinelUpdate) SetEnvelope ¶
func (_u *SentinelUpdate) SetEnvelope(v string) *SentinelUpdate
SetEnvelope sets the "envelope" field.
func (*SentinelUpdate) SetKek ¶
func (_u *SentinelUpdate) SetKek(v *KEK) *SentinelUpdate
SetKek sets the "kek" edge to the KEK entity.
func (*SentinelUpdate) SetKekID ¶
func (_u *SentinelUpdate) SetKekID(v envelope.ID) *SentinelUpdate
SetKekID sets the "kek_id" field.
func (*SentinelUpdate) SetNillableCreatedAt ¶
func (_u *SentinelUpdate) SetNillableCreatedAt(v *time.Time) *SentinelUpdate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*SentinelUpdate) SetNillableEnvelope ¶
func (_u *SentinelUpdate) SetNillableEnvelope(v *string) *SentinelUpdate
SetNillableEnvelope sets the "envelope" field if the given value is not nil.
func (*SentinelUpdate) SetNillableKekID ¶
func (_u *SentinelUpdate) SetNillableKekID(v *envelope.ID) *SentinelUpdate
SetNillableKekID sets the "kek_id" field if the given value is not nil.
func (*SentinelUpdate) SetNillableVersion ¶
func (_u *SentinelUpdate) SetNillableVersion(v *uint32) *SentinelUpdate
SetNillableVersion sets the "version" field if the given value is not nil.
func (*SentinelUpdate) SetVersion ¶
func (_u *SentinelUpdate) SetVersion(v uint32) *SentinelUpdate
SetVersion sets the "version" field.
func (*SentinelUpdate) Where ¶
func (_u *SentinelUpdate) Where(ps ...predicate.Sentinel) *SentinelUpdate
Where appends a list predicates to the SentinelUpdate builder.
type SentinelUpdateOne ¶
type SentinelUpdateOne struct {
// contains filtered or unexported fields
}
SentinelUpdateOne is the builder for updating a single Sentinel entity.
func (*SentinelUpdateOne) AddVersion ¶
func (_u *SentinelUpdateOne) AddVersion(v int32) *SentinelUpdateOne
AddVersion adds value to the "version" field.
func (*SentinelUpdateOne) ClearKek ¶
func (_u *SentinelUpdateOne) ClearKek() *SentinelUpdateOne
ClearKek clears the "kek" edge to the KEK entity.
func (*SentinelUpdateOne) Exec ¶
func (_u *SentinelUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*SentinelUpdateOne) ExecContext ¶
func (c *SentinelUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*SentinelUpdateOne) ExecX ¶
func (_u *SentinelUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SentinelUpdateOne) Mutation ¶
func (_u *SentinelUpdateOne) Mutation() *SentinelMutation
Mutation returns the SentinelMutation object of the builder.
func (*SentinelUpdateOne) QueryContext ¶
func (c *SentinelUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*SentinelUpdateOne) Save ¶
func (_u *SentinelUpdateOne) Save(ctx context.Context) (*Sentinel, error)
Save executes the query and returns the updated Sentinel entity.
func (*SentinelUpdateOne) SaveX ¶
func (_u *SentinelUpdateOne) SaveX(ctx context.Context) *Sentinel
SaveX is like Save, but panics if an error occurs.
func (*SentinelUpdateOne) Select ¶
func (_u *SentinelUpdateOne) Select(field string, fields ...string) *SentinelUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*SentinelUpdateOne) SetCreatedAt ¶
func (_u *SentinelUpdateOne) SetCreatedAt(v time.Time) *SentinelUpdateOne
SetCreatedAt sets the "created_at" field.
func (*SentinelUpdateOne) SetEnvelope ¶
func (_u *SentinelUpdateOne) SetEnvelope(v string) *SentinelUpdateOne
SetEnvelope sets the "envelope" field.
func (*SentinelUpdateOne) SetKek ¶
func (_u *SentinelUpdateOne) SetKek(v *KEK) *SentinelUpdateOne
SetKek sets the "kek" edge to the KEK entity.
func (*SentinelUpdateOne) SetKekID ¶
func (_u *SentinelUpdateOne) SetKekID(v envelope.ID) *SentinelUpdateOne
SetKekID sets the "kek_id" field.
func (*SentinelUpdateOne) SetNillableCreatedAt ¶
func (_u *SentinelUpdateOne) SetNillableCreatedAt(v *time.Time) *SentinelUpdateOne
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*SentinelUpdateOne) SetNillableEnvelope ¶
func (_u *SentinelUpdateOne) SetNillableEnvelope(v *string) *SentinelUpdateOne
SetNillableEnvelope sets the "envelope" field if the given value is not nil.
func (*SentinelUpdateOne) SetNillableKekID ¶
func (_u *SentinelUpdateOne) SetNillableKekID(v *envelope.ID) *SentinelUpdateOne
SetNillableKekID sets the "kek_id" field if the given value is not nil.
func (*SentinelUpdateOne) SetNillableVersion ¶
func (_u *SentinelUpdateOne) SetNillableVersion(v *uint32) *SentinelUpdateOne
SetNillableVersion sets the "version" field if the given value is not nil.
func (*SentinelUpdateOne) SetVersion ¶
func (_u *SentinelUpdateOne) SetVersion(v uint32) *SentinelUpdateOne
SetVersion sets the "version" field.
func (*SentinelUpdateOne) Where ¶
func (_u *SentinelUpdateOne) Where(ps ...predicate.Sentinel) *SentinelUpdateOne
Where appends a list predicates to the SentinelUpdate builder.
type SentinelUpsert ¶
SentinelUpsert is the "OnConflict" setter.
func (*SentinelUpsert) AddVersion ¶
func (u *SentinelUpsert) AddVersion(v uint32) *SentinelUpsert
AddVersion adds v to the "version" field.
func (*SentinelUpsert) SetCreatedAt ¶
func (u *SentinelUpsert) SetCreatedAt(v time.Time) *SentinelUpsert
SetCreatedAt sets the "created_at" field.
func (*SentinelUpsert) SetEnvelope ¶
func (u *SentinelUpsert) SetEnvelope(v string) *SentinelUpsert
SetEnvelope sets the "envelope" field.
func (*SentinelUpsert) SetKekID ¶
func (u *SentinelUpsert) SetKekID(v envelope.ID) *SentinelUpsert
SetKekID sets the "kek_id" field.
func (*SentinelUpsert) SetVersion ¶
func (u *SentinelUpsert) SetVersion(v uint32) *SentinelUpsert
SetVersion sets the "version" field.
func (*SentinelUpsert) UpdateCreatedAt ¶
func (u *SentinelUpsert) UpdateCreatedAt() *SentinelUpsert
UpdateCreatedAt sets the "created_at" field to the value that was provided on create.
func (*SentinelUpsert) UpdateEnvelope ¶
func (u *SentinelUpsert) UpdateEnvelope() *SentinelUpsert
UpdateEnvelope sets the "envelope" field to the value that was provided on create.
func (*SentinelUpsert) UpdateKekID ¶
func (u *SentinelUpsert) UpdateKekID() *SentinelUpsert
UpdateKekID sets the "kek_id" field to the value that was provided on create.
func (*SentinelUpsert) UpdateVersion ¶
func (u *SentinelUpsert) UpdateVersion() *SentinelUpsert
UpdateVersion sets the "version" field to the value that was provided on create.
type SentinelUpsertBulk ¶
type SentinelUpsertBulk struct {
// contains filtered or unexported fields
}
SentinelUpsertBulk is the builder for "upsert"-ing a bulk of Sentinel nodes.
func (*SentinelUpsertBulk) AddVersion ¶
func (u *SentinelUpsertBulk) AddVersion(v uint32) *SentinelUpsertBulk
AddVersion adds v to the "version" field.
func (*SentinelUpsertBulk) DoNothing ¶
func (u *SentinelUpsertBulk) DoNothing() *SentinelUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*SentinelUpsertBulk) Exec ¶
func (u *SentinelUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*SentinelUpsertBulk) ExecX ¶
func (u *SentinelUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SentinelUpsertBulk) Ignore ¶
func (u *SentinelUpsertBulk) Ignore() *SentinelUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Sentinel.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*SentinelUpsertBulk) SetCreatedAt ¶
func (u *SentinelUpsertBulk) SetCreatedAt(v time.Time) *SentinelUpsertBulk
SetCreatedAt sets the "created_at" field.
func (*SentinelUpsertBulk) SetEnvelope ¶
func (u *SentinelUpsertBulk) SetEnvelope(v string) *SentinelUpsertBulk
SetEnvelope sets the "envelope" field.
func (*SentinelUpsertBulk) SetKekID ¶
func (u *SentinelUpsertBulk) SetKekID(v envelope.ID) *SentinelUpsertBulk
SetKekID sets the "kek_id" field.
func (*SentinelUpsertBulk) SetVersion ¶
func (u *SentinelUpsertBulk) SetVersion(v uint32) *SentinelUpsertBulk
SetVersion sets the "version" field.
func (*SentinelUpsertBulk) Update ¶
func (u *SentinelUpsertBulk) Update(set func(*SentinelUpsert)) *SentinelUpsertBulk
Update allows overriding fields `UPDATE` values. See the SentinelCreateBulk.OnConflict documentation for more info.
func (*SentinelUpsertBulk) UpdateCreatedAt ¶
func (u *SentinelUpsertBulk) UpdateCreatedAt() *SentinelUpsertBulk
UpdateCreatedAt sets the "created_at" field to the value that was provided on create.
func (*SentinelUpsertBulk) UpdateEnvelope ¶
func (u *SentinelUpsertBulk) UpdateEnvelope() *SentinelUpsertBulk
UpdateEnvelope sets the "envelope" field to the value that was provided on create.
func (*SentinelUpsertBulk) UpdateKekID ¶
func (u *SentinelUpsertBulk) UpdateKekID() *SentinelUpsertBulk
UpdateKekID sets the "kek_id" field to the value that was provided on create.
func (*SentinelUpsertBulk) UpdateNewValues ¶
func (u *SentinelUpsertBulk) UpdateNewValues() *SentinelUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.Sentinel.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*SentinelUpsertBulk) UpdateVersion ¶
func (u *SentinelUpsertBulk) UpdateVersion() *SentinelUpsertBulk
UpdateVersion sets the "version" field to the value that was provided on create.
type SentinelUpsertOne ¶
type SentinelUpsertOne struct {
// contains filtered or unexported fields
}
SentinelUpsertOne is the builder for "upsert"-ing
one Sentinel node.
func (*SentinelUpsertOne) AddVersion ¶
func (u *SentinelUpsertOne) AddVersion(v uint32) *SentinelUpsertOne
AddVersion adds v to the "version" field.
func (*SentinelUpsertOne) DoNothing ¶
func (u *SentinelUpsertOne) DoNothing() *SentinelUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*SentinelUpsertOne) Exec ¶
func (u *SentinelUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*SentinelUpsertOne) ExecX ¶
func (u *SentinelUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SentinelUpsertOne) ID ¶
func (u *SentinelUpsertOne) ID(ctx context.Context) (id int, err error)
Exec executes the UPSERT query and returns the inserted/updated ID.
func (*SentinelUpsertOne) IDX ¶
func (u *SentinelUpsertOne) IDX(ctx context.Context) int
IDX is like ID, but panics if an error occurs.
func (*SentinelUpsertOne) Ignore ¶
func (u *SentinelUpsertOne) Ignore() *SentinelUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Sentinel.Create().
OnConflict(sql.ResolveWithIgnore()).
Exec(ctx)
func (*SentinelUpsertOne) SetCreatedAt ¶
func (u *SentinelUpsertOne) SetCreatedAt(v time.Time) *SentinelUpsertOne
SetCreatedAt sets the "created_at" field.
func (*SentinelUpsertOne) SetEnvelope ¶
func (u *SentinelUpsertOne) SetEnvelope(v string) *SentinelUpsertOne
SetEnvelope sets the "envelope" field.
func (*SentinelUpsertOne) SetKekID ¶
func (u *SentinelUpsertOne) SetKekID(v envelope.ID) *SentinelUpsertOne
SetKekID sets the "kek_id" field.
func (*SentinelUpsertOne) SetVersion ¶
func (u *SentinelUpsertOne) SetVersion(v uint32) *SentinelUpsertOne
SetVersion sets the "version" field.
func (*SentinelUpsertOne) Update ¶
func (u *SentinelUpsertOne) Update(set func(*SentinelUpsert)) *SentinelUpsertOne
Update allows overriding fields `UPDATE` values. See the SentinelCreate.OnConflict documentation for more info.
func (*SentinelUpsertOne) UpdateCreatedAt ¶
func (u *SentinelUpsertOne) UpdateCreatedAt() *SentinelUpsertOne
UpdateCreatedAt sets the "created_at" field to the value that was provided on create.
func (*SentinelUpsertOne) UpdateEnvelope ¶
func (u *SentinelUpsertOne) UpdateEnvelope() *SentinelUpsertOne
UpdateEnvelope sets the "envelope" field to the value that was provided on create.
func (*SentinelUpsertOne) UpdateKekID ¶
func (u *SentinelUpsertOne) UpdateKekID() *SentinelUpsertOne
UpdateKekID sets the "kek_id" field to the value that was provided on create.
func (*SentinelUpsertOne) UpdateNewValues ¶
func (u *SentinelUpsertOne) UpdateNewValues() *SentinelUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.Sentinel.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*SentinelUpsertOne) UpdateVersion ¶
func (u *SentinelUpsertOne) UpdateVersion() *SentinelUpsertOne
UpdateVersion sets the "version" field to the value that was provided on create.
type Shred ¶
type Shred struct {
// ID of the ent.
ID int `json:"id,omitempty"`
// Purpose holds the value of the "purpose" field.
Purpose string `json:"purpose,omitempty"`
// Subject holds the value of the "subject" field.
Subject string `json:"subject,omitempty"`
// RequestedAt holds the value of the "requested_at" field.
RequestedAt time.Time `json:"requested_at,omitempty"`
// Versions holds the value of the "versions" field.
Versions []keyforge.KEKVersionRef `json:"versions,omitempty"`
// Deks holds the value of the "deks" field.
Deks int `json:"deks,omitempty"`
// CompletedAt holds the value of the "completed_at" field.
CompletedAt *time.Time `json:"completed_at,omitempty"`
// contains filtered or unexported fields
}
Shred is the model entity for the Shred schema.
func (*Shred) ExecContext ¶
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*Shred) QueryContext ¶
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*Shred) Unwrap ¶
Unwrap unwraps the Shred 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 (*Shred) Update ¶
func (_m *Shred) Update() *ShredUpdateOne
Update returns a builder for updating this Shred. Note that you need to call Shred.Unwrap() before calling this method if this Shred was returned from a transaction, and the transaction was committed or rolled back.
type ShredClient ¶
type ShredClient struct {
// contains filtered or unexported fields
}
ShredClient is a client for the Shred schema.
func NewShredClient ¶
func NewShredClient(c config) *ShredClient
NewShredClient returns a client for the Shred from the given config.
func (*ShredClient) Create ¶
func (c *ShredClient) Create() *ShredCreate
Create returns a builder for creating a Shred entity.
func (*ShredClient) CreateBulk ¶
func (c *ShredClient) CreateBulk(builders ...*ShredCreate) *ShredCreateBulk
CreateBulk returns a builder for creating a bulk of Shred entities.
func (*ShredClient) Delete ¶
func (c *ShredClient) Delete() *ShredDelete
Delete returns a delete builder for Shred.
func (*ShredClient) DeleteOne ¶
func (c *ShredClient) DeleteOne(_m *Shred) *ShredDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*ShredClient) DeleteOneID ¶
func (c *ShredClient) DeleteOneID(id int) *ShredDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*ShredClient) ExecContext ¶
func (c *ShredClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*ShredClient) GetX ¶
func (c *ShredClient) GetX(ctx context.Context, id int) *Shred
GetX is like Get, but panics if an error occurs.
func (*ShredClient) Intercept ¶
func (c *ShredClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `shred.Intercept(f(g(h())))`.
func (*ShredClient) Interceptors ¶
func (c *ShredClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*ShredClient) MapCreateBulk ¶
func (c *ShredClient) MapCreateBulk(slice any, setFunc func(*ShredCreate, int)) *ShredCreateBulk
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 (*ShredClient) Query ¶
func (c *ShredClient) Query() *ShredQuery
Query returns a query builder for Shred.
func (*ShredClient) QueryContext ¶
func (c *ShredClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*ShredClient) Update ¶
func (c *ShredClient) Update() *ShredUpdate
Update returns an update builder for Shred.
func (*ShredClient) UpdateOne ¶
func (c *ShredClient) UpdateOne(_m *Shred) *ShredUpdateOne
UpdateOne returns an update builder for the given entity.
func (*ShredClient) UpdateOneID ¶
func (c *ShredClient) UpdateOneID(id int) *ShredUpdateOne
UpdateOneID returns an update builder for the given id.
func (*ShredClient) Use ¶
func (c *ShredClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `shred.Hooks(f(g(h())))`.
type ShredCreate ¶
type ShredCreate struct {
// contains filtered or unexported fields
}
ShredCreate is the builder for creating a Shred entity.
func (*ShredCreate) Exec ¶
func (_c *ShredCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*ShredCreate) ExecContext ¶
func (c *ShredCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*ShredCreate) ExecX ¶
func (_c *ShredCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ShredCreate) Mutation ¶
func (_c *ShredCreate) Mutation() *ShredMutation
Mutation returns the ShredMutation object of the builder.
func (*ShredCreate) OnConflict ¶
func (_c *ShredCreate) OnConflict(opts ...sql.ConflictOption) *ShredUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Shred.Create().
SetPurpose(v).
OnConflict(
// Update the row with the new values
// the was proposed for insertion.
sql.ResolveWithNewValues(),
).
// Override some of the fields with custom
// update values.
Update(func(u *ent.ShredUpsert) {
SetPurpose(v+v).
}).
Exec(ctx)
func (*ShredCreate) OnConflictColumns ¶
func (_c *ShredCreate) OnConflictColumns(columns ...string) *ShredUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Shred.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*ShredCreate) QueryContext ¶
func (c *ShredCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*ShredCreate) Save ¶
func (_c *ShredCreate) Save(ctx context.Context) (*Shred, error)
Save creates the Shred in the database.
func (*ShredCreate) SaveX ¶
func (_c *ShredCreate) SaveX(ctx context.Context) *Shred
SaveX calls Save and panics if Save returns an error.
func (*ShredCreate) SetCompletedAt ¶
func (_c *ShredCreate) SetCompletedAt(v time.Time) *ShredCreate
SetCompletedAt sets the "completed_at" field.
func (*ShredCreate) SetDeks ¶
func (_c *ShredCreate) SetDeks(v int) *ShredCreate
SetDeks sets the "deks" field.
func (*ShredCreate) SetNillableCompletedAt ¶
func (_c *ShredCreate) SetNillableCompletedAt(v *time.Time) *ShredCreate
SetNillableCompletedAt sets the "completed_at" field if the given value is not nil.
func (*ShredCreate) SetNillableDeks ¶
func (_c *ShredCreate) SetNillableDeks(v *int) *ShredCreate
SetNillableDeks sets the "deks" field if the given value is not nil.
func (*ShredCreate) SetPurpose ¶
func (_c *ShredCreate) SetPurpose(v string) *ShredCreate
SetPurpose sets the "purpose" field.
func (*ShredCreate) SetRequestedAt ¶
func (_c *ShredCreate) SetRequestedAt(v time.Time) *ShredCreate
SetRequestedAt sets the "requested_at" field.
func (*ShredCreate) SetSubject ¶
func (_c *ShredCreate) SetSubject(v string) *ShredCreate
SetSubject sets the "subject" field.
func (*ShredCreate) SetVersions ¶
func (_c *ShredCreate) SetVersions(v []keyforge.KEKVersionRef) *ShredCreate
SetVersions sets the "versions" field.
type ShredCreateBulk ¶
type ShredCreateBulk struct {
// contains filtered or unexported fields
}
ShredCreateBulk is the builder for creating many Shred entities in bulk.
func (*ShredCreateBulk) Exec ¶
func (_c *ShredCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*ShredCreateBulk) ExecContext ¶
func (c *ShredCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*ShredCreateBulk) ExecX ¶
func (_c *ShredCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ShredCreateBulk) OnConflict ¶
func (_c *ShredCreateBulk) OnConflict(opts ...sql.ConflictOption) *ShredUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Shred.CreateBulk(builders...).
OnConflict(
// Update the row with the new values
// the was proposed for insertion.
sql.ResolveWithNewValues(),
).
// Override some of the fields with custom
// update values.
Update(func(u *ent.ShredUpsert) {
SetPurpose(v+v).
}).
Exec(ctx)
func (*ShredCreateBulk) OnConflictColumns ¶
func (_c *ShredCreateBulk) OnConflictColumns(columns ...string) *ShredUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Shred.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*ShredCreateBulk) QueryContext ¶
func (c *ShredCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
type ShredDelete ¶
type ShredDelete struct {
// contains filtered or unexported fields
}
ShredDelete is the builder for deleting a Shred entity.
func (*ShredDelete) Exec ¶
func (_d *ShredDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*ShredDelete) ExecContext ¶
func (c *ShredDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*ShredDelete) ExecX ¶
func (_d *ShredDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*ShredDelete) QueryContext ¶
func (c *ShredDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*ShredDelete) Where ¶
func (_d *ShredDelete) Where(ps ...predicate.Shred) *ShredDelete
Where appends a list predicates to the ShredDelete builder.
type ShredDeleteOne ¶
type ShredDeleteOne struct {
// contains filtered or unexported fields
}
ShredDeleteOne is the builder for deleting a single Shred entity.
func (*ShredDeleteOne) Exec ¶
func (_d *ShredDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*ShredDeleteOne) ExecX ¶
func (_d *ShredDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ShredDeleteOne) Where ¶
func (_d *ShredDeleteOne) Where(ps ...predicate.Shred) *ShredDeleteOne
Where appends a list predicates to the ShredDelete builder.
type ShredGroupBy ¶
type ShredGroupBy struct {
// contains filtered or unexported fields
}
ShredGroupBy is the group-by builder for Shred entities.
func (*ShredGroupBy) Aggregate ¶
func (_g *ShredGroupBy) Aggregate(fns ...AggregateFunc) *ShredGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*ShredGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ShredGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ShredGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ShredGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ShredGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ShredGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ShredGroupBy) Scan ¶
func (_g *ShredGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ShredGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ShredMutation ¶
type ShredMutation struct {
// contains filtered or unexported fields
}
ShredMutation represents an operation that mutates the Shred nodes in the graph.
func (*ShredMutation) AddDeks ¶
func (m *ShredMutation) AddDeks(i int)
AddDeks adds i to the "deks" field.
func (*ShredMutation) AddField ¶
func (m *ShredMutation) 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 (*ShredMutation) AddedDeks ¶
func (m *ShredMutation) AddedDeks() (r int, exists bool)
AddedDeks returns the value that was added to the "deks" field in this mutation.
func (*ShredMutation) AddedEdges ¶
func (m *ShredMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*ShredMutation) AddedField ¶
func (m *ShredMutation) 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 (*ShredMutation) AddedFields ¶
func (m *ShredMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*ShredMutation) AddedIDs ¶
func (m *ShredMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*ShredMutation) AppendVersions ¶
func (m *ShredMutation) AppendVersions(kvr []keyforge.KEKVersionRef)
AppendVersions adds kvr to the "versions" field.
func (*ShredMutation) AppendedVersions ¶
func (m *ShredMutation) AppendedVersions() ([]keyforge.KEKVersionRef, bool)
AppendedVersions returns the list of values that were appended to the "versions" field in this mutation.
func (*ShredMutation) ClearCompletedAt ¶
func (m *ShredMutation) ClearCompletedAt()
ClearCompletedAt clears the value of the "completed_at" field.
func (*ShredMutation) ClearEdge ¶
func (m *ShredMutation) 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 (*ShredMutation) ClearField ¶
func (m *ShredMutation) 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 (*ShredMutation) ClearedEdges ¶
func (m *ShredMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*ShredMutation) ClearedFields ¶
func (m *ShredMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (ShredMutation) Client ¶
func (m ShredMutation) 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 (*ShredMutation) CompletedAt ¶
func (m *ShredMutation) CompletedAt() (r time.Time, exists bool)
CompletedAt returns the value of the "completed_at" field in the mutation.
func (*ShredMutation) CompletedAtCleared ¶
func (m *ShredMutation) CompletedAtCleared() bool
CompletedAtCleared returns if the "completed_at" field was cleared in this mutation.
func (*ShredMutation) Deks ¶
func (m *ShredMutation) Deks() (r int, exists bool)
Deks returns the value of the "deks" field in the mutation.
func (*ShredMutation) EdgeCleared ¶
func (m *ShredMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*ShredMutation) ExecContext ¶
func (c *ShredMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*ShredMutation) Field ¶
func (m *ShredMutation) 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 (*ShredMutation) FieldCleared ¶
func (m *ShredMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*ShredMutation) Fields ¶
func (m *ShredMutation) 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 (*ShredMutation) ID ¶
func (m *ShredMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*ShredMutation) IDs ¶
func (m *ShredMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*ShredMutation) OldCompletedAt ¶
OldCompletedAt returns the old "completed_at" field's value of the Shred entity. If the Shred object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*ShredMutation) OldDeks ¶
func (m *ShredMutation) OldDeks(ctx context.Context) (v int, err error)
OldDeks returns the old "deks" field's value of the Shred entity. If the Shred object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*ShredMutation) 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 (*ShredMutation) OldPurpose ¶
func (m *ShredMutation) OldPurpose(ctx context.Context) (v string, err error)
OldPurpose returns the old "purpose" field's value of the Shred entity. If the Shred object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*ShredMutation) OldRequestedAt ¶
OldRequestedAt returns the old "requested_at" field's value of the Shred entity. If the Shred object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*ShredMutation) OldSubject ¶
func (m *ShredMutation) OldSubject(ctx context.Context) (v string, err error)
OldSubject returns the old "subject" field's value of the Shred entity. If the Shred object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*ShredMutation) OldVersions ¶
func (m *ShredMutation) OldVersions(ctx context.Context) (v []keyforge.KEKVersionRef, err error)
OldVersions returns the old "versions" field's value of the Shred entity. If the Shred object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*ShredMutation) Purpose ¶
func (m *ShredMutation) Purpose() (r string, exists bool)
Purpose returns the value of the "purpose" field in the mutation.
func (*ShredMutation) QueryContext ¶
func (c *ShredMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*ShredMutation) RemovedEdges ¶
func (m *ShredMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*ShredMutation) RemovedIDs ¶
func (m *ShredMutation) 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 (*ShredMutation) RequestedAt ¶
func (m *ShredMutation) RequestedAt() (r time.Time, exists bool)
RequestedAt returns the value of the "requested_at" field in the mutation.
func (*ShredMutation) ResetCompletedAt ¶
func (m *ShredMutation) ResetCompletedAt()
ResetCompletedAt resets all changes to the "completed_at" field.
func (*ShredMutation) ResetDeks ¶
func (m *ShredMutation) ResetDeks()
ResetDeks resets all changes to the "deks" field.
func (*ShredMutation) ResetEdge ¶
func (m *ShredMutation) 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 (*ShredMutation) ResetField ¶
func (m *ShredMutation) 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 (*ShredMutation) ResetPurpose ¶
func (m *ShredMutation) ResetPurpose()
ResetPurpose resets all changes to the "purpose" field.
func (*ShredMutation) ResetRequestedAt ¶
func (m *ShredMutation) ResetRequestedAt()
ResetRequestedAt resets all changes to the "requested_at" field.
func (*ShredMutation) ResetSubject ¶
func (m *ShredMutation) ResetSubject()
ResetSubject resets all changes to the "subject" field.
func (*ShredMutation) ResetVersions ¶
func (m *ShredMutation) ResetVersions()
ResetVersions resets all changes to the "versions" field.
func (*ShredMutation) SetCompletedAt ¶
func (m *ShredMutation) SetCompletedAt(t time.Time)
SetCompletedAt sets the "completed_at" field.
func (*ShredMutation) SetDeks ¶
func (m *ShredMutation) SetDeks(i int)
SetDeks sets the "deks" field.
func (*ShredMutation) SetField ¶
func (m *ShredMutation) 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 (*ShredMutation) SetOp ¶
func (m *ShredMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*ShredMutation) SetPurpose ¶
func (m *ShredMutation) SetPurpose(s string)
SetPurpose sets the "purpose" field.
func (*ShredMutation) SetRequestedAt ¶
func (m *ShredMutation) SetRequestedAt(t time.Time)
SetRequestedAt sets the "requested_at" field.
func (*ShredMutation) SetSubject ¶
func (m *ShredMutation) SetSubject(s string)
SetSubject sets the "subject" field.
func (*ShredMutation) SetVersions ¶
func (m *ShredMutation) SetVersions(kvr []keyforge.KEKVersionRef)
SetVersions sets the "versions" field.
func (*ShredMutation) Subject ¶
func (m *ShredMutation) Subject() (r string, exists bool)
Subject returns the value of the "subject" field in the mutation.
func (ShredMutation) Tx ¶
func (m ShredMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*ShredMutation) Type ¶
func (m *ShredMutation) Type() string
Type returns the node type of this mutation (Shred).
func (*ShredMutation) Versions ¶
func (m *ShredMutation) Versions() (r []keyforge.KEKVersionRef, exists bool)
Versions returns the value of the "versions" field in the mutation.
func (*ShredMutation) Where ¶
func (m *ShredMutation) Where(ps ...predicate.Shred)
Where appends a list predicates to the ShredMutation builder.
func (*ShredMutation) WhereP ¶
func (m *ShredMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the ShredMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type ShredQuery ¶
type ShredQuery struct {
// contains filtered or unexported fields
}
ShredQuery is the builder for querying Shred entities.
func (*ShredQuery) Aggregate ¶
func (_q *ShredQuery) Aggregate(fns ...AggregateFunc) *ShredSelect
Aggregate returns a ShredSelect configured with the given aggregations.
func (*ShredQuery) All ¶
func (_q *ShredQuery) All(ctx context.Context) ([]*Shred, error)
All executes the query and returns a list of Shreds.
func (*ShredQuery) AllX ¶
func (_q *ShredQuery) AllX(ctx context.Context) []*Shred
AllX is like All, but panics if an error occurs.
func (*ShredQuery) Clone ¶
func (_q *ShredQuery) Clone() *ShredQuery
Clone returns a duplicate of the ShredQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*ShredQuery) Count ¶
func (_q *ShredQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*ShredQuery) CountX ¶
func (_q *ShredQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*ShredQuery) ExecContext ¶
func (c *ShredQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*ShredQuery) Exist ¶
func (_q *ShredQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*ShredQuery) ExistX ¶
func (_q *ShredQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*ShredQuery) First ¶
func (_q *ShredQuery) First(ctx context.Context) (*Shred, error)
First returns the first Shred entity from the query. Returns a *NotFoundError when no Shred was found.
func (*ShredQuery) FirstID ¶
func (_q *ShredQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first Shred ID from the query. Returns a *NotFoundError when no Shred ID was found.
func (*ShredQuery) FirstIDX ¶
func (_q *ShredQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*ShredQuery) FirstX ¶
func (_q *ShredQuery) FirstX(ctx context.Context) *Shred
FirstX is like First, but panics if an error occurs.
func (*ShredQuery) ForShare ¶
func (_q *ShredQuery) ForShare(opts ...sql.LockOption) *ShredQuery
ForShare behaves similarly to ForUpdate, except that it acquires a shared mode lock on any rows that are read. Other sessions can read the rows, but cannot modify them until your transaction commits.
func (*ShredQuery) ForUpdate ¶
func (_q *ShredQuery) ForUpdate(opts ...sql.LockOption) *ShredQuery
ForUpdate locks the selected rows against concurrent updates, and prevent them from being updated, deleted or "selected ... for update" by other sessions, until the transaction is either committed or rolled-back.
func (*ShredQuery) GroupBy ¶
func (_q *ShredQuery) GroupBy(field string, fields ...string) *ShredGroupBy
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 {
Purpose string `json:"purpose,omitempty"`
Count int `json:"count,omitempty"`
}
client.Shred.Query().
GroupBy(shred.FieldPurpose).
Aggregate(ent.Count()).
Scan(ctx, &v)
func (*ShredQuery) IDs ¶
func (_q *ShredQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of Shred IDs.
func (*ShredQuery) IDsX ¶
func (_q *ShredQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*ShredQuery) Limit ¶
func (_q *ShredQuery) Limit(limit int) *ShredQuery
Limit the number of records to be returned by this query.
func (*ShredQuery) Offset ¶
func (_q *ShredQuery) Offset(offset int) *ShredQuery
Offset to start from.
func (*ShredQuery) Only ¶
func (_q *ShredQuery) Only(ctx context.Context) (*Shred, error)
Only returns a single Shred entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Shred entity is found. Returns a *NotFoundError when no Shred entities are found.
func (*ShredQuery) OnlyID ¶
func (_q *ShredQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only Shred ID in the query. Returns a *NotSingularError when more than one Shred ID is found. Returns a *NotFoundError when no entities are found.
func (*ShredQuery) OnlyIDX ¶
func (_q *ShredQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*ShredQuery) OnlyX ¶
func (_q *ShredQuery) OnlyX(ctx context.Context) *Shred
OnlyX is like Only, but panics if an error occurs.
func (*ShredQuery) Order ¶
func (_q *ShredQuery) Order(o ...shred.OrderOption) *ShredQuery
Order specifies how the records should be ordered.
func (*ShredQuery) QueryContext ¶
func (c *ShredQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*ShredQuery) Select ¶
func (_q *ShredQuery) Select(fields ...string) *ShredSelect
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 {
Purpose string `json:"purpose,omitempty"`
}
client.Shred.Query().
Select(shred.FieldPurpose).
Scan(ctx, &v)
func (*ShredQuery) Unique ¶
func (_q *ShredQuery) Unique(unique bool) *ShredQuery
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 (*ShredQuery) Where ¶
func (_q *ShredQuery) Where(ps ...predicate.Shred) *ShredQuery
Where adds a new predicate for the ShredQuery builder.
type ShredSelect ¶
type ShredSelect struct {
*ShredQuery
// contains filtered or unexported fields
}
ShredSelect is the builder for selecting fields of Shred entities.
func (*ShredSelect) Aggregate ¶
func (_s *ShredSelect) Aggregate(fns ...AggregateFunc) *ShredSelect
Aggregate adds the given aggregation functions to the selector query.
func (*ShredSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ShredSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (ShredSelect) ExecContext ¶
func (c ShredSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*ShredSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ShredSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ShredSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ShredSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (ShredSelect) QueryContext ¶
func (c ShredSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*ShredSelect) Scan ¶
func (_s *ShredSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ShredSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ShredUpdate ¶
type ShredUpdate struct {
// contains filtered or unexported fields
}
ShredUpdate is the builder for updating Shred entities.
func (*ShredUpdate) AddDeks ¶
func (_u *ShredUpdate) AddDeks(v int) *ShredUpdate
AddDeks adds value to the "deks" field.
func (*ShredUpdate) AppendVersions ¶
func (_u *ShredUpdate) AppendVersions(v []keyforge.KEKVersionRef) *ShredUpdate
AppendVersions appends value to the "versions" field.
func (*ShredUpdate) ClearCompletedAt ¶
func (_u *ShredUpdate) ClearCompletedAt() *ShredUpdate
ClearCompletedAt clears the value of the "completed_at" field.
func (*ShredUpdate) Exec ¶
func (_u *ShredUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*ShredUpdate) ExecContext ¶
func (c *ShredUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*ShredUpdate) ExecX ¶
func (_u *ShredUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ShredUpdate) Mutation ¶
func (_u *ShredUpdate) Mutation() *ShredMutation
Mutation returns the ShredMutation object of the builder.
func (*ShredUpdate) QueryContext ¶
func (c *ShredUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*ShredUpdate) Save ¶
func (_u *ShredUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*ShredUpdate) SaveX ¶
func (_u *ShredUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*ShredUpdate) SetCompletedAt ¶
func (_u *ShredUpdate) SetCompletedAt(v time.Time) *ShredUpdate
SetCompletedAt sets the "completed_at" field.
func (*ShredUpdate) SetDeks ¶
func (_u *ShredUpdate) SetDeks(v int) *ShredUpdate
SetDeks sets the "deks" field.
func (*ShredUpdate) SetNillableCompletedAt ¶
func (_u *ShredUpdate) SetNillableCompletedAt(v *time.Time) *ShredUpdate
SetNillableCompletedAt sets the "completed_at" field if the given value is not nil.
func (*ShredUpdate) SetNillableDeks ¶
func (_u *ShredUpdate) SetNillableDeks(v *int) *ShredUpdate
SetNillableDeks sets the "deks" field if the given value is not nil.
func (*ShredUpdate) SetNillablePurpose ¶
func (_u *ShredUpdate) SetNillablePurpose(v *string) *ShredUpdate
SetNillablePurpose sets the "purpose" field if the given value is not nil.
func (*ShredUpdate) SetNillableRequestedAt ¶
func (_u *ShredUpdate) SetNillableRequestedAt(v *time.Time) *ShredUpdate
SetNillableRequestedAt sets the "requested_at" field if the given value is not nil.
func (*ShredUpdate) SetNillableSubject ¶
func (_u *ShredUpdate) SetNillableSubject(v *string) *ShredUpdate
SetNillableSubject sets the "subject" field if the given value is not nil.
func (*ShredUpdate) SetPurpose ¶
func (_u *ShredUpdate) SetPurpose(v string) *ShredUpdate
SetPurpose sets the "purpose" field.
func (*ShredUpdate) SetRequestedAt ¶
func (_u *ShredUpdate) SetRequestedAt(v time.Time) *ShredUpdate
SetRequestedAt sets the "requested_at" field.
func (*ShredUpdate) SetSubject ¶
func (_u *ShredUpdate) SetSubject(v string) *ShredUpdate
SetSubject sets the "subject" field.
func (*ShredUpdate) SetVersions ¶
func (_u *ShredUpdate) SetVersions(v []keyforge.KEKVersionRef) *ShredUpdate
SetVersions sets the "versions" field.
func (*ShredUpdate) Where ¶
func (_u *ShredUpdate) Where(ps ...predicate.Shred) *ShredUpdate
Where appends a list predicates to the ShredUpdate builder.
type ShredUpdateOne ¶
type ShredUpdateOne struct {
// contains filtered or unexported fields
}
ShredUpdateOne is the builder for updating a single Shred entity.
func (*ShredUpdateOne) AddDeks ¶
func (_u *ShredUpdateOne) AddDeks(v int) *ShredUpdateOne
AddDeks adds value to the "deks" field.
func (*ShredUpdateOne) AppendVersions ¶
func (_u *ShredUpdateOne) AppendVersions(v []keyforge.KEKVersionRef) *ShredUpdateOne
AppendVersions appends value to the "versions" field.
func (*ShredUpdateOne) ClearCompletedAt ¶
func (_u *ShredUpdateOne) ClearCompletedAt() *ShredUpdateOne
ClearCompletedAt clears the value of the "completed_at" field.
func (*ShredUpdateOne) Exec ¶
func (_u *ShredUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*ShredUpdateOne) ExecContext ¶
func (c *ShredUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*ShredUpdateOne) ExecX ¶
func (_u *ShredUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ShredUpdateOne) Mutation ¶
func (_u *ShredUpdateOne) Mutation() *ShredMutation
Mutation returns the ShredMutation object of the builder.
func (*ShredUpdateOne) QueryContext ¶
func (c *ShredUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*ShredUpdateOne) Save ¶
func (_u *ShredUpdateOne) Save(ctx context.Context) (*Shred, error)
Save executes the query and returns the updated Shred entity.
func (*ShredUpdateOne) SaveX ¶
func (_u *ShredUpdateOne) SaveX(ctx context.Context) *Shred
SaveX is like Save, but panics if an error occurs.
func (*ShredUpdateOne) Select ¶
func (_u *ShredUpdateOne) Select(field string, fields ...string) *ShredUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*ShredUpdateOne) SetCompletedAt ¶
func (_u *ShredUpdateOne) SetCompletedAt(v time.Time) *ShredUpdateOne
SetCompletedAt sets the "completed_at" field.
func (*ShredUpdateOne) SetDeks ¶
func (_u *ShredUpdateOne) SetDeks(v int) *ShredUpdateOne
SetDeks sets the "deks" field.
func (*ShredUpdateOne) SetNillableCompletedAt ¶
func (_u *ShredUpdateOne) SetNillableCompletedAt(v *time.Time) *ShredUpdateOne
SetNillableCompletedAt sets the "completed_at" field if the given value is not nil.
func (*ShredUpdateOne) SetNillableDeks ¶
func (_u *ShredUpdateOne) SetNillableDeks(v *int) *ShredUpdateOne
SetNillableDeks sets the "deks" field if the given value is not nil.
func (*ShredUpdateOne) SetNillablePurpose ¶
func (_u *ShredUpdateOne) SetNillablePurpose(v *string) *ShredUpdateOne
SetNillablePurpose sets the "purpose" field if the given value is not nil.
func (*ShredUpdateOne) SetNillableRequestedAt ¶
func (_u *ShredUpdateOne) SetNillableRequestedAt(v *time.Time) *ShredUpdateOne
SetNillableRequestedAt sets the "requested_at" field if the given value is not nil.
func (*ShredUpdateOne) SetNillableSubject ¶
func (_u *ShredUpdateOne) SetNillableSubject(v *string) *ShredUpdateOne
SetNillableSubject sets the "subject" field if the given value is not nil.
func (*ShredUpdateOne) SetPurpose ¶
func (_u *ShredUpdateOne) SetPurpose(v string) *ShredUpdateOne
SetPurpose sets the "purpose" field.
func (*ShredUpdateOne) SetRequestedAt ¶
func (_u *ShredUpdateOne) SetRequestedAt(v time.Time) *ShredUpdateOne
SetRequestedAt sets the "requested_at" field.
func (*ShredUpdateOne) SetSubject ¶
func (_u *ShredUpdateOne) SetSubject(v string) *ShredUpdateOne
SetSubject sets the "subject" field.
func (*ShredUpdateOne) SetVersions ¶
func (_u *ShredUpdateOne) SetVersions(v []keyforge.KEKVersionRef) *ShredUpdateOne
SetVersions sets the "versions" field.
func (*ShredUpdateOne) Where ¶
func (_u *ShredUpdateOne) Where(ps ...predicate.Shred) *ShredUpdateOne
Where appends a list predicates to the ShredUpdate builder.
type ShredUpsert ¶
ShredUpsert is the "OnConflict" setter.
func (*ShredUpsert) AddDeks ¶
func (u *ShredUpsert) AddDeks(v int) *ShredUpsert
AddDeks adds v to the "deks" field.
func (*ShredUpsert) ClearCompletedAt ¶
func (u *ShredUpsert) ClearCompletedAt() *ShredUpsert
ClearCompletedAt clears the value of the "completed_at" field.
func (*ShredUpsert) SetCompletedAt ¶
func (u *ShredUpsert) SetCompletedAt(v time.Time) *ShredUpsert
SetCompletedAt sets the "completed_at" field.
func (*ShredUpsert) SetDeks ¶
func (u *ShredUpsert) SetDeks(v int) *ShredUpsert
SetDeks sets the "deks" field.
func (*ShredUpsert) SetPurpose ¶
func (u *ShredUpsert) SetPurpose(v string) *ShredUpsert
SetPurpose sets the "purpose" field.
func (*ShredUpsert) SetRequestedAt ¶
func (u *ShredUpsert) SetRequestedAt(v time.Time) *ShredUpsert
SetRequestedAt sets the "requested_at" field.
func (*ShredUpsert) SetSubject ¶
func (u *ShredUpsert) SetSubject(v string) *ShredUpsert
SetSubject sets the "subject" field.
func (*ShredUpsert) SetVersions ¶
func (u *ShredUpsert) SetVersions(v []keyforge.KEKVersionRef) *ShredUpsert
SetVersions sets the "versions" field.
func (*ShredUpsert) UpdateCompletedAt ¶
func (u *ShredUpsert) UpdateCompletedAt() *ShredUpsert
UpdateCompletedAt sets the "completed_at" field to the value that was provided on create.
func (*ShredUpsert) UpdateDeks ¶
func (u *ShredUpsert) UpdateDeks() *ShredUpsert
UpdateDeks sets the "deks" field to the value that was provided on create.
func (*ShredUpsert) UpdatePurpose ¶
func (u *ShredUpsert) UpdatePurpose() *ShredUpsert
UpdatePurpose sets the "purpose" field to the value that was provided on create.
func (*ShredUpsert) UpdateRequestedAt ¶
func (u *ShredUpsert) UpdateRequestedAt() *ShredUpsert
UpdateRequestedAt sets the "requested_at" field to the value that was provided on create.
func (*ShredUpsert) UpdateSubject ¶
func (u *ShredUpsert) UpdateSubject() *ShredUpsert
UpdateSubject sets the "subject" field to the value that was provided on create.
func (*ShredUpsert) UpdateVersions ¶
func (u *ShredUpsert) UpdateVersions() *ShredUpsert
UpdateVersions sets the "versions" field to the value that was provided on create.
type ShredUpsertBulk ¶
type ShredUpsertBulk struct {
// contains filtered or unexported fields
}
ShredUpsertBulk is the builder for "upsert"-ing a bulk of Shred nodes.
func (*ShredUpsertBulk) AddDeks ¶
func (u *ShredUpsertBulk) AddDeks(v int) *ShredUpsertBulk
AddDeks adds v to the "deks" field.
func (*ShredUpsertBulk) ClearCompletedAt ¶
func (u *ShredUpsertBulk) ClearCompletedAt() *ShredUpsertBulk
ClearCompletedAt clears the value of the "completed_at" field.
func (*ShredUpsertBulk) DoNothing ¶
func (u *ShredUpsertBulk) DoNothing() *ShredUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*ShredUpsertBulk) Exec ¶
func (u *ShredUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*ShredUpsertBulk) ExecX ¶
func (u *ShredUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ShredUpsertBulk) Ignore ¶
func (u *ShredUpsertBulk) Ignore() *ShredUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Shred.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*ShredUpsertBulk) SetCompletedAt ¶
func (u *ShredUpsertBulk) SetCompletedAt(v time.Time) *ShredUpsertBulk
SetCompletedAt sets the "completed_at" field.
func (*ShredUpsertBulk) SetDeks ¶
func (u *ShredUpsertBulk) SetDeks(v int) *ShredUpsertBulk
SetDeks sets the "deks" field.
func (*ShredUpsertBulk) SetPurpose ¶
func (u *ShredUpsertBulk) SetPurpose(v string) *ShredUpsertBulk
SetPurpose sets the "purpose" field.
func (*ShredUpsertBulk) SetRequestedAt ¶
func (u *ShredUpsertBulk) SetRequestedAt(v time.Time) *ShredUpsertBulk
SetRequestedAt sets the "requested_at" field.
func (*ShredUpsertBulk) SetSubject ¶
func (u *ShredUpsertBulk) SetSubject(v string) *ShredUpsertBulk
SetSubject sets the "subject" field.
func (*ShredUpsertBulk) SetVersions ¶
func (u *ShredUpsertBulk) SetVersions(v []keyforge.KEKVersionRef) *ShredUpsertBulk
SetVersions sets the "versions" field.
func (*ShredUpsertBulk) Update ¶
func (u *ShredUpsertBulk) Update(set func(*ShredUpsert)) *ShredUpsertBulk
Update allows overriding fields `UPDATE` values. See the ShredCreateBulk.OnConflict documentation for more info.
func (*ShredUpsertBulk) UpdateCompletedAt ¶
func (u *ShredUpsertBulk) UpdateCompletedAt() *ShredUpsertBulk
UpdateCompletedAt sets the "completed_at" field to the value that was provided on create.
func (*ShredUpsertBulk) UpdateDeks ¶
func (u *ShredUpsertBulk) UpdateDeks() *ShredUpsertBulk
UpdateDeks sets the "deks" field to the value that was provided on create.
func (*ShredUpsertBulk) UpdateNewValues ¶
func (u *ShredUpsertBulk) UpdateNewValues() *ShredUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.Shred.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*ShredUpsertBulk) UpdatePurpose ¶
func (u *ShredUpsertBulk) UpdatePurpose() *ShredUpsertBulk
UpdatePurpose sets the "purpose" field to the value that was provided on create.
func (*ShredUpsertBulk) UpdateRequestedAt ¶
func (u *ShredUpsertBulk) UpdateRequestedAt() *ShredUpsertBulk
UpdateRequestedAt sets the "requested_at" field to the value that was provided on create.
func (*ShredUpsertBulk) UpdateSubject ¶
func (u *ShredUpsertBulk) UpdateSubject() *ShredUpsertBulk
UpdateSubject sets the "subject" field to the value that was provided on create.
func (*ShredUpsertBulk) UpdateVersions ¶
func (u *ShredUpsertBulk) UpdateVersions() *ShredUpsertBulk
UpdateVersions sets the "versions" field to the value that was provided on create.
type ShredUpsertOne ¶
type ShredUpsertOne struct {
// contains filtered or unexported fields
}
ShredUpsertOne is the builder for "upsert"-ing
one Shred node.
func (*ShredUpsertOne) AddDeks ¶
func (u *ShredUpsertOne) AddDeks(v int) *ShredUpsertOne
AddDeks adds v to the "deks" field.
func (*ShredUpsertOne) ClearCompletedAt ¶
func (u *ShredUpsertOne) ClearCompletedAt() *ShredUpsertOne
ClearCompletedAt clears the value of the "completed_at" field.
func (*ShredUpsertOne) DoNothing ¶
func (u *ShredUpsertOne) DoNothing() *ShredUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*ShredUpsertOne) Exec ¶
func (u *ShredUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*ShredUpsertOne) ExecX ¶
func (u *ShredUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ShredUpsertOne) ID ¶
func (u *ShredUpsertOne) ID(ctx context.Context) (id int, err error)
Exec executes the UPSERT query and returns the inserted/updated ID.
func (*ShredUpsertOne) IDX ¶
func (u *ShredUpsertOne) IDX(ctx context.Context) int
IDX is like ID, but panics if an error occurs.
func (*ShredUpsertOne) Ignore ¶
func (u *ShredUpsertOne) Ignore() *ShredUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Shred.Create().
OnConflict(sql.ResolveWithIgnore()).
Exec(ctx)
func (*ShredUpsertOne) SetCompletedAt ¶
func (u *ShredUpsertOne) SetCompletedAt(v time.Time) *ShredUpsertOne
SetCompletedAt sets the "completed_at" field.
func (*ShredUpsertOne) SetDeks ¶
func (u *ShredUpsertOne) SetDeks(v int) *ShredUpsertOne
SetDeks sets the "deks" field.
func (*ShredUpsertOne) SetPurpose ¶
func (u *ShredUpsertOne) SetPurpose(v string) *ShredUpsertOne
SetPurpose sets the "purpose" field.
func (*ShredUpsertOne) SetRequestedAt ¶
func (u *ShredUpsertOne) SetRequestedAt(v time.Time) *ShredUpsertOne
SetRequestedAt sets the "requested_at" field.
func (*ShredUpsertOne) SetSubject ¶
func (u *ShredUpsertOne) SetSubject(v string) *ShredUpsertOne
SetSubject sets the "subject" field.
func (*ShredUpsertOne) SetVersions ¶
func (u *ShredUpsertOne) SetVersions(v []keyforge.KEKVersionRef) *ShredUpsertOne
SetVersions sets the "versions" field.
func (*ShredUpsertOne) Update ¶
func (u *ShredUpsertOne) Update(set func(*ShredUpsert)) *ShredUpsertOne
Update allows overriding fields `UPDATE` values. See the ShredCreate.OnConflict documentation for more info.
func (*ShredUpsertOne) UpdateCompletedAt ¶
func (u *ShredUpsertOne) UpdateCompletedAt() *ShredUpsertOne
UpdateCompletedAt sets the "completed_at" field to the value that was provided on create.
func (*ShredUpsertOne) UpdateDeks ¶
func (u *ShredUpsertOne) UpdateDeks() *ShredUpsertOne
UpdateDeks sets the "deks" field to the value that was provided on create.
func (*ShredUpsertOne) UpdateNewValues ¶
func (u *ShredUpsertOne) UpdateNewValues() *ShredUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.Shred.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*ShredUpsertOne) UpdatePurpose ¶
func (u *ShredUpsertOne) UpdatePurpose() *ShredUpsertOne
UpdatePurpose sets the "purpose" field to the value that was provided on create.
func (*ShredUpsertOne) UpdateRequestedAt ¶
func (u *ShredUpsertOne) UpdateRequestedAt() *ShredUpsertOne
UpdateRequestedAt sets the "requested_at" field to the value that was provided on create.
func (*ShredUpsertOne) UpdateSubject ¶
func (u *ShredUpsertOne) UpdateSubject() *ShredUpsertOne
UpdateSubject sets the "subject" field to the value that was provided on create.
func (*ShredUpsertOne) UpdateVersions ¶
func (u *ShredUpsertOne) UpdateVersions() *ShredUpsertOne
UpdateVersions sets the "versions" field to the value that was provided on create.
type TraverseFunc ¶
type TraverseFunc = ent.TraverseFunc
ent aliases to avoid import conflicts in user's code.
type Tx ¶
type Tx struct {
// DataKey is the client for interacting with the DataKey builders.
DataKey *DataKeyClient
// KEK is the client for interacting with the KEK builders.
KEK *KEKClient
// KEKVersion is the client for interacting with the KEKVersion builders.
KEKVersion *KEKVersionClient
// Sentinel is the client for interacting with the Sentinel builders.
Sentinel *SentinelClient
// Shred is the client for interacting with the Shred builders.
Shred *ShredClient
// 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) ExecContext ¶
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*Tx) OnRollback ¶
func (tx *Tx) OnRollback(f RollbackHook)
OnRollback adds a hook to call on rollback.
func (*Tx) QueryContext ¶
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
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
- datakey.go
- datakey_create.go
- datakey_delete.go
- datakey_query.go
- datakey_update.go
- ent.go
- kek.go
- kek_create.go
- kek_delete.go
- kek_query.go
- kek_update.go
- kekversion.go
- kekversion_create.go
- kekversion_delete.go
- kekversion_query.go
- kekversion_update.go
- mutation.go
- runtime.go
- sentinel.go
- sentinel_create.go
- sentinel_delete.go
- sentinel_query.go
- sentinel_update.go
- shred.go
- shred_create.go
- shred_delete.go
- shred_query.go
- shred_update.go
- tx.go