Documentation ¶
Index ¶
- func AgreeJoinTangentApply(applyID string, roleIds string) error
- func ChangeTangent(userID string, newTangentID string) error
- func CreateCmsUser(orgID int, userID string) error
- func CreateInviterUser(params *CreateInviterUserRequest) error
- func CreateJoinTangentApply(tangentID string, tangentName string, userID string, name string, phone string) error
- func CreateUserProfile(currentTangentID string, userID string, name string, phone string) error
- func DeleteCmsUser(orgID int, userID string) error
- func DeleteInviterUser(userId string) error
- func DeleteRoleFromUsers(currentTangentID string, roleID string, userIDs []string) error
- func DeleteUser(tangentID string, userID string) error
- func Destroy()
- func GetAndUpdateAccessToken(uname, pwd string) (string, error)
- func GetJoinedTangents(userID string) ([]string, error)
- func GetUserFace(userID string) (string, error)
- func GetWechatUserCurTangentID(openID string) (string, error)
- func GetWechatUserID(openID string, unionID string) (string, error)
- func GetWechatUserOpenID(userID string) (string, error)
- func Init(baseUrl string, timeoutSec time.Duration)
- func JoinAndChangeTangent(userID string, newTangentID string, roleIds string) error
- func LeaveTangent(userID string, changeToTangentID string) error
- func LoginCmsUser(orgID int, userID string) (string, error)
- func RegisterUser(tangentID string, userName string, password string, roleIds string) (string, error)
- func RejectJoinTangentApply(applyID string) error
- func UpdateInviterUser(params *UpdateInviterUserRequest) error
- func UpdateRoleToUsers(currentTangentID string, roleID string, userIDs []string) error
- func UpdateTangentUserProfile(tangentID string, userID string, name string, phone string) error
- func UpdateUserPassword(tangentID string, userID string, username string, password string) error
- func UpdateUserRoles(currentTangentID string, userID string, uasRoleIDs []string) error
- func UploadUserFace(userID string, face *multipart.FileHeader) (string, string, error)
- func WechatUserLogin(wxAppID string, appSecret string, jsCode string, currentTangentId string, ...) ([]RoleInfo, string, string, *UserProfile, error)
- type CountUserInfo
- type CreateInviterUserRequest
- type CreateInviterUserResponse
- type DeleteInviterUserResponse
- type GetAndUpdateAccessTokenRequest
- type GetAndUpdateAccessTokenResponse
- type GetInviterUsersQuery
- type GetInviterUsersResponse
- type GetTangentUserProfilesQuery
- type GetTangentUserProfilesResponse
- type GetUserInviterCountQuery
- type GetUserInviterCountResponse
- type InviterUserInfo
- type JoinTangentApplyInfo
- type LoginCmsResponse
- type RegisterUserRequest
- type RoleAndPermissions
- type RoleInfo
- type TangentUserProfileInfo
- type UpdateInviterUserRequest
- type UpdateInviterUserResponse
- type UpdateTangentUserProfileRequest
- type UpdateTangentUserProfileResponse
- type UserInfo
- type UserProfile
- func GetJoinedTangentUsers(tangentID string, name string, phone string, pageNo int, pageSize int) ([]UserProfile, int64, error)
- func GetUserProfiles(userId string, name string, phone string, pageNo int, pageSize int) ([]UserProfile, int64, error)
- func GetUsersByRole(tangentID string, roleID string) ([]UserProfile, error)
- func UpdateUserProfile(currentTangentID string, userID string, name string, phone string, ...) (*UserProfile, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AgreeJoinTangentApply ¶
func ChangeTangent ¶
func CreateCmsUser ¶
func CreateInviterUser ¶
func CreateInviterUser(params *CreateInviterUserRequest) error
func CreateJoinTangentApply ¶
func CreateUserProfile ¶
func DeleteCmsUser ¶
func DeleteInviterUser ¶
func DeleteRoleFromUsers ¶
func DeleteUser ¶
func GetAndUpdateAccessToken ¶ added in v0.3.0
func GetJoinedTangents ¶
func GetUserFace ¶
func GetWechatUserOpenID ¶
func JoinAndChangeTangent ¶
func LeaveTangent ¶
func RegisterUser ¶
func RejectJoinTangentApply ¶
func UpdateInviterUser ¶
func UpdateInviterUser(params *UpdateInviterUserRequest) error
func UpdateRoleToUsers ¶
func UpdateTangentUserProfile ¶ added in v0.1.6
func UpdateUserPassword ¶
func UpdateUserRoles ¶
func UploadUserFace ¶
Types ¶
type CountUserInfo ¶
type CountUserInfo struct { InviterID string `json:"InviterId"` InviterCount int `json:"inviterCount"` }
func GetUserInviterCount ¶
func GetUserInviterCount(params *GetUserInviterCountQuery) ([]CountUserInfo, error)
type CreateInviterUserResponse ¶
type CreateInviterUserResponse struct {
// contains filtered or unexported fields
}
type DeleteInviterUserResponse ¶
type DeleteInviterUserResponse struct {
// contains filtered or unexported fields
}
type GetAndUpdateAccessTokenRequest ¶ added in v0.3.0
type GetAndUpdateAccessTokenResponse ¶ added in v0.3.0
type GetAndUpdateAccessTokenResponse struct { Token string `json:"token" binding:"required"` // contains filtered or unexported fields }
type GetInviterUsersQuery ¶
type GetInviterUsersResponse ¶
type GetInviterUsersResponse struct { PageNo int `json:"pageNo"` TotalCount int64 `json:"totalCount"` Infos []InviterUserInfo `json:"infos"` // contains filtered or unexported fields }
type GetTangentUserProfilesQuery ¶ added in v0.1.6
type GetTangentUserProfilesResponse ¶ added in v0.1.6
type GetTangentUserProfilesResponse struct { PageNo int `json:"pageNo" binding:"required"` TotalCount int64 `json:"totalCount" binding:"required"` Infos []TangentUserProfileInfo `json:"infos" binding:"required"` // contains filtered or unexported fields }
type GetUserInviterCountResponse ¶
type GetUserInviterCountResponse struct { Infos []CountUserInfo `json:"infos"` // contains filtered or unexported fields }
type InviterUserInfo ¶
type InviterUserInfo struct { UserID string `json:"userId"` InviterID string `json:"inviterId"` CreateTime string `json:"createTime"` InviterType uint8 `json:"inviterType"` }
func GetInviterUsers ¶
func GetInviterUsers(params *GetInviterUsersQuery) ([]InviterUserInfo, int64, error)
type JoinTangentApplyInfo ¶
type JoinTangentApplyInfo struct { ID string `json:"id" binding:"required"` UserID string `json:"userId" binding:"required"` UserProfileName string `json:"userProfileName" binding:"required"` UserPhone string `json:"userPhone" binding:"required"` TangentID string `json:"tangentId" binding:"required"` TangentName string `json:"tangentName" binding:"required"` SubmitTime string `json:"submitTime" binding:"required"` CompleteTime string `json:"completeTime" binding:"required"` Status string `json:"status" binding:"required"` }
func GetJoinTangentApplies ¶
type LoginCmsResponse ¶
type LoginCmsResponse struct { Token string `json:"token"` // contains filtered or unexported fields }
type RegisterUserRequest ¶
type RegisterUserRequest struct { AppID string `json:"appId" binding:"required"` AppSecret string `json:"appSecret" binding:"required"` CurrentTangentID string `json:"currentTangentId" binding:"required"` RolesAndPermissions []RoleAndPermissions `json:"rolesAndPermissions" binding:"required"` OpenID string `json:"openId" binding:"required"` PhoneCode string `json:"phoneCode" binding:"required"` }
type RoleAndPermissions ¶
type RoleAndPermissions struct { RoleName string `json:"roleName"` Permissions []rolePermission `json:"permissions"` }
type RoleInfo ¶
type TangentUserProfileInfo ¶ added in v0.1.6
type TangentUserProfileInfo struct { TangentID string `json:"tangentId" binding:"required"` ID string `json:"id" binding:"required"` Name string `json:"name" binding:"required"` Phone string `json:"phone" binding:"required"` }
func GetTangentUserProfile ¶ added in v0.1.6
func GetTangentUserProfile(params *GetTangentUserProfilesQuery) ([]TangentUserProfileInfo, int64, error)
type UpdateInviterUserResponse ¶
type UpdateInviterUserResponse struct {
// contains filtered or unexported fields
}
type UpdateTangentUserProfileRequest ¶ added in v0.1.6
type UpdateTangentUserProfileResponse ¶ added in v0.1.6
type UpdateTangentUserProfileResponse struct { Info *TangentUserProfileInfo `json:"info" binding:"required"` // contains filtered or unexported fields }
type UserInfo ¶
type UserInfo struct { ID string `json:"id" binding:"required"` UserName string `json:"username" binding:"required,excludes= "` RoleNames []string `json:"roleNames" binding:"required"` UserProfileInfo *UserProfile `json:"userProfileInfo"` UptUsernameFlag bool `json:"uptUsernameFlag" binding:"required"` }
type UserProfile ¶
type UserProfile struct { ID string `json:"id" binding:"required"` Name string `json:"name" binding:"required"` Sex uint8 `json:"sex" binding:"required"` Phone string `json:"phone" binding:"required"` Photo string `json:"photo" binding:"required"` Thumbnail string `json:"thumbnail" binding:"required"` IDCard string `json:"id_card"` }
func GetJoinedTangentUsers ¶
func GetUserProfiles ¶
func GetUsersByRole ¶
func GetUsersByRole(tangentID string, roleID string) ([]UserProfile, error)
Click to show internal directories.
Click to hide internal directories.