{"modulePath":"github.com/hyperhq/hyperd","version":"v1.1.0","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package api\n\n## Variables\n\n```go\nvar (\n\tErrConnectionRefused = errors.New(\"Cannot connect to the Hyper daemon. Is 'hyperd' running on this host?\")\n)\n```\n\n## Types\n\n```go\ntype APIInterface interface {\n\tLogin(auth dockertypes.AuthConfig, response *dockertypes.AuthResponse) (remove bool, err error)\n\n\tAttach(container string, tty bool, stdin io.ReadCloser, stdout, stderr io.Writer) error\n\tCreateExec(containerId string, command []byte, tty bool) (string, error)\n\tStartExec(containerId, execId string, tty bool, stdin io.ReadCloser, stdout, stderr io.Writer) error\n\tExecVM(podID string, command []byte, stdin io.ReadCloser, stdout, stderr io.Writer) error\n\n\tWinResize(id, tag string, height, width int) error\n\n\tList(item, pod, vm string) (*engine.Env, error)\n\tCreateContainer(podID string, spec interface{}) (string, int, error)\n\tStartContainer(container string) error\n\tGetContainerInfo(container string) (*types.ContainerInfo, error)\n\tGetContainerByPod(podId string) (string, error)\n\tGetExitCode(container, tag string, wait bool) error\n\tContainerLogs(container, since string, timestamp, follow, stdout, stderr bool, tail string) (io.ReadCloser, string, error)\n\tKillContainer(container string, sig int) error\n\tStopContainer(container string) error\n\tRemoveContainer(container string) error\n\n\tGetPodInfo(podName string) (*types.PodInfo, error)\n\tCreatePod(spec interface{}) (string, int, error)\n\tStartPod(podId string) error\n\tStopPod(podId, stopVm string) (int, string, error)\n\tRmPod(id string) error\n\tPausePod(podId string) error\n\tUnpausePod(podId string) error\n\tKillPod(pod string, sig int) error\n\n\t// PortMapping APIs\n\tListPortMappings(podId string) ([]*types.PortMapping, error)\n\tAddPortMappings(podId string, pms []*types.PortMapping) error\n\tDeletePortMappings(podId string, pms []*types.PortMapping) error\n\n\tBuild(name string, hasBody bool, body io.Reader) (io.ReadCloser, string, error)\n\tCommit(container, repo, author, message string, changes []string, pause bool) (string, error)\n\tLoad(body io.Reader, name string, refs map[string]string) (io.ReadCloser, string, error)\n\tSave(imageIDs []string, format string, refs map[string]string) (io.ReadCloser, error)\n\tGetImages(all, quiet bool) (*engine.Env, error)\n\tRemoveImage(image string, noprune, force bool) (*engine.Env, error)\n\tPull(image string, authConfig dockertypes.AuthConfig) (io.ReadCloser, string, int, error)\n\tPush(tag, repo string, authConfig dockertypes.AuthConfig) (io.ReadCloser, string, int, error)\n\n\tCreateVm(cpu, mem int, async bool) (id string, err error)\n\tRmVm(vm string) (err error)\n\n\tInfo() (*engine.Env, error)\n}\n```\n\n```go\ntype Client struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc NewClient(proto, addr string, tlsConfig *tls.Config) *Client\n```\n\n```go\nfunc (c *Client) AddPortMappings(podId string, pms []*types.PortMapping) error\n```\n\n```go\nfunc (cli *Client) Attach(container string, tty bool, stdin io.ReadCloser, stdout, stderr io.Writer) error\n```\n\n```go\nfunc (cli *Client) AuthHeader(orig map[string][]string, auth types.AuthConfig) (map[string][]string, error)\n```\n\n```go\nfunc (cli *Client) Build(name string, hasBody bool, body io.Reader) (io.ReadCloser, string, error)\n```\n\n```go\nfunc (cli *Client) Commit(container, repo, author, message string, changes []string, pause bool) (string, error)\n```\n\n```go\nfunc (cli *Client) ContainerLogs(container, since string, timestamp, follow, stdout, stderr bool, tail string) (io.ReadCloser, string, error)\n```\n\n```go\nfunc (cli *Client) CreateContainer(podID string, spec interface{}) (string, int, error)\n```\n\n```go\nfunc (cli *Client) CreateExec(container string, command []byte, tty bool) (string, error)\n```\n\n```go\nfunc (cli *Client) CreatePod(spec interface{}) (string, int, error)\n```\n\n```go\nfunc (cli *Client) CreateVm(cpu, mem int, async bool) (id string, err error)\n```\n\n```go\nfunc (c *Client) DeletePortMappings(podId string, pms []*types.PortMapping) error\n```\n\n```go\nfunc (cli *Client) ExecVM(podID string, command []byte, stdin io.ReadCloser, stdout, stderr io.Writer) error\n```\n\n```go\nfunc (cli *Client) GetContainerByPod(podId string) (string, error)\n```\n\n```go\nfunc (cli *Client) GetContainerInfo(container string) (*types.ContainerInfo, error)\n```\n\n```go\nfunc (cli *Client) GetExitCode(containerId, execId string, wait bool) error\n```\n\n```go\nfunc (cli *Client) GetImages(all, quiet bool) (*engine.Env, error)\n```\n\n```go\nfunc (cli *Client) GetPodInfo(podName string) (*types.PodInfo, error)\n```\n\n```go\nfunc (cli *Client) HTTPClient() *http.Client\n```\n\n```go\nfunc (cli *Client) Info() (*engine.Env, error)\n```\n\n```go\nfunc (cli *Client) KillContainer(container string, sig int) error\n```\n\n```go\nfunc (cli *Client) KillPod(pod string, sig int) error\n```\n\n```go\nfunc (cli *Client) List(item, pod, vm string) (*engine.Env, error)\n```\n\n```go\nfunc (c *Client) ListPortMappings(podId string) ([]*types.PortMapping, error)\n```\n\n```go\nfunc (cli *Client) Load(body io.Reader, name string, refs map[string]string) (io.ReadCloser, string, error)\n```\n\n```go\nfunc (cli *Client) Login(auth types.AuthConfig, response *types.AuthResponse) (remove bool, err error)\n```\n\n```go\nfunc (cli *Client) PausePod(podId string) error\n```\n\n```go\nfunc (cli *Client) Pull(image string, authConfig types.AuthConfig) (io.ReadCloser, string, int, error)\n```\n\n```go\nfunc (cli *Client) Push(tag, repo string, authConfig types.AuthConfig) (io.ReadCloser, string, int, error)\n```\n\n```go\nfunc (cli *Client) RemoveContainer(container string) error\n```\n\n```go\nfunc (cli *Client) RemoveImage(image string, noprune, force bool) (*engine.Env, error)\n```\n\n```go\nfunc (cli *Client) RmPod(id string) error\n```\n\n```go\nfunc (cli *Client) RmVm(vm string) (err error)\n```\n\n```go\nfunc (cli *Client) Save(imageIDs []string, format string, refs map[string]string) (io.ReadCloser, error)\n```\n\n```go\nfunc (cli *Client) StartContainer(container string) error\n```\n\n```go\nfunc (cli *Client) StartExec(containerId, execId string, tty bool, stdin io.ReadCloser, stdout, stderr io.Writer) error\n```\n\n```go\nfunc (cli *Client) StartPod(podId string) error\n```\n\n```go\nfunc (cli *Client) StopContainer(container string) error\n```\n\n```go\nfunc (cli *Client) StopPod(podId, stopVm string) (int, string, error)\n```\n\n```go\nfunc (cli *Client) UnpausePod(podId string) error\n```\n\n```go\nfunc (cli *Client) WinResize(containerId, execId string, height, width int) error\n```\n\n```go\ntype PortMappingList struct {\n\tPortMappings []*types.PortMapping `json:\"portMappings\"`\n}\n```\n\n```go\ntype StatusError struct {\n\tStatus     string\n\tStatusCode int\n}\n```\nAn StatusError reports an unsuccessful exit by a command.\n\n```go\nfunc (e StatusError) Error() string\n```\n\n","path":"github.com/hyperhq/hyperd/client/api","name":"api","synopsis":"","isRedistributable":true}
