Move IndexInfo and ServiceConfig types to api/types/registry/registry.go
Signed-off-by: Daniel Nephin <dnephin@gmail.com>
This commit is contained in:
parent
6fc54d049b
commit
aead731d54
9 changed files with 87 additions and 141 deletions
|
@ -16,6 +16,7 @@ import (
|
|||
"time"
|
||||
|
||||
"github.com/docker/distribution/reference"
|
||||
registrytypes "github.com/docker/docker/api/types/registry"
|
||||
"github.com/docker/docker/opts"
|
||||
"github.com/gorilla/mux"
|
||||
|
||||
|
@ -150,22 +151,22 @@ func makeHTTPSURL(req string) string {
|
|||
return testHTTPSServer.URL + req
|
||||
}
|
||||
|
||||
func makeIndex(req string) *IndexInfo {
|
||||
index := &IndexInfo{
|
||||
func makeIndex(req string) *registrytypes.IndexInfo {
|
||||
index := ®istrytypes.IndexInfo{
|
||||
Name: makeURL(req),
|
||||
}
|
||||
return index
|
||||
}
|
||||
|
||||
func makeHTTPSIndex(req string) *IndexInfo {
|
||||
index := &IndexInfo{
|
||||
func makeHTTPSIndex(req string) *registrytypes.IndexInfo {
|
||||
index := ®istrytypes.IndexInfo{
|
||||
Name: makeHTTPSURL(req),
|
||||
}
|
||||
return index
|
||||
}
|
||||
|
||||
func makePublicIndex() *IndexInfo {
|
||||
index := &IndexInfo{
|
||||
func makePublicIndex() *registrytypes.IndexInfo {
|
||||
index := ®istrytypes.IndexInfo{
|
||||
Name: IndexServer,
|
||||
Secure: true,
|
||||
Official: true,
|
||||
|
@ -173,7 +174,7 @@ func makePublicIndex() *IndexInfo {
|
|||
return index
|
||||
}
|
||||
|
||||
func makeServiceConfig(mirrors []string, insecureRegistries []string) *ServiceConfig {
|
||||
func makeServiceConfig(mirrors []string, insecureRegistries []string) *registrytypes.ServiceConfig {
|
||||
options := &Options{
|
||||
Mirrors: opts.NewListOpts(nil),
|
||||
InsecureRegistries: opts.NewListOpts(nil),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue