grpc

Protocol Documentation

Table of Contents

Top

wechaty/puppet.proto

Wechaty Puppet gRPC Protocol Buffers https://github.com/wechaty/grpc/ Huan LI <zixia@zixia.net> Apr 2018 License: Apache-2.0

Google Protocol Buffers Style Guide - https://developers.google.com/protocol-buffers/docs/style

Puppet

Method Name Request Type Response Type Description
Start puppet.StartRequest puppet.StartResponse Base
Stop puppet.StopRequest puppet.StopResponse  
Logout puppet.LogoutRequest puppet.LogoutResponse  
Ding puppet.DingRequest puppet.DingResponse  
Version puppet.VersionRequest puppet.VersionResponse  
Event puppet.EventRequest puppet.EventResponse stream Event - Server Stream
DirtyPayload puppet.DirtyPayloadRequest puppet.DirtyPayloadResponse  
ContactSelfQRCode puppet.ContactSelfQRCodeRequest puppet.ContactSelfQRCodeResponse Contact Self
ContactSelfName puppet.ContactSelfNameRequest puppet.ContactSelfNameResponse  
ContactSelfSignature puppet.ContactSelfSignatureRequest puppet.ContactSelfSignatureResponse  
ContactPayload puppet.ContactPayloadRequest puppet.ContactPayloadResponse Contact
ContactAlias puppet.ContactAliasRequest puppet.ContactAliasResponse  
ContactAvatar puppet.ContactAvatarRequest puppet.ContactAvatarResponse  
ContactPhone puppet.ContactPhoneRequest puppet.ContactPhoneResponse  
ContactCorporationRemark puppet.ContactCorporationRemarkRequest puppet.ContactCorporationRemarkResponse  
ContactDescription puppet.ContactDescriptionRequest puppet.ContactDescriptionResponse  
ContactList puppet.ContactListRequest puppet.ContactListResponse Huan(202002): consider changing response to a stream in the future for better performance
FriendshipPayload puppet.FriendshipPayloadRequest puppet.FriendshipPayloadResponse Friendship
FriendshipSearchPhone puppet.FriendshipSearchPhoneRequest puppet.FriendshipSearchPhoneResponse  
FriendshipSearchWeixin puppet.FriendshipSearchWeixinRequest puppet.FriendshipSearchWeixinResponse  
FriendshipAdd puppet.FriendshipAddRequest puppet.FriendshipAddResponse  
FriendshipAccept puppet.FriendshipAcceptRequest puppet.FriendshipAcceptResponse  
MessageFile puppet.MessageFileRequest puppet.MessageFileResponse @deprecated: using MessageFileStream to transfer files Huan(202010): will be removed (replaced by MessageFileStream) after Dec 31, 2021
MessageImage puppet.MessageImageRequest puppet.MessageImageResponse @deprecated: using MessageImageStream to transfer images Huan(202010): will be removed (replaced by MessageImageStream) after Dec 31, 2021
MessageSendFile puppet.MessageSendFileRequest puppet.MessageSendFileResponse @deprecated: using MesageSendFileStream to transfer file message to server Huan(202010): will be removed (replaced by MessageSendFileStream) after Dec 31, 2021
MessagePayload puppet.MessagePayloadRequest puppet.MessagePayloadResponse  
MessageContact puppet.MessageContactRequest puppet.MessageContactResponse  
MessageFileStream puppet.MessageFileStreamRequest puppet.MessageFileStreamResponse stream  
MessageImageStream puppet.MessageImageStreamRequest puppet.MessageImageStreamResponse stream  
MessageMiniProgram puppet.MessageMiniProgramRequest puppet.MessageMiniProgramResponse  
MessageUrl puppet.MessageUrlRequest puppet.MessageUrlResponse  
MessageRecall puppet.MessageRecallRequest puppet.MessageRecallResponse  
MessageForward puppet.MessageForwardRequest puppet.MessageForwardResponse  
MessageSendContact puppet.MessageSendContactRequest puppet.MessageSendContactResponse  
MessageSendFileStream puppet.MessageSendFileStreamRequest stream puppet.MessageSendFileStreamResponse  
MessageSendText puppet.MessageSendTextRequest puppet.MessageSendTextResponse  
MessageSendMiniProgram puppet.MessageSendMiniProgramRequest puppet.MessageSendMiniProgramResponse  
MessageSendUrl puppet.MessageSendUrlRequest puppet.MessageSendUrlResponse  
RoomPayload puppet.RoomPayloadRequest puppet.RoomPayloadResponse Room
RoomList puppet.RoomListRequest puppet.RoomListResponse  
RoomAdd puppet.RoomAddRequest puppet.RoomAddResponse  
RoomAvatar puppet.RoomAvatarRequest puppet.RoomAvatarResponse  
RoomCreate puppet.RoomCreateRequest puppet.RoomCreateResponse  
RoomDel puppet.RoomDelRequest puppet.RoomDelResponse  
RoomQuit puppet.RoomQuitRequest puppet.RoomQuitResponse  
RoomTopic puppet.RoomTopicRequest puppet.RoomTopicResponse  
RoomQRCode puppet.RoomQRCodeRequest puppet.RoomQRCodeResponse  
RoomAnnounce puppet.RoomAnnounceRequest puppet.RoomAnnounceResponse  
RoomMemberPayload puppet.RoomMemberPayloadRequest puppet.RoomMemberPayloadResponse Room Member
RoomMemberList puppet.RoomMemberListRequest puppet.RoomMemberListResponse  
RoomInvitationPayload puppet.RoomInvitationPayloadRequest puppet.RoomInvitationPayloadResponse Room Invitation
RoomInvitationAccept puppet.RoomInvitationAcceptRequest puppet.RoomInvitationAcceptResponse  
TagContactAdd puppet.TagContactAddRequest puppet.TagContactAddResponse Tag
TagContactRemove puppet.TagContactRemoveRequest puppet.TagContactRemoveResponse  
TagContactDelete puppet.TagContactDeleteRequest puppet.TagContactDeleteResponse Operate Sub-Collections https://cloud.google.com/apis/design/design_patterns#list_sub-collections
TagContactList puppet.TagContactListRequest puppet.TagContactListResponse  

Scalar Value Types

.proto Type Notes C++ Java Python Go C# PHP Ruby
double   double double float float64 double float Float
float   float float float float32 float float Float
int32 Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. int32 int int int32 int integer Bignum or Fixnum (as required)
int64 Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. int64 long int/long int64 long integer/string Bignum
uint32 Uses variable-length encoding. uint32 int int/long uint32 uint integer Bignum or Fixnum (as required)
uint64 Uses variable-length encoding. uint64 long int/long uint64 ulong integer/string Bignum or Fixnum (as required)
sint32 Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. int32 int int int32 int integer Bignum or Fixnum (as required)
sint64 Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. int64 long int/long int64 long integer/string Bignum
fixed32 Always four bytes. More efficient than uint32 if values are often greater than 2^28. uint32 int int uint32 uint integer Bignum or Fixnum (as required)
fixed64 Always eight bytes. More efficient than uint64 if values are often greater than 2^56. uint64 long int/long uint64 ulong integer/string Bignum
sfixed32 Always four bytes. int32 int int int32 int integer Bignum or Fixnum (as required)
sfixed64 Always eight bytes. int64 long int/long int64 long integer/string Bignum
bool   bool boolean boolean bool bool boolean TrueClass/FalseClass
string A string must always contain UTF-8 encoded or 7-bit ASCII text. string String str/unicode string string string String (UTF-8)
bytes May contain any arbitrary sequence of bytes. string ByteString str []byte ByteString string String (ASCII-8BIT)