internal

package
v0.1.21 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2020 License: MPL-2.0 Imports: 28 Imported by: 0

Documentation

Overview

Package internal generated by go-bindata.// sources: template.gotemplate python.gotemplate js.gotemplate ts.gotemplate method_doc.gotemplate ktor.gotemplate

Index

Constants

View Source
const Import = "github.com/reddec/jsonrpc2"

Variables

This section is empty.

Functions

func Asset added in v0.1.2

func Asset(name string) ([]byte, error)

Asset loads and returns the asset for the given name. It returns an error if the asset could not be found or could not be loaded.

func AssetDir added in v0.1.2

func AssetDir(name string) ([]string, error)

AssetDir returns the file names below a certain directory embedded in the file by go-bindata. For example if you run go-bindata on data/... and data contains the following hierarchy:

data/
  foo.txt
  img/
    a.png
    b.png

then AssetDir("data") would return []string{"foo.txt", "img"} AssetDir("data/img") would return []string{"a.png", "b.png"} AssetDir("foo.txt") and AssetDir("notexist") would return an error AssetDir("") will return []string{"data"}.

func AssetInfo added in v0.1.2

func AssetInfo(name string) (os.FileInfo, error)

AssetInfo loads and returns the asset info for the given name. It returns an error if the asset could not be found or could not be loaded.

func AssetNames added in v0.1.2

func AssetNames() []string

AssetNames returns the names of the assets.

func FindPackage added in v0.1.5

func FindPackage(dir string) (string, error)

func MustAsset added in v0.1.2

func MustAsset(name string) []byte

MustAsset is like Asset but panics when Asset would return an error. It simplifies safe initialization of global variables.

func RestoreAsset added in v0.1.2

func RestoreAsset(dir, name string) error

RestoreAsset restores an asset under the given directory

func RestoreAssets added in v0.1.2

func RestoreAssets(dir, name string) error

RestoreAssets restores an asset under the given directory recursively

Types

type Case added in v0.1.2

type Case int
const (
	Keep Case = iota
	Camel
	Pascal
	Snake
	Kebab
)

func (Case) Convert added in v0.1.2

func (c Case) Convert(text string) string

type GoType added in v0.1.12

type GoType struct {
	deepparser.Typer
}

func (*GoType) MapDefinition added in v0.1.12

func (py *GoType) MapDefinition(def *deepparser.Definition) (jen.Code, bool)

func (*GoType) MapField added in v0.1.12

func (py *GoType) MapField(st *deepparser.StField) (jen.Code, bool)

func (*GoType) MapType added in v0.1.12

func (py *GoType) MapType(t ast.Expr) (jen.Code, bool)

func (*GoType) MapTyped added in v0.1.12

func (py *GoType) MapTyped(tp typed) (jen.Code, bool)

type Interface

type Interface struct {
	Name    string
	Comment string
	Methods []*Method
	Imports []*ast.ImportSpec
}

func CollectInfo

func CollectInfo(search string, file *ast.File, fs *token.FileSet, fileName string) (*Interface, error)

func (*Interface) LookupForImport added in v0.1.5

func (iface *Interface) LookupForImport(pkg string) string

type LocalType added in v0.1.6

type LocalType struct {
	Type         string
	Definition   string
	IsStruct     bool
	StructFields []*deepparser.StField
	Inspect      *deepparser.Definition
}

type Method

type Method struct {
	Name       string
	Definition *ast.Field
	Type       *ast.FuncType
	Interface  *Interface
	// contains filtered or unexported fields
}

func (*Method) Args added in v0.1.2

func (mg *Method) Args() []arg

func (*Method) Comment added in v0.1.2

func (mg *Method) Comment() string

func (*Method) LocalTypes added in v0.1.6

func (mg *Method) LocalTypes(parentImportPath string) []LocalType

func (*Method) Return added in v0.1.6

func (mg *Method) Return() typed

func (*Method) ReturnType added in v0.1.2

func (mg *Method) ReturnType() string

type Python added in v0.1.11

type Python struct {
	deepparser.Typer
	Modules map[string]map[string]bool
}

func (*Python) AddModule added in v0.1.11

func (py *Python) AddModule(pyImportName string, names ...string)

func (*Python) MapField added in v0.1.11

func (py *Python) MapField(st *deepparser.StField) string

func (*Python) MapType added in v0.1.11

func (py *Python) MapType(t ast.Expr) string

type WrapperGenerator

type WrapperGenerator struct {
	TypeName                  string
	FuncName                  string
	Namespace                 string
	CustomHandlerMethodPrefix string
	CustomHandlers            []string // custom handlers for types (*import@id)
	Case                      Case
	Interceptor               bool
}

func (*WrapperGenerator) Generate

func (wg *WrapperGenerator) Generate(filename string) (*generationResult, error)

func (*WrapperGenerator) MustRender added in v0.1.11

func (wg *WrapperGenerator) MustRender(templateText string) string

func (*WrapperGenerator) Name added in v0.1.11

func (wg *WrapperGenerator) Name() string

func (*WrapperGenerator) Qual added in v0.1.2

func (wg *WrapperGenerator) Qual(mg *Method) string

Jump to

Keyboard shortcuts

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