plugin_push.go 373 B

12345678910111213
  1. package client
  2. import (
  3. "golang.org/x/net/context"
  4. )
  5. // PluginPush pushes a plugin to a registry
  6. func (cli *Client) PluginPush(ctx context.Context, name string, registryAuth string) error {
  7. headers := map[string][]string{"X-Registry-Auth": {registryAuth}}
  8. resp, err := cli.post(ctx, "/plugins/"+name+"/push", nil, nil, headers)
  9. ensureReaderClosed(resp)
  10. return err
  11. }