Documentation ¶
Index ¶
- Constants
- Variables
- type GetPlayerInfoReq
- func (*GetPlayerInfoReq) Descriptor() ([]byte, []int)
- func (m *GetPlayerInfoReq) GetPlayerId() int64
- func (m *GetPlayerInfoReq) Marshal() (dAtA []byte, err error)
- func (m *GetPlayerInfoReq) MarshalTo(dAtA []byte) (int, error)
- func (m *GetPlayerInfoReq) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*GetPlayerInfoReq) ProtoMessage()
- func (m *GetPlayerInfoReq) Reset()
- func (m *GetPlayerInfoReq) Size() (n int)
- func (m *GetPlayerInfoReq) String() string
- func (m *GetPlayerInfoReq) Unmarshal(dAtA []byte) error
- func (m *GetPlayerInfoReq) XXX_DiscardUnknown()
- func (m *GetPlayerInfoReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *GetPlayerInfoReq) XXX_Merge(src proto.Message)
- func (m *GetPlayerInfoReq) XXX_Size() int
- func (m *GetPlayerInfoReq) XXX_Unmarshal(b []byte) error
- type GetPlayerInfoResponse
- func (*GetPlayerInfoResponse) Descriptor() ([]byte, []int)
- func (m *GetPlayerInfoResponse) GetAvatar() string
- func (m *GetPlayerInfoResponse) GetId() int64
- func (m *GetPlayerInfoResponse) GetNickname() string
- func (m *GetPlayerInfoResponse) GetOpenId() string
- func (m *GetPlayerInfoResponse) GetState() int32
- func (m *GetPlayerInfoResponse) GetUnionId() string
- func (m *GetPlayerInfoResponse) Marshal() (dAtA []byte, err error)
- func (m *GetPlayerInfoResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *GetPlayerInfoResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*GetPlayerInfoResponse) ProtoMessage()
- func (m *GetPlayerInfoResponse) Reset()
- func (m *GetPlayerInfoResponse) Size() (n int)
- func (m *GetPlayerInfoResponse) String() string
- func (m *GetPlayerInfoResponse) Unmarshal(dAtA []byte) error
- func (m *GetPlayerInfoResponse) XXX_DiscardUnknown()
- func (m *GetPlayerInfoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *GetPlayerInfoResponse) XXX_Merge(src proto.Message)
- func (m *GetPlayerInfoResponse) XXX_Size() int
- func (m *GetPlayerInfoResponse) XXX_Unmarshal(b []byte) error
- type LearnReply
- func (*LearnReply) Descriptor() ([]byte, []int)
- func (m *LearnReply) GetName() string
- func (m *LearnReply) Marshal() (dAtA []byte, err error)
- func (m *LearnReply) MarshalTo(dAtA []byte) (int, error)
- func (m *LearnReply) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*LearnReply) ProtoMessage()
- func (m *LearnReply) Reset()
- func (m *LearnReply) Size() (n int)
- func (m *LearnReply) String() string
- func (m *LearnReply) Unmarshal(dAtA []byte) error
- func (m *LearnReply) XXX_DiscardUnknown()
- func (m *LearnReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *LearnReply) XXX_Merge(src proto.Message)
- func (m *LearnReply) XXX_Size() int
- func (m *LearnReply) XXX_Unmarshal(b []byte) error
- type LearnReq
- func (*LearnReq) Descriptor() ([]byte, []int)
- func (m *LearnReq) GetId() uint64
- func (m *LearnReq) Marshal() (dAtA []byte, err error)
- func (m *LearnReq) MarshalTo(dAtA []byte) (int, error)
- func (m *LearnReq) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*LearnReq) ProtoMessage()
- func (m *LearnReq) Reset()
- func (m *LearnReq) Size() (n int)
- func (m *LearnReq) String() string
- func (m *LearnReq) Unmarshal(dAtA []byte) error
- func (m *LearnReq) XXX_DiscardUnknown()
- func (m *LearnReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *LearnReq) XXX_Merge(src proto.Message)
- func (m *LearnReq) XXX_Size() int
- func (m *LearnReq) XXX_Unmarshal(b []byte) error
- type PlayerClient
- type PlayerInterface
- type PlayerRpcDemo
- type StudentClient
- type StudentInterface
- type StudentRpcDemo
- type TeachReply
- func (*TeachReply) Descriptor() ([]byte, []int)
- func (m *TeachReply) GetName() string
- func (m *TeachReply) Marshal() (dAtA []byte, err error)
- func (m *TeachReply) MarshalTo(dAtA []byte) (int, error)
- func (m *TeachReply) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*TeachReply) ProtoMessage()
- func (m *TeachReply) Reset()
- func (m *TeachReply) Size() (n int)
- func (m *TeachReply) String() string
- func (m *TeachReply) Unmarshal(dAtA []byte) error
- func (m *TeachReply) XXX_DiscardUnknown()
- func (m *TeachReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *TeachReply) XXX_Merge(src proto.Message)
- func (m *TeachReply) XXX_Size() int
- func (m *TeachReply) XXX_Unmarshal(b []byte) error
- type TeachReq
- func (*TeachReq) Descriptor() ([]byte, []int)
- func (m *TeachReq) GetId() uint64
- func (m *TeachReq) Marshal() (dAtA []byte, err error)
- func (m *TeachReq) MarshalTo(dAtA []byte) (int, error)
- func (m *TeachReq) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*TeachReq) ProtoMessage()
- func (m *TeachReq) Reset()
- func (m *TeachReq) Size() (n int)
- func (m *TeachReq) String() string
- func (m *TeachReq) Unmarshal(dAtA []byte) error
- func (m *TeachReq) XXX_DiscardUnknown()
- func (m *TeachReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *TeachReq) XXX_Merge(src proto.Message)
- func (m *TeachReq) XXX_Size() int
- func (m *TeachReq) XXX_Unmarshal(b []byte) error
- type TeacherClient
- type TeacherInterface
- type TeacherRpcDemo
Constants ¶
const ServiceNameOfPlayer = "PlayerRpc"
const ServiceNameOfStudent = "StudentRpc"
const ServiceNameOfTeacher = "TeacherRpc"
Variables ¶
var ( ErrInvalidLengthPlayer = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowPlayer = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupPlayer = fmt.Errorf("proto: unexpected end of group") )
Functions ¶
This section is empty.
Types ¶
type GetPlayerInfoReq ¶ added in v1.1.6
type GetPlayerInfoReq struct { // 用户id PlayerId int64 `protobuf:"varint,1,opt,name=player_id,json=playerId,proto3" json:"player_id,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*GetPlayerInfoReq) Descriptor ¶ added in v1.1.6
func (*GetPlayerInfoReq) Descriptor() ([]byte, []int)
func (*GetPlayerInfoReq) GetPlayerId ¶ added in v1.1.6
func (m *GetPlayerInfoReq) GetPlayerId() int64
func (*GetPlayerInfoReq) Marshal ¶ added in v1.1.6
func (m *GetPlayerInfoReq) Marshal() (dAtA []byte, err error)
func (*GetPlayerInfoReq) MarshalTo ¶ added in v1.1.6
func (m *GetPlayerInfoReq) MarshalTo(dAtA []byte) (int, error)
func (*GetPlayerInfoReq) MarshalToSizedBuffer ¶ added in v1.1.6
func (m *GetPlayerInfoReq) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*GetPlayerInfoReq) ProtoMessage ¶ added in v1.1.6
func (*GetPlayerInfoReq) ProtoMessage()
func (*GetPlayerInfoReq) Reset ¶ added in v1.1.6
func (m *GetPlayerInfoReq) Reset()
func (*GetPlayerInfoReq) Size ¶ added in v1.1.6
func (m *GetPlayerInfoReq) Size() (n int)
======================================================
func (*GetPlayerInfoReq) String ¶ added in v1.1.6
func (m *GetPlayerInfoReq) String() string
func (*GetPlayerInfoReq) Unmarshal ¶ added in v1.1.6
func (m *GetPlayerInfoReq) Unmarshal(dAtA []byte) error
func (*GetPlayerInfoReq) XXX_DiscardUnknown ¶ added in v1.1.6
func (m *GetPlayerInfoReq) XXX_DiscardUnknown()
func (*GetPlayerInfoReq) XXX_Marshal ¶ added in v1.1.6
func (m *GetPlayerInfoReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*GetPlayerInfoReq) XXX_Merge ¶ added in v1.1.6
func (m *GetPlayerInfoReq) XXX_Merge(src proto.Message)
func (*GetPlayerInfoReq) XXX_Size ¶ added in v1.1.6
func (m *GetPlayerInfoReq) XXX_Size() int
func (*GetPlayerInfoReq) XXX_Unmarshal ¶ added in v1.1.6
func (m *GetPlayerInfoReq) XXX_Unmarshal(b []byte) error
type GetPlayerInfoResponse ¶ added in v1.1.6
type GetPlayerInfoResponse struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` OpenId string `protobuf:"bytes,2,opt,name=open_id,json=openId,proto3" json:"open_id,omitempty"` Nickname string `protobuf:"bytes,3,opt,name=nickname,proto3" json:"nickname,omitempty"` UnionId string `protobuf:"bytes,4,opt,name=union_id,json=unionId,proto3" json:"union_id,omitempty"` State int32 `protobuf:"varint,5,opt,name=state,proto3" json:"state,omitempty"` Avatar string `protobuf:"bytes,6,opt,name=avatar,proto3" json:"avatar,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*GetPlayerInfoResponse) Descriptor ¶ added in v1.1.6
func (*GetPlayerInfoResponse) Descriptor() ([]byte, []int)
func (*GetPlayerInfoResponse) GetAvatar ¶ added in v1.1.6
func (m *GetPlayerInfoResponse) GetAvatar() string
func (*GetPlayerInfoResponse) GetId ¶ added in v1.1.6
func (m *GetPlayerInfoResponse) GetId() int64
func (*GetPlayerInfoResponse) GetNickname ¶ added in v1.1.6
func (m *GetPlayerInfoResponse) GetNickname() string
func (*GetPlayerInfoResponse) GetOpenId ¶ added in v1.1.6
func (m *GetPlayerInfoResponse) GetOpenId() string
func (*GetPlayerInfoResponse) GetState ¶ added in v1.1.6
func (m *GetPlayerInfoResponse) GetState() int32
func (*GetPlayerInfoResponse) GetUnionId ¶ added in v1.1.6
func (m *GetPlayerInfoResponse) GetUnionId() string
func (*GetPlayerInfoResponse) Marshal ¶ added in v1.1.6
func (m *GetPlayerInfoResponse) Marshal() (dAtA []byte, err error)
func (*GetPlayerInfoResponse) MarshalTo ¶ added in v1.1.6
func (m *GetPlayerInfoResponse) MarshalTo(dAtA []byte) (int, error)
func (*GetPlayerInfoResponse) MarshalToSizedBuffer ¶ added in v1.1.6
func (m *GetPlayerInfoResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*GetPlayerInfoResponse) ProtoMessage ¶ added in v1.1.6
func (*GetPlayerInfoResponse) ProtoMessage()
func (*GetPlayerInfoResponse) Reset ¶ added in v1.1.6
func (m *GetPlayerInfoResponse) Reset()
func (*GetPlayerInfoResponse) Size ¶ added in v1.1.6
func (m *GetPlayerInfoResponse) Size() (n int)
func (*GetPlayerInfoResponse) String ¶ added in v1.1.6
func (m *GetPlayerInfoResponse) String() string
func (*GetPlayerInfoResponse) Unmarshal ¶ added in v1.1.6
func (m *GetPlayerInfoResponse) Unmarshal(dAtA []byte) error
func (*GetPlayerInfoResponse) XXX_DiscardUnknown ¶ added in v1.1.6
func (m *GetPlayerInfoResponse) XXX_DiscardUnknown()
func (*GetPlayerInfoResponse) XXX_Marshal ¶ added in v1.1.6
func (m *GetPlayerInfoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*GetPlayerInfoResponse) XXX_Merge ¶ added in v1.1.6
func (m *GetPlayerInfoResponse) XXX_Merge(src proto.Message)
func (*GetPlayerInfoResponse) XXX_Size ¶ added in v1.1.6
func (m *GetPlayerInfoResponse) XXX_Size() int
func (*GetPlayerInfoResponse) XXX_Unmarshal ¶ added in v1.1.6
func (m *GetPlayerInfoResponse) XXX_Unmarshal(b []byte) error
type LearnReply ¶ added in v1.1.6
type LearnReply struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*LearnReply) Descriptor ¶ added in v1.1.6
func (*LearnReply) Descriptor() ([]byte, []int)
func (*LearnReply) GetName ¶ added in v1.1.6
func (m *LearnReply) GetName() string
func (*LearnReply) Marshal ¶ added in v1.1.6
func (m *LearnReply) Marshal() (dAtA []byte, err error)
func (*LearnReply) MarshalTo ¶ added in v1.1.6
func (m *LearnReply) MarshalTo(dAtA []byte) (int, error)
func (*LearnReply) MarshalToSizedBuffer ¶ added in v1.1.6
func (m *LearnReply) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*LearnReply) ProtoMessage ¶ added in v1.1.6
func (*LearnReply) ProtoMessage()
func (*LearnReply) Reset ¶ added in v1.1.6
func (m *LearnReply) Reset()
func (*LearnReply) Size ¶ added in v1.1.6
func (m *LearnReply) Size() (n int)
func (*LearnReply) String ¶ added in v1.1.6
func (m *LearnReply) String() string
func (*LearnReply) Unmarshal ¶ added in v1.1.6
func (m *LearnReply) Unmarshal(dAtA []byte) error
func (*LearnReply) XXX_DiscardUnknown ¶ added in v1.1.6
func (m *LearnReply) XXX_DiscardUnknown()
func (*LearnReply) XXX_Marshal ¶ added in v1.1.6
func (m *LearnReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*LearnReply) XXX_Merge ¶ added in v1.1.6
func (m *LearnReply) XXX_Merge(src proto.Message)
func (*LearnReply) XXX_Size ¶ added in v1.1.6
func (m *LearnReply) XXX_Size() int
func (*LearnReply) XXX_Unmarshal ¶ added in v1.1.6
func (m *LearnReply) XXX_Unmarshal(b []byte) error
type LearnReq ¶ added in v1.1.6
type LearnReq struct { Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*LearnReq) Descriptor ¶ added in v1.1.6
func (*LearnReq) MarshalToSizedBuffer ¶ added in v1.1.6
func (*LearnReq) ProtoMessage ¶ added in v1.1.6
func (*LearnReq) ProtoMessage()
func (*LearnReq) XXX_DiscardUnknown ¶ added in v1.1.6
func (m *LearnReq) XXX_DiscardUnknown()
func (*LearnReq) XXX_Marshal ¶ added in v1.1.6
func (*LearnReq) XXX_Unmarshal ¶ added in v1.1.6
type PlayerClient ¶ added in v1.1.6
type PlayerClient struct {
XClientPool *client.XClientPool
}
Player is a client wrapped XClient.
func NewPlayerClient ¶ added in v1.1.6
func NewPlayerClient() *PlayerClient
NewPlayerClient wraps a XClient as PlayerClient. You can pass a shared XClient object created by NewXClientForPlayer.
func (*PlayerClient) GetPlayerInfo ¶ added in v1.1.6
func (c *PlayerClient) GetPlayerInfo(ctx context.Context, req *GetPlayerInfoReq) (reply *GetPlayerInfoResponse, err error)
GetPlayerInfo is client rpc method as defined
type PlayerInterface ¶ added in v1.1.6
type PlayerInterface interface { // PlayerInterface can be used for interface verification. // GetPlayerInfo is server rpc method as defined GetPlayerInfo(ctx context.Context, req *GetPlayerInfoReq, reply *GetPlayerInfoResponse) (err error) }
================== interface ===================
type PlayerRpcDemo ¶ added in v1.1.6
type PlayerRpcDemo struct{}
================== server implement demo =================== ripple.Default().RegisterRpc("User", &UserRpcDemo{}, "")
func (*PlayerRpcDemo) GetPlayerInfo ¶ added in v1.1.6
func (this *PlayerRpcDemo) GetPlayerInfo(ctx context.Context, req *GetPlayerInfoReq, reply *GetPlayerInfoResponse) (err error)
type StudentClient ¶ added in v1.0.5
type StudentClient struct {
XClientPool *client.XClientPool
}
Student is a client wrapped XClient.
func NewStudentClient ¶ added in v1.0.5
func NewStudentClient() *StudentClient
NewStudentClient wraps a XClient as StudentClient. You can pass a shared XClient object created by NewXClientForStudent.
func (*StudentClient) Learn ¶ added in v1.1.6
func (c *StudentClient) Learn(ctx context.Context, req *LearnReq) (reply *LearnReply, err error)
Learn is client rpc method as defined
type StudentInterface ¶ added in v1.0.5
type StudentInterface interface { // StudentInterface can be used for interface verification. // Learn is server rpc method as defined Learn(ctx context.Context, req *LearnReq, reply *LearnReply) (err error) }
================== interface ===================
type StudentRpcDemo ¶ added in v1.0.5
type StudentRpcDemo struct{}
================== server implement demo =================== ripple.Default().RegisterRpc("User", &UserRpcDemo{}, "")
func (*StudentRpcDemo) Learn ¶ added in v1.1.6
func (this *StudentRpcDemo) Learn(ctx context.Context, req *LearnReq, reply *LearnReply) (err error)
type TeachReply ¶ added in v1.1.6
type TeachReply struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*TeachReply) Descriptor ¶ added in v1.1.6
func (*TeachReply) Descriptor() ([]byte, []int)
func (*TeachReply) GetName ¶ added in v1.1.6
func (m *TeachReply) GetName() string
func (*TeachReply) Marshal ¶ added in v1.1.6
func (m *TeachReply) Marshal() (dAtA []byte, err error)
func (*TeachReply) MarshalTo ¶ added in v1.1.6
func (m *TeachReply) MarshalTo(dAtA []byte) (int, error)
func (*TeachReply) MarshalToSizedBuffer ¶ added in v1.1.6
func (m *TeachReply) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*TeachReply) ProtoMessage ¶ added in v1.1.6
func (*TeachReply) ProtoMessage()
func (*TeachReply) Reset ¶ added in v1.1.6
func (m *TeachReply) Reset()
func (*TeachReply) Size ¶ added in v1.1.6
func (m *TeachReply) Size() (n int)
func (*TeachReply) String ¶ added in v1.1.6
func (m *TeachReply) String() string
func (*TeachReply) Unmarshal ¶ added in v1.1.6
func (m *TeachReply) Unmarshal(dAtA []byte) error
func (*TeachReply) XXX_DiscardUnknown ¶ added in v1.1.6
func (m *TeachReply) XXX_DiscardUnknown()
func (*TeachReply) XXX_Marshal ¶ added in v1.1.6
func (m *TeachReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*TeachReply) XXX_Merge ¶ added in v1.1.6
func (m *TeachReply) XXX_Merge(src proto.Message)
func (*TeachReply) XXX_Size ¶ added in v1.1.6
func (m *TeachReply) XXX_Size() int
func (*TeachReply) XXX_Unmarshal ¶ added in v1.1.6
func (m *TeachReply) XXX_Unmarshal(b []byte) error
type TeachReq ¶ added in v1.1.6
type TeachReq struct { Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*TeachReq) Descriptor ¶ added in v1.1.6
func (*TeachReq) MarshalToSizedBuffer ¶ added in v1.1.6
func (*TeachReq) ProtoMessage ¶ added in v1.1.6
func (*TeachReq) ProtoMessage()
func (*TeachReq) XXX_DiscardUnknown ¶ added in v1.1.6
func (m *TeachReq) XXX_DiscardUnknown()
func (*TeachReq) XXX_Marshal ¶ added in v1.1.6
func (*TeachReq) XXX_Unmarshal ¶ added in v1.1.6
type TeacherClient ¶ added in v1.1.6
type TeacherClient struct {
XClientPool *client.XClientPool
}
Teacher is a client wrapped XClient.
func NewTeacherClient ¶ added in v1.1.6
func NewTeacherClient() *TeacherClient
NewTeacherClient wraps a XClient as TeacherClient. You can pass a shared XClient object created by NewXClientForTeacher.
func (*TeacherClient) Teach ¶ added in v1.1.6
func (c *TeacherClient) Teach(ctx context.Context, req *TeachReq) (reply *TeachReply, err error)
Teach is client rpc method as defined
type TeacherInterface ¶ added in v1.1.6
type TeacherInterface interface { // TeacherInterface can be used for interface verification. // Teach is server rpc method as defined Teach(ctx context.Context, req *TeachReq, reply *TeachReply) (err error) }
================== interface ===================
type TeacherRpcDemo ¶ added in v1.1.6
type TeacherRpcDemo struct{}
================== server implement demo =================== ripple.Default().RegisterRpc("User", &UserRpcDemo{}, "")
func (*TeacherRpcDemo) Teach ¶ added in v1.1.6
func (this *TeacherRpcDemo) Teach(ctx context.Context, req *TeachReq, reply *TeachReply) (err error)