Files
podman/pkg/domain/entities/volumes.go
Matt Heon 98876454cb Refactor volume import to support the remote client
As with `volume export`, this was coded up exclusively in cmd/
instead of in libpod. Move it into Libpod, add a REST endpoint,
add bindings, and now everything talks using the ContainerEngine
wiring.

Also similar to `volume export` this also makes things work much
better with volumes that require mounting - we can now guarantee
they're actually mounted, instead of just hoping.

Includes some refactoring of `volume export` as well, to simplify
its implementation and ensure both Import and Export work with
readers/writers, as opposed to just files.

Fixes #26409

Signed-off-by: Matt Heon <mheon@redhat.com>
2025-06-23 13:42:22 -04:00

57 lines
1.4 KiB
Go

package entities
import (
"io"
"net/url"
"github.com/containers/podman/v5/pkg/domain/entities/types"
)
// VolumeCreateOptions provides details for creating volumes
type VolumeCreateOptions = types.VolumeCreateOptions
type VolumeConfigResponse = types.VolumeConfigResponse
type VolumeRmOptions struct {
All bool
Force bool
Ignore bool
Timeout *uint
}
type VolumeRmReport = types.VolumeRmReport
type VolumeInspectReport = types.VolumeInspectReport
// 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 = types.VolumeListReport
// VolumeReloadReport describes the response from reload volume plugins
type VolumeReloadReport = types.VolumeReloadReport
// VolumeMountReport describes the response from volume mount
type VolumeMountReport = types.VolumeMountReport
// VolumeUnmountReport describes the response from umounting a volume
type VolumeUnmountReport = types.VolumeUnmountReport
// VolumeExportOptions describes the options required to export a volume.
type VolumeExportOptions struct {
Output io.Writer
}
// VolumeImportOptions describes the options required to import a volume
type VolumeImportOptions struct {
// Input will be closed upon being fully consumed
Input io.Reader
}