zproto

package
v0.0.0-...-d9af017 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 3, 2017 License: Apache-2.0 Imports: 5 Imported by: 0

README

Nebula内部服务通信协议

Documentation

Overview

Package zproto is a generated protocol buffer package.

It is generated from these files:

chat_test_data.proto
message.proto
rpc_metadata.proto
sync.proto

It has these top-level messages:

ChatMessage
ChatSession
VoidRsp2
MessageDataEmpty
MessageData
RpcMetadata
ServerAuthReq
VoidRsp
DeliveryUpdatesToUsers
PushUpdatesData

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterChatTestServer

func RegisterChatTestServer(s *grpc.Server, srv ChatTestServer)

func RegisterRPCSyncServer

func RegisterRPCSyncServer(s *grpc.Server, srv RPCSyncServer)

Types

type ChatMessage

type ChatMessage struct {
	SenderSessionId string `protobuf:"bytes,1,opt,name=sender_session_id,json=senderSessionId" json:"sender_session_id,omitempty"`
	MessageData     string `protobuf:"bytes,3,opt,name=message_data,json=messageData" json:"message_data,omitempty"`
}

func (*ChatMessage) Descriptor

func (*ChatMessage) Descriptor() ([]byte, []int)

func (*ChatMessage) GetMessageData

func (m *ChatMessage) GetMessageData() string

func (*ChatMessage) GetSenderSessionId

func (m *ChatMessage) GetSenderSessionId() string

func (*ChatMessage) ProtoMessage

func (*ChatMessage) ProtoMessage()

func (*ChatMessage) Reset

func (m *ChatMessage) Reset()

func (*ChatMessage) String

func (m *ChatMessage) String() string

type ChatSession

type ChatSession struct {
	SessionId string `protobuf:"bytes,1,opt,name=session_id,json=sessionId" json:"session_id,omitempty"`
}

func (*ChatSession) Descriptor

func (*ChatSession) Descriptor() ([]byte, []int)

func (*ChatSession) GetSessionId

func (m *ChatSession) GetSessionId() string

func (*ChatSession) ProtoMessage

func (*ChatSession) ProtoMessage()

func (*ChatSession) Reset

func (m *ChatSession) Reset()

func (*ChatSession) String

func (m *ChatSession) String() string

type ChatTestClient

type ChatTestClient interface {
	Connect(ctx context.Context, in *ChatSession, opts ...grpc.CallOption) (ChatTest_ConnectClient, error)
	SendChat(ctx context.Context, in *ChatMessage, opts ...grpc.CallOption) (*VoidRsp2, error)
}

func NewChatTestClient

func NewChatTestClient(cc *grpc.ClientConn) ChatTestClient

type ChatTestServer

type ChatTestServer interface {
	Connect(*ChatSession, ChatTest_ConnectServer) error
	SendChat(context.Context, *ChatMessage) (*VoidRsp2, error)
}

type ChatTest_ConnectClient

type ChatTest_ConnectClient interface {
	Recv() (*ChatMessage, error)
	grpc.ClientStream
}

type ChatTest_ConnectServer

type ChatTest_ConnectServer interface {
	Send(*ChatMessage) error
	grpc.ServerStream
}

type DeliveryUpdatesToUsers

type DeliveryUpdatesToUsers struct {
	MyAuthKeyId       int64   `protobuf:"varint,1,opt,name=my_auth_key_id,json=myAuthKeyId" json:"my_auth_key_id,omitempty"`
	MySessionId       int64   `protobuf:"varint,2,opt,name=my_session_id,json=mySessionId" json:"my_session_id,omitempty"`
	MyNetlibSessionId int64   `protobuf:"varint,3,opt,name=my_netlib_session_id,json=myNetlibSessionId" json:"my_netlib_session_id,omitempty"`
	SendtoUserIdList  []int32 `protobuf:"varint,4,rep,packed,name=sendto_user_id_list,json=sendtoUserIdList" json:"sendto_user_id_list,omitempty"`
	// uint32 raw_data_header = 4;
	RawData []byte `protobuf:"bytes,5,opt,name=raw_data,json=rawData,proto3" json:"raw_data,omitempty"`
}

func (*DeliveryUpdatesToUsers) Descriptor

func (*DeliveryUpdatesToUsers) Descriptor() ([]byte, []int)

func (*DeliveryUpdatesToUsers) GetMyAuthKeyId

func (m *DeliveryUpdatesToUsers) GetMyAuthKeyId() int64

func (*DeliveryUpdatesToUsers) GetMyNetlibSessionId

func (m *DeliveryUpdatesToUsers) GetMyNetlibSessionId() int64

func (*DeliveryUpdatesToUsers) GetMySessionId

func (m *DeliveryUpdatesToUsers) GetMySessionId() int64

func (*DeliveryUpdatesToUsers) GetRawData

func (m *DeliveryUpdatesToUsers) GetRawData() []byte

func (*DeliveryUpdatesToUsers) GetSendtoUserIdList

