Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DeclarationBuilder ¶
type File ¶
type File struct {
// contains filtered or unexported fields
}
File describes a single Go source file.
func (*File) AddImport ¶
AddImport assures that the specified package name in the specified location will be added as an import and returns the import package alias.
func (*File) AppendDeclaration ¶
func (f *File) AppendDeclaration(d DeclarationBuilder)
AppendDeclarations appends the specified decleration to the file.
type Generator ¶
type Generator struct { Model ModelBuilder Locator *resolution.Locator Resolver *resolution.Resolver }
func (*Generator) ProcessInterface ¶
func (g *Generator) ProcessInterface(d resolution.TypeDiscovery) error
type Method ¶
type Method struct {
// contains filtered or unexported fields
}
Method represents a struct method.
func (*Method) AddStatement ¶
func (*Method) AddStatements ¶
type MethodConfig ¶
type MethodConfig struct { // MethodName specifies the name of the method as seen in the interface it // came from. MethodName string // MethodParams specifies all the parameters of the method. They should // have been normalized (i.e. no type reuse and no anonymous parameters) // and resolved (i.e. all selector expressions resolved against the // generated stub's new namespace) MethodParams []*ast.Field // MethodResults specifies all the results of the method. They should have // been normalized (i.e. no type reuse and no anonymous results) and // resolved (i.e. all selector expressions resolved against the generated // stub's new namespace) MethodResults []*ast.Field }
MethodConfig describes a method.
func (*MethodConfig) HasParams ¶
func (s *MethodConfig) HasParams() bool
func (*MethodConfig) HasResults ¶
func (s *MethodConfig) HasResults() bool
type ModelBuilder ¶
type ModelBuilder interface { // AddMethod should add implementation for the specified method. AddMethod(*MethodConfig) error }
Click to show internal directories.
Click to hide internal directories.