reqres

package
v1.39.0 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeExtension

func DecodeExtension(node *orderedmap.OrderedMap, ename string, v interface{}) bool

DecodeExtension decodes the extension node["ename"] and stores its data into the value pointed to by v.

returns true if ename was found and could be decoded without error conversion of extension YAML into a Go value.

func NewRequester

func NewRequester() (*Request, *Response)

Does all the input handling, and marshalling for you

To enable debuging add the arguments debug and debugfile to the call of this command, without furoc "debug debugfile=./sample/fullyaml.yaml"

To create a debug file use the argument "debugfileout=./sample/fullyaml.yaml" with furoc

Types

type AST

type AST struct {
	Config            map[string]interface{}            `yaml:"config"` // contains the config of the spec project, this can be relevant
	InstalledServices map[string]*serviceAst.ServiceAst `yaml:"installedServices"`
	InstalledTypes    map[string]*typeAst.TypeAst       `yaml:"installedTypes"`
	Services          map[string]*serviceAst.ServiceAst `yaml:"services"`
	Types             map[string]*typeAst.TypeAst       `yaml:"types"`
	AllTypes          map[string]*typeAst.TypeAst       // build this after receiving
	AllServices       map[string]*serviceAst.ServiceAst // build this after receiving

}

type Request

type Request struct {
	Parameters   []string
	ParameterMap map[string]string
	AST          AST
	Debug        bool
}

func (Request) Fprintln

func (Request) Fprintln(i ...interface{})

print what you want to the stderr console and not to the reqres

type Response

func NewResponser

func NewResponser() *Response

Creates a responser which holds the files you want to send back to protoc.

func (*Response) AddFile

func (r *Response) AddFile(file *TargetFile)

Add a file to the responser, duplicate filename checks are done in furoc.

func (*Response) SendResponse

func (r *Response) SendResponse(debug bool)

Send the encoded message response back to furoc

type TargetFile

type TargetFile struct {
	Filename string // full qualified name from out dir. You can start with /
	Content  []byte // the file content
}

Jump to

Keyboard shortcuts

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