// Code generated by protoc-gen-go-drpc. DO NOT EDIT. // protoc-gen-go-drpc version: v0.0.32 // source: test.proto package pb import ( context "context" errors "errors" proto "google.golang.org/protobuf/proto" drpc "storj.io/drpc" drpcerr "storj.io/drpc/drpcerr" ) type drpcEncoding_File_test_proto struct{} func (drpcEncoding_File_test_proto) Marshal(msg drpc.Message) ([]byte, error) { return proto.Marshal(msg.(proto.Message)) } func (drpcEncoding_File_test_proto) MarshalAppend(buf []byte, msg drpc.Message) ([]byte, error) { return proto.MarshalOptions{}.MarshalAppend(buf, msg.(proto.Message)) } func (drpcEncoding_File_test_proto) Unmarshal(buf []byte, msg drpc.Message) error { return proto.Unmarshal(buf, msg.(proto.Message)) } type DRPCTestClient interface { DRPCConn() drpc.Conn Call(ctx context.Context, in *CallReq) (*CallRsp, error) } type drpcTestClient struct { cc drpc.Conn } func NewDRPCTestClient(cc drpc.Conn) DRPCTestClient { return &drpcTestClient{cc} } func (c *drpcTestClient) DRPCConn() drpc.Conn { return c.cc } func (c *drpcTestClient) Call(ctx context.Context, in *CallReq) (*CallRsp, error) { out := new(CallRsp) err := c.cc.Invoke(ctx, "/test.v1.Test/Call", drpcEncoding_File_test_proto{}, in, out) if err != nil { return nil, err } return out, nil } type DRPCTestServer interface { Call(context.Context, *CallReq) (*CallRsp, error) } type DRPCTestUnimplementedServer struct{} func (s *DRPCTestUnimplementedServer) Call(context.Context, *CallReq) (*CallRsp, error) { return nil, drpcerr.WithCode(errors.New("Unimplemented"), drpcerr.Unimplemented) } type DRPCTestDescription struct{} func (DRPCTestDescription) NumMethods() int { return 1 } func (DRPCTestDescription) Method(n int) (string, drpc.Encoding, drpc.Receiver, interface{}, bool) { switch n { case 0: return "/test.v1.Test/Call", drpcEncoding_File_test_proto{}, func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) { return srv.(DRPCTestServer). Call( ctx, in1.(*CallReq), ) }, DRPCTestServer.Call, true default: return "", nil, nil, nil, false } } func DRPCRegisterTest(mux drpc.Mux, impl DRPCTestServer) error { return mux.Register(impl, DRPCTestDescription{}) } type DRPCTest_CallStream interface { drpc.Stream SendAndClose(*CallRsp) error } type drpcTest_CallStream struct { drpc.Stream } func (x *drpcTest_CallStream) SendAndClose(m *CallRsp) error { if err := x.MsgSend(m, drpcEncoding_File_test_proto{}); err != nil { return err } return x.CloseSend() }