inputter

package
v0.7.3 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2019 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package inputter implements input interfaces to map user input to actual request schema.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrUnknownOneofFieldName = errors.New("unknown oneof field name")
	ErrUnknownEnumName       = errors.New("unknown enum name")
	EORF                     = errors.New("end of repeated field")
)

Functions

This section is empty.

Types

type JSONFile

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

func NewJSONFile

func NewJSONFile(in io.Reader) *JSONFile

func (*JSONFile) Input

func (i *JSONFile) Input(reqType entity.Message) (proto.Message, error)

type PromptInputter

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

PromptInputter is an implementation of inputting method. it has common logic to input fields interactively. in normal, go-prompt is used as prompt.

func NewPrompt

func NewPrompt(prefixFormat string, env env.Environment) *PromptInputter

func (*PromptInputter) Input

func (i *PromptInputter) Input(reqType entity.Message) (proto.Message, error)

Input is an implementation of port.Inputter

Jump to

Keyboard shortcuts

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