add ServiceName variable
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
parent
dd872a03b3
commit
b4231422b3
2
util.go
2
util.go
@ -449,6 +449,8 @@ func generateServiceServerStreamInterface(gfile *protogen.GeneratedFile, service
|
|||||||
func generateServiceEndpoints(gfile *protogen.GeneratedFile, service *protogen.Service) {
|
func generateServiceEndpoints(gfile *protogen.GeneratedFile, service *protogen.Service) {
|
||||||
serviceName := service.GoName
|
serviceName := service.GoName
|
||||||
gfile.P("var (")
|
gfile.P("var (")
|
||||||
|
gfile.P(serviceName, "Name", "=", `"`, serviceName, `"`)
|
||||||
|
gfile.P()
|
||||||
gfile.P(serviceName, "Endpoints", "=", "[]", microApiPackage.Ident("Endpoint"), "{")
|
gfile.P(serviceName, "Endpoints", "=", "[]", microApiPackage.Ident("Endpoint"), "{")
|
||||||
for _, method := range service.Methods {
|
for _, method := range service.Methods {
|
||||||
if method.Desc.Options() == nil {
|
if method.Desc.Options() == nil {
|
||||||
|
@ -17,5 +17,5 @@ var (
|
|||||||
microClientHttpPackage = protogen.GoImportPath("github.com/unistack-org/micro-client-http/v3")
|
microClientHttpPackage = protogen.GoImportPath("github.com/unistack-org/micro-client-http/v3")
|
||||||
timePackage = protogen.GoImportPath("time")
|
timePackage = protogen.GoImportPath("time")
|
||||||
deprecationComment = "// Deprecated: Do not use."
|
deprecationComment = "// Deprecated: Do not use."
|
||||||
versionComment = "v3.4.1"
|
versionComment = "v3.4.2"
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user