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 Tx
- type User
- func (u *User) QueryGroups() *UserGroupQuery
- func (u *User) QueryUserEmails() *UserEmailQuery
- func (u *User) QueryUserSecurityLogs() *UserSecurityLogQuery
- func (u *User) QueryUserSettings() *UserSettingQuery
- func (u *User) String() string
- func (u *User) Unwrap() *User
- func (u *User) Update() *UserUpdateOne
- 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 int) *UserDeleteOne
- func (c *UserClient) Get(ctx context.Context, id int) (*User, error)
- func (c *UserClient) GetX(ctx context.Context, id int) *User
- func (c *UserClient) Hooks() []Hook
- func (c *UserClient) Query() *UserQuery
- func (c *UserClient) QueryGroups(u *User) *UserGroupQuery
- func (c *UserClient) QueryUserEmails(u *User) *UserEmailQuery
- func (c *UserClient) QueryUserSecurityLogs(u *User) *UserSecurityLogQuery
- func (c *UserClient) QueryUserSettings(u *User) *UserSettingQuery
- func (c *UserClient) Update() *UserUpdate
- func (c *UserClient) UpdateOne(u *User) *UserUpdateOne
- func (c *UserClient) UpdateOneID(id int) *UserUpdateOne
- func (c *UserClient) Use(hooks ...Hook)
- type UserCreate
- func (uc *UserCreate) AddGroupIDs(ids ...int) *UserCreate
- func (uc *UserCreate) AddGroups(u ...*UserGroup) *UserCreate
- func (uc *UserCreate) AddUserEmailIDs(ids ...int) *UserCreate
- func (uc *UserCreate) AddUserEmails(u ...*UserEmail) *UserCreate
- func (uc *UserCreate) AddUserSecurityLogIDs(ids ...int) *UserCreate
- func (uc *UserCreate) AddUserSecurityLogs(u ...*UserSecurityLog) *UserCreate
- func (uc *UserCreate) AddUserSettingIDs(ids ...int) *UserCreate
- func (uc *UserCreate) AddUserSettings(u ...*UserSetting) *UserCreate
- func (uc *UserCreate) Mutation() *UserMutation
- func (uc *UserCreate) Save(ctx context.Context) (*User, error)
- func (uc *UserCreate) SaveX(ctx context.Context) *User
- func (uc *UserCreate) SetAvatarURL(s string) *UserCreate
- func (uc *UserCreate) SetCreateTime(t time.Time) *UserCreate
- func (uc *UserCreate) SetDeleteTime(t time.Time) *UserCreate
- func (uc *UserCreate) SetGender(u user.Gender) *UserCreate
- func (uc *UserCreate) SetID(i int) *UserCreate
- func (uc *UserCreate) SetNickname(s string) *UserCreate
- func (uc *UserCreate) SetNillableAvatarURL(s *string) *UserCreate
- func (uc *UserCreate) SetNillableCreateTime(t *time.Time) *UserCreate
- func (uc *UserCreate) SetNillableDeleteTime(t *time.Time) *UserCreate
- func (uc *UserCreate) SetNillableGender(u *user.Gender) *UserCreate
- func (uc *UserCreate) SetNillablePassword(s *string) *UserCreate
- func (uc *UserCreate) SetNillablePhone(s *string) *UserCreate
- func (uc *UserCreate) SetNillablePlan(u *user.Plan) *UserCreate
- func (uc *UserCreate) SetNillableSecondAuth(b *bool) *UserCreate
- func (uc *UserCreate) SetNillableSn(s *string) *UserCreate
- func (uc *UserCreate) SetNillableStatus(u *user.Status) *UserCreate
- func (uc *UserCreate) SetNillableUpdateTime(t *time.Time) *UserCreate
- func (uc *UserCreate) SetPassword(s string) *UserCreate
- func (uc *UserCreate) SetPhone(s string) *UserCreate
- func (uc *UserCreate) SetPlan(u user.Plan) *UserCreate
- func (uc *UserCreate) SetSecondAuth(b bool) *UserCreate
- func (uc *UserCreate) SetSn(s string) *UserCreate
- func (uc *UserCreate) SetStatus(u user.Status) *UserCreate
- func (uc *UserCreate) SetUpdateTime(t time.Time) *UserCreate
- type UserCreateBulk
- type UserDelete
- type UserDeleteOne
- type UserEdges
- type UserEmail
- type UserEmailClient
- func (c *UserEmailClient) Create() *UserEmailCreate
- func (c *UserEmailClient) CreateBulk(builders ...*UserEmailCreate) *UserEmailCreateBulk
- func (c *UserEmailClient) Delete() *UserEmailDelete
- func (c *UserEmailClient) DeleteOne(ue *UserEmail) *UserEmailDeleteOne
- func (c *UserEmailClient) DeleteOneID(id int) *UserEmailDeleteOne
- func (c *UserEmailClient) Get(ctx context.Context, id int) (*UserEmail, error)
- func (c *UserEmailClient) GetX(ctx context.Context, id int) *UserEmail
- func (c *UserEmailClient) Hooks() []Hook
- func (c *UserEmailClient) Query() *UserEmailQuery
- func (c *UserEmailClient) QueryEmailOwner(ue *UserEmail) *UserQuery
- func (c *UserEmailClient) Update() *UserEmailUpdate
- func (c *UserEmailClient) UpdateOne(ue *UserEmail) *UserEmailUpdateOne
- func (c *UserEmailClient) UpdateOneID(id int) *UserEmailUpdateOne
- func (c *UserEmailClient) Use(hooks ...Hook)
- type UserEmailCreate
- func (uec *UserEmailCreate) Mutation() *UserEmailMutation
- func (uec *UserEmailCreate) Save(ctx context.Context) (*UserEmail, error)
- func (uec *UserEmailCreate) SaveX(ctx context.Context) *UserEmail
- func (uec *UserEmailCreate) SetCreateTime(t time.Time) *UserEmailCreate
- func (uec *UserEmailCreate) SetEmail(s string) *UserEmailCreate
- func (uec *UserEmailCreate) SetEmailOwner(u *User) *UserEmailCreate
- func (uec *UserEmailCreate) SetEmailOwnerID(id int) *UserEmailCreate
- func (uec *UserEmailCreate) SetID(i int) *UserEmailCreate
- func (uec *UserEmailCreate) SetIsPrimary(b bool) *UserEmailCreate
- func (uec *UserEmailCreate) SetNillableCreateTime(t *time.Time) *UserEmailCreate
- func (uec *UserEmailCreate) SetNillableIsPrimary(b *bool) *UserEmailCreate
- func (uec *UserEmailCreate) SetNillableSn(s *string) *UserEmailCreate
- func (uec *UserEmailCreate) SetNillableUpdateTime(t *time.Time) *UserEmailCreate
- func (uec *UserEmailCreate) SetNillableVerifyTicket(s *string) *UserEmailCreate
- func (uec *UserEmailCreate) SetNillableVerifyTime(t *time.Time) *UserEmailCreate
- func (uec *UserEmailCreate) SetOwnerID(i int) *UserEmailCreate
- func (uec *UserEmailCreate) SetSn(s string) *UserEmailCreate
- func (uec *UserEmailCreate) SetUpdateTime(t time.Time) *UserEmailCreate
- func (uec *UserEmailCreate) SetVerifyTicket(s string) *UserEmailCreate
- func (uec *UserEmailCreate) SetVerifyTime(t time.Time) *UserEmailCreate
- type UserEmailCreateBulk
- type UserEmailDelete
- type UserEmailDeleteOne
- type UserEmailEdges
- type UserEmailGroupBy
- func (uegb *UserEmailGroupBy) Aggregate(fns ...AggregateFunc) *UserEmailGroupBy
- func (uegb *UserEmailGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (uegb *UserEmailGroupBy) BoolX(ctx context.Context) bool
- func (uegb *UserEmailGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (uegb *UserEmailGroupBy) BoolsX(ctx context.Context) []bool
- func (uegb *UserEmailGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (uegb *UserEmailGroupBy) Float64X(ctx context.Context) float64
- func (uegb *UserEmailGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (uegb *UserEmailGroupBy) Float64sX(ctx context.Context) []float64
- func (uegb *UserEmailGroupBy) Int(ctx context.Context) (_ int, err error)
- func (uegb *UserEmailGroupBy) IntX(ctx context.Context) int
- func (uegb *UserEmailGroupBy) Ints(ctx context.Context) ([]int, error)
- func (uegb *UserEmailGroupBy) IntsX(ctx context.Context) []int
- func (uegb *UserEmailGroupBy) Scan(ctx context.Context, v interface{}) error
- func (uegb *UserEmailGroupBy) ScanX(ctx context.Context, v interface{})
- func (uegb *UserEmailGroupBy) String(ctx context.Context) (_ string, err error)
- func (uegb *UserEmailGroupBy) StringX(ctx context.Context) string
- func (uegb *UserEmailGroupBy) Strings(ctx context.Context) ([]string, error)
- func (uegb *UserEmailGroupBy) StringsX(ctx context.Context) []string
- type UserEmailMutation
- func (m *UserEmailMutation) AddField(name string, value ent.Value) error
- func (m *UserEmailMutation) AddedEdges() []string
- func (m *UserEmailMutation) AddedField(name string) (ent.Value, bool)
- func (m *UserEmailMutation) AddedFields() []string
- func (m *UserEmailMutation) AddedIDs(name string) []ent.Value
- func (m *UserEmailMutation) ClearEdge(name string) error
- func (m *UserEmailMutation) ClearEmailOwner()
- func (m *UserEmailMutation) ClearField(name string) error
- func (m *UserEmailMutation) ClearVerifyTicket()
- func (m *UserEmailMutation) ClearVerifyTime()
- func (m *UserEmailMutation) ClearedEdges() []string
- func (m *UserEmailMutation) ClearedFields() []string
- func (m UserEmailMutation) Client() *Client
- func (m *UserEmailMutation) CreateTime() (r time.Time, exists bool)
- func (m *UserEmailMutation) EdgeCleared(name string) bool
- func (m *UserEmailMutation) Email() (r string, exists bool)
- func (m *UserEmailMutation) EmailOwnerCleared() bool
- func (m *UserEmailMutation) EmailOwnerID() (id int, exists bool)
- func (m *UserEmailMutation) EmailOwnerIDs() (ids []int)
- func (m *UserEmailMutation) Field(name string) (ent.Value, bool)
- func (m *UserEmailMutation) FieldCleared(name string) bool
- func (m *UserEmailMutation) Fields() []string
- func (m *UserEmailMutation) ID() (id int, exists bool)
- func (m *UserEmailMutation) IsPrimary() (r bool, exists bool)
- func (m *UserEmailMutation) OldCreateTime(ctx context.Context) (v time.Time, err error)
- func (m *UserEmailMutation) OldEmail(ctx context.Context) (v string, err error)
- func (m *UserEmailMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *UserEmailMutation) OldIsPrimary(ctx context.Context) (v bool, err error)
- func (m *UserEmailMutation) OldOwnerID(ctx context.Context) (v int, err error)
- func (m *UserEmailMutation) OldSn(ctx context.Context) (v string, err error)
- func (m *UserEmailMutation) OldUpdateTime(ctx context.Context) (v time.Time, err error)
- func (m *UserEmailMutation) OldVerifyTicket(ctx context.Context) (v *string, err error)
- func (m *UserEmailMutation) OldVerifyTime(ctx context.Context) (v *time.Time, err error)
- func (m *UserEmailMutation) Op() Op
- func (m *UserEmailMutation) OwnerID() (r int, exists bool)
- func (m *UserEmailMutation) RemovedEdges() []string
- func (m *UserEmailMutation) RemovedIDs(name string) []ent.Value
- func (m *UserEmailMutation) ResetCreateTime()
- func (m *UserEmailMutation) ResetEdge(name string) error
- func (m *UserEmailMutation) ResetEmail()
- func (m *UserEmailMutation) ResetEmailOwner()
- func (m *UserEmailMutation) ResetField(name string) error
- func (m *UserEmailMutation) ResetIsPrimary()
- func (m *UserEmailMutation) ResetOwnerID()
- func (m *UserEmailMutation) ResetSn()
- func (m *UserEmailMutation) ResetUpdateTime()
- func (m *UserEmailMutation) ResetVerifyTicket()
- func (m *UserEmailMutation) ResetVerifyTime()
- func (m *UserEmailMutation) SetCreateTime(t time.Time)
- func (m *UserEmailMutation) SetEmail(s string)
- func (m *UserEmailMutation) SetEmailOwnerID(id int)
- func (m *UserEmailMutation) SetField(name string, value ent.Value) error
- func (m *UserEmailMutation) SetID(id int)
- func (m *UserEmailMutation) SetIsPrimary(b bool)
- func (m *UserEmailMutation) SetOwnerID(i int)
- func (m *UserEmailMutation) SetSn(s string)
- func (m *UserEmailMutation) SetUpdateTime(t time.Time)
- func (m *UserEmailMutation) SetVerifyTicket(s string)
- func (m *UserEmailMutation) SetVerifyTime(t time.Time)
- func (m *UserEmailMutation) Sn() (r string, exists bool)
- func (m UserEmailMutation) Tx() (*Tx, error)
- func (m *UserEmailMutation) Type() string
- func (m *UserEmailMutation) UpdateTime() (r time.Time, exists bool)
- func (m *UserEmailMutation) VerifyTicket() (r string, exists bool)
- func (m *UserEmailMutation) VerifyTicketCleared() bool
- func (m *UserEmailMutation) VerifyTime() (r time.Time, exists bool)
- func (m *UserEmailMutation) VerifyTimeCleared() bool
- type UserEmailQuery
- func (ueq *UserEmailQuery) All(ctx context.Context) ([]*UserEmail, error)
- func (ueq *UserEmailQuery) AllX(ctx context.Context) []*UserEmail
- func (ueq *UserEmailQuery) Clone() *UserEmailQuery
- func (ueq *UserEmailQuery) Count(ctx context.Context) (int, error)
- func (ueq *UserEmailQuery) CountX(ctx context.Context) int
- func (ueq *UserEmailQuery) Exist(ctx context.Context) (bool, error)
- func (ueq *UserEmailQuery) ExistX(ctx context.Context) bool
- func (ueq *UserEmailQuery) First(ctx context.Context) (*UserEmail, error)
- func (ueq *UserEmailQuery) FirstID(ctx context.Context) (id int, err error)
- func (ueq *UserEmailQuery) FirstIDX(ctx context.Context) int
- func (ueq *UserEmailQuery) FirstX(ctx context.Context) *UserEmail
- func (ueq *UserEmailQuery) GroupBy(field string, fields ...string) *UserEmailGroupBy
- func (ueq *UserEmailQuery) IDs(ctx context.Context) ([]int, error)
- func (ueq *UserEmailQuery) IDsX(ctx context.Context) []int
- func (ueq *UserEmailQuery) Limit(limit int) *UserEmailQuery
- func (ueq *UserEmailQuery) Offset(offset int) *UserEmailQuery
- func (ueq *UserEmailQuery) Only(ctx context.Context) (*UserEmail, error)
- func (ueq *UserEmailQuery) OnlyID(ctx context.Context) (id int, err error)
- func (ueq *UserEmailQuery) OnlyIDX(ctx context.Context) int
- func (ueq *UserEmailQuery) OnlyX(ctx context.Context) *UserEmail
- func (ueq *UserEmailQuery) Order(o ...OrderFunc) *UserEmailQuery
- func (ueq *UserEmailQuery) QueryEmailOwner() *UserQuery
- func (ueq *UserEmailQuery) Select(field string, fields ...string) *UserEmailSelect
- func (ueq *UserEmailQuery) Unique(unique bool) *UserEmailQuery
- func (ueq *UserEmailQuery) Where(ps ...predicate.UserEmail) *UserEmailQuery
- func (ueq *UserEmailQuery) WithEmailOwner(opts ...func(*UserQuery)) *UserEmailQuery
- type UserEmailSelect
- func (ues *UserEmailSelect) Bool(ctx context.Context) (_ bool, err error)
- func (ues *UserEmailSelect) BoolX(ctx context.Context) bool
- func (ues *UserEmailSelect) Bools(ctx context.Context) ([]bool, error)
- func (ues *UserEmailSelect) BoolsX(ctx context.Context) []bool
- func (ues *UserEmailSelect) Float64(ctx context.Context) (_ float64, err error)
- func (ues *UserEmailSelect) Float64X(ctx context.Context) float64
- func (ues *UserEmailSelect) Float64s(ctx context.Context) ([]float64, error)
- func (ues *UserEmailSelect) Float64sX(ctx context.Context) []float64
- func (ues *UserEmailSelect) Int(ctx context.Context) (_ int, err error)
- func (ues *UserEmailSelect) IntX(ctx context.Context) int
- func (ues *UserEmailSelect) Ints(ctx context.Context) ([]int, error)
- func (ues *UserEmailSelect) IntsX(ctx context.Context) []int
- func (ues *UserEmailSelect) Scan(ctx context.Context, v interface{}) error
- func (ues *UserEmailSelect) ScanX(ctx context.Context, v interface{})
- func (ues *UserEmailSelect) String(ctx context.Context) (_ string, err error)
- func (ues *UserEmailSelect) StringX(ctx context.Context) string
- func (ues *UserEmailSelect) Strings(ctx context.Context) ([]string, error)
- func (ues *UserEmailSelect) StringsX(ctx context.Context) []string
- type UserEmailUpdate
- func (ueu *UserEmailUpdate) ClearEmailOwner() *UserEmailUpdate
- func (ueu *UserEmailUpdate) ClearVerifyTicket() *UserEmailUpdate
- func (ueu *UserEmailUpdate) ClearVerifyTime() *UserEmailUpdate
- func (ueu *UserEmailUpdate) Exec(ctx context.Context) error
- func (ueu *UserEmailUpdate) ExecX(ctx context.Context)
- func (ueu *UserEmailUpdate) Mutation() *UserEmailMutation
- func (ueu *UserEmailUpdate) Save(ctx context.Context) (int, error)
- func (ueu *UserEmailUpdate) SaveX(ctx context.Context) int
- func (ueu *UserEmailUpdate) SetEmail(s string) *UserEmailUpdate
- func (ueu *UserEmailUpdate) SetEmailOwner(u *User) *UserEmailUpdate
- func (ueu *UserEmailUpdate) SetEmailOwnerID(id int) *UserEmailUpdate
- func (ueu *UserEmailUpdate) SetIsPrimary(b bool) *UserEmailUpdate
- func (ueu *UserEmailUpdate) SetNillableIsPrimary(b *bool) *UserEmailUpdate
- func (ueu *UserEmailUpdate) SetNillableVerifyTicket(s *string) *UserEmailUpdate
- func (ueu *UserEmailUpdate) SetNillableVerifyTime(t *time.Time) *UserEmailUpdate
- func (ueu *UserEmailUpdate) SetOwnerID(i int) *UserEmailUpdate
- func (ueu *UserEmailUpdate) SetUpdateTime(t time.Time) *UserEmailUpdate
- func (ueu *UserEmailUpdate) SetVerifyTicket(s string) *UserEmailUpdate
- func (ueu *UserEmailUpdate) SetVerifyTime(t time.Time) *UserEmailUpdate
- func (ueu *UserEmailUpdate) Where(ps ...predicate.UserEmail) *UserEmailUpdate
- type UserEmailUpdateOne
- func (ueuo *UserEmailUpdateOne) ClearEmailOwner() *UserEmailUpdateOne
- func (ueuo *UserEmailUpdateOne) ClearVerifyTicket() *UserEmailUpdateOne
- func (ueuo *UserEmailUpdateOne) ClearVerifyTime() *UserEmailUpdateOne
- func (ueuo *UserEmailUpdateOne) Exec(ctx context.Context) error
- func (ueuo *UserEmailUpdateOne) ExecX(ctx context.Context)
- func (ueuo *UserEmailUpdateOne) Mutation() *UserEmailMutation
- func (ueuo *UserEmailUpdateOne) Save(ctx context.Context) (*UserEmail, error)
- func (ueuo *UserEmailUpdateOne) SaveX(ctx context.Context) *UserEmail
- func (ueuo *UserEmailUpdateOne) Select(field string, fields ...string) *UserEmailUpdateOne
- func (ueuo *UserEmailUpdateOne) SetEmail(s string) *UserEmailUpdateOne
- func (ueuo *UserEmailUpdateOne) SetEmailOwner(u *User) *UserEmailUpdateOne
- func (ueuo *UserEmailUpdateOne) SetEmailOwnerID(id int) *UserEmailUpdateOne
- func (ueuo *UserEmailUpdateOne) SetIsPrimary(b bool) *UserEmailUpdateOne
- func (ueuo *UserEmailUpdateOne) SetNillableIsPrimary(b *bool) *UserEmailUpdateOne
- func (ueuo *UserEmailUpdateOne) SetNillableVerifyTicket(s *string) *UserEmailUpdateOne
- func (ueuo *UserEmailUpdateOne) SetNillableVerifyTime(t *time.Time) *UserEmailUpdateOne
- func (ueuo *UserEmailUpdateOne) SetOwnerID(i int) *UserEmailUpdateOne
- func (ueuo *UserEmailUpdateOne) SetUpdateTime(t time.Time) *UserEmailUpdateOne
- func (ueuo *UserEmailUpdateOne) SetVerifyTicket(s string) *UserEmailUpdateOne
- func (ueuo *UserEmailUpdateOne) SetVerifyTime(t time.Time) *UserEmailUpdateOne
- type UserEmails
- type UserGroup
- 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 UserGroupClient
- func (c *UserGroupClient) Create() *UserGroupCreate
- func (c *UserGroupClient) CreateBulk(builders ...*UserGroupCreate) *UserGroupCreateBulk
- func (c *UserGroupClient) Delete() *UserGroupDelete
- func (c *UserGroupClient) DeleteOne(ug *UserGroup) *UserGroupDeleteOne
- func (c *UserGroupClient) DeleteOneID(id int) *UserGroupDeleteOne
- func (c *UserGroupClient) Get(ctx context.Context, id int) (*UserGroup, error)
- func (c *UserGroupClient) GetX(ctx context.Context, id int) *UserGroup
- func (c *UserGroupClient) Hooks() []Hook
- func (c *UserGroupClient) Query() *UserGroupQuery
- func (c *UserGroupClient) QueryUsers(ug *UserGroup) *UserQuery
- func (c *UserGroupClient) Update() *UserGroupUpdate
- func (c *UserGroupClient) UpdateOne(ug *UserGroup) *UserGroupUpdateOne
- func (c *UserGroupClient) UpdateOneID(id int) *UserGroupUpdateOne
- func (c *UserGroupClient) Use(hooks ...Hook)
- type UserGroupCreate
- func (ugc *UserGroupCreate) AddUserIDs(ids ...int) *UserGroupCreate
- func (ugc *UserGroupCreate) AddUsers(u ...*User) *UserGroupCreate
- func (ugc *UserGroupCreate) Mutation() *UserGroupMutation
- func (ugc *UserGroupCreate) Save(ctx context.Context) (*UserGroup, error)
- func (ugc *UserGroupCreate) SaveX(ctx context.Context) *UserGroup
- func (ugc *UserGroupCreate) SetAddress(s string) *UserGroupCreate
- func (ugc *UserGroupCreate) SetAvatarURL(s string) *UserGroupCreate
- func (ugc *UserGroupCreate) SetCreateTime(t time.Time) *UserGroupCreate
- func (ugc *UserGroupCreate) SetHomepage(s string) *UserGroupCreate
- func (ugc *UserGroupCreate) SetID(i int) *UserGroupCreate
- func (ugc *UserGroupCreate) SetName(s string) *UserGroupCreate
- func (ugc *UserGroupCreate) SetNillableAddress(s *string) *UserGroupCreate
- func (ugc *UserGroupCreate) SetNillableAvatarURL(s *string) *UserGroupCreate
- func (ugc *UserGroupCreate) SetNillableCreateTime(t *time.Time) *UserGroupCreate
- func (ugc *UserGroupCreate) SetNillableHomepage(s *string) *UserGroupCreate
- func (ugc *UserGroupCreate) SetNillableSn(s *string) *UserGroupCreate
- func (ugc *UserGroupCreate) SetNillableUpdateTime(t *time.Time) *UserGroupCreate
- func (ugc *UserGroupCreate) SetSn(s string) *UserGroupCreate
- func (ugc *UserGroupCreate) SetUpdateTime(t time.Time) *UserGroupCreate
- type UserGroupCreateBulk
- type UserGroupDelete
- type UserGroupDeleteOne
- type UserGroupEdges
- type UserGroupGroupBy
- func (uggb *UserGroupGroupBy) Aggregate(fns ...AggregateFunc) *UserGroupGroupBy
- func (uggb *UserGroupGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (uggb *UserGroupGroupBy) BoolX(ctx context.Context) bool
- func (uggb *UserGroupGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (uggb *UserGroupGroupBy) BoolsX(ctx context.Context) []bool
- func (uggb *UserGroupGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (uggb *UserGroupGroupBy) Float64X(ctx context.Context) float64
- func (uggb *UserGroupGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (uggb *UserGroupGroupBy) Float64sX(ctx context.Context) []float64
- func (uggb *UserGroupGroupBy) Int(ctx context.Context) (_ int, err error)
- func (uggb *UserGroupGroupBy) IntX(ctx context.Context) int
- func (uggb *UserGroupGroupBy) Ints(ctx context.Context) ([]int, error)
- func (uggb *UserGroupGroupBy) IntsX(ctx context.Context) []int
- func (uggb *UserGroupGroupBy) Scan(ctx context.Context, v interface{}) error
- func (uggb *UserGroupGroupBy) ScanX(ctx context.Context, v interface{})
- func (uggb *UserGroupGroupBy) String(ctx context.Context) (_ string, err error)
- func (uggb *UserGroupGroupBy) StringX(ctx context.Context) string
- func (uggb *UserGroupGroupBy) Strings(ctx context.Context) ([]string, error)
- func (uggb *UserGroupGroupBy) StringsX(ctx context.Context) []string
- type UserGroupMutation
- func (m *UserGroupMutation) AddField(name string, value ent.Value) error
- func (m *UserGroupMutation) AddUserIDs(ids ...int)
- func (m *UserGroupMutation) AddedEdges() []string
- func (m *UserGroupMutation) AddedField(name string) (ent.Value, bool)
- func (m *UserGroupMutation) AddedFields() []string
- func (m *UserGroupMutation) AddedIDs(name string) []ent.Value
- func (m *UserGroupMutation) Address() (r string, exists bool)
- func (m *UserGroupMutation) AddressCleared() bool
- func (m *UserGroupMutation) AvatarURL() (r string, exists bool)
- func (m *UserGroupMutation) AvatarURLCleared() bool
- func (m *UserGroupMutation) ClearAddress()
- func (m *UserGroupMutation) ClearAvatarURL()
- func (m *UserGroupMutation) ClearEdge(name string) error
- func (m *UserGroupMutation) ClearField(name string) error
- func (m *UserGroupMutation) ClearHomepage()
- func (m *UserGroupMutation) ClearUsers()
- func (m *UserGroupMutation) ClearedEdges() []string
- func (m *UserGroupMutation) ClearedFields() []string
- func (m UserGroupMutation) Client() *Client
- func (m *UserGroupMutation) CreateTime() (r time.Time, exists bool)
- func (m *UserGroupMutation) EdgeCleared(name string) bool
- func (m *UserGroupMutation) Field(name string) (ent.Value, bool)
- func (m *UserGroupMutation) FieldCleared(name string) bool
- func (m *UserGroupMutation) Fields() []string
- func (m *UserGroupMutation) Homepage() (r string, exists bool)
- func (m *UserGroupMutation) HomepageCleared() bool
- func (m *UserGroupMutation) ID() (id int, exists bool)
- func (m *UserGroupMutation) Name() (r string, exists bool)
- func (m *UserGroupMutation) OldAddress(ctx context.Context) (v *string, err error)
- func (m *UserGroupMutation) OldAvatarURL(ctx context.Context) (v *string, err error)
- func (m *UserGroupMutation) OldCreateTime(ctx context.Context) (v time.Time, err error)
- func (m *UserGroupMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *UserGroupMutation) OldHomepage(ctx context.Context) (v *string, err error)
- func (m *UserGroupMutation) OldName(ctx context.Context) (v string, err error)
- func (m *UserGroupMutation) OldSn(ctx context.Context) (v string, err error)
- func (m *UserGroupMutation) OldUpdateTime(ctx context.Context) (v time.Time, err error)
- func (m *UserGroupMutation) Op() Op
- func (m *UserGroupMutation) RemoveUserIDs(ids ...int)
- func (m *UserGroupMutation) RemovedEdges() []string
- func (m *UserGroupMutation) RemovedIDs(name string) []ent.Value
- func (m *UserGroupMutation) RemovedUsersIDs() (ids []int)
- func (m *UserGroupMutation) ResetAddress()
- func (m *UserGroupMutation) ResetAvatarURL()
- func (m *UserGroupMutation) ResetCreateTime()
- func (m *UserGroupMutation) ResetEdge(name string) error
- func (m *UserGroupMutation) ResetField(name string) error
- func (m *UserGroupMutation) ResetHomepage()
- func (m *UserGroupMutation) ResetName()
- func (m *UserGroupMutation) ResetSn()
- func (m *UserGroupMutation) ResetUpdateTime()
- func (m *UserGroupMutation) ResetUsers()
- func (m *UserGroupMutation) SetAddress(s string)
- func (m *UserGroupMutation) SetAvatarURL(s string)
- func (m *UserGroupMutation) SetCreateTime(t time.Time)
- func (m *UserGroupMutation) SetField(name string, value ent.Value) error
- func (m *UserGroupMutation) SetHomepage(s string)
- func (m *UserGroupMutation) SetID(id int)
- func (m *UserGroupMutation) SetName(s string)
- func (m *UserGroupMutation) SetSn(s string)
- func (m *UserGroupMutation) SetUpdateTime(t time.Time)
- func (m *UserGroupMutation) Sn() (r string, exists bool)
- func (m UserGroupMutation) Tx() (*Tx, error)
- func (m *UserGroupMutation) Type() string
- func (m *UserGroupMutation) UpdateTime() (r time.Time, exists bool)
- func (m *UserGroupMutation) UsersCleared() bool
- func (m *UserGroupMutation) UsersIDs() (ids []int)
- type UserGroupQuery
- func (ugq *UserGroupQuery) All(ctx context.Context) ([]*UserGroup, error)
- func (ugq *UserGroupQuery) AllX(ctx context.Context) []*UserGroup
- func (ugq *UserGroupQuery) Clone() *UserGroupQuery
- func (ugq *UserGroupQuery) Count(ctx context.Context) (int, error)
- func (ugq *UserGroupQuery) CountX(ctx context.Context) int
- func (ugq *UserGroupQuery) Exist(ctx context.Context) (bool, error)
- func (ugq *UserGroupQuery) ExistX(ctx context.Context) bool
- func (ugq *UserGroupQuery) First(ctx context.Context) (*UserGroup, error)
- func (ugq *UserGroupQuery) FirstID(ctx context.Context) (id int, err error)
- func (ugq *UserGroupQuery) FirstIDX(ctx context.Context) int
- func (ugq *UserGroupQuery) FirstX(ctx context.Context) *UserGroup
- func (ugq *UserGroupQuery) GroupBy(field string, fields ...string) *UserGroupGroupBy
- func (ugq *UserGroupQuery) IDs(ctx context.Context) ([]int, error)
- func (ugq *UserGroupQuery) IDsX(ctx context.Context) []int
- func (ugq *UserGroupQuery) Limit(limit int) *UserGroupQuery
- func (ugq *UserGroupQuery) Offset(offset int) *UserGroupQuery
- func (ugq *UserGroupQuery) Only(ctx context.Context) (*UserGroup, error)
- func (ugq *UserGroupQuery) OnlyID(ctx context.Context) (id int, err error)
- func (ugq *UserGroupQuery) OnlyIDX(ctx context.Context) int
- func (ugq *UserGroupQuery) OnlyX(ctx context.Context) *UserGroup
- func (ugq *UserGroupQuery) Order(o ...OrderFunc) *UserGroupQuery
- func (ugq *UserGroupQuery) QueryUsers() *UserQuery
- func (ugq *UserGroupQuery) Select(field string, fields ...string) *UserGroupSelect
- func (ugq *UserGroupQuery) Unique(unique bool) *UserGroupQuery
- func (ugq *UserGroupQuery) Where(ps ...predicate.UserGroup) *UserGroupQuery
- func (ugq *UserGroupQuery) WithUsers(opts ...func(*UserQuery)) *UserGroupQuery
- type UserGroupSelect
- func (ugs *UserGroupSelect) Bool(ctx context.Context) (_ bool, err error)
- func (ugs *UserGroupSelect) BoolX(ctx context.Context) bool
- func (ugs *UserGroupSelect) Bools(ctx context.Context) ([]bool, error)
- func (ugs *UserGroupSelect) BoolsX(ctx context.Context) []bool
- func (ugs *UserGroupSelect) Float64(ctx context.Context) (_ float64, err error)
- func (ugs *UserGroupSelect) Float64X(ctx context.Context) float64
- func (ugs *UserGroupSelect) Float64s(ctx context.Context) ([]float64, error)
- func (ugs *UserGroupSelect) Float64sX(ctx context.Context) []float64
- func (ugs *UserGroupSelect) Int(ctx context.Context) (_ int, err error)
- func (ugs *UserGroupSelect) IntX(ctx context.Context) int
- func (ugs *UserGroupSelect) Ints(ctx context.Context) ([]int, error)
- func (ugs *UserGroupSelect) IntsX(ctx context.Context) []int
- func (ugs *UserGroupSelect) Scan(ctx context.Context, v interface{}) error
- func (ugs *UserGroupSelect) ScanX(ctx context.Context, v interface{})
- func (ugs *UserGroupSelect) String(ctx context.Context) (_ string, err error)
- func (ugs *UserGroupSelect) StringX(ctx context.Context) string
- func (ugs *UserGroupSelect) Strings(ctx context.Context) ([]string, error)
- func (ugs *UserGroupSelect) StringsX(ctx context.Context) []string
- type UserGroupUpdate
- func (ugu *UserGroupUpdate) AddUserIDs(ids ...int) *UserGroupUpdate
- func (ugu *UserGroupUpdate) AddUsers(u ...*User) *UserGroupUpdate
- func (ugu *UserGroupUpdate) ClearAddress() *UserGroupUpdate
- func (ugu *UserGroupUpdate) ClearAvatarURL() *UserGroupUpdate
- func (ugu *UserGroupUpdate) ClearHomepage() *UserGroupUpdate
- func (ugu *UserGroupUpdate) ClearUsers() *UserGroupUpdate
- func (ugu *UserGroupUpdate) Exec(ctx context.Context) error
- func (ugu *UserGroupUpdate) ExecX(ctx context.Context)
- func (ugu *UserGroupUpdate) Mutation() *UserGroupMutation
- func (ugu *UserGroupUpdate) RemoveUserIDs(ids ...int) *UserGroupUpdate
- func (ugu *UserGroupUpdate) RemoveUsers(u ...*User) *UserGroupUpdate
- func (ugu *UserGroupUpdate) Save(ctx context.Context) (int, error)
- func (ugu *UserGroupUpdate) SaveX(ctx context.Context) int
- func (ugu *UserGroupUpdate) SetAddress(s string) *UserGroupUpdate
- func (ugu *UserGroupUpdate) SetAvatarURL(s string) *UserGroupUpdate
- func (ugu *UserGroupUpdate) SetHomepage(s string) *UserGroupUpdate
- func (ugu *UserGroupUpdate) SetName(s string) *UserGroupUpdate
- func (ugu *UserGroupUpdate) SetNillableAddress(s *string) *UserGroupUpdate
- func (ugu *UserGroupUpdate) SetNillableAvatarURL(s *string) *UserGroupUpdate
- func (ugu *UserGroupUpdate) SetNillableHomepage(s *string) *UserGroupUpdate
- func (ugu *UserGroupUpdate) SetUpdateTime(t time.Time) *UserGroupUpdate
- func (ugu *UserGroupUpdate) Where(ps ...predicate.UserGroup) *UserGroupUpdate
- type UserGroupUpdateOne
- func (uguo *UserGroupUpdateOne) AddUserIDs(ids ...int) *UserGroupUpdateOne
- func (uguo *UserGroupUpdateOne) AddUsers(u ...*User) *UserGroupUpdateOne
- func (uguo *UserGroupUpdateOne) ClearAddress() *UserGroupUpdateOne
- func (uguo *UserGroupUpdateOne) ClearAvatarURL() *UserGroupUpdateOne
- func (uguo *UserGroupUpdateOne) ClearHomepage() *UserGroupUpdateOne
- func (uguo *UserGroupUpdateOne) ClearUsers() *UserGroupUpdateOne
- func (uguo *UserGroupUpdateOne) Exec(ctx context.Context) error
- func (uguo *UserGroupUpdateOne) ExecX(ctx context.Context)
- func (uguo *UserGroupUpdateOne) Mutation() *UserGroupMutation
- func (uguo *UserGroupUpdateOne) RemoveUserIDs(ids ...int) *UserGroupUpdateOne
- func (uguo *UserGroupUpdateOne) RemoveUsers(u ...*User) *UserGroupUpdateOne
- func (uguo *UserGroupUpdateOne) Save(ctx context.Context) (*UserGroup, error)
- func (uguo *UserGroupUpdateOne) SaveX(ctx context.Context) *UserGroup
- func (uguo *UserGroupUpdateOne) Select(field string, fields ...string) *UserGroupUpdateOne
- func (uguo *UserGroupUpdateOne) SetAddress(s string) *UserGroupUpdateOne
- func (uguo *UserGroupUpdateOne) SetAvatarURL(s string) *UserGroupUpdateOne
- func (uguo *UserGroupUpdateOne) SetHomepage(s string) *UserGroupUpdateOne
- func (uguo *UserGroupUpdateOne) SetName(s string) *UserGroupUpdateOne
- func (uguo *UserGroupUpdateOne) SetNillableAddress(s *string) *UserGroupUpdateOne
- func (uguo *UserGroupUpdateOne) SetNillableAvatarURL(s *string) *UserGroupUpdateOne
- func (uguo *UserGroupUpdateOne) SetNillableHomepage(s *string) *UserGroupUpdateOne
- func (uguo *UserGroupUpdateOne) SetUpdateTime(t time.Time) *UserGroupUpdateOne
- type UserGroups
- type UserMutation
- func (m *UserMutation) AddField(name string, value ent.Value) error
- func (m *UserMutation) AddGroupIDs(ids ...int)
- func (m *UserMutation) AddUserEmailIDs(ids ...int)
- func (m *UserMutation) AddUserSecurityLogIDs(ids ...int)
- func (m *UserMutation) AddUserSettingIDs(ids ...int)
- 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) AvatarURL() (r string, exists bool)
- func (m *UserMutation) AvatarURLCleared() bool
- func (m *UserMutation) ClearAvatarURL()
- func (m *UserMutation) ClearDeleteTime()
- func (m *UserMutation) ClearEdge(name string) error
- func (m *UserMutation) ClearField(name string) error
- func (m *UserMutation) ClearGroups()
- func (m *UserMutation) ClearPassword()
- func (m *UserMutation) ClearPhone()
- func (m *UserMutation) ClearPlan()
- func (m *UserMutation) ClearStatus()
- func (m *UserMutation) ClearUserEmails()
- func (m *UserMutation) ClearUserSecurityLogs()
- func (m *UserMutation) ClearUserSettings()
- func (m *UserMutation) ClearedEdges() []string
- func (m *UserMutation) ClearedFields() []string
- func (m UserMutation) Client() *Client
- func (m *UserMutation) CreateTime() (r time.Time, exists bool)
- func (m *UserMutation) DeleteTime() (r time.Time, exists bool)
- func (m *UserMutation) DeleteTimeCleared() bool
- func (m *UserMutation) EdgeCleared(name string) bool
- func (m *UserMutation) Field(name string) (ent.Value, bool)
- func (m *UserMutation) FieldCleared(name string) bool
- func (m *UserMutation) Fields() []string
- func (m *UserMutation) Gender() (r user.Gender, exists bool)
- func (m *UserMutation) GroupsCleared() bool
- func (m *UserMutation) GroupsIDs() (ids []int)
- func (m *UserMutation) ID() (id int, exists bool)
- func (m *UserMutation) Nickname() (r string, exists bool)
- func (m *UserMutation) OldAvatarURL(ctx context.Context) (v *string, err error)
- func (m *UserMutation) OldCreateTime(ctx context.Context) (v time.Time, err error)
- func (m *UserMutation) OldDeleteTime(ctx context.Context) (v *time.Time, err error)
- func (m *UserMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *UserMutation) OldGender(ctx context.Context) (v user.Gender, err error)
- func (m *UserMutation) OldNickname(ctx context.Context) (v string, err error)
- func (m *UserMutation) OldPassword(ctx context.Context) (v string, err error)
- func (m *UserMutation) OldPhone(ctx context.Context) (v *string, err error)
- func (m *UserMutation) OldPlan(ctx context.Context) (v *user.Plan, err error)
- func (m *UserMutation) OldSecondAuth(ctx context.Context) (v bool, err error)
- func (m *UserMutation) OldSn(ctx context.Context) (v string, err error)
- func (m *UserMutation) OldStatus(ctx context.Context) (v *user.Status, err error)
- func (m *UserMutation) OldUpdateTime(ctx context.Context) (v time.Time, err error)
- func (m *UserMutation) Op() Op
- func (m *UserMutation) Password() (r string, exists bool)
- func (m *UserMutation) PasswordCleared() bool
- func (m *UserMutation) Phone() (r string, exists bool)
- func (m *UserMutation) PhoneCleared() bool
- func (m *UserMutation) Plan() (r user.Plan, exists bool)
- func (m *UserMutation) PlanCleared() bool
- func (m *UserMutation) RemoveGroupIDs(ids ...int)
- func (m *UserMutation) RemoveUserEmailIDs(ids ...int)
- func (m *UserMutation) RemoveUserSecurityLogIDs(ids ...int)
- func (m *UserMutation) RemoveUserSettingIDs(ids ...int)
- func (m *UserMutation) RemovedEdges() []string
- func (m *UserMutation) RemovedGroupsIDs() (ids []int)
- func (m *UserMutation) RemovedIDs(name string) []ent.Value
- func (m *UserMutation) RemovedUserEmailsIDs() (ids []int)
- func (m *UserMutation) RemovedUserSecurityLogsIDs() (ids []int)
- func (m *UserMutation) RemovedUserSettingsIDs() (ids []int)
- func (m *UserMutation) ResetAvatarURL()
- func (m *UserMutation) ResetCreateTime()
- func (m *UserMutation) ResetDeleteTime()
- func (m *UserMutation) ResetEdge(name string) error
- func (m *UserMutation) ResetField(name string) error
- func (m *UserMutation) ResetGender()
- func (m *UserMutation) ResetGroups()
- func (m *UserMutation) ResetNickname()
- func (m *UserMutation) ResetPassword()
- func (m *UserMutation) ResetPhone()
- func (m *UserMutation) ResetPlan()
- func (m *UserMutation) ResetSecondAuth()
- func (m *UserMutation) ResetSn()
- func (m *UserMutation) ResetStatus()
- func (m *UserMutation) ResetUpdateTime()
- func (m *UserMutation) ResetUserEmails()
- func (m *UserMutation) ResetUserSecurityLogs()
- func (m *UserMutation) ResetUserSettings()
- func (m *UserMutation) SecondAuth() (r bool, exists bool)
- func (m *UserMutation) SetAvatarURL(s string)
- func (m *UserMutation) SetCreateTime(t time.Time)
- func (m *UserMutation) SetDeleteTime(t time.Time)
- func (m *UserMutation) SetField(name string, value ent.Value) error
- func (m *UserMutation) SetGender(u user.Gender)
- func (m *UserMutation) SetID(id int)
- func (m *UserMutation) SetNickname(s string)
- func (m *UserMutation) SetPassword(s string)
- func (m *UserMutation) SetPhone(s string)
- func (m *UserMutation) SetPlan(u user.Plan)
- func (m *UserMutation) SetSecondAuth(b bool)
- func (m *UserMutation) SetSn(s string)
- func (m *UserMutation) SetStatus(u user.Status)
- func (m *UserMutation) SetUpdateTime(t time.Time)
- func (m *UserMutation) Sn() (r string, exists bool)
- func (m *UserMutation) Status() (r user.Status, exists bool)
- func (m *UserMutation) StatusCleared() bool
- func (m UserMutation) Tx() (*Tx, error)
- func (m *UserMutation) Type() string
- func (m *UserMutation) UpdateTime() (r time.Time, exists bool)
- func (m *UserMutation) UserEmailsCleared() bool
- func (m *UserMutation) UserEmailsIDs() (ids []int)
- func (m *UserMutation) UserSecurityLogsCleared() bool
- func (m *UserMutation) UserSecurityLogsIDs() (ids []int)
- func (m *UserMutation) UserSettingsCleared() bool
- func (m *UserMutation) UserSettingsIDs() (ids []int)
- 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 int, err error)
- func (uq *UserQuery) FirstIDX(ctx context.Context) int
- func (uq *UserQuery) FirstX(ctx context.Context) *User
- func (uq *UserQuery) GroupBy(field string, fields ...string) *UserGroupBy
- func (uq *UserQuery) IDs(ctx context.Context) ([]int, error)
- func (uq *UserQuery) IDsX(ctx context.Context) []int
- 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 int, err error)
- func (uq *UserQuery) OnlyIDX(ctx context.Context) int
- func (uq *UserQuery) OnlyX(ctx context.Context) *User
- func (uq *UserQuery) Order(o ...OrderFunc) *UserQuery
- func (uq *UserQuery) QueryGroups() *UserGroupQuery
- func (uq *UserQuery) QueryUserEmails() *UserEmailQuery
- func (uq *UserQuery) QueryUserSecurityLogs() *UserSecurityLogQuery
- func (uq *UserQuery) QueryUserSettings() *UserSettingQuery
- func (uq *UserQuery) Select(field string, fields ...string) *UserSelect
- func (uq *UserQuery) Unique(unique bool) *UserQuery
- func (uq *UserQuery) Where(ps ...predicate.User) *UserQuery
- func (uq *UserQuery) WithGroups(opts ...func(*UserGroupQuery)) *UserQuery
- func (uq *UserQuery) WithUserEmails(opts ...func(*UserEmailQuery)) *UserQuery
- func (uq *UserQuery) WithUserSecurityLogs(opts ...func(*UserSecurityLogQuery)) *UserQuery
- func (uq *UserQuery) WithUserSettings(opts ...func(*UserSettingQuery)) *UserQuery
- type UserSecurityLog
- type UserSecurityLogClient
- func (c *UserSecurityLogClient) Create() *UserSecurityLogCreate
- func (c *UserSecurityLogClient) CreateBulk(builders ...*UserSecurityLogCreate) *UserSecurityLogCreateBulk
- func (c *UserSecurityLogClient) Delete() *UserSecurityLogDelete
- func (c *UserSecurityLogClient) DeleteOne(usl *UserSecurityLog) *UserSecurityLogDeleteOne
- func (c *UserSecurityLogClient) DeleteOneID(id int) *UserSecurityLogDeleteOne
- func (c *UserSecurityLogClient) Get(ctx context.Context, id int) (*UserSecurityLog, error)
- func (c *UserSecurityLogClient) GetX(ctx context.Context, id int) *UserSecurityLog
- func (c *UserSecurityLogClient) Hooks() []Hook
- func (c *UserSecurityLogClient) Query() *UserSecurityLogQuery
- func (c *UserSecurityLogClient) QuerySecurityLogsOwner(usl *UserSecurityLog) *UserQuery
- func (c *UserSecurityLogClient) Update() *UserSecurityLogUpdate
- func (c *UserSecurityLogClient) UpdateOne(usl *UserSecurityLog) *UserSecurityLogUpdateOne
- func (c *UserSecurityLogClient) UpdateOneID(id int) *UserSecurityLogUpdateOne
- func (c *UserSecurityLogClient) Use(hooks ...Hook)
- type UserSecurityLogCreate
- func (uslc *UserSecurityLogCreate) Mutation() *UserSecurityLogMutation
- func (uslc *UserSecurityLogCreate) Save(ctx context.Context) (*UserSecurityLog, error)
- func (uslc *UserSecurityLogCreate) SaveX(ctx context.Context) *UserSecurityLog
- func (uslc *UserSecurityLogCreate) SetAction(u usersecuritylog.Action) *UserSecurityLogCreate
- func (uslc *UserSecurityLogCreate) SetCreateTime(t time.Time) *UserSecurityLogCreate
- func (uslc *UserSecurityLogCreate) SetDescription(s string) *UserSecurityLogCreate
- func (uslc *UserSecurityLogCreate) SetID(i int) *UserSecurityLogCreate
- func (uslc *UserSecurityLogCreate) SetIP(s string) *UserSecurityLogCreate
- func (uslc *UserSecurityLogCreate) SetNillableAction(u *usersecuritylog.Action) *UserSecurityLogCreate
- func (uslc *UserSecurityLogCreate) SetNillableCreateTime(t *time.Time) *UserSecurityLogCreate
- func (uslc *UserSecurityLogCreate) SetNillableDescription(s *string) *UserSecurityLogCreate
- func (uslc *UserSecurityLogCreate) SetNillableIP(s *string) *UserSecurityLogCreate
- func (uslc *UserSecurityLogCreate) SetNillableRemark(s *string) *UserSecurityLogCreate
- func (uslc *UserSecurityLogCreate) SetNillableRequestID(s *string) *UserSecurityLogCreate
- func (uslc *UserSecurityLogCreate) SetNillableServerVersion(s *string) *UserSecurityLogCreate
- func (uslc *UserSecurityLogCreate) SetOwnerID(i int) *UserSecurityLogCreate
- func (uslc *UserSecurityLogCreate) SetRemark(s string) *UserSecurityLogCreate
- func (uslc *UserSecurityLogCreate) SetRequestID(s string) *UserSecurityLogCreate
- func (uslc *UserSecurityLogCreate) SetSecurityLogsOwner(u *User) *UserSecurityLogCreate
- func (uslc *UserSecurityLogCreate) SetSecurityLogsOwnerID(id int) *UserSecurityLogCreate
- func (uslc *UserSecurityLogCreate) SetServerVersion(s string) *UserSecurityLogCreate
- type UserSecurityLogCreateBulk
- type UserSecurityLogDelete
- type UserSecurityLogDeleteOne
- type UserSecurityLogEdges
- type UserSecurityLogGroupBy
- func (uslgb *UserSecurityLogGroupBy) Aggregate(fns ...AggregateFunc) *UserSecurityLogGroupBy
- func (uslgb *UserSecurityLogGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (uslgb *UserSecurityLogGroupBy) BoolX(ctx context.Context) bool
- func (uslgb *UserSecurityLogGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (uslgb *UserSecurityLogGroupBy) BoolsX(ctx context.Context) []bool
- func (uslgb *UserSecurityLogGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (uslgb *UserSecurityLogGroupBy) Float64X(ctx context.Context) float64
- func (uslgb *UserSecurityLogGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (uslgb *UserSecurityLogGroupBy) Float64sX(ctx context.Context) []float64
- func (uslgb *UserSecurityLogGroupBy) Int(ctx context.Context) (_ int, err error)
- func (uslgb *UserSecurityLogGroupBy) IntX(ctx context.Context) int
- func (uslgb *UserSecurityLogGroupBy) Ints(ctx context.Context) ([]int, error)
- func (uslgb *UserSecurityLogGroupBy) IntsX(ctx context.Context) []int
- func (uslgb *UserSecurityLogGroupBy) Scan(ctx context.Context, v interface{}) error
- func (uslgb *UserSecurityLogGroupBy) ScanX(ctx context.Context, v interface{})
- func (uslgb *UserSecurityLogGroupBy) String(ctx context.Context) (_ string, err error)
- func (uslgb *UserSecurityLogGroupBy) StringX(ctx context.Context) string
- func (uslgb *UserSecurityLogGroupBy) Strings(ctx context.Context) ([]string, error)
- func (uslgb *UserSecurityLogGroupBy) StringsX(ctx context.Context) []string
- type UserSecurityLogMutation
- func (m *UserSecurityLogMutation) Action() (r usersecuritylog.Action, exists bool)
- func (m *UserSecurityLogMutation) AddField(name string, value ent.Value) error
- func (m *UserSecurityLogMutation) AddedEdges() []string
- func (m *UserSecurityLogMutation) AddedField(name string) (ent.Value, bool)
- func (m *UserSecurityLogMutation) AddedFields() []string
- func (m *UserSecurityLogMutation) AddedIDs(name string) []ent.Value
- func (m *UserSecurityLogMutation) ClearDescription()
- func (m *UserSecurityLogMutation) ClearEdge(name string) error
- func (m *UserSecurityLogMutation) ClearField(name string) error
- func (m *UserSecurityLogMutation) ClearIP()
- func (m *UserSecurityLogMutation) ClearRemark()
- func (m *UserSecurityLogMutation) ClearRequestID()
- func (m *UserSecurityLogMutation) ClearSecurityLogsOwner()
- func (m *UserSecurityLogMutation) ClearServerVersion()
- func (m *UserSecurityLogMutation) ClearedEdges() []string
- func (m *UserSecurityLogMutation) ClearedFields() []string
- func (m UserSecurityLogMutation) Client() *Client
- func (m *UserSecurityLogMutation) CreateTime() (r time.Time, exists bool)
- func (m *UserSecurityLogMutation) Description() (r string, exists bool)
- func (m *UserSecurityLogMutation) DescriptionCleared() bool
- func (m *UserSecurityLogMutation) EdgeCleared(name string) bool
- func (m *UserSecurityLogMutation) Field(name string) (ent.Value, bool)
- func (m *UserSecurityLogMutation) FieldCleared(name string) bool
- func (m *UserSecurityLogMutation) Fields() []string
- func (m *UserSecurityLogMutation) ID() (id int, exists bool)
- func (m *UserSecurityLogMutation) IP() (r string, exists bool)
- func (m *UserSecurityLogMutation) IPCleared() bool
- func (m *UserSecurityLogMutation) OldAction(ctx context.Context) (v usersecuritylog.Action, err error)
- func (m *UserSecurityLogMutation) OldCreateTime(ctx context.Context) (v time.Time, err error)
- func (m *UserSecurityLogMutation) OldDescription(ctx context.Context) (v *string, err error)
- func (m *UserSecurityLogMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *UserSecurityLogMutation) OldIP(ctx context.Context) (v *string, err error)
- func (m *UserSecurityLogMutation) OldOwnerID(ctx context.Context) (v int, err error)
- func (m *UserSecurityLogMutation) OldRemark(ctx context.Context) (v *string, err error)
- func (m *UserSecurityLogMutation) OldRequestID(ctx context.Context) (v *string, err error)
- func (m *UserSecurityLogMutation) OldServerVersion(ctx context.Context) (v *string, err error)
- func (m *UserSecurityLogMutation) Op() Op
- func (m *UserSecurityLogMutation) OwnerID() (r int, exists bool)
- func (m *UserSecurityLogMutation) Remark() (r string, exists bool)
- func (m *UserSecurityLogMutation) RemarkCleared() bool
- func (m *UserSecurityLogMutation) RemovedEdges() []string
- func (m *UserSecurityLogMutation) RemovedIDs(name string) []ent.Value
- func (m *UserSecurityLogMutation) RequestID() (r string, exists bool)
- func (m *UserSecurityLogMutation) RequestIDCleared() bool
- func (m *UserSecurityLogMutation) ResetAction()
- func (m *UserSecurityLogMutation) ResetCreateTime()
- func (m *UserSecurityLogMutation) ResetDescription()
- func (m *UserSecurityLogMutation) ResetEdge(name string) error
- func (m *UserSecurityLogMutation) ResetField(name string) error
- func (m *UserSecurityLogMutation) ResetIP()
- func (m *UserSecurityLogMutation) ResetOwnerID()
- func (m *UserSecurityLogMutation) ResetRemark()
- func (m *UserSecurityLogMutation) ResetRequestID()
- func (m *UserSecurityLogMutation) ResetSecurityLogsOwner()
- func (m *UserSecurityLogMutation) ResetServerVersion()
- func (m *UserSecurityLogMutation) SecurityLogsOwnerCleared() bool
- func (m *UserSecurityLogMutation) SecurityLogsOwnerID() (id int, exists bool)
- func (m *UserSecurityLogMutation) SecurityLogsOwnerIDs() (ids []int)
- func (m *UserSecurityLogMutation) ServerVersion() (r string, exists bool)
- func (m *UserSecurityLogMutation) ServerVersionCleared() bool
- func (m *UserSecurityLogMutation) SetAction(u usersecuritylog.Action)
- func (m *UserSecurityLogMutation) SetCreateTime(t time.Time)
- func (m *UserSecurityLogMutation) SetDescription(s string)
- func (m *UserSecurityLogMutation) SetField(name string, value ent.Value) error
- func (m *UserSecurityLogMutation) SetID(id int)
- func (m *UserSecurityLogMutation) SetIP(s string)
- func (m *UserSecurityLogMutation) SetOwnerID(i int)
- func (m *UserSecurityLogMutation) SetRemark(s string)
- func (m *UserSecurityLogMutation) SetRequestID(s string)
- func (m *UserSecurityLogMutation) SetSecurityLogsOwnerID(id int)
- func (m *UserSecurityLogMutation) SetServerVersion(s string)
- func (m UserSecurityLogMutation) Tx() (*Tx, error)
- func (m *UserSecurityLogMutation) Type() string
- type UserSecurityLogQuery
- func (uslq *UserSecurityLogQuery) All(ctx context.Context) ([]*UserSecurityLog, error)
- func (uslq *UserSecurityLogQuery) AllX(ctx context.Context) []*UserSecurityLog
- func (uslq *UserSecurityLogQuery) Clone() *UserSecurityLogQuery
- func (uslq *UserSecurityLogQuery) Count(ctx context.Context) (int, error)
- func (uslq *UserSecurityLogQuery) CountX(ctx context.Context) int
- func (uslq *UserSecurityLogQuery) Exist(ctx context.Context) (bool, error)
- func (uslq *UserSecurityLogQuery) ExistX(ctx context.Context) bool
- func (uslq *UserSecurityLogQuery) First(ctx context.Context) (*UserSecurityLog, error)
- func (uslq *UserSecurityLogQuery) FirstID(ctx context.Context) (id int, err error)
- func (uslq *UserSecurityLogQuery) FirstIDX(ctx context.Context) int
- func (uslq *UserSecurityLogQuery) FirstX(ctx context.Context) *UserSecurityLog
- func (uslq *UserSecurityLogQuery) GroupBy(field string, fields ...string) *UserSecurityLogGroupBy
- func (uslq *UserSecurityLogQuery) IDs(ctx context.Context) ([]int, error)
- func (uslq *UserSecurityLogQuery) IDsX(ctx context.Context) []int
- func (uslq *UserSecurityLogQuery) Limit(limit int) *UserSecurityLogQuery
- func (uslq *UserSecurityLogQuery) Offset(offset int) *UserSecurityLogQuery
- func (uslq *UserSecurityLogQuery) Only(ctx context.Context) (*UserSecurityLog, error)
- func (uslq *UserSecurityLogQuery) OnlyID(ctx context.Context) (id int, err error)
- func (uslq *UserSecurityLogQuery) OnlyIDX(ctx context.Context) int
- func (uslq *UserSecurityLogQuery) OnlyX(ctx context.Context) *UserSecurityLog
- func (uslq *UserSecurityLogQuery) Order(o ...OrderFunc) *UserSecurityLogQuery
- func (uslq *UserSecurityLogQuery) QuerySecurityLogsOwner() *UserQuery
- func (uslq *UserSecurityLogQuery) Select(field string, fields ...string) *UserSecurityLogSelect
- func (uslq *UserSecurityLogQuery) Unique(unique bool) *UserSecurityLogQuery
- func (uslq *UserSecurityLogQuery) Where(ps ...predicate.UserSecurityLog) *UserSecurityLogQuery
- func (uslq *UserSecurityLogQuery) WithSecurityLogsOwner(opts ...func(*UserQuery)) *UserSecurityLogQuery
- type UserSecurityLogSelect
- func (usls *UserSecurityLogSelect) Bool(ctx context.Context) (_ bool, err error)
- func (usls *UserSecurityLogSelect) BoolX(ctx context.Context) bool
- func (usls *UserSecurityLogSelect) Bools(ctx context.Context) ([]bool, error)
- func (usls *UserSecurityLogSelect) BoolsX(ctx context.Context) []bool
- func (usls *UserSecurityLogSelect) Float64(ctx context.Context) (_ float64, err error)
- func (usls *UserSecurityLogSelect) Float64X(ctx context.Context) float64
- func (usls *UserSecurityLogSelect) Float64s(ctx context.Context) ([]float64, error)
- func (usls *UserSecurityLogSelect) Float64sX(ctx context.Context) []float64
- func (usls *UserSecurityLogSelect) Int(ctx context.Context) (_ int, err error)
- func (usls *UserSecurityLogSelect) IntX(ctx context.Context) int
- func (usls *UserSecurityLogSelect) Ints(ctx context.Context) ([]int, error)
- func (usls *UserSecurityLogSelect) IntsX(ctx context.Context) []int
- func (usls *UserSecurityLogSelect) Scan(ctx context.Context, v interface{}) error
- func (usls *UserSecurityLogSelect) ScanX(ctx context.Context, v interface{})
- func (usls *UserSecurityLogSelect) String(ctx context.Context) (_ string, err error)
- func (usls *UserSecurityLogSelect) StringX(ctx context.Context) string
- func (usls *UserSecurityLogSelect) Strings(ctx context.Context) ([]string, error)
- func (usls *UserSecurityLogSelect) StringsX(ctx context.Context) []string
- type UserSecurityLogUpdate
- func (uslu *UserSecurityLogUpdate) ClearDescription() *UserSecurityLogUpdate
- func (uslu *UserSecurityLogUpdate) ClearIP() *UserSecurityLogUpdate
- func (uslu *UserSecurityLogUpdate) ClearRemark() *UserSecurityLogUpdate
- func (uslu *UserSecurityLogUpdate) ClearRequestID() *UserSecurityLogUpdate
- func (uslu *UserSecurityLogUpdate) ClearSecurityLogsOwner() *UserSecurityLogUpdate
- func (uslu *UserSecurityLogUpdate) ClearServerVersion() *UserSecurityLogUpdate
- func (uslu *UserSecurityLogUpdate) Exec(ctx context.Context) error
- func (uslu *UserSecurityLogUpdate) ExecX(ctx context.Context)
- func (uslu *UserSecurityLogUpdate) Mutation() *UserSecurityLogMutation
- func (uslu *UserSecurityLogUpdate) Save(ctx context.Context) (int, error)
- func (uslu *UserSecurityLogUpdate) SaveX(ctx context.Context) int
- func (uslu *UserSecurityLogUpdate) SetAction(u usersecuritylog.Action) *UserSecurityLogUpdate
- func (uslu *UserSecurityLogUpdate) SetDescription(s string) *UserSecurityLogUpdate
- func (uslu *UserSecurityLogUpdate) SetIP(s string) *UserSecurityLogUpdate
- func (uslu *UserSecurityLogUpdate) SetNillableAction(u *usersecuritylog.Action) *UserSecurityLogUpdate
- func (uslu *UserSecurityLogUpdate) SetNillableDescription(s *string) *UserSecurityLogUpdate
- func (uslu *UserSecurityLogUpdate) SetNillableIP(s *string) *UserSecurityLogUpdate
- func (uslu *UserSecurityLogUpdate) SetNillableRemark(s *string) *UserSecurityLogUpdate
- func (uslu *UserSecurityLogUpdate) SetNillableRequestID(s *string) *UserSecurityLogUpdate
- func (uslu *UserSecurityLogUpdate) SetNillableServerVersion(s *string) *UserSecurityLogUpdate
- func (uslu *UserSecurityLogUpdate) SetOwnerID(i int) *UserSecurityLogUpdate
- func (uslu *UserSecurityLogUpdate) SetRemark(s string) *UserSecurityLogUpdate
- func (uslu *UserSecurityLogUpdate) SetRequestID(s string) *UserSecurityLogUpdate
- func (uslu *UserSecurityLogUpdate) SetSecurityLogsOwner(u *User) *UserSecurityLogUpdate
- func (uslu *UserSecurityLogUpdate) SetSecurityLogsOwnerID(id int) *UserSecurityLogUpdate
- func (uslu *UserSecurityLogUpdate) SetServerVersion(s string) *UserSecurityLogUpdate
- func (uslu *UserSecurityLogUpdate) Where(ps ...predicate.UserSecurityLog) *UserSecurityLogUpdate
- type UserSecurityLogUpdateOne
- func (usluo *UserSecurityLogUpdateOne) ClearDescription() *UserSecurityLogUpdateOne
- func (usluo *UserSecurityLogUpdateOne) ClearIP() *UserSecurityLogUpdateOne
- func (usluo *UserSecurityLogUpdateOne) ClearRemark() *UserSecurityLogUpdateOne
- func (usluo *UserSecurityLogUpdateOne) ClearRequestID() *UserSecurityLogUpdateOne
- func (usluo *UserSecurityLogUpdateOne) ClearSecurityLogsOwner() *UserSecurityLogUpdateOne
- func (usluo *UserSecurityLogUpdateOne) ClearServerVersion() *UserSecurityLogUpdateOne
- func (usluo *UserSecurityLogUpdateOne) Exec(ctx context.Context) error
- func (usluo *UserSecurityLogUpdateOne) ExecX(ctx context.Context)
- func (usluo *UserSecurityLogUpdateOne) Mutation() *UserSecurityLogMutation
- func (usluo *UserSecurityLogUpdateOne) Save(ctx context.Context) (*UserSecurityLog, error)
- func (usluo *UserSecurityLogUpdateOne) SaveX(ctx context.Context) *UserSecurityLog
- func (usluo *UserSecurityLogUpdateOne) Select(field string, fields ...string) *UserSecurityLogUpdateOne
- func (usluo *UserSecurityLogUpdateOne) SetAction(u usersecuritylog.Action) *UserSecurityLogUpdateOne
- func (usluo *UserSecurityLogUpdateOne) SetDescription(s string) *UserSecurityLogUpdateOne
- func (usluo *UserSecurityLogUpdateOne) SetIP(s string) *UserSecurityLogUpdateOne
- func (usluo *UserSecurityLogUpdateOne) SetNillableAction(u *usersecuritylog.Action) *UserSecurityLogUpdateOne
- func (usluo *UserSecurityLogUpdateOne) SetNillableDescription(s *string) *UserSecurityLogUpdateOne
- func (usluo *UserSecurityLogUpdateOne) SetNillableIP(s *string) *UserSecurityLogUpdateOne
- func (usluo *UserSecurityLogUpdateOne) SetNillableRemark(s *string) *UserSecurityLogUpdateOne
- func (usluo *UserSecurityLogUpdateOne) SetNillableRequestID(s *string) *UserSecurityLogUpdateOne
- func (usluo *UserSecurityLogUpdateOne) SetNillableServerVersion(s *string) *UserSecurityLogUpdateOne
- func (usluo *UserSecurityLogUpdateOne) SetOwnerID(i int) *UserSecurityLogUpdateOne
- func (usluo *UserSecurityLogUpdateOne) SetRemark(s string) *UserSecurityLogUpdateOne
- func (usluo *UserSecurityLogUpdateOne) SetRequestID(s string) *UserSecurityLogUpdateOne
- func (usluo *UserSecurityLogUpdateOne) SetSecurityLogsOwner(u *User) *UserSecurityLogUpdateOne
- func (usluo *UserSecurityLogUpdateOne) SetSecurityLogsOwnerID(id int) *UserSecurityLogUpdateOne
- func (usluo *UserSecurityLogUpdateOne) SetServerVersion(s string) *UserSecurityLogUpdateOne
- type UserSecurityLogs
- 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 UserSetting
- type UserSettingClient
- func (c *UserSettingClient) Create() *UserSettingCreate
- func (c *UserSettingClient) CreateBulk(builders ...*UserSettingCreate) *UserSettingCreateBulk
- func (c *UserSettingClient) Delete() *UserSettingDelete
- func (c *UserSettingClient) DeleteOne(us *UserSetting) *UserSettingDeleteOne
- func (c *UserSettingClient) DeleteOneID(id int) *UserSettingDeleteOne
- func (c *UserSettingClient) Get(ctx context.Context, id int) (*UserSetting, error)
- func (c *UserSettingClient) GetX(ctx context.Context, id int) *UserSetting
- func (c *UserSettingClient) Hooks() []Hook
- func (c *UserSettingClient) Query() *UserSettingQuery
- func (c *UserSettingClient) QuerySettingsOwner(us *UserSetting) *UserQuery
- func (c *UserSettingClient) Update() *UserSettingUpdate
- func (c *UserSettingClient) UpdateOne(us *UserSetting) *UserSettingUpdateOne
- func (c *UserSettingClient) UpdateOneID(id int) *UserSettingUpdateOne
- func (c *UserSettingClient) Use(hooks ...Hook)
- type UserSettingCreate
- func (usc *UserSettingCreate) Mutation() *UserSettingMutation
- func (usc *UserSettingCreate) Save(ctx context.Context) (*UserSetting, error)
- func (usc *UserSettingCreate) SaveX(ctx context.Context) *UserSetting
- func (usc *UserSettingCreate) SetExpires(t time.Time) *UserSettingCreate
- func (usc *UserSettingCreate) SetID(i int) *UserSettingCreate
- func (usc *UserSettingCreate) SetKey(s string) *UserSettingCreate
- func (usc *UserSettingCreate) SetNillableExpires(t *time.Time) *UserSettingCreate
- func (usc *UserSettingCreate) SetNillableTypeof(u *usersetting.Typeof) *UserSettingCreate
- func (usc *UserSettingCreate) SetNillableUpdateTime(t *time.Time) *UserSettingCreate
- func (usc *UserSettingCreate) SetNillableValue(s *string) *UserSettingCreate
- func (usc *UserSettingCreate) SetOwnerID(i int) *UserSettingCreate
- func (usc *UserSettingCreate) SetSettingsOwner(u *User) *UserSettingCreate
- func (usc *UserSettingCreate) SetSettingsOwnerID(id int) *UserSettingCreate
- func (usc *UserSettingCreate) SetTypeof(u usersetting.Typeof) *UserSettingCreate
- func (usc *UserSettingCreate) SetUpdateTime(t time.Time) *UserSettingCreate
- func (usc *UserSettingCreate) SetValue(s string) *UserSettingCreate
- type UserSettingCreateBulk
- type UserSettingDelete
- type UserSettingDeleteOne
- type UserSettingEdges
- type UserSettingGroupBy
- func (usgb *UserSettingGroupBy) Aggregate(fns ...AggregateFunc) *UserSettingGroupBy
- func (usgb *UserSettingGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (usgb *UserSettingGroupBy) BoolX(ctx context.Context) bool
- func (usgb *UserSettingGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (usgb *UserSettingGroupBy) BoolsX(ctx context.Context) []bool
- func (usgb *UserSettingGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (usgb *UserSettingGroupBy) Float64X(ctx context.Context) float64
- func (usgb *UserSettingGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (usgb *UserSettingGroupBy) Float64sX(ctx context.Context) []float64
- func (usgb *UserSettingGroupBy) Int(ctx context.Context) (_ int, err error)
- func (usgb *UserSettingGroupBy) IntX(ctx context.Context) int
- func (usgb *UserSettingGroupBy) Ints(ctx context.Context) ([]int, error)
- func (usgb *UserSettingGroupBy) IntsX(ctx context.Context) []int
- func (usgb *UserSettingGroupBy) Scan(ctx context.Context, v interface{}) error
- func (usgb *UserSettingGroupBy) ScanX(ctx context.Context, v interface{})
- func (usgb *UserSettingGroupBy) String(ctx context.Context) (_ string, err error)
- func (usgb *UserSettingGroupBy) StringX(ctx context.Context) string
- func (usgb *UserSettingGroupBy) Strings(ctx context.Context) ([]string, error)
- func (usgb *UserSettingGroupBy) StringsX(ctx context.Context) []string
- type UserSettingMutation
- func (m *UserSettingMutation) AddField(name string, value ent.Value) error
- func (m *UserSettingMutation) AddedEdges() []string
- func (m *UserSettingMutation) AddedField(name string) (ent.Value, bool)
- func (m *UserSettingMutation) AddedFields() []string
- func (m *UserSettingMutation) AddedIDs(name string) []ent.Value
- func (m *UserSettingMutation) ClearEdge(name string) error
- func (m *UserSettingMutation) ClearExpires()
- func (m *UserSettingMutation) ClearField(name string) error
- func (m *UserSettingMutation) ClearSettingsOwner()
- func (m *UserSettingMutation) ClearValue()
- func (m *UserSettingMutation) ClearedEdges() []string
- func (m *UserSettingMutation) ClearedFields() []string
- func (m UserSettingMutation) Client() *Client
- func (m *UserSettingMutation) EdgeCleared(name string) bool
- func (m *UserSettingMutation) Expires() (r time.Time, exists bool)
- func (m *UserSettingMutation) ExpiresCleared() bool
- func (m *UserSettingMutation) Field(name string) (ent.Value, bool)
- func (m *UserSettingMutation) FieldCleared(name string) bool
- func (m *UserSettingMutation) Fields() []string
- func (m *UserSettingMutation) ID() (id int, exists bool)
- func (m *UserSettingMutation) Key() (r string, exists bool)
- func (m *UserSettingMutation) OldExpires(ctx context.Context) (v *time.Time, err error)
- func (m *UserSettingMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *UserSettingMutation) OldKey(ctx context.Context) (v string, err error)
- func (m *UserSettingMutation) OldOwnerID(ctx context.Context) (v int, err error)
- func (m *UserSettingMutation) OldTypeof(ctx context.Context) (v usersetting.Typeof, err error)
- func (m *UserSettingMutation) OldUpdateTime(ctx context.Context) (v time.Time, err error)
- func (m *UserSettingMutation) OldValue(ctx context.Context) (v *string, err error)
- func (m *UserSettingMutation) Op() Op
- func (m *UserSettingMutation) OwnerID() (r int, exists bool)
- func (m *UserSettingMutation) RemovedEdges() []string
- func (m *UserSettingMutation) RemovedIDs(name string) []ent.Value
- func (m *UserSettingMutation) ResetEdge(name string) error
- func (m *UserSettingMutation) ResetExpires()
- func (m *UserSettingMutation) ResetField(name string) error
- func (m *UserSettingMutation) ResetKey()
- func (m *UserSettingMutation) ResetOwnerID()
- func (m *UserSettingMutation) ResetSettingsOwner()
- func (m *UserSettingMutation) ResetTypeof()
- func (m *UserSettingMutation) ResetUpdateTime()
- func (m *UserSettingMutation) ResetValue()
- func (m *UserSettingMutation) SetExpires(t time.Time)
- func (m *UserSettingMutation) SetField(name string, value ent.Value) error
- func (m *UserSettingMutation) SetID(id int)
- func (m *UserSettingMutation) SetKey(s string)
- func (m *UserSettingMutation) SetOwnerID(i int)
- func (m *UserSettingMutation) SetSettingsOwnerID(id int)
- func (m *UserSettingMutation) SetTypeof(u usersetting.Typeof)
- func (m *UserSettingMutation) SetUpdateTime(t time.Time)
- func (m *UserSettingMutation) SetValue(s string)
- func (m *UserSettingMutation) SettingsOwnerCleared() bool
- func (m *UserSettingMutation) SettingsOwnerID() (id int, exists bool)
- func (m *UserSettingMutation) SettingsOwnerIDs() (ids []int)
- func (m UserSettingMutation) Tx() (*Tx, error)
- func (m *UserSettingMutation) Type() string
- func (m *UserSettingMutation) Typeof() (r usersetting.Typeof, exists bool)
- func (m *UserSettingMutation) UpdateTime() (r time.Time, exists bool)
- func (m *UserSettingMutation) Value() (r string, exists bool)
- func (m *UserSettingMutation) ValueCleared() bool
- type UserSettingQuery
- func (usq *UserSettingQuery) All(ctx context.Context) ([]*UserSetting, error)
- func (usq *UserSettingQuery) AllX(ctx context.Context) []*UserSetting
- func (usq *UserSettingQuery) Clone() *UserSettingQuery
- func (usq *UserSettingQuery) Count(ctx context.Context) (int, error)
- func (usq *UserSettingQuery) CountX(ctx context.Context) int
- func (usq *UserSettingQuery) Exist(ctx context.Context) (bool, error)
- func (usq *UserSettingQuery) ExistX(ctx context.Context) bool
- func (usq *UserSettingQuery) First(ctx context.Context) (*UserSetting, error)
- func (usq *UserSettingQuery) FirstID(ctx context.Context) (id int, err error)
- func (usq *UserSettingQuery) FirstIDX(ctx context.Context) int
- func (usq *UserSettingQuery) FirstX(ctx context.Context) *UserSetting
- func (usq *UserSettingQuery) GroupBy(field string, fields ...string) *UserSettingGroupBy
- func (usq *UserSettingQuery) IDs(ctx context.Context) ([]int, error)
- func (usq *UserSettingQuery) IDsX(ctx context.Context) []int
- func (usq *UserSettingQuery) Limit(limit int) *UserSettingQuery
- func (usq *UserSettingQuery) Offset(offset int) *UserSettingQuery
- func (usq *UserSettingQuery) Only(ctx context.Context) (*UserSetting, error)
- func (usq *UserSettingQuery) OnlyID(ctx context.Context) (id int, err error)
- func (usq *UserSettingQuery) OnlyIDX(ctx context.Context) int
- func (usq *UserSettingQuery) OnlyX(ctx context.Context) *UserSetting
- func (usq *UserSettingQuery) Order(o ...OrderFunc) *UserSettingQuery
- func (usq *UserSettingQuery) QuerySettingsOwner() *UserQuery
- func (usq *UserSettingQuery) Select(field string, fields ...string) *UserSettingSelect
- func (usq *UserSettingQuery) Unique(unique bool) *UserSettingQuery
- func (usq *UserSettingQuery) Where(ps ...predicate.UserSetting) *UserSettingQuery
- func (usq *UserSettingQuery) WithSettingsOwner(opts ...func(*UserQuery)) *UserSettingQuery
- type UserSettingSelect
- func (uss *UserSettingSelect) Bool(ctx context.Context) (_ bool, err error)
- func (uss *UserSettingSelect) BoolX(ctx context.Context) bool
- func (uss *UserSettingSelect) Bools(ctx context.Context) ([]bool, error)
- func (uss *UserSettingSelect) BoolsX(ctx context.Context) []bool
- func (uss *UserSettingSelect) Float64(ctx context.Context) (_ float64, err error)
- func (uss *UserSettingSelect) Float64X(ctx context.Context) float64
- func (uss *UserSettingSelect) Float64s(ctx context.Context) ([]float64, error)
- func (uss *UserSettingSelect) Float64sX(ctx context.Context) []float64
- func (uss *UserSettingSelect) Int(ctx context.Context) (_ int, err error)
- func (uss *UserSettingSelect) IntX(ctx context.Context) int
- func (uss *UserSettingSelect) Ints(ctx context.Context) ([]int, error)
- func (uss *UserSettingSelect) IntsX(ctx context.Context) []int
- func (uss *UserSettingSelect) Scan(ctx context.Context, v interface{}) error
- func (uss *UserSettingSelect) ScanX(ctx context.Context, v interface{})
- func (uss *UserSettingSelect) String(ctx context.Context) (_ string, err error)
- func (uss *UserSettingSelect) StringX(ctx context.Context) string
- func (uss *UserSettingSelect) Strings(ctx context.Context) ([]string, error)
- func (uss *UserSettingSelect) StringsX(ctx context.Context) []string
- type UserSettingUpdate
- func (usu *UserSettingUpdate) ClearExpires() *UserSettingUpdate
- func (usu *UserSettingUpdate) ClearSettingsOwner() *UserSettingUpdate
- func (usu *UserSettingUpdate) ClearValue() *UserSettingUpdate
- func (usu *UserSettingUpdate) Exec(ctx context.Context) error
- func (usu *UserSettingUpdate) ExecX(ctx context.Context)
- func (usu *UserSettingUpdate) Mutation() *UserSettingMutation
- func (usu *UserSettingUpdate) Save(ctx context.Context) (int, error)
- func (usu *UserSettingUpdate) SaveX(ctx context.Context) int
- func (usu *UserSettingUpdate) SetExpires(t time.Time) *UserSettingUpdate
- func (usu *UserSettingUpdate) SetKey(s string) *UserSettingUpdate
- func (usu *UserSettingUpdate) SetNillableExpires(t *time.Time) *UserSettingUpdate
- func (usu *UserSettingUpdate) SetNillableTypeof(u *usersetting.Typeof) *UserSettingUpdate
- func (usu *UserSettingUpdate) SetNillableValue(s *string) *UserSettingUpdate
- func (usu *UserSettingUpdate) SetOwnerID(i int) *UserSettingUpdate
- func (usu *UserSettingUpdate) SetSettingsOwner(u *User) *UserSettingUpdate
- func (usu *UserSettingUpdate) SetSettingsOwnerID(id int) *UserSettingUpdate
- func (usu *UserSettingUpdate) SetTypeof(u usersetting.Typeof) *UserSettingUpdate
- func (usu *UserSettingUpdate) SetUpdateTime(t time.Time) *UserSettingUpdate
- func (usu *UserSettingUpdate) SetValue(s string) *UserSettingUpdate
- func (usu *UserSettingUpdate) Where(ps ...predicate.UserSetting) *UserSettingUpdate
- type UserSettingUpdateOne
- func (usuo *UserSettingUpdateOne) ClearExpires() *UserSettingUpdateOne
- func (usuo *UserSettingUpdateOne) ClearSettingsOwner() *UserSettingUpdateOne
- func (usuo *UserSettingUpdateOne) ClearValue() *UserSettingUpdateOne
- func (usuo *UserSettingUpdateOne) Exec(ctx context.Context) error
- func (usuo *UserSettingUpdateOne) ExecX(ctx context.Context)
- func (usuo *UserSettingUpdateOne) Mutation() *UserSettingMutation
- func (usuo *UserSettingUpdateOne) Save(ctx context.Context) (*UserSetting, error)
- func (usuo *UserSettingUpdateOne) SaveX(ctx context.Context) *UserSetting
- func (usuo *UserSettingUpdateOne) Select(field string, fields ...string) *UserSettingUpdateOne
- func (usuo *UserSettingUpdateOne) SetExpires(t time.Time) *UserSettingUpdateOne
- func (usuo *UserSettingUpdateOne) SetKey(s string) *UserSettingUpdateOne
- func (usuo *UserSettingUpdateOne) SetNillableExpires(t *time.Time) *UserSettingUpdateOne
- func (usuo *UserSettingUpdateOne) SetNillableTypeof(u *usersetting.Typeof) *UserSettingUpdateOne
- func (usuo *UserSettingUpdateOne) SetNillableValue(s *string) *UserSettingUpdateOne
- func (usuo *UserSettingUpdateOne) SetOwnerID(i int) *UserSettingUpdateOne
- func (usuo *UserSettingUpdateOne) SetSettingsOwner(u *User) *UserSettingUpdateOne
- func (usuo *UserSettingUpdateOne) SetSettingsOwnerID(id int) *UserSettingUpdateOne
- func (usuo *UserSettingUpdateOne) SetTypeof(u usersetting.Typeof) *UserSettingUpdateOne
- func (usuo *UserSettingUpdateOne) SetUpdateTime(t time.Time) *UserSettingUpdateOne
- func (usuo *UserSettingUpdateOne) SetValue(s string) *UserSettingUpdateOne
- type UserSettings
- type UserUpdate
- func (uu *UserUpdate) AddGroupIDs(ids ...int) *UserUpdate
- func (uu *UserUpdate) AddGroups(u ...*UserGroup) *UserUpdate
- func (uu *UserUpdate) AddUserEmailIDs(ids ...int) *UserUpdate
- func (uu *UserUpdate) AddUserEmails(u ...*UserEmail) *UserUpdate
- func (uu *UserUpdate) AddUserSecurityLogIDs(ids ...int) *UserUpdate
- func (uu *UserUpdate) AddUserSecurityLogs(u ...*UserSecurityLog) *UserUpdate
- func (uu *UserUpdate) AddUserSettingIDs(ids ...int) *UserUpdate
- func (uu *UserUpdate) AddUserSettings(u ...*UserSetting) *UserUpdate
- func (uu *UserUpdate) ClearAvatarURL() *UserUpdate
- func (uu *UserUpdate) ClearDeleteTime() *UserUpdate
- func (uu *UserUpdate) ClearGroups() *UserUpdate
- func (uu *UserUpdate) ClearPassword() *UserUpdate
- func (uu *UserUpdate) ClearPhone() *UserUpdate
- func (uu *UserUpdate) ClearPlan() *UserUpdate
- func (uu *UserUpdate) ClearStatus() *UserUpdate
- func (uu *UserUpdate) ClearUserEmails() *UserUpdate
- func (uu *UserUpdate) ClearUserSecurityLogs() *UserUpdate
- func (uu *UserUpdate) ClearUserSettings() *UserUpdate
- func (uu *UserUpdate) Exec(ctx context.Context) error
- func (uu *UserUpdate) ExecX(ctx context.Context)
- func (uu *UserUpdate) Mutation() *UserMutation
- func (uu *UserUpdate) RemoveGroupIDs(ids ...int) *UserUpdate
- func (uu *UserUpdate) RemoveGroups(u ...*UserGroup) *UserUpdate
- func (uu *UserUpdate) RemoveUserEmailIDs(ids ...int) *UserUpdate
- func (uu *UserUpdate) RemoveUserEmails(u ...*UserEmail) *UserUpdate
- func (uu *UserUpdate) RemoveUserSecurityLogIDs(ids ...int) *UserUpdate
- func (uu *UserUpdate) RemoveUserSecurityLogs(u ...*UserSecurityLog) *UserUpdate
- func (uu *UserUpdate) RemoveUserSettingIDs(ids ...int) *UserUpdate
- func (uu *UserUpdate) RemoveUserSettings(u ...*UserSetting) *UserUpdate
- func (uu *UserUpdate) Save(ctx context.Context) (int, error)
- func (uu *UserUpdate) SaveX(ctx context.Context) int
- func (uu *UserUpdate) SetAvatarURL(s string) *UserUpdate
- func (uu *UserUpdate) SetDeleteTime(t time.Time) *UserUpdate
- func (uu *UserUpdate) SetGender(u user.Gender) *UserUpdate
- func (uu *UserUpdate) SetNickname(s string) *UserUpdate
- func (uu *UserUpdate) SetNillableAvatarURL(s *string) *UserUpdate
- func (uu *UserUpdate) SetNillableDeleteTime(t *time.Time) *UserUpdate
- func (uu *UserUpdate) SetNillableGender(u *user.Gender) *UserUpdate
- func (uu *UserUpdate) SetNillablePassword(s *string) *UserUpdate
- func (uu *UserUpdate) SetNillablePhone(s *string) *UserUpdate
- func (uu *UserUpdate) SetNillablePlan(u *user.Plan) *UserUpdate
- func (uu *UserUpdate) SetNillableSecondAuth(b *bool) *UserUpdate
- func (uu *UserUpdate) SetNillableStatus(u *user.Status) *UserUpdate
- func (uu *UserUpdate) SetPassword(s string) *UserUpdate
- func (uu *UserUpdate) SetPhone(s string) *UserUpdate
- func (uu *UserUpdate) SetPlan(u user.Plan) *UserUpdate
- func (uu *UserUpdate) SetSecondAuth(b bool) *UserUpdate
- func (uu *UserUpdate) SetStatus(u user.Status) *UserUpdate
- func (uu *UserUpdate) SetUpdateTime(t time.Time) *UserUpdate
- func (uu *UserUpdate) Where(ps ...predicate.User) *UserUpdate
- type UserUpdateOne
- func (uuo *UserUpdateOne) AddGroupIDs(ids ...int) *UserUpdateOne
- func (uuo *UserUpdateOne) AddGroups(u ...*UserGroup) *UserUpdateOne
- func (uuo *UserUpdateOne) AddUserEmailIDs(ids ...int) *UserUpdateOne
- func (uuo *UserUpdateOne) AddUserEmails(u ...*UserEmail) *UserUpdateOne
- func (uuo *UserUpdateOne) AddUserSecurityLogIDs(ids ...int) *UserUpdateOne
- func (uuo *UserUpdateOne) AddUserSecurityLogs(u ...*UserSecurityLog) *UserUpdateOne
- func (uuo *UserUpdateOne) AddUserSettingIDs(ids ...int) *UserUpdateOne
- func (uuo *UserUpdateOne) AddUserSettings(u ...*UserSetting) *UserUpdateOne
- func (uuo *UserUpdateOne) ClearAvatarURL() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearDeleteTime() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearGroups() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearPassword() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearPhone() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearPlan() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearStatus() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearUserEmails() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearUserSecurityLogs() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearUserSettings() *UserUpdateOne
- func (uuo *UserUpdateOne) Exec(ctx context.Context) error
- func (uuo *UserUpdateOne) ExecX(ctx context.Context)
- func (uuo *UserUpdateOne) Mutation() *UserMutation
- func (uuo *UserUpdateOne) RemoveGroupIDs(ids ...int) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveGroups(u ...*UserGroup) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveUserEmailIDs(ids ...int) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveUserEmails(u ...*UserEmail) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveUserSecurityLogIDs(ids ...int) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveUserSecurityLogs(u ...*UserSecurityLog) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveUserSettingIDs(ids ...int) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveUserSettings(u ...*UserSetting) *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) SetAvatarURL(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetDeleteTime(t time.Time) *UserUpdateOne
- func (uuo *UserUpdateOne) SetGender(u user.Gender) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNickname(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableAvatarURL(s *string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableDeleteTime(t *time.Time) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableGender(u *user.Gender) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillablePassword(s *string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillablePhone(s *string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillablePlan(u *user.Plan) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableSecondAuth(b *bool) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableStatus(u *user.Status) *UserUpdateOne
- func (uuo *UserUpdateOne) SetPassword(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetPhone(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetPlan(u user.Plan) *UserUpdateOne
- func (uuo *UserUpdateOne) SetSecondAuth(b bool) *UserUpdateOne
- func (uuo *UserUpdateOne) SetStatus(u user.Status) *UserUpdateOne
- func (uuo *UserUpdateOne) SetUpdateTime(t time.Time) *UserUpdateOne
- type Users
- type ValidationError
- type Value
Constants ¶
const ( // Operation types. OpCreate = ent.OpCreate OpDelete = ent.OpDelete OpDeleteOne = ent.OpDeleteOne OpUpdate = ent.OpUpdate OpUpdateOne = ent.OpUpdateOne // Node types. TypeUser = "User" TypeUserEmail = "UserEmail" TypeUserGroup = "UserGroup" TypeUserSecurityLog = "UserSecurityLog" TypeUserSetting = "UserSetting" )
Variables ¶
This section is empty.
Functions ¶
func IsConstraintError ¶
IsConstraintError returns a boolean indicating whether the error is a constraint failure.
func IsNotFound ¶
IsNotFound returns a boolean indicating whether the error is a not found error.
func IsNotLoaded ¶
IsNotLoaded returns a boolean indicating whether the error is a not loaded error.
func IsNotSingular ¶
IsNotSingular returns a boolean indicating whether the error is a not singular error.
func IsValidationError ¶
IsValidationError returns a boolean indicating whether the error is a validaton error.
func NewContext ¶
NewContext returns a new context with the given Client attached.
Types ¶
type AggregateFunc ¶
AggregateFunc applies an aggregation step on the group-by traversal/selector.
func As ¶
func As(fn AggregateFunc, end string) AggregateFunc
As is a pseudo aggregation function for renaming another other functions with custom names. For example:
GroupBy(field1, field2). Aggregate(model.As(model.Sum(field1), "sum_field1"), (model.As(model.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 // User is the client for interacting with the User builders. User *UserClient // UserEmail is the client for interacting with the UserEmail builders. UserEmail *UserEmailClient // UserGroup is the client for interacting with the UserGroup builders. UserGroup *UserGroupClient // UserSecurityLog is the client for interacting with the UserSecurityLog builders. UserSecurityLog *UserSecurityLogClient // UserSetting is the client for interacting with the UserSetting builders. UserSetting *UserSettingClient // 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(). User. Query(). Count(ctx)
type CommitFunc ¶
The CommitFunc type is an adapter to allow the use of ordinary function as a Committer. If f is a function with the appropriate signature, CommitFunc(f) is a Committer that calls f.
type CommitHook ¶
CommitHook defines the "commit middleware". A function that gets a Committer and returns a Committer. For example:
hook := func(next ent.Committer) ent.Committer { return ent.CommitFunc(func(context.Context, tx *ent.Tx) error { // Do some stuff before. if err := next.Commit(ctx, tx); err != nil { return err } // Do some stuff after. return nil }) }
type ConstraintError ¶
type ConstraintError struct {
// contains filtered or unexported fields
}
ConstraintError returns when trying to create/update one or more entities and one or more of their constraints failed. For example, violation of edge or field uniqueness.
func (ConstraintError) Error ¶
func (e ConstraintError) Error() string
Error implements the error interface.
func (*ConstraintError) Unwrap ¶
func (e *ConstraintError) Unwrap() error
Unwrap implements the errors.Wrapper interface.
type MutateFunc ¶
type MutateFunc = ent.MutateFunc
ent aliases to avoid import 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(context.Context, tx *ent.Tx) error { // Do some stuff before. if err := next.Rollback(ctx, tx); err != nil { return err } // Do some stuff after. return nil }) }
type Rollbacker ¶
Rollbacker is the interface that wraps the Rollbacker method.
type Tx ¶
type Tx struct { // User is the client for interacting with the User builders. User *UserClient // UserEmail is the client for interacting with the UserEmail builders. UserEmail *UserEmailClient // UserGroup is the client for interacting with the UserGroup builders. UserGroup *UserGroupClient // UserSecurityLog is the client for interacting with the UserSecurityLog builders. UserSecurityLog *UserSecurityLogClient // UserSetting is the client for interacting with the UserSetting builders. UserSetting *UserSettingClient // 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 int `json:"-"` // Sn holds the value of the "sn" field. Sn string `json:"sn,omitempty"` // Nickname holds the value of the "nickname" field. Nickname string `json:"nickname,omitempty"` // Gender holds the value of the "gender" field. Gender user.Gender `json:"gender,omitempty"` // Plan holds the value of the "plan" field. Plan *user.Plan `json:"plan,omitempty"` // AvatarURL holds the value of the "avatar_url" field. AvatarURL *string `json:"avatar_url,omitempty"` // Phone holds the value of the "phone" field. Phone *string `json:"phone,omitempty"` // SecondAuth holds the value of the "second_auth" field. SecondAuth bool `json:"second_auth,omitempty"` // Password holds the value of the "password" field. Password string `json:"-"` // Status holds the value of the "status" field. Status *user.Status `json:"-"` // CreateTime holds the value of the "create_time" field. CreateTime time.Time `json:"-"` // UpdateTime holds the value of the "update_time" field. UpdateTime time.Time `json:"-"` // DeleteTime holds the value of the "delete_time" field. DeleteTime *time.Time `json:"-"` // 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) QueryGroups ¶
func (u *User) QueryGroups() *UserGroupQuery
QueryGroups queries the "groups" edge of the User entity.
func (*User) QueryUserEmails ¶
func (u *User) QueryUserEmails() *UserEmailQuery
QueryUserEmails queries the "UserEmails" edge of the User entity.
func (*User) QueryUserSecurityLogs ¶
func (u *User) QueryUserSecurityLogs() *UserSecurityLogQuery
QueryUserSecurityLogs queries the "UserSecurityLogs" edge of the User entity.
func (*User) QueryUserSettings ¶
func (u *User) QueryUserSettings() *UserSettingQuery
QueryUserSettings queries the "UserSettings" 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 int) *UserDeleteOne
DeleteOneID returns a delete builder for the given id.
func (*UserClient) GetX ¶
func (c *UserClient) GetX(ctx context.Context, id int) *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) QueryGroups ¶
func (c *UserClient) QueryGroups(u *User) *UserGroupQuery
QueryGroups queries the groups edge of a User.
func (*UserClient) QueryUserEmails ¶
func (c *UserClient) QueryUserEmails(u *User) *UserEmailQuery
QueryUserEmails queries the UserEmails edge of a User.
func (*UserClient) QueryUserSecurityLogs ¶
func (c *UserClient) QueryUserSecurityLogs(u *User) *UserSecurityLogQuery
QueryUserSecurityLogs queries the UserSecurityLogs edge of a User.
func (*UserClient) QueryUserSettings ¶
func (c *UserClient) QueryUserSettings(u *User) *UserSettingQuery
QueryUserSettings queries the UserSettings 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 int) *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) AddGroupIDs ¶
func (uc *UserCreate) AddGroupIDs(ids ...int) *UserCreate
AddGroupIDs adds the "groups" edge to the UserGroup entity by IDs.
func (*UserCreate) AddGroups ¶
func (uc *UserCreate) AddGroups(u ...*UserGroup) *UserCreate
AddGroups adds the "groups" edges to the UserGroup entity.
func (*UserCreate) AddUserEmailIDs ¶
func (uc *UserCreate) AddUserEmailIDs(ids ...int) *UserCreate
AddUserEmailIDs adds the "UserEmails" edge to the UserEmail entity by IDs.
func (*UserCreate) AddUserEmails ¶
func (uc *UserCreate) AddUserEmails(u ...*UserEmail) *UserCreate
AddUserEmails adds the "UserEmails" edges to the UserEmail entity.
func (*UserCreate) AddUserSecurityLogIDs ¶
func (uc *UserCreate) AddUserSecurityLogIDs(ids ...int) *UserCreate
AddUserSecurityLogIDs adds the "UserSecurityLogs" edge to the UserSecurityLog entity by IDs.
func (*UserCreate) AddUserSecurityLogs ¶
func (uc *UserCreate) AddUserSecurityLogs(u ...*UserSecurityLog) *UserCreate
AddUserSecurityLogs adds the "UserSecurityLogs" edges to the UserSecurityLog entity.
func (*UserCreate) AddUserSettingIDs ¶
func (uc *UserCreate) AddUserSettingIDs(ids ...int) *UserCreate
AddUserSettingIDs adds the "UserSettings" edge to the UserSetting entity by IDs.
func (*UserCreate) AddUserSettings ¶
func (uc *UserCreate) AddUserSettings(u ...*UserSetting) *UserCreate
AddUserSettings adds the "UserSettings" edges to the UserSetting entity.
func (*UserCreate) Mutation ¶
func (uc *UserCreate) Mutation() *UserMutation
Mutation returns the UserMutation object of the builder.
func (*UserCreate) Save ¶
func (uc *UserCreate) Save(ctx context.Context) (*User, error)
Save creates the User in the database.
func (*UserCreate) SaveX ¶
func (uc *UserCreate) SaveX(ctx context.Context) *User
SaveX calls Save and panics if Save returns an error.
func (*UserCreate) SetAvatarURL ¶
func (uc *UserCreate) SetAvatarURL(s string) *UserCreate
SetAvatarURL sets the "avatar_url" field.
func (*UserCreate) SetCreateTime ¶
func (uc *UserCreate) SetCreateTime(t time.Time) *UserCreate
SetCreateTime sets the "create_time" field.
func (*UserCreate) SetDeleteTime ¶
func (uc *UserCreate) SetDeleteTime(t time.Time) *UserCreate
SetDeleteTime sets the "delete_time" field.
func (*UserCreate) SetGender ¶
func (uc *UserCreate) SetGender(u user.Gender) *UserCreate
SetGender sets the "gender" field.
func (*UserCreate) SetID ¶
func (uc *UserCreate) SetID(i int) *UserCreate
SetID sets the "id" field.
func (*UserCreate) SetNickname ¶
func (uc *UserCreate) SetNickname(s string) *UserCreate
SetNickname sets the "nickname" field.
func (*UserCreate) SetNillableAvatarURL ¶
func (uc *UserCreate) SetNillableAvatarURL(s *string) *UserCreate
SetNillableAvatarURL sets the "avatar_url" field if the given value is not nil.
func (*UserCreate) SetNillableCreateTime ¶
func (uc *UserCreate) SetNillableCreateTime(t *time.Time) *UserCreate
SetNillableCreateTime sets the "create_time" field if the given value is not nil.
func (*UserCreate) SetNillableDeleteTime ¶
func (uc *UserCreate) SetNillableDeleteTime(t *time.Time) *UserCreate
SetNillableDeleteTime sets the "delete_time" field if the given value is not nil.
func (*UserCreate) SetNillableGender ¶
func (uc *UserCreate) SetNillableGender(u *user.Gender) *UserCreate
SetNillableGender sets the "gender" field if the given value is not nil.
func (*UserCreate) SetNillablePassword ¶
func (uc *UserCreate) SetNillablePassword(s *string) *UserCreate
SetNillablePassword sets the "password" field if the given value is not nil.
func (*UserCreate) SetNillablePhone ¶
func (uc *UserCreate) SetNillablePhone(s *string) *UserCreate
SetNillablePhone sets the "phone" field if the given value is not nil.
func (*UserCreate) SetNillablePlan ¶
func (uc *UserCreate) SetNillablePlan(u *user.Plan) *UserCreate
SetNillablePlan sets the "plan" field if the given value is not nil.
func (*UserCreate) SetNillableSecondAuth ¶
func (uc *UserCreate) SetNillableSecondAuth(b *bool) *UserCreate
SetNillableSecondAuth sets the "second_auth" field if the given value is not nil.
func (*UserCreate) SetNillableSn ¶
func (uc *UserCreate) SetNillableSn(s *string) *UserCreate
SetNillableSn sets the "sn" 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) SetNillableUpdateTime ¶
func (uc *UserCreate) SetNillableUpdateTime(t *time.Time) *UserCreate
SetNillableUpdateTime sets the "update_time" field if the given value is not nil.
func (*UserCreate) SetPassword ¶
func (uc *UserCreate) SetPassword(s string) *UserCreate
SetPassword sets the "password" field.
func (*UserCreate) SetPhone ¶
func (uc *UserCreate) SetPhone(s string) *UserCreate
SetPhone sets the "phone" field.
func (*UserCreate) SetPlan ¶
func (uc *UserCreate) SetPlan(u user.Plan) *UserCreate
SetPlan sets the "plan" field.
func (*UserCreate) SetSecondAuth ¶
func (uc *UserCreate) SetSecondAuth(b bool) *UserCreate
SetSecondAuth sets the "second_auth" field.
func (*UserCreate) SetSn ¶
func (uc *UserCreate) SetSn(s string) *UserCreate
SetSn sets the "sn" field.
func (*UserCreate) SetStatus ¶
func (uc *UserCreate) SetStatus(u user.Status) *UserCreate
SetStatus sets the "status" field.
func (*UserCreate) SetUpdateTime ¶
func (uc *UserCreate) SetUpdateTime(t time.Time) *UserCreate
SetUpdateTime sets the "update_time" field.
type UserCreateBulk ¶
type UserCreateBulk struct {
// contains filtered or unexported fields
}
UserCreateBulk is the builder for creating many User entities in bulk.
type UserDelete ¶
type UserDelete struct {
// contains filtered or unexported fields
}
UserDelete is the builder for deleting a User entity.
func (*UserDelete) Exec ¶
func (ud *UserDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*UserDelete) ExecX ¶
func (ud *UserDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*UserDelete) Where ¶
func (ud *UserDelete) Where(ps ...predicate.User) *UserDelete
Where adds a new predicate to the 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 UserEdges ¶
type UserEdges struct { // Groups holds the value of the groups edge. Groups []*UserGroup `json:"groups,omitempty"` // UserEmails holds the value of the UserEmails edge. UserEmails []*UserEmail `json:"emails,omitempty"` // UserSettings holds the value of the UserSettings edge. UserSettings []*UserSetting `json:"settings,omitempty"` // UserSecurityLogs holds the value of the UserSecurityLogs edge. UserSecurityLogs []*UserSecurityLog `json:"securityLogs,omitempty"` // contains filtered or unexported fields }
UserEdges holds the relations/edges for other nodes in the graph.
func (UserEdges) GroupsOrErr ¶
GroupsOrErr returns the Groups value or an error if the edge was not loaded in eager-loading.
func (UserEdges) UserEmailsOrErr ¶
UserEmailsOrErr returns the UserEmails value or an error if the edge was not loaded in eager-loading.
func (UserEdges) UserSecurityLogsOrErr ¶
func (e UserEdges) UserSecurityLogsOrErr() ([]*UserSecurityLog, error)
UserSecurityLogsOrErr returns the UserSecurityLogs value or an error if the edge was not loaded in eager-loading.
func (UserEdges) UserSettingsOrErr ¶
func (e UserEdges) UserSettingsOrErr() ([]*UserSetting, error)
UserSettingsOrErr returns the UserSettings value or an error if the edge was not loaded in eager-loading.
type UserEmail ¶
type UserEmail struct { // ID of the ent. ID int `json:"-"` // Sn holds the value of the "sn" field. Sn string `json:"sn,omitempty"` // OwnerID holds the value of the "owner_id" field. OwnerID int `json:"-"` // Email holds the value of the "email" field. Email string `json:"email,omitempty"` // VerifyTicket holds the value of the "verify_ticket" field. VerifyTicket *string `json:"-"` // VerifyTime holds the value of the "verify_time" field. VerifyTime *time.Time `json:"-"` // IsPrimary holds the value of the "is_primary" field. IsPrimary bool `json:"is_primary,omitempty"` // CreateTime holds the value of the "create_time" field. CreateTime time.Time `json:"-"` // UpdateTime holds the value of the "update_time" field. UpdateTime time.Time `json:"-"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the UserEmailQuery when eager-loading is set. Edges UserEmailEdges `json:"edges"` // contains filtered or unexported fields }
UserEmail is the model entity for the UserEmail schema.
func (*UserEmail) QueryEmailOwner ¶
QueryEmailOwner queries the "email_owner" edge of the UserEmail entity.
func (*UserEmail) Unwrap ¶
Unwrap unwraps the UserEmail 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 (*UserEmail) Update ¶
func (ue *UserEmail) Update() *UserEmailUpdateOne
Update returns a builder for updating this UserEmail. Note that you need to call UserEmail.Unwrap() before calling this method if this UserEmail was returned from a transaction, and the transaction was committed or rolled back.
type UserEmailClient ¶
type UserEmailClient struct {
// contains filtered or unexported fields
}
UserEmailClient is a client for the UserEmail schema.
func NewUserEmailClient ¶
func NewUserEmailClient(c config) *UserEmailClient
NewUserEmailClient returns a client for the UserEmail from the given config.
func (*UserEmailClient) Create ¶
func (c *UserEmailClient) Create() *UserEmailCreate
Create returns a create builder for UserEmail.
func (*UserEmailClient) CreateBulk ¶
func (c *UserEmailClient) CreateBulk(builders ...*UserEmailCreate) *UserEmailCreateBulk
CreateBulk returns a builder for creating a bulk of UserEmail entities.
func (*UserEmailClient) Delete ¶
func (c *UserEmailClient) Delete() *UserEmailDelete
Delete returns a delete builder for UserEmail.
func (*UserEmailClient) DeleteOne ¶
func (c *UserEmailClient) DeleteOne(ue *UserEmail) *UserEmailDeleteOne
DeleteOne returns a delete builder for the given entity.
func (*UserEmailClient) DeleteOneID ¶
func (c *UserEmailClient) DeleteOneID(id int) *UserEmailDeleteOne
DeleteOneID returns a delete builder for the given id.
func (*UserEmailClient) GetX ¶
func (c *UserEmailClient) GetX(ctx context.Context, id int) *UserEmail
GetX is like Get, but panics if an error occurs.
func (*UserEmailClient) Hooks ¶
func (c *UserEmailClient) Hooks() []Hook
Hooks returns the client hooks.
func (*UserEmailClient) Query ¶
func (c *UserEmailClient) Query() *UserEmailQuery
Query returns a query builder for UserEmail.
func (*UserEmailClient) QueryEmailOwner ¶
func (c *UserEmailClient) QueryEmailOwner(ue *UserEmail) *UserQuery
QueryEmailOwner queries the email_owner edge of a UserEmail.
func (*UserEmailClient) Update ¶
func (c *UserEmailClient) Update() *UserEmailUpdate
Update returns an update builder for UserEmail.
func (*UserEmailClient) UpdateOne ¶
func (c *UserEmailClient) UpdateOne(ue *UserEmail) *UserEmailUpdateOne
UpdateOne returns an update builder for the given entity.
func (*UserEmailClient) UpdateOneID ¶
func (c *UserEmailClient) UpdateOneID(id int) *UserEmailUpdateOne
UpdateOneID returns an update builder for the given id.
func (*UserEmailClient) Use ¶
func (c *UserEmailClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `useremail.Hooks(f(g(h())))`.
type UserEmailCreate ¶
type UserEmailCreate struct {
// contains filtered or unexported fields
}
UserEmailCreate is the builder for creating a UserEmail entity.
func (*UserEmailCreate) Mutation ¶
func (uec *UserEmailCreate) Mutation() *UserEmailMutation
Mutation returns the UserEmailMutation object of the builder.
func (*UserEmailCreate) Save ¶
func (uec *UserEmailCreate) Save(ctx context.Context) (*UserEmail, error)
Save creates the UserEmail in the database.
func (*UserEmailCreate) SaveX ¶
func (uec *UserEmailCreate) SaveX(ctx context.Context) *UserEmail
SaveX calls Save and panics if Save returns an error.
func (*UserEmailCreate) SetCreateTime ¶
func (uec *UserEmailCreate) SetCreateTime(t time.Time) *UserEmailCreate
SetCreateTime sets the "create_time" field.
func (*UserEmailCreate) SetEmail ¶
func (uec *UserEmailCreate) SetEmail(s string) *UserEmailCreate
SetEmail sets the "email" field.
func (*UserEmailCreate) SetEmailOwner ¶
func (uec *UserEmailCreate) SetEmailOwner(u *User) *UserEmailCreate
SetEmailOwner sets the "email_owner" edge to the User entity.
func (*UserEmailCreate) SetEmailOwnerID ¶
func (uec *UserEmailCreate) SetEmailOwnerID(id int) *UserEmailCreate
SetEmailOwnerID sets the "email_owner" edge to the User entity by ID.
func (*UserEmailCreate) SetID ¶
func (uec *UserEmailCreate) SetID(i int) *UserEmailCreate
SetID sets the "id" field.
func (*UserEmailCreate) SetIsPrimary ¶
func (uec *UserEmailCreate) SetIsPrimary(b bool) *UserEmailCreate
SetIsPrimary sets the "is_primary" field.
func (*UserEmailCreate) SetNillableCreateTime ¶
func (uec *UserEmailCreate) SetNillableCreateTime(t *time.Time) *UserEmailCreate
SetNillableCreateTime sets the "create_time" field if the given value is not nil.
func (*UserEmailCreate) SetNillableIsPrimary ¶
func (uec *UserEmailCreate) SetNillableIsPrimary(b *bool) *UserEmailCreate
SetNillableIsPrimary sets the "is_primary" field if the given value is not nil.
func (*UserEmailCreate) SetNillableSn ¶
func (uec *UserEmailCreate) SetNillableSn(s *string) *UserEmailCreate
SetNillableSn sets the "sn" field if the given value is not nil.
func (*UserEmailCreate) SetNillableUpdateTime ¶
func (uec *UserEmailCreate) SetNillableUpdateTime(t *time.Time) *UserEmailCreate
SetNillableUpdateTime sets the "update_time" field if the given value is not nil.
func (*UserEmailCreate) SetNillableVerifyTicket ¶
func (uec *UserEmailCreate) SetNillableVerifyTicket(s *string) *UserEmailCreate
SetNillableVerifyTicket sets the "verify_ticket" field if the given value is not nil.
func (*UserEmailCreate) SetNillableVerifyTime ¶
func (uec *UserEmailCreate) SetNillableVerifyTime(t *time.Time) *UserEmailCreate
SetNillableVerifyTime sets the "verify_time" field if the given value is not nil.
func (*UserEmailCreate) SetOwnerID ¶
func (uec *UserEmailCreate) SetOwnerID(i int) *UserEmailCreate
SetOwnerID sets the "owner_id" field.
func (*UserEmailCreate) SetSn ¶
func (uec *UserEmailCreate) SetSn(s string) *UserEmailCreate
SetSn sets the "sn" field.
func (*UserEmailCreate) SetUpdateTime ¶
func (uec *UserEmailCreate) SetUpdateTime(t time.Time) *UserEmailCreate
SetUpdateTime sets the "update_time" field.
func (*UserEmailCreate) SetVerifyTicket ¶
func (uec *UserEmailCreate) SetVerifyTicket(s string) *UserEmailCreate
SetVerifyTicket sets the "verify_ticket" field.
func (*UserEmailCreate) SetVerifyTime ¶
func (uec *UserEmailCreate) SetVerifyTime(t time.Time) *UserEmailCreate
SetVerifyTime sets the "verify_time" field.
type UserEmailCreateBulk ¶
type UserEmailCreateBulk struct {
// contains filtered or unexported fields
}
UserEmailCreateBulk is the builder for creating many UserEmail entities in bulk.
type UserEmailDelete ¶
type UserEmailDelete struct {
// contains filtered or unexported fields
}
UserEmailDelete is the builder for deleting a UserEmail entity.
func (*UserEmailDelete) Exec ¶
func (ued *UserEmailDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*UserEmailDelete) ExecX ¶
func (ued *UserEmailDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*UserEmailDelete) Where ¶
func (ued *UserEmailDelete) Where(ps ...predicate.UserEmail) *UserEmailDelete
Where adds a new predicate to the UserEmailDelete builder.
type UserEmailDeleteOne ¶
type UserEmailDeleteOne struct {
// contains filtered or unexported fields
}
UserEmailDeleteOne is the builder for deleting a single UserEmail entity.
func (*UserEmailDeleteOne) Exec ¶
func (uedo *UserEmailDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*UserEmailDeleteOne) ExecX ¶
func (uedo *UserEmailDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type UserEmailEdges ¶
type UserEmailEdges struct { // EmailOwner holds the value of the email_owner edge. EmailOwner *User `json:"owner,omitempty"` // contains filtered or unexported fields }
UserEmailEdges holds the relations/edges for other nodes in the graph.
func (UserEmailEdges) EmailOwnerOrErr ¶
func (e UserEmailEdges) EmailOwnerOrErr() (*User, error)
EmailOwnerOrErr returns the EmailOwner value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type UserEmailGroupBy ¶
type UserEmailGroupBy struct {
// contains filtered or unexported fields
}
UserEmailGroupBy is the group-by builder for UserEmail entities.
func (*UserEmailGroupBy) Aggregate ¶
func (uegb *UserEmailGroupBy) Aggregate(fns ...AggregateFunc) *UserEmailGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*UserEmailGroupBy) Bool ¶
func (uegb *UserEmailGroupBy) 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 (*UserEmailGroupBy) BoolX ¶
func (uegb *UserEmailGroupBy) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*UserEmailGroupBy) Bools ¶
func (uegb *UserEmailGroupBy) 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 (*UserEmailGroupBy) BoolsX ¶
func (uegb *UserEmailGroupBy) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*UserEmailGroupBy) Float64 ¶
func (uegb *UserEmailGroupBy) 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 (*UserEmailGroupBy) Float64X ¶
func (uegb *UserEmailGroupBy) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*UserEmailGroupBy) Float64s ¶
func (uegb *UserEmailGroupBy) 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 (*UserEmailGroupBy) Float64sX ¶
func (uegb *UserEmailGroupBy) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*UserEmailGroupBy) Int ¶
func (uegb *UserEmailGroupBy) 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 (*UserEmailGroupBy) IntX ¶
func (uegb *UserEmailGroupBy) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*UserEmailGroupBy) Ints ¶
func (uegb *UserEmailGroupBy) 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 (*UserEmailGroupBy) IntsX ¶
func (uegb *UserEmailGroupBy) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*UserEmailGroupBy) Scan ¶
func (uegb *UserEmailGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scans the result into the given value.
func (*UserEmailGroupBy) ScanX ¶
func (uegb *UserEmailGroupBy) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*UserEmailGroupBy) String ¶
func (uegb *UserEmailGroupBy) 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 (*UserEmailGroupBy) StringX ¶
func (uegb *UserEmailGroupBy) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type UserEmailMutation ¶
type UserEmailMutation struct {
// contains filtered or unexported fields
}
UserEmailMutation represents an operation that mutates the UserEmail nodes in the graph.
func (*UserEmailMutation) AddField ¶
func (m *UserEmailMutation) 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 (*UserEmailMutation) AddedEdges ¶
func (m *UserEmailMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*UserEmailMutation) AddedField ¶
func (m *UserEmailMutation) 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 (*UserEmailMutation) AddedFields ¶
func (m *UserEmailMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*UserEmailMutation) AddedIDs ¶
func (m *UserEmailMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*UserEmailMutation) ClearEdge ¶
func (m *UserEmailMutation) 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 (*UserEmailMutation) ClearEmailOwner ¶
func (m *UserEmailMutation) ClearEmailOwner()
ClearEmailOwner clears the "email_owner" edge to the User entity.
func (*UserEmailMutation) ClearField ¶
func (m *UserEmailMutation) 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 (*UserEmailMutation) ClearVerifyTicket ¶
func (m *UserEmailMutation) ClearVerifyTicket()
ClearVerifyTicket clears the value of the "verify_ticket" field.
func (*UserEmailMutation) ClearVerifyTime ¶
func (m *UserEmailMutation) ClearVerifyTime()
ClearVerifyTime clears the value of the "verify_time" field.
func (*UserEmailMutation) ClearedEdges ¶
func (m *UserEmailMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*UserEmailMutation) ClearedFields ¶
func (m *UserEmailMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (UserEmailMutation) Client ¶
func (m UserEmailMutation) 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 (*UserEmailMutation) CreateTime ¶
func (m *UserEmailMutation) CreateTime() (r time.Time, exists bool)
CreateTime returns the value of the "create_time" field in the mutation.
func (*UserEmailMutation) EdgeCleared ¶
func (m *UserEmailMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*UserEmailMutation) Email ¶
func (m *UserEmailMutation) Email() (r string, exists bool)
Email returns the value of the "email" field in the mutation.
func (*UserEmailMutation) EmailOwnerCleared ¶
func (m *UserEmailMutation) EmailOwnerCleared() bool
EmailOwnerCleared reports if the "email_owner" edge to the User entity was cleared.
func (*UserEmailMutation) EmailOwnerID ¶
func (m *UserEmailMutation) EmailOwnerID() (id int, exists bool)
EmailOwnerID returns the "email_owner" edge ID in the mutation.
func (*UserEmailMutation) EmailOwnerIDs ¶
func (m *UserEmailMutation) EmailOwnerIDs() (ids []int)
EmailOwnerIDs returns the "email_owner" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use EmailOwnerID instead. It exists only for internal usage by the builders.
func (*UserEmailMutation) Field ¶
func (m *UserEmailMutation) 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 (*UserEmailMutation) FieldCleared ¶
func (m *UserEmailMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*UserEmailMutation) Fields ¶
func (m *UserEmailMutation) 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 (*UserEmailMutation) ID ¶
func (m *UserEmailMutation) 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.
func (*UserEmailMutation) IsPrimary ¶
func (m *UserEmailMutation) IsPrimary() (r bool, exists bool)
IsPrimary returns the value of the "is_primary" field in the mutation.
func (*UserEmailMutation) OldCreateTime ¶
OldCreateTime returns the old "create_time" field's value of the UserEmail entity. If the UserEmail 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 (*UserEmailMutation) OldEmail ¶
func (m *UserEmailMutation) OldEmail(ctx context.Context) (v string, err error)
OldEmail returns the old "email" field's value of the UserEmail entity. If the UserEmail 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 (*UserEmailMutation) 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 (*UserEmailMutation) OldIsPrimary ¶
func (m *UserEmailMutation) OldIsPrimary(ctx context.Context) (v bool, err error)
OldIsPrimary returns the old "is_primary" field's value of the UserEmail entity. If the UserEmail 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 (*UserEmailMutation) OldOwnerID ¶
func (m *UserEmailMutation) OldOwnerID(ctx context.Context) (v int, err error)
OldOwnerID returns the old "owner_id" field's value of the UserEmail entity. If the UserEmail 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 (*UserEmailMutation) OldSn ¶
func (m *UserEmailMutation) OldSn(ctx context.Context) (v string, err error)
OldSn returns the old "sn" field's value of the UserEmail entity. If the UserEmail 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 (*UserEmailMutation) OldUpdateTime ¶
OldUpdateTime returns the old "update_time" field's value of the UserEmail entity. If the UserEmail 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 (*UserEmailMutation) OldVerifyTicket ¶
func (m *UserEmailMutation) OldVerifyTicket(ctx context.Context) (v *string, err error)
OldVerifyTicket returns the old "verify_ticket" field's value of the UserEmail entity. If the UserEmail 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 (*UserEmailMutation) OldVerifyTime ¶
OldVerifyTime returns the old "verify_time" field's value of the UserEmail entity. If the UserEmail 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 (*UserEmailMutation) OwnerID ¶
func (m *UserEmailMutation) OwnerID() (r int, exists bool)
OwnerID returns the value of the "owner_id" field in the mutation.
func (*UserEmailMutation) RemovedEdges ¶
func (m *UserEmailMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*UserEmailMutation) RemovedIDs ¶
func (m *UserEmailMutation) 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 (*UserEmailMutation) ResetCreateTime ¶
func (m *UserEmailMutation) ResetCreateTime()
ResetCreateTime resets all changes to the "create_time" field.
func (*UserEmailMutation) ResetEdge ¶
func (m *UserEmailMutation) 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 (*UserEmailMutation) ResetEmail ¶
func (m *UserEmailMutation) ResetEmail()
ResetEmail resets all changes to the "email" field.
func (*UserEmailMutation) ResetEmailOwner ¶
func (m *UserEmailMutation) ResetEmailOwner()
ResetEmailOwner resets all changes to the "email_owner" edge.
func (*UserEmailMutation) ResetField ¶
func (m *UserEmailMutation) 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 (*UserEmailMutation) ResetIsPrimary ¶
func (m *UserEmailMutation) ResetIsPrimary()
ResetIsPrimary resets all changes to the "is_primary" field.
func (*UserEmailMutation) ResetOwnerID ¶
func (m *UserEmailMutation) ResetOwnerID()
ResetOwnerID resets all changes to the "owner_id" field.
func (*UserEmailMutation) ResetSn ¶
func (m *UserEmailMutation) ResetSn()
ResetSn resets all changes to the "sn" field.
func (*UserEmailMutation) ResetUpdateTime ¶
func (m *UserEmailMutation) ResetUpdateTime()
ResetUpdateTime resets all changes to the "update_time" field.
func (*UserEmailMutation) ResetVerifyTicket ¶
func (m *UserEmailMutation) ResetVerifyTicket()
ResetVerifyTicket resets all changes to the "verify_ticket" field.
func (*UserEmailMutation) ResetVerifyTime ¶
func (m *UserEmailMutation) ResetVerifyTime()
ResetVerifyTime resets all changes to the "verify_time" field.
func (*UserEmailMutation) SetCreateTime ¶
func (m *UserEmailMutation) SetCreateTime(t time.Time)
SetCreateTime sets the "create_time" field.
func (*UserEmailMutation) SetEmail ¶
func (m *UserEmailMutation) SetEmail(s string)
SetEmail sets the "email" field.
func (*UserEmailMutation) SetEmailOwnerID ¶
func (m *UserEmailMutation) SetEmailOwnerID(id int)
SetEmailOwnerID sets the "email_owner" edge to the User entity by id.
func (*UserEmailMutation) SetField ¶
func (m *UserEmailMutation) 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 (*UserEmailMutation) SetID ¶
func (m *UserEmailMutation) SetID(id int)
SetID sets the value of the id field. Note that this operation is only accepted on creation of UserEmail entities.
func (*UserEmailMutation) SetIsPrimary ¶
func (m *UserEmailMutation) SetIsPrimary(b bool)
SetIsPrimary sets the "is_primary" field.
func (*UserEmailMutation) SetOwnerID ¶
func (m *UserEmailMutation) SetOwnerID(i int)
SetOwnerID sets the "owner_id" field.
func (*UserEmailMutation) SetSn ¶
func (m *UserEmailMutation) SetSn(s string)
SetSn sets the "sn" field.
func (*UserEmailMutation) SetUpdateTime ¶
func (m *UserEmailMutation) SetUpdateTime(t time.Time)
SetUpdateTime sets the "update_time" field.
func (*UserEmailMutation) SetVerifyTicket ¶
func (m *UserEmailMutation) SetVerifyTicket(s string)
SetVerifyTicket sets the "verify_ticket" field.
func (*UserEmailMutation) SetVerifyTime ¶
func (m *UserEmailMutation) SetVerifyTime(t time.Time)
SetVerifyTime sets the "verify_time" field.
func (*UserEmailMutation) Sn ¶
func (m *UserEmailMutation) Sn() (r string, exists bool)
Sn returns the value of the "sn" field in the mutation.
func (UserEmailMutation) Tx ¶
func (m UserEmailMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*UserEmailMutation) Type ¶
func (m *UserEmailMutation) Type() string
Type returns the node type of this mutation (UserEmail).
func (*UserEmailMutation) UpdateTime ¶
func (m *UserEmailMutation) UpdateTime() (r time.Time, exists bool)
UpdateTime returns the value of the "update_time" field in the mutation.
func (*UserEmailMutation) VerifyTicket ¶
func (m *UserEmailMutation) VerifyTicket() (r string, exists bool)
VerifyTicket returns the value of the "verify_ticket" field in the mutation.
func (*UserEmailMutation) VerifyTicketCleared ¶
func (m *UserEmailMutation) VerifyTicketCleared() bool
VerifyTicketCleared returns if the "verify_ticket" field was cleared in this mutation.
func (*UserEmailMutation) VerifyTime ¶
func (m *UserEmailMutation) VerifyTime() (r time.Time, exists bool)
VerifyTime returns the value of the "verify_time" field in the mutation.
func (*UserEmailMutation) VerifyTimeCleared ¶
func (m *UserEmailMutation) VerifyTimeCleared() bool
VerifyTimeCleared returns if the "verify_time" field was cleared in this mutation.
type UserEmailQuery ¶
type UserEmailQuery struct {
// contains filtered or unexported fields
}
UserEmailQuery is the builder for querying UserEmail entities.
func (*UserEmailQuery) All ¶
func (ueq *UserEmailQuery) All(ctx context.Context) ([]*UserEmail, error)
All executes the query and returns a list of UserEmails.
func (*UserEmailQuery) AllX ¶
func (ueq *UserEmailQuery) AllX(ctx context.Context) []*UserEmail
AllX is like All, but panics if an error occurs.
func (*UserEmailQuery) Clone ¶
func (ueq *UserEmailQuery) Clone() *UserEmailQuery
Clone returns a duplicate of the UserEmailQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*UserEmailQuery) Count ¶
func (ueq *UserEmailQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*UserEmailQuery) CountX ¶
func (ueq *UserEmailQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*UserEmailQuery) Exist ¶
func (ueq *UserEmailQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*UserEmailQuery) ExistX ¶
func (ueq *UserEmailQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*UserEmailQuery) First ¶
func (ueq *UserEmailQuery) First(ctx context.Context) (*UserEmail, error)
First returns the first UserEmail entity from the query. Returns a *NotFoundError when no UserEmail was found.
func (*UserEmailQuery) FirstID ¶
func (ueq *UserEmailQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first UserEmail ID from the query. Returns a *NotFoundError when no UserEmail ID was found.
func (*UserEmailQuery) FirstIDX ¶
func (ueq *UserEmailQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*UserEmailQuery) FirstX ¶
func (ueq *UserEmailQuery) FirstX(ctx context.Context) *UserEmail
FirstX is like First, but panics if an error occurs.
func (*UserEmailQuery) GroupBy ¶
func (ueq *UserEmailQuery) GroupBy(field string, fields ...string) *UserEmailGroupBy
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 { Sn string `json:"sn,omitempty"` Count int `json:"count,omitempty"` } client.UserEmail.Query(). GroupBy(useremail.FieldSn). Aggregate(model.Count()). Scan(ctx, &v)
func (*UserEmailQuery) IDs ¶
func (ueq *UserEmailQuery) IDs(ctx context.Context) ([]int, error)
IDs executes the query and returns a list of UserEmail IDs.
func (*UserEmailQuery) IDsX ¶
func (ueq *UserEmailQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*UserEmailQuery) Limit ¶
func (ueq *UserEmailQuery) Limit(limit int) *UserEmailQuery
Limit adds a limit step to the query.
func (*UserEmailQuery) Offset ¶
func (ueq *UserEmailQuery) Offset(offset int) *UserEmailQuery
Offset adds an offset step to the query.
func (*UserEmailQuery) Only ¶
func (ueq *UserEmailQuery) Only(ctx context.Context) (*UserEmail, error)
Only returns a single UserEmail entity found by the query, ensuring it only returns one. Returns a *NotSingularError when exactly one UserEmail entity is not found. Returns a *NotFoundError when no UserEmail entities are found.
func (*UserEmailQuery) OnlyID ¶
func (ueq *UserEmailQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only UserEmail ID in the query. Returns a *NotSingularError when exactly one UserEmail ID is not found. Returns a *NotFoundError when no entities are found.
func (*UserEmailQuery) OnlyIDX ¶
func (ueq *UserEmailQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*UserEmailQuery) OnlyX ¶
func (ueq *UserEmailQuery) OnlyX(ctx context.Context) *UserEmail
OnlyX is like Only, but panics if an error occurs.
func (*UserEmailQuery) Order ¶
func (ueq *UserEmailQuery) Order(o ...OrderFunc) *UserEmailQuery
Order adds an order step to the query.
func (*UserEmailQuery) QueryEmailOwner ¶
func (ueq *UserEmailQuery) QueryEmailOwner() *UserQuery
QueryEmailOwner chains the current query on the "email_owner" edge.
func (*UserEmailQuery) Select ¶
func (ueq *UserEmailQuery) Select(field string, fields ...string) *UserEmailSelect
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 { Sn string `json:"sn,omitempty"` } client.UserEmail.Query(). Select(useremail.FieldSn). Scan(ctx, &v)
func (*UserEmailQuery) Unique ¶
func (ueq *UserEmailQuery) Unique(unique bool) *UserEmailQuery
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 (*UserEmailQuery) Where ¶
func (ueq *UserEmailQuery) Where(ps ...predicate.UserEmail) *UserEmailQuery
Where adds a new predicate for the UserEmailQuery builder.
func (*UserEmailQuery) WithEmailOwner ¶
func (ueq *UserEmailQuery) WithEmailOwner(opts ...func(*UserQuery)) *UserEmailQuery
WithEmailOwner tells the query-builder to eager-load the nodes that are connected to the "email_owner" edge. The optional arguments are used to configure the query builder of the edge.
type UserEmailSelect ¶
type UserEmailSelect struct { *UserEmailQuery // contains filtered or unexported fields }
UserEmailSelect is the builder for selecting fields of UserEmail entities.
func (*UserEmailSelect) Bool ¶
func (ues *UserEmailSelect) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*UserEmailSelect) BoolX ¶
func (ues *UserEmailSelect) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*UserEmailSelect) Bools ¶
func (ues *UserEmailSelect) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*UserEmailSelect) BoolsX ¶
func (ues *UserEmailSelect) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*UserEmailSelect) Float64 ¶
func (ues *UserEmailSelect) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*UserEmailSelect) Float64X ¶
func (ues *UserEmailSelect) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*UserEmailSelect) Float64s ¶
func (ues *UserEmailSelect) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*UserEmailSelect) Float64sX ¶
func (ues *UserEmailSelect) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*UserEmailSelect) Int ¶
func (ues *UserEmailSelect) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*UserEmailSelect) IntX ¶
func (ues *UserEmailSelect) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*UserEmailSelect) Ints ¶
func (ues *UserEmailSelect) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*UserEmailSelect) IntsX ¶
func (ues *UserEmailSelect) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*UserEmailSelect) Scan ¶
func (ues *UserEmailSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scans the result into the given value.
func (*UserEmailSelect) ScanX ¶
func (ues *UserEmailSelect) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*UserEmailSelect) String ¶
func (ues *UserEmailSelect) String(ctx context.Context) (_ string, err error)
String returns a single string from a selector. It is only allowed when selecting one field.
func (*UserEmailSelect) StringX ¶
func (ues *UserEmailSelect) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type UserEmailUpdate ¶
type UserEmailUpdate struct {
// contains filtered or unexported fields
}
UserEmailUpdate is the builder for updating UserEmail entities.
func (*UserEmailUpdate) ClearEmailOwner ¶
func (ueu *UserEmailUpdate) ClearEmailOwner() *UserEmailUpdate
ClearEmailOwner clears the "email_owner" edge to the User entity.
func (*UserEmailUpdate) ClearVerifyTicket ¶
func (ueu *UserEmailUpdate) ClearVerifyTicket() *UserEmailUpdate
ClearVerifyTicket clears the value of the "verify_ticket" field.
func (*UserEmailUpdate) ClearVerifyTime ¶
func (ueu *UserEmailUpdate) ClearVerifyTime() *UserEmailUpdate
ClearVerifyTime clears the value of the "verify_time" field.
func (*UserEmailUpdate) Exec ¶
func (ueu *UserEmailUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*UserEmailUpdate) ExecX ¶
func (ueu *UserEmailUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserEmailUpdate) Mutation ¶
func (ueu *UserEmailUpdate) Mutation() *UserEmailMutation
Mutation returns the UserEmailMutation object of the builder.
func (*UserEmailUpdate) Save ¶
func (ueu *UserEmailUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*UserEmailUpdate) SaveX ¶
func (ueu *UserEmailUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*UserEmailUpdate) SetEmail ¶
func (ueu *UserEmailUpdate) SetEmail(s string) *UserEmailUpdate
SetEmail sets the "email" field.
func (*UserEmailUpdate) SetEmailOwner ¶
func (ueu *UserEmailUpdate) SetEmailOwner(u *User) *UserEmailUpdate
SetEmailOwner sets the "email_owner" edge to the User entity.
func (*UserEmailUpdate) SetEmailOwnerID ¶
func (ueu *UserEmailUpdate) SetEmailOwnerID(id int) *UserEmailUpdate
SetEmailOwnerID sets the "email_owner" edge to the User entity by ID.
func (*UserEmailUpdate) SetIsPrimary ¶
func (ueu *UserEmailUpdate) SetIsPrimary(b bool) *UserEmailUpdate
SetIsPrimary sets the "is_primary" field.
func (*UserEmailUpdate) SetNillableIsPrimary ¶
func (ueu *UserEmailUpdate) SetNillableIsPrimary(b *bool) *UserEmailUpdate
SetNillableIsPrimary sets the "is_primary" field if the given value is not nil.
func (*UserEmailUpdate) SetNillableVerifyTicket ¶
func (ueu *UserEmailUpdate) SetNillableVerifyTicket(s *string) *UserEmailUpdate
SetNillableVerifyTicket sets the "verify_ticket" field if the given value is not nil.
func (*UserEmailUpdate) SetNillableVerifyTime ¶
func (ueu *UserEmailUpdate) SetNillableVerifyTime(t *time.Time) *UserEmailUpdate
SetNillableVerifyTime sets the "verify_time" field if the given value is not nil.
func (*UserEmailUpdate) SetOwnerID ¶
func (ueu *UserEmailUpdate) SetOwnerID(i int) *UserEmailUpdate
SetOwnerID sets the "owner_id" field.
func (*UserEmailUpdate) SetUpdateTime ¶
func (ueu *UserEmailUpdate) SetUpdateTime(t time.Time) *UserEmailUpdate
SetUpdateTime sets the "update_time" field.
func (*UserEmailUpdate) SetVerifyTicket ¶
func (ueu *UserEmailUpdate) SetVerifyTicket(s string) *UserEmailUpdate
SetVerifyTicket sets the "verify_ticket" field.
func (*UserEmailUpdate) SetVerifyTime ¶
func (ueu *UserEmailUpdate) SetVerifyTime(t time.Time) *UserEmailUpdate
SetVerifyTime sets the "verify_time" field.
func (*UserEmailUpdate) Where ¶
func (ueu *UserEmailUpdate) Where(ps ...predicate.UserEmail) *UserEmailUpdate
Where adds a new predicate for the UserEmailUpdate builder.
type UserEmailUpdateOne ¶
type UserEmailUpdateOne struct {
// contains filtered or unexported fields
}
UserEmailUpdateOne is the builder for updating a single UserEmail entity.
func (*UserEmailUpdateOne) ClearEmailOwner ¶
func (ueuo *UserEmailUpdateOne) ClearEmailOwner() *UserEmailUpdateOne
ClearEmailOwner clears the "email_owner" edge to the User entity.
func (*UserEmailUpdateOne) ClearVerifyTicket ¶
func (ueuo *UserEmailUpdateOne) ClearVerifyTicket() *UserEmailUpdateOne
ClearVerifyTicket clears the value of the "verify_ticket" field.
func (*UserEmailUpdateOne) ClearVerifyTime ¶
func (ueuo *UserEmailUpdateOne) ClearVerifyTime() *UserEmailUpdateOne
ClearVerifyTime clears the value of the "verify_time" field.
func (*UserEmailUpdateOne) Exec ¶
func (ueuo *UserEmailUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*UserEmailUpdateOne) ExecX ¶
func (ueuo *UserEmailUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserEmailUpdateOne) Mutation ¶
func (ueuo *UserEmailUpdateOne) Mutation() *UserEmailMutation
Mutation returns the UserEmailMutation object of the builder.
func (*UserEmailUpdateOne) Save ¶
func (ueuo *UserEmailUpdateOne) Save(ctx context.Context) (*UserEmail, error)
Save executes the query and returns the updated UserEmail entity.
func (*UserEmailUpdateOne) SaveX ¶
func (ueuo *UserEmailUpdateOne) SaveX(ctx context.Context) *UserEmail
SaveX is like Save, but panics if an error occurs.
func (*UserEmailUpdateOne) Select ¶
func (ueuo *UserEmailUpdateOne) Select(field string, fields ...string) *UserEmailUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*UserEmailUpdateOne) SetEmail ¶
func (ueuo *UserEmailUpdateOne) SetEmail(s string) *UserEmailUpdateOne
SetEmail sets the "email" field.
func (*UserEmailUpdateOne) SetEmailOwner ¶
func (ueuo *UserEmailUpdateOne) SetEmailOwner(u *User) *UserEmailUpdateOne
SetEmailOwner sets the "email_owner" edge to the User entity.
func (*UserEmailUpdateOne) SetEmailOwnerID ¶
func (ueuo *UserEmailUpdateOne) SetEmailOwnerID(id int) *UserEmailUpdateOne
SetEmailOwnerID sets the "email_owner" edge to the User entity by ID.
func (*UserEmailUpdateOne) SetIsPrimary ¶
func (ueuo *UserEmailUpdateOne) SetIsPrimary(b bool) *UserEmailUpdateOne
SetIsPrimary sets the "is_primary" field.
func (*UserEmailUpdateOne) SetNillableIsPrimary ¶
func (ueuo *UserEmailUpdateOne) SetNillableIsPrimary(b *bool) *UserEmailUpdateOne
SetNillableIsPrimary sets the "is_primary" field if the given value is not nil.
func (*UserEmailUpdateOne) SetNillableVerifyTicket ¶
func (ueuo *UserEmailUpdateOne) SetNillableVerifyTicket(s *string) *UserEmailUpdateOne
SetNillableVerifyTicket sets the "verify_ticket" field if the given value is not nil.
func (*UserEmailUpdateOne) SetNillableVerifyTime ¶
func (ueuo *UserEmailUpdateOne) SetNillableVerifyTime(t *time.Time) *UserEmailUpdateOne
SetNillableVerifyTime sets the "verify_time" field if the given value is not nil.
func (*UserEmailUpdateOne) SetOwnerID ¶
func (ueuo *UserEmailUpdateOne) SetOwnerID(i int) *UserEmailUpdateOne
SetOwnerID sets the "owner_id" field.
func (*UserEmailUpdateOne) SetUpdateTime ¶
func (ueuo *UserEmailUpdateOne) SetUpdateTime(t time.Time) *UserEmailUpdateOne
SetUpdateTime sets the "update_time" field.
func (*UserEmailUpdateOne) SetVerifyTicket ¶
func (ueuo *UserEmailUpdateOne) SetVerifyTicket(s string) *UserEmailUpdateOne
SetVerifyTicket sets the "verify_ticket" field.
func (*UserEmailUpdateOne) SetVerifyTime ¶
func (ueuo *UserEmailUpdateOne) SetVerifyTime(t time.Time) *UserEmailUpdateOne
SetVerifyTime sets the "verify_time" field.
type UserGroup ¶
type UserGroup struct { // ID of the ent. ID int `json:"-"` // Sn holds the value of the "sn" field. Sn string `json:"sn,omitempty"` // Name holds the value of the "name" field. Name string `json:"name,omitempty"` // AvatarURL holds the value of the "avatar_url" field. AvatarURL *string `json:"avatar_url,omitempty"` // Address holds the value of the "address" field. Address *string `json:"address,omitempty"` // Homepage holds the value of the "homepage" field. Homepage *string `json:"homepage,omitempty"` // CreateTime holds the value of the "create_time" field. CreateTime time.Time `json:"-"` // UpdateTime holds the value of the "update_time" field. UpdateTime time.Time `json:"-"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the UserGroupQuery when eager-loading is set. Edges UserGroupEdges `json:"edges"` // contains filtered or unexported fields }
UserGroup is the model entity for the UserGroup schema.
func (*UserGroup) QueryUsers ¶
QueryUsers queries the "users" edge of the UserGroup entity.
func (*UserGroup) Unwrap ¶
Unwrap unwraps the UserGroup 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 (*UserGroup) Update ¶
func (ug *UserGroup) Update() *UserGroupUpdateOne
Update returns a builder for updating this UserGroup. Note that you need to call UserGroup.Unwrap() before calling this method if this UserGroup was returned from a transaction, and the transaction was committed or rolled back.
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 UserGroupClient ¶
type UserGroupClient struct {
// contains filtered or unexported fields
}
UserGroupClient is a client for the UserGroup schema.
func NewUserGroupClient ¶
func NewUserGroupClient(c config) *UserGroupClient
NewUserGroupClient returns a client for the UserGroup from the given config.
func (*UserGroupClient) Create ¶
func (c *UserGroupClient) Create() *UserGroupCreate
Create returns a create builder for UserGroup.
func (*UserGroupClient) CreateBulk ¶
func (c *UserGroupClient) CreateBulk(builders ...*UserGroupCreate) *UserGroupCreateBulk
CreateBulk returns a builder for creating a bulk of UserGroup entities.
func (*UserGroupClient) Delete ¶
func (c *UserGroupClient) Delete() *UserGroupDelete
Delete returns a delete builder for UserGroup.
func (*UserGroupClient) DeleteOne ¶
func (c *UserGroupClient) DeleteOne(ug *UserGroup) *UserGroupDeleteOne
DeleteOne returns a delete builder for the given entity.
func (*UserGroupClient) DeleteOneID ¶
func (c *UserGroupClient) DeleteOneID(id int) *UserGroupDeleteOne
DeleteOneID returns a delete builder for the given id.
func (*UserGroupClient) GetX ¶
func (c *UserGroupClient) GetX(ctx context.Context, id int) *UserGroup
GetX is like Get, but panics if an error occurs.
func (*UserGroupClient) Hooks ¶
func (c *UserGroupClient) Hooks() []Hook
Hooks returns the client hooks.
func (*UserGroupClient) Query ¶
func (c *UserGroupClient) Query() *UserGroupQuery
Query returns a query builder for UserGroup.
func (*UserGroupClient) QueryUsers ¶
func (c *UserGroupClient) QueryUsers(ug *UserGroup) *UserQuery
QueryUsers queries the users edge of a UserGroup.
func (*UserGroupClient) Update ¶
func (c *UserGroupClient) Update() *UserGroupUpdate
Update returns an update builder for UserGroup.
func (*UserGroupClient) UpdateOne ¶
func (c *UserGroupClient) UpdateOne(ug *UserGroup) *UserGroupUpdateOne
UpdateOne returns an update builder for the given entity.
func (*UserGroupClient) UpdateOneID ¶
func (c *UserGroupClient) UpdateOneID(id int) *UserGroupUpdateOne
UpdateOneID returns an update builder for the given id.
func (*UserGroupClient) Use ¶
func (c *UserGroupClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `usergroup.Hooks(f(g(h())))`.
type UserGroupCreate ¶
type UserGroupCreate struct {
// contains filtered or unexported fields
}
UserGroupCreate is the builder for creating a UserGroup entity.
func (*UserGroupCreate) AddUserIDs ¶
func (ugc *UserGroupCreate) AddUserIDs(ids ...int) *UserGroupCreate
AddUserIDs adds the "users" edge to the User entity by IDs.
func (*UserGroupCreate) AddUsers ¶
func (ugc *UserGroupCreate) AddUsers(u ...*User) *UserGroupCreate
AddUsers adds the "users" edges to the User entity.
func (*UserGroupCreate) Mutation ¶
func (ugc *UserGroupCreate) Mutation() *UserGroupMutation
Mutation returns the UserGroupMutation object of the builder.
func (*UserGroupCreate) Save ¶
func (ugc *UserGroupCreate) Save(ctx context.Context) (*UserGroup, error)
Save creates the UserGroup in the database.
func (*UserGroupCreate) SaveX ¶
func (ugc *UserGroupCreate) SaveX(ctx context.Context) *UserGroup
SaveX calls Save and panics if Save returns an error.
func (*UserGroupCreate) SetAddress ¶
func (ugc *UserGroupCreate) SetAddress(s string) *UserGroupCreate
SetAddress sets the "address" field.
func (*UserGroupCreate) SetAvatarURL ¶
func (ugc *UserGroupCreate) SetAvatarURL(s string) *UserGroupCreate
SetAvatarURL sets the "avatar_url" field.
func (*UserGroupCreate) SetCreateTime ¶
func (ugc *UserGroupCreate) SetCreateTime(t time.Time) *UserGroupCreate
SetCreateTime sets the "create_time" field.
func (*UserGroupCreate) SetHomepage ¶
func (ugc *UserGroupCreate) SetHomepage(s string) *UserGroupCreate
SetHomepage sets the "homepage" field.
func (*UserGroupCreate) SetID ¶
func (ugc *UserGroupCreate) SetID(i int) *UserGroupCreate
SetID sets the "id" field.
func (*UserGroupCreate) SetName ¶
func (ugc *UserGroupCreate) SetName(s string) *UserGroupCreate
SetName sets the "name" field.
func (*UserGroupCreate) SetNillableAddress ¶
func (ugc *UserGroupCreate) SetNillableAddress(s *string) *UserGroupCreate
SetNillableAddress sets the "address" field if the given value is not nil.
func (*UserGroupCreate) SetNillableAvatarURL ¶
func (ugc *UserGroupCreate) SetNillableAvatarURL(s *string) *UserGroupCreate
SetNillableAvatarURL sets the "avatar_url" field if the given value is not nil.
func (*UserGroupCreate) SetNillableCreateTime ¶
func (ugc *UserGroupCreate) SetNillableCreateTime(t *time.Time) *UserGroupCreate
SetNillableCreateTime sets the "create_time" field if the given value is not nil.
func (*UserGroupCreate) SetNillableHomepage ¶
func (ugc *UserGroupCreate) SetNillableHomepage(s *string) *UserGroupCreate
SetNillableHomepage sets the "homepage" field if the given value is not nil.
func (*UserGroupCreate) SetNillableSn ¶
func (ugc *UserGroupCreate) SetNillableSn(s *string) *UserGroupCreate
SetNillableSn sets the "sn" field if the given value is not nil.
func (*UserGroupCreate) SetNillableUpdateTime ¶
func (ugc *UserGroupCreate) SetNillableUpdateTime(t *time.Time) *UserGroupCreate
SetNillableUpdateTime sets the "update_time" field if the given value is not nil.
func (*UserGroupCreate) SetSn ¶
func (ugc *UserGroupCreate) SetSn(s string) *UserGroupCreate
SetSn sets the "sn" field.
func (*UserGroupCreate) SetUpdateTime ¶
func (ugc *UserGroupCreate) SetUpdateTime(t time.Time) *UserGroupCreate
SetUpdateTime sets the "update_time" field.
type UserGroupCreateBulk ¶
type UserGroupCreateBulk struct {
// contains filtered or unexported fields
}
UserGroupCreateBulk is the builder for creating many UserGroup entities in bulk.
type UserGroupDelete ¶
type UserGroupDelete struct {
// contains filtered or unexported fields
}
UserGroupDelete is the builder for deleting a UserGroup entity.
func (*UserGroupDelete) Exec ¶
func (ugd *UserGroupDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*UserGroupDelete) ExecX ¶
func (ugd *UserGroupDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*UserGroupDelete) Where ¶
func (ugd *UserGroupDelete) Where(ps ...predicate.UserGroup) *UserGroupDelete
Where adds a new predicate to the UserGroupDelete builder.
type UserGroupDeleteOne ¶
type UserGroupDeleteOne struct {
// contains filtered or unexported fields
}
UserGroupDeleteOne is the builder for deleting a single UserGroup entity.
func (*UserGroupDeleteOne) Exec ¶
func (ugdo *UserGroupDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*UserGroupDeleteOne) ExecX ¶
func (ugdo *UserGroupDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type UserGroupEdges ¶
type UserGroupEdges struct { // Users holds the value of the users edge. Users []*User `json:"users,omitempty"` // contains filtered or unexported fields }
UserGroupEdges holds the relations/edges for other nodes in the graph.
func (UserGroupEdges) UsersOrErr ¶
func (e UserGroupEdges) UsersOrErr() ([]*User, error)
UsersOrErr returns the Users value or an error if the edge was not loaded in eager-loading.
type UserGroupGroupBy ¶
type UserGroupGroupBy struct {
// contains filtered or unexported fields
}
UserGroupGroupBy is the group-by builder for UserGroup entities.
func (*UserGroupGroupBy) Aggregate ¶
func (uggb *UserGroupGroupBy) Aggregate(fns ...AggregateFunc) *UserGroupGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*UserGroupGroupBy) Bool ¶
func (uggb *UserGroupGroupBy) 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 (*UserGroupGroupBy) BoolX ¶
func (uggb *UserGroupGroupBy) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*UserGroupGroupBy) Bools ¶
func (uggb *UserGroupGroupBy) 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 (*UserGroupGroupBy) BoolsX ¶
func (uggb *UserGroupGroupBy) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*UserGroupGroupBy) Float64 ¶
func (uggb *UserGroupGroupBy) 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 (*UserGroupGroupBy) Float64X ¶
func (uggb *UserGroupGroupBy) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*UserGroupGroupBy) Float64s ¶
func (uggb *UserGroupGroupBy) 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 (*UserGroupGroupBy) Float64sX ¶
func (uggb *UserGroupGroupBy) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*UserGroupGroupBy) Int ¶
func (uggb *UserGroupGroupBy) 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 (*UserGroupGroupBy) IntX ¶
func (uggb *UserGroupGroupBy) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*UserGroupGroupBy) Ints ¶
func (uggb *UserGroupGroupBy) 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 (*UserGroupGroupBy) IntsX ¶
func (uggb *UserGroupGroupBy) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*UserGroupGroupBy) Scan ¶
func (uggb *UserGroupGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scans the result into the given value.
func (*UserGroupGroupBy) ScanX ¶
func (uggb *UserGroupGroupBy) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*UserGroupGroupBy) String ¶
func (uggb *UserGroupGroupBy) 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 (*UserGroupGroupBy) StringX ¶
func (uggb *UserGroupGroupBy) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type UserGroupMutation ¶
type UserGroupMutation struct {
// contains filtered or unexported fields
}
UserGroupMutation represents an operation that mutates the UserGroup nodes in the graph.
func (*UserGroupMutation) AddField ¶
func (m *UserGroupMutation) 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 (*UserGroupMutation) AddUserIDs ¶
func (m *UserGroupMutation) AddUserIDs(ids ...int)
AddUserIDs adds the "users" edge to the User entity by ids.
func (*UserGroupMutation) AddedEdges ¶
func (m *UserGroupMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*UserGroupMutation) AddedField ¶
func (m *UserGroupMutation) 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 (*UserGroupMutation) AddedFields ¶
func (m *UserGroupMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*UserGroupMutation) AddedIDs ¶
func (m *UserGroupMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*UserGroupMutation) Address ¶
func (m *UserGroupMutation) Address() (r string, exists bool)
Address returns the value of the "address" field in the mutation.
func (*UserGroupMutation) AddressCleared ¶
func (m *UserGroupMutation) AddressCleared() bool
AddressCleared returns if the "address" field was cleared in this mutation.
func (*UserGroupMutation) AvatarURL ¶
func (m *UserGroupMutation) AvatarURL() (r string, exists bool)
AvatarURL returns the value of the "avatar_url" field in the mutation.
func (*UserGroupMutation) AvatarURLCleared ¶
func (m *UserGroupMutation) AvatarURLCleared() bool
AvatarURLCleared returns if the "avatar_url" field was cleared in this mutation.
func (*UserGroupMutation) ClearAddress ¶
func (m *UserGroupMutation) ClearAddress()
ClearAddress clears the value of the "address" field.
func (*UserGroupMutation) ClearAvatarURL ¶
func (m *UserGroupMutation) ClearAvatarURL()
ClearAvatarURL clears the value of the "avatar_url" field.
func (*UserGroupMutation) ClearEdge ¶
func (m *UserGroupMutation) 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 (*UserGroupMutation) ClearField ¶
func (m *UserGroupMutation) 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 (*UserGroupMutation) ClearHomepage ¶
func (m *UserGroupMutation) ClearHomepage()
ClearHomepage clears the value of the "homepage" field.
func (*UserGroupMutation) ClearUsers ¶
func (m *UserGroupMutation) ClearUsers()
ClearUsers clears the "users" edge to the User entity.
func (*UserGroupMutation) ClearedEdges ¶
func (m *UserGroupMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*UserGroupMutation) ClearedFields ¶
func (m *UserGroupMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (UserGroupMutation) Client ¶
func (m UserGroupMutation) 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 (*UserGroupMutation) CreateTime ¶
func (m *UserGroupMutation) CreateTime() (r time.Time, exists bool)
CreateTime returns the value of the "create_time" field in the mutation.
func (*UserGroupMutation) EdgeCleared ¶
func (m *UserGroupMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*UserGroupMutation) Field ¶
func (m *UserGroupMutation) 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 (*UserGroupMutation) FieldCleared ¶
func (m *UserGroupMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*UserGroupMutation) Fields ¶
func (m *UserGroupMutation) 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 (*UserGroupMutation) Homepage ¶
func (m *UserGroupMutation) Homepage() (r string, exists bool)
Homepage returns the value of the "homepage" field in the mutation.
func (*UserGroupMutation) HomepageCleared ¶
func (m *UserGroupMutation) HomepageCleared() bool
HomepageCleared returns if the "homepage" field was cleared in this mutation.
func (*UserGroupMutation) ID ¶
func (m *UserGroupMutation) 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.
func (*UserGroupMutation) Name ¶
func (m *UserGroupMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*UserGroupMutation) OldAddress ¶
func (m *UserGroupMutation) OldAddress(ctx context.Context) (v *string, err error)
OldAddress returns the old "address" field's value of the UserGroup entity. If the UserGroup 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 (*UserGroupMutation) OldAvatarURL ¶
func (m *UserGroupMutation) OldAvatarURL(ctx context.Context) (v *string, err error)
OldAvatarURL returns the old "avatar_url" field's value of the UserGroup entity. If the UserGroup 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 (*UserGroupMutation) OldCreateTime ¶
OldCreateTime returns the old "create_time" field's value of the UserGroup entity. If the UserGroup 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 (*UserGroupMutation) 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 (*UserGroupMutation) OldHomepage ¶
func (m *UserGroupMutation) OldHomepage(ctx context.Context) (v *string, err error)
OldHomepage returns the old "homepage" field's value of the UserGroup entity. If the UserGroup 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 (*UserGroupMutation) OldName ¶
func (m *UserGroupMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the UserGroup entity. If the UserGroup 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 (*UserGroupMutation) OldSn ¶
func (m *UserGroupMutation) OldSn(ctx context.Context) (v string, err error)
OldSn returns the old "sn" field's value of the UserGroup entity. If the UserGroup 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 (*UserGroupMutation) OldUpdateTime ¶
OldUpdateTime returns the old "update_time" field's value of the UserGroup entity. If the UserGroup 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 (*UserGroupMutation) RemoveUserIDs ¶
func (m *UserGroupMutation) RemoveUserIDs(ids ...int)
RemoveUserIDs removes the "users" edge to the User entity by IDs.
func (*UserGroupMutation) RemovedEdges ¶
func (m *UserGroupMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*UserGroupMutation) RemovedIDs ¶
func (m *UserGroupMutation) 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 (*UserGroupMutation) RemovedUsersIDs ¶
func (m *UserGroupMutation) RemovedUsersIDs() (ids []int)
RemovedUsers returns the removed IDs of the "users" edge to the User entity.
func (*UserGroupMutation) ResetAddress ¶
func (m *UserGroupMutation) ResetAddress()
ResetAddress resets all changes to the "address" field.
func (*UserGroupMutation) ResetAvatarURL ¶
func (m *UserGroupMutation) ResetAvatarURL()
ResetAvatarURL resets all changes to the "avatar_url" field.
func (*UserGroupMutation) ResetCreateTime ¶
func (m *UserGroupMutation) ResetCreateTime()
ResetCreateTime resets all changes to the "create_time" field.
func (*UserGroupMutation) ResetEdge ¶
func (m *UserGroupMutation) 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 (*UserGroupMutation) ResetField ¶
func (m *UserGroupMutation) 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 (*UserGroupMutation) ResetHomepage ¶
func (m *UserGroupMutation) ResetHomepage()
ResetHomepage resets all changes to the "homepage" field.
func (*UserGroupMutation) ResetName ¶
func (m *UserGroupMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*UserGroupMutation) ResetSn ¶
func (m *UserGroupMutation) ResetSn()
ResetSn resets all changes to the "sn" field.
func (*UserGroupMutation) ResetUpdateTime ¶
func (m *UserGroupMutation) ResetUpdateTime()
ResetUpdateTime resets all changes to the "update_time" field.
func (*UserGroupMutation) ResetUsers ¶
func (m *UserGroupMutation) ResetUsers()
ResetUsers resets all changes to the "users" edge.
func (*UserGroupMutation) SetAddress ¶
func (m *UserGroupMutation) SetAddress(s string)
SetAddress sets the "address" field.
func (*UserGroupMutation) SetAvatarURL ¶
func (m *UserGroupMutation) SetAvatarURL(s string)
SetAvatarURL sets the "avatar_url" field.
func (*UserGroupMutation) SetCreateTime ¶
func (m *UserGroupMutation) SetCreateTime(t time.Time)
SetCreateTime sets the "create_time" field.
func (*UserGroupMutation) SetField ¶
func (m *UserGroupMutation) 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 (*UserGroupMutation) SetHomepage ¶
func (m *UserGroupMutation) SetHomepage(s string)
SetHomepage sets the "homepage" field.
func (*UserGroupMutation) SetID ¶
func (m *UserGroupMutation) SetID(id int)
SetID sets the value of the id field. Note that this operation is only accepted on creation of UserGroup entities.
func (*UserGroupMutation) SetName ¶
func (m *UserGroupMutation) SetName(s string)
SetName sets the "name" field.
func (*UserGroupMutation) SetSn ¶
func (m *UserGroupMutation) SetSn(s string)
SetSn sets the "sn" field.
func (*UserGroupMutation) SetUpdateTime ¶
func (m *UserGroupMutation) SetUpdateTime(t time.Time)
SetUpdateTime sets the "update_time" field.
func (*UserGroupMutation) Sn ¶
func (m *UserGroupMutation) Sn() (r string, exists bool)
Sn returns the value of the "sn" field in the mutation.
func (UserGroupMutation) Tx ¶
func (m UserGroupMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*UserGroupMutation) Type ¶
func (m *UserGroupMutation) Type() string
Type returns the node type of this mutation (UserGroup).
func (*UserGroupMutation) UpdateTime ¶
func (m *UserGroupMutation) UpdateTime() (r time.Time, exists bool)
UpdateTime returns the value of the "update_time" field in the mutation.
func (*UserGroupMutation) UsersCleared ¶
func (m *UserGroupMutation) UsersCleared() bool
UsersCleared reports if the "users" edge to the User entity was cleared.
func (*UserGroupMutation) UsersIDs ¶
func (m *UserGroupMutation) UsersIDs() (ids []int)
UsersIDs returns the "users" edge IDs in the mutation.
type UserGroupQuery ¶
type UserGroupQuery struct {
// contains filtered or unexported fields
}
UserGroupQuery is the builder for querying UserGroup entities.
func (*UserGroupQuery) All ¶
func (ugq *UserGroupQuery) All(ctx context.Context) ([]*UserGroup, error)
All executes the query and returns a list of UserGroups.
func (*UserGroupQuery) AllX ¶
func (ugq *UserGroupQuery) AllX(ctx context.Context) []*UserGroup
AllX is like All, but panics if an error occurs.
func (*UserGroupQuery) Clone ¶
func (ugq *UserGroupQuery) Clone() *UserGroupQuery
Clone returns a duplicate of the UserGroupQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*UserGroupQuery) Count ¶
func (ugq *UserGroupQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*UserGroupQuery) CountX ¶
func (ugq *UserGroupQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*UserGroupQuery) Exist ¶
func (ugq *UserGroupQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*UserGroupQuery) ExistX ¶
func (ugq *UserGroupQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*UserGroupQuery) First ¶
func (ugq *UserGroupQuery) First(ctx context.Context) (*UserGroup, error)
First returns the first UserGroup entity from the query. Returns a *NotFoundError when no UserGroup was found.
func (*UserGroupQuery) FirstID ¶
func (ugq *UserGroupQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first UserGroup ID from the query. Returns a *NotFoundError when no UserGroup ID was found.
func (*UserGroupQuery) FirstIDX ¶
func (ugq *UserGroupQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*UserGroupQuery) FirstX ¶
func (ugq *UserGroupQuery) FirstX(ctx context.Context) *UserGroup
FirstX is like First, but panics if an error occurs.
func (*UserGroupQuery) GroupBy ¶
func (ugq *UserGroupQuery) GroupBy(field string, fields ...string) *UserGroupGroupBy
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 { Sn string `json:"sn,omitempty"` Count int `json:"count,omitempty"` } client.UserGroup.Query(). GroupBy(usergroup.FieldSn). Aggregate(model.Count()). Scan(ctx, &v)
func (*UserGroupQuery) IDs ¶
func (ugq *UserGroupQuery) IDs(ctx context.Context) ([]int, error)
IDs executes the query and returns a list of UserGroup IDs.
func (*UserGroupQuery) IDsX ¶
func (ugq *UserGroupQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*UserGroupQuery) Limit ¶
func (ugq *UserGroupQuery) Limit(limit int) *UserGroupQuery
Limit adds a limit step to the query.
func (*UserGroupQuery) Offset ¶
func (ugq *UserGroupQuery) Offset(offset int) *UserGroupQuery
Offset adds an offset step to the query.
func (*UserGroupQuery) Only ¶
func (ugq *UserGroupQuery) Only(ctx context.Context) (*UserGroup, error)
Only returns a single UserGroup entity found by the query, ensuring it only returns one. Returns a *NotSingularError when exactly one UserGroup entity is not found. Returns a *NotFoundError when no UserGroup entities are found.
func (*UserGroupQuery) OnlyID ¶
func (ugq *UserGroupQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only UserGroup ID in the query. Returns a *NotSingularError when exactly one UserGroup ID is not found. Returns a *NotFoundError when no entities are found.
func (*UserGroupQuery) OnlyIDX ¶
func (ugq *UserGroupQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*UserGroupQuery) OnlyX ¶
func (ugq *UserGroupQuery) OnlyX(ctx context.Context) *UserGroup
OnlyX is like Only, but panics if an error occurs.
func (*UserGroupQuery) Order ¶
func (ugq *UserGroupQuery) Order(o ...OrderFunc) *UserGroupQuery
Order adds an order step to the query.
func (*UserGroupQuery) QueryUsers ¶
func (ugq *UserGroupQuery) QueryUsers() *UserQuery
QueryUsers chains the current query on the "users" edge.
func (*UserGroupQuery) Select ¶
func (ugq *UserGroupQuery) Select(field string, fields ...string) *UserGroupSelect
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 { Sn string `json:"sn,omitempty"` } client.UserGroup.Query(). Select(usergroup.FieldSn). Scan(ctx, &v)
func (*UserGroupQuery) Unique ¶
func (ugq *UserGroupQuery) Unique(unique bool) *UserGroupQuery
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 (*UserGroupQuery) Where ¶
func (ugq *UserGroupQuery) Where(ps ...predicate.UserGroup) *UserGroupQuery
Where adds a new predicate for the UserGroupQuery builder.
func (*UserGroupQuery) WithUsers ¶
func (ugq *UserGroupQuery) WithUsers(opts ...func(*UserQuery)) *UserGroupQuery
WithUsers tells the query-builder to eager-load the nodes that are connected to the "users" edge. The optional arguments are used to configure the query builder of the edge.
type UserGroupSelect ¶
type UserGroupSelect struct { *UserGroupQuery // contains filtered or unexported fields }
UserGroupSelect is the builder for selecting fields of UserGroup entities.
func (*UserGroupSelect) Bool ¶
func (ugs *UserGroupSelect) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*UserGroupSelect) BoolX ¶
func (ugs *UserGroupSelect) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*UserGroupSelect) Bools ¶
func (ugs *UserGroupSelect) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*UserGroupSelect) BoolsX ¶
func (ugs *UserGroupSelect) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*UserGroupSelect) Float64 ¶
func (ugs *UserGroupSelect) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*UserGroupSelect) Float64X ¶
func (ugs *UserGroupSelect) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*UserGroupSelect) Float64s ¶
func (ugs *UserGroupSelect) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*UserGroupSelect) Float64sX ¶
func (ugs *UserGroupSelect) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*UserGroupSelect) Int ¶
func (ugs *UserGroupSelect) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*UserGroupSelect) IntX ¶
func (ugs *UserGroupSelect) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*UserGroupSelect) Ints ¶
func (ugs *UserGroupSelect) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*UserGroupSelect) IntsX ¶
func (ugs *UserGroupSelect) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*UserGroupSelect) Scan ¶
func (ugs *UserGroupSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scans the result into the given value.
func (*UserGroupSelect) ScanX ¶
func (ugs *UserGroupSelect) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*UserGroupSelect) String ¶
func (ugs *UserGroupSelect) String(ctx context.Context) (_ string, err error)
String returns a single string from a selector. It is only allowed when selecting one field.
func (*UserGroupSelect) StringX ¶
func (ugs *UserGroupSelect) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type UserGroupUpdate ¶
type UserGroupUpdate struct {
// contains filtered or unexported fields
}
UserGroupUpdate is the builder for updating UserGroup entities.
func (*UserGroupUpdate) AddUserIDs ¶
func (ugu *UserGroupUpdate) AddUserIDs(ids ...int) *UserGroupUpdate
AddUserIDs adds the "users" edge to the User entity by IDs.
func (*UserGroupUpdate) AddUsers ¶
func (ugu *UserGroupUpdate) AddUsers(u ...*User) *UserGroupUpdate
AddUsers adds the "users" edges to the User entity.
func (*UserGroupUpdate) ClearAddress ¶
func (ugu *UserGroupUpdate) ClearAddress() *UserGroupUpdate
ClearAddress clears the value of the "address" field.
func (*UserGroupUpdate) ClearAvatarURL ¶
func (ugu *UserGroupUpdate) ClearAvatarURL() *UserGroupUpdate
ClearAvatarURL clears the value of the "avatar_url" field.
func (*UserGroupUpdate) ClearHomepage ¶
func (ugu *UserGroupUpdate) ClearHomepage() *UserGroupUpdate
ClearHomepage clears the value of the "homepage" field.
func (*UserGroupUpdate) ClearUsers ¶
func (ugu *UserGroupUpdate) ClearUsers() *UserGroupUpdate
ClearUsers clears all "users" edges to the User entity.
func (*UserGroupUpdate) Exec ¶
func (ugu *UserGroupUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*UserGroupUpdate) ExecX ¶
func (ugu *UserGroupUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserGroupUpdate) Mutation ¶
func (ugu *UserGroupUpdate) Mutation() *UserGroupMutation
Mutation returns the UserGroupMutation object of the builder.
func (*UserGroupUpdate) RemoveUserIDs ¶
func (ugu *UserGroupUpdate) RemoveUserIDs(ids ...int) *UserGroupUpdate
RemoveUserIDs removes the "users" edge to User entities by IDs.
func (*UserGroupUpdate) RemoveUsers ¶
func (ugu *UserGroupUpdate) RemoveUsers(u ...*User) *UserGroupUpdate
RemoveUsers removes "users" edges to User entities.
func (*UserGroupUpdate) Save ¶
func (ugu *UserGroupUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*UserGroupUpdate) SaveX ¶
func (ugu *UserGroupUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*UserGroupUpdate) SetAddress ¶
func (ugu *UserGroupUpdate) SetAddress(s string) *UserGroupUpdate
SetAddress sets the "address" field.
func (*UserGroupUpdate) SetAvatarURL ¶
func (ugu *UserGroupUpdate) SetAvatarURL(s string) *UserGroupUpdate
SetAvatarURL sets the "avatar_url" field.
func (*UserGroupUpdate) SetHomepage ¶
func (ugu *UserGroupUpdate) SetHomepage(s string) *UserGroupUpdate
SetHomepage sets the "homepage" field.
func (*UserGroupUpdate) SetName ¶
func (ugu *UserGroupUpdate) SetName(s string) *UserGroupUpdate
SetName sets the "name" field.
func (*UserGroupUpdate) SetNillableAddress ¶
func (ugu *UserGroupUpdate) SetNillableAddress(s *string) *UserGroupUpdate
SetNillableAddress sets the "address" field if the given value is not nil.
func (*UserGroupUpdate) SetNillableAvatarURL ¶
func (ugu *UserGroupUpdate) SetNillableAvatarURL(s *string) *UserGroupUpdate
SetNillableAvatarURL sets the "avatar_url" field if the given value is not nil.
func (*UserGroupUpdate) SetNillableHomepage ¶
func (ugu *UserGroupUpdate) SetNillableHomepage(s *string) *UserGroupUpdate
SetNillableHomepage sets the "homepage" field if the given value is not nil.
func (*UserGroupUpdate) SetUpdateTime ¶
func (ugu *UserGroupUpdate) SetUpdateTime(t time.Time) *UserGroupUpdate
SetUpdateTime sets the "update_time" field.
func (*UserGroupUpdate) Where ¶
func (ugu *UserGroupUpdate) Where(ps ...predicate.UserGroup) *UserGroupUpdate
Where adds a new predicate for the UserGroupUpdate builder.
type UserGroupUpdateOne ¶
type UserGroupUpdateOne struct {
// contains filtered or unexported fields
}
UserGroupUpdateOne is the builder for updating a single UserGroup entity.
func (*UserGroupUpdateOne) AddUserIDs ¶
func (uguo *UserGroupUpdateOne) AddUserIDs(ids ...int) *UserGroupUpdateOne
AddUserIDs adds the "users" edge to the User entity by IDs.
func (*UserGroupUpdateOne) AddUsers ¶
func (uguo *UserGroupUpdateOne) AddUsers(u ...*User) *UserGroupUpdateOne
AddUsers adds the "users" edges to the User entity.
func (*UserGroupUpdateOne) ClearAddress ¶
func (uguo *UserGroupUpdateOne) ClearAddress() *UserGroupUpdateOne
ClearAddress clears the value of the "address" field.
func (*UserGroupUpdateOne) ClearAvatarURL ¶
func (uguo *UserGroupUpdateOne) ClearAvatarURL() *UserGroupUpdateOne
ClearAvatarURL clears the value of the "avatar_url" field.
func (*UserGroupUpdateOne) ClearHomepage ¶
func (uguo *UserGroupUpdateOne) ClearHomepage() *UserGroupUpdateOne
ClearHomepage clears the value of the "homepage" field.
func (*UserGroupUpdateOne) ClearUsers ¶
func (uguo *UserGroupUpdateOne) ClearUsers() *UserGroupUpdateOne
ClearUsers clears all "users" edges to the User entity.
func (*UserGroupUpdateOne) Exec ¶
func (uguo *UserGroupUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*UserGroupUpdateOne) ExecX ¶
func (uguo *UserGroupUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserGroupUpdateOne) Mutation ¶
func (uguo *UserGroupUpdateOne) Mutation() *UserGroupMutation
Mutation returns the UserGroupMutation object of the builder.
func (*UserGroupUpdateOne) RemoveUserIDs ¶
func (uguo *UserGroupUpdateOne) RemoveUserIDs(ids ...int) *UserGroupUpdateOne
RemoveUserIDs removes the "users" edge to User entities by IDs.
func (*UserGroupUpdateOne) RemoveUsers ¶
func (uguo *UserGroupUpdateOne) RemoveUsers(u ...*User) *UserGroupUpdateOne
RemoveUsers removes "users" edges to User entities.
func (*UserGroupUpdateOne) Save ¶
func (uguo *UserGroupUpdateOne) Save(ctx context.Context) (*UserGroup, error)
Save executes the query and returns the updated UserGroup entity.
func (*UserGroupUpdateOne) SaveX ¶
func (uguo *UserGroupUpdateOne) SaveX(ctx context.Context) *UserGroup
SaveX is like Save, but panics if an error occurs.
func (*UserGroupUpdateOne) Select ¶
func (uguo *UserGroupUpdateOne) Select(field string, fields ...string) *UserGroupUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*UserGroupUpdateOne) SetAddress ¶
func (uguo *UserGroupUpdateOne) SetAddress(s string) *UserGroupUpdateOne
SetAddress sets the "address" field.
func (*UserGroupUpdateOne) SetAvatarURL ¶
func (uguo *UserGroupUpdateOne) SetAvatarURL(s string) *UserGroupUpdateOne
SetAvatarURL sets the "avatar_url" field.
func (*UserGroupUpdateOne) SetHomepage ¶
func (uguo *UserGroupUpdateOne) SetHomepage(s string) *UserGroupUpdateOne
SetHomepage sets the "homepage" field.
func (*UserGroupUpdateOne) SetName ¶
func (uguo *UserGroupUpdateOne) SetName(s string) *UserGroupUpdateOne
SetName sets the "name" field.
func (*UserGroupUpdateOne) SetNillableAddress ¶
func (uguo *UserGroupUpdateOne) SetNillableAddress(s *string) *UserGroupUpdateOne
SetNillableAddress sets the "address" field if the given value is not nil.
func (*UserGroupUpdateOne) SetNillableAvatarURL ¶
func (uguo *UserGroupUpdateOne) SetNillableAvatarURL(s *string) *UserGroupUpdateOne
SetNillableAvatarURL sets the "avatar_url" field if the given value is not nil.
func (*UserGroupUpdateOne) SetNillableHomepage ¶
func (uguo *UserGroupUpdateOne) SetNillableHomepage(s *string) *UserGroupUpdateOne
SetNillableHomepage sets the "homepage" field if the given value is not nil.
func (*UserGroupUpdateOne) SetUpdateTime ¶
func (uguo *UserGroupUpdateOne) SetUpdateTime(t time.Time) *UserGroupUpdateOne
SetUpdateTime sets the "update_time" 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) 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) AddGroupIDs ¶
func (m *UserMutation) AddGroupIDs(ids ...int)
AddGroupIDs adds the "groups" edge to the UserGroup entity by ids.
func (*UserMutation) AddUserEmailIDs ¶
func (m *UserMutation) AddUserEmailIDs(ids ...int)
AddUserEmailIDs adds the "UserEmails" edge to the UserEmail entity by ids.
func (*UserMutation) AddUserSecurityLogIDs ¶
func (m *UserMutation) AddUserSecurityLogIDs(ids ...int)
AddUserSecurityLogIDs adds the "UserSecurityLogs" edge to the UserSecurityLog entity by ids.
func (*UserMutation) AddUserSettingIDs ¶
func (m *UserMutation) AddUserSettingIDs(ids ...int)
AddUserSettingIDs adds the "UserSettings" edge to the UserSetting 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) AvatarURL ¶
func (m *UserMutation) AvatarURL() (r string, exists bool)
AvatarURL returns the value of the "avatar_url" field in the mutation.
func (*UserMutation) AvatarURLCleared ¶
func (m *UserMutation) AvatarURLCleared() bool
AvatarURLCleared returns if the "avatar_url" field was cleared in this mutation.
func (*UserMutation) ClearAvatarURL ¶
func (m *UserMutation) ClearAvatarURL()
ClearAvatarURL clears the value of the "avatar_url" field.
func (*UserMutation) ClearDeleteTime ¶
func (m *UserMutation) ClearDeleteTime()
ClearDeleteTime clears the value of the "delete_time" field.
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) ClearGroups ¶
func (m *UserMutation) ClearGroups()
ClearGroups clears the "groups" edge to the UserGroup entity.
func (*UserMutation) ClearPassword ¶
func (m *UserMutation) ClearPassword()
ClearPassword clears the value of the "password" field.
func (*UserMutation) ClearPhone ¶
func (m *UserMutation) ClearPhone()
ClearPhone clears the value of the "phone" field.
func (*UserMutation) ClearPlan ¶
func (m *UserMutation) ClearPlan()
ClearPlan clears the value of the "plan" field.
func (*UserMutation) ClearStatus ¶
func (m *UserMutation) ClearStatus()
ClearStatus clears the value of the "status" field.
func (*UserMutation) ClearUserEmails ¶
func (m *UserMutation) ClearUserEmails()
ClearUserEmails clears the "UserEmails" edge to the UserEmail entity.
func (*UserMutation) ClearUserSecurityLogs ¶
func (m *UserMutation) ClearUserSecurityLogs()
ClearUserSecurityLogs clears the "UserSecurityLogs" edge to the UserSecurityLog entity.
func (*UserMutation) ClearUserSettings ¶
func (m *UserMutation) ClearUserSettings()
ClearUserSettings clears the "UserSettings" edge to the UserSetting 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) CreateTime ¶
func (m *UserMutation) CreateTime() (r time.Time, exists bool)
CreateTime returns the value of the "create_time" field in the mutation.
func (*UserMutation) DeleteTime ¶
func (m *UserMutation) DeleteTime() (r time.Time, exists bool)
DeleteTime returns the value of the "delete_time" field in the mutation.
func (*UserMutation) DeleteTimeCleared ¶
func (m *UserMutation) DeleteTimeCleared() bool
DeleteTimeCleared returns if the "delete_time" field was cleared in this 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) Gender ¶
func (m *UserMutation) Gender() (r user.Gender, exists bool)
Gender returns the value of the "gender" field in the mutation.
func (*UserMutation) GroupsCleared ¶
func (m *UserMutation) GroupsCleared() bool
GroupsCleared reports if the "groups" edge to the UserGroup entity was cleared.
func (*UserMutation) GroupsIDs ¶
func (m *UserMutation) GroupsIDs() (ids []int)
GroupsIDs returns the "groups" edge IDs in the mutation.
func (*UserMutation) ID ¶
func (m *UserMutation) 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.
func (*UserMutation) Nickname ¶
func (m *UserMutation) Nickname() (r string, exists bool)
Nickname returns the value of the "nickname" field in the mutation.
func (*UserMutation) OldAvatarURL ¶
func (m *UserMutation) OldAvatarURL(ctx context.Context) (v *string, err error)
OldAvatarURL returns the old "avatar_url" 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) OldCreateTime ¶
OldCreateTime returns the old "create_time" 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) OldDeleteTime ¶
OldDeleteTime returns the old "delete_time" 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) OldGender ¶
OldGender returns the old "gender" 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) OldNickname ¶
func (m *UserMutation) OldNickname(ctx context.Context) (v string, err error)
OldNickname returns the old "nickname" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldPassword ¶
func (m *UserMutation) OldPassword(ctx context.Context) (v string, err error)
OldPassword returns the old "password" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldPhone ¶
func (m *UserMutation) OldPhone(ctx context.Context) (v *string, err error)
OldPhone returns the old "phone" 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) OldPlan ¶
OldPlan returns the old "plan" 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) OldSecondAuth ¶
func (m *UserMutation) OldSecondAuth(ctx context.Context) (v bool, err error)
OldSecondAuth returns the old "second_auth" 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) OldSn ¶
func (m *UserMutation) OldSn(ctx context.Context) (v string, err error)
OldSn returns the old "sn" 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) OldUpdateTime ¶
OldUpdateTime returns the old "update_time" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) Password ¶
func (m *UserMutation) Password() (r string, exists bool)
Password returns the value of the "password" field in the mutation.
func (*UserMutation) PasswordCleared ¶
func (m *UserMutation) PasswordCleared() bool
PasswordCleared returns if the "password" field was cleared in this mutation.
func (*UserMutation) Phone ¶
func (m *UserMutation) Phone() (r string, exists bool)
Phone returns the value of the "phone" field in the mutation.
func (*UserMutation) PhoneCleared ¶
func (m *UserMutation) PhoneCleared() bool
PhoneCleared returns if the "phone" field was cleared in this mutation.
func (*UserMutation) Plan ¶
func (m *UserMutation) Plan() (r user.Plan, exists bool)
Plan returns the value of the "plan" field in the mutation.
func (*UserMutation) PlanCleared ¶
func (m *UserMutation) PlanCleared() bool
PlanCleared returns if the "plan" field was cleared in this mutation.
func (*UserMutation) RemoveGroupIDs ¶
func (m *UserMutation) RemoveGroupIDs(ids ...int)
RemoveGroupIDs removes the "groups" edge to the UserGroup entity by IDs.
func (*UserMutation) RemoveUserEmailIDs ¶
func (m *UserMutation) RemoveUserEmailIDs(ids ...int)
RemoveUserEmailIDs removes the "UserEmails" edge to the UserEmail entity by IDs.
func (*UserMutation) RemoveUserSecurityLogIDs ¶
func (m *UserMutation) RemoveUserSecurityLogIDs(ids ...int)
RemoveUserSecurityLogIDs removes the "UserSecurityLogs" edge to the UserSecurityLog entity by IDs.
func (*UserMutation) RemoveUserSettingIDs ¶
func (m *UserMutation) RemoveUserSettingIDs(ids ...int)
RemoveUserSettingIDs removes the "UserSettings" edge to the UserSetting entity by IDs.
func (*UserMutation) RemovedEdges ¶
func (m *UserMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*UserMutation) RemovedGroupsIDs ¶
func (m *UserMutation) RemovedGroupsIDs() (ids []int)
RemovedGroups returns the removed IDs of the "groups" edge to the UserGroup entity.
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) RemovedUserEmailsIDs ¶
func (m *UserMutation) RemovedUserEmailsIDs() (ids []int)
RemovedUserEmails returns the removed IDs of the "UserEmails" edge to the UserEmail entity.
func (*UserMutation) RemovedUserSecurityLogsIDs ¶
func (m *UserMutation) RemovedUserSecurityLogsIDs() (ids []int)
RemovedUserSecurityLogs returns the removed IDs of the "UserSecurityLogs" edge to the UserSecurityLog entity.
func (*UserMutation) RemovedUserSettingsIDs ¶
func (m *UserMutation) RemovedUserSettingsIDs() (ids []int)
RemovedUserSettings returns the removed IDs of the "UserSettings" edge to the UserSetting entity.
func (*UserMutation) ResetAvatarURL ¶
func (m *UserMutation) ResetAvatarURL()
ResetAvatarURL resets all changes to the "avatar_url" field.
func (*UserMutation) ResetCreateTime ¶
func (m *UserMutation) ResetCreateTime()
ResetCreateTime resets all changes to the "create_time" field.
func (*UserMutation) ResetDeleteTime ¶
func (m *UserMutation) ResetDeleteTime()
ResetDeleteTime resets all changes to the "delete_time" field.
func (*UserMutation) ResetEdge ¶
func (m *UserMutation) ResetEdge(name string) error
ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.
func (*UserMutation) ResetField ¶
func (m *UserMutation) ResetField(name string) error
ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.
func (*UserMutation) ResetGender ¶
func (m *UserMutation) ResetGender()
ResetGender resets all changes to the "gender" field.
func (*UserMutation) ResetGroups ¶
func (m *UserMutation) ResetGroups()
ResetGroups resets all changes to the "groups" edge.
func (*UserMutation) ResetNickname ¶
func (m *UserMutation) ResetNickname()
ResetNickname resets all changes to the "nickname" field.
func (*UserMutation) ResetPassword ¶
func (m *UserMutation) ResetPassword()
ResetPassword resets all changes to the "password" field.
func (*UserMutation) ResetPhone ¶
func (m *UserMutation) ResetPhone()
ResetPhone resets all changes to the "phone" field.
func (*UserMutation) ResetPlan ¶
func (m *UserMutation) ResetPlan()
ResetPlan resets all changes to the "plan" field.
func (*UserMutation) ResetSecondAuth ¶
func (m *UserMutation) ResetSecondAuth()
ResetSecondAuth resets all changes to the "second_auth" field.
func (*UserMutation) ResetSn ¶
func (m *UserMutation) ResetSn()
ResetSn resets all changes to the "sn" field.
func (*UserMutation) ResetStatus ¶
func (m *UserMutation) ResetStatus()
ResetStatus resets all changes to the "status" field.
func (*UserMutation) ResetUpdateTime ¶
func (m *UserMutation) ResetUpdateTime()
ResetUpdateTime resets all changes to the "update_time" field.
func (*UserMutation) ResetUserEmails ¶
func (m *UserMutation) ResetUserEmails()
ResetUserEmails resets all changes to the "UserEmails" edge.
func (*UserMutation) ResetUserSecurityLogs ¶
func (m *UserMutation) ResetUserSecurityLogs()
ResetUserSecurityLogs resets all changes to the "UserSecurityLogs" edge.
func (*UserMutation) ResetUserSettings ¶
func (m *UserMutation) ResetUserSettings()
ResetUserSettings resets all changes to the "UserSettings" edge.
func (*UserMutation) SecondAuth ¶
func (m *UserMutation) SecondAuth() (r bool, exists bool)
SecondAuth returns the value of the "second_auth" field in the mutation.
func (*UserMutation) SetAvatarURL ¶
func (m *UserMutation) SetAvatarURL(s string)
SetAvatarURL sets the "avatar_url" field.
func (*UserMutation) SetCreateTime ¶
func (m *UserMutation) SetCreateTime(t time.Time)
SetCreateTime sets the "create_time" field.
func (*UserMutation) SetDeleteTime ¶
func (m *UserMutation) SetDeleteTime(t time.Time)
SetDeleteTime sets the "delete_time" 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) SetGender ¶
func (m *UserMutation) SetGender(u user.Gender)
SetGender sets the "gender" field.
func (*UserMutation) SetID ¶
func (m *UserMutation) SetID(id int)
SetID sets the value of the id field. Note that this operation is only accepted on creation of User entities.
func (*UserMutation) SetNickname ¶
func (m *UserMutation) SetNickname(s string)
SetNickname sets the "nickname" field.
func (*UserMutation) SetPassword ¶
func (m *UserMutation) SetPassword(s string)
SetPassword sets the "password" field.
func (*UserMutation) SetPhone ¶
func (m *UserMutation) SetPhone(s string)
SetPhone sets the "phone" field.
func (*UserMutation) SetPlan ¶
func (m *UserMutation) SetPlan(u user.Plan)
SetPlan sets the "plan" field.
func (*UserMutation) SetSecondAuth ¶
func (m *UserMutation) SetSecondAuth(b bool)
SetSecondAuth sets the "second_auth" field.
func (*UserMutation) SetStatus ¶
func (m *UserMutation) SetStatus(u user.Status)
SetStatus sets the "status" field.
func (*UserMutation) SetUpdateTime ¶
func (m *UserMutation) SetUpdateTime(t time.Time)
SetUpdateTime sets the "update_time" field.
func (*UserMutation) Sn ¶
func (m *UserMutation) Sn() (r string, exists bool)
Sn returns the value of the "sn" 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) StatusCleared ¶
func (m *UserMutation) StatusCleared() bool
StatusCleared returns if the "status" field was cleared in this mutation.
func (UserMutation) Tx ¶
func (m UserMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*UserMutation) Type ¶
func (m *UserMutation) Type() string
Type returns the node type of this mutation (User).
func (*UserMutation) UpdateTime ¶
func (m *UserMutation) UpdateTime() (r time.Time, exists bool)
UpdateTime returns the value of the "update_time" field in the mutation.
func (*UserMutation) UserEmailsCleared ¶
func (m *UserMutation) UserEmailsCleared() bool
UserEmailsCleared reports if the "UserEmails" edge to the UserEmail entity was cleared.
func (*UserMutation) UserEmailsIDs ¶
func (m *UserMutation) UserEmailsIDs() (ids []int)
UserEmailsIDs returns the "UserEmails" edge IDs in the mutation.
func (*UserMutation) UserSecurityLogsCleared ¶
func (m *UserMutation) UserSecurityLogsCleared() bool
UserSecurityLogsCleared reports if the "UserSecurityLogs" edge to the UserSecurityLog entity was cleared.
func (*UserMutation) UserSecurityLogsIDs ¶
func (m *UserMutation) UserSecurityLogsIDs() (ids []int)
UserSecurityLogsIDs returns the "UserSecurityLogs" edge IDs in the mutation.
func (*UserMutation) UserSettingsCleared ¶
func (m *UserMutation) UserSettingsCleared() bool
UserSettingsCleared reports if the "UserSettings" edge to the UserSetting entity was cleared.
func (*UserMutation) UserSettingsIDs ¶
func (m *UserMutation) UserSettingsIDs() (ids []int)
UserSettingsIDs returns the "UserSettings" edge IDs in the mutation.
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 { Sn string `json:"sn,omitempty"` Count int `json:"count,omitempty"` } client.User.Query(). GroupBy(user.FieldSn). Aggregate(model.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) QueryGroups ¶
func (uq *UserQuery) QueryGroups() *UserGroupQuery
QueryGroups chains the current query on the "groups" edge.
func (*UserQuery) QueryUserEmails ¶
func (uq *UserQuery) QueryUserEmails() *UserEmailQuery
QueryUserEmails chains the current query on the "UserEmails" edge.
func (*UserQuery) QueryUserSecurityLogs ¶
func (uq *UserQuery) QueryUserSecurityLogs() *UserSecurityLogQuery
QueryUserSecurityLogs chains the current query on the "UserSecurityLogs" edge.
func (*UserQuery) QueryUserSettings ¶
func (uq *UserQuery) QueryUserSettings() *UserSettingQuery
QueryUserSettings chains the current query on the "UserSettings" edge.
func (*UserQuery) Select ¶
func (uq *UserQuery) Select(field string, 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 { Sn string `json:"sn,omitempty"` } client.User.Query(). Select(user.FieldSn). 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) WithGroups ¶
func (uq *UserQuery) WithGroups(opts ...func(*UserGroupQuery)) *UserQuery
WithGroups tells the query-builder to eager-load the nodes that are connected to the "groups" edge. The optional arguments are used to configure the query builder of the edge.
func (*UserQuery) WithUserEmails ¶
func (uq *UserQuery) WithUserEmails(opts ...func(*UserEmailQuery)) *UserQuery
WithUserEmails tells the query-builder to eager-load the nodes that are connected to the "UserEmails" edge. The optional arguments are used to configure the query builder of the edge.
func (*UserQuery) WithUserSecurityLogs ¶
func (uq *UserQuery) WithUserSecurityLogs(opts ...func(*UserSecurityLogQuery)) *UserQuery
WithUserSecurityLogs tells the query-builder to eager-load the nodes that are connected to the "UserSecurityLogs" edge. The optional arguments are used to configure the query builder of the edge.
func (*UserQuery) WithUserSettings ¶
func (uq *UserQuery) WithUserSettings(opts ...func(*UserSettingQuery)) *UserQuery
WithUserSettings tells the query-builder to eager-load the nodes that are connected to the "UserSettings" edge. The optional arguments are used to configure the query builder of the edge.
type UserSecurityLog ¶
type UserSecurityLog struct { // ID of the ent. ID int `json:"-"` // OwnerID holds the value of the "owner_id" field. OwnerID int `json:"-"` // Action holds the value of the "action" field. Action usersecuritylog.Action `json:"action,omitempty"` // IP holds the value of the "ip" field. IP *string `json:"ip,omitempty"` // RequestID holds the value of the "request_id" field. RequestID *string `json:"request_id,omitempty"` // ServerVersion holds the value of the "server_version" field. ServerVersion *string `json:"server_version,omitempty"` // Description holds the value of the "description" field. Description *string `json:"description,omitempty"` // Remark holds the value of the "remark" field. Remark *string `json:"remark,omitempty"` // CreateTime holds the value of the "create_time" field. CreateTime time.Time `json:"-"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the UserSecurityLogQuery when eager-loading is set. Edges UserSecurityLogEdges `json:"edges"` // contains filtered or unexported fields }
UserSecurityLog is the model entity for the UserSecurityLog schema.
func (*UserSecurityLog) QuerySecurityLogsOwner ¶
func (usl *UserSecurityLog) QuerySecurityLogsOwner() *UserQuery
QuerySecurityLogsOwner queries the "security_logs_owner" edge of the UserSecurityLog entity.
func (*UserSecurityLog) String ¶
func (usl *UserSecurityLog) String() string
String implements the fmt.Stringer.
func (*UserSecurityLog) Unwrap ¶
func (usl *UserSecurityLog) Unwrap() *UserSecurityLog
Unwrap unwraps the UserSecurityLog 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 (*UserSecurityLog) Update ¶
func (usl *UserSecurityLog) Update() *UserSecurityLogUpdateOne
Update returns a builder for updating this UserSecurityLog. Note that you need to call UserSecurityLog.Unwrap() before calling this method if this UserSecurityLog was returned from a transaction, and the transaction was committed or rolled back.
type UserSecurityLogClient ¶
type UserSecurityLogClient struct {
// contains filtered or unexported fields
}
UserSecurityLogClient is a client for the UserSecurityLog schema.
func NewUserSecurityLogClient ¶
func NewUserSecurityLogClient(c config) *UserSecurityLogClient
NewUserSecurityLogClient returns a client for the UserSecurityLog from the given config.
func (*UserSecurityLogClient) Create ¶
func (c *UserSecurityLogClient) Create() *UserSecurityLogCreate
Create returns a create builder for UserSecurityLog.
func (*UserSecurityLogClient) CreateBulk ¶
func (c *UserSecurityLogClient) CreateBulk(builders ...*UserSecurityLogCreate) *UserSecurityLogCreateBulk
CreateBulk returns a builder for creating a bulk of UserSecurityLog entities.
func (*UserSecurityLogClient) Delete ¶
func (c *UserSecurityLogClient) Delete() *UserSecurityLogDelete
Delete returns a delete builder for UserSecurityLog.
func (*UserSecurityLogClient) DeleteOne ¶
func (c *UserSecurityLogClient) DeleteOne(usl *UserSecurityLog) *UserSecurityLogDeleteOne
DeleteOne returns a delete builder for the given entity.
func (*UserSecurityLogClient) DeleteOneID ¶
func (c *UserSecurityLogClient) DeleteOneID(id int) *UserSecurityLogDeleteOne
DeleteOneID returns a delete builder for the given id.
func (*UserSecurityLogClient) Get ¶
func (c *UserSecurityLogClient) Get(ctx context.Context, id int) (*UserSecurityLog, error)
Get returns a UserSecurityLog entity by its id.
func (*UserSecurityLogClient) GetX ¶
func (c *UserSecurityLogClient) GetX(ctx context.Context, id int) *UserSecurityLog
GetX is like Get, but panics if an error occurs.
func (*UserSecurityLogClient) Hooks ¶
func (c *UserSecurityLogClient) Hooks() []Hook
Hooks returns the client hooks.
func (*UserSecurityLogClient) Query ¶
func (c *UserSecurityLogClient) Query() *UserSecurityLogQuery
Query returns a query builder for UserSecurityLog.
func (*UserSecurityLogClient) QuerySecurityLogsOwner ¶
func (c *UserSecurityLogClient) QuerySecurityLogsOwner(usl *UserSecurityLog) *UserQuery
QuerySecurityLogsOwner queries the security_logs_owner edge of a UserSecurityLog.
func (*UserSecurityLogClient) Update ¶
func (c *UserSecurityLogClient) Update() *UserSecurityLogUpdate
Update returns an update builder for UserSecurityLog.
func (*UserSecurityLogClient) UpdateOne ¶
func (c *UserSecurityLogClient) UpdateOne(usl *UserSecurityLog) *UserSecurityLogUpdateOne
UpdateOne returns an update builder for the given entity.
func (*UserSecurityLogClient) UpdateOneID ¶
func (c *UserSecurityLogClient) UpdateOneID(id int) *UserSecurityLogUpdateOne
UpdateOneID returns an update builder for the given id.
func (*UserSecurityLogClient) Use ¶
func (c *UserSecurityLogClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `usersecuritylog.Hooks(f(g(h())))`.
type UserSecurityLogCreate ¶
type UserSecurityLogCreate struct {
// contains filtered or unexported fields
}
UserSecurityLogCreate is the builder for creating a UserSecurityLog entity.
func (*UserSecurityLogCreate) Mutation ¶
func (uslc *UserSecurityLogCreate) Mutation() *UserSecurityLogMutation
Mutation returns the UserSecurityLogMutation object of the builder.
func (*UserSecurityLogCreate) Save ¶
func (uslc *UserSecurityLogCreate) Save(ctx context.Context) (*UserSecurityLog, error)
Save creates the UserSecurityLog in the database.
func (*UserSecurityLogCreate) SaveX ¶
func (uslc *UserSecurityLogCreate) SaveX(ctx context.Context) *UserSecurityLog
SaveX calls Save and panics if Save returns an error.
func (*UserSecurityLogCreate) SetAction ¶
func (uslc *UserSecurityLogCreate) SetAction(u usersecuritylog.Action) *UserSecurityLogCreate
SetAction sets the "action" field.
func (*UserSecurityLogCreate) SetCreateTime ¶
func (uslc *UserSecurityLogCreate) SetCreateTime(t time.Time) *UserSecurityLogCreate
SetCreateTime sets the "create_time" field.
func (*UserSecurityLogCreate) SetDescription ¶
func (uslc *UserSecurityLogCreate) SetDescription(s string) *UserSecurityLogCreate
SetDescription sets the "description" field.
func (*UserSecurityLogCreate) SetID ¶
func (uslc *UserSecurityLogCreate) SetID(i int) *UserSecurityLogCreate
SetID sets the "id" field.
func (*UserSecurityLogCreate) SetIP ¶
func (uslc *UserSecurityLogCreate) SetIP(s string) *UserSecurityLogCreate
SetIP sets the "ip" field.
func (*UserSecurityLogCreate) SetNillableAction ¶
func (uslc *UserSecurityLogCreate) SetNillableAction(u *usersecuritylog.Action) *UserSecurityLogCreate
SetNillableAction sets the "action" field if the given value is not nil.
func (*UserSecurityLogCreate) SetNillableCreateTime ¶
func (uslc *UserSecurityLogCreate) SetNillableCreateTime(t *time.Time) *UserSecurityLogCreate
SetNillableCreateTime sets the "create_time" field if the given value is not nil.
func (*UserSecurityLogCreate) SetNillableDescription ¶
func (uslc *UserSecurityLogCreate) SetNillableDescription(s *string) *UserSecurityLogCreate
SetNillableDescription sets the "description" field if the given value is not nil.
func (*UserSecurityLogCreate) SetNillableIP ¶
func (uslc *UserSecurityLogCreate) SetNillableIP(s *string) *UserSecurityLogCreate
SetNillableIP sets the "ip" field if the given value is not nil.
func (*UserSecurityLogCreate) SetNillableRemark ¶
func (uslc *UserSecurityLogCreate) SetNillableRemark(s *string) *UserSecurityLogCreate
SetNillableRemark sets the "remark" field if the given value is not nil.
func (*UserSecurityLogCreate) SetNillableRequestID ¶
func (uslc *UserSecurityLogCreate) SetNillableRequestID(s *string) *UserSecurityLogCreate
SetNillableRequestID sets the "request_id" field if the given value is not nil.
func (*UserSecurityLogCreate) SetNillableServerVersion ¶
func (uslc *UserSecurityLogCreate) SetNillableServerVersion(s *string) *UserSecurityLogCreate
SetNillableServerVersion sets the "server_version" field if the given value is not nil.
func (*UserSecurityLogCreate) SetOwnerID ¶
func (uslc *UserSecurityLogCreate) SetOwnerID(i int) *UserSecurityLogCreate
SetOwnerID sets the "owner_id" field.
func (*UserSecurityLogCreate) SetRemark ¶
func (uslc *UserSecurityLogCreate) SetRemark(s string) *UserSecurityLogCreate
SetRemark sets the "remark" field.
func (*UserSecurityLogCreate) SetRequestID ¶
func (uslc *UserSecurityLogCreate) SetRequestID(s string) *UserSecurityLogCreate
SetRequestID sets the "request_id" field.
func (*UserSecurityLogCreate) SetSecurityLogsOwner ¶
func (uslc *UserSecurityLogCreate) SetSecurityLogsOwner(u *User) *UserSecurityLogCreate
SetSecurityLogsOwner sets the "security_logs_owner" edge to the User entity.
func (*UserSecurityLogCreate) SetSecurityLogsOwnerID ¶
func (uslc *UserSecurityLogCreate) SetSecurityLogsOwnerID(id int) *UserSecurityLogCreate
SetSecurityLogsOwnerID sets the "security_logs_owner" edge to the User entity by ID.
func (*UserSecurityLogCreate) SetServerVersion ¶
func (uslc *UserSecurityLogCreate) SetServerVersion(s string) *UserSecurityLogCreate
SetServerVersion sets the "server_version" field.
type UserSecurityLogCreateBulk ¶
type UserSecurityLogCreateBulk struct {
// contains filtered or unexported fields
}
UserSecurityLogCreateBulk is the builder for creating many UserSecurityLog entities in bulk.
func (*UserSecurityLogCreateBulk) Save ¶
func (uslcb *UserSecurityLogCreateBulk) Save(ctx context.Context) ([]*UserSecurityLog, error)
Save creates the UserSecurityLog entities in the database.
func (*UserSecurityLogCreateBulk) SaveX ¶
func (uslcb *UserSecurityLogCreateBulk) SaveX(ctx context.Context) []*UserSecurityLog
SaveX is like Save, but panics if an error occurs.
type UserSecurityLogDelete ¶
type UserSecurityLogDelete struct {
// contains filtered or unexported fields
}
UserSecurityLogDelete is the builder for deleting a UserSecurityLog entity.
func (*UserSecurityLogDelete) Exec ¶
func (usld *UserSecurityLogDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*UserSecurityLogDelete) ExecX ¶
func (usld *UserSecurityLogDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*UserSecurityLogDelete) Where ¶
func (usld *UserSecurityLogDelete) Where(ps ...predicate.UserSecurityLog) *UserSecurityLogDelete
Where adds a new predicate to the UserSecurityLogDelete builder.
type UserSecurityLogDeleteOne ¶
type UserSecurityLogDeleteOne struct {
// contains filtered or unexported fields
}
UserSecurityLogDeleteOne is the builder for deleting a single UserSecurityLog entity.
func (*UserSecurityLogDeleteOne) Exec ¶
func (usldo *UserSecurityLogDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*UserSecurityLogDeleteOne) ExecX ¶
func (usldo *UserSecurityLogDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type UserSecurityLogEdges ¶
type UserSecurityLogEdges struct { // SecurityLogsOwner holds the value of the security_logs_owner edge. SecurityLogsOwner *User `json:"owner,omitempty"` // contains filtered or unexported fields }
UserSecurityLogEdges holds the relations/edges for other nodes in the graph.
func (UserSecurityLogEdges) SecurityLogsOwnerOrErr ¶
func (e UserSecurityLogEdges) SecurityLogsOwnerOrErr() (*User, error)
SecurityLogsOwnerOrErr returns the SecurityLogsOwner value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type UserSecurityLogGroupBy ¶
type UserSecurityLogGroupBy struct {
// contains filtered or unexported fields
}
UserSecurityLogGroupBy is the group-by builder for UserSecurityLog entities.
func (*UserSecurityLogGroupBy) Aggregate ¶
func (uslgb *UserSecurityLogGroupBy) Aggregate(fns ...AggregateFunc) *UserSecurityLogGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*UserSecurityLogGroupBy) Bool ¶
func (uslgb *UserSecurityLogGroupBy) 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 (*UserSecurityLogGroupBy) BoolX ¶
func (uslgb *UserSecurityLogGroupBy) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*UserSecurityLogGroupBy) Bools ¶
func (uslgb *UserSecurityLogGroupBy) 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 (*UserSecurityLogGroupBy) BoolsX ¶
func (uslgb *UserSecurityLogGroupBy) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*UserSecurityLogGroupBy) Float64 ¶
func (uslgb *UserSecurityLogGroupBy) 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 (*UserSecurityLogGroupBy) Float64X ¶
func (uslgb *UserSecurityLogGroupBy) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*UserSecurityLogGroupBy) Float64s ¶
func (uslgb *UserSecurityLogGroupBy) 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 (*UserSecurityLogGroupBy) Float64sX ¶
func (uslgb *UserSecurityLogGroupBy) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*UserSecurityLogGroupBy) Int ¶
func (uslgb *UserSecurityLogGroupBy) 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 (*UserSecurityLogGroupBy) IntX ¶
func (uslgb *UserSecurityLogGroupBy) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*UserSecurityLogGroupBy) Ints ¶
func (uslgb *UserSecurityLogGroupBy) 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 (*UserSecurityLogGroupBy) IntsX ¶
func (uslgb *UserSecurityLogGroupBy) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*UserSecurityLogGroupBy) Scan ¶
func (uslgb *UserSecurityLogGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scans the result into the given value.
func (*UserSecurityLogGroupBy) ScanX ¶
func (uslgb *UserSecurityLogGroupBy) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*UserSecurityLogGroupBy) String ¶
func (uslgb *UserSecurityLogGroupBy) 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 (*UserSecurityLogGroupBy) StringX ¶
func (uslgb *UserSecurityLogGroupBy) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type UserSecurityLogMutation ¶
type UserSecurityLogMutation struct {
// contains filtered or unexported fields
}
UserSecurityLogMutation represents an operation that mutates the UserSecurityLog nodes in the graph.
func (*UserSecurityLogMutation) Action ¶
func (m *UserSecurityLogMutation) Action() (r usersecuritylog.Action, exists bool)
Action returns the value of the "action" field in the mutation.
func (*UserSecurityLogMutation) AddField ¶
func (m *UserSecurityLogMutation) 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 (*UserSecurityLogMutation) AddedEdges ¶
func (m *UserSecurityLogMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*UserSecurityLogMutation) AddedField ¶
func (m *UserSecurityLogMutation) 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 (*UserSecurityLogMutation) AddedFields ¶
func (m *UserSecurityLogMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*UserSecurityLogMutation) AddedIDs ¶
func (m *UserSecurityLogMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*UserSecurityLogMutation) ClearDescription ¶
func (m *UserSecurityLogMutation) ClearDescription()
ClearDescription clears the value of the "description" field.
func (*UserSecurityLogMutation) ClearEdge ¶
func (m *UserSecurityLogMutation) 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 (*UserSecurityLogMutation) ClearField ¶
func (m *UserSecurityLogMutation) 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 (*UserSecurityLogMutation) ClearIP ¶
func (m *UserSecurityLogMutation) ClearIP()
ClearIP clears the value of the "ip" field.
func (*UserSecurityLogMutation) ClearRemark ¶
func (m *UserSecurityLogMutation) ClearRemark()
ClearRemark clears the value of the "remark" field.
func (*UserSecurityLogMutation) ClearRequestID ¶
func (m *UserSecurityLogMutation) ClearRequestID()
ClearRequestID clears the value of the "request_id" field.
func (*UserSecurityLogMutation) ClearSecurityLogsOwner ¶
func (m *UserSecurityLogMutation) ClearSecurityLogsOwner()
ClearSecurityLogsOwner clears the "security_logs_owner" edge to the User entity.
func (*UserSecurityLogMutation) ClearServerVersion ¶
func (m *UserSecurityLogMutation) ClearServerVersion()
ClearServerVersion clears the value of the "server_version" field.
func (*UserSecurityLogMutation) ClearedEdges ¶
func (m *UserSecurityLogMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*UserSecurityLogMutation) ClearedFields ¶
func (m *UserSecurityLogMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (UserSecurityLogMutation) Client ¶
func (m UserSecurityLogMutation) 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 (*UserSecurityLogMutation) CreateTime ¶
func (m *UserSecurityLogMutation) CreateTime() (r time.Time, exists bool)
CreateTime returns the value of the "create_time" field in the mutation.
func (*UserSecurityLogMutation) Description ¶
func (m *UserSecurityLogMutation) Description() (r string, exists bool)
Description returns the value of the "description" field in the mutation.
func (*UserSecurityLogMutation) DescriptionCleared ¶
func (m *UserSecurityLogMutation) DescriptionCleared() bool
DescriptionCleared returns if the "description" field was cleared in this mutation.
func (*UserSecurityLogMutation) EdgeCleared ¶
func (m *UserSecurityLogMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*UserSecurityLogMutation) Field ¶
func (m *UserSecurityLogMutation) 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 (*UserSecurityLogMutation) FieldCleared ¶
func (m *UserSecurityLogMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*UserSecurityLogMutation) Fields ¶
func (m *UserSecurityLogMutation) 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 (*UserSecurityLogMutation) ID ¶
func (m *UserSecurityLogMutation) 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.
func (*UserSecurityLogMutation) IP ¶
func (m *UserSecurityLogMutation) IP() (r string, exists bool)
IP returns the value of the "ip" field in the mutation.
func (*UserSecurityLogMutation) IPCleared ¶
func (m *UserSecurityLogMutation) IPCleared() bool
IPCleared returns if the "ip" field was cleared in this mutation.
func (*UserSecurityLogMutation) OldAction ¶
func (m *UserSecurityLogMutation) OldAction(ctx context.Context) (v usersecuritylog.Action, err error)
OldAction returns the old "action" field's value of the UserSecurityLog entity. If the UserSecurityLog 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 (*UserSecurityLogMutation) OldCreateTime ¶
OldCreateTime returns the old "create_time" field's value of the UserSecurityLog entity. If the UserSecurityLog 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 (*UserSecurityLogMutation) OldDescription ¶
func (m *UserSecurityLogMutation) OldDescription(ctx context.Context) (v *string, err error)
OldDescription returns the old "description" field's value of the UserSecurityLog entity. If the UserSecurityLog 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 (*UserSecurityLogMutation) 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 (*UserSecurityLogMutation) OldIP ¶
func (m *UserSecurityLogMutation) OldIP(ctx context.Context) (v *string, err error)
OldIP returns the old "ip" field's value of the UserSecurityLog entity. If the UserSecurityLog 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 (*UserSecurityLogMutation) OldOwnerID ¶
func (m *UserSecurityLogMutation) OldOwnerID(ctx context.Context) (v int, err error)
OldOwnerID returns the old "owner_id" field's value of the UserSecurityLog entity. If the UserSecurityLog 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 (*UserSecurityLogMutation) OldRemark ¶
func (m *UserSecurityLogMutation) OldRemark(ctx context.Context) (v *string, err error)
OldRemark returns the old "remark" field's value of the UserSecurityLog entity. If the UserSecurityLog 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 (*UserSecurityLogMutation) OldRequestID ¶
func (m *UserSecurityLogMutation) OldRequestID(ctx context.Context) (v *string, err error)
OldRequestID returns the old "request_id" field's value of the UserSecurityLog entity. If the UserSecurityLog 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 (*UserSecurityLogMutation) OldServerVersion ¶
func (m *UserSecurityLogMutation) OldServerVersion(ctx context.Context) (v *string, err error)
OldServerVersion returns the old "server_version" field's value of the UserSecurityLog entity. If the UserSecurityLog 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 (*UserSecurityLogMutation) Op ¶
func (m *UserSecurityLogMutation) Op() Op
Op returns the operation name.
func (*UserSecurityLogMutation) OwnerID ¶
func (m *UserSecurityLogMutation) OwnerID() (r int, exists bool)
OwnerID returns the value of the "owner_id" field in the mutation.
func (*UserSecurityLogMutation) Remark ¶
func (m *UserSecurityLogMutation) Remark() (r string, exists bool)
Remark returns the value of the "remark" field in the mutation.
func (*UserSecurityLogMutation) RemarkCleared ¶
func (m *UserSecurityLogMutation) RemarkCleared() bool
RemarkCleared returns if the "remark" field was cleared in this mutation.
func (*UserSecurityLogMutation) RemovedEdges ¶
func (m *UserSecurityLogMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*UserSecurityLogMutation) RemovedIDs ¶
func (m *UserSecurityLogMutation) 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 (*UserSecurityLogMutation) RequestID ¶
func (m *UserSecurityLogMutation) RequestID() (r string, exists bool)
RequestID returns the value of the "request_id" field in the mutation.
func (*UserSecurityLogMutation) RequestIDCleared ¶
func (m *UserSecurityLogMutation) RequestIDCleared() bool
RequestIDCleared returns if the "request_id" field was cleared in this mutation.
func (*UserSecurityLogMutation) ResetAction ¶
func (m *UserSecurityLogMutation) ResetAction()
ResetAction resets all changes to the "action" field.
func (*UserSecurityLogMutation) ResetCreateTime ¶
func (m *UserSecurityLogMutation) ResetCreateTime()
ResetCreateTime resets all changes to the "create_time" field.
func (*UserSecurityLogMutation) ResetDescription ¶
func (m *UserSecurityLogMutation) ResetDescription()
ResetDescription resets all changes to the "description" field.
func (*UserSecurityLogMutation) ResetEdge ¶
func (m *UserSecurityLogMutation) 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 (*UserSecurityLogMutation) ResetField ¶
func (m *UserSecurityLogMutation) 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 (*UserSecurityLogMutation) ResetIP ¶
func (m *UserSecurityLogMutation) ResetIP()
ResetIP resets all changes to the "ip" field.
func (*UserSecurityLogMutation) ResetOwnerID ¶
func (m *UserSecurityLogMutation) ResetOwnerID()
ResetOwnerID resets all changes to the "owner_id" field.
func (*UserSecurityLogMutation) ResetRemark ¶
func (m *UserSecurityLogMutation) ResetRemark()
ResetRemark resets all changes to the "remark" field.
func (*UserSecurityLogMutation) ResetRequestID ¶
func (m *UserSecurityLogMutation) ResetRequestID()
ResetRequestID resets all changes to the "request_id" field.
func (*UserSecurityLogMutation) ResetSecurityLogsOwner ¶
func (m *UserSecurityLogMutation) ResetSecurityLogsOwner()
ResetSecurityLogsOwner resets all changes to the "security_logs_owner" edge.
func (*UserSecurityLogMutation) ResetServerVersion ¶
func (m *UserSecurityLogMutation) ResetServerVersion()
ResetServerVersion resets all changes to the "server_version" field.
func (*UserSecurityLogMutation) SecurityLogsOwnerCleared ¶
func (m *UserSecurityLogMutation) SecurityLogsOwnerCleared() bool
SecurityLogsOwnerCleared reports if the "security_logs_owner" edge to the User entity was cleared.
func (*UserSecurityLogMutation) SecurityLogsOwnerID ¶
func (m *UserSecurityLogMutation) SecurityLogsOwnerID() (id int, exists bool)
SecurityLogsOwnerID returns the "security_logs_owner" edge ID in the mutation.
func (*UserSecurityLogMutation) SecurityLogsOwnerIDs ¶
func (m *UserSecurityLogMutation) SecurityLogsOwnerIDs() (ids []int)
SecurityLogsOwnerIDs returns the "security_logs_owner" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use SecurityLogsOwnerID instead. It exists only for internal usage by the builders.
func (*UserSecurityLogMutation) ServerVersion ¶
func (m *UserSecurityLogMutation) ServerVersion() (r string, exists bool)
ServerVersion returns the value of the "server_version" field in the mutation.
func (*UserSecurityLogMutation) ServerVersionCleared ¶
func (m *UserSecurityLogMutation) ServerVersionCleared() bool
ServerVersionCleared returns if the "server_version" field was cleared in this mutation.
func (*UserSecurityLogMutation) SetAction ¶
func (m *UserSecurityLogMutation) SetAction(u usersecuritylog.Action)
SetAction sets the "action" field.
func (*UserSecurityLogMutation) SetCreateTime ¶
func (m *UserSecurityLogMutation) SetCreateTime(t time.Time)
SetCreateTime sets the "create_time" field.
func (*UserSecurityLogMutation) SetDescription ¶
func (m *UserSecurityLogMutation) SetDescription(s string)
SetDescription sets the "description" field.
func (*UserSecurityLogMutation) SetField ¶
func (m *UserSecurityLogMutation) 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 (*UserSecurityLogMutation) SetID ¶
func (m *UserSecurityLogMutation) SetID(id int)
SetID sets the value of the id field. Note that this operation is only accepted on creation of UserSecurityLog entities.
func (*UserSecurityLogMutation) SetIP ¶
func (m *UserSecurityLogMutation) SetIP(s string)
SetIP sets the "ip" field.
func (*UserSecurityLogMutation) SetOwnerID ¶
func (m *UserSecurityLogMutation) SetOwnerID(i int)
SetOwnerID sets the "owner_id" field.
func (*UserSecurityLogMutation) SetRemark ¶
func (m *UserSecurityLogMutation) SetRemark(s string)
SetRemark sets the "remark" field.
func (*UserSecurityLogMutation) SetRequestID ¶
func (m *UserSecurityLogMutation) SetRequestID(s string)
SetRequestID sets the "request_id" field.
func (*UserSecurityLogMutation) SetSecurityLogsOwnerID ¶
func (m *UserSecurityLogMutation) SetSecurityLogsOwnerID(id int)
SetSecurityLogsOwnerID sets the "security_logs_owner" edge to the User entity by id.
func (*UserSecurityLogMutation) SetServerVersion ¶
func (m *UserSecurityLogMutation) SetServerVersion(s string)
SetServerVersion sets the "server_version" field.
func (UserSecurityLogMutation) Tx ¶
func (m UserSecurityLogMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*UserSecurityLogMutation) Type ¶
func (m *UserSecurityLogMutation) Type() string
Type returns the node type of this mutation (UserSecurityLog).
type UserSecurityLogQuery ¶
type UserSecurityLogQuery struct {
// contains filtered or unexported fields
}
UserSecurityLogQuery is the builder for querying UserSecurityLog entities.
func (*UserSecurityLogQuery) All ¶
func (uslq *UserSecurityLogQuery) All(ctx context.Context) ([]*UserSecurityLog, error)
All executes the query and returns a list of UserSecurityLogs.
func (*UserSecurityLogQuery) AllX ¶
func (uslq *UserSecurityLogQuery) AllX(ctx context.Context) []*UserSecurityLog
AllX is like All, but panics if an error occurs.
func (*UserSecurityLogQuery) Clone ¶
func (uslq *UserSecurityLogQuery) Clone() *UserSecurityLogQuery
Clone returns a duplicate of the UserSecurityLogQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*UserSecurityLogQuery) Count ¶
func (uslq *UserSecurityLogQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*UserSecurityLogQuery) CountX ¶
func (uslq *UserSecurityLogQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*UserSecurityLogQuery) Exist ¶
func (uslq *UserSecurityLogQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*UserSecurityLogQuery) ExistX ¶
func (uslq *UserSecurityLogQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*UserSecurityLogQuery) First ¶
func (uslq *UserSecurityLogQuery) First(ctx context.Context) (*UserSecurityLog, error)
First returns the first UserSecurityLog entity from the query. Returns a *NotFoundError when no UserSecurityLog was found.
func (*UserSecurityLogQuery) FirstID ¶
func (uslq *UserSecurityLogQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first UserSecurityLog ID from the query. Returns a *NotFoundError when no UserSecurityLog ID was found.
func (*UserSecurityLogQuery) FirstIDX ¶
func (uslq *UserSecurityLogQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*UserSecurityLogQuery) FirstX ¶
func (uslq *UserSecurityLogQuery) FirstX(ctx context.Context) *UserSecurityLog
FirstX is like First, but panics if an error occurs.
func (*UserSecurityLogQuery) GroupBy ¶
func (uslq *UserSecurityLogQuery) GroupBy(field string, fields ...string) *UserSecurityLogGroupBy
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 { OwnerID int `json:"-"` Count int `json:"count,omitempty"` } client.UserSecurityLog.Query(). GroupBy(usersecuritylog.FieldOwnerID). Aggregate(model.Count()). Scan(ctx, &v)
func (*UserSecurityLogQuery) IDs ¶
func (uslq *UserSecurityLogQuery) IDs(ctx context.Context) ([]int, error)
IDs executes the query and returns a list of UserSecurityLog IDs.
func (*UserSecurityLogQuery) IDsX ¶
func (uslq *UserSecurityLogQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*UserSecurityLogQuery) Limit ¶
func (uslq *UserSecurityLogQuery) Limit(limit int) *UserSecurityLogQuery
Limit adds a limit step to the query.
func (*UserSecurityLogQuery) Offset ¶
func (uslq *UserSecurityLogQuery) Offset(offset int) *UserSecurityLogQuery
Offset adds an offset step to the query.
func (*UserSecurityLogQuery) Only ¶
func (uslq *UserSecurityLogQuery) Only(ctx context.Context) (*UserSecurityLog, error)
Only returns a single UserSecurityLog entity found by the query, ensuring it only returns one. Returns a *NotSingularError when exactly one UserSecurityLog entity is not found. Returns a *NotFoundError when no UserSecurityLog entities are found.
func (*UserSecurityLogQuery) OnlyID ¶
func (uslq *UserSecurityLogQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only UserSecurityLog ID in the query. Returns a *NotSingularError when exactly one UserSecurityLog ID is not found. Returns a *NotFoundError when no entities are found.
func (*UserSecurityLogQuery) OnlyIDX ¶
func (uslq *UserSecurityLogQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*UserSecurityLogQuery) OnlyX ¶
func (uslq *UserSecurityLogQuery) OnlyX(ctx context.Context) *UserSecurityLog
OnlyX is like Only, but panics if an error occurs.
func (*UserSecurityLogQuery) Order ¶
func (uslq *UserSecurityLogQuery) Order(o ...OrderFunc) *UserSecurityLogQuery
Order adds an order step to the query.
func (*UserSecurityLogQuery) QuerySecurityLogsOwner ¶
func (uslq *UserSecurityLogQuery) QuerySecurityLogsOwner() *UserQuery
QuerySecurityLogsOwner chains the current query on the "security_logs_owner" edge.
func (*UserSecurityLogQuery) Select ¶
func (uslq *UserSecurityLogQuery) Select(field string, fields ...string) *UserSecurityLogSelect
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 { OwnerID int `json:"-"` } client.UserSecurityLog.Query(). Select(usersecuritylog.FieldOwnerID). Scan(ctx, &v)
func (*UserSecurityLogQuery) Unique ¶
func (uslq *UserSecurityLogQuery) Unique(unique bool) *UserSecurityLogQuery
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 (*UserSecurityLogQuery) Where ¶
func (uslq *UserSecurityLogQuery) Where(ps ...predicate.UserSecurityLog) *UserSecurityLogQuery
Where adds a new predicate for the UserSecurityLogQuery builder.
func (*UserSecurityLogQuery) WithSecurityLogsOwner ¶
func (uslq *UserSecurityLogQuery) WithSecurityLogsOwner(opts ...func(*UserQuery)) *UserSecurityLogQuery
WithSecurityLogsOwner tells the query-builder to eager-load the nodes that are connected to the "security_logs_owner" edge. The optional arguments are used to configure the query builder of the edge.
type UserSecurityLogSelect ¶
type UserSecurityLogSelect struct { *UserSecurityLogQuery // contains filtered or unexported fields }
UserSecurityLogSelect is the builder for selecting fields of UserSecurityLog entities.
func (*UserSecurityLogSelect) Bool ¶
func (usls *UserSecurityLogSelect) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*UserSecurityLogSelect) BoolX ¶
func (usls *UserSecurityLogSelect) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*UserSecurityLogSelect) Bools ¶
func (usls *UserSecurityLogSelect) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*UserSecurityLogSelect) BoolsX ¶
func (usls *UserSecurityLogSelect) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*UserSecurityLogSelect) Float64 ¶
func (usls *UserSecurityLogSelect) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*UserSecurityLogSelect) Float64X ¶
func (usls *UserSecurityLogSelect) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*UserSecurityLogSelect) Float64s ¶
func (usls *UserSecurityLogSelect) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*UserSecurityLogSelect) Float64sX ¶
func (usls *UserSecurityLogSelect) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*UserSecurityLogSelect) Int ¶
func (usls *UserSecurityLogSelect) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*UserSecurityLogSelect) IntX ¶
func (usls *UserSecurityLogSelect) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*UserSecurityLogSelect) Ints ¶
func (usls *UserSecurityLogSelect) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*UserSecurityLogSelect) IntsX ¶
func (usls *UserSecurityLogSelect) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*UserSecurityLogSelect) Scan ¶
func (usls *UserSecurityLogSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scans the result into the given value.
func (*UserSecurityLogSelect) ScanX ¶
func (usls *UserSecurityLogSelect) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*UserSecurityLogSelect) String ¶
func (usls *UserSecurityLogSelect) String(ctx context.Context) (_ string, err error)
String returns a single string from a selector. It is only allowed when selecting one field.
func (*UserSecurityLogSelect) StringX ¶
func (usls *UserSecurityLogSelect) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type UserSecurityLogUpdate ¶
type UserSecurityLogUpdate struct {
// contains filtered or unexported fields
}
UserSecurityLogUpdate is the builder for updating UserSecurityLog entities.
func (*UserSecurityLogUpdate) ClearDescription ¶
func (uslu *UserSecurityLogUpdate) ClearDescription() *UserSecurityLogUpdate
ClearDescription clears the value of the "description" field.
func (*UserSecurityLogUpdate) ClearIP ¶
func (uslu *UserSecurityLogUpdate) ClearIP() *UserSecurityLogUpdate
ClearIP clears the value of the "ip" field.
func (*UserSecurityLogUpdate) ClearRemark ¶
func (uslu *UserSecurityLogUpdate) ClearRemark() *UserSecurityLogUpdate
ClearRemark clears the value of the "remark" field.
func (*UserSecurityLogUpdate) ClearRequestID ¶
func (uslu *UserSecurityLogUpdate) ClearRequestID() *UserSecurityLogUpdate
ClearRequestID clears the value of the "request_id" field.
func (*UserSecurityLogUpdate) ClearSecurityLogsOwner ¶
func (uslu *UserSecurityLogUpdate) ClearSecurityLogsOwner() *UserSecurityLogUpdate
ClearSecurityLogsOwner clears the "security_logs_owner" edge to the User entity.
func (*UserSecurityLogUpdate) ClearServerVersion ¶
func (uslu *UserSecurityLogUpdate) ClearServerVersion() *UserSecurityLogUpdate
ClearServerVersion clears the value of the "server_version" field.
func (*UserSecurityLogUpdate) Exec ¶
func (uslu *UserSecurityLogUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*UserSecurityLogUpdate) ExecX ¶
func (uslu *UserSecurityLogUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserSecurityLogUpdate) Mutation ¶
func (uslu *UserSecurityLogUpdate) Mutation() *UserSecurityLogMutation
Mutation returns the UserSecurityLogMutation object of the builder.
func (*UserSecurityLogUpdate) Save ¶
func (uslu *UserSecurityLogUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*UserSecurityLogUpdate) SaveX ¶
func (uslu *UserSecurityLogUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*UserSecurityLogUpdate) SetAction ¶
func (uslu *UserSecurityLogUpdate) SetAction(u usersecuritylog.Action) *UserSecurityLogUpdate
SetAction sets the "action" field.
func (*UserSecurityLogUpdate) SetDescription ¶
func (uslu *UserSecurityLogUpdate) SetDescription(s string) *UserSecurityLogUpdate
SetDescription sets the "description" field.
func (*UserSecurityLogUpdate) SetIP ¶
func (uslu *UserSecurityLogUpdate) SetIP(s string) *UserSecurityLogUpdate
SetIP sets the "ip" field.
func (*UserSecurityLogUpdate) SetNillableAction ¶
func (uslu *UserSecurityLogUpdate) SetNillableAction(u *usersecuritylog.Action) *UserSecurityLogUpdate
SetNillableAction sets the "action" field if the given value is not nil.
func (*UserSecurityLogUpdate) SetNillableDescription ¶
func (uslu *UserSecurityLogUpdate) SetNillableDescription(s *string) *UserSecurityLogUpdate
SetNillableDescription sets the "description" field if the given value is not nil.
func (*UserSecurityLogUpdate) SetNillableIP ¶
func (uslu *UserSecurityLogUpdate) SetNillableIP(s *string) *UserSecurityLogUpdate
SetNillableIP sets the "ip" field if the given value is not nil.
func (*UserSecurityLogUpdate) SetNillableRemark ¶
func (uslu *UserSecurityLogUpdate) SetNillableRemark(s *string) *UserSecurityLogUpdate
SetNillableRemark sets the "remark" field if the given value is not nil.
func (*UserSecurityLogUpdate) SetNillableRequestID ¶
func (uslu *UserSecurityLogUpdate) SetNillableRequestID(s *string) *UserSecurityLogUpdate
SetNillableRequestID sets the "request_id" field if the given value is not nil.
func (*UserSecurityLogUpdate) SetNillableServerVersion ¶
func (uslu *UserSecurityLogUpdate) SetNillableServerVersion(s *string) *UserSecurityLogUpdate
SetNillableServerVersion sets the "server_version" field if the given value is not nil.
func (*UserSecurityLogUpdate) SetOwnerID ¶
func (uslu *UserSecurityLogUpdate) SetOwnerID(i int) *UserSecurityLogUpdate
SetOwnerID sets the "owner_id" field.
func (*UserSecurityLogUpdate) SetRemark ¶
func (uslu *UserSecurityLogUpdate) SetRemark(s string) *UserSecurityLogUpdate
SetRemark sets the "remark" field.
func (*UserSecurityLogUpdate) SetRequestID ¶
func (uslu *UserSecurityLogUpdate) SetRequestID(s string) *UserSecurityLogUpdate
SetRequestID sets the "request_id" field.
func (*UserSecurityLogUpdate) SetSecurityLogsOwner ¶
func (uslu *UserSecurityLogUpdate) SetSecurityLogsOwner(u *User) *UserSecurityLogUpdate
SetSecurityLogsOwner sets the "security_logs_owner" edge to the User entity.
func (*UserSecurityLogUpdate) SetSecurityLogsOwnerID ¶
func (uslu *UserSecurityLogUpdate) SetSecurityLogsOwnerID(id int) *UserSecurityLogUpdate
SetSecurityLogsOwnerID sets the "security_logs_owner" edge to the User entity by ID.
func (*UserSecurityLogUpdate) SetServerVersion ¶
func (uslu *UserSecurityLogUpdate) SetServerVersion(s string) *UserSecurityLogUpdate
SetServerVersion sets the "server_version" field.
func (*UserSecurityLogUpdate) Where ¶
func (uslu *UserSecurityLogUpdate) Where(ps ...predicate.UserSecurityLog) *UserSecurityLogUpdate
Where adds a new predicate for the UserSecurityLogUpdate builder.
type UserSecurityLogUpdateOne ¶
type UserSecurityLogUpdateOne struct {
// contains filtered or unexported fields
}
UserSecurityLogUpdateOne is the builder for updating a single UserSecurityLog entity.
func (*UserSecurityLogUpdateOne) ClearDescription ¶
func (usluo *UserSecurityLogUpdateOne) ClearDescription() *UserSecurityLogUpdateOne
ClearDescription clears the value of the "description" field.
func (*UserSecurityLogUpdateOne) ClearIP ¶
func (usluo *UserSecurityLogUpdateOne) ClearIP() *UserSecurityLogUpdateOne
ClearIP clears the value of the "ip" field.
func (*UserSecurityLogUpdateOne) ClearRemark ¶
func (usluo *UserSecurityLogUpdateOne) ClearRemark() *UserSecurityLogUpdateOne
ClearRemark clears the value of the "remark" field.
func (*UserSecurityLogUpdateOne) ClearRequestID ¶
func (usluo *UserSecurityLogUpdateOne) ClearRequestID() *UserSecurityLogUpdateOne
ClearRequestID clears the value of the "request_id" field.
func (*UserSecurityLogUpdateOne) ClearSecurityLogsOwner ¶
func (usluo *UserSecurityLogUpdateOne) ClearSecurityLogsOwner() *UserSecurityLogUpdateOne
ClearSecurityLogsOwner clears the "security_logs_owner" edge to the User entity.
func (*UserSecurityLogUpdateOne) ClearServerVersion ¶
func (usluo *UserSecurityLogUpdateOne) ClearServerVersion() *UserSecurityLogUpdateOne
ClearServerVersion clears the value of the "server_version" field.
func (*UserSecurityLogUpdateOne) Exec ¶
func (usluo *UserSecurityLogUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*UserSecurityLogUpdateOne) ExecX ¶
func (usluo *UserSecurityLogUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserSecurityLogUpdateOne) Mutation ¶
func (usluo *UserSecurityLogUpdateOne) Mutation() *UserSecurityLogMutation
Mutation returns the UserSecurityLogMutation object of the builder.
func (*UserSecurityLogUpdateOne) Save ¶
func (usluo *UserSecurityLogUpdateOne) Save(ctx context.Context) (*UserSecurityLog, error)
Save executes the query and returns the updated UserSecurityLog entity.
func (*UserSecurityLogUpdateOne) SaveX ¶
func (usluo *UserSecurityLogUpdateOne) SaveX(ctx context.Context) *UserSecurityLog
SaveX is like Save, but panics if an error occurs.
func (*UserSecurityLogUpdateOne) Select ¶
func (usluo *UserSecurityLogUpdateOne) Select(field string, fields ...string) *UserSecurityLogUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*UserSecurityLogUpdateOne) SetAction ¶
func (usluo *UserSecurityLogUpdateOne) SetAction(u usersecuritylog.Action) *UserSecurityLogUpdateOne
SetAction sets the "action" field.
func (*UserSecurityLogUpdateOne) SetDescription ¶
func (usluo *UserSecurityLogUpdateOne) SetDescription(s string) *UserSecurityLogUpdateOne
SetDescription sets the "description" field.
func (*UserSecurityLogUpdateOne) SetIP ¶
func (usluo *UserSecurityLogUpdateOne) SetIP(s string) *UserSecurityLogUpdateOne
SetIP sets the "ip" field.
func (*UserSecurityLogUpdateOne) SetNillableAction ¶
func (usluo *UserSecurityLogUpdateOne) SetNillableAction(u *usersecuritylog.Action) *UserSecurityLogUpdateOne
SetNillableAction sets the "action" field if the given value is not nil.
func (*UserSecurityLogUpdateOne) SetNillableDescription ¶
func (usluo *UserSecurityLogUpdateOne) SetNillableDescription(s *string) *UserSecurityLogUpdateOne
SetNillableDescription sets the "description" field if the given value is not nil.
func (*UserSecurityLogUpdateOne) SetNillableIP ¶
func (usluo *UserSecurityLogUpdateOne) SetNillableIP(s *string) *UserSecurityLogUpdateOne
SetNillableIP sets the "ip" field if the given value is not nil.
func (*UserSecurityLogUpdateOne) SetNillableRemark ¶
func (usluo *UserSecurityLogUpdateOne) SetNillableRemark(s *string) *UserSecurityLogUpdateOne
SetNillableRemark sets the "remark" field if the given value is not nil.
func (*UserSecurityLogUpdateOne) SetNillableRequestID ¶
func (usluo *UserSecurityLogUpdateOne) SetNillableRequestID(s *string) *UserSecurityLogUpdateOne
SetNillableRequestID sets the "request_id" field if the given value is not nil.
func (*UserSecurityLogUpdateOne) SetNillableServerVersion ¶
func (usluo *UserSecurityLogUpdateOne) SetNillableServerVersion(s *string) *UserSecurityLogUpdateOne
SetNillableServerVersion sets the "server_version" field if the given value is not nil.
func (*UserSecurityLogUpdateOne) SetOwnerID ¶
func (usluo *UserSecurityLogUpdateOne) SetOwnerID(i int) *UserSecurityLogUpdateOne
SetOwnerID sets the "owner_id" field.
func (*UserSecurityLogUpdateOne) SetRemark ¶
func (usluo *UserSecurityLogUpdateOne) SetRemark(s string) *UserSecurityLogUpdateOne
SetRemark sets the "remark" field.
func (*UserSecurityLogUpdateOne) SetRequestID ¶
func (usluo *UserSecurityLogUpdateOne) SetRequestID(s string) *UserSecurityLogUpdateOne
SetRequestID sets the "request_id" field.
func (*UserSecurityLogUpdateOne) SetSecurityLogsOwner ¶
func (usluo *UserSecurityLogUpdateOne) SetSecurityLogsOwner(u *User) *UserSecurityLogUpdateOne
SetSecurityLogsOwner sets the "security_logs_owner" edge to the User entity.
func (*UserSecurityLogUpdateOne) SetSecurityLogsOwnerID ¶
func (usluo *UserSecurityLogUpdateOne) SetSecurityLogsOwnerID(id int) *UserSecurityLogUpdateOne
SetSecurityLogsOwnerID sets the "security_logs_owner" edge to the User entity by ID.
func (*UserSecurityLogUpdateOne) SetServerVersion ¶
func (usluo *UserSecurityLogUpdateOne) SetServerVersion(s string) *UserSecurityLogUpdateOne
SetServerVersion sets the "server_version" field.
type UserSecurityLogs ¶
type UserSecurityLogs []*UserSecurityLog
UserSecurityLogs is a parsable slice of UserSecurityLog.
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 UserSetting ¶
type UserSetting struct { // ID of the ent. ID int `json:"id,omitempty"` // OwnerID holds the value of the "owner_id" field. OwnerID int `json:"-"` // Key holds the value of the "key" field. Key string `json:"key,omitempty"` // Value holds the value of the "value" field. Value *string `json:"value,omitempty"` // Typeof holds the value of the "typeof" field. Typeof usersetting.Typeof `json:"typeof,omitempty"` // Expires holds the value of the "expires" field. Expires *time.Time `json:"-"` // UpdateTime holds the value of the "update_time" field. UpdateTime time.Time `json:"-"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the UserSettingQuery when eager-loading is set. Edges UserSettingEdges `json:"edges"` // contains filtered or unexported fields }
UserSetting is the model entity for the UserSetting schema.
func (*UserSetting) QuerySettingsOwner ¶
func (us *UserSetting) QuerySettingsOwner() *UserQuery
QuerySettingsOwner queries the "settings_owner" edge of the UserSetting entity.
func (*UserSetting) String ¶
func (us *UserSetting) String() string
String implements the fmt.Stringer.
func (*UserSetting) Unwrap ¶
func (us *UserSetting) Unwrap() *UserSetting
Unwrap unwraps the UserSetting 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 (*UserSetting) Update ¶
func (us *UserSetting) Update() *UserSettingUpdateOne
Update returns a builder for updating this UserSetting. Note that you need to call UserSetting.Unwrap() before calling this method if this UserSetting was returned from a transaction, and the transaction was committed or rolled back.
type UserSettingClient ¶
type UserSettingClient struct {
// contains filtered or unexported fields
}
UserSettingClient is a client for the UserSetting schema.
func NewUserSettingClient ¶
func NewUserSettingClient(c config) *UserSettingClient
NewUserSettingClient returns a client for the UserSetting from the given config.
func (*UserSettingClient) Create ¶
func (c *UserSettingClient) Create() *UserSettingCreate
Create returns a create builder for UserSetting.
func (*UserSettingClient) CreateBulk ¶
func (c *UserSettingClient) CreateBulk(builders ...*UserSettingCreate) *UserSettingCreateBulk
CreateBulk returns a builder for creating a bulk of UserSetting entities.
func (*UserSettingClient) Delete ¶
func (c *UserSettingClient) Delete() *UserSettingDelete
Delete returns a delete builder for UserSetting.
func (*UserSettingClient) DeleteOne ¶
func (c *UserSettingClient) DeleteOne(us *UserSetting) *UserSettingDeleteOne
DeleteOne returns a delete builder for the given entity.
func (*UserSettingClient) DeleteOneID ¶
func (c *UserSettingClient) DeleteOneID(id int) *UserSettingDeleteOne
DeleteOneID returns a delete builder for the given id.
func (*UserSettingClient) Get ¶
func (c *UserSettingClient) Get(ctx context.Context, id int) (*UserSetting, error)
Get returns a UserSetting entity by its id.
func (*UserSettingClient) GetX ¶
func (c *UserSettingClient) GetX(ctx context.Context, id int) *UserSetting
GetX is like Get, but panics if an error occurs.
func (*UserSettingClient) Hooks ¶
func (c *UserSettingClient) Hooks() []Hook
Hooks returns the client hooks.
func (*UserSettingClient) Query ¶
func (c *UserSettingClient) Query() *UserSettingQuery
Query returns a query builder for UserSetting.
func (*UserSettingClient) QuerySettingsOwner ¶
func (c *UserSettingClient) QuerySettingsOwner(us *UserSetting) *UserQuery
QuerySettingsOwner queries the settings_owner edge of a UserSetting.
func (*UserSettingClient) Update ¶
func (c *UserSettingClient) Update() *UserSettingUpdate
Update returns an update builder for UserSetting.
func (*UserSettingClient) UpdateOne ¶
func (c *UserSettingClient) UpdateOne(us *UserSetting) *UserSettingUpdateOne
UpdateOne returns an update builder for the given entity.
func (*UserSettingClient) UpdateOneID ¶
func (c *UserSettingClient) UpdateOneID(id int) *UserSettingUpdateOne
UpdateOneID returns an update builder for the given id.
func (*UserSettingClient) Use ¶
func (c *UserSettingClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `usersetting.Hooks(f(g(h())))`.
type UserSettingCreate ¶
type UserSettingCreate struct {
// contains filtered or unexported fields
}
UserSettingCreate is the builder for creating a UserSetting entity.
func (*UserSettingCreate) Mutation ¶
func (usc *UserSettingCreate) Mutation() *UserSettingMutation
Mutation returns the UserSettingMutation object of the builder.
func (*UserSettingCreate) Save ¶
func (usc *UserSettingCreate) Save(ctx context.Context) (*UserSetting, error)
Save creates the UserSetting in the database.
func (*UserSettingCreate) SaveX ¶
func (usc *UserSettingCreate) SaveX(ctx context.Context) *UserSetting
SaveX calls Save and panics if Save returns an error.
func (*UserSettingCreate) SetExpires ¶
func (usc *UserSettingCreate) SetExpires(t time.Time) *UserSettingCreate
SetExpires sets the "expires" field.
func (*UserSettingCreate) SetID ¶
func (usc *UserSettingCreate) SetID(i int) *UserSettingCreate
SetID sets the "id" field.
func (*UserSettingCreate) SetKey ¶
func (usc *UserSettingCreate) SetKey(s string) *UserSettingCreate
SetKey sets the "key" field.
func (*UserSettingCreate) SetNillableExpires ¶
func (usc *UserSettingCreate) SetNillableExpires(t *time.Time) *UserSettingCreate
SetNillableExpires sets the "expires" field if the given value is not nil.
func (*UserSettingCreate) SetNillableTypeof ¶
func (usc *UserSettingCreate) SetNillableTypeof(u *usersetting.Typeof) *UserSettingCreate
SetNillableTypeof sets the "typeof" field if the given value is not nil.
func (*UserSettingCreate) SetNillableUpdateTime ¶
func (usc *UserSettingCreate) SetNillableUpdateTime(t *time.Time) *UserSettingCreate
SetNillableUpdateTime sets the "update_time" field if the given value is not nil.
func (*UserSettingCreate) SetNillableValue ¶
func (usc *UserSettingCreate) SetNillableValue(s *string) *UserSettingCreate
SetNillableValue sets the "value" field if the given value is not nil.
func (*UserSettingCreate) SetOwnerID ¶
func (usc *UserSettingCreate) SetOwnerID(i int) *UserSettingCreate
SetOwnerID sets the "owner_id" field.
func (*UserSettingCreate) SetSettingsOwner ¶
func (usc *UserSettingCreate) SetSettingsOwner(u *User) *UserSettingCreate
SetSettingsOwner sets the "settings_owner" edge to the User entity.
func (*UserSettingCreate) SetSettingsOwnerID ¶
func (usc *UserSettingCreate) SetSettingsOwnerID(id int) *UserSettingCreate
SetSettingsOwnerID sets the "settings_owner" edge to the User entity by ID.
func (*UserSettingCreate) SetTypeof ¶
func (usc *UserSettingCreate) SetTypeof(u usersetting.Typeof) *UserSettingCreate
SetTypeof sets the "typeof" field.
func (*UserSettingCreate) SetUpdateTime ¶
func (usc *UserSettingCreate) SetUpdateTime(t time.Time) *UserSettingCreate
SetUpdateTime sets the "update_time" field.
func (*UserSettingCreate) SetValue ¶
func (usc *UserSettingCreate) SetValue(s string) *UserSettingCreate
SetValue sets the "value" field.
type UserSettingCreateBulk ¶
type UserSettingCreateBulk struct {
// contains filtered or unexported fields
}
UserSettingCreateBulk is the builder for creating many UserSetting entities in bulk.
func (*UserSettingCreateBulk) Save ¶
func (uscb *UserSettingCreateBulk) Save(ctx context.Context) ([]*UserSetting, error)
Save creates the UserSetting entities in the database.
func (*UserSettingCreateBulk) SaveX ¶
func (uscb *UserSettingCreateBulk) SaveX(ctx context.Context) []*UserSetting
SaveX is like Save, but panics if an error occurs.
type UserSettingDelete ¶
type UserSettingDelete struct {
// contains filtered or unexported fields
}
UserSettingDelete is the builder for deleting a UserSetting entity.
func (*UserSettingDelete) Exec ¶
func (usd *UserSettingDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*UserSettingDelete) ExecX ¶
func (usd *UserSettingDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*UserSettingDelete) Where ¶
func (usd *UserSettingDelete) Where(ps ...predicate.UserSetting) *UserSettingDelete
Where adds a new predicate to the UserSettingDelete builder.
type UserSettingDeleteOne ¶
type UserSettingDeleteOne struct {
// contains filtered or unexported fields
}
UserSettingDeleteOne is the builder for deleting a single UserSetting entity.
func (*UserSettingDeleteOne) Exec ¶
func (usdo *UserSettingDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*UserSettingDeleteOne) ExecX ¶
func (usdo *UserSettingDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type UserSettingEdges ¶
type UserSettingEdges struct { // SettingsOwner holds the value of the settings_owner edge. SettingsOwner *User `json:"owner,omitempty"` // contains filtered or unexported fields }
UserSettingEdges holds the relations/edges for other nodes in the graph.
func (UserSettingEdges) SettingsOwnerOrErr ¶
func (e UserSettingEdges) SettingsOwnerOrErr() (*User, error)
SettingsOwnerOrErr returns the SettingsOwner value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type UserSettingGroupBy ¶
type UserSettingGroupBy struct {
// contains filtered or unexported fields
}
UserSettingGroupBy is the group-by builder for UserSetting entities.
func (*UserSettingGroupBy) Aggregate ¶
func (usgb *UserSettingGroupBy) Aggregate(fns ...AggregateFunc) *UserSettingGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*UserSettingGroupBy) Bool ¶
func (usgb *UserSettingGroupBy) 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 (*UserSettingGroupBy) BoolX ¶
func (usgb *UserSettingGroupBy) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*UserSettingGroupBy) Bools ¶
func (usgb *UserSettingGroupBy) 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 (*UserSettingGroupBy) BoolsX ¶
func (usgb *UserSettingGroupBy) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*UserSettingGroupBy) Float64 ¶
func (usgb *UserSettingGroupBy) 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 (*UserSettingGroupBy) Float64X ¶
func (usgb *UserSettingGroupBy) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*UserSettingGroupBy) Float64s ¶
func (usgb *UserSettingGroupBy) 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 (*UserSettingGroupBy) Float64sX ¶
func (usgb *UserSettingGroupBy) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*UserSettingGroupBy) Int ¶
func (usgb *UserSettingGroupBy) 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 (*UserSettingGroupBy) IntX ¶
func (usgb *UserSettingGroupBy) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*UserSettingGroupBy) Ints ¶
func (usgb *UserSettingGroupBy) 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 (*UserSettingGroupBy) IntsX ¶
func (usgb *UserSettingGroupBy) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*UserSettingGroupBy) Scan ¶
func (usgb *UserSettingGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scans the result into the given value.
func (*UserSettingGroupBy) ScanX ¶
func (usgb *UserSettingGroupBy) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*UserSettingGroupBy) String ¶
func (usgb *UserSettingGroupBy) 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 (*UserSettingGroupBy) StringX ¶
func (usgb *UserSettingGroupBy) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type UserSettingMutation ¶
type UserSettingMutation struct {
// contains filtered or unexported fields
}
UserSettingMutation represents an operation that mutates the UserSetting nodes in the graph.
func (*UserSettingMutation) AddField ¶
func (m *UserSettingMutation) 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 (*UserSettingMutation) AddedEdges ¶
func (m *UserSettingMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*UserSettingMutation) AddedField ¶
func (m *UserSettingMutation) 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 (*UserSettingMutation) AddedFields ¶
func (m *UserSettingMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*UserSettingMutation) AddedIDs ¶
func (m *UserSettingMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*UserSettingMutation) ClearEdge ¶
func (m *UserSettingMutation) 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 (*UserSettingMutation) ClearExpires ¶
func (m *UserSettingMutation) ClearExpires()
ClearExpires clears the value of the "expires" field.
func (*UserSettingMutation) ClearField ¶
func (m *UserSettingMutation) 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 (*UserSettingMutation) ClearSettingsOwner ¶
func (m *UserSettingMutation) ClearSettingsOwner()
ClearSettingsOwner clears the "settings_owner" edge to the User entity.
func (*UserSettingMutation) ClearValue ¶
func (m *UserSettingMutation) ClearValue()
ClearValue clears the value of the "value" field.
func (*UserSettingMutation) ClearedEdges ¶
func (m *UserSettingMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*UserSettingMutation) ClearedFields ¶
func (m *UserSettingMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (UserSettingMutation) Client ¶
func (m UserSettingMutation) 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 (*UserSettingMutation) EdgeCleared ¶
func (m *UserSettingMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*UserSettingMutation) Expires ¶
func (m *UserSettingMutation) Expires() (r time.Time, exists bool)
Expires returns the value of the "expires" field in the mutation.
func (*UserSettingMutation) ExpiresCleared ¶
func (m *UserSettingMutation) ExpiresCleared() bool
ExpiresCleared returns if the "expires" field was cleared in this mutation.
func (*UserSettingMutation) Field ¶
func (m *UserSettingMutation) 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 (*UserSettingMutation) FieldCleared ¶
func (m *UserSettingMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*UserSettingMutation) Fields ¶
func (m *UserSettingMutation) 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 (*UserSettingMutation) ID ¶
func (m *UserSettingMutation) 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.
func (*UserSettingMutation) Key ¶
func (m *UserSettingMutation) Key() (r string, exists bool)
Key returns the value of the "key" field in the mutation.
func (*UserSettingMutation) OldExpires ¶
OldExpires returns the old "expires" field's value of the UserSetting entity. If the UserSetting 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 (*UserSettingMutation) 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 (*UserSettingMutation) OldKey ¶
func (m *UserSettingMutation) OldKey(ctx context.Context) (v string, err error)
OldKey returns the old "key" field's value of the UserSetting entity. If the UserSetting 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 (*UserSettingMutation) OldOwnerID ¶
func (m *UserSettingMutation) OldOwnerID(ctx context.Context) (v int, err error)
OldOwnerID returns the old "owner_id" field's value of the UserSetting entity. If the UserSetting 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 (*UserSettingMutation) OldTypeof ¶
func (m *UserSettingMutation) OldTypeof(ctx context.Context) (v usersetting.Typeof, err error)
OldTypeof returns the old "typeof" field's value of the UserSetting entity. If the UserSetting 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 (*UserSettingMutation) OldUpdateTime ¶
OldUpdateTime returns the old "update_time" field's value of the UserSetting entity. If the UserSetting 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 (*UserSettingMutation) OldValue ¶
func (m *UserSettingMutation) OldValue(ctx context.Context) (v *string, err error)
OldValue returns the old "value" field's value of the UserSetting entity. If the UserSetting 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 (*UserSettingMutation) Op ¶
func (m *UserSettingMutation) Op() Op
Op returns the operation name.
func (*UserSettingMutation) OwnerID ¶
func (m *UserSettingMutation) OwnerID() (r int, exists bool)
OwnerID returns the value of the "owner_id" field in the mutation.
func (*UserSettingMutation) RemovedEdges ¶
func (m *UserSettingMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*UserSettingMutation) RemovedIDs ¶
func (m *UserSettingMutation) 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 (*UserSettingMutation) ResetEdge ¶
func (m *UserSettingMutation) 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 (*UserSettingMutation) ResetExpires ¶
func (m *UserSettingMutation) ResetExpires()
ResetExpires resets all changes to the "expires" field.
func (*UserSettingMutation) ResetField ¶
func (m *UserSettingMutation) 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 (*UserSettingMutation) ResetKey ¶
func (m *UserSettingMutation) ResetKey()
ResetKey resets all changes to the "key" field.
func (*UserSettingMutation) ResetOwnerID ¶
func (m *UserSettingMutation) ResetOwnerID()
ResetOwnerID resets all changes to the "owner_id" field.
func (*UserSettingMutation) ResetSettingsOwner ¶
func (m *UserSettingMutation) ResetSettingsOwner()
ResetSettingsOwner resets all changes to the "settings_owner" edge.
func (*UserSettingMutation) ResetTypeof ¶
func (m *UserSettingMutation) ResetTypeof()
ResetTypeof resets all changes to the "typeof" field.
func (*UserSettingMutation) ResetUpdateTime ¶
func (m *UserSettingMutation) ResetUpdateTime()
ResetUpdateTime resets all changes to the "update_time" field.
func (*UserSettingMutation) ResetValue ¶
func (m *UserSettingMutation) ResetValue()
ResetValue resets all changes to the "value" field.
func (*UserSettingMutation) SetExpires ¶
func (m *UserSettingMutation) SetExpires(t time.Time)
SetExpires sets the "expires" field.
func (*UserSettingMutation) SetField ¶
func (m *UserSettingMutation) 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 (*UserSettingMutation) SetID ¶
func (m *UserSettingMutation) SetID(id int)
SetID sets the value of the id field. Note that this operation is only accepted on creation of UserSetting entities.
func (*UserSettingMutation) SetKey ¶
func (m *UserSettingMutation) SetKey(s string)
SetKey sets the "key" field.
func (*UserSettingMutation) SetOwnerID ¶
func (m *UserSettingMutation) SetOwnerID(i int)
SetOwnerID sets the "owner_id" field.
func (*UserSettingMutation) SetSettingsOwnerID ¶
func (m *UserSettingMutation) SetSettingsOwnerID(id int)
SetSettingsOwnerID sets the "settings_owner" edge to the User entity by id.
func (*UserSettingMutation) SetTypeof ¶
func (m *UserSettingMutation) SetTypeof(u usersetting.Typeof)
SetTypeof sets the "typeof" field.
func (*UserSettingMutation) SetUpdateTime ¶
func (m *UserSettingMutation) SetUpdateTime(t time.Time)
SetUpdateTime sets the "update_time" field.
func (*UserSettingMutation) SetValue ¶
func (m *UserSettingMutation) SetValue(s string)
SetValue sets the "value" field.
func (*UserSettingMutation) SettingsOwnerCleared ¶
func (m *UserSettingMutation) SettingsOwnerCleared() bool
SettingsOwnerCleared reports if the "settings_owner" edge to the User entity was cleared.
func (*UserSettingMutation) SettingsOwnerID ¶
func (m *UserSettingMutation) SettingsOwnerID() (id int, exists bool)
SettingsOwnerID returns the "settings_owner" edge ID in the mutation.
func (*UserSettingMutation) SettingsOwnerIDs ¶
func (m *UserSettingMutation) SettingsOwnerIDs() (ids []int)
SettingsOwnerIDs returns the "settings_owner" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use SettingsOwnerID instead. It exists only for internal usage by the builders.
func (UserSettingMutation) Tx ¶
func (m UserSettingMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*UserSettingMutation) Type ¶
func (m *UserSettingMutation) Type() string
Type returns the node type of this mutation (UserSetting).
func (*UserSettingMutation) Typeof ¶
func (m *UserSettingMutation) Typeof() (r usersetting.Typeof, exists bool)
Typeof returns the value of the "typeof" field in the mutation.
func (*UserSettingMutation) UpdateTime ¶
func (m *UserSettingMutation) UpdateTime() (r time.Time, exists bool)
UpdateTime returns the value of the "update_time" field in the mutation.
func (*UserSettingMutation) Value ¶
func (m *UserSettingMutation) Value() (r string, exists bool)
Value returns the value of the "value" field in the mutation.
func (*UserSettingMutation) ValueCleared ¶
func (m *UserSettingMutation) ValueCleared() bool
ValueCleared returns if the "value" field was cleared in this mutation.
type UserSettingQuery ¶
type UserSettingQuery struct {
// contains filtered or unexported fields
}
UserSettingQuery is the builder for querying UserSetting entities.
func (*UserSettingQuery) All ¶
func (usq *UserSettingQuery) All(ctx context.Context) ([]*UserSetting, error)
All executes the query and returns a list of UserSettings.
func (*UserSettingQuery) AllX ¶
func (usq *UserSettingQuery) AllX(ctx context.Context) []*UserSetting
AllX is like All, but panics if an error occurs.
func (*UserSettingQuery) Clone ¶
func (usq *UserSettingQuery) Clone() *UserSettingQuery
Clone returns a duplicate of the UserSettingQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*UserSettingQuery) Count ¶
func (usq *UserSettingQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*UserSettingQuery) CountX ¶
func (usq *UserSettingQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*UserSettingQuery) Exist ¶
func (usq *UserSettingQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*UserSettingQuery) ExistX ¶
func (usq *UserSettingQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*UserSettingQuery) First ¶
func (usq *UserSettingQuery) First(ctx context.Context) (*UserSetting, error)
First returns the first UserSetting entity from the query. Returns a *NotFoundError when no UserSetting was found.
func (*UserSettingQuery) FirstID ¶
func (usq *UserSettingQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first UserSetting ID from the query. Returns a *NotFoundError when no UserSetting ID was found.
func (*UserSettingQuery) FirstIDX ¶
func (usq *UserSettingQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*UserSettingQuery) FirstX ¶
func (usq *UserSettingQuery) FirstX(ctx context.Context) *UserSetting
FirstX is like First, but panics if an error occurs.
func (*UserSettingQuery) GroupBy ¶
func (usq *UserSettingQuery) GroupBy(field string, fields ...string) *UserSettingGroupBy
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 { OwnerID int `json:"-"` Count int `json:"count,omitempty"` } client.UserSetting.Query(). GroupBy(usersetting.FieldOwnerID). Aggregate(model.Count()). Scan(ctx, &v)
func (*UserSettingQuery) IDs ¶
func (usq *UserSettingQuery) IDs(ctx context.Context) ([]int, error)
IDs executes the query and returns a list of UserSetting IDs.
func (*UserSettingQuery) IDsX ¶
func (usq *UserSettingQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*UserSettingQuery) Limit ¶
func (usq *UserSettingQuery) Limit(limit int) *UserSettingQuery
Limit adds a limit step to the query.
func (*UserSettingQuery) Offset ¶
func (usq *UserSettingQuery) Offset(offset int) *UserSettingQuery
Offset adds an offset step to the query.
func (*UserSettingQuery) Only ¶
func (usq *UserSettingQuery) Only(ctx context.Context) (*UserSetting, error)
Only returns a single UserSetting entity found by the query, ensuring it only returns one. Returns a *NotSingularError when exactly one UserSetting entity is not found. Returns a *NotFoundError when no UserSetting entities are found.
func (*UserSettingQuery) OnlyID ¶
func (usq *UserSettingQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only UserSetting ID in the query. Returns a *NotSingularError when exactly one UserSetting ID is not found. Returns a *NotFoundError when no entities are found.
func (*UserSettingQuery) OnlyIDX ¶
func (usq *UserSettingQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*UserSettingQuery) OnlyX ¶
func (usq *UserSettingQuery) OnlyX(ctx context.Context) *UserSetting
OnlyX is like Only, but panics if an error occurs.
func (*UserSettingQuery) Order ¶
func (usq *UserSettingQuery) Order(o ...OrderFunc) *UserSettingQuery
Order adds an order step to the query.
func (*UserSettingQuery) QuerySettingsOwner ¶
func (usq *UserSettingQuery) QuerySettingsOwner() *UserQuery
QuerySettingsOwner chains the current query on the "settings_owner" edge.
func (*UserSettingQuery) Select ¶
func (usq *UserSettingQuery) Select(field string, fields ...string) *UserSettingSelect
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 { OwnerID int `json:"-"` } client.UserSetting.Query(). Select(usersetting.FieldOwnerID). Scan(ctx, &v)
func (*UserSettingQuery) Unique ¶
func (usq *UserSettingQuery) Unique(unique bool) *UserSettingQuery
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 (*UserSettingQuery) Where ¶
func (usq *UserSettingQuery) Where(ps ...predicate.UserSetting) *UserSettingQuery
Where adds a new predicate for the UserSettingQuery builder.
func (*UserSettingQuery) WithSettingsOwner ¶
func (usq *UserSettingQuery) WithSettingsOwner(opts ...func(*UserQuery)) *UserSettingQuery
WithSettingsOwner tells the query-builder to eager-load the nodes that are connected to the "settings_owner" edge. The optional arguments are used to configure the query builder of the edge.
type UserSettingSelect ¶
type UserSettingSelect struct { *UserSettingQuery // contains filtered or unexported fields }
UserSettingSelect is the builder for selecting fields of UserSetting entities.
func (*UserSettingSelect) Bool ¶
func (uss *UserSettingSelect) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*UserSettingSelect) BoolX ¶
func (uss *UserSettingSelect) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*UserSettingSelect) Bools ¶
func (uss *UserSettingSelect) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*UserSettingSelect) BoolsX ¶
func (uss *UserSettingSelect) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*UserSettingSelect) Float64 ¶
func (uss *UserSettingSelect) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*UserSettingSelect) Float64X ¶
func (uss *UserSettingSelect) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*UserSettingSelect) Float64s ¶
func (uss *UserSettingSelect) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*UserSettingSelect) Float64sX ¶
func (uss *UserSettingSelect) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*UserSettingSelect) Int ¶
func (uss *UserSettingSelect) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*UserSettingSelect) IntX ¶
func (uss *UserSettingSelect) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*UserSettingSelect) Ints ¶
func (uss *UserSettingSelect) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*UserSettingSelect) IntsX ¶
func (uss *UserSettingSelect) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*UserSettingSelect) Scan ¶
func (uss *UserSettingSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scans the result into the given value.
func (*UserSettingSelect) ScanX ¶
func (uss *UserSettingSelect) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*UserSettingSelect) String ¶
func (uss *UserSettingSelect) String(ctx context.Context) (_ string, err error)
String returns a single string from a selector. It is only allowed when selecting one field.
func (*UserSettingSelect) StringX ¶
func (uss *UserSettingSelect) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type UserSettingUpdate ¶
type UserSettingUpdate struct {
// contains filtered or unexported fields
}
UserSettingUpdate is the builder for updating UserSetting entities.
func (*UserSettingUpdate) ClearExpires ¶
func (usu *UserSettingUpdate) ClearExpires() *UserSettingUpdate
ClearExpires clears the value of the "expires" field.
func (*UserSettingUpdate) ClearSettingsOwner ¶
func (usu *UserSettingUpdate) ClearSettingsOwner() *UserSettingUpdate
ClearSettingsOwner clears the "settings_owner" edge to the User entity.
func (*UserSettingUpdate) ClearValue ¶
func (usu *UserSettingUpdate) ClearValue() *UserSettingUpdate
ClearValue clears the value of the "value" field.
func (*UserSettingUpdate) Exec ¶
func (usu *UserSettingUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*UserSettingUpdate) ExecX ¶
func (usu *UserSettingUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserSettingUpdate) Mutation ¶
func (usu *UserSettingUpdate) Mutation() *UserSettingMutation
Mutation returns the UserSettingMutation object of the builder.
func (*UserSettingUpdate) Save ¶
func (usu *UserSettingUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*UserSettingUpdate) SaveX ¶
func (usu *UserSettingUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*UserSettingUpdate) SetExpires ¶
func (usu *UserSettingUpdate) SetExpires(t time.Time) *UserSettingUpdate
SetExpires sets the "expires" field.
func (*UserSettingUpdate) SetKey ¶
func (usu *UserSettingUpdate) SetKey(s string) *UserSettingUpdate
SetKey sets the "key" field.
func (*UserSettingUpdate) SetNillableExpires ¶
func (usu *UserSettingUpdate) SetNillableExpires(t *time.Time) *UserSettingUpdate
SetNillableExpires sets the "expires" field if the given value is not nil.
func (*UserSettingUpdate) SetNillableTypeof ¶
func (usu *UserSettingUpdate) SetNillableTypeof(u *usersetting.Typeof) *UserSettingUpdate
SetNillableTypeof sets the "typeof" field if the given value is not nil.
func (*UserSettingUpdate) SetNillableValue ¶
func (usu *UserSettingUpdate) SetNillableValue(s *string) *UserSettingUpdate
SetNillableValue sets the "value" field if the given value is not nil.
func (*UserSettingUpdate) SetOwnerID ¶
func (usu *UserSettingUpdate) SetOwnerID(i int) *UserSettingUpdate
SetOwnerID sets the "owner_id" field.
func (*UserSettingUpdate) SetSettingsOwner ¶
func (usu *UserSettingUpdate) SetSettingsOwner(u *User) *UserSettingUpdate
SetSettingsOwner sets the "settings_owner" edge to the User entity.
func (*UserSettingUpdate) SetSettingsOwnerID ¶
func (usu *UserSettingUpdate) SetSettingsOwnerID(id int) *UserSettingUpdate
SetSettingsOwnerID sets the "settings_owner" edge to the User entity by ID.
func (*UserSettingUpdate) SetTypeof ¶
func (usu *UserSettingUpdate) SetTypeof(u usersetting.Typeof) *UserSettingUpdate
SetTypeof sets the "typeof" field.
func (*UserSettingUpdate) SetUpdateTime ¶
func (usu *UserSettingUpdate) SetUpdateTime(t time.Time) *UserSettingUpdate
SetUpdateTime sets the "update_time" field.
func (*UserSettingUpdate) SetValue ¶
func (usu *UserSettingUpdate) SetValue(s string) *UserSettingUpdate
SetValue sets the "value" field.
func (*UserSettingUpdate) Where ¶
func (usu *UserSettingUpdate) Where(ps ...predicate.UserSetting) *UserSettingUpdate
Where adds a new predicate for the UserSettingUpdate builder.
type UserSettingUpdateOne ¶
type UserSettingUpdateOne struct {
// contains filtered or unexported fields
}
UserSettingUpdateOne is the builder for updating a single UserSetting entity.
func (*UserSettingUpdateOne) ClearExpires ¶
func (usuo *UserSettingUpdateOne) ClearExpires() *UserSettingUpdateOne
ClearExpires clears the value of the "expires" field.
func (*UserSettingUpdateOne) ClearSettingsOwner ¶
func (usuo *UserSettingUpdateOne) ClearSettingsOwner() *UserSettingUpdateOne
ClearSettingsOwner clears the "settings_owner" edge to the User entity.
func (*UserSettingUpdateOne) ClearValue ¶
func (usuo *UserSettingUpdateOne) ClearValue() *UserSettingUpdateOne
ClearValue clears the value of the "value" field.
func (*UserSettingUpdateOne) Exec ¶
func (usuo *UserSettingUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*UserSettingUpdateOne) ExecX ¶
func (usuo *UserSettingUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserSettingUpdateOne) Mutation ¶
func (usuo *UserSettingUpdateOne) Mutation() *UserSettingMutation
Mutation returns the UserSettingMutation object of the builder.
func (*UserSettingUpdateOne) Save ¶
func (usuo *UserSettingUpdateOne) Save(ctx context.Context) (*UserSetting, error)
Save executes the query and returns the updated UserSetting entity.
func (*UserSettingUpdateOne) SaveX ¶
func (usuo *UserSettingUpdateOne) SaveX(ctx context.Context) *UserSetting
SaveX is like Save, but panics if an error occurs.
func (*UserSettingUpdateOne) Select ¶
func (usuo *UserSettingUpdateOne) Select(field string, fields ...string) *UserSettingUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*UserSettingUpdateOne) SetExpires ¶
func (usuo *UserSettingUpdateOne) SetExpires(t time.Time) *UserSettingUpdateOne
SetExpires sets the "expires" field.
func (*UserSettingUpdateOne) SetKey ¶
func (usuo *UserSettingUpdateOne) SetKey(s string) *UserSettingUpdateOne
SetKey sets the "key" field.
func (*UserSettingUpdateOne) SetNillableExpires ¶
func (usuo *UserSettingUpdateOne) SetNillableExpires(t *time.Time) *UserSettingUpdateOne
SetNillableExpires sets the "expires" field if the given value is not nil.
func (*UserSettingUpdateOne) SetNillableTypeof ¶
func (usuo *UserSettingUpdateOne) SetNillableTypeof(u *usersetting.Typeof) *UserSettingUpdateOne
SetNillableTypeof sets the "typeof" field if the given value is not nil.
func (*UserSettingUpdateOne) SetNillableValue ¶
func (usuo *UserSettingUpdateOne) SetNillableValue(s *string) *UserSettingUpdateOne
SetNillableValue sets the "value" field if the given value is not nil.
func (*UserSettingUpdateOne) SetOwnerID ¶
func (usuo *UserSettingUpdateOne) SetOwnerID(i int) *UserSettingUpdateOne
SetOwnerID sets the "owner_id" field.
func (*UserSettingUpdateOne) SetSettingsOwner ¶
func (usuo *UserSettingUpdateOne) SetSettingsOwner(u *User) *UserSettingUpdateOne
SetSettingsOwner sets the "settings_owner" edge to the User entity.
func (*UserSettingUpdateOne) SetSettingsOwnerID ¶
func (usuo *UserSettingUpdateOne) SetSettingsOwnerID(id int) *UserSettingUpdateOne
SetSettingsOwnerID sets the "settings_owner" edge to the User entity by ID.
func (*UserSettingUpdateOne) SetTypeof ¶
func (usuo *UserSettingUpdateOne) SetTypeof(u usersetting.Typeof) *UserSettingUpdateOne
SetTypeof sets the "typeof" field.
func (*UserSettingUpdateOne) SetUpdateTime ¶
func (usuo *UserSettingUpdateOne) SetUpdateTime(t time.Time) *UserSettingUpdateOne
SetUpdateTime sets the "update_time" field.
func (*UserSettingUpdateOne) SetValue ¶
func (usuo *UserSettingUpdateOne) SetValue(s string) *UserSettingUpdateOne
SetValue sets the "value" field.
type UserSettings ¶
type UserSettings []*UserSetting
UserSettings is a parsable slice of UserSetting.
type UserUpdate ¶
type UserUpdate struct {
// contains filtered or unexported fields
}
UserUpdate is the builder for updating User entities.
func (*UserUpdate) AddGroupIDs ¶
func (uu *UserUpdate) AddGroupIDs(ids ...int) *UserUpdate
AddGroupIDs adds the "groups" edge to the UserGroup entity by IDs.
func (*UserUpdate) AddGroups ¶
func (uu *UserUpdate) AddGroups(u ...*UserGroup) *UserUpdate
AddGroups adds the "groups" edges to the UserGroup entity.
func (*UserUpdate) AddUserEmailIDs ¶
func (uu *UserUpdate) AddUserEmailIDs(ids ...int) *UserUpdate
AddUserEmailIDs adds the "UserEmails" edge to the UserEmail entity by IDs.
func (*UserUpdate) AddUserEmails ¶
func (uu *UserUpdate) AddUserEmails(u ...*UserEmail) *UserUpdate
AddUserEmails adds the "UserEmails" edges to the UserEmail entity.
func (*UserUpdate) AddUserSecurityLogIDs ¶
func (uu *UserUpdate) AddUserSecurityLogIDs(ids ...int) *UserUpdate
AddUserSecurityLogIDs adds the "UserSecurityLogs" edge to the UserSecurityLog entity by IDs.
func (*UserUpdate) AddUserSecurityLogs ¶
func (uu *UserUpdate) AddUserSecurityLogs(u ...*UserSecurityLog) *UserUpdate
AddUserSecurityLogs adds the "UserSecurityLogs" edges to the UserSecurityLog entity.
func (*UserUpdate) AddUserSettingIDs ¶
func (uu *UserUpdate) AddUserSettingIDs(ids ...int) *UserUpdate
AddUserSettingIDs adds the "UserSettings" edge to the UserSetting entity by IDs.
func (*UserUpdate) AddUserSettings ¶
func (uu *UserUpdate) AddUserSettings(u ...*UserSetting) *UserUpdate
AddUserSettings adds the "UserSettings" edges to the UserSetting entity.
func (*UserUpdate) ClearAvatarURL ¶
func (uu *UserUpdate) ClearAvatarURL() *UserUpdate
ClearAvatarURL clears the value of the "avatar_url" field.
func (*UserUpdate) ClearDeleteTime ¶
func (uu *UserUpdate) ClearDeleteTime() *UserUpdate
ClearDeleteTime clears the value of the "delete_time" field.
func (*UserUpdate) ClearGroups ¶
func (uu *UserUpdate) ClearGroups() *UserUpdate
ClearGroups clears all "groups" edges to the UserGroup entity.
func (*UserUpdate) ClearPassword ¶
func (uu *UserUpdate) ClearPassword() *UserUpdate
ClearPassword clears the value of the "password" field.
func (*UserUpdate) ClearPhone ¶
func (uu *UserUpdate) ClearPhone() *UserUpdate
ClearPhone clears the value of the "phone" field.
func (*UserUpdate) ClearPlan ¶
func (uu *UserUpdate) ClearPlan() *UserUpdate
ClearPlan clears the value of the "plan" field.
func (*UserUpdate) ClearStatus ¶
func (uu *UserUpdate) ClearStatus() *UserUpdate
ClearStatus clears the value of the "status" field.
func (*UserUpdate) ClearUserEmails ¶
func (uu *UserUpdate) ClearUserEmails() *UserUpdate
ClearUserEmails clears all "UserEmails" edges to the UserEmail entity.
func (*UserUpdate) ClearUserSecurityLogs ¶
func (uu *UserUpdate) ClearUserSecurityLogs() *UserUpdate
ClearUserSecurityLogs clears all "UserSecurityLogs" edges to the UserSecurityLog entity.
func (*UserUpdate) ClearUserSettings ¶
func (uu *UserUpdate) ClearUserSettings() *UserUpdate
ClearUserSettings clears all "UserSettings" edges to the UserSetting 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) RemoveGroupIDs ¶
func (uu *UserUpdate) RemoveGroupIDs(ids ...int) *UserUpdate
RemoveGroupIDs removes the "groups" edge to UserGroup entities by IDs.
func (*UserUpdate) RemoveGroups ¶
func (uu *UserUpdate) RemoveGroups(u ...*UserGroup) *UserUpdate
RemoveGroups removes "groups" edges to UserGroup entities.
func (*UserUpdate) RemoveUserEmailIDs ¶
func (uu *UserUpdate) RemoveUserEmailIDs(ids ...int) *UserUpdate
RemoveUserEmailIDs removes the "UserEmails" edge to UserEmail entities by IDs.
func (*UserUpdate) RemoveUserEmails ¶
func (uu *UserUpdate) RemoveUserEmails(u ...*UserEmail) *UserUpdate
RemoveUserEmails removes "UserEmails" edges to UserEmail entities.
func (*UserUpdate) RemoveUserSecurityLogIDs ¶
func (uu *UserUpdate) RemoveUserSecurityLogIDs(ids ...int) *UserUpdate
RemoveUserSecurityLogIDs removes the "UserSecurityLogs" edge to UserSecurityLog entities by IDs.
func (*UserUpdate) RemoveUserSecurityLogs ¶
func (uu *UserUpdate) RemoveUserSecurityLogs(u ...*UserSecurityLog) *UserUpdate
RemoveUserSecurityLogs removes "UserSecurityLogs" edges to UserSecurityLog entities.
func (*UserUpdate) RemoveUserSettingIDs ¶
func (uu *UserUpdate) RemoveUserSettingIDs(ids ...int) *UserUpdate
RemoveUserSettingIDs removes the "UserSettings" edge to UserSetting entities by IDs.
func (*UserUpdate) RemoveUserSettings ¶
func (uu *UserUpdate) RemoveUserSettings(u ...*UserSetting) *UserUpdate
RemoveUserSettings removes "UserSettings" edges to UserSetting 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) SetAvatarURL ¶
func (uu *UserUpdate) SetAvatarURL(s string) *UserUpdate
SetAvatarURL sets the "avatar_url" field.
func (*UserUpdate) SetDeleteTime ¶
func (uu *UserUpdate) SetDeleteTime(t time.Time) *UserUpdate
SetDeleteTime sets the "delete_time" field.
func (*UserUpdate) SetGender ¶
func (uu *UserUpdate) SetGender(u user.Gender) *UserUpdate
SetGender sets the "gender" field.
func (*UserUpdate) SetNickname ¶
func (uu *UserUpdate) SetNickname(s string) *UserUpdate
SetNickname sets the "nickname" field.
func (*UserUpdate) SetNillableAvatarURL ¶
func (uu *UserUpdate) SetNillableAvatarURL(s *string) *UserUpdate
SetNillableAvatarURL sets the "avatar_url" field if the given value is not nil.
func (*UserUpdate) SetNillableDeleteTime ¶
func (uu *UserUpdate) SetNillableDeleteTime(t *time.Time) *UserUpdate
SetNillableDeleteTime sets the "delete_time" field if the given value is not nil.
func (*UserUpdate) SetNillableGender ¶
func (uu *UserUpdate) SetNillableGender(u *user.Gender) *UserUpdate
SetNillableGender sets the "gender" field if the given value is not nil.
func (*UserUpdate) SetNillablePassword ¶
func (uu *UserUpdate) SetNillablePassword(s *string) *UserUpdate
SetNillablePassword sets the "password" field if the given value is not nil.
func (*UserUpdate) SetNillablePhone ¶
func (uu *UserUpdate) SetNillablePhone(s *string) *UserUpdate
SetNillablePhone sets the "phone" field if the given value is not nil.
func (*UserUpdate) SetNillablePlan ¶
func (uu *UserUpdate) SetNillablePlan(u *user.Plan) *UserUpdate
SetNillablePlan sets the "plan" field if the given value is not nil.
func (*UserUpdate) SetNillableSecondAuth ¶
func (uu *UserUpdate) SetNillableSecondAuth(b *bool) *UserUpdate
SetNillableSecondAuth sets the "second_auth" 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) SetPassword ¶
func (uu *UserUpdate) SetPassword(s string) *UserUpdate
SetPassword sets the "password" field.
func (*UserUpdate) SetPhone ¶
func (uu *UserUpdate) SetPhone(s string) *UserUpdate
SetPhone sets the "phone" field.
func (*UserUpdate) SetPlan ¶
func (uu *UserUpdate) SetPlan(u user.Plan) *UserUpdate
SetPlan sets the "plan" field.
func (*UserUpdate) SetSecondAuth ¶
func (uu *UserUpdate) SetSecondAuth(b bool) *UserUpdate
SetSecondAuth sets the "second_auth" field.
func (*UserUpdate) SetStatus ¶
func (uu *UserUpdate) SetStatus(u user.Status) *UserUpdate
SetStatus sets the "status" field.
func (*UserUpdate) SetUpdateTime ¶
func (uu *UserUpdate) SetUpdateTime(t time.Time) *UserUpdate
SetUpdateTime sets the "update_time" field.
func (*UserUpdate) Where ¶
func (uu *UserUpdate) Where(ps ...predicate.User) *UserUpdate
Where adds a new predicate for 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) AddGroupIDs ¶
func (uuo *UserUpdateOne) AddGroupIDs(ids ...int) *UserUpdateOne
AddGroupIDs adds the "groups" edge to the UserGroup entity by IDs.
func (*UserUpdateOne) AddGroups ¶
func (uuo *UserUpdateOne) AddGroups(u ...*UserGroup) *UserUpdateOne
AddGroups adds the "groups" edges to the UserGroup entity.
func (*UserUpdateOne) AddUserEmailIDs ¶
func (uuo *UserUpdateOne) AddUserEmailIDs(ids ...int) *UserUpdateOne
AddUserEmailIDs adds the "UserEmails" edge to the UserEmail entity by IDs.
func (*UserUpdateOne) AddUserEmails ¶
func (uuo *UserUpdateOne) AddUserEmails(u ...*UserEmail) *UserUpdateOne
AddUserEmails adds the "UserEmails" edges to the UserEmail entity.
func (*UserUpdateOne) AddUserSecurityLogIDs ¶
func (uuo *UserUpdateOne) AddUserSecurityLogIDs(ids ...int) *UserUpdateOne
AddUserSecurityLogIDs adds the "UserSecurityLogs" edge to the UserSecurityLog entity by IDs.
func (*UserUpdateOne) AddUserSecurityLogs ¶
func (uuo *UserUpdateOne) AddUserSecurityLogs(u ...*UserSecurityLog) *UserUpdateOne
AddUserSecurityLogs adds the "UserSecurityLogs" edges to the UserSecurityLog entity.
func (*UserUpdateOne) AddUserSettingIDs ¶
func (uuo *UserUpdateOne) AddUserSettingIDs(ids ...int) *UserUpdateOne
AddUserSettingIDs adds the "UserSettings" edge to the UserSetting entity by IDs.
func (*UserUpdateOne) AddUserSettings ¶
func (uuo *UserUpdateOne) AddUserSettings(u ...*UserSetting) *UserUpdateOne
AddUserSettings adds the "UserSettings" edges to the UserSetting entity.
func (*UserUpdateOne) ClearAvatarURL ¶
func (uuo *UserUpdateOne) ClearAvatarURL() *UserUpdateOne
ClearAvatarURL clears the value of the "avatar_url" field.
func (*UserUpdateOne) ClearDeleteTime ¶
func (uuo *UserUpdateOne) ClearDeleteTime() *UserUpdateOne
ClearDeleteTime clears the value of the "delete_time" field.
func (*UserUpdateOne) ClearGroups ¶
func (uuo *UserUpdateOne) ClearGroups() *UserUpdateOne
ClearGroups clears all "groups" edges to the UserGroup entity.
func (*UserUpdateOne) ClearPassword ¶
func (uuo *UserUpdateOne) ClearPassword() *UserUpdateOne
ClearPassword clears the value of the "password" field.
func (*UserUpdateOne) ClearPhone ¶
func (uuo *UserUpdateOne) ClearPhone() *UserUpdateOne
ClearPhone clears the value of the "phone" field.
func (*UserUpdateOne) ClearPlan ¶
func (uuo *UserUpdateOne) ClearPlan() *UserUpdateOne
ClearPlan clears the value of the "plan" field.
func (*UserUpdateOne) ClearStatus ¶
func (uuo *UserUpdateOne) ClearStatus() *UserUpdateOne
ClearStatus clears the value of the "status" field.
func (*UserUpdateOne) ClearUserEmails ¶
func (uuo *UserUpdateOne) ClearUserEmails() *UserUpdateOne
ClearUserEmails clears all "UserEmails" edges to the UserEmail entity.
func (*UserUpdateOne) ClearUserSecurityLogs ¶
func (uuo *UserUpdateOne) ClearUserSecurityLogs() *UserUpdateOne
ClearUserSecurityLogs clears all "UserSecurityLogs" edges to the UserSecurityLog entity.
func (*UserUpdateOne) ClearUserSettings ¶
func (uuo *UserUpdateOne) ClearUserSettings() *UserUpdateOne
ClearUserSettings clears all "UserSettings" edges to the UserSetting 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) RemoveGroupIDs ¶
func (uuo *UserUpdateOne) RemoveGroupIDs(ids ...int) *UserUpdateOne
RemoveGroupIDs removes the "groups" edge to UserGroup entities by IDs.
func (*UserUpdateOne) RemoveGroups ¶
func (uuo *UserUpdateOne) RemoveGroups(u ...*UserGroup) *UserUpdateOne
RemoveGroups removes "groups" edges to UserGroup entities.
func (*UserUpdateOne) RemoveUserEmailIDs ¶
func (uuo *UserUpdateOne) RemoveUserEmailIDs(ids ...int) *UserUpdateOne
RemoveUserEmailIDs removes the "UserEmails" edge to UserEmail entities by IDs.
func (*UserUpdateOne) RemoveUserEmails ¶
func (uuo *UserUpdateOne) RemoveUserEmails(u ...*UserEmail) *UserUpdateOne
RemoveUserEmails removes "UserEmails" edges to UserEmail entities.
func (*UserUpdateOne) RemoveUserSecurityLogIDs ¶
func (uuo *UserUpdateOne) RemoveUserSecurityLogIDs(ids ...int) *UserUpdateOne
RemoveUserSecurityLogIDs removes the "UserSecurityLogs" edge to UserSecurityLog entities by IDs.
func (*UserUpdateOne) RemoveUserSecurityLogs ¶
func (uuo *UserUpdateOne) RemoveUserSecurityLogs(u ...*UserSecurityLog) *UserUpdateOne
RemoveUserSecurityLogs removes "UserSecurityLogs" edges to UserSecurityLog entities.
func (*UserUpdateOne) RemoveUserSettingIDs ¶
func (uuo *UserUpdateOne) RemoveUserSettingIDs(ids ...int) *UserUpdateOne
RemoveUserSettingIDs removes the "UserSettings" edge to UserSetting entities by IDs.
func (*UserUpdateOne) RemoveUserSettings ¶
func (uuo *UserUpdateOne) RemoveUserSettings(u ...*UserSetting) *UserUpdateOne
RemoveUserSettings removes "UserSettings" edges to UserSetting 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) SetAvatarURL ¶
func (uuo *UserUpdateOne) SetAvatarURL(s string) *UserUpdateOne
SetAvatarURL sets the "avatar_url" field.
func (*UserUpdateOne) SetDeleteTime ¶
func (uuo *UserUpdateOne) SetDeleteTime(t time.Time) *UserUpdateOne
SetDeleteTime sets the "delete_time" field.
func (*UserUpdateOne) SetGender ¶
func (uuo *UserUpdateOne) SetGender(u user.Gender) *UserUpdateOne
SetGender sets the "gender" field.
func (*UserUpdateOne) SetNickname ¶
func (uuo *UserUpdateOne) SetNickname(s string) *UserUpdateOne
SetNickname sets the "nickname" field.
func (*UserUpdateOne) SetNillableAvatarURL ¶
func (uuo *UserUpdateOne) SetNillableAvatarURL(s *string) *UserUpdateOne
SetNillableAvatarURL sets the "avatar_url" field if the given value is not nil.
func (*UserUpdateOne) SetNillableDeleteTime ¶
func (uuo *UserUpdateOne) SetNillableDeleteTime(t *time.Time) *UserUpdateOne
SetNillableDeleteTime sets the "delete_time" field if the given value is not nil.
func (*UserUpdateOne) SetNillableGender ¶
func (uuo *UserUpdateOne) SetNillableGender(u *user.Gender) *UserUpdateOne
SetNillableGender sets the "gender" field if the given value is not nil.
func (*UserUpdateOne) SetNillablePassword ¶
func (uuo *UserUpdateOne) SetNillablePassword(s *string) *UserUpdateOne
SetNillablePassword sets the "password" field if the given value is not nil.
func (*UserUpdateOne) SetNillablePhone ¶
func (uuo *UserUpdateOne) SetNillablePhone(s *string) *UserUpdateOne
SetNillablePhone sets the "phone" field if the given value is not nil.
func (*UserUpdateOne) SetNillablePlan ¶
func (uuo *UserUpdateOne) SetNillablePlan(u *user.Plan) *UserUpdateOne
SetNillablePlan sets the "plan" field if the given value is not nil.
func (*UserUpdateOne) SetNillableSecondAuth ¶
func (uuo *UserUpdateOne) SetNillableSecondAuth(b *bool) *UserUpdateOne
SetNillableSecondAuth sets the "second_auth" 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) SetPassword ¶
func (uuo *UserUpdateOne) SetPassword(s string) *UserUpdateOne
SetPassword sets the "password" field.
func (*UserUpdateOne) SetPhone ¶
func (uuo *UserUpdateOne) SetPhone(s string) *UserUpdateOne
SetPhone sets the "phone" field.
func (*UserUpdateOne) SetPlan ¶
func (uuo *UserUpdateOne) SetPlan(u user.Plan) *UserUpdateOne
SetPlan sets the "plan" field.
func (*UserUpdateOne) SetSecondAuth ¶
func (uuo *UserUpdateOne) SetSecondAuth(b bool) *UserUpdateOne
SetSecondAuth sets the "second_auth" field.
func (*UserUpdateOne) SetStatus ¶
func (uuo *UserUpdateOne) SetStatus(u user.Status) *UserUpdateOne
SetStatus sets the "status" field.
func (*UserUpdateOne) SetUpdateTime ¶
func (uuo *UserUpdateOne) SetUpdateTime(t time.Time) *UserUpdateOne
SetUpdateTime sets the "update_time" field.
type ValidationError ¶
type ValidationError struct { Name string // Field or edge name. // contains filtered or unexported fields }
ValidationError returns when validating a field fails.
func (*ValidationError) Error ¶
func (e *ValidationError) Error() string
Error implements the error interface.
func (*ValidationError) Unwrap ¶
func (e *ValidationError) Unwrap() error
Unwrap implements the errors.Wrapper interface.
Source Files
¶
- client.go
- config.go
- context.go
- ent.go
- mutation.go
- runtime.go
- tx.go
- user.go
- user_create.go
- user_delete.go
- user_query.go
- user_update.go
- useremail.go
- useremail_create.go
- useremail_delete.go
- useremail_query.go
- useremail_update.go
- usergroup.go
- usergroup_create.go
- usergroup_delete.go
- usergroup_query.go
- usergroup_update.go
- usersecuritylog.go
- usersecuritylog_create.go
- usersecuritylog_delete.go
- usersecuritylog_query.go
- usersecuritylog_update.go
- usersetting.go
- usersetting_create.go
- usersetting_delete.go
- usersetting_query.go
- usersetting_update.go