Documentation
¶
Index ¶
- func WithUserMobile(mobile string) gormx.SqlOptions
- type AuthUserData
- type JwtUserClaims
- type User
- type UserAuth
- func (u *UserAuth) Delete(ctx context.Context, id int64) error
- func (u *UserAuth) FindOne(ctx context.Context, id int64) (*UserAuth, error)
- func (u *UserAuth) FindOneByAuthTypeAuthKey(ctx context.Context, authType string, authKey string) (*UserAuth, error)
- func (u *UserAuth) FindOneByUserIdAuthType(ctx context.Context, userId int64, authType string) (*UserAuth, error)
- func (u *UserAuth) Insert(ctx context.Context, data *UserAuth) error
- func (u *UserAuth) Update(ctx context.Context, data *UserAuth) error
- func (u *UserAuth) UpdateWithVersion(ctx context.Context, data *UserAuth) error
- type UserAuthModel
- type UserModel
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WithUserMobile ¶
func WithUserMobile(mobile string) gormx.SqlOptions
Types ¶
type AuthUserData ¶
type JwtUserClaims ¶
type JwtUserClaims struct { jwtgo.StandardClaims Info AuthUserData `json:"info"` }
type User ¶
type UserAuth ¶
type UserAuth struct { Id int64 `gorm:"id"` CreateTime time.Time `gorm:"create_time"` UpdateTime time.Time `gorm:"update_time"` DeleteTime time.Time `gorm:"delete_time"` DelState int64 `gorm:"del_state"` Version int64 `gorm:"version"` // 版本号 UserId int64 `gorm:"user_id"` AuthKey string `gorm:"auth_key"` // 平台唯一id AuthType string `gorm:"auth_type"` // 平台类型 }
func (*UserAuth) FindOneByAuthTypeAuthKey ¶
func (*UserAuth) FindOneByUserIdAuthType ¶
type UserAuthModel ¶
type UserAuthModel interface { Insert(ctx context.Context, data *UserAuth) error FindOne(ctx context.Context, id int64) (*UserAuth, error) FindOneByAuthTypeAuthKey(ctx context.Context, authType string, authKey string) (*UserAuth, error) FindOneByUserIdAuthType(ctx context.Context, userId int64, authType string) (*UserAuth, error) Update(ctx context.Context, data *UserAuth) error UpdateWithVersion(ctx context.Context, data *UserAuth) error Delete(ctx context.Context, id int64) error }
Click to show internal directories.
Click to hide internal directories.