Documentation ¶
Index ¶
- Constants
- func NewSRPCMockHandler(impl SRPCMockServer, serviceID string) srpc.Handler
- func SRPCRegisterMock(mux srpc.Mux, impl SRPCMockServer) error
- type MockMsg
- func (m *MockMsg) CloneMessageVT() protobuf_go_lite.CloneMessage
- func (m *MockMsg) CloneVT() *MockMsg
- func (this *MockMsg) EqualMessageVT(thatMsg any) bool
- func (this *MockMsg) EqualVT(that *MockMsg) bool
- func (x *MockMsg) GetBody() string
- func (x *MockMsg) MarshalJSON() ([]byte, error)
- func (x *MockMsg) MarshalProtoJSON(s *json.MarshalState)
- func (x *MockMsg) MarshalProtoText() string
- func (m *MockMsg) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *MockMsg) MarshalToVT(dAtA []byte) (int, error)
- func (m *MockMsg) MarshalVT() (dAtA []byte, err error)
- func (*MockMsg) ProtoMessage()
- func (x *MockMsg) Reset()
- func (m *MockMsg) SizeVT() (n int)
- func (x *MockMsg) String() string
- func (x *MockMsg) UnmarshalJSON(b []byte) error
- func (x *MockMsg) UnmarshalProtoJSON(s *json.UnmarshalState)
- func (m *MockMsg) UnmarshalVT(dAtA []byte) error
- type MockServer
- type SRPCMockClient
- type SRPCMockHandler
- type SRPCMockServer
- type SRPCMockUnimplementedServer
- type SRPCMock_MockRequestStream
Constants ¶
View Source
const SRPCMockServiceID = "e2e.mock.Mock"
Variables ¶
This section is empty.
Functions ¶
func NewSRPCMockHandler ¶
func NewSRPCMockHandler(impl SRPCMockServer, serviceID string) srpc.Handler
NewSRPCMockHandler constructs a new RPC handler. serviceID: if empty, uses default: e2e.mock.Mock
func SRPCRegisterMock ¶
func SRPCRegisterMock(mux srpc.Mux, impl SRPCMockServer) error
SRPCRegisterMock registers the implementation with the mux. Uses the default serviceID: e2e.mock.Mock
Types ¶
type MockMsg ¶
type MockMsg struct { Body string `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"` // contains filtered or unexported fields }
MockMsg is the mock message body.
func (*MockMsg) CloneMessageVT ¶ added in v0.18.3
func (m *MockMsg) CloneMessageVT() protobuf_go_lite.CloneMessage
func (*MockMsg) EqualMessageVT ¶ added in v0.18.3
func (*MockMsg) MarshalJSON ¶ added in v0.30.0
MarshalJSON marshals the MockMsg to JSON.
func (*MockMsg) MarshalProtoJSON ¶ added in v0.30.0
func (x *MockMsg) MarshalProtoJSON(s *json.MarshalState)
MarshalProtoJSON marshals the MockMsg message to JSON.
func (*MockMsg) MarshalProtoText ¶ added in v0.31.4
func (*MockMsg) MarshalToSizedBufferVT ¶
func (*MockMsg) ProtoMessage ¶
func (*MockMsg) ProtoMessage()
func (*MockMsg) UnmarshalJSON ¶ added in v0.30.1
UnmarshalJSON unmarshals the MockMsg from JSON.
func (*MockMsg) UnmarshalProtoJSON ¶ added in v0.30.1
func (x *MockMsg) UnmarshalProtoJSON(s *json.UnmarshalState)
UnmarshalProtoJSON unmarshals the MockMsg message from JSON.
func (*MockMsg) UnmarshalVT ¶
type MockServer ¶
type MockServer struct { // MockRequestCb is the callback to implement MockRequest. MockRequestCb func(ctx context.Context, msg *MockMsg) (*MockMsg, error) }
MockServer implements the server for Mock.
func (*MockServer) MockRequest ¶
MockRequest implements the mock request rpc.
type SRPCMockClient ¶
type SRPCMockClient interface { SRPCClient() srpc.Client MockRequest(ctx context.Context, in *MockMsg) (*MockMsg, error) }
func NewSRPCMockClient ¶
func NewSRPCMockClient(cc srpc.Client) SRPCMockClient
func NewSRPCMockClientWithServiceID ¶
func NewSRPCMockClientWithServiceID(cc srpc.Client, serviceID string) SRPCMockClient
type SRPCMockHandler ¶
type SRPCMockHandler struct {
// contains filtered or unexported fields
}
func (SRPCMockHandler) GetMethodIDs ¶
func (SRPCMockHandler) GetMethodIDs() []string
func (*SRPCMockHandler) GetServiceID ¶
func (d *SRPCMockHandler) GetServiceID() string
func (*SRPCMockHandler) InvokeMethod ¶
func (SRPCMockHandler) InvokeMethod_MockRequest ¶
func (SRPCMockHandler) InvokeMethod_MockRequest(impl SRPCMockServer, strm srpc.Stream) error
type SRPCMockServer ¶
type SRPCMockUnimplementedServer ¶
type SRPCMockUnimplementedServer struct{}
func (*SRPCMockUnimplementedServer) MockRequest ¶
Click to show internal directories.
Click to hide internal directories.