generate

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Import

type Import interface {
	PkgName() string
	PkgPath() string
	Alias() string
	AliasOrPkgName() string
}

type Interface

type Interface interface {
	Name() string
	Constructor() string
	ConstructorFmt(pkgName string) string
	TypeParameters() string
	TypeParameterVars() string
	Methods() []Method
	MaxFuncLenFmt() string
	Var() string
}

type Method

type Method interface {
	Name() string
	Func() string
	Add() string
	Set() string
	InterfaceVar() string
	FuncVar() string
	Parameters() string
	ParameterVars() string
	Results() string
	ZeroResults() string
}

type Mocks

type Mocks interface {
	PkgName() string
	PkgImport() Import
	StdImports() []Import
	ExtImports() []Import
	IntImports() []Import
	Interfaces() []Interface
	ToolVersion() string
	ToolCommandLine() string
	Render(w io.Writer) error
}

func NewMocks

func NewMocks(prefix string, p parse.Package, interfaces []parse.Interface, toolVersionFunc ToolVersionFunc) Mocks

type ToolVersionFunc

type ToolVersionFunc func() string

Jump to

Keyboard shortcuts

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