Documentation ¶
Index ¶
- Variables
- func CheckTarget(config commands.Config, targetedOrganizationRequired bool, ...) error
- func ConvertPluginToCommandInfo(plugin configv3.PluginCommand) v2actions.CommandInfo
- func HandleError(err error) error
- func LongestCommandName(cmds map[string]v2actions.CommandInfo, pluginCmds []configv3.PluginCommand) int
- func LongestFlagWidth(flags []v2actions.CommandFlag) int
- func NewCloudControllerClient(config commands.Config) (*ccv2.CloudControllerClient, error)
- type APIRequestError
- type ApplicationNotFoundError
- type HelpCategory
- type InvalidSSLCertError
- type NoAPISetError
- type NoTargetedOrgError
- type NoTargetedSpaceError
- type NotLoggedInError
- type ServiceInstanceNotFoundError
Constants ¶
This section is empty.
Variables ¶
View Source
var CommonHelpCategoryList = []HelpCategory{ { CategoryName: "Before getting started:", CommandList: [][]string{ {"config", "login", "target"}, {"help", "logout", ""}, }, }, { CategoryName: "Application lifecycle:", CommandList: [][]string{ {"apps", "logs", "set-env"}, {"push", "ssh", "create-app-manifest"}, {"start", "app", ""}, {"stop", "env", ""}, {"restart", "scale", ""}, {"restage", "events", ""}, }, }, { CategoryName: "Services integration:", CommandList: [][]string{ {"marketplace", "create-user-provided-service"}, {"services", "update-user-provided-service"}, {"create-service", "create-service-key"}, {"update-service", "delete-service-key"}, {"delete-service", "service-keys"}, {"service", "service-key"}, {"bind-service", "bind-route-service"}, {"unbind-service", "unbind-route-service"}, }, }, { CategoryName: "Route and domain management:", CommandList: [][]string{ {"routes", "delete-route", "create-domain"}, {"domains", "map-route", ""}, {"create-route", "unmap-route", ""}, }, }, { CategoryName: "Space management:", CommandList: [][]string{ {"spaces", "create-space", "set-space-role"}, {"space-users", "delete-space", "unset-space-role"}, }, }, { CategoryName: "Org management:", CommandList: [][]string{ {"orgs", "set-org-role"}, {"org-users", "unset-org-role"}, }, }, { CategoryName: "CLI plugin management:", CommandList: [][]string{ {"plugins", "add-plugin-repo", "repo-plugins"}, {"install-plugin", "list-plugin-repos", ""}, }, }, }
View Source
var HelpCategoryList = []HelpCategory{ { CategoryName: "GETTING STARTED:", CommandList: [][]string{ {"help", "version", "login", "logout", "passwd", "target"}, {"api", "auth"}, }, }, { CategoryName: "APPS:", CommandList: [][]string{ {"apps", "app"}, {"push", "scale", "delete", "rename"}, {"start", "stop", "restart", "restage", "restart-app-instance"}, {"events", "files", "logs"}, {"env", "set-env", "unset-env"}, {"stacks", "stack"}, {"copy-source", "create-app-manifest"}, {"get-health-check", "set-health-check", "enable-ssh", "disable-ssh", "ssh-enabled", "ssh"}, }, }, { CategoryName: "SERVICES:", CommandList: [][]string{ {"marketplace", "services", "service"}, {"create-service", "update-service", "delete-service", "rename-service"}, {"create-service-key", "service-keys", "service-key", "delete-service-key"}, {"bind-service", "unbind-service"}, {"bind-route-service", "unbind-route-service"}, {"create-user-provided-service", "update-user-provided-service"}, }, }, { CategoryName: "ORGS:", CommandList: [][]string{ {"orgs", "org"}, {"create-org", "delete-org", "rename-org"}, }, }, { CategoryName: "SPACES:", CommandList: [][]string{ {"spaces", "space"}, {"create-space", "delete-space", "rename-space"}, {"allow-space-ssh", "disallow-space-ssh", "space-ssh-allowed"}, }, }, { CategoryName: "DOMAINS:", CommandList: [][]string{ {"domains", "create-domain", "delete-domain", "create-shared-domain", "delete-shared-domain"}, {"router-groups"}, }, }, { CategoryName: "ROUTES:", CommandList: [][]string{ {"routes", "create-route", "check-route", "map-route", "unmap-route", "delete-route", "delete-orphaned-routes"}, }, }, { CategoryName: "BUILDPACKS:", CommandList: [][]string{ {"buildpacks", "create-buildpack", "update-buildpack", "rename-buildpack", "delete-buildpack"}, }, }, { CategoryName: "USER ADMIN:", CommandList: [][]string{ {"create-user", "delete-user"}, {"org-users", "set-org-role", "unset-org-role"}, {"space-users", "set-space-role", "unset-space-role"}, }, }, { CategoryName: "ORG ADMIN:", CommandList: [][]string{ {"quotas", "quota", "set-quota"}, {"create-quota", "delete-quota", "update-quota"}, {"share-private-domain", "unshare-private-domain"}, }, }, { CategoryName: "SPACE ADMIN:", CommandList: [][]string{ {"space-quotas", "space-quota"}, {"create-space-quota", "update-space-quota", "delete-space-quota"}, {"set-space-quota", "unset-space-quota"}, }, }, { CategoryName: "SERVICE ADMIN:", CommandList: [][]string{ {"service-auth-tokens", "create-service-auth-token", "update-service-auth-token", "delete-service-auth-token"}, {"service-brokers", "create-service-broker", "update-service-broker", "delete-service-broker", "rename-service-broker"}, {"migrate-service-instances", "purge-service-offering", "purge-service-instance"}, {"service-access", "enable-service-access", "disable-service-access"}, }, }, { CategoryName: "SECURITY GROUP:", CommandList: [][]string{ {"security-group", "security-groups", "create-security-group", "update-security-group", "delete-security-group", "bind-security-group", "unbind-security-group"}, {"bind-staging-security-group", "staging-security-groups", "unbind-staging-security-group"}, {"bind-running-security-group", "running-security-groups", "unbind-running-security-group"}, }, }, { CategoryName: "ENVIRONMENT VARIABLE GROUPS:", CommandList: [][]string{ {"running-environment-variable-group", "staging-environment-variable-group", "set-staging-environment-variable-group", "set-running-environment-variable-group"}, }, }, { CategoryName: "FEATURE FLAGS:", CommandList: [][]string{ {"feature-flags", "feature-flag", "enable-feature-flag", "disable-feature-flag"}, }, }, { CategoryName: "ADVANCED:", CommandList: [][]string{ {"curl", "config", "oauth-token", "ssh-code"}, }, }, { CategoryName: "ADD/REMOVE PLUGIN REPOSITORY:", CommandList: [][]string{ {"add-plugin-repo", "remove-plugin-repo", "list-plugin-repos", "repo-plugins"}, }, }, { CategoryName: "ADD/REMOVE PLUGIN:", CommandList: [][]string{ {"plugins", "install-plugin", "uninstall-plugin"}, }, }, }
Functions ¶
func CheckTarget ¶
func CheckTarget(config commands.Config, targetedOrganizationRequired bool, targetedSpaceRequired bool) error
CheckTarget confirms that the user is logged in. Optionally it will also check if an organization and space are targeted.
func ConvertPluginToCommandInfo ¶
func ConvertPluginToCommandInfo(plugin configv3.PluginCommand) v2actions.CommandInfo
func HandleError ¶
func LongestCommandName ¶
func LongestCommandName(cmds map[string]v2actions.CommandInfo, pluginCmds []configv3.PluginCommand) int
func LongestFlagWidth ¶
func LongestFlagWidth(flags []v2actions.CommandFlag) int
func NewCloudControllerClient ¶
func NewCloudControllerClient(config commands.Config) (*ccv2.CloudControllerClient, error)
Types ¶
type APIRequestError ¶
type APIRequestError struct {
Err error
}
func (APIRequestError) Error ¶
func (e APIRequestError) Error() string
type ApplicationNotFoundError ¶
type ApplicationNotFoundError struct {
Name string
}
func (ApplicationNotFoundError) Error ¶
func (e ApplicationNotFoundError) Error() string
type HelpCategory ¶
type InvalidSSLCertError ¶
type InvalidSSLCertError struct {
API string
}
func (InvalidSSLCertError) Error ¶
func (e InvalidSSLCertError) Error() string
type NoAPISetError ¶
type NoAPISetError struct {
BinaryName string
}
func (NoAPISetError) Error ¶
func (e NoAPISetError) Error() string
type NoTargetedOrgError ¶
type NoTargetedOrgError struct {
BinaryName string
}
func (NoTargetedOrgError) Error ¶
func (e NoTargetedOrgError) Error() string
type NoTargetedSpaceError ¶
type NoTargetedSpaceError struct {
BinaryName string
}
func (NoTargetedSpaceError) Error ¶
func (e NoTargetedSpaceError) Error() string
type NotLoggedInError ¶
type NotLoggedInError struct {
BinaryName string
}
func (NotLoggedInError) Error ¶
func (e NotLoggedInError) Error() string
type ServiceInstanceNotFoundError ¶
type ServiceInstanceNotFoundError struct {
Name string
}
func (ServiceInstanceNotFoundError) Error ¶
func (e ServiceInstanceNotFoundError) Error() string
Click to show internal directories.
Click to hide internal directories.