response

package
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 20, 2022 License: MIT Imports: 0 Imported by: 0

Documentation

Overview

Package response 所有网盘接口返回的定义

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileListResp

type FileListResp struct {
	Errno     int    `json:"errno"`
	GuidInfo  string `json:"guid_info"`
	RequestId int64  `json:"request_id"`
	Errmsg    string `json:"errmsg"`
	Guid      int64  `json:"guid"`
	HasMore   int    `json:"has_more"`
	Cursor    int    `json:"cursor"`
	List      []struct {
		FsId           int64               `json:"fs_id"`           //文件在云端的唯一标识ID
		Path           string              `json:"path"`            //文件的绝对路径
		ServerFilename string              `json:"server_filename"` //文件名称
		Size           int64               `json:"size"`            //文件大小,单位B
		ServerMtime    int64               `json:"server_mtime"`    //文件在服务器修改时间
		ServerCtime    int64               `json:"server_ctime"`    //文件在服务器创建时间
		LocalMtime     int64               `json:"local_mtime"`     //文件在客户端修改时间
		LocalCtime     int64               `json:"local_ctime"`     //文件在客户端创建时间
		Isdir          int                 `json:"isdir"`           //是否为目录,0 文件、1 目录
		Category       int                 `json:"category"`        //文件类型,1 视频、2 音频、3 图片、4 文档、5 应用、6 其他、7 种子
		Md5            string              `json:"md_5"`            //云端哈希(非文件真实MD5),只有是文件类型时,该字段才存在
		DirEmpty       int                 `json:"dir_empty"`       //该目录是否存在子目录,只有请求参数web=1且该条目为目录时,该字段才存在, 0为存在, 1为不存在
		Thumbs         []map[string]string `json:"thumbs"`          //只有请求参数web=1且该条目分类为图片时,该字段才存在,包含三个尺寸的缩略图URL
		Privacy        string              `json:"privacy"`
		Unlist         int64               `json:"unlist"`
		ServerAtime    int64               `json:"server_atime"`
		Share          int64               `json:"share"`
		Empty          int64               `json:"empty"`
		OperId         int64               `json:"oper_id"`
	} `json:"list"`
}

type FileManagerResp

type FileManagerResp struct {
	Errno     int `json:"errno"`
	RequestId any `json:"request_id"`
	Errmsg    any `json:"errmsg"`
	Info      []struct {
		Errno int    `json:"errno"`
		Path  string `json:"path"`
	} //文件信息
	Taskid uint64 //异步任务id, 当async=2时返回
}

type FileMetaResp

type FileMetaResp struct {
	Category    int    `json:"category"`
	Filename    string `json:"filename"`
	FsId        int64  `json:"fs_id"`
	Isdir       int    `json:"isdir"`
	Md5         string `json:"md5"`
	OperId      int    `json:"oper_id"`
	Path        string `json:"path"`
	RverCtime   int    `json:"rver_ctime"`
	ServerMtime int    `json:"server_mtime"`
	Size        int    `json:"size"`
	Dlink       string `json:"dlink"`
}

type FileMetasResp

type FileMetasResp struct {
	Errmsg string         `json:"errmsg"`
	Errno  int            `json:"errno"`
	List   []FileMetaResp `json:"list"`
	Names  struct {
	} `json:"names"`
	RequestId string `json:"request_id"`
}

type FileSearchResp

type FileSearchResp struct {
	Errno       int      `json:"errno"`
	RequestId   any      `json:"request_id"`
	Errmsg      any      `json:"errmsg"`
	Contentlist []string `json:"contentlist"`
	HasMore     int      `json:"has_more"`
	List        []struct {
		FsID           int64               `json:"fs_id"`
		Path           string              `json:"path"`
		ServerFilename string              `json:"server_filename"`
		Size           int                 `json:"size"`
		ServerMtime    int                 `json:"server_mtime"`
		ServerCtime    int                 `json:"server_ctime"`
		LocalMtime     int                 `json:"local_mtime"`
		LocalCtime     int                 `json:"local_ctime"`
		Isdir          int                 `json:"isdir"`
		Category       int                 `json:"category"`
		Share          int                 `json:"share"`
		OperID         int                 `json:"oper_id"`
		ExtentTinyint1 int                 `json:"extent_tinyint_1"`
		Md5            string              `json:"md_5"`
		Thumbs         []map[string]string `json:"thumbs"`
		DeleteType     int                 `json:"delete_type"`
		OwnerId        int                 `json:"owner_id"`
		Wpfile         int                 `json:"wpfile"`
	} `json:"list"`
}

