endpoint

package
v0.9.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 6, 2019 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Command = cli.Command{
	Name:      "endpoint",
	ShortName: "e",
	Usage:     "Endpoint related sub-command",
	Subcommands: cli.Commands{
		ListCommand,
	},
}
View Source
var ListCommand = cli.Command{
	Name:        "list",
	ShortName:   "ls",
	Usage:       "List endpoints",
	Description: "list all endpoints if no <endpoint id> is given, otherwise, only list the given endpoint",
	Flags: []cli.Flag{
		cli.StringFlag{
			Name:     "service-id",
			Usage:    "`<service id>` whose endpoints are to be searched",
			Required: true,
		},
		cli.IntFlag{
			Name:     "limit",
			Usage:    "returns at most `<limit>` endpoints",
			Required: false,
			Value:    100,
		},
		cli.StringFlag{
			Name:     "keyword",
			Usage:    "`<keyword>` of the endpoint name to search for, empty to search all",
			Required: false,
			Value:    "",
		},
	},
	Action: func(ctx *cli.Context) error {
		serviceID := ctx.String("service-id")
		limit := ctx.Int("limit")
		keyword := ctx.String("keyword")

		endpoints := client.SearchEndpoints(ctx, serviceID, keyword, limit)

		return display.Display(ctx, endpoints)
	},
}

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL