entities

package
v1.9.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2020 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ABIMode    = EngineMode("abi")
	TunnelMode = EngineMode("tunnel")
)

Variables

This section is empty.

Functions

func FilterIdFn

func FilterIdFn(id []string) func(Identifier) bool

func FilterIdOrNameFn

func FilterIdOrNameFn(id []string) func(IdOrNamed) bool

func FilterNameFn

func FilterNameFn(name []string) func(Named) bool

func FilterNamesFn

func FilterNamesFn(name []string) func(Names) bool

func NewStringSet added in v1.9.0

func NewStringSet(elem ...string) *stringSet

Types

type AttachOptions added in v1.9.0

type AttachOptions struct {
	DetachKeys string
	Latest     bool
	NoStdin    bool
	SigProxy   bool
	Stdin      *os.File
	Stdout     *os.File
	Stderr     *os.File
}

AttachOptions describes the cli and other values needed to perform an attach

type BoolReport added in v1.9.0

type BoolReport struct {
	Value bool
}

type CheckpointOptions added in v1.9.0

type CheckpointOptions struct {
	All            bool
	Export         string
	IgnoreRootFS   bool
	Keep           bool
	Latest         bool
	LeaveRuninng   bool
	TCPEstablished bool
}

type CheckpointReport added in v1.9.0

type CheckpointReport struct {
	Err error
	Id  string
}

type CommitOptions added in v1.9.0

type CommitOptions struct {
	Author         string
	Changes        []string
	Format         string
	ImageName      string
	IncludeVolumes bool
	Message        string
	Pause          bool
	Quiet          bool
	Writer         io.Writer
}

type CommitReport added in v1.9.0

type CommitReport struct {
	Id string
}

type Container

type Container struct {
	IdOrNamed
}

type ContainerCleanupOptions added in v1.9.0

type ContainerCleanupOptions struct {
	All         bool
	Latest      bool
	Remove      bool
	RemoveImage bool
}

ContainerCleanupOptions are the CLI values for the cleanup command

type ContainerCleanupReport added in v1.9.0

type ContainerCleanupReport struct {
	CleanErr error
	Id       string
	RmErr    error
	RmiErr   error
}

ContainerCleanupReport describes the response from a container cleanup

type ContainerCreateReport added in v1.9.0

type ContainerCreateReport struct {
	Id string
}

type ContainerEngine

