github.com/mook-as/cf-cli@v7.0.0-beta.28.0.20200120190804-b91c115fae48+incompatible/cf/api/apifakes/old_fake_buildpack_bits_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 OldFakeBuildpackBitsRepository struct { 9 UploadBuildpackErr bool 10 UploadBuildpackAPIResponse error 11 UploadBuildpackPath string 12 } 13 14 func (repo *OldFakeBuildpackBitsRepository) UploadBuildpack(buildpack models.Buildpack, dir string) error { 15 if repo.UploadBuildpackErr { 16 return errors.New("Invalid buildpack") 17 } 18 19 repo.UploadBuildpackPath = dir 20 return repo.UploadBuildpackAPIResponse 21 }