-
Notifications
You must be signed in to change notification settings - Fork 1
/
author.pb.go
180 lines (153 loc) · 5.37 KB
/
author.pb.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: author.proto
package main
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
math "math"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
type BookType int32
const (
BookType_EBOOK BookType = 0
BookType_PAPER BookType = 1
)
var BookType_name = map[int32]string{
0: "EBOOK",
1: "PAPER",
}
var BookType_value = map[string]int32{
"EBOOK": 0,
"PAPER": 1,
}
func (x BookType) String() string {
return proto.EnumName(BookType_name, int32(x))
}
func (BookType) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_54cb4b5a5dd8ee3d, []int{0}
}
type Author struct {
Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
Name string `protobuf:"bytes,2,opt,name=Name,proto3" json:"Name,omitempty"`
Books []*Book `protobuf:"bytes,3,rep,name=books,proto3" json:"books,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Author) Reset() { *m = Author{} }
func (m *Author) String() string { return proto.CompactTextString(m) }
func (*Author) ProtoMessage() {}
func (*Author) Descriptor() ([]byte, []int) {
return fileDescriptor_54cb4b5a5dd8ee3d, []int{0}
}
func (m *Author) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Author.Unmarshal(m, b)
}
func (m *Author) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Author.Marshal(b, m, deterministic)
}
func (m *Author) XXX_Merge(src proto.Message) {
xxx_messageInfo_Author.Merge(m, src)
}
func (m *Author) XXX_Size() int {
return xxx_messageInfo_Author.Size(m)
}
func (m *Author) XXX_DiscardUnknown() {
xxx_messageInfo_Author.DiscardUnknown(m)
}
var xxx_messageInfo_Author proto.InternalMessageInfo
func (m *Author) GetId() int32 {
if m != nil {
return m.Id
}
return 0
}
func (m *Author) GetName() string {
if m != nil {
return m.Name
}
return ""
}
func (m *Author) GetBooks() []*Book {
if m != nil {
return m.Books
}
return nil
}
type Book struct {
Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
Type BookType `protobuf:"varint,3,opt,name=type,proto3,enum=main.BookType" json:"type,omitempty"`
Name string `protobuf:"bytes,5,opt,name=name,proto3" json:"name,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Book) Reset() { *m = Book{} }
func (m *Book) String() string { return proto.CompactTextString(m) }
func (*Book) ProtoMessage() {}
func (*Book) Descriptor() ([]byte, []int) {
return fileDescriptor_54cb4b5a5dd8ee3d, []int{1}
}
func (m *Book) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Book.Unmarshal(m, b)
}
func (m *Book) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Book.Marshal(b, m, deterministic)
}
func (m *Book) XXX_Merge(src proto.Message) {
xxx_messageInfo_Book.Merge(m, src)
}
func (m *Book) XXX_Size() int {
return xxx_messageInfo_Book.Size(m)
}
func (m *Book) XXX_DiscardUnknown() {
xxx_messageInfo_Book.DiscardUnknown(m)
}
var xxx_messageInfo_Book proto.InternalMessageInfo
func (m *Book) GetId() int32 {
if m != nil {
return m.Id
}
return 0
}
func (m *Book) GetType() BookType {
if m != nil {
return m.Type
}
return BookType_EBOOK
}
func (m *Book) GetName() string {
if m != nil {
return m.Name
}
return ""
}
func init() {
proto.RegisterEnum("main.BookType", BookType_name, BookType_value)
proto.RegisterType((*Author)(nil), "main.Author")
proto.RegisterType((*Book)(nil), "main.Book")
}
func init() { proto.RegisterFile("author.proto", fileDescriptor_54cb4b5a5dd8ee3d) }
var fileDescriptor_54cb4b5a5dd8ee3d = []byte{
// 191 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x49, 0x2c, 0x2d, 0xc9,
0xc8, 0x2f, 0xd2, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0xc9, 0x4d, 0xcc, 0xcc, 0x53, 0xf2,
0xe3, 0x62, 0x73, 0x04, 0x8b, 0x0a, 0xf1, 0x71, 0x31, 0x65, 0xa6, 0x48, 0x30, 0x2a, 0x30, 0x6a,
0xb0, 0x06, 0x31, 0x65, 0xa6, 0x08, 0x09, 0x71, 0xb1, 0xf8, 0x25, 0xe6, 0xa6, 0x4a, 0x30, 0x29,
0x30, 0x6a, 0x70, 0x06, 0x81, 0xd9, 0x42, 0x0a, 0x5c, 0xac, 0x49, 0xf9, 0xf9, 0xd9, 0xc5, 0x12,
0xcc, 0x0a, 0xcc, 0x1a, 0xdc, 0x46, 0x5c, 0x7a, 0x20, 0x33, 0xf4, 0x9c, 0xf2, 0xf3, 0xb3, 0x83,
0x20, 0x12, 0x4a, 0x21, 0x5c, 0x2c, 0x20, 0x2e, 0x86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