type ContainerEngine interface {
	ContainerAttach(ctx context.Context, nameOrId string, options AttachOptions) error
	ContainerCheckpoint(ctx context.Context, namesOrIds []string, options CheckpointOptions) ([]*CheckpointReport, error)
	ContainerCleanup(ctx context.Context, namesOrIds []string, options ContainerCleanupOptions) ([]*ContainerCleanupReport, error)
	ContainerCommit(ctx context.Context, nameOrId string, options CommitOptions) (*CommitReport, error)
	ContainerCreate(ctx context.Context, s *specgen.SpecGenerator) (*ContainerCreateReport, error)
	ContainerDiff(ctx context.Context, nameOrId string, options DiffOptions) (*DiffReport, error)
	ContainerExec(ctx context.Context, nameOrId string, options ExecOptions) (int, error)
	ContainerExists(ctx context.Context, nameOrId string) (*BoolReport, error)
	ContainerExport(ctx context.Context, nameOrId string, options ContainerExportOptions) error
	ContainerInspect(ctx context.Context, namesOrIds []string, options InspectOptions) ([]*ContainerInspectReport, error)
	ContainerKill(ctx context.Context, namesOrIds []string, options KillOptions) ([]*KillReport, error)
	ContainerList(ctx context.Context, options ContainerListOptions) ([]ListContainer, error)
	ContainerPause(ctx context.Context, namesOrIds []string, options PauseUnPauseOptions) ([]*PauseUnpauseReport, error)
	ContainerLogs(ctx context.Context, containers []string, options ContainerLogsOptions) error
	ContainerRestart(ctx context.Context, namesOrIds []string, options RestartOptions) ([]*RestartReport, error)
	ContainerRestore(ctx context.Context, namesOrIds []string, options RestoreOptions) ([]*RestoreReport, error)
	ContainerRm(ctx context.Context, namesOrIds []string, options RmOptions) ([]*RmReport, error)
	ContainerRun(ctx context.Context, opts ContainerRunOptions) (*ContainerRunReport, error)
	ContainerStart(ctx context.Context, namesOrIds []string, options ContainerStartOptions) ([]*ContainerStartReport, error)
	ContainerStop(ctx context.Context, namesOrIds []string, options StopOptions) ([]*StopReport, error)
	ContainerTop(ctx context.Context, options TopOptions) (*StringSliceReport, error)
	ContainerUnpause(ctx context.Context, namesOrIds []string, options PauseUnPauseOptions) ([]*PauseUnpauseReport, error)
	ContainerWait(ctx context.Context, namesOrIds []string, options WaitOptions) ([]WaitReport, error)
	HealthCheckRun(ctx context.Context, nameOrId string, options HealthCheckOptions) (*define.HealthCheckResults, error)
	Info(ctx context.Context) (*define.Info, error)
	PodCreate(ctx context.Context, opts PodCreateOptions) (*PodCreateReport, error)
	PodExists(ctx context.Context, nameOrId string) (*BoolReport, error)
	PodInspect(ctx context.Context, options PodInspectOptions) (*PodInspectReport, error)
	PodKill(ctx context.Context, namesOrIds []string, options PodKillOptions) ([]*PodKillReport, error)
	PodPause(ctx context.Context, namesOrIds []string, options PodPauseOptions) ([]*PodPauseReport, error)
	PodPs(ctx context.Context, options PodPSOptions) ([]*ListPodsReport, error)
	PodRestart(ctx context.Context, namesOrIds []string, options PodRestartOptions) ([]*PodRestartReport, error)
	PodRm(ctx context.Context, namesOrIds []string, options PodRmOptions) ([]*PodRmReport, error)
	PodStart(ctx context.Context, namesOrIds []string, options PodStartOptions) ([]*PodStartReport, error)
	PodStop(ctx context.Context, namesOrIds []string, options PodStopOptions) ([]*PodStopReport, error)
	PodTop(ctx context.Context, options PodTopOptions) (*StringSliceReport, error)
	PodUnpause(ctx context.Context, namesOrIds []string, options PodunpauseOptions) ([]*PodUnpauseReport, error)
	RestService(ctx context.Context, opts ServiceOptions) error
	VarlinkService(ctx context.Context, opts ServiceOptions) error
	VolumeCreate(ctx context.Context, opts VolumeCreateOptions) (*IdOrNameResponse, error)
	VolumeInspect(ctx context.Context, namesOrIds []string, opts VolumeInspectOptions) ([]*VolumeInspectReport, error)
	VolumeList(ctx context.Context, opts VolumeListOptions) ([]*VolumeListReport, error)
	VolumePrune(ctx context.Context, opts VolumePruneOptions) ([]*VolumePruneReport, error)
	VolumeRm(ctx context.Context, namesOrIds []string, opts VolumeRmOptions) ([]*VolumeRmReport, error)
}

type ContainerExportOptions added in v1.9.0

type ContainerExportOptions struct {
	Output string
}

type ContainerFilter

type ContainerFilter func(Container) bool

func CompileContainerFilters

func CompileContainerFilters(filters url.Values) ContainerFilter

type ContainerInspectReport added in v1.9.0

type ContainerInspectReport struct {
	*define.InspectContainerData
}

type ContainerListOptions added in v1.9.0

type ContainerListOptions struct {
	All       bool
	Filters   map[string][]string
	Format    string
	Last      int
	Latest    bool
	Namespace bool
	Pod       bool
	Quiet     bool
	Size      bool
	Sort      string
	Sync      bool
	Watch     uint
}

ContainerListOptions describes the CLI options for listing containers

type ContainerLogsOptions added in v1.9.0

type ContainerLogsOptions struct {
	// Show extra details provided to the logs.
	Details bool
	// Follow the log output.
	Follow bool
	// Display logs for the latest container only. Ignored on the remote client.
	Latest bool
	// Show container names in the output.
	Names bool
	// Show logs since this timestamp.
	Since time.Time
	// Number of lines to display at the end of the output.
	Tail int64
	// Show timestamps in the logs.
	Timestamps bool
	// Write the logs to Writer.
	Writer io.Writer
}

