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 int) *SessionDeleteOne
- func (c *SessionClient) Get(ctx context.Context, id int) (*Session, error)
- func (c *SessionClient) GetX(ctx context.Context, id int) *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 int) *SessionUpdateOne
- func (c *SessionClient) Use(hooks ...Hook)
- type SessionCreate
- func (sc *SessionCreate) Exec(ctx context.Context) error
- func (sc *SessionCreate) ExecX(ctx context.Context)
- 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) SetData(m *model.Session) *SessionCreate
- func (sc *SessionCreate) SetKey(s string) *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) ClearField(name string) error
- func (m *SessionMutation) ClearedEdges() []string
- func (m *SessionMutation) ClearedFields() []string
- func (m SessionMutation) Client() *Client
- func (m *SessionMutation) Data() (r *model.Session, exists bool)
- func (m *SessionMutation) EdgeCleared(name string) 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 int, exists bool)
- func (m *SessionMutation) IDs(ctx context.Context) ([]int, error)
- func (m *SessionMutation) Key() (r string, exists bool)
- func (m *SessionMutation) OldData(ctx context.Context) (v *model.Session, err error)
- func (m *SessionMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *SessionMutation) OldKey(ctx context.Context) (v string, err error)
- func (m *SessionMutation) Op() Op
- func (m *SessionMutation) RemovedEdges() []string
- func (m *SessionMutation) RemovedIDs(name string) []ent.Value
- func (m *SessionMutation) ResetData()
- func (m *SessionMutation) ResetEdge(name string) error
- func (m *SessionMutation) ResetField(name string) error
- func (m *SessionMutation) ResetKey()
- func (m *SessionMutation) SetData(value *model.Session)
- func (m *SessionMutation) SetField(name string, value ent.Value) error
- func (m *SessionMutation) SetKey(s string)
- func (m SessionMutation) Tx() (*Tx, error)
- func (m *SessionMutation) Type() string
- func (m *SessionMutation) Where(ps ...predicate.Session)
- 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 int, err error)
- func (sq *SessionQuery) FirstIDX(ctx context.Context) int
- func (sq *SessionQuery) FirstX(ctx context.Context) *Session
- func (sq *SessionQuery) GroupBy(field string, fields ...string) *SessionGroupBy
- func (sq *SessionQuery) IDs(ctx context.Context) ([]int, error)
- func (sq *SessionQuery) IDsX(ctx context.Context) []int
- 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 int, err error)
- func (sq *SessionQuery) OnlyIDX(ctx context.Context) int
- func (sq *SessionQuery) OnlyX(ctx context.Context) *Session
- func (sq *SessionQuery) Order(o ...OrderFunc) *SessionQuery
- func (sq *SessionQuery) Select(fields ...string) *SessionSelect
- func (sq *SessionQuery) Unique(unique bool) *SessionQuery
- 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) 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(m *model.Session) *SessionUpdate
- func (su *SessionUpdate) SetKey(s string) *SessionUpdate
- func (su *SessionUpdate) Where(ps ...predicate.Session) *SessionUpdate
- type 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) Select(field string, fields ...string) *SessionUpdateOne
- func (suo *SessionUpdateOne) SetData(m *model.Session) *SessionUpdateOne
- func (suo *SessionUpdateOne) SetKey(s string) *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 string) *UserDeleteOne
- func (c *UserClient) Get(ctx context.Context, id string) (*User, error)
- func (c *UserClient) GetX(ctx context.Context, id string) *User
- func (c *UserClient) Hooks() []Hook
- func (c *UserClient) Query() *UserQuery
- func (c *UserClient) QueryDevices(u *User) *UserDeviceQuery
- func (c *UserClient) QueryMeta(u *User) *UserMetaQuery
- func (c *UserClient) QueryOauthProviders(u *User) *UserOAuthProviderQuery
- func (c *UserClient) Update() *UserUpdate
- func (c *UserClient) UpdateOne(u *User) *UserUpdateOne
- func (c *UserClient) UpdateOneID(id string) *UserUpdateOne
- func (c *UserClient) Use(hooks ...Hook)
- type UserCreate
- func (uc *UserCreate) AddDeviceIDs(ids ...string) *UserCreate
- func (uc *UserCreate) AddDevices(u ...*UserDevice) *UserCreate
- func (uc *UserCreate) AddMeta(u ...*UserMeta) *UserCreate
- func (uc *UserCreate) AddMetumIDs(ids ...string) *UserCreate
- func (uc *UserCreate) AddOauthProviderIDs(ids ...string) *UserCreate
- func (uc *UserCreate) AddOauthProviders(u ...*UserOAuthProvider) *UserCreate
- func (uc *UserCreate) Exec(ctx context.Context) error
- func (uc *UserCreate) ExecX(ctx context.Context)
- func (uc *UserCreate) Mutation() *UserMutation
- func (uc *UserCreate) Save(ctx context.Context) (*User, error)
- func (uc *UserCreate) SaveX(ctx context.Context) *User
- func (uc *UserCreate) SetCreatedAt(t time.Time) *UserCreate
- func (uc *UserCreate) SetCreatedBy(s string) *UserCreate
- func (uc *UserCreate) SetID(s string) *UserCreate
- func (uc *UserCreate) SetNillableCreatedAt(t *time.Time) *UserCreate
- func (uc *UserCreate) SetNillableSignup(b *bool) *UserCreate
- func (uc *UserCreate) SetNillableStatus(u *user.Status) *UserCreate
- func (uc *UserCreate) SetNillableType(u *user.Type) *UserCreate
- func (uc *UserCreate) SetNillableUpdatedAt(t *time.Time) *UserCreate
- func (uc *UserCreate) SetSignup(b bool) *UserCreate
- func (uc *UserCreate) SetStatus(u user.Status) *UserCreate
- func (uc *UserCreate) SetType(u user.Type) *UserCreate
- func (uc *UserCreate) SetUpdatedAt(t time.Time) *UserCreate
- func (uc *UserCreate) SetUpdatedBy(s string) *UserCreate
- func (uc *UserCreate) SetUsername(s string) *UserCreate
- type UserCreateBulk
- type UserDelete
- type UserDeleteOne
- type UserDevice
- type UserDeviceClient
- func (c *UserDeviceClient) Create() *UserDeviceCreate
- func (c *UserDeviceClient) CreateBulk(builders ...*UserDeviceCreate) *UserDeviceCreateBulk
- func (c *UserDeviceClient) Delete() *UserDeviceDelete
- func (c *UserDeviceClient) DeleteOne(ud *UserDevice) *UserDeviceDeleteOne
- func (c *UserDeviceClient) DeleteOneID(id string) *UserDeviceDeleteOne
- func (c *UserDeviceClient) Get(ctx context.Context, id string) (*UserDevice, error)
- func (c *UserDeviceClient) GetX(ctx context.Context, id string) *UserDevice
- func (c *UserDeviceClient) Hooks() []Hook
- func (c *UserDeviceClient) Query() *UserDeviceQuery
- func (c *UserDeviceClient) QueryUser(ud *UserDevice) *UserQuery
- func (c *UserDeviceClient) Update() *UserDeviceUpdate
- func (c *UserDeviceClient) UpdateOne(ud *UserDevice) *UserDeviceUpdateOne
- func (c *UserDeviceClient) UpdateOneID(id string) *UserDeviceUpdateOne
- func (c *UserDeviceClient) Use(hooks ...Hook)
- type UserDeviceCreate
- func (udc *UserDeviceCreate) Exec(ctx context.Context) error
- func (udc *UserDeviceCreate) ExecX(ctx context.Context)
- func (udc *UserDeviceCreate) Mutation() *UserDeviceMutation
- func (udc *UserDeviceCreate) Save(ctx context.Context) (*UserDevice, error)
- func (udc *UserDeviceCreate) SaveX(ctx context.Context) *UserDevice
- func (udc *UserDeviceCreate) SetCreatedAt(t time.Time) *UserDeviceCreate
- func (udc *UserDeviceCreate) SetCreatedBy(s string) *UserDeviceCreate
- func (udc *UserDeviceCreate) SetID(s string) *UserDeviceCreate
- func (udc *UserDeviceCreate) SetNillableCreatedAt(t *time.Time) *UserDeviceCreate
- func (udc *UserDeviceCreate) SetNillableStatus(u *userdevice.Status) *UserDeviceCreate
- func (udc *UserDeviceCreate) SetNillableUpdatedAt(t *time.Time) *UserDeviceCreate
- func (udc *UserDeviceCreate) SetOs(u userdevice.Os) *UserDeviceCreate
- func (udc *UserDeviceCreate) SetPlatform(u userdevice.Platform) *UserDeviceCreate
- func (udc *UserDeviceCreate) SetStatus(u userdevice.Status) *UserDeviceCreate
- func (udc *UserDeviceCreate) SetType(u userdevice.Type) *UserDeviceCreate
- func (udc *UserDeviceCreate) SetUpdatedAt(t time.Time) *UserDeviceCreate
- func (udc *UserDeviceCreate) SetUpdatedBy(s string) *UserDeviceCreate
- func (udc *UserDeviceCreate) SetUser(u *User) *UserDeviceCreate
- func (udc *UserDeviceCreate) SetUserID(s string) *UserDeviceCreate
- type UserDeviceCreateBulk
- type UserDeviceDelete
- type UserDeviceDeleteOne
- type UserDeviceEdges
- type UserDeviceGroupBy
- func (udgb *UserDeviceGroupBy) Aggregate(fns ...AggregateFunc) *UserDeviceGroupBy
- func (udgb *UserDeviceGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (udgb *UserDeviceGroupBy) BoolX(ctx context.Context) bool
- func (udgb *UserDeviceGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (udgb *UserDeviceGroupBy) BoolsX(ctx context.Context) []bool
- func (udgb *UserDeviceGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (udgb *UserDeviceGroupBy) Float64X(ctx context.Context) float64
- func (udgb *UserDeviceGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (udgb *UserDeviceGroupBy) Float64sX(ctx context.Context) []float64
- func (udgb *UserDeviceGroupBy) Int(ctx context.Context) (_ int, err error)
- func (udgb *UserDeviceGroupBy) IntX(ctx context.Context) int
- func (udgb *UserDeviceGroupBy) Ints(ctx context.Context) ([]int, error)
- func (udgb *UserDeviceGroupBy) IntsX(ctx context.Context) []int
- func (udgb *UserDeviceGroupBy) Scan(ctx context.Context, v interface{}) error
- func (udgb *UserDeviceGroupBy) ScanX(ctx context.Context, v interface{})
- func (udgb *UserDeviceGroupBy) String(ctx context.Context) (_ string, err error)
- func (udgb *UserDeviceGroupBy) StringX(ctx context.Context) string
- func (udgb *UserDeviceGroupBy) Strings(ctx context.Context) ([]string, error)
- func (udgb *UserDeviceGroupBy) StringsX(ctx context.Context) []string
- type UserDeviceMutation
- func (m *UserDeviceMutation) AddField(name string, value ent.Value) error
- func (m *UserDeviceMutation) AddedEdges() []string
- func (m *UserDeviceMutation) AddedField(name string) (ent.Value, bool)
- func (m *UserDeviceMutation) AddedFields() []string
- func (m *UserDeviceMutation) AddedIDs(name string) []ent.Value
- func (m *UserDeviceMutation) ClearEdge(name string) error
- func (m *UserDeviceMutation) ClearField(name string) error
- func (m *UserDeviceMutation) ClearUser()
- func (m *UserDeviceMutation) ClearedEdges() []string
- func (m *UserDeviceMutation) ClearedFields() []string
- func (m UserDeviceMutation) Client() *Client
- func (m *UserDeviceMutation) CreatedAt() (r time.Time, exists bool)
- func (m *UserDeviceMutation) CreatedBy() (r string, exists bool)
- func (m *UserDeviceMutation) EdgeCleared(name string) bool
- func (m *UserDeviceMutation) Field(name string) (ent.Value, bool)
- func (m *UserDeviceMutation) FieldCleared(name string) bool
- func (m *UserDeviceMutation) Fields() []string
- func (m *UserDeviceMutation) GetType() (r userdevice.Type, exists bool)
- func (m *UserDeviceMutation) ID() (id string, exists bool)
- func (m *UserDeviceMutation) IDs(ctx context.Context) ([]string, error)
- func (m *UserDeviceMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *UserDeviceMutation) OldCreatedBy(ctx context.Context) (v string, err error)
- func (m *UserDeviceMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *UserDeviceMutation) OldOs(ctx context.Context) (v userdevice.Os, err error)
- func (m *UserDeviceMutation) OldPlatform(ctx context.Context) (v userdevice.Platform, err error)
- func (m *UserDeviceMutation) OldStatus(ctx context.Context) (v userdevice.Status, err error)
- func (m *UserDeviceMutation) OldType(ctx context.Context) (v userdevice.Type, err error)
- func (m *UserDeviceMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *UserDeviceMutation) OldUpdatedBy(ctx context.Context) (v string, err error)
- func (m *UserDeviceMutation) OldUserID(ctx context.Context) (v string, err error)
- func (m *UserDeviceMutation) Op() Op
- func (m *UserDeviceMutation) Os() (r userdevice.Os, exists bool)
- func (m *UserDeviceMutation) Platform() (r userdevice.Platform, exists bool)
- func (m *UserDeviceMutation) RemovedEdges() []string
- func (m *UserDeviceMutation) RemovedIDs(name string) []ent.Value
- func (m *UserDeviceMutation) ResetCreatedAt()
- func (m *UserDeviceMutation) ResetCreatedBy()
- func (m *UserDeviceMutation) ResetEdge(name string) error
- func (m *UserDeviceMutation) ResetField(name string) error
- func (m *UserDeviceMutation) ResetOs()
- func (m *UserDeviceMutation) ResetPlatform()
- func (m *UserDeviceMutation) ResetStatus()
- func (m *UserDeviceMutation) ResetType()
- func (m *UserDeviceMutation) ResetUpdatedAt()
- func (m *UserDeviceMutation) ResetUpdatedBy()
- func (m *UserDeviceMutation) ResetUser()
- func (m *UserDeviceMutation) ResetUserID()
- func (m *UserDeviceMutation) SetCreatedAt(t time.Time)
- func (m *UserDeviceMutation) SetCreatedBy(s string)
- func (m *UserDeviceMutation) SetField(name string, value ent.Value) error
- func (m *UserDeviceMutation) SetID(id string)
- func (m *UserDeviceMutation) SetOs(u userdevice.Os)
- func (m *UserDeviceMutation) SetPlatform(u userdevice.Platform)
- func (m *UserDeviceMutation) SetStatus(u userdevice.Status)
- func (m *UserDeviceMutation) SetType(u userdevice.Type)
- func (m *UserDeviceMutation) SetUpdatedAt(t time.Time)
- func (m *UserDeviceMutation) SetUpdatedBy(s string)
- func (m *UserDeviceMutation) SetUserID(s string)
- func (m *UserDeviceMutation) Status() (r userdevice.Status, exists bool)
- func (m UserDeviceMutation) Tx() (*Tx, error)
- func (m *UserDeviceMutation) Type() string
- func (m *UserDeviceMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *UserDeviceMutation) UpdatedBy() (r string, exists bool)
- func (m *UserDeviceMutation) UserCleared() bool
- func (m *UserDeviceMutation) UserID() (r string, exists bool)
- func (m *UserDeviceMutation) UserIDs() (ids []string)
- func (m *UserDeviceMutation) Where(ps ...predicate.UserDevice)
- type UserDeviceQuery
- func (udq *UserDeviceQuery) All(ctx context.Context) ([]*UserDevice, error)
- func (udq *UserDeviceQuery) AllX(ctx context.Context) []*UserDevice
- func (udq *UserDeviceQuery) Clone() *UserDeviceQuery
- func (udq *UserDeviceQuery) Count(ctx context.Context) (int, error)
- func (udq *UserDeviceQuery) CountX(ctx context.Context) int
- func (udq *UserDeviceQuery) Exist(ctx context.Context) (bool, error)
- func (udq *UserDeviceQuery) ExistX(ctx context.Context) bool
- func (udq *UserDeviceQuery) First(ctx context.Context) (*UserDevice, error)
- func (udq *UserDeviceQuery) FirstID(ctx context.Context) (id string, err error)
- func (udq *UserDeviceQuery) FirstIDX(ctx context.Context) string
- func (udq *UserDeviceQuery) FirstX(ctx context.Context) *UserDevice
- func (udq *UserDeviceQuery) GroupBy(field string, fields ...string) *UserDeviceGroupBy
- func (udq *UserDeviceQuery) IDs(ctx context.Context) ([]string, error)
- func (udq *UserDeviceQuery) IDsX(ctx context.Context) []string
- func (udq *UserDeviceQuery) Limit(limit int) *UserDeviceQuery
- func (udq *UserDeviceQuery) Offset(offset int) *UserDeviceQuery
- func (udq *UserDeviceQuery) Only(ctx context.Context) (*UserDevice, error)
- func (udq *UserDeviceQuery) OnlyID(ctx context.Context) (id string, err error)
- func (udq *UserDeviceQuery) OnlyIDX(ctx context.Context) string
- func (udq *UserDeviceQuery) OnlyX(ctx context.Context) *UserDevice
- func (udq *UserDeviceQuery) Order(o ...OrderFunc) *UserDeviceQuery
- func (udq *UserDeviceQuery) QueryUser() *UserQuery
- func (udq *UserDeviceQuery) Select(fields ...string) *UserDeviceSelect
- func (udq *UserDeviceQuery) Unique(unique bool) *UserDeviceQuery
- func (udq *UserDeviceQuery) Where(ps ...predicate.UserDevice) *UserDeviceQuery
- func (udq *UserDeviceQuery) WithUser(opts ...func(*UserQuery)) *UserDeviceQuery
- type UserDeviceSelect
- func (uds *UserDeviceSelect) Bool(ctx context.Context) (_ bool, err error)
- func (uds *UserDeviceSelect) BoolX(ctx context.Context) bool
- func (uds *UserDeviceSelect) Bools(ctx context.Context) ([]bool, error)
- func (uds *UserDeviceSelect) BoolsX(ctx context.Context) []bool
- func (uds *UserDeviceSelect) Float64(ctx context.Context) (_ float64, err error)
- func (uds *UserDeviceSelect) Float64X(ctx context.Context) float64
- func (uds *UserDeviceSelect) Float64s(ctx context.Context) ([]float64, error)
- func (uds *UserDeviceSelect) Float64sX(ctx context.Context) []float64
- func (uds *UserDeviceSelect) Int(ctx context.Context) (_ int, err error)
- func (uds *UserDeviceSelect) IntX(ctx context.Context) int
- func (uds *UserDeviceSelect) Ints(ctx context.Context) ([]int, error)
- func (uds *UserDeviceSelect) IntsX(ctx context.Context) []int
- func (uds *UserDeviceSelect) Scan(ctx context.Context, v interface{}) error
- func (uds *UserDeviceSelect) ScanX(ctx context.Context, v interface{})
- func (uds *UserDeviceSelect) String(ctx context.Context) (_ string, err error)
- func (uds *UserDeviceSelect) StringX(ctx context.Context) string
- func (uds *UserDeviceSelect) Strings(ctx context.Context) ([]string, error)
- func (uds *UserDeviceSelect) StringsX(ctx context.Context) []string
- type UserDeviceUpdate
- func (udu *UserDeviceUpdate) ClearUser() *UserDeviceUpdate
- func (udu *UserDeviceUpdate) Exec(ctx context.Context) error
- func (udu *UserDeviceUpdate) ExecX(ctx context.Context)
- func (udu *UserDeviceUpdate) Mutation() *UserDeviceMutation
- func (udu *UserDeviceUpdate) Save(ctx context.Context) (int, error)
- func (udu *UserDeviceUpdate) SaveX(ctx context.Context) int
- func (udu *UserDeviceUpdate) SetCreatedAt(t time.Time) *UserDeviceUpdate
- func (udu *UserDeviceUpdate) SetCreatedBy(s string) *UserDeviceUpdate
- func (udu *UserDeviceUpdate) SetNillableCreatedAt(t *time.Time) *UserDeviceUpdate
- func (udu *UserDeviceUpdate) SetNillableStatus(u *userdevice.Status) *UserDeviceUpdate
- func (udu *UserDeviceUpdate) SetOs(u userdevice.Os) *UserDeviceUpdate
- func (udu *UserDeviceUpdate) SetPlatform(u userdevice.Platform) *UserDeviceUpdate
- func (udu *UserDeviceUpdate) SetStatus(u userdevice.Status) *UserDeviceUpdate
- func (udu *UserDeviceUpdate) SetType(u userdevice.Type) *UserDeviceUpdate
- func (udu *UserDeviceUpdate) SetUpdatedAt(t time.Time) *UserDeviceUpdate
- func (udu *UserDeviceUpdate) SetUpdatedBy(s string) *UserDeviceUpdate
- func (udu *UserDeviceUpdate) SetUser(u *User) *UserDeviceUpdate
- func (udu *UserDeviceUpdate) SetUserID(s string) *UserDeviceUpdate
- func (udu *UserDeviceUpdate) Where(ps ...predicate.UserDevice) *UserDeviceUpdate
- type UserDeviceUpdateOne
- func (uduo *UserDeviceUpdateOne) ClearUser() *UserDeviceUpdateOne
- func (uduo *UserDeviceUpdateOne) Exec(ctx context.Context) error
- func (uduo *UserDeviceUpdateOne) ExecX(ctx context.Context)
- func (uduo *UserDeviceUpdateOne) Mutation() *UserDeviceMutation
- func (uduo *UserDeviceUpdateOne) Save(ctx context.Context) (*UserDevice, error)
- func (uduo *UserDeviceUpdateOne) SaveX(ctx context.Context) *UserDevice
- func (uduo *UserDeviceUpdateOne) Select(field string, fields ...string) *UserDeviceUpdateOne
- func (uduo *UserDeviceUpdateOne) SetCreatedAt(t time.Time) *UserDeviceUpdateOne
- func (uduo *UserDeviceUpdateOne) SetCreatedBy(s string) *UserDeviceUpdateOne
- func (uduo *UserDeviceUpdateOne) SetNillableCreatedAt(t *time.Time) *UserDeviceUpdateOne
- func (uduo *UserDeviceUpdateOne) SetNillableStatus(u *userdevice.Status) *UserDeviceUpdateOne
- func (uduo *UserDeviceUpdateOne) SetOs(u userdevice.Os) *UserDeviceUpdateOne
- func (uduo *UserDeviceUpdateOne) SetPlatform(u userdevice.Platform) *UserDeviceUpdateOne
- func (uduo *UserDeviceUpdateOne) SetStatus(u userdevice.Status) *UserDeviceUpdateOne
- func (uduo *UserDeviceUpdateOne) SetType(u userdevice.Type) *UserDeviceUpdateOne
- func (uduo *UserDeviceUpdateOne) SetUpdatedAt(t time.Time) *UserDeviceUpdateOne
- func (uduo *UserDeviceUpdateOne) SetUpdatedBy(s string) *UserDeviceUpdateOne
- func (uduo *UserDeviceUpdateOne) SetUser(u *User) *UserDeviceUpdateOne
- func (uduo *UserDeviceUpdateOne) SetUserID(s string) *UserDeviceUpdateOne
- type UserDevices
- type UserEdges
- 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 UserMeta
- type UserMetaClient
- func (c *UserMetaClient) Create() *UserMetaCreate
- func (c *UserMetaClient) CreateBulk(builders ...*UserMetaCreate) *UserMetaCreateBulk
- func (c *UserMetaClient) Delete() *UserMetaDelete
- func (c *UserMetaClient) DeleteOne(um *UserMeta) *UserMetaDeleteOne
- func (c *UserMetaClient) DeleteOneID(id string) *UserMetaDeleteOne
- func (c *UserMetaClient) Get(ctx context.Context, id string) (*UserMeta, error)
- func (c *UserMetaClient) GetX(ctx context.Context, id string) *UserMeta
- func (c *UserMetaClient) Hooks() []Hook
- func (c *UserMetaClient) Query() *UserMetaQuery
- func (c *UserMetaClient) QueryUser(um *UserMeta) *UserQuery
- func (c *UserMetaClient) Update() *UserMetaUpdate
- func (c *UserMetaClient) UpdateOne(um *UserMeta) *UserMetaUpdateOne
- func (c *UserMetaClient) UpdateOneID(id string) *UserMetaUpdateOne
- func (c *UserMetaClient) Use(hooks ...Hook)
- type UserMetaCreate
- func (umc *UserMetaCreate) Exec(ctx context.Context) error
- func (umc *UserMetaCreate) ExecX(ctx context.Context)
- func (umc *UserMetaCreate) Mutation() *UserMetaMutation
- func (umc *UserMetaCreate) Save(ctx context.Context) (*UserMeta, error)
- func (umc *UserMetaCreate) SaveX(ctx context.Context) *UserMeta
- func (umc *UserMetaCreate) SetCreatedAt(t time.Time) *UserMetaCreate
- func (umc *UserMetaCreate) SetCreatedBy(s string) *UserMetaCreate
- func (umc *UserMetaCreate) SetID(s string) *UserMetaCreate
- func (umc *UserMetaCreate) SetNillableCreatedAt(t *time.Time) *UserMetaCreate
- func (umc *UserMetaCreate) SetNillableUpdatedAt(t *time.Time) *UserMetaCreate
- func (umc *UserMetaCreate) SetProfile(s string) *UserMetaCreate
- func (umc *UserMetaCreate) SetUpdatedAt(t time.Time) *UserMetaCreate
- func (umc *UserMetaCreate) SetUpdatedBy(s string) *UserMetaCreate
- func (umc *UserMetaCreate) SetUser(u *User) *UserMetaCreate
- func (umc *UserMetaCreate) SetUserID(s string) *UserMetaCreate
- type UserMetaCreateBulk
- type UserMetaDelete
- type UserMetaDeleteOne
- type UserMetaEdges
- type UserMetaGroupBy
- func (umgb *UserMetaGroupBy) Aggregate(fns ...AggregateFunc) *UserMetaGroupBy
- func (umgb *UserMetaGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (umgb *UserMetaGroupBy) BoolX(ctx context.Context) bool
- func (umgb *UserMetaGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (umgb *UserMetaGroupBy) BoolsX(ctx context.Context) []bool
- func (umgb *UserMetaGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (umgb *UserMetaGroupBy) Float64X(ctx context.Context) float64
- func (umgb *UserMetaGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (umgb *UserMetaGroupBy) Float64sX(ctx context.Context) []float64
- func (umgb *UserMetaGroupBy) Int(ctx context.Context) (_ int, err error)
- func (umgb *UserMetaGroupBy) IntX(ctx context.Context) int
- func (umgb *UserMetaGroupBy) Ints(ctx context.Context) ([]int, error)
- func (umgb *UserMetaGroupBy) IntsX(ctx context.Context) []int
- func (umgb *UserMetaGroupBy) Scan(ctx context.Context, v interface{}) error
- func (umgb *UserMetaGroupBy) ScanX(ctx context.Context, v interface{})
- func (umgb *UserMetaGroupBy) String(ctx context.Context) (_ string, err error)
- func (umgb *UserMetaGroupBy) StringX(ctx context.Context) string
- func (umgb *UserMetaGroupBy) Strings(ctx context.Context) ([]string, error)
- func (umgb *UserMetaGroupBy) StringsX(ctx context.Context) []string
- type UserMetaMutation
- func (m *UserMetaMutation) AddField(name string, value ent.Value) error
- func (m *UserMetaMutation) AddedEdges() []string
- func (m *UserMetaMutation) AddedField(name string) (ent.Value, bool)
- func (m *UserMetaMutation) AddedFields() []string
- func (m *UserMetaMutation) AddedIDs(name string) []ent.Value
- func (m *UserMetaMutation) ClearEdge(name string) error
- func (m *UserMetaMutation) ClearField(name string) error
- func (m *UserMetaMutation) ClearUser()
- func (m *UserMetaMutation) ClearedEdges() []string
- func (m *UserMetaMutation) ClearedFields() []string
- func (m UserMetaMutation) Client() *Client
- func (m *UserMetaMutation) CreatedAt() (r time.Time, exists bool)
- func (m *UserMetaMutation) CreatedBy() (r string, exists bool)
- func (m *UserMetaMutation) EdgeCleared(name string) bool
- func (m *UserMetaMutation) Field(name string) (ent.Value, bool)
- func (m *UserMetaMutation) FieldCleared(name string) bool
- func (m *UserMetaMutation) Fields() []string
- func (m *UserMetaMutation) ID() (id string, exists bool)
- func (m *UserMetaMutation) IDs(ctx context.Context) ([]string, error)
- func (m *UserMetaMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *UserMetaMutation) OldCreatedBy(ctx context.Context) (v string, err error)
- func (m *UserMetaMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *UserMetaMutation) OldProfile(ctx context.Context) (v string, err error)
- func (m *UserMetaMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *UserMetaMutation) OldUpdatedBy(ctx context.Context) (v string, err error)
- func (m *UserMetaMutation) OldUserID(ctx context.Context) (v string, err error)
- func (m *UserMetaMutation) Op() Op
- func (m *UserMetaMutation) Profile() (r string, exists bool)
- func (m *UserMetaMutation) RemovedEdges() []string
- func (m *UserMetaMutation) RemovedIDs(name string) []ent.Value
- func (m *UserMetaMutation) ResetCreatedAt()
- func (m *UserMetaMutation) ResetCreatedBy()
- func (m *UserMetaMutation) ResetEdge(name string) error
- func (m *UserMetaMutation) ResetField(name string) error
- func (m *UserMetaMutation) ResetProfile()
- func (m *UserMetaMutation) ResetUpdatedAt()
- func (m *UserMetaMutation) ResetUpdatedBy()
- func (m *UserMetaMutation) ResetUser()
- func (m *UserMetaMutation) ResetUserID()
- func (m *UserMetaMutation) SetCreatedAt(t time.Time)
- func (m *UserMetaMutation) SetCreatedBy(s string)
- func (m *UserMetaMutation) SetField(name string, value ent.Value) error
- func (m *UserMetaMutation) SetID(id string)
- func (m *UserMetaMutation) SetProfile(s string)
- func (m *UserMetaMutation) SetUpdatedAt(t time.Time)
- func (m *UserMetaMutation) SetUpdatedBy(s string)
- func (m *UserMetaMutation) SetUserID(s string)
- func (m UserMetaMutation) Tx() (*Tx, error)
- func (m *UserMetaMutation) Type() string
- func (m *UserMetaMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *UserMetaMutation) UpdatedBy() (r string, exists bool)
- func (m *UserMetaMutation) UserCleared() bool
- func (m *UserMetaMutation) UserID() (r string, exists bool)
- func (m *UserMetaMutation) UserIDs() (ids []string)
- func (m *UserMetaMutation) Where(ps ...predicate.UserMeta)
- type UserMetaQuery
- func (umq *UserMetaQuery) All(ctx context.Context) ([]*UserMeta, error)
- func (umq *UserMetaQuery) AllX(ctx context.Context) []*UserMeta
- func (umq *UserMetaQuery) Clone() *UserMetaQuery
- func (umq *UserMetaQuery) Count(ctx context.Context) (int, error)
- func (umq *UserMetaQuery) CountX(ctx context.Context) int
- func (umq *UserMetaQuery) Exist(ctx context.Context) (bool, error)
- func (umq *UserMetaQuery) ExistX(ctx context.Context) bool
- func (umq *UserMetaQuery) First(ctx context.Context) (*UserMeta, error)
- func (umq *UserMetaQuery) FirstID(ctx context.Context) (id string, err error)
- func (umq *UserMetaQuery) FirstIDX(ctx context.Context) string
- func (umq *UserMetaQuery) FirstX(ctx context.Context) *UserMeta
- func (umq *UserMetaQuery) GroupBy(field string, fields ...string) *UserMetaGroupBy
- func (umq *UserMetaQuery) IDs(ctx context.Context) ([]string, error)
- func (umq *UserMetaQuery) IDsX(ctx context.Context) []string
- func (umq *UserMetaQuery) Limit(limit int) *UserMetaQuery
- func (umq *UserMetaQuery) Offset(offset int) *UserMetaQuery
- func (umq *UserMetaQuery) Only(ctx context.Context) (*UserMeta, error)
- func (umq *UserMetaQuery) OnlyID(ctx context.Context) (id string, err error)
- func (umq *UserMetaQuery) OnlyIDX(ctx context.Context) string
- func (umq *UserMetaQuery) OnlyX(ctx context.Context) *UserMeta
- func (umq *UserMetaQuery) Order(o ...OrderFunc) *UserMetaQuery
- func (umq *UserMetaQuery) QueryUser() *UserQuery
- func (umq *UserMetaQuery) Select(fields ...string) *UserMetaSelect
- func (umq *UserMetaQuery) Unique(unique bool) *UserMetaQuery
- func (umq *UserMetaQuery) Where(ps ...predicate.UserMeta) *UserMetaQuery
- func (umq *UserMetaQuery) WithUser(opts ...func(*UserQuery)) *UserMetaQuery
- type UserMetaSelect
- func (ums *UserMetaSelect) Bool(ctx context.Context) (_ bool, err error)
- func (ums *UserMetaSelect) BoolX(ctx context.Context) bool
- func (ums *UserMetaSelect) Bools(ctx context.Context) ([]bool, error)
- func (ums *UserMetaSelect) BoolsX(ctx context.Context) []bool
- func (ums *UserMetaSelect) Float64(ctx context.Context) (_ float64, err error)
- func (ums *UserMetaSelect) Float64X(ctx context.Context) float64
- func (ums *UserMetaSelect) Float64s(ctx context.Context) ([]float64, error)
- func (ums *UserMetaSelect) Float64sX(ctx context.Context) []float64
- func (ums *UserMetaSelect) Int(ctx context.Context) (_ int, err error)
- func (ums *UserMetaSelect) IntX(ctx context.Context) int
- func (ums *UserMetaSelect) Ints(ctx context.Context) ([]int, error)
- func (ums *UserMetaSelect) IntsX(ctx context.Context) []int
- func (ums *UserMetaSelect) Scan(ctx context.Context, v interface{}) error
- func (ums *UserMetaSelect) ScanX(ctx context.Context, v interface{})
- func (ums *UserMetaSelect) String(ctx context.Context) (_ string, err error)
- func (ums *UserMetaSelect) StringX(ctx context.Context) string
- func (ums *UserMetaSelect) Strings(ctx context.Context) ([]string, error)
- func (ums *UserMetaSelect) StringsX(ctx context.Context) []string
- type UserMetaSlice
- type UserMetaUpdate
- func (umu *UserMetaUpdate) ClearUser() *UserMetaUpdate
- func (umu *UserMetaUpdate) Exec(ctx context.Context) error
- func (umu *UserMetaUpdate) ExecX(ctx context.Context)
- func (umu *UserMetaUpdate) Mutation() *UserMetaMutation
- func (umu *UserMetaUpdate) Save(ctx context.Context) (int, error)
- func (umu *UserMetaUpdate) SaveX(ctx context.Context) int
- func (umu *UserMetaUpdate) SetCreatedAt(t time.Time) *UserMetaUpdate
- func (umu *UserMetaUpdate) SetCreatedBy(s string) *UserMetaUpdate
- func (umu *UserMetaUpdate) SetNillableCreatedAt(t *time.Time) *UserMetaUpdate
- func (umu *UserMetaUpdate) SetProfile(s string) *UserMetaUpdate
- func (umu *UserMetaUpdate) SetUpdatedAt(t time.Time) *UserMetaUpdate
- func (umu *UserMetaUpdate) SetUpdatedBy(s string) *UserMetaUpdate
- func (umu *UserMetaUpdate) SetUser(u *User) *UserMetaUpdate
- func (umu *UserMetaUpdate) SetUserID(s string) *UserMetaUpdate
- func (umu *UserMetaUpdate) Where(ps ...predicate.UserMeta) *UserMetaUpdate
- type UserMetaUpdateOne
- func (umuo *UserMetaUpdateOne) ClearUser() *UserMetaUpdateOne
- func (umuo *UserMetaUpdateOne) Exec(ctx context.Context) error
- func (umuo *UserMetaUpdateOne) ExecX(ctx context.Context)
- func (umuo *UserMetaUpdateOne) Mutation() *UserMetaMutation
- func (umuo *UserMetaUpdateOne) Save(ctx context.Context) (*UserMeta, error)
- func (umuo *UserMetaUpdateOne) SaveX(ctx context.Context) *UserMeta
- func (umuo *UserMetaUpdateOne) Select(field string, fields ...string) *UserMetaUpdateOne
- func (umuo *UserMetaUpdateOne) SetCreatedAt(t time.Time) *UserMetaUpdateOne
- func (umuo *UserMetaUpdateOne) SetCreatedBy(s string) *UserMetaUpdateOne
- func (umuo *UserMetaUpdateOne) SetNillableCreatedAt(t *time.Time) *UserMetaUpdateOne
- func (umuo *UserMetaUpdateOne) SetProfile(s string) *UserMetaUpdateOne
- func (umuo *UserMetaUpdateOne) SetUpdatedAt(t time.Time) *UserMetaUpdateOne
- func (umuo *UserMetaUpdateOne) SetUpdatedBy(s string) *UserMetaUpdateOne
- func (umuo *UserMetaUpdateOne) SetUser(u *User) *UserMetaUpdateOne
- func (umuo *UserMetaUpdateOne) SetUserID(s string) *UserMetaUpdateOne
- type UserMutation
- func (m *UserMutation) AddDeviceIDs(ids ...string)
- func (m *UserMutation) AddField(name string, value ent.Value) error
- func (m *UserMutation) AddMetumIDs(ids ...string)
- func (m *UserMutation) AddOauthProviderIDs(ids ...string)
- 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) ClearDevices()
- func (m *UserMutation) ClearEdge(name string) error
- func (m *UserMutation) ClearField(name string) error
- func (m *UserMutation) ClearMeta()
- func (m *UserMutation) ClearOauthProviders()
- func (m *UserMutation) ClearedEdges() []string
- func (m *UserMutation) ClearedFields() []string
- func (m UserMutation) Client() *Client
- func (m *UserMutation) CreatedAt() (r time.Time, exists bool)
- func (m *UserMutation) CreatedBy() (r string, exists bool)
- func (m *UserMutation) DevicesCleared() bool
- func (m *UserMutation) DevicesIDs() (ids []string)
- func (m *UserMutation) EdgeCleared(name string) bool
- func (m *UserMutation) Field(name string) (ent.Value, bool)
- func (m *UserMutation) FieldCleared(name string) bool
- func (m *UserMutation) Fields() []string
- func (m *UserMutation) GetType() (r user.Type, exists bool)
- func (m *UserMutation) ID() (id string, exists bool)
- func (m *UserMutation) IDs(ctx context.Context) ([]string, error)
- func (m *UserMutation) MetaCleared() bool
- func (m *UserMutation) MetaIDs() (ids []string)
- func (m *UserMutation) OauthProvidersCleared() bool
- func (m *UserMutation) OauthProvidersIDs() (ids []string)
- func (m *UserMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *UserMutation) OldCreatedBy(ctx context.Context) (v string, err error)
- func (m *UserMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *UserMutation) OldSignup(ctx context.Context) (v bool, err error)
- func (m *UserMutation) OldStatus(ctx context.Context) (v user.Status, err error)
- func (m *UserMutation) OldType(ctx context.Context) (v user.Type, err error)
- func (m *UserMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *UserMutation) OldUpdatedBy(ctx context.Context) (v string, err error)
- func (m *UserMutation) OldUsername(ctx context.Context) (v string, err error)
- func (m *UserMutation) Op() Op
- func (m *UserMutation) RemoveDeviceIDs(ids ...string)
- func (m *UserMutation) RemoveMetumIDs(ids ...string)
- func (m *UserMutation) RemoveOauthProviderIDs(ids ...string)
- func (m *UserMutation) RemovedDevicesIDs() (ids []string)
- func (m *UserMutation) RemovedEdges() []string
- func (m *UserMutation) RemovedIDs(name string) []ent.Value
- func (m *UserMutation) RemovedMetaIDs() (ids []string)
- func (m *UserMutation) RemovedOauthProvidersIDs() (ids []string)
- func (m *UserMutation) ResetCreatedAt()
- func (m *UserMutation) ResetCreatedBy()
- func (m *UserMutation) ResetDevices()
- func (m *UserMutation) ResetEdge(name string) error
- func (m *UserMutation) ResetField(name string) error
- func (m *UserMutation) ResetMeta()
- func (m *UserMutation) ResetOauthProviders()
- func (m *UserMutation) ResetSignup()
- func (m *UserMutation) ResetStatus()
- func (m *UserMutation) ResetType()
- func (m *UserMutation) ResetUpdatedAt()
- func (m *UserMutation) ResetUpdatedBy()
- func (m *UserMutation) ResetUsername()
- func (m *UserMutation) SetCreatedAt(t time.Time)
- func (m *UserMutation) SetCreatedBy(s string)
- func (m *UserMutation) SetField(name string, value ent.Value) error
- func (m *UserMutation) SetID(id string)
- func (m *UserMutation) SetSignup(b bool)
- func (m *UserMutation) SetStatus(u user.Status)
- func (m *UserMutation) SetType(u user.Type)
- func (m *UserMutation) SetUpdatedAt(t time.Time)
- func (m *UserMutation) SetUpdatedBy(s string)
- func (m *UserMutation) SetUsername(s string)
- func (m *UserMutation) Signup() (r bool, exists bool)
- func (m *UserMutation) Status() (r user.Status, exists bool)
- func (m UserMutation) Tx() (*Tx, error)
- func (m *UserMutation) Type() string
- func (m *UserMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *UserMutation) UpdatedBy() (r string, exists bool)
- func (m *UserMutation) Username() (r string, exists bool)
- func (m *UserMutation) Where(ps ...predicate.User)
- type UserOAuthProvider
- type UserOAuthProviderClient
- func (c *UserOAuthProviderClient) Create() *UserOAuthProviderCreate
- func (c *UserOAuthProviderClient) CreateBulk(builders ...*UserOAuthProviderCreate) *UserOAuthProviderCreateBulk
- func (c *UserOAuthProviderClient) Delete() *UserOAuthProviderDelete
- func (c *UserOAuthProviderClient) DeleteOne(uop *UserOAuthProvider) *UserOAuthProviderDeleteOne
- func (c *UserOAuthProviderClient) DeleteOneID(id string) *UserOAuthProviderDeleteOne
- func (c *UserOAuthProviderClient) Get(ctx context.Context, id string) (*UserOAuthProvider, error)
- func (c *UserOAuthProviderClient) GetX(ctx context.Context, id string) *UserOAuthProvider
- func (c *UserOAuthProviderClient) Hooks() []Hook
- func (c *UserOAuthProviderClient) Query() *UserOAuthProviderQuery
- func (c *UserOAuthProviderClient) QueryUser(uop *UserOAuthProvider) *UserQuery
- func (c *UserOAuthProviderClient) Update() *UserOAuthProviderUpdate
- func (c *UserOAuthProviderClient) UpdateOne(uop *UserOAuthProvider) *UserOAuthProviderUpdateOne
- func (c *UserOAuthProviderClient) UpdateOneID(id string) *UserOAuthProviderUpdateOne
- func (c *UserOAuthProviderClient) Use(hooks ...Hook)
- type UserOAuthProviderCreate
- func (uopc *UserOAuthProviderCreate) Exec(ctx context.Context) error
- func (uopc *UserOAuthProviderCreate) ExecX(ctx context.Context)
- func (uopc *UserOAuthProviderCreate) Mutation() *UserOAuthProviderMutation
- func (uopc *UserOAuthProviderCreate) Save(ctx context.Context) (*UserOAuthProvider, error)
- func (uopc *UserOAuthProviderCreate) SaveX(ctx context.Context) *UserOAuthProvider
- func (uopc *UserOAuthProviderCreate) SetAccessToken(s string) *UserOAuthProviderCreate
- func (uopc *UserOAuthProviderCreate) SetCreatedAt(t time.Time) *UserOAuthProviderCreate
- func (uopc *UserOAuthProviderCreate) SetCreatedBy(s string) *UserOAuthProviderCreate
- func (uopc *UserOAuthProviderCreate) SetExpiry(t time.Time) *UserOAuthProviderCreate
- func (uopc *UserOAuthProviderCreate) SetID(s string) *UserOAuthProviderCreate
- func (uopc *UserOAuthProviderCreate) SetNillableCreatedAt(t *time.Time) *UserOAuthProviderCreate
- func (uopc *UserOAuthProviderCreate) SetNillableStatus(u *useroauthprovider.Status) *UserOAuthProviderCreate
- func (uopc *UserOAuthProviderCreate) SetNillableUpdatedAt(t *time.Time) *UserOAuthProviderCreate
- func (uopc *UserOAuthProviderCreate) SetProvider(u useroauthprovider.Provider) *UserOAuthProviderCreate
- func (uopc *UserOAuthProviderCreate) SetRefreshToken(s string) *UserOAuthProviderCreate
- func (uopc *UserOAuthProviderCreate) SetStatus(u useroauthprovider.Status) *UserOAuthProviderCreate
- func (uopc *UserOAuthProviderCreate) SetUpdatedAt(t time.Time) *UserOAuthProviderCreate
- func (uopc *UserOAuthProviderCreate) SetUpdatedBy(s string) *UserOAuthProviderCreate
- func (uopc *UserOAuthProviderCreate) SetUser(u *User) *UserOAuthProviderCreate
- func (uopc *UserOAuthProviderCreate) SetUserID(s string) *UserOAuthProviderCreate
- type UserOAuthProviderCreateBulk
- func (uopcb *UserOAuthProviderCreateBulk) Exec(ctx context.Context) error
- func (uopcb *UserOAuthProviderCreateBulk) ExecX(ctx context.Context)
- func (uopcb *UserOAuthProviderCreateBulk) Save(ctx context.Context) ([]*UserOAuthProvider, error)
- func (uopcb *UserOAuthProviderCreateBulk) SaveX(ctx context.Context) []*UserOAuthProvider
- type UserOAuthProviderDelete
- type UserOAuthProviderDeleteOne
- type UserOAuthProviderEdges
- type UserOAuthProviderGroupBy
- func (uopgb *UserOAuthProviderGroupBy) Aggregate(fns ...AggregateFunc) *UserOAuthProviderGroupBy
- func (uopgb *UserOAuthProviderGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (uopgb *UserOAuthProviderGroupBy) BoolX(ctx context.Context) bool
- func (uopgb *UserOAuthProviderGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (uopgb *UserOAuthProviderGroupBy) BoolsX(ctx context.Context) []bool
- func (uopgb *UserOAuthProviderGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (uopgb *UserOAuthProviderGroupBy) Float64X(ctx context.Context) float64
- func (uopgb *UserOAuthProviderGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (uopgb *UserOAuthProviderGroupBy) Float64sX(ctx context.Context) []float64
- func (uopgb *UserOAuthProviderGroupBy) Int(ctx context.Context) (_ int, err error)
- func (uopgb *UserOAuthProviderGroupBy) IntX(ctx context.Context) int
- func (uopgb *UserOAuthProviderGroupBy) Ints(ctx context.Context) ([]int, error)
- func (uopgb *UserOAuthProviderGroupBy) IntsX(ctx context.Context) []int
- func (uopgb *UserOAuthProviderGroupBy) Scan(ctx context.Context, v interface{}) error
- func (uopgb *UserOAuthProviderGroupBy) ScanX(ctx context.Context, v interface{})
- func (uopgb *UserOAuthProviderGroupBy) String(ctx context.Context) (_ string, err error)
- func (uopgb *UserOAuthProviderGroupBy) StringX(ctx context.Context) string
- func (uopgb *UserOAuthProviderGroupBy) Strings(ctx context.Context) ([]string, error)
- func (uopgb *UserOAuthProviderGroupBy) StringsX(ctx context.Context) []string
- type UserOAuthProviderMutation
- func (m *UserOAuthProviderMutation) AccessToken() (r string, exists bool)
- func (m *UserOAuthProviderMutation) AddField(name string, value ent.Value) error
- func (m *UserOAuthProviderMutation) AddedEdges() []string
- func (m *UserOAuthProviderMutation) AddedField(name string) (ent.Value, bool)
- func (m *UserOAuthProviderMutation) AddedFields() []string
- func (m *UserOAuthProviderMutation) AddedIDs(name string) []ent.Value
- func (m *UserOAuthProviderMutation) ClearEdge(name string) error
- func (m *UserOAuthProviderMutation) ClearField(name string) error
- func (m *UserOAuthProviderMutation) ClearUser()
- func (m *UserOAuthProviderMutation) ClearedEdges() []string
- func (m *UserOAuthProviderMutation) ClearedFields() []string
- func (m UserOAuthProviderMutation) Client() *Client
- func (m *UserOAuthProviderMutation) CreatedAt() (r time.Time, exists bool)
- func (m *UserOAuthProviderMutation) CreatedBy() (r string, exists bool)
- func (m *UserOAuthProviderMutation) EdgeCleared(name string) bool
- func (m *UserOAuthProviderMutation) Expiry() (r time.Time, exists bool)
- func (m *UserOAuthProviderMutation) Field(name string) (ent.Value, bool)
- func (m *UserOAuthProviderMutation) FieldCleared(name string) bool
- func (m *UserOAuthProviderMutation) Fields() []string
- func (m *UserOAuthProviderMutation) ID() (id string, exists bool)
- func (m *UserOAuthProviderMutation) IDs(ctx context.Context) ([]string, error)
- func (m *UserOAuthProviderMutation) OldAccessToken(ctx context.Context) (v string, err error)
- func (m *UserOAuthProviderMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *UserOAuthProviderMutation) OldCreatedBy(ctx context.Context) (v string, err error)
- func (m *UserOAuthProviderMutation) OldExpiry(ctx context.Context) (v time.Time, err error)
- func (m *UserOAuthProviderMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *UserOAuthProviderMutation) OldProvider(ctx context.Context) (v useroauthprovider.Provider, err error)
- func (m *UserOAuthProviderMutation) OldRefreshToken(ctx context.Context) (v string, err error)
- func (m *UserOAuthProviderMutation) OldStatus(ctx context.Context) (v useroauthprovider.Status, err error)
- func (m *UserOAuthProviderMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *UserOAuthProviderMutation) OldUpdatedBy(ctx context.Context) (v string, err error)
- func (m *UserOAuthProviderMutation) OldUserID(ctx context.Context) (v string, err error)
- func (m *UserOAuthProviderMutation) Op() Op
- func (m *UserOAuthProviderMutation) Provider() (r useroauthprovider.Provider, exists bool)
- func (m *UserOAuthProviderMutation) RefreshToken() (r string, exists bool)
- func (m *UserOAuthProviderMutation) RemovedEdges() []string
- func (m *UserOAuthProviderMutation) RemovedIDs(name string) []ent.Value
- func (m *UserOAuthProviderMutation) ResetAccessToken()
- func (m *UserOAuthProviderMutation) ResetCreatedAt()
- func (m *UserOAuthProviderMutation) ResetCreatedBy()
- func (m *UserOAuthProviderMutation) ResetEdge(name string) error
- func (m *UserOAuthProviderMutation) ResetExpiry()
- func (m *UserOAuthProviderMutation) ResetField(name string) error
- func (m *UserOAuthProviderMutation) ResetProvider()
- func (m *UserOAuthProviderMutation) ResetRefreshToken()
- func (m *UserOAuthProviderMutation) ResetStatus()
- func (m *UserOAuthProviderMutation) ResetUpdatedAt()
- func (m *UserOAuthProviderMutation) ResetUpdatedBy()
- func (m *UserOAuthProviderMutation) ResetUser()
- func (m *UserOAuthProviderMutation) ResetUserID()
- func (m *UserOAuthProviderMutation) SetAccessToken(s string)
- func (m *UserOAuthProviderMutation) SetCreatedAt(t time.Time)
- func (m *UserOAuthProviderMutation) SetCreatedBy(s string)
- func (m *UserOAuthProviderMutation) SetExpiry(t time.Time)
- func (m *UserOAuthProviderMutation) SetField(name string, value ent.Value) error
- func (m *UserOAuthProviderMutation) SetID(id string)
- func (m *UserOAuthProviderMutation) SetProvider(u useroauthprovider.Provider)
- func (m *UserOAuthProviderMutation) SetRefreshToken(s string)
- func (m *UserOAuthProviderMutation) SetStatus(u useroauthprovider.Status)
- func (m *UserOAuthProviderMutation) SetUpdatedAt(t time.Time)
- func (m *UserOAuthProviderMutation) SetUpdatedBy(s string)
- func (m *UserOAuthProviderMutation) SetUserID(s string)
- func (m *UserOAuthProviderMutation) Status() (r useroauthprovider.Status, exists bool)
- func (m UserOAuthProviderMutation) Tx() (*Tx, error)
- func (m *UserOAuthProviderMutation) Type() string
- func (m *UserOAuthProviderMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *UserOAuthProviderMutation) UpdatedBy() (r string, exists bool)
- func (m *UserOAuthProviderMutation) UserCleared() bool
- func (m *UserOAuthProviderMutation) UserID() (r string, exists bool)
- func (m *UserOAuthProviderMutation) UserIDs() (ids []string)
- func (m *UserOAuthProviderMutation) Where(ps ...predicate.UserOAuthProvider)
- type UserOAuthProviderQuery
- func (uopq *UserOAuthProviderQuery) All(ctx context.Context) ([]*UserOAuthProvider, error)
- func (uopq *UserOAuthProviderQuery) AllX(ctx context.Context) []*UserOAuthProvider
- func (uopq *UserOAuthProviderQuery) Clone() *UserOAuthProviderQuery
- func (uopq *UserOAuthProviderQuery) Count(ctx context.Context) (int, error)
- func (uopq *UserOAuthProviderQuery) CountX(ctx context.Context) int
- func (uopq *UserOAuthProviderQuery) Exist(ctx context.Context) (bool, error)
- func (uopq *UserOAuthProviderQuery) ExistX(ctx context.Context) bool
- func (uopq *UserOAuthProviderQuery) First(ctx context.Context) (*UserOAuthProvider, error)
- func (uopq *UserOAuthProviderQuery) FirstID(ctx context.Context) (id string, err error)
- func (uopq *UserOAuthProviderQuery) FirstIDX(ctx context.Context) string
- func (uopq *UserOAuthProviderQuery) FirstX(ctx context.Context) *UserOAuthProvider
- func (uopq *UserOAuthProviderQuery) GroupBy(field string, fields ...string) *UserOAuthProviderGroupBy
- func (uopq *UserOAuthProviderQuery) IDs(ctx context.Context) ([]string, error)
- func (uopq *UserOAuthProviderQuery) IDsX(ctx context.Context) []string
- func (uopq *UserOAuthProviderQuery) Limit(limit int) *UserOAuthProviderQuery
- func (uopq *UserOAuthProviderQuery) Offset(offset int) *UserOAuthProviderQuery
- func (uopq *UserOAuthProviderQuery) Only(ctx context.Context) (*UserOAuthProvider, error)
- func (uopq *UserOAuthProviderQuery) OnlyID(ctx context.Context) (id string, err error)
- func (uopq *UserOAuthProviderQuery) OnlyIDX(ctx context.Context) string
- func (uopq *UserOAuthProviderQuery) OnlyX(ctx context.Context) *UserOAuthProvider
- func (uopq *UserOAuthProviderQuery) Order(o ...OrderFunc) *UserOAuthProviderQuery
- func (uopq *UserOAuthProviderQuery) QueryUser() *UserQuery
- func (uopq *UserOAuthProviderQuery) Select(fields ...string) *UserOAuthProviderSelect
- func (uopq *UserOAuthProviderQuery) Unique(unique bool) *UserOAuthProviderQuery
- func (uopq *UserOAuthProviderQuery) Where(ps ...predicate.UserOAuthProvider) *UserOAuthProviderQuery
- func (uopq *UserOAuthProviderQuery) WithUser(opts ...func(*UserQuery)) *UserOAuthProviderQuery
- type UserOAuthProviderSelect
- func (uops *UserOAuthProviderSelect) Bool(ctx context.Context) (_ bool, err error)
- func (uops *UserOAuthProviderSelect) BoolX(ctx context.Context) bool
- func (uops *UserOAuthProviderSelect) Bools(ctx context.Context) ([]bool, error)
- func (uops *UserOAuthProviderSelect) BoolsX(ctx context.Context) []bool
- func (uops *UserOAuthProviderSelect) Float64(ctx context.Context) (_ float64, err error)
- func (uops *UserOAuthProviderSelect) Float64X(ctx context.Context) float64
- func (uops *UserOAuthProviderSelect) Float64s(ctx context.Context) ([]float64, error)
- func (uops *UserOAuthProviderSelect) Float64sX(ctx context.Context) []float64
- func (uops *UserOAuthProviderSelect) Int(ctx context.Context) (_ int, err error)
- func (uops *UserOAuthProviderSelect) IntX(ctx context.Context) int
- func (uops *UserOAuthProviderSelect) Ints(ctx context.Context) ([]int, error)
- func (uops *UserOAuthProviderSelect) IntsX(ctx context.Context) []int
- func (uops *UserOAuthProviderSelect) Scan(ctx context.Context, v interface{}) error
- func (uops *UserOAuthProviderSelect) ScanX(ctx context.Context, v interface{})
- func (uops *UserOAuthProviderSelect) String(ctx context.Context) (_ string, err error)
- func (uops *UserOAuthProviderSelect) StringX(ctx context.Context) string
- func (uops *UserOAuthProviderSelect) Strings(ctx context.Context) ([]string, error)
- func (uops *UserOAuthProviderSelect) StringsX(ctx context.Context) []string
- type UserOAuthProviderUpdate
- func (uopu *UserOAuthProviderUpdate) ClearUser() *UserOAuthProviderUpdate
- func (uopu *UserOAuthProviderUpdate) Exec(ctx context.Context) error
- func (uopu *UserOAuthProviderUpdate) ExecX(ctx context.Context)
- func (uopu *UserOAuthProviderUpdate) Mutation() *UserOAuthProviderMutation
- func (uopu *UserOAuthProviderUpdate) Save(ctx context.Context) (int, error)
- func (uopu *UserOAuthProviderUpdate) SaveX(ctx context.Context) int
- func (uopu *UserOAuthProviderUpdate) SetAccessToken(s string) *UserOAuthProviderUpdate
- func (uopu *UserOAuthProviderUpdate) SetCreatedAt(t time.Time) *UserOAuthProviderUpdate
- func (uopu *UserOAuthProviderUpdate) SetCreatedBy(s string) *UserOAuthProviderUpdate
- func (uopu *UserOAuthProviderUpdate) SetExpiry(t time.Time) *UserOAuthProviderUpdate
- func (uopu *UserOAuthProviderUpdate) SetNillableCreatedAt(t *time.Time) *UserOAuthProviderUpdate
- func (uopu *UserOAuthProviderUpdate) SetNillableStatus(u *useroauthprovider.Status) *UserOAuthProviderUpdate
- func (uopu *UserOAuthProviderUpdate) SetProvider(u useroauthprovider.Provider) *UserOAuthProviderUpdate
- func (uopu *UserOAuthProviderUpdate) SetRefreshToken(s string) *UserOAuthProviderUpdate
- func (uopu *UserOAuthProviderUpdate) SetStatus(u useroauthprovider.Status) *UserOAuthProviderUpdate
- func (uopu *UserOAuthProviderUpdate) SetUpdatedAt(t time.Time) *UserOAuthProviderUpdate
- func (uopu *UserOAuthProviderUpdate) SetUpdatedBy(s string) *UserOAuthProviderUpdate
- func (uopu *UserOAuthProviderUpdate) SetUser(u *User) *UserOAuthProviderUpdate
- func (uopu *UserOAuthProviderUpdate) SetUserID(s string) *UserOAuthProviderUpdate
- func (uopu *UserOAuthProviderUpdate) Where(ps ...predicate.UserOAuthProvider) *UserOAuthProviderUpdate
- type UserOAuthProviderUpdateOne
- func (uopuo *UserOAuthProviderUpdateOne) ClearUser() *UserOAuthProviderUpdateOne
- func (uopuo *UserOAuthProviderUpdateOne) Exec(ctx context.Context) error
- func (uopuo *UserOAuthProviderUpdateOne) ExecX(ctx context.Context)
- func (uopuo *UserOAuthProviderUpdateOne) Mutation() *UserOAuthProviderMutation
- func (uopuo *UserOAuthProviderUpdateOne) Save(ctx context.Context) (*UserOAuthProvider, error)
- func (uopuo *UserOAuthProviderUpdateOne) SaveX(ctx context.Context) *UserOAuthProvider
- func (uopuo *UserOAuthProviderUpdateOne) Select(field string, fields ...string) *UserOAuthProviderUpdateOne
- func (uopuo *UserOAuthProviderUpdateOne) SetAccessToken(s string) *UserOAuthProviderUpdateOne
- func (uopuo *UserOAuthProviderUpdateOne) SetCreatedAt(t time.Time) *UserOAuthProviderUpdateOne
- func (uopuo *UserOAuthProviderUpdateOne) SetCreatedBy(s string) *UserOAuthProviderUpdateOne
- func (uopuo *UserOAuthProviderUpdateOne) SetExpiry(t time.Time) *UserOAuthProviderUpdateOne
- func (uopuo *UserOAuthProviderUpdateOne) SetNillableCreatedAt(t *time.Time) *UserOAuthProviderUpdateOne
- func (uopuo *UserOAuthProviderUpdateOne) SetNillableStatus(u *useroauthprovider.Status) *UserOAuthProviderUpdateOne
- func (uopuo *UserOAuthProviderUpdateOne) SetProvider(u useroauthprovider.Provider) *UserOAuthProviderUpdateOne
- func (uopuo *UserOAuthProviderUpdateOne) SetRefreshToken(s string) *UserOAuthProviderUpdateOne
- func (uopuo *UserOAuthProviderUpdateOne) SetStatus(u useroauthprovider.Status) *UserOAuthProviderUpdateOne
- func (uopuo *UserOAuthProviderUpdateOne) SetUpdatedAt(t time.Time) *UserOAuthProviderUpdateOne
- func (uopuo *UserOAuthProviderUpdateOne) SetUpdatedBy(s string) *UserOAuthProviderUpdateOne
- func (uopuo *UserOAuthProviderUpdateOne) SetUser(u *User) *UserOAuthProviderUpdateOne
- func (uopuo *UserOAuthProviderUpdateOne) SetUserID(s string) *UserOAuthProviderUpdateOne
- type UserOAuthProviders
- 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 string, err error)
- func (uq *UserQuery) FirstIDX(ctx context.Context) string
- func (uq *UserQuery) FirstX(ctx context.Context) *User
- func (uq *UserQuery) GroupBy(field string, fields ...string) *UserGroupBy
- func (uq *UserQuery) IDs(ctx context.Context) ([]string, error)
- func (uq *UserQuery) IDsX(ctx context.Context) []string
- 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 string, err error)
- func (uq *UserQuery) OnlyIDX(ctx context.Context) string
- func (uq *UserQuery) OnlyX(ctx context.Context) *User
- func (uq *UserQuery) Order(o ...OrderFunc) *UserQuery
- func (uq *UserQuery) QueryDevices() *UserDeviceQuery
- func (uq *UserQuery) QueryMeta() *UserMetaQuery
- func (uq *UserQuery) QueryOauthProviders() *UserOAuthProviderQuery
- func (uq *UserQuery) Select(fields ...string) *UserSelect
- func (uq *UserQuery) Unique(unique bool) *UserQuery
- func (uq *UserQuery) Where(ps ...predicate.User) *UserQuery
- func (uq *UserQuery) WithDevices(opts ...func(*UserDeviceQuery)) *UserQuery
- func (uq *UserQuery) WithMeta(opts ...func(*UserMetaQuery)) *UserQuery
- func (uq *UserQuery) WithOauthProviders(opts ...func(*UserOAuthProviderQuery)) *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) AddDeviceIDs(ids ...string) *UserUpdate
- func (uu *UserUpdate) AddDevices(u ...*UserDevice) *UserUpdate
- func (uu *UserUpdate) AddMeta(u ...*UserMeta) *UserUpdate
- func (uu *UserUpdate) AddMetumIDs(ids ...string) *UserUpdate
- func (uu *UserUpdate) AddOauthProviderIDs(ids ...string) *UserUpdate
- func (uu *UserUpdate) AddOauthProviders(u ...*UserOAuthProvider) *UserUpdate
- func (uu *UserUpdate) ClearDevices() *UserUpdate
- func (uu *UserUpdate) ClearMeta() *UserUpdate
- func (uu *UserUpdate) ClearOauthProviders() *UserUpdate
- func (uu *UserUpdate) Exec(ctx context.Context) error
- func (uu *UserUpdate) ExecX(ctx context.Context)
- func (uu *UserUpdate) Mutation() *UserMutation
- func (uu *UserUpdate) RemoveDeviceIDs(ids ...string) *UserUpdate
- func (uu *UserUpdate) RemoveDevices(u ...*UserDevice) *UserUpdate
- func (uu *UserUpdate) RemoveMeta(u ...*UserMeta) *UserUpdate
- func (uu *UserUpdate) RemoveMetumIDs(ids ...string) *UserUpdate
- func (uu *UserUpdate) RemoveOauthProviderIDs(ids ...string) *UserUpdate
- func (uu *UserUpdate) RemoveOauthProviders(u ...*UserOAuthProvider) *UserUpdate
- func (uu *UserUpdate) Save(ctx context.Context) (int, error)
- func (uu *UserUpdate) SaveX(ctx context.Context) int
- func (uu *UserUpdate) SetCreatedAt(t time.Time) *UserUpdate
- func (uu *UserUpdate) SetCreatedBy(s string) *UserUpdate
- func (uu *UserUpdate) SetNillableCreatedAt(t *time.Time) *UserUpdate
- func (uu *UserUpdate) SetNillableSignup(b *bool) *UserUpdate
- func (uu *UserUpdate) SetNillableStatus(u *user.Status) *UserUpdate
- func (uu *UserUpdate) SetNillableType(u *user.Type) *UserUpdate
- func (uu *UserUpdate) SetSignup(b bool) *UserUpdate
- func (uu *UserUpdate) SetStatus(u user.Status) *UserUpdate
- func (uu *UserUpdate) SetType(u user.Type) *UserUpdate
- func (uu *UserUpdate) SetUpdatedAt(t time.Time) *UserUpdate
- func (uu *UserUpdate) SetUpdatedBy(s string) *UserUpdate
- func (uu *UserUpdate) SetUsername(s string) *UserUpdate
- func (uu *UserUpdate) Where(ps ...predicate.User) *UserUpdate
- type UserUpdateOne
- func (uuo *UserUpdateOne) AddDeviceIDs(ids ...string) *UserUpdateOne
- func (uuo *UserUpdateOne) AddDevices(u ...*UserDevice) *UserUpdateOne
- func (uuo *UserUpdateOne) AddMeta(u ...*UserMeta) *UserUpdateOne
- func (uuo *UserUpdateOne) AddMetumIDs(ids ...string) *UserUpdateOne
- func (uuo *UserUpdateOne) AddOauthProviderIDs(ids ...string) *UserUpdateOne
- func (uuo *UserUpdateOne) AddOauthProviders(u ...*UserOAuthProvider) *UserUpdateOne
- func (uuo *UserUpdateOne) ClearDevices() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearMeta() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearOauthProviders() *UserUpdateOne
- func (uuo *UserUpdateOne) Exec(ctx context.Context) error
- func (uuo *UserUpdateOne) ExecX(ctx context.Context)
- func (uuo *UserUpdateOne) Mutation() *UserMutation
- func (uuo *UserUpdateOne) RemoveDeviceIDs(ids ...string) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveDevices(u ...*UserDevice) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveMeta(u ...*UserMeta) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveMetumIDs(ids ...string) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveOauthProviderIDs(ids ...string) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveOauthProviders(u ...*UserOAuthProvider) *UserUpdateOne
- func (uuo *UserUpdateOne) Save(ctx context.Context) (*User, error)
- func (uuo *UserUpdateOne) SaveX(ctx context.Context) *User
- func (uuo *UserUpdateOne) Select(field string, fields ...string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetCreatedAt(t time.Time) *UserUpdateOne
- func (uuo *UserUpdateOne) SetCreatedBy(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableCreatedAt(t *time.Time) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableSignup(b *bool) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableStatus(u *user.Status) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableType(u *user.Type) *UserUpdateOne
- func (uuo *UserUpdateOne) SetSignup(b bool) *UserUpdateOne
- func (uuo *UserUpdateOne) SetStatus(u user.Status) *UserUpdateOne
- func (uuo *UserUpdateOne) SetType(u user.Type) *UserUpdateOne
- func (uuo *UserUpdateOne) SetUpdatedAt(t time.Time) *UserUpdateOne
- func (uuo *UserUpdateOne) SetUpdatedBy(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetUsername(s string) *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" TypeUserDevice = "UserDevice" TypeUserMeta = "UserMeta" TypeUserOAuthProvider = "UserOAuthProvider" )
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 validation error.
func NewContext ¶
NewContext returns a new context with the given Client attached.
Types ¶
type AggregateFunc ¶
AggregateFunc applies an aggregation step on the group-by traversal/selector.
func As ¶
func As(fn AggregateFunc, end string) AggregateFunc
As is a pseudo aggregation function for renaming another other functions with custom names. For example:
GroupBy(field1, field2). Aggregate(ent.As(ent.Sum(field1), "sum_field1"), (ent.As(ent.Sum(field2), "sum_field2")). Scan(ctx, &v)
func Count ¶
func Count() AggregateFunc
Count applies the "count" aggregation function on each group.
func Max ¶
func Max(field string) AggregateFunc
Max applies the "max" aggregation function on the given field of each group.
func Mean ¶
func Mean(field string) AggregateFunc
Mean applies the "mean" aggregation function on the given field of each group.
func Min ¶
func Min(field string) AggregateFunc
Min applies the "min" aggregation function on the given field of each group.
func Sum ¶
func Sum(field string) AggregateFunc
Sum applies the "sum" aggregation function on the given field of each group.
type Client ¶
type Client struct { // Schema is the client for creating, migrating and dropping schema. Schema *migrate.Schema // Session is the client for interacting with the Session builders. Session *SessionClient // User is the client for interacting with the User builders. User *UserClient // UserDevice is the client for interacting with the UserDevice builders. UserDevice *UserDeviceClient // UserMeta is the client for interacting with the UserMeta builders. UserMeta *UserMetaClient // UserOAuthProvider is the client for interacting with the UserOAuthProvider builders. UserOAuthProvider *UserOAuthProviderClient // contains filtered or unexported fields }
Client is the client that holds all ent builders.
func FromContext ¶
FromContext returns a Client stored inside a context, or nil if there isn't one.
func Open ¶
Open opens a database/sql.DB specified by the driver name and the data source name, and returns a new client attached to it. Optional parameters can be added for configuring the client.
func (*Client) Debug ¶
Debug returns a new debug-client. It's used to get verbose logging on specific operations.
client.Debug(). 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(ctx context.Context, tx *ent.Tx) error { // Do some stuff before. if err := next.Commit(ctx, tx); err != nil { return err } // Do some stuff after. return nil }) }
type ConstraintError ¶
type ConstraintError struct {
// contains filtered or unexported fields
}
ConstraintError returns when trying to create/update one or more entities and one or more of their constraints failed. For example, violation of edge or field uniqueness.
func (ConstraintError) Error ¶
func (e ConstraintError) Error() string
Error implements the error interface.
func (*ConstraintError) Unwrap ¶
func (e *ConstraintError) Unwrap() error
Unwrap implements the errors.Wrapper interface.
type MutateFunc ¶
type MutateFunc = ent.MutateFunc
ent aliases to avoid import conflicts in user's code.
type NotFoundError ¶
type NotFoundError struct {
// contains filtered or unexported fields
}
NotFoundError returns when trying to fetch a specific entity and it was not found in the database.
func (*NotFoundError) Error ¶
func (e *NotFoundError) Error() string
Error implements the error interface.
type NotLoadedError ¶
type NotLoadedError struct {
// contains filtered or unexported fields
}
NotLoadedError returns when trying to get a node that was not loaded by the query.
func (*NotLoadedError) Error ¶
func (e *NotLoadedError) Error() string
Error implements the error interface.
type NotSingularError ¶
type NotSingularError struct {
// contains filtered or unexported fields
}
NotSingularError returns when trying to fetch a singular entity and more then one was found in the database.
func (*NotSingularError) Error ¶
func (e *NotSingularError) Error() string
Error implements the error interface.
type RollbackFunc ¶
The RollbackFunc type is an adapter to allow the use of ordinary function as a Rollbacker. If f is a function with the appropriate signature, RollbackFunc(f) is a Rollbacker that calls f.
type RollbackHook ¶
type RollbackHook func(Rollbacker) Rollbacker
RollbackHook defines the "rollback middleware". A function that gets a Rollbacker and returns a Rollbacker. For example:
hook := func(next ent.Rollbacker) ent.Rollbacker { return ent.RollbackFunc(func(ctx context.Context, tx *ent.Tx) error { // Do some stuff before. if err := next.Rollback(ctx, tx); err != nil { return err } // Do some stuff after. return nil }) }
type Rollbacker ¶
Rollbacker is the interface that wraps the Rollback method.
type Session ¶
type Session struct { // ID of the ent. ID int `json:"id,omitempty"` // Key holds the value of the "key" field. Key string `json:"key,omitempty"` // Data holds the value of the "data" field. Data *model.Session `json:"data,omitempty"` // contains filtered or unexported fields }
Session is the model entity for the Session schema.
func (*Session) Unwrap ¶
Unwrap unwraps the Session entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.
func (*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 int) *SessionDeleteOne
DeleteOneID returns a delete builder for the given id.
func (*SessionClient) GetX ¶
func (c *SessionClient) GetX(ctx context.Context, id int) *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 int) *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) Exec ¶
func (sc *SessionCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*SessionCreate) ExecX ¶
func (sc *SessionCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
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) SetData ¶
func (sc *SessionCreate) SetData(m *model.Session) *SessionCreate
SetData sets the "data" field.
func (*SessionCreate) SetKey ¶
func (sc *SessionCreate) SetKey(s string) *SessionCreate
SetKey sets the "key" field.
type SessionCreateBulk ¶
type SessionCreateBulk struct {
// contains filtered or unexported fields
}
SessionCreateBulk is the builder for creating many Session entities in bulk.
func (*SessionCreateBulk) Exec ¶
func (scb *SessionCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*SessionCreateBulk) ExecX ¶
func (scb *SessionCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
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 appends a list predicates to the SessionDelete 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 group-by builder for 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 a group-by query. It is only allowed when executing a group-by query 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 executing a group-by query 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 a group-by query. It is only allowed when executing a group-by query 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 executing a group-by query 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 a group-by query. It is only allowed when executing a group-by query 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 executing a group-by query 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 scans 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 a group-by query. It is only allowed when executing a group-by query 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 mutates the Session nodes in the graph.
func (*SessionMutation) AddField ¶
func (m *SessionMutation) AddField(name string, value ent.Value) error
AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*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 incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*SessionMutation) AddedFields ¶
func (m *SessionMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/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 in this mutation.
func (*SessionMutation) ClearEdge ¶
func (m *SessionMutation) ClearEdge(name string) error
ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.
func (*SessionMutation) ClearField ¶
func (m *SessionMutation) ClearField(name string) error
ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.
func (*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) Data ¶
func (m *SessionMutation) Data() (r *model.Session, exists bool)
Data returns the value of the "data" field in the mutation.
func (*SessionMutation) EdgeCleared ¶
func (m *SessionMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name 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 return value indicates that this field was not set, or was not defined in the schema.
func (*SessionMutation) FieldCleared ¶
func (m *SessionMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name 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 incremented/decremented, call AddedFields().
func (*SessionMutation) ID ¶
func (m *SessionMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*SessionMutation) IDs ¶
func (m *SessionMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*SessionMutation) Key ¶
func (m *SessionMutation) Key() (r string, exists bool)
Key returns the value of the "key" field in the mutation.
func (*SessionMutation) OldData ¶
OldData returns the old "data" field's value of the Session entity. 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 the 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 failed.
func (*SessionMutation) OldKey ¶
func (m *SessionMutation) OldKey(ctx context.Context) (v string, err error)
OldKey returns the old "key" field's value of the Session entity. 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 the 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 edge with the given name in this mutation.
func (*SessionMutation) ResetData ¶
func (m *SessionMutation) ResetData()
ResetData resets all changes to the "data" field.
func (*SessionMutation) ResetEdge ¶
func (m *SessionMutation) ResetEdge(name string) error
ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.
func (*SessionMutation) ResetField ¶
func (m *SessionMutation) ResetField(name string) error
ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.
func (*SessionMutation) ResetKey ¶
func (m *SessionMutation) ResetKey()
ResetKey resets all changes to the "key" field.
func (*SessionMutation) SetData ¶
func (m *SessionMutation) SetData(value *model.Session)
SetData sets the "data" field.
func (*SessionMutation) SetField ¶
func (m *SessionMutation) SetField(name string, value ent.Value) error
SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*SessionMutation) SetKey ¶
func (m *SessionMutation) SetKey(s string)
SetKey sets the "key" 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).
func (*SessionMutation) Where ¶
func (m *SessionMutation) Where(ps ...predicate.Session)
Where appends a list predicates to the SessionMutation builder.
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 SessionQuery 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 from the query. Returns a *NotFoundError when no Session was found.
func (*SessionQuery) FirstID ¶
func (sq *SessionQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first Session ID from the query. Returns a *NotFoundError when no Session ID was found.
func (*SessionQuery) FirstIDX ¶
func (sq *SessionQuery) FirstIDX(ctx context.Context) int
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 is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct { Key string `json:"key,omitempty"` Count int `json:"count,omitempty"` } client.Session.Query(). GroupBy(session.FieldKey). Aggregate(ent.Count()). Scan(ctx, &v)
func (*SessionQuery) IDs ¶
func (sq *SessionQuery) IDs(ctx context.Context) ([]int, error)
IDs executes the query and returns a list of Session IDs.
func (*SessionQuery) IDsX ¶
func (sq *SessionQuery) IDsX(ctx context.Context) []int
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 a single Session entity found by the query, ensuring it only returns one. Returns a *NotSingularError when exactly one Session entity is not found. Returns a *NotFoundError when no Session entities are found.
func (*SessionQuery) OnlyID ¶
func (sq *SessionQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only Session ID in the query. Returns a *NotSingularError when exactly one Session ID is not found. Returns a *NotFoundError when no entities are found.
func (*SessionQuery) OnlyIDX ¶
func (sq *SessionQuery) OnlyIDX(ctx context.Context) int
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(fields ...string) *SessionSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct { Key string `json:"key,omitempty"` } client.Session.Query(). Select(session.FieldKey). Scan(ctx, &v)
func (*SessionQuery) Unique ¶
func (sq *SessionQuery) Unique(unique bool) *SessionQuery
Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.
func (*SessionQuery) Where ¶
func (sq *SessionQuery) Where(ps ...predicate.Session) *SessionQuery
Where adds a new predicate for the SessionQuery builder.
type SessionSelect ¶
type SessionSelect struct { *SessionQuery // contains filtered or unexported fields }
SessionSelect is the builder for selecting fields of Session entities.
func (*SessionSelect) Bool ¶
func (ss *SessionSelect) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a 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 a 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 a 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 a 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 a 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 a 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 scans 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 a 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) 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(m *model.Session) *SessionUpdate
SetData sets the "data" field.
func (*SessionUpdate) SetKey ¶
func (su *SessionUpdate) SetKey(s string) *SessionUpdate
SetKey sets the "key" field.
func (*SessionUpdate) Where ¶
func (su *SessionUpdate) Where(ps ...predicate.Session) *SessionUpdate
Where appends a list predicates to the SessionUpdate builder.
type SessionUpdateOne ¶
type SessionUpdateOne struct {
// contains filtered or unexported fields
}
SessionUpdateOne is the builder for updating a single Session entity.
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 Session entity.
func (*SessionUpdateOne) SaveX ¶
func (suo *SessionUpdateOne) SaveX(ctx context.Context) *Session
SaveX is like Save, but panics if an error occurs.
func (*SessionUpdateOne) Select ¶
func (suo *SessionUpdateOne) Select(field string, fields ...string) *SessionUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*SessionUpdateOne) SetData ¶
func (suo *SessionUpdateOne) SetData(m *model.Session) *SessionUpdateOne
SetData sets the "data" field.
func (*SessionUpdateOne) SetKey ¶
func (suo *SessionUpdateOne) SetKey(s string) *SessionUpdateOne
SetKey sets the "key" 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 // UserDevice is the client for interacting with the UserDevice builders. UserDevice *UserDeviceClient // UserMeta is the client for interacting with the UserMeta builders. UserMeta *UserMetaClient // UserOAuthProvider is the client for interacting with the UserOAuthProvider builders. UserOAuthProvider *UserOAuthProviderClient // contains filtered or unexported fields }
Tx is a transactional client that is created by calling Client.Tx().
func TxFromContext ¶
TxFromContext returns a Tx stored inside a context, or nil if there isn't one.
func (*Tx) OnRollback ¶
func (tx *Tx) OnRollback(f RollbackHook)
OnRollback adds a hook to call on rollback.
type User ¶
type User struct { // ID of the ent. ID string `json:"id,omitempty"` // CreatedAt holds the value of the "created_at" field. // 해당 row를 최초로 만든 시간은 언제인지? CreatedAt time.Time `json:"created_at,omitempty"` // CreatedBy holds the value of the "created_by" field. // 해당 row를 최초로 만든 주체는 누구인지? CreatedBy string `json:"created_by,omitempty"` // UpdatedAt holds the value of the "updated_at" field. // 해당 row를 수정한 마지막 시간은 언제인지 UpdatedAt time.Time `json:"updated_at,omitempty"` // UpdatedBy holds the value of the "updated_by" field. // 해당 row를 수정한 마지막 주체 누구인지 UpdatedBy string `json:"updated_by,omitempty"` // Status holds the value of the "status" field. // 해당 사용자는 서비스에서 유효한지 아닌지 Status user.Status `json:"status,omitempty"` // Type holds the value of the "type" field. // 일반 사용자인지, 어드민 인지, 스태프 인지.. 등 Type user.Type `json:"type,omitempty"` // Signup holds the value of the "signup" field. // 회원가입이 잘 끝난 사용자인지 아닌지? Signup bool `json:"signup,omitempty"` // Username holds the value of the "username" field. // 서비스에서 유일한 사용자의 이름 Username string `json:"username,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the UserQuery when eager-loading is set. Edges UserEdges `json:"edges"` // contains filtered or unexported fields }
User is the model entity for the User schema.
func (*User) QueryDevices ¶
func (u *User) QueryDevices() *UserDeviceQuery
QueryDevices queries the "devices" edge of the User entity.
func (*User) QueryMeta ¶
func (u *User) QueryMeta() *UserMetaQuery
QueryMeta queries the "meta" edge of the User entity.
func (*User) QueryOauthProviders ¶
func (u *User) QueryOauthProviders() *UserOAuthProviderQuery
QueryOauthProviders queries the "oauth_providers" edge of the User entity.
func (*User) Unwrap ¶
Unwrap unwraps the User entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.
func (*User) Update ¶
func (u *User) Update() *UserUpdateOne
Update returns a builder for updating this User. Note that you need to call User.Unwrap() before calling this method if this User was returned from a transaction, and the transaction was committed or rolled back.
type UserClient ¶
type UserClient struct {
// contains filtered or unexported fields
}
UserClient is a client for the User schema.
func NewUserClient ¶
func NewUserClient(c config) *UserClient
NewUserClient returns a client for the User from the given config.
func (*UserClient) Create ¶
func (c *UserClient) Create() *UserCreate
Create returns a 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 string) *UserDeleteOne
DeleteOneID returns a delete builder for the given id.
func (*UserClient) GetX ¶
func (c *UserClient) GetX(ctx context.Context, id string) *User
GetX is like Get, but panics if an error occurs.
func (*UserClient) Query ¶
func (c *UserClient) Query() *UserQuery
Query returns a query builder for User.
func (*UserClient) QueryDevices ¶
func (c *UserClient) QueryDevices(u *User) *UserDeviceQuery
QueryDevices queries the devices edge of a User.
func (*UserClient) QueryMeta ¶
func (c *UserClient) QueryMeta(u *User) *UserMetaQuery
QueryMeta queries the meta edge of a User.
func (*UserClient) QueryOauthProviders ¶
func (c *UserClient) QueryOauthProviders(u *User) *UserOAuthProviderQuery
QueryOauthProviders queries the oauth_providers edge of a User.
func (*UserClient) Update ¶
func (c *UserClient) Update() *UserUpdate
Update returns an update builder for User.
func (*UserClient) UpdateOne ¶
func (c *UserClient) UpdateOne(u *User) *UserUpdateOne
UpdateOne returns an update builder for the given entity.
func (*UserClient) UpdateOneID ¶
func (c *UserClient) UpdateOneID(id string) *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) AddDeviceIDs ¶
func (uc *UserCreate) AddDeviceIDs(ids ...string) *UserCreate
AddDeviceIDs adds the "devices" edge to the UserDevice entity by IDs.
func (*UserCreate) AddDevices ¶
func (uc *UserCreate) AddDevices(u ...*UserDevice) *UserCreate
AddDevices adds the "devices" edges to the UserDevice entity.
func (*UserCreate) AddMeta ¶
func (uc *UserCreate) AddMeta(u ...*UserMeta) *UserCreate
AddMeta adds the "meta" edges to the UserMeta entity.
func (*UserCreate) AddMetumIDs ¶
func (uc *UserCreate) AddMetumIDs(ids ...string) *UserCreate
AddMetumIDs adds the "meta" edge to the UserMeta entity by IDs.
func (*UserCreate) AddOauthProviderIDs ¶
func (uc *UserCreate) AddOauthProviderIDs(ids ...string) *UserCreate
AddOauthProviderIDs adds the "oauth_providers" edge to the UserOAuthProvider entity by IDs.
func (*UserCreate) AddOauthProviders ¶
func (uc *UserCreate) AddOauthProviders(u ...*UserOAuthProvider) *UserCreate
AddOauthProviders adds the "oauth_providers" edges to the UserOAuthProvider entity.
func (*UserCreate) Exec ¶
func (uc *UserCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*UserCreate) ExecX ¶
func (uc *UserCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserCreate) Mutation ¶
func (uc *UserCreate) Mutation() *UserMutation
Mutation returns the UserMutation object of the builder.
func (*UserCreate) Save ¶
func (uc *UserCreate) Save(ctx context.Context) (*User, error)
Save creates the User in the database.
func (*UserCreate) SaveX ¶
func (uc *UserCreate) SaveX(ctx context.Context) *User
SaveX calls Save and panics if Save returns an error.
func (*UserCreate) SetCreatedAt ¶
func (uc *UserCreate) SetCreatedAt(t time.Time) *UserCreate
SetCreatedAt sets the "created_at" field.
func (*UserCreate) SetCreatedBy ¶
func (uc *UserCreate) SetCreatedBy(s string) *UserCreate
SetCreatedBy sets the "created_by" field.
func (*UserCreate) SetID ¶
func (uc *UserCreate) SetID(s string) *UserCreate
SetID sets the "id" field.
func (*UserCreate) SetNillableCreatedAt ¶
func (uc *UserCreate) SetNillableCreatedAt(t *time.Time) *UserCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*UserCreate) SetNillableSignup ¶
func (uc *UserCreate) SetNillableSignup(b *bool) *UserCreate
SetNillableSignup sets the "signup" field if the given value is not nil.
func (*UserCreate) SetNillableStatus ¶
func (uc *UserCreate) SetNillableStatus(u *user.Status) *UserCreate
SetNillableStatus sets the "status" field if the given value is not nil.
func (*UserCreate) SetNillableType ¶
func (uc *UserCreate) SetNillableType(u *user.Type) *UserCreate
SetNillableType sets the "type" 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) SetSignup ¶
func (uc *UserCreate) SetSignup(b bool) *UserCreate
SetSignup sets the "signup" field.
func (*UserCreate) SetStatus ¶
func (uc *UserCreate) SetStatus(u user.Status) *UserCreate
SetStatus sets the "status" field.
func (*UserCreate) SetType ¶
func (uc *UserCreate) SetType(u user.Type) *UserCreate
SetType sets the "type" field.
func (*UserCreate) SetUpdatedAt ¶
func (uc *UserCreate) SetUpdatedAt(t time.Time) *UserCreate
SetUpdatedAt sets the "updated_at" field.
func (*UserCreate) SetUpdatedBy ¶
func (uc *UserCreate) SetUpdatedBy(s string) *UserCreate
SetUpdatedBy sets the "updated_by" field.
func (*UserCreate) SetUsername ¶
func (uc *UserCreate) SetUsername(s string) *UserCreate
SetUsername sets the "username" field.
type UserCreateBulk ¶
type UserCreateBulk struct {
// contains filtered or unexported fields
}
UserCreateBulk is the builder for creating many User entities in bulk.
func (*UserCreateBulk) Exec ¶
func (ucb *UserCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*UserCreateBulk) ExecX ¶
func (ucb *UserCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type UserDelete ¶
type UserDelete struct {
// contains filtered or unexported fields
}
UserDelete is the builder for deleting a User entity.
func (*UserDelete) Exec ¶
func (ud *UserDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*UserDelete) ExecX ¶
func (ud *UserDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*UserDelete) Where ¶
func (ud *UserDelete) Where(ps ...predicate.User) *UserDelete
Where appends a list predicates to the UserDelete builder.
type UserDeleteOne ¶
type UserDeleteOne struct {
// contains filtered or unexported fields
}
UserDeleteOne is the builder for deleting a single User entity.
func (*UserDeleteOne) Exec ¶
func (udo *UserDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*UserDeleteOne) ExecX ¶
func (udo *UserDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type UserDevice ¶
type UserDevice struct { // ID of the ent. ID string `json:"id,omitempty"` // UserID holds the value of the "user_id" field. UserID string `json:"user_id,omitempty"` // CreatedAt holds the value of the "created_at" field. // 해당 row를 최초로 만든 시간은 언제인지? CreatedAt time.Time `json:"created_at,omitempty"` // CreatedBy holds the value of the "created_by" field. // 해당 row를 최초로 만든 주체는 누구인지? CreatedBy string `json:"created_by,omitempty"` // UpdatedAt holds the value of the "updated_at" field. // 해당 row를 수정한 마지막 시간은 언제인지 UpdatedAt time.Time `json:"updated_at,omitempty"` // UpdatedBy holds the value of the "updated_by" field. // 해당 row를 수정한 마지막 주체 누구인지 UpdatedBy string `json:"updated_by,omitempty"` // Status holds the value of the "status" field. // 해당 row는 쓸 수 있는지? 없는지? Status userdevice.Status `json:"status,omitempty"` // Type holds the value of the "type" field. // 모바일 사용자인지, 데스크탑 사용자인지? Type userdevice.Type `json:"type,omitempty"` // Os holds the value of the "os" field. // 어떤 운영체제에서 접속 했는지? Os userdevice.Os `json:"os,omitempty"` // Platform holds the value of the "platform" field. // 브라우저라면, 어떤 브라우저에서 사용하고 있는지? Platform userdevice.Platform `json:"platform,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the UserDeviceQuery when eager-loading is set. Edges UserDeviceEdges `json:"edges"` // contains filtered or unexported fields }
UserDevice is the model entity for the UserDevice schema.
func (*UserDevice) QueryUser ¶
func (ud *UserDevice) QueryUser() *UserQuery
QueryUser queries the "user" edge of the UserDevice entity.
func (*UserDevice) String ¶
func (ud *UserDevice) String() string
String implements the fmt.Stringer.
func (*UserDevice) Unwrap ¶
func (ud *UserDevice) Unwrap() *UserDevice
Unwrap unwraps the UserDevice entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.
func (*UserDevice) Update ¶
func (ud *UserDevice) Update() *UserDeviceUpdateOne
Update returns a builder for updating this UserDevice. Note that you need to call UserDevice.Unwrap() before calling this method if this UserDevice was returned from a transaction, and the transaction was committed or rolled back.
type UserDeviceClient ¶
type UserDeviceClient struct {
// contains filtered or unexported fields
}
UserDeviceClient is a client for the UserDevice schema.
func NewUserDeviceClient ¶
func NewUserDeviceClient(c config) *UserDeviceClient
NewUserDeviceClient returns a client for the UserDevice from the given config.
func (*UserDeviceClient) Create ¶
func (c *UserDeviceClient) Create() *UserDeviceCreate
Create returns a create builder for UserDevice.
func (*UserDeviceClient) CreateBulk ¶
func (c *UserDeviceClient) CreateBulk(builders ...*UserDeviceCreate) *UserDeviceCreateBulk
CreateBulk returns a builder for creating a bulk of UserDevice entities.
func (*UserDeviceClient) Delete ¶
func (c *UserDeviceClient) Delete() *UserDeviceDelete
Delete returns a delete builder for UserDevice.
func (*UserDeviceClient) DeleteOne ¶
func (c *UserDeviceClient) DeleteOne(ud *UserDevice) *UserDeviceDeleteOne
DeleteOne returns a delete builder for the given entity.
func (*UserDeviceClient) DeleteOneID ¶
func (c *UserDeviceClient) DeleteOneID(id string) *UserDeviceDeleteOne
DeleteOneID returns a delete builder for the given id.
func (*UserDeviceClient) Get ¶
func (c *UserDeviceClient) Get(ctx context.Context, id string) (*UserDevice, error)
Get returns a UserDevice entity by its id.
func (*UserDeviceClient) GetX ¶
func (c *UserDeviceClient) GetX(ctx context.Context, id string) *UserDevice
GetX is like Get, but panics if an error occurs.
func (*UserDeviceClient) Hooks ¶
func (c *UserDeviceClient) Hooks() []Hook
Hooks returns the client hooks.
func (*UserDeviceClient) Query ¶
func (c *UserDeviceClient) Query() *UserDeviceQuery
Query returns a query builder for UserDevice.
func (*UserDeviceClient) QueryUser ¶
func (c *UserDeviceClient) QueryUser(ud *UserDevice) *UserQuery
QueryUser queries the user edge of a UserDevice.
func (*UserDeviceClient) Update ¶
func (c *UserDeviceClient) Update() *UserDeviceUpdate
Update returns an update builder for UserDevice.
func (*UserDeviceClient) UpdateOne ¶
func (c *UserDeviceClient) UpdateOne(ud *UserDevice) *UserDeviceUpdateOne
UpdateOne returns an update builder for the given entity.
func (*UserDeviceClient) UpdateOneID ¶
func (c *UserDeviceClient) UpdateOneID(id string) *UserDeviceUpdateOne
UpdateOneID returns an update builder for the given id.
func (*UserDeviceClient) Use ¶
func (c *UserDeviceClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `userdevice.Hooks(f(g(h())))`.
type UserDeviceCreate ¶
type UserDeviceCreate struct {
// contains filtered or unexported fields
}
UserDeviceCreate is the builder for creating a UserDevice entity.
func (*UserDeviceCreate) Exec ¶
func (udc *UserDeviceCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*UserDeviceCreate) ExecX ¶
func (udc *UserDeviceCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserDeviceCreate) Mutation ¶
func (udc *UserDeviceCreate) Mutation() *UserDeviceMutation
Mutation returns the UserDeviceMutation object of the builder.
func (*UserDeviceCreate) Save ¶
func (udc *UserDeviceCreate) Save(ctx context.Context) (*UserDevice, error)
Save creates the UserDevice in the database.
func (*UserDeviceCreate) SaveX ¶
func (udc *UserDeviceCreate) SaveX(ctx context.Context) *UserDevice
SaveX calls Save and panics if Save returns an error.
func (*UserDeviceCreate) SetCreatedAt ¶
func (udc *UserDeviceCreate) SetCreatedAt(t time.Time) *UserDeviceCreate
SetCreatedAt sets the "created_at" field.
func (*UserDeviceCreate) SetCreatedBy ¶
func (udc *UserDeviceCreate) SetCreatedBy(s string) *UserDeviceCreate
SetCreatedBy sets the "created_by" field.
func (*UserDeviceCreate) SetID ¶
func (udc *UserDeviceCreate) SetID(s string) *UserDeviceCreate
SetID sets the "id" field.
func (*UserDeviceCreate) SetNillableCreatedAt ¶
func (udc *UserDeviceCreate) SetNillableCreatedAt(t *time.Time) *UserDeviceCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*UserDeviceCreate) SetNillableStatus ¶
func (udc *UserDeviceCreate) SetNillableStatus(u *userdevice.Status) *UserDeviceCreate
SetNillableStatus sets the "status" field if the given value is not nil.
func (*UserDeviceCreate) SetNillableUpdatedAt ¶
func (udc *UserDeviceCreate) SetNillableUpdatedAt(t *time.Time) *UserDeviceCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*UserDeviceCreate) SetOs ¶
func (udc *UserDeviceCreate) SetOs(u userdevice.Os) *UserDeviceCreate
SetOs sets the "os" field.
func (*UserDeviceCreate) SetPlatform ¶
func (udc *UserDeviceCreate) SetPlatform(u userdevice.Platform) *UserDeviceCreate
SetPlatform sets the "platform" field.
func (*UserDeviceCreate) SetStatus ¶
func (udc *UserDeviceCreate) SetStatus(u userdevice.Status) *UserDeviceCreate
SetStatus sets the "status" field.
func (*UserDeviceCreate) SetType ¶
func (udc *UserDeviceCreate) SetType(u userdevice.Type) *UserDeviceCreate
SetType sets the "type" field.
func (*UserDeviceCreate) SetUpdatedAt ¶
func (udc *UserDeviceCreate) SetUpdatedAt(t time.Time) *UserDeviceCreate
SetUpdatedAt sets the "updated_at" field.
func (*UserDeviceCreate) SetUpdatedBy ¶
func (udc *UserDeviceCreate) SetUpdatedBy(s string) *UserDeviceCreate
SetUpdatedBy sets the "updated_by" field.
func (*UserDeviceCreate) SetUser ¶
func (udc *UserDeviceCreate) SetUser(u *User) *UserDeviceCreate
SetUser sets the "user" edge to the User entity.
func (*UserDeviceCreate) SetUserID ¶
func (udc *UserDeviceCreate) SetUserID(s string) *UserDeviceCreate
SetUserID sets the "user_id" field.
type UserDeviceCreateBulk ¶
type UserDeviceCreateBulk struct {
// contains filtered or unexported fields
}
UserDeviceCreateBulk is the builder for creating many UserDevice entities in bulk.
func (*UserDeviceCreateBulk) Exec ¶
func (udcb *UserDeviceCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*UserDeviceCreateBulk) ExecX ¶
func (udcb *UserDeviceCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserDeviceCreateBulk) Save ¶
func (udcb *UserDeviceCreateBulk) Save(ctx context.Context) ([]*UserDevice, error)
Save creates the UserDevice entities in the database.
func (*UserDeviceCreateBulk) SaveX ¶
func (udcb *UserDeviceCreateBulk) SaveX(ctx context.Context) []*UserDevice
SaveX is like Save, but panics if an error occurs.
type UserDeviceDelete ¶
type UserDeviceDelete struct {
// contains filtered or unexported fields
}
UserDeviceDelete is the builder for deleting a UserDevice entity.
func (*UserDeviceDelete) Exec ¶
func (udd *UserDeviceDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*UserDeviceDelete) ExecX ¶
func (udd *UserDeviceDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*UserDeviceDelete) Where ¶
func (udd *UserDeviceDelete) Where(ps ...predicate.UserDevice) *UserDeviceDelete
Where appends a list predicates to the UserDeviceDelete builder.
type UserDeviceDeleteOne ¶
type UserDeviceDeleteOne struct {
// contains filtered or unexported fields
}
UserDeviceDeleteOne is the builder for deleting a single UserDevice entity.
func (*UserDeviceDeleteOne) Exec ¶
func (uddo *UserDeviceDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*UserDeviceDeleteOne) ExecX ¶
func (uddo *UserDeviceDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type UserDeviceEdges ¶
type UserDeviceEdges struct { // User holds the value of the user edge. User *User `json:"user,omitempty"` // contains filtered or unexported fields }
UserDeviceEdges holds the relations/edges for other nodes in the graph.
func (UserDeviceEdges) UserOrErr ¶
func (e UserDeviceEdges) UserOrErr() (*User, error)
UserOrErr returns the User value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type UserDeviceGroupBy ¶
type UserDeviceGroupBy struct {
// contains filtered or unexported fields
}
UserDeviceGroupBy is the group-by builder for UserDevice entities.
func (*UserDeviceGroupBy) Aggregate ¶
func (udgb *UserDeviceGroupBy) Aggregate(fns ...AggregateFunc) *UserDeviceGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*UserDeviceGroupBy) Bool ¶
func (udgb *UserDeviceGroupBy) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a group-by query. It is only allowed when executing a group-by query with one field.
func (*UserDeviceGroupBy) BoolX ¶
func (udgb *UserDeviceGroupBy) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*UserDeviceGroupBy) Bools ¶
func (udgb *UserDeviceGroupBy) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from group-by. It is only allowed when executing a group-by query with one field.
func (*UserDeviceGroupBy) BoolsX ¶
func (udgb *UserDeviceGroupBy) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*UserDeviceGroupBy) Float64 ¶
func (udgb *UserDeviceGroupBy) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a group-by query. It is only allowed when executing a group-by query with one field.
func (*UserDeviceGroupBy) Float64X ¶
func (udgb *UserDeviceGroupBy) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*UserDeviceGroupBy) Float64s ¶
func (udgb *UserDeviceGroupBy) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from group-by. It is only allowed when executing a group-by query with one field.
func (*UserDeviceGroupBy) Float64sX ¶
func (udgb *UserDeviceGroupBy) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*UserDeviceGroupBy) Int ¶
func (udgb *UserDeviceGroupBy) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a group-by query. It is only allowed when executing a group-by query with one field.
func (*UserDeviceGroupBy) IntX ¶
func (udgb *UserDeviceGroupBy) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*UserDeviceGroupBy) Ints ¶
func (udgb *UserDeviceGroupBy) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from group-by. It is only allowed when executing a group-by query with one field.
func (*UserDeviceGroupBy) IntsX ¶
func (udgb *UserDeviceGroupBy) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*UserDeviceGroupBy) Scan ¶
func (udgb *UserDeviceGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scans the result into the given value.
func (*UserDeviceGroupBy) ScanX ¶
func (udgb *UserDeviceGroupBy) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*UserDeviceGroupBy) String ¶
func (udgb *UserDeviceGroupBy) String(ctx context.Context) (_ string, err error)
String returns a single string from a group-by query. It is only allowed when executing a group-by query with one field.
func (*UserDeviceGroupBy) StringX ¶
func (udgb *UserDeviceGroupBy) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type UserDeviceMutation ¶
type UserDeviceMutation struct {
// contains filtered or unexported fields
}
UserDeviceMutation represents an operation that mutates the UserDevice nodes in the graph.
func (*UserDeviceMutation) AddField ¶
func (m *UserDeviceMutation) AddField(name string, value ent.Value) error
AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*UserDeviceMutation) AddedEdges ¶
func (m *UserDeviceMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*UserDeviceMutation) AddedField ¶
func (m *UserDeviceMutation) AddedField(name string) (ent.Value, bool)
AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*UserDeviceMutation) AddedFields ¶
func (m *UserDeviceMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*UserDeviceMutation) AddedIDs ¶
func (m *UserDeviceMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*UserDeviceMutation) ClearEdge ¶
func (m *UserDeviceMutation) ClearEdge(name string) error
ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.
func (*UserDeviceMutation) ClearField ¶
func (m *UserDeviceMutation) ClearField(name string) error
ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.
func (*UserDeviceMutation) ClearUser ¶
func (m *UserDeviceMutation) ClearUser()
ClearUser clears the "user" edge to the User entity.
func (*UserDeviceMutation) ClearedEdges ¶
func (m *UserDeviceMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*UserDeviceMutation) ClearedFields ¶
func (m *UserDeviceMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (UserDeviceMutation) Client ¶
func (m UserDeviceMutation) 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 (*UserDeviceMutation) CreatedAt ¶
func (m *UserDeviceMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*UserDeviceMutation) CreatedBy ¶
func (m *UserDeviceMutation) CreatedBy() (r string, exists bool)
CreatedBy returns the value of the "created_by" field in the mutation.
func (*UserDeviceMutation) EdgeCleared ¶
func (m *UserDeviceMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*UserDeviceMutation) Field ¶
func (m *UserDeviceMutation) Field(name string) (ent.Value, bool)
Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*UserDeviceMutation) FieldCleared ¶
func (m *UserDeviceMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*UserDeviceMutation) Fields ¶
func (m *UserDeviceMutation) Fields() []string
Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().
func (*UserDeviceMutation) GetType ¶
func (m *UserDeviceMutation) GetType() (r userdevice.Type, exists bool)
GetType returns the value of the "type" field in the mutation.
func (*UserDeviceMutation) ID ¶
func (m *UserDeviceMutation) ID() (id string, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*UserDeviceMutation) IDs ¶
func (m *UserDeviceMutation) IDs(ctx context.Context) ([]string, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*UserDeviceMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the UserDevice entity. If the UserDevice object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserDeviceMutation) OldCreatedBy ¶
func (m *UserDeviceMutation) OldCreatedBy(ctx context.Context) (v string, err error)
OldCreatedBy returns the old "created_by" field's value of the UserDevice entity. If the UserDevice object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserDeviceMutation) OldField ¶
OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.
func (*UserDeviceMutation) OldOs ¶
func (m *UserDeviceMutation) OldOs(ctx context.Context) (v userdevice.Os, err error)
OldOs returns the old "os" field's value of the UserDevice entity. If the UserDevice object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserDeviceMutation) OldPlatform ¶
func (m *UserDeviceMutation) OldPlatform(ctx context.Context) (v userdevice.Platform, err error)
OldPlatform returns the old "platform" field's value of the UserDevice entity. If the UserDevice object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserDeviceMutation) OldStatus ¶
func (m *UserDeviceMutation) OldStatus(ctx context.Context) (v userdevice.Status, err error)
OldStatus returns the old "status" field's value of the UserDevice entity. If the UserDevice object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserDeviceMutation) OldType ¶
func (m *UserDeviceMutation) OldType(ctx context.Context) (v userdevice.Type, err error)
OldType returns the old "type" field's value of the UserDevice entity. If the UserDevice object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserDeviceMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the UserDevice entity. If the UserDevice object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserDeviceMutation) OldUpdatedBy ¶
func (m *UserDeviceMutation) OldUpdatedBy(ctx context.Context) (v string, err error)
OldUpdatedBy returns the old "updated_by" field's value of the UserDevice entity. If the UserDevice object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserDeviceMutation) OldUserID ¶
func (m *UserDeviceMutation) OldUserID(ctx context.Context) (v string, err error)
OldUserID returns the old "user_id" field's value of the UserDevice entity. If the UserDevice object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserDeviceMutation) Os ¶
func (m *UserDeviceMutation) Os() (r userdevice.Os, exists bool)
Os returns the value of the "os" field in the mutation.
func (*UserDeviceMutation) Platform ¶
func (m *UserDeviceMutation) Platform() (r userdevice.Platform, exists bool)
Platform returns the value of the "platform" field in the mutation.
func (*UserDeviceMutation) RemovedEdges ¶
func (m *UserDeviceMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*UserDeviceMutation) RemovedIDs ¶
func (m *UserDeviceMutation) RemovedIDs(name string) []ent.Value
RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.
func (*UserDeviceMutation) ResetCreatedAt ¶
func (m *UserDeviceMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*UserDeviceMutation) ResetCreatedBy ¶
func (m *UserDeviceMutation) ResetCreatedBy()
ResetCreatedBy resets all changes to the "created_by" field.
func (*UserDeviceMutation) ResetEdge ¶
func (m *UserDeviceMutation) ResetEdge(name string) error
ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.
func (*UserDeviceMutation) ResetField ¶
func (m *UserDeviceMutation) ResetField(name string) error
ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.
func (*UserDeviceMutation) ResetOs ¶
func (m *UserDeviceMutation) ResetOs()
ResetOs resets all changes to the "os" field.
func (*UserDeviceMutation) ResetPlatform ¶
func (m *UserDeviceMutation) ResetPlatform()
ResetPlatform resets all changes to the "platform" field.
func (*UserDeviceMutation) ResetStatus ¶
func (m *UserDeviceMutation) ResetStatus()
ResetStatus resets all changes to the "status" field.
func (*UserDeviceMutation) ResetType ¶
func (m *UserDeviceMutation) ResetType()
ResetType resets all changes to the "type" field.
func (*UserDeviceMutation) ResetUpdatedAt ¶
func (m *UserDeviceMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*UserDeviceMutation) ResetUpdatedBy ¶
func (m *UserDeviceMutation) ResetUpdatedBy()
ResetUpdatedBy resets all changes to the "updated_by" field.
func (*UserDeviceMutation) ResetUser ¶
func (m *UserDeviceMutation) ResetUser()
ResetUser resets all changes to the "user" edge.
func (*UserDeviceMutation) ResetUserID ¶
func (m *UserDeviceMutation) ResetUserID()
ResetUserID resets all changes to the "user_id" field.
func (*UserDeviceMutation) SetCreatedAt ¶
func (m *UserDeviceMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*UserDeviceMutation) SetCreatedBy ¶
func (m *UserDeviceMutation) SetCreatedBy(s string)
SetCreatedBy sets the "created_by" field.
func (*UserDeviceMutation) SetField ¶
func (m *UserDeviceMutation) SetField(name string, value ent.Value) error
SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*UserDeviceMutation) SetID ¶
func (m *UserDeviceMutation) SetID(id string)
SetID sets the value of the id field. Note that this operation is only accepted on creation of UserDevice entities.
func (*UserDeviceMutation) SetOs ¶
func (m *UserDeviceMutation) SetOs(u userdevice.Os)
SetOs sets the "os" field.
func (*UserDeviceMutation) SetPlatform ¶
func (m *UserDeviceMutation) SetPlatform(u userdevice.Platform)
SetPlatform sets the "platform" field.
func (*UserDeviceMutation) SetStatus ¶
func (m *UserDeviceMutation) SetStatus(u userdevice.Status)
SetStatus sets the "status" field.
func (*UserDeviceMutation) SetType ¶
func (m *UserDeviceMutation) SetType(u userdevice.Type)
SetType sets the "type" field.
func (*UserDeviceMutation) SetUpdatedAt ¶
func (m *UserDeviceMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*UserDeviceMutation) SetUpdatedBy ¶
func (m *UserDeviceMutation) SetUpdatedBy(s string)
SetUpdatedBy sets the "updated_by" field.
func (*UserDeviceMutation) SetUserID ¶
func (m *UserDeviceMutation) SetUserID(s string)
SetUserID sets the "user_id" field.
func (*UserDeviceMutation) Status ¶
func (m *UserDeviceMutation) Status() (r userdevice.Status, exists bool)
Status returns the value of the "status" field in the mutation.
func (UserDeviceMutation) Tx ¶
func (m UserDeviceMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*UserDeviceMutation) Type ¶
func (m *UserDeviceMutation) Type() string
Type returns the node type of this mutation (UserDevice).
func (*UserDeviceMutation) UpdatedAt ¶
func (m *UserDeviceMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*UserDeviceMutation) UpdatedBy ¶
func (m *UserDeviceMutation) UpdatedBy() (r string, exists bool)
UpdatedBy returns the value of the "updated_by" field in the mutation.
func (*UserDeviceMutation) UserCleared ¶
func (m *UserDeviceMutation) UserCleared() bool
UserCleared reports if the "user" edge to the User entity was cleared.
func (*UserDeviceMutation) UserID ¶
func (m *UserDeviceMutation) UserID() (r string, exists bool)
UserID returns the value of the "user_id" field in the mutation.
func (*UserDeviceMutation) UserIDs ¶
func (m *UserDeviceMutation) UserIDs() (ids []string)
UserIDs returns the "user" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use UserID instead. It exists only for internal usage by the builders.
func (*UserDeviceMutation) Where ¶
func (m *UserDeviceMutation) Where(ps ...predicate.UserDevice)
Where appends a list predicates to the UserDeviceMutation builder.
type UserDeviceQuery ¶
type UserDeviceQuery struct {
// contains filtered or unexported fields
}
UserDeviceQuery is the builder for querying UserDevice entities.
func (*UserDeviceQuery) All ¶
func (udq *UserDeviceQuery) All(ctx context.Context) ([]*UserDevice, error)
All executes the query and returns a list of UserDevices.
func (*UserDeviceQuery) AllX ¶
func (udq *UserDeviceQuery) AllX(ctx context.Context) []*UserDevice
AllX is like All, but panics if an error occurs.
func (*UserDeviceQuery) Clone ¶
func (udq *UserDeviceQuery) Clone() *UserDeviceQuery
Clone returns a duplicate of the UserDeviceQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*UserDeviceQuery) Count ¶
func (udq *UserDeviceQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*UserDeviceQuery) CountX ¶
func (udq *UserDeviceQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*UserDeviceQuery) Exist ¶
func (udq *UserDeviceQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*UserDeviceQuery) ExistX ¶
func (udq *UserDeviceQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*UserDeviceQuery) First ¶
func (udq *UserDeviceQuery) First(ctx context.Context) (*UserDevice, error)
First returns the first UserDevice entity from the query. Returns a *NotFoundError when no UserDevice was found.
func (*UserDeviceQuery) FirstID ¶
func (udq *UserDeviceQuery) FirstID(ctx context.Context) (id string, err error)
FirstID returns the first UserDevice ID from the query. Returns a *NotFoundError when no UserDevice ID was found.
func (*UserDeviceQuery) FirstIDX ¶
func (udq *UserDeviceQuery) FirstIDX(ctx context.Context) string
FirstIDX is like FirstID, but panics if an error occurs.
func (*UserDeviceQuery) FirstX ¶
func (udq *UserDeviceQuery) FirstX(ctx context.Context) *UserDevice
FirstX is like First, but panics if an error occurs.
func (*UserDeviceQuery) GroupBy ¶
func (udq *UserDeviceQuery) GroupBy(field string, fields ...string) *UserDeviceGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct { UserID string `json:"user_id,omitempty"` Count int `json:"count,omitempty"` } client.UserDevice.Query(). GroupBy(userdevice.FieldUserID). Aggregate(ent.Count()). Scan(ctx, &v)
func (*UserDeviceQuery) IDs ¶
func (udq *UserDeviceQuery) IDs(ctx context.Context) ([]string, error)
IDs executes the query and returns a list of UserDevice IDs.
func (*UserDeviceQuery) IDsX ¶
func (udq *UserDeviceQuery) IDsX(ctx context.Context) []string
IDsX is like IDs, but panics if an error occurs.
func (*UserDeviceQuery) Limit ¶
func (udq *UserDeviceQuery) Limit(limit int) *UserDeviceQuery
Limit adds a limit step to the query.
func (*UserDeviceQuery) Offset ¶
func (udq *UserDeviceQuery) Offset(offset int) *UserDeviceQuery
Offset adds an offset step to the query.
func (*UserDeviceQuery) Only ¶
func (udq *UserDeviceQuery) Only(ctx context.Context) (*UserDevice, error)
Only returns a single UserDevice entity found by the query, ensuring it only returns one. Returns a *NotSingularError when exactly one UserDevice entity is not found. Returns a *NotFoundError when no UserDevice entities are found.
func (*UserDeviceQuery) OnlyID ¶
func (udq *UserDeviceQuery) OnlyID(ctx context.Context) (id string, err error)
OnlyID is like Only, but returns the only UserDevice ID in the query. Returns a *NotSingularError when exactly one UserDevice ID is not found. Returns a *NotFoundError when no entities are found.
func (*UserDeviceQuery) OnlyIDX ¶
func (udq *UserDeviceQuery) OnlyIDX(ctx context.Context) string
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*UserDeviceQuery) OnlyX ¶
func (udq *UserDeviceQuery) OnlyX(ctx context.Context) *UserDevice
OnlyX is like Only, but panics if an error occurs.
func (*UserDeviceQuery) Order ¶
func (udq *UserDeviceQuery) Order(o ...OrderFunc) *UserDeviceQuery
Order adds an order step to the query.
func (*UserDeviceQuery) QueryUser ¶
func (udq *UserDeviceQuery) QueryUser() *UserQuery
QueryUser chains the current query on the "user" edge.
func (*UserDeviceQuery) Select ¶
func (udq *UserDeviceQuery) Select(fields ...string) *UserDeviceSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct { UserID string `json:"user_id,omitempty"` } client.UserDevice.Query(). Select(userdevice.FieldUserID). Scan(ctx, &v)
func (*UserDeviceQuery) Unique ¶
func (udq *UserDeviceQuery) Unique(unique bool) *UserDeviceQuery
Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.
func (*UserDeviceQuery) Where ¶
func (udq *UserDeviceQuery) Where(ps ...predicate.UserDevice) *UserDeviceQuery
Where adds a new predicate for the UserDeviceQuery builder.
func (*UserDeviceQuery) WithUser ¶
func (udq *UserDeviceQuery) WithUser(opts ...func(*UserQuery)) *UserDeviceQuery
WithUser tells the query-builder to eager-load the nodes that are connected to the "user" edge. The optional arguments are used to configure the query builder of the edge.
type UserDeviceSelect ¶
type UserDeviceSelect struct { *UserDeviceQuery // contains filtered or unexported fields }
UserDeviceSelect is the builder for selecting fields of UserDevice entities.
func (*UserDeviceSelect) Bool ¶
func (uds *UserDeviceSelect) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*UserDeviceSelect) BoolX ¶
func (uds *UserDeviceSelect) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*UserDeviceSelect) Bools ¶
func (uds *UserDeviceSelect) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*UserDeviceSelect) BoolsX ¶
func (uds *UserDeviceSelect) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*UserDeviceSelect) Float64 ¶
func (uds *UserDeviceSelect) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*UserDeviceSelect) Float64X ¶
func (uds *UserDeviceSelect) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*UserDeviceSelect) Float64s ¶
func (uds *UserDeviceSelect) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*UserDeviceSelect) Float64sX ¶
func (uds *UserDeviceSelect) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*UserDeviceSelect) Int ¶
func (uds *UserDeviceSelect) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*UserDeviceSelect) IntX ¶
func (uds *UserDeviceSelect) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*UserDeviceSelect) Ints ¶
func (uds *UserDeviceSelect) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*UserDeviceSelect) IntsX ¶
func (uds *UserDeviceSelect) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*UserDeviceSelect) Scan ¶
func (uds *UserDeviceSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scans the result into the given value.
func (*UserDeviceSelect) ScanX ¶
func (uds *UserDeviceSelect) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*UserDeviceSelect) String ¶
func (uds *UserDeviceSelect) String(ctx context.Context) (_ string, err error)
String returns a single string from a selector. It is only allowed when selecting one field.
func (*UserDeviceSelect) StringX ¶
func (uds *UserDeviceSelect) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type UserDeviceUpdate ¶
type UserDeviceUpdate struct {
// contains filtered or unexported fields
}
UserDeviceUpdate is the builder for updating UserDevice entities.
func (*UserDeviceUpdate) ClearUser ¶
func (udu *UserDeviceUpdate) ClearUser() *UserDeviceUpdate
ClearUser clears the "user" edge to the User entity.
func (*UserDeviceUpdate) Exec ¶
func (udu *UserDeviceUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*UserDeviceUpdate) ExecX ¶
func (udu *UserDeviceUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserDeviceUpdate) Mutation ¶
func (udu *UserDeviceUpdate) Mutation() *UserDeviceMutation
Mutation returns the UserDeviceMutation object of the builder.
func (*UserDeviceUpdate) Save ¶
func (udu *UserDeviceUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*UserDeviceUpdate) SaveX ¶
func (udu *UserDeviceUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*UserDeviceUpdate) SetCreatedAt ¶
func (udu *UserDeviceUpdate) SetCreatedAt(t time.Time) *UserDeviceUpdate
SetCreatedAt sets the "created_at" field.
func (*UserDeviceUpdate) SetCreatedBy ¶
func (udu *UserDeviceUpdate) SetCreatedBy(s string) *UserDeviceUpdate
SetCreatedBy sets the "created_by" field.
func (*UserDeviceUpdate) SetNillableCreatedAt ¶
func (udu *UserDeviceUpdate) SetNillableCreatedAt(t *time.Time) *UserDeviceUpdate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*UserDeviceUpdate) SetNillableStatus ¶
func (udu *UserDeviceUpdate) SetNillableStatus(u *userdevice.Status) *UserDeviceUpdate
SetNillableStatus sets the "status" field if the given value is not nil.
func (*UserDeviceUpdate) SetOs ¶
func (udu *UserDeviceUpdate) SetOs(u userdevice.Os) *UserDeviceUpdate
SetOs sets the "os" field.
func (*UserDeviceUpdate) SetPlatform ¶
func (udu *UserDeviceUpdate) SetPlatform(u userdevice.Platform) *UserDeviceUpdate
SetPlatform sets the "platform" field.
func (*UserDeviceUpdate) SetStatus ¶
func (udu *UserDeviceUpdate) SetStatus(u userdevice.Status) *UserDeviceUpdate
SetStatus sets the "status" field.
func (*UserDeviceUpdate) SetType ¶
func (udu *UserDeviceUpdate) SetType(u userdevice.Type) *UserDeviceUpdate
SetType sets the "type" field.
func (*UserDeviceUpdate) SetUpdatedAt ¶
func (udu *UserDeviceUpdate) SetUpdatedAt(t time.Time) *UserDeviceUpdate
SetUpdatedAt sets the "updated_at" field.
func (*UserDeviceUpdate) SetUpdatedBy ¶
func (udu *UserDeviceUpdate) SetUpdatedBy(s string) *UserDeviceUpdate
SetUpdatedBy sets the "updated_by" field.
func (*UserDeviceUpdate) SetUser ¶
func (udu *UserDeviceUpdate) SetUser(u *User) *UserDeviceUpdate
SetUser sets the "user" edge to the User entity.
func (*UserDeviceUpdate) SetUserID ¶
func (udu *UserDeviceUpdate) SetUserID(s string) *UserDeviceUpdate
SetUserID sets the "user_id" field.
func (*UserDeviceUpdate) Where ¶
func (udu *UserDeviceUpdate) Where(ps ...predicate.UserDevice) *UserDeviceUpdate
Where appends a list predicates to the UserDeviceUpdate builder.
type UserDeviceUpdateOne ¶
type UserDeviceUpdateOne struct {
// contains filtered or unexported fields
}
UserDeviceUpdateOne is the builder for updating a single UserDevice entity.
func (*UserDeviceUpdateOne) ClearUser ¶
func (uduo *UserDeviceUpdateOne) ClearUser() *UserDeviceUpdateOne
ClearUser clears the "user" edge to the User entity.
func (*UserDeviceUpdateOne) Exec ¶
func (uduo *UserDeviceUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*UserDeviceUpdateOne) ExecX ¶
func (uduo *UserDeviceUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserDeviceUpdateOne) Mutation ¶
func (uduo *UserDeviceUpdateOne) Mutation() *UserDeviceMutation
Mutation returns the UserDeviceMutation object of the builder.
func (*UserDeviceUpdateOne) Save ¶
func (uduo *UserDeviceUpdateOne) Save(ctx context.Context) (*UserDevice, error)
Save executes the query and returns the updated UserDevice entity.
func (*UserDeviceUpdateOne) SaveX ¶
func (uduo *UserDeviceUpdateOne) SaveX(ctx context.Context) *UserDevice
SaveX is like Save, but panics if an error occurs.
func (*UserDeviceUpdateOne) Select ¶
func (uduo *UserDeviceUpdateOne) Select(field string, fields ...string) *UserDeviceUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*UserDeviceUpdateOne) SetCreatedAt ¶
func (uduo *UserDeviceUpdateOne) SetCreatedAt(t time.Time) *UserDeviceUpdateOne
SetCreatedAt sets the "created_at" field.
func (*UserDeviceUpdateOne) SetCreatedBy ¶
func (uduo *UserDeviceUpdateOne) SetCreatedBy(s string) *UserDeviceUpdateOne
SetCreatedBy sets the "created_by" field.
func (*UserDeviceUpdateOne) SetNillableCreatedAt ¶
func (uduo *UserDeviceUpdateOne) SetNillableCreatedAt(t *time.Time) *UserDeviceUpdateOne
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*UserDeviceUpdateOne) SetNillableStatus ¶
func (uduo *UserDeviceUpdateOne) SetNillableStatus(u *userdevice.Status) *UserDeviceUpdateOne
SetNillableStatus sets the "status" field if the given value is not nil.
func (*UserDeviceUpdateOne) SetOs ¶
func (uduo *UserDeviceUpdateOne) SetOs(u userdevice.Os) *UserDeviceUpdateOne
SetOs sets the "os" field.
func (*UserDeviceUpdateOne) SetPlatform ¶
func (uduo *UserDeviceUpdateOne) SetPlatform(u userdevice.Platform) *UserDeviceUpdateOne
SetPlatform sets the "platform" field.
func (*UserDeviceUpdateOne) SetStatus ¶
func (uduo *UserDeviceUpdateOne) SetStatus(u userdevice.Status) *UserDeviceUpdateOne
SetStatus sets the "status" field.
func (*UserDeviceUpdateOne) SetType ¶
func (uduo *UserDeviceUpdateOne) SetType(u userdevice.Type) *UserDeviceUpdateOne
SetType sets the "type" field.
func (*UserDeviceUpdateOne) SetUpdatedAt ¶
func (uduo *UserDeviceUpdateOne) SetUpdatedAt(t time.Time) *UserDeviceUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*UserDeviceUpdateOne) SetUpdatedBy ¶
func (uduo *UserDeviceUpdateOne) SetUpdatedBy(s string) *UserDeviceUpdateOne
SetUpdatedBy sets the "updated_by" field.
func (*UserDeviceUpdateOne) SetUser ¶
func (uduo *UserDeviceUpdateOne) SetUser(u *User) *UserDeviceUpdateOne
SetUser sets the "user" edge to the User entity.
func (*UserDeviceUpdateOne) SetUserID ¶
func (uduo *UserDeviceUpdateOne) SetUserID(s string) *UserDeviceUpdateOne
SetUserID sets the "user_id" field.
type UserEdges ¶
type UserEdges struct { // Meta holds the value of the meta edge. Meta []*UserMeta `json:"meta,omitempty"` // OauthProviders holds the value of the oauth_providers edge. OauthProviders []*UserOAuthProvider `json:"oauth_providers,omitempty"` // Devices holds the value of the devices edge. Devices []*UserDevice `json:"devices,omitempty"` // contains filtered or unexported fields }
UserEdges holds the relations/edges for other nodes in the graph.
func (UserEdges) DevicesOrErr ¶
func (e UserEdges) DevicesOrErr() ([]*UserDevice, error)
DevicesOrErr returns the Devices value or an error if the edge was not loaded in eager-loading.
func (UserEdges) MetaOrErr ¶
MetaOrErr returns the Meta value or an error if the edge was not loaded in eager-loading.
func (UserEdges) OauthProvidersOrErr ¶
func (e UserEdges) OauthProvidersOrErr() ([]*UserOAuthProvider, error)
OauthProvidersOrErr returns the OauthProviders value or an error if the edge was not loaded in eager-loading.
type UserGroupBy ¶
type UserGroupBy struct {
// contains filtered or unexported fields
}
UserGroupBy is the group-by builder for User entities.
func (*UserGroupBy) Aggregate ¶
func (ugb *UserGroupBy) Aggregate(fns ...AggregateFunc) *UserGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*UserGroupBy) Bool ¶
func (ugb *UserGroupBy) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a group-by query. It is only allowed when executing a group-by query 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 executing a group-by query 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 a group-by query. It is only allowed when executing a group-by query 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 executing a group-by query 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 a group-by query. It is only allowed when executing a group-by query 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 executing a group-by query 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 scans 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 a group-by query. It is only allowed when executing a group-by query 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 UserMeta ¶
type UserMeta struct { // ID of the ent. ID string `json:"id,omitempty"` // UserID holds the value of the "user_id" field. UserID string `json:"user_id,omitempty"` // CreatedAt holds the value of the "created_at" field. // 해당 row를 최초로 만든 시간은 언제인지? CreatedAt time.Time `json:"created_at,omitempty"` // CreatedBy holds the value of the "created_by" field. // 해당 row를 최초로 만든 주체는 누구인지? CreatedBy string `json:"created_by,omitempty"` // UpdatedAt holds the value of the "updated_at" field. // 해당 row를 수정한 마지막 시간은 언제인지 UpdatedAt time.Time `json:"updated_at,omitempty"` // UpdatedBy holds the value of the "updated_by" field. // 해당 row를 수정한 마지막 주체 누구인지 UpdatedBy string `json:"updated_by,omitempty"` // Profile holds the value of the "profile" field. // 어떤 Oauth provider를 이용하였는지? Profile string `json:"profile,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the UserMetaQuery when eager-loading is set. Edges UserMetaEdges `json:"edges"` // contains filtered or unexported fields }
UserMeta is the model entity for the UserMeta schema.
func (*UserMeta) Unwrap ¶
Unwrap unwraps the UserMeta entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.
func (*UserMeta) Update ¶
func (um *UserMeta) Update() *UserMetaUpdateOne
Update returns a builder for updating this UserMeta. Note that you need to call UserMeta.Unwrap() before calling this method if this UserMeta was returned from a transaction, and the transaction was committed or rolled back.
type UserMetaClient ¶
type UserMetaClient struct {
// contains filtered or unexported fields
}
UserMetaClient is a client for the UserMeta schema.
func NewUserMetaClient ¶
func NewUserMetaClient(c config) *UserMetaClient
NewUserMetaClient returns a client for the UserMeta from the given config.
func (*UserMetaClient) Create ¶
func (c *UserMetaClient) Create() *UserMetaCreate
Create returns a create builder for UserMeta.
func (*UserMetaClient) CreateBulk ¶
func (c *UserMetaClient) CreateBulk(builders ...*UserMetaCreate) *UserMetaCreateBulk
CreateBulk returns a builder for creating a bulk of UserMeta entities.
func (*UserMetaClient) Delete ¶
func (c *UserMetaClient) Delete() *UserMetaDelete
Delete returns a delete builder for UserMeta.
func (*UserMetaClient) DeleteOne ¶
func (c *UserMetaClient) DeleteOne(um *UserMeta) *UserMetaDeleteOne
DeleteOne returns a delete builder for the given entity.
func (*UserMetaClient) DeleteOneID ¶
func (c *UserMetaClient) DeleteOneID(id string) *UserMetaDeleteOne
DeleteOneID returns a delete builder for the given id.
func (*UserMetaClient) GetX ¶
func (c *UserMetaClient) GetX(ctx context.Context, id string) *UserMeta
GetX is like Get, but panics if an error occurs.
func (*UserMetaClient) Hooks ¶
func (c *UserMetaClient) Hooks() []Hook
Hooks returns the client hooks.
func (*UserMetaClient) Query ¶
func (c *UserMetaClient) Query() *UserMetaQuery
Query returns a query builder for UserMeta.
func (*UserMetaClient) QueryUser ¶
func (c *UserMetaClient) QueryUser(um *UserMeta) *UserQuery
QueryUser queries the user edge of a UserMeta.
func (*UserMetaClient) Update ¶
func (c *UserMetaClient) Update() *UserMetaUpdate
Update returns an update builder for UserMeta.
func (*UserMetaClient) UpdateOne ¶
func (c *UserMetaClient) UpdateOne(um *UserMeta) *UserMetaUpdateOne
UpdateOne returns an update builder for the given entity.
func (*UserMetaClient) UpdateOneID ¶
func (c *UserMetaClient) UpdateOneID(id string) *UserMetaUpdateOne
UpdateOneID returns an update builder for the given id.
func (*UserMetaClient) Use ¶
func (c *UserMetaClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `usermeta.Hooks(f(g(h())))`.
type UserMetaCreate ¶
type UserMetaCreate struct {
// contains filtered or unexported fields
}
UserMetaCreate is the builder for creating a UserMeta entity.
func (*UserMetaCreate) Exec ¶
func (umc *UserMetaCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*UserMetaCreate) ExecX ¶
func (umc *UserMetaCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserMetaCreate) Mutation ¶
func (umc *UserMetaCreate) Mutation() *UserMetaMutation
Mutation returns the UserMetaMutation object of the builder.
func (*UserMetaCreate) Save ¶
func (umc *UserMetaCreate) Save(ctx context.Context) (*UserMeta, error)
Save creates the UserMeta in the database.
func (*UserMetaCreate) SaveX ¶
func (umc *UserMetaCreate) SaveX(ctx context.Context) *UserMeta
SaveX calls Save and panics if Save returns an error.
func (*UserMetaCreate) SetCreatedAt ¶
func (umc *UserMetaCreate) SetCreatedAt(t time.Time) *UserMetaCreate
SetCreatedAt sets the "created_at" field.
func (*UserMetaCreate) SetCreatedBy ¶
func (umc *UserMetaCreate) SetCreatedBy(s string) *UserMetaCreate
SetCreatedBy sets the "created_by" field.
func (*UserMetaCreate) SetID ¶
func (umc *UserMetaCreate) SetID(s string) *UserMetaCreate
SetID sets the "id" field.
func (*UserMetaCreate) SetNillableCreatedAt ¶
func (umc *UserMetaCreate) SetNillableCreatedAt(t *time.Time) *UserMetaCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*UserMetaCreate) SetNillableUpdatedAt ¶
func (umc *UserMetaCreate) SetNillableUpdatedAt(t *time.Time) *UserMetaCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*UserMetaCreate) SetProfile ¶
func (umc *UserMetaCreate) SetProfile(s string) *UserMetaCreate
SetProfile sets the "profile" field.
func (*UserMetaCreate) SetUpdatedAt ¶
func (umc *UserMetaCreate) SetUpdatedAt(t time.Time) *UserMetaCreate
SetUpdatedAt sets the "updated_at" field.
func (*UserMetaCreate) SetUpdatedBy ¶
func (umc *UserMetaCreate) SetUpdatedBy(s string) *UserMetaCreate
SetUpdatedBy sets the "updated_by" field.
func (*UserMetaCreate) SetUser ¶
func (umc *UserMetaCreate) SetUser(u *User) *UserMetaCreate
SetUser sets the "user" edge to the User entity.
func (*UserMetaCreate) SetUserID ¶
func (umc *UserMetaCreate) SetUserID(s string) *UserMetaCreate
SetUserID sets the "user_id" field.
type UserMetaCreateBulk ¶
type UserMetaCreateBulk struct {
// contains filtered or unexported fields
}
UserMetaCreateBulk is the builder for creating many UserMeta entities in bulk.
func (*UserMetaCreateBulk) Exec ¶
func (umcb *UserMetaCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*UserMetaCreateBulk) ExecX ¶
func (umcb *UserMetaCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type UserMetaDelete ¶
type UserMetaDelete struct {
// contains filtered or unexported fields
}
UserMetaDelete is the builder for deleting a UserMeta entity.
func (*UserMetaDelete) Exec ¶
func (umd *UserMetaDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*UserMetaDelete) ExecX ¶
func (umd *UserMetaDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*UserMetaDelete) Where ¶
func (umd *UserMetaDelete) Where(ps ...predicate.UserMeta) *UserMetaDelete
Where appends a list predicates to the UserMetaDelete builder.
type UserMetaDeleteOne ¶
type UserMetaDeleteOne struct {
// contains filtered or unexported fields
}
UserMetaDeleteOne is the builder for deleting a single UserMeta entity.
func (*UserMetaDeleteOne) Exec ¶
func (umdo *UserMetaDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*UserMetaDeleteOne) ExecX ¶
func (umdo *UserMetaDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type UserMetaEdges ¶
type UserMetaEdges struct { // User holds the value of the user edge. User *User `json:"user,omitempty"` // contains filtered or unexported fields }
UserMetaEdges holds the relations/edges for other nodes in the graph.
func (UserMetaEdges) UserOrErr ¶
func (e UserMetaEdges) UserOrErr() (*User, error)
UserOrErr returns the User value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type UserMetaGroupBy ¶
type UserMetaGroupBy struct {
// contains filtered or unexported fields
}
UserMetaGroupBy is the group-by builder for UserMeta entities.
func (*UserMetaGroupBy) Aggregate ¶
func (umgb *UserMetaGroupBy) Aggregate(fns ...AggregateFunc) *UserMetaGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*UserMetaGroupBy) Bool ¶
func (umgb *UserMetaGroupBy) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a group-by query. It is only allowed when executing a group-by query with one field.
func (*UserMetaGroupBy) BoolX ¶
func (umgb *UserMetaGroupBy) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*UserMetaGroupBy) Bools ¶
func (umgb *UserMetaGroupBy) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from group-by. It is only allowed when executing a group-by query with one field.
func (*UserMetaGroupBy) BoolsX ¶
func (umgb *UserMetaGroupBy) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*UserMetaGroupBy) Float64 ¶
func (umgb *UserMetaGroupBy) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a group-by query. It is only allowed when executing a group-by query with one field.
func (*UserMetaGroupBy) Float64X ¶
func (umgb *UserMetaGroupBy) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*UserMetaGroupBy) Float64s ¶
func (umgb *UserMetaGroupBy) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from group-by. It is only allowed when executing a group-by query with one field.
func (*UserMetaGroupBy) Float64sX ¶
func (umgb *UserMetaGroupBy) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*UserMetaGroupBy) Int ¶
func (umgb *UserMetaGroupBy) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a group-by query. It is only allowed when executing a group-by query with one field.
func (*UserMetaGroupBy) IntX ¶
func (umgb *UserMetaGroupBy) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*UserMetaGroupBy) Ints ¶
func (umgb *UserMetaGroupBy) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from group-by. It is only allowed when executing a group-by query with one field.
func (*UserMetaGroupBy) IntsX ¶
func (umgb *UserMetaGroupBy) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*UserMetaGroupBy) Scan ¶
func (umgb *UserMetaGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scans the result into the given value.
func (*UserMetaGroupBy) ScanX ¶
func (umgb *UserMetaGroupBy) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*UserMetaGroupBy) String ¶
func (umgb *UserMetaGroupBy) String(ctx context.Context) (_ string, err error)
String returns a single string from a group-by query. It is only allowed when executing a group-by query with one field.
func (*UserMetaGroupBy) StringX ¶
func (umgb *UserMetaGroupBy) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type UserMetaMutation ¶
type UserMetaMutation struct {
// contains filtered or unexported fields
}
UserMetaMutation represents an operation that mutates the UserMeta nodes in the graph.
func (*UserMetaMutation) AddField ¶
func (m *UserMetaMutation) AddField(name string, value ent.Value) error
AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*UserMetaMutation) AddedEdges ¶
func (m *UserMetaMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*UserMetaMutation) AddedField ¶
func (m *UserMetaMutation) AddedField(name string) (ent.Value, bool)
AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*UserMetaMutation) AddedFields ¶
func (m *UserMetaMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*UserMetaMutation) AddedIDs ¶
func (m *UserMetaMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*UserMetaMutation) ClearEdge ¶
func (m *UserMetaMutation) ClearEdge(name string) error
ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.
func (*UserMetaMutation) ClearField ¶
func (m *UserMetaMutation) ClearField(name string) error
ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.
func (*UserMetaMutation) ClearUser ¶
func (m *UserMetaMutation) ClearUser()
ClearUser clears the "user" edge to the User entity.
func (*UserMetaMutation) ClearedEdges ¶
func (m *UserMetaMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*UserMetaMutation) ClearedFields ¶
func (m *UserMetaMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (UserMetaMutation) Client ¶
func (m UserMetaMutation) 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 (*UserMetaMutation) CreatedAt ¶
func (m *UserMetaMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*UserMetaMutation) CreatedBy ¶
func (m *UserMetaMutation) CreatedBy() (r string, exists bool)
CreatedBy returns the value of the "created_by" field in the mutation.
func (*UserMetaMutation) EdgeCleared ¶
func (m *UserMetaMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*UserMetaMutation) Field ¶
func (m *UserMetaMutation) Field(name string) (ent.Value, bool)
Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*UserMetaMutation) FieldCleared ¶
func (m *UserMetaMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*UserMetaMutation) Fields ¶
func (m *UserMetaMutation) Fields() []string
Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().
func (*UserMetaMutation) ID ¶
func (m *UserMetaMutation) ID() (id string, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*UserMetaMutation) IDs ¶
func (m *UserMetaMutation) IDs(ctx context.Context) ([]string, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*UserMetaMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the UserMeta entity. If the UserMeta object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMetaMutation) OldCreatedBy ¶
func (m *UserMetaMutation) OldCreatedBy(ctx context.Context) (v string, err error)
OldCreatedBy returns the old "created_by" field's value of the UserMeta entity. If the UserMeta object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMetaMutation) OldField ¶
OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.
func (*UserMetaMutation) OldProfile ¶
func (m *UserMetaMutation) OldProfile(ctx context.Context) (v string, err error)
OldProfile returns the old "profile" field's value of the UserMeta entity. If the UserMeta object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMetaMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the UserMeta entity. If the UserMeta object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMetaMutation) OldUpdatedBy ¶
func (m *UserMetaMutation) OldUpdatedBy(ctx context.Context) (v string, err error)
OldUpdatedBy returns the old "updated_by" field's value of the UserMeta entity. If the UserMeta object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMetaMutation) OldUserID ¶
func (m *UserMetaMutation) OldUserID(ctx context.Context) (v string, err error)
OldUserID returns the old "user_id" field's value of the UserMeta entity. If the UserMeta object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMetaMutation) Profile ¶
func (m *UserMetaMutation) Profile() (r string, exists bool)
Profile returns the value of the "profile" field in the mutation.
func (*UserMetaMutation) RemovedEdges ¶
func (m *UserMetaMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*UserMetaMutation) RemovedIDs ¶
func (m *UserMetaMutation) RemovedIDs(name string) []ent.Value
RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.
func (*UserMetaMutation) ResetCreatedAt ¶
func (m *UserMetaMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*UserMetaMutation) ResetCreatedBy ¶
func (m *UserMetaMutation) ResetCreatedBy()
ResetCreatedBy resets all changes to the "created_by" field.
func (*UserMetaMutation) ResetEdge ¶
func (m *UserMetaMutation) ResetEdge(name string) error
ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.
func (*UserMetaMutation) ResetField ¶
func (m *UserMetaMutation) ResetField(name string) error
ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.
func (*UserMetaMutation) ResetProfile ¶
func (m *UserMetaMutation) ResetProfile()
ResetProfile resets all changes to the "profile" field.
func (*UserMetaMutation) ResetUpdatedAt ¶
func (m *UserMetaMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*UserMetaMutation) ResetUpdatedBy ¶
func (m *UserMetaMutation) ResetUpdatedBy()
ResetUpdatedBy resets all changes to the "updated_by" field.
func (*UserMetaMutation) ResetUser ¶
func (m *UserMetaMutation) ResetUser()
ResetUser resets all changes to the "user" edge.
func (*UserMetaMutation) ResetUserID ¶
func (m *UserMetaMutation) ResetUserID()
ResetUserID resets all changes to the "user_id" field.
func (*UserMetaMutation) SetCreatedAt ¶
func (m *UserMetaMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*UserMetaMutation) SetCreatedBy ¶
func (m *UserMetaMutation) SetCreatedBy(s string)
SetCreatedBy sets the "created_by" field.
func (*UserMetaMutation) SetField ¶
func (m *UserMetaMutation) SetField(name string, value ent.Value) error
SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*UserMetaMutation) SetID ¶
func (m *UserMetaMutation) SetID(id string)
SetID sets the value of the id field. Note that this operation is only accepted on creation of UserMeta entities.
func (*UserMetaMutation) SetProfile ¶
func (m *UserMetaMutation) SetProfile(s string)
SetProfile sets the "profile" field.
func (*UserMetaMutation) SetUpdatedAt ¶
func (m *UserMetaMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*UserMetaMutation) SetUpdatedBy ¶
func (m *UserMetaMutation) SetUpdatedBy(s string)
SetUpdatedBy sets the "updated_by" field.
func (*UserMetaMutation) SetUserID ¶
func (m *UserMetaMutation) SetUserID(s string)
SetUserID sets the "user_id" field.
func (UserMetaMutation) Tx ¶
func (m UserMetaMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*UserMetaMutation) Type ¶
func (m *UserMetaMutation) Type() string
Type returns the node type of this mutation (UserMeta).
func (*UserMetaMutation) UpdatedAt ¶
func (m *UserMetaMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*UserMetaMutation) UpdatedBy ¶
func (m *UserMetaMutation) UpdatedBy() (r string, exists bool)
UpdatedBy returns the value of the "updated_by" field in the mutation.
func (*UserMetaMutation) UserCleared ¶
func (m *UserMetaMutation) UserCleared() bool
UserCleared reports if the "user" edge to the User entity was cleared.
func (*UserMetaMutation) UserID ¶
func (m *UserMetaMutation) UserID() (r string, exists bool)
UserID returns the value of the "user_id" field in the mutation.
func (*UserMetaMutation) UserIDs ¶
func (m *UserMetaMutation) UserIDs() (ids []string)
UserIDs returns the "user" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use UserID instead. It exists only for internal usage by the builders.
func (*UserMetaMutation) Where ¶
func (m *UserMetaMutation) Where(ps ...predicate.UserMeta)
Where appends a list predicates to the UserMetaMutation builder.
type UserMetaQuery ¶
type UserMetaQuery struct {
// contains filtered or unexported fields
}
UserMetaQuery is the builder for querying UserMeta entities.
func (*UserMetaQuery) All ¶
func (umq *UserMetaQuery) All(ctx context.Context) ([]*UserMeta, error)
All executes the query and returns a list of UserMetaSlice.
func (*UserMetaQuery) AllX ¶
func (umq *UserMetaQuery) AllX(ctx context.Context) []*UserMeta
AllX is like All, but panics if an error occurs.
func (*UserMetaQuery) Clone ¶
func (umq *UserMetaQuery) Clone() *UserMetaQuery
Clone returns a duplicate of the UserMetaQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*UserMetaQuery) Count ¶
func (umq *UserMetaQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*UserMetaQuery) CountX ¶
func (umq *UserMetaQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*UserMetaQuery) Exist ¶
func (umq *UserMetaQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*UserMetaQuery) ExistX ¶
func (umq *UserMetaQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*UserMetaQuery) First ¶
func (umq *UserMetaQuery) First(ctx context.Context) (*UserMeta, error)
First returns the first UserMeta entity from the query. Returns a *NotFoundError when no UserMeta was found.
func (*UserMetaQuery) FirstID ¶
func (umq *UserMetaQuery) FirstID(ctx context.Context) (id string, err error)
FirstID returns the first UserMeta ID from the query. Returns a *NotFoundError when no UserMeta ID was found.
func (*UserMetaQuery) FirstIDX ¶
func (umq *UserMetaQuery) FirstIDX(ctx context.Context) string
FirstIDX is like FirstID, but panics if an error occurs.
func (*UserMetaQuery) FirstX ¶
func (umq *UserMetaQuery) FirstX(ctx context.Context) *UserMeta
FirstX is like First, but panics if an error occurs.
func (*UserMetaQuery) GroupBy ¶
func (umq *UserMetaQuery) GroupBy(field string, fields ...string) *UserMetaGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct { UserID string `json:"user_id,omitempty"` Count int `json:"count,omitempty"` } client.UserMeta.Query(). GroupBy(usermeta.FieldUserID). Aggregate(ent.Count()). Scan(ctx, &v)
func (*UserMetaQuery) IDs ¶
func (umq *UserMetaQuery) IDs(ctx context.Context) ([]string, error)
IDs executes the query and returns a list of UserMeta IDs.
func (*UserMetaQuery) IDsX ¶
func (umq *UserMetaQuery) IDsX(ctx context.Context) []string
IDsX is like IDs, but panics if an error occurs.
func (*UserMetaQuery) Limit ¶
func (umq *UserMetaQuery) Limit(limit int) *UserMetaQuery
Limit adds a limit step to the query.
func (*UserMetaQuery) Offset ¶
func (umq *UserMetaQuery) Offset(offset int) *UserMetaQuery
Offset adds an offset step to the query.
func (*UserMetaQuery) Only ¶
func (umq *UserMetaQuery) Only(ctx context.Context) (*UserMeta, error)
Only returns a single UserMeta entity found by the query, ensuring it only returns one. Returns a *NotSingularError when exactly one UserMeta entity is not found. Returns a *NotFoundError when no UserMeta entities are found.
func (*UserMetaQuery) OnlyID ¶
func (umq *UserMetaQuery) OnlyID(ctx context.Context) (id string, err error)
OnlyID is like Only, but returns the only UserMeta ID in the query. Returns a *NotSingularError when exactly one UserMeta ID is not found. Returns a *NotFoundError when no entities are found.
func (*UserMetaQuery) OnlyIDX ¶
func (umq *UserMetaQuery) OnlyIDX(ctx context.Context) string
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*UserMetaQuery) OnlyX ¶
func (umq *UserMetaQuery) OnlyX(ctx context.Context) *UserMeta
OnlyX is like Only, but panics if an error occurs.
func (*UserMetaQuery) Order ¶
func (umq *UserMetaQuery) Order(o ...OrderFunc) *UserMetaQuery
Order adds an order step to the query.
func (*UserMetaQuery) QueryUser ¶
func (umq *UserMetaQuery) QueryUser() *UserQuery
QueryUser chains the current query on the "user" edge.
func (*UserMetaQuery) Select ¶
func (umq *UserMetaQuery) Select(fields ...string) *UserMetaSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct { UserID string `json:"user_id,omitempty"` } client.UserMeta.Query(). Select(usermeta.FieldUserID). Scan(ctx, &v)
func (*UserMetaQuery) Unique ¶
func (umq *UserMetaQuery) Unique(unique bool) *UserMetaQuery
Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.
func (*UserMetaQuery) Where ¶
func (umq *UserMetaQuery) Where(ps ...predicate.UserMeta) *UserMetaQuery
Where adds a new predicate for the UserMetaQuery builder.
func (*UserMetaQuery) WithUser ¶
func (umq *UserMetaQuery) WithUser(opts ...func(*UserQuery)) *UserMetaQuery
WithUser tells the query-builder to eager-load the nodes that are connected to the "user" edge. The optional arguments are used to configure the query builder of the edge.
type UserMetaSelect ¶
type UserMetaSelect struct { *UserMetaQuery // contains filtered or unexported fields }
UserMetaSelect is the builder for selecting fields of UserMeta entities.
func (*UserMetaSelect) Bool ¶
func (ums *UserMetaSelect) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*UserMetaSelect) BoolX ¶
func (ums *UserMetaSelect) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*UserMetaSelect) Bools ¶
func (ums *UserMetaSelect) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*UserMetaSelect) BoolsX ¶
func (ums *UserMetaSelect) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*UserMetaSelect) Float64 ¶
func (ums *UserMetaSelect) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*UserMetaSelect) Float64X ¶
func (ums *UserMetaSelect) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*UserMetaSelect) Float64s ¶
func (ums *UserMetaSelect) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*UserMetaSelect) Float64sX ¶
func (ums *UserMetaSelect) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*UserMetaSelect) Int ¶
func (ums *UserMetaSelect) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*UserMetaSelect) IntX ¶
func (ums *UserMetaSelect) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*UserMetaSelect) Ints ¶
func (ums *UserMetaSelect) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*UserMetaSelect) IntsX ¶
func (ums *UserMetaSelect) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*UserMetaSelect) Scan ¶
func (ums *UserMetaSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scans the result into the given value.
func (*UserMetaSelect) ScanX ¶
func (ums *UserMetaSelect) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*UserMetaSelect) String ¶
func (ums *UserMetaSelect) String(ctx context.Context) (_ string, err error)
String returns a single string from a selector. It is only allowed when selecting one field.
func (*UserMetaSelect) StringX ¶
func (ums *UserMetaSelect) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type UserMetaUpdate ¶
type UserMetaUpdate struct {
// contains filtered or unexported fields
}
UserMetaUpdate is the builder for updating UserMeta entities.
func (*UserMetaUpdate) ClearUser ¶
func (umu *UserMetaUpdate) ClearUser() *UserMetaUpdate
ClearUser clears the "user" edge to the User entity.
func (*UserMetaUpdate) Exec ¶
func (umu *UserMetaUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*UserMetaUpdate) ExecX ¶
func (umu *UserMetaUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserMetaUpdate) Mutation ¶
func (umu *UserMetaUpdate) Mutation() *UserMetaMutation
Mutation returns the UserMetaMutation object of the builder.
func (*UserMetaUpdate) Save ¶
func (umu *UserMetaUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*UserMetaUpdate) SaveX ¶
func (umu *UserMetaUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*UserMetaUpdate) SetCreatedAt ¶
func (umu *UserMetaUpdate) SetCreatedAt(t time.Time) *UserMetaUpdate
SetCreatedAt sets the "created_at" field.
func (*UserMetaUpdate) SetCreatedBy ¶
func (umu *UserMetaUpdate) SetCreatedBy(s string) *UserMetaUpdate
SetCreatedBy sets the "created_by" field.
func (*UserMetaUpdate) SetNillableCreatedAt ¶
func (umu *UserMetaUpdate) SetNillableCreatedAt(t *time.Time) *UserMetaUpdate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*UserMetaUpdate) SetProfile ¶
func (umu *UserMetaUpdate) SetProfile(s string) *UserMetaUpdate
SetProfile sets the "profile" field.
func (*UserMetaUpdate) SetUpdatedAt ¶
func (umu *UserMetaUpdate) SetUpdatedAt(t time.Time) *UserMetaUpdate
SetUpdatedAt sets the "updated_at" field.
func (*UserMetaUpdate) SetUpdatedBy ¶
func (umu *UserMetaUpdate) SetUpdatedBy(s string) *UserMetaUpdate
SetUpdatedBy sets the "updated_by" field.
func (*UserMetaUpdate) SetUser ¶
func (umu *UserMetaUpdate) SetUser(u *User) *UserMetaUpdate
SetUser sets the "user" edge to the User entity.
func (*UserMetaUpdate) SetUserID ¶
func (umu *UserMetaUpdate) SetUserID(s string) *UserMetaUpdate
SetUserID sets the "user_id" field.
func (*UserMetaUpdate) Where ¶
func (umu *UserMetaUpdate) Where(ps ...predicate.UserMeta) *UserMetaUpdate
Where appends a list predicates to the UserMetaUpdate builder.
type UserMetaUpdateOne ¶
type UserMetaUpdateOne struct {
// contains filtered or unexported fields
}
UserMetaUpdateOne is the builder for updating a single UserMeta entity.
func (*UserMetaUpdateOne) ClearUser ¶
func (umuo *UserMetaUpdateOne) ClearUser() *UserMetaUpdateOne
ClearUser clears the "user" edge to the User entity.
func (*UserMetaUpdateOne) Exec ¶
func (umuo *UserMetaUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*UserMetaUpdateOne) ExecX ¶
func (umuo *UserMetaUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserMetaUpdateOne) Mutation ¶
func (umuo *UserMetaUpdateOne) Mutation() *UserMetaMutation
Mutation returns the UserMetaMutation object of the builder.
func (*UserMetaUpdateOne) Save ¶
func (umuo *UserMetaUpdateOne) Save(ctx context.Context) (*UserMeta, error)
Save executes the query and returns the updated UserMeta entity.
func (*UserMetaUpdateOne) SaveX ¶
func (umuo *UserMetaUpdateOne) SaveX(ctx context.Context) *UserMeta
SaveX is like Save, but panics if an error occurs.
func (*UserMetaUpdateOne) Select ¶
func (umuo *UserMetaUpdateOne) Select(field string, fields ...string) *UserMetaUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*UserMetaUpdateOne) SetCreatedAt ¶
func (umuo *UserMetaUpdateOne) SetCreatedAt(t time.Time) *UserMetaUpdateOne
SetCreatedAt sets the "created_at" field.
func (*UserMetaUpdateOne) SetCreatedBy ¶
func (umuo *UserMetaUpdateOne) SetCreatedBy(s string) *UserMetaUpdateOne
SetCreatedBy sets the "created_by" field.
func (*UserMetaUpdateOne) SetNillableCreatedAt ¶
func (umuo *UserMetaUpdateOne) SetNillableCreatedAt(t *time.Time) *UserMetaUpdateOne
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*UserMetaUpdateOne) SetProfile ¶
func (umuo *UserMetaUpdateOne) SetProfile(s string) *UserMetaUpdateOne
SetProfile sets the "profile" field.
func (*UserMetaUpdateOne) SetUpdatedAt ¶
func (umuo *UserMetaUpdateOne) SetUpdatedAt(t time.Time) *UserMetaUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*UserMetaUpdateOne) SetUpdatedBy ¶
func (umuo *UserMetaUpdateOne) SetUpdatedBy(s string) *UserMetaUpdateOne
SetUpdatedBy sets the "updated_by" field.
func (*UserMetaUpdateOne) SetUser ¶
func (umuo *UserMetaUpdateOne) SetUser(u *User) *UserMetaUpdateOne
SetUser sets the "user" edge to the User entity.
func (*UserMetaUpdateOne) SetUserID ¶
func (umuo *UserMetaUpdateOne) SetUserID(s string) *UserMetaUpdateOne
SetUserID sets the "user_id" field.
type UserMutation ¶
type UserMutation struct {
// contains filtered or unexported fields
}
UserMutation represents an operation that mutates the User nodes in the graph.
func (*UserMutation) AddDeviceIDs ¶
func (m *UserMutation) AddDeviceIDs(ids ...string)
AddDeviceIDs adds the "devices" edge to the UserDevice entity by ids.
func (*UserMutation) AddField ¶
func (m *UserMutation) AddField(name string, value ent.Value) error
AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*UserMutation) AddMetumIDs ¶
func (m *UserMutation) AddMetumIDs(ids ...string)
AddMetumIDs adds the "meta" edge to the UserMeta entity by ids.
func (*UserMutation) AddOauthProviderIDs ¶
func (m *UserMutation) AddOauthProviderIDs(ids ...string)
AddOauthProviderIDs adds the "oauth_providers" edge to the UserOAuthProvider entity by ids.
func (*UserMutation) AddedEdges ¶
func (m *UserMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*UserMutation) AddedField ¶
func (m *UserMutation) AddedField(name string) (ent.Value, bool)
AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*UserMutation) AddedFields ¶
func (m *UserMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*UserMutation) AddedIDs ¶
func (m *UserMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*UserMutation) ClearDevices ¶
func (m *UserMutation) ClearDevices()
ClearDevices clears the "devices" edge to the UserDevice entity.
func (*UserMutation) ClearEdge ¶
func (m *UserMutation) ClearEdge(name string) error
ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.
func (*UserMutation) ClearField ¶
func (m *UserMutation) ClearField(name string) error
ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.
func (*UserMutation) ClearMeta ¶
func (m *UserMutation) ClearMeta()
ClearMeta clears the "meta" edge to the UserMeta entity.
func (*UserMutation) ClearOauthProviders ¶
func (m *UserMutation) ClearOauthProviders()
ClearOauthProviders clears the "oauth_providers" edge to the UserOAuthProvider entity.
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) CreatedAt ¶
func (m *UserMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*UserMutation) CreatedBy ¶
func (m *UserMutation) CreatedBy() (r string, exists bool)
CreatedBy returns the value of the "created_by" field in the mutation.
func (*UserMutation) DevicesCleared ¶
func (m *UserMutation) DevicesCleared() bool
DevicesCleared reports if the "devices" edge to the UserDevice entity was cleared.
func (*UserMutation) DevicesIDs ¶
func (m *UserMutation) DevicesIDs() (ids []string)
DevicesIDs returns the "devices" edge IDs in the mutation.
func (*UserMutation) EdgeCleared ¶
func (m *UserMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*UserMutation) Field ¶
func (m *UserMutation) Field(name string) (ent.Value, bool)
Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*UserMutation) FieldCleared ¶
func (m *UserMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*UserMutation) Fields ¶
func (m *UserMutation) Fields() []string
Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().
func (*UserMutation) GetType ¶
func (m *UserMutation) GetType() (r user.Type, exists bool)
GetType returns the value of the "type" field in the mutation.
func (*UserMutation) ID ¶
func (m *UserMutation) ID() (id string, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*UserMutation) IDs ¶
func (m *UserMutation) IDs(ctx context.Context) ([]string, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*UserMutation) MetaCleared ¶
func (m *UserMutation) MetaCleared() bool
MetaCleared reports if the "meta" edge to the UserMeta entity was cleared.
func (*UserMutation) MetaIDs ¶
func (m *UserMutation) MetaIDs() (ids []string)
MetaIDs returns the "meta" edge IDs in the mutation.
func (*UserMutation) OauthProvidersCleared ¶
func (m *UserMutation) OauthProvidersCleared() bool
OauthProvidersCleared reports if the "oauth_providers" edge to the UserOAuthProvider entity was cleared.
func (*UserMutation) OauthProvidersIDs ¶
func (m *UserMutation) OauthProvidersIDs() (ids []string)
OauthProvidersIDs returns the "oauth_providers" edge IDs in the mutation.
func (*UserMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldCreatedBy ¶
func (m *UserMutation) OldCreatedBy(ctx context.Context) (v string, err error)
OldCreatedBy returns the old "created_by" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldField ¶
OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.
func (*UserMutation) OldSignup ¶
func (m *UserMutation) OldSignup(ctx context.Context) (v bool, err error)
OldSignup returns the old "signup" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldStatus ¶
OldStatus returns the old "status" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldType ¶
OldType returns the old "type" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldUpdatedBy ¶
func (m *UserMutation) OldUpdatedBy(ctx context.Context) (v string, err error)
OldUpdatedBy returns the old "updated_by" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldUsername ¶
func (m *UserMutation) OldUsername(ctx context.Context) (v string, err error)
OldUsername returns the old "username" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) RemoveDeviceIDs ¶
func (m *UserMutation) RemoveDeviceIDs(ids ...string)
RemoveDeviceIDs removes the "devices" edge to the UserDevice entity by IDs.
func (*UserMutation) RemoveMetumIDs ¶
func (m *UserMutation) RemoveMetumIDs(ids ...string)
RemoveMetumIDs removes the "meta" edge to the UserMeta entity by IDs.
func (*UserMutation) RemoveOauthProviderIDs ¶
func (m *UserMutation) RemoveOauthProviderIDs(ids ...string)
RemoveOauthProviderIDs removes the "oauth_providers" edge to the UserOAuthProvider entity by IDs.
func (*UserMutation) RemovedDevicesIDs ¶
func (m *UserMutation) RemovedDevicesIDs() (ids []string)
RemovedDevices returns the removed IDs of the "devices" edge to the UserDevice entity.
func (*UserMutation) RemovedEdges ¶
func (m *UserMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*UserMutation) RemovedIDs ¶
func (m *UserMutation) RemovedIDs(name string) []ent.Value
RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.
func (*UserMutation) RemovedMetaIDs ¶
func (m *UserMutation) RemovedMetaIDs() (ids []string)
RemovedMeta returns the removed IDs of the "meta" edge to the UserMeta entity.
func (*UserMutation) RemovedOauthProvidersIDs ¶
func (m *UserMutation) RemovedOauthProvidersIDs() (ids []string)
RemovedOauthProviders returns the removed IDs of the "oauth_providers" edge to the UserOAuthProvider entity.
func (*UserMutation) ResetCreatedAt ¶
func (m *UserMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*UserMutation) ResetCreatedBy ¶
func (m *UserMutation) ResetCreatedBy()
ResetCreatedBy resets all changes to the "created_by" field.
func (*UserMutation) ResetDevices ¶
func (m *UserMutation) ResetDevices()
ResetDevices resets all changes to the "devices" edge.
func (*UserMutation) ResetEdge ¶
func (m *UserMutation) ResetEdge(name string) error
ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.
func (*UserMutation) ResetField ¶
func (m *UserMutation) ResetField(name string) error
ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.
func (*UserMutation) ResetMeta ¶
func (m *UserMutation) ResetMeta()
ResetMeta resets all changes to the "meta" edge.
func (*UserMutation) ResetOauthProviders ¶
func (m *UserMutation) ResetOauthProviders()
ResetOauthProviders resets all changes to the "oauth_providers" edge.
func (*UserMutation) ResetSignup ¶
func (m *UserMutation) ResetSignup()
ResetSignup resets all changes to the "signup" field.
func (*UserMutation) ResetStatus ¶
func (m *UserMutation) ResetStatus()
ResetStatus resets all changes to the "status" field.
func (*UserMutation) ResetType ¶
func (m *UserMutation) ResetType()
ResetType resets all changes to the "type" field.
func (*UserMutation) ResetUpdatedAt ¶
func (m *UserMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*UserMutation) ResetUpdatedBy ¶
func (m *UserMutation) ResetUpdatedBy()
ResetUpdatedBy resets all changes to the "updated_by" field.
func (*UserMutation) ResetUsername ¶
func (m *UserMutation) ResetUsername()
ResetUsername resets all changes to the "username" field.
func (*UserMutation) SetCreatedAt ¶
func (m *UserMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*UserMutation) SetCreatedBy ¶
func (m *UserMutation) SetCreatedBy(s string)
SetCreatedBy sets the "created_by" field.
func (*UserMutation) SetField ¶
func (m *UserMutation) SetField(name string, value ent.Value) error
SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*UserMutation) SetID ¶
func (m *UserMutation) SetID(id string)
SetID sets the value of the id field. Note that this operation is only accepted on creation of User entities.
func (*UserMutation) SetSignup ¶
func (m *UserMutation) SetSignup(b bool)
SetSignup sets the "signup" field.
func (*UserMutation) SetStatus ¶
func (m *UserMutation) SetStatus(u user.Status)
SetStatus sets the "status" field.
func (*UserMutation) SetType ¶
func (m *UserMutation) SetType(u user.Type)
SetType sets the "type" field.
func (*UserMutation) SetUpdatedAt ¶
func (m *UserMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*UserMutation) SetUpdatedBy ¶
func (m *UserMutation) SetUpdatedBy(s string)
SetUpdatedBy sets the "updated_by" field.
func (*UserMutation) SetUsername ¶
func (m *UserMutation) SetUsername(s string)
SetUsername sets the "username" field.
func (*UserMutation) Signup ¶
func (m *UserMutation) Signup() (r bool, exists bool)
Signup returns the value of the "signup" field in the mutation.
func (*UserMutation) Status ¶
func (m *UserMutation) Status() (r user.Status, exists bool)
Status returns the value of the "status" field in the mutation.
func (UserMutation) Tx ¶
func (m UserMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*UserMutation) Type ¶
func (m *UserMutation) Type() string
Type returns the node type of this mutation (User).
func (*UserMutation) UpdatedAt ¶
func (m *UserMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*UserMutation) UpdatedBy ¶
func (m *UserMutation) UpdatedBy() (r string, exists bool)
UpdatedBy returns the value of the "updated_by" field in the mutation.
func (*UserMutation) Username ¶
func (m *UserMutation) Username() (r string, exists bool)
Username returns the value of the "username" field in the mutation.
func (*UserMutation) Where ¶
func (m *UserMutation) Where(ps ...predicate.User)
Where appends a list predicates to the UserMutation builder.
type UserOAuthProvider ¶
type UserOAuthProvider struct { // ID of the ent. ID string `json:"id,omitempty"` // UserID holds the value of the "user_id" field. UserID string `json:"user_id,omitempty"` // CreatedAt holds the value of the "created_at" field. // 해당 row를 최초로 만든 시간은 언제인지? CreatedAt time.Time `json:"created_at,omitempty"` // CreatedBy holds the value of the "created_by" field. // 해당 row를 최초로 만든 주체는 누구인지? CreatedBy string `json:"created_by,omitempty"` // UpdatedAt holds the value of the "updated_at" field. // 해당 row를 수정한 마지막 시간은 언제인지 UpdatedAt time.Time `json:"updated_at,omitempty"` // UpdatedBy holds the value of the "updated_by" field. // 해당 row를 수정한 마지막 주체 누구인지 UpdatedBy string `json:"updated_by,omitempty"` // Status holds the value of the "status" field. // 해당 사용자는 서비스에서 유효한지 아닌지 Status useroauthprovider.Status `json:"status,omitempty"` // Provider holds the value of the "provider" field. // 어떤 Oauth provider를 이용하였는지? Provider useroauthprovider.Provider `json:"provider,omitempty"` // Expiry holds the value of the "expiry" field. // 해당 토큰의 만료시간이 언제까지인지? Expiry time.Time `json:"expiry,omitempty"` // AccessToken holds the value of the "access_token" field. // access_token AccessToken string `json:"access_token,omitempty"` // RefreshToken holds the value of the "refresh_token" field. // refresh_token RefreshToken string `json:"refresh_token,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the UserOAuthProviderQuery when eager-loading is set. Edges UserOAuthProviderEdges `json:"edges"` // contains filtered or unexported fields }
UserOAuthProvider is the model entity for the UserOAuthProvider schema.
func (*UserOAuthProvider) QueryUser ¶
func (uop *UserOAuthProvider) QueryUser() *UserQuery
QueryUser queries the "user" edge of the UserOAuthProvider entity.
func (*UserOAuthProvider) String ¶
func (uop *UserOAuthProvider) String() string
String implements the fmt.Stringer.
func (*UserOAuthProvider) Unwrap ¶
func (uop *UserOAuthProvider) Unwrap() *UserOAuthProvider
Unwrap unwraps the UserOAuthProvider entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.
func (*UserOAuthProvider) Update ¶
func (uop *UserOAuthProvider) Update() *UserOAuthProviderUpdateOne
Update returns a builder for updating this UserOAuthProvider. Note that you need to call UserOAuthProvider.Unwrap() before calling this method if this UserOAuthProvider was returned from a transaction, and the transaction was committed or rolled back.
type UserOAuthProviderClient ¶
type UserOAuthProviderClient struct {
// contains filtered or unexported fields
}
UserOAuthProviderClient is a client for the UserOAuthProvider schema.
func NewUserOAuthProviderClient ¶
func NewUserOAuthProviderClient(c config) *UserOAuthProviderClient
NewUserOAuthProviderClient returns a client for the UserOAuthProvider from the given config.
func (*UserOAuthProviderClient) Create ¶
func (c *UserOAuthProviderClient) Create() *UserOAuthProviderCreate
Create returns a create builder for UserOAuthProvider.
func (*UserOAuthProviderClient) CreateBulk ¶
func (c *UserOAuthProviderClient) CreateBulk(builders ...*UserOAuthProviderCreate) *UserOAuthProviderCreateBulk
CreateBulk returns a builder for creating a bulk of UserOAuthProvider entities.
func (*UserOAuthProviderClient) Delete ¶
func (c *UserOAuthProviderClient) Delete() *UserOAuthProviderDelete
Delete returns a delete builder for UserOAuthProvider.
func (*UserOAuthProviderClient) DeleteOne ¶
func (c *UserOAuthProviderClient) DeleteOne(uop *UserOAuthProvider) *UserOAuthProviderDeleteOne
DeleteOne returns a delete builder for the given entity.
func (*UserOAuthProviderClient) DeleteOneID ¶
func (c *UserOAuthProviderClient) DeleteOneID(id string) *UserOAuthProviderDeleteOne
DeleteOneID returns a delete builder for the given id.
func (*UserOAuthProviderClient) Get ¶
func (c *UserOAuthProviderClient) Get(ctx context.Context, id string) (*UserOAuthProvider, error)
Get returns a UserOAuthProvider entity by its id.
func (*UserOAuthProviderClient) GetX ¶
func (c *UserOAuthProviderClient) GetX(ctx context.Context, id string) *UserOAuthProvider
GetX is like Get, but panics if an error occurs.
func (*UserOAuthProviderClient) Hooks ¶
func (c *UserOAuthProviderClient) Hooks() []Hook
Hooks returns the client hooks.
func (*UserOAuthProviderClient) Query ¶
func (c *UserOAuthProviderClient) Query() *UserOAuthProviderQuery
Query returns a query builder for UserOAuthProvider.
func (*UserOAuthProviderClient) QueryUser ¶
func (c *UserOAuthProviderClient) QueryUser(uop *UserOAuthProvider) *UserQuery
QueryUser queries the user edge of a UserOAuthProvider.
func (*UserOAuthProviderClient) Update ¶
func (c *UserOAuthProviderClient) Update() *UserOAuthProviderUpdate
Update returns an update builder for UserOAuthProvider.
func (*UserOAuthProviderClient) UpdateOne ¶
func (c *UserOAuthProviderClient) UpdateOne(uop *UserOAuthProvider) *UserOAuthProviderUpdateOne
UpdateOne returns an update builder for the given entity.
func (*UserOAuthProviderClient) UpdateOneID ¶
func (c *UserOAuthProviderClient) UpdateOneID(id string) *UserOAuthProviderUpdateOne
UpdateOneID returns an update builder for the given id.
func (*UserOAuthProviderClient) Use ¶
func (c *UserOAuthProviderClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `useroauthprovider.Hooks(f(g(h())))`.
type UserOAuthProviderCreate ¶
type UserOAuthProviderCreate struct {
// contains filtered or unexported fields
}
UserOAuthProviderCreate is the builder for creating a UserOAuthProvider entity.
func (*UserOAuthProviderCreate) Exec ¶
func (uopc *UserOAuthProviderCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*UserOAuthProviderCreate) ExecX ¶
func (uopc *UserOAuthProviderCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserOAuthProviderCreate) Mutation ¶
func (uopc *UserOAuthProviderCreate) Mutation() *UserOAuthProviderMutation
Mutation returns the UserOAuthProviderMutation object of the builder.
func (*UserOAuthProviderCreate) Save ¶
func (uopc *UserOAuthProviderCreate) Save(ctx context.Context) (*UserOAuthProvider, error)
Save creates the UserOAuthProvider in the database.
func (*UserOAuthProviderCreate) SaveX ¶
func (uopc *UserOAuthProviderCreate) SaveX(ctx context.Context) *UserOAuthProvider
SaveX calls Save and panics if Save returns an error.
func (*UserOAuthProviderCreate) SetAccessToken ¶
func (uopc *UserOAuthProviderCreate) SetAccessToken(s string) *UserOAuthProviderCreate
SetAccessToken sets the "access_token" field.
func (*UserOAuthProviderCreate) SetCreatedAt ¶
func (uopc *UserOAuthProviderCreate) SetCreatedAt(t time.Time) *UserOAuthProviderCreate
SetCreatedAt sets the "created_at" field.
func (*UserOAuthProviderCreate) SetCreatedBy ¶
func (uopc *UserOAuthProviderCreate) SetCreatedBy(s string) *UserOAuthProviderCreate
SetCreatedBy sets the "created_by" field.
func (*UserOAuthProviderCreate) SetExpiry ¶
func (uopc *UserOAuthProviderCreate) SetExpiry(t time.Time) *UserOAuthProviderCreate
SetExpiry sets the "expiry" field.
func (*UserOAuthProviderCreate) SetID ¶
func (uopc *UserOAuthProviderCreate) SetID(s string) *UserOAuthProviderCreate
SetID sets the "id" field.
func (*UserOAuthProviderCreate) SetNillableCreatedAt ¶
func (uopc *UserOAuthProviderCreate) SetNillableCreatedAt(t *time.Time) *UserOAuthProviderCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*UserOAuthProviderCreate) SetNillableStatus ¶
func (uopc *UserOAuthProviderCreate) SetNillableStatus(u *useroauthprovider.Status) *UserOAuthProviderCreate
SetNillableStatus sets the "status" field if the given value is not nil.
func (*UserOAuthProviderCreate) SetNillableUpdatedAt ¶
func (uopc *UserOAuthProviderCreate) SetNillableUpdatedAt(t *time.Time) *UserOAuthProviderCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*UserOAuthProviderCreate) SetProvider ¶
func (uopc *UserOAuthProviderCreate) SetProvider(u useroauthprovider.Provider) *UserOAuthProviderCreate
SetProvider sets the "provider" field.
func (*UserOAuthProviderCreate) SetRefreshToken ¶
func (uopc *UserOAuthProviderCreate) SetRefreshToken(s string) *UserOAuthProviderCreate
SetRefreshToken sets the "refresh_token" field.
func (*UserOAuthProviderCreate) SetStatus ¶
func (uopc *UserOAuthProviderCreate) SetStatus(u useroauthprovider.Status) *UserOAuthProviderCreate
SetStatus sets the "status" field.
func (*UserOAuthProviderCreate) SetUpdatedAt ¶
func (uopc *UserOAuthProviderCreate) SetUpdatedAt(t time.Time) *UserOAuthProviderCreate
SetUpdatedAt sets the "updated_at" field.
func (*UserOAuthProviderCreate) SetUpdatedBy ¶
func (uopc *UserOAuthProviderCreate) SetUpdatedBy(s string) *UserOAuthProviderCreate
SetUpdatedBy sets the "updated_by" field.
func (*UserOAuthProviderCreate) SetUser ¶
func (uopc *UserOAuthProviderCreate) SetUser(u *User) *UserOAuthProviderCreate
SetUser sets the "user" edge to the User entity.
func (*UserOAuthProviderCreate) SetUserID ¶
func (uopc *UserOAuthProviderCreate) SetUserID(s string) *UserOAuthProviderCreate
SetUserID sets the "user_id" field.
type UserOAuthProviderCreateBulk ¶
type UserOAuthProviderCreateBulk struct {
// contains filtered or unexported fields
}
UserOAuthProviderCreateBulk is the builder for creating many UserOAuthProvider entities in bulk.
func (*UserOAuthProviderCreateBulk) Exec ¶
func (uopcb *UserOAuthProviderCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*UserOAuthProviderCreateBulk) ExecX ¶
func (uopcb *UserOAuthProviderCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserOAuthProviderCreateBulk) Save ¶
func (uopcb *UserOAuthProviderCreateBulk) Save(ctx context.Context) ([]*UserOAuthProvider, error)
Save creates the UserOAuthProvider entities in the database.
func (*UserOAuthProviderCreateBulk) SaveX ¶
func (uopcb *UserOAuthProviderCreateBulk) SaveX(ctx context.Context) []*UserOAuthProvider
SaveX is like Save, but panics if an error occurs.
type UserOAuthProviderDelete ¶
type UserOAuthProviderDelete struct {
// contains filtered or unexported fields
}
UserOAuthProviderDelete is the builder for deleting a UserOAuthProvider entity.
func (*UserOAuthProviderDelete) Exec ¶
func (uopd *UserOAuthProviderDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*UserOAuthProviderDelete) ExecX ¶
func (uopd *UserOAuthProviderDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*UserOAuthProviderDelete) Where ¶
func (uopd *UserOAuthProviderDelete) Where(ps ...predicate.UserOAuthProvider) *UserOAuthProviderDelete
Where appends a list predicates to the UserOAuthProviderDelete builder.
type UserOAuthProviderDeleteOne ¶
type UserOAuthProviderDeleteOne struct {
// contains filtered or unexported fields
}
UserOAuthProviderDeleteOne is the builder for deleting a single UserOAuthProvider entity.
func (*UserOAuthProviderDeleteOne) Exec ¶
func (uopdo *UserOAuthProviderDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*UserOAuthProviderDeleteOne) ExecX ¶
func (uopdo *UserOAuthProviderDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type UserOAuthProviderEdges ¶
type UserOAuthProviderEdges struct { // User holds the value of the user edge. User *User `json:"user,omitempty"` // contains filtered or unexported fields }
UserOAuthProviderEdges holds the relations/edges for other nodes in the graph.
func (UserOAuthProviderEdges) UserOrErr ¶
func (e UserOAuthProviderEdges) UserOrErr() (*User, error)
UserOrErr returns the User value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type UserOAuthProviderGroupBy ¶
type UserOAuthProviderGroupBy struct {
// contains filtered or unexported fields
}
UserOAuthProviderGroupBy is the group-by builder for UserOAuthProvider entities.
func (*UserOAuthProviderGroupBy) Aggregate ¶
func (uopgb *UserOAuthProviderGroupBy) Aggregate(fns ...AggregateFunc) *UserOAuthProviderGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*UserOAuthProviderGroupBy) Bool ¶
func (uopgb *UserOAuthProviderGroupBy) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a group-by query. It is only allowed when executing a group-by query with one field.
func (*UserOAuthProviderGroupBy) BoolX ¶
func (uopgb *UserOAuthProviderGroupBy) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*UserOAuthProviderGroupBy) Bools ¶
func (uopgb *UserOAuthProviderGroupBy) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from group-by. It is only allowed when executing a group-by query with one field.
func (*UserOAuthProviderGroupBy) BoolsX ¶
func (uopgb *UserOAuthProviderGroupBy) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*UserOAuthProviderGroupBy) Float64 ¶
func (uopgb *UserOAuthProviderGroupBy) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a group-by query. It is only allowed when executing a group-by query with one field.
func (*UserOAuthProviderGroupBy) Float64X ¶
func (uopgb *UserOAuthProviderGroupBy) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*UserOAuthProviderGroupBy) Float64s ¶
func (uopgb *UserOAuthProviderGroupBy) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from group-by. It is only allowed when executing a group-by query with one field.
func (*UserOAuthProviderGroupBy) Float64sX ¶
func (uopgb *UserOAuthProviderGroupBy) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*UserOAuthProviderGroupBy) Int ¶
func (uopgb *UserOAuthProviderGroupBy) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a group-by query. It is only allowed when executing a group-by query with one field.
func (*UserOAuthProviderGroupBy) IntX ¶
func (uopgb *UserOAuthProviderGroupBy) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*UserOAuthProviderGroupBy) Ints ¶
func (uopgb *UserOAuthProviderGroupBy) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from group-by. It is only allowed when executing a group-by query with one field.
func (*UserOAuthProviderGroupBy) IntsX ¶
func (uopgb *UserOAuthProviderGroupBy) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*UserOAuthProviderGroupBy) Scan ¶
func (uopgb *UserOAuthProviderGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scans the result into the given value.
func (*UserOAuthProviderGroupBy) ScanX ¶
func (uopgb *UserOAuthProviderGroupBy) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*UserOAuthProviderGroupBy) String ¶
func (uopgb *UserOAuthProviderGroupBy) String(ctx context.Context) (_ string, err error)
String returns a single string from a group-by query. It is only allowed when executing a group-by query with one field.
func (*UserOAuthProviderGroupBy) StringX ¶
func (uopgb *UserOAuthProviderGroupBy) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type UserOAuthProviderMutation ¶
type UserOAuthProviderMutation struct {
// contains filtered or unexported fields
}
UserOAuthProviderMutation represents an operation that mutates the UserOAuthProvider nodes in the graph.
func (*UserOAuthProviderMutation) AccessToken ¶
func (m *UserOAuthProviderMutation) AccessToken() (r string, exists bool)
AccessToken returns the value of the "access_token" field in the mutation.
func (*UserOAuthProviderMutation) AddField ¶
func (m *UserOAuthProviderMutation) AddField(name string, value ent.Value) error
AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*UserOAuthProviderMutation) AddedEdges ¶
func (m *UserOAuthProviderMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*UserOAuthProviderMutation) AddedField ¶
func (m *UserOAuthProviderMutation) AddedField(name string) (ent.Value, bool)
AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*UserOAuthProviderMutation) AddedFields ¶
func (m *UserOAuthProviderMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*UserOAuthProviderMutation) AddedIDs ¶
func (m *UserOAuthProviderMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*UserOAuthProviderMutation) ClearEdge ¶
func (m *UserOAuthProviderMutation) ClearEdge(name string) error
ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.
func (*UserOAuthProviderMutation) ClearField ¶
func (m *UserOAuthProviderMutation) ClearField(name string) error
ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.
func (*UserOAuthProviderMutation) ClearUser ¶
func (m *UserOAuthProviderMutation) ClearUser()
ClearUser clears the "user" edge to the User entity.
func (*UserOAuthProviderMutation) ClearedEdges ¶
func (m *UserOAuthProviderMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*UserOAuthProviderMutation) ClearedFields ¶
func (m *UserOAuthProviderMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (UserOAuthProviderMutation) Client ¶
func (m UserOAuthProviderMutation) 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 (*UserOAuthProviderMutation) CreatedAt ¶
func (m *UserOAuthProviderMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*UserOAuthProviderMutation) CreatedBy ¶
func (m *UserOAuthProviderMutation) CreatedBy() (r string, exists bool)
CreatedBy returns the value of the "created_by" field in the mutation.
func (*UserOAuthProviderMutation) EdgeCleared ¶
func (m *UserOAuthProviderMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*UserOAuthProviderMutation) Expiry ¶
func (m *UserOAuthProviderMutation) Expiry() (r time.Time, exists bool)
Expiry returns the value of the "expiry" field in the mutation.
func (*UserOAuthProviderMutation) Field ¶
func (m *UserOAuthProviderMutation) Field(name string) (ent.Value, bool)
Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*UserOAuthProviderMutation) FieldCleared ¶
func (m *UserOAuthProviderMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*UserOAuthProviderMutation) Fields ¶
func (m *UserOAuthProviderMutation) Fields() []string
Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().
func (*UserOAuthProviderMutation) ID ¶
func (m *UserOAuthProviderMutation) ID() (id string, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*UserOAuthProviderMutation) IDs ¶
func (m *UserOAuthProviderMutation) IDs(ctx context.Context) ([]string, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*UserOAuthProviderMutation) OldAccessToken ¶
func (m *UserOAuthProviderMutation) OldAccessToken(ctx context.Context) (v string, err error)
OldAccessToken returns the old "access_token" field's value of the UserOAuthProvider entity. If the UserOAuthProvider object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserOAuthProviderMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the UserOAuthProvider entity. If the UserOAuthProvider object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserOAuthProviderMutation) OldCreatedBy ¶
func (m *UserOAuthProviderMutation) OldCreatedBy(ctx context.Context) (v string, err error)
OldCreatedBy returns the old "created_by" field's value of the UserOAuthProvider entity. If the UserOAuthProvider object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserOAuthProviderMutation) OldExpiry ¶
OldExpiry returns the old "expiry" field's value of the UserOAuthProvider entity. If the UserOAuthProvider object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserOAuthProviderMutation) OldField ¶
OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.
func (*UserOAuthProviderMutation) OldProvider ¶
func (m *UserOAuthProviderMutation) OldProvider(ctx context.Context) (v useroauthprovider.Provider, err error)
OldProvider returns the old "provider" field's value of the UserOAuthProvider entity. If the UserOAuthProvider object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserOAuthProviderMutation) OldRefreshToken ¶
func (m *UserOAuthProviderMutation) OldRefreshToken(ctx context.Context) (v string, err error)
OldRefreshToken returns the old "refresh_token" field's value of the UserOAuthProvider entity. If the UserOAuthProvider object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserOAuthProviderMutation) OldStatus ¶
func (m *UserOAuthProviderMutation) OldStatus(ctx context.Context) (v useroauthprovider.Status, err error)
OldStatus returns the old "status" field's value of the UserOAuthProvider entity. If the UserOAuthProvider object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserOAuthProviderMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the UserOAuthProvider entity. If the UserOAuthProvider object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserOAuthProviderMutation) OldUpdatedBy ¶
func (m *UserOAuthProviderMutation) OldUpdatedBy(ctx context.Context) (v string, err error)
OldUpdatedBy returns the old "updated_by" field's value of the UserOAuthProvider entity. If the UserOAuthProvider object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserOAuthProviderMutation) OldUserID ¶
func (m *UserOAuthProviderMutation) OldUserID(ctx context.Context) (v string, err error)
OldUserID returns the old "user_id" field's value of the UserOAuthProvider entity. If the UserOAuthProvider object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserOAuthProviderMutation) Op ¶
func (m *UserOAuthProviderMutation) Op() Op
Op returns the operation name.
func (*UserOAuthProviderMutation) Provider ¶
func (m *UserOAuthProviderMutation) Provider() (r useroauthprovider.Provider, exists bool)
Provider returns the value of the "provider" field in the mutation.
func (*UserOAuthProviderMutation) RefreshToken ¶
func (m *UserOAuthProviderMutation) RefreshToken() (r string, exists bool)
RefreshToken returns the value of the "refresh_token" field in the mutation.
func (*UserOAuthProviderMutation) RemovedEdges ¶
func (m *UserOAuthProviderMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*UserOAuthProviderMutation) RemovedIDs ¶
func (m *UserOAuthProviderMutation) RemovedIDs(name string) []ent.Value
RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.
func (*UserOAuthProviderMutation) ResetAccessToken ¶
func (m *UserOAuthProviderMutation) ResetAccessToken()
ResetAccessToken resets all changes to the "access_token" field.
func (*UserOAuthProviderMutation) ResetCreatedAt ¶
func (m *UserOAuthProviderMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*UserOAuthProviderMutation) ResetCreatedBy ¶
func (m *UserOAuthProviderMutation) ResetCreatedBy()
ResetCreatedBy resets all changes to the "created_by" field.
func (*UserOAuthProviderMutation) ResetEdge ¶
func (m *UserOAuthProviderMutation) ResetEdge(name string) error
ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.
func (*UserOAuthProviderMutation) ResetExpiry ¶
func (m *UserOAuthProviderMutation) ResetExpiry()
ResetExpiry resets all changes to the "expiry" field.
func (*UserOAuthProviderMutation) ResetField ¶
func (m *UserOAuthProviderMutation) ResetField(name string) error
ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.
func (*UserOAuthProviderMutation) ResetProvider ¶
func (m *UserOAuthProviderMutation) ResetProvider()
ResetProvider resets all changes to the "provider" field.
func (*UserOAuthProviderMutation) ResetRefreshToken ¶
func (m *UserOAuthProviderMutation) ResetRefreshToken()
ResetRefreshToken resets all changes to the "refresh_token" field.
func (*UserOAuthProviderMutation) ResetStatus ¶
func (m *UserOAuthProviderMutation) ResetStatus()
ResetStatus resets all changes to the "status" field.
func (*UserOAuthProviderMutation) ResetUpdatedAt ¶
func (m *UserOAuthProviderMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*UserOAuthProviderMutation) ResetUpdatedBy ¶
func (m *UserOAuthProviderMutation) ResetUpdatedBy()
ResetUpdatedBy resets all changes to the "updated_by" field.
func (*UserOAuthProviderMutation) ResetUser ¶
func (m *UserOAuthProviderMutation) ResetUser()
ResetUser resets all changes to the "user" edge.
func (*UserOAuthProviderMutation) ResetUserID ¶
func (m *UserOAuthProviderMutation) ResetUserID()
ResetUserID resets all changes to the "user_id" field.
func (*UserOAuthProviderMutation) SetAccessToken ¶
func (m *UserOAuthProviderMutation) SetAccessToken(s string)
SetAccessToken sets the "access_token" field.
func (*UserOAuthProviderMutation) SetCreatedAt ¶
func (m *UserOAuthProviderMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*UserOAuthProviderMutation) SetCreatedBy ¶
func (m *UserOAuthProviderMutation) SetCreatedBy(s string)
SetCreatedBy sets the "created_by" field.
func (*UserOAuthProviderMutation) SetExpiry ¶
func (m *UserOAuthProviderMutation) SetExpiry(t time.Time)
SetExpiry sets the "expiry" field.
func (*UserOAuthProviderMutation) SetField ¶
func (m *UserOAuthProviderMutation) SetField(name string, value ent.Value) error
SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*UserOAuthProviderMutation) SetID ¶
func (m *UserOAuthProviderMutation) SetID(id string)
SetID sets the value of the id field. Note that this operation is only accepted on creation of UserOAuthProvider entities.
func (*UserOAuthProviderMutation) SetProvider ¶
func (m *UserOAuthProviderMutation) SetProvider(u useroauthprovider.Provider)
SetProvider sets the "provider" field.
func (*UserOAuthProviderMutation) SetRefreshToken ¶
func (m *UserOAuthProviderMutation) SetRefreshToken(s string)
SetRefreshToken sets the "refresh_token" field.
func (*UserOAuthProviderMutation) SetStatus ¶
func (m *UserOAuthProviderMutation) SetStatus(u useroauthprovider.Status)
SetStatus sets the "status" field.
func (*UserOAuthProviderMutation) SetUpdatedAt ¶
func (m *UserOAuthProviderMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*UserOAuthProviderMutation) SetUpdatedBy ¶
func (m *UserOAuthProviderMutation) SetUpdatedBy(s string)
SetUpdatedBy sets the "updated_by" field.
func (*UserOAuthProviderMutation) SetUserID ¶
func (m *UserOAuthProviderMutation) SetUserID(s string)
SetUserID sets the "user_id" field.
func (*UserOAuthProviderMutation) Status ¶
func (m *UserOAuthProviderMutation) Status() (r useroauthprovider.Status, exists bool)
Status returns the value of the "status" field in the mutation.
func (UserOAuthProviderMutation) Tx ¶
func (m UserOAuthProviderMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*UserOAuthProviderMutation) Type ¶
func (m *UserOAuthProviderMutation) Type() string
Type returns the node type of this mutation (UserOAuthProvider).
func (*UserOAuthProviderMutation) UpdatedAt ¶
func (m *UserOAuthProviderMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*UserOAuthProviderMutation) UpdatedBy ¶
func (m *UserOAuthProviderMutation) UpdatedBy() (r string, exists bool)
UpdatedBy returns the value of the "updated_by" field in the mutation.
func (*UserOAuthProviderMutation) UserCleared ¶
func (m *UserOAuthProviderMutation) UserCleared() bool
UserCleared reports if the "user" edge to the User entity was cleared.
func (*UserOAuthProviderMutation) UserID ¶
func (m *UserOAuthProviderMutation) UserID() (r string, exists bool)
UserID returns the value of the "user_id" field in the mutation.
func (*UserOAuthProviderMutation) UserIDs ¶
func (m *UserOAuthProviderMutation) UserIDs() (ids []string)
UserIDs returns the "user" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use UserID instead. It exists only for internal usage by the builders.
func (*UserOAuthProviderMutation) Where ¶
func (m *UserOAuthProviderMutation) Where(ps ...predicate.UserOAuthProvider)
Where appends a list predicates to the UserOAuthProviderMutation builder.
type UserOAuthProviderQuery ¶
type UserOAuthProviderQuery struct {
// contains filtered or unexported fields
}
UserOAuthProviderQuery is the builder for querying UserOAuthProvider entities.
func (*UserOAuthProviderQuery) All ¶
func (uopq *UserOAuthProviderQuery) All(ctx context.Context) ([]*UserOAuthProvider, error)
All executes the query and returns a list of UserOAuthProviders.
func (*UserOAuthProviderQuery) AllX ¶
func (uopq *UserOAuthProviderQuery) AllX(ctx context.Context) []*UserOAuthProvider
AllX is like All, but panics if an error occurs.
func (*UserOAuthProviderQuery) Clone ¶
func (uopq *UserOAuthProviderQuery) Clone() *UserOAuthProviderQuery
Clone returns a duplicate of the UserOAuthProviderQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*UserOAuthProviderQuery) Count ¶
func (uopq *UserOAuthProviderQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*UserOAuthProviderQuery) CountX ¶
func (uopq *UserOAuthProviderQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*UserOAuthProviderQuery) Exist ¶
func (uopq *UserOAuthProviderQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*UserOAuthProviderQuery) ExistX ¶
func (uopq *UserOAuthProviderQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*UserOAuthProviderQuery) First ¶
func (uopq *UserOAuthProviderQuery) First(ctx context.Context) (*UserOAuthProvider, error)
First returns the first UserOAuthProvider entity from the query. Returns a *NotFoundError when no UserOAuthProvider was found.
func (*UserOAuthProviderQuery) FirstID ¶
func (uopq *UserOAuthProviderQuery) FirstID(ctx context.Context) (id string, err error)
FirstID returns the first UserOAuthProvider ID from the query. Returns a *NotFoundError when no UserOAuthProvider ID was found.
func (*UserOAuthProviderQuery) FirstIDX ¶
func (uopq *UserOAuthProviderQuery) FirstIDX(ctx context.Context) string
FirstIDX is like FirstID, but panics if an error occurs.
func (*UserOAuthProviderQuery) FirstX ¶
func (uopq *UserOAuthProviderQuery) FirstX(ctx context.Context) *UserOAuthProvider
FirstX is like First, but panics if an error occurs.
func (*UserOAuthProviderQuery) GroupBy ¶
func (uopq *UserOAuthProviderQuery) GroupBy(field string, fields ...string) *UserOAuthProviderGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct { UserID string `json:"user_id,omitempty"` Count int `json:"count,omitempty"` } client.UserOAuthProvider.Query(). GroupBy(useroauthprovider.FieldUserID). Aggregate(ent.Count()). Scan(ctx, &v)
func (*UserOAuthProviderQuery) IDs ¶
func (uopq *UserOAuthProviderQuery) IDs(ctx context.Context) ([]string, error)
IDs executes the query and returns a list of UserOAuthProvider IDs.
func (*UserOAuthProviderQuery) IDsX ¶
func (uopq *UserOAuthProviderQuery) IDsX(ctx context.Context) []string
IDsX is like IDs, but panics if an error occurs.
func (*UserOAuthProviderQuery) Limit ¶
func (uopq *UserOAuthProviderQuery) Limit(limit int) *UserOAuthProviderQuery
Limit adds a limit step to the query.
func (*UserOAuthProviderQuery) Offset ¶
func (uopq *UserOAuthProviderQuery) Offset(offset int) *UserOAuthProviderQuery
Offset adds an offset step to the query.
func (*UserOAuthProviderQuery) Only ¶
func (uopq *UserOAuthProviderQuery) Only(ctx context.Context) (*UserOAuthProvider, error)
Only returns a single UserOAuthProvider entity found by the query, ensuring it only returns one. Returns a *NotSingularError when exactly one UserOAuthProvider entity is not found. Returns a *NotFoundError when no UserOAuthProvider entities are found.
func (*UserOAuthProviderQuery) OnlyID ¶
func (uopq *UserOAuthProviderQuery) OnlyID(ctx context.Context) (id string, err error)
OnlyID is like Only, but returns the only UserOAuthProvider ID in the query. Returns a *NotSingularError when exactly one UserOAuthProvider ID is not found. Returns a *NotFoundError when no entities are found.
func (*UserOAuthProviderQuery) OnlyIDX ¶
func (uopq *UserOAuthProviderQuery) OnlyIDX(ctx context.Context) string
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*UserOAuthProviderQuery) OnlyX ¶
func (uopq *UserOAuthProviderQuery) OnlyX(ctx context.Context) *UserOAuthProvider
OnlyX is like Only, but panics if an error occurs.
func (*UserOAuthProviderQuery) Order ¶
func (uopq *UserOAuthProviderQuery) Order(o ...OrderFunc) *UserOAuthProviderQuery
Order adds an order step to the query.
func (*UserOAuthProviderQuery) QueryUser ¶
func (uopq *UserOAuthProviderQuery) QueryUser() *UserQuery
QueryUser chains the current query on the "user" edge.
func (*UserOAuthProviderQuery) Select ¶
func (uopq *UserOAuthProviderQuery) Select(fields ...string) *UserOAuthProviderSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct { UserID string `json:"user_id,omitempty"` } client.UserOAuthProvider.Query(). Select(useroauthprovider.FieldUserID). Scan(ctx, &v)
func (*UserOAuthProviderQuery) Unique ¶
func (uopq *UserOAuthProviderQuery) Unique(unique bool) *UserOAuthProviderQuery
Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.
func (*UserOAuthProviderQuery) Where ¶
func (uopq *UserOAuthProviderQuery) Where(ps ...predicate.UserOAuthProvider) *UserOAuthProviderQuery
Where adds a new predicate for the UserOAuthProviderQuery builder.
func (*UserOAuthProviderQuery) WithUser ¶
func (uopq *UserOAuthProviderQuery) WithUser(opts ...func(*UserQuery)) *UserOAuthProviderQuery
WithUser tells the query-builder to eager-load the nodes that are connected to the "user" edge. The optional arguments are used to configure the query builder of the edge.
type UserOAuthProviderSelect ¶
type UserOAuthProviderSelect struct { *UserOAuthProviderQuery // contains filtered or unexported fields }
UserOAuthProviderSelect is the builder for selecting fields of UserOAuthProvider entities.
func (*UserOAuthProviderSelect) Bool ¶
func (uops *UserOAuthProviderSelect) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*UserOAuthProviderSelect) BoolX ¶
func (uops *UserOAuthProviderSelect) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*UserOAuthProviderSelect) Bools ¶
func (uops *UserOAuthProviderSelect) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*UserOAuthProviderSelect) BoolsX ¶
func (uops *UserOAuthProviderSelect) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*UserOAuthProviderSelect) Float64 ¶
func (uops *UserOAuthProviderSelect) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*UserOAuthProviderSelect) Float64X ¶
func (uops *UserOAuthProviderSelect) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*UserOAuthProviderSelect) Float64s ¶
func (uops *UserOAuthProviderSelect) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*UserOAuthProviderSelect) Float64sX ¶
func (uops *UserOAuthProviderSelect) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*UserOAuthProviderSelect) Int ¶
func (uops *UserOAuthProviderSelect) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*UserOAuthProviderSelect) IntX ¶
func (uops *UserOAuthProviderSelect) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*UserOAuthProviderSelect) Ints ¶
func (uops *UserOAuthProviderSelect) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*UserOAuthProviderSelect) IntsX ¶
func (uops *UserOAuthProviderSelect) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*UserOAuthProviderSelect) Scan ¶
func (uops *UserOAuthProviderSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scans the result into the given value.
func (*UserOAuthProviderSelect) ScanX ¶
func (uops *UserOAuthProviderSelect) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*UserOAuthProviderSelect) String ¶
func (uops *UserOAuthProviderSelect) String(ctx context.Context) (_ string, err error)
String returns a single string from a selector. It is only allowed when selecting one field.
func (*UserOAuthProviderSelect) StringX ¶
func (uops *UserOAuthProviderSelect) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type UserOAuthProviderUpdate ¶
type UserOAuthProviderUpdate struct {
// contains filtered or unexported fields
}
UserOAuthProviderUpdate is the builder for updating UserOAuthProvider entities.
func (*UserOAuthProviderUpdate) ClearUser ¶
func (uopu *UserOAuthProviderUpdate) ClearUser() *UserOAuthProviderUpdate
ClearUser clears the "user" edge to the User entity.
func (*UserOAuthProviderUpdate) Exec ¶
func (uopu *UserOAuthProviderUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*UserOAuthProviderUpdate) ExecX ¶
func (uopu *UserOAuthProviderUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserOAuthProviderUpdate) Mutation ¶
func (uopu *UserOAuthProviderUpdate) Mutation() *UserOAuthProviderMutation
Mutation returns the UserOAuthProviderMutation object of the builder.
func (*UserOAuthProviderUpdate) Save ¶
func (uopu *UserOAuthProviderUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*UserOAuthProviderUpdate) SaveX ¶
func (uopu *UserOAuthProviderUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*UserOAuthProviderUpdate) SetAccessToken ¶
func (uopu *UserOAuthProviderUpdate) SetAccessToken(s string) *UserOAuthProviderUpdate
SetAccessToken sets the "access_token" field.
func (*UserOAuthProviderUpdate) SetCreatedAt ¶
func (uopu *UserOAuthProviderUpdate) SetCreatedAt(t time.Time) *UserOAuthProviderUpdate
SetCreatedAt sets the "created_at" field.
func (*UserOAuthProviderUpdate) SetCreatedBy ¶
func (uopu *UserOAuthProviderUpdate) SetCreatedBy(s string) *UserOAuthProviderUpdate
SetCreatedBy sets the "created_by" field.
func (*UserOAuthProviderUpdate) SetExpiry ¶
func (uopu *UserOAuthProviderUpdate) SetExpiry(t time.Time) *UserOAuthProviderUpdate
SetExpiry sets the "expiry" field.
func (*UserOAuthProviderUpdate) SetNillableCreatedAt ¶
func (uopu *UserOAuthProviderUpdate) SetNillableCreatedAt(t *time.Time) *UserOAuthProviderUpdate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*UserOAuthProviderUpdate) SetNillableStatus ¶
func (uopu *UserOAuthProviderUpdate) SetNillableStatus(u *useroauthprovider.Status) *UserOAuthProviderUpdate
SetNillableStatus sets the "status" field if the given value is not nil.
func (*UserOAuthProviderUpdate) SetProvider ¶
func (uopu *UserOAuthProviderUpdate) SetProvider(u useroauthprovider.Provider) *UserOAuthProviderUpdate
SetProvider sets the "provider" field.
func (*UserOAuthProviderUpdate) SetRefreshToken ¶
func (uopu *UserOAuthProviderUpdate) SetRefreshToken(s string) *UserOAuthProviderUpdate
SetRefreshToken sets the "refresh_token" field.
func (*UserOAuthProviderUpdate) SetStatus ¶
func (uopu *UserOAuthProviderUpdate) SetStatus(u useroauthprovider.Status) *UserOAuthProviderUpdate
SetStatus sets the "status" field.
func (*UserOAuthProviderUpdate) SetUpdatedAt ¶
func (uopu *UserOAuthProviderUpdate) SetUpdatedAt(t time.Time) *UserOAuthProviderUpdate
SetUpdatedAt sets the "updated_at" field.
func (*UserOAuthProviderUpdate) SetUpdatedBy ¶
func (uopu *UserOAuthProviderUpdate) SetUpdatedBy(s string) *UserOAuthProviderUpdate
SetUpdatedBy sets the "updated_by" field.
func (*UserOAuthProviderUpdate) SetUser ¶
func (uopu *UserOAuthProviderUpdate) SetUser(u *User) *UserOAuthProviderUpdate
SetUser sets the "user" edge to the User entity.
func (*UserOAuthProviderUpdate) SetUserID ¶
func (uopu *UserOAuthProviderUpdate) SetUserID(s string) *UserOAuthProviderUpdate
SetUserID sets the "user_id" field.
func (*UserOAuthProviderUpdate) Where ¶
func (uopu *UserOAuthProviderUpdate) Where(ps ...predicate.UserOAuthProvider) *UserOAuthProviderUpdate
Where appends a list predicates to the UserOAuthProviderUpdate builder.
type UserOAuthProviderUpdateOne ¶
type UserOAuthProviderUpdateOne struct {
// contains filtered or unexported fields
}
UserOAuthProviderUpdateOne is the builder for updating a single UserOAuthProvider entity.
func (*UserOAuthProviderUpdateOne) ClearUser ¶
func (uopuo *UserOAuthProviderUpdateOne) ClearUser() *UserOAuthProviderUpdateOne
ClearUser clears the "user" edge to the User entity.
func (*UserOAuthProviderUpdateOne) Exec ¶
func (uopuo *UserOAuthProviderUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*UserOAuthProviderUpdateOne) ExecX ¶
func (uopuo *UserOAuthProviderUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserOAuthProviderUpdateOne) Mutation ¶
func (uopuo *UserOAuthProviderUpdateOne) Mutation() *UserOAuthProviderMutation
Mutation returns the UserOAuthProviderMutation object of the builder.
func (*UserOAuthProviderUpdateOne) Save ¶
func (uopuo *UserOAuthProviderUpdateOne) Save(ctx context.Context) (*UserOAuthProvider, error)
Save executes the query and returns the updated UserOAuthProvider entity.
func (*UserOAuthProviderUpdateOne) SaveX ¶
func (uopuo *UserOAuthProviderUpdateOne) SaveX(ctx context.Context) *UserOAuthProvider
SaveX is like Save, but panics if an error occurs.
func (*UserOAuthProviderUpdateOne) Select ¶
func (uopuo *UserOAuthProviderUpdateOne) Select(field string, fields ...string) *UserOAuthProviderUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*UserOAuthProviderUpdateOne) SetAccessToken ¶
func (uopuo *UserOAuthProviderUpdateOne) SetAccessToken(s string) *UserOAuthProviderUpdateOne
SetAccessToken sets the "access_token" field.
func (*UserOAuthProviderUpdateOne) SetCreatedAt ¶
func (uopuo *UserOAuthProviderUpdateOne) SetCreatedAt(t time.Time) *UserOAuthProviderUpdateOne
SetCreatedAt sets the "created_at" field.
func (*UserOAuthProviderUpdateOne) SetCreatedBy ¶
func (uopuo *UserOAuthProviderUpdateOne) SetCreatedBy(s string) *UserOAuthProviderUpdateOne
SetCreatedBy sets the "created_by" field.
func (*UserOAuthProviderUpdateOne) SetExpiry ¶
func (uopuo *UserOAuthProviderUpdateOne) SetExpiry(t time.Time) *UserOAuthProviderUpdateOne
SetExpiry sets the "expiry" field.
func (*UserOAuthProviderUpdateOne) SetNillableCreatedAt ¶
func (uopuo *UserOAuthProviderUpdateOne) SetNillableCreatedAt(t *time.Time) *UserOAuthProviderUpdateOne
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*UserOAuthProviderUpdateOne) SetNillableStatus ¶
func (uopuo *UserOAuthProviderUpdateOne) SetNillableStatus(u *useroauthprovider.Status) *UserOAuthProviderUpdateOne
SetNillableStatus sets the "status" field if the given value is not nil.
func (*UserOAuthProviderUpdateOne) SetProvider ¶
func (uopuo *UserOAuthProviderUpdateOne) SetProvider(u useroauthprovider.Provider) *UserOAuthProviderUpdateOne
SetProvider sets the "provider" field.
func (*UserOAuthProviderUpdateOne) SetRefreshToken ¶
func (uopuo *UserOAuthProviderUpdateOne) SetRefreshToken(s string) *UserOAuthProviderUpdateOne
SetRefreshToken sets the "refresh_token" field.
func (*UserOAuthProviderUpdateOne) SetStatus ¶
func (uopuo *UserOAuthProviderUpdateOne) SetStatus(u useroauthprovider.Status) *UserOAuthProviderUpdateOne
SetStatus sets the "status" field.
func (*UserOAuthProviderUpdateOne) SetUpdatedAt ¶
func (uopuo *UserOAuthProviderUpdateOne) SetUpdatedAt(t time.Time) *UserOAuthProviderUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*UserOAuthProviderUpdateOne) SetUpdatedBy ¶
func (uopuo *UserOAuthProviderUpdateOne) SetUpdatedBy(s string) *UserOAuthProviderUpdateOne
SetUpdatedBy sets the "updated_by" field.
func (*UserOAuthProviderUpdateOne) SetUser ¶
func (uopuo *UserOAuthProviderUpdateOne) SetUser(u *User) *UserOAuthProviderUpdateOne
SetUser sets the "user" edge to the User entity.
func (*UserOAuthProviderUpdateOne) SetUserID ¶
func (uopuo *UserOAuthProviderUpdateOne) SetUserID(s string) *UserOAuthProviderUpdateOne
SetUserID sets the "user_id" field.
type UserOAuthProviders ¶
type UserOAuthProviders []*UserOAuthProvider
UserOAuthProviders is a parsable slice of UserOAuthProvider.
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 UserQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*UserQuery) First ¶
First returns the first User entity from the query. Returns a *NotFoundError when no User was found.
func (*UserQuery) FirstID ¶
FirstID returns the first User ID from the query. Returns a *NotFoundError when no User ID was found.
func (*UserQuery) GroupBy ¶
func (uq *UserQuery) GroupBy(field string, fields ...string) *UserGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct { CreatedAt time.Time `json:"created_at,omitempty"` Count int `json:"count,omitempty"` } client.User.Query(). GroupBy(user.FieldCreatedAt). Aggregate(ent.Count()). Scan(ctx, &v)
func (*UserQuery) Only ¶
Only returns a single User entity found by the query, ensuring it only returns one. Returns a *NotSingularError when exactly one User entity is not found. Returns a *NotFoundError when no User entities are found.
func (*UserQuery) OnlyID ¶
OnlyID is like Only, but returns the only User ID in the query. Returns a *NotSingularError when exactly one User ID is not found. Returns a *NotFoundError when no entities are found.
func (*UserQuery) QueryDevices ¶
func (uq *UserQuery) QueryDevices() *UserDeviceQuery
QueryDevices chains the current query on the "devices" edge.
func (*UserQuery) QueryMeta ¶
func (uq *UserQuery) QueryMeta() *UserMetaQuery
QueryMeta chains the current query on the "meta" edge.
func (*UserQuery) QueryOauthProviders ¶
func (uq *UserQuery) QueryOauthProviders() *UserOAuthProviderQuery
QueryOauthProviders chains the current query on the "oauth_providers" edge.
func (*UserQuery) Select ¶
func (uq *UserQuery) Select(fields ...string) *UserSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct { CreatedAt time.Time `json:"created_at,omitempty"` } client.User.Query(). Select(user.FieldCreatedAt). Scan(ctx, &v)
func (*UserQuery) Unique ¶
Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.
func (*UserQuery) WithDevices ¶
func (uq *UserQuery) WithDevices(opts ...func(*UserDeviceQuery)) *UserQuery
WithDevices tells the query-builder to eager-load the nodes that are connected to the "devices" edge. The optional arguments are used to configure the query builder of the edge.
func (*UserQuery) WithMeta ¶
func (uq *UserQuery) WithMeta(opts ...func(*UserMetaQuery)) *UserQuery
WithMeta tells the query-builder to eager-load the nodes that are connected to the "meta" edge. The optional arguments are used to configure the query builder of the edge.
func (*UserQuery) WithOauthProviders ¶
func (uq *UserQuery) WithOauthProviders(opts ...func(*UserOAuthProviderQuery)) *UserQuery
WithOauthProviders tells the query-builder to eager-load the nodes that are connected to the "oauth_providers" edge. The optional arguments are used to configure the query builder of the edge.
type UserSelect ¶
type UserSelect struct { *UserQuery // contains filtered or unexported fields }
UserSelect is the builder for selecting fields of User entities.
func (*UserSelect) Bool ¶
func (us *UserSelect) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a 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 a 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 a 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 a 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 a 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 a 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 scans 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 a 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) AddDeviceIDs ¶
func (uu *UserUpdate) AddDeviceIDs(ids ...string) *UserUpdate
AddDeviceIDs adds the "devices" edge to the UserDevice entity by IDs.
func (*UserUpdate) AddDevices ¶
func (uu *UserUpdate) AddDevices(u ...*UserDevice) *UserUpdate
AddDevices adds the "devices" edges to the UserDevice entity.
func (*UserUpdate) AddMeta ¶
func (uu *UserUpdate) AddMeta(u ...*UserMeta) *UserUpdate
AddMeta adds the "meta" edges to the UserMeta entity.
func (*UserUpdate) AddMetumIDs ¶
func (uu *UserUpdate) AddMetumIDs(ids ...string) *UserUpdate
AddMetumIDs adds the "meta" edge to the UserMeta entity by IDs.
func (*UserUpdate) AddOauthProviderIDs ¶
func (uu *UserUpdate) AddOauthProviderIDs(ids ...string) *UserUpdate
AddOauthProviderIDs adds the "oauth_providers" edge to the UserOAuthProvider entity by IDs.
func (*UserUpdate) AddOauthProviders ¶
func (uu *UserUpdate) AddOauthProviders(u ...*UserOAuthProvider) *UserUpdate
AddOauthProviders adds the "oauth_providers" edges to the UserOAuthProvider entity.
func (*UserUpdate) ClearDevices ¶
func (uu *UserUpdate) ClearDevices() *UserUpdate
ClearDevices clears all "devices" edges to the UserDevice entity.
func (*UserUpdate) ClearMeta ¶
func (uu *UserUpdate) ClearMeta() *UserUpdate
ClearMeta clears all "meta" edges to the UserMeta entity.
func (*UserUpdate) ClearOauthProviders ¶
func (uu *UserUpdate) ClearOauthProviders() *UserUpdate
ClearOauthProviders clears all "oauth_providers" edges to the UserOAuthProvider entity.
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) RemoveDeviceIDs ¶
func (uu *UserUpdate) RemoveDeviceIDs(ids ...string) *UserUpdate
RemoveDeviceIDs removes the "devices" edge to UserDevice entities by IDs.
func (*UserUpdate) RemoveDevices ¶
func (uu *UserUpdate) RemoveDevices(u ...*UserDevice) *UserUpdate
RemoveDevices removes "devices" edges to UserDevice entities.
func (*UserUpdate) RemoveMeta ¶
func (uu *UserUpdate) RemoveMeta(u ...*UserMeta) *UserUpdate
RemoveMeta removes "meta" edges to UserMeta entities.
func (*UserUpdate) RemoveMetumIDs ¶
func (uu *UserUpdate) RemoveMetumIDs(ids ...string) *UserUpdate
RemoveMetumIDs removes the "meta" edge to UserMeta entities by IDs.
func (*UserUpdate) RemoveOauthProviderIDs ¶
func (uu *UserUpdate) RemoveOauthProviderIDs(ids ...string) *UserUpdate
RemoveOauthProviderIDs removes the "oauth_providers" edge to UserOAuthProvider entities by IDs.
func (*UserUpdate) RemoveOauthProviders ¶
func (uu *UserUpdate) RemoveOauthProviders(u ...*UserOAuthProvider) *UserUpdate
RemoveOauthProviders removes "oauth_providers" edges to UserOAuthProvider entities.
func (*UserUpdate) Save ¶
func (uu *UserUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*UserUpdate) SaveX ¶
func (uu *UserUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*UserUpdate) SetCreatedAt ¶
func (uu *UserUpdate) SetCreatedAt(t time.Time) *UserUpdate
SetCreatedAt sets the "created_at" field.
func (*UserUpdate) SetCreatedBy ¶
func (uu *UserUpdate) SetCreatedBy(s string) *UserUpdate
SetCreatedBy sets the "created_by" field.
func (*UserUpdate) SetNillableCreatedAt ¶
func (uu *UserUpdate) SetNillableCreatedAt(t *time.Time) *UserUpdate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*UserUpdate) SetNillableSignup ¶
func (uu *UserUpdate) SetNillableSignup(b *bool) *UserUpdate
SetNillableSignup sets the "signup" field if the given value is not nil.
func (*UserUpdate) SetNillableStatus ¶
func (uu *UserUpdate) SetNillableStatus(u *user.Status) *UserUpdate
SetNillableStatus sets the "status" field if the given value is not nil.
func (*UserUpdate) SetNillableType ¶
func (uu *UserUpdate) SetNillableType(u *user.Type) *UserUpdate
SetNillableType sets the "type" field if the given value is not nil.
func (*UserUpdate) SetSignup ¶
func (uu *UserUpdate) SetSignup(b bool) *UserUpdate
SetSignup sets the "signup" field.
func (*UserUpdate) SetStatus ¶
func (uu *UserUpdate) SetStatus(u user.Status) *UserUpdate
SetStatus sets the "status" field.
func (*UserUpdate) SetType ¶
func (uu *UserUpdate) SetType(u user.Type) *UserUpdate
SetType sets the "type" field.
func (*UserUpdate) SetUpdatedAt ¶
func (uu *UserUpdate) SetUpdatedAt(t time.Time) *UserUpdate
SetUpdatedAt sets the "updated_at" field.
func (*UserUpdate) SetUpdatedBy ¶
func (uu *UserUpdate) SetUpdatedBy(s string) *UserUpdate
SetUpdatedBy sets the "updated_by" field.
func (*UserUpdate) SetUsername ¶
func (uu *UserUpdate) SetUsername(s string) *UserUpdate
SetUsername sets the "username" field.
func (*UserUpdate) Where ¶
func (uu *UserUpdate) Where(ps ...predicate.User) *UserUpdate
Where appends a list predicates to the UserUpdate builder.
type UserUpdateOne ¶
type UserUpdateOne struct {
// contains filtered or unexported fields
}
UserUpdateOne is the builder for updating a single User entity.
func (*UserUpdateOne) AddDeviceIDs ¶
func (uuo *UserUpdateOne) AddDeviceIDs(ids ...string) *UserUpdateOne
AddDeviceIDs adds the "devices" edge to the UserDevice entity by IDs.
func (*UserUpdateOne) AddDevices ¶
func (uuo *UserUpdateOne) AddDevices(u ...*UserDevice) *UserUpdateOne
AddDevices adds the "devices" edges to the UserDevice entity.
func (*UserUpdateOne) AddMeta ¶
func (uuo *UserUpdateOne) AddMeta(u ...*UserMeta) *UserUpdateOne
AddMeta adds the "meta" edges to the UserMeta entity.
func (*UserUpdateOne) AddMetumIDs ¶
func (uuo *UserUpdateOne) AddMetumIDs(ids ...string) *UserUpdateOne
AddMetumIDs adds the "meta" edge to the UserMeta entity by IDs.
func (*UserUpdateOne) AddOauthProviderIDs ¶
func (uuo *UserUpdateOne) AddOauthProviderIDs(ids ...string) *UserUpdateOne
AddOauthProviderIDs adds the "oauth_providers" edge to the UserOAuthProvider entity by IDs.
func (*UserUpdateOne) AddOauthProviders ¶
func (uuo *UserUpdateOne) AddOauthProviders(u ...*UserOAuthProvider) *UserUpdateOne
AddOauthProviders adds the "oauth_providers" edges to the UserOAuthProvider entity.
func (*UserUpdateOne) ClearDevices ¶
func (uuo *UserUpdateOne) ClearDevices() *UserUpdateOne
ClearDevices clears all "devices" edges to the UserDevice entity.
func (*UserUpdateOne) ClearMeta ¶
func (uuo *UserUpdateOne) ClearMeta() *UserUpdateOne
ClearMeta clears all "meta" edges to the UserMeta entity.
func (*UserUpdateOne) ClearOauthProviders ¶
func (uuo *UserUpdateOne) ClearOauthProviders() *UserUpdateOne
ClearOauthProviders clears all "oauth_providers" edges to the UserOAuthProvider entity.
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) RemoveDeviceIDs ¶
func (uuo *UserUpdateOne) RemoveDeviceIDs(ids ...string) *UserUpdateOne
RemoveDeviceIDs removes the "devices" edge to UserDevice entities by IDs.
func (*UserUpdateOne) RemoveDevices ¶
func (uuo *UserUpdateOne) RemoveDevices(u ...*UserDevice) *UserUpdateOne
RemoveDevices removes "devices" edges to UserDevice entities.
func (*UserUpdateOne) RemoveMeta ¶
func (uuo *UserUpdateOne) RemoveMeta(u ...*UserMeta) *UserUpdateOne
RemoveMeta removes "meta" edges to UserMeta entities.
func (*UserUpdateOne) RemoveMetumIDs ¶
func (uuo *UserUpdateOne) RemoveMetumIDs(ids ...string) *UserUpdateOne
RemoveMetumIDs removes the "meta" edge to UserMeta entities by IDs.
func (*UserUpdateOne) RemoveOauthProviderIDs ¶
func (uuo *UserUpdateOne) RemoveOauthProviderIDs(ids ...string) *UserUpdateOne
RemoveOauthProviderIDs removes the "oauth_providers" edge to UserOAuthProvider entities by IDs.
func (*UserUpdateOne) RemoveOauthProviders ¶
func (uuo *UserUpdateOne) RemoveOauthProviders(u ...*UserOAuthProvider) *UserUpdateOne
RemoveOauthProviders removes "oauth_providers" edges to UserOAuthProvider entities.
func (*UserUpdateOne) Save ¶
func (uuo *UserUpdateOne) Save(ctx context.Context) (*User, error)
Save executes the query and returns the updated User entity.
func (*UserUpdateOne) SaveX ¶
func (uuo *UserUpdateOne) SaveX(ctx context.Context) *User
SaveX is like Save, but panics if an error occurs.
func (*UserUpdateOne) Select ¶
func (uuo *UserUpdateOne) Select(field string, fields ...string) *UserUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*UserUpdateOne) SetCreatedAt ¶
func (uuo *UserUpdateOne) SetCreatedAt(t time.Time) *UserUpdateOne
SetCreatedAt sets the "created_at" field.
func (*UserUpdateOne) SetCreatedBy ¶
func (uuo *UserUpdateOne) SetCreatedBy(s string) *UserUpdateOne
SetCreatedBy sets the "created_by" field.
func (*UserUpdateOne) SetNillableCreatedAt ¶
func (uuo *UserUpdateOne) SetNillableCreatedAt(t *time.Time) *UserUpdateOne
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*UserUpdateOne) SetNillableSignup ¶
func (uuo *UserUpdateOne) SetNillableSignup(b *bool) *UserUpdateOne
SetNillableSignup sets the "signup" field if the given value is not nil.
func (*UserUpdateOne) SetNillableStatus ¶
func (uuo *UserUpdateOne) SetNillableStatus(u *user.Status) *UserUpdateOne
SetNillableStatus sets the "status" field if the given value is not nil.
func (*UserUpdateOne) SetNillableType ¶
func (uuo *UserUpdateOne) SetNillableType(u *user.Type) *UserUpdateOne
SetNillableType sets the "type" field if the given value is not nil.
func (*UserUpdateOne) SetSignup ¶
func (uuo *UserUpdateOne) SetSignup(b bool) *UserUpdateOne
SetSignup sets the "signup" field.
func (*UserUpdateOne) SetStatus ¶
func (uuo *UserUpdateOne) SetStatus(u user.Status) *UserUpdateOne
SetStatus sets the "status" field.
func (*UserUpdateOne) SetType ¶
func (uuo *UserUpdateOne) SetType(u user.Type) *UserUpdateOne
SetType sets the "type" field.
func (*UserUpdateOne) SetUpdatedAt ¶
func (uuo *UserUpdateOne) SetUpdatedAt(t time.Time) *UserUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*UserUpdateOne) SetUpdatedBy ¶
func (uuo *UserUpdateOne) SetUpdatedBy(s string) *UserUpdateOne
SetUpdatedBy sets the "updated_by" field.
func (*UserUpdateOne) SetUsername ¶
func (uuo *UserUpdateOne) SetUsername(s string) *UserUpdateOne
SetUsername sets the "username" field.
type ValidationError ¶
type ValidationError struct { Name string // Field or edge name. // contains filtered or unexported fields }
ValidationError returns when validating a field or edge fails.
func (*ValidationError) Error ¶
func (e *ValidationError) Error() string
Error implements the error interface.
func (*ValidationError) Unwrap ¶
func (e *ValidationError) Unwrap() error
Unwrap implements the errors.Wrapper interface.
Source Files ¶
- client.go
- config.go
- context.go
- ent.go
- generate.go
- mutation.go
- runtime.go
- session.go
- session_create.go
- session_delete.go
- session_query.go
- session_update.go
- tx.go
- user.go
- user_create.go
- user_delete.go
- user_query.go
- user_update.go
- userdevice.go
- userdevice_create.go
- userdevice_delete.go
- userdevice_query.go
- userdevice_update.go
- usermeta.go
- usermeta_create.go
- usermeta_delete.go
- usermeta_query.go
- usermeta_update.go
- useroauthprovider.go
- useroauthprovider_create.go
- useroauthprovider_delete.go
- useroauthprovider_query.go
- useroauthprovider_update.go