github.com/mook-as/cf-cli@v7.0.0-beta.28.0.20200120190804-b91c115fae48+incompatible/cf/api/apifakes/old_fake_password_repo.go (about) 1 package apifakes 2 3 import "code.cloudfoundry.org/cli/cf/errors" 4 5 type OldFakePasswordRepo struct { 6 Score string 7 ScoredPassword string 8 9 UpdateUnauthorized bool 10 UpdateNewPassword string 11 UpdateOldPassword string 12 } 13 14 func (repo *OldFakePasswordRepo) 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 }