types

package
v5.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 17, 2024 License: Apache-2.0 Imports: 12 Imported by: 1

Documentation

Overview

copied from github.com/docker/docker/api/types

copied from github.com/docker/docker/api/types

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthConfig

type AuthConfig struct {
	Username string `json:"username,omitempty"`
	Password string `json:"password,omitempty"`
	Auth     string `json:"auth,omitempty"`

	// Email is an optional value associated with the username.
	// This field is deprecated and will be removed in a later
	// version of docker.
	Email string `json:"email,omitempty"`

	ServerAddress string `json:"serveraddress,omitempty"`

	// IdentityToken is used to authenticate the user and get
	// an access token for the registry.
	IdentityToken string `json:"identitytoken,omitempty"`

	// RegistryToken is a bearer token to be sent to a registry
	RegistryToken string `json:"registrytoken,omitempty"`
}

AuthConfig contains authorization information for connecting to a Registry swagger:model

type AuthReport

type AuthReport struct {
	IdentityToken string
	Status        string
}

AuthReport describes the response for authentication check

type BuildOptions

type BuildOptions struct {
	buildahDefine.BuildOptions
	ContainerFiles []string
	FarmBuildOptions
	// Files that need to be closed after the build
	// so need to pass this to the main build functions
	LogFileToClose *os.File
	TmpDirToClose  string
}

BuildOptions describe the options for building container images.

type BuildReport

type BuildReport struct {
	// ID of the image.
	ID string
	// Format to save the image in
	SaveFormat string
}

BuildReport is the image-build report.

type CheckpointReport

type CheckpointReport struct {
	Err             error                                   `json:"-"`
	Id              string                                  `json:"Id"` //nolint:revive,stylecheck
	RawInput        string                                  `json:"-"`
	RuntimeDuration int64                                   `json:"runtime_checkpoint_duration"`
	CRIUStatistics  *define.CRIUCheckpointRestoreStatistics `json:"criu_statistics"`
}

type ComponentVersion

type ComponentVersion struct {
	Name    string
	Version string
	Details map[string]string `json:",omitempty"`
}

ComponentVersion describes the version information for a specific component.

type ContainerCopyFunc

type ContainerCopyFunc func() error

type ContainerCreateResponse

type ContainerCreateResponse struct {
	// ID of the container created
	// required: true
	ID string `json:"Id"`
	// Warnings during container creation
	// required: true
	Warnings []string `json:"Warnings"`
}

ContainerCreateResponse is the response struct for creating a container

type ContainerStatReport

type ContainerStatReport struct {
	define.FileInfo
}

type ContainerStatsReport

type ContainerStatsReport struct {
	// Error from reading stats.
	Error error
	// Results, set when there is no error.
	Stats []define.ContainerStats
}

ContainerStatsReport is used for streaming container stats.

type ContainerUpdateOptions

type ContainerUpdateOptions struct {
	NameOrID string
	Specgen  *specgen.SpecGenerator
}

type Event

type Event struct {
	// TODO: it would be nice to have full control over the types at some
	// point and fork such Docker types.
	dockerEvents.Message
	HealthStatus string `json:",omitempty"`
}

Event combines various event-related data such as time, event type, status and more.

type FarmBuildOptions

type FarmBuildOptions struct {
	// Cleanup removes built images from farm nodes on success
	Cleanup bool
	// Authfile is the path to the file holding registry credentials
	Authfile string
	// SkipTLSVerify skips tls verification when set to true
	SkipTLSVerify *bool
}

FarmBuildOptions describes the options for building container images on farm nodes

type FarmInspectReport

type FarmInspectReport struct {
	NativePlatforms   []string
	EmulatedPlatforms []string
	OS                string
	Arch              string
	Variant           string
}

FarmInspectReport describes the response from farm inspect

type GenerateKubeReport

