cmds

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DeleteFlags = []cli.Flag{
	&cli.StringFlag{
		Name:        "key",
		Aliases:     []string{"k"},
		Usage:       "key to locate",
		Required:    true,
		Destination: &deleteArgs.Key,
	},
	&cli.Int64Flag{
		Name:        "revision",
		Aliases:     []string{"r"},
		Usage:       "revision of store data",
		Value:       0,
		Destination: &deleteArgs.Revision,
	},
}
View Source
var GetFlags = []cli.Flag{
	&cli.StringFlag{
		Name:        "key",
		Aliases:     []string{"k"},
		Usage:       "key to locate",
		Required:    true,
		Destination: &getArgs.Key,
	},
}
View Source
var ListFlags = []cli.Flag{
	&cli.StringFlag{
		Name:        "key",
		Aliases:     []string{"k"},
		Usage:       "key to locate",
		Required:    true,
		Destination: &listArgs.Key,
	},
	&cli.IntFlag{
		Name:        "revision",
		Aliases:     []string{"r"},
		Usage:       "revision of store data",
		Value:       0,
		Destination: &listArgs.Revision,
	},
}
View Source
var PutFlags = []cli.Flag{
	&cli.StringFlag{
		Name:        "key",
		Aliases:     []string{"k"},
		Usage:       "key to locate",
		Required:    true,
		Destination: &putArgs.Key,
	},
	&cli.StringFlag{
		Name:        "value",
		Aliases:     []string{"v"},
		Usage:       "value to store",
		Required:    true,
		Destination: &putArgs.Value,
	},
}
View Source
var UpdateFlags = []cli.Flag{
	&cli.StringFlag{
		Name:        "key",
		Aliases:     []string{"k"},
		Usage:       "key to locate",
		Required:    true,
		Destination: &updateArgs.Key,
	},
	&cli.StringFlag{
		Name:        "value",
		Aliases:     []string{"v"},
		Usage:       "value to store",
		Required:    true,
		Destination: &updateArgs.Value,
	},
	&cli.Int64Flag{
		Name:        "revision",
		Aliases:     []string{"r"},
		Usage:       "revision of store data",
		Value:       0,
		Destination: &updateArgs.Revision,
	},
}

Functions

func NewApp

func NewApp() *cli.App

func NewDeleteCommand

func NewDeleteCommand() *cli.Command

func NewGetCommand

func NewGetCommand() *cli.Command

func NewListCommand

func NewListCommand() *cli.Command

func NewPutCommand

func NewPutCommand() *cli.Command

func NewUpdateCommand

func NewUpdateCommand() *cli.Command

Types

type ConfigFlags

type ConfigFlags struct {
	Endpoints   string
	LeaderElect bool
	CAFile      string
	CertFile    string
	KeyFile     string
}
var (
	Config ConfigFlags
)

func (ConfigFlags) Client

func (config ConfigFlags) Client() (clientk.Client, error)

func (ConfigFlags) ToETCDConfig

func (config ConfigFlags) ToETCDConfig() endpoint.ETCDConfig

type DeleteArgs

type DeleteArgs struct {
	Key      string
	Revision int64
}

type GetArgs

type GetArgs struct {
	Key string
}

type ListArgs

type ListArgs struct {
	Key      string
	Revision int
}

type PutArgs

type PutArgs struct {
	Key   string
	Value string
}

type UpdateArgs

type UpdateArgs struct {
	Key      string
	Revision int64
	Value    string
}

Jump to

Keyboard shortcuts

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