smock

package
v0.9.2 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2018 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Name = "smock"
)

Variables

This section is empty.

Functions

func FmtVersion

func FmtVersion() string

func ParseType

func ParseType(t interface{}) string

Types

type File added in v0.9.2

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

type Generator added in v0.9.2

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

func (*Generator) Format added in v0.9.2

func (g *Generator) Format() []byte

func (*Generator) Generate added in v0.9.2

func (g *Generator) Generate(typeName string)

func (*Generator) ParsePackageDir added in v0.9.2

func (g *Generator) ParsePackageDir(directory string)

func (*Generator) ParsePackageFiles added in v0.9.2

func (g *Generator) ParsePackageFiles(names []string)

func (*Generator) ParseReader added in v0.9.2

func (g *Generator) ParseReader(src io.Reader)

func (*Generator) SetPackageName added in v0.9.2

func (g *Generator) SetPackageName(name string)

type Method

type Method struct {
	Name    string
	Params  Params
	Returns Returns
}

func (*Method) Args

func (m *Method) Args() string

type Model added in v0.9.2

type Model struct {
	PackageName string
	Imports     []string
	Structures  []*Structure
}

type Package added in v0.9.2

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

type Params

type Params []*variable

func (Params) Names

func (ps Params) Names() string

func (Params) String

func (ps Params) String() string

type Returns

type Returns []*variable

func (Returns) String

func (rs Returns) String() string

type Structure

type Structure struct {
	Name    string
	Methods []*Method
}

Jump to

Keyboard shortcuts

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