aliyundrive_open

package
v3.35.0 Latest Latest
Warning

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

Go to latest
Published: May 23, 2024 License: AGPL-3.0 Imports: 22 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 {
	DriveType string `json:"drive_type" type:"select" options:"default,resource,backup" default:"default"`
	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"`
	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"`
	RapidUpload        bool   `` /* 134-byte string literal not displayed */
	InternalUpload     bool   `json:"internal_upload" help:"If you are using Aliyun ECS is located in Beijing, you can turn it on to boost the upload speed"`
	LIVPDownloadFormat string `json:"livp_download_format" type:"select" options:"jpeg,mov" default:"jpeg"`
	AccessToken        string
}

type AliyundriveOpen

type AliyundriveOpen struct {
	model.Storage
	Addition

	DriveId string
	// contains filtered or unexported fields
}

func (*AliyundriveOpen) Config

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

func (*AliyundriveOpen) Copy

func (d *AliyundriveOpen) Copy(ctx context.Context, srcObj, dstDir model.Obj) 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 (d *AliyundriveOpen) Link(ctx context.Context, file model.Obj, args model.LinkArgs) (*model.Link, error)

func (*AliyundriveOpen) List

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

func (*AliyundriveOpen) MakeDir

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

func (*AliyundriveOpen) Move

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

func (*AliyundriveOpen) Other

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

func (*AliyundriveOpen) Put

func (*AliyundriveOpen) Remove

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

func (*AliyundriveOpen) Rename

func (d *AliyundriveOpen) Rename(ctx context.Context, srcObj model.Obj, newName string) (model.Obj, 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 []PartInfo `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"`

	// create only
	FileName string `json:"file_name"`
}

type Files

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

type MoveOrCopyResp added in v3.26.0

type MoveOrCopyResp struct {
	Exist   bool   `json:"exist"`
	DriveID string `json:"drive_id"`
	FileID  string `json:"file_id"`
}

type PartInfo added in v3.15.1

type PartInfo 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"`
}

type ProofRange added in v3.22.0

type ProofRange struct {
	Start int64
	End   int64
}

Jump to

Keyboard shortcuts

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