types

package
v0.6.3 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppVersionInfo

type AppVersionInfo struct {
	CreatedTime int64  `json:"created_time"`
	VersionCode string `json:"version_code"`
	VersionUrl  string `json:"version_url"`
}

type AppVersionResult

type AppVersionResult struct {
	Android    AppVersionInfo `json:"android"`
	LinuxApp   AppVersionInfo `json:"linux_115"`
	MacBrowser AppVersionInfo `json:"mac"`
	MacApp     AppVersionInfo `json:"mac_115"`
	WinBrowser AppVersionInfo `json:"win"`
	WinApp     AppVersionInfo `json:"window_115"`
}

type CommonParams added in v0.6.3

type CommonParams struct {
	// App version
	AppVer string
	// User ID
	UserId string
	// MD5 hash of user ID
	UserHash string
	// User key for uploading
	UserKey string
}

Common parameters for several APIs

func (*CommonParams) SetUserInfo added in v0.6.3

func (c *CommonParams) SetUserInfo(userId int, userKey string)

type DownloadInfo

type DownloadInfo struct {
	FileName string      `json:"file_name"`
	FileSize json.Number `json:"file_size"`
	PickCode string      `json:"pick_code"`
	Url      DownloadUrl `json:"url"`
}

type DownloadResult

type DownloadResult map[string]*DownloadInfo

type DownloadUrl

type DownloadUrl struct {
	Url string
}

func (*DownloadUrl) UnmarshalJSON

func (u *DownloadUrl) UnmarshalJSON(b []byte) (err error)

type FileGetResult

type FileGetResult []*FileInfo

type FileInfo

type FileInfo struct {
	AreaId     util.IntNumber `json:"aid"`
	CategoryId string         `json:"cid"`
	FileId     string         `json:"fid"`
	ParentId   string         `json:"pid"`

	Name     string         `json:"n"`
	Type     string         `json:"ico"`
	Size     util.IntNumber `json:"s"`
	Sha1     string         `json:"sha"`
	PickCode string         `json:"pc"`

	IsStar util.Boolean `json:"m"`
	Labels []*LabelInfo `json:"fl"`

	CreatedTime  string `json:"tp"`
	UpdatedTime  string `json:"te"`
	ModifiedTime string `json:"t"`

	// MediaDuration describes duration in seconds for audio/video.
	MediaDuration float64 `json:"play_long"`

	// Special fields for video
	VideoFlag       int `json:"iv"`
	VideoDefinition int `json:"vdi"`
}

type FileListResult

type FileListResult struct {
	DirId  string
	Offset int

	Count int
	Files []*FileInfo

	// Order settings
	Order string
	Asc   int
}

type ImageGetResult

type ImageGetResult struct {
	FileName string `json:"file_name"`
	FileSha1 string `json:"file_sha1"`
	Pickcode string `json:"pick_code"`

	SourceUrl string   `json:"source_url"`
	OriginUrl string   `json:"origin_url"`
	ViewUrl   string   `json:"url"`
	ThumbUrls []string `json:"all_url"`
}

type IndexInfoResult

type IndexInfoResult struct {
	SpaceInfo struct {
		Total  SizeInfo `json:"all_total"`
		Remain SizeInfo `json:"all_remain"`
		Used   SizeInfo `json:"all_use"`
	} `json:"space_info"`
	LoginInfos struct {
		List []*LoginInfo
	} `json:"login_devices_info"`
}

type LabelCreateResult

type LabelCreateResult []*LabelInfo

type LabelInfo

type LabelInfo struct {
	Id         string         `json:"id"`
	Name       string         `json:"name"`
	Color      string         `json:"color"`
	Sort       util.IntNumber `json:"sort"`
	CreateTime int64          `json:"create_time"`
	UpdateTime int64          `json:"update_time"`
}

type LabelListResult

type LabelListResult struct {
	Total int          `json:"total"`
	List  []*LabelInfo `json:"list"`
	Sort  string       `json:"sort"`
	Order string       `json:"order"`
}

type LoginInfo

type LoginInfo struct {
	IsCurrent int    `json:"is_current"`
	LoginTime int64  `json:"utime"`
	AppFlag   string `json:"ssoent"`
	AppName   string `json:"name"`
	Ip        string `json:"ip"`
	City      string `json:"city"`
}

type OfflineAddUrlsResult

type OfflineAddUrlsResult []*OfflineTask

func (*OfflineAddUrlsResult) UnmarshalResult

func (r *OfflineAddUrlsResult) UnmarshalResult(data []byte) (err error)

type OfflineListResult

type OfflineListResult struct {
	PageIndex int
	PageCount int
	PageSize  int

	TaskCount int
	Tasks     []*OfflineTask
}

type OfflineTask

