Documentation ¶
Index ¶
- Variables
- func RegisterUserBMServer(e *bm.Engine, server UserBMServer)
- func RegisterUserServer(s *grpc.Server, srv UserServer)
- type Info
- func (*Info) Descriptor() ([]byte, []int)
- func (m *Info) GetFace() string
- func (m *Info) GetMid() int64
- func (m *Info) GetName() string
- func (m *Info) GetSex() string
- func (m *Info) GetSign() string
- func (m *Info) Marshal() (dAtA []byte, err error)
- func (m *Info) MarshalTo(dAtA []byte) (int, error)
- func (*Info) ProtoMessage()
- func (m *Info) Reset()
- func (m *Info) Size() (n int)
- func (m *Info) String() string
- func (m *Info) Unmarshal(dAtA []byte) error
- func (m *Info) XXX_DiscardUnknown()
- func (m *Info) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Info) XXX_Merge(src proto.Message)
- func (m *Info) XXX_Size() int
- func (m *Info) XXX_Unmarshal(b []byte) error
- type InfoReply
- func (*InfoReply) Descriptor() ([]byte, []int)
- func (m *InfoReply) GetInfo() *Info
- func (m *InfoReply) Marshal() (dAtA []byte, err error)
- func (m *InfoReply) MarshalTo(dAtA []byte) (int, error)
- func (*InfoReply) ProtoMessage()
- func (m *InfoReply) Reset()
- func (m *InfoReply) Size() (n int)
- func (m *InfoReply) String() string
- func (m *InfoReply) Unmarshal(dAtA []byte) error
- func (m *InfoReply) XXX_DiscardUnknown()
- func (m *InfoReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *InfoReply) XXX_Merge(src proto.Message)
- func (m *InfoReply) XXX_Size() int
- func (m *InfoReply) XXX_Unmarshal(b []byte) error
- type UserBMServer
- type UserClient
- type UserErrCode
- type UserReq
- func (*UserReq) Descriptor() ([]byte, []int)
- func (m *UserReq) GetMid() int64
- func (m *UserReq) Marshal() (dAtA []byte, err error)
- func (m *UserReq) MarshalTo(dAtA []byte) (int, error)
- func (*UserReq) ProtoMessage()
- func (m *UserReq) Reset()
- func (m *UserReq) Size() (n int)
- func (m *UserReq) String() string
- func (m *UserReq) Unmarshal(dAtA []byte) error
- func (m *UserReq) XXX_DiscardUnknown()
- func (m *UserReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *UserReq) XXX_Merge(src proto.Message)
- func (m *UserReq) XXX_Size() int
- func (m *UserReq) XXX_Unmarshal(b []byte) error
- type UserServer
Constants ¶
This section is empty.
Variables ¶
View Source
var ( UserNotExist = ecode.New(-404) UserUpdateNameFailed = ecode.New(10000) )
UserErrCode ecode
View Source
var ( ErrInvalidLengthApi = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowApi = fmt.Errorf("proto: integer overflow") )
View Source
var PathUserCard = "/user.api.User/Card"
View Source
var PathUserInfo = "/user.api.User/Info"
View Source
var UserErrCode_name = map[int32]string{
0: "OK",
-404: "UserNotExist",
10000: "UserUpdateNameFailed",
}
View Source
var UserErrCode_value = map[string]int32{
"OK": 0,
"UserNotExist": -404,
"UserUpdateNameFailed": 10000,
}
Functions ¶
func RegisterUserBMServer ¶
func RegisterUserBMServer(e *bm.Engine, server UserBMServer)
RegisterUserBMServer Register the blademaster route
func RegisterUserServer ¶
func RegisterUserServer(s *grpc.Server, srv UserServer)
Types ¶
type Info ¶
type Info struct { Mid int64 `protobuf:"varint,1,opt,name=mid,proto3" json:"mid"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name"` Sex string `protobuf:"bytes,3,opt,name=sex,proto3" json:"sex"` Face string `protobuf:"bytes,4,opt,name=face,proto3" json:"face"` Sign string `protobuf:"bytes,5,opt,name=sign,proto3" json:"sign"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Info) Descriptor ¶
func (*Info) ProtoMessage ¶
func (*Info) ProtoMessage()
func (*Info) XXX_DiscardUnknown ¶
func (m *Info) XXX_DiscardUnknown()
func (*Info) XXX_Unmarshal ¶
type InfoReply ¶
type InfoReply struct { Info *Info `protobuf:"bytes,1,opt,name=info,proto3" json:"info,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*InfoReply) Descriptor ¶
func (*InfoReply) ProtoMessage ¶
func (*InfoReply) ProtoMessage()
func (*InfoReply) XXX_DiscardUnknown ¶
func (m *InfoReply) XXX_DiscardUnknown()
func (*InfoReply) XXX_Marshal ¶
func (*InfoReply) XXX_Unmarshal ¶
type UserBMServer ¶
type UserBMServer interface { Info(ctx context.Context, req *UserReq) (resp *InfoReply, err error) Card(ctx context.Context, req *UserReq) (resp *google_protobuf1.Empty, err error) }
UserBMServer is the server API for User service.
var UserSvc UserBMServer
type UserClient ¶
type UserClient interface {
Info(ctx context.Context, in *UserReq, opts ...grpc.CallOption) (*InfoReply, error)
}
UserClient is the client API for User service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewUserClient ¶
func NewUserClient(cc *grpc.ClientConn) UserClient
type UserErrCode ¶
type UserErrCode int32
const ( UserErrCode_OK UserErrCode = 0 UserErrCode_UserNotExist UserErrCode = -404 UserErrCode_UserUpdateNameFailed UserErrCode = 10000 )
func (UserErrCode) EnumDescriptor ¶
func (UserErrCode) EnumDescriptor() ([]byte, []int)
func (UserErrCode) String ¶
func (x UserErrCode) String() string
type UserReq ¶
type UserReq struct { Mid int64 `protobuf:"varint,1,opt,name=mid,proto3" json:"mid,omitempty" validate:"gt=0,required"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*UserReq) Descriptor ¶
func (*UserReq) ProtoMessage ¶
func (*UserReq) ProtoMessage()
func (*UserReq) XXX_DiscardUnknown ¶
func (m *UserReq) XXX_DiscardUnknown()
func (*UserReq) XXX_Marshal ¶
func (*UserReq) XXX_Unmarshal ¶
Click to show internal directories.
Click to hide internal directories.