aliyundrive_share

package
v3.2.1 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2022 License: AGPL-3.0 Imports: 13 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 {
	RefreshToken string `json:"refresh_token" required:"true"`
	ShareId      string `json:"share_id" required:"true"`
	SharePwd     string `json:"share_pwd"`
	driver.RootID
	OrderBy        string `json:"order_by" type:"select" options:"name,size,updated_at,created_at"`
	OrderDirection string `json:"order_direction" type:"select" options:"ASC,DESC"`
}

type AliyundriveShare

type AliyundriveShare struct {
	model.Storage
	Addition
	AccessToken string
	ShareToken  string
	DriveId     string
	// contains filtered or unexported fields
}

func (*AliyundriveShare) Config

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

func (*AliyundriveShare) Copy

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

func (*AliyundriveShare) Drop

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

func (*AliyundriveShare) GetAddition

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

func (*AliyundriveShare) Init

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

func (*AliyundriveShare) List

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

func (*AliyundriveShare) MakeDir

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

func (*AliyundriveShare) Move

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

func (*AliyundriveShare) Put

func (*AliyundriveShare) Remove

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

func (*AliyundriveShare) Rename

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

type ErrorResp

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

type File

type File struct {
	DriveId      string    `json:"drive_id"`
	DomainId     string    `json:"domain_id"`
	FileId       string    `json:"file_id"`
	ShareId      string    `json:"share_id"`
	Name         string    `json:"name"`
	Type         string    `json:"type"`
	CreatedAt    time.Time `json:"created_at"`
	UpdatedAt    time.Time `json:"updated_at"`
	ParentFileId string    `json:"parent_file_id"`
	Size         int64     `json:"size"`
	Thumbnail    string    `json:"thumbnail"`
}

type ListResp

type ListResp struct {
	Items             []File `json:"items"`
	NextMarker        string `json:"next_marker"`
	PunishedFileCount int    `json:"punished_file_count"`
}

type ShareLinkResp added in v3.0.2

type ShareLinkResp struct {
	DownloadUrl string `json:"download_url"`
	Url         string `json:"url"`
	Thumbnail   string `json:"thumbnail"`
}

type ShareTokenResp

type ShareTokenResp struct {
	ShareToken string    `json:"share_token"`
	ExpireTime time.Time `json:"expire_time"`
	ExpiresIn  int       `json:"expires_in"`
}

Jump to

Keyboard shortcuts

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