docker

package
v0.0.12 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2026 License: MIT Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetNamedVolumesForService

func GetNamedVolumesForService(service *config.Service) []string

Types

type Api

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

func New

func New() *Api

func (*Api) CheckNetwork

func (d *Api) CheckNetwork() bool

func (*Api) ComposeDown added in v0.0.12

func (d *Api) ComposeDown(service config.Service, removeVolumes bool) error

ComposeDown stops and removes a compose project

func (*Api) ComposeLogs added in v0.0.12

func (d *Api) ComposeLogs(service config.Service, follow bool) error

ComposeLogs shows logs from a compose project

func (*Api) ComposeStart added in v0.0.12

func (d *Api) ComposeStart(service config.Service) error

ComposeStart starts a compose project (similar to docker compose start)

func (*Api) ComposeStop added in v0.0.12

func (d *Api) ComposeStop(service config.Service) error

ComposeStop stops a compose project without removing it

func (*Api) ComposeUp added in v0.0.12

func (d *Api) ComposeUp(service config.Service, build bool, recreate bool) error

ComposeUp starts a compose project

func (*Api) Connect

func (d *Api) Connect(name string, customPassword string, web bool) error

func (*Api) Create

func (d *Api) Create(name string) error

func (*Api) CreateNetwork

func (d *Api) CreateNetwork() error

func (*Api) Exists

func (d *Api) Exists(name string) bool

func (*Api) GetContainerLogs added in v0.0.12

func (d *Api) GetContainerLogs(name string, options container.LogsOptions) (io.ReadCloser, error)

func (*Api) GetInfo

func (d *Api) GetInfo(name string) ServiceInfo

func (*Api) ListAvailable

func (d *Api) ListAvailable() []ServiceInfo

func (*Api) ListCreated

func (d *Api) ListCreated() []ServiceInfo

func (*Api) ListRunning

func (d *Api) ListRunning() []ServiceInfo

func (*Api) ListStopped

func (d *Api) ListStopped() []ServiceInfo

func (*Api) Remove

func (d *Api) Remove(name string) error

func (*Api) RemoveVolumes

func (d *Api) RemoveVolumes(names []string)

func (*Api) Start

func (d *Api) Start(name string) error

func (*Api) Stop

func (d *Api) Stop(name string) error

type ComposeLogConsumer added in v0.0.12

type ComposeLogConsumer struct{}

ComposeLogConsumer implements api.LogConsumer interface for streaming logs

func (*ComposeLogConsumer) Err added in v0.0.12

func (l *ComposeLogConsumer) Err(containerName, message string)

func (*ComposeLogConsumer) Log added in v0.0.12

func (l *ComposeLogConsumer) Log(containerName, message string)

func (*ComposeLogConsumer) Status added in v0.0.12

func (l *ComposeLogConsumer) Status(container, msg string)

type ServiceInfo

type ServiceInfo struct {
	Name          string
	ContainerName string
	ID            string
	Image         string
	Version       string
	Ports         []string
	Status        string
	StatusIcon    string
}

Jump to

Keyboard shortcuts

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