github.com/khulnasoft-lab/khulnasoft@v26.0.1-0.20240328202558-330a6f959fe0+incompatible/client/plugin_push.go (about) 1 package client // import "github.com/docker/docker/client" 2 3 import ( 4 "context" 5 "io" 6 "net/http" 7 8 "github.com/docker/docker/api/types/registry" 9 ) 10 11 // PluginPush pushes a plugin to a registry 12 func (cli *Client) PluginPush(ctx context.Context, name string, registryAuth string) (io.ReadCloser, error) { 13 resp, err := cli.post(ctx, "/plugins/"+name+"/push", nil, nil, http.Header{ 14 registry.AuthHeader: {registryAuth}, 15 }) 16 if err != nil { 17 return nil, err 18 } 19 return resp.body, nil 20 }