2018-02-05 16:05:59 -05:00
|
|
|
package volume // import "github.com/docker/docker/api/server/router/volume"
|
2015-11-02 19:26:45 -05:00
|
|
|
|
|
|
|
import (
|
2018-04-19 18:30:59 -04:00
|
|
|
"context"
|
2017-04-11 15:52:33 -04:00
|
|
|
|
2018-03-22 17:11:03 -04:00
|
|
|
"github.com/docker/docker/volume/service/opts"
|
2015-11-02 19:26:45 -05:00
|
|
|
// TODO return types need to be refactored into pkg
|
2016-09-06 14:46:37 -04:00
|
|
|
"github.com/docker/docker/api/types"
|
2016-11-17 00:46:37 -05:00
|
|
|
"github.com/docker/docker/api/types/filters"
|
2015-11-02 19:26:45 -05:00
|
|
|
)
|
|
|
|
|
|
|
|
// Backend is the methods that need to be implemented to provide
|
|
|
|
// volume specific functionality
|
|
|
|
type Backend interface {
|
2018-03-22 17:11:03 -04:00
|
|
|
List(ctx context.Context, filter filters.Args) ([]*types.Volume, []string, error)
|
|
|
|
Get(ctx context.Context, name string, opts ...opts.GetOption) (*types.Volume, error)
|
|
|
|
Create(ctx context.Context, name, driverName string, opts ...opts.CreateOption) (*types.Volume, error)
|
|
|
|
Remove(ctx context.Context, name string, opts ...opts.RemoveOption) error
|
|
|
|
Prune(ctx context.Context, pruneFilters filters.Args) (*types.VolumesPruneReport, error)
|
2015-11-02 19:26:45 -05:00
|
|
|
}
|