Documentation
¶
Index ¶
- func RegisterUserServiceServer(s *grpc.Server, srv UserServiceServer)
- type UserInfo
- func (*UserInfo) Descriptor() ([]byte, []int)
- func (m *UserInfo) GetUserId() int32
- func (m *UserInfo) GetUserScore() int32
- func (*UserInfo) ProtoMessage()
- func (m *UserInfo) Reset()
- func (m *UserInfo) String() string
- func (m *UserInfo) XXX_DiscardUnknown()
- func (m *UserInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *UserInfo) XXX_Merge(src proto.Message)
- func (m *UserInfo) XXX_Size() int
- func (m *UserInfo) XXX_Unmarshal(b []byte) error
- type UserScoreRequest
- func (*UserScoreRequest) Descriptor() ([]byte, []int)
- func (m *UserScoreRequest) GetUsers() []*UserInfo
- func (*UserScoreRequest) ProtoMessage()
- func (m *UserScoreRequest) Reset()
- func (m *UserScoreRequest) String() string
- func (m *UserScoreRequest) XXX_DiscardUnknown()
- func (m *UserScoreRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *UserScoreRequest) XXX_Merge(src proto.Message)
- func (m *UserScoreRequest) XXX_Size() int
- func (m *UserScoreRequest) XXX_Unmarshal(b []byte) error
- type UserScoreResponse
- func (*UserScoreResponse) Descriptor() ([]byte, []int)
- func (m *UserScoreResponse) GetUsers() []*UserInfo
- func (*UserScoreResponse) ProtoMessage()
- func (m *UserScoreResponse) Reset()
- func (m *UserScoreResponse) String() string
- func (m *UserScoreResponse) XXX_DiscardUnknown()
- func (m *UserScoreResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *UserScoreResponse) XXX_Merge(src proto.Message)
- func (m *UserScoreResponse) XXX_Size() int
- func (m *UserScoreResponse) XXX_Unmarshal(b []byte) error
- type UserServiceClient
- type UserServiceServer
- type UserService_GetUserScoreByClientStreamClient
- type UserService_GetUserScoreByClientStreamServer
- type UserService_GetUserScoreByServerStreamClient
- type UserService_GetUserScoreByServerStreamServer
- type UserService_GetUserScoreByTWSClient
- type UserService_GetUserScoreByTWSServer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterUserServiceServer ¶
func RegisterUserServiceServer(s *grpc.Server, srv UserServiceServer)
Types ¶
type UserInfo ¶
type UserInfo struct { // @inject_tag: checking:"required,CheckName" UserId int32 `protobuf:"varint,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty" checking:"required,CheckName"` UserScore int32 `protobuf:"varint,2,opt,name=user_score,json=userScore,proto3" json:"user_score,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
用户模型
func (*UserInfo) Descriptor ¶
func (*UserInfo) GetUserScore ¶
func (*UserInfo) ProtoMessage ¶
func (*UserInfo) ProtoMessage()
func (*UserInfo) XXX_DiscardUnknown ¶
func (m *UserInfo) XXX_DiscardUnknown()
func (*UserInfo) XXX_Marshal ¶
func (*UserInfo) XXX_Unmarshal ¶
type UserScoreRequest ¶
type UserScoreRequest struct { Users []*UserInfo `protobuf:"bytes,1,rep,name=users,proto3" json:"users,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*UserScoreRequest) Descriptor ¶
func (*UserScoreRequest) Descriptor() ([]byte, []int)
func (*UserScoreRequest) GetUsers ¶
func (m *UserScoreRequest) GetUsers() []*UserInfo
func (*UserScoreRequest) ProtoMessage ¶
func (*UserScoreRequest) ProtoMessage()
func (*UserScoreRequest) Reset ¶
func (m *UserScoreRequest) Reset()
func (*UserScoreRequest) String ¶
func (m *UserScoreRequest) String() string
func (*UserScoreRequest) XXX_DiscardUnknown ¶
func (m *UserScoreRequest) XXX_DiscardUnknown()
func (*UserScoreRequest) XXX_Marshal ¶
func (m *UserScoreRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*UserScoreRequest) XXX_Merge ¶
func (dst *UserScoreRequest) XXX_Merge(src proto.Message)
func (*UserScoreRequest) XXX_Size ¶
func (m *UserScoreRequest) XXX_Size() int
func (*UserScoreRequest) XXX_Unmarshal ¶
func (m *UserScoreRequest) XXX_Unmarshal(b []byte) error
type UserScoreResponse ¶
type UserScoreResponse struct { Users []*UserInfo `protobuf:"bytes,1,rep,name=users,proto3" json:"users,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*UserScoreResponse) Descriptor ¶
func (*UserScoreResponse) Descriptor() ([]byte, []int)
func (*UserScoreResponse) GetUsers ¶
func (m *UserScoreResponse) GetUsers() []*UserInfo
func (*UserScoreResponse) ProtoMessage ¶
func (*UserScoreResponse) ProtoMessage()
func (*UserScoreResponse) Reset ¶
func (m *UserScoreResponse) Reset()
func (*UserScoreResponse) String ¶
func (m *UserScoreResponse) String() string
func (*UserScoreResponse) XXX_DiscardUnknown ¶
func (m *UserScoreResponse) XXX_DiscardUnknown()
func (*UserScoreResponse) XXX_Marshal ¶
func (m *UserScoreResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*UserScoreResponse) XXX_Merge ¶
func (dst *UserScoreResponse) XXX_Merge(src proto.Message)
func (*UserScoreResponse) XXX_Size ¶
func (m *UserScoreResponse) XXX_Size() int
func (*UserScoreResponse) XXX_Unmarshal ¶
func (m *UserScoreResponse) XXX_Unmarshal(b []byte) error
type UserServiceClient ¶
type UserServiceClient interface { GetUserScore(ctx context.Context, in *UserScoreRequest, opts ...grpc.CallOption) (*UserScoreResponse, error) GetUserScoreByServerStream(ctx context.Context, in *UserScoreRequest, opts ...grpc.CallOption) (UserService_GetUserScoreByServerStreamClient, error) GetUserScoreByClientStream(ctx context.Context, opts ...grpc.CallOption) (UserService_GetUserScoreByClientStreamClient, error) GetUserScoreByTWS(ctx context.Context, opts ...grpc.CallOption) (UserService_GetUserScoreByTWSClient, error) }
UserServiceClient is the client API for UserService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewUserServiceClient ¶
func NewUserServiceClient(cc *grpc.ClientConn) UserServiceClient
type UserServiceServer ¶
type UserServiceServer interface { GetUserScore(context.Context, *UserScoreRequest) (*UserScoreResponse, error) GetUserScoreByServerStream(*UserScoreRequest, UserService_GetUserScoreByServerStreamServer) error GetUserScoreByClientStream(UserService_GetUserScoreByClientStreamServer) error GetUserScoreByTWS(UserService_GetUserScoreByTWSServer) error }
UserServiceServer is the server API for UserService service.
type UserService_GetUserScoreByClientStreamClient ¶
type UserService_GetUserScoreByClientStreamClient interface { Send(*UserScoreRequest) error CloseAndRecv() (*UserScoreResponse, error) grpc.ClientStream }
type UserService_GetUserScoreByClientStreamServer ¶
type UserService_GetUserScoreByClientStreamServer interface { SendAndClose(*UserScoreResponse) error Recv() (*UserScoreRequest, error) grpc.ServerStream }
type UserService_GetUserScoreByServerStreamClient ¶
type UserService_GetUserScoreByServerStreamClient interface { Recv() (*UserScoreResponse, error) grpc.ClientStream }
type UserService_GetUserScoreByServerStreamServer ¶
type UserService_GetUserScoreByServerStreamServer interface { Send(*UserScoreResponse) error grpc.ServerStream }
type UserService_GetUserScoreByTWSClient ¶
type UserService_GetUserScoreByTWSClient interface { Send(*UserScoreRequest) error Recv() (*UserScoreResponse, error) grpc.ClientStream }
type UserService_GetUserScoreByTWSServer ¶
type UserService_GetUserScoreByTWSServer interface { Send(*UserScoreResponse) error Recv() (*UserScoreRequest, error) grpc.ServerStream }
Click to show internal directories.
Click to hide internal directories.