Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrNoPkgName = errors.New("no package name")
)
Functions ¶
Types ¶
type AnonymousInterface ¶
type AnonymousInterface struct {
// contains filtered or unexported fields
}
func NewAnonymousInterface ¶
func NewAnonymousInterface(interfaces []*Interface) *AnonymousInterface
type GenerateConfig ¶
type GenerateConfig struct { FuncName string RequireInterface *AnonymousInterface WrappedInterface *NamedInterface OptionalInterfaces []*Interface }
func Convert ¶
func Convert(results []*ParseResult) ([]*GenerateConfig, error)
type Interface ¶
type Interface struct {
// contains filtered or unexported fields
}
func NewInterface ¶
type NamedInterface ¶
type NamedInterface struct {
// contains filtered or unexported fields
}
func NewNamedInterface ¶
func NewNamedInterface(name string, interfaces []*Interface, declared bool) *NamedInterface
func (*NamedInterface) Expr ¶
func (ni *NamedInterface) Expr() ast.Expr
type Package ¶
type Package struct {
// contains filtered or unexported fields
}
func NewPackage ¶
func (*Package) ImportSpec ¶
func (p *Package) ImportSpec() *ast.ImportSpec
type ParseResult ¶
type ParseResult struct {
FuncName, StructName string
RequiredInterfaces, OptionalInterfaces []*Interface
}
func ParseTarget ¶
func ParseTarget(r io.Reader) (string, []*ParseResult, error)
Click to show internal directories.
Click to hide internal directories.