type GenerateKubeReport struct {
	// FIXME: Podman4.0 should change io.Reader to io.ReaderCloser
	// Reader - the io.Reader to reader the generated YAML file.
	Reader io.Reader
}

type GenerateSpecReport

type GenerateSpecReport struct {
	Data []byte
}

type GenerateSystemdReport

type GenerateSystemdReport struct {
	// Units of the generate process. key = unit name -> value = unit content
	Units map[string]string
}

type ImageHistoryLayer

type ImageHistoryLayer struct {
	ID        string    `json:"id"`
	Created   time.Time `json:"created,omitempty"`
	CreatedBy string    `json:",omitempty"`
	Tags      []string  `json:"tags,omitempty"`
	Size      int64     `json:"size"`
	Comment   string    `json:"comment,omitempty"`
}

type ImageHistoryReport

type ImageHistoryReport struct {
	Layers []ImageHistoryLayer
}

type ImageImportReport

type ImageImportReport struct {
	Id string //nolint:revive,stylecheck
}

type ImageInspectReport

type ImageInspectReport struct {
	*inspect.ImageData
}

type ImageLoadReport

type ImageLoadReport struct {
	Names []string
}

type ImageMountReport

type ImageMountReport struct {
	Id           string //nolint:revive,stylecheck
	Name         string
	Repositories []string
	Path         string
}

ImageMountReport describes the response from image mount

type ImagePullReport

type ImagePullReport struct {
	// Stream used to provide output from c/image
	Stream string `json:"stream,omitempty"`
	// Error contains text of errors from c/image
	Error string `json:"error,omitempty"`
	// Images contains the ID's of the images pulled
	Images []string `json:"images,omitempty"`
	// ID contains image id (retained for backwards compatibility)
	ID string `json:"id,omitempty"`
}

type ImagePushStream

type ImagePushStream struct {
	// ManifestDigest is the digest of the manifest of the pushed image.
	ManifestDigest string `json:"manifestdigest,omitempty"`
	// Stream used to provide push progress
	Stream string `json:"stream,omitempty"`
	// Error contains text of errors from pushing
	Error string `json:"error,omitempty"`
}

type ImageRemoveReport

type ImageRemoveReport struct {
	// Deleted images.
	Deleted []string `json:",omitempty"`
	// Untagged images. Can be longer than Deleted.
	Untagged []string `json:",omitempty"`
	// ExitCode describes the exit codes as described in the `podman rmi`
	// man page.
	ExitCode int
}

ImageRemoveReport is the response for removing one or more image(s) from storage and images what was untagged vs actually removed.

type ImageSearchReport

type ImageSearchReport struct {
	// Index is the image index (e.g., "docker.io" or "quay.io")
	Index string
	// Name is the canonical name of the image (e.g., "docker.io/library/alpine").
	Name string
	// Description of the image.
	Description string
	// Stars is the number of stars of the image.
	Stars int
	// Official indicates if it's an official image.
	Official string
	// Automated indicates if the image was created by an automated build.
	Automated string
	// Tag is the repository tag
	Tag string
}

ImageSearchReport is the response from searching images.

type ImageSummary

type ImageSummary struct {
	ID          string `json:"Id"`
	ParentId    string //nolint:revive,stylecheck
	RepoTags    []string
	RepoDigests []string
	Created     int64
	Size        int64
	SharedSize  int
	VirtualSize int64
	Labels      map[string]string
	Containers  int
	ReadOnly    bool `json:",omitempty"`
	Dangling    bool `json:",omitempty"`

	// Podman extensions
	Names   []string `json:",omitempty"`
	Digest  string   `json:",omitempty"`
	History []string `json:",omitempty"`
}

swagger:model LibpodImageSummary

func (*ImageSummary) Id

func (i *ImageSummary) Id() string

func (*ImageSummary) IsDangling

func (i *ImageSummary) IsDangling() bool

func (*ImageSummary) IsReadOnly

func (i *ImageSummary) IsReadOnly() bool

