Documentation ¶
Index ¶
- Variables
- func Configure(verboseLogger Logger)
- func PackageImportTask(ctx interface{}) error
- func ServeStmtTask(ctx interface{}) error
- func ServerNameTask(ctx interface{}) error
- func SourceCodeTask(ctx interface{}) error
- type ClientCollectorI
- type Ctx
- type File
- type GoClientCollector
- type Logger
- type MiddlewareExpr
- type ServeStmt
Constants ¶
This section is empty.
Variables ¶
View Source
var (
Mask = errgo.MaskFunc()
)
View Source
var (
Verbosef = func(f string, v ...interface{}) {}
)
Functions ¶
func PackageImportTask ¶
func PackageImportTask(ctx interface{}) error
Find all files where the middleware package is imported.
func ServeStmtTask ¶
func ServeStmtTask(ctx interface{}) error
func ServerNameTask ¶
func ServerNameTask(ctx interface{}) error
func SourceCodeTask ¶
func SourceCodeTask(ctx interface{}) error
Find all important source code files.
Types ¶
type ClientCollectorI ¶
type ClientCollectorI interface { // Generate a clients source code based on the given root path. GenerateClient(root string) error // Generate a api blueprint based on the given root path. ApiBlueprint(root string) (string, error) }
func NewGoClientCollector ¶
func NewGoClientCollector() ClientCollectorI
type File ¶
type File struct { // File path of a source code file. Path string // Go code in string form of a source code file. Code string // Variable name of the imported middleware package, if any. PkgImport string // *ast.File of the current go code. AstFile *ast.File // Serve information describing which routes the middleware server provides. ServeStmts []ServeStmt }
type GoClientCollector ¶
type GoClientCollector struct{}
func (*GoClientCollector) ApiBlueprint ¶
func (gcg *GoClientCollector) ApiBlueprint(root string) (string, error)
func (*GoClientCollector) GenerateClient ¶
func (gcg *GoClientCollector) GenerateClient(wd string) error
type MiddlewareExpr ¶
type ServeStmt ¶
type ServeStmt struct { // Http method a route provides. Method string // Url path of the http route. Path string // Middleware specs used for a route. Middlewares []MiddlewareExpr }
Click to show internal directories.
Click to hide internal directories.