internal

package
v0.1.10 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2020 License: MPL-2.0 Imports: 27 Imported by: 0

Documentation

Overview

Package internal generated by go-bindata.// sources: template.gotemplate python.gotemplate js.gotemplate ts.gotemplate method_doc.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 Definition added in v0.1.8

type Definition struct {
	Import   godetector.Import
	Decl     *ast.GenDecl
	Type     *ast.TypeSpec
	TypeName string
	FS       *token.FileSet
	FileDir  string
	File     *ast.File
}

func (*Definition) StructFields added in v0.1.9

func (def *Definition) StructFields() []*stField

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 []*stField
	Inspect      *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 WrapperGenerator

type WrapperGenerator struct {
	TypeName    string
	FuncName    string
	Namespace   string
	Case        Case
	Interceptor bool
}

func (*WrapperGenerator) Generate

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

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