backend.go 661 B

12345678910111213141516171819
  1. package volume
  2. import (
  3. "golang.org/x/net/context"
  4. // TODO return types need to be refactored into pkg
  5. "github.com/docker/docker/api/types"
  6. "github.com/docker/docker/api/types/filters"
  7. )
  8. // Backend is the methods that need to be implemented to provide
  9. // volume specific functionality
  10. type Backend interface {
  11. Volumes(filter string) ([]*types.Volume, []string, error)
  12. VolumeInspect(name string) (*types.Volume, error)
  13. VolumeCreate(name, driverName string, opts, labels map[string]string) (*types.Volume, error)
  14. VolumeRm(name string, force bool) error
  15. VolumesPrune(ctx context.Context, pruneFilters filters.Args) (*types.VolumesPruneReport, error)
  16. }