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 DeleteCommand
- func (c *DeleteCommand) DeleteServiceInstances(appHostGUIDs []string, appHostNames []string) ExecutionStatus
- func (c *DeleteCommand) DeleteServiceInstancesContent(appHostGUIDs []string, appHostNames []string) ExecutionStatus
- func (c *DeleteCommand) Execute(args []string) ExecutionStatus
- func (c *DeleteCommand) GetPluginCommand() plugin.Command
- type ExecutionStatus
- type GetCommand
- func (c *GetCommand) Execute(args []string) ExecutionStatus
- func (c *GetCommand) GetAppHostFilesContents(output string, appHostNameOrGUID string, isName bool) ExecutionStatus
- func (c *GetCommand) GetApplicationFilesContents(output string, appName string, appVersion string, appHostNameOrGUID string, ...) ExecutionStatus
- func (c *GetCommand) GetFileContents(output string, filePath string, appHostNameOrGUID string, isName bool) ExecutionStatus
- func (c *GetCommand) GetPluginCommand() plugin.Command
- type HTML5Command
- type HTML5Context
- type InfoCommand
- type InfoRecord
- type ListCommand
- func (c *ListCommand) Execute(args []string) ExecutionStatus
- func (c *ListCommand) GetPluginCommand() plugin.Command
- func (c *ListCommand) ListAppApps(appName string, showUrls bool) ExecutionStatus
- func (c *ListCommand) ListAppFiles(appName string, appVersion string, appHostNameOrID string, isName bool) 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 DeleteCommand ¶ added in v1.1.0
type DeleteCommand struct {
HTML5Command
}
DeleteCommand delete service instances and all dependent service keys
func (*DeleteCommand) DeleteServiceInstances ¶ added in v1.1.0
func (c *DeleteCommand) DeleteServiceInstances(appHostGUIDs []string, appHostNames []string) ExecutionStatus
DeleteServiceInstances delete service instances by app-host-ids, including all dependent service keys
func (*DeleteCommand) DeleteServiceInstancesContent ¶ added in v1.1.0
func (c *DeleteCommand) DeleteServiceInstancesContent(appHostGUIDs []string, appHostNames []string) ExecutionStatus
DeleteServiceInstancesContent delete service instances content by app-host-ids
func (*DeleteCommand) Execute ¶ added in v1.1.0
func (c *DeleteCommand) Execute(args []string) ExecutionStatus
Execute executes plugin command
func (*DeleteCommand) GetPluginCommand ¶ added in v1.1.0
func (c *DeleteCommand) GetPluginCommand() plugin.Command
GetPluginCommand returns the plugin command details
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, appHostNameOrGUID string, isName bool) 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, appHostNameOrGUID string, isName bool) ExecutionStatus
GetApplicationFilesContents get application files contents
func (*GetCommand) GetFileContents ¶
func (c *GetCommand) GetFileContents(output string, filePath string, appHostNameOrGUID string, isName bool) 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 InfoCommand ¶ added in v1.1.0
type InfoCommand struct {
HTML5Command
}
InfoCommand get service instance information dependent service keys
func (*InfoCommand) Execute ¶ added in v1.1.0
func (c *InfoCommand) Execute(args []string) ExecutionStatus
Execute executes plugin command
func (*InfoCommand) GetPluginCommand ¶ added in v1.1.0
func (c *InfoCommand) GetPluginCommand() plugin.Command
GetPluginCommand returns the plugin command details
func (*InfoCommand) GetServiceInfos ¶ added in v1.1.0
func (c *InfoCommand) GetServiceInfos(appHostGUIDs []string, appHostNames []string) ExecutionStatus
GetServiceInfos get html5-apps-repo service app-host plan info
type InfoRecord ¶ added in v1.1.0
type InfoRecord struct { AppHostName string AppHostGUID string SizeLimit int Used int Status string ChangedOn string }
InfoRecord service information record
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, showUrls bool) ExecutionStatus
ListAppApps get list of HTML5 applications available in CF application context
func (*ListCommand) ListAppFiles ¶
func (c *ListCommand) ListAppFiles(appName string, appVersion string, appHostNameOrID string, isName bool) 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, redeploy bool) ExecutionStatus
PushHTML5Applications push HTML5 applications to app-host-id