registry: getting Endpoint ironned out

Signed-off-by: Vincent Batts <vbatts@redhat.com>
This commit is contained in:
Vincent Batts 2014-08-26 16:21:04 -07:00 committed by Derek McGowan
parent 48b43c2645
commit d629bebce2
6 changed files with 177 additions and 103 deletions

View file

@ -31,3 +31,21 @@ type RegistryInfo struct {
Version string `json:"version"`
Standalone bool `json:"standalone"`
}
type APIVersion int
func (av APIVersion) String() string {
return apiVersions[av]
}
var DefaultAPIVersion APIVersion = APIVersion1
var apiVersions = map[APIVersion]string{
1: "v1",
2: "v2",
}
const (
_ = iota
APIVersion1 = iota
APIVersion2
)