Documentation ¶
Overview ¶
Code generated by Kitex v0.9.1. DO NOT EDIT.
Index ¶
- Variables
- func NewInvoker(handler Mock, opts ...server.Option) server.Invoker
- func NewServer(handler Mock, opts ...server.Option) server.Server
- func NewServiceInfo() *kitex.ServiceInfo
- func NewServiceInfoForClient() *kitex.ServiceInfo
- func NewServiceInfoForStreamClient() *kitex.ServiceInfo
- func RegisterService(svr server.Server, handler Mock, opts ...server.RegisterOption) error
- type BidirectionalStreamingTestArgs
- func (p *BidirectionalStreamingTestArgs) FastRead(buf []byte, _type int8, number int32) (n int, err error)
- func (p *BidirectionalStreamingTestArgs) FastWrite(buf []byte) (n int)
- func (p *BidirectionalStreamingTestArgs) GetFirstArgument() interface{}
- func (p *BidirectionalStreamingTestArgs) GetReq() *MockReq
- func (p *BidirectionalStreamingTestArgs) IsSetReq() bool
- func (p *BidirectionalStreamingTestArgs) Marshal(out []byte) ([]byte, error)
- func (p *BidirectionalStreamingTestArgs) Size() (n int)
- func (p *BidirectionalStreamingTestArgs) Unmarshal(in []byte) error
- type BidirectionalStreamingTestResult
- func (p *BidirectionalStreamingTestResult) FastRead(buf []byte, _type int8, number int32) (n int, err error)
- func (p *BidirectionalStreamingTestResult) FastWrite(buf []byte) (n int)
- func (p *BidirectionalStreamingTestResult) GetResult() interface{}
- func (p *BidirectionalStreamingTestResult) GetSuccess() *MockResp
- func (p *BidirectionalStreamingTestResult) IsSetSuccess() bool
- func (p *BidirectionalStreamingTestResult) Marshal(out []byte) ([]byte, error)
- func (p *BidirectionalStreamingTestResult) SetSuccess(x interface{})
- func (p *BidirectionalStreamingTestResult) Size() (n int)
- func (p *BidirectionalStreamingTestResult) Unmarshal(in []byte) error
- type Client
- type ClientStreamingTestArgs
- func (p *ClientStreamingTestArgs) FastRead(buf []byte, _type int8, number int32) (n int, err error)
- func (p *ClientStreamingTestArgs) FastWrite(buf []byte) (n int)
- func (p *ClientStreamingTestArgs) GetFirstArgument() interface{}
- func (p *ClientStreamingTestArgs) GetReq() *MockReq
- func (p *ClientStreamingTestArgs) IsSetReq() bool
- func (p *ClientStreamingTestArgs) Marshal(out []byte) ([]byte, error)
- func (p *ClientStreamingTestArgs) Size() (n int)
- func (p *ClientStreamingTestArgs) Unmarshal(in []byte) error
- type ClientStreamingTestResult
- func (p *ClientStreamingTestResult) FastRead(buf []byte, _type int8, number int32) (n int, err error)
- func (p *ClientStreamingTestResult) FastWrite(buf []byte) (n int)
- func (p *ClientStreamingTestResult) GetResult() interface{}
- func (p *ClientStreamingTestResult) GetSuccess() *MockResp
- func (p *ClientStreamingTestResult) IsSetSuccess() bool
- func (p *ClientStreamingTestResult) Marshal(out []byte) ([]byte, error)
- func (p *ClientStreamingTestResult) SetSuccess(x interface{})
- func (p *ClientStreamingTestResult) Size() (n int)
- func (p *ClientStreamingTestResult) Unmarshal(in []byte) error
- type Mock
- type MockReq
- func (*MockReq) Descriptor() ([]byte, []int)deprecated
- func (x *MockReq) FastRead(buf []byte, _type int8, number int32) (offset int, err error)
- func (x *MockReq) FastWrite(buf []byte) (offset int)
- func (x *MockReq) GetMessage() string
- func (*MockReq) ProtoMessage()
- func (x *MockReq) ProtoReflect() protoreflect.Message
- func (x *MockReq) Reset()
- func (x *MockReq) Size() (n int)
- func (x *MockReq) String() string
- type MockResp
- func (*MockResp) Descriptor() ([]byte, []int)deprecated
- func (x *MockResp) FastRead(buf []byte, _type int8, number int32) (offset int, err error)
- func (x *MockResp) FastWrite(buf []byte) (offset int)
- func (x *MockResp) GetMessage() string
- func (*MockResp) ProtoMessage()
- func (x *MockResp) ProtoReflect() protoreflect.Message
- func (x *MockResp) Reset()
- func (x *MockResp) Size() (n int)
- func (x *MockResp) String() string
- type Mock_BidirectionalStreamingTestClient
- type Mock_BidirectionalStreamingTestServer
- type Mock_ClientStreamingTestClient
- type Mock_ClientStreamingTestServer
- type Mock_ServerStreamingTestClient
- type Mock_ServerStreamingTestServer
- type ServerStreamingTestArgs
- func (p *ServerStreamingTestArgs) FastRead(buf []byte, _type int8, number int32) (n int, err error)
- func (p *ServerStreamingTestArgs) FastWrite(buf []byte) (n int)
- func (p *ServerStreamingTestArgs) GetFirstArgument() interface{}
- func (p *ServerStreamingTestArgs) GetReq() *MockReq
- func (p *ServerStreamingTestArgs) IsSetReq() bool
- func (p *ServerStreamingTestArgs) Marshal(out []byte) ([]byte, error)
- func (p *ServerStreamingTestArgs) Size() (n int)
- func (p *ServerStreamingTestArgs) Unmarshal(in []byte) error
- type ServerStreamingTestResult
- func (p *ServerStreamingTestResult) FastRead(buf []byte, _type int8, number int32) (n int, err error)
- func (p *ServerStreamingTestResult) FastWrite(buf []byte) (n int)
- func (p *ServerStreamingTestResult) GetResult() interface{}
- func (p *ServerStreamingTestResult) GetSuccess() *MockResp
- func (p *ServerStreamingTestResult) IsSetSuccess() bool
- func (p *ServerStreamingTestResult) Marshal(out []byte) ([]byte, error)
- func (p *ServerStreamingTestResult) SetSuccess(x interface{})
- func (p *ServerStreamingTestResult) Size() (n int)
- func (p *ServerStreamingTestResult) Unmarshal(in []byte) error
- type StreamClient
- type UnaryTestArgs
- func (p *UnaryTestArgs) FastRead(buf []byte, _type int8, number int32) (n int, err error)
- func (p *UnaryTestArgs) FastWrite(buf []byte) (n int)
- func (p *UnaryTestArgs) GetFirstArgument() interface{}
- func (p *UnaryTestArgs) GetReq() *MockReq
- func (p *UnaryTestArgs) IsSetReq() bool
- func (p *UnaryTestArgs) Marshal(out []byte) ([]byte, error)
- func (p *UnaryTestArgs) Size() (n int)
- func (p *UnaryTestArgs) Unmarshal(in []byte) error
- type UnaryTestResult
- func (p *UnaryTestResult) FastRead(buf []byte, _type int8, number int32) (n int, err error)
- func (p *UnaryTestResult) FastWrite(buf []byte) (n int)
- func (p *UnaryTestResult) GetResult() interface{}
- func (p *UnaryTestResult) GetSuccess() *MockResp
- func (p *UnaryTestResult) IsSetSuccess() bool
- func (p *UnaryTestResult) Marshal(out []byte) ([]byte, error)
- func (p *UnaryTestResult) SetSuccess(x interface{})
- func (p *UnaryTestResult) Size() (n int)
- func (p *UnaryTestResult) Unmarshal(in []byte) error
Constants ¶
This section is empty.
Variables ¶
var File_pbapi_proto protoreflect.FileDescriptor
Functions ¶
func NewInvoker ¶
NewInvoker creates a server.Invoker with the given handler and options.
func NewServiceInfo ¶
func NewServiceInfo() *kitex.ServiceInfo
NewServiceInfo creates a new ServiceInfo containing all methods
func NewServiceInfoForClient ¶
func NewServiceInfoForClient() *kitex.ServiceInfo
NewServiceInfo creates a new ServiceInfo containing non-streaming methods
func NewServiceInfoForStreamClient ¶
func NewServiceInfoForStreamClient() *kitex.ServiceInfo
func RegisterService ¶
Types ¶
type BidirectionalStreamingTestArgs ¶
type BidirectionalStreamingTestArgs struct {
Req *MockReq
}
func (*BidirectionalStreamingTestArgs) FastWrite ¶
func (p *BidirectionalStreamingTestArgs) FastWrite(buf []byte) (n int)
func (*BidirectionalStreamingTestArgs) GetFirstArgument ¶
func (p *BidirectionalStreamingTestArgs) GetFirstArgument() interface{}
func (*BidirectionalStreamingTestArgs) GetReq ¶
func (p *BidirectionalStreamingTestArgs) GetReq() *MockReq
func (*BidirectionalStreamingTestArgs) IsSetReq ¶
func (p *BidirectionalStreamingTestArgs) IsSetReq() bool
func (*BidirectionalStreamingTestArgs) Marshal ¶
func (p *BidirectionalStreamingTestArgs) Marshal(out []byte) ([]byte, error)
func (*BidirectionalStreamingTestArgs) Size ¶
func (p *BidirectionalStreamingTestArgs) Size() (n int)
func (*BidirectionalStreamingTestArgs) Unmarshal ¶
func (p *BidirectionalStreamingTestArgs) Unmarshal(in []byte) error
type BidirectionalStreamingTestResult ¶
type BidirectionalStreamingTestResult struct {
Success *MockResp
}
func (*BidirectionalStreamingTestResult) FastWrite ¶
func (p *BidirectionalStreamingTestResult) FastWrite(buf []byte) (n int)
func (*BidirectionalStreamingTestResult) GetResult ¶
func (p *BidirectionalStreamingTestResult) GetResult() interface{}
func (*BidirectionalStreamingTestResult) GetSuccess ¶
func (p *BidirectionalStreamingTestResult) GetSuccess() *MockResp
func (*BidirectionalStreamingTestResult) IsSetSuccess ¶
func (p *BidirectionalStreamingTestResult) IsSetSuccess() bool
func (*BidirectionalStreamingTestResult) Marshal ¶
func (p *BidirectionalStreamingTestResult) Marshal(out []byte) ([]byte, error)
func (*BidirectionalStreamingTestResult) SetSuccess ¶
func (p *BidirectionalStreamingTestResult) SetSuccess(x interface{})
func (*BidirectionalStreamingTestResult) Size ¶
func (p *BidirectionalStreamingTestResult) Size() (n int)
func (*BidirectionalStreamingTestResult) Unmarshal ¶
func (p *BidirectionalStreamingTestResult) Unmarshal(in []byte) error
type Client ¶
type Client interface { UnaryTest(ctx context.Context, Req *MockReq, callOptions ...callopt.Option) (r *MockResp, err error) ClientStreamingTest(ctx context.Context, callOptions ...callopt.Option) (stream Mock_ClientStreamingTestClient, err error) ServerStreamingTest(ctx context.Context, Req *MockReq, callOptions ...callopt.Option) (stream Mock_ServerStreamingTestClient, err error) BidirectionalStreamingTest(ctx context.Context, callOptions ...callopt.Option) (stream Mock_BidirectionalStreamingTestClient, err error) }
Client is designed to provide IDL-compatible methods with call-option parameter for kitex framework.
func MustNewClient ¶
MustNewClient creates a client for the service defined in IDL. It panics if any error occurs.
type ClientStreamingTestArgs ¶
type ClientStreamingTestArgs struct {
Req *MockReq
}
func (*ClientStreamingTestArgs) FastWrite ¶
func (p *ClientStreamingTestArgs) FastWrite(buf []byte) (n int)
func (*ClientStreamingTestArgs) GetFirstArgument ¶
func (p *ClientStreamingTestArgs) GetFirstArgument() interface{}
func (*ClientStreamingTestArgs) GetReq ¶
func (p *ClientStreamingTestArgs) GetReq() *MockReq
func (*ClientStreamingTestArgs) IsSetReq ¶
func (p *ClientStreamingTestArgs) IsSetReq() bool
func (*ClientStreamingTestArgs) Marshal ¶
func (p *ClientStreamingTestArgs) Marshal(out []byte) ([]byte, error)
func (*ClientStreamingTestArgs) Size ¶
func (p *ClientStreamingTestArgs) Size() (n int)
func (*ClientStreamingTestArgs) Unmarshal ¶
func (p *ClientStreamingTestArgs) Unmarshal(in []byte) error
type ClientStreamingTestResult ¶
type ClientStreamingTestResult struct {
Success *MockResp
}
func (*ClientStreamingTestResult) FastWrite ¶
func (p *ClientStreamingTestResult) FastWrite(buf []byte) (n int)
func (*ClientStreamingTestResult) GetResult ¶
func (p *ClientStreamingTestResult) GetResult() interface{}
func (*ClientStreamingTestResult) GetSuccess ¶
func (p *ClientStreamingTestResult) GetSuccess() *MockResp
func (*ClientStreamingTestResult) IsSetSuccess ¶
func (p *ClientStreamingTestResult) IsSetSuccess() bool
func (*ClientStreamingTestResult) Marshal ¶
func (p *ClientStreamingTestResult) Marshal(out []byte) ([]byte, error)
func (*ClientStreamingTestResult) SetSuccess ¶
func (p *ClientStreamingTestResult) SetSuccess(x interface{})
func (*ClientStreamingTestResult) Size ¶
func (p *ClientStreamingTestResult) Size() (n int)
func (*ClientStreamingTestResult) Unmarshal ¶
func (p *ClientStreamingTestResult) Unmarshal(in []byte) error
type Mock ¶
type Mock interface { UnaryTest(ctx context.Context, req *MockReq) (res *MockResp, err error) ClientStreamingTest(stream Mock_ClientStreamingTestServer) (err error) ServerStreamingTest(req *MockReq, stream Mock_ServerStreamingTestServer) (err error) BidirectionalStreamingTest(stream Mock_BidirectionalStreamingTestServer) (err error) }
type MockReq ¶
type MockReq struct { Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` // contains filtered or unexported fields }
var BidirectionalStreamingTestArgs_Req_DEFAULT *MockReq
var ClientStreamingTestArgs_Req_DEFAULT *MockReq
var ServerStreamingTestArgs_Req_DEFAULT *MockReq
var UnaryTestArgs_Req_DEFAULT *MockReq
func (*MockReq) Descriptor
deprecated
func (*MockReq) GetMessage ¶
func (*MockReq) ProtoMessage ¶
func (*MockReq) ProtoMessage()
func (*MockReq) ProtoReflect ¶
func (x *MockReq) ProtoReflect() protoreflect.Message
type MockResp ¶
type MockResp struct { Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` // contains filtered or unexported fields }
var BidirectionalStreamingTestResult_Success_DEFAULT *MockResp
var ClientStreamingTestResult_Success_DEFAULT *MockResp
var ServerStreamingTestResult_Success_DEFAULT *MockResp
var UnaryTestResult_Success_DEFAULT *MockResp
func (*MockResp) Descriptor
deprecated
func (*MockResp) GetMessage ¶
func (*MockResp) ProtoMessage ¶
func (*MockResp) ProtoMessage()
func (*MockResp) ProtoReflect ¶
func (x *MockResp) ProtoReflect() protoreflect.Message
type ServerStreamingTestArgs ¶
type ServerStreamingTestArgs struct {
Req *MockReq
}
func (*ServerStreamingTestArgs) FastWrite ¶
func (p *ServerStreamingTestArgs) FastWrite(buf []byte) (n int)
func (*ServerStreamingTestArgs) GetFirstArgument ¶
func (p *ServerStreamingTestArgs) GetFirstArgument() interface{}
func (*ServerStreamingTestArgs) GetReq ¶
func (p *ServerStreamingTestArgs) GetReq() *MockReq
func (*ServerStreamingTestArgs) IsSetReq ¶
func (p *ServerStreamingTestArgs) IsSetReq() bool
func (*ServerStreamingTestArgs) Marshal ¶
func (p *ServerStreamingTestArgs) Marshal(out []byte) ([]byte, error)
func (*ServerStreamingTestArgs) Size ¶
func (p *ServerStreamingTestArgs) Size() (n int)
func (*ServerStreamingTestArgs) Unmarshal ¶
func (p *ServerStreamingTestArgs) Unmarshal(in []byte) error
type ServerStreamingTestResult ¶
type ServerStreamingTestResult struct {
Success *MockResp
}
func (*ServerStreamingTestResult) FastWrite ¶
func (p *ServerStreamingTestResult) FastWrite(buf []byte) (n int)
func (*ServerStreamingTestResult) GetResult ¶
func (p *ServerStreamingTestResult) GetResult() interface{}
func (*ServerStreamingTestResult) GetSuccess ¶
func (p *ServerStreamingTestResult) GetSuccess() *MockResp
func (*ServerStreamingTestResult) IsSetSuccess ¶
func (p *ServerStreamingTestResult) IsSetSuccess() bool
func (*ServerStreamingTestResult) Marshal ¶
func (p *ServerStreamingTestResult) Marshal(out []byte) ([]byte, error)
func (*ServerStreamingTestResult) SetSuccess ¶
func (p *ServerStreamingTestResult) SetSuccess(x interface{})
func (*ServerStreamingTestResult) Size ¶
func (p *ServerStreamingTestResult) Size() (n int)
func (*ServerStreamingTestResult) Unmarshal ¶
func (p *ServerStreamingTestResult) Unmarshal(in []byte) error
type StreamClient ¶
type StreamClient interface { ClientStreamingTest(ctx context.Context, callOptions ...streamcall.Option) (stream Mock_ClientStreamingTestClient, err error) ServerStreamingTest(ctx context.Context, Req *MockReq, callOptions ...streamcall.Option) (stream Mock_ServerStreamingTestClient, err error) BidirectionalStreamingTest(ctx context.Context, callOptions ...streamcall.Option) (stream Mock_BidirectionalStreamingTestClient, err error) }
StreamClient is designed to provide Interface for Streaming APIs.
func MustNewStreamClient ¶
func MustNewStreamClient(destService string, opts ...streamclient.Option) StreamClient
MustNewStreamClient creates a stream client for the service's streaming APIs defined in IDL. It panics if any error occurs.
func NewStreamClient ¶
func NewStreamClient(destService string, opts ...streamclient.Option) (StreamClient, error)
NewStreamClient creates a stream client for the service's streaming APIs defined in IDL.
type UnaryTestArgs ¶
type UnaryTestArgs struct {
Req *MockReq
}
func (*UnaryTestArgs) FastWrite ¶
func (p *UnaryTestArgs) FastWrite(buf []byte) (n int)
func (*UnaryTestArgs) GetFirstArgument ¶
func (p *UnaryTestArgs) GetFirstArgument() interface{}
func (*UnaryTestArgs) GetReq ¶
func (p *UnaryTestArgs) GetReq() *MockReq
func (*UnaryTestArgs) IsSetReq ¶
func (p *UnaryTestArgs) IsSetReq() bool
func (*UnaryTestArgs) Size ¶
func (p *UnaryTestArgs) Size() (n int)
func (*UnaryTestArgs) Unmarshal ¶
func (p *UnaryTestArgs) Unmarshal(in []byte) error
type UnaryTestResult ¶
type UnaryTestResult struct {
Success *MockResp
}
func (*UnaryTestResult) FastWrite ¶
func (p *UnaryTestResult) FastWrite(buf []byte) (n int)
func (*UnaryTestResult) GetResult ¶
func (p *UnaryTestResult) GetResult() interface{}
func (*UnaryTestResult) GetSuccess ¶
func (p *UnaryTestResult) GetSuccess() *MockResp
func (*UnaryTestResult) IsSetSuccess ¶
func (p *UnaryTestResult) IsSetSuccess() bool
func (*UnaryTestResult) SetSuccess ¶
func (p *UnaryTestResult) SetSuccess(x interface{})
func (*UnaryTestResult) Size ¶
func (p *UnaryTestResult) Size() (n int)
func (*UnaryTestResult) Unmarshal ¶
func (p *UnaryTestResult) Unmarshal(in []byte) error