github.com/slava-ustovytski/docker@v1.8.2-rc1/volume/drivers/api.go (about) 1 //go:generate pluginrpc-gen -i $GOFILE -o proxy.go -type VolumeDriver -name VolumeDriver 2 3 package volumedrivers 4 5 import "github.com/docker/docker/volume" 6 7 func NewVolumeDriver(name string, c client) volume.Driver { 8 proxy := &volumeDriverProxy{c} 9 return &volumeDriverAdapter{name, proxy} 10 } 11 12 type VolumeDriver interface { 13 // Create a volume with the given name 14 Create(name string) (err error) 15 // Remove the volume with the given name 16 Remove(name string) (err error) 17 // Get the mountpoint of the given volume 18 Path(name string) (mountpoint string, err error) 19 // Mount the given volume and return the mountpoint 20 Mount(name string) (mountpoint string, err error) 21 // Unmount the given volume 22 Unmount(name string) (err error) 23 }