forked from cloudfoundry/cli
-
Notifications
You must be signed in to change notification settings - Fork 0
/
fake_app_displayer.go
35 lines (28 loc) · 996 Bytes
/
fake_app_displayer.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
package applicationfakes
import (
"code.cloudfoundry.org/cli/cf/commandregistry"
"code.cloudfoundry.org/cli/cf/flags"
"code.cloudfoundry.org/cli/cf/models"
"code.cloudfoundry.org/cli/cf/requirements"
)
type FakeAppDisplayer struct {
AppToDisplay models.Application
OrgName string
SpaceName string
}
func (displayer *FakeAppDisplayer) ShowApp(app models.Application, orgName, spaceName string) error {
displayer.AppToDisplay = app
return nil
}
func (displayer *FakeAppDisplayer) MetaData() commandregistry.CommandMetadata {
return commandregistry.CommandMetadata{Name: "app"}
}
func (displayer *FakeAppDisplayer) SetDependency(_ commandregistry.Dependency, _ bool) commandregistry.Command {
return displayer
}
func (displayer *FakeAppDisplayer) Requirements(_ requirements.Factory, _ flags.FlagContext) ([]requirements.Requirement, error) {
return []requirements.Requirement{}, nil
}
func (displayer *FakeAppDisplayer) Execute(_ flags.FlagContext) error {
return nil
}