Documentation ¶
Index ¶
- type App
- type BaseCommand
- func (c *BaseCommand) GetContext() (Context, error)
- func (c *BaseCommand) GetOrg() (plugin_models.Organization, error)
- func (c *BaseCommand) GetSpace() (plugin_models.Space, error)
- func (c *BaseCommand) GetUsername() (string, error)
- func (c *BaseCommand) Initialize(name string, cliConnection plugin.CliConnection)
- func (c *BaseCommand) InitializeAll(name string, cliConnection plugin.CliConnection)
- type Command
- type Context
- type ExecutionStatus
- type GetCommand
- func (c *GetCommand) Execute(args []string) ExecutionStatus
- func (c *GetCommand) GetAppHostFilesContents(output string, appHostGUID string) ExecutionStatus
- func (c *GetCommand) GetApplicationFilesContents(output string, appName string, appVersion string, appHostGUID string) ExecutionStatus
- func (c *GetCommand) GetFileContents(output string, filePath string, appHostGUID string) ExecutionStatus
- func (c *GetCommand) GetPluginCommand() plugin.Command
- type HTML5Command
- type HTML5Context
- type ListCommand
- func (c *ListCommand) Execute(args []string) ExecutionStatus
- func (c *ListCommand) GetPluginCommand() plugin.Command
- func (c *ListCommand) ListAppApps(appName string) ExecutionStatus
- func (c *ListCommand) ListAppFiles(appName string, appVersion string, appHostID string) ExecutionStatus
- func (c *ListCommand) ListSpaceApps() ExecutionStatus
- type Model
- type PushCommand
- type Service
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseCommand ¶
type BaseCommand struct { Name string CliConnection plugin.CliConnection }
BaseCommand base command for all commands
func (*BaseCommand) GetContext ¶
func (c *BaseCommand) GetContext() (Context, error)
GetContext initializes and retrieves the Context
func (*BaseCommand) GetOrg ¶
func (c *BaseCommand) GetOrg() (plugin_models.Organization, error)
GetOrg gets the current org name from the CLI connection
func (*BaseCommand) GetSpace ¶
func (c *BaseCommand) GetSpace() (plugin_models.Space, error)
GetSpace gets the current space name from the CLI connection
func (*BaseCommand) GetUsername ¶
func (c *BaseCommand) GetUsername() (string, error)
GetUsername gets the username from the CLI connection
func (*BaseCommand) Initialize ¶
func (c *BaseCommand) Initialize(name string, cliConnection plugin.CliConnection)
Initialize initializes the command with the specified name and CLI connection
func (*BaseCommand) InitializeAll ¶
func (c *BaseCommand) InitializeAll(name string, cliConnection plugin.CliConnection)
InitializeAll initializes the command with the specified name and CLI connection.
type Command ¶
type Command interface { GetPluginCommand() plugin.Command Initialize(name string, cliConnection plugin.CliConnection) Execute(args []string) ExecutionStatus }
Command is an interface that should be implemented by all commands
type ExecutionStatus ¶
type ExecutionStatus int
ExecutionStatus command execution status
const ( // Success command executed sucessfully Success ExecutionStatus = 0 // Failure command failed to execute Failure ExecutionStatus = 1 )
func (ExecutionStatus) ToInt ¶
func (status ExecutionStatus) ToInt() int
ToInt returns integer representation of command execution status
type GetCommand ¶
type GetCommand struct {
HTML5Command
}
GetCommand fetches the HTML5 application file contents
func (*GetCommand) Execute ¶
func (c *GetCommand) Execute(args []string) ExecutionStatus
Execute executes plugin command
func (*GetCommand) GetAppHostFilesContents ¶
func (c *GetCommand) GetAppHostFilesContents(output string, appHostGUID string) ExecutionStatus
GetAppHostFilesContents get files contents of all applications of app-host-id
func (*GetCommand) GetApplicationFilesContents ¶
func (c *GetCommand) GetApplicationFilesContents(output string, appName string, appVersion string, appHostGUID string) ExecutionStatus
GetApplicationFilesContents get application files contents
func (*GetCommand) GetFileContents ¶
func (c *GetCommand) GetFileContents(output string, filePath string, appHostGUID string) ExecutionStatus
GetFileContents get file contents
func (*GetCommand) GetPluginCommand ¶
func (c *GetCommand) GetPluginCommand() plugin.Command
GetPluginCommand returns the plugin command details
type HTML5Command ¶
type HTML5Command struct {
BaseCommand
}
HTML5Command base struct for HTML5 repository operations
func (*HTML5Command) CleanHTML5Context ¶
func (c *HTML5Command) CleanHTML5Context(html5Context HTML5Context) error
CleanHTML5Context clean-up temporary service keys and service instances created to form HTML5 context
func (*HTML5Command) GetHTML5Context ¶
func (c *HTML5Command) GetHTML5Context(context Context) (HTML5Context, error)
GetHTML5Context get HTML5 context
type HTML5Context ¶
type HTML5Context struct { // Name of html5-apps-repo service in marketplace ServiceName string // All available CF services Services []models.CFService // Pointer to html5-apps-repo service HTML5AppsRepoService *models.CFService // List of html5-apps-repo service plans HTML5AppsRepoServicePlans []models.CFServicePlan // Pointer to html5-apps-repo app-runtime service plan HTML5AppRuntimeServicePlan *models.CFServicePlan // Service instances of html5-apps-repo app-runtime service plan HTML5AppRuntimeServiceInstances []models.CFServiceInstance // Pointer to html5-apps-repo app-runtime service instance HTML5AppRuntimeServiceInstance *models.CFServiceInstance // Service key of html5-apps-repo app-runtime service plan HTML5AppRuntimeServiceInstanceKey *models.CFServiceKey // Access token of html5-apps-repo app-runtime service key HTML5AppRuntimeServiceInstanceKeyToken string }
HTML5Context HTML5 context struct
type ListCommand ¶
type ListCommand struct {
HTML5Command
}
ListCommand prints the list of HTML5 applications deployed using multiple instances of html5-apps-repo service app-host plan
func (*ListCommand) Execute ¶
func (c *ListCommand) Execute(args []string) ExecutionStatus
Execute executes plugin command
func (*ListCommand) GetPluginCommand ¶
func (c *ListCommand) GetPluginCommand() plugin.Command
GetPluginCommand returns the plugin command details
func (*ListCommand) ListAppApps ¶
func (c *ListCommand) ListAppApps(appName string) ExecutionStatus
ListAppApps get list of HTML5 applications available in CF application context
func (*ListCommand) ListAppFiles ¶
func (c *ListCommand) ListAppFiles(appName string, appVersion string, appHostID string) ExecutionStatus
ListAppFiles get list of application files
func (*ListCommand) ListSpaceApps ¶
func (c *ListCommand) ListSpaceApps() ExecutionStatus
ListSpaceApps get list of applications for current space
type PushCommand ¶
type PushCommand struct {
HTML5Command
}
PushCommand fetches the HTML5 application file contents
func (*PushCommand) Execute ¶
func (c *PushCommand) Execute(args []string) ExecutionStatus
Execute executes plugin command
func (*PushCommand) GetPluginCommand ¶
func (c *PushCommand) GetPluginCommand() plugin.Command
GetPluginCommand returns the plugin command details
func (*PushCommand) PushHTML5Applications ¶
func (c *PushCommand) PushHTML5Applications(appPaths []string, appHostGUID string) ExecutionStatus
PushHTML5Applications push HTML5 applications to app-host-id