github.com/jogo/docker@v1.7.0-rc1/volume/volume.go (about)

     1  package volume
     2  
     3  const DefaultDriverName = "local"
     4  
     5  type Driver interface {
     6  	// Name returns the name of the volume driver.
     7  	Name() string
     8  	// Create makes a new volume with the given id.
     9  	Create(string) (Volume, error)
    10  	// Remove deletes the volume.
    11  	Remove(Volume) error
    12  }
    13  
    14  type Volume interface {
    15  	// Name returns the name of the volume
    16  	Name() string
    17  	// DriverName returns the name of the driver which owns this volume.
    18  	DriverName() string
    19  	// Path returns the absolute path to the volume.
    20  	Path() string
    21  	// Mount mounts the volume and returns the absolute path to
    22  	// where it can be consumed.
    23  	Mount() (string, error)
    24  	// Unmount unmounts the volume when it is no longer in use.
    25  	Unmount() error
    26  }