func (c *Client) SetPluginConfig(pluginType, name, version string, key string, value ctypes.ConfigValue) *SetPluginConfigResult {
	r := &SetPluginConfigResult{}
	b, err := json.Marshal(map[string]ctypes.ConfigValue{key: value})
	if err != nil {
		r.Err = err
		return r
	}
	resp, err := c.do("PUT", fmt.Sprintf("/plugins/%s/%s/%s/config", pluginType, url.QueryEscape(name), version), ContentTypeJSON, b)
	if err != nil {
		r.Err = err
		return r
	}
	switch resp.Meta.Type {
	case rbody.SetPluginConfigItemType:
		config := resp.Body.(*rbody.SetPluginConfigItem)
		r = &SetPluginConfigResult{config, nil}
	case rbody.ErrorType:
		r.Err = resp.Body.(*rbody.Error)
	default:
		r.Err = ErrAPIResponseMetaType
	}
	return r
}
SetPluginConfig sets the plugin config given the type, name and version
of a plugin.  Like GetPluginConfig if the type, name and version are all
empty strings the plugin config is set for all plugins.  When config data
is set it is merged with the existing data if present.
package client
import (
	"encoding/json"
	"fmt"
	"net/url"
	"github.com/intelsdi-x/snap/core/ctypes"
	"github.com/intelsdi-x/snap/mgmt/rest/v1/rbody"
)
func (c *Client) GetPluginConfig(pluginType, name, version string) *GetPluginConfigResult {
	r := &GetPluginConfigResult{}
	resp, err := c.do("GET", fmt.Sprintf("/plugins/%s/%s/%s/config", pluginType, url.QueryEscape(name), version), ContentTypeJSON)
	if err != nil {
		r.Err = err
		return r
	}
	switch resp.Meta.Type {
	case rbody.PluginConfigItemType:
		config := resp.Body.(*rbody.PluginConfigItem)
		r = &GetPluginConfigResult{config, nil}
	case rbody.ErrorType:
		r.Err = resp.Body.(*rbody.Error)
	default:
		r.Err = ErrAPIResponseMetaType
	}
	return r
}