github.com/stchris/docker@v1.4.2-0.20150106053530-1510a324dbd5/registry/types.go (about) 1 package registry 2 3 type SearchResult struct { 4 StarCount int `json:"star_count"` 5 IsOfficial bool `json:"is_official"` 6 Name string `json:"name"` 7 IsTrusted bool `json:"is_trusted"` 8 Description string `json:"description"` 9 } 10 11 type SearchResults struct { 12 Query string `json:"query"` 13 NumResults int `json:"num_results"` 14 Results []SearchResult `json:"results"` 15 } 16 17 type RepositoryData struct { 18 ImgList map[string]*ImgData 19 Endpoints []string 20 Tokens []string 21 } 22 23 type ImgData struct { 24 ID string `json:"id"` 25 Checksum string `json:"checksum,omitempty"` 26 ChecksumPayload string `json:"-"` 27 Tag string `json:",omitempty"` 28 } 29 30 type RegistryInfo struct { 31 Version string `json:"version"` 32 Standalone bool `json:"standalone"` 33 } 34 35 type FSLayer struct { 36 BlobSum string `json:"blobSum"` 37 } 38 39 type ManifestHistory struct { 40 V1Compatibility string `json:"v1Compatibility"` 41 } 42 43 type ManifestData struct { 44 Name string `json:"name"` 45 Tag string `json:"tag"` 46 Architecture string `json:"architecture"` 47 FSLayers []*FSLayer `json:"fsLayers"` 48 History []*ManifestHistory `json:"history"` 49 SchemaVersion int `json:"schemaVersion"` 50 } 51 52 type APIVersion int 53 54 func (av APIVersion) String() string { 55 return apiVersions[av] 56 } 57 58 var DefaultAPIVersion APIVersion = APIVersion1 59 var apiVersions = map[APIVersion]string{ 60 1: "v1", 61 2: "v2", 62 } 63 64 const ( 65 APIVersion1 = iota + 1 66 APIVersion2 67 )