type ImageTreeReport

type ImageTreeReport struct {
	Tree string // TODO: Refactor move presentation work out of server
}

type ImageUnmountReport

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

ImageUnmountReport describes the response from umounting an image

type KubePlayReport

type KubePlayReport = PlayKubeReport

type ListContainer

type ListContainer struct {
	// AutoRemove
	AutoRemove bool
	// Container command
	Command []string
	// Container creation time
	Created time.Time
	// Human-readable container creation time.
	CreatedAt string
	// CIDFile specified at creation time.
	CIDFile string
	// If container has exited/stopped
	Exited bool
	// Time container exited
	ExitedAt int64
	// If container has exited, the return code from the command
	ExitCode int32
	// The unique identifier for the container
	ID string `json:"Id"`
	// Container image
	Image string
	// Container image ID
	ImageID string
	// If this container is a Pod infra container
	IsInfra bool
	// Labels for container
	Labels map[string]string
	// User volume mounts
	Mounts []string
	// The names assigned to the container
	Names []string
	// Namespaces the container belongs to.  Requires the
	// namespace boolean to be true
	Namespaces ListContainerNamespaces
	// The network names assigned to the container
	Networks []string
	// The process id of the container
	Pid int
	// If the container is part of Pod, the Pod ID. Requires the pod
	// boolean to be set
	Pod string
	// If the container is part of Pod, the Pod name. Requires the pod
	// boolean to be set
	PodName string
	// Port mappings
	Ports []netTypes.PortMapping
	// Restarts is how many times the container was restarted by its
	// restart policy. This is NOT incremented by normal container restarts
	// (only by restart policy).
	Restarts uint
	// Size of the container rootfs.  Requires the size boolean to be true
	Size *define.ContainerSize
	// Time when container started
	StartedAt int64
	// State of container
	State string
	// Status is a human-readable approximation of a duration for json output
	Status string
}

ListContainer describes a container suitable for listing

func (ListContainer) CGROUPNS

func (l ListContainer) CGROUPNS() string

func (ListContainer) IPC

func (l ListContainer) IPC() string

func (ListContainer) MNT

func (l ListContainer) MNT() string

func (ListContainer) NET

func (l ListContainer) NET() string

func (ListContainer) PIDNS

func (l ListContainer) PIDNS() string

func (ListContainer) USERNS

func (l ListContainer) USERNS() string

func (ListContainer) UTS

func (l ListContainer) UTS() string

type ListContainerNamespaces

type ListContainerNamespaces struct {
	// Mount namespace
	MNT string `json:"Mnt,omitempty"`
	// Cgroup namespace
	Cgroup string `json:"Cgroup,omitempty"`
	// IPC namespace
	IPC string `json:"Ipc,omitempty"`
	// Network namespace
	NET string `json:"Net,omitempty"`
	// PID namespace
	PIDNS string `json:"Pidns,omitempty"`
	// UTS namespace
	UTS string `json:"Uts,omitempty"`
	// User namespace
	User string `json:"User,omitempty"`
}

ListContainerNamespaces contains the identifiers of the container's Linux namespaces

type ListPodContainer

type ListPodContainer struct {
	Id           string //nolint:revive,stylecheck
	Names        string
	Status       string
	RestartCount uint
}

type ListPodsReport

type ListPodsReport struct {
	Cgroup     string
	Containers []*ListPodContainer
	Created    time.Time
	Id         string //nolint:revive,stylecheck
	InfraId    string //nolint:revive,stylecheck
	Name       string
	Namespace  string
	// Network names connected to infra container
	Networks []string
	Status   string
	Labels   map[string]string
}

type ListRegistriesReport

type ListRegistriesReport struct {
	Registries []string
}

ListRegistriesReport is the report when querying for a sorted list of registries which may be contacted during certain operations.

type LocksReport

type LocksReport struct {
	LockConflicts map[uint32][]string
	LocksHeld     []uint32
}

