quqi

package
v3.37.1 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2024 License: AGPL-3.0 Imports: 30 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Addition

type Addition struct {
	driver.RootID
	Phone    string `json:"phone"`
	Password string `json:"password"`
	Cookie   string `json:"cookie" help:"Cookie can be used on multiple clients at the same time"`
	CDN      bool   `json:"cdn" help:"If you enable this option, the download speed can be increased, but there will be some performance loss"`
}

type BaseReq

type BaseReq struct {
	GroupID string `json:"quqi_id"`
}

type BaseReqQuery

type BaseReqQuery struct {
	ID string `json:"quqiid"`
}

type BaseRes

type BaseRes struct {
	//Data    interface{} `json:"data"`
	Code    int    `json:"err"`
	Message string `json:"msg"`
}

type CopyRes

type CopyRes struct {
	BaseRes
}

type GetDocRes

type GetDocRes struct {
	BaseRes
	Data struct {
		OriginPath string `json:"origin_path"`
	} `json:"data"`
}

type GetDownloadResp

type GetDownloadResp struct {
	BaseRes
	Data struct {
		Url string `json:"url"`
	} `json:"data"`
}

type Group

type Group struct {
	ID              int    `json:"quqi_id"`
	Type            int    `json:"type"`
	Name            string `json:"name"`
	IsAdministrator int    `json:"is_administrator"`
	Role            int    `json:"role"`
	Avatar          string `json:"avatar_url"`
	IsStick         int    `json:"is_stick"`
	Nickname        string `json:"nickname"`
	Status          int    `json:"status"`
}

type GroupRes

type GroupRes struct {
	BaseRes
	Data []*Group `json:"data"`
}

type List

type List struct {
	ListDir
	Dir  []*ListDir  `json:"dir"`
	File []*ListFile `json:"file"`
}

type ListDir

type ListDir struct {
	ListItem
	ChildDocNum int64  `json:"child_doc_num"`
	DirDetail   string `json:"dir_detail"`
	DirType     int    `json:"dir_type"`
}

type ListFile

type ListFile struct {
	ListItem
	BroadDocType       string `json:"broad_doc_type"`
	CanDisplay         bool   `json:"can_display"`
	Detail             string `json:"detail"`
	EXT                string `json:"ext"`
	Filetype           string `json:"filetype"`
	HasMobileThumbnail bool   `json:"has_mobile_thumbnail"`
	HasThumbnail       bool   `json:"has_thumbnail"`
	Size               int64  `json:"size"`
	Version            int    `json:"version"`
}

type ListItem

type ListItem struct {
	AddTime        int64  `json:"add_time"`
	IsDir          int    `json:"is_dir"`
	IsExpand       int    `json:"is_expand"`
	IsFinalize     int    `json:"is_finalize"`
	LastEditorName string `json:"last_editor_name"`
	Name           string `json:"name"`
	NodeID         int64  `json:"nid"`
	ParentID       int64  `json:"parent_id"`
	Permission     int    `json:"permission"`
	TreeID         int64  `json:"tid"`
	UpdateCNT      int64  `json:"update_cnt"`
	UpdateTime     int64  `json:"update_time"`
}

type ListRes

type ListRes struct {
	BaseRes
	Data *List `json:"data"`
}

type MakeDirRes

type MakeDirRes struct {
	BaseRes
	Data struct {
		IsRoot   bool  `json:"is_root"`
		NodeID   int64 `json:"node_id"`
		ParentID int64 `json:"parent_id"`
	} `json:"data"`
}

type MoveRes

type MoveRes struct {
	BaseRes
	Data struct {
		NodeChildNum int64  `json:"node_child_num"`
		NodeID       int64  `json:"node_id"`
		NodeName     string `json:"node_name"`
		ParentID     int64  `json:"parent_id"`
		GroupID      int64  `json:"quqi_id"`
		TreeID       int64  `json:"tree_id"`
	} `json:"data"`
}

type Quqi

type Quqi struct {
	model.Storage
	Addition
	Cookie   string // Cookie
	GroupID  string // 私人云群组ID
	ClientID string // 随机生成客户端ID 经过测试,部分接口调用若不携带client id会出现错误
}

func (*Quqi) Config

func (d *Quqi) Config() driver.Config

func (*Quqi) Copy

