|
|
|
@ -1,6 +1,6 @@ |
|
|
|
|
// Code generated by protoc-gen-go-http. DO NOT EDIT.
|
|
|
|
|
// versions:
|
|
|
|
|
// protoc-gen-go-http v2.0.0-rc5
|
|
|
|
|
// protoc-gen-go-http v2.0.0-rc7
|
|
|
|
|
|
|
|
|
|
package testproto |
|
|
|
|
|
|
|
|
@ -41,7 +41,7 @@ func RegisterEchoServiceHTTPServer(s *http.Server, srv EchoServiceHTTPServer) { |
|
|
|
|
func _EchoService_Echo0_HTTP_Handler(srv EchoServiceHTTPServer) func(ctx http.Context) error { |
|
|
|
|
return func(ctx http.Context) error { |
|
|
|
|
var in SimpleMessage |
|
|
|
|
if err := ctx.Bind(&in); err != nil { |
|
|
|
|
if err := ctx.BindQuery(&in); err != nil { |
|
|
|
|
return err |
|
|
|
|
} |
|
|
|
|
if err := ctx.BindVars(&in); err != nil { |
|
|
|
@ -63,7 +63,7 @@ func _EchoService_Echo0_HTTP_Handler(srv EchoServiceHTTPServer) func(ctx http.Co |
|
|
|
|
func _EchoService_Echo1_HTTP_Handler(srv EchoServiceHTTPServer) func(ctx http.Context) error { |
|
|
|
|
return func(ctx http.Context) error { |
|
|
|
|
var in SimpleMessage |
|
|
|
|
if err := ctx.Bind(&in); err != nil { |
|
|
|
|
if err := ctx.BindQuery(&in); err != nil { |
|
|
|
|
return err |
|
|
|
|
} |
|
|
|
|
if err := ctx.BindVars(&in); err != nil { |
|
|
|
@ -85,7 +85,7 @@ func _EchoService_Echo1_HTTP_Handler(srv EchoServiceHTTPServer) func(ctx http.Co |
|
|
|
|
func _EchoService_Echo2_HTTP_Handler(srv EchoServiceHTTPServer) func(ctx http.Context) error { |
|
|
|
|
return func(ctx http.Context) error { |
|
|
|
|
var in SimpleMessage |
|
|
|
|
if err := ctx.Bind(&in); err != nil { |
|
|
|
|
if err := ctx.BindQuery(&in); err != nil { |
|
|
|
|
return err |
|
|
|
|
} |
|
|
|
|
if err := ctx.BindVars(&in); err != nil { |
|
|
|
@ -107,7 +107,7 @@ func _EchoService_Echo2_HTTP_Handler(srv EchoServiceHTTPServer) func(ctx http.Co |
|
|
|
|
func _EchoService_Echo3_HTTP_Handler(srv EchoServiceHTTPServer) func(ctx http.Context) error { |
|
|
|
|
return func(ctx http.Context) error { |
|
|
|
|
var in SimpleMessage |
|
|
|
|
if err := ctx.Bind(&in); err != nil { |
|
|
|
|
if err := ctx.BindQuery(&in); err != nil { |
|
|
|
|
return err |
|
|
|
|
} |
|
|
|
|
if err := ctx.BindVars(&in); err != nil { |
|
|
|
@ -129,7 +129,7 @@ func _EchoService_Echo3_HTTP_Handler(srv EchoServiceHTTPServer) func(ctx http.Co |
|
|
|
|
func _EchoService_Echo4_HTTP_Handler(srv EchoServiceHTTPServer) func(ctx http.Context) error { |
|
|
|
|
return func(ctx http.Context) error { |
|
|
|
|
var in SimpleMessage |
|
|
|
|
if err := ctx.Bind(&in); err != nil { |
|
|
|
|
if err := ctx.BindQuery(&in); err != nil { |
|
|
|
|
return err |
|
|
|
|
} |
|
|
|
|
if err := ctx.BindVars(&in); err != nil { |
|
|
|
@ -189,7 +189,7 @@ func _EchoService_EchoResponseBody0_HTTP_Handler(srv EchoServiceHTTPServer) func |
|
|
|
|
func _EchoService_EchoDelete0_HTTP_Handler(srv EchoServiceHTTPServer) func(ctx http.Context) error { |
|
|
|
|
return func(ctx http.Context) error { |
|
|
|
|
var in SimpleMessage |
|
|
|
|
if err := ctx.Bind(&in); err != nil { |
|
|
|
|
if err := ctx.BindQuery(&in); err != nil { |
|
|
|
|
return err |
|
|
|
|
} |
|
|
|
|
if err := ctx.BindVars(&in); err != nil { |
|
|
|
@ -246,7 +246,7 @@ func NewEchoServiceHTTPClient(client *http.Client) EchoServiceHTTPClient { |
|
|
|
|
func (c *EchoServiceHTTPClientImpl) Echo(ctx context.Context, in *SimpleMessage, opts ...http.CallOption) (*SimpleMessage, error) { |
|
|
|
|
var out SimpleMessage |
|
|
|
|
pattern := "/v1/example/echo/{id}" |
|
|
|
|
path := binding.EncodeURL(pattern, in, false) |
|
|
|
|
path := binding.EncodeURL(pattern, in, true) |
|
|
|
|
opts = append(opts, http.Operation("/testproto.EchoService/Echo")) |
|
|
|
|
opts = append(opts, http.PathTemplate(pattern)) |
|
|
|
|
err := c.cc.Invoke(ctx, "POST", path, nil, &out, opts...) |
|
|
|
@ -272,7 +272,7 @@ func (c *EchoServiceHTTPClientImpl) EchoBody(ctx context.Context, in *SimpleMess |
|
|
|
|
func (c *EchoServiceHTTPClientImpl) EchoDelete(ctx context.Context, in *SimpleMessage, opts ...http.CallOption) (*SimpleMessage, error) { |
|
|
|
|
var out SimpleMessage |
|
|
|
|
pattern := "/v1/example/echo_delete/{id}/{num}" |
|
|
|
|
path := binding.EncodeURL(pattern, in, false) |
|
|
|
|
path := binding.EncodeURL(pattern, in, true) |
|
|
|
|
opts = append(opts, http.Operation("/testproto.EchoService/EchoDelete")) |
|
|
|
|
opts = append(opts, http.PathTemplate(pattern)) |
|
|
|
|
err := c.cc.Invoke(ctx, "DELETE", path, nil, &out, opts...) |
|
|
|
|