1
0
Fork 0
mirror of https://github.com/Luzifer/s3sync.git synced 2024-10-18 06:24:20 +00:00
s3sync/pkg/fsprovider/interface.go
Knut Ahlers 627fe09bac
Breaking: Refactor, update deps, add MinIO support
- Drop MD5 checksumming
- Replace logging to stdout
- Add Endpoint flag for MinIO support
- Switch to Go modules support

Signed-off-by: Knut Ahlers <knut@ahlers.me>
2023-06-09 16:56:51 +02:00

26 lines
620 B
Go

// Package fsprovider contains implementations for filesystem access
// to read files from / write files to
package fsprovider
import (
"io"
"time"
)
type (
// File contains metadata about the file to be copied
File struct {
Filename string
LastModified time.Time
Size int64
}
// Provider describes the implementation of a fsprovider
Provider interface {
WriteFile(path string, content io.Reader, public bool) error
ReadFile(path string) (io.ReadCloser, error)
ListFiles(prefix string) ([]File, error)
DeleteFile(path string) error
GetAbsolutePath(path string) (string, error)
}
)