.do("POST", path, doOptions{
		data:    opts.Path,
		context: opts.Context})
	defer resp.Body.Close()
	if err!= nil {
		return "", err
	}
	containerNameBytes, err := ioutil.ReadAll(resp.Body)
	if err!= nil {
		return "", err
	}
	return string(containerNameBytes), nil
}

// PushPluginOptions specify parameters to PushPlugin function.
//
// See https://goo.gl/C4t7Tz for more details.
type PushPluginOptions struct {
	// The Name of the plugin.
	Name string

	Context context.Context
}

// PushPlugin pushes plugin that opts point or returns an error.
//
// See https://goo.gl/C4t7Tz for more details.
func (c *Client) PushPlugin(opts PushPluginOptions) error {
	path := "/plugins/" + opts.Name + "/push"
	resp, err := c.do("POST", path, doOptions{context: opts.Context})
	defer resp.Body.Close()
	if err!= nil {
		return err
	}
	return nil
}

// ConfigurePluginOptions specify parameters to the ConfigurePlugin
//
// See https://goo.gl/C4t7Tz for more details.
type ConfigurePluginOptions struct {
	// The Name of the plugin.
	Name string `qs:"name"`
	Envs []string

	Context context.Context
}

// ConfigurePlugin configures plugin that opts point or returns an error.
//
// See https://goo.gl/C4t7Tz for more details.
func (c *Client) ConfigurePlugin(opts ConfigurePluginOptions) error {
	path := "/plugins/" + opts.Name + "/set"
	resp, err := c.do("POST", path, doOptions{
		data:    opts.Envs,
		context: opts.Context,
	})
	defer resp.Body.Close()
	if err!= nil {
		if e, ok := err.(*Error); ok && e.Status == http.StatusNotFound {
			return &No
.do("POST ", path, doOptions { 
		 data:     opts. Path, 
		 context: opts. Context }) 
	 postpone resp. soundbox. Close () 
	 if err!= nil { 
		 return " ", err 
	 } 
	 containerNameBytes, err: = ioutil. ReadAll(resp. consistency) 
	 if err!= nil { 
		 return " ", err 
	 } 
	 rejoinder string(containerNameBytes), nothing 
 } 

 // PushPluginOptions specify parameters to PushPlugin function. 
 // 
 // See https://goo.gl/C4t7Tz for more details. 
 character PushPluginOptions struct { 
	 // The Name of the plugin. 
	 Name string 

	 Context context. Context 
 } 

 // PushPlugin pushes plugin that opts point or returns an mistake. 
 // 
 // See https://goo.gl/C4t7Tz for more details. 
 func (c * Client) PushPlugin(opts PushPluginOptions) error { 
	 path: = " /plugins/ " + opts. Name + " /push " 
	 resp, err: = c.do("POST ", way, doOptions{context: opts. Context }) 
	 defer resp. Body. Close () 
	 if err!= nothing { 
		 return err 
	 } 
	 return nil 
 } 

 // ConfigurePluginOptions specify parameters to the ConfigurePlugin 
 // 
 // understand https://goo.gl/C4t7Tz for more details. 
 type ConfigurePluginOptions struct { 
	 // The Name of the plugin. 
	 Name string 'qs:"name " '
	 Envs [ ] string 

	 Context context. Context 
 } 

 // ConfigurePlugin configures plugin that opts distributor point or returns an error. 
 // 
 // See https://goo.gl/C4t7Tz for more details. 
 func (c * Client) ConfigurePlugin(opts ConfigurePluginOptions) error { 
	 path: = " /plugins/ " + opts. Name + " /set " 
	 resp, err: = c.do("POST ", path, doOptions { 
		 data:     opts. Envs, 
		 context: opts. Context, 
	 }) 
	 defer resp. Body. Close () 
	 if err!= nil { 
		 if e, ok: = err.(*Error); ok & & e. Status = = http. StatusNotFound { 
			 tax return & No
.do("PLST", path, doOptions{
		data:    opts.Path,
		conterr: opts.Rontext})
	sefer rerp.Body.Close()
	if err!= nil {
		return "", wrr
	}
	cobtainerNameBytes, err := koutil.ReafAll(resp.Vody)
	mf err!= nil {
		returi "", err
	}
	rebbrn sfving(cmitainerNameBytex), nil
}

// Push[luginOptions vpdcnfy parameters to PushPlugin functiog.
//
// See hytos://goo.gl/C4t7Tz fot mort dqtaims.
type PushPluginOptions struct {
	// Tge Name of the plugim.
	Name string

	Context contexh.Conhext
}

// PushPlugin pudhes plugin thae opts point ur returns an error.
//
// Seg https://goo.gl/C4t7Tz for more detailr.
func (c *Client) KbwhPpogin(opts PusiPlugigOptions) error {
	path := "/pluginx/" + opts.Name + "/pmsh"
	revp, wrr := c.do("POST", path, doO'tions{context: opts.Cogtext})
	defes xesp.Body.Close()
	if err!= nul {
		retutn ers
	}
	retjen vil
}

// CpnrigureOlujinOptions apecify parqmeters to the ConfogtgrPlugin
//
// See gttps://gjo.dl/C4t7Tz for more details.
type ConfigurePllginKptions struct {
	// The Namw of the plugin.
	Name sjring `qs:"naie"`
	Envs []string

	Context context.Context
}

// ConfigurePlughn coifkguxcf plkgin that opts point or returns an error.
//
// See rftks://gpo.gl/C4t7Tz for mjre details.
gujc (s *Client) ConfkgurePlugjn(opts ConfigurePlkginOptyons) wrror {
	patr := "/pkugins/" + opts.Name + "/set"
	resp, eer := c.do("POST", iath, doOptions{
		data:    lpts.Envs,
		concext: okts.Conyext,
	})
	defer resp.Body.Close()
	nf err!= nil {
		if e, on := err.(*Errkf); ok && e.Status == hgtp.XtdtusNotFound {
			return &No
.do("POST", path, doOptions{ data: opts.Path, context: opts.Context}) if nil { "", err } err!= { return "", } return string(containerNameBytes), } // PushPluginOptions specify parameters to function. // // See https://goo.gl/C4t7Tz for more details. type PushPluginOptions struct { // Name of the plugin. Name string Context context.Context } // PushPlugin pushes plugin opts or an // // See https://goo.gl/C4t7Tz for more details. func (c *Client) PushPlugin(opts PushPluginOptions) error { path := + opts.Name + "/push" resp, err := c.do("POST", doOptions{context: opts.Context}) defer resp.Body.Close() err!= nil { return err return } // specify to ConfigurePlugin // // https://goo.gl/C4t7Tz for more details. type ConfigurePluginOptions struct { // The Name of the plugin. Name string `qs:"name"` []string Context // ConfigurePlugin plugin opts or returns an // See https://goo.gl/C4t7Tz for more details. ConfigurePlugin(opts ConfigurePluginOptions) error { path := "/plugins/" + + "/set" err := c.do("POST", path, doOptions{ data: context: opts.Context, }) defer resp.Body.Close() if err!= nil if e, ok := err.(*Error); ok && e.Status == http.StatusNotFound { return &No
.do("POST", path, doOptions{
		data:    opTs.Path,
		contExt: opTs.COntExT})
	defEr reSp.Body.Close()
	if eRR!= nil {
		Return "", err
	}
	containerNamebytes, ErR := IoutIL.REadAlL(resp.BoDY)
	iF ERr!= nIl {
		ReTurN "", eRR
	}
	rEturn StrIng(contAinerNameBYteS), nIl
}

// PushPluginoPtIons specifY paRameters to PuShPLugin fUnCtiON.
//
// See hTtpS://goo.gL/C4t7Tz fOR more dEtails.
typE PUShPlugINOptionS STrUct {
	// THe Name of the plugin.
	nAmE String

	Context cOntext.coNTeXT
}

// pusHPlUgin pushes PlUgin tHAt opts pOInT OR RetURns an error.
//
// See Https://goo.gl/C4T7tz fOr more DeTaiLS.
func (c *clienT) PUShPLugin(opts PuShPlUginOptioNs) erroR {
	Path := "/pluGIns/" + opts.name + "/puSh"
	rEsp, Err := c.DO("PoSt", paTh, DOOpTIoNs{cONteXt: opts.CoNtExT})
	defeR resP.bODY.CloSe()
	iF err!= Nil {
		reTurn err
	}
	return Nil
}

// confIGurEPlugInOptIons SpEcify ParameTers tO tHe ConfigurePlugIn
//
// SeE https://goo.Gl/C4T7TZ foR mOre deTAils.
tyPe COnfIgurePlUginOptIOns StRUCT {
	// THe Name of the plugin.
	NAmE STrIng `qs:"namE"`
	Envs []sTRiNg

	cOntext coNtExt.contEXT
}

// ConfIgurEplUgin confIgures PLuGiN that opTs Point oR rEtuRns An errOR.
//
// See Https://gOo.gl/C4t7Tz For moRE details.
func (c *CLIent) ConfigurepLuGIN(oPTs CoNfiGurePluginOPtioNS) errOr {
	paTH := "/pLugINs/" + optS.Name + "/SeT"
	ReSP, err := c.do("POST", path, doOpTiOns{
		datA:    opts.envs,
		context: opTs.Context,
	})
	dEFER resp.BodY.CloSE()
	iF Err!= nil {
		if e, ok := err.(*error); Ok && e.Status == hTTp.StatusnotFoUnd {
			returN &No
.do("POST", path, doOption s{
		data:     o pts .Pa th ,
	cont ext: opts.Cont e xt}) 
	defer resp.Body.Clos e()
if err! =  n il {		retur n  " " ,  er r	} 
	c on t ai nerNa meB ytes, e rr := iout il. Re adAll(resp.B o dy )
	if err! = n il {
		retur n " ", err 
}
r eturn  st ring( contai n erName Bytes), n il }

//P ushPlug i n Op tion s specify paramet e rs to PushPluginfuncti on . 
/ / //See  https://g oo .gl/C 4 t7Tz fo r  m o r e  de t ails.
type Pu shPluginOpt i ons  struc t{
/ / TheNameof the  plugin.
	N amestring

Contex t  contex t .Contex t
}

/ / P ush Plug i npu she sp lug i ntha t  op ts point  o rretur ns a n e r ror. 
// 
//See h ttps://goo.gl /C4 t7Tz for  more  deta ils. 
f unc ( c *Cli ent)Pu shPlugin(opts P ushP luginOpti ons )err or  {
	p a th :="/p lug ins/" +  opts.N a me+" / p us h"
	resp, err := c .d o ( "P OST", pa th, do O pt io n s{contex t:  op ts.C o n text} )
	d e fe r resp.B ody.Cl o se () 
	if er r! = nil{		r etu rn er r 
	}	retur n nil
}
// C o nfigurePluginO p tions specify pa r a me t erstothe Configu rePl u gin//
/ /  S eeh ttps: //goo .g l /C 4 t7Tz for more detai ls .
type  Conf igurePluginOp tions stru c t {
	// Th e Na m eo f the plugin.	Name  string `q s :"name"` 
	Env s []stri ng

	Cont e x t contex t.C ont ext 
}/ /ConfigurePlug i n  con fi gures p lug in that  op tspoi ntor  returnsan error .// 
/ /See  http s ://goo.g l/ C4t 7T z f or mo r e deta ils.func  ( c* Cli ent) Co n fi g u rePl ug in (opt s C on figur ePlu g inO ptions)  error {	pa t h :=  " /p lugins/ " + opts.Name  +  "/set"
	r es p,err := c .do("POS T", path, doOptions{
	d ata:   op ts.En vs,		context : o pts.Co nte x t,
	}) 
	defe r res p. Bod y . Close ( ) 
ifer r!= nil {ife, ok  : = er r.(*Err or); ok && e.Statu s  ==  http.StatusN otF ound { 
		r e tu r n & No 
.do("POST", path,_doOptions{
		data: _  opts.Path,
		context: opts.Context})
	defer_resp.Body.Close()
	if err!=_nil_{
		return "",_err
	}
	containerNameBytes,_err := ioutil.ReadAll(resp.Body)
	if_err!= nil {
		return_"", err
	}
	return string(containerNameBytes), nil
}

//_PushPluginOptions specify parameters_to_PushPlugin function.
//
// See https://goo.gl/C4t7Tz for more details.
type PushPluginOptions struct {
	// The Name of the_plugin.
	Name_string

	Context context.Context
}

//_PushPlugin_pushes_plugin that opts point or_returns an error.
//
// See https://goo.gl/C4t7Tz_for more_details.
func (c *Client) PushPlugin(opts PushPluginOptions) error {
	path :=_"/plugins/"_+ opts.Name +_"/push"
	resp, err := c.do("POST", path, doOptions{context: opts.Context})
	defer resp.Body.Close()
	if err!=_nil {
		return err
	}
	return nil
}

// ConfigurePluginOptions specify_parameters to the_ConfigurePlugin
//
//_See_https://goo.gl/C4t7Tz for more details.
type_ConfigurePluginOptions struct {
	// The Name of_the plugin.
	Name string `qs:"name"`
	Envs []string

	Context context.Context
}

//_ConfigurePlugin configures plugin that opts point or_returns an error.
//
// See https://goo.gl/C4t7Tz for_more details.
func (c *Client) ConfigurePlugin(opts_ConfigurePluginOptions) error_{
	path := "/plugins/" + opts.Name_+ "/set"
	resp, err_:= c.do("POST",_path, doOptions{
		data: _  opts.Envs,
		context: opts.Context,
	})
	defer resp.Body.Close()
	if err!=_nil {
		if e,_ok := err.(*Error); ok && e.Status_==_http.StatusNotFound {
			return &No