Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var FuncMap = template.FuncMap{ "ToLower": strings.ToLower, "ToUpper": strings.ToUpper, "Title": strings.Title, "GoName": pkg.GoCamelCase, "Contains": strings.Contains, }
FuncMap contains a series of utility functions to be passed into templates and used within those templates.
Functions ¶
Types ¶
type Data ¶
type Data struct { // import path for the directory containing the definition .proto files ImportPath string // import path for .pb.go files containing service structs PBImportPath string // PackageName is the name of the package containing the service definition PackageName string // GRPC/Protobuff service, with all parameters and return values accessible Service *svcdef.Service // A helper struct for generating http transport functionality. HTTPHelper *httptransport.Helper FuncMap template.FuncMap // generate config Config Config Version string VersionDate string }
Data is passed to templates as the executing struct; its fields and methods are used to modify the template
func (*Data) ApplyTemplate ¶
ApplyTemplate applies the passed template with the Data
type RenderStatus ¶ added in v0.2.6
RenderStatus 表示 Renderable 状态的接口
Directories
¶
Path | Synopsis |
---|---|
Package generator generates a gokit service based on a service definition.
|
Package generator generates a gokit service based on a service definition. |
Package httptransport provides functions and template helpers for templating the http-transport of a go-kit based service.
|
Package httptransport provides functions and template helpers for templating the http-transport of a go-kit based service. |
Package service manages the exported methods in the service handler code adding/removing exported methods to match the service definition.
|
Package service manages the exported methods in the service handler code adding/removing exported methods to match the service definition. |
This file is here to hold the `go generate` command above.
|
This file is here to hold the `go generate` command above. |
Click to show internal directories.
Click to hide internal directories.