docker

package
v0.0.0-...-69b78e6 Latest Latest
Warning

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

Go to latest
Published: May 5, 2026 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AsMap

func AsMap(args ...any) map[string]any

AsMap convert multiple arguments into map[string]any

func Containers

func Containers(containers ...ctypes.Summary) []ctypes.Summary

Containers list of containers

func DetailsResponse

func DetailsResponse(params map[string]any) ctypes.InspectResponse

DetailsResponse mock container details response

func HTTPClient

func HTTPClient(daemonURL string, tlsConfig *tls.Config) (*http.Client, error)

HTTPClient create new http client to connect to the docker daemon

func ImageDetailsResponse

func ImageDetailsResponse(params map[string]any) imagetypes.InspectResponse

ImageDetailsResponse mock image response

func NewAPIClient

func NewAPIClient(dockerHost string, tlsConfig *tls.Config) (*dockerapi.Client, error)

NewAPIClient returns a bare Docker SDK client. Exposed so alternate runtimes (e.g. Podman via the Docker-compat socket) can reuse the HTTP/TLS setup.

func NewClient

func NewClient(dockerHost string, tlsConfig *tls.Config) (ctr.Client, error)

NewClient returns a new Client instance which can be used to interact with the Docker API.

func NewFromAPI

func NewFromAPI(api *dockerapi.Client) (ctr.Client, error)

NewFromAPI wraps an existing Docker SDK client as a ctr.Client. Exposed so alternate runtimes can reuse the Docker implementation via embedding.

func NewTestContainer

func NewTestContainer(params map[string]any) *ctr.Container

NewTestContainer creates a Container directly from params for testing

func Response

func Response(params map[string]any) ctypes.Summary

Response mock single container

Types

This section is empty.

Jump to

Keyboard shortcuts

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