2015-11-03 00:26:45 +00:00
|
|
|
package volume
|
|
|
|
|
|
|
|
import (
|
2017-04-11 19:52:33 +00:00
|
|
|
"golang.org/x/net/context"
|
|
|
|
|
2015-11-03 00:26:45 +00:00
|
|
|
// TODO return types need to be refactored into pkg
|
2016-09-06 18:46:37 +00:00
|
|
|
"github.com/docker/docker/api/types"
|
2016-11-17 05:46:37 +00:00
|
|
|
"github.com/docker/docker/api/types/filters"
|
2015-11-03 00:26:45 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
// Backend is the methods that need to be implemented to provide
|
|
|
|
// volume specific functionality
|
|
|
|
type Backend interface {
|
2015-09-23 20:29:14 +00:00
|
|
|
Volumes(filter string) ([]*types.Volume, []string, error)
|
2015-11-03 00:26:45 +00:00
|
|
|
VolumeInspect(name string) (*types.Volume, error)
|
2016-03-16 21:52:34 +00:00
|
|
|
VolumeCreate(name, driverName string, opts, labels map[string]string) (*types.Volume, error)
|
2016-06-10 14:40:09 +00:00
|
|
|
VolumeRm(name string, force bool) error
|
2017-04-11 19:52:33 +00:00
|
|
|
VolumesPrune(ctx context.Context, pruneFilters filters.Args) (*types.VolumesPruneReport, error)
|
2015-11-03 00:26:45 +00:00
|
|
|
}
|