Documentation ¶
Index ¶
- func ConnectDb() (*gorm.DB, error)
- func InitDatabase()
- func ReConnetDB() error
- type Persist
- func (persist *Persist) AdminLogin(userID, password string) (bean.AdminUsers, error)
- func (persist *Persist) AdminUserInfo(userID string) (bean.AdminUserView, error)
- func (persist *Persist) Close()
- func (persist *Persist) CountUser() (uint64, error)
- func (persist *Persist) CreateAdminUser(user bean.AdminUsers) error
- func (persist *Persist) CreateUser(user bean.Users) error
- func (persist *Persist) ListUser(search string, page int) ([]bean.Users, error)
- func (persist *Persist) Login(userID, password string) (bean.Users, error)
- func (persist *Persist) UpdateAdminUserPasswd(userID, new string) error
- func (persist *Persist) UpdateUserPasswd(userID, new string) error
- func (persist *Persist) UserInfo(userID string) (bean.UserView, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Persist ¶
type Persist struct {
// contains filtered or unexported fields
}
Persist struct
var GPersist *Persist
GPersist global Persist
func (*Persist) AdminLogin ¶
func (persist *Persist) AdminLogin(userID, password string) (bean.AdminUsers, error)
AdminLogin AdminLogin Persist
func (*Persist) AdminUserInfo ¶
func (persist *Persist) AdminUserInfo(userID string) (bean.AdminUserView, error)
AdminUserInfo AdminUserInfo Persist
func (*Persist) CreateAdminUser ¶
func (persist *Persist) CreateAdminUser(user bean.AdminUsers) error
CreateAdminUser CreateAdminUser Persist
func (*Persist) CreateUser ¶
CreateUser CreateUser Persist
func (*Persist) UpdateAdminUserPasswd ¶
UpdateAdminUserPasswd UpdateAdminUserPasswd Persist
func (*Persist) UpdateUserPasswd ¶
UpdateUserPasswd UpdateUserPasswd Persist
Click to show internal directories.
Click to hide internal directories.