docker

package
v0.16.0-beta.2 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2025 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ResourceKindContainer      = "container"
	ResourceKindSwarmTask      = "swarm/task"
	ResourceKindSwarmService   = "swarm/service"
	ResourceKindSwarmNamespace = "swarm/namespace"
	ResourceKindComposeProject = "compose/project"
	ResourceKindComposeService = "compose/service"
)

Variables

This section is empty.

Functions

func TagName

func TagName(kind ResourceKind) string

Types

type ConfigEntry added in v0.16.0

type ConfigEntry struct {
	Auth     string `json:"auth,omitempty"`
	Username string `json:"username,omitempty"`
	Password string `json:"password,omitempty"`
	Email    string `json:"email,omitempty"`
}

type ConfigFile added in v0.16.0

type ConfigFile struct {
	Auths       map[string]ConfigEntry `json:"auths"`
	HttpHeaders map[string]string      `json:"HttpHeaders,omitempty"`
}

type Container

type Container struct {
	ID      string `json:"Id"`
	Names   []string
	Image   string
	ImageID string
	Labels  map[string]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, dockerURI 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