func DownloadVolVer(cli bce.Client, name string,
	version string) (*VolDownloadResult, error) {
	url := PREFIX_V3VOL + "/" + name + "/version/" + version + "/zipfile"
	result := &VolDownloadResult{}
	req := &GetHttpReq{Url: url, Result: result}
	err := Get(cli, req)
	if err != nil {
		return nil, err
	}
	return result, nil
}
DownloadVolVer - get the download address of a specific version of volume

PARAMS:
- cli: the client agent which can perform sending request
- name: the request volume name
- version: the request volume version
RETURNS:
- *VolDownloadResult: the result
- error: nil if ok otherwise the specific error
package api
import (
	"strconv"
	"github.com/baidubce/bce-sdk-go/bce"
	"github.com/baidubce/bce-sdk-go/http"
)
const (
	PREFIX_V3VOLTPL = "/v3/volumeTemplate"
	PREFIX_V3VOL    = "/v3/volume"
)
func ListVolumeTpl(cli bce.Client) (*ListVolTemplate, error) {
	url := PREFIX_V3VOLTPL
	result := &ListVolTemplate{}
	req := &GetHttpReq{Url: url, Result: result}
	err := Get(cli, req)
	if err != nil {
		return nil, err
	}
	return result, nil
}
func CreateVolume(cli bce.Client, cvr *CreateVolReq) (*VolumeResult, error) {
	url := PREFIX_V3VOL
	result := &VolumeResult{}
	req := &PostHttpReq{Url: url, Result: result, Body: cvr}
	err := Post(cli, req)
	if err != nil {
		return nil, err
	}
	return result, nil
}
func ListVolume(cli bce.Client, lvr *ListVolumeReq) (*ListVolumeResult, error) {
	url := PREFIX_V3VOL
	result := &ListVolumeResult{}
	params := map[string]string{
		"pageNo":   strconv.Itoa(lvr.PageNo),
		"pageSize": strconv.Itoa(lvr.PageSize)}
	if lvr.Name != "" {
		params["name"] = lvr.Name
	}
	if lvr.Tag != "" {
		params["tag"] = lvr.Tag
	}
	req := &GetHttpReq{Url: url, Result: result, Params: params}
	err := Get(cli, req)
	if err != nil {
		return nil, err
	}
	return result, nil
}
func GetVolume(cli bce.Client, name string) (*VolumeResult, error) {
	url := PREFIX_V3VOL + "/" + name
	result := &VolumeResult{}
	req := &GetHttpReq{Url: url, Result: result}
	err := Get(cli, req)
	if err != nil {
		return nil, err
	}
	return result, nil
}
func EditVolume(cli bce.Client, name string, evr *EditVolumeReq) (*VolumeResult, error) {
	url := PREFIX_V3VOL + "/" + name
	result := &VolumeResult{}
	req := &PostHttpReq{Url: url, Result: result, Body: evr}
	err := Put(cli, req)
	if err != nil {
		return nil, err
	}
	return result, nil
}
func DeleteVolume(cli bce.Client, name string) error {
	url := PREFIX_V3VOL + "/" + name
	req := &bce.BceRequest{}
	req.SetUri(url)
	req.SetMethod(http.DELETE)
	resp := &bce.BceResponse{}
	if err := cli.SendRequest(req, resp); err != nil {
		return err
	}
	if resp.IsFail() {
		return resp.ServiceError()
	}
	return nil
}
func ListVolumeVer(cli bce.Client, nv *NameVersion) (*ListVolumeVerResult, error) {
	url := PREFIX_V3VOL + "/" + nv.Name + "/version"
	params := map[string]string{}
	if nv.Version != "" {
		params["version"] = nv.Version
	}
	result := &ListVolumeVerResult{}
	req := &GetHttpReq{Url: url, Result: result}
	err := Get(cli, req)
	if err != nil {
		return nil, err
	}
	return result, nil
}
func PubVolumeVer(cli bce.Client, name string) (*VolumeResult, error) {
	url := PREFIX_V3VOL + "/" + name + "/version"
	result := &VolumeResult{}
	req := &PostHttpReq{Url: url, Result: result}
	err := Post(cli, req)
	if err != nil {
		return nil, err
	}
	return result, nil
}