Documentation ¶
Index ¶
- Variables
- func InitTables(db *gorm.DB) error
- type User
- type UserDao
- func (dao *UserDao) FindByEmail(ctx *gin.Context, email string) (User, error)
- func (dao *UserDao) FindById(ctx *gin.Context, id int64) (User, error)
- func (dao *UserDao) FindProfileById(ctx *gin.Context, id int64) (User, error)
- func (dao *UserDao) Insert(ctx context.Context, u User) error
- func (dao *UserDao) InsertById(ctx *gin.Context, id int64, user User) error
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrUserDuplicateEmail = errors.New("邮箱冲突")
)
Functions ¶
func InitTables ¶
Types ¶
type UserDao ¶
type UserDao struct {
// contains filtered or unexported fields
}
func NewUserDao ¶
func (*UserDao) FindByEmail ¶
func (*UserDao) FindProfileById ¶
Click to show internal directories.
Click to hide internal directories.