aliyundrive

package
v3.9.2 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2023 License: AGPL-3.0 Imports: 23 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
	RefreshToken   string `json:"refresh_token" required:"true"`
	OrderBy        string `json:"order_by" type:"select" options:"name,size,updated_at,created_at"`
	OrderDirection string `json:"order_direction" type:"select" options:"ASC,DESC"`
	RapidUpload    bool   `json:"rapid_upload"`
}

type AliDrive

type AliDrive struct {
	model.Storage
	Addition
	AccessToken string

	DriveId string
	// contains filtered or unexported fields
}

func (*AliDrive) Config

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

func (*AliDrive) Copy

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

func (*AliDrive) Drop

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

func (*AliDrive) GetAddition

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

func (*AliDrive) Init

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

func (*AliDrive) List

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

func (*AliDrive) MakeDir

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

func (*AliDrive) Move

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

func (*AliDrive) Other

func (d *AliDrive) Other(ctx context.Context, args model.OtherArgs) (interface{}, error)

func (*AliDrive) Put

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

func (*AliDrive) Remove

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

func (*AliDrive) Rename

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

type File

type File struct {
	DriveId       string     `json:"drive_id"`
	CreatedAt     *time.Time `json:"created_at"`
	FileExtension string     `json:"file_extension"`
	FileId        string     `json:"file_id"`
	Type          string     `json:"type"`
	Name          string     `json:"name"`
	Category      string     `json:"category"`
	ParentFileId  string     `json:"parent_file_id"`
	UpdatedAt     time.Time  `json:"updated_at"`
	Size          int64      `json:"size"`
	Thumbnail     string     `json:"thumbnail"`
	Url           string     `json:"url"`
}

type Files

type Files struct {
	Items      []File `json:"items"`
	NextMarker string `json:"next_marker"`
}

type RespErr

type RespErr struct {
	Code    string `json:"code"`
	Message string `json:"message"`
}

type UploadResp

type UploadResp struct {
	FileId       string `json:"file_id"`
	UploadId     string `json:"upload_id"`
	PartInfoList []struct {
		UploadUrl string `json:"upload_url"`
	} `json:"part_info_list"`

	RapidUpload bool `json:"rapid_upload"`
}

Jump to

Keyboard shortcuts

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