github.com/docker/docker@v299999999.0.0-20200612211812-aaf470eca7b5+incompatible/api/server/router/volume/backend.go (about)

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