4f0d95fa | package client // import "github.com/docker/docker/client" |
7c36a1af | import ( |
7d62e40f | "context" |
3d86b0c7 | "io" |
7c36a1af | ) // PluginPush pushes a plugin to a registry |
3d86b0c7 | func (cli *Client) PluginPush(ctx context.Context, name string, registryAuth string) (io.ReadCloser, error) { |
7c36a1af | headers := map[string][]string{"X-Registry-Auth": {registryAuth}} resp, err := cli.post(ctx, "/plugins/"+name+"/push", nil, nil, headers) |
3d86b0c7 | if err != nil { return nil, err } return resp.body, nil |
7c36a1af | } |