dupan

package
v0.0.0-...-4bf6eee Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultUserAgent = "" /* 135-byte string literal not displayed */
	PAppid           = "778750"
)

Variables

View Source
var (
	DefaultBaseURL = string([]byte{0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x70, 0x61, 0x6e, 0x2e, 0x62, 0x61, 0x69, 0x64, 0x75, 0x2e, 0x63, 0x6f, 0x6d})
	PUseragent     = string([]byte{0x73, 0x6f, 0x66, 0x74, 0x78, 0x6d, 0x3b, 0x6e, 0x65, 0x74, 0x64, 0x69, 0x73, 0x6b})
	PBaseurl       = string([]byte{0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x70, 0x63, 0x73, 0x2e, 0x62, 0x61, 0x69, 0x64, 0x75, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x72, 0x65, 0x73, 0x74, 0x2f, 0x32, 0x2e, 0x30, 0x2f, 0x70, 0x63, 0x73})
)

Functions

This section is empty.

Types

type BlockListJSON

type BlockListJSON struct {
	BlockList []string `json:"block_list"`
}

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient() *Client

func (*Client) FileList

func (s *Client) FileList(path, order, by string) (FileDirectoryList, error)

func (*Client) SetDebug

func (s *Client) SetDebug(debug bool) *Client

func (*Client) SetUserAgent

func (s *Client) SetUserAgent(ua string) *Client

func (*Client) Setup

func (s *Client) Setup(bduss, stoken string) *Client

func (*Client) Share

func (s *Client) Share(paths []string, pwd string, period int) (*Shared, error)

func (*Client) ShareCancel

func (s *Client) ShareCancel(shareIds []int64) error

func (*Client) ShareList

func (s *Client) ShareList(page int) ([]ShareRecordInfo, error)

func (*Client) ShareURLInfo

func (s *Client) ShareURLInfo(shareID int64) (*ShareURLInfo, error)

type ErrResult

type ErrResult struct {
	ErrNo   int    `json:"errno"`
	ShowMsg string `json:"show_msg"`
}

type FileDirectory

type FileDirectory struct {
	FsID     int64  `json:"fs_id"`
	AppID    int64  `json:"app_id"`
	Path     string `json:"path"`
	Filename string `json:"server_filename"`
	Ctime    int64  `json:"ctime"`
	Mtime    int64  `json:"mtime"`
	BlockListJSON
	Size           int64 `json:"size"`
	IsDirInt       int8  `json:"isdir"`
	IfHasSubDirInt int8  `json:"ifhassubdir"`
}

type FileDirectoryList

type FileDirectoryList []*FileDirectory

type PResultErr

type PResultErr struct {
	ErrorCode int    `json:"error_code"`
	ErrorMsg  string `json:"error_msg"`
}

type ShareRecordInfo

type ShareRecordInfo struct {
	ShareID         int64   `json:"shareId"`
	FsIds           []int64 `json:"fsIds"`
	ShortLink       string  `json:"shortlink"`
	Status          int     `json:"status"`
	Public          int     `json:"public"`
	TypicalCategory int     `json:"typicalCategory"`
	TypicalPath     string  `json:"typicalPath"`
	ExpireType      int     `json:"expiredType"`
	ExpireTime      int64   `json:"expiredTime"`
	ViewCount       int     `json:"vCnt"`
}

type ShareURLInfo

type ShareURLInfo struct {
	Pwd      string `json:"pwd"`
	ShortURL string `json:"shorturl"`
}

type Shared

type Shared struct {
	Link    string `json:"link"`
	Pwd     string `json:"pwd"`
	ShareID int64  `json:"shareid"`
}

Jump to

Keyboard shortcuts

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