LocksReport describes any conflicts in Libpod's lock allocations that could lead to deadlocks.

type ManifestModifyReport

type ManifestModifyReport struct {
	// Manifest List ID
	ID string `json:"Id"`
	// Images added to or removed from manifest list, otherwise not provided.
	Images []string `json:"images,omitempty" schema:"images"`
	// Files added to manifest list, otherwise not provided.
	Files []string `json:"files,omitempty" schema:"files"`
	// Errors associated with operation
	Errors []error `json:"errors,omitempty"`
}

swagger:model

type ManifestPushReport

type ManifestPushReport struct {
	// ID of the pushed manifest
	ID string `json:"Id"`
	// Stream used to provide push progress
	Stream string `json:"stream,omitempty"`
	// Error contains text of errors from pushing
	Error string `json:"error,omitempty"`
}

swagger:model

type ManifestRemoveReport

type ManifestRemoveReport struct {
	// Deleted manifest list.
	Deleted []string `json:",omitempty"`
	// Untagged images. Can be longer than Deleted.
	Untagged []string `json:",omitempty"`
	// Errors associated with operation
	Errors []string `json:",omitempty"`
	// ExitCode describes the exit codes as described in the `podman rmi`
	// man page.
	ExitCode int
}

swagger:model

type NetworkConnectOptions

type NetworkConnectOptions struct {
	Container string `json:"container"`
	commonTypes.PerNetworkOptions
}

NetworkConnectOptions describes options for connecting a container to a network

type NetworkContainerInfo

type NetworkContainerInfo struct {
	// Name of the container
	Name string `json:"name"`

	// Interfaces configured for this container with their addresses
	Interfaces map[string]commonTypes.NetInterface `json:"interfaces,omitempty"`
}

type NetworkCreateReport

type NetworkCreateReport struct {
	Name string
}

type NetworkInspectReport

type NetworkInspectReport struct {
	commonTypes.Network

	Containers map[string]NetworkContainerInfo `json:"containers"`
}

type NetworkPruneReport

type NetworkPruneReport struct {
	Name  string
	Error error
}

NetworkPruneReport containers the name of network and an error associated in its pruning (removal) swagger:model NetworkPruneReport

type NetworkReloadReport

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

NetworkReloadReport describes the results of reloading a container network.

type NetworkRmReport

type NetworkRmReport struct {
	Name string
	Err  error
}

NetworkRmReport describes the results of network removal

type PlayKubePod

type PlayKubePod struct {
	// ID - ID of the pod created as a result of play kube.
	ID string
	// Containers - the IDs of the containers running in the created pod.
	Containers []string
	// InitContainers - the IDs of the init containers to be run in the created pod.
	InitContainers []string
	// Logs - non-fatal errors and log messages while processing.
	Logs []string
	// ContainerErrors - any errors that occurred while starting containers
	// in the pod.
	ContainerErrors []string
}

type PlayKubeReport

type PlayKubeReport struct {
	// Pods - pods created by play kube.
	Pods []PlayKubePod
	// Volumes - volumes created by play kube.
	Volumes []PlayKubeVolume
	PlayKubeTeardown
	// Secrets - secrets created by play kube
	Secrets []PlaySecret
	// ServiceContainerID - ID of the service container if one is created
	ServiceContainerID string
	// If set, exit with the specified exit code.
	ExitCode *int32
}

type PlayKubeTeardown

type PlayKubeTeardown struct {
	StopReport     []*PodStopReport
	RmReport       []*PodRmReport
	VolumeRmReport []*VolumeRmReport
	SecretRmReport []*SecretRmReport
}

PlayKubeDownReport contains the results of tearing down play kube

type PlayKubeVolume

type PlayKubeVolume struct {
	// Name - Name of the volume created by play kube.
	Name string
}

type PlaySecret

type PlaySecret struct {
	CreateReport *SecretCreateReport
}

type PodCloneReport

