cli

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2022 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewKittyCADClient

func NewKittyCADClient(cfg configGetter, hostname string) (*kittycad.Client, error)

NewKittyCADClient returns an API client for kittycad.io only that borrows from but does not depend on user configuration. TODO: if they are in debug mode, we should set debug mode in the client library.

Types

type Browser

type Browser interface {
	Browse(string) error
}

Browser represents the browser that kittycad will use to open links.

func NewBrowser

func NewBrowser(launcher string, stdout, stderr io.Writer) Browser

NewBrowser creates a new Browser instance.

type CLI

type CLI struct {
	IOStreams *iostreams.IOStreams
	Browser   Browser

	Context context.Context

	KittyCADClient func(string) (*kittycad.Client, error)
	Config         func() (config.Config, error)

	// Executable is the path to the currently invoked kittycad binary
	Executable func() string
}

CLI is the main type for the kittycad command line interface.

func New

func New(ctx context.Context) *CLI

New returns a new CLI instance.

Jump to

Keyboard shortcuts

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