aliyundrive

package
v3.33.0 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2024 License: AGPL-3.0 Imports: 30 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewPrivateKey added in v3.11.0

func NewPrivateKey() (*ecdsa.PrivateKey, error)

func NewPrivateKeyFromBytes added in v3.11.0

func NewPrivateKeyFromBytes(priv []byte) *ecdsa.PrivateKey

func NewPrivateKeyFromHex added in v3.11.0

func NewPrivateKeyFromHex(hex_ string) (*ecdsa.PrivateKey, error)

func PrivateKeyToBytes added in v3.11.0

func PrivateKeyToBytes(private *ecdsa.PrivateKey) []byte

func PrivateKeyToHex added in v3.11.0

func PrivateKeyToHex(private *ecdsa.PrivateKey) string

func PublicKeyToBytes added in v3.11.0

func PublicKeyToBytes(public *ecdsa.PublicKey) []byte

func PublicKeyToHex added in v3.11.0

func PublicKeyToHex(public *ecdsa.PublicKey) string

Types

type Addition

type Addition struct {
	driver.RootID
	RefreshToken string `json:"refresh_token" required:"true"`
	//DeviceID       string `json:"device_id" 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"`
	InternalUpload bool   `json:"internal_upload"`
}

type AliDrive

type AliDrive struct {
	model.Storage
	Addition
	AccessToken string

	DriveId string
	UserID  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, streamer 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 State added in v3.11.0

type State struct {
	// contains filtered or unexported fields
}

type UploadResp

type UploadResp struct {
	FileId       string `json:"file_id"`
	UploadId     string `json:"upload_id"`
	PartInfoList []struct {
		UploadUrl         string `json:"upload_url"`
		InternalUploadUrl string `json:"internal_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