Documentation ¶
Index ¶
- Constants
- type FileManager
- func (fileManager FileManager) BackupDirectory(path string, writer io.Writer) error
- func (fileManager FileManager) GetFile(path string) (io.ReadCloser, error)
- func (fileManager FileManager) GetUploadWriter(path string, callbacks UploadCallBacks) (TarUploader, error)
- func (fileManager FileManager) UploadTar(path string, callbacks UploadCallBacks, reader io.Reader) error
- type IFileManager
- type LockType
- type TarUploader
- type UploadCallBacks
- type UploadLockObject
- type UploadObject
- type UploadType
- type Uploader
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) BackupDirectory ¶
func (fileManager FileManager) BackupDirectory(path string, writer io.Writer) error
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) GetUploadWriter ¶
func (fileManager FileManager) GetUploadWriter(path string, callbacks UploadCallBacks) (TarUploader, error)
func (FileManager) UploadTar ¶
func (fileManager FileManager) UploadTar(path string, callbacks UploadCallBacks, reader io.Reader) error
type IFileManager ¶
type IFileManager interface { GetFile(path string) (io.ReadCloser, error) GetUploadWriter(path string, callbacks UploadCallBacks) (TarUploader, error) BackupDirectory(path string, writer io.Writer) error UploadTar(path string, callbacks UploadCallBacks, reader io.Reader) error }
type TarUploader ¶
type UploadCallBacks ¶
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, callbacks UploadCallBacks) (TarUploader, error)
Click to show internal directories.
Click to hide internal directories.