Categorygithub.com/s4heid/go-docker
modulepackage
1.0.0
Repository: https://github.com/s4heid/go-docker.git
Documentation: pkg.go.dev

# README

docker.io/go-docker

Official Go SDK for Docker

Dependency management tool is required

This repository describes its dependencies in a Gopkg.toml file as created by the dep tool.

It also uses semantic versioning, and requires its users to use dep-compatible dependency management tools to ensure stability and avoid breaking changes.

The canonical import path is docker.io/go-docker.

Note: you may download it with go get -d docker.io/go-docker, but if you omit -d, you may have compile errors. Hence the dep approach is preferred.

How to use dep in your project

You can use any tool that is compatible, but in the examples below we are using dep.

Adding dependency to vendor/

$ cd $GOPATH/src/myproject
$ dep init 					# only if first time use
$ dep ensure -add docker.io/go-docker@v1    	# to use the latest version of v1.x.y

Updating dependency

$ cd $GOPATH/src/myproject
$ edit Gopkg.toml
$ dep ensure

Reference Documentation

godoc.org/docker.io/go-docker

Issues

Feel free to open issues on the Github issue tracker.

# Packages

No description provided by the author
No description provided by the author

# Functions

CheckRedirect specifies the policy for dealing with redirect responses: If the request is non-GET return `ErrRedirect`.
ErrorConnectionFailed returns an error with host in the error message when connection to docker daemon failed.
IsErrConfigNotFound returns true if the error is caused when a config is not found.
IsErrConnectionFailed returns true if the error is caused by connection failed.
IsErrContainerNotFound returns true if the error is caused when a container is not found in the docker host.
IsErrImageNotFound returns true if the error is caused when an image is not found in the docker host.
IsErrNetworkNotFound returns true if the error is caused when a network is not found in the docker host.
IsErrNodeNotFound returns true if the error is caused when a node is not found.
IsErrNotFound returns true if the error is a NotFound error, which is returned by the API when some object is not found.
IsErrNotImplemented returns true if the error is a NotImplemented error.
IsErrPluginNotFound returns true if the error is caused when a plugin is not found in the docker host.
IsErrPluginPermissionDenied returns true if the error is caused when a user denies a plugin's permissions.
IsErrSecretNotFound returns true if the error is caused when a secret is not found.
IsErrServiceNotFound returns true if the error is caused when a service is not found.
IsErrTaskNotFound returns true if the error is caused when a task is not found.
IsErrUnauthorized returns true if the error is caused when a remote registry authentication fails.
IsErrVolumeNotFound returns true if the error is caused when a volume is not found in the docker host.
NewClient initializes a new API client for the given host and API version.
NewEnvClient initializes a new API client based on environment variables.
ParseHost parses a url string, validates the strings is a host url, and returns the parsed host as: protocol, address, and base path Deprecated: use ParseHostURL.
ParseHostURL parses a url string, validates the string is a host url, and returns the parsed URL.

# Constants

DefaultDockerHost defines os specific default if DOCKER_HOST is unset.

# Variables

ErrRedirect is the error returned by checkRedirect when the request is non-GET.

# Structs

Client is the API client that performs all operations against a docker server.

# Interfaces

APIClient is an interface that clients that talk with a docker server must implement.
CheckpointAPIClient defines API client methods for the checkpoints.
CommonAPIClient is the common methods between stable and experimental versions of APIClient.
ConfigAPIClient defines API client methods for configs.
ContainerAPIClient defines API client methods for the containers.
DistributionAPIClient defines API client methods for the registry.
ImageAPIClient defines API client methods for the images.
NetworkAPIClient defines API client methods for the networks.
NodeAPIClient defines API client methods for the nodes.
PluginAPIClient defines API client methods for the plugins.
SecretAPIClient defines API client methods for secrets.
ServiceAPIClient defines API client methods for the services.
SwarmAPIClient defines API client methods for the swarm.
SystemAPIClient defines API client methods for the system.
VolumeAPIClient defines API client methods for the volumes.