app

package
v0.0.0-...-b252f11 Latest Latest
Warning

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

Go to latest
Published: May 9, 2022 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Command

func Command() *cobra.Command

Types

type App

type App struct {
	// contains filtered or unexported fields
}

type CommandArgs

type CommandArgs struct {
	Daemonize       bool
	RetainCount     int
	KeepLatest      bool
	PruneImages     bool
	PruneBuildCache bool
	IntervalSec     int
}

func NewCommandArgs

func NewCommandArgs() *CommandArgs

func (*CommandArgs) Set

func (a *CommandArgs) Set(flags *pflag.FlagSet)

type DockerManager

type DockerManager struct {
	// contains filtered or unexported fields
}

func NewDockerManager

func NewDockerManager(ops ...client.Opt) (*DockerManager, error)

func (*DockerManager) DeleteImage

func (m *DockerManager) DeleteImage(ctx context.Context, imageID string) error

func (*DockerManager) GetImages

func (m *DockerManager) GetImages(ctx context.Context) (map[string][]*TagInfo, error)

func (*DockerManager) PruneBuildCache

func (m *DockerManager) PruneBuildCache(ctx context.Context) error

func (*DockerManager) PruneImages

func (m *DockerManager) PruneImages(ctx context.Context) error

type IDockerClient

type IDockerClient interface {
	ImageList(ctx context.Context, options types.ImageListOptions) ([]types.ImageSummary, error)
	ImageRemove(ctx context.Context, imageID string, options types.ImageRemoveOptions) ([]types.ImageDeleteResponseItem, error)
	ImagesPrune(ctx context.Context, pruneFilters filters.Args) (types.ImagesPruneReport, error)
	BuildCachePrune(ctx context.Context, opts types.BuildCachePruneOptions) (*types.BuildCachePruneReport, error)
}

モック用インタフェース

type TagInfo

type TagInfo struct {
	Tag     string
	Summary *types.ImageSummary
}

Jump to

Keyboard shortcuts

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