7c36a1af | package client import ( |
3d86b0c7 | "io" |
7c36a1af | "golang.org/x/net/context" ) // 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 | } |