chunk

package
v4.1.7 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2025 License: AGPL-3.0 Imports: 20 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 {
	RemotePath         string `json:"remote_path" required:"true"`
	PartSize           int64  `json:"part_size" required:"true" type:"number" help:"bytes"`
	ChunkLargeFileOnly bool   `json:"chunk_large_file_only" default:"false" help:"chunk only if file size > part_size"`
	ChunkPrefix        string `json:"chunk_prefix" type:"string" default:"[openlist_chunk]" help:"the prefix of chunk folder"`
	CustomExt          string `json:"custom_ext" type:"string"`
	StoreHash          bool   `json:"store_hash" type:"bool" default:"true"`
	NumListWorkers     int    `json:"num_list_workers" required:"true" type:"number" default:"5"`

	Thumbnail  bool `json:"thumbnail" required:"true" default:"false" help:"enable thumbnail which pre-generated under .thumbnails folder"`
	ShowHidden bool `json:"show_hidden"  default:"true" required:"false" help:"show hidden directories and files"`
}

type Chunk

type Chunk struct {
	model.Storage
	Addition
}

func (*Chunk) Config

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

func (*Chunk) Copy

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

func (*Chunk) Drop

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

func (*Chunk) Get

func (d *Chunk) Get(ctx context.Context, path string) (model.Obj, error)

func (*Chunk) GetAddition

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

func (*Chunk) GetDetails

func (d *Chunk) GetDetails(ctx context.Context) (*model.StorageDetails, error)

func (*Chunk) Init

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

func (*Chunk) List

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

func (*Chunk) MakeDir

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

func (*Chunk) Move

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

func (*Chunk) Put

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

func (*Chunk) Remove

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

func (*Chunk) Rename

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

Jump to

Keyboard shortcuts

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