backend.go 850 B

1234567891011121314151617181920
  1. package volume // import "github.com/docker/docker/api/server/router/volume"
  2. import (
  3. "context"
  4. "github.com/docker/docker/volume/service/opts"
  5. // TODO return types need to be refactored into pkg
  6. "github.com/docker/docker/api/types"
  7. "github.com/docker/docker/api/types/filters"
  8. )
  9. // Backend is the methods that need to be implemented to provide
  10. // volume specific functionality
  11. type Backend interface {
  12. List(ctx context.Context, filter filters.Args) ([]*types.Volume, []string, error)
  13. Get(ctx context.Context, name string, opts ...opts.GetOption) (*types.Volume, error)
  14. Create(ctx context.Context, name, driverName string, opts ...opts.CreateOption) (*types.Volume, error)
  15. Remove(ctx context.Context, name string, opts ...opts.RemoveOption) error
  16. Prune(ctx context.Context, pruneFilters filters.Args) (*types.VolumesPruneReport, error)
  17. }