Documentation ¶
Index ¶
- func ActivateUser(userID common.ID, activateCode string) error
- func ActivateUserWithOutCode(userID common.ID) error
- func CheckUserByMobile(mobile string) error
- func CreateAddress(userID common.ID, addressDto st.AddressDto) error
- func CreateDict(dictDto *st.DictDto) error
- func CreateRole(name string, resource []*st.ResourceDto) (common.ID, error)
- func CreateUserWithEmail(register *st.RegisterDto) (common.ID, string, error)
- func CreateUserWithMobile(register *st.RegisterDto) (common.ID, error)
- func CreateUserWithName(register *st.RegisterDto) (common.ID, error)
- func CreateUserWithThird(register *st.RegisterDto) (common.ID, error)
- func DefauleEngine() *xorm.Engine
- func DelAddress(userID common.ID, addressID common.ID) error
- func DelDict(dictID common.ID) error
- func DeleteRole(roleID common.ID) error
- func GetDictByCate(cate string) ([]*st.DictDto, error)
- func GetDictByID(dictID common.ID) (*st.DictDto, error)
- func GetDictByName(name ...string) ([]*st.DictDto, error)
- func GetOneDict(cate, tp string) (*st.DictDto, error)
- func GetResources(query st.ResourceQuery) (int64, []*st.ResourceDto, error)
- func GetResourcesByIDs(ids []common.ID) ([]*st.ResourceDto, error)
- func GetRoleResourceByID(roleID common.ID) (int64, []*st.RoleResourceDto, error)
- func GetRoles(query st.RoleQuery) (int64, []*st.RoleDto, error)
- func GetUserByEmail(email string) (*st.UserDto, error)
- func GetUserByID(userID common.ID) (*st.UserDto, error)
- func GetUserByMobile(mobile string) (*st.UserDto, error)
- func GetUserInfoByID(userID common.ID) (*st.UserInfoDto, error)
- func GetUserLoginByID(userID common.ID, query st.EmptyQuery) (int64, []*st.UserLoginDto, error)
- func GetUsers(query st.UserQuery) (int64, []*st.UserDto, error)
- func HasRoleByID(roleID common.ID) (bool, error)
- func HasRoleByName(name string) (bool, error)
- func HasUserByEmail(email string) (bool, error)
- func HasUserByMobile(mobile string) (bool, error)
- func HasUserByName(name string) (bool, error)
- func HasUserByThird(tp, openID string) (bool, error)
- func Init(config *config.Config) error
- func Login(loginDto *st.LoginDto) (*st.UserDto, error)
- func LoginByMobile(loginDto *st.LoginDto) (*st.UserDto, error)
- func LoginByOpenID(loginDto *st.LoginDto) (*st.UserDto, error)
- func ResetLoginErrorForUser(userID common.ID) error
- func UpdataRole(roleID common.ID, name string, resource []*st.ResourceDto) error
- func UpdateActivateCodeForUser(userID common.ID) (string, error)
- func UpdateAddress(userID common.ID, addressID common.ID, addressDto st.AddressDto) error
- func UpdateAvatarForUser(userID common.ID, avatar string) error
- func UpdateDict(dictID common.ID, dictDto *st.DictDto) error
- func UpdateEmailForUser(userID common.ID, email string) error
- func UpdateForbiddenForUser(userID common.ID, forbidden consts.Forbidden) error
- func UpdateGenderForUser(userID common.ID, gender consts.Gender) error
- func UpdateLoginErrorForUser(userID common.ID) error
- func UpdateMobileForUser(userID common.ID, mobile string) error
- func UpdateMy(userID common.ID, userInfoDto *st.UserInfoDto) error
- func UpdateNicknameForUser(userID common.ID, nickname string) error
- func UpdateOneDict(dictDto *st.DictDto) error
- func UpdatePassword1ForUser(userID common.ID, password string) error
- func UpdatePasswordForUser(userID common.ID, oldPassword, password string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ActivateUser ¶
ActivateUser 激活用户
func ActivateUserWithOutCode ¶
ActivateUserWithOutCode 直接激活用户
func CreateAddress ¶
func CreateAddress(userID common.ID, addressDto st.AddressDto) error
CreateAddress 新增地址
func CreateRole ¶
CreateRole 创建角色
func CreateUserWithEmail ¶
CreateUserWithEmail 邮箱密码创建用户
func CreateUserWithMobile ¶
func CreateUserWithMobile(register *st.RegisterDto) (common.ID, error)
CreateUserWithMobile 创建用户
func CreateUserWithName ¶
func CreateUserWithName(register *st.RegisterDto) (common.ID, error)
CreateUserWithName 用户名密码创建用户
func CreateUserWithThird ¶
func CreateUserWithThird(register *st.RegisterDto) (common.ID, error)
CreateUserWithThird 三方注册登录
func GetResources ¶
func GetResources(query st.ResourceQuery) (int64, []*st.ResourceDto, error)
GetResources 获取资源数据
func GetResourcesByIDs ¶
func GetResourcesByIDs(ids []common.ID) ([]*st.ResourceDto, error)
GetResourcesByIDs 根据编号获取资源数据
func GetRoleResourceByID ¶
GetRoleResourceByID .
func GetUserByEmail ¶
GetUserByEmail 根据邮箱获取用户信息
func GetUserByMobile ¶
GetUserByMobile 根据手机号查询用户信息
func GetUserInfoByID ¶
func GetUserInfoByID(userID common.ID) (*st.UserInfoDto, error)
GetUserInfoByID 根据用户ID获取用户详细信息
func GetUserLoginByID ¶
func GetUserLoginByID(userID common.ID, query st.EmptyQuery) (int64, []*st.UserLoginDto, error)
GetUserLoginByID 根据用户ID获取用户登录历史
func LoginByMobile ¶
LoginByMobile 手机验证码登录
func LoginByOpenID ¶
LoginByOpenID 根据用户OpenID获取用户信息
func ResetLoginErrorForUser ¶
ResetLoginErrorForUser 重新设置错误次数为0
func UpdataRole ¶
UpdataRole 更新角色
func UpdateActivateCodeForUser ¶
UpdateActivateCodeForUser 重新发送激活码
func UpdateAddress ¶
UpdateAddress 更新地址
func UpdateAvatarForUser ¶
UpdateAvatarForUser 更新头像
func UpdateEmailForUser ¶
UpdateEmailForUser 更新邮箱
func UpdateForbiddenForUser ¶
UpdateForbiddenForUser 更新禁用状态
func UpdateGenderForUser ¶
UpdateGenderForUser 更新性别
func UpdateLoginErrorForUser ¶
UpdateLoginErrorForUser 增加登录错误次数
func UpdateMobileForUser ¶
UpdateMobileForUser 更新手机号
func UpdateNicknameForUser ¶
UpdateNicknameForUser 更新昵称
func UpdatePassword1ForUser ¶
UpdatePassword1ForUser 直接修改密码
Types ¶
This section is empty.