github.com/dcarley/cf-cli@v6.24.1-0.20170220111324-4225ff346898+incompatible/command/v2/bind_route_service_command.go (about)

     1  package v2
     2  
     3  import (
     4  	"os"
     5  
     6  	flags "github.com/jessevdk/go-flags"
     7  
     8  	"code.cloudfoundry.org/cli/cf/cmd"
     9  	"code.cloudfoundry.org/cli/command"
    10  	"code.cloudfoundry.org/cli/command/flag"
    11  )
    12  
    13  type BindRouteServiceCommand struct {
    14  	RequiredArgs           flag.RouteServiceArgs `positional-args:"yes"`
    15  	ParametersAsJSON       flags.Filename        `short:"c" description:"Valid JSON object containing service-specific configuration parameters, provided inline or in a file. For a list of supported configuration parameters, see documentation for the particular service offering."`
    16  	Hostname               string                `long:"hostname" short:"n" description:"Hostname used in combination with DOMAIN to specify the route to bind"`
    17  	Path                   string                `long:"path" description:"Path used in combination with HOSTNAME and DOMAIN to specify the route to bind"`
    18  	usage                  interface{}           `usage:"CF_NAME bind-route-service DOMAIN SERVICE_INSTANCE [--hostname HOSTNAME] [--path PATH] [-c PARAMETERS_AS_JSON]\n\nEXAMPLES:\n   CF_NAME bind-route-service example.com myratelimiter --hostname myapp --path foo\n   CF_NAME bind-route-service example.com myratelimiter -c file.json\n   CF_NAME bind-route-service example.com myratelimiter -c '{\"valid\":\"json\"}'\n\n   In Windows PowerShell use double-quoted, escaped JSON: \"{\\\"valid\\\":\\\"json\\\"}\"\n   In Windows Command Line use single-quoted, escaped JSON: '{\\\"valid\\\":\\\"json\\\"}'"`
    19  	relatedCommands        interface{}           `related_commands:"routes, services"`
    20  	BackwardsCompatibility bool                  `short:"f" hidden:"true" description:"This is for backwards compatibility"`
    21  }
    22  
    23  func (_ BindRouteServiceCommand) Setup(config command.Config, ui command.UI) error {
    24  	return nil
    25  }
    26  
    27  func (_ BindRouteServiceCommand) Execute(args []string) error {
    28  	cmd.Main(os.Getenv("CF_TRACE"), os.Args)
    29  	return nil
    30  }