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