storagetools

package
v0.0.0-...-86c6960 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2023 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HandleCatObject

func HandleCatObject(objectPath string, folder storage.Folder, decrypt, decompress bool)

func HandleCheckRead

func HandleCheckRead(folder storage.Folder, filenames []string)

func HandleCheckWrite

func HandleCheckWrite(folder storage.Folder)

func HandleDeleteObject

func HandleDeleteObject(objectPath string, folder storage.Folder)

func HandleFolderList

func HandleFolderList(folder storage.Folder, recursive bool)

func HandleGetObject

func HandleGetObject(objectPath, dstPath string, folder storage.Folder, decrypt, decompress bool)

func HandlePutObject

func HandlePutObject(localPath, dstPath string, uploader *internal.Uploader, overwrite, encrypt, compress bool)

func WriteObjectsList

func WriteObjectsList(objects []ListElement, output io.Writer) error

Types

type ListDirectory

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

func NewListDirectory

func NewListDirectory(folder storage.Folder, rootFolder storage.Folder) *ListDirectory

func (*ListDirectory) GetLastModified

func (ld *ListDirectory) GetLastModified() time.Time

func (*ListDirectory) GetName

func (ld *ListDirectory) GetName() string

func (*ListDirectory) GetSize

func (ld *ListDirectory) GetSize() int64

func (*ListDirectory) Type

func (ld *ListDirectory) Type() ListElementType

type ListElement

type ListElement interface {
	storage.Object
	Type() ListElementType
}

type ListElementType

type ListElementType string
const (
	Object    ListElementType = "obj"
	Directory ListElementType = "dir"
)

type ListObject

type ListObject struct {
	storage.Object
}

func NewListObject

func NewListObject(object storage.Object) *ListObject

func (*ListObject) Type

func (lo *ListObject) Type() ListElementType

Jump to

Keyboard shortcuts

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