github.com/loggregator/cli@v6.33.1-0.20180224010324-82334f081791+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 }