cloudreve

package
v3.35.3-8Mi Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2024 License: AGPL-3.0 Imports: 18 Imported by: 0

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"`
	Password                 string `json:"password"`
	Cookie                   string `json:"cookie"`
	CustomUA                 string `json:"custom_ua"`
	EnableThumbAndFolderSize bool   `json:"enable_thumb_and_folder_size"`
}

type Cloudreve

type Cloudreve struct {
	model.Storage
	Addition
}

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) GetThumb

func (d *Cloudreve) GetThumb(file Object) (model.Thumbnail, error)

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 Config

type Config struct {
	LoginCaptcha bool   `json:"loginCaptcha"`
	CaptchaType  string `json:"captcha_type"`
}

type DirectoryProp

type DirectoryProp struct {
	Size int `json:"size"`
}

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