message.pb.go 3.85 KB
Newer Older
1
// Code generated by protoc-gen-gogo.
2 3 4 5
// source: message.proto
// DO NOT EDIT!

/*
6
Package bitswap_message_pb is a generated protocol buffer package.
7 8 9 10 11

It is generated from these files:
	message.proto

It has these top-level messages:
12
	Message
13
*/
14
package bitswap_message_pb
15

Jeromy's avatar
Jeromy committed
16
import proto "github.com/gogo/protobuf/proto"
17
import fmt "fmt"
18 19 20 21
import math "math"

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

25
type Message struct {
Jeromy's avatar
Jeromy committed
26 27
	Wantlist         *Message_Wantlist `protobuf:"bytes,1,opt,name=wantlist" json:"wantlist,omitempty"`
	Blocks           [][]byte          `protobuf:"bytes,2,rep,name=blocks" json:"blocks,omitempty"`
28
	Payload          []*Message_Block  `protobuf:"bytes,3,rep,name=payload" json:"payload,omitempty"`
Jeromy's avatar
Jeromy committed
29
	XXX_unrecognized []byte            `json:"-"`
30 31
}

32 33 34
func (m *Message) Reset()         { *m = Message{} }
func (m *Message) String() string { return proto.CompactTextString(m) }
func (*Message) ProtoMessage()    {}
35

Jeromy's avatar
Jeromy committed
36
func (m *Message) GetWantlist() *Message_Wantlist {
37 38 39 40 41 42
	if m != nil {
		return m.Wantlist
	}
	return nil
}

43
func (m *Message) GetBlocks() [][]byte {
44 45 46 47 48 49
	if m != nil {
		return m.Blocks
	}
	return nil
}

50 51 52 53 54 55 56
func (m *Message) GetPayload() []*Message_Block {
	if m != nil {
		return m.Payload
	}
	return nil
}

Jeromy's avatar
Jeromy committed
57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112
type Message_Wantlist struct {
	Entries          []*Message_Wantlist_Entry `protobuf:"bytes,1,rep,name=entries" json:"entries,omitempty"`
	Full             *bool                     `protobuf:"varint,2,opt,name=full" json:"full,omitempty"`
	XXX_unrecognized []byte                    `json:"-"`
}

func (m *Message_Wantlist) Reset()         { *m = Message_Wantlist{} }
func (m *Message_Wantlist) String() string { return proto.CompactTextString(m) }
func (*Message_Wantlist) ProtoMessage()    {}

func (m *Message_Wantlist) GetEntries() []*Message_Wantlist_Entry {
	if m != nil {
		return m.Entries
	}
	return nil
}

func (m *Message_Wantlist) GetFull() bool {
	if m != nil && m.Full != nil {
		return *m.Full
	}
	return false
}

type Message_Wantlist_Entry struct {
	Block            *string `protobuf:"bytes,1,opt,name=block" json:"block,omitempty"`
	Priority         *int32  `protobuf:"varint,2,opt,name=priority" json:"priority,omitempty"`
	Cancel           *bool   `protobuf:"varint,3,opt,name=cancel" json:"cancel,omitempty"`
	XXX_unrecognized []byte  `json:"-"`
}

func (m *Message_Wantlist_Entry) Reset()         { *m = Message_Wantlist_Entry{} }
func (m *Message_Wantlist_Entry) String() string { return proto.CompactTextString(m) }
func (*Message_Wantlist_Entry) ProtoMessage()    {}

func (m *Message_Wantlist_Entry) GetBlock() string {
	if m != nil && m.Block != nil {
		return *m.Block
	}
	return ""
}

func (m *Message_Wantlist_Entry) GetPriority() int32 {
	if m != nil && m.Priority != nil {
		return *m.Priority
	}
	return 0
}

func (m *Message_Wantlist_Entry) GetCancel() bool {
	if m != nil && m.Cancel != nil {
		return *m.Cancel
	}
	return false
}

113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136
type Message_Block struct {
	Prefix           []byte `protobuf:"bytes,1,opt,name=prefix" json:"prefix,omitempty"`
	Data             []byte `protobuf:"bytes,2,opt,name=data" json:"data,omitempty"`
	XXX_unrecognized []byte `json:"-"`
}

func (m *Message_Block) Reset()         { *m = Message_Block{} }
func (m *Message_Block) String() string { return proto.CompactTextString(m) }
func (*Message_Block) ProtoMessage()    {}

func (m *Message_Block) GetPrefix() []byte {
	if m != nil {
		return m.Prefix
	}
	return nil
}

func (m *Message_Block) GetData() []byte {
	if m != nil {
		return m.Data
	}
	return nil
}

137
func init() {
138 139 140 141
	proto.RegisterType((*Message)(nil), "bitswap.message.pb.Message")
	proto.RegisterType((*Message_Wantlist)(nil), "bitswap.message.pb.Message.Wantlist")
	proto.RegisterType((*Message_Wantlist_Entry)(nil), "bitswap.message.pb.Message.Wantlist.Entry")
	proto.RegisterType((*Message_Block)(nil), "bitswap.message.pb.Message.Block")
142
}