type OfflineTask struct {
	InfoHash string `json:"info_hash"`
	Name     string `json:"name"`
	Size     int64  `json:"size"`
	Url      string `json:"url"`
	AddTime  int64  `json:"add_time"`

	Status     int     `json:"status"`
	Percent    float64 `json:"percentDone"`
	UpdateTime int64   `json:"last_update"`

	FileId string `json:"file_id"`
	DirId  string `json:"wp_path_id"`
}

type QrcodeLoginResult

type QrcodeLoginResult struct {
	Cookie struct {
		CID  string `json:"CID"`
		SEID string `json:"SEID"`
		UID  string `json:"UID"`
	} `json:"cookie"`
	UserId   int    `json:"user_id"`
	UserName string `json:"user_name"`
}

type QrcodeStatusResult

type QrcodeStatusResult struct {
	Status  int    `json:"status,omitempty"`
	Message string `json:"msg,omitempty"`
	Version string `json:"version,omitempty"`
}

type QrcodeTokenResult

type QrcodeTokenResult struct {
	Uid  string `json:"uid"`
	Time int64  `json:"time"`
	Sign string `json:"sign"`
}

type RecycleBinItem

type RecycleBinItem struct {
	FileId     string         `json:"id"`
	FileName   string         `json:"file_name"`
	FileSize   util.IntNumber `json:"file_size"`
	ParentId   string         `json:"cid"`
	ParentName string         `json:"parent_name"`
	DeleteTime util.IntNumber `json:"dtime"`
}

type RecycleBinListResult

type RecycleBinListResult struct {
	Count int
	Item  []*RecycleBinItem
}

type ShareInfo

type ShareInfo struct {
	ShareCode string `json:"share_code"`

	ShareState    util.IntNumber `json:"share_state"`
	ShareTitle    string         `json:"share_title"`
	ShareUrl      string         `json:"share_url"`
	ShareDuration util.IntNumber `json:"share_ex_time"`
	ReceiveCode   string         `json:"receive_code"`

	ReceiveCount util.IntNumber `json:"receive_count"`

	FileCount   int            `json:"file_count"`
	FolderCount int            `json:"folder_count"`
	TotalSize   util.IntNumber `json:"total_size"`
}

type ShareListResult

type ShareListResult struct {
	Count int
	Items []*ShareInfo
}

type ShortcutInfo

type ShortcutInfo struct {
	FileId   string `json:"file_id"`
	FileName string `json:"file_name"`
	Sort     string `json:"sort"`
}

type ShortcutListResult

type ShortcutListResult struct {
	List []*ShortcutInfo `json:"list"`
}

type SizeInfo

type SizeInfo struct {
	Size       float64 `json:"size"`
	SizeFormat string  `json:"size_format"`
}

type UploadInfoResult

type UploadInfoResult struct {
	UserId  int
	UserKey string
}

type UploadInitResult

type UploadInitResult struct {
	Exists bool
	// Upload parameters
	Oss struct {
		Bucket      string
		Object      string
		Callback    string
		CallbackVar string
	}
	SignKey   string
	SignCheck string
}

type UploadSampleInitResult

type UploadSampleInitResult struct {
	Host        string
	Object      string
	Callback    string
	AccessKeyId string
	Policy      string
	Signature   string
}

type UploadSampleResult

type UploadSampleResult struct {
	AreaId     util.IntNumber `json:"aid"`
	CategoryId string         `json:"cid"`
	FileId     string         `json:"file_id"`
	FileName   string         `json:"file_name"`
	FileSize   util.IntNumber `json:"file_size"`
	FileSha1   string         `json:"sha1"`
	PickCode   string         `json:"pick_code"`
	CreateTime util.IntNumber `json:"file_ptime"`
}

type UploadTokenResult

type UploadTokenResult struct {
	AccessKeyId     string
	AccessKeySecret string
	SecurityToken   string
	Expiration      time.Time
}

type UserInfoResult

type UserInfoResult struct {
	UserId    int    `json:"user_id"`
	UserName  string `json:"user_name"`
	AvatarUrl string `json:"face"`
	IsVip     int    `json:"vip"`
}

type VideoPlayResult

type VideoPlayResult struct {
	IsReady       bool
	FileId        string
	FileName      string
	FileSize      int64
	VideoDuration float64
	VideoWidth    int
	VideoHeight   int
	VideoUrl      string
}

func (*VideoPlayResult) UnmarshalResult

func (r *VideoPlayResult) UnmarshalResult(data []byte) (err error)

type VideoSubtitleInfo

type VideoSubtitleInfo struct {
	Language string
	Title    string
	Type     string
	Url      string
}

func (*VideoSubtitleInfo) UnmarshalJSON

func (i *VideoSubtitleInfo) UnmarshalJSON(data []byte) (err error)

type VideoSubtitleResult

type VideoSubtitleResult struct {
	AutoLoad VideoSubtitleInfo    `json:"autoload"`
	List     []*VideoSubtitleInfo `json:"list"`
}

type VoidResult

type VoidResult struct{}

VoidResult describes a void result.

Jump to

Keyboard shortcuts

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