ContainerLogsOptions describes the options to extract container logs.

type ContainerRunOptions added in v1.9.0

type ContainerRunOptions struct {
	Detach       bool
	DetachKeys   string
	ErrorStream  *os.File
	InputStream  *os.File
	OutputStream *os.File
	Rm           bool
	SigProxy     bool
	Spec         *specgen.SpecGenerator
}

ContainerRunOptions describes the options needed to run a container from the CLI

type ContainerRunReport added in v1.9.0

type ContainerRunReport struct {
	ExitCode int
	Id       string
}

ContainerRunReport describes the results of running a container

type ContainerStartOptions added in v1.9.0

type ContainerStartOptions struct {
	Attach      bool
	DetachKeys  string
	Interactive bool
	Latest      bool
	SigProxy    bool
	Stdout      *os.File
	Stderr      *os.File
	Stdin       *os.File
}

ContainerStartOptions describes the val from the CLI needed to start a container

type ContainerStartReport added in v1.9.0

type ContainerStartReport struct {
	Id       string
	Err      error
	ExitCode int
}

ContainerStartReport describes the response from starting containers from the cli

type DiffOptions added in v1.9.0

type DiffOptions struct {
	Format  string `json:",omitempty"` // CLI only
	Latest  bool   `json:",omitempty"` // API and CLI, only supported by containers
	Archive bool   `json:",omitempty"` // CLI only
}

All API and CLI diff commands and diff sub-commands use the same options

type DiffReport added in v1.9.0

type DiffReport struct {
	Changes []archive.Change
}

DiffReport provides changes for object

type EngineMode

type EngineMode string

func (EngineMode) String

func (m EngineMode) String() string

type EngineOptions

type EngineOptions struct {
	Uri        string
	Identities []string
	FlagSet    *pflag.FlagSet
	EngineMode EngineMode

	CGroupManager     string
	CniConfigDir      string
	ConmonPath        string
	DefaultMountsFile string
	EventsBackend     string
	HooksDir          []string
	MaxWorks          int
	Namespace         string
	Root              string
	Runroot           string
	Runtime           string
	StorageDriver     string
	StorageOpts       []string
	Syslog            bool
	Trace             bool
	NetworkCmdPath    string

	Config     string
	CpuProfile string
	LogLevel   string
	TmpDir     string

	RemoteUserName       string
	RemoteHost           string
	VarlinkAddress       string
	ConnectionName       string
	RemoteConfigFilePath string
	Port                 int
	IdentityFile         string
	IgnoreHosts          bool
}

func NewEngineOptions

func NewEngineOptions() (EngineOptions, error)

type ExecOptions added in v1.9.0

type ExecOptions struct {
	Cmd         []string
	DetachKeys  string
	Envs        map[string]string
	Interactive bool
	Latest      bool
	PreserveFDs uint
	Privileged  bool
	Streams     define.AttachStreams
	Tty         bool
	User        string
	WorkDir     string
}

ExecOptions describes the cli values to exec into a container

type HealthCheckOptions added in v1.9.0

type HealthCheckOptions struct{}

type IdOrNameResponse added in v1.9.0

type IdOrNameResponse struct {
	// The Id or Name of an object
	IdOrName string
}

type IdOrNamed

type IdOrNamed interface {
	Identifier
	Named
}

IdOrName interface allows filters to access ID() or Name() of object

type IdOrNames

type IdOrNames interface {
	Identifier
	Names
}

IdOrName interface allows filters to access ID() or Names() of object

type Identifier

type Identifier interface {
	Id() string
}

Identifier interface allows filters to access ID() of object

type Image

