micro-tests/server/grpc/proto/test_micro_grpc.pb.go
Vasiliy Tolstov ac192b7ef5 update all deps to latest versions
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2021-01-29 16:47:26 +03:00

47 lines
984 B
Go

// Code generated by protoc-gen-micro
// source: test.proto
package helloworld
import (
"context"
micro_client "github.com/unistack-org/micro/v3/client"
micro_server "github.com/unistack-org/micro/v3/server"
)
var (
_ micro_server.Option
_ micro_client.Option
)
type testService struct {
c micro_client.Client
name string
}
// Micro client stuff
// NewTestService create new service client
func NewTestService(name string, c micro_client.Client) TestService {
return &testService{c: c, name: name}
}
func (c *testService) Call(ctx context.Context, req *Request, opts ...micro_client.CallOption) (*Response, error) {
rsp := &Response{}
err := c.c.Call(ctx, c.c.NewRequest(c.name, "Test.Call", req), rsp, opts...)
if err != nil {
return nil, err
}
return rsp, nil
}
// Micro server stuff
type testHandler struct {
TestHandler
}
func (h *testHandler) Call(ctx context.Context, req *Request, rsp *Response) error {
return h.TestHandler.Call(ctx, req, rsp)
}