api

package
v0.0.0-...-b53b6ad Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2020 License: MIT Imports: 3 Imported by: 1

Documentation

Index

Constants

View Source
const (
	PluginsDir    = "./plugins"
	CmdSymbolName = "Commands"
	DefaultPrompt = "gosh>"
)

Variables

This section is empty.

Functions

func GetPrompt

func GetPrompt(ctx context.Context) string

func GetStdout

func GetStdout(ctx context.Context) io.Writer

Types

type Command

type Command interface {
	Name() string
	Usage() string
	ShortDesc() string
	LongDesc() string
	Exec(context.Context, []string) (context.Context, error)
}

Command represents an executable a command

type Commands

type Commands interface {
	Module
	Registry() map[string]Command
}

Commands a plugin that contains one or more command

type Module

type Module interface {
	Init(context.Context) error
}

Module a plugin that can be initialized

Jump to

Keyboard shortcuts

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