aliyundrive_open

package
v0.0.0-...-c590095 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Name = "AliyundriveOpen"

Functions

This section is empty.

Types

type Addition

type Addition struct {
	RootFolderID   string `json:"root_folder_if" required:"true"`
	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"`
	OauthTokenURL  string `json:"oauth_token_url" default:"https://api.nn.ci/alist/ali_open/token"`
	ClientID       string `json:"client_id" required:"false" help:"Keep it empty if you don't have one"`
	ClientSecret   string `json:"client_secret" required:"false" help:"Keep it empty if you don't have one"`
	RemoveWay      string `json:"remove_way" required:"true" type:"select" options:"trash,delete"`
	InternalUpload bool   `json:"internal_upload" help:"If you are using Aliyun ECS in Beijing, you can turn it on to boost the upload speed"`
}

type AliyundriveOpen

type AliyundriveOpen struct {
	Addition

	AccessToken string
	DriveId     string
	// contains filtered or unexported fields
}

func New

func New() *AliyundriveOpen

func (*AliyundriveOpen) Config

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

func (*AliyundriveOpen) Copy

func (d *AliyundriveOpen) Copy(ctx context.Context, srcObj, dstDir driver.AbstractDriverFile) error

func (*AliyundriveOpen) Drop

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

func (*AliyundriveOpen) GetAddition

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

func (*AliyundriveOpen) Init

func (d *AliyundriveOpen) Init(ctx context.Context) error

func (*AliyundriveOpen) List

func (*AliyundriveOpen) MakeDir

func (d *AliyundriveOpen) MakeDir(ctx context.Context, parentDir driver.AbstractDriverFile, dirName string) error

func (*AliyundriveOpen) Move

func (d *AliyundriveOpen) Move(ctx context.Context, srcObj, dstDir driver.AbstractDriverFile) error

func (*AliyundriveOpen) Other

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

func (*AliyundriveOpen) Put

func (*AliyundriveOpen) Remove

func (*AliyundriveOpen) Rename

func (d *AliyundriveOpen) Rename(ctx context.Context, srcObj driver.AbstractDriverFile, newName string) error

type CreateResp

type CreateResp struct {
	//Type         string `json:"type"`
	//ParentFileId string `json:"parent_file_id"`
	//DriveId      string `json:"drive_id"`
	FileId string `json:"file_id"`
	//RevisionId   string `json:"revision_id"`
	//EncryptMode  string `json:"encrypt_mode"`
	//DomainId     string `json:"domain_id"`
	//FileName     string `json:"file_name"`
	UploadId string `json:"upload_id"`
	//Location     string `json:"location"`
	RapidUpload  bool `json:"rapid_upload"`
	PartInfoList []struct {
		Etag        interface{} `json:"etag"`
		PartNumber  int         `json:"part_number"`
		PartSize    interface{} `json:"part_size"`
		UploadUrl   string      `json:"upload_url"`
		ContentType string      `json:"content_type"`
	} `json:"part_info_list"`
}

type ErrResp

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

type File

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

type Files

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

Jump to

Keyboard shortcuts

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