Documentation ¶
Index ¶
- Constants
- func CheckMandatoryS3Fields(settings *model.FileSettings) error
- type FileBackend
- type LocalFileBackend
- func (b *LocalFileBackend) AppendFile(fr io.Reader, path string) (int64, error)
- func (b *LocalFileBackend) CopyFile(oldPath, newPath string) error
- func (b *LocalFileBackend) FileExists(path string) (bool, error)
- func (b *LocalFileBackend) FileSize(path string) (int64, error)
- func (b *LocalFileBackend) ListDirectory(path string) (*[]string, error)
- func (b *LocalFileBackend) MoveFile(oldPath, newPath string) error
- func (b *LocalFileBackend) ReadFile(path string) ([]byte, error)
- func (b *LocalFileBackend) Reader(path string) (ReadCloseSeeker, error)
- func (b *LocalFileBackend) RemoveDirectory(path string) error
- func (b *LocalFileBackend) RemoveFile(path string) error
- func (b *LocalFileBackend) TestConnection() error
- func (b *LocalFileBackend) WriteFile(fr io.Reader, path string) (int64, error)
- type ReadCloseSeeker
- type S3FileBackend
- func (b *S3FileBackend) AppendFile(fr io.Reader, path string) (int64, error)
- func (b *S3FileBackend) CopyFile(oldPath, newPath string) error
- func (b *S3FileBackend) FileExists(path string) (bool, error)
- func (b *S3FileBackend) FileSize(path string) (int64, error)
- func (b *S3FileBackend) ListDirectory(path string) (*[]string, error)
- func (b *S3FileBackend) MoveFile(oldPath, newPath string) error
- func (b *S3FileBackend) ReadFile(path string) ([]byte, error)
- func (b *S3FileBackend) Reader(path string) (ReadCloseSeeker, error)
- func (b *S3FileBackend) RemoveDirectory(path string) error
- func (b *S3FileBackend) RemoveFile(path string) error
- func (b *S3FileBackend) TestConnection() error
- func (b *S3FileBackend) WriteFile(fr io.Reader, path string) (int64, error)
Constants ¶
View Source
const (
TEST_FILE_PATH = "/testfile"
)
Variables ¶
This section is empty.
Functions ¶
func CheckMandatoryS3Fields ¶
func CheckMandatoryS3Fields(settings *model.FileSettings) error
Types ¶
type FileBackend ¶
type FileBackend interface { TestConnection() error Reader(path string) (ReadCloseSeeker, error) ReadFile(path string) ([]byte, error) FileExists(path string) (bool, error) FileSize(path string) (int64, error) CopyFile(oldPath, newPath string) error MoveFile(oldPath, newPath string) error WriteFile(fr io.Reader, path string) (int64, error) AppendFile(fr io.Reader, path string) (int64, error) RemoveFile(path string) error ListDirectory(path string) (*[]string, error) RemoveDirectory(path string) error }
func NewFileBackend ¶
func NewFileBackend(settings *model.FileSettings, enableComplianceFeatures bool) (FileBackend, error)
type LocalFileBackend ¶
type LocalFileBackend struct {
// contains filtered or unexported fields
}
func (*LocalFileBackend) AppendFile ¶
func (*LocalFileBackend) CopyFile ¶
func (b *LocalFileBackend) CopyFile(oldPath, newPath string) error
func (*LocalFileBackend) FileExists ¶
func (b *LocalFileBackend) FileExists(path string) (bool, error)
func (*LocalFileBackend) ListDirectory ¶
func (b *LocalFileBackend) ListDirectory(path string) (*[]string, error)
func (*LocalFileBackend) MoveFile ¶
func (b *LocalFileBackend) MoveFile(oldPath, newPath string) error
func (*LocalFileBackend) ReadFile ¶
func (b *LocalFileBackend) ReadFile(path string) ([]byte, error)
func (*LocalFileBackend) Reader ¶
func (b *LocalFileBackend) Reader(path string) (ReadCloseSeeker, error)
func (*LocalFileBackend) RemoveDirectory ¶
func (b *LocalFileBackend) RemoveDirectory(path string) error
func (*LocalFileBackend) RemoveFile ¶
func (b *LocalFileBackend) RemoveFile(path string) error
func (*LocalFileBackend) TestConnection ¶
func (b *LocalFileBackend) TestConnection() error
type ReadCloseSeeker ¶
type ReadCloseSeeker interface { io.ReadCloser io.Seeker }
type S3FileBackend ¶
type S3FileBackend struct {
// contains filtered or unexported fields
}
S3FileBackend contains all necessary information to communicate with an AWS S3 compatible API backend.
func NewS3FileBackend ¶
func NewS3FileBackend(settings *model.FileSettings, enableComplianceFeatures bool) (*S3FileBackend, error)
NewS3FileBackend returns an instance of an S3FileBackend.
func (*S3FileBackend) AppendFile ¶
func (*S3FileBackend) CopyFile ¶
func (b *S3FileBackend) CopyFile(oldPath, newPath string) error
func (*S3FileBackend) FileExists ¶
func (b *S3FileBackend) FileExists(path string) (bool, error)
func (*S3FileBackend) ListDirectory ¶
func (b *S3FileBackend) ListDirectory(path string) (*[]string, error)
func (*S3FileBackend) MoveFile ¶
func (b *S3FileBackend) MoveFile(oldPath, newPath string) error
func (*S3FileBackend) Reader ¶
func (b *S3FileBackend) Reader(path string) (ReadCloseSeeker, error)
Caller must close the first return value
func (*S3FileBackend) RemoveDirectory ¶
func (b *S3FileBackend) RemoveDirectory(path string) error
func (*S3FileBackend) RemoveFile ¶
func (b *S3FileBackend) RemoveFile(path string) error
func (*S3FileBackend) TestConnection ¶
func (b *S3FileBackend) TestConnection() error
Click to show internal directories.
Click to hide internal directories.