internal

package
v0.0.0-...-91eb410 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2018 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DetectCyclicDependency

func DetectCyclicDependency(funcs []FuncType) error

Types

type CyclicDependencyError

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

func (*CyclicDependencyError) Error

func (e *CyclicDependencyError) Error() string

type FuncType

type FuncType struct {
	ArgumentTypes []ParameterType
	ReturnTypes   []ParameterType
	PackageName   string
	Comments      comments
	Name          string
}

type Generator

type Generator struct {
	PackageName string
	// contains filtered or unexported fields
}

func NewGenerator

func NewGenerator() *Generator

func (*Generator) Generate

func (g *Generator) Generate(it *InterfaceType, fs []FuncType) error

func (*Generator) GenerateMock

func (g *Generator) GenerateMock(it *InterfaceType, targets []InterfaceType) error

func (*Generator) Out

func (g *Generator) Out(w io.Writer, filename string) error

func (*Generator) Printf

func (g *Generator) Printf(format string, args ...interface{})

type InterfaceType

type InterfaceType struct {
	PackageName    string
	Comments       comments
	Name           string
	Funcs          []FuncType
	DependPackages []Package
}

type Package

type Package struct {
	Name string
	Path string
}

type PackageParser

type PackageParser struct {
	PackageName string
}

func NewPackageParser

func NewPackageParser(pack string) *PackageParser

func (*PackageParser) FindConstructors

func (p *PackageParser) FindConstructors(filenames []string, funcnames []string) ([]FuncType, error)

func (*PackageParser) FindDependencyInterfaces

func (p *PackageParser) FindDependencyInterfaces(filenames []string, targetNames []string) ([]InterfaceType, error)

func (*PackageParser) FindDicon

func (p *PackageParser) FindDicon(filenames []string) (*InterfaceType, error)

type ParameterType

type ParameterType struct {
	DeclaredPackageName string
	// contains filtered or unexported fields
}

func NewParameterType

func NewParameterType(packageName string, expr ast.Expr) *ParameterType

func (*ParameterType) ConvertName

func (p *ParameterType) ConvertName(packageName string) string

func (*ParameterType) SimpleName

func (p *ParameterType) SimpleName() string

Jump to

Keyboard shortcuts

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