cli

package
v2.12.15 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2022 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrPrintUsage = fmt.Errorf("")

Functions

func Run

func Run(cmd Command)

Types

type Command

type Command interface {
	Run(context.Context, Parameters) error
	ExportFlags(context.Context, *flag.FlagSet)
}

type CommandFunc

type CommandFunc func(context.Context, Parameters) error

func (CommandFunc) ExportFlags

func (f CommandFunc) ExportFlags(context.Context, *flag.FlagSet)

func (CommandFunc) Run

func (f CommandFunc) Run(ctx context.Context, params Parameters) error

type Parameters

type Parameters struct {
	Args           []string
	ConnectParams  connect.ConnectParams
	ConnectTimeout time.Duration
	// contains filtered or unexported fields
}

func (*Parameters) Database

func (p *Parameters) Database() string

func (*Parameters) Prefix

func (p *Parameters) Prefix() string

Jump to

Keyboard shortcuts

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