type OauthDeviceCodeResp

type OauthDeviceCodeResp struct {
	DeviceCode      string `json:"device_code"`      //设备码,可用于生成单次凭证 Access Token。
	UserCode        string `json:"user_code"`        //用户码。 如果选择让用户输入 user code 方式,来引导用户授权,设备需要展示 user code 给用户。
	VerificationUrl string `json:"verification_url"` //用户输入 user code 进行授权的 url。
	QrcodeUrl       string `json:"qrcode_url"`       //二维码url,用户用手机等智能终端扫描该二维码完成授权。
	ExpiresIn       int    `json:"expires_in"`       //deviceCode 的过期时间,单位:秒。 到期后 deviceCode 不能换 Access Token。
	Interval        int    `json:"interval"`         //deviceCode 换 Access Token 轮询间隔时间,单位:秒。 轮询次数限制小于 expire_in/interval。
}

type QuotaResp

type QuotaResp struct {
	Total     int    `json:"total"`  //总空间大小,单位B
	Expire    bool   `json:"expire"` //7天内是否有容量到期
	Used      int    `json:"used"`   //已使用大小,单位B
	Free      int    `json:"free"`   //剩余大小,单位B
	Errno     int    `json:"errno"`
	RequestId int    `json:"request_id"`
	Errmsg    string `json:"errmsg"`
}

type UploadCreateFileResp

type UploadCreateFileResp struct {
	Errno          int    `json:"errno"`           //错误码
	FsId           int64  `json:"fs_id"`           //文件在云端的唯一标识ID
	Md5            string `json:"md_5"`            //文件的MD5,只有提交文件时才返回,提交目录时没有该值
	ServerFilename string `json:"server_filename"` //文件名
	Category       int    `json:"category"`        //分类类型, 1 视频 2 音频 3 图片 4 文档 5 应用 6 其他 7 种子
	Path           string `json:"path"`            //上传后使用的文件绝对路径
	Size           int64  `json:"size"`            //文件大小,单位B
	Ctime          int64  `json:"ctime"`           //文件创建时间
	Mtime          int64  `json:"mtime"`           //文件修改时间
	Isdir          int    `json:"isdir"`           //是否目录,0 文件、1 目录
	Name           string `json:"name"`
	FromType       int    `json:"from_type"`
}

type UploadPrecreateResp

type UploadPrecreateResp struct {
	Errno      int    `json:"errno"`       //错误码
	Path       string `json:"path"`        //文件的绝对路径
	Uploadid   string `json:"uploadid"`    //上传唯一ID标识此上传任务
	ReturnType int    `json:"return_type"` //返回类型,系统内部状态字段
	BlockList  []int  `json:"block_list"`  //需要上传的分片序号列表,索引从0开始
}

type UploadSuperFileResp

type UploadSuperFileResp struct {
	Errno     int    `json:"errno"`
	RequestId int    `json:"request_id"`
	Errmsg    string `json:"errmsg"`
	Md5       string `json:"md5"`
}

type UserInfoResp

type UserInfoResp struct {
	BaiduName   string `json:"baidu_name"`   //百度帐号
	NetdiskName string `json:"netdisk_name"` //网盘帐号
	AvatarUrl   string `json:"avatar_url"`   //头像地址
	VipType     int    `json:"vip_type"`     //会员类型,0普通用户、1普通会员、2超级会员
	Uk          int    `json:"uk"`           //用户ID
	Errno       int    `json:"errno"`
	RequestId   string `json:"request_id"`
	Errmsg      string `json:"errmsg"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL