fs

package
v0.0.0-...-14e102d Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2025 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CopyTaskOption

type CopyTaskOption struct {
	SrcPath  string `json:"src_path"`
	DstPath  string `json:"dst_path"`
	Override bool   `json:"override"`
}

func (*CopyTaskOption) Execute

func (opt *CopyTaskOption) Execute(task runner.Task, fs FS) error

func (*CopyTaskOption) String

func (opt *CopyTaskOption) String() string

type DownloadTask

type DownloadTask struct {
	Path   string    `json:"path"`
	Writer io.Writer `json:"file"`
}

func (*DownloadTask) Execute

func (opt *DownloadTask) Execute(task runner.Task, fs FS) error

func (*DownloadTask) String

func (opt *DownloadTask) String() string

type FS

type FS interface {
	driver.FS
	GetFS(string) (driver.FS, string, error)
	GetRepo(string) *pb.Repo
	CreateRepo(*pb.Repo)
	UpdateRepo(*pb.Repo, *pb.Repo)
	DeleteRepo(*pb.Repo)
	SubmitTask(TaskOption) runner.Task
}

func New

func New(app *app.App) FS

type MoveTaskOption

type MoveTaskOption struct {
	SrcPath  string `json:"src_path"`
	DstPath  string `json:"dst_path"`
	Override bool   `json:"override"`
}

func (*MoveTaskOption) Execute

func (opt *MoveTaskOption) Execute(task runner.Task, fs FS) error

func (*MoveTaskOption) String

func (opt *MoveTaskOption) String() string

type RemoveTaskOption

type RemoveTaskOption struct {
	Path string `json:"path"`
}

func (*RemoveTaskOption) Execute

func (opt *RemoveTaskOption) Execute(task runner.Task, fs FS) error

func (*RemoveTaskOption) String

func (opt *RemoveTaskOption) String() string

type Task

type Task interface {
	Run() error
}

type TaskOption

type TaskOption interface {
	String() string
	Execute(runner.Task, FS) error
}

type UploadTask

type UploadTask struct {
	Path     string    `json:"path"`
	Size     int64     `json:"size"`
	Filename string    `json:"filename"`
	Reader   io.Reader `json:"reader"`
}

func (*UploadTask) Execute

func (opt *UploadTask) Execute(task runner.Task, fs FS) error

func (*UploadTask) String

func (opt *UploadTask) String() string

Jump to

Keyboard shortcuts

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