type Image struct {
	ID              string                 `json:"Id"`
	RepoTags        []string               `json:",omitempty"`
	RepoDigests     []string               `json:",omitempty"`
	Parent          string                 `json:",omitempty"`
	Comment         string                 `json:",omitempty"`
	Created         string                 `json:",omitempty"`
	Container       string                 `json:",omitempty"`
	ContainerConfig *container.Config      `json:",omitempty"`
	DockerVersion   string                 `json:",omitempty"`
	Author          string                 `json:",omitempty"`
	Config          *container.Config      `json:",omitempty"`
	Architecture    string                 `json:",omitempty"`
	Variant         string                 `json:",omitempty"`
	Os              string                 `json:",omitempty"`
	OsVersion       string                 `json:",omitempty"`
	Size            int64                  `json:",omitempty"`
	VirtualSize     int64                  `json:",omitempty"`
	GraphDriver     docker.GraphDriverData `json:",omitempty"`
	RootFS          docker.RootFS          `json:",omitempty"`
	Metadata        docker.ImageMetadata   `json:",omitempty"`

	// Podman extensions
	Digest        digest.Digest                 `json:",omitempty"`
	PodmanVersion string                        `json:",omitempty"`
	ManifestType  string                        `json:",omitempty"`
	User          string                        `json:",omitempty"`
	History       []v1.History                  `json:",omitempty"`
	NamesHistory  []string                      `json:",omitempty"`
	HealthCheck   *manifest.Schema2HealthConfig `json:",omitempty"`
}

func (*Image) Id

func (i *Image) Id() string

type ImageData added in v1.9.0

type ImageData struct {
	*inspect.ImageData
}

type ImageDeleteOptions

type ImageDeleteOptions struct {
	All   bool
	Force bool
}

type ImageDeleteReport

type ImageDeleteReport struct {
	Untagged      []string `json:",omitempty"`
	Deleted       []string `json:",omitempty"`
	Errors        []error
	ImageNotFound error
	ImageInUse    error
}

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

type ImageEngine

type ImageEngine interface {
	Delete(ctx context.Context, nameOrId []string, opts ImageDeleteOptions) (*ImageDeleteReport, error)
	Diff(ctx context.Context, nameOrId string, options DiffOptions) (*DiffReport, error)
	Exists(ctx context.Context, nameOrId string) (*BoolReport, error)
	History(ctx context.Context, nameOrId string, opts ImageHistoryOptions) (*ImageHistoryReport, error)
	Import(ctx context.Context, opts ImageImportOptions) (*ImageImportReport, error)
	Inspect(ctx context.Context, names []string, opts InspectOptions) (*ImageInspectReport, error)
	List(ctx context.Context, opts ImageListOptions) ([]*ImageSummary, error)
	Load(ctx context.Context, opts ImageLoadOptions) (*ImageLoadReport, error)
	Prune(ctx context.Context, opts ImagePruneOptions) (*ImagePruneReport, error)
	Pull(ctx context.Context, rawImage string, opts ImagePullOptions) (*ImagePullReport, error)
	Push(ctx context.Context, source string, destination string, opts ImagePushOptions) error
	Save(ctx context.Context, nameOrId string, tags []string, options ImageSaveOptions) error
	Tag(ctx context.Context, nameOrId string, tags []string, options ImageTagOptions) error
	Untag(ctx context.Context, nameOrId string, tags []string, options ImageUntagOptions) error
}

type ImageFilter

type ImageFilter func(Image) bool

func CompileImageFilters

func CompileImageFilters(filters url.Values) ImageFilter

type ImageHistoryLayer

type ImageHistoryLayer struct {
	ID        string   `json:"Id"`
	Created   int64    `json:",omitempty"`
	CreatedBy string   `json:",omitempty"`
	Tags      []string `json:",omitempty"`
	Size      int64    `json:",omitempty"`
	Comment   string   `json:",omitempty"`
}

type ImageHistoryOptions

type ImageHistoryOptions struct{}

type ImageHistoryReport

type ImageHistoryReport struct {
	Layers []ImageHistoryLayer
}

type ImageImportOptions added in v1.9.0

type ImageImportOptions struct {
	Changes     []string
	Message     string
	Quiet       bool
	Reference   string
	Source      string
	SourceIsURL bool
}

type ImageImportReport added in v1.9.0

type ImageImportReport struct {
	Id string
}

type ImageInspectReport added in v1.9.0

type ImageInspectReport struct {
	Images []*ImageData
	Errors map[string]error
}

type ImageListOptions

