View Source DockerAPI.Connection (DockerAPI v0.4.0)

Link to this section Summary

Link to this section Types

@type body() :: map() | list() | String.t() | nil
@type endpoint() :: String.t()
@type headers() :: [{header_name :: String.t(), header_value :: String.t()}, ...]
@type identity_token() :: String.t()
@type params() :: map() | list() | String.t()
@type path() :: String.t()
@type t() :: %DockerAPI.Connection{
  endpoint: endpoint(),
  identity_token: identity_token() | nil,
  unix_socket: unix_socket() | nil
}
@type unix_socket() :: String.t()

Link to this section Functions

Link to this function

build_request(method, conn, path, params, headers, body \\ nil)

View Source
@spec build_request(
  method :: Finch.Request.method(),
  conn :: t(),
  path :: path(),
  params :: params(),
  headers :: headers(),
  body :: body()
) :: Finch.Request.t()
Link to this function

delete(conn, path, params, headers)

View Source
@spec delete(
  conn :: t(),
  path :: path(),
  params :: params(),
  headers :: headers()
) :: {:ok, binary()} | {:error, Exception.t()}
Link to this function

get(conn, path, params, headers)

View Source
@spec get(conn :: t(), path :: path(), params :: params(), headers :: headers()) ::
  {:ok, binary()} | {:error, Exception.t()}
Link to this function

head(conn, path, params, headers)

View Source
@spec head(conn :: t(), path :: path(), params :: params(), headers :: headers()) ::
  {:ok, headers()} | {:error, Exception.t()}
Link to this function

new(endpoint \\ "http://localhost/", unix_socket \\ "/var/run/docker.sock", identity_token \\ nil)

View Source
@spec new(
  endpoint :: endpoint(),
  unix_socket :: unix_socket(),
  identity_token :: identity_token()
) :: t()
Link to this function

post(conn, path, params, body, headers)

View Source
@spec post(
  conn :: t(),
  path :: path(),
  params :: params(),
  body :: body(),
  headers :: headers()
) :: {:ok, binary()} | {:error, Exception.t()}
Link to this function

put(conn, path, params, body, headers)

View Source
@spec put(
  conn :: t(),
  path :: path(),
  params :: params(),
  body :: body(),
  headers :: headers()
) :: {:ok, binary()} | {:error, Exception.t()}