type PodCloneReport struct {
	Id string //nolint:revive,stylecheck
}

type PodCreateReport

type PodCreateReport struct {
	Id string //nolint:revive,stylecheck
}

type PodInspectReport

type PodInspectReport struct {
	*define.InspectPodData
}

type PodKillReport

type PodKillReport struct {
	Errs []error
	Id   string //nolint:revive,stylecheck
}

type PodPauseReport

type PodPauseReport struct {
	Errs []error
	Id   string //nolint:revive,stylecheck
}

type PodPruneReport

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

type PodRestartReport

type PodRestartReport struct {
	Errs []error
	Id   string //nolint:revive,stylecheck
}

type PodRmReport

type PodRmReport struct {
	RemovedCtrs map[string]error
	Err         error
	Id          string //nolint:revive,stylecheck
}

type PodSpec

type PodSpec struct {
	PodSpecGen specgen.PodSpecGenerator
}

PodSpec is an abstracted version of PodSpecGen designed to eventually accept options not meant to be in a specgen

type PodStartReport

type PodStartReport struct {
	Errs []error
	Id   string //nolint:revive,stylecheck
}

type PodStatsReport

type PodStatsReport struct {
	// Percentage of CPU utilized by pod
	// example: 75.5%
	CPU string
	// Humanized Memory usage and maximum
	// example: 12mb / 24mb
	MemUsage string
	// Memory usage and maximum in bytes
	// example: 1,000,000 / 4,000,000
	MemUsageBytes string
	// Percentage of Memory utilized by pod
	// example: 50.5%
	Mem string
	// Network usage inbound + outbound
	NetIO string
	// Humanized disk usage read + write
	BlockIO string
	// Container PID
	PIDS string
	// Pod ID
	// example: 62310217a19e
	Pod string
	// Container ID
	// example: e43534f89a7d
	CID string
	// Pod Name
	// example: elastic_pascal
	Name string
}

PodStatsReport includes pod-resource statistics data.

type PodStopReport

type PodStopReport struct {
	Errs []error
	Id   string //nolint:revive,stylecheck
}

type PodUnpauseReport

type PodUnpauseReport struct {
	Errs []error
	Id   string //nolint:revive,stylecheck
}

type RestoreReport

type RestoreReport struct {
	Err             error                                   `json:"-"`
	Id              string                                  `json:"Id"` //nolint:revive,stylecheck
	RawInput        string                                  `json:"-"`
	RuntimeDuration int64                                   `json:"runtime_restore_duration"`
	CRIUStatistics  *define.CRIUCheckpointRestoreStatistics `json:"criu_statistics"`
}

type SecretCreateReport

type SecretCreateReport struct {
	ID string
}

type SecretDriverSpec

type SecretDriverSpec struct {
	Name    string
	Options map[string]string
}

type SecretInfoReport

type SecretInfoReport struct {
	ID         string
	CreatedAt  time.Time
	UpdatedAt  time.Time
	Spec       SecretSpec
	SecretData string `json:"SecretData,omitempty"`
}

type SecretInfoReportCompat

type SecretInfoReportCompat struct {
	SecretInfoReport
	Version SecretVersion
}

type SecretListReport

type SecretListReport struct {
	ID        string
	Name      string
	Driver    string
	CreatedAt string
	UpdatedAt string
}

type SecretRmReport

type SecretRmReport struct {
	ID  string
	Err error
}

type SecretSpec

type SecretSpec struct {
	Name   string
	Driver SecretDriverSpec
	Labels map[string]string
}

type SecretVersion

type SecretVersion struct {
	Index int
}

type ServiceOptions

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
}

ServiceOptions provides the input for starting an API and sidecar pprof services

type ShowTrustReport

type ShowTrustReport struct {
	Raw                     []byte
	SystemRegistriesDirPath string
	JSONOutput              []byte
	Policies                []*trust.Policy
}

ShowTrustReport describes the results of show trust

