mocks

package
v0.0.0-...-5b39b99 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2016 License: Unlicense Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Method

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

func MethodFor

func MethodFor(receiver Mock, name string, typ *ast.FuncType) Method

func (Method) Ast

func (m Method) Ast() *ast.FuncDecl

func (Method) PrependLocalPackage

func (m Method) PrependLocalPackage(name string)

type Mock

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

func For

func For(typ *ast.TypeSpec) (Mock, error)

func (Mock) Ast

func (m Mock) Ast(chanSize int) []ast.Decl

func (Mock) Constructor

func (m Mock) Constructor(chanSize int) *ast.FuncDecl

func (Mock) Decl

func (m Mock) Decl() *ast.GenDecl

func (Mock) Methods

func (m Mock) Methods() (methods []Method)

func (Mock) Name

func (m Mock) Name() string

func (Mock) PrependLocalPackage

func (m Mock) PrependLocalPackage(name string)

func (Mock) SetBlockingReturn

func (m Mock) SetBlockingReturn(blockingReturn bool)

type Mocks

type Mocks []Mock

func Generate

func Generate(finder TypeFinder) (Mocks, error)

func (Mocks) Output

func (m Mocks) Output(pkg string, chanSize int, dest io.Writer) error

func (Mocks) PrependLocalPackage

func (m Mocks) PrependLocalPackage(name string)

func (Mocks) SetBlockingReturn

func (m Mocks) SetBlockingReturn(blockingReturn bool)

type TypeFinder

type TypeFinder interface {
	ExportedTypes() []*ast.TypeSpec
}

Jump to

Keyboard shortcuts

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