Documentation ¶
Overview ¶
Package transporttest is a generated GoMock package.
Package transporttest is a generated GoMock package.
Package transporttest is a generated GoMock package.
Package transporttest is a generated GoMock package.
Package transporttest is a generated GoMock package.
Package transporttest is a generated GoMock package.
Package transporttest is a generated GoMock package.
Index ¶
- Constants
- type ContextMatcher
- type ContextMatcherOption
- type ContextTTL
- type EchoHandler
- type EchoRouter
- type FakeResponseWriter
- type MockClientConfig
- type MockClientConfigMockRecorder
- type MockClientConfigProvider
- type MockClientConfigProviderMockRecorder
- type MockInbound
- type MockInboundMockRecorder
- func (mr *MockInboundMockRecorder) IsRunning() *gomock.Call
- func (mr *MockInboundMockRecorder) SetRouter(arg0 interface{}) *gomock.Call
- func (mr *MockInboundMockRecorder) Start() *gomock.Call
- func (mr *MockInboundMockRecorder) Stop() *gomock.Call
- func (mr *MockInboundMockRecorder) Transports() *gomock.Call
- type MockOnewayHandler
- type MockOnewayHandlerMockRecorder
- type MockOnewayOutbound
- func (m *MockOnewayOutbound) CallOneway(arg0 context.Context, arg1 *transport.Request) (transport.Ack, error)
- func (m *MockOnewayOutbound) EXPECT() *MockOnewayOutboundMockRecorder
- func (m *MockOnewayOutbound) IsRunning() bool
- func (m *MockOnewayOutbound) Start() error
- func (m *MockOnewayOutbound) Stop() error
- func (m *MockOnewayOutbound) Transports() []transport.Transport
- type MockOnewayOutboundMockRecorder
- func (mr *MockOnewayOutboundMockRecorder) CallOneway(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockOnewayOutboundMockRecorder) IsRunning() *gomock.Call
- func (mr *MockOnewayOutboundMockRecorder) Start() *gomock.Call
- func (mr *MockOnewayOutboundMockRecorder) Stop() *gomock.Call
- func (mr *MockOnewayOutboundMockRecorder) Transports() *gomock.Call
- type MockRouteTable
- type MockRouteTableMockRecorder
- type MockRouter
- type MockRouterMockRecorder
- type MockStream
- func (m *MockStream) Context() context.Context
- func (m *MockStream) EXPECT() *MockStreamMockRecorder
- func (m *MockStream) ReceiveMessage(arg0 context.Context) (*transport.StreamMessage, error)
- func (m *MockStream) Request() *transport.StreamRequest
- func (m *MockStream) SendMessage(arg0 context.Context, arg1 *transport.StreamMessage) error
- type MockStreamCloser
- func (m *MockStreamCloser) Close(arg0 context.Context) error
- func (m *MockStreamCloser) Context() context.Context
- func (m *MockStreamCloser) EXPECT() *MockStreamCloserMockRecorder
- func (m *MockStreamCloser) ReceiveMessage(arg0 context.Context) (*transport.StreamMessage, error)
- func (m *MockStreamCloser) Request() *transport.StreamRequest
- func (m *MockStreamCloser) SendMessage(arg0 context.Context, arg1 *transport.StreamMessage) error
- type MockStreamCloserMockRecorder
- func (mr *MockStreamCloserMockRecorder) Close(arg0 interface{}) *gomock.Call
- func (mr *MockStreamCloserMockRecorder) Context() *gomock.Call
- func (mr *MockStreamCloserMockRecorder) ReceiveMessage(arg0 interface{}) *gomock.Call
- func (mr *MockStreamCloserMockRecorder) Request() *gomock.Call
- func (mr *MockStreamCloserMockRecorder) SendMessage(arg0, arg1 interface{}) *gomock.Call
- type MockStreamHandler
- type MockStreamHandlerMockRecorder
- type MockStreamMockRecorder
- type MockStreamOutbound
- func (m *MockStreamOutbound) CallStream(arg0 context.Context, arg1 *transport.StreamRequest) (*transport.ClientStream, error)
- func (m *MockStreamOutbound) EXPECT() *MockStreamOutboundMockRecorder
- func (m *MockStreamOutbound) IsRunning() bool
- func (m *MockStreamOutbound) Start() error
- func (m *MockStreamOutbound) Stop() error
- func (m *MockStreamOutbound) Transports() []transport.Transport
- type MockStreamOutboundMockRecorder
- func (mr *MockStreamOutboundMockRecorder) CallStream(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockStreamOutboundMockRecorder) IsRunning() *gomock.Call
- func (mr *MockStreamOutboundMockRecorder) Start() *gomock.Call
- func (mr *MockStreamOutboundMockRecorder) Stop() *gomock.Call
- func (mr *MockStreamOutboundMockRecorder) Transports() *gomock.Call
- type MockTransport
- type MockTransportMockRecorder
- type MockUnaryHandler
- type MockUnaryHandlerMockRecorder
- type MockUnaryOutbound
- func (m *MockUnaryOutbound) Call(arg0 context.Context, arg1 *transport.Request) (*transport.Response, error)
- func (m *MockUnaryOutbound) EXPECT() *MockUnaryOutboundMockRecorder
- func (m *MockUnaryOutbound) IsRunning() bool
- func (m *MockUnaryOutbound) Start() error
- func (m *MockUnaryOutbound) Stop() error
- func (m *MockUnaryOutbound) Transports() []transport.Transport
- type MockUnaryOutboundMockRecorder
- func (mr *MockUnaryOutboundMockRecorder) Call(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockUnaryOutboundMockRecorder) IsRunning() *gomock.Call
- func (mr *MockUnaryOutboundMockRecorder) Start() *gomock.Call
- func (mr *MockUnaryOutboundMockRecorder) Stop() *gomock.Call
- func (mr *MockUnaryOutboundMockRecorder) Transports() *gomock.Call
- type RequestMatcher
- type ResponseMatcher
Constants ¶
const DefaultTTLDelta = 100 * time.Millisecond
DefaultTTLDelta is the default TTLDelta used by RequestMatchers.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ContextMatcher ¶
ContextMatcher is a Matcher for verifying that a context's deadline is within expected bounds: the current time, plus a TTL, plus or minus some tolerance.
func NewContextMatcher ¶
func NewContextMatcher(t *testing.T, options ...ContextMatcherOption) *ContextMatcher
NewContextMatcher creates a ContextMatcher to verify properties about a Context.
func (*ContextMatcher) Matches ¶
func (c *ContextMatcher) Matches(got interface{}) bool
Matches a context against an expected context, returning true only if the given object is a context with a deadline that is now, plus the expected TTL, plus or minus some tolerance.
func (*ContextMatcher) String ¶
func (c *ContextMatcher) String() string
type ContextMatcherOption ¶
type ContextMatcherOption interface {
// contains filtered or unexported methods
}
ContextMatcherOption customizes the behavior of a ContextMatcher.
type ContextTTL ¶
ContextTTL requires that a Context have the given TTL on it, with a tolerance of TTLDelta.
type EchoHandler ¶
type EchoHandler struct{}
EchoHandler is a unary handler that echoes the request body on the response body for any inbound request.
func (EchoHandler) Handle ¶
func (EchoHandler) Handle(ctx context.Context, req *transport.Request, resw transport.ResponseWriter) error
Handle handles an inbound request by copying the request body to the response body.
type EchoRouter ¶
type EchoRouter struct{}
EchoRouter is a router that echoes all unary inbound requests, with no explicit procedures.
func (EchoRouter) Choose ¶
func (EchoRouter) Choose(ctx context.Context, req *transport.Request) (transport.HandlerSpec, error)
Choose always returns a unary echo handler.
func (EchoRouter) Procedures ¶
func (EchoRouter) Procedures() []transport.Procedure
Procedures returns no explicitly supported procedures.
type FakeResponseWriter ¶
type FakeResponseWriter struct { IsApplicationError bool Headers transport.Headers Body bytes.Buffer }
FakeResponseWriter is a ResponseWriter that records the headers and the body written to it.
func (*FakeResponseWriter) AddHeaders ¶
func (fw *FakeResponseWriter) AddHeaders(h transport.Headers)
AddHeaders for FakeResponseWriter.
func (*FakeResponseWriter) SetApplicationError ¶
func (fw *FakeResponseWriter) SetApplicationError()
SetApplicationError for FakeResponseWriter.
type MockClientConfig ¶
type MockClientConfig struct {
// contains filtered or unexported fields
}
MockClientConfig is a mock of ClientConfig interface
func NewMockClientConfig ¶
func NewMockClientConfig(ctrl *gomock.Controller) *MockClientConfig
NewMockClientConfig creates a new mock instance
func (*MockClientConfig) Caller ¶
func (m *MockClientConfig) Caller() string
Caller mocks base method
func (*MockClientConfig) EXPECT ¶
func (m *MockClientConfig) EXPECT() *MockClientConfigMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockClientConfig) GetOnewayOutbound ¶
func (m *MockClientConfig) GetOnewayOutbound() transport.OnewayOutbound
GetOnewayOutbound mocks base method
func (*MockClientConfig) GetUnaryOutbound ¶
func (m *MockClientConfig) GetUnaryOutbound() transport.UnaryOutbound
GetUnaryOutbound mocks base method
func (*MockClientConfig) Service ¶
func (m *MockClientConfig) Service() string
Service mocks base method
type MockClientConfigMockRecorder ¶
type MockClientConfigMockRecorder struct {
// contains filtered or unexported fields
}
MockClientConfigMockRecorder is the mock recorder for MockClientConfig
func (*MockClientConfigMockRecorder) Caller ¶
func (mr *MockClientConfigMockRecorder) Caller() *gomock.Call
Caller indicates an expected call of Caller
func (*MockClientConfigMockRecorder) GetOnewayOutbound ¶
func (mr *MockClientConfigMockRecorder) GetOnewayOutbound() *gomock.Call
GetOnewayOutbound indicates an expected call of GetOnewayOutbound
func (*MockClientConfigMockRecorder) GetUnaryOutbound ¶
func (mr *MockClientConfigMockRecorder) GetUnaryOutbound() *gomock.Call
GetUnaryOutbound indicates an expected call of GetUnaryOutbound
func (*MockClientConfigMockRecorder) Service ¶
func (mr *MockClientConfigMockRecorder) Service() *gomock.Call
Service indicates an expected call of Service
type MockClientConfigProvider ¶
type MockClientConfigProvider struct {
// contains filtered or unexported fields
}
MockClientConfigProvider is a mock of ClientConfigProvider interface
func NewMockClientConfigProvider ¶
func NewMockClientConfigProvider(ctrl *gomock.Controller) *MockClientConfigProvider
NewMockClientConfigProvider creates a new mock instance
func (*MockClientConfigProvider) ClientConfig ¶
func (m *MockClientConfigProvider) ClientConfig(arg0 string) transport.ClientConfig
ClientConfig mocks base method
func (*MockClientConfigProvider) EXPECT ¶
func (m *MockClientConfigProvider) EXPECT() *MockClientConfigProviderMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
type MockClientConfigProviderMockRecorder ¶
type MockClientConfigProviderMockRecorder struct {
// contains filtered or unexported fields
}
MockClientConfigProviderMockRecorder is the mock recorder for MockClientConfigProvider
func (*MockClientConfigProviderMockRecorder) ClientConfig ¶
func (mr *MockClientConfigProviderMockRecorder) ClientConfig(arg0 interface{}) *gomock.Call
ClientConfig indicates an expected call of ClientConfig
type MockInbound ¶
type MockInbound struct {
// contains filtered or unexported fields
}
MockInbound is a mock of Inbound interface
func NewMockInbound ¶
func NewMockInbound(ctrl *gomock.Controller) *MockInbound
NewMockInbound creates a new mock instance
func (*MockInbound) EXPECT ¶
func (m *MockInbound) EXPECT() *MockInboundMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockInbound) SetRouter ¶
func (m *MockInbound) SetRouter(arg0 transport.Router)
SetRouter mocks base method
func (*MockInbound) Transports ¶
func (m *MockInbound) Transports() []transport.Transport
Transports mocks base method
type MockInboundMockRecorder ¶
type MockInboundMockRecorder struct {
// contains filtered or unexported fields
}
MockInboundMockRecorder is the mock recorder for MockInbound
func (*MockInboundMockRecorder) IsRunning ¶
func (mr *MockInboundMockRecorder) IsRunning() *gomock.Call
IsRunning indicates an expected call of IsRunning
func (*MockInboundMockRecorder) SetRouter ¶
func (mr *MockInboundMockRecorder) SetRouter(arg0 interface{}) *gomock.Call
SetRouter indicates an expected call of SetRouter
func (*MockInboundMockRecorder) Start ¶
func (mr *MockInboundMockRecorder) Start() *gomock.Call
Start indicates an expected call of Start
func (*MockInboundMockRecorder) Stop ¶
func (mr *MockInboundMockRecorder) Stop() *gomock.Call
Stop indicates an expected call of Stop
func (*MockInboundMockRecorder) Transports ¶
func (mr *MockInboundMockRecorder) Transports() *gomock.Call
Transports indicates an expected call of Transports
type MockOnewayHandler ¶
type MockOnewayHandler struct {
// contains filtered or unexported fields
}
MockOnewayHandler is a mock of OnewayHandler interface
func NewMockOnewayHandler ¶
func NewMockOnewayHandler(ctrl *gomock.Controller) *MockOnewayHandler
NewMockOnewayHandler creates a new mock instance
func (*MockOnewayHandler) EXPECT ¶
func (m *MockOnewayHandler) EXPECT() *MockOnewayHandlerMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockOnewayHandler) HandleOneway ¶
HandleOneway mocks base method
type MockOnewayHandlerMockRecorder ¶
type MockOnewayHandlerMockRecorder struct {
// contains filtered or unexported fields
}
MockOnewayHandlerMockRecorder is the mock recorder for MockOnewayHandler
func (*MockOnewayHandlerMockRecorder) HandleOneway ¶
func (mr *MockOnewayHandlerMockRecorder) HandleOneway(arg0, arg1 interface{}) *gomock.Call
HandleOneway indicates an expected call of HandleOneway
type MockOnewayOutbound ¶
type MockOnewayOutbound struct {
// contains filtered or unexported fields
}
MockOnewayOutbound is a mock of OnewayOutbound interface
func NewMockOnewayOutbound ¶
func NewMockOnewayOutbound(ctrl *gomock.Controller) *MockOnewayOutbound
NewMockOnewayOutbound creates a new mock instance
func (*MockOnewayOutbound) CallOneway ¶
func (m *MockOnewayOutbound) CallOneway(arg0 context.Context, arg1 *transport.Request) (transport.Ack, error)
CallOneway mocks base method
func (*MockOnewayOutbound) EXPECT ¶
func (m *MockOnewayOutbound) EXPECT() *MockOnewayOutboundMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockOnewayOutbound) IsRunning ¶
func (m *MockOnewayOutbound) IsRunning() bool
IsRunning mocks base method
func (*MockOnewayOutbound) Start ¶
func (m *MockOnewayOutbound) Start() error
Start mocks base method
func (*MockOnewayOutbound) Transports ¶
func (m *MockOnewayOutbound) Transports() []transport.Transport
Transports mocks base method
type MockOnewayOutboundMockRecorder ¶
type MockOnewayOutboundMockRecorder struct {
// contains filtered or unexported fields
}
MockOnewayOutboundMockRecorder is the mock recorder for MockOnewayOutbound
func (*MockOnewayOutboundMockRecorder) CallOneway ¶
func (mr *MockOnewayOutboundMockRecorder) CallOneway(arg0, arg1 interface{}) *gomock.Call
CallOneway indicates an expected call of CallOneway
func (*MockOnewayOutboundMockRecorder) IsRunning ¶
func (mr *MockOnewayOutboundMockRecorder) IsRunning() *gomock.Call
IsRunning indicates an expected call of IsRunning
func (*MockOnewayOutboundMockRecorder) Start ¶
func (mr *MockOnewayOutboundMockRecorder) Start() *gomock.Call
Start indicates an expected call of Start
func (*MockOnewayOutboundMockRecorder) Stop ¶
func (mr *MockOnewayOutboundMockRecorder) Stop() *gomock.Call
Stop indicates an expected call of Stop
func (*MockOnewayOutboundMockRecorder) Transports ¶
func (mr *MockOnewayOutboundMockRecorder) Transports() *gomock.Call
Transports indicates an expected call of Transports
type MockRouteTable ¶
type MockRouteTable struct {
// contains filtered or unexported fields
}
MockRouteTable is a mock of RouteTable interface
func NewMockRouteTable ¶
func NewMockRouteTable(ctrl *gomock.Controller) *MockRouteTable
NewMockRouteTable creates a new mock instance
func (*MockRouteTable) Choose ¶
func (m *MockRouteTable) Choose(arg0 context.Context, arg1 *transport.Request) (transport.HandlerSpec, error)
Choose mocks base method
func (*MockRouteTable) EXPECT ¶
func (m *MockRouteTable) EXPECT() *MockRouteTableMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockRouteTable) Procedures ¶
func (m *MockRouteTable) Procedures() []transport.Procedure
Procedures mocks base method
func (*MockRouteTable) Register ¶
func (m *MockRouteTable) Register(arg0 []transport.Procedure)
Register mocks base method
type MockRouteTableMockRecorder ¶
type MockRouteTableMockRecorder struct {
// contains filtered or unexported fields
}
MockRouteTableMockRecorder is the mock recorder for MockRouteTable
func (*MockRouteTableMockRecorder) Choose ¶
func (mr *MockRouteTableMockRecorder) Choose(arg0, arg1 interface{}) *gomock.Call
Choose indicates an expected call of Choose
func (*MockRouteTableMockRecorder) Procedures ¶
func (mr *MockRouteTableMockRecorder) Procedures() *gomock.Call
Procedures indicates an expected call of Procedures
func (*MockRouteTableMockRecorder) Register ¶
func (mr *MockRouteTableMockRecorder) Register(arg0 interface{}) *gomock.Call
Register indicates an expected call of Register
type MockRouter ¶
type MockRouter struct {
// contains filtered or unexported fields
}
MockRouter is a mock of Router interface
func NewMockRouter ¶
func NewMockRouter(ctrl *gomock.Controller) *MockRouter
NewMockRouter creates a new mock instance
func (*MockRouter) Choose ¶
func (m *MockRouter) Choose(arg0 context.Context, arg1 *transport.Request) (transport.HandlerSpec, error)
Choose mocks base method
func (*MockRouter) EXPECT ¶
func (m *MockRouter) EXPECT() *MockRouterMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockRouter) Procedures ¶
func (m *MockRouter) Procedures() []transport.Procedure
Procedures mocks base method
type MockRouterMockRecorder ¶
type MockRouterMockRecorder struct {
// contains filtered or unexported fields
}
MockRouterMockRecorder is the mock recorder for MockRouter
func (*MockRouterMockRecorder) Choose ¶
func (mr *MockRouterMockRecorder) Choose(arg0, arg1 interface{}) *gomock.Call
Choose indicates an expected call of Choose
func (*MockRouterMockRecorder) Procedures ¶
func (mr *MockRouterMockRecorder) Procedures() *gomock.Call
Procedures indicates an expected call of Procedures
type MockStream ¶
type MockStream struct {
// contains filtered or unexported fields
}
MockStream is a mock of Stream interface
func NewMockStream ¶
func NewMockStream(ctrl *gomock.Controller) *MockStream
NewMockStream creates a new mock instance
func (*MockStream) Context ¶
func (m *MockStream) Context() context.Context
Context mocks base method
func (*MockStream) EXPECT ¶
func (m *MockStream) EXPECT() *MockStreamMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockStream) ReceiveMessage ¶
func (m *MockStream) ReceiveMessage(arg0 context.Context) (*transport.StreamMessage, error)
ReceiveMessage mocks base method
func (*MockStream) Request ¶
func (m *MockStream) Request() *transport.StreamRequest
Request mocks base method
func (*MockStream) SendMessage ¶
func (m *MockStream) SendMessage(arg0 context.Context, arg1 *transport.StreamMessage) error
SendMessage mocks base method
type MockStreamCloser ¶
type MockStreamCloser struct {
// contains filtered or unexported fields
}
MockStreamCloser is a mock of StreamCloser interface
func NewMockStreamCloser ¶
func NewMockStreamCloser(ctrl *gomock.Controller) *MockStreamCloser
NewMockStreamCloser creates a new mock instance
func (*MockStreamCloser) Close ¶
func (m *MockStreamCloser) Close(arg0 context.Context) error
Close mocks base method
func (*MockStreamCloser) Context ¶
func (m *MockStreamCloser) Context() context.Context
Context mocks base method
func (*MockStreamCloser) EXPECT ¶
func (m *MockStreamCloser) EXPECT() *MockStreamCloserMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockStreamCloser) ReceiveMessage ¶
func (m *MockStreamCloser) ReceiveMessage(arg0 context.Context) (*transport.StreamMessage, error)
ReceiveMessage mocks base method
func (*MockStreamCloser) Request ¶
func (m *MockStreamCloser) Request() *transport.StreamRequest
Request mocks base method
func (*MockStreamCloser) SendMessage ¶
func (m *MockStreamCloser) SendMessage(arg0 context.Context, arg1 *transport.StreamMessage) error
SendMessage mocks base method
type MockStreamCloserMockRecorder ¶
type MockStreamCloserMockRecorder struct {
// contains filtered or unexported fields
}
MockStreamCloserMockRecorder is the mock recorder for MockStreamCloser
func (*MockStreamCloserMockRecorder) Close ¶
func (mr *MockStreamCloserMockRecorder) Close(arg0 interface{}) *gomock.Call
Close indicates an expected call of Close
func (*MockStreamCloserMockRecorder) Context ¶
func (mr *MockStreamCloserMockRecorder) Context() *gomock.Call
Context indicates an expected call of Context
func (*MockStreamCloserMockRecorder) ReceiveMessage ¶
func (mr *MockStreamCloserMockRecorder) ReceiveMessage(arg0 interface{}) *gomock.Call
ReceiveMessage indicates an expected call of ReceiveMessage
func (*MockStreamCloserMockRecorder) Request ¶
func (mr *MockStreamCloserMockRecorder) Request() *gomock.Call
Request indicates an expected call of Request
func (*MockStreamCloserMockRecorder) SendMessage ¶
func (mr *MockStreamCloserMockRecorder) SendMessage(arg0, arg1 interface{}) *gomock.Call
SendMessage indicates an expected call of SendMessage
type MockStreamHandler ¶
type MockStreamHandler struct {
// contains filtered or unexported fields
}
MockStreamHandler is a mock of StreamHandler interface
func NewMockStreamHandler ¶
func NewMockStreamHandler(ctrl *gomock.Controller) *MockStreamHandler
NewMockStreamHandler creates a new mock instance
func (*MockStreamHandler) EXPECT ¶
func (m *MockStreamHandler) EXPECT() *MockStreamHandlerMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockStreamHandler) HandleStream ¶
func (m *MockStreamHandler) HandleStream(arg0 *transport.ServerStream) error
HandleStream mocks base method
type MockStreamHandlerMockRecorder ¶
type MockStreamHandlerMockRecorder struct {
// contains filtered or unexported fields
}
MockStreamHandlerMockRecorder is the mock recorder for MockStreamHandler
func (*MockStreamHandlerMockRecorder) HandleStream ¶
func (mr *MockStreamHandlerMockRecorder) HandleStream(arg0 interface{}) *gomock.Call
HandleStream indicates an expected call of HandleStream
type MockStreamMockRecorder ¶
type MockStreamMockRecorder struct {
// contains filtered or unexported fields
}
MockStreamMockRecorder is the mock recorder for MockStream
func (*MockStreamMockRecorder) Context ¶
func (mr *MockStreamMockRecorder) Context() *gomock.Call
Context indicates an expected call of Context
func (*MockStreamMockRecorder) ReceiveMessage ¶
func (mr *MockStreamMockRecorder) ReceiveMessage(arg0 interface{}) *gomock.Call
ReceiveMessage indicates an expected call of ReceiveMessage
func (*MockStreamMockRecorder) Request ¶
func (mr *MockStreamMockRecorder) Request() *gomock.Call
Request indicates an expected call of Request
func (*MockStreamMockRecorder) SendMessage ¶
func (mr *MockStreamMockRecorder) SendMessage(arg0, arg1 interface{}) *gomock.Call
SendMessage indicates an expected call of SendMessage
type MockStreamOutbound ¶
type MockStreamOutbound struct {
// contains filtered or unexported fields
}
MockStreamOutbound is a mock of StreamOutbound interface
func NewMockStreamOutbound ¶
func NewMockStreamOutbound(ctrl *gomock.Controller) *MockStreamOutbound
NewMockStreamOutbound creates a new mock instance
func (*MockStreamOutbound) CallStream ¶
func (m *MockStreamOutbound) CallStream(arg0 context.Context, arg1 *transport.StreamRequest) (*transport.ClientStream, error)
CallStream mocks base method
func (*MockStreamOutbound) EXPECT ¶
func (m *MockStreamOutbound) EXPECT() *MockStreamOutboundMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockStreamOutbound) IsRunning ¶
func (m *MockStreamOutbound) IsRunning() bool
IsRunning mocks base method
func (*MockStreamOutbound) Start ¶
func (m *MockStreamOutbound) Start() error
Start mocks base method
func (*MockStreamOutbound) Transports ¶
func (m *MockStreamOutbound) Transports() []transport.Transport
Transports mocks base method
type MockStreamOutboundMockRecorder ¶
type MockStreamOutboundMockRecorder struct {
// contains filtered or unexported fields
}
MockStreamOutboundMockRecorder is the mock recorder for MockStreamOutbound
func (*MockStreamOutboundMockRecorder) CallStream ¶
func (mr *MockStreamOutboundMockRecorder) CallStream(arg0, arg1 interface{}) *gomock.Call
CallStream indicates an expected call of CallStream
func (*MockStreamOutboundMockRecorder) IsRunning ¶
func (mr *MockStreamOutboundMockRecorder) IsRunning() *gomock.Call
IsRunning indicates an expected call of IsRunning
func (*MockStreamOutboundMockRecorder) Start ¶
func (mr *MockStreamOutboundMockRecorder) Start() *gomock.Call
Start indicates an expected call of Start
func (*MockStreamOutboundMockRecorder) Stop ¶
func (mr *MockStreamOutboundMockRecorder) Stop() *gomock.Call
Stop indicates an expected call of Stop
func (*MockStreamOutboundMockRecorder) Transports ¶
func (mr *MockStreamOutboundMockRecorder) Transports() *gomock.Call
Transports indicates an expected call of Transports
type MockTransport ¶
type MockTransport struct {
// contains filtered or unexported fields
}
MockTransport is a mock of Transport interface
func NewMockTransport ¶
func NewMockTransport(ctrl *gomock.Controller) *MockTransport
NewMockTransport creates a new mock instance
func (*MockTransport) EXPECT ¶
func (m *MockTransport) EXPECT() *MockTransportMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockTransport) IsRunning ¶
func (m *MockTransport) IsRunning() bool
IsRunning mocks base method
type MockTransportMockRecorder ¶
type MockTransportMockRecorder struct {
// contains filtered or unexported fields
}
MockTransportMockRecorder is the mock recorder for MockTransport
func (*MockTransportMockRecorder) IsRunning ¶
func (mr *MockTransportMockRecorder) IsRunning() *gomock.Call
IsRunning indicates an expected call of IsRunning
func (*MockTransportMockRecorder) Start ¶
func (mr *MockTransportMockRecorder) Start() *gomock.Call
Start indicates an expected call of Start
func (*MockTransportMockRecorder) Stop ¶
func (mr *MockTransportMockRecorder) Stop() *gomock.Call
Stop indicates an expected call of Stop
type MockUnaryHandler ¶
type MockUnaryHandler struct {
// contains filtered or unexported fields
}
MockUnaryHandler is a mock of UnaryHandler interface
func NewMockUnaryHandler ¶
func NewMockUnaryHandler(ctrl *gomock.Controller) *MockUnaryHandler
NewMockUnaryHandler creates a new mock instance
func (*MockUnaryHandler) EXPECT ¶
func (m *MockUnaryHandler) EXPECT() *MockUnaryHandlerMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockUnaryHandler) Handle ¶
func (m *MockUnaryHandler) Handle(arg0 context.Context, arg1 *transport.Request, arg2 transport.ResponseWriter) error
Handle mocks base method
type MockUnaryHandlerMockRecorder ¶
type MockUnaryHandlerMockRecorder struct {
// contains filtered or unexported fields
}
MockUnaryHandlerMockRecorder is the mock recorder for MockUnaryHandler
func (*MockUnaryHandlerMockRecorder) Handle ¶
func (mr *MockUnaryHandlerMockRecorder) Handle(arg0, arg1, arg2 interface{}) *gomock.Call
Handle indicates an expected call of Handle
type MockUnaryOutbound ¶
type MockUnaryOutbound struct {
// contains filtered or unexported fields
}
MockUnaryOutbound is a mock of UnaryOutbound interface
func NewMockUnaryOutbound ¶
func NewMockUnaryOutbound(ctrl *gomock.Controller) *MockUnaryOutbound
NewMockUnaryOutbound creates a new mock instance
func (*MockUnaryOutbound) Call ¶
func (m *MockUnaryOutbound) Call(arg0 context.Context, arg1 *transport.Request) (*transport.Response, error)
Call mocks base method
func (*MockUnaryOutbound) EXPECT ¶
func (m *MockUnaryOutbound) EXPECT() *MockUnaryOutboundMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockUnaryOutbound) IsRunning ¶
func (m *MockUnaryOutbound) IsRunning() bool
IsRunning mocks base method
func (*MockUnaryOutbound) Transports ¶
func (m *MockUnaryOutbound) Transports() []transport.Transport
Transports mocks base method
type MockUnaryOutboundMockRecorder ¶
type MockUnaryOutboundMockRecorder struct {
// contains filtered or unexported fields
}
MockUnaryOutboundMockRecorder is the mock recorder for MockUnaryOutbound
func (*MockUnaryOutboundMockRecorder) Call ¶
func (mr *MockUnaryOutboundMockRecorder) Call(arg0, arg1 interface{}) *gomock.Call
Call indicates an expected call of Call
func (*MockUnaryOutboundMockRecorder) IsRunning ¶
func (mr *MockUnaryOutboundMockRecorder) IsRunning() *gomock.Call
IsRunning indicates an expected call of IsRunning
func (*MockUnaryOutboundMockRecorder) Start ¶
func (mr *MockUnaryOutboundMockRecorder) Start() *gomock.Call
Start indicates an expected call of Start
func (*MockUnaryOutboundMockRecorder) Stop ¶
func (mr *MockUnaryOutboundMockRecorder) Stop() *gomock.Call
Stop indicates an expected call of Stop
func (*MockUnaryOutboundMockRecorder) Transports ¶
func (mr *MockUnaryOutboundMockRecorder) Transports() *gomock.Call
Transports indicates an expected call of Transports
type RequestMatcher ¶
type RequestMatcher struct {
// contains filtered or unexported fields
}
RequestMatcher may be used in gomock argument lists to assert that two requests match.
Requests are considered to be matching if: all their primitive parameters match, the headers of the received request include all the headers from the source request, and the contents of the request bodies are the same.
func NewRequestMatcher ¶
func NewRequestMatcher(t *testing.T, r *transport.Request) RequestMatcher
NewRequestMatcher constructs a new RequestMatcher from the given testing.T and request.
The request's contents are read in their entirety and replaced with a bytes.Reader.
func (RequestMatcher) Matches ¶
func (m RequestMatcher) Matches(got interface{}) bool
Matches checks if the given object matches the Request provided in NewRequestMatcher.
func (RequestMatcher) String ¶
func (m RequestMatcher) String() string
type ResponseMatcher ¶
type ResponseMatcher struct {
// contains filtered or unexported fields
}
ResponseMatcher is similar to RequestMatcher but for responses.
func NewResponseMatcher ¶
func NewResponseMatcher(t *testing.T, r *transport.Response) ResponseMatcher
NewResponseMatcher builds a new ResponseMatcher that verifies that responses match the given Response.
func (ResponseMatcher) Matches ¶
func (m ResponseMatcher) Matches(got interface{}) bool
Matches checks if the given object matches the Response provided in NewResponseMatcher.