shell

package
v1.22.0 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option func(*options)

Option that can be used to tweak shell parameters.

func WithDialFunc

func WithDialFunc(dial client.DialFunc) Option

WithDialFunc sets a custom dial function for connecting to cowsql endpoints.

func WithDriverName

func WithDriverName(name string) Option

WithDriverName sets a custom name for the registered cowsql driver. The default is "cowsql".

func WithFormat

func WithFormat(format string) Option

WithFormat specifies the output format.

type Shell

type Shell struct {
	// contains filtered or unexported fields
}

Shell can be used to implement interactive prompts for inspecting a cowsql database.

func New

func New(database string, store client.NodeStore, options ...Option) (*Shell, error)

New creates a new Shell connected to the given database.

func (*Shell) Process

func (s *Shell) Process(ctx context.Context, line string) (string, error)

Process a single input line.

Jump to

Keyboard shortcuts

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