func (m *DeliveryUpdatesToUsers) GetSendtoUserIdList() []int32

func (*DeliveryUpdatesToUsers) ProtoMessage

func (*DeliveryUpdatesToUsers) ProtoMessage()

func (*DeliveryUpdatesToUsers) Reset

func (m *DeliveryUpdatesToUsers) Reset()

func (*DeliveryUpdatesToUsers) String

func (m *DeliveryUpdatesToUsers) String() string

type MessageData

type MessageData struct {
	MessageType int32 `protobuf:"varint,1,opt,name=message_type,json=messageType" json:"message_type,omitempty"`
}

func (*MessageData) Descriptor

func (*MessageData) Descriptor() ([]byte, []int)

func (*MessageData) GetMessageType

func (m *MessageData) GetMessageType() int32

func (*MessageData) ProtoMessage

func (*MessageData) ProtoMessage()

func (*MessageData) Reset

func (m *MessageData) Reset()

func (*MessageData) String

func (m *MessageData) String() string

type MessageDataEmpty

type MessageDataEmpty struct {
}

func (*MessageDataEmpty) Descriptor

func (*MessageDataEmpty) Descriptor() ([]byte, []int)

func (*MessageDataEmpty) ProtoMessage

func (*MessageDataEmpty) ProtoMessage()

func (*MessageDataEmpty) Reset

func (m *MessageDataEmpty) Reset()

func (*MessageDataEmpty) String

func (m *MessageDataEmpty) String() string

type PushUpdatesData

type PushUpdatesData struct {
	AuthKeyId       int64  `protobuf:"varint,1,opt,name=auth_key_id,json=authKeyId" json:"auth_key_id,omitempty"`
	SessionId       int64  `protobuf:"varint,2,opt,name=session_id,json=sessionId" json:"session_id,omitempty"`
	NetlibSessionId int64  `protobuf:"varint,3,opt,name=netlib_session_id,json=netlibSessionId" json:"netlib_session_id,omitempty"`
	RawDataHeader   uint32 `protobuf:"varint,4,opt,name=raw_data_header,json=rawDataHeader" json:"raw_data_header,omitempty"`
	RawData         []byte `protobuf:"bytes,5,opt,name=raw_data,json=rawData,proto3" json:"raw_data,omitempty"`
}

func (*PushUpdatesData) Descriptor

func (*PushUpdatesData) Descriptor() ([]byte, []int)

func (*PushUpdatesData) GetAuthKeyId

func (m *PushUpdatesData) GetAuthKeyId() int64

func (*PushUpdatesData) GetNetlibSessionId

func (m *PushUpdatesData) GetNetlibSessionId() int64

func (*PushUpdatesData) GetRawData

func (m *PushUpdatesData) GetRawData() []byte

func (*PushUpdatesData) GetRawDataHeader

func (m *PushUpdatesData) GetRawDataHeader() uint32

func (*PushUpdatesData) GetSessionId

func (m *PushUpdatesData) GetSessionId() int64

func (*PushUpdatesData) ProtoMessage

func (*PushUpdatesData) ProtoMessage()

func (*PushUpdatesData) Reset

func (m *PushUpdatesData) Reset()

func (*PushUpdatesData) String

func (m *PushUpdatesData) String() string

type RPCSyncClient

type RPCSyncClient interface {
	// frontend --> sync
	PushUpdatesStream(ctx context.Context, in *ServerAuthReq, opts ...grpc.CallOption) (RPCSync_PushUpdatesStreamClient, error)
	// rpc ServerAuth(ServerAuthReq) returns (VoidRsp);
	DeliveryUpdates(ctx context.Context, in *DeliveryUpdatesToUsers, opts ...grpc.CallOption) (*VoidRsp, error)
	DeliveryUpdatesNotMe(ctx context.Context, in *DeliveryUpdatesToUsers, opts ...grpc.CallOption) (*VoidRsp, error)
}

func NewRPCSyncClient

func NewRPCSyncClient(cc *grpc.ClientConn) RPCSyncClient

type RPCSyncServer

type RPCSyncServer interface {
	// frontend --> sync
	PushUpdatesStream(*ServerAuthReq, RPCSync_PushUpdatesStreamServer) error
	// rpc ServerAuth(ServerAuthReq) returns (VoidRsp);
	DeliveryUpdates(context.Context, *DeliveryUpdatesToUsers) (*VoidRsp, error)
	DeliveryUpdatesNotMe(context.Context, *DeliveryUpdatesToUsers) (*VoidRsp, error)
}

type RPCSync_PushUpdatesStreamClient

type RPCSync_PushUpdatesStreamClient interface {
	Recv() (*PushUpdatesData, error)
	grpc.ClientStream
}

type RPCSync_PushUpdatesStreamServer

type RPCSync_PushUpdatesStreamServer interface {
	Send(*PushUpdatesData) error
	grpc.ServerStream
}

type RpcMetadata

