entities

package
v1.8.2 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2020 License: Apache-2.0 Imports: 12 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

Types

type Container

type Container struct {
	IdOrNamed
}

type ContainerDeleteOptions

type ContainerDeleteOptions struct{}

type ContainerDeleteReport

type ContainerDeleteReport struct{ Report }

type ContainerEngine

type ContainerEngine interface {
	ContainerRuntime
	PodRuntime
	VolumeRuntime
}

type ContainerFilter

type ContainerFilter func(Container) bool

func CompileContainerFilters

func CompileContainerFilters(filters url.Values) ContainerFilter

type ContainerPruneReport

type ContainerPruneReport struct{ Report }

type ContainerRuntime

type ContainerRuntime interface {
	ContainerDelete(ctx context.Context, opts ContainerDeleteOptions) (*ContainerDeleteReport, error)
	ContainerPrune(ctx context.Context) (*ContainerPruneReport, error)
}

type EngineFlags

type EngineFlags struct {
	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

	EngineMode EngineMode
}

func NewEngineOptions

func NewEngineOptions() (EngineFlags, error)

type EngineMode

type EngineMode string

func (EngineMode) String

func (m EngineMode) String() string

type EngineOptions

type EngineOptions struct {
	Uri        *url.URL
	Identities []string
	FlagSet    pflag.FlagSet
	Flags      EngineFlags
}

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 {
	IdOrNamed
	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 ImageDeleteOptions

type ImageDeleteOptions struct {
	Force bool
}

type ImageDeleteReport

type ImageDeleteReport struct {
	Untagged []string `json:"untagged"`
	Deleted  string   `json:"deleted"`
}

ImageDeleteResponse is the response for removing an image 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)
	History(ctx context.Context, nameOrId string, opts ImageHistoryOptions) (*ImageHistoryReport, error)
	List(ctx context.Context, opts ImageListOptions) (*ImageListReport, error)
	Prune(ctx context.Context, opts ImagePruneOptions) (*ImagePruneReport, 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:"Created,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 ImageInspectOptions

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

type ImageListOptions

type ImageListOptions struct {
	All       bool       `json:"all" schema:"all"`
	Digests   bool       `json:"digests" schema:"digests"`
	Filter    []string   `json:",omitempty"`
	Filters   url.Values `json:"filters" schema:"filters"`
	Format    string     `json:",omitempty"`
	History   bool       `json:",omitempty"`
	Noheading bool       `json:",omitempty"`
	NoTrunc   bool       `json:",omitempty"`
	Quiet     bool       `json:",omitempty"`
	Sort      string     `json:",omitempty"`
}

type ImageListReport

type ImageListReport struct {
	Images []ImageSummary
}

type ImageOptions

type ImageOptions struct {
	All       bool
	Digests   bool
	Filter    []string
	Format    string
	Noheading bool
	NoTrunc   bool
	Quiet     bool
	Sort      string
	History   bool
}

type ImagePruneOptions

type ImagePruneOptions struct {
	All    bool
	Filter ImageFilter
}

type ImagePruneReport

type ImagePruneReport struct {
	Report Report
	Size   int64
}

type ImageSummary

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

	// Podman extensions
	Digest       digest.Digest `json:",omitempty"`
	ConfigDigest digest.Digest `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 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 PodDeleteReport

type PodDeleteReport struct{ Report }

type PodPruneOptions

type PodPruneOptions struct{}

type PodPruneReport

type PodPruneReport struct{ Report }

type PodRuntime

type PodRuntime interface {
	PodDelete(ctx context.Context, opts PodPruneOptions) (*PodDeleteReport, error)
	PodPrune(ctx context.Context) (*PodPruneReport, error)
}

type Report

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

type Volume

type Volume struct {
	Identifier
}

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 VolumePruneReport

type VolumePruneReport struct{ Report }

type VolumeRuntime

type VolumeRuntime interface {
	VolumeDelete(ctx context.Context, opts VolumeDeleteOptions) (*VolumeDeleteReport, error)
	VolumePrune(ctx context.Context) (*VolumePruneReport, error)
}

Jump to

Keyboard shortcuts

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