p2p.pb.go 3.97 KB
Newer Older
Steven Allen's avatar
Steven Allen committed
1
// Code generated by protoc-gen-gogo.
2
// source: p2p.proto
Steven Allen's avatar
Steven Allen committed
3
// DO NOT EDIT!
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19

/*
Package protocols_p2p is a generated protocol buffer package.

It is generated from these files:
	p2p.proto

It has these top-level messages:
	MessageData
	PingRequest
	PingResponse
	EchoRequest
	EchoResponse
*/
package protocols_p2p

Steven Allen's avatar
Steven Allen committed
20
import proto "github.com/gogo/protobuf/proto"
21
22
23
24
25
26
27
28
29
30
31
import fmt "fmt"
import math "math"

// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf

// designed to be shared between all app protocols
type MessageData struct {
	// shared between all requests
Steven Allen's avatar
Steven Allen committed
32
33
34
35
36
	ClientVersion string `protobuf:"bytes,1,opt,name=clientVersion,proto3" json:"clientVersion,omitempty"`
	Timestamp     int64  `protobuf:"varint,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	Id            string `protobuf:"bytes,3,opt,name=id,proto3" json:"id,omitempty"`
	Gossip        bool   `protobuf:"varint,4,opt,name=gossip,proto3" json:"gossip,omitempty"`
	NodeId        string `protobuf:"bytes,5,opt,name=nodeId,proto3" json:"nodeId,omitempty"`
Aviv Eyal's avatar
Aviv Eyal committed
37
	NodePubKey    []byte `protobuf:"bytes,6,opt,name=nodePubKey,proto3" json:"nodePubKey,omitempty"`
Steven Allen's avatar
Steven Allen committed
38
	Sign          string `protobuf:"bytes,7,opt,name=sign,proto3" json:"sign,omitempty"`
Aviv Eyal's avatar
Aviv Eyal committed
39
40
}

Steven Allen's avatar
Steven Allen committed
41
42
43
func (m *MessageData) Reset()         { *m = MessageData{} }
func (m *MessageData) String() string { return proto.CompactTextString(m) }
func (*MessageData) ProtoMessage()    {}
44
45
46
47
48

// a protocol define a set of reuqest and responses
type PingRequest struct {
	MessageData *MessageData `protobuf:"bytes,1,opt,name=messageData" json:"messageData,omitempty"`
	// method specific data
Steven Allen's avatar
Steven Allen committed
49
	Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
50
51
}

Steven Allen's avatar
Steven Allen committed
52
53
54
func (m *PingRequest) Reset()         { *m = PingRequest{} }
func (m *PingRequest) String() string { return proto.CompactTextString(m) }
func (*PingRequest) ProtoMessage()    {}
55
56
57
58
59
60
61
62
63
64
65

func (m *PingRequest) GetMessageData() *MessageData {
	if m != nil {
		return m.MessageData
	}
	return nil
}

type PingResponse struct {
	MessageData *MessageData `protobuf:"bytes,1,opt,name=messageData" json:"messageData,omitempty"`
	// response specific data
Steven Allen's avatar
Steven Allen committed
66
	Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
67
68
}

Steven Allen's avatar
Steven Allen committed
69
70
71
func (m *PingResponse) Reset()         { *m = PingResponse{} }
func (m *PingResponse) String() string { return proto.CompactTextString(m) }
func (*PingResponse) ProtoMessage()    {}
72
73
74
75
76
77
78
79
80
81
82
83

func (m *PingResponse) GetMessageData() *MessageData {
	if m != nil {
		return m.MessageData
	}
	return nil
}

// a protocol define a set of reuqest and responses
type EchoRequest struct {
	MessageData *MessageData `protobuf:"bytes,1,opt,name=messageData" json:"messageData,omitempty"`
	// method specific data
Steven Allen's avatar
Steven Allen committed
84
	Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
85
86
}

Steven Allen's avatar
Steven Allen committed
87
88
89
func (m *EchoRequest) Reset()         { *m = EchoRequest{} }
func (m *EchoRequest) String() string { return proto.CompactTextString(m) }
func (*EchoRequest) ProtoMessage()    {}
90
91
92
93
94
95
96
97
98
99
100

func (m *EchoRequest) GetMessageData() *MessageData {
	if m != nil {
		return m.MessageData
	}
	return nil
}

type EchoResponse struct {
	MessageData *MessageData `protobuf:"bytes,1,opt,name=messageData" json:"messageData,omitempty"`
	// response specific data
Steven Allen's avatar
Steven Allen committed
101
	Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
102
103
}

Steven Allen's avatar
Steven Allen committed
104
105
106
func (m *EchoResponse) Reset()         { *m = EchoResponse{} }
func (m *EchoResponse) String() string { return proto.CompactTextString(m) }
func (*EchoResponse) ProtoMessage()    {}
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121

func (m *EchoResponse) GetMessageData() *MessageData {
	if m != nil {
		return m.MessageData
	}
	return nil
}

func init() {
	proto.RegisterType((*MessageData)(nil), "protocols.p2p.MessageData")
	proto.RegisterType((*PingRequest)(nil), "protocols.p2p.PingRequest")
	proto.RegisterType((*PingResponse)(nil), "protocols.p2p.PingResponse")
	proto.RegisterType((*EchoRequest)(nil), "protocols.p2p.EchoRequest")
	proto.RegisterType((*EchoResponse)(nil), "protocols.p2p.EchoResponse")
}