storagetools

package
v0.0.0-...-e89a0ad Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2024 License: Apache-2.0 Imports: 21 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) error

func HandleCheckRead

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

func HandleCheckWrite

func HandleCheckWrite(folder storage.Folder) error

func HandleDeleteObject

func HandleDeleteObject(objectPath string, folder storage.Folder) error

func HandleFolderList

func HandleFolderList(folder storage.Folder, recursive bool) error

func HandleGetObject

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

func HandlePutObject

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

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

type TransferHandler

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

func NewTransferHandler

func NewTransferHandler(sourceStorage, targetStorage string, cfg *TransferHandlerConfig) (*TransferHandler, error)

func (*TransferHandler) Handle

func (h *TransferHandler) Handle() error

type TransferHandlerConfig

type TransferHandlerConfig struct {
	Prefix                   string
	Overwrite                bool
	FailOnFirstErr           bool
	Concurrency              int
	MaxFiles                 int
	AppearanceChecks         uint
	AppearanceChecksInterval time.Duration
}

Jump to

Keyboard shortcuts

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