github.com/hanks177/podman/v4@v4.1.3-0.20220613032544-16d90015bc83/pkg/domain/entities/volumes.go (about) 1 package entities 2 3 import ( 4 "net/url" 5 6 "github.com/hanks177/podman/v4/libpod/define" 7 ) 8 9 // VolumeCreateOptions provides details for creating volumes 10 // swagger:model 11 type VolumeCreateOptions struct { 12 // New volume's name. Can be left blank 13 Name string `schema:"name"` 14 // Volume driver to use 15 Driver string `schema:"driver"` 16 // User-defined key/value metadata. Provided for compatibility 17 Label map[string]string `schema:"label"` 18 // User-defined key/value metadata. Preferred field, will override Label 19 Labels map[string]string `schema:"labels"` 20 // Mapping of driver options and values. 21 Options map[string]string `schema:"opts"` 22 } 23 24 type VolumeConfigResponse struct { 25 define.InspectVolumeData 26 } 27 28 type VolumeRmOptions struct { 29 All bool 30 Force bool 31 Timeout *uint 32 } 33 34 type VolumeRmReport struct { 35 Err error 36 Id string // nolint 37 } 38 39 type VolumeInspectReport struct { 40 *VolumeConfigResponse 41 } 42 43 // VolumePruneOptions describes the options needed 44 // to prune a volume from the CLI 45 type VolumePruneOptions struct { 46 Filters url.Values `json:"filters" schema:"filters"` 47 } 48 49 type VolumeListOptions struct { 50 Filter map[string][]string 51 } 52 53 type VolumeListReport struct { 54 VolumeConfigResponse 55 } 56 57 /* 58 * Docker API compatibility types 59 */ 60 61 // VolumeMountReport describes the response from volume mount 62 type VolumeMountReport struct { 63 Err error 64 Id string // nolint 65 Name string 66 Path string 67 } 68 69 // VolumeUnmountReport describes the response from umounting a volume 70 type VolumeUnmountReport struct { 71 Err error 72 Id string // nolint 73 }