github.com/franc20/ayesa_sap@v7.0.0-beta.28.0.20200124003224-302d4d52fa6c+incompatible/command/v6/map_route_command.go (about) 1 package v6 2 3 import ( 4 "code.cloudfoundry.org/cli/command" 5 "code.cloudfoundry.org/cli/command/flag" 6 "code.cloudfoundry.org/cli/command/translatableerror" 7 ) 8 9 type MapRouteCommand struct { 10 RequiredArgs flag.AppDomain `positional-args:"yes"` 11 Hostname string `long:"hostname" short:"n" description:"Hostname for the HTTP route (required for shared domains)"` 12 Path string `long:"path" description:"Path for the HTTP route"` 13 Port int `long:"port" description:"Port for the TCP route"` 14 RandomPort bool `long:"random-port" description:"Create a random port for the TCP route"` 15 usage interface{} `usage:"Map an HTTP route:\n CF_NAME map-route APP_NAME DOMAIN [--hostname HOSTNAME] [--path PATH]\n\n Map a TCP route:\n CF_NAME map-route APP_NAME DOMAIN (--port PORT | --random-port)\n\nEXAMPLES:\n CF_NAME map-route my-app example.com # example.com\n CF_NAME map-route my-app example.com --hostname myhost # myhost.example.com\n CF_NAME map-route my-app example.com --hostname myhost --path foo # myhost.example.com/foo\n CF_NAME map-route my-app example.com --port 5000 # example.com:5000"` 16 relatedCommands interface{} `related_commands:"create-route, routes"` 17 } 18 19 func (MapRouteCommand) Setup(config command.Config, ui command.UI) error { 20 return nil 21 } 22 23 func (MapRouteCommand) Execute(args []string) error { 24 return translatableerror.UnrefactoredCommandError{} 25 }