controller

package
v0.0.0-...-55db854 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2018 License: MIT Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrUnknownCommand   = errors.New("unknown command")
	ErrArgumentRequired = errors.New("argument required")
	ErrUnknownTarget    = errors.New("unknown target")
)
View Source
var (
	ErrProtoFileRequired = errors.New("least one proto file required")
)

Functions

This section is empty.

Types

type CLI

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

func NewCLI

func NewCLI(name, version string) *CLI

func (*CLI) Error

func (c *CLI) Error(err error)

func (*CLI) Help

func (c *CLI) Help()

func (*CLI) Run

func (c *CLI) Run(args []string) int

func (*CLI) Usage

func (c *CLI) Usage()

type ColoredREPLUI

type ColoredREPLUI struct {
	*REPLUI
}

func (*ColoredREPLUI) ErrPrintln

func (u *ColoredREPLUI) ErrPrintln(s string)

func (*ColoredREPLUI) InfoPrintln

func (u *ColoredREPLUI) InfoPrintln(s string)

type ColoredUI

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

func (*ColoredUI) ErrPrintln

func (u *ColoredUI) ErrPrintln(s string)

func (*ColoredUI) InfoPrintln

func (u *ColoredUI) InfoPrintln(s string)

type Commander

type Commander interface {
	Help() string
	Synopsis() string
	Validate(args []string) error
	Run(args []string) (string, error)
}

type Options

type Options struct {
	Proto []string `arg:"positional,help:.proto files"`

	Interactive bool     `arg:"-i,help:use interactive mode"`
	EditConfig  bool     `arg:"-e,help:edit config file by $EDITOR"`
	Host        string   `arg:"-h,help:gRPC host"`
	Port        string   `arg:"-p,help:gRPC port"`
	Package     string   `arg:"help:default package"`
	Service     string   `arg:"help:default service. evans parse package from this if --package is nothing."`
	Call        string   `arg:"-c,help:call specified RPC"`
	File        string   `arg:"-f,help:the script file which will be executed (used only command-line mode)"`
	Path        []string `arg:"separate,help:proto file path"`
	Header      []string `arg:"separate,help:headers set to each requests"`
	// contains filtered or unexported fields
}

func (*Options) Version

func (o *Options) Version() string

type REPL

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

func NewREPL

func NewREPL(config *config.REPL, env *entity.Env, ui ui, inputPort port.InputPort) *REPL

func (*REPL) Start

func (r *REPL) Start() error

type REPLUI

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

func (*REPLUI) ErrPrintln

func (u *REPLUI) ErrPrintln(s string)

func (*REPLUI) InfoPrintln

func (u *REPLUI) InfoPrintln(s string)

func (*REPLUI) Println

func (u *REPLUI) Println(s string)

type Runnable

type Runnable interface {
	Run(args []string) int
}

type UI

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

func (*UI) ErrPrintln

func (u *UI) ErrPrintln(s string)

func (*UI) ErrWriter

func (u *UI) ErrWriter() io.Writer

func (*UI) InfoPrintln

func (u *UI) InfoPrintln(s string)

func (*UI) Println

func (u *UI) Println(s string)

func (*UI) Writer

func (u *UI) Writer() io.Writer

Jump to

Keyboard shortcuts

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