cli

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2021 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

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

Functions

func ExportDriverConfig

func ExportDriverConfig(ctx context.Context, flag *flag.FlagSet) func(Parameters) *ydb.DriverConfig

func ExportSessionPool

func ExportSessionPool(flag *flag.FlagSet) func() *table.SessionPool

func ExportTLSConfig

func ExportTLSConfig(flag *flag.FlagSet) func() *tls.Config

func ExportTableClient

func ExportTableClient(flag *flag.FlagSet) func() *table.Client

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 {
	Endpoint string
	Database string
	Path     string

	Args []string
}

Jump to

Keyboard shortcuts

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