handler

package
v1.0.1-beta.3 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2021 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var FilesRepo = "files/"

Functions

func Copy

func Copy(ctx context.Context, r *http.Request) (interface{}, error)

Copy is to copy a file from remotePath to destPath in dStorage

func Delete

func Delete(ctx context.Context, r *http.Request) (interface{}, error)

Delete is to delete a file in dStorage

func Download

func Download(ctx context.Context, r *http.Request) (string, error)

Download is to download a file from dStorage

func GetPublicEncryptionKey

func GetPublicEncryptionKey(ctx context.Context, r *http.Request) (interface{}, error)

func Move

func Move(ctx context.Context, r *http.Request) (interface{}, error)

Move is to move file in dStorage

func PrintError

func PrintError(v ...interface{})

PrintError is to print error

func Rename

func Rename(ctx context.Context, r *http.Request) (interface{}, error)

Rename is to rename file in dStorage

func Share

func Share(ctx context.Context, r *http.Request) (interface{}, error)

Share is to share file in dStorage

func Stream

func Stream(w http.ResponseWriter, r *http.Request) (string, error)

Download is to download a file from dStorage

func Upload

func Upload(ctx context.Context, r *http.Request) (interface{}, error)

Upload is to upload file to dStorage

Types

type StatusBar

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

StatusBar is to check status of any operation

func (*StatusBar) CommitMetaCompleted

func (s *StatusBar) CommitMetaCompleted(request, response string, err error)

CommitMetaCompleted when commit meta completes

func (*StatusBar) Completed

func (s *StatusBar) Completed(allocationID, filePath string, filename string, mimetype string, size int, op int)

Completed for statusBar

func (*StatusBar) Error

func (s *StatusBar) Error(allocationID string, filePath string, op int, err error)

Error for statusBar

func (*StatusBar) InProgress

func (s *StatusBar) InProgress(allocationID, filePath string, op int, completedBytes int, bytes []byte)

InProgress for statusBar

func (*StatusBar) RepairCompleted

func (s *StatusBar) RepairCompleted(filesRepaired int)

RepairCompleted when repair is completed

func (*StatusBar) Started

func (s *StatusBar) Started(allocationID, filePath string, op int, totalBytes int)

Started for statusBar

Jump to

Keyboard shortcuts

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