generator

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2022 License: MPL-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Function

type Function struct {
	Name            string
	InterpreterPath string
	ReturnsError    bool
	Schema          schema.Schema
}

func GenerateInterpreter

func GenerateInterpreter(
	parseCtx *parser.Context,
	fun *ast.FuncType,
	pkg string,
	name string,
	comments []*ast.Comment,
) ([]byte, *Function, error)

GenerateInterpreter generates an interpreter for the given function

func ParseFunction

func ParseFunction(
	parseCtx *parser.Context,
	fun *ast.FuncType,
	pkg string,
	name string,
	metadata *parser.Metadata,
) (*Function, error)

ParseFunction parses all results of a given go function

type InterpreterTemplateParams

type InterpreterTemplateParams struct {
	Package          string
	Name             string
	FuncNameSelector string
	FuncName         string
	Schema           schema.Schema
	Imports          map[string]string
	ReturnsError     bool
}

Jump to

Keyboard shortcuts

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