type ImageListOptions struct {
	All     bool       `json:"all" schema:"all"`
	Filter  []string   `json:"Filter,omitempty"`
	Filters url.Values `json:"filters" schema:"filters"`
}

type ImageLoadOptions added in v1.9.0

type ImageLoadOptions struct {
	Name            string
	Tag             string
	Input           string
	Quiet           bool
	SignaturePolicy string
}

type ImageLoadReport added in v1.9.0

type ImageLoadReport struct {
	Name string
}

type ImagePruneOptions

type ImagePruneOptions struct {
	All     bool       `json:"all" schema:"all"`
	Filter  []string   `json:"filter" schema:"filter"`
	Filters url.Values `json:"filters" schema:"filters"`
}

type ImagePruneReport

type ImagePruneReport struct {
	Report Report
	Size   int64
}

type ImagePullOptions added in v1.9.0

type ImagePullOptions struct {
	// AllTags can be specified to pull all tags of the spiecifed image. Note
	// that this only works if the specified image does not include a tag.
	AllTags bool
	// Authfile is the path to the authentication file. Ignored for remote
	// calls.
	Authfile string
	// CertDir is the path to certificate directories.  Ignored for remote
	// calls.
	CertDir string
	// Credentials for authenticating against the registry in the format
	// USERNAME:PASSWORD.
	Credentials string
	// OverrideArch will overwrite the local architecture for image pulls.
	OverrideArch string
	// OverrideOS will overwrite the local operating system (OS) for image
	// pulls.
	OverrideOS string
	// Quiet can be specified to suppress pull progress when pulling.  Ignored
	// for remote calls.
	Quiet bool
	// SignaturePolicy to use when pulling.  Ignored for remote calls.
	SignaturePolicy string
	// TLSVerify to enable/disable HTTPS and certificate verification.
	TLSVerify types.OptionalBool
}

ImagePullOptions are the arguments for pulling images.

type ImagePullReport added in v1.9.0

type ImagePullReport struct {
	Images []string
}

ImagePullReport is the response from pulling one or more images.

type ImagePushOptions added in v1.9.0

type ImagePushOptions struct {
	// Authfile is the path to the authentication file. Ignored for remote
	// calls.
	Authfile string
	// CertDir is the path to certificate directories.  Ignored for remote
	// calls.
	CertDir string
	// Compress tarball image layers when pushing to a directory using the 'dir'
	// transport. Default is same compression type as source. Ignored for remote
	// calls.
	Compress bool
	// Credentials for authenticating against the registry in the format
	// USERNAME:PASSWORD.
	Credentials string
	// DigestFile, after copying the image, write the digest of the resulting
	// image to the file.  Ignored for remote calls.
	DigestFile string
	// Format is the Manifest type (oci, v2s1, or v2s2) to use when pushing an
	// image using the 'dir' transport. Default is manifest type of source.
	// Ignored for remote calls.
	Format string
	// Quiet can be specified to suppress pull progress when pulling.  Ignored
	// for remote calls.
	Quiet bool
	// RemoveSignatures, discard any pre-existing signatures in the image.
	// Ignored for remote calls.
	RemoveSignatures bool
	// SignaturePolicy to use when pulling.  Ignored for remote calls.
	SignaturePolicy string
	// SignBy adds a signature at the destination using the specified key.
	// Ignored for remote calls.
	SignBy string
	// TLSVerify to enable/disable HTTPS and certificate verification.
	TLSVerify types.OptionalBool
}

ImagePushOptions are the arguments for pushing images.

type ImageSaveOptions added in v1.9.0

type ImageSaveOptions struct {
	Compress bool
	Format   string
	Output   string
	Quiet    bool
}

type ImageSummary

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

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

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 ImageTagOptions added in v1.9.0

type ImageTagOptions struct{}

type ImageUntagOptions added in v1.9.0

type ImageUntagOptions struct{}

type InspectOptions added in v1.9.0

type InspectOptions struct {
	Format string `json:",omitempty"`
	Latest bool   `json:",omitempty"`
	Size   bool   `json:",omitempty"`
}

All CLI inspect commands and inspect sub-commands use the same options

type KillOptions added in v1.9.0

type KillOptions struct {
	All    bool
	Latest bool
	Signal string
}

