aboutsummaryrefslogtreecommitdiff
path: root/pkg/domain/entities/system.go
blob: 49f0c232335877810ae7e0c91e732635e3f1b922 (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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
package entities

import (
	"time"

	"github.com/containers/podman/v3/libpod/define"
	"github.com/containers/podman/v3/pkg/domain/entities/reports"
	"github.com/containers/podman/v3/pkg/domain/entities/types"
)

// ServiceOptions provides the input for starting an API and sidecar pprof services
type ServiceOptions struct {
	CorsHeaders string        // Cross-Origin Resource Sharing (CORS) headers
	PProfAddr   string        // Network address to bind pprof profiles service
	Timeout     time.Duration // Duration of inactivity the service should wait before shutting down
	URI         string        // Path to unix domain socket service should listen on
}

// SystemPruneOptions provides options to prune system.
type SystemPruneOptions struct {
	All     bool
	Volume  bool
	Filters map[string][]string `json:"filters" schema:"filters"`
}

// SystemPruneReport provides report after system prune is executed.
type SystemPruneReport struct {
	PodPruneReport        []*PodPruneReport
	ContainerPruneReports []*reports.PruneReport
	ImagePruneReports     []*reports.PruneReport
	VolumePruneReports    []*reports.PruneReport
	ReclaimedSpace        uint64
}

// SystemMigrateOptions describes the options needed for the
// cli to migrate runtimes of containers
type SystemMigrateOptions struct {
	NewRuntime string
}

// SystemDfOptions describes the options for getting df information
type SystemDfOptions struct {
	Format  string
	Verbose bool
}

// SystemDfReport describes the response for df information
type SystemDfReport struct {
	Images     []*SystemDfImageReport
	Containers []*SystemDfContainerReport
	Volumes    []*SystemDfVolumeReport
}

// SystemDfImageReport describes an image for use with df
type SystemDfImageReport struct {
	Repository string
	Tag        string
	ImageID    string
	Created    time.Time
	Size       int64
	SharedSize int64
	UniqueSize int64
	Containers int
}

// SystemDfContainerReport describes a container for use with df
type SystemDfContainerReport struct {
	ContainerID  string
	Image        string
	Command      []string
	LocalVolumes int
	Size         int64
	RWSize       int64
	Created      time.Time
	Status       string
	Names        string
}

// SystemDfVolumeReport describes a volume and its size
type SystemDfVolumeReport struct {
	VolumeName      string
	Links           int
	Size            int64
	ReclaimableSize int64
}

// SystemResetOptions describes the options for resetting your
// container runtime storage, etc
type SystemResetOptions struct {
	Force bool
}

// SystemVersionReport describes version information about the running Podman service
type SystemVersionReport struct {
	// Always populated
	Client *define.Version `json:",omitempty"`
	// May be populated, when in tunnel mode
	Server *define.Version `json:",omitempty"`
}

// SystemUnshareOptions describes the options for the unshare command
type SystemUnshareOptions struct {
	RootlessNetNS bool
}

type ComponentVersion struct {
	types.Version
}

// ListRegistriesReport is the report when querying for a sorted list of
// registries which may be contacted during certain operations.
type ListRegistriesReport struct {
	Registries []string
}

// swagger:model AuthConfig
type AuthConfig struct {
	types.AuthConfig
}

// AuthReport describes the response for authentication check
type AuthReport struct {
	IdentityToken string
	Status        string
}