Documentation ¶
Index ¶
- Variables
- type Auth
- type AuthManager
- type User
- type UserManager
- func (m *UserManager) CreateUser(user *User) (*User, error)
- func (m *UserManager) GetUserByEmail(email string) (*User, error)
- func (m *UserManager) GetUserById(userId bson.ObjectId) (*User, error)
- func (m *UserManager) GetUserByName(name string) (*User, error)
- func (m *UserManager) GetUserBySecret(secret string) (*User, error)
- func (m *UserManager) VerifyUser(username, password string) (*User, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var (
C_AUTH = "authorize"
)
View Source
var (
C_USER = "user"
)
Functions ¶
This section is empty.
Types ¶
type AuthManager ¶
type AuthManager struct {
database.ModelManager
}
func GetAuthManager ¶
func GetAuthManager() *AuthManager
func (*AuthManager) GetAuthByToken ¶
func (m *AuthManager) GetAuthByToken(token string) (*Auth, error)
type UserManager ¶
type UserManager struct {
database.ModelManager
}
func GetUserManager ¶
func GetUserManager() *UserManager
func (*UserManager) CreateUser ¶
func (m *UserManager) CreateUser(user *User) (*User, error)
func (*UserManager) GetUserByEmail ¶
func (m *UserManager) GetUserByEmail(email string) (*User, error)
func (*UserManager) GetUserById ¶
func (m *UserManager) GetUserById(userId bson.ObjectId) (*User, error)
func (*UserManager) GetUserByName ¶
func (m *UserManager) GetUserByName(name string) (*User, error)
func (*UserManager) GetUserBySecret ¶
func (m *UserManager) GetUserBySecret(secret string) (*User, error)
func (*UserManager) VerifyUser ¶
func (m *UserManager) VerifyUser(username, password string) (*User, error)
Click to show internal directories.
Click to hide internal directories.