type KillReport added in v1.9.0

type KillReport struct {
	Err error
	Id  string
}

type ListContainer added in v1.9.0

type ListContainer struct {
	// Container command
	Cmd []string
	// Container creation time
	Created int64
	// 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
	// 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
	ContainerNames []string
	// Namespaces the container belongs to.  Requires the
	// namespace boolean to be true
	Namespaces ListContainerNamespaces
	// 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
	PortMappings []ocicni.PortMapping
	// Size of the container rootfs.  Requires the size boolean to be true
	ContainerSize *shared.ContainerSize
	// Time when container started
	StartedAt int64
	// State of container
	ContainerState string
}

Listcontainer describes a container suitable for listing

func (ListContainer) Command added in v1.9.0

func (l ListContainer) Command() string

Command returns the container command in string format

func (ListContainer) CreatedAt

func (l ListContainer) CreatedAt() string

CreatedAt returns the container creation time in string format. podman and docker both return a timestamped value for createdat

func (ListContainer) CreatedHuman

func (l ListContainer) CreatedHuman() string

CreateHuman allows us to output the created time in human readable format

func (ListContainer) Names added in v1.9.0

func (l ListContainer) Names() string

Names returns the container name in string format

func (ListContainer) Ports added in v1.9.0

func (l ListContainer) Ports() string

Ports converts from Portmappings to the string form required by ps

func (ListContainer) Size added in v1.9.0

func (l ListContainer) Size() string

Size returns the rootfs and virtual sizes in human duration in and output form (string) suitable for ps

func (ListContainer) State added in v1.9.0

func (l ListContainer) State() string

State returns the container state in human duration

type ListContainerNamespaces added in v1.9.0

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"`
}

ListContainer Namespaces contains the identifiers of the container's Linux namespaces

type ListPodContainer added in v1.9.0

type ListPodContainer struct {
	Id     string
	Names  string
	Status string
}

type ListPodsReport added in v1.9.0

type ListPodsReport struct {
	Cgroup     string
	Containers []*ListPodContainer
	Created    time.Time
	Id         string
	InfraId    string
	Name       string
	Namespace  string
	Status     string
}

type Named

type Named interface {
	Name() string
}

Named interface allows filters to access Name() of object

type Names

type Names interface {
	Names() []string
}

Named interface allows filters to access Name() of object

type NetOptions added in v1.9.0

type NetOptions struct {
	AddHosts     []string
	CNINetworks  []string
	DNSHost      bool
	DNSOptions   []string
	DNSSearch    []string
	DNSServers   []net.IP
	Network      specgen.Namespace
	NoHosts      bool
	PublishPorts []ocicni.PortMapping
	StaticIP     *net.IP
	StaticMAC    *net.HardwareAddr
}

NetOptions reflect the shared network options between pods and containers

type PauseUnPauseOptions added in v1.9.0

type PauseUnPauseOptions struct {
	All bool
}

type PauseUnpauseReport added in v1.9.0

type PauseUnpauseReport struct {
	Err error
	Id  string
}

type PodCreateOptions added in v1.9.0

type PodCreateOptions struct {
	CGroupParent string
	Hostname     string
	Infra        bool
	InfraImage   string
	InfraCommand string
	Labels       map[string]string
	Name         string
	Net          *NetOptions
	Share        []string
}

func (PodCreateOptions) ToPodSpecGen added in v1.9.0

func (p PodCreateOptions) ToPodSpecGen(s *specgen.PodSpecGenerator)

type PodCreateReport added in v1.9.0

type PodCreateReport struct {
	Id string
}

type PodDeleteReport

type PodDeleteReport struct{ Report }

type PodInspectOptions added in v1.9.0

type PodInspectOptions struct {
	Latest bool

	// Options for the API.
	NameOrID string
}

type PodInspectReport added in v1.9.0

type PodInspectReport struct {
	*libpod.PodInspect
}

type PodKillOptions added in v1.9.0

type PodKillOptions struct {
	All    bool
	Latest bool
	Signal string
}

type PodKillReport added in v1.9.0

type PodKillReport struct {
	Errs []error
	Id   string
}

type PodPSOptions added in v1.9.0

