mode

package
v0.10.11 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2023 License: MIT Imports: 30 Imported by: 0

Documentation

Overview

Package mode provides entrypoints for all modes that are provided from Evans.

Index

Constants

This section is empty.

Variables

View Source
var DefaultCLIReader io.Reader = os.Stdin

DefaultCLIReader is the reader that is read for inputting request values. It is exported for E2E testing.

Functions

func IsCLIMode

func IsCLIMode(file string) bool

IsCLIMode returns whether Evans is launched as CLI mode or not.

func RunAsCLIMode

func RunAsCLIMode(cfg *config.Config, invoker CLIInvoker) error

RunAsCLIMode starts Evans as CLI mode.

func RunAsREPLMode

func RunAsREPLMode(cfg *config.Config, ui cui.UI, cache *cache.Cache) error

Types

type CLIInvoker added in v0.9.0

type CLIInvoker func(context.Context) error

CLIInvoker represents an invokable function for CLI mode.

func NewCallCLIInvoker added in v0.9.0

func NewCallCLIInvoker(ui cui.UI, methodName string, opt *CallCLIInvokerOption) (CLIInvoker, error)

NewCallCLIInvoker returns an CLIInvoker implementation for calling RPCs.

func NewDescribeCLIInvoker added in v0.9.0

func NewDescribeCLIInvoker(ui cui.UI, fqn string) CLIInvoker

func NewListCLIInvoker added in v0.9.0

func NewListCLIInvoker(ui cui.UI, fqn, format string) CLIInvoker

type CallCLIInvokerOption added in v0.10.0

type CallCLIInvokerOption struct {
	Headers      config.Header
	Enrich       bool
	EmitDefaults bool
	FilePath     string // If empty, the invoker tries to read input from stdin.
	FormatType   string
}

Jump to

Keyboard shortcuts

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