filecontainer

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LockTypeFileOnly LockType = 0
	LockTypeAll      LockType = 1

	UploadTypeTar UploadType = 0

	LocalTarName = "artifact.tar.gz"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type FileManager

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

func CreateFileManager

func CreateFileManager(storage storageabstraction.IFileStorage, logger log.Logger) *FileManager

func (FileManager) DoesFileExist

func (fileManager FileManager) DoesFileExist(path string)

func (FileManager) GetFile

func (fileManager FileManager) GetFile(path string) (io.ReadCloser, error)

GetFile returns an error or a stream of data which represent the requested file

func (FileManager) UploadTar

func (fileManager FileManager) UploadTar(path string) (io.WriteCloser, error)

type IFileManager

type IFileManager interface {
	GetFile(path string) (io.ReadCloser, error)
	UploadTar(path string) (io.WriteCloser, error)
}

type LockType

type LockType int

type UploadLockObject

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

type UploadObject

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

type UploadType

type UploadType int

type Uploader

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

func CreateUploader

func CreateUploader(rootDir string, logger log.Logger, fileStorage storageabstraction.IFileStorage) *Uploader

func (*Uploader) UploadTar

func (uploader *Uploader) UploadTar(rootPath string) (io.WriteCloser, error)

Jump to

Keyboard shortcuts

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