type PodPSOptions struct {
	CtrNames  bool
	CtrIds    bool
	CtrStatus bool
	Filters   map[string][]string
	Format    string
	Latest    bool
	Namespace bool
	Quiet     bool
	Sort      string
}

type PodPauseOptions added in v1.9.0

type PodPauseOptions struct {
	All    bool
	Latest bool
}

type PodPauseReport added in v1.9.0

type PodPauseReport struct {
	Errs []error
	Id   string
}

type PodPruneOptions

type PodPruneOptions struct{}

type PodPruneReport

type PodPruneReport struct{ Report }

type PodRestartOptions added in v1.9.0

type PodRestartOptions struct {
	All    bool
	Latest bool
}

type PodRestartReport added in v1.9.0

type PodRestartReport struct {
	Errs []error
	Id   string
}

type PodRmOptions added in v1.9.0

type PodRmOptions struct {
	All    bool
	Force  bool
	Ignore bool
	Latest bool
}

type PodRmReport added in v1.9.0

type PodRmReport struct {
	Err error
	Id  string
}

type PodStartOptions added in v1.9.0

type PodStartOptions struct {
	All    bool
	Latest bool
}

type PodStartReport added in v1.9.0

type PodStartReport struct {
	Errs []error
	Id   string
}

type PodStopOptions added in v1.9.0

type PodStopOptions struct {
	All     bool
	Ignore  bool
	Latest  bool
	Timeout int
}

type PodStopReport added in v1.9.0

type PodStopReport struct {
	Errs []error
	Id   string
}

type PodTopOptions added in v1.9.0

type PodTopOptions struct {
	// CLI flags.
	ListDescriptors bool
	Latest          bool

	// Options for the API.
	Descriptors []string
	NameOrID    string
}

type PodUnpauseReport added in v1.9.0

type PodUnpauseReport struct {
	Errs []error
	Id   string
}

type PodunpauseOptions added in v1.9.0

type PodunpauseOptions struct {
	All    bool
	Latest bool
}

type PsSortedCreateTime added in v1.9.0

type PsSortedCreateTime struct{ SortListContainers }

func (PsSortedCreateTime) Less added in v1.9.0

func (a PsSortedCreateTime) Less(i, j int) bool

type Report

type Report struct {
	Id  []string
	Err map[string]error
}

type RestartOptions added in v1.9.0

type RestartOptions struct {
	All     bool
	Latest  bool
	Running bool
	Timeout *uint
}

type RestartReport added in v1.9.0

type RestartReport struct {
	Err error
	Id  string
}

type RestoreOptions added in v1.9.0

type RestoreOptions struct {
	All             bool
	IgnoreRootFS    bool
	IgnoreStaticIP  bool
	IgnoreStaticMAC bool
	Import          string
	Keep            bool
	Latest          bool
	Name            string
	TCPEstablished  bool
}

type RestoreReport added in v1.9.0

type RestoreReport struct {
	Err error
	Id  string
}

type RmOptions added in v1.9.0

type RmOptions struct {
	All      bool
	CIDFiles []string
	Force    bool
	Ignore   bool
	Latest   bool
	Storage  bool
	Volumes  bool
}

type RmReport added in v1.9.0

type RmReport struct {
	Err error
	Id  string
}

type ServiceOptions added in v1.9.0

type ServiceOptions struct {
	URI     string         // Path to unix domain socket service should listen on
	Timeout time.Duration  // duration of inactivity the service should wait before shutting down
	Command *cobra.Command // CLI command provided. Used in V1 code
}

ServiceOptions provides the input for starting an API Service

type SortContainers added in v1.9.0

type SortContainers []*libpod.Container

SortContainers helps us set-up ability to sort by createTime

func (SortContainers) Len added in v1.9.0

func (a SortContainers) Len() int

func (SortContainers) Swap added in v1.9.0

func (a SortContainers) Swap(i, j int)

type SortCreateTime added in v1.9.0

type SortCreateTime struct{ SortContainers }

func (SortCreateTime) Less added in v1.9.0

func (a SortCreateTime) Less(i, j int) bool

type SortListContainers added in v1.9.0

type SortListContainers []ListContainer

func SortPsOutput added in v1.9.0

