Documentation ¶
Overview ¶
Package rpc is a generated GoMock package.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrServiceNil = errors.New("rpc: nil service is not supported") ErrServiceWrongType = errors.New("rpc: only first-level pointer to struct is supported") )
Functions ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) InitService ¶
type ClientOption ¶
type ClientOption func(client *Client)
func ClientWithSerializer ¶
func ClientWithSerializer(sl serialize.Serializer) ClientOption
type GetByIDReq ¶
type GetByIDReq struct {
ID int
}
type GetByIDResp ¶
type GetByIDResp struct {
Msg string
}
type MockProxy ¶
type MockProxy struct {
// contains filtered or unexported fields
}
MockProxy is a mock of Proxy interface.
func NewMockProxy ¶
func NewMockProxy(ctrl *gomock.Controller) *MockProxy
NewMockProxy creates a new mock instance.
func (*MockProxy) EXPECT ¶
func (m *MockProxy) EXPECT() *MockProxyMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MockProxyMockRecorder ¶
type MockProxyMockRecorder struct {
// contains filtered or unexported fields
}
MockProxyMockRecorder is the mock recorder for MockProxy.
func (*MockProxyMockRecorder) Invoke ¶
func (mr *MockProxyMockRecorder) Invoke(arg0, arg1 interface{}) *gomock.Call
Invoke indicates an expected call of Invoke.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func (*Server) RegisterSerializer ¶
func (s *Server) RegisterSerializer(sl serialize.Serializer)
func (*Server) RegisterService ¶
type UserService ¶
type UserService struct { GetByID func(ctx context.Context, req *GetByIDReq) (*GetByIDResp, error) GetByIDProto func(ctx context.Context, req *gen.GetByIDReq) (*gen.GetByIDResp, error) }
func (UserService) Name ¶
func (s UserService) Name() string
type UserServiceServer ¶
func (*UserServiceServer) GetByID ¶
func (s *UserServiceServer) GetByID(ctx context.Context, req *GetByIDReq) (*GetByIDResp, error)
func (*UserServiceServer) GetByIDProto ¶
func (s *UserServiceServer) GetByIDProto(ctx context.Context, req *gen.GetByIDReq) (*gen.GetByIDResp, error)
func (*UserServiceServer) Name ¶
func (s *UserServiceServer) Name() string
Source Files ¶
Click to show internal directories.
Click to hide internal directories.