func ParseNameRef(ref string) (RefType, error) {
	if _, err := uuid.FromString(ref); err == nil {
		return RefTypeID, nil
	}
	return RefTypeName, nil
}
ParseRef parses the api call to determine if the provided ref is
an ID or a name
package common
import (
	"net/url"
	"strings"
	uuid "github.com/satori/go.uuid"
)
const (
	EtcdMaintenanceKey = "maintenance"
)
type RefType int
const (
	RefTypeID RefType = iota
	RefTypePath
	RefTypeName
)
func ParsePathRef(ref string) (RefType, error) {
	ref, err := url.PathUnescape(ref)
	if err != nil {
		return -1, err
	}
	if strings.Contains(ref, "/") {
		return RefTypePath, nil
	}
	return RefTypeID, nil
}