aliyundrive_share

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: 15 Imported by: 1

Documentation

Index

Constants

View Source
const (
	// CanaryHeaderKey CanaryHeaderValue for lifting rate limit restrictions
	CanaryHeaderKey   = "X-Canary"
	CanaryHeaderValue = "client=web,app=share,version=v2.3.1"
)

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) 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) 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) Other added in v3.12.0

func (d *AliyundriveShare) Other(ctx context.Context, args model.OtherArgs) (interface{}, 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