Documentation ¶
Index ¶
- type User
- type UserManager
- func (m *UserManager) ArticleNumPlusOne(uid int64) error
- func (m *UserManager) CreateUser(username, password string) error
- func (m *UserManager) GetArticleNum(uid int64) (int64, error)
- func (m *UserManager) GetUserById(uid int64) (*User, error)
- func (m *UserManager) GetUserByName(name string) (*User, error)
- func (m *UserManager) LoginCheck(username, password string) (bool, int64, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type User ¶
type UserManager ¶
type UserManager struct {
// contains filtered or unexported fields
}
func NewUserManager ¶
func NewUserManager(db *gorm.DB) *UserManager
NewUserManager creates a mysql manager.
func (*UserManager) ArticleNumPlusOne ¶
func (m *UserManager) ArticleNumPlusOne(uid int64) error
func (*UserManager) CreateUser ¶
func (m *UserManager) CreateUser(username, password string) error
func (*UserManager) GetArticleNum ¶
func (m *UserManager) GetArticleNum(uid int64) (int64, error)
func (*UserManager) GetUserById ¶
func (m *UserManager) GetUserById(uid int64) (*User, error)
func (*UserManager) GetUserByName ¶
func (m *UserManager) GetUserByName(name string) (*User, error)
func (*UserManager) LoginCheck ¶
func (m *UserManager) LoginCheck(username, password string) (bool, int64, error)
Click to show internal directories.
Click to hide internal directories.