github.com/asifdxtreme/cli@v6.1.3-0.20150123051144-9ead8700b4ae+incompatible/cf/api/fakes/fake_pwd_repo.go (about) 1 package fakes 2 3 import "github.com/cloudfoundry/cli/cf/errors" 4 5 type FakePasswordRepo struct { 6 Score string 7 ScoredPassword string 8 9 UpdateUnauthorized bool 10 UpdateNewPassword string 11 UpdateOldPassword string 12 } 13 14 func (repo *FakePasswordRepo) UpdatePassword(old string, new string) (apiErr error) { 15 repo.UpdateOldPassword = old 16 repo.UpdateNewPassword = new 17 18 if repo.UpdateUnauthorized { 19 apiErr = errors.NewHttpError(401, "unauthorized", "Authorization Failed") 20 } 21 22 return 23 }