Documentation ¶
Index ¶
- Constants
- 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 CreateUserHis(params *CreateUserHisPrams) error
- func CreateUserLink(params *CreateUserLinkParams) 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 GetWechatUserMpOpenID(userID 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, userID, name, phone string, status uint8) error
- func UpdateUserLink(params *UpdateUserLinkParams) error
- func UpdateUserLinkBatch(params *UpdateUserLinkBatchParams) 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 UserFollowOfficialAccount(appID, appSecret, event, openID string) error
- func UserFollowedOfficialAccount(userID string) (bool, error)
- func UserProfileByIDs(userIds []string) (map[string]SimpleInfo, error)
- func UserSimpleProfileByIDs(userIds []string) (map[string]SimpleInfo1, error)
- func WechatScanQrLogin(wxAppID string, appSecret string, code 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 CreateUserHisPrams
- type CreateUserHisResponse
- type CreateUserLinkParams
- type CreateUserLinkResponse
- type DeleteInviterUserResponse
- type GetAndUpdateAccessTokenRequest
- type GetAndUpdateAccessTokenResponse
- type GetInviterUsersQuery
- type GetInviterUsersResponse
- type GetTangentUserProfilesQuery
- type GetTangentUserProfilesResponse
- type GetUserHisPageParams
- type GetUserHisPageResponse
- type GetUserInviterCountQuery
- type GetUserInviterCountResponse
- type GetUserWithoutRoleResponse
- type InviterUserInfo
- type JoinTangentApplyInfo
- type LoginCmsResponse
- type RangeSnapShotUsersQuery
- type RegisterUserRequest
- type RoleAndPermissions
- type RoleInfo
- type SimpleInfo
- type SimpleInfo1
- type SnapShotUserQuery
- type SnapShotUserResponse
- type SnapShotUsersQuery
- type SnapShotUsersResponse
- type TangentUserLink
- type TangentUserProfileInfo
- func GetTangentUserProfile(params *GetTangentUserProfilesQuery) ([]TangentUserProfileInfo, int64, error)
- func GetTangentUserProfileByIDs(tangentID string, userIDs []string) ([]TangentUserProfileInfo, error)
- func GetTangentUserProfileByNames(tangentID string, names []string) ([]TangentUserProfileInfo, error)
- type UpdateInviterUserRequest
- type UpdateInviterUserResponse
- type UpdateTangentUserProfileRequest
- type UpdateTangentUserProfileResponse
- type UpdateUserLinkBatchParams
- type UpdateUserLinkBatchResponse
- type UpdateUserLinkParams
- type UpdateUserLinkResponse
- type UserFollowOfficialAccountRequest
- type UserFollowedOfficialAccountResponse
- type UserHis
- type UserInfo
- type UserProfile
- func GetJoinedTangentUsers(tangentID string, name string, phone string, status uint8, pageNo 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)
- type UserProfileByIDsRequest
- type UserProfileByIDsResponse
- type UserSimpleProfileByIDsResponse
- type UserWithoutRoleInfo
- type WechatScanQrLoginRequest
- type WechatScanQrLoginResponse
Constants ¶
View Source
const ( HisStatusJoin = iota + 1 HisStatusLeave )
View Source
const ( HisTypeJoin = iota + 1 HisTypeLeave HisTypeUpdateInfo )
Variables ¶
This section is empty.
Functions ¶
func AgreeJoinTangentApply ¶
func ChangeTangent ¶
func CreateCmsUser ¶
func CreateInviterUser ¶
func CreateInviterUser(params *CreateInviterUserRequest) error
func CreateJoinTangentApply ¶
func CreateUserHis ¶ added in v0.11.6
func CreateUserHis(params *CreateUserHisPrams) error
func CreateUserLink ¶ added in v0.11.14
func CreateUserLink(params *CreateUserLinkParams) error
func CreateUserProfile ¶
func DeleteCmsUser ¶
func DeleteInviterUser ¶
func DeleteRoleFromUsers ¶
func DeleteUser ¶
func GetAndUpdateAccessToken ¶ added in v0.3.0
func GetJoinedTangents ¶
func GetUserFace ¶
func GetWechatUserMpOpenID ¶ added in v0.9.40
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 UpdateUserLink ¶ added in v0.11.14
func UpdateUserLink(params *UpdateUserLinkParams) error
func UpdateUserLinkBatch ¶ added in v0.11.14
func UpdateUserLinkBatch(params *UpdateUserLinkBatchParams) error
func UpdateUserPassword ¶
func UpdateUserRoles ¶
func UploadUserFace ¶
func UserFollowOfficialAccount ¶ added in v0.8.5
func UserFollowedOfficialAccount ¶ added in v0.8.5
func UserProfileByIDs ¶ added in v0.9.4
func UserProfileByIDs(userIds []string) (map[string]SimpleInfo, error)
func UserSimpleProfileByIDs ¶ added in v0.9.34
func UserSimpleProfileByIDs(userIds []string) (map[string]SimpleInfo1, error)
func WechatScanQrLogin ¶ added in v0.9.6
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 CreateUserHisPrams ¶ added in v0.11.6
type CreateUserHisResponse ¶ added in v0.11.6
type CreateUserHisResponse struct {
// contains filtered or unexported fields
}
type CreateUserLinkParams ¶ added in v0.11.14
type CreateUserLinkParams struct { TangentID string `json:"tangentId"` UserID string `json:"userId"` Name string `json:"name"` Phone string `json:"phone"` Status uint8 `json:"status"` DeptID string `json:"deptId"` DeptName string `json:"deptName"` PositionID string `json:"positionId"` PositionName string `json:"positionName"` Date string `json:"date"` }
type CreateUserLinkResponse ¶ added in v0.11.14
type CreateUserLinkResponse 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 GetUserHisPageParams ¶ added in v0.11.6
type GetUserHisPageResponse ¶ added in v0.11.6
type GetUserInviterCountResponse ¶
type GetUserInviterCountResponse struct { Infos []CountUserInfo `json:"infos"` // contains filtered or unexported fields }
type GetUserWithoutRoleResponse ¶ added in v0.8.13
type GetUserWithoutRoleResponse struct { PageNo int `json:"pageNo" binding:"required"` TotalCount int64 `json:"totalCount" binding:"required"` Infos []UserWithoutRoleInfo `json:"infos" binding:"required"` // 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 RangeSnapShotUsersQuery ¶ added in v0.11.19
type RangeSnapShotUsersQuery struct { TangentID string `form:"tangentId"` UserID string `form:"userId"` Name string `form:"name"` DeptName string `form:"deptName"` PositionName string `form:"positionName"` Status uint8 `form:"status"` StartDate string `form:"startDate"` EndDate string `form:"endDate"` PageNo int `form:"pageNo"` PageSize int `form:"pageSize"` }
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 SimpleInfo ¶ added in v0.9.4
type SimpleInfo1 ¶ added in v0.9.34
type SnapShotUserQuery ¶ added in v0.11.14
type SnapShotUserResponse ¶ added in v0.11.14
type SnapShotUserResponse struct { Info *TangentUserLink `json:"info"` // contains filtered or unexported fields }
type SnapShotUsersQuery ¶ added in v0.11.14
type SnapShotUsersQuery struct { TangentID string `form:"tangentId"` UserID string `form:"userId"` Name string `form:"name"` DeptName string `form:"deptName"` PositionName string `form:"positionName"` Status uint8 `form:"status"` SnapShotDate string `form:"snapShotDate"` PageNo int `form:"pageNo"` PageSize int `form:"pageSize"` }
type SnapShotUsersResponse ¶ added in v0.11.14
type SnapShotUsersResponse struct { Infos []TangentUserLink `json:"infos"` TotalCount int64 // contains filtered or unexported fields }
type TangentUserLink ¶ added in v0.11.14
type TangentUserLink struct { ID string `json:"id"` TangentID string `json:"tangentId"` UserID string `json:"userId"` Name string `json:"name"` Phone string `json:"phone"` Status uint8 `json:"status"` DeptID string `json:"deptId"` DeptName string `json:"deptName"` PositionID string `json:"positionId"` PositionName string `json:"positionName"` StartDate *time.Time `json:"startDate"` EndDate *time.Time `json:"endDate"` }
func GetRangeSnapShotUsers ¶ added in v0.11.19
func GetRangeSnapShotUsers(params *RangeSnapShotUsersQuery) ([]TangentUserLink, int64, error)
func GetSnapShotUser ¶ added in v0.11.14
func GetSnapShotUser(params *SnapShotUserQuery) (*TangentUserLink, error)
func GetSnapShotUsers ¶ added in v0.11.14
func GetSnapShotUsers(params *SnapShotUsersQuery) ([]TangentUserLink, int64, error)
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"` Thumbnail string `json:"thumbnail"` Status uint8 `json:"status"` }
func GetTangentUserProfile ¶ added in v0.1.6
func GetTangentUserProfile(params *GetTangentUserProfilesQuery) ([]TangentUserProfileInfo, int64, error)
func GetTangentUserProfileByIDs ¶ added in v0.9.8
func GetTangentUserProfileByIDs(tangentID string, userIDs []string) ([]TangentUserProfileInfo, error)
func GetTangentUserProfileByNames ¶ added in v0.15.0
func GetTangentUserProfileByNames(tangentID string, names []string) ([]TangentUserProfileInfo, 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 UpdateUserLinkBatchParams ¶ added in v0.11.14
type UpdateUserLinkBatchParams struct {
Links []UpdateUserLinkParams `json:"links"`
}
type UpdateUserLinkBatchResponse ¶ added in v0.11.14
type UpdateUserLinkBatchResponse struct {
// contains filtered or unexported fields
}
type UpdateUserLinkParams ¶ added in v0.11.14
type UpdateUserLinkParams struct { ID string `json:"id"` TangentID string `json:"tangentId"` UserID string `json:"userId"` Name string `json:"name"` Phone string `json:"phone"` Status uint8 `json:"status"` DeptID string `json:"deptId"` DeptName string `json:"deptName"` PositionID string `json:"positionId"` PositionName string `json:"positionName"` StartDate *time.Time `json:"startDate"` EndDate *time.Time `json:"endDate"` }
type UpdateUserLinkResponse ¶ added in v0.11.14
type UpdateUserLinkResponse struct {
// contains filtered or unexported fields
}
type UserFollowOfficialAccountRequest ¶ added in v0.8.5
type UserFollowedOfficialAccountResponse ¶ added in v0.8.5
type UserFollowedOfficialAccountResponse struct { Followed bool `json:"followed"` // contains filtered or unexported fields }
type UserHis ¶ added in v0.11.6
type UserHis struct { TangentID string `json:"tangentId"` UserID string `json:"userId"` Name string `json:"name"` Phone string `json:"phone"` Status uint8 `json:"status"` DeptID string `json:"deptId"` PositionID string `json:"positionId"` HisType uint8 `json:"hisType"` CreatedAt *time.Time `json:"createdAt"` }
func GetUserHisPage ¶ added in v0.11.6
func GetUserHisPage(params *GetUserHisPageParams) ([]UserHis, int64, error)
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)
type UserProfileByIDsRequest ¶ added in v0.9.5
type UserProfileByIDsRequest struct {
UserIDs []string `json:"userIds" binding:"required"`
}
type UserProfileByIDsResponse ¶ added in v0.9.4
type UserProfileByIDsResponse struct { Infos map[string]SimpleInfo `json:"mapInfo"` // contains filtered or unexported fields }
type UserSimpleProfileByIDsResponse ¶ added in v0.9.34
type UserSimpleProfileByIDsResponse struct { Infos map[string]SimpleInfo1 `json:"mapInfo"` // contains filtered or unexported fields }
type UserWithoutRoleInfo ¶ added in v0.8.13
type UserWithoutRoleInfo struct { ID string `json:"id"` UserName string `json:"userName"` CreatedAt string `json:"createdAt"` }
func GetUserWithoutRole ¶ added in v0.8.13
func GetUserWithoutRole(userID, userName, start, end string, pageNo, pageSize int) ([]UserWithoutRoleInfo, int64, error)
type WechatScanQrLoginRequest ¶ added in v0.9.6
type WechatScanQrLoginResponse ¶ added in v0.9.6
type WechatScanQrLoginResponse struct { Token string `json:"token" binding:"required"` // contains filtered or unexported fields }
Click to show internal directories.
Click to hide internal directories.