Documentation ¶
Index ¶
- type AuthRequest
- type Platform
- type Service
- func (svc *Service) CheckAuth(param *AuthRequest) error
- func (srv *Service) CreatePlatform(params Platform) (*Platform, error)
- func (srv *Service) CreateUser(params *UserCreateRequest) error
- func (srv *Service) CreateUserAccount(params UserAccountCreateRequest) error
- func (srv *Service) DeletePlatform(params Platform) error
- func (srv *Service) DeleteUser(params *UserDeleteRequest) error
- func (srv *Service) DeleteUserAccount(params UserAccountGetRequest) error
- func (srv *Service) DeleteUserAccountList(params UserAccountGetRequest) error
- func (srv *Service) GetAllUserAccount(pager *page.Pager) ([]UserAccount, error)
- func (srv *Service) GetPlatform(params Platform) (*Platform, error)
- func (srv *Service) GetPlatformList(params Platform, pager *page.Pager) ([]Platform, error)
- func (srv *Service) GetUser(params *UserGetRequest) (*User, error)
- func (srv *Service) GetUserAccount(params UserAccountGetRequest) (*UserAccount, error)
- func (srv *Service) GetUserAccountList(params UserAccountGetRequest, pager *page.Pager) ([]UserAccount, error)
- func (srv *Service) GetUserList(params *UserGetRequest, pager *page.Pager) ([]User, error)
- func (srv *Service) IsExistsUserEmail(param *UserEmailExistsRequest) (bool, error)
- func (srv *Service) IsExistsUserName(param *UserNameExistsRequest) (bool, error)
- func (srv *Service) IsExistsUserPhone(uper *UserPhoneExistsRequest) (bool, error)
- func (srv *Service) UpdatePlatform(params Platform) (Platform, error)
- func (srv *Service) UpdateUser(params *UserUpdateRequest) error
- func (srv *Service) UpdateUserAccount(params UserAccountCreateRequest) error
- func (srv *Service) UserAuth(param *UserAuthRequest) (token string, err *errcode.Error)
- func (srv *Service) UserAuthByConfirmEmail(uma UserEmailAuth) (bool, error)
- func (srv *Service) UserAuthByEmailCode(uma UserEmailAuth) (bool, error)
- func (srv *Service) UserAuthByPhone(upa UserPhoneAuth) (bool, error)
- func (srv *Service) UserAuthByWechat(upa UserPhoneAuth) (bool, error)
- type User
- type UserAccount
- type UserAccountCreateRequest
- type UserAccountGetRequest
- type UserAuthRequest
- type UserCreateRequest
- type UserDeleteRequest
- type UserEmailAuth
- type UserEmailCodeAuth
- type UserEmailExistsRequest
- type UserGetRequest
- type UserNameExistsRequest
- type UserPhoneAuth
- type UserPhoneExistsRequest
- type UserUpdateRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthRequest ¶
type Platform ¶
type Platform struct { PlatformId int `json:"platform_id"` PlatformName string `json:"name"` PlatformAbbr string `json:"abbr"` PlatformType string `json:"type"` PlatformDesc string `json:"description"` PlatformDomain string `json:"domain"` PlatformImgUrl string `json:"img_url"` PlatformLoginUrl string `json:"login_url"` }
type Service ¶
func NewService ¶
func (*Service) CheckAuth ¶
func (svc *Service) CheckAuth(param *AuthRequest) error
func (*Service) CreatePlatform ¶
func (*Service) CreateUser ¶
func (srv *Service) CreateUser(params *UserCreateRequest) error
func (*Service) CreateUserAccount ¶
func (srv *Service) CreateUserAccount(params UserAccountCreateRequest) error
func (*Service) DeletePlatform ¶
func (*Service) DeleteUser ¶
func (srv *Service) DeleteUser(params *UserDeleteRequest) error
func (*Service) DeleteUserAccount ¶
func (srv *Service) DeleteUserAccount(params UserAccountGetRequest) error
func (*Service) DeleteUserAccountList ¶
func (srv *Service) DeleteUserAccountList(params UserAccountGetRequest) error
func (*Service) GetAllUserAccount ¶
func (srv *Service) GetAllUserAccount(pager *page.Pager) ([]UserAccount, error)
func (*Service) GetPlatformList ¶
func (*Service) GetUserAccount ¶
func (srv *Service) GetUserAccount(params UserAccountGetRequest) (*UserAccount, error)
func (*Service) GetUserAccountList ¶
func (srv *Service) GetUserAccountList(params UserAccountGetRequest, pager *page.Pager) ([]UserAccount, error)
func (*Service) GetUserList ¶
func (*Service) IsExistsUserEmail ¶
func (srv *Service) IsExistsUserEmail(param *UserEmailExistsRequest) (bool, error)
func (*Service) IsExistsUserName ¶
func (srv *Service) IsExistsUserName(param *UserNameExistsRequest) (bool, error)
func (*Service) IsExistsUserPhone ¶
func (srv *Service) IsExistsUserPhone(uper *UserPhoneExistsRequest) (bool, error)
func (*Service) UpdatePlatform ¶
func (*Service) UpdateUser ¶
func (srv *Service) UpdateUser(params *UserUpdateRequest) error
func (*Service) UpdateUserAccount ¶
func (srv *Service) UpdateUserAccount(params UserAccountCreateRequest) error
func (*Service) UserAuth ¶
func (srv *Service) UserAuth(param *UserAuthRequest) (token string, err *errcode.Error)
func (*Service) UserAuthByConfirmEmail ¶
func (srv *Service) UserAuthByConfirmEmail(uma UserEmailAuth) (bool, error)
func (*Service) UserAuthByEmailCode ¶
func (srv *Service) UserAuthByEmailCode(uma UserEmailAuth) (bool, error)
func (*Service) UserAuthByPhone ¶
func (srv *Service) UserAuthByPhone(upa UserPhoneAuth) (bool, error)
func (*Service) UserAuthByWechat ¶
func (srv *Service) UserAuthByWechat(upa UserPhoneAuth) (bool, error)
type UserAccount ¶
type UserAccount struct { UserId int `json:"user_id"` PlatformId int `json:"platform_id"` Password string `json:"password"` PlatformName string `json:"name"` PlatformAbbr string `json:"abbr"` PlatformType string `json:"type"` PlatformDesc string `json:"description"` PlatformDomain string `json:"domain"` PlatformImgUrl string `json:"img_url"` PlatformLoginUrl string `json:"login_url"` }
type UserAccountGetRequest ¶
type UserAuthRequest ¶
type UserCreateRequest ¶
type UserDeleteRequest ¶
type UserDeleteRequest struct {
UserId int
}
type UserEmailAuth ¶
type UserEmailAuth struct {
Suffix string `json:"suffix" binding:"required"`
}
type UserEmailCodeAuth ¶
type UserEmailCodeAuth struct {
Code string `json:"suffix" binding:"required"`
}
type UserEmailExistsRequest ¶
type UserEmailExistsRequest struct {
Email string `json:"email" binding:"required"`
}
type UserGetRequest ¶
type UserGetRequest struct {
UserId int
}
type UserNameExistsRequest ¶
type UserNameExistsRequest struct {
UserName string `json:"user_name" binding:"required"`
}
type UserPhoneAuth ¶
type UserPhoneExistsRequest ¶
type UserPhoneExistsRequest struct {
PhoneNumber string `json:"phone_number" binding:"required"`
}
Click to show internal directories.
Click to hide internal directories.