Adam Štrauch
bc50cb1105
* full implementation of snapshots * tests of the snapshot backend * Drone CI pipeline * New snapshots handlers * Filesystem driver * S3 driver
23 lines
616 B
Go
23 lines
616 B
Go
package drivers
|
|
|
|
// DriverInterface defined methods every storage driver needs to implement
|
|
type DriverInterface interface {
|
|
// Create creates a new object in the storage from given file name
|
|
Create(key string, filePath string) error
|
|
|
|
// Write writes content of body into key
|
|
Write(key string, body []byte) error
|
|
|
|
// Get returns content of given key
|
|
Get(key string, filePath string) error
|
|
|
|
// Read returns content of given key
|
|
Read(key string) ([]byte, error)
|
|
|
|
// List returns list of objects in fiven prefix
|
|
List(prefix string) ([]string, error)
|
|
|
|
// Delete deletes one object
|
|
Delete(key string) error
|
|
}
|