func SortPsOutput(sortBy string, psOutput SortListContainers) (SortListContainers, error)

func (SortListContainers) Len added in v1.9.0

func (a SortListContainers) Len() int

func (SortListContainers) Swap added in v1.9.0

func (a SortListContainers) Swap(i, j int)

type StopOptions added in v1.9.0

type StopOptions struct {
	All      bool
	CIDFiles []string
	Ignore   bool
	Latest   bool
	Timeout  uint
}

type StopReport added in v1.9.0

type StopReport struct {
	Err error
	Id  string
}

type StringSliceReport added in v1.9.0

type StringSliceReport struct {
	Value []string
}

StringSliceReport wraps a string slice.

type TopOptions added in v1.9.0

type TopOptions struct {
	// CLI flags.
	ListDescriptors bool
	Latest          bool

	// Options for the API.
	Descriptors []string
	NameOrID    string
}

type Volume

type Volume struct {
	Identifier
}

type VolumeConfigResponse added in v1.9.0

type VolumeConfigResponse struct {
	// Name is the name of the volume.
	Name string `json:"Name"`
	// Driver is the driver used to create the volume.
	// This will be properly implemented in a future version.
	Driver string `json:"Driver"`
	// Mountpoint is the path on the host where the volume is mounted.
	Mountpoint string `json:"Mountpoint"`
	// CreatedAt is the date and time the volume was created at. This is not
	// stored for older Libpod volumes; if so, it will be omitted.
	CreatedAt time.Time `json:"CreatedAt,omitempty"`
	// Status is presently unused and provided only for Docker compatibility.
	// In the future it will be used to return information on the volume's
	// current state.
	Status map[string]string `json:"Status,omitempty"`
	// Labels includes the volume's configured labels, key:value pairs that
	// can be passed during volume creation to provide information for third
	// party tools.
	Labels map[string]string `json:"Labels"`
	// Scope is unused and provided solely for Docker compatibility. It is
	// unconditionally set to "local".
	Scope string `json:"Scope"`
	// Options is a set of options that were used when creating the volume.
	// It is presently not used.
	Options map[string]string `json:"Options"`
	// UID is the UID that the volume was created with.
	UID int `json:"UID,omitempty"`
	// GID is the GID that the volume was created with.
	GID int `json:"GID,omitempty"`
	// Anonymous indicates that the volume was created as an anonymous
	// volume for a specific container, and will be be removed when any
	// container using it is removed.
	Anonymous bool `json:"Anonymous,omitempty"`
}

type VolumeCreateOptions added in v1.9.0

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.
	Label map[string]string `schema:"label"`
	// Mapping of driver options and values.
	Options map[string]string `schema:"opts"`
}

swagger:model VolumeCreate

type VolumeDeleteOptions

type VolumeDeleteOptions struct{}

type VolumeDeleteReport

type VolumeDeleteReport struct{ Report }

type VolumeFilter

type VolumeFilter func(Volume) bool

func CompileVolumeFilters

func CompileVolumeFilters(filters url.Values) VolumeFilter

type VolumeInspectOptions added in v1.9.0

type VolumeInspectOptions struct {
	All bool
}

type VolumeInspectReport added in v1.9.0

type VolumeInspectReport struct {
	*VolumeConfigResponse
}

type VolumeListOptions added in v1.9.0

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

type VolumeListReport added in v1.9.0

type VolumeListReport struct {
	VolumeConfigResponse
}

type VolumePruneOptions added in v1.9.0

type VolumePruneOptions struct {
	Force bool
}

type VolumePruneReport

type VolumePruneReport struct {
	Err error
	Id  string
}

type VolumeRmOptions added in v1.9.0

type VolumeRmOptions struct {
	All   bool
	Force bool
}

type VolumeRmReport added in v1.9.0

type VolumeRmReport struct {
	Err error
	Id  string
}

type WaitOptions added in v1.9.0

type WaitOptions struct {
	Condition define.ContainerStatus
	Interval  time.Duration
	Latest    bool
}

type WaitReport added in v1.9.0

type WaitReport struct {
	Id       string
	Error    error
	ExitCode int32
}

Jump to

Keyboard shortcuts

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