github.com/loggregator/cli@v6.33.1-0.20180224010324-82334f081791+incompatible/cf/api/apifakes/old_fake_app_summary_repo.go (about) 1 package apifakes 2 3 import ( 4 "code.cloudfoundry.org/cli/cf/errors" 5 "code.cloudfoundry.org/cli/cf/models" 6 ) 7 8 type OldFakeAppSummaryRepo struct { 9 GetSummariesInCurrentSpaceApps []models.Application 10 11 GetSummaryErrorCode string 12 GetSummaryAppGUID string 13 GetSummarySummary models.Application 14 } 15 16 func (repo *OldFakeAppSummaryRepo) GetSummariesInCurrentSpace() (apps []models.Application, apiErr error) { 17 apps = repo.GetSummariesInCurrentSpaceApps 18 return 19 } 20 21 func (repo *OldFakeAppSummaryRepo) GetSummary(appGUID string) (summary models.Application, apiErr error) { 22 repo.GetSummaryAppGUID = appGUID 23 summary = repo.GetSummarySummary 24 25 if repo.GetSummaryErrorCode != "" { 26 apiErr = errors.NewHTTPError(400, repo.GetSummaryErrorCode, "Error") 27 } 28 29 return 30 }