mirror of
https://github.com/openziti/zrok.git
synced 2024-11-23 00:23:48 +01:00
28 lines
600 B
Go
28 lines
600 B
Go
package sync
|
|
|
|
import (
|
|
"io"
|
|
"os"
|
|
"time"
|
|
)
|
|
|
|
type Object struct {
|
|
Path string
|
|
IsDir bool
|
|
Size int64
|
|
Modified time.Time
|
|
ETag string
|
|
}
|
|
|
|
type Target interface {
|
|
Inventory() ([]*Object, error)
|
|
Dir(path string) ([]*Object, error)
|
|
Mkdir(path string) error
|
|
ReadStream(path string) (io.ReadCloser, error)
|
|
WriteStream(path string, stream io.Reader, mode os.FileMode) error
|
|
WriteStreamWithModTime(path string, stream io.Reader, mode os.FileMode, modTime time.Time) error
|
|
Move(src, dest string) error
|
|
Rm(path string) error
|
|
SetModificationTime(path string, mtime time.Time) error
|
|
}
|