Documentation ¶
Index ¶
- Variables
- func RegisterPersonServer(s *grpc.Server, srv PersonServer)
- type Append
- func (*Append) Descriptor() ([]byte, []int)
- func (m *Append) GetEducational() []*Append_Educational
- func (*Append) ProtoMessage()
- func (m *Append) Reset()
- func (m *Append) String() string
- func (m *Append) XXX_DiscardUnknown()
- func (m *Append) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Append) XXX_Merge(src proto.Message)
- func (m *Append) XXX_Size() int
- func (m *Append) XXX_Unmarshal(b []byte) error
- type Append_Educational
- func (*Append_Educational) Descriptor() ([]byte, []int)
- func (m *Append_Educational) GetSpecialty() []string
- func (m *Append_Educational) GetUniversity() string
- func (*Append_Educational) ProtoMessage()
- func (m *Append_Educational) Reset()
- func (m *Append_Educational) String() string
- func (m *Append_Educational) XXX_DiscardUnknown()
- func (m *Append_Educational) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Append_Educational) XXX_Merge(src proto.Message)
- func (m *Append_Educational) XXX_Size() int
- func (m *Append_Educational) XXX_Unmarshal(b []byte) error
- type ChatMsg
- func (*ChatMsg) Descriptor() ([]byte, []int)
- func (m *ChatMsg) GetContent() string
- func (m *ChatMsg) GetCreateTime() int64
- func (m *ChatMsg) GetMsgType() int32
- func (m *ChatMsg) GetReceiveWxId() string
- func (m *ChatMsg) GetTalker() string
- func (m *ChatMsg) GetThImgVideo() string
- func (m *ChatMsg) GetVideolength() int32
- func (*ChatMsg) ProtoMessage()
- func (m *ChatMsg) Reset()
- func (m *ChatMsg) String() string
- func (m *ChatMsg) XXX_DiscardUnknown()
- func (m *ChatMsg) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ChatMsg) XXX_Merge(src proto.Message)
- func (m *ChatMsg) XXX_Size() int
- func (m *ChatMsg) XXX_Unmarshal(b []byte) error
- type Identity
- func (*Identity) Descriptor() ([]byte, []int)
- func (m *Identity) GetShopId() int32
- func (m *Identity) GetToken() string
- func (m *Identity) GetUserId() int32
- func (*Identity) ProtoMessage()
- func (m *Identity) Reset()
- func (m *Identity) String() string
- func (m *Identity) XXX_DiscardUnknown()
- func (m *Identity) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Identity) XXX_Merge(src proto.Message)
- func (m *Identity) XXX_Size() int
- func (m *Identity) XXX_Unmarshal(b []byte) error
- type Operation
- func (*Operation) Descriptor() ([]byte, []int)
- func (m *Operation) GetCmd() int32
- func (m *Operation) GetData() string
- func (*Operation) ProtoMessage()
- func (m *Operation) Reset()
- func (m *Operation) String() string
- func (m *Operation) XXX_DiscardUnknown()
- func (m *Operation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Operation) XXX_Merge(src proto.Message)
- func (m *Operation) XXX_Size() int
- func (m *Operation) XXX_Unmarshal(b []byte) error
- type PersonClient
- type PersonReply
- func (*PersonReply) Descriptor() ([]byte, []int)
- func (m *PersonReply) GetAddress() []string
- func (m *PersonReply) GetAge() int32
- func (m *PersonReply) GetAmount() float64
- func (m *PersonReply) GetEducational() *Append_Educational
- func (m *PersonReply) GetIdCard() string
- func (m *PersonReply) GetMarried() bool
- func (m *PersonReply) GetName() string
- func (m *PersonReply) GetSex() PersonReply_Sex
- func (*PersonReply) ProtoMessage()
- func (m *PersonReply) Reset()
- func (m *PersonReply) String() string
- func (m *PersonReply) XXX_DiscardUnknown()
- func (m *PersonReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *PersonReply) XXX_Merge(src proto.Message)
- func (m *PersonReply) XXX_Size() int
- func (m *PersonReply) XXX_Unmarshal(b []byte) error
- type PersonReply_Sex
- type PersonRequest
- func (*PersonRequest) Descriptor() ([]byte, []int)
- func (m *PersonRequest) GetName() string
- func (*PersonRequest) ProtoMessage()
- func (m *PersonRequest) Reset()
- func (m *PersonRequest) String() string
- func (m *PersonRequest) XXX_DiscardUnknown()
- func (m *PersonRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *PersonRequest) XXX_Merge(src proto.Message)
- func (m *PersonRequest) XXX_Size() int
- func (m *PersonRequest) XXX_Unmarshal(b []byte) error
- type PersonServer
- type UnimplementedPersonServer
Constants ¶
This section is empty.
Variables ¶
View Source
var PersonReply_Sex_name = map[int32]string{
0: "FEMALE",
1: "MALE",
}
View Source
var PersonReply_Sex_value = map[string]int32{
"FEMALE": 0,
"MALE": 1,
}
Functions ¶
func RegisterPersonServer ¶
func RegisterPersonServer(s *grpc.Server, srv PersonServer)
Types ¶
type Append ¶
type Append struct { Educational []*Append_Educational `protobuf:"bytes,1,rep,name=educational,proto3" json:"educational,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
附加信息
func (*Append) Descriptor ¶
func (*Append) GetEducational ¶
func (m *Append) GetEducational() []*Append_Educational
func (*Append) ProtoMessage ¶
func (*Append) ProtoMessage()
func (*Append) XXX_DiscardUnknown ¶
func (m *Append) XXX_DiscardUnknown()
func (*Append) XXX_Marshal ¶
func (*Append) XXX_Unmarshal ¶
type Append_Educational ¶
type Append_Educational struct { University string `protobuf:"bytes,1,opt,name=university,proto3" json:"university,omitempty"` Specialty []string `protobuf:"bytes,2,rep,name=specialty,proto3" json:"specialty,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Append_Educational) Descriptor ¶
func (*Append_Educational) Descriptor() ([]byte, []int)
func (*Append_Educational) GetSpecialty ¶
func (m *Append_Educational) GetSpecialty() []string
func (*Append_Educational) GetUniversity ¶
func (m *Append_Educational) GetUniversity() string
func (*Append_Educational) ProtoMessage ¶
func (*Append_Educational) ProtoMessage()
func (*Append_Educational) Reset ¶
func (m *Append_Educational) Reset()
func (*Append_Educational) String ¶
func (m *Append_Educational) String() string
func (*Append_Educational) XXX_DiscardUnknown ¶
func (m *Append_Educational) XXX_DiscardUnknown()
func (*Append_Educational) XXX_Marshal ¶
func (m *Append_Educational) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*Append_Educational) XXX_Merge ¶
func (m *Append_Educational) XXX_Merge(src proto.Message)
func (*Append_Educational) XXX_Size ¶
func (m *Append_Educational) XXX_Size() int
func (*Append_Educational) XXX_Unmarshal ¶
func (m *Append_Educational) XXX_Unmarshal(b []byte) error
type ChatMsg ¶
type ChatMsg struct { Talker *string `protobuf:"bytes,1,req,name=talker" json:"talker,omitempty"` Content *string `protobuf:"bytes,2,req,name=content" json:"content,omitempty"` // 必传 1:文本消息. 2:图片URL 3:视频URL 4:语音URL 5:名片 6:文章 7:位置 8:红包 MsgType *int32 `protobuf:"varint,3,req,name=msgType" json:"msgType,omitempty"` ReceiveWxId *string `protobuf:"bytes,4,req,name=receiveWxId" json:"receiveWxId,omitempty"` ThImgVideo *string `protobuf:"bytes,5,opt,name=thImgVideo" json:"thImgVideo,omitempty"` Videolength *int32 `protobuf:"varint,6,opt,name=videolength" json:"videolength,omitempty"` CreateTime *int64 `protobuf:"varint,7,req,name=createTime" json:"createTime,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
消息实体
func (*ChatMsg) Descriptor ¶
func (*ChatMsg) GetContent ¶
func (*ChatMsg) GetCreateTime ¶
func (*ChatMsg) GetMsgType ¶
func (*ChatMsg) GetReceiveWxId ¶
func (*ChatMsg) GetThImgVideo ¶
func (*ChatMsg) GetVideolength ¶
func (*ChatMsg) ProtoMessage ¶
func (*ChatMsg) ProtoMessage()
func (*ChatMsg) XXX_DiscardUnknown ¶
func (m *ChatMsg) XXX_DiscardUnknown()
func (*ChatMsg) XXX_Marshal ¶
func (*ChatMsg) XXX_Unmarshal ¶
type Identity ¶
type Identity struct { ShopId *int32 `protobuf:"varint,1,req,name=shopId" json:"shopId,omitempty"` UserId *int32 `protobuf:"varint,2,req,name=userId" json:"userId,omitempty"` Token *string `protobuf:"bytes,3,req,name=token" json:"token,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Identity) Descriptor ¶
func (*Identity) ProtoMessage ¶
func (*Identity) ProtoMessage()
func (*Identity) XXX_DiscardUnknown ¶
func (m *Identity) XXX_DiscardUnknown()
func (*Identity) XXX_Marshal ¶
func (*Identity) XXX_Unmarshal ¶
type Operation ¶
type Operation struct { Cmd *int32 `protobuf:"varint,1,req,name=cmd" json:"cmd,omitempty"` Data *string `protobuf:"bytes,2,req,name=data" json:"data,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Operation) Descriptor ¶
func (*Operation) ProtoMessage ¶
func (*Operation) ProtoMessage()
func (*Operation) XXX_DiscardUnknown ¶
func (m *Operation) XXX_DiscardUnknown()
func (*Operation) XXX_Marshal ¶
func (*Operation) XXX_Unmarshal ¶
type PersonClient ¶
type PersonClient interface { // 传入一个姓名,返回相应的个人信息 GetPersonInfoHandler(ctx context.Context, in *PersonRequest, opts ...grpc.CallOption) (*PersonReply, error) }
PersonClient is the client API for Person service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewPersonClient ¶
func NewPersonClient(cc *grpc.ClientConn) PersonClient
type PersonReply ¶
type PersonReply struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` IdCard string `protobuf:"bytes,2,opt,name=id_card,json=idCard,proto3" json:"id_card,omitempty"` Age int32 `protobuf:"varint,3,opt,name=age,proto3" json:"age,omitempty"` Sex PersonReply_Sex `protobuf:"varint,4,opt,name=sex,proto3,enum=PersonReply_Sex" json:"sex,omitempty"` Married bool `protobuf:"varint,5,opt,name=married,proto3" json:"married,omitempty"` Amount float64 `protobuf:"fixed64,6,opt,name=amount,proto3" json:"amount,omitempty"` Address []string `protobuf:"bytes,7,rep,name=address,proto3" json:"address,omitempty"` Educational *Append_Educational `protobuf:"bytes,8,opt,name=educational,proto3" json:"educational,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
相应结果
func (*PersonReply) Descriptor ¶
func (*PersonReply) Descriptor() ([]byte, []int)
func (*PersonReply) GetAddress ¶
func (m *PersonReply) GetAddress() []string
func (*PersonReply) GetAge ¶
func (m *PersonReply) GetAge() int32
func (*PersonReply) GetAmount ¶
func (m *PersonReply) GetAmount() float64
func (*PersonReply) GetEducational ¶
func (m *PersonReply) GetEducational() *Append_Educational
func (*PersonReply) GetIdCard ¶
func (m *PersonReply) GetIdCard() string
func (*PersonReply) GetMarried ¶
func (m *PersonReply) GetMarried() bool
func (*PersonReply) GetName ¶
func (m *PersonReply) GetName() string
func (*PersonReply) GetSex ¶
func (m *PersonReply) GetSex() PersonReply_Sex
func (*PersonReply) ProtoMessage ¶
func (*PersonReply) ProtoMessage()
func (*PersonReply) Reset ¶
func (m *PersonReply) Reset()
func (*PersonReply) String ¶
func (m *PersonReply) String() string
func (*PersonReply) XXX_DiscardUnknown ¶
func (m *PersonReply) XXX_DiscardUnknown()
func (*PersonReply) XXX_Marshal ¶
func (m *PersonReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*PersonReply) XXX_Merge ¶
func (m *PersonReply) XXX_Merge(src proto.Message)
func (*PersonReply) XXX_Size ¶
func (m *PersonReply) XXX_Size() int
func (*PersonReply) XXX_Unmarshal ¶
func (m *PersonReply) XXX_Unmarshal(b []byte) error
type PersonReply_Sex ¶
type PersonReply_Sex int32
const ( PersonReply_FEMALE PersonReply_Sex = 0 PersonReply_MALE PersonReply_Sex = 1 )
func (PersonReply_Sex) EnumDescriptor ¶
func (PersonReply_Sex) EnumDescriptor() ([]byte, []int)
func (PersonReply_Sex) String ¶
func (x PersonReply_Sex) String() string
type PersonRequest ¶
type PersonRequest 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 (*PersonRequest) Descriptor ¶
func (*PersonRequest) Descriptor() ([]byte, []int)
func (*PersonRequest) GetName ¶
func (m *PersonRequest) GetName() string
func (*PersonRequest) ProtoMessage ¶
func (*PersonRequest) ProtoMessage()
func (*PersonRequest) Reset ¶
func (m *PersonRequest) Reset()
func (*PersonRequest) String ¶
func (m *PersonRequest) String() string
func (*PersonRequest) XXX_DiscardUnknown ¶
func (m *PersonRequest) XXX_DiscardUnknown()
func (*PersonRequest) XXX_Marshal ¶
func (m *PersonRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*PersonRequest) XXX_Merge ¶
func (m *PersonRequest) XXX_Merge(src proto.Message)
func (*PersonRequest) XXX_Size ¶
func (m *PersonRequest) XXX_Size() int
func (*PersonRequest) XXX_Unmarshal ¶
func (m *PersonRequest) XXX_Unmarshal(b []byte) error
type PersonServer ¶
type PersonServer interface { // 传入一个姓名,返回相应的个人信息 GetPersonInfoHandler(context.Context, *PersonRequest) (*PersonReply, error) }
PersonServer is the server API for Person service.
type UnimplementedPersonServer ¶
type UnimplementedPersonServer struct { }
UnimplementedPersonServer can be embedded to have forward compatible implementations.
func (*UnimplementedPersonServer) GetPersonInfoHandler ¶
func (*UnimplementedPersonServer) GetPersonInfoHandler(ctx context.Context, req *PersonRequest) (*PersonReply, error)
Click to show internal directories.
Click to hide internal directories.