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 AuthCode
- type AuthCodeClient
- func (c *AuthCodeClient) Create() *AuthCodeCreate
- func (c *AuthCodeClient) CreateBulk(builders ...*AuthCodeCreate) *AuthCodeCreateBulk
- func (c *AuthCodeClient) Delete() *AuthCodeDelete
- func (c *AuthCodeClient) DeleteOne(ac *AuthCode) *AuthCodeDeleteOne
- func (c *AuthCodeClient) DeleteOneID(id typedef.AuthCodeID) *AuthCodeDeleteOne
- func (c *AuthCodeClient) Get(ctx context.Context, id typedef.AuthCodeID) (*AuthCode, error)
- func (c *AuthCodeClient) GetX(ctx context.Context, id typedef.AuthCodeID) *AuthCode
- func (c *AuthCodeClient) Hooks() []Hook
- func (c *AuthCodeClient) Intercept(interceptors ...Interceptor)
- func (c *AuthCodeClient) Interceptors() []Interceptor
- func (c *AuthCodeClient) MapCreateBulk(slice any, setFunc func(*AuthCodeCreate, int)) *AuthCodeCreateBulk
- func (c *AuthCodeClient) Query() *AuthCodeQuery
- func (c *AuthCodeClient) QueryRelyingParty(ac *AuthCode) *RelyingPartyQuery
- func (c *AuthCodeClient) Update() *AuthCodeUpdate
- func (c *AuthCodeClient) UpdateOne(ac *AuthCode) *AuthCodeUpdateOne
- func (c *AuthCodeClient) UpdateOneID(id typedef.AuthCodeID) *AuthCodeUpdateOne
- func (c *AuthCodeClient) Use(hooks ...Hook)
- type AuthCodeCreate
- func (acc *AuthCodeCreate) Exec(ctx context.Context) error
- func (acc *AuthCodeCreate) ExecX(ctx context.Context)
- func (acc *AuthCodeCreate) Mutation() *AuthCodeMutation
- func (acc *AuthCodeCreate) Save(ctx context.Context) (*AuthCode, error)
- func (acc *AuthCodeCreate) SaveX(ctx context.Context) *AuthCode
- func (acc *AuthCodeCreate) SetCode(s string) *AuthCodeCreate
- func (acc *AuthCodeCreate) SetCreatedAt(t time.Time) *AuthCodeCreate
- func (acc *AuthCodeCreate) SetExpireAt(t time.Time) *AuthCodeCreate
- func (acc *AuthCodeCreate) SetID(tci typedef.AuthCodeID) *AuthCodeCreate
- func (acc *AuthCodeCreate) SetModifiedAt(t time.Time) *AuthCodeCreate
- func (acc *AuthCodeCreate) SetNillableCreatedAt(t *time.Time) *AuthCodeCreate
- func (acc *AuthCodeCreate) SetNillableExpireAt(t *time.Time) *AuthCodeCreate
- func (acc *AuthCodeCreate) SetNillableModifiedAt(t *time.Time) *AuthCodeCreate
- func (acc *AuthCodeCreate) SetNillableUsedAt(t *time.Time) *AuthCodeCreate
- func (acc *AuthCodeCreate) SetRelyingParty(r *RelyingParty) *AuthCodeCreate
- func (acc *AuthCodeCreate) SetRelyingPartyID(tpi typedef.RelyingPartyID) *AuthCodeCreate
- func (acc *AuthCodeCreate) SetUsedAt(t time.Time) *AuthCodeCreate
- func (acc *AuthCodeCreate) SetUserID(ti typedef.UserID) *AuthCodeCreate
- type AuthCodeCreateBulk
- type AuthCodeDelete
- type AuthCodeDeleteOne
- type AuthCodeEdges
- type AuthCodeGroupBy
- func (acgb *AuthCodeGroupBy) Aggregate(fns ...AggregateFunc) *AuthCodeGroupBy
- func (s *AuthCodeGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *AuthCodeGroupBy) BoolX(ctx context.Context) bool
- func (s *AuthCodeGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *AuthCodeGroupBy) BoolsX(ctx context.Context) []bool
- func (s *AuthCodeGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *AuthCodeGroupBy) Float64X(ctx context.Context) float64
- func (s *AuthCodeGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *AuthCodeGroupBy) Float64sX(ctx context.Context) []float64
- func (s *AuthCodeGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *AuthCodeGroupBy) IntX(ctx context.Context) int
- func (s *AuthCodeGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *AuthCodeGroupBy) IntsX(ctx context.Context) []int
- func (acgb *AuthCodeGroupBy) Scan(ctx context.Context, v any) error
- func (s *AuthCodeGroupBy) ScanX(ctx context.Context, v any)
- func (s *AuthCodeGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *AuthCodeGroupBy) StringX(ctx context.Context) string
- func (s *AuthCodeGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *AuthCodeGroupBy) StringsX(ctx context.Context) []string
- type AuthCodeMutation
- func (m *AuthCodeMutation) AddField(name string, value ent.Value) error
- func (m *AuthCodeMutation) AddUserID(ti typedef.UserID)
- func (m *AuthCodeMutation) AddedEdges() []string
- func (m *AuthCodeMutation) AddedField(name string) (ent.Value, bool)
- func (m *AuthCodeMutation) AddedFields() []string
- func (m *AuthCodeMutation) AddedIDs(name string) []ent.Value
- func (m *AuthCodeMutation) AddedUserID() (r typedef.UserID, exists bool)
- func (m *AuthCodeMutation) ClearEdge(name string) error
- func (m *AuthCodeMutation) ClearField(name string) error
- func (m *AuthCodeMutation) ClearRelyingParty()
- func (m *AuthCodeMutation) ClearUsedAt()
- func (m *AuthCodeMutation) ClearedEdges() []string
- func (m *AuthCodeMutation) ClearedFields() []string
- func (m AuthCodeMutation) Client() *Client
- func (m *AuthCodeMutation) Code() (r string, exists bool)
- func (m *AuthCodeMutation) CreatedAt() (r time.Time, exists bool)
- func (m *AuthCodeMutation) EdgeCleared(name string) bool
- func (m *AuthCodeMutation) ExpireAt() (r time.Time, exists bool)
- func (m *AuthCodeMutation) Field(name string) (ent.Value, bool)
- func (m *AuthCodeMutation) FieldCleared(name string) bool
- func (m *AuthCodeMutation) Fields() []string
- func (m *AuthCodeMutation) ID() (id typedef.AuthCodeID, exists bool)
- func (m *AuthCodeMutation) IDs(ctx context.Context) ([]typedef.AuthCodeID, error)
- func (m *AuthCodeMutation) ModifiedAt() (r time.Time, exists bool)
- func (m *AuthCodeMutation) OldCode(ctx context.Context) (v string, err error)
- func (m *AuthCodeMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *AuthCodeMutation) OldExpireAt(ctx context.Context) (v time.Time, err error)
- func (m *AuthCodeMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *AuthCodeMutation) OldModifiedAt(ctx context.Context) (v time.Time, err error)
- func (m *AuthCodeMutation) OldRelyingPartyID(ctx context.Context) (v typedef.RelyingPartyID, err error)
- func (m *AuthCodeMutation) OldUsedAt(ctx context.Context) (v *time.Time, err error)
- func (m *AuthCodeMutation) OldUserID(ctx context.Context) (v typedef.UserID, err error)
- func (m *AuthCodeMutation) Op() Op
- func (m *AuthCodeMutation) RelyingPartyCleared() bool
- func (m *AuthCodeMutation) RelyingPartyID() (r typedef.RelyingPartyID, exists bool)
- func (m *AuthCodeMutation) RelyingPartyIDs() (ids []typedef.RelyingPartyID)
- func (m *AuthCodeMutation) RemovedEdges() []string
- func (m *AuthCodeMutation) RemovedIDs(name string) []ent.Value
- func (m *AuthCodeMutation) ResetCode()
- func (m *AuthCodeMutation) ResetCreatedAt()
- func (m *AuthCodeMutation) ResetEdge(name string) error
- func (m *AuthCodeMutation) ResetExpireAt()
- func (m *AuthCodeMutation) ResetField(name string) error
- func (m *AuthCodeMutation) ResetModifiedAt()
- func (m *AuthCodeMutation) ResetRelyingParty()
- func (m *AuthCodeMutation) ResetRelyingPartyID()
- func (m *AuthCodeMutation) ResetUsedAt()
- func (m *AuthCodeMutation) ResetUserID()
- func (m *AuthCodeMutation) SetCode(s string)
- func (m *AuthCodeMutation) SetCreatedAt(t time.Time)
- func (m *AuthCodeMutation) SetExpireAt(t time.Time)
- func (m *AuthCodeMutation) SetField(name string, value ent.Value) error
- func (m *AuthCodeMutation) SetID(id typedef.AuthCodeID)
- func (m *AuthCodeMutation) SetModifiedAt(t time.Time)
- func (m *AuthCodeMutation) SetOp(op Op)
- func (m *AuthCodeMutation) SetRelyingPartyID(tpi typedef.RelyingPartyID)
- func (m *AuthCodeMutation) SetUsedAt(t time.Time)
- func (m *AuthCodeMutation) SetUserID(ti typedef.UserID)
- func (m AuthCodeMutation) Tx() (*Tx, error)
- func (m *AuthCodeMutation) Type() string
- func (m *AuthCodeMutation) UsedAt() (r time.Time, exists bool)
- func (m *AuthCodeMutation) UsedAtCleared() bool
- func (m *AuthCodeMutation) UserID() (r typedef.UserID, exists bool)
- func (m *AuthCodeMutation) Where(ps ...predicate.AuthCode)
- func (m *AuthCodeMutation) WhereP(ps ...func(*sql.Selector))
- type AuthCodeQuery
- func (acq *AuthCodeQuery) Aggregate(fns ...AggregateFunc) *AuthCodeSelect
- func (acq *AuthCodeQuery) All(ctx context.Context) ([]*AuthCode, error)
- func (acq *AuthCodeQuery) AllX(ctx context.Context) []*AuthCode
- func (acq *AuthCodeQuery) Clone() *AuthCodeQuery
- func (acq *AuthCodeQuery) Count(ctx context.Context) (int, error)
- func (acq *AuthCodeQuery) CountX(ctx context.Context) int
- func (acq *AuthCodeQuery) Exist(ctx context.Context) (bool, error)
- func (acq *AuthCodeQuery) ExistX(ctx context.Context) bool
- func (acq *AuthCodeQuery) First(ctx context.Context) (*AuthCode, error)
- func (acq *AuthCodeQuery) FirstID(ctx context.Context) (id typedef.AuthCodeID, err error)
- func (acq *AuthCodeQuery) FirstIDX(ctx context.Context) typedef.AuthCodeID
- func (acq *AuthCodeQuery) FirstX(ctx context.Context) *AuthCode
- func (acq *AuthCodeQuery) ForShare(opts ...sql.LockOption) *AuthCodeQuery
- func (acq *AuthCodeQuery) ForUpdate(opts ...sql.LockOption) *AuthCodeQuery
- func (acq *AuthCodeQuery) GroupBy(field string, fields ...string) *AuthCodeGroupBy
- func (acq *AuthCodeQuery) IDs(ctx context.Context) (ids []typedef.AuthCodeID, err error)
- func (acq *AuthCodeQuery) IDsX(ctx context.Context) []typedef.AuthCodeID
- func (acq *AuthCodeQuery) Limit(limit int) *AuthCodeQuery
- func (acq *AuthCodeQuery) Offset(offset int) *AuthCodeQuery
- func (acq *AuthCodeQuery) Only(ctx context.Context) (*AuthCode, error)
- func (acq *AuthCodeQuery) OnlyID(ctx context.Context) (id typedef.AuthCodeID, err error)
- func (acq *AuthCodeQuery) OnlyIDX(ctx context.Context) typedef.AuthCodeID
- func (acq *AuthCodeQuery) OnlyX(ctx context.Context) *AuthCode
- func (acq *AuthCodeQuery) Order(o ...authcode.OrderOption) *AuthCodeQuery
- func (acq *AuthCodeQuery) QueryRelyingParty() *RelyingPartyQuery
- func (acq *AuthCodeQuery) Select(fields ...string) *AuthCodeSelect
- func (acq *AuthCodeQuery) Unique(unique bool) *AuthCodeQuery
- func (acq *AuthCodeQuery) Where(ps ...predicate.AuthCode) *AuthCodeQuery
- func (acq *AuthCodeQuery) WithRelyingParty(opts ...func(*RelyingPartyQuery)) *AuthCodeQuery
- type AuthCodeSelect
- func (acs *AuthCodeSelect) Aggregate(fns ...AggregateFunc) *AuthCodeSelect
- func (s *AuthCodeSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *AuthCodeSelect) BoolX(ctx context.Context) bool
- func (s *AuthCodeSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *AuthCodeSelect) BoolsX(ctx context.Context) []bool
- func (s *AuthCodeSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *AuthCodeSelect) Float64X(ctx context.Context) float64
- func (s *AuthCodeSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *AuthCodeSelect) Float64sX(ctx context.Context) []float64
- func (s *AuthCodeSelect) Int(ctx context.Context) (_ int, err error)
- func (s *AuthCodeSelect) IntX(ctx context.Context) int
- func (s *AuthCodeSelect) Ints(ctx context.Context) ([]int, error)
- func (s *AuthCodeSelect) IntsX(ctx context.Context) []int
- func (acs *AuthCodeSelect) Scan(ctx context.Context, v any) error
- func (s *AuthCodeSelect) ScanX(ctx context.Context, v any)
- func (s *AuthCodeSelect) String(ctx context.Context) (_ string, err error)
- func (s *AuthCodeSelect) StringX(ctx context.Context) string
- func (s *AuthCodeSelect) Strings(ctx context.Context) ([]string, error)
- func (s *AuthCodeSelect) StringsX(ctx context.Context) []string
- type AuthCodeUpdate
- func (acu *AuthCodeUpdate) ClearUsedAt() *AuthCodeUpdate
- func (acu *AuthCodeUpdate) Exec(ctx context.Context) error
- func (acu *AuthCodeUpdate) ExecX(ctx context.Context)
- func (acu *AuthCodeUpdate) Mutation() *AuthCodeMutation
- func (acu *AuthCodeUpdate) Save(ctx context.Context) (int, error)
- func (acu *AuthCodeUpdate) SaveX(ctx context.Context) int
- func (acu *AuthCodeUpdate) SetModifiedAt(t time.Time) *AuthCodeUpdate
- func (acu *AuthCodeUpdate) SetNillableUsedAt(t *time.Time) *AuthCodeUpdate
- func (acu *AuthCodeUpdate) SetUsedAt(t time.Time) *AuthCodeUpdate
- func (acu *AuthCodeUpdate) Where(ps ...predicate.AuthCode) *AuthCodeUpdate
- type AuthCodeUpdateOne
- func (acuo *AuthCodeUpdateOne) ClearUsedAt() *AuthCodeUpdateOne
- func (acuo *AuthCodeUpdateOne) Exec(ctx context.Context) error
- func (acuo *AuthCodeUpdateOne) ExecX(ctx context.Context)
- func (acuo *AuthCodeUpdateOne) Mutation() *AuthCodeMutation
- func (acuo *AuthCodeUpdateOne) Save(ctx context.Context) (*AuthCode, error)
- func (acuo *AuthCodeUpdateOne) SaveX(ctx context.Context) *AuthCode
- func (acuo *AuthCodeUpdateOne) Select(field string, fields ...string) *AuthCodeUpdateOne
- func (acuo *AuthCodeUpdateOne) SetModifiedAt(t time.Time) *AuthCodeUpdateOne
- func (acuo *AuthCodeUpdateOne) SetNillableUsedAt(t *time.Time) *AuthCodeUpdateOne
- func (acuo *AuthCodeUpdateOne) SetUsedAt(t time.Time) *AuthCodeUpdateOne
- func (acuo *AuthCodeUpdateOne) Where(ps ...predicate.AuthCode) *AuthCodeUpdateOne
- type AuthCodes
- type Client
- func (c *Client) BeginTx(ctx context.Context, opts *sql.TxOptions) (*Tx, error)
- func (c *Client) Close() error
- func (c *Client) Debug() *Client
- func (c *Client) Intercept(interceptors ...Interceptor)
- func (c *Client) Mutate(ctx context.Context, m Mutation) (Value, error)
- func (c *Client) Tx(ctx context.Context) (*Tx, error)
- func (c *Client) Use(hooks ...Hook)
- type CommitFunc
- type CommitHook
- type Committer
- type Consent
- type ConsentClient
- func (c *ConsentClient) Create() *ConsentCreate
- func (c *ConsentClient) CreateBulk(builders ...*ConsentCreate) *ConsentCreateBulk
- func (c *ConsentClient) Delete() *ConsentDelete
- func (c *ConsentClient) DeleteOne(co *Consent) *ConsentDeleteOne
- func (c *ConsentClient) DeleteOneID(id typedef.ConsentID) *ConsentDeleteOne
- func (c *ConsentClient) Get(ctx context.Context, id typedef.ConsentID) (*Consent, error)
- func (c *ConsentClient) GetX(ctx context.Context, id typedef.ConsentID) *Consent
- func (c *ConsentClient) Hooks() []Hook
- func (c *ConsentClient) Intercept(interceptors ...Interceptor)
- func (c *ConsentClient) Interceptors() []Interceptor
- func (c *ConsentClient) MapCreateBulk(slice any, setFunc func(*ConsentCreate, int)) *ConsentCreateBulk
- func (c *ConsentClient) Query() *ConsentQuery
- func (c *ConsentClient) QueryUser(co *Consent) *UserQuery
- func (c *ConsentClient) Update() *ConsentUpdate
- func (c *ConsentClient) UpdateOne(co *Consent) *ConsentUpdateOne
- func (c *ConsentClient) UpdateOneID(id typedef.ConsentID) *ConsentUpdateOne
- func (c *ConsentClient) Use(hooks ...Hook)
- type ConsentCreate
- func (cc *ConsentCreate) Exec(ctx context.Context) error
- func (cc *ConsentCreate) ExecX(ctx context.Context)
- func (cc *ConsentCreate) Mutation() *ConsentMutation
- func (cc *ConsentCreate) Save(ctx context.Context) (*Consent, error)
- func (cc *ConsentCreate) SaveX(ctx context.Context) *Consent
- func (cc *ConsentCreate) SetClientID(ti typedef.ClientID) *ConsentCreate
- func (cc *ConsentCreate) SetCreatedAt(t time.Time) *ConsentCreate
- func (cc *ConsentCreate) SetID(ti typedef.ConsentID) *ConsentCreate
- func (cc *ConsentCreate) SetNillableCreatedAt(t *time.Time) *ConsentCreate
- func (cc *ConsentCreate) SetUser(u *User) *ConsentCreate
- func (cc *ConsentCreate) SetUserID(ti typedef.UserID) *ConsentCreate
- type ConsentCreateBulk
- type ConsentDelete
- type ConsentDeleteOne
- type ConsentEdges
- type ConsentGroupBy
- func (cgb *ConsentGroupBy) Aggregate(fns ...AggregateFunc) *ConsentGroupBy
- func (s *ConsentGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *ConsentGroupBy) BoolX(ctx context.Context) bool
- func (s *ConsentGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *ConsentGroupBy) BoolsX(ctx context.Context) []bool
- func (s *ConsentGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *ConsentGroupBy) Float64X(ctx context.Context) float64
- func (s *ConsentGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *ConsentGroupBy) Float64sX(ctx context.Context) []float64
- func (s *ConsentGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *ConsentGroupBy) IntX(ctx context.Context) int
- func (s *ConsentGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *ConsentGroupBy) IntsX(ctx context.Context) []int
- func (cgb *ConsentGroupBy) Scan(ctx context.Context, v any) error
- func (s *ConsentGroupBy) ScanX(ctx context.Context, v any)
- func (s *ConsentGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *ConsentGroupBy) StringX(ctx context.Context) string
- func (s *ConsentGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *ConsentGroupBy) StringsX(ctx context.Context) []string
- type ConsentMutation
- func (m *ConsentMutation) AddField(name string, value ent.Value) error
- func (m *ConsentMutation) AddedEdges() []string
- func (m *ConsentMutation) AddedField(name string) (ent.Value, bool)
- func (m *ConsentMutation) AddedFields() []string
- func (m *ConsentMutation) AddedIDs(name string) []ent.Value
- func (m *ConsentMutation) ClearEdge(name string) error
- func (m *ConsentMutation) ClearField(name string) error
- func (m *ConsentMutation) ClearUser()
- func (m *ConsentMutation) ClearedEdges() []string
- func (m *ConsentMutation) ClearedFields() []string
- func (m ConsentMutation) Client() *Client
- func (m *ConsentMutation) ClientID() (r typedef.ClientID, exists bool)
- func (m *ConsentMutation) CreatedAt() (r time.Time, exists bool)
- func (m *ConsentMutation) EdgeCleared(name string) bool
- func (m *ConsentMutation) Field(name string) (ent.Value, bool)
- func (m *ConsentMutation) FieldCleared(name string) bool
- func (m *ConsentMutation) Fields() []string
- func (m *ConsentMutation) ID() (id typedef.ConsentID, exists bool)
- func (m *ConsentMutation) IDs(ctx context.Context) ([]typedef.ConsentID, error)
- func (m *ConsentMutation) OldClientID(ctx context.Context) (v typedef.ClientID, err error)
- func (m *ConsentMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *ConsentMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *ConsentMutation) OldUserID(ctx context.Context) (v typedef.UserID, err error)
- func (m *ConsentMutation) Op() Op
- func (m *ConsentMutation) RemovedEdges() []string
- func (m *ConsentMutation) RemovedIDs(name string) []ent.Value
- func (m *ConsentMutation) ResetClientID()
- func (m *ConsentMutation) ResetCreatedAt()
- func (m *ConsentMutation) ResetEdge(name string) error
- func (m *ConsentMutation) ResetField(name string) error
- func (m *ConsentMutation) ResetUser()
- func (m *ConsentMutation) ResetUserID()
- func (m *ConsentMutation) SetClientID(ti typedef.ClientID)
- func (m *ConsentMutation) SetCreatedAt(t time.Time)
- func (m *ConsentMutation) SetField(name string, value ent.Value) error
- func (m *ConsentMutation) SetID(id typedef.ConsentID)
- func (m *ConsentMutation) SetOp(op Op)
- func (m *ConsentMutation) SetUserID(ti typedef.UserID)
- func (m ConsentMutation) Tx() (*Tx, error)
- func (m *ConsentMutation) Type() string
- func (m *ConsentMutation) UserCleared() bool
- func (m *ConsentMutation) UserID() (r typedef.UserID, exists bool)
- func (m *ConsentMutation) UserIDs() (ids []typedef.UserID)
- func (m *ConsentMutation) Where(ps ...predicate.Consent)
- func (m *ConsentMutation) WhereP(ps ...func(*sql.Selector))
- type ConsentQuery
- func (cq *ConsentQuery) Aggregate(fns ...AggregateFunc) *ConsentSelect
- func (cq *ConsentQuery) All(ctx context.Context) ([]*Consent, error)
- func (cq *ConsentQuery) AllX(ctx context.Context) []*Consent
- func (cq *ConsentQuery) Clone() *ConsentQuery
- func (cq *ConsentQuery) Count(ctx context.Context) (int, error)
- func (cq *ConsentQuery) CountX(ctx context.Context) int
- func (cq *ConsentQuery) Exist(ctx context.Context) (bool, error)
- func (cq *ConsentQuery) ExistX(ctx context.Context) bool
- func (cq *ConsentQuery) First(ctx context.Context) (*Consent, error)
- func (cq *ConsentQuery) FirstID(ctx context.Context) (id typedef.ConsentID, err error)
- func (cq *ConsentQuery) FirstIDX(ctx context.Context) typedef.ConsentID
- func (cq *ConsentQuery) FirstX(ctx context.Context) *Consent
- func (cq *ConsentQuery) ForShare(opts ...sql.LockOption) *ConsentQuery
- func (cq *ConsentQuery) ForUpdate(opts ...sql.LockOption) *ConsentQuery
- func (cq *ConsentQuery) GroupBy(field string, fields ...string) *ConsentGroupBy
- func (cq *ConsentQuery) IDs(ctx context.Context) (ids []typedef.ConsentID, err error)
- func (cq *ConsentQuery) IDsX(ctx context.Context) []typedef.ConsentID
- func (cq *ConsentQuery) Limit(limit int) *ConsentQuery
- func (cq *ConsentQuery) Offset(offset int) *ConsentQuery
- func (cq *ConsentQuery) Only(ctx context.Context) (*Consent, error)
- func (cq *ConsentQuery) OnlyID(ctx context.Context) (id typedef.ConsentID, err error)
- func (cq *ConsentQuery) OnlyIDX(ctx context.Context) typedef.ConsentID
- func (cq *ConsentQuery) OnlyX(ctx context.Context) *Consent
- func (cq *ConsentQuery) Order(o ...consent.OrderOption) *ConsentQuery
- func (cq *ConsentQuery) QueryUser() *UserQuery
- func (cq *ConsentQuery) Select(fields ...string) *ConsentSelect
- func (cq *ConsentQuery) Unique(unique bool) *ConsentQuery
- func (cq *ConsentQuery) Where(ps ...predicate.Consent) *ConsentQuery
- func (cq *ConsentQuery) WithUser(opts ...func(*UserQuery)) *ConsentQuery
- type ConsentSelect
- func (cs *ConsentSelect) Aggregate(fns ...AggregateFunc) *ConsentSelect
- func (s *ConsentSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *ConsentSelect) BoolX(ctx context.Context) bool
- func (s *ConsentSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *ConsentSelect) BoolsX(ctx context.Context) []bool
- func (s *ConsentSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *ConsentSelect) Float64X(ctx context.Context) float64
- func (s *ConsentSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *ConsentSelect) Float64sX(ctx context.Context) []float64
- func (s *ConsentSelect) Int(ctx context.Context) (_ int, err error)
- func (s *ConsentSelect) IntX(ctx context.Context) int
- func (s *ConsentSelect) Ints(ctx context.Context) ([]int, error)
- func (s *ConsentSelect) IntsX(ctx context.Context) []int
- func (cs *ConsentSelect) Scan(ctx context.Context, v any) error
- func (s *ConsentSelect) ScanX(ctx context.Context, v any)
- func (s *ConsentSelect) String(ctx context.Context) (_ string, err error)
- func (s *ConsentSelect) StringX(ctx context.Context) string
- func (s *ConsentSelect) Strings(ctx context.Context) ([]string, error)
- func (s *ConsentSelect) StringsX(ctx context.Context) []string
- type ConsentUpdate
- func (cu *ConsentUpdate) Exec(ctx context.Context) error
- func (cu *ConsentUpdate) ExecX(ctx context.Context)
- func (cu *ConsentUpdate) Mutation() *ConsentMutation
- func (cu *ConsentUpdate) Save(ctx context.Context) (int, error)
- func (cu *ConsentUpdate) SaveX(ctx context.Context) int
- func (cu *ConsentUpdate) Where(ps ...predicate.Consent) *ConsentUpdate
- type ConsentUpdateOne
- func (cuo *ConsentUpdateOne) Exec(ctx context.Context) error
- func (cuo *ConsentUpdateOne) ExecX(ctx context.Context)
- func (cuo *ConsentUpdateOne) Mutation() *ConsentMutation
- func (cuo *ConsentUpdateOne) Save(ctx context.Context) (*Consent, error)
- func (cuo *ConsentUpdateOne) SaveX(ctx context.Context) *Consent
- func (cuo *ConsentUpdateOne) Select(field string, fields ...string) *ConsentUpdateOne
- func (cuo *ConsentUpdateOne) Where(ps ...predicate.Consent) *ConsentUpdateOne
- type Consents
- type ConstraintError
- type Hook
- type InterceptFunc
- type Interceptor
- type MutateFunc
- type Mutation
- type Mutator
- type NotFoundError
- type NotLoadedError
- type NotSingularError
- type Op
- type Option
- type OrderFunc
- type Policy
- type Querier
- type QuerierFunc
- type Query
- type QueryContext
- type RedirectURI
- type RedirectURIClient
- func (c *RedirectURIClient) Create() *RedirectURICreate
- func (c *RedirectURIClient) CreateBulk(builders ...*RedirectURICreate) *RedirectURICreateBulk
- func (c *RedirectURIClient) Delete() *RedirectURIDelete
- func (c *RedirectURIClient) DeleteOne(ru *RedirectURI) *RedirectURIDeleteOne
- func (c *RedirectURIClient) DeleteOneID(id typedef.RedirectURIID) *RedirectURIDeleteOne
- func (c *RedirectURIClient) Get(ctx context.Context, id typedef.RedirectURIID) (*RedirectURI, error)
- func (c *RedirectURIClient) GetX(ctx context.Context, id typedef.RedirectURIID) *RedirectURI
- func (c *RedirectURIClient) Hooks() []Hook
- func (c *RedirectURIClient) Intercept(interceptors ...Interceptor)
- func (c *RedirectURIClient) Interceptors() []Interceptor
- func (c *RedirectURIClient) MapCreateBulk(slice any, setFunc func(*RedirectURICreate, int)) *RedirectURICreateBulk
- func (c *RedirectURIClient) Query() *RedirectURIQuery
- func (c *RedirectURIClient) QueryRelyingParty(ru *RedirectURI) *RelyingPartyQuery
- func (c *RedirectURIClient) Update() *RedirectURIUpdate
- func (c *RedirectURIClient) UpdateOne(ru *RedirectURI) *RedirectURIUpdateOne
- func (c *RedirectURIClient) UpdateOneID(id typedef.RedirectURIID) *RedirectURIUpdateOne
- func (c *RedirectURIClient) Use(hooks ...Hook)
- type RedirectURICreate
- func (ruc *RedirectURICreate) Exec(ctx context.Context) error
- func (ruc *RedirectURICreate) ExecX(ctx context.Context)
- func (ruc *RedirectURICreate) Mutation() *RedirectURIMutation
- func (ruc *RedirectURICreate) Save(ctx context.Context) (*RedirectURI, error)
- func (ruc *RedirectURICreate) SaveX(ctx context.Context) *RedirectURI
- func (ruc *RedirectURICreate) SetCreatedAt(t time.Time) *RedirectURICreate
- func (ruc *RedirectURICreate) SetID(tu typedef.RedirectURIID) *RedirectURICreate
- func (ruc *RedirectURICreate) SetModifiedAt(t time.Time) *RedirectURICreate
- func (ruc *RedirectURICreate) SetNillableCreatedAt(t *time.Time) *RedirectURICreate
- func (ruc *RedirectURICreate) SetNillableModifiedAt(t *time.Time) *RedirectURICreate
- func (ruc *RedirectURICreate) SetRelyingParty(r *RelyingParty) *RedirectURICreate
- func (ruc *RedirectURICreate) SetRelyingPartyID(tpi typedef.RelyingPartyID) *RedirectURICreate
- func (ruc *RedirectURICreate) SetURI(s string) *RedirectURICreate
- type RedirectURICreateBulk
- type RedirectURIDelete
- type RedirectURIDeleteOne
- type RedirectURIEdges
- type RedirectURIGroupBy
- func (rugb *RedirectURIGroupBy) Aggregate(fns ...AggregateFunc) *RedirectURIGroupBy
- func (s *RedirectURIGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *RedirectURIGroupBy) BoolX(ctx context.Context) bool
- func (s *RedirectURIGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *RedirectURIGroupBy) BoolsX(ctx context.Context) []bool
- func (s *RedirectURIGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *RedirectURIGroupBy) Float64X(ctx context.Context) float64
- func (s *RedirectURIGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *RedirectURIGroupBy) Float64sX(ctx context.Context) []float64
- func (s *RedirectURIGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *RedirectURIGroupBy) IntX(ctx context.Context) int
- func (s *RedirectURIGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *RedirectURIGroupBy) IntsX(ctx context.Context) []int
- func (rugb *RedirectURIGroupBy) Scan(ctx context.Context, v any) error
- func (s *RedirectURIGroupBy) ScanX(ctx context.Context, v any)
- func (s *RedirectURIGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *RedirectURIGroupBy) StringX(ctx context.Context) string
- func (s *RedirectURIGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *RedirectURIGroupBy) StringsX(ctx context.Context) []string
- type RedirectURIMutation
- func (m *RedirectURIMutation) AddField(name string, value ent.Value) error
- func (m *RedirectURIMutation) AddedEdges() []string
- func (m *RedirectURIMutation) AddedField(name string) (ent.Value, bool)
- func (m *RedirectURIMutation) AddedFields() []string
- func (m *RedirectURIMutation) AddedIDs(name string) []ent.Value
- func (m *RedirectURIMutation) ClearEdge(name string) error
- func (m *RedirectURIMutation) ClearField(name string) error
- func (m *RedirectURIMutation) ClearRelyingParty()
- func (m *RedirectURIMutation) ClearedEdges() []string
- func (m *RedirectURIMutation) ClearedFields() []string
- func (m RedirectURIMutation) Client() *Client
- func (m *RedirectURIMutation) CreatedAt() (r time.Time, exists bool)
- func (m *RedirectURIMutation) EdgeCleared(name string) bool
- func (m *RedirectURIMutation) Field(name string) (ent.Value, bool)
- func (m *RedirectURIMutation) FieldCleared(name string) bool
- func (m *RedirectURIMutation) Fields() []string
- func (m *RedirectURIMutation) ID() (id typedef.RedirectURIID, exists bool)
- func (m *RedirectURIMutation) IDs(ctx context.Context) ([]typedef.RedirectURIID, error)
- func (m *RedirectURIMutation) ModifiedAt() (r time.Time, exists bool)
- func (m *RedirectURIMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *RedirectURIMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *RedirectURIMutation) OldModifiedAt(ctx context.Context) (v time.Time, err error)
- func (m *RedirectURIMutation) OldRelyingPartyID(ctx context.Context) (v typedef.RelyingPartyID, err error)
- func (m *RedirectURIMutation) OldURI(ctx context.Context) (v string, err error)
- func (m *RedirectURIMutation) Op() Op
- func (m *RedirectURIMutation) RelyingPartyCleared() bool
- func (m *RedirectURIMutation) RelyingPartyID() (r typedef.RelyingPartyID, exists bool)
- func (m *RedirectURIMutation) RelyingPartyIDs() (ids []typedef.RelyingPartyID)
- func (m *RedirectURIMutation) RemovedEdges() []string
- func (m *RedirectURIMutation) RemovedIDs(name string) []ent.Value
- func (m *RedirectURIMutation) ResetCreatedAt()
- func (m *RedirectURIMutation) ResetEdge(name string) error
- func (m *RedirectURIMutation) ResetField(name string) error
- func (m *RedirectURIMutation) ResetModifiedAt()
- func (m *RedirectURIMutation) ResetRelyingParty()
- func (m *RedirectURIMutation) ResetRelyingPartyID()
- func (m *RedirectURIMutation) ResetURI()
- func (m *RedirectURIMutation) SetCreatedAt(t time.Time)
- func (m *RedirectURIMutation) SetField(name string, value ent.Value) error
- func (m *RedirectURIMutation) SetID(id typedef.RedirectURIID)
- func (m *RedirectURIMutation) SetModifiedAt(t time.Time)
- func (m *RedirectURIMutation) SetOp(op Op)
- func (m *RedirectURIMutation) SetRelyingPartyID(tpi typedef.RelyingPartyID)
- func (m *RedirectURIMutation) SetURI(s string)
- func (m RedirectURIMutation) Tx() (*Tx, error)
- func (m *RedirectURIMutation) Type() string
- func (m *RedirectURIMutation) URI() (r string, exists bool)
- func (m *RedirectURIMutation) Where(ps ...predicate.RedirectURI)
- func (m *RedirectURIMutation) WhereP(ps ...func(*sql.Selector))
- type RedirectURIQuery
- func (ruq *RedirectURIQuery) Aggregate(fns ...AggregateFunc) *RedirectURISelect
- func (ruq *RedirectURIQuery) All(ctx context.Context) ([]*RedirectURI, error)
- func (ruq *RedirectURIQuery) AllX(ctx context.Context) []*RedirectURI
- func (ruq *RedirectURIQuery) Clone() *RedirectURIQuery
- func (ruq *RedirectURIQuery) Count(ctx context.Context) (int, error)
- func (ruq *RedirectURIQuery) CountX(ctx context.Context) int
- func (ruq *RedirectURIQuery) Exist(ctx context.Context) (bool, error)
- func (ruq *RedirectURIQuery) ExistX(ctx context.Context) bool
- func (ruq *RedirectURIQuery) First(ctx context.Context) (*RedirectURI, error)
- func (ruq *RedirectURIQuery) FirstID(ctx context.Context) (id typedef.RedirectURIID, err error)
- func (ruq *RedirectURIQuery) FirstIDX(ctx context.Context) typedef.RedirectURIID
- func (ruq *RedirectURIQuery) FirstX(ctx context.Context) *RedirectURI
- func (ruq *RedirectURIQuery) ForShare(opts ...sql.LockOption) *RedirectURIQuery
- func (ruq *RedirectURIQuery) ForUpdate(opts ...sql.LockOption) *RedirectURIQuery
- func (ruq *RedirectURIQuery) GroupBy(field string, fields ...string) *RedirectURIGroupBy
- func (ruq *RedirectURIQuery) IDs(ctx context.Context) (ids []typedef.RedirectURIID, err error)
- func (ruq *RedirectURIQuery) IDsX(ctx context.Context) []typedef.RedirectURIID
- func (ruq *RedirectURIQuery) Limit(limit int) *RedirectURIQuery
- func (ruq *RedirectURIQuery) Offset(offset int) *RedirectURIQuery
- func (ruq *RedirectURIQuery) Only(ctx context.Context) (*RedirectURI, error)
- func (ruq *RedirectURIQuery) OnlyID(ctx context.Context) (id typedef.RedirectURIID, err error)
- func (ruq *RedirectURIQuery) OnlyIDX(ctx context.Context) typedef.RedirectURIID
- func (ruq *RedirectURIQuery) OnlyX(ctx context.Context) *RedirectURI
- func (ruq *RedirectURIQuery) Order(o ...redirecturi.OrderOption) *RedirectURIQuery
- func (ruq *RedirectURIQuery) QueryRelyingParty() *RelyingPartyQuery
- func (ruq *RedirectURIQuery) Select(fields ...string) *RedirectURISelect
- func (ruq *RedirectURIQuery) Unique(unique bool) *RedirectURIQuery
- func (ruq *RedirectURIQuery) Where(ps ...predicate.RedirectURI) *RedirectURIQuery
- func (ruq *RedirectURIQuery) WithRelyingParty(opts ...func(*RelyingPartyQuery)) *RedirectURIQuery
- type RedirectURISelect
- func (rus *RedirectURISelect) Aggregate(fns ...AggregateFunc) *RedirectURISelect
- func (s *RedirectURISelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *RedirectURISelect) BoolX(ctx context.Context) bool
- func (s *RedirectURISelect) Bools(ctx context.Context) ([]bool, error)
- func (s *RedirectURISelect) BoolsX(ctx context.Context) []bool
- func (s *RedirectURISelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *RedirectURISelect) Float64X(ctx context.Context) float64
- func (s *RedirectURISelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *RedirectURISelect) Float64sX(ctx context.Context) []float64
- func (s *RedirectURISelect) Int(ctx context.Context) (_ int, err error)
- func (s *RedirectURISelect) IntX(ctx context.Context) int
- func (s *RedirectURISelect) Ints(ctx context.Context) ([]int, error)
- func (s *RedirectURISelect) IntsX(ctx context.Context) []int
- func (rus *RedirectURISelect) Scan(ctx context.Context, v any) error
- func (s *RedirectURISelect) ScanX(ctx context.Context, v any)
- func (s *RedirectURISelect) String(ctx context.Context) (_ string, err error)
- func (s *RedirectURISelect) StringX(ctx context.Context) string
- func (s *RedirectURISelect) Strings(ctx context.Context) ([]string, error)
- func (s *RedirectURISelect) StringsX(ctx context.Context) []string
- type RedirectURIUpdate
- func (ruu *RedirectURIUpdate) Exec(ctx context.Context) error
- func (ruu *RedirectURIUpdate) ExecX(ctx context.Context)
- func (ruu *RedirectURIUpdate) Mutation() *RedirectURIMutation
- func (ruu *RedirectURIUpdate) Save(ctx context.Context) (int, error)
- func (ruu *RedirectURIUpdate) SaveX(ctx context.Context) int
- func (ruu *RedirectURIUpdate) SetModifiedAt(t time.Time) *RedirectURIUpdate
- func (ruu *RedirectURIUpdate) SetNillableURI(s *string) *RedirectURIUpdate
- func (ruu *RedirectURIUpdate) SetURI(s string) *RedirectURIUpdate
- func (ruu *RedirectURIUpdate) Where(ps ...predicate.RedirectURI) *RedirectURIUpdate
- type RedirectURIUpdateOne
- func (ruuo *RedirectURIUpdateOne) Exec(ctx context.Context) error
- func (ruuo *RedirectURIUpdateOne) ExecX(ctx context.Context)
- func (ruuo *RedirectURIUpdateOne) Mutation() *RedirectURIMutation
- func (ruuo *RedirectURIUpdateOne) Save(ctx context.Context) (*RedirectURI, error)
- func (ruuo *RedirectURIUpdateOne) SaveX(ctx context.Context) *RedirectURI
- func (ruuo *RedirectURIUpdateOne) Select(field string, fields ...string) *RedirectURIUpdateOne
- func (ruuo *RedirectURIUpdateOne) SetModifiedAt(t time.Time) *RedirectURIUpdateOne
- func (ruuo *RedirectURIUpdateOne) SetNillableURI(s *string) *RedirectURIUpdateOne
- func (ruuo *RedirectURIUpdateOne) SetURI(s string) *RedirectURIUpdateOne
- func (ruuo *RedirectURIUpdateOne) Where(ps ...predicate.RedirectURI) *RedirectURIUpdateOne
- type RedirectURIs
- type RelyingParties
- type RelyingParty
- func (rp *RelyingParty) QueryAuthCodes() *AuthCodeQuery
- func (rp *RelyingParty) QueryRedirectUris() *RedirectURIQuery
- func (rp *RelyingParty) String() string
- func (rp *RelyingParty) Unwrap() *RelyingParty
- func (rp *RelyingParty) Update() *RelyingPartyUpdateOne
- func (rp *RelyingParty) Value(name string) (ent.Value, error)
- type RelyingPartyClient
- func (c *RelyingPartyClient) Create() *RelyingPartyCreate
- func (c *RelyingPartyClient) CreateBulk(builders ...*RelyingPartyCreate) *RelyingPartyCreateBulk
- func (c *RelyingPartyClient) Delete() *RelyingPartyDelete
- func (c *RelyingPartyClient) DeleteOne(rp *RelyingParty) *RelyingPartyDeleteOne
- func (c *RelyingPartyClient) DeleteOneID(id typedef.RelyingPartyID) *RelyingPartyDeleteOne
- func (c *RelyingPartyClient) Get(ctx context.Context, id typedef.RelyingPartyID) (*RelyingParty, error)
- func (c *RelyingPartyClient) GetX(ctx context.Context, id typedef.RelyingPartyID) *RelyingParty
- func (c *RelyingPartyClient) Hooks() []Hook
- func (c *RelyingPartyClient) Intercept(interceptors ...Interceptor)
- func (c *RelyingPartyClient) Interceptors() []Interceptor
- func (c *RelyingPartyClient) MapCreateBulk(slice any, setFunc func(*RelyingPartyCreate, int)) *RelyingPartyCreateBulk
- func (c *RelyingPartyClient) Query() *RelyingPartyQuery
- func (c *RelyingPartyClient) QueryAuthCodes(rp *RelyingParty) *AuthCodeQuery
- func (c *RelyingPartyClient) QueryRedirectUris(rp *RelyingParty) *RedirectURIQuery
- func (c *RelyingPartyClient) Update() *RelyingPartyUpdate
- func (c *RelyingPartyClient) UpdateOne(rp *RelyingParty) *RelyingPartyUpdateOne
- func (c *RelyingPartyClient) UpdateOneID(id typedef.RelyingPartyID) *RelyingPartyUpdateOne
- func (c *RelyingPartyClient) Use(hooks ...Hook)
- type RelyingPartyCreate
- func (rpc *RelyingPartyCreate) AddAuthCodeIDs(ids ...typedef.AuthCodeID) *RelyingPartyCreate
- func (rpc *RelyingPartyCreate) AddAuthCodes(a ...*AuthCode) *RelyingPartyCreate
- func (rpc *RelyingPartyCreate) AddRedirectURIIDs(ids ...typedef.RedirectURIID) *RelyingPartyCreate
- func (rpc *RelyingPartyCreate) AddRedirectUris(r ...*RedirectURI) *RelyingPartyCreate
- func (rpc *RelyingPartyCreate) Exec(ctx context.Context) error
- func (rpc *RelyingPartyCreate) ExecX(ctx context.Context)
- func (rpc *RelyingPartyCreate) Mutation() *RelyingPartyMutation
- func (rpc *RelyingPartyCreate) Save(ctx context.Context) (*RelyingParty, error)
- func (rpc *RelyingPartyCreate) SaveX(ctx context.Context) *RelyingParty
- func (rpc *RelyingPartyCreate) SetClientID(ti typedef.ClientID) *RelyingPartyCreate
- func (rpc *RelyingPartyCreate) SetClientSecret(s string) *RelyingPartyCreate
- func (rpc *RelyingPartyCreate) SetCreatedAt(t time.Time) *RelyingPartyCreate
- func (rpc *RelyingPartyCreate) SetID(tpi typedef.RelyingPartyID) *RelyingPartyCreate
- func (rpc *RelyingPartyCreate) SetModifiedAt(t time.Time) *RelyingPartyCreate
- func (rpc *RelyingPartyCreate) SetNillableCreatedAt(t *time.Time) *RelyingPartyCreate
- func (rpc *RelyingPartyCreate) SetNillableModifiedAt(t *time.Time) *RelyingPartyCreate
- type RelyingPartyCreateBulk
- type RelyingPartyDelete
- type RelyingPartyDeleteOne
- type RelyingPartyEdges
- type RelyingPartyGroupBy
- func (rpgb *RelyingPartyGroupBy) Aggregate(fns ...AggregateFunc) *RelyingPartyGroupBy
- func (s *RelyingPartyGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *RelyingPartyGroupBy) BoolX(ctx context.Context) bool
- func (s *RelyingPartyGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *RelyingPartyGroupBy) BoolsX(ctx context.Context) []bool
- func (s *RelyingPartyGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *RelyingPartyGroupBy) Float64X(ctx context.Context) float64
- func (s *RelyingPartyGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *RelyingPartyGroupBy) Float64sX(ctx context.Context) []float64
- func (s *RelyingPartyGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *RelyingPartyGroupBy) IntX(ctx context.Context) int
- func (s *RelyingPartyGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *RelyingPartyGroupBy) IntsX(ctx context.Context) []int
- func (rpgb *RelyingPartyGroupBy) Scan(ctx context.Context, v any) error
- func (s *RelyingPartyGroupBy) ScanX(ctx context.Context, v any)
- func (s *RelyingPartyGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *RelyingPartyGroupBy) StringX(ctx context.Context) string
- func (s *RelyingPartyGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *RelyingPartyGroupBy) StringsX(ctx context.Context) []string
- type RelyingPartyMutation
- func (m *RelyingPartyMutation) AddAuthCodeIDs(ids ...typedef.AuthCodeID)
- func (m *RelyingPartyMutation) AddField(name string, value ent.Value) error
- func (m *RelyingPartyMutation) AddRedirectURIIDs(ids ...typedef.RedirectURIID)
- func (m *RelyingPartyMutation) AddedEdges() []string
- func (m *RelyingPartyMutation) AddedField(name string) (ent.Value, bool)
- func (m *RelyingPartyMutation) AddedFields() []string
- func (m *RelyingPartyMutation) AddedIDs(name string) []ent.Value
- func (m *RelyingPartyMutation) AuthCodesCleared() bool
- func (m *RelyingPartyMutation) AuthCodesIDs() (ids []typedef.AuthCodeID)
- func (m *RelyingPartyMutation) ClearAuthCodes()
- func (m *RelyingPartyMutation) ClearEdge(name string) error
- func (m *RelyingPartyMutation) ClearField(name string) error
- func (m *RelyingPartyMutation) ClearRedirectUris()
- func (m *RelyingPartyMutation) ClearedEdges() []string
- func (m *RelyingPartyMutation) ClearedFields() []string
- func (m RelyingPartyMutation) Client() *Client
- func (m *RelyingPartyMutation) ClientID() (r typedef.ClientID, exists bool)
- func (m *RelyingPartyMutation) ClientSecret() (r string, exists bool)
- func (m *RelyingPartyMutation) CreatedAt() (r time.Time, exists bool)
- func (m *RelyingPartyMutation) EdgeCleared(name string) bool
- func (m *RelyingPartyMutation) Field(name string) (ent.Value, bool)
- func (m *RelyingPartyMutation) FieldCleared(name string) bool
- func (m *RelyingPartyMutation) Fields() []string
- func (m *RelyingPartyMutation) ID() (id typedef.RelyingPartyID, exists bool)
- func (m *RelyingPartyMutation) IDs(ctx context.Context) ([]typedef.RelyingPartyID, error)
- func (m *RelyingPartyMutation) ModifiedAt() (r time.Time, exists bool)
- func (m *RelyingPartyMutation) OldClientID(ctx context.Context) (v typedef.ClientID, err error)
- func (m *RelyingPartyMutation) OldClientSecret(ctx context.Context) (v string, err error)
- func (m *RelyingPartyMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *RelyingPartyMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *RelyingPartyMutation) OldModifiedAt(ctx context.Context) (v time.Time, err error)
- func (m *RelyingPartyMutation) Op() Op
- func (m *RelyingPartyMutation) RedirectUrisCleared() bool
- func (m *RelyingPartyMutation) RedirectUrisIDs() (ids []typedef.RedirectURIID)
- func (m *RelyingPartyMutation) RemoveAuthCodeIDs(ids ...typedef.AuthCodeID)
- func (m *RelyingPartyMutation) RemoveRedirectURIIDs(ids ...typedef.RedirectURIID)
- func (m *RelyingPartyMutation) RemovedAuthCodesIDs() (ids []typedef.AuthCodeID)
- func (m *RelyingPartyMutation) RemovedEdges() []string
- func (m *RelyingPartyMutation) RemovedIDs(name string) []ent.Value
- func (m *RelyingPartyMutation) RemovedRedirectUrisIDs() (ids []typedef.RedirectURIID)
- func (m *RelyingPartyMutation) ResetAuthCodes()
- func (m *RelyingPartyMutation) ResetClientID()
- func (m *RelyingPartyMutation) ResetClientSecret()
- func (m *RelyingPartyMutation) ResetCreatedAt()
- func (m *RelyingPartyMutation) ResetEdge(name string) error
- func (m *RelyingPartyMutation) ResetField(name string) error
- func (m *RelyingPartyMutation) ResetModifiedAt()
- func (m *RelyingPartyMutation) ResetRedirectUris()
- func (m *RelyingPartyMutation) SetClientID(ti typedef.ClientID)
- func (m *RelyingPartyMutation) SetClientSecret(s string)
- func (m *RelyingPartyMutation) SetCreatedAt(t time.Time)
- func (m *RelyingPartyMutation) SetField(name string, value ent.Value) error
- func (m *RelyingPartyMutation) SetID(id typedef.RelyingPartyID)
- func (m *RelyingPartyMutation) SetModifiedAt(t time.Time)
- func (m *RelyingPartyMutation) SetOp(op Op)
- func (m RelyingPartyMutation) Tx() (*Tx, error)
- func (m *RelyingPartyMutation) Type() string
- func (m *RelyingPartyMutation) Where(ps ...predicate.RelyingParty)
- func (m *RelyingPartyMutation) WhereP(ps ...func(*sql.Selector))
- type RelyingPartyQuery
- func (rpq *RelyingPartyQuery) Aggregate(fns ...AggregateFunc) *RelyingPartySelect
- func (rpq *RelyingPartyQuery) All(ctx context.Context) ([]*RelyingParty, error)
- func (rpq *RelyingPartyQuery) AllX(ctx context.Context) []*RelyingParty
- func (rpq *RelyingPartyQuery) Clone() *RelyingPartyQuery
- func (rpq *RelyingPartyQuery) Count(ctx context.Context) (int, error)
- func (rpq *RelyingPartyQuery) CountX(ctx context.Context) int
- func (rpq *RelyingPartyQuery) Exist(ctx context.Context) (bool, error)
- func (rpq *RelyingPartyQuery) ExistX(ctx context.Context) bool
- func (rpq *RelyingPartyQuery) First(ctx context.Context) (*RelyingParty, error)
- func (rpq *RelyingPartyQuery) FirstID(ctx context.Context) (id typedef.RelyingPartyID, err error)
- func (rpq *RelyingPartyQuery) FirstIDX(ctx context.Context) typedef.RelyingPartyID
- func (rpq *RelyingPartyQuery) FirstX(ctx context.Context) *RelyingParty
- func (rpq *RelyingPartyQuery) ForShare(opts ...sql.LockOption) *RelyingPartyQuery
- func (rpq *RelyingPartyQuery) ForUpdate(opts ...sql.LockOption) *RelyingPartyQuery
- func (rpq *RelyingPartyQuery) GroupBy(field string, fields ...string) *RelyingPartyGroupBy
- func (rpq *RelyingPartyQuery) IDs(ctx context.Context) (ids []typedef.RelyingPartyID, err error)
- func (rpq *RelyingPartyQuery) IDsX(ctx context.Context) []typedef.RelyingPartyID
- func (rpq *RelyingPartyQuery) Limit(limit int) *RelyingPartyQuery
- func (rpq *RelyingPartyQuery) Offset(offset int) *RelyingPartyQuery
- func (rpq *RelyingPartyQuery) Only(ctx context.Context) (*RelyingParty, error)
- func (rpq *RelyingPartyQuery) OnlyID(ctx context.Context) (id typedef.RelyingPartyID, err error)
- func (rpq *RelyingPartyQuery) OnlyIDX(ctx context.Context) typedef.RelyingPartyID
- func (rpq *RelyingPartyQuery) OnlyX(ctx context.Context) *RelyingParty
- func (rpq *RelyingPartyQuery) Order(o ...relyingparty.OrderOption) *RelyingPartyQuery
- func (rpq *RelyingPartyQuery) QueryAuthCodes() *AuthCodeQuery
- func (rpq *RelyingPartyQuery) QueryRedirectUris() *RedirectURIQuery
- func (rpq *RelyingPartyQuery) Select(fields ...string) *RelyingPartySelect
- func (rpq *RelyingPartyQuery) Unique(unique bool) *RelyingPartyQuery
- func (rpq *RelyingPartyQuery) Where(ps ...predicate.RelyingParty) *RelyingPartyQuery
- func (rpq *RelyingPartyQuery) WithAuthCodes(opts ...func(*AuthCodeQuery)) *RelyingPartyQuery
- func (rpq *RelyingPartyQuery) WithRedirectUris(opts ...func(*RedirectURIQuery)) *RelyingPartyQuery
- type RelyingPartySelect
- func (rps *RelyingPartySelect) Aggregate(fns ...AggregateFunc) *RelyingPartySelect
- func (s *RelyingPartySelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *RelyingPartySelect) BoolX(ctx context.Context) bool
- func (s *RelyingPartySelect) Bools(ctx context.Context) ([]bool, error)
- func (s *RelyingPartySelect) BoolsX(ctx context.Context) []bool
- func (s *RelyingPartySelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *RelyingPartySelect) Float64X(ctx context.Context) float64
- func (s *RelyingPartySelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *RelyingPartySelect) Float64sX(ctx context.Context) []float64
- func (s *RelyingPartySelect) Int(ctx context.Context) (_ int, err error)
- func (s *RelyingPartySelect) IntX(ctx context.Context) int
- func (s *RelyingPartySelect) Ints(ctx context.Context) ([]int, error)
- func (s *RelyingPartySelect) IntsX(ctx context.Context) []int
- func (rps *RelyingPartySelect) Scan(ctx context.Context, v any) error
- func (s *RelyingPartySelect) ScanX(ctx context.Context, v any)
- func (s *RelyingPartySelect) String(ctx context.Context) (_ string, err error)
- func (s *RelyingPartySelect) StringX(ctx context.Context) string
- func (s *RelyingPartySelect) Strings(ctx context.Context) ([]string, error)
- func (s *RelyingPartySelect) StringsX(ctx context.Context) []string
- type RelyingPartyUpdate
- func (rpu *RelyingPartyUpdate) AddAuthCodeIDs(ids ...typedef.AuthCodeID) *RelyingPartyUpdate
- func (rpu *RelyingPartyUpdate) AddAuthCodes(a ...*AuthCode) *RelyingPartyUpdate
- func (rpu *RelyingPartyUpdate) AddRedirectURIIDs(ids ...typedef.RedirectURIID) *RelyingPartyUpdate
- func (rpu *RelyingPartyUpdate) AddRedirectUris(r ...*RedirectURI) *RelyingPartyUpdate
- func (rpu *RelyingPartyUpdate) ClearAuthCodes() *RelyingPartyUpdate
- func (rpu *RelyingPartyUpdate) ClearRedirectUris() *RelyingPartyUpdate
- func (rpu *RelyingPartyUpdate) Exec(ctx context.Context) error
- func (rpu *RelyingPartyUpdate) ExecX(ctx context.Context)
- func (rpu *RelyingPartyUpdate) Mutation() *RelyingPartyMutation
- func (rpu *RelyingPartyUpdate) RemoveAuthCodeIDs(ids ...typedef.AuthCodeID) *RelyingPartyUpdate
- func (rpu *RelyingPartyUpdate) RemoveAuthCodes(a ...*AuthCode) *RelyingPartyUpdate
- func (rpu *RelyingPartyUpdate) RemoveRedirectURIIDs(ids ...typedef.RedirectURIID) *RelyingPartyUpdate
- func (rpu *RelyingPartyUpdate) RemoveRedirectUris(r ...*RedirectURI) *RelyingPartyUpdate
- func (rpu *RelyingPartyUpdate) Save(ctx context.Context) (int, error)
- func (rpu *RelyingPartyUpdate) SaveX(ctx context.Context) int
- func (rpu *RelyingPartyUpdate) SetClientSecret(s string) *RelyingPartyUpdate
- func (rpu *RelyingPartyUpdate) SetModifiedAt(t time.Time) *RelyingPartyUpdate
- func (rpu *RelyingPartyUpdate) SetNillableClientSecret(s *string) *RelyingPartyUpdate
- func (rpu *RelyingPartyUpdate) Where(ps ...predicate.RelyingParty) *RelyingPartyUpdate
- type RelyingPartyUpdateOne
- func (rpuo *RelyingPartyUpdateOne) AddAuthCodeIDs(ids ...typedef.AuthCodeID) *RelyingPartyUpdateOne
- func (rpuo *RelyingPartyUpdateOne) AddAuthCodes(a ...*AuthCode) *RelyingPartyUpdateOne
- func (rpuo *RelyingPartyUpdateOne) AddRedirectURIIDs(ids ...typedef.RedirectURIID) *RelyingPartyUpdateOne
- func (rpuo *RelyingPartyUpdateOne) AddRedirectUris(r ...*RedirectURI) *RelyingPartyUpdateOne
- func (rpuo *RelyingPartyUpdateOne) ClearAuthCodes() *RelyingPartyUpdateOne
- func (rpuo *RelyingPartyUpdateOne) ClearRedirectUris() *RelyingPartyUpdateOne
- func (rpuo *RelyingPartyUpdateOne) Exec(ctx context.Context) error
- func (rpuo *RelyingPartyUpdateOne) ExecX(ctx context.Context)
- func (rpuo *RelyingPartyUpdateOne) Mutation() *RelyingPartyMutation
- func (rpuo *RelyingPartyUpdateOne) RemoveAuthCodeIDs(ids ...typedef.AuthCodeID) *RelyingPartyUpdateOne
- func (rpuo *RelyingPartyUpdateOne) RemoveAuthCodes(a ...*AuthCode) *RelyingPartyUpdateOne
- func (rpuo *RelyingPartyUpdateOne) RemoveRedirectURIIDs(ids ...typedef.RedirectURIID) *RelyingPartyUpdateOne
- func (rpuo *RelyingPartyUpdateOne) RemoveRedirectUris(r ...*RedirectURI) *RelyingPartyUpdateOne
- func (rpuo *RelyingPartyUpdateOne) Save(ctx context.Context) (*RelyingParty, error)
- func (rpuo *RelyingPartyUpdateOne) SaveX(ctx context.Context) *RelyingParty
- func (rpuo *RelyingPartyUpdateOne) Select(field string, fields ...string) *RelyingPartyUpdateOne
- func (rpuo *RelyingPartyUpdateOne) SetClientSecret(s string) *RelyingPartyUpdateOne
- func (rpuo *RelyingPartyUpdateOne) SetModifiedAt(t time.Time) *RelyingPartyUpdateOne
- func (rpuo *RelyingPartyUpdateOne) SetNillableClientSecret(s *string) *RelyingPartyUpdateOne
- func (rpuo *RelyingPartyUpdateOne) Where(ps ...predicate.RelyingParty) *RelyingPartyUpdateOne
- type RollbackFunc
- type RollbackHook
- type Rollbacker
- type TraverseFunc
- type Traverser
- type Tx
- type User
- type UserClient
- func (c *UserClient) Create() *UserCreate
- func (c *UserClient) CreateBulk(builders ...*UserCreate) *UserCreateBulk
- func (c *UserClient) Delete() *UserDelete
- func (c *UserClient) DeleteOne(u *User) *UserDeleteOne
- func (c *UserClient) DeleteOneID(id typedef.UserID) *UserDeleteOne
- func (c *UserClient) Get(ctx context.Context, id typedef.UserID) (*User, error)
- func (c *UserClient) GetX(ctx context.Context, id typedef.UserID) *User
- func (c *UserClient) Hooks() []Hook
- func (c *UserClient) Intercept(interceptors ...Interceptor)
- func (c *UserClient) Interceptors() []Interceptor
- func (c *UserClient) MapCreateBulk(slice any, setFunc func(*UserCreate, int)) *UserCreateBulk
- func (c *UserClient) Query() *UserQuery
- func (c *UserClient) QueryConsents(u *User) *ConsentQuery
- func (c *UserClient) Update() *UserUpdate
- func (c *UserClient) UpdateOne(u *User) *UserUpdateOne
- func (c *UserClient) UpdateOneID(id typedef.UserID) *UserUpdateOne
- func (c *UserClient) Use(hooks ...Hook)
- type UserCreate
- func (uc *UserCreate) AddConsentIDs(ids ...typedef.ConsentID) *UserCreate
- func (uc *UserCreate) AddConsents(c ...*Consent) *UserCreate
- func (uc *UserCreate) Exec(ctx context.Context) error
- func (uc *UserCreate) ExecX(ctx context.Context)
- func (uc *UserCreate) Mutation() *UserMutation
- func (uc *UserCreate) Save(ctx context.Context) (*User, error)
- func (uc *UserCreate) SaveX(ctx context.Context) *User
- func (uc *UserCreate) SetCreatedAt(t time.Time) *UserCreate
- func (uc *UserCreate) SetID(ti typedef.UserID) *UserCreate
- func (uc *UserCreate) SetModifiedAt(t time.Time) *UserCreate
- func (uc *UserCreate) SetName(s string) *UserCreate
- func (uc *UserCreate) SetNillableCreatedAt(t *time.Time) *UserCreate
- func (uc *UserCreate) SetNillableModifiedAt(t *time.Time) *UserCreate
- func (uc *UserCreate) SetNillableTotpSecret(s *string) *UserCreate
- func (uc *UserCreate) SetPassword(s string) *UserCreate
- func (uc *UserCreate) SetTotpSecret(s string) *UserCreate
- type UserCreateBulk
- type UserDelete
- type UserDeleteOne
- type UserEdges
- type UserGroupBy
- func (ugb *UserGroupBy) Aggregate(fns ...AggregateFunc) *UserGroupBy
- func (s *UserGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *UserGroupBy) BoolX(ctx context.Context) bool
- func (s *UserGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *UserGroupBy) BoolsX(ctx context.Context) []bool
- func (s *UserGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *UserGroupBy) Float64X(ctx context.Context) float64
- func (s *UserGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *UserGroupBy) Float64sX(ctx context.Context) []float64
- func (s *UserGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *UserGroupBy) IntX(ctx context.Context) int
- func (s *UserGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *UserGroupBy) IntsX(ctx context.Context) []int
- func (ugb *UserGroupBy) Scan(ctx context.Context, v any) error
- func (s *UserGroupBy) ScanX(ctx context.Context, v any)
- func (s *UserGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *UserGroupBy) StringX(ctx context.Context) string
- func (s *UserGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *UserGroupBy) StringsX(ctx context.Context) []string
- type UserMutation
- func (m *UserMutation) AddConsentIDs(ids ...typedef.ConsentID)
- func (m *UserMutation) AddField(name string, value ent.Value) error
- func (m *UserMutation) AddedEdges() []string
- func (m *UserMutation) AddedField(name string) (ent.Value, bool)
- func (m *UserMutation) AddedFields() []string
- func (m *UserMutation) AddedIDs(name string) []ent.Value
- func (m *UserMutation) ClearConsents()
- func (m *UserMutation) ClearEdge(name string) error
- func (m *UserMutation) ClearField(name string) error
- func (m *UserMutation) ClearTotpSecret()
- func (m *UserMutation) ClearedEdges() []string
- func (m *UserMutation) ClearedFields() []string
- func (m UserMutation) Client() *Client
- func (m *UserMutation) ConsentsCleared() bool
- func (m *UserMutation) ConsentsIDs() (ids []typedef.ConsentID)
- func (m *UserMutation) CreatedAt() (r time.Time, exists bool)
- func (m *UserMutation) EdgeCleared(name string) bool
- func (m *UserMutation) Field(name string) (ent.Value, bool)
- func (m *UserMutation) FieldCleared(name string) bool
- func (m *UserMutation) Fields() []string
- func (m *UserMutation) ID() (id typedef.UserID, exists bool)
- func (m *UserMutation) IDs(ctx context.Context) ([]typedef.UserID, error)
- func (m *UserMutation) ModifiedAt() (r time.Time, exists bool)
- func (m *UserMutation) Name() (r string, exists bool)
- func (m *UserMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *UserMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *UserMutation) OldModifiedAt(ctx context.Context) (v time.Time, err error)
- func (m *UserMutation) OldName(ctx context.Context) (v string, err error)
- func (m *UserMutation) OldPassword(ctx context.Context) (v string, err error)
- func (m *UserMutation) OldTotpSecret(ctx context.Context) (v string, err error)
- func (m *UserMutation) Op() Op
- func (m *UserMutation) Password() (r string, exists bool)
- func (m *UserMutation) RemoveConsentIDs(ids ...typedef.ConsentID)
- func (m *UserMutation) RemovedConsentsIDs() (ids []typedef.ConsentID)
- func (m *UserMutation) RemovedEdges() []string
- func (m *UserMutation) RemovedIDs(name string) []ent.Value
- func (m *UserMutation) ResetConsents()
- func (m *UserMutation) ResetCreatedAt()
- func (m *UserMutation) ResetEdge(name string) error
- func (m *UserMutation) ResetField(name string) error
- func (m *UserMutation) ResetModifiedAt()
- func (m *UserMutation) ResetName()
- func (m *UserMutation) ResetPassword()
- func (m *UserMutation) ResetTotpSecret()
- func (m *UserMutation) SetCreatedAt(t time.Time)
- func (m *UserMutation) SetField(name string, value ent.Value) error
- func (m *UserMutation) SetID(id typedef.UserID)
- func (m *UserMutation) SetModifiedAt(t time.Time)
- func (m *UserMutation) SetName(s string)
- func (m *UserMutation) SetOp(op Op)
- func (m *UserMutation) SetPassword(s string)
- func (m *UserMutation) SetTotpSecret(s string)
- func (m *UserMutation) TotpSecret() (r string, exists bool)
- func (m *UserMutation) TotpSecretCleared() bool
- func (m UserMutation) Tx() (*Tx, error)
- func (m *UserMutation) Type() string
- func (m *UserMutation) Where(ps ...predicate.User)
- func (m *UserMutation) WhereP(ps ...func(*sql.Selector))
- type UserQuery
- func (uq *UserQuery) Aggregate(fns ...AggregateFunc) *UserSelect
- func (uq *UserQuery) All(ctx context.Context) ([]*User, error)
- func (uq *UserQuery) AllX(ctx context.Context) []*User
- func (uq *UserQuery) Clone() *UserQuery
- func (uq *UserQuery) Count(ctx context.Context) (int, error)
- func (uq *UserQuery) CountX(ctx context.Context) int
- func (uq *UserQuery) Exist(ctx context.Context) (bool, error)
- func (uq *UserQuery) ExistX(ctx context.Context) bool
- func (uq *UserQuery) First(ctx context.Context) (*User, error)
- func (uq *UserQuery) FirstID(ctx context.Context) (id typedef.UserID, err error)
- func (uq *UserQuery) FirstIDX(ctx context.Context) typedef.UserID
- func (uq *UserQuery) FirstX(ctx context.Context) *User
- func (uq *UserQuery) ForShare(opts ...sql.LockOption) *UserQuery
- func (uq *UserQuery) ForUpdate(opts ...sql.LockOption) *UserQuery
- func (uq *UserQuery) GroupBy(field string, fields ...string) *UserGroupBy
- func (uq *UserQuery) IDs(ctx context.Context) (ids []typedef.UserID, err error)
- func (uq *UserQuery) IDsX(ctx context.Context) []typedef.UserID
- func (uq *UserQuery) Limit(limit int) *UserQuery
- func (uq *UserQuery) Offset(offset int) *UserQuery
- func (uq *UserQuery) Only(ctx context.Context) (*User, error)
- func (uq *UserQuery) OnlyID(ctx context.Context) (id typedef.UserID, err error)
- func (uq *UserQuery) OnlyIDX(ctx context.Context) typedef.UserID
- func (uq *UserQuery) OnlyX(ctx context.Context) *User
- func (uq *UserQuery) Order(o ...user.OrderOption) *UserQuery
- func (uq *UserQuery) QueryConsents() *ConsentQuery
- func (uq *UserQuery) Select(fields ...string) *UserSelect
- func (uq *UserQuery) Unique(unique bool) *UserQuery
- func (uq *UserQuery) Where(ps ...predicate.User) *UserQuery
- func (uq *UserQuery) WithConsents(opts ...func(*ConsentQuery)) *UserQuery
- type UserSelect
- func (us *UserSelect) Aggregate(fns ...AggregateFunc) *UserSelect
- func (s *UserSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *UserSelect) BoolX(ctx context.Context) bool
- func (s *UserSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *UserSelect) BoolsX(ctx context.Context) []bool
- func (s *UserSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *UserSelect) Float64X(ctx context.Context) float64
- func (s *UserSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *UserSelect) Float64sX(ctx context.Context) []float64
- func (s *UserSelect) Int(ctx context.Context) (_ int, err error)
- func (s *UserSelect) IntX(ctx context.Context) int
- func (s *UserSelect) Ints(ctx context.Context) ([]int, error)
- func (s *UserSelect) IntsX(ctx context.Context) []int
- func (us *UserSelect) Scan(ctx context.Context, v any) error
- func (s *UserSelect) ScanX(ctx context.Context, v any)
- func (s *UserSelect) String(ctx context.Context) (_ string, err error)
- func (s *UserSelect) StringX(ctx context.Context) string
- func (s *UserSelect) Strings(ctx context.Context) ([]string, error)
- func (s *UserSelect) StringsX(ctx context.Context) []string
- type UserUpdate
- func (uu *UserUpdate) AddConsentIDs(ids ...typedef.ConsentID) *UserUpdate
- func (uu *UserUpdate) AddConsents(c ...*Consent) *UserUpdate
- func (uu *UserUpdate) ClearConsents() *UserUpdate
- func (uu *UserUpdate) ClearTotpSecret() *UserUpdate
- func (uu *UserUpdate) Exec(ctx context.Context) error
- func (uu *UserUpdate) ExecX(ctx context.Context)
- func (uu *UserUpdate) Mutation() *UserMutation
- func (uu *UserUpdate) RemoveConsentIDs(ids ...typedef.ConsentID) *UserUpdate
- func (uu *UserUpdate) RemoveConsents(c ...*Consent) *UserUpdate
- func (uu *UserUpdate) Save(ctx context.Context) (int, error)
- func (uu *UserUpdate) SaveX(ctx context.Context) int
- func (uu *UserUpdate) SetModifiedAt(t time.Time) *UserUpdate
- func (uu *UserUpdate) SetName(s string) *UserUpdate
- func (uu *UserUpdate) SetNillableName(s *string) *UserUpdate
- func (uu *UserUpdate) SetNillablePassword(s *string) *UserUpdate
- func (uu *UserUpdate) SetNillableTotpSecret(s *string) *UserUpdate
- func (uu *UserUpdate) SetPassword(s string) *UserUpdate
- func (uu *UserUpdate) SetTotpSecret(s string) *UserUpdate
- func (uu *UserUpdate) Where(ps ...predicate.User) *UserUpdate
- type UserUpdateOne
- func (uuo *UserUpdateOne) AddConsentIDs(ids ...typedef.ConsentID) *UserUpdateOne
- func (uuo *UserUpdateOne) AddConsents(c ...*Consent) *UserUpdateOne
- func (uuo *UserUpdateOne) ClearConsents() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearTotpSecret() *UserUpdateOne
- func (uuo *UserUpdateOne) Exec(ctx context.Context) error
- func (uuo *UserUpdateOne) ExecX(ctx context.Context)
- func (uuo *UserUpdateOne) Mutation() *UserMutation
- func (uuo *UserUpdateOne) RemoveConsentIDs(ids ...typedef.ConsentID) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveConsents(c ...*Consent) *UserUpdateOne
- func (uuo *UserUpdateOne) Save(ctx context.Context) (*User, error)
- func (uuo *UserUpdateOne) SaveX(ctx context.Context) *User
- func (uuo *UserUpdateOne) Select(field string, fields ...string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetModifiedAt(t time.Time) *UserUpdateOne
- func (uuo *UserUpdateOne) SetName(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableName(s *string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillablePassword(s *string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableTotpSecret(s *string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetPassword(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetTotpSecret(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) Where(ps ...predicate.User) *UserUpdateOne
- type Users
- 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. TypeAuthCode = "AuthCode" TypeConsent = "Consent" TypeRedirectURI = "RedirectURI" TypeRelyingParty = "RelyingParty" TypeUser = "User" )
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 AuthCode ¶
type AuthCode struct {
// ID of the ent.
ID typedef.AuthCodeID `json:"id,omitempty"`
// Code holds the value of the "code" field.
Code string `json:"-"`
// UserID holds the value of the "user_id" field.
UserID typedef.UserID `json:"user_id,omitempty"`
// ExpireAt holds the value of the "expire_at" field.
ExpireAt time.Time `json:"expire_at,omitempty"`
// UsedAt holds the value of the "used_at" field.
UsedAt *time.Time `json:"used_at,omitempty"`
// CreatedAt holds the value of the "created_at" field.
CreatedAt time.Time `json:"created_at,omitempty"`
// ModifiedAt holds the value of the "modified_at" field.
ModifiedAt time.Time `json:"modified_at,omitempty"`
// RelyingPartyID holds the value of the "relying_party_id" field.
RelyingPartyID typedef.RelyingPartyID `json:"relying_party_id,omitempty"`
// Edges holds the relations/edges for other nodes in the graph.
// The values are being populated by the AuthCodeQuery when eager-loading is set.
Edges AuthCodeEdges `json:"edges"`
// contains filtered or unexported fields
}
AuthCode is the model entity for the AuthCode schema.
func (*AuthCode) QueryRelyingParty ¶
func (ac *AuthCode) QueryRelyingParty() *RelyingPartyQuery
QueryRelyingParty queries the "relying_party" edge of the AuthCode entity.
func (*AuthCode) Unwrap ¶
Unwrap unwraps the AuthCode 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 (*AuthCode) Update ¶
func (ac *AuthCode) Update() *AuthCodeUpdateOne
Update returns a builder for updating this AuthCode. Note that you need to call AuthCode.Unwrap() before calling this method if this AuthCode was returned from a transaction, and the transaction was committed or rolled back.
type AuthCodeClient ¶
type AuthCodeClient struct {
// contains filtered or unexported fields
}
AuthCodeClient is a client for the AuthCode schema.
func NewAuthCodeClient ¶
func NewAuthCodeClient(c config) *AuthCodeClient
NewAuthCodeClient returns a client for the AuthCode from the given config.
func (*AuthCodeClient) Create ¶
func (c *AuthCodeClient) Create() *AuthCodeCreate
Create returns a builder for creating a AuthCode entity.
func (*AuthCodeClient) CreateBulk ¶
func (c *AuthCodeClient) CreateBulk(builders ...*AuthCodeCreate) *AuthCodeCreateBulk
CreateBulk returns a builder for creating a bulk of AuthCode entities.
func (*AuthCodeClient) Delete ¶
func (c *AuthCodeClient) Delete() *AuthCodeDelete
Delete returns a delete builder for AuthCode.
func (*AuthCodeClient) DeleteOne ¶
func (c *AuthCodeClient) DeleteOne(ac *AuthCode) *AuthCodeDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*AuthCodeClient) DeleteOneID ¶
func (c *AuthCodeClient) DeleteOneID(id typedef.AuthCodeID) *AuthCodeDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*AuthCodeClient) Get ¶
func (c *AuthCodeClient) Get(ctx context.Context, id typedef.AuthCodeID) (*AuthCode, error)
Get returns a AuthCode entity by its id.
func (*AuthCodeClient) GetX ¶
func (c *AuthCodeClient) GetX(ctx context.Context, id typedef.AuthCodeID) *AuthCode
GetX is like Get, but panics if an error occurs.
func (*AuthCodeClient) Hooks ¶
func (c *AuthCodeClient) Hooks() []Hook
Hooks returns the client hooks.
func (*AuthCodeClient) Intercept ¶
func (c *AuthCodeClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `authcode.Intercept(f(g(h())))`.
func (*AuthCodeClient) Interceptors ¶
func (c *AuthCodeClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*AuthCodeClient) MapCreateBulk ¶
func (c *AuthCodeClient) MapCreateBulk(slice any, setFunc func(*AuthCodeCreate, int)) *AuthCodeCreateBulk
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 (*AuthCodeClient) Query ¶
func (c *AuthCodeClient) Query() *AuthCodeQuery
Query returns a query builder for AuthCode.
func (*AuthCodeClient) QueryRelyingParty ¶
func (c *AuthCodeClient) QueryRelyingParty(ac *AuthCode) *RelyingPartyQuery
QueryRelyingParty queries the relying_party edge of a AuthCode.
func (*AuthCodeClient) Update ¶
func (c *AuthCodeClient) Update() *AuthCodeUpdate
Update returns an update builder for AuthCode.
func (*AuthCodeClient) UpdateOne ¶
func (c *AuthCodeClient) UpdateOne(ac *AuthCode) *AuthCodeUpdateOne
UpdateOne returns an update builder for the given entity.
func (*AuthCodeClient) UpdateOneID ¶
func (c *AuthCodeClient) UpdateOneID(id typedef.AuthCodeID) *AuthCodeUpdateOne
UpdateOneID returns an update builder for the given id.
func (*AuthCodeClient) Use ¶
func (c *AuthCodeClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `authcode.Hooks(f(g(h())))`.
type AuthCodeCreate ¶
type AuthCodeCreate struct {
// contains filtered or unexported fields
}
AuthCodeCreate is the builder for creating a AuthCode entity.
func (*AuthCodeCreate) Exec ¶
func (acc *AuthCodeCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*AuthCodeCreate) ExecX ¶
func (acc *AuthCodeCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AuthCodeCreate) Mutation ¶
func (acc *AuthCodeCreate) Mutation() *AuthCodeMutation
Mutation returns the AuthCodeMutation object of the builder.
func (*AuthCodeCreate) Save ¶
func (acc *AuthCodeCreate) Save(ctx context.Context) (*AuthCode, error)
Save creates the AuthCode in the database.
func (*AuthCodeCreate) SaveX ¶
func (acc *AuthCodeCreate) SaveX(ctx context.Context) *AuthCode
SaveX calls Save and panics if Save returns an error.
func (*AuthCodeCreate) SetCode ¶
func (acc *AuthCodeCreate) SetCode(s string) *AuthCodeCreate
SetCode sets the "code" field.
func (*AuthCodeCreate) SetCreatedAt ¶
func (acc *AuthCodeCreate) SetCreatedAt(t time.Time) *AuthCodeCreate
SetCreatedAt sets the "created_at" field.
func (*AuthCodeCreate) SetExpireAt ¶
func (acc *AuthCodeCreate) SetExpireAt(t time.Time) *AuthCodeCreate
SetExpireAt sets the "expire_at" field.
func (*AuthCodeCreate) SetID ¶
func (acc *AuthCodeCreate) SetID(tci typedef.AuthCodeID) *AuthCodeCreate
SetID sets the "id" field.
func (*AuthCodeCreate) SetModifiedAt ¶
func (acc *AuthCodeCreate) SetModifiedAt(t time.Time) *AuthCodeCreate
SetModifiedAt sets the "modified_at" field.
func (*AuthCodeCreate) SetNillableCreatedAt ¶
func (acc *AuthCodeCreate) SetNillableCreatedAt(t *time.Time) *AuthCodeCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*AuthCodeCreate) SetNillableExpireAt ¶
func (acc *AuthCodeCreate) SetNillableExpireAt(t *time.Time) *AuthCodeCreate
SetNillableExpireAt sets the "expire_at" field if the given value is not nil.
func (*AuthCodeCreate) SetNillableModifiedAt ¶
func (acc *AuthCodeCreate) SetNillableModifiedAt(t *time.Time) *AuthCodeCreate
SetNillableModifiedAt sets the "modified_at" field if the given value is not nil.
func (*AuthCodeCreate) SetNillableUsedAt ¶
func (acc *AuthCodeCreate) SetNillableUsedAt(t *time.Time) *AuthCodeCreate
SetNillableUsedAt sets the "used_at" field if the given value is not nil.
func (*AuthCodeCreate) SetRelyingParty ¶
func (acc *AuthCodeCreate) SetRelyingParty(r *RelyingParty) *AuthCodeCreate
SetRelyingParty sets the "relying_party" edge to the RelyingParty entity.
func (*AuthCodeCreate) SetRelyingPartyID ¶
func (acc *AuthCodeCreate) SetRelyingPartyID(tpi typedef.RelyingPartyID) *AuthCodeCreate
SetRelyingPartyID sets the "relying_party_id" field.
func (*AuthCodeCreate) SetUsedAt ¶
func (acc *AuthCodeCreate) SetUsedAt(t time.Time) *AuthCodeCreate
SetUsedAt sets the "used_at" field.
func (*AuthCodeCreate) SetUserID ¶
func (acc *AuthCodeCreate) SetUserID(ti typedef.UserID) *AuthCodeCreate
SetUserID sets the "user_id" field.
type AuthCodeCreateBulk ¶
type AuthCodeCreateBulk struct {
// contains filtered or unexported fields
}
AuthCodeCreateBulk is the builder for creating many AuthCode entities in bulk.
func (*AuthCodeCreateBulk) Exec ¶
func (accb *AuthCodeCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*AuthCodeCreateBulk) ExecX ¶
func (accb *AuthCodeCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type AuthCodeDelete ¶
type AuthCodeDelete struct {
// contains filtered or unexported fields
}
AuthCodeDelete is the builder for deleting a AuthCode entity.
func (*AuthCodeDelete) Exec ¶
func (acd *AuthCodeDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*AuthCodeDelete) ExecX ¶
func (acd *AuthCodeDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*AuthCodeDelete) Where ¶
func (acd *AuthCodeDelete) Where(ps ...predicate.AuthCode) *AuthCodeDelete
Where appends a list predicates to the AuthCodeDelete builder.
type AuthCodeDeleteOne ¶
type AuthCodeDeleteOne struct {
// contains filtered or unexported fields
}
AuthCodeDeleteOne is the builder for deleting a single AuthCode entity.
func (*AuthCodeDeleteOne) Exec ¶
func (acdo *AuthCodeDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*AuthCodeDeleteOne) ExecX ¶
func (acdo *AuthCodeDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AuthCodeDeleteOne) Where ¶
func (acdo *AuthCodeDeleteOne) Where(ps ...predicate.AuthCode) *AuthCodeDeleteOne
Where appends a list predicates to the AuthCodeDelete builder.
type AuthCodeEdges ¶
type AuthCodeEdges struct {
// RelyingParty holds the value of the relying_party edge.
RelyingParty *RelyingParty `json:"relying_party,omitempty"`
// contains filtered or unexported fields
}
AuthCodeEdges holds the relations/edges for other nodes in the graph.
func (AuthCodeEdges) RelyingPartyOrErr ¶
func (e AuthCodeEdges) RelyingPartyOrErr() (*RelyingParty, error)
RelyingPartyOrErr returns the RelyingParty value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type AuthCodeGroupBy ¶
type AuthCodeGroupBy struct {
// contains filtered or unexported fields
}
AuthCodeGroupBy is the group-by builder for AuthCode entities.
func (*AuthCodeGroupBy) Aggregate ¶
func (acgb *AuthCodeGroupBy) Aggregate(fns ...AggregateFunc) *AuthCodeGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*AuthCodeGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*AuthCodeGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*AuthCodeGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*AuthCodeGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*AuthCodeGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*AuthCodeGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*AuthCodeGroupBy) Scan ¶
func (acgb *AuthCodeGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*AuthCodeGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type AuthCodeMutation ¶
type AuthCodeMutation struct {
// contains filtered or unexported fields
}
AuthCodeMutation represents an operation that mutates the AuthCode nodes in the graph.
func (*AuthCodeMutation) AddField ¶
func (m *AuthCodeMutation) 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 (*AuthCodeMutation) AddUserID ¶
func (m *AuthCodeMutation) AddUserID(ti typedef.UserID)
AddUserID adds ti to the "user_id" field.
func (*AuthCodeMutation) AddedEdges ¶
func (m *AuthCodeMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*AuthCodeMutation) AddedField ¶
func (m *AuthCodeMutation) 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 (*AuthCodeMutation) AddedFields ¶
func (m *AuthCodeMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*AuthCodeMutation) AddedIDs ¶
func (m *AuthCodeMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*AuthCodeMutation) AddedUserID ¶
func (m *AuthCodeMutation) AddedUserID() (r typedef.UserID, exists bool)
AddedUserID returns the value that was added to the "user_id" field in this mutation.
func (*AuthCodeMutation) ClearEdge ¶
func (m *AuthCodeMutation) 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 (*AuthCodeMutation) ClearField ¶
func (m *AuthCodeMutation) 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 (*AuthCodeMutation) ClearRelyingParty ¶
func (m *AuthCodeMutation) ClearRelyingParty()
ClearRelyingParty clears the "relying_party" edge to the RelyingParty entity.
func (*AuthCodeMutation) ClearUsedAt ¶
func (m *AuthCodeMutation) ClearUsedAt()
ClearUsedAt clears the value of the "used_at" field.
func (*AuthCodeMutation) ClearedEdges ¶
func (m *AuthCodeMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*AuthCodeMutation) ClearedFields ¶
func (m *AuthCodeMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (AuthCodeMutation) Client ¶
func (m AuthCodeMutation) 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 (*AuthCodeMutation) Code ¶
func (m *AuthCodeMutation) Code() (r string, exists bool)
Code returns the value of the "code" field in the mutation.
func (*AuthCodeMutation) CreatedAt ¶
func (m *AuthCodeMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*AuthCodeMutation) EdgeCleared ¶
func (m *AuthCodeMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*AuthCodeMutation) ExpireAt ¶
func (m *AuthCodeMutation) ExpireAt() (r time.Time, exists bool)
ExpireAt returns the value of the "expire_at" field in the mutation.
func (*AuthCodeMutation) Field ¶
func (m *AuthCodeMutation) 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 (*AuthCodeMutation) FieldCleared ¶
func (m *AuthCodeMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*AuthCodeMutation) Fields ¶
func (m *AuthCodeMutation) 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 (*AuthCodeMutation) ID ¶
func (m *AuthCodeMutation) ID() (id typedef.AuthCodeID, 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 (*AuthCodeMutation) IDs ¶
func (m *AuthCodeMutation) IDs(ctx context.Context) ([]typedef.AuthCodeID, 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 (*AuthCodeMutation) ModifiedAt ¶
func (m *AuthCodeMutation) ModifiedAt() (r time.Time, exists bool)
ModifiedAt returns the value of the "modified_at" field in the mutation.
func (*AuthCodeMutation) OldCode ¶
func (m *AuthCodeMutation) OldCode(ctx context.Context) (v string, err error)
OldCode returns the old "code" field's value of the AuthCode entity. If the AuthCode object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*AuthCodeMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the AuthCode entity. If the AuthCode object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*AuthCodeMutation) OldExpireAt ¶
OldExpireAt returns the old "expire_at" field's value of the AuthCode entity. If the AuthCode object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*AuthCodeMutation) 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 (*AuthCodeMutation) OldModifiedAt ¶
OldModifiedAt returns the old "modified_at" field's value of the AuthCode entity. If the AuthCode object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*AuthCodeMutation) OldRelyingPartyID ¶
func (m *AuthCodeMutation) OldRelyingPartyID(ctx context.Context) (v typedef.RelyingPartyID, err error)
OldRelyingPartyID returns the old "relying_party_id" field's value of the AuthCode entity. If the AuthCode object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*AuthCodeMutation) OldUsedAt ¶
OldUsedAt returns the old "used_at" field's value of the AuthCode entity. If the AuthCode object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*AuthCodeMutation) OldUserID ¶
OldUserID returns the old "user_id" field's value of the AuthCode entity. If the AuthCode object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*AuthCodeMutation) RelyingPartyCleared ¶
func (m *AuthCodeMutation) RelyingPartyCleared() bool
RelyingPartyCleared reports if the "relying_party" edge to the RelyingParty entity was cleared.
func (*AuthCodeMutation) RelyingPartyID ¶
func (m *AuthCodeMutation) RelyingPartyID() (r typedef.RelyingPartyID, exists bool)
RelyingPartyID returns the value of the "relying_party_id" field in the mutation.
func (*AuthCodeMutation) RelyingPartyIDs ¶
func (m *AuthCodeMutation) RelyingPartyIDs() (ids []typedef.RelyingPartyID)
RelyingPartyIDs returns the "relying_party" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use RelyingPartyID instead. It exists only for internal usage by the builders.
func (*AuthCodeMutation) RemovedEdges ¶
func (m *AuthCodeMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*AuthCodeMutation) RemovedIDs ¶
func (m *AuthCodeMutation) 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 (*AuthCodeMutation) ResetCode ¶
func (m *AuthCodeMutation) ResetCode()
ResetCode resets all changes to the "code" field.
func (*AuthCodeMutation) ResetCreatedAt ¶
func (m *AuthCodeMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*AuthCodeMutation) ResetEdge ¶
func (m *AuthCodeMutation) 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 (*AuthCodeMutation) ResetExpireAt ¶
func (m *AuthCodeMutation) ResetExpireAt()
ResetExpireAt resets all changes to the "expire_at" field.
func (*AuthCodeMutation) ResetField ¶
func (m *AuthCodeMutation) 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 (*AuthCodeMutation) ResetModifiedAt ¶
func (m *AuthCodeMutation) ResetModifiedAt()
ResetModifiedAt resets all changes to the "modified_at" field.
func (*AuthCodeMutation) ResetRelyingParty ¶
func (m *AuthCodeMutation) ResetRelyingParty()
ResetRelyingParty resets all changes to the "relying_party" edge.
func (*AuthCodeMutation) ResetRelyingPartyID ¶
func (m *AuthCodeMutation) ResetRelyingPartyID()
ResetRelyingPartyID resets all changes to the "relying_party_id" field.
func (*AuthCodeMutation) ResetUsedAt ¶
func (m *AuthCodeMutation) ResetUsedAt()
ResetUsedAt resets all changes to the "used_at" field.
func (*AuthCodeMutation) ResetUserID ¶
func (m *AuthCodeMutation) ResetUserID()
ResetUserID resets all changes to the "user_id" field.
func (*AuthCodeMutation) SetCode ¶
func (m *AuthCodeMutation) SetCode(s string)
SetCode sets the "code" field.
func (*AuthCodeMutation) SetCreatedAt ¶
func (m *AuthCodeMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*AuthCodeMutation) SetExpireAt ¶
func (m *AuthCodeMutation) SetExpireAt(t time.Time)
SetExpireAt sets the "expire_at" field.
func (*AuthCodeMutation) SetField ¶
func (m *AuthCodeMutation) 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 (*AuthCodeMutation) SetID ¶
func (m *AuthCodeMutation) SetID(id typedef.AuthCodeID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of AuthCode entities.
func (*AuthCodeMutation) SetModifiedAt ¶
func (m *AuthCodeMutation) SetModifiedAt(t time.Time)
SetModifiedAt sets the "modified_at" field.
func (*AuthCodeMutation) SetOp ¶
func (m *AuthCodeMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*AuthCodeMutation) SetRelyingPartyID ¶
func (m *AuthCodeMutation) SetRelyingPartyID(tpi typedef.RelyingPartyID)
SetRelyingPartyID sets the "relying_party_id" field.
func (*AuthCodeMutation) SetUsedAt ¶
func (m *AuthCodeMutation) SetUsedAt(t time.Time)
SetUsedAt sets the "used_at" field.
func (*AuthCodeMutation) SetUserID ¶
func (m *AuthCodeMutation) SetUserID(ti typedef.UserID)
SetUserID sets the "user_id" field.
func (AuthCodeMutation) Tx ¶
func (m AuthCodeMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*AuthCodeMutation) Type ¶
func (m *AuthCodeMutation) Type() string
Type returns the node type of this mutation (AuthCode).
func (*AuthCodeMutation) UsedAt ¶
func (m *AuthCodeMutation) UsedAt() (r time.Time, exists bool)
UsedAt returns the value of the "used_at" field in the mutation.
func (*AuthCodeMutation) UsedAtCleared ¶
func (m *AuthCodeMutation) UsedAtCleared() bool
UsedAtCleared returns if the "used_at" field was cleared in this mutation.
func (*AuthCodeMutation) UserID ¶
func (m *AuthCodeMutation) UserID() (r typedef.UserID, exists bool)
UserID returns the value of the "user_id" field in the mutation.
func (*AuthCodeMutation) Where ¶
func (m *AuthCodeMutation) Where(ps ...predicate.AuthCode)
Where appends a list predicates to the AuthCodeMutation builder.
func (*AuthCodeMutation) WhereP ¶
func (m *AuthCodeMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the AuthCodeMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type AuthCodeQuery ¶
type AuthCodeQuery struct {
// contains filtered or unexported fields
}
AuthCodeQuery is the builder for querying AuthCode entities.
func (*AuthCodeQuery) Aggregate ¶
func (acq *AuthCodeQuery) Aggregate(fns ...AggregateFunc) *AuthCodeSelect
Aggregate returns a AuthCodeSelect configured with the given aggregations.
func (*AuthCodeQuery) All ¶
func (acq *AuthCodeQuery) All(ctx context.Context) ([]*AuthCode, error)
All executes the query and returns a list of AuthCodes.
func (*AuthCodeQuery) AllX ¶
func (acq *AuthCodeQuery) AllX(ctx context.Context) []*AuthCode
AllX is like All, but panics if an error occurs.
func (*AuthCodeQuery) Clone ¶
func (acq *AuthCodeQuery) Clone() *AuthCodeQuery
Clone returns a duplicate of the AuthCodeQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*AuthCodeQuery) Count ¶
func (acq *AuthCodeQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*AuthCodeQuery) CountX ¶
func (acq *AuthCodeQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*AuthCodeQuery) Exist ¶
func (acq *AuthCodeQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*AuthCodeQuery) ExistX ¶
func (acq *AuthCodeQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*AuthCodeQuery) First ¶
func (acq *AuthCodeQuery) First(ctx context.Context) (*AuthCode, error)
First returns the first AuthCode entity from the query. Returns a *NotFoundError when no AuthCode was found.
func (*AuthCodeQuery) FirstID ¶
func (acq *AuthCodeQuery) FirstID(ctx context.Context) (id typedef.AuthCodeID, err error)
FirstID returns the first AuthCode ID from the query. Returns a *NotFoundError when no AuthCode ID was found.
func (*AuthCodeQuery) FirstIDX ¶
func (acq *AuthCodeQuery) FirstIDX(ctx context.Context) typedef.AuthCodeID
FirstIDX is like FirstID, but panics if an error occurs.
func (*AuthCodeQuery) FirstX ¶
func (acq *AuthCodeQuery) FirstX(ctx context.Context) *AuthCode
FirstX is like First, but panics if an error occurs.
func (*AuthCodeQuery) ForShare ¶
func (acq *AuthCodeQuery) ForShare(opts ...sql.LockOption) *AuthCodeQuery
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 (*AuthCodeQuery) ForUpdate ¶
func (acq *AuthCodeQuery) ForUpdate(opts ...sql.LockOption) *AuthCodeQuery
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 (*AuthCodeQuery) GroupBy ¶
func (acq *AuthCodeQuery) GroupBy(field string, fields ...string) *AuthCodeGroupBy
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 {
Code string `json:"code,omitempty"`
Count int `json:"count,omitempty"`
}
client.AuthCode.Query().
GroupBy(authcode.FieldCode).
Aggregate(ent.Count()).
Scan(ctx, &v)
func (*AuthCodeQuery) IDs ¶
func (acq *AuthCodeQuery) IDs(ctx context.Context) (ids []typedef.AuthCodeID, err error)
IDs executes the query and returns a list of AuthCode IDs.
func (*AuthCodeQuery) IDsX ¶
func (acq *AuthCodeQuery) IDsX(ctx context.Context) []typedef.AuthCodeID
IDsX is like IDs, but panics if an error occurs.
func (*AuthCodeQuery) Limit ¶
func (acq *AuthCodeQuery) Limit(limit int) *AuthCodeQuery
Limit the number of records to be returned by this query.
func (*AuthCodeQuery) Offset ¶
func (acq *AuthCodeQuery) Offset(offset int) *AuthCodeQuery
Offset to start from.
func (*AuthCodeQuery) Only ¶
func (acq *AuthCodeQuery) Only(ctx context.Context) (*AuthCode, error)
Only returns a single AuthCode entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one AuthCode entity is found. Returns a *NotFoundError when no AuthCode entities are found.
func (*AuthCodeQuery) OnlyID ¶
func (acq *AuthCodeQuery) OnlyID(ctx context.Context) (id typedef.AuthCodeID, err error)
OnlyID is like Only, but returns the only AuthCode ID in the query. Returns a *NotSingularError when more than one AuthCode ID is found. Returns a *NotFoundError when no entities are found.
func (*AuthCodeQuery) OnlyIDX ¶
func (acq *AuthCodeQuery) OnlyIDX(ctx context.Context) typedef.AuthCodeID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*AuthCodeQuery) OnlyX ¶
func (acq *AuthCodeQuery) OnlyX(ctx context.Context) *AuthCode
OnlyX is like Only, but panics if an error occurs.
func (*AuthCodeQuery) Order ¶
func (acq *AuthCodeQuery) Order(o ...authcode.OrderOption) *AuthCodeQuery
Order specifies how the records should be ordered.
func (*AuthCodeQuery) QueryRelyingParty ¶
func (acq *AuthCodeQuery) QueryRelyingParty() *RelyingPartyQuery
QueryRelyingParty chains the current query on the "relying_party" edge.
func (*AuthCodeQuery) Select ¶
func (acq *AuthCodeQuery) Select(fields ...string) *AuthCodeSelect
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 {
Code string `json:"code,omitempty"`
}
client.AuthCode.Query().
Select(authcode.FieldCode).
Scan(ctx, &v)
func (*AuthCodeQuery) Unique ¶
func (acq *AuthCodeQuery) Unique(unique bool) *AuthCodeQuery
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 (*AuthCodeQuery) Where ¶
func (acq *AuthCodeQuery) Where(ps ...predicate.AuthCode) *AuthCodeQuery
Where adds a new predicate for the AuthCodeQuery builder.
func (*AuthCodeQuery) WithRelyingParty ¶
func (acq *AuthCodeQuery) WithRelyingParty(opts ...func(*RelyingPartyQuery)) *AuthCodeQuery
WithRelyingParty tells the query-builder to eager-load the nodes that are connected to the "relying_party" edge. The optional arguments are used to configure the query builder of the edge.
type AuthCodeSelect ¶
type AuthCodeSelect struct {
*AuthCodeQuery
// contains filtered or unexported fields
}
AuthCodeSelect is the builder for selecting fields of AuthCode entities.
func (*AuthCodeSelect) Aggregate ¶
func (acs *AuthCodeSelect) Aggregate(fns ...AggregateFunc) *AuthCodeSelect
Aggregate adds the given aggregation functions to the selector query.
func (*AuthCodeSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*AuthCodeSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*AuthCodeSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*AuthCodeSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*AuthCodeSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*AuthCodeSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*AuthCodeSelect) Scan ¶
func (acs *AuthCodeSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*AuthCodeSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type AuthCodeUpdate ¶
type AuthCodeUpdate struct {
// contains filtered or unexported fields
}
AuthCodeUpdate is the builder for updating AuthCode entities.
func (*AuthCodeUpdate) ClearUsedAt ¶
func (acu *AuthCodeUpdate) ClearUsedAt() *AuthCodeUpdate
ClearUsedAt clears the value of the "used_at" field.
func (*AuthCodeUpdate) Exec ¶
func (acu *AuthCodeUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*AuthCodeUpdate) ExecX ¶
func (acu *AuthCodeUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AuthCodeUpdate) Mutation ¶
func (acu *AuthCodeUpdate) Mutation() *AuthCodeMutation
Mutation returns the AuthCodeMutation object of the builder.
func (*AuthCodeUpdate) Save ¶
func (acu *AuthCodeUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*AuthCodeUpdate) SaveX ¶
func (acu *AuthCodeUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*AuthCodeUpdate) SetModifiedAt ¶
func (acu *AuthCodeUpdate) SetModifiedAt(t time.Time) *AuthCodeUpdate
SetModifiedAt sets the "modified_at" field.
func (*AuthCodeUpdate) SetNillableUsedAt ¶
func (acu *AuthCodeUpdate) SetNillableUsedAt(t *time.Time) *AuthCodeUpdate
SetNillableUsedAt sets the "used_at" field if the given value is not nil.
func (*AuthCodeUpdate) SetUsedAt ¶
func (acu *AuthCodeUpdate) SetUsedAt(t time.Time) *AuthCodeUpdate
SetUsedAt sets the "used_at" field.
func (*AuthCodeUpdate) Where ¶
func (acu *AuthCodeUpdate) Where(ps ...predicate.AuthCode) *AuthCodeUpdate
Where appends a list predicates to the AuthCodeUpdate builder.
type AuthCodeUpdateOne ¶
type AuthCodeUpdateOne struct {
// contains filtered or unexported fields
}
AuthCodeUpdateOne is the builder for updating a single AuthCode entity.
func (*AuthCodeUpdateOne) ClearUsedAt ¶
func (acuo *AuthCodeUpdateOne) ClearUsedAt() *AuthCodeUpdateOne
ClearUsedAt clears the value of the "used_at" field.
func (*AuthCodeUpdateOne) Exec ¶
func (acuo *AuthCodeUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*AuthCodeUpdateOne) ExecX ¶
func (acuo *AuthCodeUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AuthCodeUpdateOne) Mutation ¶
func (acuo *AuthCodeUpdateOne) Mutation() *AuthCodeMutation
Mutation returns the AuthCodeMutation object of the builder.
func (*AuthCodeUpdateOne) Save ¶
func (acuo *AuthCodeUpdateOne) Save(ctx context.Context) (*AuthCode, error)
Save executes the query and returns the updated AuthCode entity.
func (*AuthCodeUpdateOne) SaveX ¶
func (acuo *AuthCodeUpdateOne) SaveX(ctx context.Context) *AuthCode
SaveX is like Save, but panics if an error occurs.
func (*AuthCodeUpdateOne) Select ¶
func (acuo *AuthCodeUpdateOne) Select(field string, fields ...string) *AuthCodeUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*AuthCodeUpdateOne) SetModifiedAt ¶
func (acuo *AuthCodeUpdateOne) SetModifiedAt(t time.Time) *AuthCodeUpdateOne
SetModifiedAt sets the "modified_at" field.
func (*AuthCodeUpdateOne) SetNillableUsedAt ¶
func (acuo *AuthCodeUpdateOne) SetNillableUsedAt(t *time.Time) *AuthCodeUpdateOne
SetNillableUsedAt sets the "used_at" field if the given value is not nil.
func (*AuthCodeUpdateOne) SetUsedAt ¶
func (acuo *AuthCodeUpdateOne) SetUsedAt(t time.Time) *AuthCodeUpdateOne
SetUsedAt sets the "used_at" field.
func (*AuthCodeUpdateOne) Where ¶
func (acuo *AuthCodeUpdateOne) Where(ps ...predicate.AuthCode) *AuthCodeUpdateOne
Where appends a list predicates to the AuthCodeUpdate builder.
type Client ¶
type Client struct {
// Schema is the client for creating, migrating and dropping schema.
Schema *migrate.Schema
// AuthCode is the client for interacting with the AuthCode builders.
AuthCode *AuthCodeClient
// Consent is the client for interacting with the Consent builders.
Consent *ConsentClient
// RedirectURI is the client for interacting with the RedirectURI builders.
RedirectURI *RedirectURIClient
// RelyingParty is the client for interacting with the RelyingParty builders.
RelyingParty *RelyingPartyClient
// User is the client for interacting with the User builders.
User *UserClient
// 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(). AuthCode. Query(). Count(ctx)
func (*Client) Intercept ¶
func (c *Client) Intercept(interceptors ...Interceptor)
Intercept adds the query interceptors to all the entity clients. In order to add interceptors to a specific client, call: `client.Node.Intercept(...)`.
type CommitFunc ¶
The CommitFunc type is an adapter to allow the use of ordinary function as a Committer. If f is a function with the appropriate signature, CommitFunc(f) is a Committer that calls f.
type CommitHook ¶
CommitHook defines the "commit middleware". A function that gets a Committer and returns a Committer. For example:
hook := func(next ent.Committer) ent.Committer {
return ent.CommitFunc(func(ctx context.Context, tx *ent.Tx) error {
// Do some stuff before.
if err := next.Commit(ctx, tx); err != nil {
return err
}
// Do some stuff after.
return nil
})
}
type Consent ¶
type Consent struct {
// ID of the ent.
ID typedef.ConsentID `json:"id,omitempty"`
// ClientID holds the value of the "client_id" field.
ClientID typedef.ClientID `json:"client_id,omitempty"`
// CreatedAt holds the value of the "created_at" field.
CreatedAt time.Time `json:"created_at,omitempty"`
// UserID holds the value of the "user_id" field.
UserID typedef.UserID `json:"user_id,omitempty"`
// Edges holds the relations/edges for other nodes in the graph.
// The values are being populated by the ConsentQuery when eager-loading is set.
Edges ConsentEdges `json:"edges"`
// contains filtered or unexported fields
}
Consent is the model entity for the Consent schema.
func (*Consent) Unwrap ¶
Unwrap unwraps the Consent 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 (*Consent) Update ¶
func (c *Consent) Update() *ConsentUpdateOne
Update returns a builder for updating this Consent. Note that you need to call Consent.Unwrap() before calling this method if this Consent was returned from a transaction, and the transaction was committed or rolled back.
type ConsentClient ¶
type ConsentClient struct {
// contains filtered or unexported fields
}
ConsentClient is a client for the Consent schema.
func NewConsentClient ¶
func NewConsentClient(c config) *ConsentClient
NewConsentClient returns a client for the Consent from the given config.
func (*ConsentClient) Create ¶
func (c *ConsentClient) Create() *ConsentCreate
Create returns a builder for creating a Consent entity.
func (*ConsentClient) CreateBulk ¶
func (c *ConsentClient) CreateBulk(builders ...*ConsentCreate) *ConsentCreateBulk
CreateBulk returns a builder for creating a bulk of Consent entities.
func (*ConsentClient) Delete ¶
func (c *ConsentClient) Delete() *ConsentDelete
Delete returns a delete builder for Consent.
func (*ConsentClient) DeleteOne ¶
func (c *ConsentClient) DeleteOne(co *Consent) *ConsentDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*ConsentClient) DeleteOneID ¶
func (c *ConsentClient) DeleteOneID(id typedef.ConsentID) *ConsentDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*ConsentClient) Hooks ¶
func (c *ConsentClient) Hooks() []Hook
Hooks returns the client hooks.
func (*ConsentClient) Intercept ¶
func (c *ConsentClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `consent.Intercept(f(g(h())))`.
func (*ConsentClient) Interceptors ¶
func (c *ConsentClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*ConsentClient) MapCreateBulk ¶
func (c *ConsentClient) MapCreateBulk(slice any, setFunc func(*ConsentCreate, int)) *ConsentCreateBulk
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 (*ConsentClient) Query ¶
func (c *ConsentClient) Query() *ConsentQuery
Query returns a query builder for Consent.
func (*ConsentClient) QueryUser ¶
func (c *ConsentClient) QueryUser(co *Consent) *UserQuery
QueryUser queries the user edge of a Consent.
func (*ConsentClient) Update ¶
func (c *ConsentClient) Update() *ConsentUpdate
Update returns an update builder for Consent.
func (*ConsentClient) UpdateOne ¶
func (c *ConsentClient) UpdateOne(co *Consent) *ConsentUpdateOne
UpdateOne returns an update builder for the given entity.
func (*ConsentClient) UpdateOneID ¶
func (c *ConsentClient) UpdateOneID(id typedef.ConsentID) *ConsentUpdateOne
UpdateOneID returns an update builder for the given id.
func (*ConsentClient) Use ¶
func (c *ConsentClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `consent.Hooks(f(g(h())))`.
type ConsentCreate ¶
type ConsentCreate struct {
// contains filtered or unexported fields
}
ConsentCreate is the builder for creating a Consent entity.
func (*ConsentCreate) Exec ¶
func (cc *ConsentCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*ConsentCreate) ExecX ¶
func (cc *ConsentCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ConsentCreate) Mutation ¶
func (cc *ConsentCreate) Mutation() *ConsentMutation
Mutation returns the ConsentMutation object of the builder.
func (*ConsentCreate) Save ¶
func (cc *ConsentCreate) Save(ctx context.Context) (*Consent, error)
Save creates the Consent in the database.
func (*ConsentCreate) SaveX ¶
func (cc *ConsentCreate) SaveX(ctx context.Context) *Consent
SaveX calls Save and panics if Save returns an error.
func (*ConsentCreate) SetClientID ¶
func (cc *ConsentCreate) SetClientID(ti typedef.ClientID) *ConsentCreate
SetClientID sets the "client_id" field.
func (*ConsentCreate) SetCreatedAt ¶
func (cc *ConsentCreate) SetCreatedAt(t time.Time) *ConsentCreate
SetCreatedAt sets the "created_at" field.
func (*ConsentCreate) SetID ¶
func (cc *ConsentCreate) SetID(ti typedef.ConsentID) *ConsentCreate
SetID sets the "id" field.
func (*ConsentCreate) SetNillableCreatedAt ¶
func (cc *ConsentCreate) SetNillableCreatedAt(t *time.Time) *ConsentCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*ConsentCreate) SetUser ¶
func (cc *ConsentCreate) SetUser(u *User) *ConsentCreate
SetUser sets the "user" edge to the User entity.
func (*ConsentCreate) SetUserID ¶
func (cc *ConsentCreate) SetUserID(ti typedef.UserID) *ConsentCreate
SetUserID sets the "user_id" field.
type ConsentCreateBulk ¶
type ConsentCreateBulk struct {
// contains filtered or unexported fields
}
ConsentCreateBulk is the builder for creating many Consent entities in bulk.
func (*ConsentCreateBulk) Exec ¶
func (ccb *ConsentCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*ConsentCreateBulk) ExecX ¶
func (ccb *ConsentCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type ConsentDelete ¶
type ConsentDelete struct {
// contains filtered or unexported fields
}
ConsentDelete is the builder for deleting a Consent entity.
func (*ConsentDelete) Exec ¶
func (cd *ConsentDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*ConsentDelete) ExecX ¶
func (cd *ConsentDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*ConsentDelete) Where ¶
func (cd *ConsentDelete) Where(ps ...predicate.Consent) *ConsentDelete
Where appends a list predicates to the ConsentDelete builder.
type ConsentDeleteOne ¶
type ConsentDeleteOne struct {
// contains filtered or unexported fields
}
ConsentDeleteOne is the builder for deleting a single Consent entity.
func (*ConsentDeleteOne) Exec ¶
func (cdo *ConsentDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*ConsentDeleteOne) ExecX ¶
func (cdo *ConsentDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ConsentDeleteOne) Where ¶
func (cdo *ConsentDeleteOne) Where(ps ...predicate.Consent) *ConsentDeleteOne
Where appends a list predicates to the ConsentDelete builder.
type ConsentEdges ¶
type ConsentEdges struct {
// User holds the value of the user edge.
User *User `json:"user,omitempty"`
// contains filtered or unexported fields
}
ConsentEdges holds the relations/edges for other nodes in the graph.
func (ConsentEdges) UserOrErr ¶
func (e ConsentEdges) UserOrErr() (*User, error)
UserOrErr returns the User value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type ConsentGroupBy ¶
type ConsentGroupBy struct {
// contains filtered or unexported fields
}
ConsentGroupBy is the group-by builder for Consent entities.
func (*ConsentGroupBy) Aggregate ¶
func (cgb *ConsentGroupBy) Aggregate(fns ...AggregateFunc) *ConsentGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*ConsentGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ConsentGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ConsentGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ConsentGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ConsentGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ConsentGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ConsentGroupBy) Scan ¶
func (cgb *ConsentGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ConsentGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ConsentMutation ¶
type ConsentMutation struct {
// contains filtered or unexported fields
}
ConsentMutation represents an operation that mutates the Consent nodes in the graph.
func (*ConsentMutation) AddField ¶
func (m *ConsentMutation) 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 (*ConsentMutation) AddedEdges ¶
func (m *ConsentMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*ConsentMutation) AddedField ¶
func (m *ConsentMutation) 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 (*ConsentMutation) AddedFields ¶
func (m *ConsentMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*ConsentMutation) AddedIDs ¶
func (m *ConsentMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*ConsentMutation) ClearEdge ¶
func (m *ConsentMutation) 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 (*ConsentMutation) ClearField ¶
func (m *ConsentMutation) 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 (*ConsentMutation) ClearUser ¶
func (m *ConsentMutation) ClearUser()
ClearUser clears the "user" edge to the User entity.
func (*ConsentMutation) ClearedEdges ¶
func (m *ConsentMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*ConsentMutation) ClearedFields ¶
func (m *ConsentMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (ConsentMutation) Client ¶
func (m ConsentMutation) 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 (*ConsentMutation) ClientID ¶
func (m *ConsentMutation) ClientID() (r typedef.ClientID, exists bool)
ClientID returns the value of the "client_id" field in the mutation.
func (*ConsentMutation) CreatedAt ¶
func (m *ConsentMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*ConsentMutation) EdgeCleared ¶
func (m *ConsentMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*ConsentMutation) Field ¶
func (m *ConsentMutation) 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 (*ConsentMutation) FieldCleared ¶
func (m *ConsentMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*ConsentMutation) Fields ¶
func (m *ConsentMutation) 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 (*ConsentMutation) ID ¶
func (m *ConsentMutation) ID() (id typedef.ConsentID, 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 (*ConsentMutation) 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 (*ConsentMutation) OldClientID ¶
OldClientID returns the old "client_id" field's value of the Consent entity. If the Consent object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*ConsentMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the Consent entity. If the Consent object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*ConsentMutation) 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 (*ConsentMutation) OldUserID ¶
OldUserID returns the old "user_id" field's value of the Consent entity. If the Consent object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*ConsentMutation) RemovedEdges ¶
func (m *ConsentMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*ConsentMutation) RemovedIDs ¶
func (m *ConsentMutation) 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 (*ConsentMutation) ResetClientID ¶
func (m *ConsentMutation) ResetClientID()
ResetClientID resets all changes to the "client_id" field.
func (*ConsentMutation) ResetCreatedAt ¶
func (m *ConsentMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*ConsentMutation) ResetEdge ¶
func (m *ConsentMutation) 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 (*ConsentMutation) ResetField ¶
func (m *ConsentMutation) 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 (*ConsentMutation) ResetUser ¶
func (m *ConsentMutation) ResetUser()
ResetUser resets all changes to the "user" edge.
func (*ConsentMutation) ResetUserID ¶
func (m *ConsentMutation) ResetUserID()
ResetUserID resets all changes to the "user_id" field.
func (*ConsentMutation) SetClientID ¶
func (m *ConsentMutation) SetClientID(ti typedef.ClientID)
SetClientID sets the "client_id" field.
func (*ConsentMutation) SetCreatedAt ¶
func (m *ConsentMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*ConsentMutation) SetField ¶
func (m *ConsentMutation) 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 (*ConsentMutation) SetID ¶
func (m *ConsentMutation) SetID(id typedef.ConsentID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Consent entities.
func (*ConsentMutation) SetOp ¶
func (m *ConsentMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*ConsentMutation) SetUserID ¶
func (m *ConsentMutation) SetUserID(ti typedef.UserID)
SetUserID sets the "user_id" field.
func (ConsentMutation) Tx ¶
func (m ConsentMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*ConsentMutation) Type ¶
func (m *ConsentMutation) Type() string
Type returns the node type of this mutation (Consent).
func (*ConsentMutation) UserCleared ¶
func (m *ConsentMutation) UserCleared() bool
UserCleared reports if the "user" edge to the User entity was cleared.
func (*ConsentMutation) UserID ¶
func (m *ConsentMutation) UserID() (r typedef.UserID, exists bool)
UserID returns the value of the "user_id" field in the mutation.
func (*ConsentMutation) UserIDs ¶
func (m *ConsentMutation) UserIDs() (ids []typedef.UserID)
UserIDs returns the "user" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use UserID instead. It exists only for internal usage by the builders.
func (*ConsentMutation) Where ¶
func (m *ConsentMutation) Where(ps ...predicate.Consent)
Where appends a list predicates to the ConsentMutation builder.
func (*ConsentMutation) WhereP ¶
func (m *ConsentMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the ConsentMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type ConsentQuery ¶
type ConsentQuery struct {
// contains filtered or unexported fields
}
ConsentQuery is the builder for querying Consent entities.
func (*ConsentQuery) Aggregate ¶
func (cq *ConsentQuery) Aggregate(fns ...AggregateFunc) *ConsentSelect
Aggregate returns a ConsentSelect configured with the given aggregations.
func (*ConsentQuery) All ¶
func (cq *ConsentQuery) All(ctx context.Context) ([]*Consent, error)
All executes the query and returns a list of Consents.
func (*ConsentQuery) AllX ¶
func (cq *ConsentQuery) AllX(ctx context.Context) []*Consent
AllX is like All, but panics if an error occurs.
func (*ConsentQuery) Clone ¶
func (cq *ConsentQuery) Clone() *ConsentQuery
Clone returns a duplicate of the ConsentQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*ConsentQuery) Count ¶
func (cq *ConsentQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*ConsentQuery) CountX ¶
func (cq *ConsentQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*ConsentQuery) Exist ¶
func (cq *ConsentQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*ConsentQuery) ExistX ¶
func (cq *ConsentQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*ConsentQuery) First ¶
func (cq *ConsentQuery) First(ctx context.Context) (*Consent, error)
First returns the first Consent entity from the query. Returns a *NotFoundError when no Consent was found.
func (*ConsentQuery) FirstID ¶
FirstID returns the first Consent ID from the query. Returns a *NotFoundError when no Consent ID was found.
func (*ConsentQuery) FirstIDX ¶
func (cq *ConsentQuery) FirstIDX(ctx context.Context) typedef.ConsentID
FirstIDX is like FirstID, but panics if an error occurs.
func (*ConsentQuery) FirstX ¶
func (cq *ConsentQuery) FirstX(ctx context.Context) *Consent
FirstX is like First, but panics if an error occurs.
func (*ConsentQuery) ForShare ¶
func (cq *ConsentQuery) ForShare(opts ...sql.LockOption) *ConsentQuery
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 (*ConsentQuery) ForUpdate ¶
func (cq *ConsentQuery) ForUpdate(opts ...sql.LockOption) *ConsentQuery
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 (*ConsentQuery) GroupBy ¶
func (cq *ConsentQuery) GroupBy(field string, fields ...string) *ConsentGroupBy
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 {
ClientID typedef.ClientID `json:"client_id,omitempty"`
Count int `json:"count,omitempty"`
}
client.Consent.Query().
GroupBy(consent.FieldClientID).
Aggregate(ent.Count()).
Scan(ctx, &v)
func (*ConsentQuery) IDsX ¶
func (cq *ConsentQuery) IDsX(ctx context.Context) []typedef.ConsentID
IDsX is like IDs, but panics if an error occurs.
func (*ConsentQuery) Limit ¶
func (cq *ConsentQuery) Limit(limit int) *ConsentQuery
Limit the number of records to be returned by this query.
func (*ConsentQuery) Offset ¶
func (cq *ConsentQuery) Offset(offset int) *ConsentQuery
Offset to start from.
func (*ConsentQuery) Only ¶
func (cq *ConsentQuery) Only(ctx context.Context) (*Consent, error)
Only returns a single Consent entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Consent entity is found. Returns a *NotFoundError when no Consent entities are found.
func (*ConsentQuery) OnlyID ¶
OnlyID is like Only, but returns the only Consent ID in the query. Returns a *NotSingularError when more than one Consent ID is found. Returns a *NotFoundError when no entities are found.
func (*ConsentQuery) OnlyIDX ¶
func (cq *ConsentQuery) OnlyIDX(ctx context.Context) typedef.ConsentID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*ConsentQuery) OnlyX ¶
func (cq *ConsentQuery) OnlyX(ctx context.Context) *Consent
OnlyX is like Only, but panics if an error occurs.
func (*ConsentQuery) Order ¶
func (cq *ConsentQuery) Order(o ...consent.OrderOption) *ConsentQuery
Order specifies how the records should be ordered.
func (*ConsentQuery) QueryUser ¶
func (cq *ConsentQuery) QueryUser() *UserQuery
QueryUser chains the current query on the "user" edge.
func (*ConsentQuery) Select ¶
func (cq *ConsentQuery) Select(fields ...string) *ConsentSelect
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 {
ClientID typedef.ClientID `json:"client_id,omitempty"`
}
client.Consent.Query().
Select(consent.FieldClientID).
Scan(ctx, &v)
func (*ConsentQuery) Unique ¶
func (cq *ConsentQuery) Unique(unique bool) *ConsentQuery
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 (*ConsentQuery) Where ¶
func (cq *ConsentQuery) Where(ps ...predicate.Consent) *ConsentQuery
Where adds a new predicate for the ConsentQuery builder.
func (*ConsentQuery) WithUser ¶
func (cq *ConsentQuery) WithUser(opts ...func(*UserQuery)) *ConsentQuery
WithUser tells the query-builder to eager-load the nodes that are connected to the "user" edge. The optional arguments are used to configure the query builder of the edge.
type ConsentSelect ¶
type ConsentSelect struct {
*ConsentQuery
// contains filtered or unexported fields
}
ConsentSelect is the builder for selecting fields of Consent entities.
func (*ConsentSelect) Aggregate ¶
func (cs *ConsentSelect) Aggregate(fns ...AggregateFunc) *ConsentSelect
Aggregate adds the given aggregation functions to the selector query.
func (*ConsentSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ConsentSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ConsentSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ConsentSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ConsentSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ConsentSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ConsentSelect) Scan ¶
func (cs *ConsentSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ConsentSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ConsentUpdate ¶
type ConsentUpdate struct {
// contains filtered or unexported fields
}
ConsentUpdate is the builder for updating Consent entities.
func (*ConsentUpdate) Exec ¶
func (cu *ConsentUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*ConsentUpdate) ExecX ¶
func (cu *ConsentUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ConsentUpdate) Mutation ¶
func (cu *ConsentUpdate) Mutation() *ConsentMutation
Mutation returns the ConsentMutation object of the builder.
func (*ConsentUpdate) Save ¶
func (cu *ConsentUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*ConsentUpdate) SaveX ¶
func (cu *ConsentUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*ConsentUpdate) Where ¶
func (cu *ConsentUpdate) Where(ps ...predicate.Consent) *ConsentUpdate
Where appends a list predicates to the ConsentUpdate builder.
type ConsentUpdateOne ¶
type ConsentUpdateOne struct {
// contains filtered or unexported fields
}
ConsentUpdateOne is the builder for updating a single Consent entity.
func (*ConsentUpdateOne) Exec ¶
func (cuo *ConsentUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*ConsentUpdateOne) ExecX ¶
func (cuo *ConsentUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ConsentUpdateOne) Mutation ¶
func (cuo *ConsentUpdateOne) Mutation() *ConsentMutation
Mutation returns the ConsentMutation object of the builder.
func (*ConsentUpdateOne) Save ¶
func (cuo *ConsentUpdateOne) Save(ctx context.Context) (*Consent, error)
Save executes the query and returns the updated Consent entity.
func (*ConsentUpdateOne) SaveX ¶
func (cuo *ConsentUpdateOne) SaveX(ctx context.Context) *Consent
SaveX is like Save, but panics if an error occurs.
func (*ConsentUpdateOne) Select ¶
func (cuo *ConsentUpdateOne) Select(field string, fields ...string) *ConsentUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*ConsentUpdateOne) Where ¶
func (cuo *ConsentUpdateOne) Where(ps ...predicate.Consent) *ConsentUpdateOne
Where appends a list predicates to the ConsentUpdate builder.
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 InterceptFunc ¶
type InterceptFunc = ent.InterceptFunc
ent aliases to avoid import conflicts in user's code.
type Interceptor ¶
type Interceptor = ent.Interceptor
ent aliases to avoid import conflicts in user's code.
type MutateFunc ¶
type MutateFunc = ent.MutateFunc
ent aliases to avoid import conflicts in user's code.
type NotFoundError ¶
type NotFoundError struct {
// contains filtered or unexported fields
}
NotFoundError returns when trying to fetch a specific entity and it was not found in the database.
func (*NotFoundError) Error ¶
func (e *NotFoundError) Error() string
Error implements the error interface.
type NotLoadedError ¶
type NotLoadedError struct {
// contains filtered or unexported fields
}
NotLoadedError returns when trying to get a node that was not loaded by the query.
func (*NotLoadedError) Error ¶
func (e *NotLoadedError) Error() string
Error implements the error interface.
type NotSingularError ¶
type NotSingularError struct {
// contains filtered or unexported fields
}
NotSingularError returns when trying to fetch a singular entity and more then one was found in the database.
func (*NotSingularError) Error ¶
func (e *NotSingularError) Error() string
Error implements the error interface.
type OrderFunc ¶
OrderFunc applies an ordering on the sql selector. Deprecated: Use Asc/Desc functions or the package builders instead.
type QuerierFunc ¶
type QuerierFunc = ent.QuerierFunc
ent aliases to avoid import conflicts in user's code.
type QueryContext ¶
type QueryContext = ent.QueryContext
ent aliases to avoid import conflicts in user's code.
type RedirectURI ¶
type RedirectURI struct {
// ID of the ent.
ID typedef.RedirectURIID `json:"id,omitempty"`
// URI holds the value of the "uri" field.
URI string `json:"uri,omitempty"`
// CreatedAt holds the value of the "created_at" field.
CreatedAt time.Time `json:"created_at,omitempty"`
// ModifiedAt holds the value of the "modified_at" field.
ModifiedAt time.Time `json:"modified_at,omitempty"`
// RelyingPartyID holds the value of the "relying_party_id" field.
RelyingPartyID typedef.RelyingPartyID `json:"relying_party_id,omitempty"`
// Edges holds the relations/edges for other nodes in the graph.
// The values are being populated by the RedirectURIQuery when eager-loading is set.
Edges RedirectURIEdges `json:"edges"`
// contains filtered or unexported fields
}
RedirectURI is the model entity for the RedirectURI schema.
func (*RedirectURI) QueryRelyingParty ¶
func (ru *RedirectURI) QueryRelyingParty() *RelyingPartyQuery
QueryRelyingParty queries the "relying_party" edge of the RedirectURI entity.
func (*RedirectURI) String ¶
func (ru *RedirectURI) String() string
String implements the fmt.Stringer.
func (*RedirectURI) Unwrap ¶
func (ru *RedirectURI) Unwrap() *RedirectURI
Unwrap unwraps the RedirectURI 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 (*RedirectURI) Update ¶
func (ru *RedirectURI) Update() *RedirectURIUpdateOne
Update returns a builder for updating this RedirectURI. Note that you need to call RedirectURI.Unwrap() before calling this method if this RedirectURI was returned from a transaction, and the transaction was committed or rolled back.
type RedirectURIClient ¶
type RedirectURIClient struct {
// contains filtered or unexported fields
}
RedirectURIClient is a client for the RedirectURI schema.
func NewRedirectURIClient ¶
func NewRedirectURIClient(c config) *RedirectURIClient
NewRedirectURIClient returns a client for the RedirectURI from the given config.
func (*RedirectURIClient) Create ¶
func (c *RedirectURIClient) Create() *RedirectURICreate
Create returns a builder for creating a RedirectURI entity.
func (*RedirectURIClient) CreateBulk ¶
func (c *RedirectURIClient) CreateBulk(builders ...*RedirectURICreate) *RedirectURICreateBulk
CreateBulk returns a builder for creating a bulk of RedirectURI entities.
func (*RedirectURIClient) Delete ¶
func (c *RedirectURIClient) Delete() *RedirectURIDelete
Delete returns a delete builder for RedirectURI.
func (*RedirectURIClient) DeleteOne ¶
func (c *RedirectURIClient) DeleteOne(ru *RedirectURI) *RedirectURIDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*RedirectURIClient) DeleteOneID ¶
func (c *RedirectURIClient) DeleteOneID(id typedef.RedirectURIID) *RedirectURIDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*RedirectURIClient) Get ¶
func (c *RedirectURIClient) Get(ctx context.Context, id typedef.RedirectURIID) (*RedirectURI, error)
Get returns a RedirectURI entity by its id.
func (*RedirectURIClient) GetX ¶
func (c *RedirectURIClient) GetX(ctx context.Context, id typedef.RedirectURIID) *RedirectURI
GetX is like Get, but panics if an error occurs.
func (*RedirectURIClient) Hooks ¶
func (c *RedirectURIClient) Hooks() []Hook
Hooks returns the client hooks.
func (*RedirectURIClient) Intercept ¶
func (c *RedirectURIClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `redirecturi.Intercept(f(g(h())))`.
func (*RedirectURIClient) Interceptors ¶
func (c *RedirectURIClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*RedirectURIClient) MapCreateBulk ¶
func (c *RedirectURIClient) MapCreateBulk(slice any, setFunc func(*RedirectURICreate, int)) *RedirectURICreateBulk
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 (*RedirectURIClient) Query ¶
func (c *RedirectURIClient) Query() *RedirectURIQuery
Query returns a query builder for RedirectURI.
func (*RedirectURIClient) QueryRelyingParty ¶
func (c *RedirectURIClient) QueryRelyingParty(ru *RedirectURI) *RelyingPartyQuery
QueryRelyingParty queries the relying_party edge of a RedirectURI.
func (*RedirectURIClient) Update ¶
func (c *RedirectURIClient) Update() *RedirectURIUpdate
Update returns an update builder for RedirectURI.
func (*RedirectURIClient) UpdateOne ¶
func (c *RedirectURIClient) UpdateOne(ru *RedirectURI) *RedirectURIUpdateOne
UpdateOne returns an update builder for the given entity.
func (*RedirectURIClient) UpdateOneID ¶
func (c *RedirectURIClient) UpdateOneID(id typedef.RedirectURIID) *RedirectURIUpdateOne
UpdateOneID returns an update builder for the given id.
func (*RedirectURIClient) Use ¶
func (c *RedirectURIClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `redirecturi.Hooks(f(g(h())))`.
type RedirectURICreate ¶
type RedirectURICreate struct {
// contains filtered or unexported fields
}
RedirectURICreate is the builder for creating a RedirectURI entity.
func (*RedirectURICreate) Exec ¶
func (ruc *RedirectURICreate) Exec(ctx context.Context) error
Exec executes the query.
func (*RedirectURICreate) ExecX ¶
func (ruc *RedirectURICreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*RedirectURICreate) Mutation ¶
func (ruc *RedirectURICreate) Mutation() *RedirectURIMutation
Mutation returns the RedirectURIMutation object of the builder.
func (*RedirectURICreate) Save ¶
func (ruc *RedirectURICreate) Save(ctx context.Context) (*RedirectURI, error)
Save creates the RedirectURI in the database.
func (*RedirectURICreate) SaveX ¶
func (ruc *RedirectURICreate) SaveX(ctx context.Context) *RedirectURI
SaveX calls Save and panics if Save returns an error.
func (*RedirectURICreate) SetCreatedAt ¶
func (ruc *RedirectURICreate) SetCreatedAt(t time.Time) *RedirectURICreate
SetCreatedAt sets the "created_at" field.
func (*RedirectURICreate) SetID ¶
func (ruc *RedirectURICreate) SetID(tu typedef.RedirectURIID) *RedirectURICreate
SetID sets the "id" field.
func (*RedirectURICreate) SetModifiedAt ¶
func (ruc *RedirectURICreate) SetModifiedAt(t time.Time) *RedirectURICreate
SetModifiedAt sets the "modified_at" field.
func (*RedirectURICreate) SetNillableCreatedAt ¶
func (ruc *RedirectURICreate) SetNillableCreatedAt(t *time.Time) *RedirectURICreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*RedirectURICreate) SetNillableModifiedAt ¶
func (ruc *RedirectURICreate) SetNillableModifiedAt(t *time.Time) *RedirectURICreate
SetNillableModifiedAt sets the "modified_at" field if the given value is not nil.
func (*RedirectURICreate) SetRelyingParty ¶
func (ruc *RedirectURICreate) SetRelyingParty(r *RelyingParty) *RedirectURICreate
SetRelyingParty sets the "relying_party" edge to the RelyingParty entity.
func (*RedirectURICreate) SetRelyingPartyID ¶
func (ruc *RedirectURICreate) SetRelyingPartyID(tpi typedef.RelyingPartyID) *RedirectURICreate
SetRelyingPartyID sets the "relying_party_id" field.
func (*RedirectURICreate) SetURI ¶
func (ruc *RedirectURICreate) SetURI(s string) *RedirectURICreate
SetURI sets the "uri" field.
type RedirectURICreateBulk ¶
type RedirectURICreateBulk struct {
// contains filtered or unexported fields
}
RedirectURICreateBulk is the builder for creating many RedirectURI entities in bulk.
func (*RedirectURICreateBulk) Exec ¶
func (rucb *RedirectURICreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*RedirectURICreateBulk) ExecX ¶
func (rucb *RedirectURICreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*RedirectURICreateBulk) Save ¶
func (rucb *RedirectURICreateBulk) Save(ctx context.Context) ([]*RedirectURI, error)
Save creates the RedirectURI entities in the database.
func (*RedirectURICreateBulk) SaveX ¶
func (rucb *RedirectURICreateBulk) SaveX(ctx context.Context) []*RedirectURI
SaveX is like Save, but panics if an error occurs.
type RedirectURIDelete ¶
type RedirectURIDelete struct {
// contains filtered or unexported fields
}
RedirectURIDelete is the builder for deleting a RedirectURI entity.
func (*RedirectURIDelete) Exec ¶
func (rud *RedirectURIDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*RedirectURIDelete) ExecX ¶
func (rud *RedirectURIDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*RedirectURIDelete) Where ¶
func (rud *RedirectURIDelete) Where(ps ...predicate.RedirectURI) *RedirectURIDelete
Where appends a list predicates to the RedirectURIDelete builder.
type RedirectURIDeleteOne ¶
type RedirectURIDeleteOne struct {
// contains filtered or unexported fields
}
RedirectURIDeleteOne is the builder for deleting a single RedirectURI entity.
func (*RedirectURIDeleteOne) Exec ¶
func (rudo *RedirectURIDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*RedirectURIDeleteOne) ExecX ¶
func (rudo *RedirectURIDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*RedirectURIDeleteOne) Where ¶
func (rudo *RedirectURIDeleteOne) Where(ps ...predicate.RedirectURI) *RedirectURIDeleteOne
Where appends a list predicates to the RedirectURIDelete builder.
type RedirectURIEdges ¶
type RedirectURIEdges struct {
// RelyingParty holds the value of the relying_party edge.
RelyingParty *RelyingParty `json:"relying_party,omitempty"`
// contains filtered or unexported fields
}
RedirectURIEdges holds the relations/edges for other nodes in the graph.
func (RedirectURIEdges) RelyingPartyOrErr ¶
func (e RedirectURIEdges) RelyingPartyOrErr() (*RelyingParty, error)
RelyingPartyOrErr returns the RelyingParty value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type RedirectURIGroupBy ¶
type RedirectURIGroupBy struct {
// contains filtered or unexported fields
}
RedirectURIGroupBy is the group-by builder for RedirectURI entities.
func (*RedirectURIGroupBy) Aggregate ¶
func (rugb *RedirectURIGroupBy) Aggregate(fns ...AggregateFunc) *RedirectURIGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*RedirectURIGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*RedirectURIGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*RedirectURIGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*RedirectURIGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*RedirectURIGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*RedirectURIGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*RedirectURIGroupBy) Scan ¶
func (rugb *RedirectURIGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*RedirectURIGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type RedirectURIMutation ¶
type RedirectURIMutation struct {
// contains filtered or unexported fields
}
RedirectURIMutation represents an operation that mutates the RedirectURI nodes in the graph.
func (*RedirectURIMutation) AddField ¶
func (m *RedirectURIMutation) 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 (*RedirectURIMutation) AddedEdges ¶
func (m *RedirectURIMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*RedirectURIMutation) AddedField ¶
func (m *RedirectURIMutation) 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 (*RedirectURIMutation) AddedFields ¶
func (m *RedirectURIMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*RedirectURIMutation) AddedIDs ¶
func (m *RedirectURIMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*RedirectURIMutation) ClearEdge ¶
func (m *RedirectURIMutation) 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 (*RedirectURIMutation) ClearField ¶
func (m *RedirectURIMutation) 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 (*RedirectURIMutation) ClearRelyingParty ¶
func (m *RedirectURIMutation) ClearRelyingParty()
ClearRelyingParty clears the "relying_party" edge to the RelyingParty entity.
func (*RedirectURIMutation) ClearedEdges ¶
func (m *RedirectURIMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*RedirectURIMutation) ClearedFields ¶
func (m *RedirectURIMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (RedirectURIMutation) Client ¶
func (m RedirectURIMutation) 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 (*RedirectURIMutation) CreatedAt ¶
func (m *RedirectURIMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*RedirectURIMutation) EdgeCleared ¶
func (m *RedirectURIMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*RedirectURIMutation) Field ¶
func (m *RedirectURIMutation) 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 (*RedirectURIMutation) FieldCleared ¶
func (m *RedirectURIMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*RedirectURIMutation) Fields ¶
func (m *RedirectURIMutation) 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 (*RedirectURIMutation) ID ¶
func (m *RedirectURIMutation) ID() (id typedef.RedirectURIID, 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 (*RedirectURIMutation) IDs ¶
func (m *RedirectURIMutation) IDs(ctx context.Context) ([]typedef.RedirectURIID, 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 (*RedirectURIMutation) ModifiedAt ¶
func (m *RedirectURIMutation) ModifiedAt() (r time.Time, exists bool)
ModifiedAt returns the value of the "modified_at" field in the mutation.
func (*RedirectURIMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the RedirectURI entity. If the RedirectURI object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*RedirectURIMutation) 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 (*RedirectURIMutation) OldModifiedAt ¶
OldModifiedAt returns the old "modified_at" field's value of the RedirectURI entity. If the RedirectURI object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*RedirectURIMutation) OldRelyingPartyID ¶
func (m *RedirectURIMutation) OldRelyingPartyID(ctx context.Context) (v typedef.RelyingPartyID, err error)
OldRelyingPartyID returns the old "relying_party_id" field's value of the RedirectURI entity. If the RedirectURI object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*RedirectURIMutation) OldURI ¶
func (m *RedirectURIMutation) OldURI(ctx context.Context) (v string, err error)
OldURI returns the old "uri" field's value of the RedirectURI entity. If the RedirectURI object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*RedirectURIMutation) Op ¶
func (m *RedirectURIMutation) Op() Op
Op returns the operation name.
func (*RedirectURIMutation) RelyingPartyCleared ¶
func (m *RedirectURIMutation) RelyingPartyCleared() bool
RelyingPartyCleared reports if the "relying_party" edge to the RelyingParty entity was cleared.
func (*RedirectURIMutation) RelyingPartyID ¶
func (m *RedirectURIMutation) RelyingPartyID() (r typedef.RelyingPartyID, exists bool)
RelyingPartyID returns the value of the "relying_party_id" field in the mutation.
func (*RedirectURIMutation) RelyingPartyIDs ¶
func (m *RedirectURIMutation) RelyingPartyIDs() (ids []typedef.RelyingPartyID)
RelyingPartyIDs returns the "relying_party" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use RelyingPartyID instead. It exists only for internal usage by the builders.
func (*RedirectURIMutation) RemovedEdges ¶
func (m *RedirectURIMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*RedirectURIMutation) RemovedIDs ¶
func (m *RedirectURIMutation) 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 (*RedirectURIMutation) ResetCreatedAt ¶
func (m *RedirectURIMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*RedirectURIMutation) ResetEdge ¶
func (m *RedirectURIMutation) 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 (*RedirectURIMutation) ResetField ¶
func (m *RedirectURIMutation) 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 (*RedirectURIMutation) ResetModifiedAt ¶
func (m *RedirectURIMutation) ResetModifiedAt()
ResetModifiedAt resets all changes to the "modified_at" field.
func (*RedirectURIMutation) ResetRelyingParty ¶
func (m *RedirectURIMutation) ResetRelyingParty()
ResetRelyingParty resets all changes to the "relying_party" edge.
func (*RedirectURIMutation) ResetRelyingPartyID ¶
func (m *RedirectURIMutation) ResetRelyingPartyID()
ResetRelyingPartyID resets all changes to the "relying_party_id" field.
func (*RedirectURIMutation) ResetURI ¶
func (m *RedirectURIMutation) ResetURI()
ResetURI resets all changes to the "uri" field.
func (*RedirectURIMutation) SetCreatedAt ¶
func (m *RedirectURIMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*RedirectURIMutation) SetField ¶
func (m *RedirectURIMutation) 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 (*RedirectURIMutation) SetID ¶
func (m *RedirectURIMutation) SetID(id typedef.RedirectURIID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of RedirectURI entities.
func (*RedirectURIMutation) SetModifiedAt ¶
func (m *RedirectURIMutation) SetModifiedAt(t time.Time)
SetModifiedAt sets the "modified_at" field.
func (*RedirectURIMutation) SetOp ¶
func (m *RedirectURIMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*RedirectURIMutation) SetRelyingPartyID ¶
func (m *RedirectURIMutation) SetRelyingPartyID(tpi typedef.RelyingPartyID)
SetRelyingPartyID sets the "relying_party_id" field.
func (*RedirectURIMutation) SetURI ¶
func (m *RedirectURIMutation) SetURI(s string)
SetURI sets the "uri" field.
func (RedirectURIMutation) Tx ¶
func (m RedirectURIMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*RedirectURIMutation) Type ¶
func (m *RedirectURIMutation) Type() string
Type returns the node type of this mutation (RedirectURI).
func (*RedirectURIMutation) URI ¶
func (m *RedirectURIMutation) URI() (r string, exists bool)
URI returns the value of the "uri" field in the mutation.
func (*RedirectURIMutation) Where ¶
func (m *RedirectURIMutation) Where(ps ...predicate.RedirectURI)
Where appends a list predicates to the RedirectURIMutation builder.
func (*RedirectURIMutation) WhereP ¶
func (m *RedirectURIMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the RedirectURIMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type RedirectURIQuery ¶
type RedirectURIQuery struct {
// contains filtered or unexported fields
}
RedirectURIQuery is the builder for querying RedirectURI entities.
func (*RedirectURIQuery) Aggregate ¶
func (ruq *RedirectURIQuery) Aggregate(fns ...AggregateFunc) *RedirectURISelect
Aggregate returns a RedirectURISelect configured with the given aggregations.
func (*RedirectURIQuery) All ¶
func (ruq *RedirectURIQuery) All(ctx context.Context) ([]*RedirectURI, error)
All executes the query and returns a list of RedirectURIs.
func (*RedirectURIQuery) AllX ¶
func (ruq *RedirectURIQuery) AllX(ctx context.Context) []*RedirectURI
AllX is like All, but panics if an error occurs.
func (*RedirectURIQuery) Clone ¶
func (ruq *RedirectURIQuery) Clone() *RedirectURIQuery
Clone returns a duplicate of the RedirectURIQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*RedirectURIQuery) Count ¶
func (ruq *RedirectURIQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*RedirectURIQuery) CountX ¶
func (ruq *RedirectURIQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*RedirectURIQuery) Exist ¶
func (ruq *RedirectURIQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*RedirectURIQuery) ExistX ¶
func (ruq *RedirectURIQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*RedirectURIQuery) First ¶
func (ruq *RedirectURIQuery) First(ctx context.Context) (*RedirectURI, error)
First returns the first RedirectURI entity from the query. Returns a *NotFoundError when no RedirectURI was found.
func (*RedirectURIQuery) FirstID ¶
func (ruq *RedirectURIQuery) FirstID(ctx context.Context) (id typedef.RedirectURIID, err error)
FirstID returns the first RedirectURI ID from the query. Returns a *NotFoundError when no RedirectURI ID was found.
func (*RedirectURIQuery) FirstIDX ¶
func (ruq *RedirectURIQuery) FirstIDX(ctx context.Context) typedef.RedirectURIID
FirstIDX is like FirstID, but panics if an error occurs.
func (*RedirectURIQuery) FirstX ¶
func (ruq *RedirectURIQuery) FirstX(ctx context.Context) *RedirectURI
FirstX is like First, but panics if an error occurs.
func (*RedirectURIQuery) ForShare ¶
func (ruq *RedirectURIQuery) ForShare(opts ...sql.LockOption) *RedirectURIQuery
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 (*RedirectURIQuery) ForUpdate ¶
func (ruq *RedirectURIQuery) ForUpdate(opts ...sql.LockOption) *RedirectURIQuery
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 (*RedirectURIQuery) GroupBy ¶
func (ruq *RedirectURIQuery) GroupBy(field string, fields ...string) *RedirectURIGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct {
URI string `json:"uri,omitempty"`
Count int `json:"count,omitempty"`
}
client.RedirectURI.Query().
GroupBy(redirecturi.FieldURI).
Aggregate(ent.Count()).
Scan(ctx, &v)
func (*RedirectURIQuery) IDs ¶
func (ruq *RedirectURIQuery) IDs(ctx context.Context) (ids []typedef.RedirectURIID, err error)
IDs executes the query and returns a list of RedirectURI IDs.
func (*RedirectURIQuery) IDsX ¶
func (ruq *RedirectURIQuery) IDsX(ctx context.Context) []typedef.RedirectURIID
IDsX is like IDs, but panics if an error occurs.
func (*RedirectURIQuery) Limit ¶
func (ruq *RedirectURIQuery) Limit(limit int) *RedirectURIQuery
Limit the number of records to be returned by this query.
func (*RedirectURIQuery) Offset ¶
func (ruq *RedirectURIQuery) Offset(offset int) *RedirectURIQuery
Offset to start from.
func (*RedirectURIQuery) Only ¶
func (ruq *RedirectURIQuery) Only(ctx context.Context) (*RedirectURI, error)
Only returns a single RedirectURI entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one RedirectURI entity is found. Returns a *NotFoundError when no RedirectURI entities are found.
func (*RedirectURIQuery) OnlyID ¶
func (ruq *RedirectURIQuery) OnlyID(ctx context.Context) (id typedef.RedirectURIID, err error)
OnlyID is like Only, but returns the only RedirectURI ID in the query. Returns a *NotSingularError when more than one RedirectURI ID is found. Returns a *NotFoundError when no entities are found.
func (*RedirectURIQuery) OnlyIDX ¶
func (ruq *RedirectURIQuery) OnlyIDX(ctx context.Context) typedef.RedirectURIID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*RedirectURIQuery) OnlyX ¶
func (ruq *RedirectURIQuery) OnlyX(ctx context.Context) *RedirectURI
OnlyX is like Only, but panics if an error occurs.
func (*RedirectURIQuery) Order ¶
func (ruq *RedirectURIQuery) Order(o ...redirecturi.OrderOption) *RedirectURIQuery
Order specifies how the records should be ordered.
func (*RedirectURIQuery) QueryRelyingParty ¶
func (ruq *RedirectURIQuery) QueryRelyingParty() *RelyingPartyQuery
QueryRelyingParty chains the current query on the "relying_party" edge.
func (*RedirectURIQuery) Select ¶
func (ruq *RedirectURIQuery) Select(fields ...string) *RedirectURISelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct {
URI string `json:"uri,omitempty"`
}
client.RedirectURI.Query().
Select(redirecturi.FieldURI).
Scan(ctx, &v)
func (*RedirectURIQuery) Unique ¶
func (ruq *RedirectURIQuery) Unique(unique bool) *RedirectURIQuery
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 (*RedirectURIQuery) Where ¶
func (ruq *RedirectURIQuery) Where(ps ...predicate.RedirectURI) *RedirectURIQuery
Where adds a new predicate for the RedirectURIQuery builder.
func (*RedirectURIQuery) WithRelyingParty ¶
func (ruq *RedirectURIQuery) WithRelyingParty(opts ...func(*RelyingPartyQuery)) *RedirectURIQuery
WithRelyingParty tells the query-builder to eager-load the nodes that are connected to the "relying_party" edge. The optional arguments are used to configure the query builder of the edge.
type RedirectURISelect ¶
type RedirectURISelect struct {
*RedirectURIQuery
// contains filtered or unexported fields
}
RedirectURISelect is the builder for selecting fields of RedirectURI entities.
func (*RedirectURISelect) Aggregate ¶
func (rus *RedirectURISelect) Aggregate(fns ...AggregateFunc) *RedirectURISelect
Aggregate adds the given aggregation functions to the selector query.
func (*RedirectURISelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*RedirectURISelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*RedirectURISelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*RedirectURISelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*RedirectURISelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*RedirectURISelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*RedirectURISelect) Scan ¶
func (rus *RedirectURISelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*RedirectURISelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type RedirectURIUpdate ¶
type RedirectURIUpdate struct {
// contains filtered or unexported fields
}
RedirectURIUpdate is the builder for updating RedirectURI entities.
func (*RedirectURIUpdate) Exec ¶
func (ruu *RedirectURIUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*RedirectURIUpdate) ExecX ¶
func (ruu *RedirectURIUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*RedirectURIUpdate) Mutation ¶
func (ruu *RedirectURIUpdate) Mutation() *RedirectURIMutation
Mutation returns the RedirectURIMutation object of the builder.
func (*RedirectURIUpdate) Save ¶
func (ruu *RedirectURIUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*RedirectURIUpdate) SaveX ¶
func (ruu *RedirectURIUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*RedirectURIUpdate) SetModifiedAt ¶
func (ruu *RedirectURIUpdate) SetModifiedAt(t time.Time) *RedirectURIUpdate
SetModifiedAt sets the "modified_at" field.
func (*RedirectURIUpdate) SetNillableURI ¶
func (ruu *RedirectURIUpdate) SetNillableURI(s *string) *RedirectURIUpdate
SetNillableURI sets the "uri" field if the given value is not nil.
func (*RedirectURIUpdate) SetURI ¶
func (ruu *RedirectURIUpdate) SetURI(s string) *RedirectURIUpdate
SetURI sets the "uri" field.
func (*RedirectURIUpdate) Where ¶
func (ruu *RedirectURIUpdate) Where(ps ...predicate.RedirectURI) *RedirectURIUpdate
Where appends a list predicates to the RedirectURIUpdate builder.
type RedirectURIUpdateOne ¶
type RedirectURIUpdateOne struct {
// contains filtered or unexported fields
}
RedirectURIUpdateOne is the builder for updating a single RedirectURI entity.
func (*RedirectURIUpdateOne) Exec ¶
func (ruuo *RedirectURIUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*RedirectURIUpdateOne) ExecX ¶
func (ruuo *RedirectURIUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*RedirectURIUpdateOne) Mutation ¶
func (ruuo *RedirectURIUpdateOne) Mutation() *RedirectURIMutation
Mutation returns the RedirectURIMutation object of the builder.
func (*RedirectURIUpdateOne) Save ¶
func (ruuo *RedirectURIUpdateOne) Save(ctx context.Context) (*RedirectURI, error)
Save executes the query and returns the updated RedirectURI entity.
func (*RedirectURIUpdateOne) SaveX ¶
func (ruuo *RedirectURIUpdateOne) SaveX(ctx context.Context) *RedirectURI
SaveX is like Save, but panics if an error occurs.
func (*RedirectURIUpdateOne) Select ¶
func (ruuo *RedirectURIUpdateOne) Select(field string, fields ...string) *RedirectURIUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*RedirectURIUpdateOne) SetModifiedAt ¶
func (ruuo *RedirectURIUpdateOne) SetModifiedAt(t time.Time) *RedirectURIUpdateOne
SetModifiedAt sets the "modified_at" field.
func (*RedirectURIUpdateOne) SetNillableURI ¶
func (ruuo *RedirectURIUpdateOne) SetNillableURI(s *string) *RedirectURIUpdateOne
SetNillableURI sets the "uri" field if the given value is not nil.
func (*RedirectURIUpdateOne) SetURI ¶
func (ruuo *RedirectURIUpdateOne) SetURI(s string) *RedirectURIUpdateOne
SetURI sets the "uri" field.
func (*RedirectURIUpdateOne) Where ¶
func (ruuo *RedirectURIUpdateOne) Where(ps ...predicate.RedirectURI) *RedirectURIUpdateOne
Where appends a list predicates to the RedirectURIUpdate builder.
type RedirectURIs ¶
type RedirectURIs []*RedirectURI
RedirectURIs is a parsable slice of RedirectURI.
type RelyingParties ¶
type RelyingParties []*RelyingParty
RelyingParties is a parsable slice of RelyingParty.
type RelyingParty ¶
type RelyingParty struct {
// ID of the ent.
ID typedef.RelyingPartyID `json:"id,omitempty"`
// ClientID holds the value of the "client_id" field.
ClientID typedef.ClientID `json:"client_id,omitempty"`
// ClientSecret holds the value of the "client_secret" field.
ClientSecret string `json:"-"`
// CreatedAt holds the value of the "created_at" field.
CreatedAt time.Time `json:"created_at,omitempty"`
// ModifiedAt holds the value of the "modified_at" field.
ModifiedAt time.Time `json:"modified_at,omitempty"`
// Edges holds the relations/edges for other nodes in the graph.
// The values are being populated by the RelyingPartyQuery when eager-loading is set.
Edges RelyingPartyEdges `json:"edges"`
// contains filtered or unexported fields
}
RelyingParty is the model entity for the RelyingParty schema.
func (*RelyingParty) QueryAuthCodes ¶
func (rp *RelyingParty) QueryAuthCodes() *AuthCodeQuery
QueryAuthCodes queries the "auth_codes" edge of the RelyingParty entity.
func (*RelyingParty) QueryRedirectUris ¶
func (rp *RelyingParty) QueryRedirectUris() *RedirectURIQuery
QueryRedirectUris queries the "redirect_uris" edge of the RelyingParty entity.
func (*RelyingParty) String ¶
func (rp *RelyingParty) String() string
String implements the fmt.Stringer.
func (*RelyingParty) Unwrap ¶
func (rp *RelyingParty) Unwrap() *RelyingParty
Unwrap unwraps the RelyingParty 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 (*RelyingParty) Update ¶
func (rp *RelyingParty) Update() *RelyingPartyUpdateOne
Update returns a builder for updating this RelyingParty. Note that you need to call RelyingParty.Unwrap() before calling this method if this RelyingParty was returned from a transaction, and the transaction was committed or rolled back.
type RelyingPartyClient ¶
type RelyingPartyClient struct {
// contains filtered or unexported fields
}
RelyingPartyClient is a client for the RelyingParty schema.
func NewRelyingPartyClient ¶
func NewRelyingPartyClient(c config) *RelyingPartyClient
NewRelyingPartyClient returns a client for the RelyingParty from the given config.
func (*RelyingPartyClient) Create ¶
func (c *RelyingPartyClient) Create() *RelyingPartyCreate
Create returns a builder for creating a RelyingParty entity.
func (*RelyingPartyClient) CreateBulk ¶
func (c *RelyingPartyClient) CreateBulk(builders ...*RelyingPartyCreate) *RelyingPartyCreateBulk
CreateBulk returns a builder for creating a bulk of RelyingParty entities.
func (*RelyingPartyClient) Delete ¶
func (c *RelyingPartyClient) Delete() *RelyingPartyDelete
Delete returns a delete builder for RelyingParty.
func (*RelyingPartyClient) DeleteOne ¶
func (c *RelyingPartyClient) DeleteOne(rp *RelyingParty) *RelyingPartyDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*RelyingPartyClient) DeleteOneID ¶
func (c *RelyingPartyClient) DeleteOneID(id typedef.RelyingPartyID) *RelyingPartyDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*RelyingPartyClient) Get ¶
func (c *RelyingPartyClient) Get(ctx context.Context, id typedef.RelyingPartyID) (*RelyingParty, error)
Get returns a RelyingParty entity by its id.
func (*RelyingPartyClient) GetX ¶
func (c *RelyingPartyClient) GetX(ctx context.Context, id typedef.RelyingPartyID) *RelyingParty
GetX is like Get, but panics if an error occurs.
func (*RelyingPartyClient) Hooks ¶
func (c *RelyingPartyClient) Hooks() []Hook
Hooks returns the client hooks.
func (*RelyingPartyClient) Intercept ¶
func (c *RelyingPartyClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `relyingparty.Intercept(f(g(h())))`.
func (*RelyingPartyClient) Interceptors ¶
func (c *RelyingPartyClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*RelyingPartyClient) MapCreateBulk ¶
func (c *RelyingPartyClient) MapCreateBulk(slice any, setFunc func(*RelyingPartyCreate, int)) *RelyingPartyCreateBulk
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 (*RelyingPartyClient) Query ¶
func (c *RelyingPartyClient) Query() *RelyingPartyQuery
Query returns a query builder for RelyingParty.
func (*RelyingPartyClient) QueryAuthCodes ¶
func (c *RelyingPartyClient) QueryAuthCodes(rp *RelyingParty) *AuthCodeQuery
QueryAuthCodes queries the auth_codes edge of a RelyingParty.
func (*RelyingPartyClient) QueryRedirectUris ¶
func (c *RelyingPartyClient) QueryRedirectUris(rp *RelyingParty) *RedirectURIQuery
QueryRedirectUris queries the redirect_uris edge of a RelyingParty.
func (*RelyingPartyClient) Update ¶
func (c *RelyingPartyClient) Update() *RelyingPartyUpdate
Update returns an update builder for RelyingParty.
func (*RelyingPartyClient) UpdateOne ¶
func (c *RelyingPartyClient) UpdateOne(rp *RelyingParty) *RelyingPartyUpdateOne
UpdateOne returns an update builder for the given entity.
func (*RelyingPartyClient) UpdateOneID ¶
func (c *RelyingPartyClient) UpdateOneID(id typedef.RelyingPartyID) *RelyingPartyUpdateOne
UpdateOneID returns an update builder for the given id.
func (*RelyingPartyClient) Use ¶
func (c *RelyingPartyClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `relyingparty.Hooks(f(g(h())))`.
type RelyingPartyCreate ¶
type RelyingPartyCreate struct {
// contains filtered or unexported fields
}
RelyingPartyCreate is the builder for creating a RelyingParty entity.
func (*RelyingPartyCreate) AddAuthCodeIDs ¶
func (rpc *RelyingPartyCreate) AddAuthCodeIDs(ids ...typedef.AuthCodeID) *RelyingPartyCreate
AddAuthCodeIDs adds the "auth_codes" edge to the AuthCode entity by IDs.
func (*RelyingPartyCreate) AddAuthCodes ¶
func (rpc *RelyingPartyCreate) AddAuthCodes(a ...*AuthCode) *RelyingPartyCreate
AddAuthCodes adds the "auth_codes" edges to the AuthCode entity.
func (*RelyingPartyCreate) AddRedirectURIIDs ¶
func (rpc *RelyingPartyCreate) AddRedirectURIIDs(ids ...typedef.RedirectURIID) *RelyingPartyCreate
AddRedirectURIIDs adds the "redirect_uris" edge to the RedirectURI entity by IDs.
func (*RelyingPartyCreate) AddRedirectUris ¶
func (rpc *RelyingPartyCreate) AddRedirectUris(r ...*RedirectURI) *RelyingPartyCreate
AddRedirectUris adds the "redirect_uris" edges to the RedirectURI entity.
func (*RelyingPartyCreate) Exec ¶
func (rpc *RelyingPartyCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*RelyingPartyCreate) ExecX ¶
func (rpc *RelyingPartyCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*RelyingPartyCreate) Mutation ¶
func (rpc *RelyingPartyCreate) Mutation() *RelyingPartyMutation
Mutation returns the RelyingPartyMutation object of the builder.
func (*RelyingPartyCreate) Save ¶
func (rpc *RelyingPartyCreate) Save(ctx context.Context) (*RelyingParty, error)
Save creates the RelyingParty in the database.
func (*RelyingPartyCreate) SaveX ¶
func (rpc *RelyingPartyCreate) SaveX(ctx context.Context) *RelyingParty
SaveX calls Save and panics if Save returns an error.
func (*RelyingPartyCreate) SetClientID ¶
func (rpc *RelyingPartyCreate) SetClientID(ti typedef.ClientID) *RelyingPartyCreate
SetClientID sets the "client_id" field.
func (*RelyingPartyCreate) SetClientSecret ¶
func (rpc *RelyingPartyCreate) SetClientSecret(s string) *RelyingPartyCreate
SetClientSecret sets the "client_secret" field.
func (*RelyingPartyCreate) SetCreatedAt ¶
func (rpc *RelyingPartyCreate) SetCreatedAt(t time.Time) *RelyingPartyCreate
SetCreatedAt sets the "created_at" field.
func (*RelyingPartyCreate) SetID ¶
func (rpc *RelyingPartyCreate) SetID(tpi typedef.RelyingPartyID) *RelyingPartyCreate
SetID sets the "id" field.
func (*RelyingPartyCreate) SetModifiedAt ¶
func (rpc *RelyingPartyCreate) SetModifiedAt(t time.Time) *RelyingPartyCreate
SetModifiedAt sets the "modified_at" field.
func (*RelyingPartyCreate) SetNillableCreatedAt ¶
func (rpc *RelyingPartyCreate) SetNillableCreatedAt(t *time.Time) *RelyingPartyCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*RelyingPartyCreate) SetNillableModifiedAt ¶
func (rpc *RelyingPartyCreate) SetNillableModifiedAt(t *time.Time) *RelyingPartyCreate
SetNillableModifiedAt sets the "modified_at" field if the given value is not nil.
type RelyingPartyCreateBulk ¶
type RelyingPartyCreateBulk struct {
// contains filtered or unexported fields
}
RelyingPartyCreateBulk is the builder for creating many RelyingParty entities in bulk.
func (*RelyingPartyCreateBulk) Exec ¶
func (rpcb *RelyingPartyCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*RelyingPartyCreateBulk) ExecX ¶
func (rpcb *RelyingPartyCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*RelyingPartyCreateBulk) Save ¶
func (rpcb *RelyingPartyCreateBulk) Save(ctx context.Context) ([]*RelyingParty, error)
Save creates the RelyingParty entities in the database.
func (*RelyingPartyCreateBulk) SaveX ¶
func (rpcb *RelyingPartyCreateBulk) SaveX(ctx context.Context) []*RelyingParty
SaveX is like Save, but panics if an error occurs.
type RelyingPartyDelete ¶
type RelyingPartyDelete struct {
// contains filtered or unexported fields
}
RelyingPartyDelete is the builder for deleting a RelyingParty entity.
func (*RelyingPartyDelete) Exec ¶
func (rpd *RelyingPartyDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*RelyingPartyDelete) ExecX ¶
func (rpd *RelyingPartyDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*RelyingPartyDelete) Where ¶
func (rpd *RelyingPartyDelete) Where(ps ...predicate.RelyingParty) *RelyingPartyDelete
Where appends a list predicates to the RelyingPartyDelete builder.
type RelyingPartyDeleteOne ¶
type RelyingPartyDeleteOne struct {
// contains filtered or unexported fields
}
RelyingPartyDeleteOne is the builder for deleting a single RelyingParty entity.
func (*RelyingPartyDeleteOne) Exec ¶
func (rpdo *RelyingPartyDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*RelyingPartyDeleteOne) ExecX ¶
func (rpdo *RelyingPartyDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*RelyingPartyDeleteOne) Where ¶
func (rpdo *RelyingPartyDeleteOne) Where(ps ...predicate.RelyingParty) *RelyingPartyDeleteOne
Where appends a list predicates to the RelyingPartyDelete builder.
type RelyingPartyEdges ¶
type RelyingPartyEdges struct {
// AuthCodes holds the value of the auth_codes edge.
AuthCodes []*AuthCode `json:"auth_codes,omitempty"`
// RedirectUris holds the value of the redirect_uris edge.
RedirectUris []*RedirectURI `json:"redirect_uris,omitempty"`
// contains filtered or unexported fields
}
RelyingPartyEdges holds the relations/edges for other nodes in the graph.
func (RelyingPartyEdges) AuthCodesOrErr ¶
func (e RelyingPartyEdges) AuthCodesOrErr() ([]*AuthCode, error)
AuthCodesOrErr returns the AuthCodes value or an error if the edge was not loaded in eager-loading.
func (RelyingPartyEdges) RedirectUrisOrErr ¶
func (e RelyingPartyEdges) RedirectUrisOrErr() ([]*RedirectURI, error)
RedirectUrisOrErr returns the RedirectUris value or an error if the edge was not loaded in eager-loading.
type RelyingPartyGroupBy ¶
type RelyingPartyGroupBy struct {
// contains filtered or unexported fields
}
RelyingPartyGroupBy is the group-by builder for RelyingParty entities.
func (*RelyingPartyGroupBy) Aggregate ¶
func (rpgb *RelyingPartyGroupBy) Aggregate(fns ...AggregateFunc) *RelyingPartyGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*RelyingPartyGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*RelyingPartyGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*RelyingPartyGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*RelyingPartyGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*RelyingPartyGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*RelyingPartyGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*RelyingPartyGroupBy) Scan ¶
func (rpgb *RelyingPartyGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*RelyingPartyGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type RelyingPartyMutation ¶
type RelyingPartyMutation struct {
// contains filtered or unexported fields
}
RelyingPartyMutation represents an operation that mutates the RelyingParty nodes in the graph.
func (*RelyingPartyMutation) AddAuthCodeIDs ¶
func (m *RelyingPartyMutation) AddAuthCodeIDs(ids ...typedef.AuthCodeID)
AddAuthCodeIDs adds the "auth_codes" edge to the AuthCode entity by ids.
func (*RelyingPartyMutation) AddField ¶
func (m *RelyingPartyMutation) 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 (*RelyingPartyMutation) AddRedirectURIIDs ¶
func (m *RelyingPartyMutation) AddRedirectURIIDs(ids ...typedef.RedirectURIID)
AddRedirectURIIDs adds the "redirect_uris" edge to the RedirectURI entity by ids.
func (*RelyingPartyMutation) AddedEdges ¶
func (m *RelyingPartyMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*RelyingPartyMutation) AddedField ¶
func (m *RelyingPartyMutation) 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 (*RelyingPartyMutation) AddedFields ¶
func (m *RelyingPartyMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*RelyingPartyMutation) AddedIDs ¶
func (m *RelyingPartyMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*RelyingPartyMutation) AuthCodesCleared ¶
func (m *RelyingPartyMutation) AuthCodesCleared() bool
AuthCodesCleared reports if the "auth_codes" edge to the AuthCode entity was cleared.
func (*RelyingPartyMutation) AuthCodesIDs ¶
func (m *RelyingPartyMutation) AuthCodesIDs() (ids []typedef.AuthCodeID)
AuthCodesIDs returns the "auth_codes" edge IDs in the mutation.
func (*RelyingPartyMutation) ClearAuthCodes ¶
func (m *RelyingPartyMutation) ClearAuthCodes()
ClearAuthCodes clears the "auth_codes" edge to the AuthCode entity.
func (*RelyingPartyMutation) ClearEdge ¶
func (m *RelyingPartyMutation) 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 (*RelyingPartyMutation) ClearField ¶
func (m *RelyingPartyMutation) 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 (*RelyingPartyMutation) ClearRedirectUris ¶
func (m *RelyingPartyMutation) ClearRedirectUris()
ClearRedirectUris clears the "redirect_uris" edge to the RedirectURI entity.
func (*RelyingPartyMutation) ClearedEdges ¶
func (m *RelyingPartyMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*RelyingPartyMutation) ClearedFields ¶
func (m *RelyingPartyMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (RelyingPartyMutation) Client ¶
func (m RelyingPartyMutation) 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 (*RelyingPartyMutation) ClientID ¶
func (m *RelyingPartyMutation) ClientID() (r typedef.ClientID, exists bool)
ClientID returns the value of the "client_id" field in the mutation.
func (*RelyingPartyMutation) ClientSecret ¶
func (m *RelyingPartyMutation) ClientSecret() (r string, exists bool)
ClientSecret returns the value of the "client_secret" field in the mutation.
func (*RelyingPartyMutation) CreatedAt ¶
func (m *RelyingPartyMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*RelyingPartyMutation) EdgeCleared ¶
func (m *RelyingPartyMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*RelyingPartyMutation) Field ¶
func (m *RelyingPartyMutation) 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 (*RelyingPartyMutation) FieldCleared ¶
func (m *RelyingPartyMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*RelyingPartyMutation) Fields ¶
func (m *RelyingPartyMutation) 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 (*RelyingPartyMutation) ID ¶
func (m *RelyingPartyMutation) ID() (id typedef.RelyingPartyID, 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 (*RelyingPartyMutation) IDs ¶
func (m *RelyingPartyMutation) IDs(ctx context.Context) ([]typedef.RelyingPartyID, 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 (*RelyingPartyMutation) ModifiedAt ¶
func (m *RelyingPartyMutation) ModifiedAt() (r time.Time, exists bool)
ModifiedAt returns the value of the "modified_at" field in the mutation.
func (*RelyingPartyMutation) OldClientID ¶
OldClientID returns the old "client_id" field's value of the RelyingParty entity. If the RelyingParty object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*RelyingPartyMutation) OldClientSecret ¶
func (m *RelyingPartyMutation) OldClientSecret(ctx context.Context) (v string, err error)
OldClientSecret returns the old "client_secret" field's value of the RelyingParty entity. If the RelyingParty object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*RelyingPartyMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the RelyingParty entity. If the RelyingParty object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*RelyingPartyMutation) 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 (*RelyingPartyMutation) OldModifiedAt ¶
OldModifiedAt returns the old "modified_at" field's value of the RelyingParty entity. If the RelyingParty object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*RelyingPartyMutation) Op ¶
func (m *RelyingPartyMutation) Op() Op
Op returns the operation name.
func (*RelyingPartyMutation) RedirectUrisCleared ¶
func (m *RelyingPartyMutation) RedirectUrisCleared() bool
RedirectUrisCleared reports if the "redirect_uris" edge to the RedirectURI entity was cleared.
func (*RelyingPartyMutation) RedirectUrisIDs ¶
func (m *RelyingPartyMutation) RedirectUrisIDs() (ids []typedef.RedirectURIID)
RedirectUrisIDs returns the "redirect_uris" edge IDs in the mutation.
func (*RelyingPartyMutation) RemoveAuthCodeIDs ¶
func (m *RelyingPartyMutation) RemoveAuthCodeIDs(ids ...typedef.AuthCodeID)
RemoveAuthCodeIDs removes the "auth_codes" edge to the AuthCode entity by IDs.
func (*RelyingPartyMutation) RemoveRedirectURIIDs ¶
func (m *RelyingPartyMutation) RemoveRedirectURIIDs(ids ...typedef.RedirectURIID)
RemoveRedirectURIIDs removes the "redirect_uris" edge to the RedirectURI entity by IDs.
func (*RelyingPartyMutation) RemovedAuthCodesIDs ¶
func (m *RelyingPartyMutation) RemovedAuthCodesIDs() (ids []typedef.AuthCodeID)
RemovedAuthCodes returns the removed IDs of the "auth_codes" edge to the AuthCode entity.
func (*RelyingPartyMutation) RemovedEdges ¶
func (m *RelyingPartyMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*RelyingPartyMutation) RemovedIDs ¶
func (m *RelyingPartyMutation) 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 (*RelyingPartyMutation) RemovedRedirectUrisIDs ¶
func (m *RelyingPartyMutation) RemovedRedirectUrisIDs() (ids []typedef.RedirectURIID)
RemovedRedirectUris returns the removed IDs of the "redirect_uris" edge to the RedirectURI entity.
func (*RelyingPartyMutation) ResetAuthCodes ¶
func (m *RelyingPartyMutation) ResetAuthCodes()
ResetAuthCodes resets all changes to the "auth_codes" edge.
func (*RelyingPartyMutation) ResetClientID ¶
func (m *RelyingPartyMutation) ResetClientID()
ResetClientID resets all changes to the "client_id" field.
func (*RelyingPartyMutation) ResetClientSecret ¶
func (m *RelyingPartyMutation) ResetClientSecret()
ResetClientSecret resets all changes to the "client_secret" field.
func (*RelyingPartyMutation) ResetCreatedAt ¶
func (m *RelyingPartyMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*RelyingPartyMutation) ResetEdge ¶
func (m *RelyingPartyMutation) 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 (*RelyingPartyMutation) ResetField ¶
func (m *RelyingPartyMutation) 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 (*RelyingPartyMutation) ResetModifiedAt ¶
func (m *RelyingPartyMutation) ResetModifiedAt()
ResetModifiedAt resets all changes to the "modified_at" field.
func (*RelyingPartyMutation) ResetRedirectUris ¶
func (m *RelyingPartyMutation) ResetRedirectUris()
ResetRedirectUris resets all changes to the "redirect_uris" edge.
func (*RelyingPartyMutation) SetClientID ¶
func (m *RelyingPartyMutation) SetClientID(ti typedef.ClientID)
SetClientID sets the "client_id" field.
func (*RelyingPartyMutation) SetClientSecret ¶
func (m *RelyingPartyMutation) SetClientSecret(s string)
SetClientSecret sets the "client_secret" field.
func (*RelyingPartyMutation) SetCreatedAt ¶
func (m *RelyingPartyMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*RelyingPartyMutation) SetField ¶
func (m *RelyingPartyMutation) 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 (*RelyingPartyMutation) SetID ¶
func (m *RelyingPartyMutation) SetID(id typedef.RelyingPartyID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of RelyingParty entities.
func (*RelyingPartyMutation) SetModifiedAt ¶
func (m *RelyingPartyMutation) SetModifiedAt(t time.Time)
SetModifiedAt sets the "modified_at" field.
func (*RelyingPartyMutation) SetOp ¶
func (m *RelyingPartyMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (RelyingPartyMutation) Tx ¶
func (m RelyingPartyMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*RelyingPartyMutation) Type ¶
func (m *RelyingPartyMutation) Type() string
Type returns the node type of this mutation (RelyingParty).
func (*RelyingPartyMutation) Where ¶
func (m *RelyingPartyMutation) Where(ps ...predicate.RelyingParty)
Where appends a list predicates to the RelyingPartyMutation builder.
func (*RelyingPartyMutation) WhereP ¶
func (m *RelyingPartyMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the RelyingPartyMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type RelyingPartyQuery ¶
type RelyingPartyQuery struct {
// contains filtered or unexported fields
}
RelyingPartyQuery is the builder for querying RelyingParty entities.
func (*RelyingPartyQuery) Aggregate ¶
func (rpq *RelyingPartyQuery) Aggregate(fns ...AggregateFunc) *RelyingPartySelect
Aggregate returns a RelyingPartySelect configured with the given aggregations.
func (*RelyingPartyQuery) All ¶
func (rpq *RelyingPartyQuery) All(ctx context.Context) ([]*RelyingParty, error)
All executes the query and returns a list of RelyingParties.
func (*RelyingPartyQuery) AllX ¶
func (rpq *RelyingPartyQuery) AllX(ctx context.Context) []*RelyingParty
AllX is like All, but panics if an error occurs.
func (*RelyingPartyQuery) Clone ¶
func (rpq *RelyingPartyQuery) Clone() *RelyingPartyQuery
Clone returns a duplicate of the RelyingPartyQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*RelyingPartyQuery) Count ¶
func (rpq *RelyingPartyQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*RelyingPartyQuery) CountX ¶
func (rpq *RelyingPartyQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*RelyingPartyQuery) Exist ¶
func (rpq *RelyingPartyQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*RelyingPartyQuery) ExistX ¶
func (rpq *RelyingPartyQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*RelyingPartyQuery) First ¶
func (rpq *RelyingPartyQuery) First(ctx context.Context) (*RelyingParty, error)
First returns the first RelyingParty entity from the query. Returns a *NotFoundError when no RelyingParty was found.
func (*RelyingPartyQuery) FirstID ¶
func (rpq *RelyingPartyQuery) FirstID(ctx context.Context) (id typedef.RelyingPartyID, err error)
FirstID returns the first RelyingParty ID from the query. Returns a *NotFoundError when no RelyingParty ID was found.
func (*RelyingPartyQuery) FirstIDX ¶
func (rpq *RelyingPartyQuery) FirstIDX(ctx context.Context) typedef.RelyingPartyID
FirstIDX is like FirstID, but panics if an error occurs.
func (*RelyingPartyQuery) FirstX ¶
func (rpq *RelyingPartyQuery) FirstX(ctx context.Context) *RelyingParty
FirstX is like First, but panics if an error occurs.
func (*RelyingPartyQuery) ForShare ¶
func (rpq *RelyingPartyQuery) ForShare(opts ...sql.LockOption) *RelyingPartyQuery
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 (*RelyingPartyQuery) ForUpdate ¶
func (rpq *RelyingPartyQuery) ForUpdate(opts ...sql.LockOption) *RelyingPartyQuery
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 (*RelyingPartyQuery) GroupBy ¶
func (rpq *RelyingPartyQuery) GroupBy(field string, fields ...string) *RelyingPartyGroupBy
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 {
ClientID typedef.ClientID `json:"client_id,omitempty"`
Count int `json:"count,omitempty"`
}
client.RelyingParty.Query().
GroupBy(relyingparty.FieldClientID).
Aggregate(ent.Count()).
Scan(ctx, &v)
func (*RelyingPartyQuery) IDs ¶
func (rpq *RelyingPartyQuery) IDs(ctx context.Context) (ids []typedef.RelyingPartyID, err error)
IDs executes the query and returns a list of RelyingParty IDs.
func (*RelyingPartyQuery) IDsX ¶
func (rpq *RelyingPartyQuery) IDsX(ctx context.Context) []typedef.RelyingPartyID
IDsX is like IDs, but panics if an error occurs.
func (*RelyingPartyQuery) Limit ¶
func (rpq *RelyingPartyQuery) Limit(limit int) *RelyingPartyQuery
Limit the number of records to be returned by this query.
func (*RelyingPartyQuery) Offset ¶
func (rpq *RelyingPartyQuery) Offset(offset int) *RelyingPartyQuery
Offset to start from.
func (*RelyingPartyQuery) Only ¶
func (rpq *RelyingPartyQuery) Only(ctx context.Context) (*RelyingParty, error)
Only returns a single RelyingParty entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one RelyingParty entity is found. Returns a *NotFoundError when no RelyingParty entities are found.
func (*RelyingPartyQuery) OnlyID ¶
func (rpq *RelyingPartyQuery) OnlyID(ctx context.Context) (id typedef.RelyingPartyID, err error)
OnlyID is like Only, but returns the only RelyingParty ID in the query. Returns a *NotSingularError when more than one RelyingParty ID is found. Returns a *NotFoundError when no entities are found.
func (*RelyingPartyQuery) OnlyIDX ¶
func (rpq *RelyingPartyQuery) OnlyIDX(ctx context.Context) typedef.RelyingPartyID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*RelyingPartyQuery) OnlyX ¶
func (rpq *RelyingPartyQuery) OnlyX(ctx context.Context) *RelyingParty
OnlyX is like Only, but panics if an error occurs.
func (*RelyingPartyQuery) Order ¶
func (rpq *RelyingPartyQuery) Order(o ...relyingparty.OrderOption) *RelyingPartyQuery
Order specifies how the records should be ordered.
func (*RelyingPartyQuery) QueryAuthCodes ¶
func (rpq *RelyingPartyQuery) QueryAuthCodes() *AuthCodeQuery
QueryAuthCodes chains the current query on the "auth_codes" edge.
func (*RelyingPartyQuery) QueryRedirectUris ¶
func (rpq *RelyingPartyQuery) QueryRedirectUris() *RedirectURIQuery
QueryRedirectUris chains the current query on the "redirect_uris" edge.
func (*RelyingPartyQuery) Select ¶
func (rpq *RelyingPartyQuery) Select(fields ...string) *RelyingPartySelect
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 {
ClientID typedef.ClientID `json:"client_id,omitempty"`
}
client.RelyingParty.Query().
Select(relyingparty.FieldClientID).
Scan(ctx, &v)
func (*RelyingPartyQuery) Unique ¶
func (rpq *RelyingPartyQuery) Unique(unique bool) *RelyingPartyQuery
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 (*RelyingPartyQuery) Where ¶
func (rpq *RelyingPartyQuery) Where(ps ...predicate.RelyingParty) *RelyingPartyQuery
Where adds a new predicate for the RelyingPartyQuery builder.
func (*RelyingPartyQuery) WithAuthCodes ¶
func (rpq *RelyingPartyQuery) WithAuthCodes(opts ...func(*AuthCodeQuery)) *RelyingPartyQuery
WithAuthCodes tells the query-builder to eager-load the nodes that are connected to the "auth_codes" edge. The optional arguments are used to configure the query builder of the edge.
func (*RelyingPartyQuery) WithRedirectUris ¶
func (rpq *RelyingPartyQuery) WithRedirectUris(opts ...func(*RedirectURIQuery)) *RelyingPartyQuery
WithRedirectUris tells the query-builder to eager-load the nodes that are connected to the "redirect_uris" edge. The optional arguments are used to configure the query builder of the edge.
type RelyingPartySelect ¶
type RelyingPartySelect struct {
*RelyingPartyQuery
// contains filtered or unexported fields
}
RelyingPartySelect is the builder for selecting fields of RelyingParty entities.
func (*RelyingPartySelect) Aggregate ¶
func (rps *RelyingPartySelect) Aggregate(fns ...AggregateFunc) *RelyingPartySelect
Aggregate adds the given aggregation functions to the selector query.
func (*RelyingPartySelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*RelyingPartySelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*RelyingPartySelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*RelyingPartySelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*RelyingPartySelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*RelyingPartySelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*RelyingPartySelect) Scan ¶
func (rps *RelyingPartySelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*RelyingPartySelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type RelyingPartyUpdate ¶
type RelyingPartyUpdate struct {
// contains filtered or unexported fields
}
RelyingPartyUpdate is the builder for updating RelyingParty entities.
func (*RelyingPartyUpdate) AddAuthCodeIDs ¶
func (rpu *RelyingPartyUpdate) AddAuthCodeIDs(ids ...typedef.AuthCodeID) *RelyingPartyUpdate
AddAuthCodeIDs adds the "auth_codes" edge to the AuthCode entity by IDs.
func (*RelyingPartyUpdate) AddAuthCodes ¶
func (rpu *RelyingPartyUpdate) AddAuthCodes(a ...*AuthCode) *RelyingPartyUpdate
AddAuthCodes adds the "auth_codes" edges to the AuthCode entity.
func (*RelyingPartyUpdate) AddRedirectURIIDs ¶
func (rpu *RelyingPartyUpdate) AddRedirectURIIDs(ids ...typedef.RedirectURIID) *RelyingPartyUpdate
AddRedirectURIIDs adds the "redirect_uris" edge to the RedirectURI entity by IDs.
func (*RelyingPartyUpdate) AddRedirectUris ¶
func (rpu *RelyingPartyUpdate) AddRedirectUris(r ...*RedirectURI) *RelyingPartyUpdate
AddRedirectUris adds the "redirect_uris" edges to the RedirectURI entity.
func (*RelyingPartyUpdate) ClearAuthCodes ¶
func (rpu *RelyingPartyUpdate) ClearAuthCodes() *RelyingPartyUpdate
ClearAuthCodes clears all "auth_codes" edges to the AuthCode entity.
func (*RelyingPartyUpdate) ClearRedirectUris ¶
func (rpu *RelyingPartyUpdate) ClearRedirectUris() *RelyingPartyUpdate
ClearRedirectUris clears all "redirect_uris" edges to the RedirectURI entity.
func (*RelyingPartyUpdate) Exec ¶
func (rpu *RelyingPartyUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*RelyingPartyUpdate) ExecX ¶
func (rpu *RelyingPartyUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*RelyingPartyUpdate) Mutation ¶
func (rpu *RelyingPartyUpdate) Mutation() *RelyingPartyMutation
Mutation returns the RelyingPartyMutation object of the builder.
func (*RelyingPartyUpdate) RemoveAuthCodeIDs ¶
func (rpu *RelyingPartyUpdate) RemoveAuthCodeIDs(ids ...typedef.AuthCodeID) *RelyingPartyUpdate
RemoveAuthCodeIDs removes the "auth_codes" edge to AuthCode entities by IDs.
func (*RelyingPartyUpdate) RemoveAuthCodes ¶
func (rpu *RelyingPartyUpdate) RemoveAuthCodes(a ...*AuthCode) *RelyingPartyUpdate
RemoveAuthCodes removes "auth_codes" edges to AuthCode entities.
func (*RelyingPartyUpdate) RemoveRedirectURIIDs ¶
func (rpu *RelyingPartyUpdate) RemoveRedirectURIIDs(ids ...typedef.RedirectURIID) *RelyingPartyUpdate
RemoveRedirectURIIDs removes the "redirect_uris" edge to RedirectURI entities by IDs.
func (*RelyingPartyUpdate) RemoveRedirectUris ¶
func (rpu *RelyingPartyUpdate) RemoveRedirectUris(r ...*RedirectURI) *RelyingPartyUpdate
RemoveRedirectUris removes "redirect_uris" edges to RedirectURI entities.
func (*RelyingPartyUpdate) Save ¶
func (rpu *RelyingPartyUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*RelyingPartyUpdate) SaveX ¶
func (rpu *RelyingPartyUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*RelyingPartyUpdate) SetClientSecret ¶
func (rpu *RelyingPartyUpdate) SetClientSecret(s string) *RelyingPartyUpdate
SetClientSecret sets the "client_secret" field.
func (*RelyingPartyUpdate) SetModifiedAt ¶
func (rpu *RelyingPartyUpdate) SetModifiedAt(t time.Time) *RelyingPartyUpdate
SetModifiedAt sets the "modified_at" field.
func (*RelyingPartyUpdate) SetNillableClientSecret ¶
func (rpu *RelyingPartyUpdate) SetNillableClientSecret(s *string) *RelyingPartyUpdate
SetNillableClientSecret sets the "client_secret" field if the given value is not nil.
func (*RelyingPartyUpdate) Where ¶
func (rpu *RelyingPartyUpdate) Where(ps ...predicate.RelyingParty) *RelyingPartyUpdate
Where appends a list predicates to the RelyingPartyUpdate builder.
type RelyingPartyUpdateOne ¶
type RelyingPartyUpdateOne struct {
// contains filtered or unexported fields
}
RelyingPartyUpdateOne is the builder for updating a single RelyingParty entity.
func (*RelyingPartyUpdateOne) AddAuthCodeIDs ¶
func (rpuo *RelyingPartyUpdateOne) AddAuthCodeIDs(ids ...typedef.AuthCodeID) *RelyingPartyUpdateOne
AddAuthCodeIDs adds the "auth_codes" edge to the AuthCode entity by IDs.
func (*RelyingPartyUpdateOne) AddAuthCodes ¶
func (rpuo *RelyingPartyUpdateOne) AddAuthCodes(a ...*AuthCode) *RelyingPartyUpdateOne
AddAuthCodes adds the "auth_codes" edges to the AuthCode entity.
func (*RelyingPartyUpdateOne) AddRedirectURIIDs ¶
func (rpuo *RelyingPartyUpdateOne) AddRedirectURIIDs(ids ...typedef.RedirectURIID) *RelyingPartyUpdateOne
AddRedirectURIIDs adds the "redirect_uris" edge to the RedirectURI entity by IDs.
func (*RelyingPartyUpdateOne) AddRedirectUris ¶
func (rpuo *RelyingPartyUpdateOne) AddRedirectUris(r ...*RedirectURI) *RelyingPartyUpdateOne
AddRedirectUris adds the "redirect_uris" edges to the RedirectURI entity.
func (*RelyingPartyUpdateOne) ClearAuthCodes ¶
func (rpuo *RelyingPartyUpdateOne) ClearAuthCodes() *RelyingPartyUpdateOne
ClearAuthCodes clears all "auth_codes" edges to the AuthCode entity.
func (*RelyingPartyUpdateOne) ClearRedirectUris ¶
func (rpuo *RelyingPartyUpdateOne) ClearRedirectUris() *RelyingPartyUpdateOne
ClearRedirectUris clears all "redirect_uris" edges to the RedirectURI entity.
func (*RelyingPartyUpdateOne) Exec ¶
func (rpuo *RelyingPartyUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*RelyingPartyUpdateOne) ExecX ¶
func (rpuo *RelyingPartyUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*RelyingPartyUpdateOne) Mutation ¶
func (rpuo *RelyingPartyUpdateOne) Mutation() *RelyingPartyMutation
Mutation returns the RelyingPartyMutation object of the builder.
func (*RelyingPartyUpdateOne) RemoveAuthCodeIDs ¶
func (rpuo *RelyingPartyUpdateOne) RemoveAuthCodeIDs(ids ...typedef.AuthCodeID) *RelyingPartyUpdateOne
RemoveAuthCodeIDs removes the "auth_codes" edge to AuthCode entities by IDs.
func (*RelyingPartyUpdateOne) RemoveAuthCodes ¶
func (rpuo *RelyingPartyUpdateOne) RemoveAuthCodes(a ...*AuthCode) *RelyingPartyUpdateOne
RemoveAuthCodes removes "auth_codes" edges to AuthCode entities.
func (*RelyingPartyUpdateOne) RemoveRedirectURIIDs ¶
func (rpuo *RelyingPartyUpdateOne) RemoveRedirectURIIDs(ids ...typedef.RedirectURIID) *RelyingPartyUpdateOne
RemoveRedirectURIIDs removes the "redirect_uris" edge to RedirectURI entities by IDs.
func (*RelyingPartyUpdateOne) RemoveRedirectUris ¶
func (rpuo *RelyingPartyUpdateOne) RemoveRedirectUris(r ...*RedirectURI) *RelyingPartyUpdateOne
RemoveRedirectUris removes "redirect_uris" edges to RedirectURI entities.
func (*RelyingPartyUpdateOne) Save ¶
func (rpuo *RelyingPartyUpdateOne) Save(ctx context.Context) (*RelyingParty, error)
Save executes the query and returns the updated RelyingParty entity.
func (*RelyingPartyUpdateOne) SaveX ¶
func (rpuo *RelyingPartyUpdateOne) SaveX(ctx context.Context) *RelyingParty
SaveX is like Save, but panics if an error occurs.
func (*RelyingPartyUpdateOne) Select ¶
func (rpuo *RelyingPartyUpdateOne) Select(field string, fields ...string) *RelyingPartyUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*RelyingPartyUpdateOne) SetClientSecret ¶
func (rpuo *RelyingPartyUpdateOne) SetClientSecret(s string) *RelyingPartyUpdateOne
SetClientSecret sets the "client_secret" field.
func (*RelyingPartyUpdateOne) SetModifiedAt ¶
func (rpuo *RelyingPartyUpdateOne) SetModifiedAt(t time.Time) *RelyingPartyUpdateOne
SetModifiedAt sets the "modified_at" field.
func (*RelyingPartyUpdateOne) SetNillableClientSecret ¶
func (rpuo *RelyingPartyUpdateOne) SetNillableClientSecret(s *string) *RelyingPartyUpdateOne
SetNillableClientSecret sets the "client_secret" field if the given value is not nil.
func (*RelyingPartyUpdateOne) Where ¶
func (rpuo *RelyingPartyUpdateOne) Where(ps ...predicate.RelyingParty) *RelyingPartyUpdateOne
Where appends a list predicates to the RelyingPartyUpdate builder.
type RollbackFunc ¶
The RollbackFunc type is an adapter to allow the use of ordinary function as a Rollbacker. If f is a function with the appropriate signature, RollbackFunc(f) is a Rollbacker that calls f.
type RollbackHook ¶
type RollbackHook func(Rollbacker) Rollbacker
RollbackHook defines the "rollback middleware". A function that gets a Rollbacker and returns a Rollbacker. For example:
hook := func(next ent.Rollbacker) ent.Rollbacker {
return ent.RollbackFunc(func(ctx context.Context, tx *ent.Tx) error {
// Do some stuff before.
if err := next.Rollback(ctx, tx); err != nil {
return err
}
// Do some stuff after.
return nil
})
}
type Rollbacker ¶
Rollbacker is the interface that wraps the Rollback method.
type TraverseFunc ¶
type TraverseFunc = ent.TraverseFunc
ent aliases to avoid import conflicts in user's code.
type Tx ¶
type Tx struct {
// AuthCode is the client for interacting with the AuthCode builders.
AuthCode *AuthCodeClient
// Consent is the client for interacting with the Consent builders.
Consent *ConsentClient
// RedirectURI is the client for interacting with the RedirectURI builders.
RedirectURI *RedirectURIClient
// RelyingParty is the client for interacting with the RelyingParty builders.
RelyingParty *RelyingPartyClient
// User is the client for interacting with the User builders.
User *UserClient
// contains filtered or unexported fields
}
Tx is a transactional client that is created by calling Client.Tx().
func TxFromContext ¶
TxFromContext returns a Tx stored inside a context, or nil if there isn't one.
func (*Tx) OnRollback ¶
func (tx *Tx) OnRollback(f RollbackHook)
OnRollback adds a hook to call on rollback.
type User ¶
type User struct {
// ID of the ent.
ID typedef.UserID `json:"id,omitempty"`
// Name holds the value of the "name" field.
Name string `json:"name,omitempty"`
// Password holds the value of the "password" field.
Password string `json:"-"`
// TotpSecret holds the value of the "totp_secret" field.
TotpSecret string `json:"-"`
// CreatedAt holds the value of the "created_at" field.
CreatedAt time.Time `json:"created_at,omitempty"`
// ModifiedAt holds the value of the "modified_at" field.
ModifiedAt time.Time `json:"modified_at,omitempty"`
// Edges holds the relations/edges for other nodes in the graph.
// The values are being populated by the UserQuery when eager-loading is set.
Edges UserEdges `json:"edges"`
// contains filtered or unexported fields
}
User is the model entity for the User schema.
func (*User) QueryConsents ¶
func (u *User) QueryConsents() *ConsentQuery
QueryConsents queries the "consents" edge of the User entity.
func (*User) Unwrap ¶
Unwrap unwraps the User 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 (*User) Update ¶
func (u *User) Update() *UserUpdateOne
Update returns a builder for updating this User. Note that you need to call User.Unwrap() before calling this method if this User was returned from a transaction, and the transaction was committed or rolled back.
type UserClient ¶
type UserClient struct {
// contains filtered or unexported fields
}
UserClient is a client for the User schema.
func NewUserClient ¶
func NewUserClient(c config) *UserClient
NewUserClient returns a client for the User from the given config.
func (*UserClient) Create ¶
func (c *UserClient) Create() *UserCreate
Create returns a builder for creating a User entity.
func (*UserClient) CreateBulk ¶
func (c *UserClient) CreateBulk(builders ...*UserCreate) *UserCreateBulk
CreateBulk returns a builder for creating a bulk of User entities.
func (*UserClient) Delete ¶
func (c *UserClient) Delete() *UserDelete
Delete returns a delete builder for User.
func (*UserClient) DeleteOne ¶
func (c *UserClient) DeleteOne(u *User) *UserDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*UserClient) DeleteOneID ¶
func (c *UserClient) DeleteOneID(id typedef.UserID) *UserDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*UserClient) Intercept ¶
func (c *UserClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `user.Intercept(f(g(h())))`.
func (*UserClient) Interceptors ¶
func (c *UserClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*UserClient) MapCreateBulk ¶
func (c *UserClient) MapCreateBulk(slice any, setFunc func(*UserCreate, int)) *UserCreateBulk
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 (*UserClient) Query ¶
func (c *UserClient) Query() *UserQuery
Query returns a query builder for User.
func (*UserClient) QueryConsents ¶
func (c *UserClient) QueryConsents(u *User) *ConsentQuery
QueryConsents queries the consents edge of a User.
func (*UserClient) Update ¶
func (c *UserClient) Update() *UserUpdate
Update returns an update builder for User.
func (*UserClient) UpdateOne ¶
func (c *UserClient) UpdateOne(u *User) *UserUpdateOne
UpdateOne returns an update builder for the given entity.
func (*UserClient) UpdateOneID ¶
func (c *UserClient) UpdateOneID(id typedef.UserID) *UserUpdateOne
UpdateOneID returns an update builder for the given id.
func (*UserClient) Use ¶
func (c *UserClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `user.Hooks(f(g(h())))`.
type UserCreate ¶
type UserCreate struct {
// contains filtered or unexported fields
}
UserCreate is the builder for creating a User entity.
func (*UserCreate) AddConsentIDs ¶
func (uc *UserCreate) AddConsentIDs(ids ...typedef.ConsentID) *UserCreate
AddConsentIDs adds the "consents" edge to the Consent entity by IDs.
func (*UserCreate) AddConsents ¶
func (uc *UserCreate) AddConsents(c ...*Consent) *UserCreate
AddConsents adds the "consents" edges to the Consent entity.
func (*UserCreate) Exec ¶
func (uc *UserCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*UserCreate) ExecX ¶
func (uc *UserCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserCreate) Mutation ¶
func (uc *UserCreate) Mutation() *UserMutation
Mutation returns the UserMutation object of the builder.
func (*UserCreate) Save ¶
func (uc *UserCreate) Save(ctx context.Context) (*User, error)
Save creates the User in the database.
func (*UserCreate) SaveX ¶
func (uc *UserCreate) SaveX(ctx context.Context) *User
SaveX calls Save and panics if Save returns an error.
func (*UserCreate) SetCreatedAt ¶
func (uc *UserCreate) SetCreatedAt(t time.Time) *UserCreate
SetCreatedAt sets the "created_at" field.
func (*UserCreate) SetID ¶
func (uc *UserCreate) SetID(ti typedef.UserID) *UserCreate
SetID sets the "id" field.
func (*UserCreate) SetModifiedAt ¶
func (uc *UserCreate) SetModifiedAt(t time.Time) *UserCreate
SetModifiedAt sets the "modified_at" field.
func (*UserCreate) SetName ¶
func (uc *UserCreate) SetName(s string) *UserCreate
SetName sets the "name" field.
func (*UserCreate) SetNillableCreatedAt ¶
func (uc *UserCreate) SetNillableCreatedAt(t *time.Time) *UserCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*UserCreate) SetNillableModifiedAt ¶
func (uc *UserCreate) SetNillableModifiedAt(t *time.Time) *UserCreate
SetNillableModifiedAt sets the "modified_at" field if the given value is not nil.
func (*UserCreate) SetNillableTotpSecret ¶
func (uc *UserCreate) SetNillableTotpSecret(s *string) *UserCreate
SetNillableTotpSecret sets the "totp_secret" field if the given value is not nil.
func (*UserCreate) SetPassword ¶
func (uc *UserCreate) SetPassword(s string) *UserCreate
SetPassword sets the "password" field.
func (*UserCreate) SetTotpSecret ¶
func (uc *UserCreate) SetTotpSecret(s string) *UserCreate
SetTotpSecret sets the "totp_secret" field.
type UserCreateBulk ¶
type UserCreateBulk struct {
// contains filtered or unexported fields
}
UserCreateBulk is the builder for creating many User entities in bulk.
func (*UserCreateBulk) Exec ¶
func (ucb *UserCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*UserCreateBulk) ExecX ¶
func (ucb *UserCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type UserDelete ¶
type UserDelete struct {
// contains filtered or unexported fields
}
UserDelete is the builder for deleting a User entity.
func (*UserDelete) Exec ¶
func (ud *UserDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*UserDelete) ExecX ¶
func (ud *UserDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*UserDelete) Where ¶
func (ud *UserDelete) Where(ps ...predicate.User) *UserDelete
Where appends a list predicates to the UserDelete builder.
type UserDeleteOne ¶
type UserDeleteOne struct {
// contains filtered or unexported fields
}
UserDeleteOne is the builder for deleting a single User entity.
func (*UserDeleteOne) Exec ¶
func (udo *UserDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*UserDeleteOne) ExecX ¶
func (udo *UserDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserDeleteOne) Where ¶
func (udo *UserDeleteOne) Where(ps ...predicate.User) *UserDeleteOne
Where appends a list predicates to the UserDelete builder.
type UserEdges ¶
type UserEdges struct {
// Consents holds the value of the consents edge.
Consents []*Consent `json:"consents,omitempty"`
// contains filtered or unexported fields
}
UserEdges holds the relations/edges for other nodes in the graph.
func (UserEdges) ConsentsOrErr ¶
ConsentsOrErr returns the Consents value or an error if the edge was not loaded in eager-loading.
type UserGroupBy ¶
type UserGroupBy struct {
// contains filtered or unexported fields
}
UserGroupBy is the group-by builder for User entities.
func (*UserGroupBy) Aggregate ¶
func (ugb *UserGroupBy) Aggregate(fns ...AggregateFunc) *UserGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*UserGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Scan ¶
func (ugb *UserGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*UserGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type UserMutation ¶
type UserMutation struct {
// contains filtered or unexported fields
}
UserMutation represents an operation that mutates the User nodes in the graph.
func (*UserMutation) AddConsentIDs ¶
func (m *UserMutation) AddConsentIDs(ids ...typedef.ConsentID)
AddConsentIDs adds the "consents" edge to the Consent entity by ids.
func (*UserMutation) AddField ¶
func (m *UserMutation) 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 (*UserMutation) AddedEdges ¶
func (m *UserMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*UserMutation) AddedField ¶
func (m *UserMutation) 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 (*UserMutation) AddedFields ¶
func (m *UserMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*UserMutation) AddedIDs ¶
func (m *UserMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*UserMutation) ClearConsents ¶
func (m *UserMutation) ClearConsents()
ClearConsents clears the "consents" edge to the Consent entity.
func (*UserMutation) ClearEdge ¶
func (m *UserMutation) 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 (*UserMutation) ClearField ¶
func (m *UserMutation) 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 (*UserMutation) ClearTotpSecret ¶
func (m *UserMutation) ClearTotpSecret()
ClearTotpSecret clears the value of the "totp_secret" field.
func (*UserMutation) ClearedEdges ¶
func (m *UserMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*UserMutation) ClearedFields ¶
func (m *UserMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (UserMutation) Client ¶
func (m UserMutation) 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 (*UserMutation) ConsentsCleared ¶
func (m *UserMutation) ConsentsCleared() bool
ConsentsCleared reports if the "consents" edge to the Consent entity was cleared.
func (*UserMutation) ConsentsIDs ¶
func (m *UserMutation) ConsentsIDs() (ids []typedef.ConsentID)
ConsentsIDs returns the "consents" edge IDs in the mutation.
func (*UserMutation) CreatedAt ¶
func (m *UserMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*UserMutation) EdgeCleared ¶
func (m *UserMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*UserMutation) Field ¶
func (m *UserMutation) 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 (*UserMutation) FieldCleared ¶
func (m *UserMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*UserMutation) Fields ¶
func (m *UserMutation) 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 (*UserMutation) ID ¶
func (m *UserMutation) ID() (id typedef.UserID, 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 (*UserMutation) 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 (*UserMutation) ModifiedAt ¶
func (m *UserMutation) ModifiedAt() (r time.Time, exists bool)
ModifiedAt returns the value of the "modified_at" field in the mutation.
func (*UserMutation) Name ¶
func (m *UserMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*UserMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) 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 (*UserMutation) OldModifiedAt ¶
OldModifiedAt returns the old "modified_at" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldName ¶
func (m *UserMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldPassword ¶
func (m *UserMutation) OldPassword(ctx context.Context) (v string, err error)
OldPassword returns the old "password" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldTotpSecret ¶
func (m *UserMutation) OldTotpSecret(ctx context.Context) (v string, err error)
OldTotpSecret returns the old "totp_secret" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) Password ¶
func (m *UserMutation) Password() (r string, exists bool)
Password returns the value of the "password" field in the mutation.
func (*UserMutation) RemoveConsentIDs ¶
func (m *UserMutation) RemoveConsentIDs(ids ...typedef.ConsentID)
RemoveConsentIDs removes the "consents" edge to the Consent entity by IDs.
func (*UserMutation) RemovedConsentsIDs ¶
func (m *UserMutation) RemovedConsentsIDs() (ids []typedef.ConsentID)
RemovedConsents returns the removed IDs of the "consents" edge to the Consent entity.
func (*UserMutation) RemovedEdges ¶
func (m *UserMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*UserMutation) RemovedIDs ¶
func (m *UserMutation) 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 (*UserMutation) ResetConsents ¶
func (m *UserMutation) ResetConsents()
ResetConsents resets all changes to the "consents" edge.
func (*UserMutation) ResetCreatedAt ¶
func (m *UserMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*UserMutation) ResetEdge ¶
func (m *UserMutation) 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 (*UserMutation) ResetField ¶
func (m *UserMutation) 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 (*UserMutation) ResetModifiedAt ¶
func (m *UserMutation) ResetModifiedAt()
ResetModifiedAt resets all changes to the "modified_at" field.
func (*UserMutation) ResetName ¶
func (m *UserMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*UserMutation) ResetPassword ¶
func (m *UserMutation) ResetPassword()
ResetPassword resets all changes to the "password" field.
func (*UserMutation) ResetTotpSecret ¶
func (m *UserMutation) ResetTotpSecret()
ResetTotpSecret resets all changes to the "totp_secret" field.
func (*UserMutation) SetCreatedAt ¶
func (m *UserMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*UserMutation) SetField ¶
func (m *UserMutation) 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 (*UserMutation) SetID ¶
func (m *UserMutation) SetID(id typedef.UserID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of User entities.
func (*UserMutation) SetModifiedAt ¶
func (m *UserMutation) SetModifiedAt(t time.Time)
SetModifiedAt sets the "modified_at" field.
func (*UserMutation) SetName ¶
func (m *UserMutation) SetName(s string)
SetName sets the "name" field.
func (*UserMutation) SetOp ¶
func (m *UserMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*UserMutation) SetPassword ¶
func (m *UserMutation) SetPassword(s string)
SetPassword sets the "password" field.
func (*UserMutation) SetTotpSecret ¶
func (m *UserMutation) SetTotpSecret(s string)
SetTotpSecret sets the "totp_secret" field.
func (*UserMutation) TotpSecret ¶
func (m *UserMutation) TotpSecret() (r string, exists bool)
TotpSecret returns the value of the "totp_secret" field in the mutation.
func (*UserMutation) TotpSecretCleared ¶
func (m *UserMutation) TotpSecretCleared() bool
TotpSecretCleared returns if the "totp_secret" field was cleared in this mutation.
func (UserMutation) Tx ¶
func (m UserMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*UserMutation) Type ¶
func (m *UserMutation) Type() string
Type returns the node type of this mutation (User).
func (*UserMutation) Where ¶
func (m *UserMutation) Where(ps ...predicate.User)
Where appends a list predicates to the UserMutation builder.
func (*UserMutation) WhereP ¶
func (m *UserMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the UserMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type UserQuery ¶
type UserQuery struct {
// contains filtered or unexported fields
}
UserQuery is the builder for querying User entities.
func (*UserQuery) Aggregate ¶
func (uq *UserQuery) Aggregate(fns ...AggregateFunc) *UserSelect
Aggregate returns a UserSelect configured with the given aggregations.
func (*UserQuery) Clone ¶
Clone returns a duplicate of the UserQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*UserQuery) First ¶
First returns the first User entity from the query. Returns a *NotFoundError when no User was found.
func (*UserQuery) FirstID ¶
FirstID returns the first User ID from the query. Returns a *NotFoundError when no User ID was found.
func (*UserQuery) ForShare ¶
func (uq *UserQuery) ForShare(opts ...sql.LockOption) *UserQuery
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 (*UserQuery) ForUpdate ¶
func (uq *UserQuery) ForUpdate(opts ...sql.LockOption) *UserQuery
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 (*UserQuery) GroupBy ¶
func (uq *UserQuery) GroupBy(field string, fields ...string) *UserGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct {
Name string `json:"name,omitempty"`
Count int `json:"count,omitempty"`
}
client.User.Query().
GroupBy(user.FieldName).
Aggregate(ent.Count()).
Scan(ctx, &v)
func (*UserQuery) Only ¶
Only returns a single User entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one User entity is found. Returns a *NotFoundError when no User entities are found.
func (*UserQuery) OnlyID ¶
OnlyID is like Only, but returns the only User ID in the query. Returns a *NotSingularError when more than one User ID is found. Returns a *NotFoundError when no entities are found.
func (*UserQuery) Order ¶
func (uq *UserQuery) Order(o ...user.OrderOption) *UserQuery
Order specifies how the records should be ordered.
func (*UserQuery) QueryConsents ¶
func (uq *UserQuery) QueryConsents() *ConsentQuery
QueryConsents chains the current query on the "consents" edge.
func (*UserQuery) Select ¶
func (uq *UserQuery) Select(fields ...string) *UserSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct {
Name string `json:"name,omitempty"`
}
client.User.Query().
Select(user.FieldName).
Scan(ctx, &v)
func (*UserQuery) 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 (*UserQuery) WithConsents ¶
func (uq *UserQuery) WithConsents(opts ...func(*ConsentQuery)) *UserQuery
WithConsents tells the query-builder to eager-load the nodes that are connected to the "consents" edge. The optional arguments are used to configure the query builder of the edge.
type UserSelect ¶
type UserSelect struct {
*UserQuery
// contains filtered or unexported fields
}
UserSelect is the builder for selecting fields of User entities.
func (*UserSelect) Aggregate ¶
func (us *UserSelect) Aggregate(fns ...AggregateFunc) *UserSelect
Aggregate adds the given aggregation functions to the selector query.
func (*UserSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*UserSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*UserSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*UserSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*UserSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*UserSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*UserSelect) Scan ¶
func (us *UserSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*UserSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type UserUpdate ¶
type UserUpdate struct {
// contains filtered or unexported fields
}
UserUpdate is the builder for updating User entities.
func (*UserUpdate) AddConsentIDs ¶
func (uu *UserUpdate) AddConsentIDs(ids ...typedef.ConsentID) *UserUpdate
AddConsentIDs adds the "consents" edge to the Consent entity by IDs.
func (*UserUpdate) AddConsents ¶
func (uu *UserUpdate) AddConsents(c ...*Consent) *UserUpdate
AddConsents adds the "consents" edges to the Consent entity.
func (*UserUpdate) ClearConsents ¶
func (uu *UserUpdate) ClearConsents() *UserUpdate
ClearConsents clears all "consents" edges to the Consent entity.
func (*UserUpdate) ClearTotpSecret ¶
func (uu *UserUpdate) ClearTotpSecret() *UserUpdate
ClearTotpSecret clears the value of the "totp_secret" field.
func (*UserUpdate) Exec ¶
func (uu *UserUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*UserUpdate) ExecX ¶
func (uu *UserUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserUpdate) Mutation ¶
func (uu *UserUpdate) Mutation() *UserMutation
Mutation returns the UserMutation object of the builder.
func (*UserUpdate) RemoveConsentIDs ¶
func (uu *UserUpdate) RemoveConsentIDs(ids ...typedef.ConsentID) *UserUpdate
RemoveConsentIDs removes the "consents" edge to Consent entities by IDs.
func (*UserUpdate) RemoveConsents ¶
func (uu *UserUpdate) RemoveConsents(c ...*Consent) *UserUpdate
RemoveConsents removes "consents" edges to Consent entities.
func (*UserUpdate) Save ¶
func (uu *UserUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*UserUpdate) SaveX ¶
func (uu *UserUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*UserUpdate) SetModifiedAt ¶
func (uu *UserUpdate) SetModifiedAt(t time.Time) *UserUpdate
SetModifiedAt sets the "modified_at" field.
func (*UserUpdate) SetName ¶
func (uu *UserUpdate) SetName(s string) *UserUpdate
SetName sets the "name" field.
func (*UserUpdate) SetNillableName ¶
func (uu *UserUpdate) SetNillableName(s *string) *UserUpdate
SetNillableName sets the "name" field if the given value is not nil.
func (*UserUpdate) SetNillablePassword ¶
func (uu *UserUpdate) SetNillablePassword(s *string) *UserUpdate
SetNillablePassword sets the "password" field if the given value is not nil.
func (*UserUpdate) SetNillableTotpSecret ¶
func (uu *UserUpdate) SetNillableTotpSecret(s *string) *UserUpdate
SetNillableTotpSecret sets the "totp_secret" field if the given value is not nil.
func (*UserUpdate) SetPassword ¶
func (uu *UserUpdate) SetPassword(s string) *UserUpdate
SetPassword sets the "password" field.
func (*UserUpdate) SetTotpSecret ¶
func (uu *UserUpdate) SetTotpSecret(s string) *UserUpdate
SetTotpSecret sets the "totp_secret" field.
func (*UserUpdate) Where ¶
func (uu *UserUpdate) Where(ps ...predicate.User) *UserUpdate
Where appends a list predicates to the UserUpdate builder.
type UserUpdateOne ¶
type UserUpdateOne struct {
// contains filtered or unexported fields
}
UserUpdateOne is the builder for updating a single User entity.
func (*UserUpdateOne) AddConsentIDs ¶
func (uuo *UserUpdateOne) AddConsentIDs(ids ...typedef.ConsentID) *UserUpdateOne
AddConsentIDs adds the "consents" edge to the Consent entity by IDs.
func (*UserUpdateOne) AddConsents ¶
func (uuo *UserUpdateOne) AddConsents(c ...*Consent) *UserUpdateOne
AddConsents adds the "consents" edges to the Consent entity.
func (*UserUpdateOne) ClearConsents ¶
func (uuo *UserUpdateOne) ClearConsents() *UserUpdateOne
ClearConsents clears all "consents" edges to the Consent entity.
func (*UserUpdateOne) ClearTotpSecret ¶
func (uuo *UserUpdateOne) ClearTotpSecret() *UserUpdateOne
ClearTotpSecret clears the value of the "totp_secret" field.
func (*UserUpdateOne) Exec ¶
func (uuo *UserUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*UserUpdateOne) ExecX ¶
func (uuo *UserUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserUpdateOne) Mutation ¶
func (uuo *UserUpdateOne) Mutation() *UserMutation
Mutation returns the UserMutation object of the builder.
func (*UserUpdateOne) RemoveConsentIDs ¶
func (uuo *UserUpdateOne) RemoveConsentIDs(ids ...typedef.ConsentID) *UserUpdateOne
RemoveConsentIDs removes the "consents" edge to Consent entities by IDs.
func (*UserUpdateOne) RemoveConsents ¶
func (uuo *UserUpdateOne) RemoveConsents(c ...*Consent) *UserUpdateOne
RemoveConsents removes "consents" edges to Consent entities.
func (*UserUpdateOne) Save ¶
func (uuo *UserUpdateOne) Save(ctx context.Context) (*User, error)
Save executes the query and returns the updated User entity.
func (*UserUpdateOne) SaveX ¶
func (uuo *UserUpdateOne) SaveX(ctx context.Context) *User
SaveX is like Save, but panics if an error occurs.
func (*UserUpdateOne) Select ¶
func (uuo *UserUpdateOne) Select(field string, fields ...string) *UserUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*UserUpdateOne) SetModifiedAt ¶
func (uuo *UserUpdateOne) SetModifiedAt(t time.Time) *UserUpdateOne
SetModifiedAt sets the "modified_at" field.
func (*UserUpdateOne) SetName ¶
func (uuo *UserUpdateOne) SetName(s string) *UserUpdateOne
SetName sets the "name" field.
func (*UserUpdateOne) SetNillableName ¶
func (uuo *UserUpdateOne) SetNillableName(s *string) *UserUpdateOne
SetNillableName sets the "name" field if the given value is not nil.
func (*UserUpdateOne) SetNillablePassword ¶
func (uuo *UserUpdateOne) SetNillablePassword(s *string) *UserUpdateOne
SetNillablePassword sets the "password" field if the given value is not nil.
func (*UserUpdateOne) SetNillableTotpSecret ¶
func (uuo *UserUpdateOne) SetNillableTotpSecret(s *string) *UserUpdateOne
SetNillableTotpSecret sets the "totp_secret" field if the given value is not nil.
func (*UserUpdateOne) SetPassword ¶
func (uuo *UserUpdateOne) SetPassword(s string) *UserUpdateOne
SetPassword sets the "password" field.
func (*UserUpdateOne) SetTotpSecret ¶
func (uuo *UserUpdateOne) SetTotpSecret(s string) *UserUpdateOne
SetTotpSecret sets the "totp_secret" field.
func (*UserUpdateOne) Where ¶
func (uuo *UserUpdateOne) Where(ps ...predicate.User) *UserUpdateOne
Where appends a list predicates to the UserUpdate builder.
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
¶
- authcode.go
- authcode_create.go
- authcode_delete.go
- authcode_query.go
- authcode_update.go
- client.go
- consent.go
- consent_create.go
- consent_delete.go
- consent_query.go
- consent_update.go
- ent.go
- mutation.go
- redirecturi.go
- redirecturi_create.go
- redirecturi_delete.go
- redirecturi_query.go
- redirecturi_update.go
- relyingparty.go
- relyingparty_create.go
- relyingparty_delete.go
- relyingparty_query.go
- relyingparty_update.go
- runtime.go
- tx.go
- user.go
- user_create.go
- user_delete.go
- user_query.go
- user_update.go