forked from TrueCloudLab/distribution
registry: getting Endpoint ironned out
Signed-off-by: Vincent Batts <vbatts@redhat.com>
This commit is contained in:
parent
48b43c2645
commit
d629bebce2
6 changed files with 177 additions and 103 deletions
|
@ -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
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue