Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Generator ¶
type Generator struct {
// contains filtered or unexported fields
}
Generator generates microservice scaffolds from WADL specifications.
func NewGenerator ¶
NewGenerator creates a new generator from a SEP 2 WADL file. The service name is derived from the WADL filename (without extension).
func (*Generator) Generate ¶
Generate creates the complete service scaffold in the current directory.
func (*Generator) ServiceName ¶
ServiceName returns the service name derived from the WADL filename.
type MethodInfo ¶
type MethodInfo struct {
FuncName string
HTTPMethod string
Mode string
ResponseType string
PathParams []string
Path string
}
MethodInfo describes a single handler function.
type ResourceTemplateData ¶
type ResourceTemplateData struct {
Name string
Methods []MethodInfo
}
ResourceTemplateData groups methods under a named resource.
type TemplateData ¶
type TemplateData struct {
ServiceName string
ServiceConstant string
MaxEntities int
Routes []RouteInfo
Resources []ResourceTemplateData
HasPathParams bool
}
TemplateData holds all data passed to file-generation templates.
Click to show internal directories.
Click to hide internal directories.