summaryrefslogtreecommitdiff
path: root/pkg/domain/entities/volumes.go
blob: 9a06b2238915715d677bf589727bb3d455a9c9ae (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
package entities

import (
	"net/url"

	"github.com/containers/podman/v4/libpod/define"
)

// VolumeCreateOptions provides details for creating volumes
// swagger:model
type VolumeCreateOptions struct {
	// New volume's name. Can be left blank
	Name string `schema:"name"`
	// Volume driver to use
	Driver string `schema:"driver"`
	// User-defined key/value metadata. Provided for compatibility
	Label map[string]string `schema:"label"`
	// User-defined key/value metadata. Preferred field, will override Label
	Labels map[string]string `schema:"labels"`
	// Mapping of driver options and values.
	Options map[string]string `schema:"opts"`
}

type VolumeConfigResponse struct {
	define.InspectVolumeData
}

type VolumeRmOptions struct {
	All     bool
	Force   bool
	Timeout *uint
}

type VolumeRmReport struct {
	Err error
	Id  string //nolint:revive,stylecheck
}

type VolumeInspectReport struct {
	*VolumeConfigResponse
}

// VolumePruneOptions describes the options needed
// to prune a volume from the CLI
type VolumePruneOptions struct {
	Filters url.Values `json:"filters" schema:"filters"`
}

type VolumeListOptions struct {
	Filter map[string][]string
}

type VolumeListReport struct {
	VolumeConfigResponse
}

// VolumeReloadReport describes the response from reload volume plugins
type VolumeReloadReport struct {
	define.VolumeReload
}

/*
 * Docker API compatibility types
 */

// VolumeMountReport describes the response from volume mount
type VolumeMountReport struct {
	Err  error
	Id   string //nolint:revive,stylecheck
	Name string
	Path string
}

// VolumeUnmountReport describes the response from umounting a volume
type VolumeUnmountReport struct {
	Err error
	Id  string //nolint:revive,stylecheck
}