cli

package
v0.0.0-beta.3 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2021 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewKittyCADClient

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

NewKittyCADClient returns an API client for kittycad.io only that borrows from but does not depend on user configuration. TODO: if this is not the default server, we should set the server properly. 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() (*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