Documentation
¶
Overview ¶
电脑手机客户端API,例如MAC客户端
WEB网页端API
Index ¶
- Constants
- func GetCaptchaImage() (savePath string, error *apierror.ApiError)
- func RefreshCookieToken(sessionKey string) string
- type AccessCount
- type ActivityTaskId
- type AppCreateUploadFileParam
- type AppCreateUploadFileResult
- type AppFamilyInfo
- type AppFamilyInfoListResult
- type AppFileDownloadRange
- type AppFileUploadRange
- type AppGetFileInfoParam
- type AppGetFileInfoResult
- type AppGetUploadFileStatusResult
- type AppLoginToken
- type AppUploadFileCommitResult
- type AppUserSignResult
- type AppUserSignStatus
- type BatchTaskInfo
- type BatchTaskInfoList
- type BatchTaskParam
- type BatchTaskStatus
- type BatchTaskType
- type CheckTaskResult
- type DownloadFuncCallback
- type FileEntity
- type FileList
- type FileListParam
- type FileSearchParam
- type FileSearchResult
- type HandleFileDirectoryFunc
- type MediaType
- type MkdirResult
- type OrderBy
- type OrderSort
- type PanClient
- func (p *PanClient) AppCreateUploadFile(param *AppCreateUploadFileParam) (*AppCreateUploadFileResult, *apierror.ApiError)
- func (p *PanClient) AppDownloadFileData(downloadFileUrl string, fileRange AppFileDownloadRange, ...) *apierror.ApiError
- func (p *PanClient) AppGetFamilyList() (*AppFamilyInfoListResult, *apierror.ApiError)
- func (p *PanClient) AppGetFileDownloadUrl(fileId string) (string, *apierror.ApiError)
- func (p *PanClient) AppGetFileInfo(param *AppGetFileInfoParam) (*AppGetFileInfoResult, *apierror.ApiError)
- func (p *PanClient) AppGetUploadFileStatus(uploadFileId string) (*AppGetUploadFileStatusResult, *apierror.ApiError)
- func (p *PanClient) AppUploadFileCommit(uploadCommitUrl, uploadFileId, xRequestId string) (*AppUploadFileCommitResult, *apierror.ApiError)
- func (p *PanClient) AppUploadFileData(uploadUrl, uploadFileId, xRequestId string, fileRange *AppFileUploadRange, ...) *apierror.ApiError
- func (p *PanClient) AppUserSign() (*AppUserSignResult, *apierror.ApiError)
- func (p *PanClient) CheckBatchTask(typeFlag BatchTaskType, taskId string) (result *CheckTaskResult, error *apierror.ApiError)
- func (p *PanClient) CreateBatchTask(param *BatchTaskParam) (taskId string, error *apierror.ApiError)
- func (p *PanClient) FileInfoById(fileId string) (fileInfo *FileEntity, error *apierror.ApiError)
- func (p *PanClient) FileInfoByPath(pathStr string) (fileInfo *FileEntity, error *apierror.ApiError)
- func (p *PanClient) FileList(param *FileListParam) (result *FileSearchResult, error *apierror.ApiError)
- func (p *PanClient) FileSearch(param *FileSearchParam) (result *FileSearchResult, error *apierror.ApiError)
- func (p *PanClient) FilesDirectoriesRecurseList(path string, handleFileDirectoryFunc HandleFileDirectoryFunc) FileList
- func (p *PanClient) GetUserDetailInfo() (userDetailInfo *UserDetailInfo, error *apierror.ApiError)
- func (p *PanClient) GetUserInfo() (userInfo *UserInfo, error *apierror.ApiError)
- func (p *PanClient) Heartbeat() bool
- func (p *PanClient) Mkdir(parentFileId, dirName string) (*MkdirResult, *apierror.ApiError)
- func (p *PanClient) MkdirRecursive(parentFileId string, fullPath string, index int, pathSlice []string) (*MkdirResult, *apierror.ApiError)
- func (p *PanClient) RecycleClear(familyId int64) *apierror.ApiError
- func (p *PanClient) RecycleDelete(familyId int64, fileIdList []string) *apierror.ApiError
- func (p *PanClient) RecycleList(pageNum, pageSize int) (result *RecycleFileListResult, error *apierror.ApiError)
- func (p *PanClient) RecycleRestore(fileList []*RecycleFileInfo) (taskId string, err *apierror.ApiError)
- func (p *PanClient) Rename(renameFileId, newName string) (bool, *apierror.ApiError)
- func (p *PanClient) ShareCancel(shareIdList []int64) (bool, *apierror.ApiError)
- func (p *PanClient) ShareGetIdByUrl(accessUrl string) (int64, string, *apierror.ApiError)
- func (p *PanClient) ShareList(param *ShareListParam) (*ShareListResult, *apierror.ApiError)
- func (p *PanClient) ShareListDirDetail(accessUrl string, accessCode string) (int64, *ShareListDirResult, *apierror.ApiError)
- func (p *PanClient) SharePrivate(fileId string, expiredTime ShareExpiredTime) (*PrivateShareResult, *apierror.ApiError)
- func (p *PanClient) SharePublic(fileId string, expiredTime ShareExpiredTime) (*PublicShareResult, *apierror.ApiError)
- func (p *PanClient) ShareSave(accessUrl string, accessCode string, savePanDirId string) (bool, *apierror.ApiError)
- func (p *PanClient) UserDrawPrize(taskId ActivityTaskId) (*UserDrawPrizeResult, *apierror.ApiError)
- type PathEntity
- type PathList
- type PrivateShareResult
- type PublicShareResult
- type RecycleFileActResult
- type RecycleFileInfo
- type RecycleFileInfoList
- type RecycleFileListResult
- type ShareExpiredTime
- type ShareItem
- type ShareItemList
- type ShareListDirResult
- type ShareListParam
- type ShareListResult
- type ShareMode
- type UploadFunc
- type UserDetailInfo
- type UserDrawPrizeResult
- type UserInfo
- type UserVip
- type WebLoginToken
Constants ¶
View Source
const ( WEB_URL string = "https://cloud.189.cn" AUTH_URL string = "https://open.e.189.cn/api/logbox/oauth2" API_URL string = "https://api.cloud.189.cn" )
View Source
const ( // BatchTaskStatusNotAction 无需任何操作 BatchTaskStatusNotAction BatchTaskStatus = 2 // BatchTaskStatusOk 成功 BatchTaskStatusOk BatchTaskStatus = 4 // BatchTaskTypeDelete 删除文件任务 BatchTaskTypeDelete BatchTaskType = "DELETE" // BatchTaskTypeCopy 复制文件任务 BatchTaskTypeCopy BatchTaskType = "COPY" // BatchTaskTypeMove 移动文件任务 BatchTaskTypeMove BatchTaskType = "MOVE" // BatchTaskTypeRecycleRestore 还原回收站文件 BatchTaskTypeRecycleRestore BatchTaskType = "RESTORE" BatchTaskTypeShareSave BatchTaskType = "SHARE_SAVE" )
View Source
const ( // MediaTypeDefault 默认全部 MediaTypeDefault MediaType = 0 // MediaTypeMusic 音乐 MediaTypeMusic MediaType = 1 // MediaTypeVideo 视频 MediaTypeVideo MediaType = 3 // MediaTypeDocument 文档 MediaTypeDocument MediaType = 4 // OrderByName 文件名 OrderByName OrderBy = 1 // OrderBySize 大小 OrderBySize OrderBy = 2 // OrderByTime 时间 OrderByTime OrderBy = 3 // OrderAsc 升序 OrderAsc OrderSort = "ASC" // OrderDesc 降序 OrderDesc OrderSort = "DESC" )
View Source
const ( ShareExpiredTime1Day ShareExpiredTime = 1 ShareExpiredTime7Day ShareExpiredTime = 7 ShareExpiredTimeForever ShareExpiredTime = 2099 ShareModePrivate ShareMode = 1 ShareModePublic ShareMode = 2 )
View Source
const (
// PathSeparator 路径分隔符
PathSeparator = "/"
)
Variables ¶
This section is empty.
Functions ¶
func GetCaptchaImage ¶
func RefreshCookieToken ¶
Types ¶
type AccessCount ¶
type ActivityTaskId ¶
type ActivityTaskId string
const ( ActivitySignin ActivityTaskId = "TASK_SIGNIN" ActivitySignPhotos ActivityTaskId = "TASK_SIGNIN_PHOTOS" )
type AppCreateUploadFileResult ¶
type AppCreateUploadFileResult struct {
XMLName xml.Name `xml:"uploadFile"`
// UploadFileId 上传文件请求ID
UploadFileId string `xml:"uploadFileId"`
// FileUploadUrl 上传文件数据的URL路径
FileUploadUrl string `xml:"fileUploadUrl"`
// FileCommitUrl 上传文件完成后确认路径
FileCommitUrl string `xml:"fileCommitUrl"`
// FileDataExists 文件是否已存在云盘中,0-未存在,1-已存在
FileDataExists int `xml:"fileDataExists"`
// 请求的X-Request-ID
XRequestId string
}
type AppFamilyInfo ¶
type AppFamilyInfo struct {
Count int `xml:"count"`
Type int `xml:"type"`
UserRole int `xml:"userRole"`
CreateTime string `xml:"createTime"`
FamilyId int64 `xml:"familyId"`
RemarkName string `xml:"remarkName"`
UseFlag int `xml:"useFlag"`
}
AppGetFileInfoParam 获取文件信息参数
type AppFamilyInfoListResult ¶
type AppFamilyInfoListResult struct {
XMLName xml.Name `xml:"familyListResponse"`
FamilyInfoList []AppFamilyInfo `xml:"familyInfo"`
}
type AppFileDownloadRange ¶
type AppFileUploadRange ¶
type AppGetFileInfoParam ¶
type AppGetFileInfoParam struct {
// FileId 文件ID,支持文件和文件夹
FileId string
// FilePath 文件绝对路径,支持文件和文件夹
FilePath string
}
AppGetFileInfoParam 获取文件信息参数
type AppGetFileInfoResult ¶
type AppGetFileInfoResult struct {
XMLName xml.Name `xml:"folderInfo"`
Id string `xml:"id"`
ParentFolderId string `xml:"parentFolderId"`
Path string `xml:"path"`
Name string `xml:"name"`
CreateDate string `xml:"createDate"`
LastOpTime string `xml:"lastOpTime"`
Rev string `xml:"rev"`
ParentFolderList parentFolderListNode `xml:"parentFolderList"`
}
type AppLoginToken ¶
type AppLoginToken struct {
SessionKey string `json:"sessionKey"`
SessionSecret string `json:"sessionSecret"`
FamilySessionKey string `json:"familySessionKey"`
FamilySessionSecret string `json:"familySessionSecret"`
AccessToken string `json:"accessToken"`
RefreshToken string `json:"refreshToken"`
// 有效期的token
SskAccessToken string `json:"sskAccessToken"`
// token 过期时间点,时间戳ms
SskAccessTokenExpiresIn int64 `json:"sskAccessTokenExpiresIn"`
RsaPublicKey string `json:"rsaPublicKey"`
}
type AppUploadFileCommitResult ¶
type AppUploadFileCommitResult struct {
XMLName xml.Name `xml:"file"`
Id string `xml:"id"`
Name string `xml:"name"`
Size string `xml:"size"`
Md5 string `xml:"md5"`
CreateDate string `xml:"createDate"`
Rev string `xml:"rev"`
UserId string `xml:"userId"`
RequestId string `xml:"requestId"`
IsSafe string `xml:"isSafe"`
}
type AppUserSignResult ¶
type AppUserSignResult struct {
Status AppUserSignStatus
Tip string
}
type AppUserSignStatus ¶
type AppUserSignStatus int
const ( AppUserSignStatusFailed AppUserSignStatus = 0 AppUserSignStatusSuccess AppUserSignStatus = 1 AppUserSignStatusHasSign AppUserSignStatus = -1 )
type BatchTaskInfo ¶
type BatchTaskInfo struct {
// FileId 文件ID
FileId string `json:"fileId"`
// FileName 文件名
FileName string `json:"fileName"`
// IsFolder 是否是文件夹,0-否,1-是
IsFolder int `json:"isFolder"`
// SrcParentId 文件所在父目录ID
SrcParentId string `json:"srcParentId"`
}
TaskInfo 任务信息
type BatchTaskInfoList ¶
type BatchTaskInfoList []*BatchTaskInfo
type BatchTaskParam ¶
type BatchTaskParam struct {
TypeFlag BatchTaskType `json:"type"`
TaskInfos BatchTaskInfoList `json:"taskInfos"`
TargetFolderId string `json:"targetFolderId"`
}
BatchTaskParam 任务参数
type BatchTaskStatus ¶
type BatchTaskStatus int
type BatchTaskType ¶
type BatchTaskType string
type CheckTaskResult ¶
type CheckTaskResult struct {
FailedCount int `json:"failedCount"`
SkipCount int `json:"skipCount"`
SubTaskCount int `json:"subTaskCount"`
SuccessedCount int `json:"successedCount"`
SuccessedFileIdList []int64 `json:"successedFileIdList"`
TaskId string `json:"taskId"`
// TaskStatus 任务状态, 4-成功
TaskStatus BatchTaskStatus `json:"taskStatus"`
}
CheckTaskResult 检查任务结果
type DownloadFuncCallback ¶
type FileEntity ¶
type FileEntity struct {
// CreateTime 创建时间
CreateTime string `json:"createTime"`
// FileId 文件ID
FileId string `json:"fileId"`
// FileIdDigest 文件ID指纹
FileIdDigest string `json:"fileIdDigest"`
// FileName 文件名
FileName string `json:"fileName"`
// FileSize 文件大小,文件夹为0
FileSize int64 `json:"fileSize"`
// FileType 文件类型,后缀名,例如:"dmg",没有则为空
FileType string `json:"fileType"`
// IsFolder 是否是文件夹
IsFolder bool `json:"isFolder"`
// LastOpTime 最后修改时间
LastOpTime string `json:"lastOpTime"`
// ParentId 父文件ID
ParentId string `json:"parentId"`
// DownloadUrl 下载路径,只有文件才有
DownloadUrl string `json:"downloadUrl"`
// IsStarred 是否是星标文件
IsStarred bool `json:"isStarred"`
// MediaType 媒体类型
MediaType MediaType `json:"mediaType"`
// SubFileCount 文件夹子文件数量,对文件夹详情有效
SubFileCount uint `json:"subFileCount"`
// FilePath 文件的完整路径
Path string `json:"path"`
}
func NewFileEntityForRootDir ¶
func NewFileEntityForRootDir() *FileEntity
NewFileEntityForRootDir 创建根目录"/"的默认文件信息
func (*FileEntity) String ¶
func (f *FileEntity) String() string
type FileList ¶
type FileList []*FileEntity
type FileListParam ¶
type FileListParam struct {
// FileId 文件ID
FileId string
// MediaType 媒体文件过滤
MediaType MediaType
// InGroupSpace ???
InGroupSpace bool
// OrderBy 排序字段
OrderBy OrderBy
// OrderSort 排序顺序
OrderSort OrderSort
// PageNum 页数量,从1开始
PageNum uint
// PageSize 页大小,默认60
PageSize uint
}
FileListParam 文件列表参数
func NewFileListParam ¶
func NewFileListParam() *FileListParam
type FileSearchParam ¶
type FileSearchParam struct {
FileListParam
// FileId 文件ID
// Keyword 搜索关键字
Keyword string
}
FileSearchParam 文件搜索参数
type FileSearchResult ¶
type FileSearchResult struct {
// Data 数据
Data FileList `json:"data"`
// PageNum 页数量,从1开始
PageNum uint `json:"pageNum"`
// PageSize 页大小,默认60
PageSize uint `json:"pageSize"`
// Path 路径
Path PathList `json:"path"`
// RecordCount 文件总数量
RecordCount uint `json:"recordCount"`
}
FileSearchResult 文件搜索返回结果
type HandleFileDirectoryFunc ¶
type HandleFileDirectoryFunc func(depth int, fdPath string, fd *FileEntity, apierr *apierror.ApiError) bool
HandleFileDirectoryFunc 处理文件或目录的元信息, 返回值控制是否退出递归
type MkdirResult ¶
type PanClient ¶
type PanClient struct {
// contains filtered or unexported fields
}
func NewPanClient ¶
func NewPanClient(webToken WebLoginToken, appToken AppLoginToken) *PanClient
func (*PanClient) AppCreateUploadFile ¶
func (p *PanClient) AppCreateUploadFile(param *AppCreateUploadFileParam) (*AppCreateUploadFileResult, *apierror.ApiError)
func (*PanClient) AppDownloadFileData ¶
func (p *PanClient) AppDownloadFileData(downloadFileUrl string, fileRange AppFileDownloadRange, downloadFunc DownloadFuncCallback) *apierror.ApiError
func (*PanClient) AppGetFamilyList ¶
func (p *PanClient) AppGetFamilyList() (*AppFamilyInfoListResult, *apierror.ApiError)
AppGetFamilyList 获取用户的家庭列表
func (*PanClient) AppGetFileDownloadUrl ¶
func (*PanClient) AppGetFileInfo ¶
func (p *PanClient) AppGetFileInfo(param *AppGetFileInfoParam) (*AppGetFileInfoResult, *apierror.ApiError)
AppGetFileInfo 根据文件ID或者文件绝对路径获取文件信息,支持文件和文件夹
func (*PanClient) AppGetUploadFileStatus ¶
func (p *PanClient) AppGetUploadFileStatus(uploadFileId string) (*AppGetUploadFileStatusResult, *apierror.ApiError)
AppGetUploadFileStatus 查询上传的文件状态
func (*PanClient) AppUploadFileCommit ¶
func (p *PanClient) AppUploadFileCommit(uploadCommitUrl, uploadFileId, xRequestId string) (*AppUploadFileCommitResult, *apierror.ApiError)
func (*PanClient) AppUploadFileData ¶
func (p *PanClient) AppUploadFileData(uploadUrl, uploadFileId, xRequestId string, fileRange *AppFileUploadRange, uploadFunc UploadFunc) *apierror.ApiError
func (*PanClient) AppUserSign ¶
func (p *PanClient) AppUserSign() (*AppUserSignResult, *apierror.ApiError)
AppUserSign 用户签到
func (*PanClient) CheckBatchTask ¶
func (p *PanClient) CheckBatchTask(typeFlag BatchTaskType, taskId string) (result *CheckTaskResult, error *apierror.ApiError)
func (*PanClient) CreateBatchTask ¶
func (p *PanClient) CreateBatchTask(param *BatchTaskParam) (taskId string, error *apierror.ApiError)
func (*PanClient) FileInfoById ¶
func (p *PanClient) FileInfoById(fileId string) (fileInfo *FileEntity, error *apierror.ApiError)
func (*PanClient) FileInfoByPath ¶
func (p *PanClient) FileInfoByPath(pathStr string) (fileInfo *FileEntity, error *apierror.ApiError)
FileInfoByPath 通过路径获取文件详情,pathStr是绝对路径
func (*PanClient) FileList ¶
func (p *PanClient) FileList(param *FileListParam) (result *FileSearchResult, error *apierror.ApiError)
func (*PanClient) FileSearch ¶
func (p *PanClient) FileSearch(param *FileSearchParam) (result *FileSearchResult, error *apierror.ApiError)
func (*PanClient) FilesDirectoriesRecurseList ¶
func (p *PanClient) FilesDirectoriesRecurseList(path string, handleFileDirectoryFunc HandleFileDirectoryFunc) FileList
FilesDirectoriesRecurseList 递归获取目录下的文件和目录列表
func (*PanClient) GetUserDetailInfo ¶
func (p *PanClient) GetUserDetailInfo() (userDetailInfo *UserDetailInfo, error *apierror.ApiError)
func (*PanClient) GetUserInfo ¶
func (*PanClient) Mkdir ¶
func (p *PanClient) Mkdir(parentFileId, dirName string) (*MkdirResult, *apierror.ApiError)
func (*PanClient) MkdirRecursive ¶
func (*PanClient) RecycleClear ¶
func (*PanClient) RecycleDelete ¶
RecycleDelete 删除回收站文件或目录
func (*PanClient) RecycleList ¶
func (p *PanClient) RecycleList(pageNum, pageSize int) (result *RecycleFileListResult, error *apierror.ApiError)
RecycleList 列出回收站文件列表
func (*PanClient) RecycleRestore ¶
func (p *PanClient) RecycleRestore(fileList []*RecycleFileInfo) (taskId string, err *apierror.ApiError)
func (*PanClient) ShareCancel ¶
func (*PanClient) ShareGetIdByUrl ¶
func (*PanClient) ShareList ¶
func (p *PanClient) ShareList(param *ShareListParam) (*ShareListResult, *apierror.ApiError)
func (*PanClient) ShareListDirDetail ¶
func (*PanClient) SharePrivate ¶
func (p *PanClient) SharePrivate(fileId string, expiredTime ShareExpiredTime) (*PrivateShareResult, *apierror.ApiError)
func (*PanClient) SharePublic ¶
func (p *PanClient) SharePublic(fileId string, expiredTime ShareExpiredTime) (*PublicShareResult, *apierror.ApiError)
func (*PanClient) ShareSave ¶
func (p *PanClient) ShareSave(accessUrl string, accessCode string, savePanDirId string) (bool, *apierror.ApiError)
ShareSave 转存分享到对应的文件夹
func (*PanClient) UserDrawPrize ¶
func (p *PanClient) UserDrawPrize(taskId ActivityTaskId) (*UserDrawPrizeResult, *apierror.ApiError)
抽奖
type PathEntity ¶
type PathList ¶
type PathList []*PathEntity
type PrivateShareResult ¶
type PrivateShareResult struct {
}
type PublicShareResult ¶
type PublicShareResult struct {
}
type RecycleFileActResult ¶
type RecycleFileActResult struct {
Success bool `json:"success"`
}
type RecycleFileInfo ¶
type RecycleFileInfo struct {
// CreateTime 创建时间
CreateTime string `json:"createTime"`
// FileId 文件ID
FileId string `json:"fileId"`
// FileName 文件名
FileName string `json:"fileName"`
// FileSize 文件大小,文件夹为0
FileSize int64 `json:"fileSize"`
// FileType 文件类型,后缀名,例如:"dmg",没有则为空
FileType string `json:"fileType"`
// IsFolder 是否是文件夹
IsFolder bool `json:"isFolder"`
// IsFamilyFile 是否是家庭云文件
IsFamilyFile bool `json:"isFamilyFile"`
// LastOpTime 最后修改时间
LastOpTime string `json:"lastOpTime"`
// ParentId 父文件ID
ParentId string `json:"parentId"`
// DownloadUrl 下载路径,只有文件才有
DownloadUrl string `json:"downloadUrl"`
// MediaType 媒体类型
MediaType MediaType `json:"mediaType"`
// PathStr 文件的完整路径
PathStr string `json:"pathStr"`
}
RecycleFileInfo 回收站中文件/目录信息
type RecycleFileInfoList ¶
type RecycleFileInfoList []*RecycleFileInfo
type RecycleFileListResult ¶
type RecycleFileListResult struct {
// Data 数据
Data RecycleFileInfoList `json:"data"`
// PageNum 页数量,从1开始
PageNum uint `json:"pageNum"`
// PageSize 页大小,默认60
PageSize uint `json:"pageSize"`
// RecordCount 文件总数量
RecordCount uint `json:"recordCount"`
FamilyId int64 `json:"familyId"`
FamilyName string `json:"familyName"`
}
type ShareExpiredTime ¶
type ShareExpiredTime int
type ShareItem ¶
type ShareItem struct {
AccessCode string `json:"accessCode"`
AccessURL string `json:"accessURL"`
AccessCount AccessCount `json:"accessCount"`
DownloadUrl string `json:"downloadUrl"`
LongDownloadUrl string `json:"longDownloadUrl"`
FileId string `json:"fileId"`
FileIdDigest string `json:"fileIdDigest"`
FileName string `json:"fileName"`
FilePath string `json:"filePath"`
FileSize int64 `json:"fileSize"`
IconURL string `json:"iconURL"`
IsFolder bool `json:"isFolder"`
// MediaType 文件类别
NickName string `json:"nickName"`
ReviewStatus int `json:"reviewStatus"`
ShareDate string `json:"shareDate"`
ShareId int64 `json:"shareId"`
ShareMode ShareMode `json:"shareMode"`
ShareTime string `json:"shareTime"`
ShareType int `json:"shareType"`
ShortShareUrl string `json:"shortShareUrl"`
}
type ShareItemList ¶
type ShareItemList []*ShareItem
type ShareListDirResult ¶
type ShareListDirResult struct {
}
type ShareListParam ¶
type ShareListParam struct {
}
func NewShareListParam ¶
func NewShareListParam() *ShareListParam
type UploadFunc ¶
type UploadFunc func(httpMethod, fullUrl string, headers map[string]string) (resp *http.Response, err error)
UploadFunc 上传文件处理函数
type UserDetailInfo ¶
type UserDetailInfo struct {
// 性别 F-女 M-男
Gender string `json:"gender"`
// 省代码
ProvinceCode string `json:"provinceCode"`
// 城市代码
CityCode string `json:"cityCode"`
// 登录名
UserAccount string `json:"userAccount"`
// 手机号,模糊处理过的,没有设定则为空
SafeMobile string `json:"safeMobile"`
// 域名称
DomainName string `json:"domainName"`
// 昵称
Nickname string `json:"nickname"`
// 邮箱,没有设定则为空
Email string `json:"email"`
}
type UserDrawPrizeResult ¶
type UserInfo ¶
type UserInfo struct {
// 用户UID
UserId uint64 `json:"userId"`
// 用户登录名,一般为 xxx@189.cn
UserAccount string `json:"userAccount"`
// 昵称,如果没有设置则为空
Nickname string `json:"nickname"`
// 域名称,默认和UserId一样
DomainName string `json:"domainName"`
// 189邮箱已使用空间大小
Used189Size uint64 `json:"used189Size"`
// 已使用个人空间大小
UsedSize uint64 `json:"usedSize"`
// 个人空间总大小
Quota uint64 `json:"quota"`
// 会员开始时间
SuperBeginTime string `json:"superBeginTime"`
// 会员结束时间
SuperEndTime string `json:"superEndTime"`
// 今天是否已签到
IsSign bool `json:"isSign"`
// VIP会员标志位
SuperVip UserVip `json:"superVip"`
}
type WebLoginToken ¶
type WebLoginToken struct {
CookieLoginUser string `json:"cookieLoginUser"`
}
func Login ¶
func Login(username, password string) (webToken *WebLoginToken, error *apierror.ApiError)
func LoginWithCaptcha ¶
func LoginWithCaptcha(username, password, captchaCode string) (webToken *WebLoginToken, error *apierror.ApiError)
Source Files
¶
Click to show internal directories.
Click to hide internal directories.