Add Docker ID integration

This commit is contained in:
Jonathan Leibiusky @xetorthio
2017-10-10 15:27:38 -03:00
parent 978fd78127
commit e9dd97e4e4
11 changed files with 125 additions and 10 deletions

View File

@@ -353,6 +353,16 @@ func (store *storage) UserPut(user *types.User) error {
return nil
}
func (store *storage) UserGet(id string) (*types.User, error) {
store.rw.Lock()
defer store.rw.Unlock()
if user, found := store.db.Users[id]; !found {
return nil, NotFoundError
} else {
return user, nil
}
}
func (store *storage) load() error {
file, err := os.Open(store.path)