type RpcMetadata struct {
	ServerId        int32  `protobuf:"varint,1,opt,name=server_id,json=serverId" json:"server_id,omitempty"`
	NetlibSessionId int64  `protobuf:"varint,2,opt,name=netlib_session_id,json=netlibSessionId" json:"netlib_session_id,omitempty"`
	ClientAddr      string `protobuf:"bytes,3,opt,name=client_addr,json=clientAddr" json:"client_addr,omitempty"`
	AuthId          int64  `protobuf:"varint,4,opt,name=auth_id,json=authId" json:"auth_id,omitempty"`
	SessionId       int64  `protobuf:"varint,5,opt,name=session_id,json=sessionId" json:"session_id,omitempty"`
	TraceId         int64  `protobuf:"varint,6,opt,name=trace_id,json=traceId" json:"trace_id,omitempty"`
	SpanId          int64  `protobuf:"varint,7,opt,name=span_id,json=spanId" json:"span_id,omitempty"`
	ReceiveTime     int64  `protobuf:"varint,8,opt,name=receive_time,json=receiveTime" json:"receive_time,omitempty"`
	From            string `protobuf:"bytes,9,opt,name=from" json:"from,omitempty"`
	To              string `protobuf:"bytes,10,opt,name=to" json:"to,omitempty"`
	// 用户ID
	UserId      int32 `protobuf:"varint,11,opt,name=user_id,json=userId" json:"user_id,omitempty"`
	ClientMsgId int64 `protobuf:"varint,12,opt,name=client_msg_id,json=clientMsgId" json:"client_msg_id,omitempty"`
}

func (*RpcMetadata) Descriptor

func (*RpcMetadata) Descriptor() ([]byte, []int)

func (*RpcMetadata) GetAuthId

func (m *RpcMetadata) GetAuthId() int64

func (*RpcMetadata) GetClientAddr

func (m *RpcMetadata) GetClientAddr() string

func (*RpcMetadata) GetClientMsgId

func (m *RpcMetadata) GetClientMsgId() int64

func (*RpcMetadata) GetFrom

func (m *RpcMetadata) GetFrom() string

func (*RpcMetadata) GetNetlibSessionId

func (m *RpcMetadata) GetNetlibSessionId() int64

func (*RpcMetadata) GetReceiveTime

func (m *RpcMetadata) GetReceiveTime() int64

func (*RpcMetadata) GetServerId

func (m *RpcMetadata) GetServerId() int32

func (*RpcMetadata) GetSessionId

func (m *RpcMetadata) GetSessionId() int64

func (*RpcMetadata) GetSpanId

func (m *RpcMetadata) GetSpanId() int64

func (*RpcMetadata) GetTo

func (m *RpcMetadata) GetTo() string

func (*RpcMetadata) GetTraceId

func (m *RpcMetadata) GetTraceId() int64

func (*RpcMetadata) GetUserId

func (m *RpcMetadata) GetUserId() int32

func (*RpcMetadata) ProtoMessage

func (*RpcMetadata) ProtoMessage()

func (*RpcMetadata) Reset

func (m *RpcMetadata) Reset()

func (*RpcMetadata) String

func (m *RpcMetadata) String() string

type ServerAuthReq

type ServerAuthReq struct {
	ServerId   int32  `protobuf:"varint,1,opt,name=server_id,json=serverId" json:"server_id,omitempty"`
	ServerName string `protobuf:"bytes,2,opt,name=server_name,json=serverName" json:"server_name,omitempty"`
}

///////////////////////////////////////////////////////////////////// ServerAuthReq ==> VoidRsp SERVER_AUTH_REQ

func (*ServerAuthReq) Descriptor

func (*ServerAuthReq) Descriptor() ([]byte, []int)

func (*ServerAuthReq) GetServerId

func (m *ServerAuthReq) GetServerId() int32

func (*ServerAuthReq) GetServerName

func (m *ServerAuthReq) GetServerName() string

func (*ServerAuthReq) ProtoMessage

func (*ServerAuthReq) ProtoMessage()

func (*ServerAuthReq) Reset

func (m *ServerAuthReq) Reset()

func (*ServerAuthReq) String

func (m *ServerAuthReq) String() string

type VoidRsp

type VoidRsp struct {
}

func (*VoidRsp) Descriptor

func (*VoidRsp) Descriptor() ([]byte, []int)

func (*VoidRsp) ProtoMessage

func (*VoidRsp) ProtoMessage()

func (*VoidRsp) Reset

func (m *VoidRsp) Reset()

func (*VoidRsp) String

func (m *VoidRsp) String() string

type VoidRsp2

type VoidRsp2 struct {
}

func (*VoidRsp2) Descriptor

func (*VoidRsp2) Descriptor() ([]byte, []int)

func (*VoidRsp2) ProtoMessage

func (*VoidRsp2) ProtoMessage()

func (*VoidRsp2) Reset

func (m *VoidRsp2) Reset()

func (*VoidRsp2) String

func (m *VoidRsp2) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL