Documentation ¶
Index ¶
- Constants
- func IsConstraintError(err error) bool
- func IsNotFound(err error) bool
- func IsNotLoaded(err error) bool
- func IsNotSingular(err error) bool
- func IsValidationError(err error) bool
- func MaskNotFound(err error) error
- func NewContext(parent context.Context, c *Client) context.Context
- func NewTxContext(parent context.Context, tx *Tx) context.Context
- type AggregateFunc
- type Client
- type CommitFunc
- type CommitHook
- type Committer
- type ConstraintError
- type Hook
- type MutateFunc
- type Mutation
- type Mutator
- type NotFoundError
- type NotLoadedError
- type NotSingularError
- type Op
- type Option
- type OrderFunc
- type Policy
- type Query
- type RollbackFunc
- type RollbackHook
- type Rollbacker
- type Session
- type SessionClient
- func (c *SessionClient) Create() *SessionCreate
- func (c *SessionClient) CreateBulk(builders ...*SessionCreate) *SessionCreateBulk
- func (c *SessionClient) Delete() *SessionDelete
- func (c *SessionClient) DeleteOne(s *Session) *SessionDeleteOne
- func (c *SessionClient) DeleteOneID(id string) *SessionDeleteOne
- func (c *SessionClient) Get(ctx context.Context, id string) (*Session, error)
- func (c *SessionClient) GetX(ctx context.Context, id string) *Session
- func (c *SessionClient) Hooks() []Hook
- func (c *SessionClient) Query() *SessionQuery
- func (c *SessionClient) Update() *SessionUpdate
- func (c *SessionClient) UpdateOne(s *Session) *SessionUpdateOne
- func (c *SessionClient) UpdateOneID(id string) *SessionUpdateOne
- func (c *SessionClient) Use(hooks ...Hook)
- type SessionCreate
- func (sc *SessionCreate) Mutation() *SessionMutation
- func (sc *SessionCreate) Save(ctx context.Context) (*Session, error)
- func (sc *SessionCreate) SaveX(ctx context.Context) *Session
- func (sc *SessionCreate) SetCreatedAt(t time.Time) *SessionCreate
- func (sc *SessionCreate) SetData(s string) *SessionCreate
- func (sc *SessionCreate) SetExpiresAt(t time.Time) *SessionCreate
- func (sc *SessionCreate) SetID(s string) *SessionCreate
- func (sc *SessionCreate) SetNillableCreatedAt(t *time.Time) *SessionCreate
- func (sc *SessionCreate) SetNillableExpiresAt(t *time.Time) *SessionCreate
- func (sc *SessionCreate) SetNillableUpdatedAt(t *time.Time) *SessionCreate
- func (sc *SessionCreate) SetUpdatedAt(t time.Time) *SessionCreate
- type SessionCreateBulk
- type SessionDelete
- type SessionDeleteOne
- type SessionGroupBy
- func (sgb *SessionGroupBy) Aggregate(fns ...AggregateFunc) *SessionGroupBy
- func (sgb *SessionGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (sgb *SessionGroupBy) BoolX(ctx context.Context) bool
- func (sgb *SessionGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (sgb *SessionGroupBy) BoolsX(ctx context.Context) []bool
- func (sgb *SessionGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (sgb *SessionGroupBy) Float64X(ctx context.Context) float64
- func (sgb *SessionGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (sgb *SessionGroupBy) Float64sX(ctx context.Context) []float64
- func (sgb *SessionGroupBy) Int(ctx context.Context) (_ int, err error)
- func (sgb *SessionGroupBy) IntX(ctx context.Context) int
- func (sgb *SessionGroupBy) Ints(ctx context.Context) ([]int, error)
- func (sgb *SessionGroupBy) IntsX(ctx context.Context) []int
- func (sgb *SessionGroupBy) Scan(ctx context.Context, v interface{}) error
- func (sgb *SessionGroupBy) ScanX(ctx context.Context, v interface{})
- func (sgb *SessionGroupBy) String(ctx context.Context) (_ string, err error)
- func (sgb *SessionGroupBy) StringX(ctx context.Context) string
- func (sgb *SessionGroupBy) Strings(ctx context.Context) ([]string, error)
- func (sgb *SessionGroupBy) StringsX(ctx context.Context) []string
- type SessionMutation
- func (m *SessionMutation) AddField(name string, value ent.Value) error
- func (m *SessionMutation) AddedEdges() []string
- func (m *SessionMutation) AddedField(name string) (ent.Value, bool)
- func (m *SessionMutation) AddedFields() []string
- func (m *SessionMutation) AddedIDs(name string) []ent.Value
- func (m *SessionMutation) ClearEdge(name string) error
- func (m *SessionMutation) ClearExpiresAt()
- func (m *SessionMutation) ClearField(name string) error
- func (m *SessionMutation) ClearedEdges() []string
- func (m *SessionMutation) ClearedFields() []string
- func (m SessionMutation) Client() *Client
- func (m *SessionMutation) CreatedAt() (r time.Time, exists bool)
- func (m *SessionMutation) Data() (r string, exists bool)
- func (m *SessionMutation) EdgeCleared(name string) bool
- func (m *SessionMutation) ExpiresAt() (r time.Time, exists bool)
- func (m *SessionMutation) ExpiresAtCleared() bool
- func (m *SessionMutation) Field(name string) (ent.Value, bool)
- func (m *SessionMutation) FieldCleared(name string) bool
- func (m *SessionMutation) Fields() []string
- func (m *SessionMutation) ID() (id string, exists bool)
- func (m *SessionMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *SessionMutation) OldData(ctx context.Context) (v string, err error)
- func (m *SessionMutation) OldExpiresAt(ctx context.Context) (v *time.Time, err error)
- func (m *SessionMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *SessionMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *SessionMutation) Op() Op
- func (m *SessionMutation) RemovedEdges() []string
- func (m *SessionMutation) RemovedIDs(name string) []ent.Value
- func (m *SessionMutation) ResetCreatedAt()
- func (m *SessionMutation) ResetData()
- func (m *SessionMutation) ResetEdge(name string) error
- func (m *SessionMutation) ResetExpiresAt()
- func (m *SessionMutation) ResetField(name string) error
- func (m *SessionMutation) ResetUpdatedAt()
- func (m *SessionMutation) SetCreatedAt(t time.Time)
- func (m *SessionMutation) SetData(s string)
- func (m *SessionMutation) SetExpiresAt(t time.Time)
- func (m *SessionMutation) SetField(name string, value ent.Value) error
- func (m *SessionMutation) SetID(id string)
- func (m *SessionMutation) SetUpdatedAt(t time.Time)
- func (m SessionMutation) Tx() (*Tx, error)
- func (m *SessionMutation) Type() string
- func (m *SessionMutation) UpdatedAt() (r time.Time, exists bool)
- type SessionQuery
- func (sq *SessionQuery) All(ctx context.Context) ([]*Session, error)
- func (sq *SessionQuery) AllX(ctx context.Context) []*Session
- func (sq *SessionQuery) Clone() *SessionQuery
- func (sq *SessionQuery) Count(ctx context.Context) (int, error)
- func (sq *SessionQuery) CountX(ctx context.Context) int
- func (sq *SessionQuery) Exist(ctx context.Context) (bool, error)
- func (sq *SessionQuery) ExistX(ctx context.Context) bool
- func (sq *SessionQuery) First(ctx context.Context) (*Session, error)
- func (sq *SessionQuery) FirstID(ctx context.Context) (id string, err error)
- func (sq *SessionQuery) FirstIDX(ctx context.Context) string
- func (sq *SessionQuery) FirstX(ctx context.Context) *Session
- func (sq *SessionQuery) GroupBy(field string, fields ...string) *SessionGroupBy
- func (sq *SessionQuery) IDs(ctx context.Context) ([]string, error)
- func (sq *SessionQuery) IDsX(ctx context.Context) []string
- func (sq *SessionQuery) Limit(limit int) *SessionQuery
- func (sq *SessionQuery) Offset(offset int) *SessionQuery
- func (sq *SessionQuery) Only(ctx context.Context) (*Session, error)
- func (sq *SessionQuery) OnlyID(ctx context.Context) (id string, err error)
- func (sq *SessionQuery) OnlyIDX(ctx context.Context) string
- func (sq *SessionQuery) OnlyX(ctx context.Context) *Session
- func (sq *SessionQuery) Order(o ...OrderFunc) *SessionQuery
- func (sq *SessionQuery) Select(field string, fields ...string) *SessionSelect
- func (sq *SessionQuery) Where(ps ...predicate.Session) *SessionQuery
- type SessionSelect
- func (ss *SessionSelect) Bool(ctx context.Context) (_ bool, err error)
- func (ss *SessionSelect) BoolX(ctx context.Context) bool
- func (ss *SessionSelect) Bools(ctx context.Context) ([]bool, error)
- func (ss *SessionSelect) BoolsX(ctx context.Context) []bool
- func (ss *SessionSelect) Float64(ctx context.Context) (_ float64, err error)
- func (ss *SessionSelect) Float64X(ctx context.Context) float64
- func (ss *SessionSelect) Float64s(ctx context.Context) ([]float64, error)
- func (ss *SessionSelect) Float64sX(ctx context.Context) []float64
- func (ss *SessionSelect) Int(ctx context.Context) (_ int, err error)
- func (ss *SessionSelect) IntX(ctx context.Context) int
- func (ss *SessionSelect) Ints(ctx context.Context) ([]int, error)
- func (ss *SessionSelect) IntsX(ctx context.Context) []int
- func (ss *SessionSelect) Scan(ctx context.Context, v interface{}) error
- func (ss *SessionSelect) ScanX(ctx context.Context, v interface{})
- func (ss *SessionSelect) String(ctx context.Context) (_ string, err error)
- func (ss *SessionSelect) StringX(ctx context.Context) string
- func (ss *SessionSelect) Strings(ctx context.Context) ([]string, error)
- func (ss *SessionSelect) StringsX(ctx context.Context) []string
- type SessionUpdate
- func (su *SessionUpdate) ClearExpiresAt() *SessionUpdate
- func (su *SessionUpdate) Exec(ctx context.Context) error
- func (su *SessionUpdate) ExecX(ctx context.Context)
- func (su *SessionUpdate) Mutation() *SessionMutation
- func (su *SessionUpdate) Save(ctx context.Context) (int, error)
- func (su *SessionUpdate) SaveX(ctx context.Context) int
- func (su *SessionUpdate) SetData(s string) *SessionUpdate
- func (su *SessionUpdate) SetExpiresAt(t time.Time) *SessionUpdate
- func (su *SessionUpdate) SetNillableExpiresAt(t *time.Time) *SessionUpdate
- func (su *SessionUpdate) SetUpdatedAt(t time.Time) *SessionUpdate
- func (su *SessionUpdate) Where(ps ...predicate.Session) *SessionUpdate
- type SessionUpdateOne
- func (suo *SessionUpdateOne) ClearExpiresAt() *SessionUpdateOne
- func (suo *SessionUpdateOne) Exec(ctx context.Context) error
- func (suo *SessionUpdateOne) ExecX(ctx context.Context)
- func (suo *SessionUpdateOne) Mutation() *SessionMutation
- func (suo *SessionUpdateOne) Save(ctx context.Context) (*Session, error)
- func (suo *SessionUpdateOne) SaveX(ctx context.Context) *Session
- func (suo *SessionUpdateOne) SetData(s string) *SessionUpdateOne
- func (suo *SessionUpdateOne) SetExpiresAt(t time.Time) *SessionUpdateOne
- func (suo *SessionUpdateOne) SetNillableExpiresAt(t *time.Time) *SessionUpdateOne
- func (suo *SessionUpdateOne) SetUpdatedAt(t time.Time) *SessionUpdateOne
- type Sessions
- 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 uuid.UUID) *UserDeleteOne
- func (c *UserClient) Get(ctx context.Context, id uuid.UUID) (*User, error)
- func (c *UserClient) GetX(ctx context.Context, id uuid.UUID) *User
- func (c *UserClient) Hooks() []Hook
- func (c *UserClient) Query() *UserQuery
- func (c *UserClient) Update() *UserUpdate
- func (c *UserClient) UpdateOne(u *User) *UserUpdateOne
- func (c *UserClient) UpdateOneID(id uuid.UUID) *UserUpdateOne
- func (c *UserClient) Use(hooks ...Hook)
- type UserCreate
- 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) SetAPIKey(s string) *UserCreate
- func (uc *UserCreate) SetBillingID(s string) *UserCreate
- func (uc *UserCreate) SetConfirmationSentAt(t time.Time) *UserCreate
- func (uc *UserCreate) SetConfirmationToken(s string) *UserCreate
- func (uc *UserCreate) SetConfirmed(b bool) *UserCreate
- func (uc *UserCreate) SetCreatedAt(t time.Time) *UserCreate
- func (uc *UserCreate) SetEmail(s string) *UserCreate
- func (uc *UserCreate) SetEmailChange(s string) *UserCreate
- func (uc *UserCreate) SetEmailChangeSentAt(t time.Time) *UserCreate
- func (uc *UserCreate) SetEmailChangeToken(s string) *UserCreate
- func (uc *UserCreate) SetID(u uuid.UUID) *UserCreate
- func (uc *UserCreate) SetLastSigninAt(t time.Time) *UserCreate
- func (uc *UserCreate) SetMetadata(m map[string]interface{}) *UserCreate
- func (uc *UserCreate) SetNillableAPIKey(s *string) *UserCreate
- func (uc *UserCreate) SetNillableBillingID(s *string) *UserCreate
- func (uc *UserCreate) SetNillableConfirmationSentAt(t *time.Time) *UserCreate
- func (uc *UserCreate) SetNillableConfirmationToken(s *string) *UserCreate
- func (uc *UserCreate) SetNillableConfirmed(b *bool) *UserCreate
- func (uc *UserCreate) SetNillableCreatedAt(t *time.Time) *UserCreate
- func (uc *UserCreate) SetNillableEmailChange(s *string) *UserCreate
- func (uc *UserCreate) SetNillableEmailChangeSentAt(t *time.Time) *UserCreate
- func (uc *UserCreate) SetNillableEmailChangeToken(s *string) *UserCreate
- func (uc *UserCreate) SetNillableLastSigninAt(t *time.Time) *UserCreate
- func (uc *UserCreate) SetNillableOtp(s *string) *UserCreate
- func (uc *UserCreate) SetNillableOtpSentAt(t *time.Time) *UserCreate
- func (uc *UserCreate) SetNillableRecoverySentAt(t *time.Time) *UserCreate
- func (uc *UserCreate) SetNillableRecoveryToken(s *string) *UserCreate
- func (uc *UserCreate) SetNillableUpdatedAt(t *time.Time) *UserCreate
- func (uc *UserCreate) SetOtp(s string) *UserCreate
- func (uc *UserCreate) SetOtpSentAt(t time.Time) *UserCreate
- func (uc *UserCreate) SetPassword(s string) *UserCreate
- func (uc *UserCreate) SetProvider(s string) *UserCreate
- func (uc *UserCreate) SetRecoverySentAt(t time.Time) *UserCreate
- func (uc *UserCreate) SetRecoveryToken(s string) *UserCreate
- func (uc *UserCreate) SetUpdatedAt(t time.Time) *UserCreate
- type UserCreateBulk
- type UserDelete
- type UserDeleteOne
- type UserGroupBy
- func (ugb *UserGroupBy) Aggregate(fns ...AggregateFunc) *UserGroupBy
- func (ugb *UserGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (ugb *UserGroupBy) BoolX(ctx context.Context) bool
- func (ugb *UserGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (ugb *UserGroupBy) BoolsX(ctx context.Context) []bool
- func (ugb *UserGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (ugb *UserGroupBy) Float64X(ctx context.Context) float64
- func (ugb *UserGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (ugb *UserGroupBy) Float64sX(ctx context.Context) []float64
- func (ugb *UserGroupBy) Int(ctx context.Context) (_ int, err error)
- func (ugb *UserGroupBy) IntX(ctx context.Context) int
- func (ugb *UserGroupBy) Ints(ctx context.Context) ([]int, error)
- func (ugb *UserGroupBy) IntsX(ctx context.Context) []int
- func (ugb *UserGroupBy) Scan(ctx context.Context, v interface{}) error
- func (ugb *UserGroupBy) ScanX(ctx context.Context, v interface{})
- func (ugb *UserGroupBy) String(ctx context.Context) (_ string, err error)
- func (ugb *UserGroupBy) StringX(ctx context.Context) string
- func (ugb *UserGroupBy) Strings(ctx context.Context) ([]string, error)
- func (ugb *UserGroupBy) StringsX(ctx context.Context) []string
- type UserMutation
- func (m *UserMutation) APIKey() (r string, exists bool)
- func (m *UserMutation) APIKeyCleared() bool
- 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) BillingID() (r string, exists bool)
- func (m *UserMutation) BillingIDCleared() bool
- func (m *UserMutation) ClearAPIKey()
- func (m *UserMutation) ClearBillingID()
- func (m *UserMutation) ClearConfirmationSentAt()
- func (m *UserMutation) ClearConfirmationToken()
- func (m *UserMutation) ClearConfirmed()
- func (m *UserMutation) ClearEdge(name string) error
- func (m *UserMutation) ClearEmailChange()
- func (m *UserMutation) ClearEmailChangeSentAt()
- func (m *UserMutation) ClearEmailChangeToken()
- func (m *UserMutation) ClearField(name string) error
- func (m *UserMutation) ClearLastSigninAt()
- func (m *UserMutation) ClearOtp()
- func (m *UserMutation) ClearOtpSentAt()
- func (m *UserMutation) ClearRecoverySentAt()
- func (m *UserMutation) ClearRecoveryToken()
- func (m *UserMutation) ClearedEdges() []string
- func (m *UserMutation) ClearedFields() []string
- func (m UserMutation) Client() *Client
- func (m *UserMutation) ConfirmationSentAt() (r time.Time, exists bool)
- func (m *UserMutation) ConfirmationSentAtCleared() bool
- func (m *UserMutation) ConfirmationToken() (r string, exists bool)
- func (m *UserMutation) ConfirmationTokenCleared() bool
- func (m *UserMutation) Confirmed() (r bool, exists bool)
- func (m *UserMutation) ConfirmedCleared() bool
- func (m *UserMutation) CreatedAt() (r time.Time, exists bool)
- func (m *UserMutation) EdgeCleared(name string) bool
- func (m *UserMutation) Email() (r string, exists bool)
- func (m *UserMutation) EmailChange() (r string, exists bool)
- func (m *UserMutation) EmailChangeCleared() bool
- func (m *UserMutation) EmailChangeSentAt() (r time.Time, exists bool)
- func (m *UserMutation) EmailChangeSentAtCleared() bool
- func (m *UserMutation) EmailChangeToken() (r string, exists bool)
- func (m *UserMutation) EmailChangeTokenCleared() 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 uuid.UUID, exists bool)
- func (m *UserMutation) LastSigninAt() (r time.Time, exists bool)
- func (m *UserMutation) LastSigninAtCleared() bool
- func (m *UserMutation) Metadata() (r map[string]interface{}, exists bool)
- func (m *UserMutation) OldAPIKey(ctx context.Context) (v string, err error)
- func (m *UserMutation) OldBillingID(ctx context.Context) (v string, err error)
- func (m *UserMutation) OldConfirmationSentAt(ctx context.Context) (v *time.Time, err error)
- func (m *UserMutation) OldConfirmationToken(ctx context.Context) (v *string, err error)
- func (m *UserMutation) OldConfirmed(ctx context.Context) (v bool, err error)
- func (m *UserMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *UserMutation) OldEmail(ctx context.Context) (v string, err error)
- func (m *UserMutation) OldEmailChange(ctx context.Context) (v string, err error)
- func (m *UserMutation) OldEmailChangeSentAt(ctx context.Context) (v *time.Time, err error)
- func (m *UserMutation) OldEmailChangeToken(ctx context.Context) (v *string, err error)
- func (m *UserMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *UserMutation) OldLastSigninAt(ctx context.Context) (v *time.Time, err error)
- func (m *UserMutation) OldMetadata(ctx context.Context) (v map[string]interface{}, err error)
- func (m *UserMutation) OldOtp(ctx context.Context) (v *string, err error)
- func (m *UserMutation) OldOtpSentAt(ctx context.Context) (v *time.Time, err error)
- func (m *UserMutation) OldPassword(ctx context.Context) (v string, err error)
- func (m *UserMutation) OldProvider(ctx context.Context) (v string, err error)
- func (m *UserMutation) OldRecoverySentAt(ctx context.Context) (v *time.Time, err error)
- func (m *UserMutation) OldRecoveryToken(ctx context.Context) (v *string, err error)
- func (m *UserMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *UserMutation) Op() Op
- func (m *UserMutation) Otp() (r string, exists bool)
- func (m *UserMutation) OtpCleared() bool
- func (m *UserMutation) OtpSentAt() (r time.Time, exists bool)
- func (m *UserMutation) OtpSentAtCleared() bool
- func (m *UserMutation) Password() (r string, exists bool)
- func (m *UserMutation) Provider() (r string, exists bool)
- func (m *UserMutation) RecoverySentAt() (r time.Time, exists bool)
- func (m *UserMutation) RecoverySentAtCleared() bool
- func (m *UserMutation) RecoveryToken() (r string, exists bool)
- func (m *UserMutation) RecoveryTokenCleared() bool
- func (m *UserMutation) RemovedEdges() []string
- func (m *UserMutation) RemovedIDs(name string) []ent.Value
- func (m *UserMutation) ResetAPIKey()
- func (m *UserMutation) ResetBillingID()
- func (m *UserMutation) ResetConfirmationSentAt()
- func (m *UserMutation) ResetConfirmationToken()
- func (m *UserMutation) ResetConfirmed()
- func (m *UserMutation) ResetCreatedAt()
- func (m *UserMutation) ResetEdge(name string) error
- func (m *UserMutation) ResetEmail()
- func (m *UserMutation) ResetEmailChange()
- func (m *UserMutation) ResetEmailChangeSentAt()
- func (m *UserMutation) ResetEmailChangeToken()
- func (m *UserMutation) ResetField(name string) error
- func (m *UserMutation) ResetLastSigninAt()
- func (m *UserMutation) ResetMetadata()
- func (m *UserMutation) ResetOtp()
- func (m *UserMutation) ResetOtpSentAt()
- func (m *UserMutation) ResetPassword()
- func (m *UserMutation) ResetProvider()
- func (m *UserMutation) ResetRecoverySentAt()
- func (m *UserMutation) ResetRecoveryToken()
- func (m *UserMutation) ResetUpdatedAt()
- func (m *UserMutation) SetAPIKey(s string)
- func (m *UserMutation) SetBillingID(s string)
- func (m *UserMutation) SetConfirmationSentAt(t time.Time)
- func (m *UserMutation) SetConfirmationToken(s string)
- func (m *UserMutation) SetConfirmed(b bool)
- func (m *UserMutation) SetCreatedAt(t time.Time)
- func (m *UserMutation) SetEmail(s string)
- func (m *UserMutation) SetEmailChange(s string)
- func (m *UserMutation) SetEmailChangeSentAt(t time.Time)
- func (m *UserMutation) SetEmailChangeToken(s string)
- func (m *UserMutation) SetField(name string, value ent.Value) error
- func (m *UserMutation) SetID(id uuid.UUID)
- func (m *UserMutation) SetLastSigninAt(t time.Time)
- func (m *UserMutation) SetMetadata(value map[string]interface{})
- func (m *UserMutation) SetOtp(s string)
- func (m *UserMutation) SetOtpSentAt(t time.Time)
- func (m *UserMutation) SetPassword(s string)
- func (m *UserMutation) SetProvider(s string)
- func (m *UserMutation) SetRecoverySentAt(t time.Time)
- func (m *UserMutation) SetRecoveryToken(s string)
- func (m *UserMutation) SetUpdatedAt(t time.Time)
- func (m UserMutation) Tx() (*Tx, error)
- func (m *UserMutation) Type() string
- func (m *UserMutation) UpdatedAt() (r time.Time, exists bool)
- type UserQuery
- 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 uuid.UUID, err error)
- func (uq *UserQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (uq *UserQuery) FirstX(ctx context.Context) *User
- func (uq *UserQuery) GroupBy(field string, fields ...string) *UserGroupBy
- func (uq *UserQuery) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (uq *UserQuery) IDsX(ctx context.Context) []uuid.UUID
- 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 uuid.UUID, err error)
- func (uq *UserQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (uq *UserQuery) OnlyX(ctx context.Context) *User
- func (uq *UserQuery) Order(o ...OrderFunc) *UserQuery
- func (uq *UserQuery) Select(field string, fields ...string) *UserSelect
- func (uq *UserQuery) Where(ps ...predicate.User) *UserQuery
- type UserSelect
- func (us *UserSelect) Bool(ctx context.Context) (_ bool, err error)
- func (us *UserSelect) BoolX(ctx context.Context) bool
- func (us *UserSelect) Bools(ctx context.Context) ([]bool, error)
- func (us *UserSelect) BoolsX(ctx context.Context) []bool
- func (us *UserSelect) Float64(ctx context.Context) (_ float64, err error)
- func (us *UserSelect) Float64X(ctx context.Context) float64
- func (us *UserSelect) Float64s(ctx context.Context) ([]float64, error)
- func (us *UserSelect) Float64sX(ctx context.Context) []float64
- func (us *UserSelect) Int(ctx context.Context) (_ int, err error)
- func (us *UserSelect) IntX(ctx context.Context) int
- func (us *UserSelect) Ints(ctx context.Context) ([]int, error)
- func (us *UserSelect) IntsX(ctx context.Context) []int
- func (us *UserSelect) Scan(ctx context.Context, v interface{}) error
- func (us *UserSelect) ScanX(ctx context.Context, v interface{})
- func (us *UserSelect) String(ctx context.Context) (_ string, err error)
- func (us *UserSelect) StringX(ctx context.Context) string
- func (us *UserSelect) Strings(ctx context.Context) ([]string, error)
- func (us *UserSelect) StringsX(ctx context.Context) []string
- type UserUpdate
- func (uu *UserUpdate) ClearAPIKey() *UserUpdate
- func (uu *UserUpdate) ClearBillingID() *UserUpdate
- func (uu *UserUpdate) ClearConfirmationSentAt() *UserUpdate
- func (uu *UserUpdate) ClearConfirmationToken() *UserUpdate
- func (uu *UserUpdate) ClearConfirmed() *UserUpdate
- func (uu *UserUpdate) ClearEmailChange() *UserUpdate
- func (uu *UserUpdate) ClearEmailChangeSentAt() *UserUpdate
- func (uu *UserUpdate) ClearEmailChangeToken() *UserUpdate
- func (uu *UserUpdate) ClearLastSigninAt() *UserUpdate
- func (uu *UserUpdate) ClearOtp() *UserUpdate
- func (uu *UserUpdate) ClearOtpSentAt() *UserUpdate
- func (uu *UserUpdate) ClearRecoverySentAt() *UserUpdate
- func (uu *UserUpdate) ClearRecoveryToken() *UserUpdate
- func (uu *UserUpdate) Exec(ctx context.Context) error
- func (uu *UserUpdate) ExecX(ctx context.Context)
- func (uu *UserUpdate) Mutation() *UserMutation
- func (uu *UserUpdate) Save(ctx context.Context) (int, error)
- func (uu *UserUpdate) SaveX(ctx context.Context) int
- func (uu *UserUpdate) SetAPIKey(s string) *UserUpdate
- func (uu *UserUpdate) SetBillingID(s string) *UserUpdate
- func (uu *UserUpdate) SetConfirmationSentAt(t time.Time) *UserUpdate
- func (uu *UserUpdate) SetConfirmationToken(s string) *UserUpdate
- func (uu *UserUpdate) SetConfirmed(b bool) *UserUpdate
- func (uu *UserUpdate) SetEmail(s string) *UserUpdate
- func (uu *UserUpdate) SetEmailChange(s string) *UserUpdate
- func (uu *UserUpdate) SetEmailChangeSentAt(t time.Time) *UserUpdate
- func (uu *UserUpdate) SetEmailChangeToken(s string) *UserUpdate
- func (uu *UserUpdate) SetLastSigninAt(t time.Time) *UserUpdate
- func (uu *UserUpdate) SetMetadata(m map[string]interface{}) *UserUpdate
- func (uu *UserUpdate) SetNillableAPIKey(s *string) *UserUpdate
- func (uu *UserUpdate) SetNillableBillingID(s *string) *UserUpdate
- func (uu *UserUpdate) SetNillableConfirmationSentAt(t *time.Time) *UserUpdate
- func (uu *UserUpdate) SetNillableConfirmationToken(s *string) *UserUpdate
- func (uu *UserUpdate) SetNillableConfirmed(b *bool) *UserUpdate
- func (uu *UserUpdate) SetNillableEmailChange(s *string) *UserUpdate
- func (uu *UserUpdate) SetNillableEmailChangeSentAt(t *time.Time) *UserUpdate
- func (uu *UserUpdate) SetNillableEmailChangeToken(s *string) *UserUpdate
- func (uu *UserUpdate) SetNillableLastSigninAt(t *time.Time) *UserUpdate
- func (uu *UserUpdate) SetNillableOtp(s *string) *UserUpdate
- func (uu *UserUpdate) SetNillableOtpSentAt(t *time.Time) *UserUpdate
- func (uu *UserUpdate) SetNillableRecoverySentAt(t *time.Time) *UserUpdate
- func (uu *UserUpdate) SetNillableRecoveryToken(s *string) *UserUpdate
- func (uu *UserUpdate) SetOtp(s string) *UserUpdate
- func (uu *UserUpdate) SetOtpSentAt(t time.Time) *UserUpdate
- func (uu *UserUpdate) SetPassword(s string) *UserUpdate
- func (uu *UserUpdate) SetProvider(s string) *UserUpdate
- func (uu *UserUpdate) SetRecoverySentAt(t time.Time) *UserUpdate
- func (uu *UserUpdate) SetRecoveryToken(s string) *UserUpdate
- func (uu *UserUpdate) SetUpdatedAt(t time.Time) *UserUpdate
- func (uu *UserUpdate) Where(ps ...predicate.User) *UserUpdate
- type UserUpdateOne
- func (uuo *UserUpdateOne) ClearAPIKey() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearBillingID() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearConfirmationSentAt() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearConfirmationToken() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearConfirmed() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearEmailChange() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearEmailChangeSentAt() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearEmailChangeToken() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearLastSigninAt() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearOtp() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearOtpSentAt() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearRecoverySentAt() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearRecoveryToken() *UserUpdateOne
- func (uuo *UserUpdateOne) Exec(ctx context.Context) error
- func (uuo *UserUpdateOne) ExecX(ctx context.Context)
- func (uuo *UserUpdateOne) Mutation() *UserMutation
- func (uuo *UserUpdateOne) Save(ctx context.Context) (*User, error)
- func (uuo *UserUpdateOne) SaveX(ctx context.Context) *User
- func (uuo *UserUpdateOne) SetAPIKey(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetBillingID(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetConfirmationSentAt(t time.Time) *UserUpdateOne
- func (uuo *UserUpdateOne) SetConfirmationToken(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetConfirmed(b bool) *UserUpdateOne
- func (uuo *UserUpdateOne) SetEmail(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetEmailChange(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetEmailChangeSentAt(t time.Time) *UserUpdateOne
- func (uuo *UserUpdateOne) SetEmailChangeToken(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetLastSigninAt(t time.Time) *UserUpdateOne
- func (uuo *UserUpdateOne) SetMetadata(m map[string]interface{}) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableAPIKey(s *string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableBillingID(s *string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableConfirmationSentAt(t *time.Time) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableConfirmationToken(s *string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableConfirmed(b *bool) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableEmailChange(s *string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableEmailChangeSentAt(t *time.Time) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableEmailChangeToken(s *string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableLastSigninAt(t *time.Time) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableOtp(s *string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableOtpSentAt(t *time.Time) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableRecoverySentAt(t *time.Time) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableRecoveryToken(s *string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetOtp(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetOtpSentAt(t time.Time) *UserUpdateOne
- func (uuo *UserUpdateOne) SetPassword(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetProvider(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetRecoverySentAt(t time.Time) *UserUpdateOne
- func (uuo *UserUpdateOne) SetRecoveryToken(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetUpdatedAt(t time.Time) *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. TypeSession = "Session" TypeUser = "User" )
Variables ¶
This section is empty.
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 validaton 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(models.As(models.Sum(field1), "sum_field1"), (models.As(models.Sum(field2), "sum_field2")). Scan(ctx, &v)
func Count ¶
func Count() AggregateFunc
Count applies the "count" aggregation function on each group.
func Max ¶
func Max(field string) AggregateFunc
Max applies the "max" aggregation function on the given field of each group.
func Mean ¶
func Mean(field string) AggregateFunc
Mean applies the "mean" aggregation function on the given field of each group.
func Min ¶
func Min(field string) AggregateFunc
Min applies the "min" aggregation function on the given field of each group.
func Sum ¶
func Sum(field string) AggregateFunc
Sum applies the "sum" aggregation function on the given field of each group.
type Client ¶
type Client struct { // Schema is the client for creating, migrating and dropping schema. Schema *migrate.Schema // Session is the client for interacting with the Session builders. Session *SessionClient // 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 the Client stored in 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(). Session. Query(). Count(ctx)
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(context.Context, tx *ent.Tx) error { // Do some stuff before. if err := next.Commit(ctx, tx); err != nil { return err } // Do some stuff after. return nil }) }
type ConstraintError ¶
type ConstraintError struct {
// contains filtered or unexported fields
}
ConstraintError returns when trying to create/update one or more entities and one or more of their constraints failed. For example, violation of edge or field uniqueness.
func (ConstraintError) Error ¶
func (e ConstraintError) Error() string
Error implements the error interface.
func (*ConstraintError) Unwrap ¶
func (e *ConstraintError) Unwrap() error
Unwrap implements the errors.Wrapper interface.
type MutateFunc ¶
type MutateFunc = ent.MutateFunc
ent aliases to avoid import conflict 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 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(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 Rollbacker method.
type Session ¶
type Session struct { // ID of the ent. ID string `json:"id,omitempty"` // Data holds the value of the "data" field. Data string `json:"data,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at,omitempty"` // UpdatedAt holds the value of the "updated_at" field. UpdatedAt time.Time `json:"updated_at,omitempty"` // ExpiresAt holds the value of the "expires_at" field. ExpiresAt *time.Time `json:"expires_at,omitempty"` // contains filtered or unexported fields }
Session is the model entity for the Session schema.
func (*Session) Unwrap ¶
Unwrap unwraps the entity that was returned from a transaction after it was closed, so that all next queries will be executed through the driver which created the transaction.
func (*Session) Update ¶
func (s *Session) Update() *SessionUpdateOne
Update returns a builder for updating this Session. Note that, you need to call Session.Unwrap() before calling this method, if this Session was returned from a transaction, and the transaction was committed or rolled back.
type SessionClient ¶
type SessionClient struct {
// contains filtered or unexported fields
}
SessionClient is a client for the Session schema.
func NewSessionClient ¶
func NewSessionClient(c config) *SessionClient
NewSessionClient returns a client for the Session from the given config.
func (*SessionClient) Create ¶
func (c *SessionClient) Create() *SessionCreate
Create returns a create builder for Session.
func (*SessionClient) CreateBulk ¶
func (c *SessionClient) CreateBulk(builders ...*SessionCreate) *SessionCreateBulk
CreateBulk returns a builder for creating a bulk of Session entities.
func (*SessionClient) Delete ¶
func (c *SessionClient) Delete() *SessionDelete
Delete returns a delete builder for Session.
func (*SessionClient) DeleteOne ¶
func (c *SessionClient) DeleteOne(s *Session) *SessionDeleteOne
DeleteOne returns a delete builder for the given entity.
func (*SessionClient) DeleteOneID ¶
func (c *SessionClient) DeleteOneID(id string) *SessionDeleteOne
DeleteOneID returns a delete builder for the given id.
func (*SessionClient) GetX ¶
func (c *SessionClient) GetX(ctx context.Context, id string) *Session
GetX is like Get, but panics if an error occurs.
func (*SessionClient) Hooks ¶
func (c *SessionClient) Hooks() []Hook
Hooks returns the client hooks.
func (*SessionClient) Query ¶
func (c *SessionClient) Query() *SessionQuery
Query returns a query builder for Session.
func (*SessionClient) Update ¶
func (c *SessionClient) Update() *SessionUpdate
Update returns an update builder for Session.
func (*SessionClient) UpdateOne ¶
func (c *SessionClient) UpdateOne(s *Session) *SessionUpdateOne
UpdateOne returns an update builder for the given entity.
func (*SessionClient) UpdateOneID ¶
func (c *SessionClient) UpdateOneID(id string) *SessionUpdateOne
UpdateOneID returns an update builder for the given id.
func (*SessionClient) Use ¶
func (c *SessionClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `session.Hooks(f(g(h())))`.
type SessionCreate ¶
type SessionCreate struct {
// contains filtered or unexported fields
}
SessionCreate is the builder for creating a Session entity.
func (*SessionCreate) Mutation ¶
func (sc *SessionCreate) Mutation() *SessionMutation
Mutation returns the SessionMutation object of the builder.
func (*SessionCreate) Save ¶
func (sc *SessionCreate) Save(ctx context.Context) (*Session, error)
Save creates the Session in the database.
func (*SessionCreate) SaveX ¶
func (sc *SessionCreate) SaveX(ctx context.Context) *Session
SaveX calls Save and panics if Save returns an error.
func (*SessionCreate) SetCreatedAt ¶
func (sc *SessionCreate) SetCreatedAt(t time.Time) *SessionCreate
SetCreatedAt sets the created_at field.
func (*SessionCreate) SetData ¶
func (sc *SessionCreate) SetData(s string) *SessionCreate
SetData sets the data field.
func (*SessionCreate) SetExpiresAt ¶
func (sc *SessionCreate) SetExpiresAt(t time.Time) *SessionCreate
SetExpiresAt sets the expires_at field.
func (*SessionCreate) SetID ¶
func (sc *SessionCreate) SetID(s string) *SessionCreate
SetID sets the id field.
func (*SessionCreate) SetNillableCreatedAt ¶
func (sc *SessionCreate) SetNillableCreatedAt(t *time.Time) *SessionCreate
SetNillableCreatedAt sets the created_at field if the given value is not nil.
func (*SessionCreate) SetNillableExpiresAt ¶
func (sc *SessionCreate) SetNillableExpiresAt(t *time.Time) *SessionCreate
SetNillableExpiresAt sets the expires_at field if the given value is not nil.
func (*SessionCreate) SetNillableUpdatedAt ¶
func (sc *SessionCreate) SetNillableUpdatedAt(t *time.Time) *SessionCreate
SetNillableUpdatedAt sets the updated_at field if the given value is not nil.
func (*SessionCreate) SetUpdatedAt ¶
func (sc *SessionCreate) SetUpdatedAt(t time.Time) *SessionCreate
SetUpdatedAt sets the updated_at field.
type SessionCreateBulk ¶
type SessionCreateBulk struct {
// contains filtered or unexported fields
}
SessionCreateBulk is the builder for creating a bulk of Session entities.
type SessionDelete ¶
type SessionDelete struct {
// contains filtered or unexported fields
}
SessionDelete is the builder for deleting a Session entity.
func (*SessionDelete) Exec ¶
func (sd *SessionDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*SessionDelete) ExecX ¶
func (sd *SessionDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*SessionDelete) Where ¶
func (sd *SessionDelete) Where(ps ...predicate.Session) *SessionDelete
Where adds a new predicate to the delete builder.
type SessionDeleteOne ¶
type SessionDeleteOne struct {
// contains filtered or unexported fields
}
SessionDeleteOne is the builder for deleting a single Session entity.
func (*SessionDeleteOne) Exec ¶
func (sdo *SessionDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*SessionDeleteOne) ExecX ¶
func (sdo *SessionDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type SessionGroupBy ¶
type SessionGroupBy struct {
// contains filtered or unexported fields
}
SessionGroupBy is the builder for group-by Session entities.
func (*SessionGroupBy) Aggregate ¶
func (sgb *SessionGroupBy) Aggregate(fns ...AggregateFunc) *SessionGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*SessionGroupBy) Bool ¶
func (sgb *SessionGroupBy) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from group-by. It is only allowed when querying group-by with one field.
func (*SessionGroupBy) BoolX ¶
func (sgb *SessionGroupBy) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*SessionGroupBy) Bools ¶
func (sgb *SessionGroupBy) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from group-by. It is only allowed when querying group-by with one field.
func (*SessionGroupBy) BoolsX ¶
func (sgb *SessionGroupBy) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*SessionGroupBy) Float64 ¶
func (sgb *SessionGroupBy) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from group-by. It is only allowed when querying group-by with one field.
func (*SessionGroupBy) Float64X ¶
func (sgb *SessionGroupBy) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*SessionGroupBy) Float64s ¶
func (sgb *SessionGroupBy) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from group-by. It is only allowed when querying group-by with one field.
func (*SessionGroupBy) Float64sX ¶
func (sgb *SessionGroupBy) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*SessionGroupBy) Int ¶
func (sgb *SessionGroupBy) Int(ctx context.Context) (_ int, err error)
Int returns a single int from group-by. It is only allowed when querying group-by with one field.
func (*SessionGroupBy) IntX ¶
func (sgb *SessionGroupBy) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*SessionGroupBy) Ints ¶
func (sgb *SessionGroupBy) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from group-by. It is only allowed when querying group-by with one field.
func (*SessionGroupBy) IntsX ¶
func (sgb *SessionGroupBy) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*SessionGroupBy) Scan ¶
func (sgb *SessionGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scan the result into the given value.
func (*SessionGroupBy) ScanX ¶
func (sgb *SessionGroupBy) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*SessionGroupBy) String ¶
func (sgb *SessionGroupBy) String(ctx context.Context) (_ string, err error)
String returns a single string from group-by. It is only allowed when querying group-by with one field.
func (*SessionGroupBy) StringX ¶
func (sgb *SessionGroupBy) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type SessionMutation ¶
type SessionMutation struct {
// contains filtered or unexported fields
}
SessionMutation represents an operation that mutate the Sessions nodes in the graph.
func (*SessionMutation) AddField ¶
func (m *SessionMutation) AddField(name string, value ent.Value) error
AddField adds the value for the given name. It returns an error if the field is not defined in the schema, or if the type mismatch the field type.
func (*SessionMutation) AddedEdges ¶
func (m *SessionMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*SessionMutation) AddedField ¶
func (m *SessionMutation) AddedField(name string) (ent.Value, bool)
AddedField returns the numeric value that was in/decremented from a field with the given name. The second value indicates that this field was not set, or was not define in the schema.
func (*SessionMutation) AddedFields ¶
func (m *SessionMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented or decremented during this mutation.
func (*SessionMutation) AddedIDs ¶
func (m *SessionMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all ids (to other nodes) that were added for the given edge name.
func (*SessionMutation) ClearEdge ¶
func (m *SessionMutation) ClearEdge(name string) error
ClearEdge clears the value for the given name. It returns an error if the edge name is not defined in the schema.
func (*SessionMutation) ClearExpiresAt ¶
func (m *SessionMutation) ClearExpiresAt()
ClearExpiresAt clears the value of expires_at.
func (*SessionMutation) ClearField ¶
func (m *SessionMutation) ClearField(name string) error
ClearField clears the value for the given name. It returns an error if the field is not defined in the schema.
func (*SessionMutation) ClearedEdges ¶
func (m *SessionMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*SessionMutation) ClearedFields ¶
func (m *SessionMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (SessionMutation) Client ¶
func (m SessionMutation) 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 (*SessionMutation) CreatedAt ¶
func (m *SessionMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the created_at value in the mutation.
func (*SessionMutation) Data ¶
func (m *SessionMutation) Data() (r string, exists bool)
Data returns the data value in the mutation.
func (*SessionMutation) EdgeCleared ¶
func (m *SessionMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean indicates if this edge was cleared in this mutation.
func (*SessionMutation) ExpiresAt ¶
func (m *SessionMutation) ExpiresAt() (r time.Time, exists bool)
ExpiresAt returns the expires_at value in the mutation.
func (*SessionMutation) ExpiresAtCleared ¶
func (m *SessionMutation) ExpiresAtCleared() bool
ExpiresAtCleared returns if the field expires_at was cleared in this mutation.
func (*SessionMutation) Field ¶
func (m *SessionMutation) Field(name string) (ent.Value, bool)
Field returns the value of a field with the given name. The second boolean value indicates that this field was not set, or was not define in the schema.
func (*SessionMutation) FieldCleared ¶
func (m *SessionMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicates if this field was cleared in this mutation.
func (*SessionMutation) Fields ¶
func (m *SessionMutation) Fields() []string
Fields returns all fields that were changed during this mutation. Note that, in order to get all numeric fields that were in/decremented, call AddedFields().
func (*SessionMutation) ID ¶
func (m *SessionMutation) ID() (id string, exists bool)
ID returns the id value in the mutation. Note that, the id is available only if it was provided to the builder.
func (*SessionMutation) OldCreatedAt ¶
OldCreatedAt returns the old created_at value of the Session. If the Session 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 database query fails.
func (*SessionMutation) OldData ¶
func (m *SessionMutation) OldData(ctx context.Context) (v string, err error)
OldData returns the old data value of the Session. If the Session 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 database query fails.
func (*SessionMutation) OldExpiresAt ¶
OldExpiresAt returns the old expires_at value of the Session. If the Session 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 database query fails.
func (*SessionMutation) 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 was failed.
func (*SessionMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old updated_at value of the Session. If the Session 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 database query fails.
func (*SessionMutation) RemovedEdges ¶
func (m *SessionMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*SessionMutation) RemovedIDs ¶
func (m *SessionMutation) RemovedIDs(name string) []ent.Value
RemovedIDs returns all ids (to other nodes) that were removed for the given edge name.
func (*SessionMutation) ResetCreatedAt ¶
func (m *SessionMutation) ResetCreatedAt()
ResetCreatedAt reset all changes of the "created_at" field.
func (*SessionMutation) ResetData ¶
func (m *SessionMutation) ResetData()
ResetData reset all changes of the "data" field.
func (*SessionMutation) ResetEdge ¶
func (m *SessionMutation) ResetEdge(name string) error
ResetEdge resets all changes in the mutation regarding the given edge name. It returns an error if the edge is not defined in the schema.
func (*SessionMutation) ResetExpiresAt ¶
func (m *SessionMutation) ResetExpiresAt()
ResetExpiresAt reset all changes of the "expires_at" field.
func (*SessionMutation) ResetField ¶
func (m *SessionMutation) ResetField(name string) error
ResetField resets all changes in the mutation regarding the given field name. It returns an error if the field is not defined in the schema.
func (*SessionMutation) ResetUpdatedAt ¶
func (m *SessionMutation) ResetUpdatedAt()
ResetUpdatedAt reset all changes of the "updated_at" field.
func (*SessionMutation) SetCreatedAt ¶
func (m *SessionMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the created_at field.
func (*SessionMutation) SetData ¶
func (m *SessionMutation) SetData(s string)
SetData sets the data field.
func (*SessionMutation) SetExpiresAt ¶
func (m *SessionMutation) SetExpiresAt(t time.Time)
SetExpiresAt sets the expires_at field.
func (*SessionMutation) SetField ¶
func (m *SessionMutation) SetField(name string, value ent.Value) error
SetField sets the value for the given name. It returns an error if the field is not defined in the schema, or if the type mismatch the field type.
func (*SessionMutation) SetID ¶
func (m *SessionMutation) SetID(id string)
SetID sets the value of the id field. Note that, this operation is accepted only on Session creation.
func (*SessionMutation) SetUpdatedAt ¶
func (m *SessionMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the updated_at field.
func (SessionMutation) Tx ¶
func (m SessionMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*SessionMutation) Type ¶
func (m *SessionMutation) Type() string
Type returns the node type of this mutation (Session).
type SessionQuery ¶
type SessionQuery struct {
// contains filtered or unexported fields
}
SessionQuery is the builder for querying Session entities.
func (*SessionQuery) All ¶
func (sq *SessionQuery) All(ctx context.Context) ([]*Session, error)
All executes the query and returns a list of Sessions.
func (*SessionQuery) AllX ¶
func (sq *SessionQuery) AllX(ctx context.Context) []*Session
AllX is like All, but panics if an error occurs.
func (*SessionQuery) Clone ¶
func (sq *SessionQuery) Clone() *SessionQuery
Clone returns a duplicate of the query builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*SessionQuery) Count ¶
func (sq *SessionQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*SessionQuery) CountX ¶
func (sq *SessionQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*SessionQuery) Exist ¶
func (sq *SessionQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*SessionQuery) ExistX ¶
func (sq *SessionQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*SessionQuery) First ¶
func (sq *SessionQuery) First(ctx context.Context) (*Session, error)
First returns the first Session entity in the query. Returns *NotFoundError when no session was found.
func (*SessionQuery) FirstID ¶
func (sq *SessionQuery) FirstID(ctx context.Context) (id string, err error)
FirstID returns the first Session id in the query. Returns *NotFoundError when no id was found.
func (*SessionQuery) FirstIDX ¶
func (sq *SessionQuery) FirstIDX(ctx context.Context) string
FirstIDX is like FirstID, but panics if an error occurs.
func (*SessionQuery) FirstX ¶
func (sq *SessionQuery) FirstX(ctx context.Context) *Session
FirstX is like First, but panics if an error occurs.
func (*SessionQuery) GroupBy ¶
func (sq *SessionQuery) GroupBy(field string, fields ...string) *SessionGroupBy
GroupBy 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 { Data string `json:"data,omitempty"` Count int `json:"count,omitempty"` } client.Session.Query(). GroupBy(session.FieldData). Aggregate(models.Count()). Scan(ctx, &v)
func (*SessionQuery) IDs ¶
func (sq *SessionQuery) IDs(ctx context.Context) ([]string, error)
IDs executes the query and returns a list of Session ids.
func (*SessionQuery) IDsX ¶
func (sq *SessionQuery) IDsX(ctx context.Context) []string
IDsX is like IDs, but panics if an error occurs.
func (*SessionQuery) Limit ¶
func (sq *SessionQuery) Limit(limit int) *SessionQuery
Limit adds a limit step to the query.
func (*SessionQuery) Offset ¶
func (sq *SessionQuery) Offset(offset int) *SessionQuery
Offset adds an offset step to the query.
func (*SessionQuery) Only ¶
func (sq *SessionQuery) Only(ctx context.Context) (*Session, error)
Only returns the only Session entity in the query, returns an error if not exactly one entity was returned.
func (*SessionQuery) OnlyID ¶
func (sq *SessionQuery) OnlyID(ctx context.Context) (id string, err error)
OnlyID returns the only Session id in the query, returns an error if not exactly one id was returned.
func (*SessionQuery) OnlyIDX ¶
func (sq *SessionQuery) OnlyIDX(ctx context.Context) string
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*SessionQuery) OnlyX ¶
func (sq *SessionQuery) OnlyX(ctx context.Context) *Session
OnlyX is like Only, but panics if an error occurs.
func (*SessionQuery) Order ¶
func (sq *SessionQuery) Order(o ...OrderFunc) *SessionQuery
Order adds an order step to the query.
func (*SessionQuery) Select ¶
func (sq *SessionQuery) Select(field string, fields ...string) *SessionSelect
Select one or more fields from the given query.
Example:
var v []struct { Data string `json:"data,omitempty"` } client.Session.Query(). Select(session.FieldData). Scan(ctx, &v)
func (*SessionQuery) Where ¶
func (sq *SessionQuery) Where(ps ...predicate.Session) *SessionQuery
Where adds a new predicate for the builder.
type SessionSelect ¶
type SessionSelect struct {
// contains filtered or unexported fields
}
SessionSelect is the builder for select fields of Session entities.
func (*SessionSelect) Bool ¶
func (ss *SessionSelect) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from selector. It is only allowed when selecting one field.
func (*SessionSelect) BoolX ¶
func (ss *SessionSelect) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*SessionSelect) Bools ¶
func (ss *SessionSelect) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from selector. It is only allowed when selecting one field.
func (*SessionSelect) BoolsX ¶
func (ss *SessionSelect) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*SessionSelect) Float64 ¶
func (ss *SessionSelect) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from selector. It is only allowed when selecting one field.
func (*SessionSelect) Float64X ¶
func (ss *SessionSelect) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*SessionSelect) Float64s ¶
func (ss *SessionSelect) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from selector. It is only allowed when selecting one field.
func (*SessionSelect) Float64sX ¶
func (ss *SessionSelect) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*SessionSelect) Int ¶
func (ss *SessionSelect) Int(ctx context.Context) (_ int, err error)
Int returns a single int from selector. It is only allowed when selecting one field.
func (*SessionSelect) IntX ¶
func (ss *SessionSelect) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*SessionSelect) Ints ¶
func (ss *SessionSelect) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from selector. It is only allowed when selecting one field.
func (*SessionSelect) IntsX ¶
func (ss *SessionSelect) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*SessionSelect) Scan ¶
func (ss *SessionSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scan the result into the given value.
func (*SessionSelect) ScanX ¶
func (ss *SessionSelect) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*SessionSelect) String ¶
func (ss *SessionSelect) String(ctx context.Context) (_ string, err error)
String returns a single string from selector. It is only allowed when selecting one field.
func (*SessionSelect) StringX ¶
func (ss *SessionSelect) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type SessionUpdate ¶
type SessionUpdate struct {
// contains filtered or unexported fields
}
SessionUpdate is the builder for updating Session entities.
func (*SessionUpdate) ClearExpiresAt ¶
func (su *SessionUpdate) ClearExpiresAt() *SessionUpdate
ClearExpiresAt clears the value of expires_at.
func (*SessionUpdate) Exec ¶
func (su *SessionUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*SessionUpdate) ExecX ¶
func (su *SessionUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SessionUpdate) Mutation ¶
func (su *SessionUpdate) Mutation() *SessionMutation
Mutation returns the SessionMutation object of the builder.
func (*SessionUpdate) Save ¶
func (su *SessionUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*SessionUpdate) SaveX ¶
func (su *SessionUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*SessionUpdate) SetData ¶
func (su *SessionUpdate) SetData(s string) *SessionUpdate
SetData sets the data field.
func (*SessionUpdate) SetExpiresAt ¶
func (su *SessionUpdate) SetExpiresAt(t time.Time) *SessionUpdate
SetExpiresAt sets the expires_at field.
func (*SessionUpdate) SetNillableExpiresAt ¶
func (su *SessionUpdate) SetNillableExpiresAt(t *time.Time) *SessionUpdate
SetNillableExpiresAt sets the expires_at field if the given value is not nil.
func (*SessionUpdate) SetUpdatedAt ¶
func (su *SessionUpdate) SetUpdatedAt(t time.Time) *SessionUpdate
SetUpdatedAt sets the updated_at field.
func (*SessionUpdate) Where ¶
func (su *SessionUpdate) Where(ps ...predicate.Session) *SessionUpdate
Where adds a new predicate for the builder.
type SessionUpdateOne ¶
type SessionUpdateOne struct {
// contains filtered or unexported fields
}
SessionUpdateOne is the builder for updating a single Session entity.
func (*SessionUpdateOne) ClearExpiresAt ¶
func (suo *SessionUpdateOne) ClearExpiresAt() *SessionUpdateOne
ClearExpiresAt clears the value of expires_at.
func (*SessionUpdateOne) Exec ¶
func (suo *SessionUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*SessionUpdateOne) ExecX ¶
func (suo *SessionUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SessionUpdateOne) Mutation ¶
func (suo *SessionUpdateOne) Mutation() *SessionMutation
Mutation returns the SessionMutation object of the builder.
func (*SessionUpdateOne) Save ¶
func (suo *SessionUpdateOne) Save(ctx context.Context) (*Session, error)
Save executes the query and returns the updated entity.
func (*SessionUpdateOne) SaveX ¶
func (suo *SessionUpdateOne) SaveX(ctx context.Context) *Session
SaveX is like Save, but panics if an error occurs.
func (*SessionUpdateOne) SetData ¶
func (suo *SessionUpdateOne) SetData(s string) *SessionUpdateOne
SetData sets the data field.
func (*SessionUpdateOne) SetExpiresAt ¶
func (suo *SessionUpdateOne) SetExpiresAt(t time.Time) *SessionUpdateOne
SetExpiresAt sets the expires_at field.
func (*SessionUpdateOne) SetNillableExpiresAt ¶
func (suo *SessionUpdateOne) SetNillableExpiresAt(t *time.Time) *SessionUpdateOne
SetNillableExpiresAt sets the expires_at field if the given value is not nil.
func (*SessionUpdateOne) SetUpdatedAt ¶
func (suo *SessionUpdateOne) SetUpdatedAt(t time.Time) *SessionUpdateOne
SetUpdatedAt sets the updated_at field.
type Tx ¶
type Tx struct { // Session is the client for interacting with the Session builders. Session *SessionClient // 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 the Tx stored in 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 uuid.UUID `json:"id,omitempty"` // BillingID holds the value of the "billing_id" field. BillingID string `json:"billing_id,omitempty"` // Provider holds the value of the "provider" field. Provider string `json:"provider,omitempty"` // Email holds the value of the "email" field. Email string `json:"email,omitempty"` // Password holds the value of the "password" field. Password string `json:"-"` // APIKey holds the value of the "api_key" field. APIKey string `json:"-"` // Confirmed holds the value of the "confirmed" field. Confirmed bool `json:"confirmed,omitempty"` // ConfirmationSentAt holds the value of the "confirmation_sent_at" field. ConfirmationSentAt *time.Time `json:"confirmation_sent_at,omitempty"` // ConfirmationToken holds the value of the "confirmation_token" field. ConfirmationToken *string `json:"confirmation_token,omitempty"` // RecoverySentAt holds the value of the "recovery_sent_at" field. RecoverySentAt *time.Time `json:"recovery_sent_at,omitempty"` // RecoveryToken holds the value of the "recovery_token" field. RecoveryToken *string `json:"recovery_token,omitempty"` // OtpSentAt holds the value of the "otp_sent_at" field. OtpSentAt *time.Time `json:"otp_sent_at,omitempty"` // Otp holds the value of the "otp" field. Otp *string `json:"otp,omitempty"` // EmailChange holds the value of the "email_change" field. EmailChange string `json:"email_change,omitempty"` // EmailChangeSentAt holds the value of the "email_change_sent_at" field. EmailChangeSentAt *time.Time `json:"email_change_sent_at,omitempty"` // EmailChangeToken holds the value of the "email_change_token" field. EmailChangeToken *string `json:"email_change_token,omitempty"` // Metadata holds the value of the "metadata" field. Metadata map[string]interface{} `json:"metadata,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at,omitempty"` // UpdatedAt holds the value of the "updated_at" field. UpdatedAt time.Time `json:"updated_at,omitempty"` // LastSigninAt holds the value of the "last_signin_at" field. LastSigninAt *time.Time `json:"last_signin_at,omitempty"` // contains filtered or unexported fields }
User is the model entity for the User schema.
func (*User) Unwrap ¶
Unwrap unwraps the entity that was returned from a transaction after it was closed, so that all next 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 create builder for User.
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 delete builder for the given entity.
func (*UserClient) DeleteOneID ¶
func (c *UserClient) DeleteOneID(id uuid.UUID) *UserDeleteOne
DeleteOneID returns a delete builder for the given id.
func (*UserClient) Query ¶
func (c *UserClient) Query() *UserQuery
Query returns a query builder for 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 uuid.UUID) *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) 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) SetAPIKey ¶
func (uc *UserCreate) SetAPIKey(s string) *UserCreate
SetAPIKey sets the api_key field.
func (*UserCreate) SetBillingID ¶ added in v0.1.2
func (uc *UserCreate) SetBillingID(s string) *UserCreate
SetBillingID sets the billing_id field.
func (*UserCreate) SetConfirmationSentAt ¶
func (uc *UserCreate) SetConfirmationSentAt(t time.Time) *UserCreate
SetConfirmationSentAt sets the confirmation_sent_at field.
func (*UserCreate) SetConfirmationToken ¶
func (uc *UserCreate) SetConfirmationToken(s string) *UserCreate
SetConfirmationToken sets the confirmation_token field.
func (*UserCreate) SetConfirmed ¶
func (uc *UserCreate) SetConfirmed(b bool) *UserCreate
SetConfirmed sets the confirmed field.
func (*UserCreate) SetCreatedAt ¶
func (uc *UserCreate) SetCreatedAt(t time.Time) *UserCreate
SetCreatedAt sets the created_at field.
func (*UserCreate) SetEmail ¶
func (uc *UserCreate) SetEmail(s string) *UserCreate
SetEmail sets the email field.
func (*UserCreate) SetEmailChange ¶
func (uc *UserCreate) SetEmailChange(s string) *UserCreate
SetEmailChange sets the email_change field.
func (*UserCreate) SetEmailChangeSentAt ¶
func (uc *UserCreate) SetEmailChangeSentAt(t time.Time) *UserCreate
SetEmailChangeSentAt sets the email_change_sent_at field.
func (*UserCreate) SetEmailChangeToken ¶
func (uc *UserCreate) SetEmailChangeToken(s string) *UserCreate
SetEmailChangeToken sets the email_change_token field.
func (*UserCreate) SetID ¶
func (uc *UserCreate) SetID(u uuid.UUID) *UserCreate
SetID sets the id field.
func (*UserCreate) SetLastSigninAt ¶
func (uc *UserCreate) SetLastSigninAt(t time.Time) *UserCreate
SetLastSigninAt sets the last_signin_at field.
func (*UserCreate) SetMetadata ¶
func (uc *UserCreate) SetMetadata(m map[string]interface{}) *UserCreate
SetMetadata sets the metadata field.
func (*UserCreate) SetNillableAPIKey ¶
func (uc *UserCreate) SetNillableAPIKey(s *string) *UserCreate
SetNillableAPIKey sets the api_key field if the given value is not nil.
func (*UserCreate) SetNillableBillingID ¶ added in v0.1.2
func (uc *UserCreate) SetNillableBillingID(s *string) *UserCreate
SetNillableBillingID sets the billing_id field if the given value is not nil.
func (*UserCreate) SetNillableConfirmationSentAt ¶
func (uc *UserCreate) SetNillableConfirmationSentAt(t *time.Time) *UserCreate
SetNillableConfirmationSentAt sets the confirmation_sent_at field if the given value is not nil.
func (*UserCreate) SetNillableConfirmationToken ¶
func (uc *UserCreate) SetNillableConfirmationToken(s *string) *UserCreate
SetNillableConfirmationToken sets the confirmation_token field if the given value is not nil.
func (*UserCreate) SetNillableConfirmed ¶
func (uc *UserCreate) SetNillableConfirmed(b *bool) *UserCreate
SetNillableConfirmed sets the confirmed field if the given value is not nil.
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) SetNillableEmailChange ¶
func (uc *UserCreate) SetNillableEmailChange(s *string) *UserCreate
SetNillableEmailChange sets the email_change field if the given value is not nil.
func (*UserCreate) SetNillableEmailChangeSentAt ¶
func (uc *UserCreate) SetNillableEmailChangeSentAt(t *time.Time) *UserCreate
SetNillableEmailChangeSentAt sets the email_change_sent_at field if the given value is not nil.
func (*UserCreate) SetNillableEmailChangeToken ¶
func (uc *UserCreate) SetNillableEmailChangeToken(s *string) *UserCreate
SetNillableEmailChangeToken sets the email_change_token field if the given value is not nil.
func (*UserCreate) SetNillableLastSigninAt ¶
func (uc *UserCreate) SetNillableLastSigninAt(t *time.Time) *UserCreate
SetNillableLastSigninAt sets the last_signin_at field if the given value is not nil.
func (*UserCreate) SetNillableOtp ¶
func (uc *UserCreate) SetNillableOtp(s *string) *UserCreate
SetNillableOtp sets the otp field if the given value is not nil.
func (*UserCreate) SetNillableOtpSentAt ¶
func (uc *UserCreate) SetNillableOtpSentAt(t *time.Time) *UserCreate
SetNillableOtpSentAt sets the otp_sent_at field if the given value is not nil.
func (*UserCreate) SetNillableRecoverySentAt ¶
func (uc *UserCreate) SetNillableRecoverySentAt(t *time.Time) *UserCreate
SetNillableRecoverySentAt sets the recovery_sent_at field if the given value is not nil.
func (*UserCreate) SetNillableRecoveryToken ¶
func (uc *UserCreate) SetNillableRecoveryToken(s *string) *UserCreate
SetNillableRecoveryToken sets the recovery_token field if the given value is not nil.
func (*UserCreate) SetNillableUpdatedAt ¶
func (uc *UserCreate) SetNillableUpdatedAt(t *time.Time) *UserCreate
SetNillableUpdatedAt sets the updated_at field if the given value is not nil.
func (*UserCreate) SetOtp ¶
func (uc *UserCreate) SetOtp(s string) *UserCreate
SetOtp sets the otp field.
func (*UserCreate) SetOtpSentAt ¶
func (uc *UserCreate) SetOtpSentAt(t time.Time) *UserCreate
SetOtpSentAt sets the otp_sent_at field.
func (*UserCreate) SetPassword ¶
func (uc *UserCreate) SetPassword(s string) *UserCreate
SetPassword sets the password field.
func (*UserCreate) SetProvider ¶
func (uc *UserCreate) SetProvider(s string) *UserCreate
SetProvider sets the provider field.
func (*UserCreate) SetRecoverySentAt ¶
func (uc *UserCreate) SetRecoverySentAt(t time.Time) *UserCreate
SetRecoverySentAt sets the recovery_sent_at field.
func (*UserCreate) SetRecoveryToken ¶
func (uc *UserCreate) SetRecoveryToken(s string) *UserCreate
SetRecoveryToken sets the recovery_token field.
func (*UserCreate) SetUpdatedAt ¶
func (uc *UserCreate) SetUpdatedAt(t time.Time) *UserCreate
SetUpdatedAt sets the updated_at field.
type UserCreateBulk ¶
type UserCreateBulk struct {
// contains filtered or unexported fields
}
UserCreateBulk is the builder for creating a bulk of User entities.
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 adds a new predicate to the delete 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.
type UserGroupBy ¶
type UserGroupBy struct {
// contains filtered or unexported fields
}
UserGroupBy is the builder for group-by 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 ¶
func (ugb *UserGroupBy) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from group-by. It is only allowed when querying group-by with one field.
func (*UserGroupBy) BoolX ¶
func (ugb *UserGroupBy) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*UserGroupBy) Bools ¶
func (ugb *UserGroupBy) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from group-by. It is only allowed when querying group-by with one field.
func (*UserGroupBy) BoolsX ¶
func (ugb *UserGroupBy) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*UserGroupBy) Float64 ¶
func (ugb *UserGroupBy) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from group-by. It is only allowed when querying group-by with one field.
func (*UserGroupBy) Float64X ¶
func (ugb *UserGroupBy) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*UserGroupBy) Float64s ¶
func (ugb *UserGroupBy) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from group-by. It is only allowed when querying group-by with one field.
func (*UserGroupBy) Float64sX ¶
func (ugb *UserGroupBy) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*UserGroupBy) Int ¶
func (ugb *UserGroupBy) Int(ctx context.Context) (_ int, err error)
Int returns a single int from group-by. It is only allowed when querying group-by with one field.
func (*UserGroupBy) IntX ¶
func (ugb *UserGroupBy) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*UserGroupBy) Ints ¶
func (ugb *UserGroupBy) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from group-by. It is only allowed when querying group-by with one field.
func (*UserGroupBy) IntsX ¶
func (ugb *UserGroupBy) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*UserGroupBy) Scan ¶
func (ugb *UserGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scan the result into the given value.
func (*UserGroupBy) ScanX ¶
func (ugb *UserGroupBy) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*UserGroupBy) String ¶
func (ugb *UserGroupBy) String(ctx context.Context) (_ string, err error)
String returns a single string from group-by. It is only allowed when querying group-by with one field.
func (*UserGroupBy) StringX ¶
func (ugb *UserGroupBy) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type UserMutation ¶
type UserMutation struct {
// contains filtered or unexported fields
}
UserMutation represents an operation that mutate the Users nodes in the graph.
func (*UserMutation) APIKey ¶
func (m *UserMutation) APIKey() (r string, exists bool)
APIKey returns the api_key value in the mutation.
func (*UserMutation) APIKeyCleared ¶
func (m *UserMutation) APIKeyCleared() bool
APIKeyCleared returns if the field api_key was cleared in this mutation.
func (*UserMutation) AddField ¶
func (m *UserMutation) AddField(name string, value ent.Value) error
AddField adds the value for the given name. It returns an error if the field is not defined in the schema, or if the type mismatch 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 in/decremented from a field with the given name. The second value indicates that this field was not set, or was not define in the schema.
func (*UserMutation) AddedFields ¶
func (m *UserMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented or 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.
func (*UserMutation) BillingID ¶ added in v0.1.2
func (m *UserMutation) BillingID() (r string, exists bool)
BillingID returns the billing_id value in the mutation.
func (*UserMutation) BillingIDCleared ¶ added in v0.1.2
func (m *UserMutation) BillingIDCleared() bool
BillingIDCleared returns if the field billing_id was cleared in this mutation.
func (*UserMutation) ClearAPIKey ¶
func (m *UserMutation) ClearAPIKey()
ClearAPIKey clears the value of api_key.
func (*UserMutation) ClearBillingID ¶ added in v0.1.2
func (m *UserMutation) ClearBillingID()
ClearBillingID clears the value of billing_id.
func (*UserMutation) ClearConfirmationSentAt ¶
func (m *UserMutation) ClearConfirmationSentAt()
ClearConfirmationSentAt clears the value of confirmation_sent_at.
func (*UserMutation) ClearConfirmationToken ¶
func (m *UserMutation) ClearConfirmationToken()
ClearConfirmationToken clears the value of confirmation_token.
func (*UserMutation) ClearConfirmed ¶
func (m *UserMutation) ClearConfirmed()
ClearConfirmed clears the value of confirmed.
func (*UserMutation) ClearEdge ¶
func (m *UserMutation) ClearEdge(name string) error
ClearEdge clears the value for the given name. It returns an error if the edge name is not defined in the schema.
func (*UserMutation) ClearEmailChange ¶
func (m *UserMutation) ClearEmailChange()
ClearEmailChange clears the value of email_change.
func (*UserMutation) ClearEmailChangeSentAt ¶
func (m *UserMutation) ClearEmailChangeSentAt()
ClearEmailChangeSentAt clears the value of email_change_sent_at.
func (*UserMutation) ClearEmailChangeToken ¶
func (m *UserMutation) ClearEmailChangeToken()
ClearEmailChangeToken clears the value of email_change_token.
func (*UserMutation) ClearField ¶
func (m *UserMutation) ClearField(name string) error
ClearField clears the value for the given name. It returns an error if the field is not defined in the schema.
func (*UserMutation) ClearLastSigninAt ¶
func (m *UserMutation) ClearLastSigninAt()
ClearLastSigninAt clears the value of last_signin_at.
func (*UserMutation) ClearOtpSentAt ¶
func (m *UserMutation) ClearOtpSentAt()
ClearOtpSentAt clears the value of otp_sent_at.
func (*UserMutation) ClearRecoverySentAt ¶
func (m *UserMutation) ClearRecoverySentAt()
ClearRecoverySentAt clears the value of recovery_sent_at.
func (*UserMutation) ClearRecoveryToken ¶
func (m *UserMutation) ClearRecoveryToken()
ClearRecoveryToken clears the value of recovery_token.
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) ConfirmationSentAt ¶
func (m *UserMutation) ConfirmationSentAt() (r time.Time, exists bool)
ConfirmationSentAt returns the confirmation_sent_at value in the mutation.
func (*UserMutation) ConfirmationSentAtCleared ¶
func (m *UserMutation) ConfirmationSentAtCleared() bool
ConfirmationSentAtCleared returns if the field confirmation_sent_at was cleared in this mutation.
func (*UserMutation) ConfirmationToken ¶
func (m *UserMutation) ConfirmationToken() (r string, exists bool)
ConfirmationToken returns the confirmation_token value in the mutation.
func (*UserMutation) ConfirmationTokenCleared ¶
func (m *UserMutation) ConfirmationTokenCleared() bool
ConfirmationTokenCleared returns if the field confirmation_token was cleared in this mutation.
func (*UserMutation) Confirmed ¶
func (m *UserMutation) Confirmed() (r bool, exists bool)
Confirmed returns the confirmed value in the mutation.
func (*UserMutation) ConfirmedCleared ¶
func (m *UserMutation) ConfirmedCleared() bool
ConfirmedCleared returns if the field confirmed was cleared in this mutation.
func (*UserMutation) CreatedAt ¶
func (m *UserMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the created_at value in the mutation.
func (*UserMutation) EdgeCleared ¶
func (m *UserMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean indicates if this edge was cleared in this mutation.
func (*UserMutation) Email ¶
func (m *UserMutation) Email() (r string, exists bool)
Email returns the email value in the mutation.
func (*UserMutation) EmailChange ¶
func (m *UserMutation) EmailChange() (r string, exists bool)
EmailChange returns the email_change value in the mutation.
func (*UserMutation) EmailChangeCleared ¶
func (m *UserMutation) EmailChangeCleared() bool
EmailChangeCleared returns if the field email_change was cleared in this mutation.
func (*UserMutation) EmailChangeSentAt ¶
func (m *UserMutation) EmailChangeSentAt() (r time.Time, exists bool)
EmailChangeSentAt returns the email_change_sent_at value in the mutation.
func (*UserMutation) EmailChangeSentAtCleared ¶
func (m *UserMutation) EmailChangeSentAtCleared() bool
EmailChangeSentAtCleared returns if the field email_change_sent_at was cleared in this mutation.
func (*UserMutation) EmailChangeToken ¶
func (m *UserMutation) EmailChangeToken() (r string, exists bool)
EmailChangeToken returns the email_change_token value in the mutation.
func (*UserMutation) EmailChangeTokenCleared ¶
func (m *UserMutation) EmailChangeTokenCleared() bool
EmailChangeTokenCleared returns if the field email_change_token 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 value indicates that this field was not set, or was not define in the schema.
func (*UserMutation) FieldCleared ¶
func (m *UserMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicates if this field 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 in/decremented, call AddedFields().
func (*UserMutation) ID ¶
func (m *UserMutation) ID() (id uuid.UUID, exists bool)
ID returns the id value in the mutation. Note that, the id is available only if it was provided to the builder.
func (*UserMutation) LastSigninAt ¶
func (m *UserMutation) LastSigninAt() (r time.Time, exists bool)
LastSigninAt returns the last_signin_at value in the mutation.
func (*UserMutation) LastSigninAtCleared ¶
func (m *UserMutation) LastSigninAtCleared() bool
LastSigninAtCleared returns if the field last_signin_at was cleared in this mutation.
func (*UserMutation) Metadata ¶
func (m *UserMutation) Metadata() (r map[string]interface{}, exists bool)
Metadata returns the metadata value in the mutation.
func (*UserMutation) OldAPIKey ¶
func (m *UserMutation) OldAPIKey(ctx context.Context) (v string, err error)
OldAPIKey returns the old api_key value of the User. 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 database query fails.
func (*UserMutation) OldBillingID ¶ added in v0.1.2
func (m *UserMutation) OldBillingID(ctx context.Context) (v string, err error)
OldBillingID returns the old billing_id value of the User. 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 database query fails.
func (*UserMutation) OldConfirmationSentAt ¶
OldConfirmationSentAt returns the old confirmation_sent_at value of the User. 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 database query fails.
func (*UserMutation) OldConfirmationToken ¶
func (m *UserMutation) OldConfirmationToken(ctx context.Context) (v *string, err error)
OldConfirmationToken returns the old confirmation_token value of the User. 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 database query fails.
func (*UserMutation) OldConfirmed ¶
func (m *UserMutation) OldConfirmed(ctx context.Context) (v bool, err error)
OldConfirmed returns the old confirmed value of the User. 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 database query fails.
func (*UserMutation) OldCreatedAt ¶
OldCreatedAt returns the old created_at value of the User. 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 database query fails.
func (*UserMutation) OldEmail ¶
func (m *UserMutation) OldEmail(ctx context.Context) (v string, err error)
OldEmail returns the old email value of the User. 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 database query fails.
func (*UserMutation) OldEmailChange ¶
func (m *UserMutation) OldEmailChange(ctx context.Context) (v string, err error)
OldEmailChange returns the old email_change value of the User. 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 database query fails.
func (*UserMutation) OldEmailChangeSentAt ¶
OldEmailChangeSentAt returns the old email_change_sent_at value of the User. 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 database query fails.
func (*UserMutation) OldEmailChangeToken ¶
func (m *UserMutation) OldEmailChangeToken(ctx context.Context) (v *string, err error)
OldEmailChangeToken returns the old email_change_token value of the User. 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 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 was failed.
func (*UserMutation) OldLastSigninAt ¶
OldLastSigninAt returns the old last_signin_at value of the User. 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 database query fails.
func (*UserMutation) OldMetadata ¶
func (m *UserMutation) OldMetadata(ctx context.Context) (v map[string]interface{}, err error)
OldMetadata returns the old metadata value of the User. 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 database query fails.
func (*UserMutation) OldOtp ¶
func (m *UserMutation) OldOtp(ctx context.Context) (v *string, err error)
OldOtp returns the old otp value of the User. 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 database query fails.
func (*UserMutation) OldOtpSentAt ¶
OldOtpSentAt returns the old otp_sent_at value of the User. 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 database query fails.
func (*UserMutation) OldPassword ¶
func (m *UserMutation) OldPassword(ctx context.Context) (v string, err error)
OldPassword returns the old password value of the User. 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 database query fails.
func (*UserMutation) OldProvider ¶
func (m *UserMutation) OldProvider(ctx context.Context) (v string, err error)
OldProvider returns the old provider value of the User. 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 database query fails.
func (*UserMutation) OldRecoverySentAt ¶
OldRecoverySentAt returns the old recovery_sent_at value of the User. 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 database query fails.
func (*UserMutation) OldRecoveryToken ¶
func (m *UserMutation) OldRecoveryToken(ctx context.Context) (v *string, err error)
OldRecoveryToken returns the old recovery_token value of the User. 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 database query fails.
func (*UserMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old updated_at value of the User. 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 database query fails.
func (*UserMutation) Otp ¶
func (m *UserMutation) Otp() (r string, exists bool)
Otp returns the otp value in the mutation.
func (*UserMutation) OtpCleared ¶
func (m *UserMutation) OtpCleared() bool
OtpCleared returns if the field otp was cleared in this mutation.
func (*UserMutation) OtpSentAt ¶
func (m *UserMutation) OtpSentAt() (r time.Time, exists bool)
OtpSentAt returns the otp_sent_at value in the mutation.
func (*UserMutation) OtpSentAtCleared ¶
func (m *UserMutation) OtpSentAtCleared() bool
OtpSentAtCleared returns if the field otp_sent_at was cleared in this mutation.
func (*UserMutation) Password ¶
func (m *UserMutation) Password() (r string, exists bool)
Password returns the password value in the mutation.
func (*UserMutation) Provider ¶
func (m *UserMutation) Provider() (r string, exists bool)
Provider returns the provider value in the mutation.
func (*UserMutation) RecoverySentAt ¶
func (m *UserMutation) RecoverySentAt() (r time.Time, exists bool)
RecoverySentAt returns the recovery_sent_at value in the mutation.
func (*UserMutation) RecoverySentAtCleared ¶
func (m *UserMutation) RecoverySentAtCleared() bool
RecoverySentAtCleared returns if the field recovery_sent_at was cleared in this mutation.
func (*UserMutation) RecoveryToken ¶
func (m *UserMutation) RecoveryToken() (r string, exists bool)
RecoveryToken returns the recovery_token value in the mutation.
func (*UserMutation) RecoveryTokenCleared ¶
func (m *UserMutation) RecoveryTokenCleared() bool
RecoveryTokenCleared returns if the field recovery_token was cleared in this mutation.
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 given edge name.
func (*UserMutation) ResetAPIKey ¶
func (m *UserMutation) ResetAPIKey()
ResetAPIKey reset all changes of the "api_key" field.
func (*UserMutation) ResetBillingID ¶ added in v0.1.2
func (m *UserMutation) ResetBillingID()
ResetBillingID reset all changes of the "billing_id" field.
func (*UserMutation) ResetConfirmationSentAt ¶
func (m *UserMutation) ResetConfirmationSentAt()
ResetConfirmationSentAt reset all changes of the "confirmation_sent_at" field.
func (*UserMutation) ResetConfirmationToken ¶
func (m *UserMutation) ResetConfirmationToken()
ResetConfirmationToken reset all changes of the "confirmation_token" field.
func (*UserMutation) ResetConfirmed ¶
func (m *UserMutation) ResetConfirmed()
ResetConfirmed reset all changes of the "confirmed" field.
func (*UserMutation) ResetCreatedAt ¶
func (m *UserMutation) ResetCreatedAt()
ResetCreatedAt reset all changes of the "created_at" field.
func (*UserMutation) ResetEdge ¶
func (m *UserMutation) ResetEdge(name string) error
ResetEdge resets all changes in the mutation regarding the given edge name. It returns an error if the edge is not defined in the schema.
func (*UserMutation) ResetEmail ¶
func (m *UserMutation) ResetEmail()
ResetEmail reset all changes of the "email" field.
func (*UserMutation) ResetEmailChange ¶
func (m *UserMutation) ResetEmailChange()
ResetEmailChange reset all changes of the "email_change" field.
func (*UserMutation) ResetEmailChangeSentAt ¶
func (m *UserMutation) ResetEmailChangeSentAt()
ResetEmailChangeSentAt reset all changes of the "email_change_sent_at" field.
func (*UserMutation) ResetEmailChangeToken ¶
func (m *UserMutation) ResetEmailChangeToken()
ResetEmailChangeToken reset all changes of the "email_change_token" field.
func (*UserMutation) ResetField ¶
func (m *UserMutation) ResetField(name string) error
ResetField resets all changes in the mutation regarding the given field name. It returns an error if the field is not defined in the schema.
func (*UserMutation) ResetLastSigninAt ¶
func (m *UserMutation) ResetLastSigninAt()
ResetLastSigninAt reset all changes of the "last_signin_at" field.
func (*UserMutation) ResetMetadata ¶
func (m *UserMutation) ResetMetadata()
ResetMetadata reset all changes of the "metadata" field.
func (*UserMutation) ResetOtp ¶
func (m *UserMutation) ResetOtp()
ResetOtp reset all changes of the "otp" field.
func (*UserMutation) ResetOtpSentAt ¶
func (m *UserMutation) ResetOtpSentAt()
ResetOtpSentAt reset all changes of the "otp_sent_at" field.
func (*UserMutation) ResetPassword ¶
func (m *UserMutation) ResetPassword()
ResetPassword reset all changes of the "password" field.
func (*UserMutation) ResetProvider ¶
func (m *UserMutation) ResetProvider()
ResetProvider reset all changes of the "provider" field.
func (*UserMutation) ResetRecoverySentAt ¶
func (m *UserMutation) ResetRecoverySentAt()
ResetRecoverySentAt reset all changes of the "recovery_sent_at" field.
func (*UserMutation) ResetRecoveryToken ¶
func (m *UserMutation) ResetRecoveryToken()
ResetRecoveryToken reset all changes of the "recovery_token" field.
func (*UserMutation) ResetUpdatedAt ¶
func (m *UserMutation) ResetUpdatedAt()
ResetUpdatedAt reset all changes of the "updated_at" field.
func (*UserMutation) SetAPIKey ¶
func (m *UserMutation) SetAPIKey(s string)
SetAPIKey sets the api_key field.
func (*UserMutation) SetBillingID ¶ added in v0.1.2
func (m *UserMutation) SetBillingID(s string)
SetBillingID sets the billing_id field.
func (*UserMutation) SetConfirmationSentAt ¶
func (m *UserMutation) SetConfirmationSentAt(t time.Time)
SetConfirmationSentAt sets the confirmation_sent_at field.
func (*UserMutation) SetConfirmationToken ¶
func (m *UserMutation) SetConfirmationToken(s string)
SetConfirmationToken sets the confirmation_token field.
func (*UserMutation) SetConfirmed ¶
func (m *UserMutation) SetConfirmed(b bool)
SetConfirmed sets the confirmed field.
func (*UserMutation) SetCreatedAt ¶
func (m *UserMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the created_at field.
func (*UserMutation) SetEmail ¶
func (m *UserMutation) SetEmail(s string)
SetEmail sets the email field.
func (*UserMutation) SetEmailChange ¶
func (m *UserMutation) SetEmailChange(s string)
SetEmailChange sets the email_change field.
func (*UserMutation) SetEmailChangeSentAt ¶
func (m *UserMutation) SetEmailChangeSentAt(t time.Time)
SetEmailChangeSentAt sets the email_change_sent_at field.
func (*UserMutation) SetEmailChangeToken ¶
func (m *UserMutation) SetEmailChangeToken(s string)
SetEmailChangeToken sets the email_change_token field.
func (*UserMutation) SetField ¶
func (m *UserMutation) SetField(name string, value ent.Value) error
SetField sets the value for the given name. It returns an error if the field is not defined in the schema, or if the type mismatch the field type.
func (*UserMutation) SetID ¶
func (m *UserMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that, this operation is accepted only on User creation.
func (*UserMutation) SetLastSigninAt ¶
func (m *UserMutation) SetLastSigninAt(t time.Time)
SetLastSigninAt sets the last_signin_at field.
func (*UserMutation) SetMetadata ¶
func (m *UserMutation) SetMetadata(value map[string]interface{})
SetMetadata sets the metadata field.
func (*UserMutation) SetOtpSentAt ¶
func (m *UserMutation) SetOtpSentAt(t time.Time)
SetOtpSentAt sets the otp_sent_at field.
func (*UserMutation) SetPassword ¶
func (m *UserMutation) SetPassword(s string)
SetPassword sets the password field.
func (*UserMutation) SetProvider ¶
func (m *UserMutation) SetProvider(s string)
SetProvider sets the provider field.
func (*UserMutation) SetRecoverySentAt ¶
func (m *UserMutation) SetRecoverySentAt(t time.Time)
SetRecoverySentAt sets the recovery_sent_at field.
func (*UserMutation) SetRecoveryToken ¶
func (m *UserMutation) SetRecoveryToken(s string)
SetRecoveryToken sets the recovery_token field.
func (*UserMutation) SetUpdatedAt ¶
func (m *UserMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the updated_at field.
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).
type UserQuery ¶
type UserQuery struct {
// contains filtered or unexported fields
}
UserQuery is the builder for querying User entities.
func (*UserQuery) Clone ¶
Clone returns a duplicate of the query 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 in the query. Returns *NotFoundError when no user was found.
func (*UserQuery) FirstID ¶
FirstID returns the first User id in the query. Returns *NotFoundError when no id was found.
func (*UserQuery) GroupBy ¶
func (uq *UserQuery) GroupBy(field string, fields ...string) *UserGroupBy
GroupBy 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 { BillingID string `json:"billing_id,omitempty"` Count int `json:"count,omitempty"` } client.User.Query(). GroupBy(user.FieldBillingID). Aggregate(models.Count()). Scan(ctx, &v)
func (*UserQuery) Only ¶
Only returns the only User entity in the query, returns an error if not exactly one entity was returned.
func (*UserQuery) OnlyID ¶
OnlyID returns the only User id in the query, returns an error if not exactly one id was returned.
type UserSelect ¶
type UserSelect struct {
// contains filtered or unexported fields
}
UserSelect is the builder for select fields of User entities.
func (*UserSelect) Bool ¶
func (us *UserSelect) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from selector. It is only allowed when selecting one field.
func (*UserSelect) BoolX ¶
func (us *UserSelect) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*UserSelect) Bools ¶
func (us *UserSelect) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from selector. It is only allowed when selecting one field.
func (*UserSelect) BoolsX ¶
func (us *UserSelect) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*UserSelect) Float64 ¶
func (us *UserSelect) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from selector. It is only allowed when selecting one field.
func (*UserSelect) Float64X ¶
func (us *UserSelect) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*UserSelect) Float64s ¶
func (us *UserSelect) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from selector. It is only allowed when selecting one field.
func (*UserSelect) Float64sX ¶
func (us *UserSelect) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*UserSelect) Int ¶
func (us *UserSelect) Int(ctx context.Context) (_ int, err error)
Int returns a single int from selector. It is only allowed when selecting one field.
func (*UserSelect) IntX ¶
func (us *UserSelect) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*UserSelect) Ints ¶
func (us *UserSelect) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from selector. It is only allowed when selecting one field.
func (*UserSelect) IntsX ¶
func (us *UserSelect) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*UserSelect) Scan ¶
func (us *UserSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scan the result into the given value.
func (*UserSelect) ScanX ¶
func (us *UserSelect) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*UserSelect) String ¶
func (us *UserSelect) String(ctx context.Context) (_ string, err error)
String returns a single string from selector. It is only allowed when selecting one field.
func (*UserSelect) StringX ¶
func (us *UserSelect) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type UserUpdate ¶
type UserUpdate struct {
// contains filtered or unexported fields
}
UserUpdate is the builder for updating User entities.
func (*UserUpdate) ClearAPIKey ¶
func (uu *UserUpdate) ClearAPIKey() *UserUpdate
ClearAPIKey clears the value of api_key.
func (*UserUpdate) ClearBillingID ¶ added in v0.1.2
func (uu *UserUpdate) ClearBillingID() *UserUpdate
ClearBillingID clears the value of billing_id.
func (*UserUpdate) ClearConfirmationSentAt ¶
func (uu *UserUpdate) ClearConfirmationSentAt() *UserUpdate
ClearConfirmationSentAt clears the value of confirmation_sent_at.
func (*UserUpdate) ClearConfirmationToken ¶
func (uu *UserUpdate) ClearConfirmationToken() *UserUpdate
ClearConfirmationToken clears the value of confirmation_token.
func (*UserUpdate) ClearConfirmed ¶
func (uu *UserUpdate) ClearConfirmed() *UserUpdate
ClearConfirmed clears the value of confirmed.
func (*UserUpdate) ClearEmailChange ¶
func (uu *UserUpdate) ClearEmailChange() *UserUpdate
ClearEmailChange clears the value of email_change.
func (*UserUpdate) ClearEmailChangeSentAt ¶
func (uu *UserUpdate) ClearEmailChangeSentAt() *UserUpdate
ClearEmailChangeSentAt clears the value of email_change_sent_at.
func (*UserUpdate) ClearEmailChangeToken ¶
func (uu *UserUpdate) ClearEmailChangeToken() *UserUpdate
ClearEmailChangeToken clears the value of email_change_token.
func (*UserUpdate) ClearLastSigninAt ¶
func (uu *UserUpdate) ClearLastSigninAt() *UserUpdate
ClearLastSigninAt clears the value of last_signin_at.
func (*UserUpdate) ClearOtp ¶
func (uu *UserUpdate) ClearOtp() *UserUpdate
ClearOtp clears the value of otp.
func (*UserUpdate) ClearOtpSentAt ¶
func (uu *UserUpdate) ClearOtpSentAt() *UserUpdate
ClearOtpSentAt clears the value of otp_sent_at.
func (*UserUpdate) ClearRecoverySentAt ¶
func (uu *UserUpdate) ClearRecoverySentAt() *UserUpdate
ClearRecoverySentAt clears the value of recovery_sent_at.
func (*UserUpdate) ClearRecoveryToken ¶
func (uu *UserUpdate) ClearRecoveryToken() *UserUpdate
ClearRecoveryToken clears the value of recovery_token.
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) 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) SetAPIKey ¶
func (uu *UserUpdate) SetAPIKey(s string) *UserUpdate
SetAPIKey sets the api_key field.
func (*UserUpdate) SetBillingID ¶ added in v0.1.2
func (uu *UserUpdate) SetBillingID(s string) *UserUpdate
SetBillingID sets the billing_id field.
func (*UserUpdate) SetConfirmationSentAt ¶
func (uu *UserUpdate) SetConfirmationSentAt(t time.Time) *UserUpdate
SetConfirmationSentAt sets the confirmation_sent_at field.
func (*UserUpdate) SetConfirmationToken ¶
func (uu *UserUpdate) SetConfirmationToken(s string) *UserUpdate
SetConfirmationToken sets the confirmation_token field.
func (*UserUpdate) SetConfirmed ¶
func (uu *UserUpdate) SetConfirmed(b bool) *UserUpdate
SetConfirmed sets the confirmed field.
func (*UserUpdate) SetEmail ¶
func (uu *UserUpdate) SetEmail(s string) *UserUpdate
SetEmail sets the email field.
func (*UserUpdate) SetEmailChange ¶
func (uu *UserUpdate) SetEmailChange(s string) *UserUpdate
SetEmailChange sets the email_change field.
func (*UserUpdate) SetEmailChangeSentAt ¶
func (uu *UserUpdate) SetEmailChangeSentAt(t time.Time) *UserUpdate
SetEmailChangeSentAt sets the email_change_sent_at field.
func (*UserUpdate) SetEmailChangeToken ¶
func (uu *UserUpdate) SetEmailChangeToken(s string) *UserUpdate
SetEmailChangeToken sets the email_change_token field.
func (*UserUpdate) SetLastSigninAt ¶
func (uu *UserUpdate) SetLastSigninAt(t time.Time) *UserUpdate
SetLastSigninAt sets the last_signin_at field.
func (*UserUpdate) SetMetadata ¶
func (uu *UserUpdate) SetMetadata(m map[string]interface{}) *UserUpdate
SetMetadata sets the metadata field.
func (*UserUpdate) SetNillableAPIKey ¶
func (uu *UserUpdate) SetNillableAPIKey(s *string) *UserUpdate
SetNillableAPIKey sets the api_key field if the given value is not nil.
func (*UserUpdate) SetNillableBillingID ¶ added in v0.1.2
func (uu *UserUpdate) SetNillableBillingID(s *string) *UserUpdate
SetNillableBillingID sets the billing_id field if the given value is not nil.
func (*UserUpdate) SetNillableConfirmationSentAt ¶
func (uu *UserUpdate) SetNillableConfirmationSentAt(t *time.Time) *UserUpdate
SetNillableConfirmationSentAt sets the confirmation_sent_at field if the given value is not nil.
func (*UserUpdate) SetNillableConfirmationToken ¶
func (uu *UserUpdate) SetNillableConfirmationToken(s *string) *UserUpdate
SetNillableConfirmationToken sets the confirmation_token field if the given value is not nil.
func (*UserUpdate) SetNillableConfirmed ¶
func (uu *UserUpdate) SetNillableConfirmed(b *bool) *UserUpdate
SetNillableConfirmed sets the confirmed field if the given value is not nil.
func (*UserUpdate) SetNillableEmailChange ¶
func (uu *UserUpdate) SetNillableEmailChange(s *string) *UserUpdate
SetNillableEmailChange sets the email_change field if the given value is not nil.
func (*UserUpdate) SetNillableEmailChangeSentAt ¶
func (uu *UserUpdate) SetNillableEmailChangeSentAt(t *time.Time) *UserUpdate
SetNillableEmailChangeSentAt sets the email_change_sent_at field if the given value is not nil.
func (*UserUpdate) SetNillableEmailChangeToken ¶
func (uu *UserUpdate) SetNillableEmailChangeToken(s *string) *UserUpdate
SetNillableEmailChangeToken sets the email_change_token field if the given value is not nil.
func (*UserUpdate) SetNillableLastSigninAt ¶
func (uu *UserUpdate) SetNillableLastSigninAt(t *time.Time) *UserUpdate
SetNillableLastSigninAt sets the last_signin_at field if the given value is not nil.
func (*UserUpdate) SetNillableOtp ¶
func (uu *UserUpdate) SetNillableOtp(s *string) *UserUpdate
SetNillableOtp sets the otp field if the given value is not nil.
func (*UserUpdate) SetNillableOtpSentAt ¶
func (uu *UserUpdate) SetNillableOtpSentAt(t *time.Time) *UserUpdate
SetNillableOtpSentAt sets the otp_sent_at field if the given value is not nil.
func (*UserUpdate) SetNillableRecoverySentAt ¶
func (uu *UserUpdate) SetNillableRecoverySentAt(t *time.Time) *UserUpdate
SetNillableRecoverySentAt sets the recovery_sent_at field if the given value is not nil.
func (*UserUpdate) SetNillableRecoveryToken ¶
func (uu *UserUpdate) SetNillableRecoveryToken(s *string) *UserUpdate
SetNillableRecoveryToken sets the recovery_token field if the given value is not nil.
func (*UserUpdate) SetOtp ¶
func (uu *UserUpdate) SetOtp(s string) *UserUpdate
SetOtp sets the otp field.
func (*UserUpdate) SetOtpSentAt ¶
func (uu *UserUpdate) SetOtpSentAt(t time.Time) *UserUpdate
SetOtpSentAt sets the otp_sent_at field.
func (*UserUpdate) SetPassword ¶
func (uu *UserUpdate) SetPassword(s string) *UserUpdate
SetPassword sets the password field.
func (*UserUpdate) SetProvider ¶
func (uu *UserUpdate) SetProvider(s string) *UserUpdate
SetProvider sets the provider field.
func (*UserUpdate) SetRecoverySentAt ¶
func (uu *UserUpdate) SetRecoverySentAt(t time.Time) *UserUpdate
SetRecoverySentAt sets the recovery_sent_at field.
func (*UserUpdate) SetRecoveryToken ¶
func (uu *UserUpdate) SetRecoveryToken(s string) *UserUpdate
SetRecoveryToken sets the recovery_token field.
func (*UserUpdate) SetUpdatedAt ¶
func (uu *UserUpdate) SetUpdatedAt(t time.Time) *UserUpdate
SetUpdatedAt sets the updated_at field.
func (*UserUpdate) Where ¶
func (uu *UserUpdate) Where(ps ...predicate.User) *UserUpdate
Where adds a new predicate for the builder.
type UserUpdateOne ¶
type UserUpdateOne struct {
// contains filtered or unexported fields
}
UserUpdateOne is the builder for updating a single User entity.
func (*UserUpdateOne) ClearAPIKey ¶
func (uuo *UserUpdateOne) ClearAPIKey() *UserUpdateOne
ClearAPIKey clears the value of api_key.
func (*UserUpdateOne) ClearBillingID ¶ added in v0.1.2
func (uuo *UserUpdateOne) ClearBillingID() *UserUpdateOne
ClearBillingID clears the value of billing_id.
func (*UserUpdateOne) ClearConfirmationSentAt ¶
func (uuo *UserUpdateOne) ClearConfirmationSentAt() *UserUpdateOne
ClearConfirmationSentAt clears the value of confirmation_sent_at.
func (*UserUpdateOne) ClearConfirmationToken ¶
func (uuo *UserUpdateOne) ClearConfirmationToken() *UserUpdateOne
ClearConfirmationToken clears the value of confirmation_token.
func (*UserUpdateOne) ClearConfirmed ¶
func (uuo *UserUpdateOne) ClearConfirmed() *UserUpdateOne
ClearConfirmed clears the value of confirmed.
func (*UserUpdateOne) ClearEmailChange ¶
func (uuo *UserUpdateOne) ClearEmailChange() *UserUpdateOne
ClearEmailChange clears the value of email_change.
func (*UserUpdateOne) ClearEmailChangeSentAt ¶
func (uuo *UserUpdateOne) ClearEmailChangeSentAt() *UserUpdateOne
ClearEmailChangeSentAt clears the value of email_change_sent_at.
func (*UserUpdateOne) ClearEmailChangeToken ¶
func (uuo *UserUpdateOne) ClearEmailChangeToken() *UserUpdateOne
ClearEmailChangeToken clears the value of email_change_token.
func (*UserUpdateOne) ClearLastSigninAt ¶
func (uuo *UserUpdateOne) ClearLastSigninAt() *UserUpdateOne
ClearLastSigninAt clears the value of last_signin_at.
func (*UserUpdateOne) ClearOtp ¶
func (uuo *UserUpdateOne) ClearOtp() *UserUpdateOne
ClearOtp clears the value of otp.
func (*UserUpdateOne) ClearOtpSentAt ¶
func (uuo *UserUpdateOne) ClearOtpSentAt() *UserUpdateOne
ClearOtpSentAt clears the value of otp_sent_at.
func (*UserUpdateOne) ClearRecoverySentAt ¶
func (uuo *UserUpdateOne) ClearRecoverySentAt() *UserUpdateOne
ClearRecoverySentAt clears the value of recovery_sent_at.
func (*UserUpdateOne) ClearRecoveryToken ¶
func (uuo *UserUpdateOne) ClearRecoveryToken() *UserUpdateOne
ClearRecoveryToken clears the value of recovery_token.
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) Save ¶
func (uuo *UserUpdateOne) Save(ctx context.Context) (*User, error)
Save executes the query and returns the updated entity.
func (*UserUpdateOne) SaveX ¶
func (uuo *UserUpdateOne) SaveX(ctx context.Context) *User
SaveX is like Save, but panics if an error occurs.
func (*UserUpdateOne) SetAPIKey ¶
func (uuo *UserUpdateOne) SetAPIKey(s string) *UserUpdateOne
SetAPIKey sets the api_key field.
func (*UserUpdateOne) SetBillingID ¶ added in v0.1.2
func (uuo *UserUpdateOne) SetBillingID(s string) *UserUpdateOne
SetBillingID sets the billing_id field.
func (*UserUpdateOne) SetConfirmationSentAt ¶
func (uuo *UserUpdateOne) SetConfirmationSentAt(t time.Time) *UserUpdateOne
SetConfirmationSentAt sets the confirmation_sent_at field.
func (*UserUpdateOne) SetConfirmationToken ¶
func (uuo *UserUpdateOne) SetConfirmationToken(s string) *UserUpdateOne
SetConfirmationToken sets the confirmation_token field.
func (*UserUpdateOne) SetConfirmed ¶
func (uuo *UserUpdateOne) SetConfirmed(b bool) *UserUpdateOne
SetConfirmed sets the confirmed field.
func (*UserUpdateOne) SetEmail ¶
func (uuo *UserUpdateOne) SetEmail(s string) *UserUpdateOne
SetEmail sets the email field.
func (*UserUpdateOne) SetEmailChange ¶
func (uuo *UserUpdateOne) SetEmailChange(s string) *UserUpdateOne
SetEmailChange sets the email_change field.
func (*UserUpdateOne) SetEmailChangeSentAt ¶
func (uuo *UserUpdateOne) SetEmailChangeSentAt(t time.Time) *UserUpdateOne
SetEmailChangeSentAt sets the email_change_sent_at field.
func (*UserUpdateOne) SetEmailChangeToken ¶
func (uuo *UserUpdateOne) SetEmailChangeToken(s string) *UserUpdateOne
SetEmailChangeToken sets the email_change_token field.
func (*UserUpdateOne) SetLastSigninAt ¶
func (uuo *UserUpdateOne) SetLastSigninAt(t time.Time) *UserUpdateOne
SetLastSigninAt sets the last_signin_at field.
func (*UserUpdateOne) SetMetadata ¶
func (uuo *UserUpdateOne) SetMetadata(m map[string]interface{}) *UserUpdateOne
SetMetadata sets the metadata field.
func (*UserUpdateOne) SetNillableAPIKey ¶
func (uuo *UserUpdateOne) SetNillableAPIKey(s *string) *UserUpdateOne
SetNillableAPIKey sets the api_key field if the given value is not nil.
func (*UserUpdateOne) SetNillableBillingID ¶ added in v0.1.2
func (uuo *UserUpdateOne) SetNillableBillingID(s *string) *UserUpdateOne
SetNillableBillingID sets the billing_id field if the given value is not nil.
func (*UserUpdateOne) SetNillableConfirmationSentAt ¶
func (uuo *UserUpdateOne) SetNillableConfirmationSentAt(t *time.Time) *UserUpdateOne
SetNillableConfirmationSentAt sets the confirmation_sent_at field if the given value is not nil.
func (*UserUpdateOne) SetNillableConfirmationToken ¶
func (uuo *UserUpdateOne) SetNillableConfirmationToken(s *string) *UserUpdateOne
SetNillableConfirmationToken sets the confirmation_token field if the given value is not nil.
func (*UserUpdateOne) SetNillableConfirmed ¶
func (uuo *UserUpdateOne) SetNillableConfirmed(b *bool) *UserUpdateOne
SetNillableConfirmed sets the confirmed field if the given value is not nil.
func (*UserUpdateOne) SetNillableEmailChange ¶
func (uuo *UserUpdateOne) SetNillableEmailChange(s *string) *UserUpdateOne
SetNillableEmailChange sets the email_change field if the given value is not nil.
func (*UserUpdateOne) SetNillableEmailChangeSentAt ¶
func (uuo *UserUpdateOne) SetNillableEmailChangeSentAt(t *time.Time) *UserUpdateOne
SetNillableEmailChangeSentAt sets the email_change_sent_at field if the given value is not nil.
func (*UserUpdateOne) SetNillableEmailChangeToken ¶
func (uuo *UserUpdateOne) SetNillableEmailChangeToken(s *string) *UserUpdateOne
SetNillableEmailChangeToken sets the email_change_token field if the given value is not nil.
func (*UserUpdateOne) SetNillableLastSigninAt ¶
func (uuo *UserUpdateOne) SetNillableLastSigninAt(t *time.Time) *UserUpdateOne
SetNillableLastSigninAt sets the last_signin_at field if the given value is not nil.
func (*UserUpdateOne) SetNillableOtp ¶
func (uuo *UserUpdateOne) SetNillableOtp(s *string) *UserUpdateOne
SetNillableOtp sets the otp field if the given value is not nil.
func (*UserUpdateOne) SetNillableOtpSentAt ¶
func (uuo *UserUpdateOne) SetNillableOtpSentAt(t *time.Time) *UserUpdateOne
SetNillableOtpSentAt sets the otp_sent_at field if the given value is not nil.
func (*UserUpdateOne) SetNillableRecoverySentAt ¶
func (uuo *UserUpdateOne) SetNillableRecoverySentAt(t *time.Time) *UserUpdateOne
SetNillableRecoverySentAt sets the recovery_sent_at field if the given value is not nil.
func (*UserUpdateOne) SetNillableRecoveryToken ¶
func (uuo *UserUpdateOne) SetNillableRecoveryToken(s *string) *UserUpdateOne
SetNillableRecoveryToken sets the recovery_token field if the given value is not nil.
func (*UserUpdateOne) SetOtp ¶
func (uuo *UserUpdateOne) SetOtp(s string) *UserUpdateOne
SetOtp sets the otp field.
func (*UserUpdateOne) SetOtpSentAt ¶
func (uuo *UserUpdateOne) SetOtpSentAt(t time.Time) *UserUpdateOne
SetOtpSentAt sets the otp_sent_at field.
func (*UserUpdateOne) SetPassword ¶
func (uuo *UserUpdateOne) SetPassword(s string) *UserUpdateOne
SetPassword sets the password field.
func (*UserUpdateOne) SetProvider ¶
func (uuo *UserUpdateOne) SetProvider(s string) *UserUpdateOne
SetProvider sets the provider field.
func (*UserUpdateOne) SetRecoverySentAt ¶
func (uuo *UserUpdateOne) SetRecoverySentAt(t time.Time) *UserUpdateOne
SetRecoverySentAt sets the recovery_sent_at field.
func (*UserUpdateOne) SetRecoveryToken ¶
func (uuo *UserUpdateOne) SetRecoveryToken(s string) *UserUpdateOne
SetRecoveryToken sets the recovery_token field.
func (*UserUpdateOne) SetUpdatedAt ¶
func (uuo *UserUpdateOne) SetUpdatedAt(t time.Time) *UserUpdateOne
SetUpdatedAt sets the updated_at field.
type ValidationError ¶
type ValidationError struct { Name string // Field or edge name. // contains filtered or unexported fields }
ValidationError returns when validating a field 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.