func (d *Quqi) Copy(ctx context.Context, srcObj, dstDir model.Obj) (model.Obj, error)

func (*Quqi) Drop

func (d *Quqi) Drop(ctx context.Context) error

func (*Quqi) GetAddition

func (d *Quqi) GetAddition() driver.Additional

func (*Quqi) Init

func (d *Quqi) Init(ctx context.Context) error
func (d *Quqi) Link(ctx context.Context, file model.Obj, args model.LinkArgs) (*model.Link, error)

func (*Quqi) List

func (d *Quqi) List(ctx context.Context, dir model.Obj, args model.ListArgs) ([]model.Obj, error)

func (*Quqi) MakeDir

func (d *Quqi) MakeDir(ctx context.Context, parentDir model.Obj, dirName string) (model.Obj, error)

func (*Quqi) Move

func (d *Quqi) Move(ctx context.Context, srcObj, dstDir model.Obj) (model.Obj, error)

func (*Quqi) Put

func (d *Quqi) Put(ctx context.Context, dstDir model.Obj, stream model.FileStreamer, up driver.UpdateProgress) (model.Obj, error)

func (*Quqi) Remove

func (d *Quqi) Remove(ctx context.Context, obj model.Obj) error

func (*Quqi) Rename

func (d *Quqi) Rename(ctx context.Context, srcObj model.Obj, newName string) (model.Obj, error)

type RemoveRes

type RemoveRes struct {
	BaseRes
}

type RenameRes

type RenameRes struct {
	BaseRes
	Data struct {
		NodeID     int64  `json:"node_id"`
		GroupID    int64  `json:"quqi_id"`
		Rename     string `json:"rename"`
		TreeID     int64  `json:"tree_id"`
		UpdateTime int64  `json:"updatetime"`
	} `json:"data"`
}

type TempKeyResp

type TempKeyResp struct {
	Err  int    `json:"err"`
	Msg  string `json:"msg"`
	Data struct {
		ExpiredTime int    `json:"expiredTime"`
		Expiration  string `json:"expiration"`
		Credentials struct {
			SessionToken string `json:"sessionToken"`
			TmpSecretID  string `json:"tmpSecretId"`
			TmpSecretKey string `json:"tmpSecretKey"`
		} `json:"credentials"`
		RequestID string `json:"requestId"`
		StartTime int    `json:"startTime"`
	} `json:"data"`
}

type UploadFinishResp

type UploadFinishResp struct {
	Data struct {
		NodeID   int64  `json:"node_id"`
		NodeName string `json:"node_name"`
		ParentID int64  `json:"parent_id"`
		QuqiID   int64  `json:"quqi_id"`
		TreeID   int64  `json:"tree_id"`
	} `json:"data"`
	Err int    `json:"err"`
	Msg string `json:"msg"`
}

type UploadInitResp

type UploadInitResp struct {
	Data struct {
		Bucket   string `json:"bucket"`
		Exist    bool   `json:"exist"`
		Key      string `json:"key"`
		TaskID   string `json:"task_id"`
		Token    string `json:"token"`
		UploadID string `json:"upload_id"`
		URL      string `json:"url"`
		NodeID   int64  `json:"node_id"`
		NodeName string `json:"node_name"`
		ParentID int64  `json:"parent_id"`
	} `json:"data"`
	Err int    `json:"err"`
	Msg string `json:"msg"`
}

type UrlExchangeResp

type UrlExchangeResp struct {
	BaseRes
	Data struct {
		Name               string `json:"name"`
		Mime               string `json:"mime"`
		Size               int64  `json:"size"`
		DownloadType       int    `json:"download_type"`
		ChannelType        int    `json:"channel_type"`
		ChannelID          int    `json:"channel_id"`
		Url                string `json:"url"`
		ExpiredTime        int64  `json:"expired_time"`
		IsEncrypted        bool   `json:"is_encrypted"`
		EncryptedSize      int64  `json:"encrypted_size"`
		EncryptedAlg       string `json:"encrypted_alg"`
		EncryptedKey       string `json:"encrypted_key"`
		PassportID         int64  `json:"passport_id"`
		RequestExpiredTime int64  `json:"request_expired_time"`
	} `json:"data"`
}

Jump to

Keyboard shortcuts

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