github.com/containerd/nerdctl@v1.7.7/pkg/api/types/volume_types.go (about) 1 /* 2 Copyright The containerd Authors. 3 4 Licensed under the Apache License, Version 2.0 (the "License"); 5 you may not use this file except in compliance with the License. 6 You may obtain a copy of the License at 7 8 http://www.apache.org/licenses/LICENSE-2.0 9 10 Unless required by applicable law or agreed to in writing, software 11 distributed under the License is distributed on an "AS IS" BASIS, 12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 See the License for the specific language governing permissions and 14 limitations under the License. 15 */ 16 17 package types 18 19 import "io" 20 21 // VolumeCreateOptions specifies options for `nerdctl volume create`. 22 type VolumeCreateOptions struct { 23 Stdout io.Writer 24 GOptions GlobalCommandOptions 25 // Labels are the volume labels 26 Labels []string 27 } 28 29 // VolumeInspectOptions specifies options for `nerdctl volume inspect`. 30 type VolumeInspectOptions struct { 31 Stdout io.Writer 32 GOptions GlobalCommandOptions 33 // Format the output using the given go template 34 Format string 35 // Display the disk usage of volumes. Can be slow with volumes having loads of directories. 36 Size bool 37 } 38 39 // VolumeListOptions specifies options for `nerdctl volume ls`. 40 type VolumeListOptions struct { 41 Stdout io.Writer 42 GOptions GlobalCommandOptions 43 // Only display volume names 44 Quiet bool 45 // Format the output using the given go template 46 Format string 47 // Display the disk usage of volumes. Can be slow with volumes having loads of directories. 48 Size bool 49 // Filter matches volumes based on given conditions 50 Filters []string 51 } 52 53 // VolumePruneOptions specifies options for `nerdctl volume prune`. 54 type VolumePruneOptions struct { 55 Stdout io.Writer 56 GOptions GlobalCommandOptions 57 //Remove all unused volumes, not just anonymous ones 58 All bool 59 // Do not prompt for confirmation 60 Force bool 61 } 62 63 // VolumeRemoveOptions specifies options for `nerdctl volume rm`. 64 type VolumeRemoveOptions struct { 65 Stdout io.Writer 66 GOptions GlobalCommandOptions 67 // Force the removal of one or more volumes 68 Force bool 69 }