docker

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ResourceKindContainer = "container"
)

Variables

This section is empty.

Functions

func TagName

func TagName(kind ResourceKind) string

Types

type Container

type Container struct {
	ID      string `json:"Id"`
	Names   []string
	Image   string
	ImageID string
}

func (Container) Name

func (c Container) Name() string

type GetContainersOptions

type GetContainersOptions struct {
	All     bool
	Filters map[string][]string
}

type Image

type Image struct {
	ID          string `json:"Id"`
	RepoTags    []string
	RepoDigests []string
}

func (Image) Reference

func (i Image) Reference() (oci.Reference, bool)

type Options

type Options struct {
	IncludeAllContainers bool
}

type Platform

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

func NewPlatform

func NewPlatform(ctx context.Context, host string, options *Options) (*Platform, error)

func (*Platform) GetContainers

func (p *Platform) GetContainers(ctx context.Context, options *GetContainersOptions) ([]Container, error)

func (*Platform) GetImage

func (p *Platform) GetImage(ctx context.Context, nameOrID string) (*Image, error)

func (*Platform) GetVersion

func (p *Platform) GetVersion(ctx context.Context) (string, string, error)

func (*Platform) Graph

func (p *Platform) Graph(ctx context.Context) (*graph.Graph[platform.Node], error)

Graph implements platform.Platform. SEE: https://docs.docker.com/reference/api/engine/version/v1.47/

type Resource

type Resource interface {
	platform.Node
	Kind() ResourceKind
	Name() string
	String() string
}

type ResourceKind

type ResourceKind string

Jump to

Keyboard shortcuts

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