mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
* making things work * #506 - Add ability to login to a private docker registry * Rolling back "make things work" to test them out more. * Rolling back "make things work" to test them out more. * credentials from docker/config.json if ENV is missing * should get docker auth info just in the init * update glide lock * update glide * Switched to new go dep tool, glide is too frikin annoying. * Updated circle builds to use dep * Added GOPATH/bin to path. * Added GOPATH/bin to path. * Using regular make test, instead of docker one (not sure why it was using the docker one?).
23 lines
370 B
Go
23 lines
370 B
Go
package runner
|
|
|
|
import (
|
|
"strings"
|
|
)
|
|
|
|
type dockerRegistry struct {
|
|
Name string `json:"name"`
|
|
Username string `json:"username"`
|
|
Password string `json:"password"`
|
|
}
|
|
|
|
type dockerRegistries []dockerRegistry
|
|
|
|
func (t dockerRegistries) Find(name string) *dockerRegistry {
|
|
for _, v := range t {
|
|
if strings.HasSuffix(v.Name, name) {
|
|
return &v
|
|
}
|
|
}
|
|
return nil
|
|
}
|