cloudreve

package
v3.10.1 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2023 License: AGPL-3.0 Imports: 14 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 {
	// Usually one of two
	driver.RootPath
	// define other
	Address  string `json:"address" required:"true"`
	Username string `json:"username" required:"true"`
	Password string `json:"password" required:"true"`
}

type Cloudreve

type Cloudreve struct {
	model.Storage
	Addition
	Cookie string
}

func (*Cloudreve) Config

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

func (*Cloudreve) Copy

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

func (*Cloudreve) Drop

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

func (*Cloudreve) GetAddition

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

func (*Cloudreve) Init

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

func (*Cloudreve) List

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

func (*Cloudreve) MakeDir

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

func (*Cloudreve) Move

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

func (*Cloudreve) Put

func (d *Cloudreve) Put(ctx context.Context, dstDir model.Obj, stream model.FileStreamer, up driver.UpdateProgress) error

func (*Cloudreve) Remove

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

func (*Cloudreve) Rename

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

type DirectoryResp

type DirectoryResp struct {
	Parent  string   `json:"parent"`
	Objects []Object `json:"objects"`
	Policy  Policy   `json:"policy"`
}

type Object

type Object struct {
	Id            string    `json:"id"`
	Name          string    `json:"name"`
	Path          string    `json:"path"`
	Pic           string    `json:"pic"`
	Size          int       `json:"size"`
	Type          string    `json:"type"`
	Date          time.Time `json:"date"`
	CreateDate    time.Time `json:"create_date"`
	SourceEnabled bool      `json:"source_enabled"`
}

type Policy

type Policy struct {
	Id       string   `json:"id"`
	Name     string   `json:"name"`
	Type     string   `json:"type"`
	MaxSize  int      `json:"max_size"`
	FileType []string `json:"file_type"`
}

type Resp

type Resp struct {
	Code int         `json:"code"`
	Msg  string      `json:"msg"`
	Data interface{} `json:"data"`
}

type UploadInfo

type UploadInfo struct {
	SessionID string `json:"sessionID"`
	ChunkSize int    `json:"chunkSize"`
	Expires   int    `json:"expires"`
}

Jump to

Keyboard shortcuts

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