type SystemComponentVersion

type SystemComponentVersion struct {
	Version
}

SystemComponentVersion is the type used by pkg/domain/entities

type SystemDfContainerReport

type SystemDfContainerReport struct {
	ContainerID  string
	Image        string
	Command      []string
	LocalVolumes int
	Size         int64
	RWSize       int64
	Created      time.Time
	Status       string
	Names        string
}

SystemDfContainerReport describes a container for use with df

type SystemDfImageReport

type SystemDfImageReport struct {
	Repository string
	Tag        string
	ImageID    string
	Created    time.Time
	Size       int64
	SharedSize int64
	UniqueSize int64
	Containers int
}

SystemDfImageReport describes an image for use with df

type SystemDfOptions

type SystemDfOptions struct {
	Format  string
	Verbose bool
}

SystemDfOptions describes the options for getting df information

type SystemDfReport

type SystemDfReport struct {
	ImagesSize int64
	Images     []*SystemDfImageReport
	Containers []*SystemDfContainerReport
	Volumes    []*SystemDfVolumeReport
}

SystemDfReport describes the response for df information

type SystemDfVolumeReport

type SystemDfVolumeReport struct {
	VolumeName      string
	Links           int
	Size            int64
	ReclaimableSize int64
}

SystemDfVolumeReport describes a volume and its size

type SystemMigrateOptions

type SystemMigrateOptions struct {
	NewRuntime string
}

SystemMigrateOptions describes the options needed for the cli to migrate runtimes of containers

type SystemPruneOptions

type SystemPruneOptions struct {
	All      bool
	Volume   bool
	Filters  map[string][]string `json:"filters" schema:"filters"`
	External bool
}

SystemPruneOptions provides options to prune system.

type SystemPruneReport

type SystemPruneReport struct {
	PodPruneReport        []*PodPruneReport
	ContainerPruneReports []*reports.PruneReport
	ImagePruneReports     []*reports.PruneReport
	NetworkPruneReports   []*NetworkPruneReport
	VolumePruneReports    []*reports.PruneReport
	ReclaimedSpace        uint64
}

SystemPruneReport provides report after system prune is executed.

type SystemUnshareOptions

type SystemUnshareOptions struct {
	RootlessNetNS bool
}

SystemUnshareOptions describes the options for the unshare command

type SystemVersionReport

type SystemVersionReport struct {
	// Always populated
	Client *define.Version `json:",omitempty"`
	// May be populated, when in tunnel mode
	Server *define.Version `json:",omitempty"`
}

SystemVersionReport describes version information about the running Podman service

type Version

type Version struct {
	Platform   struct{ Name string } `json:",omitempty"`
	Components []ComponentVersion    `json:",omitempty"`

	Version       string
	APIVersion    string `json:"ApiVersion"`
	MinAPIVersion string `json:"MinAPIVersion,omitempty"`
	GitCommit     string
	GoVersion     string
	Os            string
	Arch          string
	KernelVersion string `json:",omitempty"`
	Experimental  bool   `json:",omitempty"`
	BuildTime     string `json:",omitempty"`
}

Version contains response of Engine API: GET "/version"

type VolumeConfigResponse

type VolumeConfigResponse struct {
	define.InspectVolumeData
}

type VolumeCreateOptions

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"`
	// Ignore existing volumes
	IgnoreIfExists bool `schema:"ignoreIfExist"`
}

swagger:model

type VolumeInspectReport

type VolumeInspectReport struct {
	*VolumeConfigResponse
}

type VolumeListReport

type VolumeListReport struct {
	VolumeConfigResponse
}

type VolumeMountReport

type VolumeMountReport struct {
	Err  error
	Id   string //nolint:revive,stylecheck
	Name string
	Path string
}

type VolumeReloadReport

type VolumeReloadReport struct {
	define.VolumeReload
}

type VolumeRmReport

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

type VolumeUnmountReport

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL