api/volume.go
func volumeInfo(w http.ResponseWriter, r *http.Request, t auth.Token) error {
	v, err := volume.Load(r.URL.Query().Get(":name"))
	if err != nil {
		if err == volume.ErrVolumeNotFound {
			return &errors.HTTP{Code: http.StatusNotFound, Message: err.Error()}
		}
		return err
	}
	canRead := permission.Check(t, permission.PermVolumeRead, contextsForVolume(v)...)
	if !canRead {
		return permission.ErrUnauthorized
	}
	_, err = v.LoadBinds()
	if err != nil {
		return err
	}
	w.Header().Set("Content-Type", "application/json")
	return json.NewEncoder(w).Encode(&v)
}
func volumeInfo(w http.ResponseWriter, r *http.Request, t auth.Token) error {
	v, err := volume.Load(r.URL.Query().Get(":name"))
	if err != nil {
		if err == volume.ErrVolumeNotFound {
			return &errors.HTTP{Code: http.StatusNotFound, Message: err.Error()}
		}
		return err
	}
	canRead := permission.Check(t, permission.PermVolumeRead, contextsForVolume(v)...)
	if !canRead {
		return permission.ErrUnauthorized
	}
	_, err = v.LoadBinds()
	if err != nil {
		return err
	}
	w.Header().Set("Content-Type", "application/json")
	return json.NewEncoder(w).Encode(&v)
}
// title: volume info
// path: /volumes/{name}
// method: GET
// produce: application/json
// responses:
//   200: Show volume
//   401: Unauthorized
//   404: Volume not found