feedx 0.12.2 → 0.12.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.editorconfig +3 -0
- data/.github/workflows/lint.yml +18 -0
- data/.github/workflows/test.yml +48 -0
- data/.gitignore +1 -0
- data/.golangci.yml +4 -0
- data/.rubocop.yml +14 -5
- data/Gemfile +0 -2
- data/Gemfile.lock +60 -50
- data/Makefile +6 -6
- data/README.md +1 -1
- data/compression.go +18 -0
- data/compression_test.go +17 -5
- data/consumer.go +12 -3
- data/consumer_test.go +50 -19
- data/ext/parquet/decoder.go +59 -0
- data/ext/parquet/decoder_test.go +88 -0
- data/ext/parquet/encoder.go +27 -0
- data/ext/parquet/encoder_test.go +70 -0
- data/ext/parquet/go.mod +12 -0
- data/ext/parquet/go.sum +193 -0
- data/ext/parquet/parquet.go +78 -0
- data/ext/parquet/parquet_test.go +28 -0
- data/ext/parquet/testdata/alltypes_plain.parquet +0 -0
- data/feedx.gemspec +6 -6
- data/feedx_ext_test.go +6 -0
- data/feedx_test.go +8 -6
- data/format.go +45 -15
- data/format_test.go +7 -5
- data/go.mod +8 -5
- data/go.sum +95 -32
- data/internal/testdata/testdata.pb.go +176 -77
- data/lib/feedx/cache/memory.rb +1 -0
- data/lib/feedx/format.rb +1 -1
- data/lib/feedx/producer.rb +18 -19
- data/lib/feedx/stream.rb +4 -8
- data/producer_test.go +4 -4
- data/reader_test.go +6 -5
- data/spec/feedx/cache/memory_spec.rb +2 -2
- data/spec/feedx/cache/value_spec.rb +1 -1
- data/spec/feedx/compression/gzip_spec.rb +1 -1
- data/spec/feedx/compression/none_spec.rb +1 -1
- data/spec/feedx/compression_spec.rb +2 -2
- data/spec/feedx/consumer_spec.rb +5 -4
- data/spec/feedx/format/abstract_spec.rb +2 -1
- data/spec/feedx/format/json_spec.rb +6 -6
- data/spec/feedx/format/parquet_spec.rb +1 -1
- data/spec/feedx/format/protobuf_spec.rb +1 -1
- data/spec/feedx/format_spec.rb +2 -2
- data/spec/feedx/producer_spec.rb +10 -9
- data/spec/feedx/stream_spec.rb +30 -18
- data/writer.go +1 -4
- data/writer_test.go +8 -8
- metadata +30 -25
- data/.travis.yml +0 -24
data/format.go
CHANGED
@@ -7,8 +7,11 @@ import (
|
|
7
7
|
"io"
|
8
8
|
"path"
|
9
9
|
|
10
|
-
|
11
|
-
"
|
10
|
+
"github.com/bsm/pbio"
|
11
|
+
"google.golang.org/protobuf/proto"
|
12
|
+
|
13
|
+
gio "github.com/gogo/protobuf/io"
|
14
|
+
gproto "github.com/gogo/protobuf/proto"
|
12
15
|
)
|
13
16
|
|
14
17
|
var errNoFormat = errors.New("feedx: no format detected")
|
@@ -98,35 +101,62 @@ type protobufFormat struct{}
|
|
98
101
|
|
99
102
|
// NewDecoder implements Format.
|
100
103
|
func (protobufFormat) NewDecoder(r io.Reader) (FormatDecoder, error) {
|
101
|
-
return protobufWrapper{
|
104
|
+
return &protobufWrapper{r: r}, nil
|
102
105
|
}
|
103
106
|
|
104
107
|
// NewEncoder implements Format.
|
105
108
|
func (protobufFormat) NewEncoder(w io.Writer) (FormatEncoder, error) {
|
106
|
-
return protobufWrapper{
|
109
|
+
return &protobufWrapper{w: w}, nil
|
107
110
|
}
|
108
111
|
|
109
112
|
type protobufWrapper struct {
|
110
|
-
|
111
|
-
pbio.
|
113
|
+
r io.Reader
|
114
|
+
dec *pbio.Decoder
|
115
|
+
pbr gio.Reader
|
116
|
+
|
117
|
+
w io.Writer
|
118
|
+
enc *pbio.Encoder
|
119
|
+
pbw gio.Writer
|
112
120
|
}
|
113
121
|
|
114
|
-
func (w protobufWrapper) Decode(v interface{}) error {
|
115
|
-
msg
|
116
|
-
|
122
|
+
func (w *protobufWrapper) Decode(v interface{}) error {
|
123
|
+
switch msg := v.(type) {
|
124
|
+
case proto.Message:
|
125
|
+
if w.dec == nil {
|
126
|
+
w.dec = pbio.NewDecoder(w.r)
|
127
|
+
}
|
128
|
+
return w.dec.Decode(msg)
|
129
|
+
|
130
|
+
case gproto.Message:
|
131
|
+
if w.pbr == nil {
|
132
|
+
w.pbr = gio.NewDelimitedReader(w.r, 1<<28)
|
133
|
+
}
|
134
|
+
return w.pbr.ReadMsg(msg)
|
135
|
+
|
136
|
+
default:
|
117
137
|
return fmt.Errorf("value %v (%T) is not a proto.Message", v, v)
|
118
138
|
}
|
119
|
-
return w.ReadMsg(msg)
|
120
139
|
}
|
121
140
|
|
122
|
-
func (w protobufWrapper) Encode(v interface{}) error {
|
123
|
-
msg
|
124
|
-
|
141
|
+
func (w *protobufWrapper) Encode(v interface{}) error {
|
142
|
+
switch msg := v.(type) {
|
143
|
+
case proto.Message:
|
144
|
+
if w.enc == nil {
|
145
|
+
w.enc = pbio.NewEncoder(w.w)
|
146
|
+
}
|
147
|
+
return w.enc.Encode(msg)
|
148
|
+
|
149
|
+
case gproto.Message:
|
150
|
+
if w.pbw == nil {
|
151
|
+
w.pbw = gio.NewDelimitedWriter(w.w)
|
152
|
+
}
|
153
|
+
return w.pbw.WriteMsg(msg)
|
154
|
+
|
155
|
+
default:
|
125
156
|
return fmt.Errorf("value %v (%T) is not a proto.Message", v, v)
|
126
157
|
}
|
127
|
-
return w.WriteMsg(msg)
|
128
158
|
}
|
129
159
|
|
130
|
-
func (protobufWrapper) Close() error {
|
160
|
+
func (*protobufWrapper) Close() error {
|
131
161
|
return nil
|
132
162
|
}
|
data/format_test.go
CHANGED
@@ -6,8 +6,8 @@ import (
|
|
6
6
|
|
7
7
|
"github.com/bsm/feedx"
|
8
8
|
"github.com/bsm/feedx/internal/testdata"
|
9
|
-
. "github.com/
|
10
|
-
. "github.com/
|
9
|
+
. "github.com/bsm/ginkgo"
|
10
|
+
. "github.com/bsm/gomega"
|
11
11
|
)
|
12
12
|
|
13
13
|
var _ = Describe("Format", func() {
|
@@ -40,13 +40,15 @@ var _ = Describe("Format", func() {
|
|
40
40
|
Expect(dec.Close()).To(Succeed())
|
41
41
|
}
|
42
42
|
|
43
|
-
It("
|
43
|
+
It("detects the format", func() {
|
44
44
|
Expect(feedx.DetectFormat("/path/to/file.json")).To(Equal(feedx.JSONFormat))
|
45
45
|
Expect(feedx.DetectFormat("/path/to/file.json.gz")).To(Equal(feedx.JSONFormat))
|
46
|
+
Expect(feedx.DetectFormat("/path/to/file.json.flate")).To(Equal(feedx.JSONFormat))
|
46
47
|
Expect(feedx.DetectFormat("/path/to/file.jsonz")).To(Equal(feedx.JSONFormat))
|
47
48
|
|
48
49
|
Expect(feedx.DetectFormat("/path/to/file.pb")).To(Equal(feedx.ProtobufFormat))
|
49
50
|
Expect(feedx.DetectFormat("/path/to/file.pb.gz")).To(Equal(feedx.ProtobufFormat))
|
51
|
+
Expect(feedx.DetectFormat("/path/to/file.pb.flate")).To(Equal(feedx.ProtobufFormat))
|
50
52
|
Expect(feedx.DetectFormat("/path/to/file.pbz")).To(Equal(feedx.ProtobufFormat))
|
51
53
|
|
52
54
|
Expect(feedx.DetectFormat("")).To(BeNil())
|
@@ -58,7 +60,7 @@ var _ = Describe("Format", func() {
|
|
58
60
|
var subject = feedx.JSONFormat
|
59
61
|
var _ feedx.Format = subject
|
60
62
|
|
61
|
-
It("
|
63
|
+
It("encodes/decodes", func() {
|
62
64
|
runSharedTest(subject)
|
63
65
|
})
|
64
66
|
})
|
@@ -67,7 +69,7 @@ var _ = Describe("Format", func() {
|
|
67
69
|
var subject = feedx.ProtobufFormat
|
68
70
|
var _ feedx.Format = subject
|
69
71
|
|
70
|
-
It("
|
72
|
+
It("encodes/decodes", func() {
|
71
73
|
runSharedTest(subject)
|
72
74
|
})
|
73
75
|
})
|
data/go.mod
CHANGED
@@ -1,10 +1,13 @@
|
|
1
1
|
module github.com/bsm/feedx
|
2
2
|
|
3
|
-
go 1.
|
3
|
+
go 1.15
|
4
4
|
|
5
5
|
require (
|
6
|
-
github.com/bsm/bfs v0.
|
7
|
-
github.com/
|
8
|
-
github.com/
|
9
|
-
github.com/
|
6
|
+
github.com/bsm/bfs v0.11.5
|
7
|
+
github.com/bsm/ginkgo v1.16.5
|
8
|
+
github.com/bsm/gomega v1.17.0
|
9
|
+
github.com/bsm/pbio v0.3.0
|
10
|
+
github.com/gogo/protobuf v1.3.2
|
11
|
+
github.com/golang/protobuf v1.5.2
|
12
|
+
google.golang.org/protobuf v1.27.1
|
10
13
|
)
|
data/go.sum
CHANGED
@@ -1,12 +1,28 @@
|
|
1
|
-
|
2
|
-
github.com/
|
3
|
-
github.com/
|
4
|
-
github.com/
|
1
|
+
cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
|
2
|
+
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
|
3
|
+
github.com/bmatcuk/doublestar/v3 v3.0.0 h1:TQtVPlDnAYwcrVNB2JiGuMc++H5qzWZd9PhkNo5WyHI=
|
4
|
+
github.com/bmatcuk/doublestar/v3 v3.0.0/go.mod h1:6PcTVMw80pCY1RVuoqu3V++99uQB3vsSYKPTd8AWA0k=
|
5
|
+
github.com/bsm/bfs v0.11.5 h1:NMWD0hOp/74boNd51Zas4DMh81mvp1As1SjEZrFWHi0=
|
6
|
+
github.com/bsm/bfs v0.11.5/go.mod h1:D2N+ly23VsODKiRvkf4HUgKSgOaNjKTOJE53rhL6Vfk=
|
7
|
+
github.com/bsm/ginkgo v1.16.4/go.mod h1:RabIZLzOCPghgHJKUqHZpqrQETA5AnF4aCSIYy5C1bk=
|
8
|
+
github.com/bsm/ginkgo v1.16.5 h1:uTeeWv0Yx1PnDeCk76PFyGrOMVw3D+r9bTNKNcIjDdQ=
|
9
|
+
github.com/bsm/ginkgo v1.16.5/go.mod h1:RabIZLzOCPghgHJKUqHZpqrQETA5AnF4aCSIYy5C1bk=
|
10
|
+
github.com/bsm/gomega v1.16.0/go.mod h1:JifAceMQ4crZIWYUKrlGcmbN3bqHogVTADMD2ATsbwk=
|
11
|
+
github.com/bsm/gomega v1.17.0 h1:Sd6EsHO5d0DU6d41dtx9cK3T7Vjsr89o6zyIVWgi0CI=
|
12
|
+
github.com/bsm/gomega v1.17.0/go.mod h1:JifAceMQ4crZIWYUKrlGcmbN3bqHogVTADMD2ATsbwk=
|
13
|
+
github.com/bsm/pbio v0.3.0 h1:8XzkUPoJZblPkLp2jHVMnIhGs5WaNHTCmO7gRC45izk=
|
14
|
+
github.com/bsm/pbio v0.3.0/go.mod h1:3O4XQFoarlYalkGd+zMFfEUyalP8NBKkQ0Ta4IwhN4w=
|
15
|
+
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
|
16
|
+
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
|
17
|
+
github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
|
18
|
+
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
|
5
19
|
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
|
6
20
|
github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4=
|
7
21
|
github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ=
|
8
|
-
github.com/gogo/protobuf v1.3.
|
9
|
-
github.com/gogo/protobuf v1.3.
|
22
|
+
github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q=
|
23
|
+
github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q=
|
24
|
+
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
|
25
|
+
github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
|
10
26
|
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
11
27
|
github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
12
28
|
github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8=
|
@@ -14,69 +30,116 @@ github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:x
|
|
14
30
|
github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs=
|
15
31
|
github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w=
|
16
32
|
github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0=
|
17
|
-
github.com/golang/protobuf v1.4.
|
33
|
+
github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8=
|
18
34
|
github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
|
35
|
+
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
|
36
|
+
github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw=
|
37
|
+
github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
|
38
|
+
github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
|
19
39
|
github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
|
20
40
|
github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
|
21
|
-
github.com/google/go-cmp v0.4.0 h1:xsAVV57WRhGj6kEIi8ReJzQlHHqcBYCElAvkovg3B/4=
|
22
41
|
github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
42
|
+
github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
43
|
+
github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU=
|
44
|
+
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
23
45
|
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
|
24
|
-
github.com/kisielk/errcheck v1.
|
46
|
+
github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8=
|
25
47
|
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
|
26
|
-
github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI=
|
27
|
-
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
|
28
|
-
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
|
29
|
-
github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=
|
30
|
-
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
|
31
48
|
github.com/nxadm/tail v1.4.4 h1:DQuhQpB1tVlglWS2hLQ5OV6B5r8aGxSrPc5Qo6uTN78=
|
32
49
|
github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A=
|
33
50
|
github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
|
34
|
-
github.com/onsi/ginkgo v1.8.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
|
35
51
|
github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk=
|
36
|
-
github.com/onsi/ginkgo v1.
|
37
|
-
github.com/onsi/ginkgo v1.
|
38
|
-
github.com/onsi/gomega v1.5.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
|
52
|
+
github.com/onsi/ginkgo v1.14.1 h1:jMU0WaQrP0a/YAEq8eJmJKjBoMs+pClEr1vDMlM/Do4=
|
53
|
+
github.com/onsi/ginkgo v1.14.1/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY=
|
39
54
|
github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY=
|
40
|
-
github.com/onsi/gomega v1.10.1 h1:o0+MgICZLuZ7xjH7Vx6zS/zcu93/BEp1VwkIW1mEXCE=
|
41
55
|
github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo=
|
42
|
-
github.com/
|
56
|
+
github.com/onsi/gomega v1.10.2 h1:aY/nuoWlKJud2J6U0E3NWsjlg+0GtwXxgEqthRdzlcs=
|
57
|
+
github.com/onsi/gomega v1.10.2/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo=
|
58
|
+
github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
|
59
|
+
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
60
|
+
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
43
61
|
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
62
|
+
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
63
|
+
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
64
|
+
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
65
|
+
golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
|
66
|
+
golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU=
|
67
|
+
golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
|
68
|
+
golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
69
|
+
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
70
|
+
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
71
|
+
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
44
72
|
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
45
|
-
golang.org/x/net v0.0.0-
|
46
|
-
golang.org/x/net v0.0.0-
|
73
|
+
golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
74
|
+
golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
75
|
+
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
76
|
+
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
77
|
+
golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
47
78
|
golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
|
79
|
+
golang.org/x/net v0.0.0-20201021035429-f5854403a974 h1:IX6qOQeG5uLjB/hjjwjedwfjND0hgjPMMyO1RoIXQNI=
|
80
|
+
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
|
81
|
+
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
|
48
82
|
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
83
|
+
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
84
|
+
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
85
|
+
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
86
|
+
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
87
|
+
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
49
88
|
golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
50
89
|
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
51
|
-
golang.org/x/sys v0.0.0-
|
90
|
+
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
52
91
|
golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
53
92
|
golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
54
93
|
golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
55
94
|
golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
56
|
-
golang.org/x/sys v0.0.0-20200519105757-fe76b779f299 h1:DYfZAGf2WMFjMxbgTjaC+2HC7NkNAQs+6Q8b9WEB/F4=
|
57
95
|
golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
96
|
+
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f h1:+Nyd8tzPX9R7BWHguqsrbFdRx3WQ/1ib8I44HXV5yTA=
|
97
|
+
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
58
98
|
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
59
|
-
golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs=
|
60
99
|
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
|
100
|
+
golang.org/x/text v0.3.3 h1:cokOdA+Jmi5PJGXLlLllQSgYigAEfHXJAERHVMaCc2k=
|
101
|
+
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
61
102
|
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
62
|
-
golang.org/x/tools v0.0.0-
|
63
|
-
golang.org/x/
|
103
|
+
golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
104
|
+
golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY=
|
105
|
+
golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
|
106
|
+
golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
|
107
|
+
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
108
|
+
golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
|
109
|
+
golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
|
110
|
+
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
111
|
+
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
64
112
|
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
113
|
+
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE=
|
114
|
+
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
115
|
+
google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
|
116
|
+
google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
|
117
|
+
google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
|
118
|
+
google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc=
|
119
|
+
google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo=
|
120
|
+
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
|
121
|
+
google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg=
|
122
|
+
google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
|
65
123
|
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
|
66
124
|
google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
|
67
125
|
google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=
|
68
126
|
google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE=
|
69
127
|
google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo=
|
70
|
-
google.golang.org/protobuf v1.
|
128
|
+
google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
|
71
129
|
google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
|
130
|
+
google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
|
131
|
+
google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c=
|
132
|
+
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
|
133
|
+
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
|
134
|
+
google.golang.org/protobuf v1.27.1 h1:SnqbnDw1V7RiZcXPx5MEeqPv2s79L9i7BJUlG/+RurQ=
|
135
|
+
google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
|
136
|
+
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
|
72
137
|
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
73
|
-
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY=
|
74
|
-
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
75
138
|
gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
|
76
139
|
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ=
|
77
140
|
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
|
78
|
-
gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
79
|
-
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
80
141
|
gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
81
142
|
gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU=
|
82
143
|
gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
144
|
+
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
145
|
+
honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
@@ -1,24 +1,29 @@
|
|
1
|
-
// Code generated by protoc-gen-
|
1
|
+
// Code generated by protoc-gen-go. DO NOT EDIT.
|
2
|
+
// versions:
|
3
|
+
// protoc-gen-go v1.24.0-devel
|
4
|
+
// protoc v3.11.3
|
2
5
|
// source: internal/testdata/testdata.proto
|
3
6
|
|
4
7
|
package testdata
|
5
8
|
|
6
9
|
import (
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
+
proto "github.com/golang/protobuf/proto"
|
11
|
+
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
12
|
+
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
13
|
+
reflect "reflect"
|
14
|
+
sync "sync"
|
10
15
|
)
|
11
16
|
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
17
|
+
const (
|
18
|
+
// Verify that this generated code is sufficiently up-to-date.
|
19
|
+
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
20
|
+
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
21
|
+
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
22
|
+
)
|
16
23
|
|
17
|
-
// This is a compile-time assertion
|
18
|
-
//
|
19
|
-
|
20
|
-
// proto package needs to be updated.
|
21
|
-
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
|
24
|
+
// This is a compile-time assertion that a sufficiently up-to-date version
|
25
|
+
// of the legacy proto package is being used.
|
26
|
+
const _ = proto.ProtoPackageIsVersion4
|
22
27
|
|
23
28
|
type MockEnum int32
|
24
29
|
|
@@ -27,98 +32,192 @@ const (
|
|
27
32
|
MockEnum_FIRST MockEnum = 3
|
28
33
|
)
|
29
34
|
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
35
|
+
// Enum value maps for MockEnum.
|
36
|
+
var (
|
37
|
+
MockEnum_name = map[int32]string{
|
38
|
+
0: "UNKNOWN",
|
39
|
+
3: "FIRST",
|
40
|
+
}
|
41
|
+
MockEnum_value = map[string]int32{
|
42
|
+
"UNKNOWN": 0,
|
43
|
+
"FIRST": 3,
|
44
|
+
}
|
45
|
+
)
|
34
46
|
|
35
|
-
|
36
|
-
|
37
|
-
|
47
|
+
func (x MockEnum) Enum() *MockEnum {
|
48
|
+
p := new(MockEnum)
|
49
|
+
*p = x
|
50
|
+
return p
|
38
51
|
}
|
39
52
|
|
40
53
|
func (x MockEnum) String() string {
|
41
|
-
return
|
54
|
+
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
|
42
55
|
}
|
43
56
|
|
44
|
-
func (MockEnum)
|
45
|
-
return
|
57
|
+
func (MockEnum) Descriptor() protoreflect.EnumDescriptor {
|
58
|
+
return file_internal_testdata_testdata_proto_enumTypes[0].Descriptor()
|
46
59
|
}
|
47
60
|
|
48
|
-
|
49
|
-
|
50
|
-
Enum MockEnum `protobuf:"varint,2,opt,name=enum,proto3,enum=feedx.internal.testdata.MockEnum" json:"enum,omitempty"`
|
51
|
-
Height uint32 `protobuf:"varint,3,opt,name=height,proto3" json:"height,omitempty"`
|
52
|
-
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
53
|
-
XXX_unrecognized []byte `json:"-"`
|
54
|
-
XXX_sizecache int32 `json:"-"`
|
61
|
+
func (MockEnum) Type() protoreflect.EnumType {
|
62
|
+
return &file_internal_testdata_testdata_proto_enumTypes[0]
|
55
63
|
}
|
56
64
|
|
57
|
-
func (
|
58
|
-
|
59
|
-
func (*MockMessage) ProtoMessage() {}
|
60
|
-
func (*MockMessage) Descriptor() ([]byte, []int) {
|
61
|
-
return fileDescriptor_076a9f61cb4a1904, []int{0}
|
65
|
+
func (x MockEnum) Number() protoreflect.EnumNumber {
|
66
|
+
return protoreflect.EnumNumber(x)
|
62
67
|
}
|
63
|
-
|
64
|
-
|
68
|
+
|
69
|
+
// Deprecated: Use MockEnum.Descriptor instead.
|
70
|
+
func (MockEnum) EnumDescriptor() ([]byte, []int) {
|
71
|
+
return file_internal_testdata_testdata_proto_rawDescGZIP(), []int{0}
|
65
72
|
}
|
66
|
-
|
67
|
-
|
73
|
+
|
74
|
+
type MockMessage struct {
|
75
|
+
state protoimpl.MessageState
|
76
|
+
sizeCache protoimpl.SizeCache
|
77
|
+
unknownFields protoimpl.UnknownFields
|
78
|
+
|
79
|
+
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
|
80
|
+
Enum MockEnum `protobuf:"varint,2,opt,name=enum,proto3,enum=feedx.internal.testdata.MockEnum" json:"enum,omitempty"`
|
81
|
+
Height uint32 `protobuf:"varint,3,opt,name=height,proto3" json:"height,omitempty"`
|
68
82
|
}
|
69
|
-
|
70
|
-
|
83
|
+
|
84
|
+
func (x *MockMessage) Reset() {
|
85
|
+
*x = MockMessage{}
|
86
|
+
if protoimpl.UnsafeEnabled {
|
87
|
+
mi := &file_internal_testdata_testdata_proto_msgTypes[0]
|
88
|
+
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
89
|
+
ms.StoreMessageInfo(mi)
|
90
|
+
}
|
71
91
|
}
|
72
|
-
|
73
|
-
|
92
|
+
|
93
|
+
func (x *MockMessage) String() string {
|
94
|
+
return protoimpl.X.MessageStringOf(x)
|
74
95
|
}
|
75
|
-
|
76
|
-
|
96
|
+
|
97
|
+
func (*MockMessage) ProtoMessage() {}
|
98
|
+
|
99
|
+
func (x *MockMessage) ProtoReflect() protoreflect.Message {
|
100
|
+
mi := &file_internal_testdata_testdata_proto_msgTypes[0]
|
101
|
+
if protoimpl.UnsafeEnabled && x != nil {
|
102
|
+
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
103
|
+
if ms.LoadMessageInfo() == nil {
|
104
|
+
ms.StoreMessageInfo(mi)
|
105
|
+
}
|
106
|
+
return ms
|
107
|
+
}
|
108
|
+
return mi.MessageOf(x)
|
77
109
|
}
|
78
110
|
|
79
|
-
|
111
|
+
// Deprecated: Use MockMessage.ProtoReflect.Descriptor instead.
|
112
|
+
func (*MockMessage) Descriptor() ([]byte, []int) {
|
113
|
+
return file_internal_testdata_testdata_proto_rawDescGZIP(), []int{0}
|
114
|
+
}
|
80
115
|
|
81
|
-
func (
|
82
|
-
if
|
83
|
-
return
|
116
|
+
func (x *MockMessage) GetName() string {
|
117
|
+
if x != nil {
|
118
|
+
return x.Name
|
84
119
|
}
|
85
120
|
return ""
|
86
121
|
}
|
87
122
|
|
88
|
-
func (
|
89
|
-
if
|
90
|
-
return
|
123
|
+
func (x *MockMessage) GetEnum() MockEnum {
|
124
|
+
if x != nil {
|
125
|
+
return x.Enum
|
91
126
|
}
|
92
127
|
return MockEnum_UNKNOWN
|
93
128
|
}
|
94
129
|
|
95
|
-
func (
|
96
|
-
if
|
97
|
-
return
|
130
|
+
func (x *MockMessage) GetHeight() uint32 {
|
131
|
+
if x != nil {
|
132
|
+
return x.Height
|
98
133
|
}
|
99
134
|
return 0
|
100
135
|
}
|
101
136
|
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
137
|
+
var File_internal_testdata_testdata_proto protoreflect.FileDescriptor
|
138
|
+
|
139
|
+
var file_internal_testdata_testdata_proto_rawDesc = []byte{
|
140
|
+
0x0a, 0x20, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x64,
|
141
|
+
0x61, 0x74, 0x61, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x70, 0x72, 0x6f,
|
142
|
+
0x74, 0x6f, 0x12, 0x17, 0x66, 0x65, 0x65, 0x64, 0x78, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e,
|
143
|
+
0x61, 0x6c, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x22, 0x70, 0x0a, 0x0b, 0x4d,
|
144
|
+
0x6f, 0x63, 0x6b, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61,
|
145
|
+
0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x35,
|
146
|
+
0x0a, 0x04, 0x65, 0x6e, 0x75, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x21, 0x2e, 0x66,
|
147
|
+
0x65, 0x65, 0x64, 0x78, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x74, 0x65,
|
148
|
+
0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x4d, 0x6f, 0x63, 0x6b, 0x45, 0x6e, 0x75, 0x6d, 0x52,
|
149
|
+
0x04, 0x65, 0x6e, 0x75, 0x6d, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18,
|
150
|
+
0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x2a, 0x22, 0x0a,
|
151
|
+
0x08, 0x4d, 0x6f, 0x63, 0x6b, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b,
|
152
|
+
0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x46, 0x49, 0x52, 0x53, 0x54, 0x10,
|
153
|
+
0x03, 0x42, 0x24, 0x5a, 0x22, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f,
|
154
|
+
0x66, 0x65, 0x65, 0x64, 0x78, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x74,
|
155
|
+
0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
156
|
+
}
|
157
|
+
|
158
|
+
var (
|
159
|
+
file_internal_testdata_testdata_proto_rawDescOnce sync.Once
|
160
|
+
file_internal_testdata_testdata_proto_rawDescData = file_internal_testdata_testdata_proto_rawDesc
|
161
|
+
)
|
162
|
+
|
163
|
+
func file_internal_testdata_testdata_proto_rawDescGZIP() []byte {
|
164
|
+
file_internal_testdata_testdata_proto_rawDescOnce.Do(func() {
|
165
|
+
file_internal_testdata_testdata_proto_rawDescData = protoimpl.X.CompressGZIP(file_internal_testdata_testdata_proto_rawDescData)
|
166
|
+
})
|
167
|
+
return file_internal_testdata_testdata_proto_rawDescData
|
168
|
+
}
|
169
|
+
|
170
|
+
var file_internal_testdata_testdata_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
|
171
|
+
var file_internal_testdata_testdata_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
|
172
|
+
var file_internal_testdata_testdata_proto_goTypes = []interface{}{
|
173
|
+
(MockEnum)(0), // 0: feedx.internal.testdata.MockEnum
|
174
|
+
(*MockMessage)(nil), // 1: feedx.internal.testdata.MockMessage
|
175
|
+
}
|
176
|
+
var file_internal_testdata_testdata_proto_depIdxs = []int32{
|
177
|
+
0, // 0: feedx.internal.testdata.MockMessage.enum:type_name -> feedx.internal.testdata.MockEnum
|
178
|
+
1, // [1:1] is the sub-list for method output_type
|
179
|
+
1, // [1:1] is the sub-list for method input_type
|
180
|
+
1, // [1:1] is the sub-list for extension type_name
|
181
|
+
1, // [1:1] is the sub-list for extension extendee
|
182
|
+
0, // [0:1] is the sub-list for field type_name
|
183
|
+
}
|
184
|
+
|
185
|
+
func init() { file_internal_testdata_testdata_proto_init() }
|
186
|
+
func file_internal_testdata_testdata_proto_init() {
|
187
|
+
if File_internal_testdata_testdata_proto != nil {
|
188
|
+
return
|
189
|
+
}
|
190
|
+
if !protoimpl.UnsafeEnabled {
|
191
|
+
file_internal_testdata_testdata_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
192
|
+
switch v := v.(*MockMessage); i {
|
193
|
+
case 0:
|
194
|
+
return &v.state
|
195
|
+
case 1:
|
196
|
+
return &v.sizeCache
|
197
|
+
case 2:
|
198
|
+
return &v.unknownFields
|
199
|
+
default:
|
200
|
+
return nil
|
201
|
+
}
|
202
|
+
}
|
203
|
+
}
|
204
|
+
type x struct{}
|
205
|
+
out := protoimpl.TypeBuilder{
|
206
|
+
File: protoimpl.DescBuilder{
|
207
|
+
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
208
|
+
RawDescriptor: file_internal_testdata_testdata_proto_rawDesc,
|
209
|
+
NumEnums: 1,
|
210
|
+
NumMessages: 1,
|
211
|
+
NumExtensions: 0,
|
212
|
+
NumServices: 0,
|
213
|
+
},
|
214
|
+
GoTypes: file_internal_testdata_testdata_proto_goTypes,
|
215
|
+
DependencyIndexes: file_internal_testdata_testdata_proto_depIdxs,
|
216
|
+
EnumInfos: file_internal_testdata_testdata_proto_enumTypes,
|
217
|
+
MessageInfos: file_internal_testdata_testdata_proto_msgTypes,
|
218
|
+
}.Build()
|
219
|
+
File_internal_testdata_testdata_proto = out.File
|
220
|
+
file_internal_testdata_testdata_proto_rawDesc = nil
|
221
|
+
file_internal_testdata_testdata_proto_goTypes = nil
|
222
|
+
file_internal_testdata_testdata_proto_depIdxs = nil
|
124
223
|
}
|