Update upstream source from tag 'upstream/1.3.2'
Update to upstream version '1.3.2'
with Debian dir 74ebbc0eb38ecd57e5c490b330112dfe205d20f2
Anthony Fok
4 years ago
0 | 0 | sudo: false |
1 | 1 | language: go |
2 | 2 | go: |
3 | - 1.6.x | |
3 | - 1.9.x | |
4 | 4 | - 1.10.x |
5 | - 1.11.x | |
5 | 6 | - 1.x |
6 | 7 | |
7 | 8 | install: |
8 | 9 | - go get -v -d google.golang.org/grpc |
9 | 10 | - go get -v -d -t github.com/golang/protobuf/... |
10 | - curl -L https://github.com/google/protobuf/releases/download/v3.5.1/protoc-3.5.1-linux-x86_64.zip -o /tmp/protoc.zip | |
11 | - curl -L https://github.com/google/protobuf/releases/download/v3.6.1/protoc-3.6.1-linux-x86_64.zip -o /tmp/protoc.zip | |
11 | 12 | - unzip /tmp/protoc.zip -d "$HOME"/protoc |
12 | 13 | - mkdir -p "$HOME"/src && ln -s "$HOME"/protoc "$HOME"/src/protobuf |
13 | 14 |
37 | 37 | go test ./... ./protoc-gen-go/testdata |
38 | 38 | go test -tags purego ./... ./protoc-gen-go/testdata |
39 | 39 | go build ./protoc-gen-go/testdata/grpc/grpc.pb.go |
40 | make -C conformance test | |
41 | 40 | |
42 | 41 | clean: |
43 | 42 | go clean ./... |
6 | 6 | Copyright 2010 The Go Authors. |
7 | 7 | https://github.com/golang/protobuf |
8 | 8 | |
9 | This package and the code it generates requires at least Go 1.6. | |
9 | This package and the code it generates requires at least Go 1.9. | |
10 | 10 | |
11 | 11 | This software implements Go bindings for protocol buffers. For |
12 | 12 | information about protocol buffers themselves, see |
23 | 23 | https://golang.org/doc/install |
24 | 24 | for details or, if you are using gccgo, follow the instructions at |
25 | 25 | https://golang.org/doc/install/gccgo |
26 | - Grab the code from the repository and install the proto package. | |
26 | - Grab the code from the repository and install the `proto` package. | |
27 | 27 | The simplest way is to run `go get -u github.com/golang/protobuf/protoc-gen-go`. |
28 | The compiler plugin, protoc-gen-go, will be installed in $GOBIN, | |
29 | defaulting to $GOPATH/bin. It must be in your $PATH for the protocol | |
30 | compiler, protoc, to find it. | |
28 | The compiler plugin, `protoc-gen-go`, will be installed in `$GOPATH/bin` | |
29 | unless `$GOBIN` is set. It must be in your `$PATH` for the protocol | |
30 | compiler, `protoc`, to find it. | |
31 | - If you need a particular version of `protoc-gen-go` (e.g., to match your | |
32 | `proto` package version), one option is | |
33 | ```shell | |
34 | GIT_TAG="v1.2.0" # change as needed | |
35 | go get -d -u github.com/golang/protobuf/protoc-gen-go | |
36 | git -C "$(go env GOPATH)"/src/github.com/golang/protobuf checkout $GIT_TAG | |
37 | go install github.com/golang/protobuf/protoc-gen-go | |
38 | ``` | |
31 | 39 | |
32 | 40 | This software has two parts: a 'protocol compiler plugin' that |
33 | 41 | generates Go source files that, once compiled, can access and manage |
0 | # Go support for Protocol Buffers - Google's data interchange format | |
1 | # | |
2 | # Copyright 2016 The Go Authors. All rights reserved. | |
3 | # https://github.com/golang/protobuf | |
4 | # | |
5 | # Redistribution and use in source and binary forms, with or without | |
6 | # modification, are permitted provided that the following conditions are | |
7 | # met: | |
8 | # | |
9 | # * Redistributions of source code must retain the above copyright | |
10 | # notice, this list of conditions and the following disclaimer. | |
11 | # * Redistributions in binary form must reproduce the above | |
12 | # copyright notice, this list of conditions and the following disclaimer | |
13 | # in the documentation and/or other materials provided with the | |
14 | # distribution. | |
15 | # * Neither the name of Google Inc. nor the names of its | |
16 | # contributors may be used to endorse or promote products derived from | |
17 | # this software without specific prior written permission. | |
18 | # | |
19 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | |
20 | # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | |
21 | # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | |
22 | # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | |
23 | # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | |
24 | # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | |
25 | # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | |
26 | # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | |
27 | # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | |
28 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | |
29 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |
30 | ||
31 | PROTOBUF_ROOT=$(HOME)/src/protobuf | |
32 | ||
33 | all: | |
34 | @echo To run the tests in this directory, acquire the main protobuf | |
35 | @echo distribution from: | |
36 | @echo | |
37 | @echo ' https://github.com/google/protobuf' | |
38 | @echo | |
39 | @echo Build the test runner with: | |
40 | @echo | |
41 | @echo ' cd conformance && make conformance-test-runner' | |
42 | @echo | |
43 | @echo And run the tests in this directory with: | |
44 | @echo | |
45 | @echo ' make test PROTOBUF_ROOT=<protobuf distribution>' | |
46 | ||
47 | test: | |
48 | ./test.sh $(PROTOBUF_ROOT) |
0 | // Go support for Protocol Buffers - Google's data interchange format | |
1 | // | |
2 | // Copyright 2016 The Go Authors. All rights reserved. | |
3 | // https://github.com/golang/protobuf | |
4 | // | |
5 | // Redistribution and use in source and binary forms, with or without | |
6 | // modification, are permitted provided that the following conditions are | |
7 | // met: | |
8 | // | |
9 | // * Redistributions of source code must retain the above copyright | |
10 | // notice, this list of conditions and the following disclaimer. | |
11 | // * Redistributions in binary form must reproduce the above | |
12 | // copyright notice, this list of conditions and the following disclaimer | |
13 | // in the documentation and/or other materials provided with the | |
14 | // distribution. | |
15 | // * Neither the name of Google Inc. nor the names of its | |
16 | // contributors may be used to endorse or promote products derived from | |
17 | // this software without specific prior written permission. | |
18 | // | |
19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | |
20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | |
21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | |
22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | |
23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | |
24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | |
25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | |
26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | |
27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | |
28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | |
29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |
30 | ||
31 | // conformance implements the conformance test subprocess protocol as | |
32 | // documented in conformance.proto. | |
33 | package main | |
34 | ||
35 | import ( | |
36 | "encoding/binary" | |
37 | "fmt" | |
38 | "io" | |
39 | "os" | |
40 | ||
41 | pb "github.com/golang/protobuf/conformance/internal/conformance_proto" | |
42 | "github.com/golang/protobuf/jsonpb" | |
43 | "github.com/golang/protobuf/proto" | |
44 | ) | |
45 | ||
46 | func main() { | |
47 | var sizeBuf [4]byte | |
48 | inbuf := make([]byte, 0, 4096) | |
49 | outbuf := proto.NewBuffer(nil) | |
50 | for { | |
51 | if _, err := io.ReadFull(os.Stdin, sizeBuf[:]); err == io.EOF { | |
52 | break | |
53 | } else if err != nil { | |
54 | fmt.Fprintln(os.Stderr, "go conformance: read request:", err) | |
55 | os.Exit(1) | |
56 | } | |
57 | size := binary.LittleEndian.Uint32(sizeBuf[:]) | |
58 | if int(size) > cap(inbuf) { | |
59 | inbuf = make([]byte, size) | |
60 | } | |
61 | inbuf = inbuf[:size] | |
62 | if _, err := io.ReadFull(os.Stdin, inbuf); err != nil { | |
63 | fmt.Fprintln(os.Stderr, "go conformance: read request:", err) | |
64 | os.Exit(1) | |
65 | } | |
66 | ||
67 | req := new(pb.ConformanceRequest) | |
68 | if err := proto.Unmarshal(inbuf, req); err != nil { | |
69 | fmt.Fprintln(os.Stderr, "go conformance: parse request:", err) | |
70 | os.Exit(1) | |
71 | } | |
72 | res := handle(req) | |
73 | ||
74 | if err := outbuf.Marshal(res); err != nil { | |
75 | fmt.Fprintln(os.Stderr, "go conformance: marshal response:", err) | |
76 | os.Exit(1) | |
77 | } | |
78 | binary.LittleEndian.PutUint32(sizeBuf[:], uint32(len(outbuf.Bytes()))) | |
79 | if _, err := os.Stdout.Write(sizeBuf[:]); err != nil { | |
80 | fmt.Fprintln(os.Stderr, "go conformance: write response:", err) | |
81 | os.Exit(1) | |
82 | } | |
83 | if _, err := os.Stdout.Write(outbuf.Bytes()); err != nil { | |
84 | fmt.Fprintln(os.Stderr, "go conformance: write response:", err) | |
85 | os.Exit(1) | |
86 | } | |
87 | outbuf.Reset() | |
88 | } | |
89 | } | |
90 | ||
91 | var jsonMarshaler = jsonpb.Marshaler{ | |
92 | OrigName: true, | |
93 | } | |
94 | ||
95 | func handle(req *pb.ConformanceRequest) *pb.ConformanceResponse { | |
96 | var err error | |
97 | var msg pb.TestAllTypes | |
98 | switch p := req.Payload.(type) { | |
99 | case *pb.ConformanceRequest_ProtobufPayload: | |
100 | err = proto.Unmarshal(p.ProtobufPayload, &msg) | |
101 | case *pb.ConformanceRequest_JsonPayload: | |
102 | err = jsonpb.UnmarshalString(p.JsonPayload, &msg) | |
103 | default: | |
104 | return &pb.ConformanceResponse{ | |
105 | Result: &pb.ConformanceResponse_RuntimeError{ | |
106 | RuntimeError: "unknown request payload type", | |
107 | }, | |
108 | } | |
109 | } | |
110 | if err != nil { | |
111 | return &pb.ConformanceResponse{ | |
112 | Result: &pb.ConformanceResponse_ParseError{ | |
113 | ParseError: err.Error(), | |
114 | }, | |
115 | } | |
116 | } | |
117 | switch req.RequestedOutputFormat { | |
118 | case pb.WireFormat_PROTOBUF: | |
119 | p, err := proto.Marshal(&msg) | |
120 | if err != nil { | |
121 | return &pb.ConformanceResponse{ | |
122 | Result: &pb.ConformanceResponse_SerializeError{ | |
123 | SerializeError: err.Error(), | |
124 | }, | |
125 | } | |
126 | } | |
127 | return &pb.ConformanceResponse{ | |
128 | Result: &pb.ConformanceResponse_ProtobufPayload{ | |
129 | ProtobufPayload: p, | |
130 | }, | |
131 | } | |
132 | case pb.WireFormat_JSON: | |
133 | p, err := jsonMarshaler.MarshalToString(&msg) | |
134 | if err != nil { | |
135 | return &pb.ConformanceResponse{ | |
136 | Result: &pb.ConformanceResponse_SerializeError{ | |
137 | SerializeError: err.Error(), | |
138 | }, | |
139 | } | |
140 | } | |
141 | return &pb.ConformanceResponse{ | |
142 | Result: &pb.ConformanceResponse_JsonPayload{ | |
143 | JsonPayload: p, | |
144 | }, | |
145 | } | |
146 | default: | |
147 | return &pb.ConformanceResponse{ | |
148 | Result: &pb.ConformanceResponse_RuntimeError{ | |
149 | RuntimeError: "unknown output format", | |
150 | }, | |
151 | } | |
152 | } | |
153 | } |
0 | # This is the list of conformance tests that are known ot fail right now. | |
1 | # TODO: These should be fixed. | |
2 | ||
3 | DurationProtoInputTooLarge.JsonOutput | |
4 | DurationProtoInputTooSmall.JsonOutput | |
5 | FieldMaskNumbersDontRoundTrip.JsonOutput | |
6 | FieldMaskPathsDontRoundTrip.JsonOutput | |
7 | FieldMaskTooManyUnderscore.JsonOutput | |
8 | JsonInput.AnyWithFieldMask.JsonOutput | |
9 | JsonInput.AnyWithFieldMask.ProtobufOutput | |
10 | JsonInput.DoubleFieldQuotedValue.JsonOutput | |
11 | JsonInput.DoubleFieldQuotedValue.ProtobufOutput | |
12 | JsonInput.DurationHas3FractionalDigits.Validator | |
13 | JsonInput.DurationHas6FractionalDigits.Validator | |
14 | JsonInput.DurationHas9FractionalDigits.Validator | |
15 | JsonInput.DurationHasZeroFractionalDigit.Validator | |
16 | JsonInput.DurationMaxValue.JsonOutput | |
17 | JsonInput.DurationMaxValue.ProtobufOutput | |
18 | JsonInput.DurationMinValue.JsonOutput | |
19 | JsonInput.DurationMinValue.ProtobufOutput | |
20 | JsonInput.EnumFieldUnknownValue.Validator | |
21 | JsonInput.FieldMask.JsonOutput | |
22 | JsonInput.FieldMask.ProtobufOutput | |
23 | JsonInput.FieldNameInLowerCamelCase.Validator | |
24 | JsonInput.FieldNameWithMixedCases.JsonOutput | |
25 | JsonInput.FieldNameWithMixedCases.ProtobufOutput | |
26 | JsonInput.FieldNameWithMixedCases.Validator | |
27 | JsonInput.FieldNameWithNumbers.Validator | |
28 | JsonInput.FloatFieldQuotedValue.JsonOutput | |
29 | JsonInput.FloatFieldQuotedValue.ProtobufOutput | |
30 | JsonInput.Int32FieldExponentialFormat.JsonOutput | |
31 | JsonInput.Int32FieldExponentialFormat.ProtobufOutput | |
32 | JsonInput.Int32FieldFloatTrailingZero.JsonOutput | |
33 | JsonInput.Int32FieldFloatTrailingZero.ProtobufOutput | |
34 | JsonInput.Int32FieldMaxFloatValue.JsonOutput | |
35 | JsonInput.Int32FieldMaxFloatValue.ProtobufOutput | |
36 | JsonInput.Int32FieldMinFloatValue.JsonOutput | |
37 | JsonInput.Int32FieldMinFloatValue.ProtobufOutput | |
38 | JsonInput.Int32FieldStringValue.JsonOutput | |
39 | JsonInput.Int32FieldStringValue.ProtobufOutput | |
40 | JsonInput.Int32FieldStringValueEscaped.JsonOutput | |
41 | JsonInput.Int32FieldStringValueEscaped.ProtobufOutput | |
42 | JsonInput.Int64FieldBeString.Validator | |
43 | JsonInput.MapFieldValueIsNull | |
44 | JsonInput.OneofFieldDuplicate | |
45 | JsonInput.RepeatedFieldMessageElementIsNull | |
46 | JsonInput.RepeatedFieldPrimitiveElementIsNull | |
47 | JsonInput.StringFieldSurrogateInWrongOrder | |
48 | JsonInput.StringFieldUnpairedHighSurrogate | |
49 | JsonInput.StringFieldUnpairedLowSurrogate | |
50 | JsonInput.TimestampHas3FractionalDigits.Validator | |
51 | JsonInput.TimestampHas6FractionalDigits.Validator | |
52 | JsonInput.TimestampHas9FractionalDigits.Validator | |
53 | JsonInput.TimestampHasZeroFractionalDigit.Validator | |
54 | JsonInput.TimestampJsonInputTooSmall | |
55 | JsonInput.TimestampZeroNormalized.Validator | |
56 | JsonInput.Uint32FieldMaxFloatValue.JsonOutput | |
57 | JsonInput.Uint32FieldMaxFloatValue.ProtobufOutput | |
58 | JsonInput.Uint64FieldBeString.Validator | |
59 | TimestampProtoInputTooLarge.JsonOutput | |
60 | TimestampProtoInputTooSmall.JsonOutput |
0 | // Code generated by protoc-gen-go. DO NOT EDIT. | |
1 | // source: conformance.proto | |
2 | ||
3 | package conformance | |
4 | ||
5 | import proto "github.com/golang/protobuf/proto" | |
6 | import fmt "fmt" | |
7 | import math "math" | |
8 | import any "github.com/golang/protobuf/ptypes/any" | |
9 | import duration "github.com/golang/protobuf/ptypes/duration" | |
10 | import _struct "github.com/golang/protobuf/ptypes/struct" | |
11 | import timestamp "github.com/golang/protobuf/ptypes/timestamp" | |
12 | import wrappers "github.com/golang/protobuf/ptypes/wrappers" | |
13 | import field_mask "google.golang.org/genproto/protobuf/field_mask" | |
14 | ||
15 | // Reference imports to suppress errors if they are not otherwise used. | |
16 | var _ = proto.Marshal | |
17 | var _ = fmt.Errorf | |
18 | var _ = math.Inf | |
19 | ||
20 | // This is a compile-time assertion to ensure that this generated file | |
21 | // is compatible with the proto package it is being compiled against. | |
22 | // A compilation error at this line likely means your copy of the | |
23 | // proto package needs to be updated. | |
24 | const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package | |
25 | ||
26 | type WireFormat int32 | |
27 | ||
28 | const ( | |
29 | WireFormat_UNSPECIFIED WireFormat = 0 | |
30 | WireFormat_PROTOBUF WireFormat = 1 | |
31 | WireFormat_JSON WireFormat = 2 | |
32 | ) | |
33 | ||
34 | var WireFormat_name = map[int32]string{ | |
35 | 0: "UNSPECIFIED", | |
36 | 1: "PROTOBUF", | |
37 | 2: "JSON", | |
38 | } | |
39 | var WireFormat_value = map[string]int32{ | |
40 | "UNSPECIFIED": 0, | |
41 | "PROTOBUF": 1, | |
42 | "JSON": 2, | |
43 | } | |
44 | ||
45 | func (x WireFormat) String() string { | |
46 | return proto.EnumName(WireFormat_name, int32(x)) | |
47 | } | |
48 | func (WireFormat) EnumDescriptor() ([]byte, []int) { | |
49 | return fileDescriptor_conformance_48ac832451f5d6c3, []int{0} | |
50 | } | |
51 | ||
52 | type ForeignEnum int32 | |
53 | ||
54 | const ( | |
55 | ForeignEnum_FOREIGN_FOO ForeignEnum = 0 | |
56 | ForeignEnum_FOREIGN_BAR ForeignEnum = 1 | |
57 | ForeignEnum_FOREIGN_BAZ ForeignEnum = 2 | |
58 | ) | |
59 | ||
60 | var ForeignEnum_name = map[int32]string{ | |
61 | 0: "FOREIGN_FOO", | |
62 | 1: "FOREIGN_BAR", | |
63 | 2: "FOREIGN_BAZ", | |
64 | } | |
65 | var ForeignEnum_value = map[string]int32{ | |
66 | "FOREIGN_FOO": 0, | |
67 | "FOREIGN_BAR": 1, | |
68 | "FOREIGN_BAZ": 2, | |
69 | } | |
70 | ||
71 | func (x ForeignEnum) String() string { | |
72 | return proto.EnumName(ForeignEnum_name, int32(x)) | |
73 | } | |
74 | func (ForeignEnum) EnumDescriptor() ([]byte, []int) { | |
75 | return fileDescriptor_conformance_48ac832451f5d6c3, []int{1} | |
76 | } | |
77 | ||
78 | type TestAllTypes_NestedEnum int32 | |
79 | ||
80 | const ( | |
81 | TestAllTypes_FOO TestAllTypes_NestedEnum = 0 | |
82 | TestAllTypes_BAR TestAllTypes_NestedEnum = 1 | |
83 | TestAllTypes_BAZ TestAllTypes_NestedEnum = 2 | |
84 | TestAllTypes_NEG TestAllTypes_NestedEnum = -1 | |
85 | ) | |
86 | ||
87 | var TestAllTypes_NestedEnum_name = map[int32]string{ | |
88 | 0: "FOO", | |
89 | 1: "BAR", | |
90 | 2: "BAZ", | |
91 | -1: "NEG", | |
92 | } | |
93 | var TestAllTypes_NestedEnum_value = map[string]int32{ | |
94 | "FOO": 0, | |
95 | "BAR": 1, | |
96 | "BAZ": 2, | |
97 | "NEG": -1, | |
98 | } | |
99 | ||
100 | func (x TestAllTypes_NestedEnum) String() string { | |
101 | return proto.EnumName(TestAllTypes_NestedEnum_name, int32(x)) | |
102 | } | |
103 | func (TestAllTypes_NestedEnum) EnumDescriptor() ([]byte, []int) { | |
104 | return fileDescriptor_conformance_48ac832451f5d6c3, []int{2, 0} | |
105 | } | |
106 | ||
107 | // Represents a single test case's input. The testee should: | |
108 | // | |
109 | // 1. parse this proto (which should always succeed) | |
110 | // 2. parse the protobuf or JSON payload in "payload" (which may fail) | |
111 | // 3. if the parse succeeded, serialize the message in the requested format. | |
112 | type ConformanceRequest struct { | |
113 | // The payload (whether protobuf of JSON) is always for a TestAllTypes proto | |
114 | // (see below). | |
115 | // | |
116 | // Types that are valid to be assigned to Payload: | |
117 | // *ConformanceRequest_ProtobufPayload | |
118 | // *ConformanceRequest_JsonPayload | |
119 | Payload isConformanceRequest_Payload `protobuf_oneof:"payload"` | |
120 | // Which format should the testee serialize its message to? | |
121 | RequestedOutputFormat WireFormat `protobuf:"varint,3,opt,name=requested_output_format,json=requestedOutputFormat,proto3,enum=conformance.WireFormat" json:"requested_output_format,omitempty"` | |
122 | XXX_NoUnkeyedLiteral struct{} `json:"-"` | |
123 | XXX_unrecognized []byte `json:"-"` | |
124 | XXX_sizecache int32 `json:"-"` | |
125 | } | |
126 | ||
127 | func (m *ConformanceRequest) Reset() { *m = ConformanceRequest{} } | |
128 | func (m *ConformanceRequest) String() string { return proto.CompactTextString(m) } | |
129 | func (*ConformanceRequest) ProtoMessage() {} | |
130 | func (*ConformanceRequest) Descriptor() ([]byte, []int) { | |
131 | return fileDescriptor_conformance_48ac832451f5d6c3, []int{0} | |
132 | } | |
133 | func (m *ConformanceRequest) XXX_Unmarshal(b []byte) error { | |
134 | return xxx_messageInfo_ConformanceRequest.Unmarshal(m, b) | |
135 | } | |
136 | func (m *ConformanceRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { | |
137 | return xxx_messageInfo_ConformanceRequest.Marshal(b, m, deterministic) | |
138 | } | |
139 | func (dst *ConformanceRequest) XXX_Merge(src proto.Message) { | |
140 | xxx_messageInfo_ConformanceRequest.Merge(dst, src) | |
141 | } | |
142 | func (m *ConformanceRequest) XXX_Size() int { | |
143 | return xxx_messageInfo_ConformanceRequest.Size(m) | |
144 | } | |
145 | func (m *ConformanceRequest) XXX_DiscardUnknown() { | |
146 | xxx_messageInfo_ConformanceRequest.DiscardUnknown(m) | |
147 | } | |
148 | ||
149 | var xxx_messageInfo_ConformanceRequest proto.InternalMessageInfo | |
150 | ||
151 | type isConformanceRequest_Payload interface { | |
152 | isConformanceRequest_Payload() | |
153 | } | |
154 | ||
155 | type ConformanceRequest_ProtobufPayload struct { | |
156 | ProtobufPayload []byte `protobuf:"bytes,1,opt,name=protobuf_payload,json=protobufPayload,proto3,oneof"` | |
157 | } | |
158 | ||
159 | type ConformanceRequest_JsonPayload struct { | |
160 | JsonPayload string `protobuf:"bytes,2,opt,name=json_payload,json=jsonPayload,proto3,oneof"` | |
161 | } | |
162 | ||
163 | func (*ConformanceRequest_ProtobufPayload) isConformanceRequest_Payload() {} | |
164 | ||
165 | func (*ConformanceRequest_JsonPayload) isConformanceRequest_Payload() {} | |
166 | ||
167 | func (m *ConformanceRequest) GetPayload() isConformanceRequest_Payload { | |
168 | if m != nil { | |
169 | return m.Payload | |
170 | } | |
171 | return nil | |
172 | } | |
173 | ||
174 | func (m *ConformanceRequest) GetProtobufPayload() []byte { | |
175 | if x, ok := m.GetPayload().(*ConformanceRequest_ProtobufPayload); ok { | |
176 | return x.ProtobufPayload | |
177 | } | |
178 | return nil | |
179 | } | |
180 | ||
181 | func (m *ConformanceRequest) GetJsonPayload() string { | |
182 | if x, ok := m.GetPayload().(*ConformanceRequest_JsonPayload); ok { | |
183 | return x.JsonPayload | |
184 | } | |
185 | return "" | |
186 | } | |
187 | ||
188 | func (m *ConformanceRequest) GetRequestedOutputFormat() WireFormat { | |
189 | if m != nil { | |
190 | return m.RequestedOutputFormat | |
191 | } | |
192 | return WireFormat_UNSPECIFIED | |
193 | } | |
194 | ||
195 | // XXX_OneofFuncs is for the internal use of the proto package. | |
196 | func (*ConformanceRequest) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { | |
197 | return _ConformanceRequest_OneofMarshaler, _ConformanceRequest_OneofUnmarshaler, _ConformanceRequest_OneofSizer, []interface{}{ | |
198 | (*ConformanceRequest_ProtobufPayload)(nil), | |
199 | (*ConformanceRequest_JsonPayload)(nil), | |
200 | } | |
201 | } | |
202 | ||
203 | func _ConformanceRequest_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { | |
204 | m := msg.(*ConformanceRequest) | |
205 | // payload | |
206 | switch x := m.Payload.(type) { | |
207 | case *ConformanceRequest_ProtobufPayload: | |
208 | b.EncodeVarint(1<<3 | proto.WireBytes) | |
209 | b.EncodeRawBytes(x.ProtobufPayload) | |
210 | case *ConformanceRequest_JsonPayload: | |
211 | b.EncodeVarint(2<<3 | proto.WireBytes) | |
212 | b.EncodeStringBytes(x.JsonPayload) | |
213 | case nil: | |
214 | default: | |
215 | return fmt.Errorf("ConformanceRequest.Payload has unexpected type %T", x) | |
216 | } | |
217 | return nil | |
218 | } | |
219 | ||
220 | func _ConformanceRequest_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { | |
221 | m := msg.(*ConformanceRequest) | |
222 | switch tag { | |
223 | case 1: // payload.protobuf_payload | |
224 | if wire != proto.WireBytes { | |
225 | return true, proto.ErrInternalBadWireType | |
226 | } | |
227 | x, err := b.DecodeRawBytes(true) | |
228 | m.Payload = &ConformanceRequest_ProtobufPayload{x} | |
229 | return true, err | |
230 | case 2: // payload.json_payload | |
231 | if wire != proto.WireBytes { | |
232 | return true, proto.ErrInternalBadWireType | |
233 | } | |
234 | x, err := b.DecodeStringBytes() | |
235 | m.Payload = &ConformanceRequest_JsonPayload{x} | |
236 | return true, err | |
237 | default: | |
238 | return false, nil | |
239 | } | |
240 | } | |
241 | ||
242 | func _ConformanceRequest_OneofSizer(msg proto.Message) (n int) { | |
243 | m := msg.(*ConformanceRequest) | |
244 | // payload | |
245 | switch x := m.Payload.(type) { | |
246 | case *ConformanceRequest_ProtobufPayload: | |
247 | n += 1 // tag and wire | |
248 | n += proto.SizeVarint(uint64(len(x.ProtobufPayload))) | |
249 | n += len(x.ProtobufPayload) | |
250 | case *ConformanceRequest_JsonPayload: | |
251 | n += 1 // tag and wire | |
252 | n += proto.SizeVarint(uint64(len(x.JsonPayload))) | |
253 | n += len(x.JsonPayload) | |
254 | case nil: | |
255 | default: | |
256 | panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) | |
257 | } | |
258 | return n | |
259 | } | |
260 | ||
261 | // Represents a single test case's output. | |
262 | type ConformanceResponse struct { | |
263 | // Types that are valid to be assigned to Result: | |
264 | // *ConformanceResponse_ParseError | |
265 | // *ConformanceResponse_SerializeError | |
266 | // *ConformanceResponse_RuntimeError | |
267 | // *ConformanceResponse_ProtobufPayload | |
268 | // *ConformanceResponse_JsonPayload | |
269 | // *ConformanceResponse_Skipped | |
270 | Result isConformanceResponse_Result `protobuf_oneof:"result"` | |
271 | XXX_NoUnkeyedLiteral struct{} `json:"-"` | |
272 | XXX_unrecognized []byte `json:"-"` | |
273 | XXX_sizecache int32 `json:"-"` | |
274 | } | |
275 | ||
276 | func (m *ConformanceResponse) Reset() { *m = ConformanceResponse{} } | |
277 | func (m *ConformanceResponse) String() string { return proto.CompactTextString(m) } | |
278 | func (*ConformanceResponse) ProtoMessage() {} | |
279 | func (*ConformanceResponse) Descriptor() ([]byte, []int) { | |
280 | return fileDescriptor_conformance_48ac832451f5d6c3, []int{1} | |
281 | } | |
282 | func (m *ConformanceResponse) XXX_Unmarshal(b []byte) error { | |
283 | return xxx_messageInfo_ConformanceResponse.Unmarshal(m, b) | |
284 | } | |
285 | func (m *ConformanceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { | |
286 | return xxx_messageInfo_ConformanceResponse.Marshal(b, m, deterministic) | |
287 | } | |
288 | func (dst *ConformanceResponse) XXX_Merge(src proto.Message) { | |
289 | xxx_messageInfo_ConformanceResponse.Merge(dst, src) | |
290 | } | |
291 | func (m *ConformanceResponse) XXX_Size() int { | |
292 | return xxx_messageInfo_ConformanceResponse.Size(m) | |
293 | } | |
294 | func (m *ConformanceResponse) XXX_DiscardUnknown() { | |
295 | xxx_messageInfo_ConformanceResponse.DiscardUnknown(m) | |
296 | } | |
297 | ||
298 | var xxx_messageInfo_ConformanceResponse proto.InternalMessageInfo | |
299 | ||
300 | type isConformanceResponse_Result interface { | |
301 | isConformanceResponse_Result() | |
302 | } | |
303 | ||
304 | type ConformanceResponse_ParseError struct { | |
305 | ParseError string `protobuf:"bytes,1,opt,name=parse_error,json=parseError,proto3,oneof"` | |
306 | } | |
307 | ||
308 | type ConformanceResponse_SerializeError struct { | |
309 | SerializeError string `protobuf:"bytes,6,opt,name=serialize_error,json=serializeError,proto3,oneof"` | |
310 | } | |
311 | ||
312 | type ConformanceResponse_RuntimeError struct { | |
313 | RuntimeError string `protobuf:"bytes,2,opt,name=runtime_error,json=runtimeError,proto3,oneof"` | |
314 | } | |
315 | ||
316 | type ConformanceResponse_ProtobufPayload struct { | |
317 | ProtobufPayload []byte `protobuf:"bytes,3,opt,name=protobuf_payload,json=protobufPayload,proto3,oneof"` | |
318 | } | |
319 | ||
320 | type ConformanceResponse_JsonPayload struct { | |
321 | JsonPayload string `protobuf:"bytes,4,opt,name=json_payload,json=jsonPayload,proto3,oneof"` | |
322 | } | |
323 | ||
324 | type ConformanceResponse_Skipped struct { | |
325 | Skipped string `protobuf:"bytes,5,opt,name=skipped,proto3,oneof"` | |
326 | } | |
327 | ||
328 | func (*ConformanceResponse_ParseError) isConformanceResponse_Result() {} | |
329 | ||
330 | func (*ConformanceResponse_SerializeError) isConformanceResponse_Result() {} | |
331 | ||
332 | func (*ConformanceResponse_RuntimeError) isConformanceResponse_Result() {} | |
333 | ||
334 | func (*ConformanceResponse_ProtobufPayload) isConformanceResponse_Result() {} | |
335 | ||
336 | func (*ConformanceResponse_JsonPayload) isConformanceResponse_Result() {} | |
337 | ||
338 | func (*ConformanceResponse_Skipped) isConformanceResponse_Result() {} | |
339 | ||
340 | func (m *ConformanceResponse) GetResult() isConformanceResponse_Result { | |
341 | if m != nil { | |
342 | return m.Result | |
343 | } | |
344 | return nil | |
345 | } | |
346 | ||
347 | func (m *ConformanceResponse) GetParseError() string { | |
348 | if x, ok := m.GetResult().(*ConformanceResponse_ParseError); ok { | |
349 | return x.ParseError | |
350 | } | |
351 | return "" | |
352 | } | |
353 | ||
354 | func (m *ConformanceResponse) GetSerializeError() string { | |
355 | if x, ok := m.GetResult().(*ConformanceResponse_SerializeError); ok { | |
356 | return x.SerializeError | |
357 | } | |
358 | return "" | |
359 | } | |
360 | ||
361 | func (m *ConformanceResponse) GetRuntimeError() string { | |
362 | if x, ok := m.GetResult().(*ConformanceResponse_RuntimeError); ok { | |
363 | return x.RuntimeError | |
364 | } | |
365 | return "" | |
366 | } | |
367 | ||
368 | func (m *ConformanceResponse) GetProtobufPayload() []byte { | |
369 | if x, ok := m.GetResult().(*ConformanceResponse_ProtobufPayload); ok { | |
370 | return x.ProtobufPayload | |
371 | } | |
372 | return nil | |
373 | } | |
374 | ||
375 | func (m *ConformanceResponse) GetJsonPayload() string { | |
376 | if x, ok := m.GetResult().(*ConformanceResponse_JsonPayload); ok { | |
377 | return x.JsonPayload | |
378 | } | |
379 | return "" | |
380 | } | |
381 | ||
382 | func (m *ConformanceResponse) GetSkipped() string { | |
383 | if x, ok := m.GetResult().(*ConformanceResponse_Skipped); ok { | |
384 | return x.Skipped | |
385 | } | |
386 | return "" | |
387 | } | |
388 | ||
389 | // XXX_OneofFuncs is for the internal use of the proto package. | |
390 | func (*ConformanceResponse) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { | |
391 | return _ConformanceResponse_OneofMarshaler, _ConformanceResponse_OneofUnmarshaler, _ConformanceResponse_OneofSizer, []interface{}{ | |
392 | (*ConformanceResponse_ParseError)(nil), | |
393 | (*ConformanceResponse_SerializeError)(nil), | |
394 | (*ConformanceResponse_RuntimeError)(nil), | |
395 | (*ConformanceResponse_ProtobufPayload)(nil), | |
396 | (*ConformanceResponse_JsonPayload)(nil), | |
397 | (*ConformanceResponse_Skipped)(nil), | |
398 | } | |
399 | } | |
400 | ||
401 | func _ConformanceResponse_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { | |
402 | m := msg.(*ConformanceResponse) | |
403 | // result | |
404 | switch x := m.Result.(type) { | |
405 | case *ConformanceResponse_ParseError: | |
406 | b.EncodeVarint(1<<3 | proto.WireBytes) | |
407 | b.EncodeStringBytes(x.ParseError) | |
408 | case *ConformanceResponse_SerializeError: | |
409 | b.EncodeVarint(6<<3 | proto.WireBytes) | |
410 | b.EncodeStringBytes(x.SerializeError) | |
411 | case *ConformanceResponse_RuntimeError: | |
412 | b.EncodeVarint(2<<3 | proto.WireBytes) | |
413 | b.EncodeStringBytes(x.RuntimeError) | |
414 | case *ConformanceResponse_ProtobufPayload: | |
415 | b.EncodeVarint(3<<3 | proto.WireBytes) | |
416 | b.EncodeRawBytes(x.ProtobufPayload) | |
417 | case *ConformanceResponse_JsonPayload: | |
418 | b.EncodeVarint(4<<3 | proto.WireBytes) | |
419 | b.EncodeStringBytes(x.JsonPayload) | |
420 | case *ConformanceResponse_Skipped: | |
421 | b.EncodeVarint(5<<3 | proto.WireBytes) | |
422 | b.EncodeStringBytes(x.Skipped) | |
423 | case nil: | |
424 | default: | |
425 | return fmt.Errorf("ConformanceResponse.Result has unexpected type %T", x) | |
426 | } | |
427 | return nil | |
428 | } | |
429 | ||
430 | func _ConformanceResponse_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { | |
431 | m := msg.(*ConformanceResponse) | |
432 | switch tag { | |
433 | case 1: // result.parse_error | |
434 | if wire != proto.WireBytes { | |
435 | return true, proto.ErrInternalBadWireType | |
436 | } | |
437 | x, err := b.DecodeStringBytes() | |
438 | m.Result = &ConformanceResponse_ParseError{x} | |
439 | return true, err | |
440 | case 6: // result.serialize_error | |
441 | if wire != proto.WireBytes { | |
442 | return true, proto.ErrInternalBadWireType | |
443 | } | |
444 | x, err := b.DecodeStringBytes() | |
445 | m.Result = &ConformanceResponse_SerializeError{x} | |
446 | return true, err | |
447 | case 2: // result.runtime_error | |
448 | if wire != proto.WireBytes { | |
449 | return true, proto.ErrInternalBadWireType | |
450 | } | |
451 | x, err := b.DecodeStringBytes() | |
452 | m.Result = &ConformanceResponse_RuntimeError{x} | |
453 | return true, err | |
454 | case 3: // result.protobuf_payload | |
455 | if wire != proto.WireBytes { | |
456 | return true, proto.ErrInternalBadWireType | |
457 | } | |
458 | x, err := b.DecodeRawBytes(true) | |
459 | m.Result = &ConformanceResponse_ProtobufPayload{x} | |
460 | return true, err | |
461 | case 4: // result.json_payload | |
462 | if wire != proto.WireBytes { | |
463 | return true, proto.ErrInternalBadWireType | |
464 | } | |
465 | x, err := b.DecodeStringBytes() | |
466 | m.Result = &ConformanceResponse_JsonPayload{x} | |
467 | return true, err | |
468 | case 5: // result.skipped | |
469 | if wire != proto.WireBytes { | |
470 | return true, proto.ErrInternalBadWireType | |
471 | } | |
472 | x, err := b.DecodeStringBytes() | |
473 | m.Result = &ConformanceResponse_Skipped{x} | |
474 | return true, err | |
475 | default: | |
476 | return false, nil | |
477 | } | |
478 | } | |
479 | ||
480 | func _ConformanceResponse_OneofSizer(msg proto.Message) (n int) { | |
481 | m := msg.(*ConformanceResponse) | |
482 | // result | |
483 | switch x := m.Result.(type) { | |
484 | case *ConformanceResponse_ParseError: | |
485 | n += 1 // tag and wire | |
486 | n += proto.SizeVarint(uint64(len(x.ParseError))) | |
487 | n += len(x.ParseError) | |
488 | case *ConformanceResponse_SerializeError: | |
489 | n += 1 // tag and wire | |
490 | n += proto.SizeVarint(uint64(len(x.SerializeError))) | |
491 | n += len(x.SerializeError) | |
492 | case *ConformanceResponse_RuntimeError: | |
493 | n += 1 // tag and wire | |
494 | n += proto.SizeVarint(uint64(len(x.RuntimeError))) | |
495 | n += len(x.RuntimeError) | |
496 | case *ConformanceResponse_ProtobufPayload: | |
497 | n += 1 // tag and wire | |
498 | n += proto.SizeVarint(uint64(len(x.ProtobufPayload))) | |
499 | n += len(x.ProtobufPayload) | |
500 | case *ConformanceResponse_JsonPayload: | |
501 | n += 1 // tag and wire | |
502 | n += proto.SizeVarint(uint64(len(x.JsonPayload))) | |
503 | n += len(x.JsonPayload) | |
504 | case *ConformanceResponse_Skipped: | |
505 | n += 1 // tag and wire | |
506 | n += proto.SizeVarint(uint64(len(x.Skipped))) | |
507 | n += len(x.Skipped) | |
508 | case nil: | |
509 | default: | |
510 | panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) | |
511 | } | |
512 | return n | |
513 | } | |
514 | ||
515 | // This proto includes every type of field in both singular and repeated | |
516 | // forms. | |
517 | type TestAllTypes struct { | |
518 | // Singular | |
519 | OptionalInt32 int32 `protobuf:"varint,1,opt,name=optional_int32,json=optionalInt32,proto3" json:"optional_int32,omitempty"` | |
520 | OptionalInt64 int64 `protobuf:"varint,2,opt,name=optional_int64,json=optionalInt64,proto3" json:"optional_int64,omitempty"` | |
521 | OptionalUint32 uint32 `protobuf:"varint,3,opt,name=optional_uint32,json=optionalUint32,proto3" json:"optional_uint32,omitempty"` | |
522 | OptionalUint64 uint64 `protobuf:"varint,4,opt,name=optional_uint64,json=optionalUint64,proto3" json:"optional_uint64,omitempty"` | |
523 | OptionalSint32 int32 `protobuf:"zigzag32,5,opt,name=optional_sint32,json=optionalSint32,proto3" json:"optional_sint32,omitempty"` | |
524 | OptionalSint64 int64 `protobuf:"zigzag64,6,opt,name=optional_sint64,json=optionalSint64,proto3" json:"optional_sint64,omitempty"` | |
525 | OptionalFixed32 uint32 `protobuf:"fixed32,7,opt,name=optional_fixed32,json=optionalFixed32,proto3" json:"optional_fixed32,omitempty"` | |
526 | OptionalFixed64 uint64 `protobuf:"fixed64,8,opt,name=optional_fixed64,json=optionalFixed64,proto3" json:"optional_fixed64,omitempty"` | |
527 | OptionalSfixed32 int32 `protobuf:"fixed32,9,opt,name=optional_sfixed32,json=optionalSfixed32,proto3" json:"optional_sfixed32,omitempty"` | |
528 | OptionalSfixed64 int64 `protobuf:"fixed64,10,opt,name=optional_sfixed64,json=optionalSfixed64,proto3" json:"optional_sfixed64,omitempty"` | |
529 | OptionalFloat float32 `protobuf:"fixed32,11,opt,name=optional_float,json=optionalFloat,proto3" json:"optional_float,omitempty"` | |
530 | OptionalDouble float64 `protobuf:"fixed64,12,opt,name=optional_double,json=optionalDouble,proto3" json:"optional_double,omitempty"` | |
531 | OptionalBool bool `protobuf:"varint,13,opt,name=optional_bool,json=optionalBool,proto3" json:"optional_bool,omitempty"` | |
532 | OptionalString string `protobuf:"bytes,14,opt,name=optional_string,json=optionalString,proto3" json:"optional_string,omitempty"` | |
533 | OptionalBytes []byte `protobuf:"bytes,15,opt,name=optional_bytes,json=optionalBytes,proto3" json:"optional_bytes,omitempty"` | |
534 | OptionalNestedMessage *TestAllTypes_NestedMessage `protobuf:"bytes,18,opt,name=optional_nested_message,json=optionalNestedMessage,proto3" json:"optional_nested_message,omitempty"` | |
535 | OptionalForeignMessage *ForeignMessage `protobuf:"bytes,19,opt,name=optional_foreign_message,json=optionalForeignMessage,proto3" json:"optional_foreign_message,omitempty"` | |
536 | OptionalNestedEnum TestAllTypes_NestedEnum `protobuf:"varint,21,opt,name=optional_nested_enum,json=optionalNestedEnum,proto3,enum=conformance.TestAllTypes_NestedEnum" json:"optional_nested_enum,omitempty"` | |
537 | OptionalForeignEnum ForeignEnum `protobuf:"varint,22,opt,name=optional_foreign_enum,json=optionalForeignEnum,proto3,enum=conformance.ForeignEnum" json:"optional_foreign_enum,omitempty"` | |
538 | OptionalStringPiece string `protobuf:"bytes,24,opt,name=optional_string_piece,json=optionalStringPiece,proto3" json:"optional_string_piece,omitempty"` | |
539 | OptionalCord string `protobuf:"bytes,25,opt,name=optional_cord,json=optionalCord,proto3" json:"optional_cord,omitempty"` | |
540 | RecursiveMessage *TestAllTypes `protobuf:"bytes,27,opt,name=recursive_message,json=recursiveMessage,proto3" json:"recursive_message,omitempty"` | |
541 | // Repeated | |
542 | RepeatedInt32 []int32 `protobuf:"varint,31,rep,packed,name=repeated_int32,json=repeatedInt32,proto3" json:"repeated_int32,omitempty"` | |
543 | RepeatedInt64 []int64 `protobuf:"varint,32,rep,packed,name=repeated_int64,json=repeatedInt64,proto3" json:"repeated_int64,omitempty"` | |
544 | RepeatedUint32 []uint32 `protobuf:"varint,33,rep,packed,name=repeated_uint32,json=repeatedUint32,proto3" json:"repeated_uint32,omitempty"` | |
545 | RepeatedUint64 []uint64 `protobuf:"varint,34,rep,packed,name=repeated_uint64,json=repeatedUint64,proto3" json:"repeated_uint64,omitempty"` | |
546 | RepeatedSint32 []int32 `protobuf:"zigzag32,35,rep,packed,name=repeated_sint32,json=repeatedSint32,proto3" json:"repeated_sint32,omitempty"` | |
547 | RepeatedSint64 []int64 `protobuf:"zigzag64,36,rep,packed,name=repeated_sint64,json=repeatedSint64,proto3" json:"repeated_sint64,omitempty"` | |
548 | RepeatedFixed32 []uint32 `protobuf:"fixed32,37,rep,packed,name=repeated_fixed32,json=repeatedFixed32,proto3" json:"repeated_fixed32,omitempty"` | |
549 | RepeatedFixed64 []uint64 `protobuf:"fixed64,38,rep,packed,name=repeated_fixed64,json=repeatedFixed64,proto3" json:"repeated_fixed64,omitempty"` | |
550 | RepeatedSfixed32 []int32 `protobuf:"fixed32,39,rep,packed,name=repeated_sfixed32,json=repeatedSfixed32,proto3" json:"repeated_sfixed32,omitempty"` | |
551 | RepeatedSfixed64 []int64 `protobuf:"fixed64,40,rep,packed,name=repeated_sfixed64,json=repeatedSfixed64,proto3" json:"repeated_sfixed64,omitempty"` | |
552 | RepeatedFloat []float32 `protobuf:"fixed32,41,rep,packed,name=repeated_float,json=repeatedFloat,proto3" json:"repeated_float,omitempty"` | |
553 | RepeatedDouble []float64 `protobuf:"fixed64,42,rep,packed,name=repeated_double,json=repeatedDouble,proto3" json:"repeated_double,omitempty"` | |
554 | RepeatedBool []bool `protobuf:"varint,43,rep,packed,name=repeated_bool,json=repeatedBool,proto3" json:"repeated_bool,omitempty"` | |
555 | RepeatedString []string `protobuf:"bytes,44,rep,name=repeated_string,json=repeatedString,proto3" json:"repeated_string,omitempty"` | |
556 | RepeatedBytes [][]byte `protobuf:"bytes,45,rep,name=repeated_bytes,json=repeatedBytes,proto3" json:"repeated_bytes,omitempty"` | |
557 | RepeatedNestedMessage []*TestAllTypes_NestedMessage `protobuf:"bytes,48,rep,name=repeated_nested_message,json=repeatedNestedMessage,proto3" json:"repeated_nested_message,omitempty"` | |
558 | RepeatedForeignMessage []*ForeignMessage `protobuf:"bytes,49,rep,name=repeated_foreign_message,json=repeatedForeignMessage,proto3" json:"repeated_foreign_message,omitempty"` | |
559 | RepeatedNestedEnum []TestAllTypes_NestedEnum `protobuf:"varint,51,rep,packed,name=repeated_nested_enum,json=repeatedNestedEnum,proto3,enum=conformance.TestAllTypes_NestedEnum" json:"repeated_nested_enum,omitempty"` | |
560 | RepeatedForeignEnum []ForeignEnum `protobuf:"varint,52,rep,packed,name=repeated_foreign_enum,json=repeatedForeignEnum,proto3,enum=conformance.ForeignEnum" json:"repeated_foreign_enum,omitempty"` | |
561 | RepeatedStringPiece []string `protobuf:"bytes,54,rep,name=repeated_string_piece,json=repeatedStringPiece,proto3" json:"repeated_string_piece,omitempty"` | |
562 | RepeatedCord []string `protobuf:"bytes,55,rep,name=repeated_cord,json=repeatedCord,proto3" json:"repeated_cord,omitempty"` | |
563 | // Map | |
564 | MapInt32Int32 map[int32]int32 `protobuf:"bytes,56,rep,name=map_int32_int32,json=mapInt32Int32,proto3" json:"map_int32_int32,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` | |
565 | MapInt64Int64 map[int64]int64 `protobuf:"bytes,57,rep,name=map_int64_int64,json=mapInt64Int64,proto3" json:"map_int64_int64,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` | |
566 | MapUint32Uint32 map[uint32]uint32 `protobuf:"bytes,58,rep,name=map_uint32_uint32,json=mapUint32Uint32,proto3" json:"map_uint32_uint32,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` | |
567 | MapUint64Uint64 map[uint64]uint64 `protobuf:"bytes,59,rep,name=map_uint64_uint64,json=mapUint64Uint64,proto3" json:"map_uint64_uint64,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` | |
568 | MapSint32Sint32 map[int32]int32 `protobuf:"bytes,60,rep,name=map_sint32_sint32,json=mapSint32Sint32,proto3" json:"map_sint32_sint32,omitempty" protobuf_key:"zigzag32,1,opt,name=key,proto3" protobuf_val:"zigzag32,2,opt,name=value,proto3"` | |
569 | MapSint64Sint64 map[int64]int64 `protobuf:"bytes,61,rep,name=map_sint64_sint64,json=mapSint64Sint64,proto3" json:"map_sint64_sint64,omitempty" protobuf_key:"zigzag64,1,opt,name=key,proto3" protobuf_val:"zigzag64,2,opt,name=value,proto3"` | |
570 | MapFixed32Fixed32 map[uint32]uint32 `protobuf:"bytes,62,rep,name=map_fixed32_fixed32,json=mapFixed32Fixed32,proto3" json:"map_fixed32_fixed32,omitempty" protobuf_key:"fixed32,1,opt,name=key,proto3" protobuf_val:"fixed32,2,opt,name=value,proto3"` | |
571 | MapFixed64Fixed64 map[uint64]uint64 `protobuf:"bytes,63,rep,name=map_fixed64_fixed64,json=mapFixed64Fixed64,proto3" json:"map_fixed64_fixed64,omitempty" protobuf_key:"fixed64,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` | |
572 | MapSfixed32Sfixed32 map[int32]int32 `protobuf:"bytes,64,rep,name=map_sfixed32_sfixed32,json=mapSfixed32Sfixed32,proto3" json:"map_sfixed32_sfixed32,omitempty" protobuf_key:"fixed32,1,opt,name=key,proto3" protobuf_val:"fixed32,2,opt,name=value,proto3"` | |
573 | MapSfixed64Sfixed64 map[int64]int64 `protobuf:"bytes,65,rep,name=map_sfixed64_sfixed64,json=mapSfixed64Sfixed64,proto3" json:"map_sfixed64_sfixed64,omitempty" protobuf_key:"fixed64,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` | |
574 | MapInt32Float map[int32]float32 `protobuf:"bytes,66,rep,name=map_int32_float,json=mapInt32Float,proto3" json:"map_int32_float,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"fixed32,2,opt,name=value,proto3"` | |
575 | MapInt32Double map[int32]float64 `protobuf:"bytes,67,rep,name=map_int32_double,json=mapInt32Double,proto3" json:"map_int32_double,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` | |
576 | MapBoolBool map[bool]bool `protobuf:"bytes,68,rep,name=map_bool_bool,json=mapBoolBool,proto3" json:"map_bool_bool,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` | |
577 | MapStringString map[string]string `protobuf:"bytes,69,rep,name=map_string_string,json=mapStringString,proto3" json:"map_string_string,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` | |
578 | MapStringBytes map[string][]byte `protobuf:"bytes,70,rep,name=map_string_bytes,json=mapStringBytes,proto3" json:"map_string_bytes,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` | |
579 | MapStringNestedMessage map[string]*TestAllTypes_NestedMessage `protobuf:"bytes,71,rep,name=map_string_nested_message,json=mapStringNestedMessage,proto3" json:"map_string_nested_message,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` | |
580 | MapStringForeignMessage map[string]*ForeignMessage `protobuf:"bytes,72,rep,name=map_string_foreign_message,json=mapStringForeignMessage,proto3" json:"map_string_foreign_message,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` | |
581 | MapStringNestedEnum map[string]TestAllTypes_NestedEnum `protobuf:"bytes,73,rep,name=map_string_nested_enum,json=mapStringNestedEnum,proto3" json:"map_string_nested_enum,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3,enum=conformance.TestAllTypes_NestedEnum"` | |
582 | MapStringForeignEnum map[string]ForeignEnum `protobuf:"bytes,74,rep,name=map_string_foreign_enum,json=mapStringForeignEnum,proto3" json:"map_string_foreign_enum,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3,enum=conformance.ForeignEnum"` | |
583 | // Types that are valid to be assigned to OneofField: | |
584 | // *TestAllTypes_OneofUint32 | |
585 | // *TestAllTypes_OneofNestedMessage | |
586 | // *TestAllTypes_OneofString | |
587 | // *TestAllTypes_OneofBytes | |
588 | OneofField isTestAllTypes_OneofField `protobuf_oneof:"oneof_field"` | |
589 | // Well-known types | |
590 | OptionalBoolWrapper *wrappers.BoolValue `protobuf:"bytes,201,opt,name=optional_bool_wrapper,json=optionalBoolWrapper,proto3" json:"optional_bool_wrapper,omitempty"` | |
591 | OptionalInt32Wrapper *wrappers.Int32Value `protobuf:"bytes,202,opt,name=optional_int32_wrapper,json=optionalInt32Wrapper,proto3" json:"optional_int32_wrapper,omitempty"` | |
592 | OptionalInt64Wrapper *wrappers.Int64Value `protobuf:"bytes,203,opt,name=optional_int64_wrapper,json=optionalInt64Wrapper,proto3" json:"optional_int64_wrapper,omitempty"` | |
593 | OptionalUint32Wrapper *wrappers.UInt32Value `protobuf:"bytes,204,opt,name=optional_uint32_wrapper,json=optionalUint32Wrapper,proto3" json:"optional_uint32_wrapper,omitempty"` | |
594 | OptionalUint64Wrapper *wrappers.UInt64Value `protobuf:"bytes,205,opt,name=optional_uint64_wrapper,json=optionalUint64Wrapper,proto3" json:"optional_uint64_wrapper,omitempty"` | |
595 | OptionalFloatWrapper *wrappers.FloatValue `protobuf:"bytes,206,opt,name=optional_float_wrapper,json=optionalFloatWrapper,proto3" json:"optional_float_wrapper,omitempty"` | |
596 | OptionalDoubleWrapper *wrappers.DoubleValue `protobuf:"bytes,207,opt,name=optional_double_wrapper,json=optionalDoubleWrapper,proto3" json:"optional_double_wrapper,omitempty"` | |
597 | OptionalStringWrapper *wrappers.StringValue `protobuf:"bytes,208,opt,name=optional_string_wrapper,json=optionalStringWrapper,proto3" json:"optional_string_wrapper,omitempty"` | |
598 | OptionalBytesWrapper *wrappers.BytesValue `protobuf:"bytes,209,opt,name=optional_bytes_wrapper,json=optionalBytesWrapper,proto3" json:"optional_bytes_wrapper,omitempty"` | |
599 | RepeatedBoolWrapper []*wrappers.BoolValue `protobuf:"bytes,211,rep,name=repeated_bool_wrapper,json=repeatedBoolWrapper,proto3" json:"repeated_bool_wrapper,omitempty"` | |
600 | RepeatedInt32Wrapper []*wrappers.Int32Value `protobuf:"bytes,212,rep,name=repeated_int32_wrapper,json=repeatedInt32Wrapper,proto3" json:"repeated_int32_wrapper,omitempty"` | |
601 | RepeatedInt64Wrapper []*wrappers.Int64Value `protobuf:"bytes,213,rep,name=repeated_int64_wrapper,json=repeatedInt64Wrapper,proto3" json:"repeated_int64_wrapper,omitempty"` | |
602 | RepeatedUint32Wrapper []*wrappers.UInt32Value `protobuf:"bytes,214,rep,name=repeated_uint32_wrapper,json=repeatedUint32Wrapper,proto3" json:"repeated_uint32_wrapper,omitempty"` | |
603 | RepeatedUint64Wrapper []*wrappers.UInt64Value `protobuf:"bytes,215,rep,name=repeated_uint64_wrapper,json=repeatedUint64Wrapper,proto3" json:"repeated_uint64_wrapper,omitempty"` | |
604 | RepeatedFloatWrapper []*wrappers.FloatValue `protobuf:"bytes,216,rep,name=repeated_float_wrapper,json=repeatedFloatWrapper,proto3" json:"repeated_float_wrapper,omitempty"` | |
605 | RepeatedDoubleWrapper []*wrappers.DoubleValue `protobuf:"bytes,217,rep,name=repeated_double_wrapper,json=repeatedDoubleWrapper,proto3" json:"repeated_double_wrapper,omitempty"` | |
606 | RepeatedStringWrapper []*wrappers.StringValue `protobuf:"bytes,218,rep,name=repeated_string_wrapper,json=repeatedStringWrapper,proto3" json:"repeated_string_wrapper,omitempty"` | |
607 | RepeatedBytesWrapper []*wrappers.BytesValue `protobuf:"bytes,219,rep,name=repeated_bytes_wrapper,json=repeatedBytesWrapper,proto3" json:"repeated_bytes_wrapper,omitempty"` | |
608 | OptionalDuration *duration.Duration `protobuf:"bytes,301,opt,name=optional_duration,json=optionalDuration,proto3" json:"optional_duration,omitempty"` | |
609 | OptionalTimestamp *timestamp.Timestamp `protobuf:"bytes,302,opt,name=optional_timestamp,json=optionalTimestamp,proto3" json:"optional_timestamp,omitempty"` | |
610 | OptionalFieldMask *field_mask.FieldMask `protobuf:"bytes,303,opt,name=optional_field_mask,json=optionalFieldMask,proto3" json:"optional_field_mask,omitempty"` | |
611 | OptionalStruct *_struct.Struct `protobuf:"bytes,304,opt,name=optional_struct,json=optionalStruct,proto3" json:"optional_struct,omitempty"` | |
612 | OptionalAny *any.Any `protobuf:"bytes,305,opt,name=optional_any,json=optionalAny,proto3" json:"optional_any,omitempty"` | |
613 | OptionalValue *_struct.Value `protobuf:"bytes,306,opt,name=optional_value,json=optionalValue,proto3" json:"optional_value,omitempty"` | |
614 | RepeatedDuration []*duration.Duration `protobuf:"bytes,311,rep,name=repeated_duration,json=repeatedDuration,proto3" json:"repeated_duration,omitempty"` | |
615 | RepeatedTimestamp []*timestamp.Timestamp `protobuf:"bytes,312,rep,name=repeated_timestamp,json=repeatedTimestamp,proto3" json:"repeated_timestamp,omitempty"` | |
616 | RepeatedFieldmask []*field_mask.FieldMask `protobuf:"bytes,313,rep,name=repeated_fieldmask,json=repeatedFieldmask,proto3" json:"repeated_fieldmask,omitempty"` | |
617 | RepeatedStruct []*_struct.Struct `protobuf:"bytes,324,rep,name=repeated_struct,json=repeatedStruct,proto3" json:"repeated_struct,omitempty"` | |
618 | RepeatedAny []*any.Any `protobuf:"bytes,315,rep,name=repeated_any,json=repeatedAny,proto3" json:"repeated_any,omitempty"` | |
619 | RepeatedValue []*_struct.Value `protobuf:"bytes,316,rep,name=repeated_value,json=repeatedValue,proto3" json:"repeated_value,omitempty"` | |
620 | // Test field-name-to-JSON-name convention. | |
621 | Fieldname1 int32 `protobuf:"varint,401,opt,name=fieldname1,proto3" json:"fieldname1,omitempty"` | |
622 | FieldName2 int32 `protobuf:"varint,402,opt,name=field_name2,json=fieldName2,proto3" json:"field_name2,omitempty"` | |
623 | XFieldName3 int32 `protobuf:"varint,403,opt,name=_field_name3,json=FieldName3,proto3" json:"_field_name3,omitempty"` | |
624 | Field_Name4_ int32 `protobuf:"varint,404,opt,name=field__name4_,json=fieldName4,proto3" json:"field__name4_,omitempty"` | |
625 | Field0Name5 int32 `protobuf:"varint,405,opt,name=field0name5,proto3" json:"field0name5,omitempty"` | |
626 | Field_0Name6 int32 `protobuf:"varint,406,opt,name=field_0_name6,json=field0Name6,proto3" json:"field_0_name6,omitempty"` | |
627 | FieldName7 int32 `protobuf:"varint,407,opt,name=fieldName7,proto3" json:"fieldName7,omitempty"` | |
628 | FieldName8 int32 `protobuf:"varint,408,opt,name=FieldName8,proto3" json:"FieldName8,omitempty"` | |
629 | Field_Name9 int32 `protobuf:"varint,409,opt,name=field_Name9,json=fieldName9,proto3" json:"field_Name9,omitempty"` | |
630 | Field_Name10 int32 `protobuf:"varint,410,opt,name=Field_Name10,json=FieldName10,proto3" json:"Field_Name10,omitempty"` | |
631 | FIELD_NAME11 int32 `protobuf:"varint,411,opt,name=FIELD_NAME11,json=FIELDNAME11,proto3" json:"FIELD_NAME11,omitempty"` | |
632 | FIELDName12 int32 `protobuf:"varint,412,opt,name=FIELD_name12,json=FIELDName12,proto3" json:"FIELD_name12,omitempty"` | |
633 | XXX_NoUnkeyedLiteral struct{} `json:"-"` | |
634 | XXX_unrecognized []byte `json:"-"` | |
635 | XXX_sizecache int32 `json:"-"` | |
636 | } | |
637 | ||
638 | func (m *TestAllTypes) Reset() { *m = TestAllTypes{} } | |
639 | func (m *TestAllTypes) String() string { return proto.CompactTextString(m) } | |
640 | func (*TestAllTypes) ProtoMessage() {} | |
641 | func (*TestAllTypes) Descriptor() ([]byte, []int) { | |
642 | return fileDescriptor_conformance_48ac832451f5d6c3, []int{2} | |
643 | } | |
644 | func (m *TestAllTypes) XXX_Unmarshal(b []byte) error { | |
645 | return xxx_messageInfo_TestAllTypes.Unmarshal(m, b) | |
646 | } | |
647 | func (m *TestAllTypes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { | |
648 | return xxx_messageInfo_TestAllTypes.Marshal(b, m, deterministic) | |
649 | } | |
650 | func (dst *TestAllTypes) XXX_Merge(src proto.Message) { | |
651 | xxx_messageInfo_TestAllTypes.Merge(dst, src) | |
652 | } | |
653 | func (m *TestAllTypes) XXX_Size() int { | |
654 | return xxx_messageInfo_TestAllTypes.Size(m) | |
655 | } | |
656 | func (m *TestAllTypes) XXX_DiscardUnknown() { | |
657 | xxx_messageInfo_TestAllTypes.DiscardUnknown(m) | |
658 | } | |
659 | ||
660 | var xxx_messageInfo_TestAllTypes proto.InternalMessageInfo | |
661 | ||
662 | func (m *TestAllTypes) GetOptionalInt32() int32 { | |
663 | if m != nil { | |
664 | return m.OptionalInt32 | |
665 | } | |
666 | return 0 | |
667 | } | |
668 | ||
669 | func (m *TestAllTypes) GetOptionalInt64() int64 { | |
670 | if m != nil { | |
671 | return m.OptionalInt64 | |
672 | } | |
673 | return 0 | |
674 | } | |
675 | ||
676 | func (m *TestAllTypes) GetOptionalUint32() uint32 { | |
677 | if m != nil { | |
678 | return m.OptionalUint32 | |
679 | } | |
680 | return 0 | |
681 | } | |
682 | ||
683 | func (m *TestAllTypes) GetOptionalUint64() uint64 { | |
684 | if m != nil { | |
685 | return m.OptionalUint64 | |
686 | } | |
687 | return 0 | |
688 | } | |
689 | ||
690 | func (m *TestAllTypes) GetOptionalSint32() int32 { | |
691 | if m != nil { | |
692 | return m.OptionalSint32 | |
693 | } | |
694 | return 0 | |
695 | } | |
696 | ||
697 | func (m *TestAllTypes) GetOptionalSint64() int64 { | |
698 | if m != nil { | |
699 | return m.OptionalSint64 | |
700 | } | |
701 | return 0 | |
702 | } | |
703 | ||
704 | func (m *TestAllTypes) GetOptionalFixed32() uint32 { | |
705 | if m != nil { | |
706 | return m.OptionalFixed32 | |
707 | } | |
708 | return 0 | |
709 | } | |
710 | ||
711 | func (m *TestAllTypes) GetOptionalFixed64() uint64 { | |
712 | if m != nil { | |
713 | return m.OptionalFixed64 | |
714 | } | |
715 | return 0 | |
716 | } | |
717 | ||
718 | func (m *TestAllTypes) GetOptionalSfixed32() int32 { | |
719 | if m != nil { | |
720 | return m.OptionalSfixed32 | |
721 | } | |
722 | return 0 | |
723 | } | |
724 | ||
725 | func (m *TestAllTypes) GetOptionalSfixed64() int64 { | |
726 | if m != nil { | |
727 | return m.OptionalSfixed64 | |
728 | } | |
729 | return 0 | |
730 | } | |
731 | ||
732 | func (m *TestAllTypes) GetOptionalFloat() float32 { | |
733 | if m != nil { | |
734 | return m.OptionalFloat | |
735 | } | |
736 | return 0 | |
737 | } | |
738 | ||
739 | func (m *TestAllTypes) GetOptionalDouble() float64 { | |
740 | if m != nil { | |
741 | return m.OptionalDouble | |
742 | } | |
743 | return 0 | |
744 | } | |
745 | ||
746 | func (m *TestAllTypes) GetOptionalBool() bool { | |
747 | if m != nil { | |
748 | return m.OptionalBool | |
749 | } | |
750 | return false | |
751 | } | |
752 | ||
753 | func (m *TestAllTypes) GetOptionalString() string { | |
754 | if m != nil { | |
755 | return m.OptionalString | |
756 | } | |
757 | return "" | |
758 | } | |
759 | ||
760 | func (m *TestAllTypes) GetOptionalBytes() []byte { | |
761 | if m != nil { | |
762 | return m.OptionalBytes | |
763 | } | |
764 | return nil | |
765 | } | |
766 | ||
767 | func (m *TestAllTypes) GetOptionalNestedMessage() *TestAllTypes_NestedMessage { | |
768 | if m != nil { | |
769 | return m.OptionalNestedMessage | |
770 | } | |
771 | return nil | |
772 | } | |
773 | ||
774 | func (m *TestAllTypes) GetOptionalForeignMessage() *ForeignMessage { | |
775 | if m != nil { | |
776 | return m.OptionalForeignMessage | |
777 | } | |
778 | return nil | |
779 | } | |
780 | ||
781 | func (m *TestAllTypes) GetOptionalNestedEnum() TestAllTypes_NestedEnum { | |
782 | if m != nil { | |
783 | return m.OptionalNestedEnum | |
784 | } | |
785 | return TestAllTypes_FOO | |
786 | } | |
787 | ||
788 | func (m *TestAllTypes) GetOptionalForeignEnum() ForeignEnum { | |
789 | if m != nil { | |
790 | return m.OptionalForeignEnum | |
791 | } | |
792 | return ForeignEnum_FOREIGN_FOO | |
793 | } | |
794 | ||
795 | func (m *TestAllTypes) GetOptionalStringPiece() string { | |
796 | if m != nil { | |
797 | return m.OptionalStringPiece | |
798 | } | |
799 | return "" | |
800 | } | |
801 | ||
802 | func (m *TestAllTypes) GetOptionalCord() string { | |
803 | if m != nil { | |
804 | return m.OptionalCord | |
805 | } | |
806 | return "" | |
807 | } | |
808 | ||
809 | func (m *TestAllTypes) GetRecursiveMessage() *TestAllTypes { | |
810 | if m != nil { | |
811 | return m.RecursiveMessage | |
812 | } | |
813 | return nil | |
814 | } | |
815 | ||
816 | func (m *TestAllTypes) GetRepeatedInt32() []int32 { | |
817 | if m != nil { | |
818 | return m.RepeatedInt32 | |
819 | } | |
820 | return nil | |
821 | } | |
822 | ||
823 | func (m *TestAllTypes) GetRepeatedInt64() []int64 { | |
824 | if m != nil { | |
825 | return m.RepeatedInt64 | |
826 | } | |
827 | return nil | |
828 | } | |
829 | ||
830 | func (m *TestAllTypes) GetRepeatedUint32() []uint32 { | |
831 | if m != nil { | |
832 | return m.RepeatedUint32 | |
833 | } | |
834 | return nil | |
835 | } | |
836 | ||
837 | func (m *TestAllTypes) GetRepeatedUint64() []uint64 { | |
838 | if m != nil { | |
839 | return m.RepeatedUint64 | |
840 | } | |
841 | return nil | |
842 | } | |
843 | ||
844 | func (m *TestAllTypes) GetRepeatedSint32() []int32 { | |
845 | if m != nil { | |
846 | return m.RepeatedSint32 | |
847 | } | |
848 | return nil | |
849 | } | |
850 | ||
851 | func (m *TestAllTypes) GetRepeatedSint64() []int64 { | |
852 | if m != nil { | |
853 | return m.RepeatedSint64 | |
854 | } | |
855 | return nil | |
856 | } | |
857 | ||
858 | func (m *TestAllTypes) GetRepeatedFixed32() []uint32 { | |
859 | if m != nil { | |
860 | return m.RepeatedFixed32 | |
861 | } | |
862 | return nil | |
863 | } | |
864 | ||
865 | func (m *TestAllTypes) GetRepeatedFixed64() []uint64 { | |
866 | if m != nil { | |
867 | return m.RepeatedFixed64 | |
868 | } | |
869 | return nil | |
870 | } | |
871 | ||
872 | func (m *TestAllTypes) GetRepeatedSfixed32() []int32 { | |
873 | if m != nil { | |
874 | return m.RepeatedSfixed32 | |
875 | } | |
876 | return nil | |
877 | } | |
878 | ||
879 | func (m *TestAllTypes) GetRepeatedSfixed64() []int64 { | |
880 | if m != nil { | |
881 | return m.RepeatedSfixed64 | |
882 | } | |
883 | return nil | |
884 | } | |
885 | ||
886 | func (m *TestAllTypes) GetRepeatedFloat() []float32 { | |
887 | if m != nil { | |
888 | return m.RepeatedFloat | |
889 | } | |
890 | return nil | |
891 | } | |
892 | ||
893 | func (m *TestAllTypes) GetRepeatedDouble() []float64 { | |
894 | if m != nil { | |
895 | return m.RepeatedDouble | |
896 | } | |
897 | return nil | |
898 | } | |
899 | ||
900 | func (m *TestAllTypes) GetRepeatedBool() []bool { | |
901 | if m != nil { | |
902 | return m.RepeatedBool | |
903 | } | |
904 | return nil | |
905 | } | |
906 | ||
907 | func (m *TestAllTypes) GetRepeatedString() []string { | |
908 | if m != nil { | |
909 | return m.RepeatedString | |
910 | } | |
911 | return nil | |
912 | } | |
913 | ||
914 | func (m *TestAllTypes) GetRepeatedBytes() [][]byte { | |
915 | if m != nil { | |
916 | return m.RepeatedBytes | |
917 | } | |
918 | return nil | |
919 | } | |
920 | ||
921 | func (m *TestAllTypes) GetRepeatedNestedMessage() []*TestAllTypes_NestedMessage { | |
922 | if m != nil { | |
923 | return m.RepeatedNestedMessage | |
924 | } | |
925 | return nil | |
926 | } | |
927 | ||
928 | func (m *TestAllTypes) GetRepeatedForeignMessage() []*ForeignMessage { | |
929 | if m != nil { | |
930 | return m.RepeatedForeignMessage | |
931 | } | |
932 | return nil | |
933 | } | |
934 | ||
935 | func (m *TestAllTypes) GetRepeatedNestedEnum() []TestAllTypes_NestedEnum { | |
936 | if m != nil { | |
937 | return m.RepeatedNestedEnum | |
938 | } | |
939 | return nil | |
940 | } | |
941 | ||
942 | func (m *TestAllTypes) GetRepeatedForeignEnum() []ForeignEnum { | |
943 | if m != nil { | |
944 | return m.RepeatedForeignEnum | |
945 | } | |
946 | return nil | |
947 | } | |
948 | ||
949 | func (m *TestAllTypes) GetRepeatedStringPiece() []string { | |
950 | if m != nil { | |
951 | return m.RepeatedStringPiece | |
952 | } | |
953 | return nil | |
954 | } | |
955 | ||
956 | func (m *TestAllTypes) GetRepeatedCord() []string { | |
957 | if m != nil { | |
958 | return m.RepeatedCord | |
959 | } | |
960 | return nil | |
961 | } | |
962 | ||
963 | func (m *TestAllTypes) GetMapInt32Int32() map[int32]int32 { | |
964 | if m != nil { | |
965 | return m.MapInt32Int32 | |
966 | } | |
967 | return nil | |
968 | } | |
969 | ||
970 | func (m *TestAllTypes) GetMapInt64Int64() map[int64]int64 { | |
971 | if m != nil { | |
972 | return m.MapInt64Int64 | |
973 | } | |
974 | return nil | |
975 | } | |
976 | ||
977 | func (m *TestAllTypes) GetMapUint32Uint32() map[uint32]uint32 { | |
978 | if m != nil { | |
979 | return m.MapUint32Uint32 | |
980 | } | |
981 | return nil | |
982 | } | |
983 | ||
984 | func (m *TestAllTypes) GetMapUint64Uint64() map[uint64]uint64 { | |
985 | if m != nil { | |
986 | return m.MapUint64Uint64 | |
987 | } | |
988 | return nil | |
989 | } | |
990 | ||
991 | func (m *TestAllTypes) GetMapSint32Sint32() map[int32]int32 { | |
992 | if m != nil { | |
993 | return m.MapSint32Sint32 | |
994 | } | |
995 | return nil | |
996 | } | |
997 | ||
998 | func (m *TestAllTypes) GetMapSint64Sint64() map[int64]int64 { | |
999 | if m != nil { | |
1000 | return m.MapSint64Sint64 | |
1001 | } | |
1002 | return nil | |
1003 | } | |
1004 | ||
1005 | func (m *TestAllTypes) GetMapFixed32Fixed32() map[uint32]uint32 { | |
1006 | if m != nil { | |
1007 | return m.MapFixed32Fixed32 | |
1008 | } | |
1009 | return nil | |
1010 | } | |
1011 | ||
1012 | func (m *TestAllTypes) GetMapFixed64Fixed64() map[uint64]uint64 { | |
1013 | if m != nil { | |
1014 | return m.MapFixed64Fixed64 | |
1015 | } | |
1016 | return nil | |
1017 | } | |
1018 | ||
1019 | func (m *TestAllTypes) GetMapSfixed32Sfixed32() map[int32]int32 { | |
1020 | if m != nil { | |
1021 | return m.MapSfixed32Sfixed32 | |
1022 | } | |
1023 | return nil | |
1024 | } | |
1025 | ||
1026 | func (m *TestAllTypes) GetMapSfixed64Sfixed64() map[int64]int64 { | |
1027 | if m != nil { | |
1028 | return m.MapSfixed64Sfixed64 | |
1029 | } | |
1030 | return nil | |
1031 | } | |
1032 | ||
1033 | func (m *TestAllTypes) GetMapInt32Float() map[int32]float32 { | |
1034 | if m != nil { | |
1035 | return m.MapInt32Float | |
1036 | } | |
1037 | return nil | |
1038 | } | |
1039 | ||
1040 | func (m *TestAllTypes) GetMapInt32Double() map[int32]float64 { | |
1041 | if m != nil { | |
1042 | return m.MapInt32Double | |
1043 | } | |
1044 | return nil | |
1045 | } | |
1046 | ||
1047 | func (m *TestAllTypes) GetMapBoolBool() map[bool]bool { | |
1048 | if m != nil { | |
1049 | return m.MapBoolBool | |
1050 | } | |
1051 | return nil | |
1052 | } | |
1053 | ||
1054 | func (m *TestAllTypes) GetMapStringString() map[string]string { | |
1055 | if m != nil { | |
1056 | return m.MapStringString | |
1057 | } | |
1058 | return nil | |
1059 | } | |
1060 | ||
1061 | func (m *TestAllTypes) GetMapStringBytes() map[string][]byte { | |
1062 | if m != nil { | |
1063 | return m.MapStringBytes | |
1064 | } | |
1065 | return nil | |
1066 | } | |
1067 | ||
1068 | func (m *TestAllTypes) GetMapStringNestedMessage() map[string]*TestAllTypes_NestedMessage { | |
1069 | if m != nil { | |
1070 | return m.MapStringNestedMessage | |
1071 | } | |
1072 | return nil | |
1073 | } | |
1074 | ||
1075 | func (m *TestAllTypes) GetMapStringForeignMessage() map[string]*ForeignMessage { | |
1076 | if m != nil { | |
1077 | return m.MapStringForeignMessage | |
1078 | } | |
1079 | return nil | |
1080 | } | |
1081 | ||
1082 | func (m *TestAllTypes) GetMapStringNestedEnum() map[string]TestAllTypes_NestedEnum { | |
1083 | if m != nil { | |
1084 | return m.MapStringNestedEnum | |
1085 | } | |
1086 | return nil | |
1087 | } | |
1088 | ||
1089 | func (m *TestAllTypes) GetMapStringForeignEnum() map[string]ForeignEnum { | |
1090 | if m != nil { | |
1091 | return m.MapStringForeignEnum | |
1092 | } | |
1093 | return nil | |
1094 | } | |
1095 | ||
1096 | type isTestAllTypes_OneofField interface { | |
1097 | isTestAllTypes_OneofField() | |
1098 | } | |
1099 | ||
1100 | type TestAllTypes_OneofUint32 struct { | |
1101 | OneofUint32 uint32 `protobuf:"varint,111,opt,name=oneof_uint32,json=oneofUint32,proto3,oneof"` | |
1102 | } | |
1103 | ||
1104 | type TestAllTypes_OneofNestedMessage struct { | |
1105 | OneofNestedMessage *TestAllTypes_NestedMessage `protobuf:"bytes,112,opt,name=oneof_nested_message,json=oneofNestedMessage,proto3,oneof"` | |
1106 | } | |
1107 | ||
1108 | type TestAllTypes_OneofString struct { | |
1109 | OneofString string `protobuf:"bytes,113,opt,name=oneof_string,json=oneofString,proto3,oneof"` | |
1110 | } | |
1111 | ||
1112 | type TestAllTypes_OneofBytes struct { | |
1113 | OneofBytes []byte `protobuf:"bytes,114,opt,name=oneof_bytes,json=oneofBytes,proto3,oneof"` | |
1114 | } | |
1115 | ||
1116 | func (*TestAllTypes_OneofUint32) isTestAllTypes_OneofField() {} | |
1117 | ||
1118 | func (*TestAllTypes_OneofNestedMessage) isTestAllTypes_OneofField() {} | |
1119 | ||
1120 | func (*TestAllTypes_OneofString) isTestAllTypes_OneofField() {} | |
1121 | ||
1122 | func (*TestAllTypes_OneofBytes) isTestAllTypes_OneofField() {} | |
1123 | ||
1124 | func (m *TestAllTypes) GetOneofField() isTestAllTypes_OneofField { | |
1125 | if m != nil { | |
1126 | return m.OneofField | |
1127 | } | |
1128 | return nil | |
1129 | } | |
1130 | ||
1131 | func (m *TestAllTypes) GetOneofUint32() uint32 { | |
1132 | if x, ok := m.GetOneofField().(*TestAllTypes_OneofUint32); ok { | |
1133 | return x.OneofUint32 | |
1134 | } | |
1135 | return 0 | |
1136 | } | |
1137 | ||
1138 | func (m *TestAllTypes) GetOneofNestedMessage() *TestAllTypes_NestedMessage { | |
1139 | if x, ok := m.GetOneofField().(*TestAllTypes_OneofNestedMessage); ok { | |
1140 | return x.OneofNestedMessage | |
1141 | } | |
1142 | return nil | |
1143 | } | |
1144 | ||
1145 | func (m *TestAllTypes) GetOneofString() string { | |
1146 | if x, ok := m.GetOneofField().(*TestAllTypes_OneofString); ok { | |
1147 | return x.OneofString | |
1148 | } | |
1149 | return "" | |
1150 | } | |
1151 | ||
1152 | func (m *TestAllTypes) GetOneofBytes() []byte { | |
1153 | if x, ok := m.GetOneofField().(*TestAllTypes_OneofBytes); ok { | |
1154 | return x.OneofBytes | |
1155 | } | |
1156 | return nil | |
1157 | } | |
1158 | ||
1159 | func (m *TestAllTypes) GetOptionalBoolWrapper() *wrappers.BoolValue { | |
1160 | if m != nil { | |
1161 | return m.OptionalBoolWrapper | |
1162 | } | |
1163 | return nil | |
1164 | } | |
1165 | ||
1166 | func (m *TestAllTypes) GetOptionalInt32Wrapper() *wrappers.Int32Value { | |
1167 | if m != nil { | |
1168 | return m.OptionalInt32Wrapper | |
1169 | } | |
1170 | return nil | |
1171 | } | |
1172 | ||
1173 | func (m *TestAllTypes) GetOptionalInt64Wrapper() *wrappers.Int64Value { | |
1174 | if m != nil { | |
1175 | return m.OptionalInt64Wrapper | |
1176 | } | |
1177 | return nil | |
1178 | } | |
1179 | ||
1180 | func (m *TestAllTypes) GetOptionalUint32Wrapper() *wrappers.UInt32Value { | |
1181 | if m != nil { | |
1182 | return m.OptionalUint32Wrapper | |
1183 | } | |
1184 | return nil | |
1185 | } | |
1186 | ||
1187 | func (m *TestAllTypes) GetOptionalUint64Wrapper() *wrappers.UInt64Value { | |
1188 | if m != nil { | |
1189 | return m.OptionalUint64Wrapper | |
1190 | } | |
1191 | return nil | |
1192 | } | |
1193 | ||
1194 | func (m *TestAllTypes) GetOptionalFloatWrapper() *wrappers.FloatValue { | |
1195 | if m != nil { | |
1196 | return m.OptionalFloatWrapper | |
1197 | } | |
1198 | return nil | |
1199 | } | |
1200 | ||
1201 | func (m *TestAllTypes) GetOptionalDoubleWrapper() *wrappers.DoubleValue { | |
1202 | if m != nil { | |
1203 | return m.OptionalDoubleWrapper | |
1204 | } | |
1205 | return nil | |
1206 | } | |
1207 | ||
1208 | func (m *TestAllTypes) GetOptionalStringWrapper() *wrappers.StringValue { | |
1209 | if m != nil { | |
1210 | return m.OptionalStringWrapper | |
1211 | } | |
1212 | return nil | |
1213 | } | |
1214 | ||
1215 | func (m *TestAllTypes) GetOptionalBytesWrapper() *wrappers.BytesValue { | |
1216 | if m != nil { | |
1217 | return m.OptionalBytesWrapper | |
1218 | } | |
1219 | return nil | |
1220 | } | |
1221 | ||
1222 | func (m *TestAllTypes) GetRepeatedBoolWrapper() []*wrappers.BoolValue { | |
1223 | if m != nil { | |
1224 | return m.RepeatedBoolWrapper | |
1225 | } | |
1226 | return nil | |
1227 | } | |
1228 | ||
1229 | func (m *TestAllTypes) GetRepeatedInt32Wrapper() []*wrappers.Int32Value { | |
1230 | if m != nil { | |
1231 | return m.RepeatedInt32Wrapper | |
1232 | } | |
1233 | return nil | |
1234 | } | |
1235 | ||
1236 | func (m *TestAllTypes) GetRepeatedInt64Wrapper() []*wrappers.Int64Value { | |
1237 | if m != nil { | |
1238 | return m.RepeatedInt64Wrapper | |
1239 | } | |
1240 | return nil | |
1241 | } | |
1242 | ||
1243 | func (m *TestAllTypes) GetRepeatedUint32Wrapper() []*wrappers.UInt32Value { | |
1244 | if m != nil { | |
1245 | return m.RepeatedUint32Wrapper | |
1246 | } | |
1247 | return nil | |
1248 | } | |
1249 | ||
1250 | func (m *TestAllTypes) GetRepeatedUint64Wrapper() []*wrappers.UInt64Value { | |
1251 | if m != nil { | |
1252 | return m.RepeatedUint64Wrapper | |
1253 | } | |
1254 | return nil | |
1255 | } | |
1256 | ||
1257 | func (m *TestAllTypes) GetRepeatedFloatWrapper() []*wrappers.FloatValue { | |
1258 | if m != nil { | |
1259 | return m.RepeatedFloatWrapper | |
1260 | } | |
1261 | return nil | |
1262 | } | |
1263 | ||
1264 | func (m *TestAllTypes) GetRepeatedDoubleWrapper() []*wrappers.DoubleValue { | |
1265 | if m != nil { | |
1266 | return m.RepeatedDoubleWrapper | |
1267 | } | |
1268 | return nil | |
1269 | } | |
1270 | ||
1271 | func (m *TestAllTypes) GetRepeatedStringWrapper() []*wrappers.StringValue { | |
1272 | if m != nil { | |
1273 | return m.RepeatedStringWrapper | |
1274 | } | |
1275 | return nil | |
1276 | } | |
1277 | ||
1278 | func (m *TestAllTypes) GetRepeatedBytesWrapper() []*wrappers.BytesValue { | |
1279 | if m != nil { | |
1280 | return m.RepeatedBytesWrapper | |
1281 | } | |
1282 | return nil | |
1283 | } | |
1284 | ||
1285 | func (m *TestAllTypes) GetOptionalDuration() *duration.Duration { | |
1286 | if m != nil { | |
1287 | return m.OptionalDuration | |
1288 | } | |
1289 | return nil | |
1290 | } | |
1291 | ||
1292 | func (m *TestAllTypes) GetOptionalTimestamp() *timestamp.Timestamp { | |
1293 | if m != nil { | |
1294 | return m.OptionalTimestamp | |
1295 | } | |
1296 | return nil | |
1297 | } | |
1298 | ||
1299 | func (m *TestAllTypes) GetOptionalFieldMask() *field_mask.FieldMask { | |
1300 | if m != nil { | |
1301 | return m.OptionalFieldMask | |
1302 | } | |
1303 | return nil | |
1304 | } | |
1305 | ||
1306 | func (m *TestAllTypes) GetOptionalStruct() *_struct.Struct { | |
1307 | if m != nil { | |
1308 | return m.OptionalStruct | |
1309 | } | |
1310 | return nil | |
1311 | } | |
1312 | ||
1313 | func (m *TestAllTypes) GetOptionalAny() *any.Any { | |
1314 | if m != nil { | |
1315 | return m.OptionalAny | |
1316 | } | |
1317 | return nil | |
1318 | } | |
1319 | ||
1320 | func (m *TestAllTypes) GetOptionalValue() *_struct.Value { | |
1321 | if m != nil { | |
1322 | return m.OptionalValue | |
1323 | } | |
1324 | return nil | |
1325 | } | |
1326 | ||
1327 | func (m *TestAllTypes) GetRepeatedDuration() []*duration.Duration { | |
1328 | if m != nil { | |
1329 | return m.RepeatedDuration | |
1330 | } | |
1331 | return nil | |
1332 | } | |
1333 | ||
1334 | func (m *TestAllTypes) GetRepeatedTimestamp() []*timestamp.Timestamp { | |
1335 | if m != nil { | |
1336 | return m.RepeatedTimestamp | |
1337 | } | |
1338 | return nil | |
1339 | } | |
1340 | ||
1341 | func (m *TestAllTypes) GetRepeatedFieldmask() []*field_mask.FieldMask { | |
1342 | if m != nil { | |
1343 | return m.RepeatedFieldmask | |
1344 | } | |
1345 | return nil | |
1346 | } | |
1347 | ||
1348 | func (m *TestAllTypes) GetRepeatedStruct() []*_struct.Struct { | |
1349 | if m != nil { | |
1350 | return m.RepeatedStruct | |
1351 | } | |
1352 | return nil | |
1353 | } | |
1354 | ||
1355 | func (m *TestAllTypes) GetRepeatedAny() []*any.Any { | |
1356 | if m != nil { | |
1357 | return m.RepeatedAny | |
1358 | } | |
1359 | return nil | |
1360 | } | |
1361 | ||
1362 | func (m *TestAllTypes) GetRepeatedValue() []*_struct.Value { | |
1363 | if m != nil { | |
1364 | return m.RepeatedValue | |
1365 | } | |
1366 | return nil | |
1367 | } | |
1368 | ||
1369 | func (m *TestAllTypes) GetFieldname1() int32 { | |
1370 | if m != nil { | |
1371 | return m.Fieldname1 | |
1372 | } | |
1373 | return 0 | |
1374 | } | |
1375 | ||
1376 | func (m *TestAllTypes) GetFieldName2() int32 { | |
1377 | if m != nil { | |
1378 | return m.FieldName2 | |
1379 | } | |
1380 | return 0 | |
1381 | } | |
1382 | ||
1383 | func (m *TestAllTypes) GetXFieldName3() int32 { | |
1384 | if m != nil { | |
1385 | return m.XFieldName3 | |
1386 | } | |
1387 | return 0 | |
1388 | } | |
1389 | ||
1390 | func (m *TestAllTypes) GetField_Name4_() int32 { | |
1391 | if m != nil { | |
1392 | return m.Field_Name4_ | |
1393 | } | |
1394 | return 0 | |
1395 | } | |
1396 | ||
1397 | func (m *TestAllTypes) GetField0Name5() int32 { | |
1398 | if m != nil { | |
1399 | return m.Field0Name5 | |
1400 | } | |
1401 | return 0 | |
1402 | } | |
1403 | ||
1404 | func (m *TestAllTypes) GetField_0Name6() int32 { | |
1405 | if m != nil { | |
1406 | return m.Field_0Name6 | |
1407 | } | |
1408 | return 0 | |
1409 | } | |
1410 | ||
1411 | func (m *TestAllTypes) GetFieldName7() int32 { | |
1412 | if m != nil { | |
1413 | return m.FieldName7 | |
1414 | } | |
1415 | return 0 | |
1416 | } | |
1417 | ||
1418 | func (m *TestAllTypes) GetFieldName8() int32 { | |
1419 | if m != nil { | |
1420 | return m.FieldName8 | |
1421 | } | |
1422 | return 0 | |
1423 | } | |
1424 | ||
1425 | func (m *TestAllTypes) GetField_Name9() int32 { | |
1426 | if m != nil { | |
1427 | return m.Field_Name9 | |
1428 | } | |
1429 | return 0 | |
1430 | } | |
1431 | ||
1432 | func (m *TestAllTypes) GetField_Name10() int32 { | |
1433 | if m != nil { | |
1434 | return m.Field_Name10 | |
1435 | } | |
1436 | return 0 | |
1437 | } | |
1438 | ||
1439 | func (m *TestAllTypes) GetFIELD_NAME11() int32 { | |
1440 | if m != nil { | |
1441 | return m.FIELD_NAME11 | |
1442 | } | |
1443 | return 0 | |
1444 | } | |
1445 | ||
1446 | func (m *TestAllTypes) GetFIELDName12() int32 { | |
1447 | if m != nil { | |
1448 | return m.FIELDName12 | |
1449 | } | |
1450 | return 0 | |
1451 | } | |
1452 | ||
1453 | // XXX_OneofFuncs is for the internal use of the proto package. | |
1454 | func (*TestAllTypes) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { | |
1455 | return _TestAllTypes_OneofMarshaler, _TestAllTypes_OneofUnmarshaler, _TestAllTypes_OneofSizer, []interface{}{ | |
1456 | (*TestAllTypes_OneofUint32)(nil), | |
1457 | (*TestAllTypes_OneofNestedMessage)(nil), | |
1458 | (*TestAllTypes_OneofString)(nil), | |
1459 | (*TestAllTypes_OneofBytes)(nil), | |
1460 | } | |
1461 | } | |
1462 | ||
1463 | func _TestAllTypes_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { | |
1464 | m := msg.(*TestAllTypes) | |
1465 | // oneof_field | |
1466 | switch x := m.OneofField.(type) { | |
1467 | case *TestAllTypes_OneofUint32: | |
1468 | b.EncodeVarint(111<<3 | proto.WireVarint) | |
1469 | b.EncodeVarint(uint64(x.OneofUint32)) | |
1470 | case *TestAllTypes_OneofNestedMessage: | |
1471 | b.EncodeVarint(112<<3 | proto.WireBytes) | |
1472 | if err := b.EncodeMessage(x.OneofNestedMessage); err != nil { | |
1473 | return err | |
1474 | } | |
1475 | case *TestAllTypes_OneofString: | |
1476 | b.EncodeVarint(113<<3 | proto.WireBytes) | |
1477 | b.EncodeStringBytes(x.OneofString) | |
1478 | case *TestAllTypes_OneofBytes: | |
1479 | b.EncodeVarint(114<<3 | proto.WireBytes) | |
1480 | b.EncodeRawBytes(x.OneofBytes) | |
1481 | case nil: | |
1482 | default: | |
1483 | return fmt.Errorf("TestAllTypes.OneofField has unexpected type %T", x) | |
1484 | } | |
1485 | return nil | |
1486 | } | |
1487 | ||
1488 | func _TestAllTypes_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { | |
1489 | m := msg.(*TestAllTypes) | |
1490 | switch tag { | |
1491 | case 111: // oneof_field.oneof_uint32 | |
1492 | if wire != proto.WireVarint { | |
1493 | return true, proto.ErrInternalBadWireType | |
1494 | } | |
1495 | x, err := b.DecodeVarint() | |
1496 | m.OneofField = &TestAllTypes_OneofUint32{uint32(x)} | |
1497 | return true, err | |
1498 | case 112: // oneof_field.oneof_nested_message | |
1499 | if wire != proto.WireBytes { | |
1500 | return true, proto.ErrInternalBadWireType | |
1501 | } | |
1502 | msg := new(TestAllTypes_NestedMessage) | |
1503 | err := b.DecodeMessage(msg) | |
1504 | m.OneofField = &TestAllTypes_OneofNestedMessage{msg} | |
1505 | return true, err | |
1506 | case 113: // oneof_field.oneof_string | |
1507 | if wire != proto.WireBytes { | |
1508 | return true, proto.ErrInternalBadWireType | |
1509 | } | |
1510 | x, err := b.DecodeStringBytes() | |
1511 | m.OneofField = &TestAllTypes_OneofString{x} | |
1512 | return true, err | |
1513 | case 114: // oneof_field.oneof_bytes | |
1514 | if wire != proto.WireBytes { | |
1515 | return true, proto.ErrInternalBadWireType | |
1516 | } | |
1517 | x, err := b.DecodeRawBytes(true) | |
1518 | m.OneofField = &TestAllTypes_OneofBytes{x} | |
1519 | return true, err | |
1520 | default: | |
1521 | return false, nil | |
1522 | } | |
1523 | } | |
1524 | ||
1525 | func _TestAllTypes_OneofSizer(msg proto.Message) (n int) { | |
1526 | m := msg.(*TestAllTypes) | |
1527 | // oneof_field | |
1528 | switch x := m.OneofField.(type) { | |
1529 | case *TestAllTypes_OneofUint32: | |
1530 | n += 2 // tag and wire | |
1531 | n += proto.SizeVarint(uint64(x.OneofUint32)) | |
1532 | case *TestAllTypes_OneofNestedMessage: | |
1533 | s := proto.Size(x.OneofNestedMessage) | |
1534 | n += 2 // tag and wire | |
1535 | n += proto.SizeVarint(uint64(s)) | |
1536 | n += s | |
1537 | case *TestAllTypes_OneofString: | |
1538 | n += 2 // tag and wire | |
1539 | n += proto.SizeVarint(uint64(len(x.OneofString))) | |
1540 | n += len(x.OneofString) | |
1541 | case *TestAllTypes_OneofBytes: | |
1542 | n += 2 // tag and wire | |
1543 | n += proto.SizeVarint(uint64(len(x.OneofBytes))) | |
1544 | n += len(x.OneofBytes) | |
1545 | case nil: | |
1546 | default: | |
1547 | panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) | |
1548 | } | |
1549 | return n | |
1550 | } | |
1551 | ||
1552 | type TestAllTypes_NestedMessage struct { | |
1553 | A int32 `protobuf:"varint,1,opt,name=a,proto3" json:"a,omitempty"` | |
1554 | Corecursive *TestAllTypes `protobuf:"bytes,2,opt,name=corecursive,proto3" json:"corecursive,omitempty"` | |
1555 | XXX_NoUnkeyedLiteral struct{} `json:"-"` | |
1556 | XXX_unrecognized []byte `json:"-"` | |
1557 | XXX_sizecache int32 `json:"-"` | |
1558 | } | |
1559 | ||
1560 | func (m *TestAllTypes_NestedMessage) Reset() { *m = TestAllTypes_NestedMessage{} } | |
1561 | func (m *TestAllTypes_NestedMessage) String() string { return proto.CompactTextString(m) } | |
1562 | func (*TestAllTypes_NestedMessage) ProtoMessage() {} | |
1563 | func (*TestAllTypes_NestedMessage) Descriptor() ([]byte, []int) { | |
1564 | return fileDescriptor_conformance_48ac832451f5d6c3, []int{2, 0} | |
1565 | } | |
1566 | func (m *TestAllTypes_NestedMessage) XXX_Unmarshal(b []byte) error { | |
1567 | return xxx_messageInfo_TestAllTypes_NestedMessage.Unmarshal(m, b) | |
1568 | } | |
1569 | func (m *TestAllTypes_NestedMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { | |
1570 | return xxx_messageInfo_TestAllTypes_NestedMessage.Marshal(b, m, deterministic) | |
1571 | } | |
1572 | func (dst *TestAllTypes_NestedMessage) XXX_Merge(src proto.Message) { | |
1573 | xxx_messageInfo_TestAllTypes_NestedMessage.Merge(dst, src) | |
1574 | } | |
1575 | func (m *TestAllTypes_NestedMessage) XXX_Size() int { | |
1576 | return xxx_messageInfo_TestAllTypes_NestedMessage.Size(m) | |
1577 | } | |
1578 | func (m *TestAllTypes_NestedMessage) XXX_DiscardUnknown() { | |
1579 | xxx_messageInfo_TestAllTypes_NestedMessage.DiscardUnknown(m) | |
1580 | } | |
1581 | ||
1582 | var xxx_messageInfo_TestAllTypes_NestedMessage proto.InternalMessageInfo | |
1583 | ||
1584 | func (m *TestAllTypes_NestedMessage) GetA() int32 { | |
1585 | if m != nil { | |
1586 | return m.A | |
1587 | } | |
1588 | return 0 | |
1589 | } | |
1590 | ||
1591 | func (m *TestAllTypes_NestedMessage) GetCorecursive() *TestAllTypes { | |
1592 | if m != nil { | |
1593 | return m.Corecursive | |
1594 | } | |
1595 | return nil | |
1596 | } | |
1597 | ||
1598 | type ForeignMessage struct { | |
1599 | C int32 `protobuf:"varint,1,opt,name=c,proto3" json:"c,omitempty"` | |
1600 | XXX_NoUnkeyedLiteral struct{} `json:"-"` | |
1601 | XXX_unrecognized []byte `json:"-"` | |
1602 | XXX_sizecache int32 `json:"-"` | |
1603 | } | |
1604 | ||
1605 | func (m *ForeignMessage) Reset() { *m = ForeignMessage{} } | |
1606 | func (m *ForeignMessage) String() string { return proto.CompactTextString(m) } | |
1607 | func (*ForeignMessage) ProtoMessage() {} | |
1608 | func (*ForeignMessage) Descriptor() ([]byte, []int) { | |
1609 | return fileDescriptor_conformance_48ac832451f5d6c3, []int{3} | |
1610 | } | |
1611 | func (m *ForeignMessage) XXX_Unmarshal(b []byte) error { | |
1612 | return xxx_messageInfo_ForeignMessage.Unmarshal(m, b) | |
1613 | } | |
1614 | func (m *ForeignMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { | |
1615 | return xxx_messageInfo_ForeignMessage.Marshal(b, m, deterministic) | |
1616 | } | |
1617 | func (dst *ForeignMessage) XXX_Merge(src proto.Message) { | |
1618 | xxx_messageInfo_ForeignMessage.Merge(dst, src) | |
1619 | } | |
1620 | func (m *ForeignMessage) XXX_Size() int { | |
1621 | return xxx_messageInfo_ForeignMessage.Size(m) | |
1622 | } | |
1623 | func (m *ForeignMessage) XXX_DiscardUnknown() { | |
1624 | xxx_messageInfo_ForeignMessage.DiscardUnknown(m) | |
1625 | } | |
1626 | ||
1627 | var xxx_messageInfo_ForeignMessage proto.InternalMessageInfo | |
1628 | ||
1629 | func (m *ForeignMessage) GetC() int32 { | |
1630 | if m != nil { | |
1631 | return m.C | |
1632 | } | |
1633 | return 0 | |
1634 | } | |
1635 | ||
1636 | func init() { | |
1637 | proto.RegisterType((*ConformanceRequest)(nil), "conformance.ConformanceRequest") | |
1638 | proto.RegisterType((*ConformanceResponse)(nil), "conformance.ConformanceResponse") | |
1639 | proto.RegisterType((*TestAllTypes)(nil), "conformance.TestAllTypes") | |
1640 | proto.RegisterMapType((map[bool]bool)(nil), "conformance.TestAllTypes.MapBoolBoolEntry") | |
1641 | proto.RegisterMapType((map[uint32]uint32)(nil), "conformance.TestAllTypes.MapFixed32Fixed32Entry") | |
1642 | proto.RegisterMapType((map[uint64]uint64)(nil), "conformance.TestAllTypes.MapFixed64Fixed64Entry") | |
1643 | proto.RegisterMapType((map[int32]float64)(nil), "conformance.TestAllTypes.MapInt32DoubleEntry") | |
1644 | proto.RegisterMapType((map[int32]float32)(nil), "conformance.TestAllTypes.MapInt32FloatEntry") | |
1645 | proto.RegisterMapType((map[int32]int32)(nil), "conformance.TestAllTypes.MapInt32Int32Entry") | |
1646 | proto.RegisterMapType((map[int64]int64)(nil), "conformance.TestAllTypes.MapInt64Int64Entry") | |
1647 | proto.RegisterMapType((map[int32]int32)(nil), "conformance.TestAllTypes.MapSfixed32Sfixed32Entry") | |
1648 | proto.RegisterMapType((map[int64]int64)(nil), "conformance.TestAllTypes.MapSfixed64Sfixed64Entry") | |
1649 | proto.RegisterMapType((map[int32]int32)(nil), "conformance.TestAllTypes.MapSint32Sint32Entry") | |
1650 | proto.RegisterMapType((map[int64]int64)(nil), "conformance.TestAllTypes.MapSint64Sint64Entry") | |
1651 | proto.RegisterMapType((map[string][]byte)(nil), "conformance.TestAllTypes.MapStringBytesEntry") | |
1652 | proto.RegisterMapType((map[string]ForeignEnum)(nil), "conformance.TestAllTypes.MapStringForeignEnumEntry") | |
1653 | proto.RegisterMapType((map[string]*ForeignMessage)(nil), "conformance.TestAllTypes.MapStringForeignMessageEntry") | |
1654 | proto.RegisterMapType((map[string]TestAllTypes_NestedEnum)(nil), "conformance.TestAllTypes.MapStringNestedEnumEntry") | |
1655 | proto.RegisterMapType((map[string]*TestAllTypes_NestedMessage)(nil), "conformance.TestAllTypes.MapStringNestedMessageEntry") | |
1656 | proto.RegisterMapType((map[string]string)(nil), "conformance.TestAllTypes.MapStringStringEntry") | |
1657 | proto.RegisterMapType((map[uint32]uint32)(nil), "conformance.TestAllTypes.MapUint32Uint32Entry") | |
1658 | proto.RegisterMapType((map[uint64]uint64)(nil), "conformance.TestAllTypes.MapUint64Uint64Entry") | |
1659 | proto.RegisterType((*TestAllTypes_NestedMessage)(nil), "conformance.TestAllTypes.NestedMessage") | |
1660 | proto.RegisterType((*ForeignMessage)(nil), "conformance.ForeignMessage") | |
1661 | proto.RegisterEnum("conformance.WireFormat", WireFormat_name, WireFormat_value) | |
1662 | proto.RegisterEnum("conformance.ForeignEnum", ForeignEnum_name, ForeignEnum_value) | |
1663 | proto.RegisterEnum("conformance.TestAllTypes_NestedEnum", TestAllTypes_NestedEnum_name, TestAllTypes_NestedEnum_value) | |
1664 | } | |
1665 | ||
1666 | func init() { proto.RegisterFile("conformance.proto", fileDescriptor_conformance_48ac832451f5d6c3) } | |
1667 | ||
1668 | var fileDescriptor_conformance_48ac832451f5d6c3 = []byte{ | |
1669 | // 2600 bytes of a gzipped FileDescriptorProto | |
1670 | 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x5a, 0x5b, 0x73, 0x13, 0xc9, | |
1671 | 0x15, 0xf6, 0x68, 0xc0, 0x36, 0x2d, 0xd9, 0x96, 0xdb, 0xb7, 0xc6, 0x50, 0xcb, 0x60, 0x96, 0x20, | |
1672 | 0x60, 0xd7, 0xeb, 0xcb, 0x30, 0x5c, 0x36, 0x4b, 0xb0, 0xc0, 0x02, 0x93, 0xc5, 0xa2, 0xc6, 0x78, | |
1673 | 0xa9, 0x22, 0x0f, 0xca, 0x20, 0x8f, 0x5d, 0x5a, 0x24, 0x8d, 0x76, 0x66, 0xb4, 0x89, 0xf3, 0x98, | |
1674 | 0x7f, 0x90, 0xfb, 0xf5, 0x2f, 0xe4, 0x5a, 0x95, 0x4a, 0x52, 0xc9, 0x53, 0x2a, 0x2f, 0xb9, 0x27, | |
1675 | 0x95, 0x7b, 0xf2, 0x63, 0x92, 0xea, 0xeb, 0x74, 0xb7, 0x7a, 0x64, 0xb1, 0x55, 0x2b, 0x5b, 0xa7, | |
1676 | 0xbf, 0xfe, 0xce, 0xe9, 0xd3, 0x67, 0xbe, 0x76, 0x9f, 0x01, 0xcc, 0x36, 0xa3, 0xee, 0x61, 0x14, | |
1677 | 0x77, 0x82, 0x6e, 0x33, 0x5c, 0xed, 0xc5, 0x51, 0x1a, 0xc1, 0xa2, 0x64, 0x5a, 0x3e, 0x7b, 0x14, | |
1678 | 0x45, 0x47, 0xed, 0xf0, 0x1d, 0x32, 0xf4, 0xb2, 0x7f, 0xf8, 0x4e, 0xd0, 0x3d, 0xa6, 0xb8, 0xe5, | |
1679 | 0x37, 0xf4, 0xa1, 0x83, 0x7e, 0x1c, 0xa4, 0xad, 0xa8, 0xcb, 0xc6, 0x1d, 0x7d, 0xfc, 0xb0, 0x15, | |
1680 | 0xb6, 0x0f, 0x1a, 0x9d, 0x20, 0x79, 0xc5, 0x10, 0xe7, 0x75, 0x44, 0x92, 0xc6, 0xfd, 0x66, 0xca, | |
1681 | 0x46, 0x2f, 0xe8, 0xa3, 0x69, 0xab, 0x13, 0x26, 0x69, 0xd0, 0xe9, 0xe5, 0x05, 0xf0, 0xb9, 0x38, | |
1682 | 0xe8, 0xf5, 0xc2, 0x38, 0xa1, 0xe3, 0x2b, 0xbf, 0xb2, 0x00, 0xbc, 0x9f, 0xad, 0xc5, 0x0f, 0x3f, | |
1683 | 0xea, 0x87, 0x49, 0x0a, 0xaf, 0x83, 0x32, 0x9f, 0xd1, 0xe8, 0x05, 0xc7, 0xed, 0x28, 0x38, 0x40, | |
1684 | 0x96, 0x63, 0x55, 0x4a, 0x8f, 0xc6, 0xfc, 0x19, 0x3e, 0xf2, 0x94, 0x0e, 0xc0, 0x4b, 0xa0, 0xf4, | |
1685 | 0x61, 0x12, 0x75, 0x05, 0xb0, 0xe0, 0x58, 0x95, 0x33, 0x8f, 0xc6, 0xfc, 0x22, 0xb6, 0x72, 0x50, | |
1686 | 0x1d, 0x2c, 0xc5, 0x94, 0x3c, 0x3c, 0x68, 0x44, 0xfd, 0xb4, 0xd7, 0x4f, 0x1b, 0xc4, 0x6b, 0x8a, | |
1687 | 0x6c, 0xc7, 0xaa, 0x4c, 0x6f, 0x2c, 0xad, 0xca, 0x69, 0x7e, 0xde, 0x8a, 0xc3, 0x1a, 0x19, 0xf6, | |
1688 | 0x17, 0xc4, 0xbc, 0x3a, 0x99, 0x46, 0xcd, 0xd5, 0x33, 0x60, 0x82, 0x39, 0x5c, 0xf9, 0x62, 0x01, | |
1689 | 0xcc, 0x29, 0x8b, 0x48, 0x7a, 0x51, 0x37, 0x09, 0xe1, 0x45, 0x50, 0xec, 0x05, 0x71, 0x12, 0x36, | |
1690 | 0xc2, 0x38, 0x8e, 0x62, 0xb2, 0x00, 0x1c, 0x17, 0x20, 0xc6, 0x6d, 0x6c, 0x83, 0x57, 0xc1, 0x4c, | |
1691 | 0x12, 0xc6, 0xad, 0xa0, 0xdd, 0xfa, 0x02, 0x87, 0x8d, 0x33, 0xd8, 0xb4, 0x18, 0xa0, 0xd0, 0xcb, | |
1692 | 0x60, 0x2a, 0xee, 0x77, 0x71, 0x82, 0x19, 0x90, 0xaf, 0xb3, 0xc4, 0xcc, 0x14, 0x66, 0x4a, 0x9d, | |
1693 | 0x3d, 0x6a, 0xea, 0x4e, 0x99, 0x52, 0xb7, 0x0c, 0x26, 0x92, 0x57, 0xad, 0x5e, 0x2f, 0x3c, 0x40, | |
1694 | 0xa7, 0xd9, 0x38, 0x37, 0x54, 0x27, 0xc1, 0x78, 0x1c, 0x26, 0xfd, 0x76, 0xba, 0xf2, 0x93, 0xfb, | |
1695 | 0xa0, 0xf4, 0x2c, 0x4c, 0xd2, 0xad, 0x76, 0xfb, 0xd9, 0x71, 0x2f, 0x4c, 0xe0, 0x65, 0x30, 0x1d, | |
1696 | 0xf5, 0x70, 0xad, 0x05, 0xed, 0x46, 0xab, 0x9b, 0x6e, 0x6e, 0x90, 0x04, 0x9c, 0xf6, 0xa7, 0xb8, | |
1697 | 0x75, 0x07, 0x1b, 0x75, 0x98, 0xe7, 0x92, 0x75, 0xd9, 0x0a, 0xcc, 0x73, 0xe1, 0x15, 0x30, 0x23, | |
1698 | 0x60, 0x7d, 0x4a, 0x87, 0x57, 0x35, 0xe5, 0x8b, 0xd9, 0xfb, 0xc4, 0x3a, 0x00, 0xf4, 0x5c, 0xb2, | |
1699 | 0xaa, 0x53, 0x2a, 0x50, 0x63, 0x4c, 0x28, 0x23, 0x5e, 0xde, 0x6c, 0x06, 0xdc, 0x1b, 0x64, 0x4c, | |
1700 | 0x28, 0x23, 0xde, 0x23, 0xa8, 0x02, 0x3d, 0x17, 0x5e, 0x05, 0x65, 0x01, 0x3c, 0x6c, 0x7d, 0x3e, | |
1701 | 0x3c, 0xd8, 0xdc, 0x40, 0x13, 0x8e, 0x55, 0x99, 0xf0, 0x05, 0x41, 0x8d, 0x9a, 0x07, 0xa1, 0x9e, | |
1702 | 0x8b, 0x26, 0x1d, 0xab, 0x32, 0xae, 0x41, 0x3d, 0x17, 0x5e, 0x07, 0xb3, 0x99, 0x7b, 0x4e, 0x7b, | |
1703 | 0xc6, 0xb1, 0x2a, 0x33, 0xbe, 0xe0, 0xd8, 0x63, 0x76, 0x03, 0xd8, 0x73, 0x11, 0x70, 0xac, 0x4a, | |
1704 | 0x59, 0x07, 0x7b, 0xae, 0x92, 0xfa, 0xc3, 0x76, 0x14, 0xa4, 0xa8, 0xe8, 0x58, 0x95, 0x42, 0x96, | |
1705 | 0xfa, 0x1a, 0x36, 0x2a, 0xeb, 0x3f, 0x88, 0xfa, 0x2f, 0xdb, 0x21, 0x2a, 0x39, 0x56, 0xc5, 0xca, | |
1706 | 0xd6, 0xff, 0x80, 0x58, 0xe1, 0x25, 0x20, 0x66, 0x36, 0x5e, 0x46, 0x51, 0x1b, 0x4d, 0x39, 0x56, | |
1707 | 0x65, 0xd2, 0x2f, 0x71, 0x63, 0x35, 0x8a, 0xda, 0x6a, 0x36, 0xd3, 0xb8, 0xd5, 0x3d, 0x42, 0xd3, | |
1708 | 0xb8, 0xaa, 0xa4, 0x6c, 0x12, 0xab, 0x12, 0xdd, 0xcb, 0xe3, 0x34, 0x4c, 0xd0, 0x0c, 0x2e, 0xe3, | |
1709 | 0x2c, 0xba, 0x2a, 0x36, 0xc2, 0x06, 0x58, 0x12, 0xb0, 0x2e, 0x7d, 0xbc, 0x3b, 0x61, 0x92, 0x04, | |
1710 | 0x47, 0x21, 0x82, 0x8e, 0x55, 0x29, 0x6e, 0x5c, 0x51, 0x1e, 0x6c, 0xb9, 0x44, 0x57, 0x77, 0x09, | |
1711 | 0xfe, 0x09, 0x85, 0xfb, 0x0b, 0x9c, 0x47, 0x31, 0xc3, 0x7d, 0x80, 0xb2, 0x2c, 0x45, 0x71, 0xd8, | |
1712 | 0x3a, 0xea, 0x0a, 0x0f, 0x73, 0xc4, 0xc3, 0x39, 0xc5, 0x43, 0x8d, 0x62, 0x38, 0xeb, 0xa2, 0x48, | |
1713 | 0xa6, 0x62, 0x87, 0x1f, 0x80, 0x79, 0x3d, 0xee, 0xb0, 0xdb, 0xef, 0xa0, 0x05, 0xa2, 0x46, 0x6f, | |
1714 | 0x9e, 0x14, 0xf4, 0x76, 0xb7, 0xdf, 0xf1, 0xa1, 0x1a, 0x31, 0xb6, 0xc1, 0xf7, 0xc1, 0xc2, 0x40, | |
1715 | 0xb8, 0x84, 0x78, 0x91, 0x10, 0x23, 0x53, 0xac, 0x84, 0x6c, 0x4e, 0x0b, 0x94, 0xb0, 0x79, 0x12, | |
1716 | 0x1b, 0xdd, 0xad, 0x46, 0xaf, 0x15, 0x36, 0x43, 0x84, 0xf0, 0x9e, 0x55, 0x0b, 0x93, 0x85, 0x6c, | |
1717 | 0x1e, 0xdd, 0xb7, 0xa7, 0x78, 0x18, 0x5e, 0x91, 0x4a, 0xa1, 0x19, 0xc5, 0x07, 0xe8, 0x2c, 0xc3, | |
1718 | 0x5b, 0x59, 0x39, 0xdc, 0x8f, 0xe2, 0x03, 0x58, 0x03, 0xb3, 0x71, 0xd8, 0xec, 0xc7, 0x49, 0xeb, | |
1719 | 0xe3, 0x50, 0xa4, 0xf5, 0x1c, 0x49, 0xeb, 0xd9, 0xdc, 0x1c, 0xf8, 0x65, 0x31, 0x87, 0xa7, 0xf3, | |
1720 | 0x32, 0x98, 0x8e, 0xc3, 0x5e, 0x18, 0xe0, 0x3c, 0xd2, 0x87, 0xf9, 0x82, 0x63, 0x63, 0xb5, 0xe1, | |
1721 | 0x56, 0xa1, 0x36, 0x32, 0xcc, 0x73, 0x91, 0xe3, 0xd8, 0x58, 0x6d, 0x24, 0x18, 0xd5, 0x06, 0x01, | |
1722 | 0x63, 0x6a, 0x73, 0xd1, 0xb1, 0xb1, 0xda, 0x70, 0x73, 0xa6, 0x36, 0x0a, 0xd0, 0x73, 0xd1, 0x8a, | |
1723 | 0x63, 0x63, 0xb5, 0x91, 0x81, 0x1a, 0x23, 0x53, 0x9b, 0x4b, 0x8e, 0x8d, 0xd5, 0x86, 0x9b, 0xf7, | |
1724 | 0x06, 0x19, 0x99, 0xda, 0xbc, 0xe9, 0xd8, 0x58, 0x6d, 0x64, 0x20, 0x55, 0x1b, 0x01, 0xe4, 0xb2, | |
1725 | 0x70, 0xd9, 0xb1, 0xb1, 0xda, 0x70, 0xbb, 0xa4, 0x36, 0x2a, 0xd4, 0x73, 0xd1, 0x27, 0x1c, 0x1b, | |
1726 | 0xab, 0x8d, 0x02, 0xa5, 0x6a, 0x93, 0xb9, 0xe7, 0xb4, 0x57, 0x1c, 0x1b, 0xab, 0x8d, 0x08, 0x40, | |
1727 | 0x52, 0x1b, 0x0d, 0xec, 0xb9, 0xa8, 0xe2, 0xd8, 0x58, 0x6d, 0x54, 0x30, 0x55, 0x9b, 0x2c, 0x08, | |
1728 | 0xa2, 0x36, 0x57, 0x1d, 0x1b, 0xab, 0x8d, 0x08, 0x81, 0xab, 0x8d, 0x80, 0x31, 0xb5, 0xb9, 0xe6, | |
1729 | 0xd8, 0x58, 0x6d, 0xb8, 0x39, 0x53, 0x1b, 0x01, 0x24, 0x6a, 0x73, 0xdd, 0xb1, 0xb1, 0xda, 0x70, | |
1730 | 0x23, 0x57, 0x9b, 0x2c, 0x42, 0xaa, 0x36, 0x6f, 0x39, 0x36, 0x56, 0x1b, 0x11, 0x9f, 0x50, 0x9b, | |
1731 | 0x8c, 0x8d, 0xa8, 0xcd, 0xdb, 0x8e, 0x8d, 0xd5, 0x46, 0xd0, 0x71, 0xb5, 0x11, 0x30, 0x4d, 0x6d, | |
1732 | 0xd6, 0x1c, 0xfb, 0xb5, 0xd4, 0x86, 0xf3, 0x0c, 0xa8, 0x4d, 0x96, 0x25, 0x4d, 0x6d, 0xd6, 0x89, | |
1733 | 0x87, 0xe1, 0x6a, 0x23, 0x92, 0x39, 0xa0, 0x36, 0x7a, 0xdc, 0x44, 0x14, 0x36, 0x1d, 0x7b, 0x74, | |
1734 | 0xb5, 0x51, 0x23, 0xe6, 0x6a, 0x33, 0x10, 0x2e, 0x21, 0x76, 0x09, 0xf1, 0x10, 0xb5, 0xd1, 0x02, | |
1735 | 0xe5, 0x6a, 0xa3, 0xed, 0x16, 0x53, 0x1b, 0x0f, 0xef, 0x19, 0x55, 0x1b, 0x75, 0xdf, 0x84, 0xda, | |
1736 | 0x88, 0x79, 0x44, 0x6d, 0x6e, 0x32, 0xbc, 0x95, 0x95, 0x03, 0x51, 0x9b, 0x67, 0x60, 0xa6, 0x13, | |
1737 | 0xf4, 0xa8, 0x40, 0x30, 0x99, 0xb8, 0x45, 0x92, 0xfa, 0x56, 0x7e, 0x06, 0x9e, 0x04, 0x3d, 0xa2, | |
1738 | 0x1d, 0xe4, 0x63, 0xbb, 0x9b, 0xc6, 0xc7, 0xfe, 0x54, 0x47, 0xb6, 0x49, 0xac, 0x9e, 0xcb, 0x54, | |
1739 | 0xe5, 0xf6, 0x68, 0xac, 0x9e, 0x4b, 0x3e, 0x14, 0x56, 0x66, 0x83, 0x2f, 0xc0, 0x2c, 0x66, 0xa5, | |
1740 | 0xf2, 0xc3, 0x55, 0xe8, 0x0e, 0xe1, 0x5d, 0x1d, 0xca, 0x4b, 0xa5, 0x89, 0x7e, 0x52, 0x66, 0x1c, | |
1741 | 0x9e, 0x6c, 0x95, 0xb9, 0x3d, 0x97, 0x0b, 0xd7, 0xbb, 0x23, 0x72, 0x7b, 0x2e, 0xfd, 0x54, 0xb9, | |
1742 | 0xb9, 0x95, 0x73, 0x53, 0x91, 0xe3, 0x5a, 0xf7, 0xc9, 0x11, 0xb8, 0xa9, 0x00, 0xee, 0x69, 0x71, | |
1743 | 0xcb, 0x56, 0x99, 0xdb, 0x73, 0xb9, 0x3c, 0xbe, 0x37, 0x22, 0xb7, 0xe7, 0xee, 0x69, 0x71, 0xcb, | |
1744 | 0x56, 0xf8, 0x59, 0x30, 0x87, 0xb9, 0x99, 0xb6, 0x09, 0x49, 0xbd, 0x4b, 0xd8, 0xd7, 0x86, 0xb2, | |
1745 | 0x33, 0x9d, 0x65, 0x3f, 0x28, 0x3f, 0x0e, 0x54, 0xb5, 0x2b, 0x1e, 0x3c, 0x57, 0x28, 0xf1, 0xa7, | |
1746 | 0x46, 0xf5, 0xe0, 0xb9, 0xec, 0x87, 0xe6, 0x41, 0xd8, 0xe1, 0x21, 0x58, 0x20, 0xf9, 0xe1, 0x8b, | |
1747 | 0x10, 0x0a, 0x7e, 0x8f, 0xf8, 0xd8, 0x18, 0x9e, 0x23, 0x06, 0xe6, 0x3f, 0xa9, 0x17, 0x1c, 0xb2, | |
1748 | 0x3e, 0xa2, 0xfa, 0xc1, 0x3b, 0xc1, 0xd7, 0xb2, 0x35, 0xb2, 0x1f, 0xcf, 0xe5, 0x3f, 0x75, 0x3f, | |
1749 | 0xd9, 0x88, 0xfa, 0xbc, 0xd2, 0x43, 0xa3, 0x3a, 0xea, 0xf3, 0x4a, 0x8e, 0x13, 0xed, 0x79, 0xa5, | |
1750 | 0x47, 0xcc, 0x73, 0x50, 0xce, 0x58, 0xd9, 0x19, 0x73, 0x9f, 0xd0, 0xbe, 0x7d, 0x32, 0x2d, 0x3d, | |
1751 | 0x7d, 0x28, 0xef, 0x74, 0x47, 0x31, 0xc2, 0x5d, 0x80, 0x3d, 0x91, 0xd3, 0x88, 0x1e, 0x49, 0x0f, | |
1752 | 0x08, 0xeb, 0xb5, 0xa1, 0xac, 0xf8, 0x9c, 0xc2, 0xff, 0x53, 0xca, 0x62, 0x27, 0xb3, 0x88, 0x72, | |
1753 | 0xa7, 0x52, 0xc8, 0xce, 0xaf, 0xed, 0x51, 0xca, 0x9d, 0x40, 0xe9, 0xa7, 0x54, 0xee, 0x92, 0x95, | |
1754 | 0x27, 0x81, 0x71, 0xd3, 0x23, 0xaf, 0x36, 0x42, 0x12, 0xe8, 0x74, 0x72, 0x1a, 0x66, 0x49, 0x90, | |
1755 | 0x8c, 0xb0, 0x07, 0xce, 0x4a, 0xc4, 0xda, 0x21, 0xf9, 0x90, 0x78, 0xb8, 0x31, 0x82, 0x07, 0xe5, | |
1756 | 0x58, 0xa4, 0x9e, 0x16, 0x3b, 0xc6, 0x41, 0x98, 0x80, 0x65, 0xc9, 0xa3, 0x7e, 0x6a, 0x3e, 0x22, | |
1757 | 0x2e, 0xbd, 0x11, 0x5c, 0xaa, 0x67, 0x26, 0xf5, 0xb9, 0xd4, 0x31, 0x8f, 0xc2, 0x23, 0xb0, 0x38, | |
1758 | 0xb8, 0x4c, 0x72, 0xf4, 0xed, 0x8c, 0xf2, 0x0c, 0x48, 0xcb, 0xc0, 0x47, 0x9f, 0xf4, 0x0c, 0x68, | |
1759 | 0x23, 0xf0, 0x43, 0xb0, 0x64, 0x58, 0x1d, 0xf1, 0xf4, 0x98, 0x78, 0xda, 0x1c, 0x7d, 0x69, 0x99, | |
1760 | 0xab, 0xf9, 0x8e, 0x61, 0x08, 0x5e, 0x02, 0xa5, 0xa8, 0x1b, 0x46, 0x87, 0xfc, 0xb8, 0x89, 0xf0, | |
1761 | 0x15, 0xfb, 0xd1, 0x98, 0x5f, 0x24, 0x56, 0x76, 0x78, 0x7c, 0x06, 0xcc, 0x53, 0x90, 0xb6, 0xb7, | |
1762 | 0xbd, 0xd7, 0xba, 0x6e, 0x3d, 0x1a, 0xf3, 0x21, 0xa1, 0x51, 0xf7, 0x52, 0x44, 0xc0, 0xaa, 0xfd, | |
1763 | 0x23, 0xde, 0x91, 0x20, 0x56, 0x56, 0xbb, 0x17, 0x01, 0xfd, 0xca, 0xca, 0x36, 0x66, 0xed, 0x0d, | |
1764 | 0x40, 0x8c, 0xb4, 0x0a, 0xeb, 0xd2, 0xc5, 0x85, 0x3c, 0x8f, 0xac, 0xf1, 0x84, 0x7e, 0x63, 0x91, | |
1765 | 0x30, 0x97, 0x57, 0x69, 0x67, 0x6a, 0x95, 0xb7, 0x44, 0x56, 0xf1, 0x13, 0xf7, 0x41, 0xd0, 0xee, | |
1766 | 0x87, 0xd9, 0x8d, 0x06, 0x9b, 0x9e, 0xd3, 0x79, 0xd0, 0x07, 0x8b, 0x6a, 0x3b, 0x43, 0x30, 0xfe, | |
1767 | 0xd6, 0x62, 0xb7, 0x40, 0x9d, 0x91, 0x48, 0x03, 0xa5, 0x9c, 0x57, 0x9a, 0x1e, 0x39, 0x9c, 0x9e, | |
1768 | 0x2b, 0x38, 0x7f, 0x37, 0x84, 0xd3, 0x73, 0x07, 0x39, 0x3d, 0x97, 0x73, 0xee, 0x4b, 0xf7, 0xe1, | |
1769 | 0xbe, 0x1a, 0xe8, 0xef, 0x29, 0xe9, 0xf9, 0x01, 0xd2, 0x7d, 0x29, 0xd2, 0x05, 0xb5, 0x9f, 0x92, | |
1770 | 0x47, 0x2b, 0xc5, 0xfa, 0x87, 0x61, 0xb4, 0x3c, 0xd8, 0x05, 0xb5, 0xfb, 0x62, 0xca, 0x00, 0xd1, | |
1771 | 0x77, 0xc1, 0xfa, 0xc7, 0xbc, 0x0c, 0x10, 0x0d, 0xd7, 0x32, 0x40, 0x6c, 0xa6, 0x50, 0xa9, 0xba, | |
1772 | 0x0b, 0xd2, 0x3f, 0xe5, 0x85, 0x4a, 0x05, 0x5c, 0x0b, 0x95, 0x1a, 0x4d, 0xb4, 0xec, 0x61, 0xe4, | |
1773 | 0xb4, 0x7f, 0xce, 0xa3, 0xa5, 0xf5, 0xaa, 0xd1, 0x52, 0xa3, 0x29, 0x03, 0xa4, 0x9c, 0x05, 0xeb, | |
1774 | 0x5f, 0xf2, 0x32, 0x40, 0x2a, 0x5c, 0xcb, 0x00, 0xb1, 0x71, 0xce, 0xba, 0xf4, 0x77, 0xb4, 0x52, | |
1775 | 0xfc, 0x7f, 0xb5, 0x88, 0x62, 0x0c, 0x2d, 0x7e, 0xf9, 0xfe, 0x24, 0x05, 0xa9, 0xde, 0xae, 0x05, | |
1776 | 0xe3, 0xdf, 0x2c, 0x76, 0x29, 0x19, 0x56, 0xfc, 0xca, 0x1d, 0x3c, 0x87, 0x53, 0x2a, 0xa8, 0xbf, | |
1777 | 0x0f, 0xe1, 0x14, 0xc5, 0xaf, 0x5c, 0xd8, 0xa5, 0x3d, 0xd2, 0xee, 0xed, 0x82, 0xf4, 0x1f, 0x94, | |
1778 | 0xf4, 0x84, 0xe2, 0x57, 0xaf, 0xf7, 0x79, 0xb4, 0x52, 0xac, 0xff, 0x1c, 0x46, 0x2b, 0x8a, 0x5f, | |
1779 | 0x6d, 0x06, 0x98, 0x32, 0xa0, 0x16, 0xff, 0xbf, 0xf2, 0x32, 0x20, 0x17, 0xbf, 0x72, 0x6f, 0x36, | |
1780 | 0x85, 0xaa, 0x15, 0xff, 0xbf, 0xf3, 0x42, 0x55, 0x8a, 0x5f, 0xbd, 0x65, 0x9b, 0x68, 0xb5, 0xe2, | |
1781 | 0xff, 0x4f, 0x1e, 0xad, 0x52, 0xfc, 0xea, 0xb5, 0xcd, 0x94, 0x01, 0xb5, 0xf8, 0xff, 0x9b, 0x97, | |
1782 | 0x01, 0xb9, 0xf8, 0x95, 0xbb, 0x39, 0xe7, 0x7c, 0x28, 0xb5, 0x40, 0xf9, 0xeb, 0x0e, 0xf4, 0xbd, | |
1783 | 0x02, 0x6b, 0x29, 0x0d, 0xac, 0x9d, 0x21, 0xb2, 0xf6, 0x28, 0xb7, 0xc0, 0xc7, 0x40, 0xf4, 0xd7, | |
1784 | 0x1a, 0xe2, 0xbd, 0x06, 0xfa, 0x7e, 0x21, 0xe7, 0xfc, 0x78, 0xc6, 0x21, 0xbe, 0xf0, 0x2f, 0x4c, | |
1785 | 0xf0, 0xd3, 0x60, 0x4e, 0xea, 0xf7, 0xf2, 0x77, 0x2c, 0xe8, 0x07, 0x79, 0x64, 0x35, 0x8c, 0x79, | |
1786 | 0x12, 0x24, 0xaf, 0x32, 0x32, 0x61, 0x82, 0x5b, 0x6a, 0x0b, 0xb5, 0xdf, 0x4c, 0xd1, 0x0f, 0x29, | |
1787 | 0xd1, 0x92, 0x69, 0x13, 0xfa, 0xcd, 0x54, 0x69, 0xae, 0xf6, 0x9b, 0x29, 0xbc, 0x05, 0x44, 0x1b, | |
1788 | 0xae, 0x11, 0x74, 0x8f, 0xd1, 0x8f, 0xe8, 0xfc, 0xf9, 0x81, 0xf9, 0x5b, 0xdd, 0x63, 0xbf, 0xc8, | |
1789 | 0xa1, 0x5b, 0xdd, 0x63, 0x78, 0x57, 0x6a, 0xcb, 0x7e, 0x8c, 0xb7, 0x01, 0xfd, 0x98, 0xce, 0x5d, | |
1790 | 0x1c, 0x98, 0x4b, 0x77, 0x49, 0x34, 0x02, 0xc9, 0x57, 0xbc, 0x3d, 0x59, 0x81, 0xf2, 0xed, 0xf9, | |
1791 | 0x69, 0x81, 0xec, 0xf6, 0xb0, 0xed, 0x11, 0x75, 0x29, 0x6d, 0x8f, 0x20, 0xca, 0xb6, 0xe7, 0x67, | |
1792 | 0x85, 0x1c, 0x85, 0x93, 0xb6, 0x87, 0x4f, 0xcb, 0xb6, 0x47, 0xe6, 0x22, 0xdb, 0x43, 0x76, 0xe7, | |
1793 | 0xe7, 0x79, 0x5c, 0xd2, 0xee, 0x64, 0xfd, 0x33, 0x36, 0x0b, 0xef, 0x8e, 0xfc, 0xa8, 0xe0, 0xdd, | |
1794 | 0xf9, 0x35, 0x25, 0xca, 0xdf, 0x1d, 0xe9, 0xe9, 0x60, 0xbb, 0x23, 0x28, 0xf0, 0xee, 0xfc, 0x82, | |
1795 | 0xce, 0xcf, 0xd9, 0x1d, 0x0e, 0x65, 0xbb, 0x23, 0x66, 0xd2, 0xdd, 0xf9, 0x25, 0x9d, 0x9b, 0xbb, | |
1796 | 0x3b, 0x1c, 0x4e, 0x77, 0xe7, 0x02, 0x00, 0x64, 0xfd, 0xdd, 0xa0, 0x13, 0xae, 0xa3, 0x2f, 0xd9, | |
1797 | 0xe4, 0x8d, 0x8d, 0x64, 0x82, 0x0e, 0x28, 0xd2, 0xfa, 0xc5, 0x5f, 0x37, 0xd0, 0x97, 0x65, 0xc4, | |
1798 | 0x2e, 0x36, 0xc1, 0x8b, 0xa0, 0xd4, 0xc8, 0x20, 0x9b, 0xe8, 0x2b, 0x0c, 0x52, 0xe3, 0x90, 0x4d, | |
1799 | 0xb8, 0x02, 0xa6, 0x28, 0x82, 0x40, 0xdc, 0x06, 0xfa, 0xaa, 0x4e, 0xe3, 0xe2, 0xbf, 0xf1, 0xc8, | |
1800 | 0xb7, 0x35, 0x0c, 0xb9, 0x81, 0xbe, 0x46, 0x11, 0xb2, 0x0d, 0x5e, 0xe2, 0x34, 0x6b, 0x84, 0xc7, | |
1801 | 0x43, 0x5f, 0x57, 0x40, 0x98, 0xc7, 0x13, 0x2b, 0xc2, 0xdf, 0x6e, 0xa2, 0x6f, 0xe8, 0x8e, 0x6e, | |
1802 | 0x62, 0x80, 0x08, 0xed, 0x16, 0xfa, 0xa6, 0x1e, 0xed, 0xad, 0x6c, 0xc9, 0xf8, 0xeb, 0x6d, 0xf4, | |
1803 | 0x2d, 0x9d, 0xe2, 0x36, 0x5c, 0x01, 0xa5, 0x9a, 0x40, 0xac, 0xaf, 0xa1, 0x6f, 0xb3, 0x38, 0x04, | |
1804 | 0xc9, 0xfa, 0x1a, 0xc1, 0xec, 0x6c, 0xbf, 0xff, 0xa0, 0xb1, 0xbb, 0xf5, 0x64, 0x7b, 0x7d, 0x1d, | |
1805 | 0x7d, 0x87, 0x63, 0xb0, 0x91, 0xda, 0x32, 0x0c, 0xc9, 0xf5, 0x06, 0xfa, 0xae, 0x82, 0x21, 0xb6, | |
1806 | 0xe5, 0x17, 0x60, 0x4a, 0xfd, 0x8b, 0xb9, 0x04, 0xac, 0x80, 0xbd, 0x5a, 0xb3, 0x02, 0xf8, 0x2e, | |
1807 | 0x28, 0x36, 0x23, 0xd1, 0x1d, 0x47, 0x85, 0x93, 0x3a, 0xe9, 0x32, 0x7a, 0xf9, 0x1e, 0x80, 0x83, | |
1808 | 0xdd, 0x2e, 0x58, 0x06, 0xf6, 0xab, 0xf0, 0x98, 0xb9, 0xc0, 0xbf, 0xc2, 0x79, 0x70, 0x9a, 0x16, | |
1809 | 0x57, 0x81, 0xd8, 0xe8, 0x97, 0x3b, 0x85, 0x5b, 0x56, 0xc6, 0x20, 0x77, 0xb6, 0x64, 0x06, 0xdb, | |
1810 | 0xc0, 0x60, 0xcb, 0x0c, 0x55, 0x30, 0x6f, 0xea, 0x61, 0xc9, 0x1c, 0x53, 0x06, 0x8e, 0x29, 0x33, | |
1811 | 0x87, 0xd2, 0xab, 0x92, 0x39, 0x4e, 0x19, 0x38, 0x4e, 0x0d, 0x72, 0x0c, 0xf4, 0xa4, 0x64, 0x8e, | |
1812 | 0x59, 0x03, 0xc7, 0xac, 0x99, 0x43, 0xe9, 0x3d, 0xc9, 0x1c, 0xd0, 0xc0, 0x01, 0x65, 0x8e, 0x07, | |
1813 | 0x60, 0xd1, 0xdc, 0x61, 0x92, 0x59, 0x26, 0x0c, 0x2c, 0x13, 0x39, 0x2c, 0x6a, 0x17, 0x49, 0x66, | |
1814 | 0x19, 0x37, 0xb0, 0x8c, 0xcb, 0x2c, 0x35, 0x80, 0xf2, 0xfa, 0x44, 0x32, 0xcf, 0x8c, 0x81, 0x67, | |
1815 | 0x26, 0x8f, 0x47, 0xeb, 0x03, 0xc9, 0x3c, 0x65, 0x03, 0x4f, 0xd9, 0x58, 0x6d, 0x72, 0xb7, 0xe7, | |
1816 | 0xa4, 0x7a, 0x2d, 0xc8, 0x0c, 0x5b, 0x60, 0xce, 0xd0, 0xd8, 0x39, 0x89, 0xc2, 0x92, 0x29, 0xee, | |
1817 | 0x82, 0xb2, 0xde, 0xc5, 0x91, 0xe7, 0x4f, 0x1a, 0xe6, 0x4f, 0x1a, 0x8a, 0x44, 0xef, 0xd8, 0xc8, | |
1818 | 0x1c, 0x67, 0x0c, 0x1c, 0x67, 0x06, 0x97, 0xa1, 0xb7, 0x66, 0x4e, 0xa2, 0x28, 0xc9, 0x14, 0x31, | |
1819 | 0x38, 0x37, 0xa4, 0xf7, 0x62, 0xa0, 0x7a, 0x4f, 0xa6, 0x7a, 0x8d, 0x17, 0x1f, 0x92, 0xcf, 0x23, | |
1820 | 0x70, 0x7e, 0x58, 0xf3, 0xc5, 0xe0, 0x74, 0x5d, 0x75, 0x3a, 0xf4, 0x5d, 0x88, 0xe4, 0xa8, 0x4d, | |
1821 | 0x0b, 0xce, 0xd4, 0x74, 0x31, 0x38, 0xb9, 0x23, 0x3b, 0x19, 0xf5, 0xed, 0x88, 0xe4, 0x2d, 0x00, | |
1822 | 0x67, 0x73, 0x1b, 0x2f, 0x06, 0x77, 0xab, 0xaa, 0xbb, 0xfc, 0x77, 0x26, 0x99, 0x8b, 0x95, 0xdb, | |
1823 | 0x00, 0x48, 0x2d, 0xa2, 0x09, 0x60, 0xd7, 0xea, 0xf5, 0xf2, 0x18, 0xfe, 0xa5, 0xba, 0xe5, 0x97, | |
1824 | 0x2d, 0xfa, 0xcb, 0x8b, 0x72, 0x01, 0xbb, 0xdb, 0xdd, 0x7e, 0x58, 0xfe, 0x1f, 0xff, 0xcf, 0xaa, | |
1825 | 0x4e, 0xf1, 0xe6, 0x09, 0x39, 0xc0, 0x56, 0xde, 0x00, 0xd3, 0x5a, 0x67, 0xab, 0x04, 0xac, 0x26, | |
1826 | 0x3f, 0x50, 0x9a, 0xd7, 0x6e, 0x00, 0x90, 0xfd, 0x63, 0x18, 0x38, 0x03, 0x8a, 0xfb, 0xbb, 0x7b, | |
1827 | 0x4f, 0xb7, 0xef, 0xef, 0xd4, 0x76, 0xb6, 0x1f, 0x94, 0xc7, 0x60, 0x09, 0x4c, 0x3e, 0xf5, 0xeb, | |
1828 | 0xcf, 0xea, 0xd5, 0xfd, 0x5a, 0xd9, 0x82, 0x93, 0xe0, 0xd4, 0xe3, 0xbd, 0xfa, 0x6e, 0xb9, 0x70, | |
1829 | 0xed, 0x1e, 0x28, 0xca, 0x8d, 0xa5, 0x19, 0x50, 0xac, 0xd5, 0xfd, 0xed, 0x9d, 0x87, 0xbb, 0x0d, | |
1830 | 0x1a, 0xa9, 0x64, 0xa0, 0x11, 0x2b, 0x86, 0x17, 0xe5, 0x42, 0xf5, 0x22, 0xb8, 0xd0, 0x8c, 0x3a, | |
1831 | 0x03, 0x7f, 0xb6, 0x48, 0xc9, 0x79, 0x39, 0x4e, 0xac, 0x9b, 0xff, 0x0f, 0x00, 0x00, 0xff, 0xff, | |
1832 | 0x29, 0x30, 0x51, 0x54, 0x22, 0x25, 0x00, 0x00, | |
1833 | } |
0 | // Protocol Buffers - Google's data interchange format | |
1 | // Copyright 2008 Google Inc. All rights reserved. | |
2 | // https://developers.google.com/protocol-buffers/ | |
3 | // | |
4 | // Redistribution and use in source and binary forms, with or without | |
5 | // modification, are permitted provided that the following conditions are | |
6 | // met: | |
7 | // | |
8 | // * Redistributions of source code must retain the above copyright | |
9 | // notice, this list of conditions and the following disclaimer. | |
10 | // * Redistributions in binary form must reproduce the above | |
11 | // copyright notice, this list of conditions and the following disclaimer | |
12 | // in the documentation and/or other materials provided with the | |
13 | // distribution. | |
14 | // * Neither the name of Google Inc. nor the names of its | |
15 | // contributors may be used to endorse or promote products derived from | |
16 | // this software without specific prior written permission. | |
17 | // | |
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | |
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | |
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | |
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | |
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | |
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | |
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | |
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | |
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | |
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | |
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |
29 | ||
30 | syntax = "proto3"; | |
31 | package conformance; | |
32 | option java_package = "com.google.protobuf.conformance"; | |
33 | ||
34 | import "google/protobuf/any.proto"; | |
35 | import "google/protobuf/duration.proto"; | |
36 | import "google/protobuf/field_mask.proto"; | |
37 | import "google/protobuf/struct.proto"; | |
38 | import "google/protobuf/timestamp.proto"; | |
39 | import "google/protobuf/wrappers.proto"; | |
40 | ||
41 | // This defines the conformance testing protocol. This protocol exists between | |
42 | // the conformance test suite itself and the code being tested. For each test, | |
43 | // the suite will send a ConformanceRequest message and expect a | |
44 | // ConformanceResponse message. | |
45 | // | |
46 | // You can either run the tests in two different ways: | |
47 | // | |
48 | // 1. in-process (using the interface in conformance_test.h). | |
49 | // | |
50 | // 2. as a sub-process communicating over a pipe. Information about how to | |
51 | // do this is in conformance_test_runner.cc. | |
52 | // | |
53 | // Pros/cons of the two approaches: | |
54 | // | |
55 | // - running as a sub-process is much simpler for languages other than C/C++. | |
56 | // | |
57 | // - running as a sub-process may be more tricky in unusual environments like | |
58 | // iOS apps, where fork/stdin/stdout are not available. | |
59 | ||
60 | enum WireFormat { | |
61 | UNSPECIFIED = 0; | |
62 | PROTOBUF = 1; | |
63 | JSON = 2; | |
64 | } | |
65 | ||
66 | // Represents a single test case's input. The testee should: | |
67 | // | |
68 | // 1. parse this proto (which should always succeed) | |
69 | // 2. parse the protobuf or JSON payload in "payload" (which may fail) | |
70 | // 3. if the parse succeeded, serialize the message in the requested format. | |
71 | message ConformanceRequest { | |
72 | // The payload (whether protobuf of JSON) is always for a TestAllTypes proto | |
73 | // (see below). | |
74 | oneof payload { | |
75 | bytes protobuf_payload = 1; | |
76 | string json_payload = 2; | |
77 | } | |
78 | ||
79 | // Which format should the testee serialize its message to? | |
80 | WireFormat requested_output_format = 3; | |
81 | } | |
82 | ||
83 | // Represents a single test case's output. | |
84 | message ConformanceResponse { | |
85 | oneof result { | |
86 | // This string should be set to indicate parsing failed. The string can | |
87 | // provide more information about the parse error if it is available. | |
88 | // | |
89 | // Setting this string does not necessarily mean the testee failed the | |
90 | // test. Some of the test cases are intentionally invalid input. | |
91 | string parse_error = 1; | |
92 | ||
93 | // If the input was successfully parsed but errors occurred when | |
94 | // serializing it to the requested output format, set the error message in | |
95 | // this field. | |
96 | string serialize_error = 6; | |
97 | ||
98 | // This should be set if some other error occurred. This will always | |
99 | // indicate that the test failed. The string can provide more information | |
100 | // about the failure. | |
101 | string runtime_error = 2; | |
102 | ||
103 | // If the input was successfully parsed and the requested output was | |
104 | // protobuf, serialize it to protobuf and set it in this field. | |
105 | bytes protobuf_payload = 3; | |
106 | ||
107 | // If the input was successfully parsed and the requested output was JSON, | |
108 | // serialize to JSON and set it in this field. | |
109 | string json_payload = 4; | |
110 | ||
111 | // For when the testee skipped the test, likely because a certain feature | |
112 | // wasn't supported, like JSON input/output. | |
113 | string skipped = 5; | |
114 | } | |
115 | } | |
116 | ||
117 | // This proto includes every type of field in both singular and repeated | |
118 | // forms. | |
119 | message TestAllTypes { | |
120 | message NestedMessage { | |
121 | int32 a = 1; | |
122 | TestAllTypes corecursive = 2; | |
123 | } | |
124 | ||
125 | enum NestedEnum { | |
126 | FOO = 0; | |
127 | BAR = 1; | |
128 | BAZ = 2; | |
129 | NEG = -1; // Intentionally negative. | |
130 | } | |
131 | ||
132 | // Singular | |
133 | int32 optional_int32 = 1; | |
134 | int64 optional_int64 = 2; | |
135 | uint32 optional_uint32 = 3; | |
136 | uint64 optional_uint64 = 4; | |
137 | sint32 optional_sint32 = 5; | |
138 | sint64 optional_sint64 = 6; | |
139 | fixed32 optional_fixed32 = 7; | |
140 | fixed64 optional_fixed64 = 8; | |
141 | sfixed32 optional_sfixed32 = 9; | |
142 | sfixed64 optional_sfixed64 = 10; | |
143 | float optional_float = 11; | |
144 | double optional_double = 12; | |
145 | bool optional_bool = 13; | |
146 | string optional_string = 14; | |
147 | bytes optional_bytes = 15; | |
148 | ||
149 | NestedMessage optional_nested_message = 18; | |
150 | ForeignMessage optional_foreign_message = 19; | |
151 | ||
152 | NestedEnum optional_nested_enum = 21; | |
153 | ForeignEnum optional_foreign_enum = 22; | |
154 | ||
155 | string optional_string_piece = 24 [ctype=STRING_PIECE]; | |
156 | string optional_cord = 25 [ctype=CORD]; | |
157 | ||
158 | TestAllTypes recursive_message = 27; | |
159 | ||
160 | // Repeated | |
161 | repeated int32 repeated_int32 = 31; | |
162 | repeated int64 repeated_int64 = 32; | |
163 | repeated uint32 repeated_uint32 = 33; | |
164 | repeated uint64 repeated_uint64 = 34; | |
165 | repeated sint32 repeated_sint32 = 35; | |
166 | repeated sint64 repeated_sint64 = 36; | |
167 | repeated fixed32 repeated_fixed32 = 37; | |
168 | repeated fixed64 repeated_fixed64 = 38; | |
169 | repeated sfixed32 repeated_sfixed32 = 39; | |
170 | repeated sfixed64 repeated_sfixed64 = 40; | |
171 | repeated float repeated_float = 41; | |
172 | repeated double repeated_double = 42; | |
173 | repeated bool repeated_bool = 43; | |
174 | repeated string repeated_string = 44; | |
175 | repeated bytes repeated_bytes = 45; | |
176 | ||
177 | repeated NestedMessage repeated_nested_message = 48; | |
178 | repeated ForeignMessage repeated_foreign_message = 49; | |
179 | ||
180 | repeated NestedEnum repeated_nested_enum = 51; | |
181 | repeated ForeignEnum repeated_foreign_enum = 52; | |
182 | ||
183 | repeated string repeated_string_piece = 54 [ctype=STRING_PIECE]; | |
184 | repeated string repeated_cord = 55 [ctype=CORD]; | |
185 | ||
186 | // Map | |
187 | map < int32, int32> map_int32_int32 = 56; | |
188 | map < int64, int64> map_int64_int64 = 57; | |
189 | map < uint32, uint32> map_uint32_uint32 = 58; | |
190 | map < uint64, uint64> map_uint64_uint64 = 59; | |
191 | map < sint32, sint32> map_sint32_sint32 = 60; | |
192 | map < sint64, sint64> map_sint64_sint64 = 61; | |
193 | map < fixed32, fixed32> map_fixed32_fixed32 = 62; | |
194 | map < fixed64, fixed64> map_fixed64_fixed64 = 63; | |
195 | map <sfixed32, sfixed32> map_sfixed32_sfixed32 = 64; | |
196 | map <sfixed64, sfixed64> map_sfixed64_sfixed64 = 65; | |
197 | map < int32, float> map_int32_float = 66; | |
198 | map < int32, double> map_int32_double = 67; | |
199 | map < bool, bool> map_bool_bool = 68; | |
200 | map < string, string> map_string_string = 69; | |
201 | map < string, bytes> map_string_bytes = 70; | |
202 | map < string, NestedMessage> map_string_nested_message = 71; | |
203 | map < string, ForeignMessage> map_string_foreign_message = 72; | |
204 | map < string, NestedEnum> map_string_nested_enum = 73; | |
205 | map < string, ForeignEnum> map_string_foreign_enum = 74; | |
206 | ||
207 | oneof oneof_field { | |
208 | uint32 oneof_uint32 = 111; | |
209 | NestedMessage oneof_nested_message = 112; | |
210 | string oneof_string = 113; | |
211 | bytes oneof_bytes = 114; | |
212 | } | |
213 | ||
214 | // Well-known types | |
215 | google.protobuf.BoolValue optional_bool_wrapper = 201; | |
216 | google.protobuf.Int32Value optional_int32_wrapper = 202; | |
217 | google.protobuf.Int64Value optional_int64_wrapper = 203; | |
218 | google.protobuf.UInt32Value optional_uint32_wrapper = 204; | |
219 | google.protobuf.UInt64Value optional_uint64_wrapper = 205; | |
220 | google.protobuf.FloatValue optional_float_wrapper = 206; | |
221 | google.protobuf.DoubleValue optional_double_wrapper = 207; | |
222 | google.protobuf.StringValue optional_string_wrapper = 208; | |
223 | google.protobuf.BytesValue optional_bytes_wrapper = 209; | |
224 | ||
225 | repeated google.protobuf.BoolValue repeated_bool_wrapper = 211; | |
226 | repeated google.protobuf.Int32Value repeated_int32_wrapper = 212; | |
227 | repeated google.protobuf.Int64Value repeated_int64_wrapper = 213; | |
228 | repeated google.protobuf.UInt32Value repeated_uint32_wrapper = 214; | |
229 | repeated google.protobuf.UInt64Value repeated_uint64_wrapper = 215; | |
230 | repeated google.protobuf.FloatValue repeated_float_wrapper = 216; | |
231 | repeated google.protobuf.DoubleValue repeated_double_wrapper = 217; | |
232 | repeated google.protobuf.StringValue repeated_string_wrapper = 218; | |
233 | repeated google.protobuf.BytesValue repeated_bytes_wrapper = 219; | |
234 | ||
235 | google.protobuf.Duration optional_duration = 301; | |
236 | google.protobuf.Timestamp optional_timestamp = 302; | |
237 | google.protobuf.FieldMask optional_field_mask = 303; | |
238 | google.protobuf.Struct optional_struct = 304; | |
239 | google.protobuf.Any optional_any = 305; | |
240 | google.protobuf.Value optional_value = 306; | |
241 | ||
242 | repeated google.protobuf.Duration repeated_duration = 311; | |
243 | repeated google.protobuf.Timestamp repeated_timestamp = 312; | |
244 | repeated google.protobuf.FieldMask repeated_fieldmask = 313; | |
245 | repeated google.protobuf.Struct repeated_struct = 324; | |
246 | repeated google.protobuf.Any repeated_any = 315; | |
247 | repeated google.protobuf.Value repeated_value = 316; | |
248 | ||
249 | // Test field-name-to-JSON-name convention. | |
250 | int32 fieldname1 = 401; | |
251 | int32 field_name2 = 402; | |
252 | int32 _field_name3 = 403; | |
253 | int32 field__name4_ = 404; | |
254 | int32 field0name5 = 405; | |
255 | int32 field_0_name6 = 406; | |
256 | int32 fieldName7 = 407; | |
257 | int32 FieldName8 = 408; | |
258 | int32 field_Name9 = 409; | |
259 | int32 Field_Name10 = 410; | |
260 | int32 FIELD_NAME11 = 411; | |
261 | int32 FIELD_name12 = 412; | |
262 | } | |
263 | ||
264 | message ForeignMessage { | |
265 | int32 c = 1; | |
266 | } | |
267 | ||
268 | enum ForeignEnum { | |
269 | FOREIGN_FOO = 0; | |
270 | FOREIGN_BAR = 1; | |
271 | FOREIGN_BAZ = 2; | |
272 | } |
0 | #!/bin/bash | |
1 | ||
2 | PROTOBUF_ROOT=$1 | |
3 | CONFORMANCE_ROOT=$1/conformance | |
4 | CONFORMANCE_TEST_RUNNER=$CONFORMANCE_ROOT/conformance-test-runner | |
5 | ||
6 | cd $(dirname $0) | |
7 | ||
8 | if [[ $PROTOBUF_ROOT == "" ]]; then | |
9 | echo "usage: test.sh <protobuf-root>" >/dev/stderr | |
10 | exit 1 | |
11 | fi | |
12 | ||
13 | if [[ ! -x $CONFORMANCE_TEST_RUNNER ]]; then | |
14 | echo "SKIP: conformance test runner not installed" >/dev/stderr | |
15 | exit 0 | |
16 | fi | |
17 | ||
18 | a=$CONFORMANCE_ROOT/conformance.proto | |
19 | b=internal/conformance_proto/conformance.proto | |
20 | if [[ $(diff $a $b) != "" ]]; then | |
21 | cp $a $b | |
22 | echo "WARNING: conformance.proto is out of date" >/dev/stderr | |
23 | fi | |
24 | ||
25 | $CONFORMANCE_TEST_RUNNER --failure_list failure_list_go.txt ./conformance.sh |
56 | 56 | ) |
57 | 57 | |
58 | 58 | const secondInNanos = int64(time.Second / time.Nanosecond) |
59 | const maxSecondsInDuration = 315576000000 | |
59 | 60 | |
60 | 61 | // Marshaler is a configurable object for converting between |
61 | 62 | // protocol buffer objects and a JSON representation for them. |
181 | 182 | return fmt.Errorf("failed to marshal type URL %q to JSON: %v", typeURL, err) |
182 | 183 | } |
183 | 184 | js["@type"] = (*json.RawMessage)(&turl) |
184 | if b, err = json.Marshal(js); err != nil { | |
185 | if m.Indent != "" { | |
186 | b, err = json.MarshalIndent(js, indent, m.Indent) | |
187 | } else { | |
188 | b, err = json.Marshal(js) | |
189 | } | |
190 | if err != nil { | |
185 | 191 | return err |
186 | 192 | } |
187 | 193 | } |
205 | 211 | // Any is a bit more involved. |
206 | 212 | return m.marshalAny(out, v, indent) |
207 | 213 | case "Duration": |
208 | // "Generated output always contains 0, 3, 6, or 9 fractional digits, | |
209 | // depending on required precision." | |
210 | 214 | s, ns := s.Field(0).Int(), s.Field(1).Int() |
215 | if s < -maxSecondsInDuration || s > maxSecondsInDuration { | |
216 | return fmt.Errorf("seconds out of range %v", s) | |
217 | } | |
211 | 218 | if ns <= -secondInNanos || ns >= secondInNanos { |
212 | 219 | return fmt.Errorf("ns out of range (%v, %v)", -secondInNanos, secondInNanos) |
213 | 220 | } |
214 | 221 | if (s > 0 && ns < 0) || (s < 0 && ns > 0) { |
215 | 222 | return errors.New("signs of seconds and nanos do not match") |
216 | 223 | } |
217 | if s < 0 { | |
224 | // Generated output always contains 0, 3, 6, or 9 fractional digits, | |
225 | // depending on required precision, followed by the suffix "s". | |
226 | f := "%d.%09d" | |
227 | if ns < 0 { | |
218 | 228 | ns = -ns |
219 | } | |
220 | x := fmt.Sprintf("%d.%09d", s, ns) | |
229 | if s == 0 { | |
230 | f = "-%d.%09d" | |
231 | } | |
232 | } | |
233 | x := fmt.Sprintf(f, s, ns) | |
221 | 234 | x = strings.TrimSuffix(x, "000") |
222 | 235 | x = strings.TrimSuffix(x, "000") |
223 | 236 | x = strings.TrimSuffix(x, ".000") |
472 | 472 | {"Any with message and indent", marshalerAllOptions, anySimple, anySimplePrettyJSON}, |
473 | 473 | {"Any with WKT", marshaler, anyWellKnown, anyWellKnownJSON}, |
474 | 474 | {"Any with WKT and indent", marshalerAllOptions, anyWellKnown, anyWellKnownPrettyJSON}, |
475 | {"Duration", marshaler, &pb.KnownTypes{Dur: &durpb.Duration{Seconds: 3}}, `{"dur":"3s"}`}, | |
476 | {"Duration", marshaler, &pb.KnownTypes{Dur: &durpb.Duration{Seconds: 3, Nanos: 1e6}}, `{"dur":"3.001s"}`}, | |
477 | {"Duration beyond float64 precision", marshaler, &pb.KnownTypes{Dur: &durpb.Duration{Seconds: 100000000, Nanos: 1}}, `{"dur":"100000000.000000001s"}`}, | |
478 | {"negative Duration", marshaler, &pb.KnownTypes{Dur: &durpb.Duration{Seconds: -123, Nanos: -456}}, `{"dur":"-123.000000456s"}`}, | |
475 | {"Duration empty", marshaler, &durpb.Duration{}, `"0s"`}, | |
476 | {"Duration with secs", marshaler, &durpb.Duration{Seconds: 3}, `"3s"`}, | |
477 | {"Duration with -secs", marshaler, &durpb.Duration{Seconds: -3}, `"-3s"`}, | |
478 | {"Duration with nanos", marshaler, &durpb.Duration{Nanos: 1e6}, `"0.001s"`}, | |
479 | {"Duration with -nanos", marshaler, &durpb.Duration{Nanos: -1e6}, `"-0.001s"`}, | |
480 | {"Duration with large secs", marshaler, &durpb.Duration{Seconds: 1e10, Nanos: 1}, `"10000000000.000000001s"`}, | |
481 | {"Duration with 6-digit nanos", marshaler, &durpb.Duration{Nanos: 1e4}, `"0.000010s"`}, | |
482 | {"Duration with 3-digit nanos", marshaler, &durpb.Duration{Nanos: 1e6}, `"0.001s"`}, | |
483 | {"Duration with -secs -nanos", marshaler, &durpb.Duration{Seconds: -123, Nanos: -450}, `"-123.000000450s"`}, | |
484 | {"Duration max value", marshaler, &durpb.Duration{Seconds: 315576000000, Nanos: 999999999}, `"315576000000.999999999s"`}, | |
485 | {"Duration min value", marshaler, &durpb.Duration{Seconds: -315576000000, Nanos: -999999999}, `"-315576000000.999999999s"`}, | |
479 | 486 | {"Struct", marshaler, &pb.KnownTypes{St: &stpb.Struct{ |
480 | 487 | Fields: map[string]*stpb.Value{ |
481 | 488 | "one": {Kind: &stpb.Value_StringValue{"loneliest number"}}, |
548 | 555 | pb proto.Message |
549 | 556 | fail bool |
550 | 557 | }{ |
551 | {&pb.KnownTypes{Dur: &durpb.Duration{Seconds: 1, Nanos: 0}}, false}, | |
552 | {&pb.KnownTypes{Dur: &durpb.Duration{Seconds: -1, Nanos: 0}}, false}, | |
553 | {&pb.KnownTypes{Dur: &durpb.Duration{Seconds: 1, Nanos: -1}}, true}, | |
554 | {&pb.KnownTypes{Dur: &durpb.Duration{Seconds: -1, Nanos: 1}}, true}, | |
555 | {&pb.KnownTypes{Dur: &durpb.Duration{Seconds: 1, Nanos: 1000000000}}, true}, | |
556 | {&pb.KnownTypes{Dur: &durpb.Duration{Seconds: -1, Nanos: -1000000000}}, true}, | |
557 | {&pb.KnownTypes{Ts: &tspb.Timestamp{Seconds: 1, Nanos: 1}}, false}, | |
558 | {&pb.KnownTypes{Ts: &tspb.Timestamp{Seconds: 1, Nanos: -1}}, true}, | |
559 | {&pb.KnownTypes{Ts: &tspb.Timestamp{Seconds: 1, Nanos: 1000000000}}, true}, | |
558 | {&durpb.Duration{Seconds: 1, Nanos: 0}, false}, | |
559 | {&durpb.Duration{Seconds: -1, Nanos: 0}, false}, | |
560 | {&durpb.Duration{Seconds: 1, Nanos: -1}, true}, | |
561 | {&durpb.Duration{Seconds: -1, Nanos: 1}, true}, | |
562 | {&durpb.Duration{Seconds: 315576000001}, true}, | |
563 | {&durpb.Duration{Seconds: -315576000001}, true}, | |
564 | {&durpb.Duration{Seconds: 1, Nanos: 1000000000}, true}, | |
565 | {&durpb.Duration{Seconds: -1, Nanos: -1000000000}, true}, | |
566 | {&tspb.Timestamp{Seconds: 1, Nanos: 1}, false}, | |
567 | {&tspb.Timestamp{Seconds: 1, Nanos: -1}, true}, | |
568 | {&tspb.Timestamp{Seconds: 1, Nanos: 1000000000}, true}, | |
560 | 569 | } |
561 | 570 | for _, tt := range tests { |
562 | 571 | _, err := marshaler.MarshalToString(tt.pb) |
594 | 603 | // after custom marshaling, it's round-tripped through JSON decoding/encoding already, |
595 | 604 | // so the keys are sorted, whitespace is compacted, and "@type" key has been added |
596 | 605 | expected := `{"@type":"type.googleapis.com/` + dynamicMessageName + `","baz":[0,1,2,3],"foo":"bar"}` |
606 | if str != expected { | |
607 | t.Errorf("marshalling JSON produced incorrect output: got %s, wanted %s", str, expected) | |
608 | } | |
609 | ||
610 | // Do it again, but this time with indentation: | |
611 | ||
612 | marshaler := Marshaler{Indent: " "} | |
613 | str, err = marshaler.MarshalToString(a) | |
614 | if err != nil { | |
615 | t.Errorf("an unexpected error occurred when marshalling Any to JSON: %v", err) | |
616 | } | |
617 | // same as expected above, but pretty-printed w/ indentation | |
618 | expected = `{ | |
619 | "@type": "type.googleapis.com/` + dynamicMessageName + `", | |
620 | "baz": [ | |
621 | 0, | |
622 | 1, | |
623 | 2, | |
624 | 3 | |
625 | ], | |
626 | "foo": "bar" | |
627 | }` | |
597 | 628 | if str != expected { |
598 | 629 | t.Errorf("marshalling JSON produced incorrect output: got %s, wanted %s", str, expected) |
599 | 630 | } |
2 | 2 | |
3 | 3 | package jsonpb |
4 | 4 | |
5 | import proto "github.com/golang/protobuf/proto" | |
6 | import fmt "fmt" | |
7 | import math "math" | |
5 | import ( | |
6 | fmt "fmt" | |
7 | proto "github.com/golang/protobuf/proto" | |
8 | math "math" | |
9 | ) | |
8 | 10 | |
9 | 11 | // Reference imports to suppress errors if they are not otherwise used. |
10 | 12 | var _ = proto.Marshal |
15 | 17 | // is compatible with the proto package it is being compiled against. |
16 | 18 | // A compilation error at this line likely means your copy of the |
17 | 19 | // proto package needs to be updated. |
18 | const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package | |
20 | const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package | |
19 | 21 | |
20 | 22 | type Numeral int32 |
21 | 23 | |
30 | 32 | 1: "ARABIC", |
31 | 33 | 2: "ROMAN", |
32 | 34 | } |
35 | ||
33 | 36 | var Numeral_value = map[string]int32{ |
34 | 37 | "UNKNOWN": 0, |
35 | 38 | "ARABIC": 1, |
39 | 42 | func (x Numeral) String() string { |
40 | 43 | return proto.EnumName(Numeral_name, int32(x)) |
41 | 44 | } |
45 | ||
42 | 46 | func (Numeral) EnumDescriptor() ([]byte, []int) { |
43 | return fileDescriptor_more_test_objects_bef0d79b901f4c4a, []int{0} | |
47 | return fileDescriptor_e6c135db3023e377, []int{0} | |
44 | 48 | } |
45 | 49 | |
46 | 50 | type Simple3 struct { |
54 | 58 | func (m *Simple3) String() string { return proto.CompactTextString(m) } |
55 | 59 | func (*Simple3) ProtoMessage() {} |
56 | 60 | func (*Simple3) Descriptor() ([]byte, []int) { |
57 | return fileDescriptor_more_test_objects_bef0d79b901f4c4a, []int{0} | |
58 | } | |
61 | return fileDescriptor_e6c135db3023e377, []int{0} | |
62 | } | |
63 | ||
59 | 64 | func (m *Simple3) XXX_Unmarshal(b []byte) error { |
60 | 65 | return xxx_messageInfo_Simple3.Unmarshal(m, b) |
61 | 66 | } |
62 | 67 | func (m *Simple3) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
63 | 68 | return xxx_messageInfo_Simple3.Marshal(b, m, deterministic) |
64 | 69 | } |
65 | func (dst *Simple3) XXX_Merge(src proto.Message) { | |
66 | xxx_messageInfo_Simple3.Merge(dst, src) | |
70 | func (m *Simple3) XXX_Merge(src proto.Message) { | |
71 | xxx_messageInfo_Simple3.Merge(m, src) | |
67 | 72 | } |
68 | 73 | func (m *Simple3) XXX_Size() int { |
69 | 74 | return xxx_messageInfo_Simple3.Size(m) |
92 | 97 | func (m *SimpleSlice3) String() string { return proto.CompactTextString(m) } |
93 | 98 | func (*SimpleSlice3) ProtoMessage() {} |
94 | 99 | func (*SimpleSlice3) Descriptor() ([]byte, []int) { |
95 | return fileDescriptor_more_test_objects_bef0d79b901f4c4a, []int{1} | |
96 | } | |
100 | return fileDescriptor_e6c135db3023e377, []int{1} | |
101 | } | |
102 | ||
97 | 103 | func (m *SimpleSlice3) XXX_Unmarshal(b []byte) error { |
98 | 104 | return xxx_messageInfo_SimpleSlice3.Unmarshal(m, b) |
99 | 105 | } |
100 | 106 | func (m *SimpleSlice3) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
101 | 107 | return xxx_messageInfo_SimpleSlice3.Marshal(b, m, deterministic) |
102 | 108 | } |
103 | func (dst *SimpleSlice3) XXX_Merge(src proto.Message) { | |
104 | xxx_messageInfo_SimpleSlice3.Merge(dst, src) | |
109 | func (m *SimpleSlice3) XXX_Merge(src proto.Message) { | |
110 | xxx_messageInfo_SimpleSlice3.Merge(m, src) | |
105 | 111 | } |
106 | 112 | func (m *SimpleSlice3) XXX_Size() int { |
107 | 113 | return xxx_messageInfo_SimpleSlice3.Size(m) |
130 | 136 | func (m *SimpleMap3) String() string { return proto.CompactTextString(m) } |
131 | 137 | func (*SimpleMap3) ProtoMessage() {} |
132 | 138 | func (*SimpleMap3) Descriptor() ([]byte, []int) { |
133 | return fileDescriptor_more_test_objects_bef0d79b901f4c4a, []int{2} | |
134 | } | |
139 | return fileDescriptor_e6c135db3023e377, []int{2} | |
140 | } | |
141 | ||
135 | 142 | func (m *SimpleMap3) XXX_Unmarshal(b []byte) error { |
136 | 143 | return xxx_messageInfo_SimpleMap3.Unmarshal(m, b) |
137 | 144 | } |
138 | 145 | func (m *SimpleMap3) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
139 | 146 | return xxx_messageInfo_SimpleMap3.Marshal(b, m, deterministic) |
140 | 147 | } |
141 | func (dst *SimpleMap3) XXX_Merge(src proto.Message) { | |
142 | xxx_messageInfo_SimpleMap3.Merge(dst, src) | |
148 | func (m *SimpleMap3) XXX_Merge(src proto.Message) { | |
149 | xxx_messageInfo_SimpleMap3.Merge(m, src) | |
143 | 150 | } |
144 | 151 | func (m *SimpleMap3) XXX_Size() int { |
145 | 152 | return xxx_messageInfo_SimpleMap3.Size(m) |
168 | 175 | func (m *SimpleNull3) String() string { return proto.CompactTextString(m) } |
169 | 176 | func (*SimpleNull3) ProtoMessage() {} |
170 | 177 | func (*SimpleNull3) Descriptor() ([]byte, []int) { |
171 | return fileDescriptor_more_test_objects_bef0d79b901f4c4a, []int{3} | |
172 | } | |
178 | return fileDescriptor_e6c135db3023e377, []int{3} | |
179 | } | |
180 | ||
173 | 181 | func (m *SimpleNull3) XXX_Unmarshal(b []byte) error { |
174 | 182 | return xxx_messageInfo_SimpleNull3.Unmarshal(m, b) |
175 | 183 | } |
176 | 184 | func (m *SimpleNull3) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
177 | 185 | return xxx_messageInfo_SimpleNull3.Marshal(b, m, deterministic) |
178 | 186 | } |
179 | func (dst *SimpleNull3) XXX_Merge(src proto.Message) { | |
180 | xxx_messageInfo_SimpleNull3.Merge(dst, src) | |
187 | func (m *SimpleNull3) XXX_Merge(src proto.Message) { | |
188 | xxx_messageInfo_SimpleNull3.Merge(m, src) | |
181 | 189 | } |
182 | 190 | func (m *SimpleNull3) XXX_Size() int { |
183 | 191 | return xxx_messageInfo_SimpleNull3.Size(m) |
215 | 223 | func (m *Mappy) String() string { return proto.CompactTextString(m) } |
216 | 224 | func (*Mappy) ProtoMessage() {} |
217 | 225 | func (*Mappy) Descriptor() ([]byte, []int) { |
218 | return fileDescriptor_more_test_objects_bef0d79b901f4c4a, []int{4} | |
219 | } | |
226 | return fileDescriptor_e6c135db3023e377, []int{4} | |
227 | } | |
228 | ||
220 | 229 | func (m *Mappy) XXX_Unmarshal(b []byte) error { |
221 | 230 | return xxx_messageInfo_Mappy.Unmarshal(m, b) |
222 | 231 | } |
223 | 232 | func (m *Mappy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
224 | 233 | return xxx_messageInfo_Mappy.Marshal(b, m, deterministic) |
225 | 234 | } |
226 | func (dst *Mappy) XXX_Merge(src proto.Message) { | |
227 | xxx_messageInfo_Mappy.Merge(dst, src) | |
235 | func (m *Mappy) XXX_Merge(src proto.Message) { | |
236 | xxx_messageInfo_Mappy.Merge(m, src) | |
228 | 237 | } |
229 | 238 | func (m *Mappy) XXX_Size() int { |
230 | 239 | return xxx_messageInfo_Mappy.Size(m) |
306 | 315 | } |
307 | 316 | |
308 | 317 | func init() { |
318 | proto.RegisterEnum("jsonpb.Numeral", Numeral_name, Numeral_value) | |
309 | 319 | proto.RegisterType((*Simple3)(nil), "jsonpb.Simple3") |
310 | 320 | proto.RegisterType((*SimpleSlice3)(nil), "jsonpb.SimpleSlice3") |
311 | 321 | proto.RegisterType((*SimpleMap3)(nil), "jsonpb.SimpleMap3") |
322 | 332 | proto.RegisterMapType((map[string]string)(nil), "jsonpb.Mappy.StrryEntry") |
323 | 333 | proto.RegisterMapType((map[uint32]bool)(nil), "jsonpb.Mappy.U32boolyEntry") |
324 | 334 | proto.RegisterMapType((map[uint64]bool)(nil), "jsonpb.Mappy.U64boolyEntry") |
325 | proto.RegisterEnum("jsonpb.Numeral", Numeral_name, Numeral_value) | |
326 | } | |
327 | ||
328 | func init() { | |
329 | proto.RegisterFile("more_test_objects.proto", fileDescriptor_more_test_objects_bef0d79b901f4c4a) | |
330 | } | |
331 | ||
332 | var fileDescriptor_more_test_objects_bef0d79b901f4c4a = []byte{ | |
335 | } | |
336 | ||
337 | func init() { proto.RegisterFile("more_test_objects.proto", fileDescriptor_e6c135db3023e377) } | |
338 | ||
339 | var fileDescriptor_e6c135db3023e377 = []byte{ | |
333 | 340 | // 526 bytes of a gzipped FileDescriptorProto |
334 | 341 | 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x94, 0xdd, 0x6b, 0xdb, 0x3c, |
335 | 342 | 0x14, 0x87, 0x5f, 0x27, 0xf5, 0xd7, 0x49, 0xfb, 0x2e, 0x88, 0xb1, 0x99, 0xf4, 0x62, 0xc5, 0xb0, |
2 | 2 | |
3 | 3 | package jsonpb |
4 | 4 | |
5 | import proto "github.com/golang/protobuf/proto" | |
6 | import fmt "fmt" | |
7 | import math "math" | |
8 | import any "github.com/golang/protobuf/ptypes/any" | |
9 | import duration "github.com/golang/protobuf/ptypes/duration" | |
10 | import _struct "github.com/golang/protobuf/ptypes/struct" | |
11 | import timestamp "github.com/golang/protobuf/ptypes/timestamp" | |
12 | import wrappers "github.com/golang/protobuf/ptypes/wrappers" | |
5 | import ( | |
6 | fmt "fmt" | |
7 | proto "github.com/golang/protobuf/proto" | |
8 | any "github.com/golang/protobuf/ptypes/any" | |
9 | duration "github.com/golang/protobuf/ptypes/duration" | |
10 | _struct "github.com/golang/protobuf/ptypes/struct" | |
11 | timestamp "github.com/golang/protobuf/ptypes/timestamp" | |
12 | wrappers "github.com/golang/protobuf/ptypes/wrappers" | |
13 | math "math" | |
14 | ) | |
13 | 15 | |
14 | 16 | // Reference imports to suppress errors if they are not otherwise used. |
15 | 17 | var _ = proto.Marshal |
20 | 22 | // is compatible with the proto package it is being compiled against. |
21 | 23 | // A compilation error at this line likely means your copy of the |
22 | 24 | // proto package needs to be updated. |
23 | const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package | |
25 | const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package | |
24 | 26 | |
25 | 27 | type Widget_Color int32 |
26 | 28 | |
35 | 37 | 1: "GREEN", |
36 | 38 | 2: "BLUE", |
37 | 39 | } |
40 | ||
38 | 41 | var Widget_Color_value = map[string]int32{ |
39 | 42 | "RED": 0, |
40 | 43 | "GREEN": 1, |
46 | 49 | *p = x |
47 | 50 | return p |
48 | 51 | } |
52 | ||
49 | 53 | func (x Widget_Color) String() string { |
50 | 54 | return proto.EnumName(Widget_Color_name, int32(x)) |
51 | 55 | } |
56 | ||
52 | 57 | func (x *Widget_Color) UnmarshalJSON(data []byte) error { |
53 | 58 | value, err := proto.UnmarshalJSONEnum(Widget_Color_value, data, "Widget_Color") |
54 | 59 | if err != nil { |
57 | 62 | *x = Widget_Color(value) |
58 | 63 | return nil |
59 | 64 | } |
65 | ||
60 | 66 | func (Widget_Color) EnumDescriptor() ([]byte, []int) { |
61 | return fileDescriptor_test_objects_a4d3e593ea3c686f, []int{3, 0} | |
67 | return fileDescriptor_e97c739a0ce14cc6, []int{3, 0} | |
62 | 68 | } |
63 | 69 | |
64 | 70 | // Test message for holding primitive types. |
91 | 97 | func (m *Simple) String() string { return proto.CompactTextString(m) } |
92 | 98 | func (*Simple) ProtoMessage() {} |
93 | 99 | func (*Simple) Descriptor() ([]byte, []int) { |
94 | return fileDescriptor_test_objects_a4d3e593ea3c686f, []int{0} | |
95 | } | |
100 | return fileDescriptor_e97c739a0ce14cc6, []int{0} | |
101 | } | |
102 | ||
96 | 103 | func (m *Simple) XXX_Unmarshal(b []byte) error { |
97 | 104 | return xxx_messageInfo_Simple.Unmarshal(m, b) |
98 | 105 | } |
99 | 106 | func (m *Simple) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
100 | 107 | return xxx_messageInfo_Simple.Marshal(b, m, deterministic) |
101 | 108 | } |
102 | func (dst *Simple) XXX_Merge(src proto.Message) { | |
103 | xxx_messageInfo_Simple.Merge(dst, src) | |
109 | func (m *Simple) XXX_Merge(src proto.Message) { | |
110 | xxx_messageInfo_Simple.Merge(m, src) | |
104 | 111 | } |
105 | 112 | func (m *Simple) XXX_Size() int { |
106 | 113 | return xxx_messageInfo_Simple.Size(m) |
261 | 268 | func (m *NonFinites) String() string { return proto.CompactTextString(m) } |
262 | 269 | func (*NonFinites) ProtoMessage() {} |
263 | 270 | func (*NonFinites) Descriptor() ([]byte, []int) { |
264 | return fileDescriptor_test_objects_a4d3e593ea3c686f, []int{1} | |
265 | } | |
271 | return fileDescriptor_e97c739a0ce14cc6, []int{1} | |
272 | } | |
273 | ||
266 | 274 | func (m *NonFinites) XXX_Unmarshal(b []byte) error { |
267 | 275 | return xxx_messageInfo_NonFinites.Unmarshal(m, b) |
268 | 276 | } |
269 | 277 | func (m *NonFinites) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
270 | 278 | return xxx_messageInfo_NonFinites.Marshal(b, m, deterministic) |
271 | 279 | } |
272 | func (dst *NonFinites) XXX_Merge(src proto.Message) { | |
273 | xxx_messageInfo_NonFinites.Merge(dst, src) | |
280 | func (m *NonFinites) XXX_Merge(src proto.Message) { | |
281 | xxx_messageInfo_NonFinites.Merge(m, src) | |
274 | 282 | } |
275 | 283 | func (m *NonFinites) XXX_Size() int { |
276 | 284 | return xxx_messageInfo_NonFinites.Size(m) |
345 | 353 | func (m *Repeats) String() string { return proto.CompactTextString(m) } |
346 | 354 | func (*Repeats) ProtoMessage() {} |
347 | 355 | func (*Repeats) Descriptor() ([]byte, []int) { |
348 | return fileDescriptor_test_objects_a4d3e593ea3c686f, []int{2} | |
349 | } | |
356 | return fileDescriptor_e97c739a0ce14cc6, []int{2} | |
357 | } | |
358 | ||
350 | 359 | func (m *Repeats) XXX_Unmarshal(b []byte) error { |
351 | 360 | return xxx_messageInfo_Repeats.Unmarshal(m, b) |
352 | 361 | } |
353 | 362 | func (m *Repeats) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
354 | 363 | return xxx_messageInfo_Repeats.Marshal(b, m, deterministic) |
355 | 364 | } |
356 | func (dst *Repeats) XXX_Merge(src proto.Message) { | |
357 | xxx_messageInfo_Repeats.Merge(dst, src) | |
365 | func (m *Repeats) XXX_Merge(src proto.Message) { | |
366 | xxx_messageInfo_Repeats.Merge(m, src) | |
358 | 367 | } |
359 | 368 | func (m *Repeats) XXX_Size() int { |
360 | 369 | return xxx_messageInfo_Repeats.Size(m) |
459 | 468 | func (m *Widget) String() string { return proto.CompactTextString(m) } |
460 | 469 | func (*Widget) ProtoMessage() {} |
461 | 470 | func (*Widget) Descriptor() ([]byte, []int) { |
462 | return fileDescriptor_test_objects_a4d3e593ea3c686f, []int{3} | |
463 | } | |
471 | return fileDescriptor_e97c739a0ce14cc6, []int{3} | |
472 | } | |
473 | ||
464 | 474 | func (m *Widget) XXX_Unmarshal(b []byte) error { |
465 | 475 | return xxx_messageInfo_Widget.Unmarshal(m, b) |
466 | 476 | } |
467 | 477 | func (m *Widget) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
468 | 478 | return xxx_messageInfo_Widget.Marshal(b, m, deterministic) |
469 | 479 | } |
470 | func (dst *Widget) XXX_Merge(src proto.Message) { | |
471 | xxx_messageInfo_Widget.Merge(dst, src) | |
480 | func (m *Widget) XXX_Merge(src proto.Message) { | |
481 | xxx_messageInfo_Widget.Merge(m, src) | |
472 | 482 | } |
473 | 483 | func (m *Widget) XXX_Size() int { |
474 | 484 | return xxx_messageInfo_Widget.Size(m) |
533 | 543 | func (m *Maps) String() string { return proto.CompactTextString(m) } |
534 | 544 | func (*Maps) ProtoMessage() {} |
535 | 545 | func (*Maps) Descriptor() ([]byte, []int) { |
536 | return fileDescriptor_test_objects_a4d3e593ea3c686f, []int{4} | |
537 | } | |
546 | return fileDescriptor_e97c739a0ce14cc6, []int{4} | |
547 | } | |
548 | ||
538 | 549 | func (m *Maps) XXX_Unmarshal(b []byte) error { |
539 | 550 | return xxx_messageInfo_Maps.Unmarshal(m, b) |
540 | 551 | } |
541 | 552 | func (m *Maps) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
542 | 553 | return xxx_messageInfo_Maps.Marshal(b, m, deterministic) |
543 | 554 | } |
544 | func (dst *Maps) XXX_Merge(src proto.Message) { | |
545 | xxx_messageInfo_Maps.Merge(dst, src) | |
555 | func (m *Maps) XXX_Merge(src proto.Message) { | |
556 | xxx_messageInfo_Maps.Merge(m, src) | |
546 | 557 | } |
547 | 558 | func (m *Maps) XXX_Size() int { |
548 | 559 | return xxx_messageInfo_Maps.Size(m) |
584 | 595 | func (m *MsgWithOneof) String() string { return proto.CompactTextString(m) } |
585 | 596 | func (*MsgWithOneof) ProtoMessage() {} |
586 | 597 | func (*MsgWithOneof) Descriptor() ([]byte, []int) { |
587 | return fileDescriptor_test_objects_a4d3e593ea3c686f, []int{5} | |
588 | } | |
598 | return fileDescriptor_e97c739a0ce14cc6, []int{5} | |
599 | } | |
600 | ||
589 | 601 | func (m *MsgWithOneof) XXX_Unmarshal(b []byte) error { |
590 | 602 | return xxx_messageInfo_MsgWithOneof.Unmarshal(m, b) |
591 | 603 | } |
592 | 604 | func (m *MsgWithOneof) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
593 | 605 | return xxx_messageInfo_MsgWithOneof.Marshal(b, m, deterministic) |
594 | 606 | } |
595 | func (dst *MsgWithOneof) XXX_Merge(src proto.Message) { | |
596 | xxx_messageInfo_MsgWithOneof.Merge(dst, src) | |
607 | func (m *MsgWithOneof) XXX_Merge(src proto.Message) { | |
608 | xxx_messageInfo_MsgWithOneof.Merge(m, src) | |
597 | 609 | } |
598 | 610 | func (m *MsgWithOneof) XXX_Size() int { |
599 | 611 | return xxx_messageInfo_MsgWithOneof.Size(m) |
680 | 692 | return nil |
681 | 693 | } |
682 | 694 | |
683 | // XXX_OneofFuncs is for the internal use of the proto package. | |
684 | func (*MsgWithOneof) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { | |
685 | return _MsgWithOneof_OneofMarshaler, _MsgWithOneof_OneofUnmarshaler, _MsgWithOneof_OneofSizer, []interface{}{ | |
695 | // XXX_OneofWrappers is for the internal use of the proto package. | |
696 | func (*MsgWithOneof) XXX_OneofWrappers() []interface{} { | |
697 | return []interface{}{ | |
686 | 698 | (*MsgWithOneof_Title)(nil), |
687 | 699 | (*MsgWithOneof_Salary)(nil), |
688 | 700 | (*MsgWithOneof_Country)(nil), |
689 | 701 | (*MsgWithOneof_HomeAddress)(nil), |
690 | 702 | (*MsgWithOneof_MsgWithRequired)(nil), |
691 | 703 | } |
692 | } | |
693 | ||
694 | func _MsgWithOneof_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { | |
695 | m := msg.(*MsgWithOneof) | |
696 | // union | |
697 | switch x := m.Union.(type) { | |
698 | case *MsgWithOneof_Title: | |
699 | b.EncodeVarint(1<<3 | proto.WireBytes) | |
700 | b.EncodeStringBytes(x.Title) | |
701 | case *MsgWithOneof_Salary: | |
702 | b.EncodeVarint(2<<3 | proto.WireVarint) | |
703 | b.EncodeVarint(uint64(x.Salary)) | |
704 | case *MsgWithOneof_Country: | |
705 | b.EncodeVarint(3<<3 | proto.WireBytes) | |
706 | b.EncodeStringBytes(x.Country) | |
707 | case *MsgWithOneof_HomeAddress: | |
708 | b.EncodeVarint(4<<3 | proto.WireBytes) | |
709 | b.EncodeStringBytes(x.HomeAddress) | |
710 | case *MsgWithOneof_MsgWithRequired: | |
711 | b.EncodeVarint(5<<3 | proto.WireBytes) | |
712 | if err := b.EncodeMessage(x.MsgWithRequired); err != nil { | |
713 | return err | |
714 | } | |
715 | case nil: | |
716 | default: | |
717 | return fmt.Errorf("MsgWithOneof.Union has unexpected type %T", x) | |
718 | } | |
719 | return nil | |
720 | } | |
721 | ||
722 | func _MsgWithOneof_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { | |
723 | m := msg.(*MsgWithOneof) | |
724 | switch tag { | |
725 | case 1: // union.title | |
726 | if wire != proto.WireBytes { | |
727 | return true, proto.ErrInternalBadWireType | |
728 | } | |
729 | x, err := b.DecodeStringBytes() | |
730 | m.Union = &MsgWithOneof_Title{x} | |
731 | return true, err | |
732 | case 2: // union.salary | |
733 | if wire != proto.WireVarint { | |
734 | return true, proto.ErrInternalBadWireType | |
735 | } | |
736 | x, err := b.DecodeVarint() | |
737 | m.Union = &MsgWithOneof_Salary{int64(x)} | |
738 | return true, err | |
739 | case 3: // union.Country | |
740 | if wire != proto.WireBytes { | |
741 | return true, proto.ErrInternalBadWireType | |
742 | } | |
743 | x, err := b.DecodeStringBytes() | |
744 | m.Union = &MsgWithOneof_Country{x} | |
745 | return true, err | |
746 | case 4: // union.home_address | |
747 | if wire != proto.WireBytes { | |
748 | return true, proto.ErrInternalBadWireType | |
749 | } | |
750 | x, err := b.DecodeStringBytes() | |
751 | m.Union = &MsgWithOneof_HomeAddress{x} | |
752 | return true, err | |
753 | case 5: // union.msg_with_required | |
754 | if wire != proto.WireBytes { | |
755 | return true, proto.ErrInternalBadWireType | |
756 | } | |
757 | msg := new(MsgWithRequired) | |
758 | err := b.DecodeMessage(msg) | |
759 | m.Union = &MsgWithOneof_MsgWithRequired{msg} | |
760 | return true, err | |
761 | default: | |
762 | return false, nil | |
763 | } | |
764 | } | |
765 | ||
766 | func _MsgWithOneof_OneofSizer(msg proto.Message) (n int) { | |
767 | m := msg.(*MsgWithOneof) | |
768 | // union | |
769 | switch x := m.Union.(type) { | |
770 | case *MsgWithOneof_Title: | |
771 | n += 1 // tag and wire | |
772 | n += proto.SizeVarint(uint64(len(x.Title))) | |
773 | n += len(x.Title) | |
774 | case *MsgWithOneof_Salary: | |
775 | n += 1 // tag and wire | |
776 | n += proto.SizeVarint(uint64(x.Salary)) | |
777 | case *MsgWithOneof_Country: | |
778 | n += 1 // tag and wire | |
779 | n += proto.SizeVarint(uint64(len(x.Country))) | |
780 | n += len(x.Country) | |
781 | case *MsgWithOneof_HomeAddress: | |
782 | n += 1 // tag and wire | |
783 | n += proto.SizeVarint(uint64(len(x.HomeAddress))) | |
784 | n += len(x.HomeAddress) | |
785 | case *MsgWithOneof_MsgWithRequired: | |
786 | s := proto.Size(x.MsgWithRequired) | |
787 | n += 1 // tag and wire | |
788 | n += proto.SizeVarint(uint64(s)) | |
789 | n += s | |
790 | case nil: | |
791 | default: | |
792 | panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) | |
793 | } | |
794 | return n | |
795 | 704 | } |
796 | 705 | |
797 | 706 | type Real struct { |
806 | 715 | func (m *Real) String() string { return proto.CompactTextString(m) } |
807 | 716 | func (*Real) ProtoMessage() {} |
808 | 717 | func (*Real) Descriptor() ([]byte, []int) { |
809 | return fileDescriptor_test_objects_a4d3e593ea3c686f, []int{6} | |
718 | return fileDescriptor_e97c739a0ce14cc6, []int{6} | |
810 | 719 | } |
811 | 720 | |
812 | 721 | var extRange_Real = []proto.ExtensionRange{ |
816 | 725 | func (*Real) ExtensionRangeArray() []proto.ExtensionRange { |
817 | 726 | return extRange_Real |
818 | 727 | } |
728 | ||
819 | 729 | func (m *Real) XXX_Unmarshal(b []byte) error { |
820 | 730 | return xxx_messageInfo_Real.Unmarshal(m, b) |
821 | 731 | } |
822 | 732 | func (m *Real) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
823 | 733 | return xxx_messageInfo_Real.Marshal(b, m, deterministic) |
824 | 734 | } |
825 | func (dst *Real) XXX_Merge(src proto.Message) { | |
826 | xxx_messageInfo_Real.Merge(dst, src) | |
735 | func (m *Real) XXX_Merge(src proto.Message) { | |
736 | xxx_messageInfo_Real.Merge(m, src) | |
827 | 737 | } |
828 | 738 | func (m *Real) XXX_Size() int { |
829 | 739 | return xxx_messageInfo_Real.Size(m) |
853 | 763 | func (m *Complex) String() string { return proto.CompactTextString(m) } |
854 | 764 | func (*Complex) ProtoMessage() {} |
855 | 765 | func (*Complex) Descriptor() ([]byte, []int) { |
856 | return fileDescriptor_test_objects_a4d3e593ea3c686f, []int{7} | |
766 | return fileDescriptor_e97c739a0ce14cc6, []int{7} | |
857 | 767 | } |
858 | 768 | |
859 | 769 | var extRange_Complex = []proto.ExtensionRange{ |
863 | 773 | func (*Complex) ExtensionRangeArray() []proto.ExtensionRange { |
864 | 774 | return extRange_Complex |
865 | 775 | } |
776 | ||
866 | 777 | func (m *Complex) XXX_Unmarshal(b []byte) error { |
867 | 778 | return xxx_messageInfo_Complex.Unmarshal(m, b) |
868 | 779 | } |
869 | 780 | func (m *Complex) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
870 | 781 | return xxx_messageInfo_Complex.Marshal(b, m, deterministic) |
871 | 782 | } |
872 | func (dst *Complex) XXX_Merge(src proto.Message) { | |
873 | xxx_messageInfo_Complex.Merge(dst, src) | |
783 | func (m *Complex) XXX_Merge(src proto.Message) { | |
784 | xxx_messageInfo_Complex.Merge(m, src) | |
874 | 785 | } |
875 | 786 | func (m *Complex) XXX_Size() int { |
876 | 787 | return xxx_messageInfo_Complex.Size(m) |
893 | 804 | ExtensionType: (*Complex)(nil), |
894 | 805 | Field: 123, |
895 | 806 | Name: "jsonpb.Complex.real_extension", |
896 | Tag: "bytes,123,opt,name=real_extension,json=realExtension", | |
807 | Tag: "bytes,123,opt,name=real_extension", | |
897 | 808 | Filename: "test_objects.proto", |
898 | 809 | } |
899 | 810 | |
922 | 833 | func (m *KnownTypes) String() string { return proto.CompactTextString(m) } |
923 | 834 | func (*KnownTypes) ProtoMessage() {} |
924 | 835 | func (*KnownTypes) Descriptor() ([]byte, []int) { |
925 | return fileDescriptor_test_objects_a4d3e593ea3c686f, []int{8} | |
926 | } | |
836 | return fileDescriptor_e97c739a0ce14cc6, []int{8} | |
837 | } | |
838 | ||
927 | 839 | func (m *KnownTypes) XXX_Unmarshal(b []byte) error { |
928 | 840 | return xxx_messageInfo_KnownTypes.Unmarshal(m, b) |
929 | 841 | } |
930 | 842 | func (m *KnownTypes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
931 | 843 | return xxx_messageInfo_KnownTypes.Marshal(b, m, deterministic) |
932 | 844 | } |
933 | func (dst *KnownTypes) XXX_Merge(src proto.Message) { | |
934 | xxx_messageInfo_KnownTypes.Merge(dst, src) | |
845 | func (m *KnownTypes) XXX_Merge(src proto.Message) { | |
846 | xxx_messageInfo_KnownTypes.Merge(m, src) | |
935 | 847 | } |
936 | 848 | func (m *KnownTypes) XXX_Size() int { |
937 | 849 | return xxx_messageInfo_KnownTypes.Size(m) |
1059 | 971 | func (m *MsgWithRequired) String() string { return proto.CompactTextString(m) } |
1060 | 972 | func (*MsgWithRequired) ProtoMessage() {} |
1061 | 973 | func (*MsgWithRequired) Descriptor() ([]byte, []int) { |
1062 | return fileDescriptor_test_objects_a4d3e593ea3c686f, []int{9} | |
1063 | } | |
974 | return fileDescriptor_e97c739a0ce14cc6, []int{9} | |
975 | } | |
976 | ||
1064 | 977 | func (m *MsgWithRequired) XXX_Unmarshal(b []byte) error { |
1065 | 978 | return xxx_messageInfo_MsgWithRequired.Unmarshal(m, b) |
1066 | 979 | } |
1067 | 980 | func (m *MsgWithRequired) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
1068 | 981 | return xxx_messageInfo_MsgWithRequired.Marshal(b, m, deterministic) |
1069 | 982 | } |
1070 | func (dst *MsgWithRequired) XXX_Merge(src proto.Message) { | |
1071 | xxx_messageInfo_MsgWithRequired.Merge(dst, src) | |
983 | func (m *MsgWithRequired) XXX_Merge(src proto.Message) { | |
984 | xxx_messageInfo_MsgWithRequired.Merge(m, src) | |
1072 | 985 | } |
1073 | 986 | func (m *MsgWithRequired) XXX_Size() int { |
1074 | 987 | return xxx_messageInfo_MsgWithRequired.Size(m) |
1099 | 1012 | func (m *MsgWithIndirectRequired) String() string { return proto.CompactTextString(m) } |
1100 | 1013 | func (*MsgWithIndirectRequired) ProtoMessage() {} |
1101 | 1014 | func (*MsgWithIndirectRequired) Descriptor() ([]byte, []int) { |
1102 | return fileDescriptor_test_objects_a4d3e593ea3c686f, []int{10} | |
1103 | } | |
1015 | return fileDescriptor_e97c739a0ce14cc6, []int{10} | |
1016 | } | |
1017 | ||
1104 | 1018 | func (m *MsgWithIndirectRequired) XXX_Unmarshal(b []byte) error { |
1105 | 1019 | return xxx_messageInfo_MsgWithIndirectRequired.Unmarshal(m, b) |
1106 | 1020 | } |
1107 | 1021 | func (m *MsgWithIndirectRequired) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
1108 | 1022 | return xxx_messageInfo_MsgWithIndirectRequired.Marshal(b, m, deterministic) |
1109 | 1023 | } |
1110 | func (dst *MsgWithIndirectRequired) XXX_Merge(src proto.Message) { | |
1111 | xxx_messageInfo_MsgWithIndirectRequired.Merge(dst, src) | |
1024 | func (m *MsgWithIndirectRequired) XXX_Merge(src proto.Message) { | |
1025 | xxx_messageInfo_MsgWithIndirectRequired.Merge(m, src) | |
1112 | 1026 | } |
1113 | 1027 | func (m *MsgWithIndirectRequired) XXX_Size() int { |
1114 | 1028 | return xxx_messageInfo_MsgWithIndirectRequired.Size(m) |
1151 | 1065 | func (m *MsgWithRequiredBytes) String() string { return proto.CompactTextString(m) } |
1152 | 1066 | func (*MsgWithRequiredBytes) ProtoMessage() {} |
1153 | 1067 | func (*MsgWithRequiredBytes) Descriptor() ([]byte, []int) { |
1154 | return fileDescriptor_test_objects_a4d3e593ea3c686f, []int{11} | |
1155 | } | |
1068 | return fileDescriptor_e97c739a0ce14cc6, []int{11} | |
1069 | } | |
1070 | ||
1156 | 1071 | func (m *MsgWithRequiredBytes) XXX_Unmarshal(b []byte) error { |
1157 | 1072 | return xxx_messageInfo_MsgWithRequiredBytes.Unmarshal(m, b) |
1158 | 1073 | } |
1159 | 1074 | func (m *MsgWithRequiredBytes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
1160 | 1075 | return xxx_messageInfo_MsgWithRequiredBytes.Marshal(b, m, deterministic) |
1161 | 1076 | } |
1162 | func (dst *MsgWithRequiredBytes) XXX_Merge(src proto.Message) { | |
1163 | xxx_messageInfo_MsgWithRequiredBytes.Merge(dst, src) | |
1077 | func (m *MsgWithRequiredBytes) XXX_Merge(src proto.Message) { | |
1078 | xxx_messageInfo_MsgWithRequiredBytes.Merge(m, src) | |
1164 | 1079 | } |
1165 | 1080 | func (m *MsgWithRequiredBytes) XXX_Size() int { |
1166 | 1081 | return xxx_messageInfo_MsgWithRequiredBytes.Size(m) |
1189 | 1104 | func (m *MsgWithRequiredWKT) String() string { return proto.CompactTextString(m) } |
1190 | 1105 | func (*MsgWithRequiredWKT) ProtoMessage() {} |
1191 | 1106 | func (*MsgWithRequiredWKT) Descriptor() ([]byte, []int) { |
1192 | return fileDescriptor_test_objects_a4d3e593ea3c686f, []int{12} | |
1193 | } | |
1107 | return fileDescriptor_e97c739a0ce14cc6, []int{12} | |
1108 | } | |
1109 | ||
1194 | 1110 | func (m *MsgWithRequiredWKT) XXX_Unmarshal(b []byte) error { |
1195 | 1111 | return xxx_messageInfo_MsgWithRequiredWKT.Unmarshal(m, b) |
1196 | 1112 | } |
1197 | 1113 | func (m *MsgWithRequiredWKT) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
1198 | 1114 | return xxx_messageInfo_MsgWithRequiredWKT.Marshal(b, m, deterministic) |
1199 | 1115 | } |
1200 | func (dst *MsgWithRequiredWKT) XXX_Merge(src proto.Message) { | |
1201 | xxx_messageInfo_MsgWithRequiredWKT.Merge(dst, src) | |
1116 | func (m *MsgWithRequiredWKT) XXX_Merge(src proto.Message) { | |
1117 | xxx_messageInfo_MsgWithRequiredWKT.Merge(m, src) | |
1202 | 1118 | } |
1203 | 1119 | func (m *MsgWithRequiredWKT) XXX_Size() int { |
1204 | 1120 | return xxx_messageInfo_MsgWithRequiredWKT.Size(m) |
1235 | 1151 | } |
1236 | 1152 | |
1237 | 1153 | func init() { |
1154 | proto.RegisterEnum("jsonpb.Widget_Color", Widget_Color_name, Widget_Color_value) | |
1238 | 1155 | proto.RegisterType((*Simple)(nil), "jsonpb.Simple") |
1239 | 1156 | proto.RegisterType((*NonFinites)(nil), "jsonpb.NonFinites") |
1240 | 1157 | proto.RegisterType((*Repeats)(nil), "jsonpb.Repeats") |
1244 | 1161 | proto.RegisterMapType((map[int64]string)(nil), "jsonpb.Maps.MInt64StrEntry") |
1245 | 1162 | proto.RegisterType((*MsgWithOneof)(nil), "jsonpb.MsgWithOneof") |
1246 | 1163 | proto.RegisterType((*Real)(nil), "jsonpb.Real") |
1164 | proto.RegisterExtension(E_Complex_RealExtension) | |
1247 | 1165 | proto.RegisterType((*Complex)(nil), "jsonpb.Complex") |
1248 | 1166 | proto.RegisterType((*KnownTypes)(nil), "jsonpb.KnownTypes") |
1249 | 1167 | proto.RegisterType((*MsgWithRequired)(nil), "jsonpb.MsgWithRequired") |
1251 | 1169 | proto.RegisterMapType((map[string]*MsgWithRequired)(nil), "jsonpb.MsgWithIndirectRequired.MapFieldEntry") |
1252 | 1170 | proto.RegisterType((*MsgWithRequiredBytes)(nil), "jsonpb.MsgWithRequiredBytes") |
1253 | 1171 | proto.RegisterType((*MsgWithRequiredWKT)(nil), "jsonpb.MsgWithRequiredWKT") |
1254 | proto.RegisterEnum("jsonpb.Widget_Color", Widget_Color_name, Widget_Color_value) | |
1255 | proto.RegisterExtension(E_Complex_RealExtension) | |
1256 | 1172 | proto.RegisterExtension(E_Name) |
1257 | 1173 | proto.RegisterExtension(E_Extm) |
1258 | 1174 | } |
1259 | 1175 | |
1260 | func init() { proto.RegisterFile("test_objects.proto", fileDescriptor_test_objects_a4d3e593ea3c686f) } | |
1261 | ||
1262 | var fileDescriptor_test_objects_a4d3e593ea3c686f = []byte{ | |
1176 | func init() { proto.RegisterFile("test_objects.proto", fileDescriptor_e97c739a0ce14cc6) } | |
1177 | ||
1178 | var fileDescriptor_e97c739a0ce14cc6 = []byte{ | |
1263 | 1179 | // 1460 bytes of a gzipped FileDescriptorProto |
1264 | 1180 | 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x56, 0xdd, 0x72, 0xdb, 0x44, |
1265 | 1181 | 0x14, 0x8e, 0x24, 0xcb, 0xb6, 0x8e, 0xf3, 0xd7, 0x6d, 0xda, 0x2a, 0xa1, 0x14, 0x8d, 0x5b, 0x8a, |
66 | 66 | if err := proto.SetExtension(cloneTestMessage, pb.E_Ext_More, ext); err != nil { |
67 | 67 | panic("SetExtension: " + err.Error()) |
68 | 68 | } |
69 | if err := proto.SetExtension(cloneTestMessage, pb.E_Ext_Text, proto.String("hello")); err != nil { | |
70 | panic("SetExtension: " + err.Error()) | |
71 | } | |
72 | if err := proto.SetExtension(cloneTestMessage, pb.E_Greeting, []string{"one", "two"}); err != nil { | |
73 | panic("SetExtension: " + err.Error()) | |
74 | } | |
69 | 75 | } |
70 | 76 | |
71 | 77 | func TestClone(t *testing.T) { |
78 | // Create a clone using a marshal/unmarshal roundtrip. | |
79 | vanilla := new(pb.MyMessage) | |
80 | b, err := proto.Marshal(cloneTestMessage) | |
81 | if err != nil { | |
82 | t.Errorf("unexpected Marshal error: %v", err) | |
83 | } | |
84 | if err := proto.Unmarshal(b, vanilla); err != nil { | |
85 | t.Errorf("unexpected Unarshal error: %v", err) | |
86 | } | |
87 | ||
88 | // Create a clone using Clone and verify that it is equal to the original. | |
72 | 89 | m := proto.Clone(cloneTestMessage).(*pb.MyMessage) |
73 | 90 | if !proto.Equal(m, cloneTestMessage) { |
74 | 91 | t.Fatalf("Clone(%v) = %v", cloneTestMessage, m) |
75 | 92 | } |
76 | 93 | |
77 | // Verify it was a deep copy. | |
94 | // Mutate the clone, which should not affect the original. | |
95 | x1, err := proto.GetExtension(m, pb.E_Ext_More) | |
96 | if err != nil { | |
97 | t.Errorf("unexpected GetExtension(%v) error: %v", pb.E_Ext_More.Name, err) | |
98 | } | |
99 | x2, err := proto.GetExtension(m, pb.E_Ext_Text) | |
100 | if err != nil { | |
101 | t.Errorf("unexpected GetExtension(%v) error: %v", pb.E_Ext_Text.Name, err) | |
102 | } | |
103 | x3, err := proto.GetExtension(m, pb.E_Greeting) | |
104 | if err != nil { | |
105 | t.Errorf("unexpected GetExtension(%v) error: %v", pb.E_Greeting.Name, err) | |
106 | } | |
78 | 107 | *m.Inner.Port++ |
79 | if proto.Equal(m, cloneTestMessage) { | |
80 | t.Error("Mutating clone changed the original") | |
81 | } | |
82 | // Byte fields and repeated fields should be copied. | |
83 | if &m.Pet[0] == &cloneTestMessage.Pet[0] { | |
84 | t.Error("Pet: repeated field not copied") | |
85 | } | |
86 | if &m.Others[0] == &cloneTestMessage.Others[0] { | |
87 | t.Error("Others: repeated field not copied") | |
88 | } | |
89 | if &m.Others[0].Value[0] == &cloneTestMessage.Others[0].Value[0] { | |
90 | t.Error("Others[0].Value: bytes field not copied") | |
91 | } | |
92 | if &m.RepBytes[0] == &cloneTestMessage.RepBytes[0] { | |
93 | t.Error("RepBytes: repeated field not copied") | |
94 | } | |
95 | if &m.RepBytes[0][0] == &cloneTestMessage.RepBytes[0][0] { | |
96 | t.Error("RepBytes[0]: bytes field not copied") | |
108 | *(x1.(*pb.Ext)).Data = "blah blah" | |
109 | *(x2.(*string)) = "goodbye" | |
110 | x3.([]string)[0] = "zero" | |
111 | if !proto.Equal(cloneTestMessage, vanilla) { | |
112 | t.Fatalf("mutation on original detected:\ngot %v\nwant %v", cloneTestMessage, vanilla) | |
97 | 113 | } |
98 | 114 | } |
99 | 115 |
185 | 185 | if b&0x80 == 0 { |
186 | 186 | goto done |
187 | 187 | } |
188 | // x -= 0x80 << 63 // Always zero. | |
189 | 188 | |
190 | 189 | return 0, errOverflow |
191 | 190 |
0 | // Go support for Protocol Buffers - Google's data interchange format | |
1 | // | |
2 | // Copyright 2018 The Go Authors. All rights reserved. | |
3 | // https://github.com/golang/protobuf | |
4 | // | |
5 | // Redistribution and use in source and binary forms, with or without | |
6 | // modification, are permitted provided that the following conditions are | |
7 | // met: | |
8 | // | |
9 | // * Redistributions of source code must retain the above copyright | |
10 | // notice, this list of conditions and the following disclaimer. | |
11 | // * Redistributions in binary form must reproduce the above | |
12 | // copyright notice, this list of conditions and the following disclaimer | |
13 | // in the documentation and/or other materials provided with the | |
14 | // distribution. | |
15 | // * Neither the name of Google Inc. nor the names of its | |
16 | // contributors may be used to endorse or promote products derived from | |
17 | // this software without specific prior written permission. | |
18 | // | |
19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | |
20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | |
21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | |
22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | |
23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | |
24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | |
25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | |
26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | |
27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | |
28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | |
29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |
30 | ||
31 | package proto | |
32 | ||
33 | import "errors" | |
34 | ||
35 | // Deprecated: do not use. | |
36 | type Stats struct{ Emalloc, Dmalloc, Encode, Decode, Chit, Cmiss, Size uint64 } | |
37 | ||
38 | // Deprecated: do not use. | |
39 | func GetStats() Stats { return Stats{} } | |
40 | ||
41 | // Deprecated: do not use. | |
42 | func MarshalMessageSet(interface{}) ([]byte, error) { | |
43 | return nil, errors.New("proto: not implemented") | |
44 | } | |
45 | ||
46 | // Deprecated: do not use. | |
47 | func UnmarshalMessageSet([]byte, interface{}) error { | |
48 | return errors.New("proto: not implemented") | |
49 | } | |
50 | ||
51 | // Deprecated: do not use. | |
52 | func MarshalMessageSetJSON(interface{}) ([]byte, error) { | |
53 | return nil, errors.New("proto: not implemented") | |
54 | } | |
55 | ||
56 | // Deprecated: do not use. | |
57 | func UnmarshalMessageSetJSON([]byte, interface{}) error { | |
58 | return errors.New("proto: not implemented") | |
59 | } | |
60 | ||
61 | // Deprecated: do not use. | |
62 | func RegisterMessageSetType(Message, int32, string) {} |
245 | 245 | return false |
246 | 246 | } |
247 | 247 | |
248 | m1, m2 := e1.value, e2.value | |
248 | m1 := extensionAsLegacyType(e1.value) | |
249 | m2 := extensionAsLegacyType(e2.value) | |
249 | 250 | |
250 | 251 | if m1 == nil && m2 == nil { |
251 | 252 | // Both have only encoded form. |
184 | 184 | // extension will have only enc set. When such an extension is |
185 | 185 | // accessed using GetExtension (or GetExtensions) desc and value |
186 | 186 | // will be set. |
187 | desc *ExtensionDesc | |
187 | desc *ExtensionDesc | |
188 | ||
189 | // value is a concrete value for the extension field. Let the type of | |
190 | // desc.ExtensionType be the "API type" and the type of Extension.value | |
191 | // be the "storage type". The API type and storage type are the same except: | |
192 | // * For scalars (except []byte), the API type uses *T, | |
193 | // while the storage type uses T. | |
194 | // * For repeated fields, the API type uses []T, while the storage type | |
195 | // uses *[]T. | |
196 | // | |
197 | // The reason for the divergence is so that the storage type more naturally | |
198 | // matches what is expected of when retrieving the values through the | |
199 | // protobuf reflection APIs. | |
200 | // | |
201 | // The value may only be populated if desc is also populated. | |
188 | 202 | value interface{} |
189 | enc []byte | |
203 | ||
204 | // enc is the raw bytes for the extension field. | |
205 | enc []byte | |
190 | 206 | } |
191 | 207 | |
192 | 208 | // SetRawExtension is for testing only. |
333 | 349 | // descriptors with the same field number. |
334 | 350 | return nil, errors.New("proto: descriptor conflict") |
335 | 351 | } |
336 | return e.value, nil | |
352 | return extensionAsLegacyType(e.value), nil | |
337 | 353 | } |
338 | 354 | |
339 | 355 | if extension.ExtensionType == nil { |
348 | 364 | |
349 | 365 | // Remember the decoded version and drop the encoded version. |
350 | 366 | // That way it is safe to mutate what we return. |
351 | e.value = v | |
367 | e.value = extensionAsStorageType(v) | |
352 | 368 | e.desc = extension |
353 | 369 | e.enc = nil |
354 | 370 | emap[extension.Field] = e |
355 | return e.value, nil | |
371 | return extensionAsLegacyType(e.value), nil | |
356 | 372 | } |
357 | 373 | |
358 | 374 | // defaultExtensionValue returns the default value for extension. |
487 | 503 | } |
488 | 504 | typ := reflect.TypeOf(extension.ExtensionType) |
489 | 505 | if typ != reflect.TypeOf(value) { |
490 | return errors.New("proto: bad extension value type") | |
506 | return fmt.Errorf("proto: bad extension value type. got: %T, want: %T", value, extension.ExtensionType) | |
491 | 507 | } |
492 | 508 | // nil extension values need to be caught early, because the |
493 | 509 | // encoder can't distinguish an ErrNil due to a nil extension |
499 | 515 | } |
500 | 516 | |
501 | 517 | extmap := epb.extensionsWrite() |
502 | extmap[extension.Field] = Extension{desc: extension, value: value} | |
518 | extmap[extension.Field] = Extension{desc: extension, value: extensionAsStorageType(value)} | |
503 | 519 | return nil |
504 | 520 | } |
505 | 521 | |
540 | 556 | func RegisteredExtensions(pb Message) map[int32]*ExtensionDesc { |
541 | 557 | return extensionMaps[reflect.TypeOf(pb).Elem()] |
542 | 558 | } |
559 | ||
560 | // extensionAsLegacyType converts an value in the storage type as the API type. | |
561 | // See Extension.value. | |
562 | func extensionAsLegacyType(v interface{}) interface{} { | |
563 | switch rv := reflect.ValueOf(v); rv.Kind() { | |
564 | case reflect.Bool, reflect.Int32, reflect.Int64, reflect.Uint32, reflect.Uint64, reflect.Float32, reflect.Float64, reflect.String: | |
565 | // Represent primitive types as a pointer to the value. | |
566 | rv2 := reflect.New(rv.Type()) | |
567 | rv2.Elem().Set(rv) | |
568 | v = rv2.Interface() | |
569 | case reflect.Ptr: | |
570 | // Represent slice types as the value itself. | |
571 | switch rv.Type().Elem().Kind() { | |
572 | case reflect.Slice: | |
573 | if rv.IsNil() { | |
574 | v = reflect.Zero(rv.Type().Elem()).Interface() | |
575 | } else { | |
576 | v = rv.Elem().Interface() | |
577 | } | |
578 | } | |
579 | } | |
580 | return v | |
581 | } | |
582 | ||
583 | // extensionAsStorageType converts an value in the API type as the storage type. | |
584 | // See Extension.value. | |
585 | func extensionAsStorageType(v interface{}) interface{} { | |
586 | switch rv := reflect.ValueOf(v); rv.Kind() { | |
587 | case reflect.Ptr: | |
588 | // Represent slice types as the value itself. | |
589 | switch rv.Type().Elem().Kind() { | |
590 | case reflect.Bool, reflect.Int32, reflect.Int64, reflect.Uint32, reflect.Uint64, reflect.Float32, reflect.Float64, reflect.String: | |
591 | if rv.IsNil() { | |
592 | v = reflect.Zero(rv.Type().Elem()).Interface() | |
593 | } else { | |
594 | v = rv.Elem().Interface() | |
595 | } | |
596 | } | |
597 | case reflect.Slice: | |
598 | // Represent slice types as a pointer to the value. | |
599 | if rv.Type().Elem().Kind() != reflect.Uint8 { | |
600 | rv2 := reflect.New(rv.Type()) | |
601 | rv2.Elem().Set(rv) | |
602 | v = rv2.Interface() | |
603 | } | |
604 | } | |
605 | return v | |
606 | } |
37 | 37 | "reflect" |
38 | 38 | "sort" |
39 | 39 | "strings" |
40 | "sync" | |
40 | 41 | "testing" |
41 | 42 | |
42 | 43 | "github.com/golang/protobuf/proto" |
43 | 44 | pb "github.com/golang/protobuf/proto/test_proto" |
44 | "golang.org/x/sync/errgroup" | |
45 | 45 | ) |
46 | 46 | |
47 | 47 | func TestGetExtensionsWithMissingExtensions(t *testing.T) { |
670 | 670 | // GetExtension will decode it lazily. Make sure this does |
671 | 671 | // not race against Marshal. |
672 | 672 | |
673 | var g errgroup.Group | |
673 | wg := sync.WaitGroup{} | |
674 | errs := make(chan error, 3) | |
674 | 675 | for n := 3; n > 0; n-- { |
675 | g.Go(func() error { | |
676 | wg.Add(1) | |
677 | go func() { | |
678 | defer wg.Done() | |
676 | 679 | _, err := proto.Marshal(m) |
677 | return err | |
678 | }) | |
679 | g.Go(func() error { | |
680 | _, err := proto.GetExtension(m, pb.E_Ext_More) | |
681 | return err | |
682 | }) | |
683 | } | |
684 | if err := g.Wait(); err != nil { | |
685 | t.Fatal(err) | |
686 | } | |
687 | } | |
680 | errs <- err | |
681 | }() | |
682 | } | |
683 | wg.Wait() | |
684 | close(errs) | |
685 | ||
686 | for err = range errs { | |
687 | if err != nil { | |
688 | t.Fatal(err) | |
689 | } | |
690 | } | |
691 | } |
340 | 340 | ProtoMessage() |
341 | 341 | } |
342 | 342 | |
343 | // Stats records allocation details about the protocol buffer encoders | |
344 | // and decoders. Useful for tuning the library itself. | |
345 | type Stats struct { | |
346 | Emalloc uint64 // mallocs in encode | |
347 | Dmalloc uint64 // mallocs in decode | |
348 | Encode uint64 // number of encodes | |
349 | Decode uint64 // number of decodes | |
350 | Chit uint64 // number of cache hits | |
351 | Cmiss uint64 // number of cache misses | |
352 | Size uint64 // number of sizes | |
353 | } | |
354 | ||
355 | // Set to true to enable stats collection. | |
356 | const collectStats = false | |
357 | ||
358 | var stats Stats | |
359 | ||
360 | // GetStats returns a copy of the global Stats structure. | |
361 | func GetStats() Stats { return stats } | |
362 | ||
363 | 343 | // A Buffer is a buffer manager for marshaling and unmarshaling |
364 | 344 | // protocol buffers. It may be reused between invocations to |
365 | 345 | // reduce memory usage. It is not necessary to use a Buffer; |
959 | 939 | return false |
960 | 940 | } |
961 | 941 | |
962 | // ProtoPackageIsVersion2 is referenced from generated protocol buffer files | |
963 | // to assert that that code is compatible with this version of the proto package. | |
964 | const ProtoPackageIsVersion2 = true | |
965 | ||
966 | // ProtoPackageIsVersion1 is referenced from generated protocol buffer files | |
967 | // to assert that that code is compatible with this version of the proto package. | |
968 | const ProtoPackageIsVersion1 = true | |
942 | const ( | |
943 | // ProtoPackageIsVersion3 is referenced from generated protocol buffer files | |
944 | // to assert that that code is compatible with this version of the proto package. | |
945 | ProtoPackageIsVersion3 = true | |
946 | ||
947 | // ProtoPackageIsVersion2 is referenced from generated protocol buffer files | |
948 | // to assert that that code is compatible with this version of the proto package. | |
949 | ProtoPackageIsVersion2 = true | |
950 | ||
951 | // ProtoPackageIsVersion1 is referenced from generated protocol buffer files | |
952 | // to assert that that code is compatible with this version of the proto package. | |
953 | ProtoPackageIsVersion1 = true | |
954 | ) | |
969 | 955 | |
970 | 956 | // InternalMessageInfo is a type used internally by generated .pb.go files. |
971 | 957 | // This type is not intended to be used by non-generated code. |
35 | 35 | */ |
36 | 36 | |
37 | 37 | import ( |
38 | "bytes" | |
39 | "encoding/json" | |
40 | 38 | "errors" |
41 | "fmt" | |
42 | "reflect" | |
43 | "sort" | |
44 | "sync" | |
45 | 39 | ) |
46 | 40 | |
47 | 41 | // errNoMessageTypeID occurs when a protocol buffer does not have a message type ID. |
144 | 138 | return buf[i+1:] |
145 | 139 | } |
146 | 140 | |
147 | // MarshalMessageSet encodes the extension map represented by m in the message set wire format. | |
148 | // It is called by generated Marshal methods on protocol buffer messages with the message_set_wire_format option. | |
149 | func MarshalMessageSet(exts interface{}) ([]byte, error) { | |
150 | return marshalMessageSet(exts, false) | |
151 | } | |
152 | ||
153 | // marshaMessageSet implements above function, with the opt to turn on / off deterministic during Marshal. | |
154 | func marshalMessageSet(exts interface{}, deterministic bool) ([]byte, error) { | |
155 | switch exts := exts.(type) { | |
156 | case *XXX_InternalExtensions: | |
157 | var u marshalInfo | |
158 | siz := u.sizeMessageSet(exts) | |
159 | b := make([]byte, 0, siz) | |
160 | return u.appendMessageSet(b, exts, deterministic) | |
161 | ||
162 | case map[int32]Extension: | |
163 | // This is an old-style extension map. | |
164 | // Wrap it in a new-style XXX_InternalExtensions. | |
165 | ie := XXX_InternalExtensions{ | |
166 | p: &struct { | |
167 | mu sync.Mutex | |
168 | extensionMap map[int32]Extension | |
169 | }{ | |
170 | extensionMap: exts, | |
171 | }, | |
172 | } | |
173 | ||
174 | var u marshalInfo | |
175 | siz := u.sizeMessageSet(&ie) | |
176 | b := make([]byte, 0, siz) | |
177 | return u.appendMessageSet(b, &ie, deterministic) | |
178 | ||
179 | default: | |
180 | return nil, errors.New("proto: not an extension map") | |
181 | } | |
182 | } | |
183 | ||
184 | // UnmarshalMessageSet decodes the extension map encoded in buf in the message set wire format. | |
141 | // unmarshalMessageSet decodes the extension map encoded in buf in the message set wire format. | |
185 | 142 | // It is called by Unmarshal methods on protocol buffer messages with the message_set_wire_format option. |
186 | func UnmarshalMessageSet(buf []byte, exts interface{}) error { | |
143 | func unmarshalMessageSet(buf []byte, exts interface{}) error { | |
187 | 144 | var m map[int32]Extension |
188 | 145 | switch exts := exts.(type) { |
189 | 146 | case *XXX_InternalExtensions: |
221 | 178 | } |
222 | 179 | return nil |
223 | 180 | } |
224 | ||
225 | // MarshalMessageSetJSON encodes the extension map represented by m in JSON format. | |
226 | // It is called by generated MarshalJSON methods on protocol buffer messages with the message_set_wire_format option. | |
227 | func MarshalMessageSetJSON(exts interface{}) ([]byte, error) { | |
228 | var m map[int32]Extension | |
229 | switch exts := exts.(type) { | |
230 | case *XXX_InternalExtensions: | |
231 | var mu sync.Locker | |
232 | m, mu = exts.extensionsRead() | |
233 | if m != nil { | |
234 | // Keep the extensions map locked until we're done marshaling to prevent | |
235 | // races between marshaling and unmarshaling the lazily-{en,de}coded | |
236 | // values. | |
237 | mu.Lock() | |
238 | defer mu.Unlock() | |
239 | } | |
240 | case map[int32]Extension: | |
241 | m = exts | |
242 | default: | |
243 | return nil, errors.New("proto: not an extension map") | |
244 | } | |
245 | var b bytes.Buffer | |
246 | b.WriteByte('{') | |
247 | ||
248 | // Process the map in key order for deterministic output. | |
249 | ids := make([]int32, 0, len(m)) | |
250 | for id := range m { | |
251 | ids = append(ids, id) | |
252 | } | |
253 | sort.Sort(int32Slice(ids)) // int32Slice defined in text.go | |
254 | ||
255 | for i, id := range ids { | |
256 | ext := m[id] | |
257 | msd, ok := messageSetMap[id] | |
258 | if !ok { | |
259 | // Unknown type; we can't render it, so skip it. | |
260 | continue | |
261 | } | |
262 | ||
263 | if i > 0 && b.Len() > 1 { | |
264 | b.WriteByte(',') | |
265 | } | |
266 | ||
267 | fmt.Fprintf(&b, `"[%s]":`, msd.name) | |
268 | ||
269 | x := ext.value | |
270 | if x == nil { | |
271 | x = reflect.New(msd.t.Elem()).Interface() | |
272 | if err := Unmarshal(ext.enc, x.(Message)); err != nil { | |
273 | return nil, err | |
274 | } | |
275 | } | |
276 | d, err := json.Marshal(x) | |
277 | if err != nil { | |
278 | return nil, err | |
279 | } | |
280 | b.Write(d) | |
281 | } | |
282 | b.WriteByte('}') | |
283 | return b.Bytes(), nil | |
284 | } | |
285 | ||
286 | // UnmarshalMessageSetJSON decodes the extension map encoded in buf in JSON format. | |
287 | // It is called by generated UnmarshalJSON methods on protocol buffer messages with the message_set_wire_format option. | |
288 | func UnmarshalMessageSetJSON(buf []byte, exts interface{}) error { | |
289 | // Common-case fast path. | |
290 | if len(buf) == 0 || bytes.Equal(buf, []byte("{}")) { | |
291 | return nil | |
292 | } | |
293 | ||
294 | // This is fairly tricky, and it's not clear that it is needed. | |
295 | return errors.New("TODO: UnmarshalMessageSetJSON not yet implemented") | |
296 | } | |
297 | ||
298 | // A global registry of types that can be used in a MessageSet. | |
299 | ||
300 | var messageSetMap = make(map[int32]messageSetDesc) | |
301 | ||
302 | type messageSetDesc struct { | |
303 | t reflect.Type // pointer to struct | |
304 | name string | |
305 | } | |
306 | ||
307 | // RegisterMessageSetType is called from the generated code. | |
308 | func RegisterMessageSetType(m Message, fieldNum int32, name string) { | |
309 | messageSetMap[fieldNum] = messageSetDesc{ | |
310 | t: reflect.TypeOf(m), | |
311 | name: name, | |
312 | } | |
313 | } |
28 | 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
29 | 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
30 | 30 | |
31 | package proto | |
31 | package proto_test | |
32 | 32 | |
33 | 33 | import ( |
34 | 34 | "bytes" |
35 | "fmt" | |
35 | 36 | "testing" |
37 | ||
38 | "github.com/golang/protobuf/proto" | |
39 | . "github.com/golang/protobuf/proto/test_proto" | |
36 | 40 | ) |
37 | 41 | |
38 | 42 | func TestUnmarshalMessageSetWithDuplicate(t *testing.T) { |
39 | // Check that a repeated message set entry will be concatenated. | |
40 | in := &messageSet{ | |
41 | Item: []*_MessageSet_Item{ | |
42 | {TypeId: Int32(12345), Message: []byte("hoo")}, | |
43 | {TypeId: Int32(12345), Message: []byte("hah")}, | |
44 | }, | |
43 | /* | |
44 | Message{ | |
45 | Tag{1, StartGroup}, | |
46 | Message{ | |
47 | Tag{2, Varint}, Uvarint(12345), | |
48 | Tag{3, Bytes}, Bytes("hoo"), | |
49 | }, | |
50 | Tag{1, EndGroup}, | |
51 | Tag{1, StartGroup}, | |
52 | Message{ | |
53 | Tag{2, Varint}, Uvarint(12345), | |
54 | Tag{3, Bytes}, Bytes("hah"), | |
55 | }, | |
56 | Tag{1, EndGroup}, | |
57 | } | |
58 | */ | |
59 | var in []byte | |
60 | fmt.Sscanf("0b10b9601a03686f6f0c0b10b9601a036861680c", "%x", &in) | |
61 | ||
62 | /* | |
63 | Message{ | |
64 | Tag{1, StartGroup}, | |
65 | Message{ | |
66 | Tag{2, Varint}, Uvarint(12345), | |
67 | Tag{3, Bytes}, Bytes("hoohah"), | |
68 | }, | |
69 | Tag{1, EndGroup}, | |
70 | } | |
71 | */ | |
72 | var want []byte | |
73 | fmt.Sscanf("0b10b9601a06686f6f6861680c", "%x", &want) | |
74 | ||
75 | var m MyMessageSet | |
76 | if err := proto.Unmarshal(in, &m); err != nil { | |
77 | t.Fatalf("unexpected Unmarshal error: %v", err) | |
45 | 78 | } |
46 | b, err := Marshal(in) | |
79 | got, err := proto.Marshal(&m) | |
47 | 80 | if err != nil { |
48 | t.Fatalf("Marshal: %v", err) | |
81 | t.Fatalf("unexpected Marshal error: %v", err) | |
49 | 82 | } |
50 | t.Logf("Marshaled bytes: %q", b) | |
51 | 83 | |
52 | var extensions XXX_InternalExtensions | |
53 | if err := UnmarshalMessageSet(b, &extensions); err != nil { | |
54 | t.Fatalf("UnmarshalMessageSet: %v", err) | |
55 | } | |
56 | ext, ok := extensions.p.extensionMap[12345] | |
57 | if !ok { | |
58 | t.Fatalf("Didn't retrieve extension 12345; map is %v", extensions.p.extensionMap) | |
59 | } | |
60 | // Skip wire type/field number and length varints. | |
61 | got := skipVarint(skipVarint(ext.enc)) | |
62 | if want := []byte("hoohah"); !bytes.Equal(got, want) { | |
63 | t.Errorf("Combined extension is %q, want %q", got, want) | |
84 | if !bytes.Equal(got, want) { | |
85 | t.Errorf("output mismatch:\ngot %x\nwant %x", got, want) | |
64 | 86 | } |
65 | 87 | } |
66 | ||
67 | func TestMarshalMessageSetJSON_UnknownType(t *testing.T) { | |
68 | extMap := map[int32]Extension{12345: Extension{}} | |
69 | got, err := MarshalMessageSetJSON(extMap) | |
70 | if err != nil { | |
71 | t.Fatalf("MarshalMessageSetJSON: %v", err) | |
72 | } | |
73 | if want := []byte("{}"); !bytes.Equal(got, want) { | |
74 | t.Errorf("MarshalMessageSetJSON(%v) = %q, want %q", extMap, got, want) | |
75 | } | |
76 | } |
78 | 78 | |
79 | 79 | // toAddrPointer converts an interface to a pointer that points to |
80 | 80 | // the interface data. |
81 | func toAddrPointer(i *interface{}, isptr bool) pointer { | |
81 | func toAddrPointer(i *interface{}, isptr, deref bool) pointer { | |
82 | 82 | v := reflect.ValueOf(*i) |
83 | 83 | u := reflect.New(v.Type()) |
84 | 84 | u.Elem().Set(v) |
85 | if deref { | |
86 | u = u.Elem() | |
87 | } | |
85 | 88 | return pointer{v: u} |
86 | 89 | } |
87 | 90 |
84 | 84 | |
85 | 85 | // toAddrPointer converts an interface to a pointer that points to |
86 | 86 | // the interface data. |
87 | func toAddrPointer(i *interface{}, isptr bool) pointer { | |
87 | func toAddrPointer(i *interface{}, isptr, deref bool) (p pointer) { | |
88 | 88 | // Super-tricky - read or get the address of data word of interface value. |
89 | 89 | if isptr { |
90 | 90 | // The interface is of pointer type, thus it is a direct interface. |
91 | 91 | // The data word is the pointer data itself. We take its address. |
92 | return pointer{p: unsafe.Pointer(uintptr(unsafe.Pointer(i)) + ptrSize)} | |
92 | p = pointer{p: unsafe.Pointer(uintptr(unsafe.Pointer(i)) + ptrSize)} | |
93 | } else { | |
94 | // The interface is not of pointer type. The data word is the pointer | |
95 | // to the data. | |
96 | p = pointer{p: (*[2]unsafe.Pointer)(unsafe.Pointer(i))[1]} | |
93 | 97 | } |
94 | // The interface is not of pointer type. The data word is the pointer | |
95 | // to the data. | |
96 | return pointer{p: (*[2]unsafe.Pointer)(unsafe.Pointer(i))[1]} | |
98 | if deref { | |
99 | p.p = *(*unsafe.Pointer)(p.p) | |
100 | } | |
101 | return p | |
97 | 102 | } |
98 | 103 | |
99 | 104 | // valToPointer converts v to a pointer. v must be of pointer type. |
37 | 37 | import ( |
38 | 38 | "fmt" |
39 | 39 | "log" |
40 | "os" | |
41 | 40 | "reflect" |
42 | 41 | "sort" |
43 | 42 | "strconv" |
193 | 192 | // "bytes,49,opt,name=foo,def=hello!" |
194 | 193 | fields := strings.Split(s, ",") // breaks def=, but handled below. |
195 | 194 | if len(fields) < 2 { |
196 | fmt.Fprintf(os.Stderr, "proto: tag has too few fields: %q\n", s) | |
195 | log.Printf("proto: tag has too few fields: %q", s) | |
197 | 196 | return |
198 | 197 | } |
199 | 198 | |
213 | 212 | p.WireType = WireBytes |
214 | 213 | // no numeric converter for non-numeric types |
215 | 214 | default: |
216 | fmt.Fprintf(os.Stderr, "proto: tag has unknown wire type: %q\n", s) | |
215 | log.Printf("proto: tag has unknown wire type: %q", s) | |
217 | 216 | return |
218 | 217 | } |
219 | 218 | |
333 | 332 | sprop, ok := propertiesMap[t] |
334 | 333 | propertiesMu.RUnlock() |
335 | 334 | if ok { |
336 | if collectStats { | |
337 | stats.Chit++ | |
338 | } | |
339 | 335 | return sprop |
340 | 336 | } |
341 | 337 | |
345 | 341 | return sprop |
346 | 342 | } |
347 | 343 | |
344 | type ( | |
345 | oneofFuncsIface interface { | |
346 | XXX_OneofFuncs() (func(Message, *Buffer) error, func(Message, int, int, *Buffer) (bool, error), func(Message) int, []interface{}) | |
347 | } | |
348 | oneofWrappersIface interface { | |
349 | XXX_OneofWrappers() []interface{} | |
350 | } | |
351 | ) | |
352 | ||
348 | 353 | // getPropertiesLocked requires that propertiesMu is held. |
349 | 354 | func getPropertiesLocked(t reflect.Type) *StructProperties { |
350 | 355 | if prop, ok := propertiesMap[t]; ok { |
351 | if collectStats { | |
352 | stats.Chit++ | |
353 | } | |
354 | 356 | return prop |
355 | } | |
356 | if collectStats { | |
357 | stats.Cmiss++ | |
358 | 357 | } |
359 | 358 | |
360 | 359 | prop := new(StructProperties) |
390 | 389 | // Re-order prop.order. |
391 | 390 | sort.Sort(prop) |
392 | 391 | |
393 | type oneofMessage interface { | |
394 | XXX_OneofFuncs() (func(Message, *Buffer) error, func(Message, int, int, *Buffer) (bool, error), func(Message) int, []interface{}) | |
395 | } | |
396 | if om, ok := reflect.Zero(reflect.PtrTo(t)).Interface().(oneofMessage); ok { | |
397 | var oots []interface{} | |
398 | _, _, _, oots = om.XXX_OneofFuncs() | |
399 | ||
392 | var oots []interface{} | |
393 | switch m := reflect.Zero(reflect.PtrTo(t)).Interface().(type) { | |
394 | case oneofFuncsIface: | |
395 | _, _, _, oots = m.XXX_OneofFuncs() | |
396 | case oneofWrappersIface: | |
397 | oots = m.XXX_OneofWrappers() | |
398 | } | |
399 | if len(oots) > 0 { | |
400 | 400 | // Interpret oneof metadata. |
401 | 401 | prop.OneofTypes = make(map[string]*OneofProperties) |
402 | 402 | for _, oot := range oots { |
2 | 2 | |
3 | 3 | package proto3_proto |
4 | 4 | |
5 | import proto "github.com/golang/protobuf/proto" | |
6 | import fmt "fmt" | |
7 | import math "math" | |
8 | import test_proto "github.com/golang/protobuf/proto/test_proto" | |
9 | import any "github.com/golang/protobuf/ptypes/any" | |
5 | import ( | |
6 | fmt "fmt" | |
7 | proto "github.com/golang/protobuf/proto" | |
8 | test_proto "github.com/golang/protobuf/proto/test_proto" | |
9 | any "github.com/golang/protobuf/ptypes/any" | |
10 | math "math" | |
11 | ) | |
10 | 12 | |
11 | 13 | // Reference imports to suppress errors if they are not otherwise used. |
12 | 14 | var _ = proto.Marshal |
17 | 19 | // is compatible with the proto package it is being compiled against. |
18 | 20 | // A compilation error at this line likely means your copy of the |
19 | 21 | // proto package needs to be updated. |
20 | const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package | |
22 | const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package | |
21 | 23 | |
22 | 24 | type Message_Humour int32 |
23 | 25 | |
34 | 36 | 2: "SLAPSTICK", |
35 | 37 | 3: "BILL_BAILEY", |
36 | 38 | } |
39 | ||
37 | 40 | var Message_Humour_value = map[string]int32{ |
38 | 41 | "UNKNOWN": 0, |
39 | 42 | "PUNS": 1, |
44 | 47 | func (x Message_Humour) String() string { |
45 | 48 | return proto.EnumName(Message_Humour_name, int32(x)) |
46 | 49 | } |
50 | ||
47 | 51 | func (Message_Humour) EnumDescriptor() ([]byte, []int) { |
48 | return fileDescriptor_proto3_78ae00cd7e6e5e35, []int{0, 0} | |
52 | return fileDescriptor_1c50d9b824d4ac38, []int{0, 0} | |
49 | 53 | } |
50 | 54 | |
51 | 55 | type Message struct { |
77 | 81 | func (m *Message) String() string { return proto.CompactTextString(m) } |
78 | 82 | func (*Message) ProtoMessage() {} |
79 | 83 | func (*Message) Descriptor() ([]byte, []int) { |
80 | return fileDescriptor_proto3_78ae00cd7e6e5e35, []int{0} | |
81 | } | |
84 | return fileDescriptor_1c50d9b824d4ac38, []int{0} | |
85 | } | |
86 | ||
82 | 87 | func (m *Message) XXX_Unmarshal(b []byte) error { |
83 | 88 | return xxx_messageInfo_Message.Unmarshal(m, b) |
84 | 89 | } |
85 | 90 | func (m *Message) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
86 | 91 | return xxx_messageInfo_Message.Marshal(b, m, deterministic) |
87 | 92 | } |
88 | func (dst *Message) XXX_Merge(src proto.Message) { | |
89 | xxx_messageInfo_Message.Merge(dst, src) | |
93 | func (m *Message) XXX_Merge(src proto.Message) { | |
94 | xxx_messageInfo_Message.Merge(m, src) | |
90 | 95 | } |
91 | 96 | func (m *Message) XXX_Size() int { |
92 | 97 | return xxx_messageInfo_Message.Size(m) |
242 | 247 | func (m *Nested) String() string { return proto.CompactTextString(m) } |
243 | 248 | func (*Nested) ProtoMessage() {} |
244 | 249 | func (*Nested) Descriptor() ([]byte, []int) { |
245 | return fileDescriptor_proto3_78ae00cd7e6e5e35, []int{1} | |
246 | } | |
250 | return fileDescriptor_1c50d9b824d4ac38, []int{1} | |
251 | } | |
252 | ||
247 | 253 | func (m *Nested) XXX_Unmarshal(b []byte) error { |
248 | 254 | return xxx_messageInfo_Nested.Unmarshal(m, b) |
249 | 255 | } |
250 | 256 | func (m *Nested) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
251 | 257 | return xxx_messageInfo_Nested.Marshal(b, m, deterministic) |
252 | 258 | } |
253 | func (dst *Nested) XXX_Merge(src proto.Message) { | |
254 | xxx_messageInfo_Nested.Merge(dst, src) | |
259 | func (m *Nested) XXX_Merge(src proto.Message) { | |
260 | xxx_messageInfo_Nested.Merge(m, src) | |
255 | 261 | } |
256 | 262 | func (m *Nested) XXX_Size() int { |
257 | 263 | return xxx_messageInfo_Nested.Size(m) |
287 | 293 | func (m *MessageWithMap) String() string { return proto.CompactTextString(m) } |
288 | 294 | func (*MessageWithMap) ProtoMessage() {} |
289 | 295 | func (*MessageWithMap) Descriptor() ([]byte, []int) { |
290 | return fileDescriptor_proto3_78ae00cd7e6e5e35, []int{2} | |
291 | } | |
296 | return fileDescriptor_1c50d9b824d4ac38, []int{2} | |
297 | } | |
298 | ||
292 | 299 | func (m *MessageWithMap) XXX_Unmarshal(b []byte) error { |
293 | 300 | return xxx_messageInfo_MessageWithMap.Unmarshal(m, b) |
294 | 301 | } |
295 | 302 | func (m *MessageWithMap) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
296 | 303 | return xxx_messageInfo_MessageWithMap.Marshal(b, m, deterministic) |
297 | 304 | } |
298 | func (dst *MessageWithMap) XXX_Merge(src proto.Message) { | |
299 | xxx_messageInfo_MessageWithMap.Merge(dst, src) | |
305 | func (m *MessageWithMap) XXX_Merge(src proto.Message) { | |
306 | xxx_messageInfo_MessageWithMap.Merge(m, src) | |
300 | 307 | } |
301 | 308 | func (m *MessageWithMap) XXX_Size() int { |
302 | 309 | return xxx_messageInfo_MessageWithMap.Size(m) |
325 | 332 | func (m *IntMap) String() string { return proto.CompactTextString(m) } |
326 | 333 | func (*IntMap) ProtoMessage() {} |
327 | 334 | func (*IntMap) Descriptor() ([]byte, []int) { |
328 | return fileDescriptor_proto3_78ae00cd7e6e5e35, []int{3} | |
329 | } | |
335 | return fileDescriptor_1c50d9b824d4ac38, []int{3} | |
336 | } | |
337 | ||
330 | 338 | func (m *IntMap) XXX_Unmarshal(b []byte) error { |
331 | 339 | return xxx_messageInfo_IntMap.Unmarshal(m, b) |
332 | 340 | } |
333 | 341 | func (m *IntMap) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
334 | 342 | return xxx_messageInfo_IntMap.Marshal(b, m, deterministic) |
335 | 343 | } |
336 | func (dst *IntMap) XXX_Merge(src proto.Message) { | |
337 | xxx_messageInfo_IntMap.Merge(dst, src) | |
344 | func (m *IntMap) XXX_Merge(src proto.Message) { | |
345 | xxx_messageInfo_IntMap.Merge(m, src) | |
338 | 346 | } |
339 | 347 | func (m *IntMap) XXX_Size() int { |
340 | 348 | return xxx_messageInfo_IntMap.Size(m) |
363 | 371 | func (m *IntMaps) String() string { return proto.CompactTextString(m) } |
364 | 372 | func (*IntMaps) ProtoMessage() {} |
365 | 373 | func (*IntMaps) Descriptor() ([]byte, []int) { |
366 | return fileDescriptor_proto3_78ae00cd7e6e5e35, []int{4} | |
367 | } | |
374 | return fileDescriptor_1c50d9b824d4ac38, []int{4} | |
375 | } | |
376 | ||
368 | 377 | func (m *IntMaps) XXX_Unmarshal(b []byte) error { |
369 | 378 | return xxx_messageInfo_IntMaps.Unmarshal(m, b) |
370 | 379 | } |
371 | 380 | func (m *IntMaps) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
372 | 381 | return xxx_messageInfo_IntMaps.Marshal(b, m, deterministic) |
373 | 382 | } |
374 | func (dst *IntMaps) XXX_Merge(src proto.Message) { | |
375 | xxx_messageInfo_IntMaps.Merge(dst, src) | |
383 | func (m *IntMaps) XXX_Merge(src proto.Message) { | |
384 | xxx_messageInfo_IntMaps.Merge(m, src) | |
376 | 385 | } |
377 | 386 | func (m *IntMaps) XXX_Size() int { |
378 | 387 | return xxx_messageInfo_IntMaps.Size(m) |
407 | 416 | func (m *TestUTF8) String() string { return proto.CompactTextString(m) } |
408 | 417 | func (*TestUTF8) ProtoMessage() {} |
409 | 418 | func (*TestUTF8) Descriptor() ([]byte, []int) { |
410 | return fileDescriptor_proto3_78ae00cd7e6e5e35, []int{5} | |
411 | } | |
419 | return fileDescriptor_1c50d9b824d4ac38, []int{5} | |
420 | } | |
421 | ||
412 | 422 | func (m *TestUTF8) XXX_Unmarshal(b []byte) error { |
413 | 423 | return xxx_messageInfo_TestUTF8.Unmarshal(m, b) |
414 | 424 | } |
415 | 425 | func (m *TestUTF8) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
416 | 426 | return xxx_messageInfo_TestUTF8.Marshal(b, m, deterministic) |
417 | 427 | } |
418 | func (dst *TestUTF8) XXX_Merge(src proto.Message) { | |
419 | xxx_messageInfo_TestUTF8.Merge(dst, src) | |
428 | func (m *TestUTF8) XXX_Merge(src proto.Message) { | |
429 | xxx_messageInfo_TestUTF8.Merge(m, src) | |
420 | 430 | } |
421 | 431 | func (m *TestUTF8) XXX_Size() int { |
422 | 432 | return xxx_messageInfo_TestUTF8.Size(m) |
479 | 489 | return nil |
480 | 490 | } |
481 | 491 | |
482 | // XXX_OneofFuncs is for the internal use of the proto package. | |
483 | func (*TestUTF8) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { | |
484 | return _TestUTF8_OneofMarshaler, _TestUTF8_OneofUnmarshaler, _TestUTF8_OneofSizer, []interface{}{ | |
492 | // XXX_OneofWrappers is for the internal use of the proto package. | |
493 | func (*TestUTF8) XXX_OneofWrappers() []interface{} { | |
494 | return []interface{}{ | |
485 | 495 | (*TestUTF8_Field)(nil), |
486 | 496 | } |
487 | 497 | } |
488 | 498 | |
489 | func _TestUTF8_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { | |
490 | m := msg.(*TestUTF8) | |
491 | // oneof | |
492 | switch x := m.Oneof.(type) { | |
493 | case *TestUTF8_Field: | |
494 | b.EncodeVarint(3<<3 | proto.WireBytes) | |
495 | b.EncodeStringBytes(x.Field) | |
496 | case nil: | |
497 | default: | |
498 | return fmt.Errorf("TestUTF8.Oneof has unexpected type %T", x) | |
499 | } | |
500 | return nil | |
501 | } | |
502 | ||
503 | func _TestUTF8_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { | |
504 | m := msg.(*TestUTF8) | |
505 | switch tag { | |
506 | case 3: // oneof.field | |
507 | if wire != proto.WireBytes { | |
508 | return true, proto.ErrInternalBadWireType | |
509 | } | |
510 | x, err := b.DecodeStringBytes() | |
511 | m.Oneof = &TestUTF8_Field{x} | |
512 | return true, err | |
513 | default: | |
514 | return false, nil | |
515 | } | |
516 | } | |
517 | ||
518 | func _TestUTF8_OneofSizer(msg proto.Message) (n int) { | |
519 | m := msg.(*TestUTF8) | |
520 | // oneof | |
521 | switch x := m.Oneof.(type) { | |
522 | case *TestUTF8_Field: | |
523 | n += 1 // tag and wire | |
524 | n += proto.SizeVarint(uint64(len(x.Field))) | |
525 | n += len(x.Field) | |
526 | case nil: | |
527 | default: | |
528 | panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) | |
529 | } | |
530 | return n | |
531 | } | |
532 | ||
533 | 499 | func init() { |
500 | proto.RegisterEnum("proto3_proto.Message_Humour", Message_Humour_name, Message_Humour_value) | |
534 | 501 | proto.RegisterType((*Message)(nil), "proto3_proto.Message") |
535 | 502 | proto.RegisterMapType((map[string]*test_proto.SubDefaults)(nil), "proto3_proto.Message.Proto2ValueEntry") |
536 | 503 | proto.RegisterMapType((map[string]string)(nil), "proto3_proto.Message.StringMapEntry") |
544 | 511 | proto.RegisterType((*TestUTF8)(nil), "proto3_proto.TestUTF8") |
545 | 512 | proto.RegisterMapType((map[string]int64)(nil), "proto3_proto.TestUTF8.MapKeyEntry") |
546 | 513 | proto.RegisterMapType((map[int64]string)(nil), "proto3_proto.TestUTF8.MapValueEntry") |
547 | proto.RegisterEnum("proto3_proto.Message_Humour", Message_Humour_name, Message_Humour_value) | |
548 | } | |
549 | ||
550 | func init() { proto.RegisterFile("proto3_proto/proto3.proto", fileDescriptor_proto3_78ae00cd7e6e5e35) } | |
551 | ||
552 | var fileDescriptor_proto3_78ae00cd7e6e5e35 = []byte{ | |
514 | } | |
515 | ||
516 | func init() { proto.RegisterFile("proto3_proto/proto3.proto", fileDescriptor_1c50d9b824d4ac38) } | |
517 | ||
518 | var fileDescriptor_1c50d9b824d4ac38 = []byte{ | |
553 | 519 | // 896 bytes of a gzipped FileDescriptorProto |
554 | 520 | 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x54, 0x6f, 0x6f, 0xdb, 0xb6, |
555 | 521 | 0x13, 0xae, 0x2c, 0xff, 0x91, 0xcf, 0x76, 0xea, 0x1f, 0x7f, 0x6e, 0xc7, 0x7a, 0x1b, 0xa0, 0x79, |
31 | 31 | package proto |
32 | 32 | |
33 | 33 | import ( |
34 | "math" | |
34 | 35 | "testing" |
35 | 36 | ) |
36 | 37 | |
50 | 51 | {128, 2}, |
51 | 52 | {16383, 2}, |
52 | 53 | {16384, 3}, |
53 | {1<<63 - 1, 9}, | |
54 | {1 << 63, 10}, | |
54 | {math.MaxInt64, 9}, | |
55 | {math.MaxInt64 + 1, 10}, | |
55 | 56 | } |
56 | 57 | for _, tc := range testCases { |
57 | 58 | size := SizeVarint(tc.n) |
86 | 86 | sizer sizer |
87 | 87 | marshaler marshaler |
88 | 88 | isptr bool // elem is pointer typed, thus interface of this type is a direct interface (extension only) |
89 | deref bool // dereference the pointer before operating on it; implies isptr | |
89 | 90 | } |
90 | 91 | |
91 | 92 | var ( |
319 | 320 | |
320 | 321 | // get oneof implementers |
321 | 322 | var oneofImplementers []interface{} |
322 | if m, ok := reflect.Zero(reflect.PtrTo(t)).Interface().(oneofMessage); ok { | |
323 | switch m := reflect.Zero(reflect.PtrTo(t)).Interface().(type) { | |
324 | case oneofFuncsIface: | |
323 | 325 | _, _, _, oneofImplementers = m.XXX_OneofFuncs() |
326 | case oneofWrappersIface: | |
327 | oneofImplementers = m.XXX_OneofWrappers() | |
324 | 328 | } |
325 | 329 | |
326 | 330 | n := t.NumField() |
406 | 410 | panic("tag is not an integer") |
407 | 411 | } |
408 | 412 | wt := wiretype(tags[0]) |
413 | if t.Kind() == reflect.Ptr && t.Elem().Kind() != reflect.Struct { | |
414 | t = t.Elem() | |
415 | } | |
409 | 416 | sizer, marshaler := typeMarshaler(t, tags, false, false) |
417 | var deref bool | |
418 | if t.Kind() == reflect.Slice && t.Elem().Kind() != reflect.Uint8 { | |
419 | t = reflect.PtrTo(t) | |
420 | deref = true | |
421 | } | |
410 | 422 | e = &marshalElemInfo{ |
411 | 423 | wiretag: uint64(tag)<<3 | wt, |
412 | 424 | tagsize: SizeVarint(uint64(tag) << 3), |
413 | 425 | sizer: sizer, |
414 | 426 | marshaler: marshaler, |
415 | 427 | isptr: t.Kind() == reflect.Ptr, |
428 | deref: deref, | |
416 | 429 | } |
417 | 430 | |
418 | 431 | // update cache |
447 | 460 | |
448 | 461 | func (fi *marshalFieldInfo) computeOneofFieldInfo(f *reflect.StructField, oneofImplementers []interface{}) { |
449 | 462 | fi.field = toField(f) |
450 | fi.wiretag = 1<<31 - 1 // Use a large tag number, make oneofs sorted at the end. This tag will not appear on the wire. | |
463 | fi.wiretag = math.MaxInt32 // Use a large tag number, make oneofs sorted at the end. This tag will not appear on the wire. | |
451 | 464 | fi.isPointer = true |
452 | 465 | fi.sizer, fi.marshaler = makeOneOfMarshaler(fi, f) |
453 | 466 | fi.oneofElems = make(map[reflect.Type]*marshalElemInfo) |
473 | 486 | marshaler: marshaler, |
474 | 487 | } |
475 | 488 | } |
476 | } | |
477 | ||
478 | type oneofMessage interface { | |
479 | XXX_OneofFuncs() (func(Message, *Buffer) error, func(Message, int, int, *Buffer) (bool, error), func(Message) int, []interface{}) | |
480 | 489 | } |
481 | 490 | |
482 | 491 | // wiretype returns the wire encoding of the type. |
2309 | 2318 | for _, k := range m.MapKeys() { |
2310 | 2319 | ki := k.Interface() |
2311 | 2320 | vi := m.MapIndex(k).Interface() |
2312 | kaddr := toAddrPointer(&ki, false) // pointer to key | |
2313 | vaddr := toAddrPointer(&vi, valIsPtr) // pointer to value | |
2321 | kaddr := toAddrPointer(&ki, false, false) // pointer to key | |
2322 | vaddr := toAddrPointer(&vi, valIsPtr, false) // pointer to value | |
2314 | 2323 | siz := keySizer(kaddr, 1) + valSizer(vaddr, 1) // tag of key = 1 (size=1), tag of val = 2 (size=1) |
2315 | 2324 | n += siz + SizeVarint(uint64(siz)) + tagsize |
2316 | 2325 | } |
2328 | 2337 | for _, k := range keys { |
2329 | 2338 | ki := k.Interface() |
2330 | 2339 | vi := m.MapIndex(k).Interface() |
2331 | kaddr := toAddrPointer(&ki, false) // pointer to key | |
2332 | vaddr := toAddrPointer(&vi, valIsPtr) // pointer to value | |
2340 | kaddr := toAddrPointer(&ki, false, false) // pointer to key | |
2341 | vaddr := toAddrPointer(&vi, valIsPtr, false) // pointer to value | |
2333 | 2342 | b = appendVarint(b, tag) |
2334 | 2343 | siz := keySizer(kaddr, 1) + valCachedSizer(vaddr, 1) // tag of key = 1 (size=1), tag of val = 2 (size=1) |
2335 | 2344 | b = appendVarint(b, uint64(siz)) |
2398 | 2407 | // the last time this function was called. |
2399 | 2408 | ei := u.getExtElemInfo(e.desc) |
2400 | 2409 | v := e.value |
2401 | p := toAddrPointer(&v, ei.isptr) | |
2410 | p := toAddrPointer(&v, ei.isptr, ei.deref) | |
2402 | 2411 | n += ei.sizer(p, ei.tagsize) |
2403 | 2412 | } |
2404 | 2413 | mu.Unlock() |
2433 | 2442 | |
2434 | 2443 | ei := u.getExtElemInfo(e.desc) |
2435 | 2444 | v := e.value |
2436 | p := toAddrPointer(&v, ei.isptr) | |
2445 | p := toAddrPointer(&v, ei.isptr, ei.deref) | |
2437 | 2446 | b, err = ei.marshaler(b, p, ei.wiretag, deterministic) |
2438 | 2447 | if !nerr.Merge(err) { |
2439 | 2448 | return b, err |
2464 | 2473 | |
2465 | 2474 | ei := u.getExtElemInfo(e.desc) |
2466 | 2475 | v := e.value |
2467 | p := toAddrPointer(&v, ei.isptr) | |
2476 | p := toAddrPointer(&v, ei.isptr, ei.deref) | |
2468 | 2477 | b, err = ei.marshaler(b, p, ei.wiretag, deterministic) |
2469 | 2478 | if !nerr.Merge(err) { |
2470 | 2479 | return b, err |
2509 | 2518 | |
2510 | 2519 | ei := u.getExtElemInfo(e.desc) |
2511 | 2520 | v := e.value |
2512 | p := toAddrPointer(&v, ei.isptr) | |
2521 | p := toAddrPointer(&v, ei.isptr, ei.deref) | |
2513 | 2522 | n += ei.sizer(p, 1) // message, tag = 3 (size=1) |
2514 | 2523 | } |
2515 | 2524 | mu.Unlock() |
2552 | 2561 | |
2553 | 2562 | ei := u.getExtElemInfo(e.desc) |
2554 | 2563 | v := e.value |
2555 | p := toAddrPointer(&v, ei.isptr) | |
2564 | p := toAddrPointer(&v, ei.isptr, ei.deref) | |
2556 | 2565 | b, err = ei.marshaler(b, p, 3<<3|WireBytes, deterministic) |
2557 | 2566 | if !nerr.Merge(err) { |
2558 | 2567 | return b, err |
2590 | 2599 | |
2591 | 2600 | ei := u.getExtElemInfo(e.desc) |
2592 | 2601 | v := e.value |
2593 | p := toAddrPointer(&v, ei.isptr) | |
2602 | p := toAddrPointer(&v, ei.isptr, ei.deref) | |
2594 | 2603 | b, err = ei.marshaler(b, p, 3<<3|WireBytes, deterministic) |
2595 | 2604 | b = append(b, 1<<3|WireEndGroup) |
2596 | 2605 | if !nerr.Merge(err) { |
2620 | 2629 | |
2621 | 2630 | ei := u.getExtElemInfo(e.desc) |
2622 | 2631 | v := e.value |
2623 | p := toAddrPointer(&v, ei.isptr) | |
2632 | p := toAddrPointer(&v, ei.isptr, ei.deref) | |
2624 | 2633 | n += ei.sizer(p, ei.tagsize) |
2625 | 2634 | } |
2626 | 2635 | return n |
2655 | 2664 | |
2656 | 2665 | ei := u.getExtElemInfo(e.desc) |
2657 | 2666 | v := e.value |
2658 | p := toAddrPointer(&v, ei.isptr) | |
2667 | p := toAddrPointer(&v, ei.isptr, ei.deref) | |
2659 | 2668 | b, err = ei.marshaler(b, p, ei.wiretag, deterministic) |
2660 | 2669 | if !nerr.Merge(err) { |
2661 | 2670 | return b, err |
135 | 135 | u.computeUnmarshalInfo() |
136 | 136 | } |
137 | 137 | if u.isMessageSet { |
138 | return UnmarshalMessageSet(b, m.offset(u.extensions).toExtensions()) | |
138 | return unmarshalMessageSet(b, m.offset(u.extensions).toExtensions()) | |
139 | 139 | } |
140 | 140 | var reqMask uint64 // bitmask of required fields we've seen. |
141 | 141 | var errLater error |
361 | 361 | } |
362 | 362 | |
363 | 363 | // Find any types associated with oneof fields. |
364 | // TODO: XXX_OneofFuncs returns more info than we need. Get rid of some of it? | |
365 | fn := reflect.Zero(reflect.PtrTo(t)).MethodByName("XXX_OneofFuncs") | |
366 | if fn.IsValid() { | |
367 | res := fn.Call(nil)[3] // last return value from XXX_OneofFuncs: []interface{} | |
368 | for i := res.Len() - 1; i >= 0; i-- { | |
369 | v := res.Index(i) // interface{} | |
370 | tptr := reflect.ValueOf(v.Interface()).Type() // *Msg_X | |
371 | typ := tptr.Elem() // Msg_X | |
372 | ||
373 | f := typ.Field(0) // oneof implementers have one field | |
374 | baseUnmarshal := fieldUnmarshaler(&f) | |
375 | tags := strings.Split(f.Tag.Get("protobuf"), ",") | |
376 | fieldNum, err := strconv.Atoi(tags[1]) | |
377 | if err != nil { | |
378 | panic("protobuf tag field not an integer: " + tags[1]) | |
379 | } | |
380 | var name string | |
381 | for _, tag := range tags { | |
382 | if strings.HasPrefix(tag, "name=") { | |
383 | name = strings.TrimPrefix(tag, "name=") | |
384 | break | |
385 | } | |
386 | } | |
387 | ||
388 | // Find the oneof field that this struct implements. | |
389 | // Might take O(n^2) to process all of the oneofs, but who cares. | |
390 | for _, of := range oneofFields { | |
391 | if tptr.Implements(of.ityp) { | |
392 | // We have found the corresponding interface for this struct. | |
393 | // That lets us know where this struct should be stored | |
394 | // when we encounter it during unmarshaling. | |
395 | unmarshal := makeUnmarshalOneof(typ, of.ityp, baseUnmarshal) | |
396 | u.setTag(fieldNum, of.field, unmarshal, 0, name) | |
397 | } | |
398 | } | |
399 | } | |
364 | var oneofImplementers []interface{} | |
365 | switch m := reflect.Zero(reflect.PtrTo(t)).Interface().(type) { | |
366 | case oneofFuncsIface: | |
367 | _, _, _, oneofImplementers = m.XXX_OneofFuncs() | |
368 | case oneofWrappersIface: | |
369 | oneofImplementers = m.XXX_OneofWrappers() | |
370 | } | |
371 | for _, v := range oneofImplementers { | |
372 | tptr := reflect.TypeOf(v) // *Msg_X | |
373 | typ := tptr.Elem() // Msg_X | |
374 | ||
375 | f := typ.Field(0) // oneof implementers have one field | |
376 | baseUnmarshal := fieldUnmarshaler(&f) | |
377 | tags := strings.Split(f.Tag.Get("protobuf"), ",") | |
378 | fieldNum, err := strconv.Atoi(tags[1]) | |
379 | if err != nil { | |
380 | panic("protobuf tag field not an integer: " + tags[1]) | |
381 | } | |
382 | var name string | |
383 | for _, tag := range tags { | |
384 | if strings.HasPrefix(tag, "name=") { | |
385 | name = strings.TrimPrefix(tag, "name=") | |
386 | break | |
387 | } | |
388 | } | |
389 | ||
390 | // Find the oneof field that this struct implements. | |
391 | // Might take O(n^2) to process all of the oneofs, but who cares. | |
392 | for _, of := range oneofFields { | |
393 | if tptr.Implements(of.ityp) { | |
394 | // We have found the corresponding interface for this struct. | |
395 | // That lets us know where this struct should be stored | |
396 | // when we encounter it during unmarshaling. | |
397 | unmarshal := makeUnmarshalOneof(typ, of.ityp, baseUnmarshal) | |
398 | u.setTag(fieldNum, of.field, unmarshal, 0, name) | |
399 | } | |
400 | } | |
401 | ||
400 | 402 | } |
401 | 403 | |
402 | 404 | // Get extension ranges, if any. |
403 | fn = reflect.Zero(reflect.PtrTo(t)).MethodByName("ExtensionRangeArray") | |
405 | fn := reflect.Zero(reflect.PtrTo(t)).MethodByName("ExtensionRangeArray") | |
404 | 406 | if fn.IsValid() { |
405 | 407 | if !u.extensions.IsValid() && !u.oldExtensions.IsValid() { |
406 | 408 | panic("a message with extensions, but no extensions field in " + t.Name()) |
1947 | 1949 | // If there is an error, it returns 0,0. |
1948 | 1950 | func decodeVarint(b []byte) (uint64, int) { |
1949 | 1951 | var x, y uint64 |
1950 | if len(b) <= 0 { | |
1952 | if len(b) == 0 { | |
1951 | 1953 | goto bad |
1952 | 1954 | } |
1953 | 1955 | x = uint64(b[0]) |
0 | 0 | // Code generated by protoc-gen-go. DO NOT EDIT. |
1 | 1 | // source: test_proto/test.proto |
2 | 2 | |
3 | package test_proto // import "github.com/golang/protobuf/proto/test_proto" | |
4 | ||
5 | import proto "github.com/golang/protobuf/proto" | |
6 | import fmt "fmt" | |
7 | import math "math" | |
3 | package test_proto | |
4 | ||
5 | import ( | |
6 | fmt "fmt" | |
7 | proto "github.com/golang/protobuf/proto" | |
8 | math "math" | |
9 | ) | |
8 | 10 | |
9 | 11 | // Reference imports to suppress errors if they are not otherwise used. |
10 | 12 | var _ = proto.Marshal |
15 | 17 | // is compatible with the proto package it is being compiled against. |
16 | 18 | // A compilation error at this line likely means your copy of the |
17 | 19 | // proto package needs to be updated. |
18 | const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package | |
20 | const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package | |
19 | 21 | |
20 | 22 | type FOO int32 |
21 | 23 | |
26 | 28 | var FOO_name = map[int32]string{ |
27 | 29 | 1: "FOO1", |
28 | 30 | } |
31 | ||
29 | 32 | var FOO_value = map[string]int32{ |
30 | 33 | "FOO1": 1, |
31 | 34 | } |
35 | 38 | *p = x |
36 | 39 | return p |
37 | 40 | } |
41 | ||
38 | 42 | func (x FOO) String() string { |
39 | 43 | return proto.EnumName(FOO_name, int32(x)) |
40 | 44 | } |
45 | ||
41 | 46 | func (x *FOO) UnmarshalJSON(data []byte) error { |
42 | 47 | value, err := proto.UnmarshalJSONEnum(FOO_value, data, "FOO") |
43 | 48 | if err != nil { |
46 | 51 | *x = FOO(value) |
47 | 52 | return nil |
48 | 53 | } |
54 | ||
49 | 55 | func (FOO) EnumDescriptor() ([]byte, []int) { |
50 | return fileDescriptor_test_ee9f66cbbebc227c, []int{0} | |
56 | return fileDescriptor_8ca34d01332f1402, []int{0} | |
51 | 57 | } |
52 | 58 | |
53 | 59 | // An enum, for completeness. |
88 | 94 | 11: "TABLE", |
89 | 95 | 12: "FUNCTION", |
90 | 96 | } |
97 | ||
91 | 98 | var GoTest_KIND_value = map[string]int32{ |
92 | 99 | "VOID": 0, |
93 | 100 | "BOOL": 1, |
109 | 116 | *p = x |
110 | 117 | return p |
111 | 118 | } |
119 | ||
112 | 120 | func (x GoTest_KIND) String() string { |
113 | 121 | return proto.EnumName(GoTest_KIND_name, int32(x)) |
114 | 122 | } |
123 | ||
115 | 124 | func (x *GoTest_KIND) UnmarshalJSON(data []byte) error { |
116 | 125 | value, err := proto.UnmarshalJSONEnum(GoTest_KIND_value, data, "GoTest_KIND") |
117 | 126 | if err != nil { |
120 | 129 | *x = GoTest_KIND(value) |
121 | 130 | return nil |
122 | 131 | } |
132 | ||
123 | 133 | func (GoTest_KIND) EnumDescriptor() ([]byte, []int) { |
124 | return fileDescriptor_test_ee9f66cbbebc227c, []int{2, 0} | |
134 | return fileDescriptor_8ca34d01332f1402, []int{2, 0} | |
125 | 135 | } |
126 | 136 | |
127 | 137 | type MyMessage_Color int32 |
137 | 147 | 1: "GREEN", |
138 | 148 | 2: "BLUE", |
139 | 149 | } |
150 | ||
140 | 151 | var MyMessage_Color_value = map[string]int32{ |
141 | 152 | "RED": 0, |
142 | 153 | "GREEN": 1, |
148 | 159 | *p = x |
149 | 160 | return p |
150 | 161 | } |
162 | ||
151 | 163 | func (x MyMessage_Color) String() string { |
152 | 164 | return proto.EnumName(MyMessage_Color_name, int32(x)) |
153 | 165 | } |
166 | ||
154 | 167 | func (x *MyMessage_Color) UnmarshalJSON(data []byte) error { |
155 | 168 | value, err := proto.UnmarshalJSONEnum(MyMessage_Color_value, data, "MyMessage_Color") |
156 | 169 | if err != nil { |
159 | 172 | *x = MyMessage_Color(value) |
160 | 173 | return nil |
161 | 174 | } |
175 | ||
162 | 176 | func (MyMessage_Color) EnumDescriptor() ([]byte, []int) { |
163 | return fileDescriptor_test_ee9f66cbbebc227c, []int{13, 0} | |
177 | return fileDescriptor_8ca34d01332f1402, []int{13, 0} | |
164 | 178 | } |
165 | 179 | |
166 | 180 | type DefaultsMessage_DefaultsEnum int32 |
176 | 190 | 1: "ONE", |
177 | 191 | 2: "TWO", |
178 | 192 | } |
193 | ||
179 | 194 | var DefaultsMessage_DefaultsEnum_value = map[string]int32{ |
180 | 195 | "ZERO": 0, |
181 | 196 | "ONE": 1, |
187 | 202 | *p = x |
188 | 203 | return p |
189 | 204 | } |
205 | ||
190 | 206 | func (x DefaultsMessage_DefaultsEnum) String() string { |
191 | 207 | return proto.EnumName(DefaultsMessage_DefaultsEnum_name, int32(x)) |
192 | 208 | } |
209 | ||
193 | 210 | func (x *DefaultsMessage_DefaultsEnum) UnmarshalJSON(data []byte) error { |
194 | 211 | value, err := proto.UnmarshalJSONEnum(DefaultsMessage_DefaultsEnum_value, data, "DefaultsMessage_DefaultsEnum") |
195 | 212 | if err != nil { |
198 | 215 | *x = DefaultsMessage_DefaultsEnum(value) |
199 | 216 | return nil |
200 | 217 | } |
218 | ||
201 | 219 | func (DefaultsMessage_DefaultsEnum) EnumDescriptor() ([]byte, []int) { |
202 | return fileDescriptor_test_ee9f66cbbebc227c, []int{16, 0} | |
220 | return fileDescriptor_8ca34d01332f1402, []int{16, 0} | |
203 | 221 | } |
204 | 222 | |
205 | 223 | type Defaults_Color int32 |
215 | 233 | 1: "GREEN", |
216 | 234 | 2: "BLUE", |
217 | 235 | } |
236 | ||
218 | 237 | var Defaults_Color_value = map[string]int32{ |
219 | 238 | "RED": 0, |
220 | 239 | "GREEN": 1, |
226 | 245 | *p = x |
227 | 246 | return p |
228 | 247 | } |
248 | ||
229 | 249 | func (x Defaults_Color) String() string { |
230 | 250 | return proto.EnumName(Defaults_Color_name, int32(x)) |
231 | 251 | } |
252 | ||
232 | 253 | func (x *Defaults_Color) UnmarshalJSON(data []byte) error { |
233 | 254 | value, err := proto.UnmarshalJSONEnum(Defaults_Color_value, data, "Defaults_Color") |
234 | 255 | if err != nil { |
237 | 258 | *x = Defaults_Color(value) |
238 | 259 | return nil |
239 | 260 | } |
261 | ||
240 | 262 | func (Defaults_Color) EnumDescriptor() ([]byte, []int) { |
241 | return fileDescriptor_test_ee9f66cbbebc227c, []int{21, 0} | |
263 | return fileDescriptor_8ca34d01332f1402, []int{21, 0} | |
242 | 264 | } |
243 | 265 | |
244 | 266 | type RepeatedEnum_Color int32 |
250 | 272 | var RepeatedEnum_Color_name = map[int32]string{ |
251 | 273 | 1: "RED", |
252 | 274 | } |
275 | ||
253 | 276 | var RepeatedEnum_Color_value = map[string]int32{ |
254 | 277 | "RED": 1, |
255 | 278 | } |
259 | 282 | *p = x |
260 | 283 | return p |
261 | 284 | } |
285 | ||
262 | 286 | func (x RepeatedEnum_Color) String() string { |
263 | 287 | return proto.EnumName(RepeatedEnum_Color_name, int32(x)) |
264 | 288 | } |
289 | ||
265 | 290 | func (x *RepeatedEnum_Color) UnmarshalJSON(data []byte) error { |
266 | 291 | value, err := proto.UnmarshalJSONEnum(RepeatedEnum_Color_value, data, "RepeatedEnum_Color") |
267 | 292 | if err != nil { |
270 | 295 | *x = RepeatedEnum_Color(value) |
271 | 296 | return nil |
272 | 297 | } |
298 | ||
273 | 299 | func (RepeatedEnum_Color) EnumDescriptor() ([]byte, []int) { |
274 | return fileDescriptor_test_ee9f66cbbebc227c, []int{23, 0} | |
300 | return fileDescriptor_8ca34d01332f1402, []int{23, 0} | |
275 | 301 | } |
276 | 302 | |
277 | 303 | type GoEnum struct { |
285 | 311 | func (m *GoEnum) String() string { return proto.CompactTextString(m) } |
286 | 312 | func (*GoEnum) ProtoMessage() {} |
287 | 313 | func (*GoEnum) Descriptor() ([]byte, []int) { |
288 | return fileDescriptor_test_ee9f66cbbebc227c, []int{0} | |
289 | } | |
314 | return fileDescriptor_8ca34d01332f1402, []int{0} | |
315 | } | |
316 | ||
290 | 317 | func (m *GoEnum) XXX_Unmarshal(b []byte) error { |
291 | 318 | return xxx_messageInfo_GoEnum.Unmarshal(m, b) |
292 | 319 | } |
293 | 320 | func (m *GoEnum) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
294 | 321 | return xxx_messageInfo_GoEnum.Marshal(b, m, deterministic) |
295 | 322 | } |
296 | func (dst *GoEnum) XXX_Merge(src proto.Message) { | |
297 | xxx_messageInfo_GoEnum.Merge(dst, src) | |
323 | func (m *GoEnum) XXX_Merge(src proto.Message) { | |
324 | xxx_messageInfo_GoEnum.Merge(m, src) | |
298 | 325 | } |
299 | 326 | func (m *GoEnum) XXX_Size() int { |
300 | 327 | return xxx_messageInfo_GoEnum.Size(m) |
324 | 351 | func (m *GoTestField) String() string { return proto.CompactTextString(m) } |
325 | 352 | func (*GoTestField) ProtoMessage() {} |
326 | 353 | func (*GoTestField) Descriptor() ([]byte, []int) { |
327 | return fileDescriptor_test_ee9f66cbbebc227c, []int{1} | |
328 | } | |
354 | return fileDescriptor_8ca34d01332f1402, []int{1} | |
355 | } | |
356 | ||
329 | 357 | func (m *GoTestField) XXX_Unmarshal(b []byte) error { |
330 | 358 | return xxx_messageInfo_GoTestField.Unmarshal(m, b) |
331 | 359 | } |
332 | 360 | func (m *GoTestField) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
333 | 361 | return xxx_messageInfo_GoTestField.Marshal(b, m, deterministic) |
334 | 362 | } |
335 | func (dst *GoTestField) XXX_Merge(src proto.Message) { | |
336 | xxx_messageInfo_GoTestField.Merge(dst, src) | |
363 | func (m *GoTestField) XXX_Merge(src proto.Message) { | |
364 | xxx_messageInfo_GoTestField.Merge(m, src) | |
337 | 365 | } |
338 | 366 | func (m *GoTestField) XXX_Size() int { |
339 | 367 | return xxx_messageInfo_GoTestField.Size(m) |
457 | 485 | func (m *GoTest) String() string { return proto.CompactTextString(m) } |
458 | 486 | func (*GoTest) ProtoMessage() {} |
459 | 487 | func (*GoTest) Descriptor() ([]byte, []int) { |
460 | return fileDescriptor_test_ee9f66cbbebc227c, []int{2} | |
461 | } | |
488 | return fileDescriptor_8ca34d01332f1402, []int{2} | |
489 | } | |
490 | ||
462 | 491 | func (m *GoTest) XXX_Unmarshal(b []byte) error { |
463 | 492 | return xxx_messageInfo_GoTest.Unmarshal(m, b) |
464 | 493 | } |
465 | 494 | func (m *GoTest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
466 | 495 | return xxx_messageInfo_GoTest.Marshal(b, m, deterministic) |
467 | 496 | } |
468 | func (dst *GoTest) XXX_Merge(src proto.Message) { | |
469 | xxx_messageInfo_GoTest.Merge(dst, src) | |
497 | func (m *GoTest) XXX_Merge(src proto.Message) { | |
498 | xxx_messageInfo_GoTest.Merge(m, src) | |
470 | 499 | } |
471 | 500 | func (m *GoTest) XXX_Size() int { |
472 | 501 | return xxx_messageInfo_GoTest.Size(m) |
1081 | 1110 | func (m *GoTest_RequiredGroup) String() string { return proto.CompactTextString(m) } |
1082 | 1111 | func (*GoTest_RequiredGroup) ProtoMessage() {} |
1083 | 1112 | func (*GoTest_RequiredGroup) Descriptor() ([]byte, []int) { |
1084 | return fileDescriptor_test_ee9f66cbbebc227c, []int{2, 0} | |
1085 | } | |
1113 | return fileDescriptor_8ca34d01332f1402, []int{2, 0} | |
1114 | } | |
1115 | ||
1086 | 1116 | func (m *GoTest_RequiredGroup) XXX_Unmarshal(b []byte) error { |
1087 | 1117 | return xxx_messageInfo_GoTest_RequiredGroup.Unmarshal(m, b) |
1088 | 1118 | } |
1089 | 1119 | func (m *GoTest_RequiredGroup) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
1090 | 1120 | return xxx_messageInfo_GoTest_RequiredGroup.Marshal(b, m, deterministic) |
1091 | 1121 | } |
1092 | func (dst *GoTest_RequiredGroup) XXX_Merge(src proto.Message) { | |
1093 | xxx_messageInfo_GoTest_RequiredGroup.Merge(dst, src) | |
1122 | func (m *GoTest_RequiredGroup) XXX_Merge(src proto.Message) { | |
1123 | xxx_messageInfo_GoTest_RequiredGroup.Merge(m, src) | |
1094 | 1124 | } |
1095 | 1125 | func (m *GoTest_RequiredGroup) XXX_Size() int { |
1096 | 1126 | return xxx_messageInfo_GoTest_RequiredGroup.Size(m) |
1119 | 1149 | func (m *GoTest_RepeatedGroup) String() string { return proto.CompactTextString(m) } |
1120 | 1150 | func (*GoTest_RepeatedGroup) ProtoMessage() {} |
1121 | 1151 | func (*GoTest_RepeatedGroup) Descriptor() ([]byte, []int) { |
1122 | return fileDescriptor_test_ee9f66cbbebc227c, []int{2, 1} | |
1123 | } | |
1152 | return fileDescriptor_8ca34d01332f1402, []int{2, 1} | |
1153 | } | |
1154 | ||
1124 | 1155 | func (m *GoTest_RepeatedGroup) XXX_Unmarshal(b []byte) error { |
1125 | 1156 | return xxx_messageInfo_GoTest_RepeatedGroup.Unmarshal(m, b) |
1126 | 1157 | } |
1127 | 1158 | func (m *GoTest_RepeatedGroup) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
1128 | 1159 | return xxx_messageInfo_GoTest_RepeatedGroup.Marshal(b, m, deterministic) |
1129 | 1160 | } |
1130 | func (dst *GoTest_RepeatedGroup) XXX_Merge(src proto.Message) { | |
1131 | xxx_messageInfo_GoTest_RepeatedGroup.Merge(dst, src) | |
1161 | func (m *GoTest_RepeatedGroup) XXX_Merge(src proto.Message) { | |
1162 | xxx_messageInfo_GoTest_RepeatedGroup.Merge(m, src) | |
1132 | 1163 | } |
1133 | 1164 | func (m *GoTest_RepeatedGroup) XXX_Size() int { |
1134 | 1165 | return xxx_messageInfo_GoTest_RepeatedGroup.Size(m) |
1157 | 1188 | func (m *GoTest_OptionalGroup) String() string { return proto.CompactTextString(m) } |
1158 | 1189 | func (*GoTest_OptionalGroup) ProtoMessage() {} |
1159 | 1190 | func (*GoTest_OptionalGroup) Descriptor() ([]byte, []int) { |
1160 | return fileDescriptor_test_ee9f66cbbebc227c, []int{2, 2} | |
1161 | } | |
1191 | return fileDescriptor_8ca34d01332f1402, []int{2, 2} | |
1192 | } | |
1193 | ||
1162 | 1194 | func (m *GoTest_OptionalGroup) XXX_Unmarshal(b []byte) error { |
1163 | 1195 | return xxx_messageInfo_GoTest_OptionalGroup.Unmarshal(m, b) |
1164 | 1196 | } |
1165 | 1197 | func (m *GoTest_OptionalGroup) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
1166 | 1198 | return xxx_messageInfo_GoTest_OptionalGroup.Marshal(b, m, deterministic) |
1167 | 1199 | } |
1168 | func (dst *GoTest_OptionalGroup) XXX_Merge(src proto.Message) { | |
1169 | xxx_messageInfo_GoTest_OptionalGroup.Merge(dst, src) | |
1200 | func (m *GoTest_OptionalGroup) XXX_Merge(src proto.Message) { | |
1201 | xxx_messageInfo_GoTest_OptionalGroup.Merge(m, src) | |
1170 | 1202 | } |
1171 | 1203 | func (m *GoTest_OptionalGroup) XXX_Size() int { |
1172 | 1204 | return xxx_messageInfo_GoTest_OptionalGroup.Size(m) |
1196 | 1228 | func (m *GoTestRequiredGroupField) String() string { return proto.CompactTextString(m) } |
1197 | 1229 | func (*GoTestRequiredGroupField) ProtoMessage() {} |
1198 | 1230 | func (*GoTestRequiredGroupField) Descriptor() ([]byte, []int) { |
1199 | return fileDescriptor_test_ee9f66cbbebc227c, []int{3} | |
1200 | } | |
1231 | return fileDescriptor_8ca34d01332f1402, []int{3} | |
1232 | } | |
1233 | ||
1201 | 1234 | func (m *GoTestRequiredGroupField) XXX_Unmarshal(b []byte) error { |
1202 | 1235 | return xxx_messageInfo_GoTestRequiredGroupField.Unmarshal(m, b) |
1203 | 1236 | } |
1204 | 1237 | func (m *GoTestRequiredGroupField) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
1205 | 1238 | return xxx_messageInfo_GoTestRequiredGroupField.Marshal(b, m, deterministic) |
1206 | 1239 | } |
1207 | func (dst *GoTestRequiredGroupField) XXX_Merge(src proto.Message) { | |
1208 | xxx_messageInfo_GoTestRequiredGroupField.Merge(dst, src) | |
1240 | func (m *GoTestRequiredGroupField) XXX_Merge(src proto.Message) { | |
1241 | xxx_messageInfo_GoTestRequiredGroupField.Merge(m, src) | |
1209 | 1242 | } |
1210 | 1243 | func (m *GoTestRequiredGroupField) XXX_Size() int { |
1211 | 1244 | return xxx_messageInfo_GoTestRequiredGroupField.Size(m) |
1234 | 1267 | func (m *GoTestRequiredGroupField_Group) String() string { return proto.CompactTextString(m) } |
1235 | 1268 | func (*GoTestRequiredGroupField_Group) ProtoMessage() {} |
1236 | 1269 | func (*GoTestRequiredGroupField_Group) Descriptor() ([]byte, []int) { |
1237 | return fileDescriptor_test_ee9f66cbbebc227c, []int{3, 0} | |
1238 | } | |
1270 | return fileDescriptor_8ca34d01332f1402, []int{3, 0} | |
1271 | } | |
1272 | ||
1239 | 1273 | func (m *GoTestRequiredGroupField_Group) XXX_Unmarshal(b []byte) error { |
1240 | 1274 | return xxx_messageInfo_GoTestRequiredGroupField_Group.Unmarshal(m, b) |
1241 | 1275 | } |
1242 | 1276 | func (m *GoTestRequiredGroupField_Group) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
1243 | 1277 | return xxx_messageInfo_GoTestRequiredGroupField_Group.Marshal(b, m, deterministic) |
1244 | 1278 | } |
1245 | func (dst *GoTestRequiredGroupField_Group) XXX_Merge(src proto.Message) { | |
1246 | xxx_messageInfo_GoTestRequiredGroupField_Group.Merge(dst, src) | |
1279 | func (m *GoTestRequiredGroupField_Group) XXX_Merge(src proto.Message) { | |
1280 | xxx_messageInfo_GoTestRequiredGroupField_Group.Merge(m, src) | |
1247 | 1281 | } |
1248 | 1282 | func (m *GoTestRequiredGroupField_Group) XXX_Size() int { |
1249 | 1283 | return xxx_messageInfo_GoTestRequiredGroupField_Group.Size(m) |
1279 | 1313 | func (m *GoSkipTest) String() string { return proto.CompactTextString(m) } |
1280 | 1314 | func (*GoSkipTest) ProtoMessage() {} |
1281 | 1315 | func (*GoSkipTest) Descriptor() ([]byte, []int) { |
1282 | return fileDescriptor_test_ee9f66cbbebc227c, []int{4} | |
1283 | } | |
1316 | return fileDescriptor_8ca34d01332f1402, []int{4} | |
1317 | } | |
1318 | ||
1284 | 1319 | func (m *GoSkipTest) XXX_Unmarshal(b []byte) error { |
1285 | 1320 | return xxx_messageInfo_GoSkipTest.Unmarshal(m, b) |
1286 | 1321 | } |
1287 | 1322 | func (m *GoSkipTest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
1288 | 1323 | return xxx_messageInfo_GoSkipTest.Marshal(b, m, deterministic) |
1289 | 1324 | } |
1290 | func (dst *GoSkipTest) XXX_Merge(src proto.Message) { | |
1291 | xxx_messageInfo_GoSkipTest.Merge(dst, src) | |
1325 | func (m *GoSkipTest) XXX_Merge(src proto.Message) { | |
1326 | xxx_messageInfo_GoSkipTest.Merge(m, src) | |
1292 | 1327 | } |
1293 | 1328 | func (m *GoSkipTest) XXX_Size() int { |
1294 | 1329 | return xxx_messageInfo_GoSkipTest.Size(m) |
1346 | 1381 | func (m *GoSkipTest_SkipGroup) String() string { return proto.CompactTextString(m) } |
1347 | 1382 | func (*GoSkipTest_SkipGroup) ProtoMessage() {} |
1348 | 1383 | func (*GoSkipTest_SkipGroup) Descriptor() ([]byte, []int) { |
1349 | return fileDescriptor_test_ee9f66cbbebc227c, []int{4, 0} | |
1350 | } | |
1384 | return fileDescriptor_8ca34d01332f1402, []int{4, 0} | |
1385 | } | |
1386 | ||
1351 | 1387 | func (m *GoSkipTest_SkipGroup) XXX_Unmarshal(b []byte) error { |
1352 | 1388 | return xxx_messageInfo_GoSkipTest_SkipGroup.Unmarshal(m, b) |
1353 | 1389 | } |
1354 | 1390 | func (m *GoSkipTest_SkipGroup) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
1355 | 1391 | return xxx_messageInfo_GoSkipTest_SkipGroup.Marshal(b, m, deterministic) |
1356 | 1392 | } |
1357 | func (dst *GoSkipTest_SkipGroup) XXX_Merge(src proto.Message) { | |
1358 | xxx_messageInfo_GoSkipTest_SkipGroup.Merge(dst, src) | |
1393 | func (m *GoSkipTest_SkipGroup) XXX_Merge(src proto.Message) { | |
1394 | xxx_messageInfo_GoSkipTest_SkipGroup.Merge(m, src) | |
1359 | 1395 | } |
1360 | 1396 | func (m *GoSkipTest_SkipGroup) XXX_Size() int { |
1361 | 1397 | return xxx_messageInfo_GoSkipTest_SkipGroup.Size(m) |
1393 | 1429 | func (m *NonPackedTest) String() string { return proto.CompactTextString(m) } |
1394 | 1430 | func (*NonPackedTest) ProtoMessage() {} |
1395 | 1431 | func (*NonPackedTest) Descriptor() ([]byte, []int) { |
1396 | return fileDescriptor_test_ee9f66cbbebc227c, []int{5} | |
1397 | } | |
1432 | return fileDescriptor_8ca34d01332f1402, []int{5} | |
1433 | } | |
1434 | ||
1398 | 1435 | func (m *NonPackedTest) XXX_Unmarshal(b []byte) error { |
1399 | 1436 | return xxx_messageInfo_NonPackedTest.Unmarshal(m, b) |
1400 | 1437 | } |
1401 | 1438 | func (m *NonPackedTest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
1402 | 1439 | return xxx_messageInfo_NonPackedTest.Marshal(b, m, deterministic) |
1403 | 1440 | } |
1404 | func (dst *NonPackedTest) XXX_Merge(src proto.Message) { | |
1405 | xxx_messageInfo_NonPackedTest.Merge(dst, src) | |
1441 | func (m *NonPackedTest) XXX_Merge(src proto.Message) { | |
1442 | xxx_messageInfo_NonPackedTest.Merge(m, src) | |
1406 | 1443 | } |
1407 | 1444 | func (m *NonPackedTest) XXX_Size() int { |
1408 | 1445 | return xxx_messageInfo_NonPackedTest.Size(m) |
1431 | 1468 | func (m *PackedTest) String() string { return proto.CompactTextString(m) } |
1432 | 1469 | func (*PackedTest) ProtoMessage() {} |
1433 | 1470 | func (*PackedTest) Descriptor() ([]byte, []int) { |
1434 | return fileDescriptor_test_ee9f66cbbebc227c, []int{6} | |
1435 | } | |
1471 | return fileDescriptor_8ca34d01332f1402, []int{6} | |
1472 | } | |
1473 | ||
1436 | 1474 | func (m *PackedTest) XXX_Unmarshal(b []byte) error { |
1437 | 1475 | return xxx_messageInfo_PackedTest.Unmarshal(m, b) |
1438 | 1476 | } |
1439 | 1477 | func (m *PackedTest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
1440 | 1478 | return xxx_messageInfo_PackedTest.Marshal(b, m, deterministic) |
1441 | 1479 | } |
1442 | func (dst *PackedTest) XXX_Merge(src proto.Message) { | |
1443 | xxx_messageInfo_PackedTest.Merge(dst, src) | |
1480 | func (m *PackedTest) XXX_Merge(src proto.Message) { | |
1481 | xxx_messageInfo_PackedTest.Merge(m, src) | |
1444 | 1482 | } |
1445 | 1483 | func (m *PackedTest) XXX_Size() int { |
1446 | 1484 | return xxx_messageInfo_PackedTest.Size(m) |
1470 | 1508 | func (m *MaxTag) String() string { return proto.CompactTextString(m) } |
1471 | 1509 | func (*MaxTag) ProtoMessage() {} |
1472 | 1510 | func (*MaxTag) Descriptor() ([]byte, []int) { |
1473 | return fileDescriptor_test_ee9f66cbbebc227c, []int{7} | |
1474 | } | |
1511 | return fileDescriptor_8ca34d01332f1402, []int{7} | |
1512 | } | |
1513 | ||
1475 | 1514 | func (m *MaxTag) XXX_Unmarshal(b []byte) error { |
1476 | 1515 | return xxx_messageInfo_MaxTag.Unmarshal(m, b) |
1477 | 1516 | } |
1478 | 1517 | func (m *MaxTag) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
1479 | 1518 | return xxx_messageInfo_MaxTag.Marshal(b, m, deterministic) |
1480 | 1519 | } |
1481 | func (dst *MaxTag) XXX_Merge(src proto.Message) { | |
1482 | xxx_messageInfo_MaxTag.Merge(dst, src) | |
1520 | func (m *MaxTag) XXX_Merge(src proto.Message) { | |
1521 | xxx_messageInfo_MaxTag.Merge(m, src) | |
1483 | 1522 | } |
1484 | 1523 | func (m *MaxTag) XXX_Size() int { |
1485 | 1524 | return xxx_messageInfo_MaxTag.Size(m) |
1509 | 1548 | func (m *OldMessage) String() string { return proto.CompactTextString(m) } |
1510 | 1549 | func (*OldMessage) ProtoMessage() {} |
1511 | 1550 | func (*OldMessage) Descriptor() ([]byte, []int) { |
1512 | return fileDescriptor_test_ee9f66cbbebc227c, []int{8} | |
1513 | } | |
1551 | return fileDescriptor_8ca34d01332f1402, []int{8} | |
1552 | } | |
1553 | ||
1514 | 1554 | func (m *OldMessage) XXX_Unmarshal(b []byte) error { |
1515 | 1555 | return xxx_messageInfo_OldMessage.Unmarshal(m, b) |
1516 | 1556 | } |
1517 | 1557 | func (m *OldMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
1518 | 1558 | return xxx_messageInfo_OldMessage.Marshal(b, m, deterministic) |
1519 | 1559 | } |
1520 | func (dst *OldMessage) XXX_Merge(src proto.Message) { | |
1521 | xxx_messageInfo_OldMessage.Merge(dst, src) | |
1560 | func (m *OldMessage) XXX_Merge(src proto.Message) { | |
1561 | xxx_messageInfo_OldMessage.Merge(m, src) | |
1522 | 1562 | } |
1523 | 1563 | func (m *OldMessage) XXX_Size() int { |
1524 | 1564 | return xxx_messageInfo_OldMessage.Size(m) |
1554 | 1594 | func (m *OldMessage_Nested) String() string { return proto.CompactTextString(m) } |
1555 | 1595 | func (*OldMessage_Nested) ProtoMessage() {} |
1556 | 1596 | func (*OldMessage_Nested) Descriptor() ([]byte, []int) { |
1557 | return fileDescriptor_test_ee9f66cbbebc227c, []int{8, 0} | |
1558 | } | |
1597 | return fileDescriptor_8ca34d01332f1402, []int{8, 0} | |
1598 | } | |
1599 | ||
1559 | 1600 | func (m *OldMessage_Nested) XXX_Unmarshal(b []byte) error { |
1560 | 1601 | return xxx_messageInfo_OldMessage_Nested.Unmarshal(m, b) |
1561 | 1602 | } |
1562 | 1603 | func (m *OldMessage_Nested) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
1563 | 1604 | return xxx_messageInfo_OldMessage_Nested.Marshal(b, m, deterministic) |
1564 | 1605 | } |
1565 | func (dst *OldMessage_Nested) XXX_Merge(src proto.Message) { | |
1566 | xxx_messageInfo_OldMessage_Nested.Merge(dst, src) | |
1606 | func (m *OldMessage_Nested) XXX_Merge(src proto.Message) { | |
1607 | xxx_messageInfo_OldMessage_Nested.Merge(m, src) | |
1567 | 1608 | } |
1568 | 1609 | func (m *OldMessage_Nested) XXX_Size() int { |
1569 | 1610 | return xxx_messageInfo_OldMessage_Nested.Size(m) |
1596 | 1637 | func (m *NewMessage) String() string { return proto.CompactTextString(m) } |
1597 | 1638 | func (*NewMessage) ProtoMessage() {} |
1598 | 1639 | func (*NewMessage) Descriptor() ([]byte, []int) { |
1599 | return fileDescriptor_test_ee9f66cbbebc227c, []int{9} | |
1600 | } | |
1640 | return fileDescriptor_8ca34d01332f1402, []int{9} | |
1641 | } | |
1642 | ||
1601 | 1643 | func (m *NewMessage) XXX_Unmarshal(b []byte) error { |
1602 | 1644 | return xxx_messageInfo_NewMessage.Unmarshal(m, b) |
1603 | 1645 | } |
1604 | 1646 | func (m *NewMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
1605 | 1647 | return xxx_messageInfo_NewMessage.Marshal(b, m, deterministic) |
1606 | 1648 | } |
1607 | func (dst *NewMessage) XXX_Merge(src proto.Message) { | |
1608 | xxx_messageInfo_NewMessage.Merge(dst, src) | |
1649 | func (m *NewMessage) XXX_Merge(src proto.Message) { | |
1650 | xxx_messageInfo_NewMessage.Merge(m, src) | |
1609 | 1651 | } |
1610 | 1652 | func (m *NewMessage) XXX_Size() int { |
1611 | 1653 | return xxx_messageInfo_NewMessage.Size(m) |
1642 | 1684 | func (m *NewMessage_Nested) String() string { return proto.CompactTextString(m) } |
1643 | 1685 | func (*NewMessage_Nested) ProtoMessage() {} |
1644 | 1686 | func (*NewMessage_Nested) Descriptor() ([]byte, []int) { |
1645 | return fileDescriptor_test_ee9f66cbbebc227c, []int{9, 0} | |
1646 | } | |
1687 | return fileDescriptor_8ca34d01332f1402, []int{9, 0} | |
1688 | } | |
1689 | ||
1647 | 1690 | func (m *NewMessage_Nested) XXX_Unmarshal(b []byte) error { |
1648 | 1691 | return xxx_messageInfo_NewMessage_Nested.Unmarshal(m, b) |
1649 | 1692 | } |
1650 | 1693 | func (m *NewMessage_Nested) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
1651 | 1694 | return xxx_messageInfo_NewMessage_Nested.Marshal(b, m, deterministic) |
1652 | 1695 | } |
1653 | func (dst *NewMessage_Nested) XXX_Merge(src proto.Message) { | |
1654 | xxx_messageInfo_NewMessage_Nested.Merge(dst, src) | |
1696 | func (m *NewMessage_Nested) XXX_Merge(src proto.Message) { | |
1697 | xxx_messageInfo_NewMessage_Nested.Merge(m, src) | |
1655 | 1698 | } |
1656 | 1699 | func (m *NewMessage_Nested) XXX_Size() int { |
1657 | 1700 | return xxx_messageInfo_NewMessage_Nested.Size(m) |
1689 | 1732 | func (m *InnerMessage) String() string { return proto.CompactTextString(m) } |
1690 | 1733 | func (*InnerMessage) ProtoMessage() {} |
1691 | 1734 | func (*InnerMessage) Descriptor() ([]byte, []int) { |
1692 | return fileDescriptor_test_ee9f66cbbebc227c, []int{10} | |
1693 | } | |
1735 | return fileDescriptor_8ca34d01332f1402, []int{10} | |
1736 | } | |
1737 | ||
1694 | 1738 | func (m *InnerMessage) XXX_Unmarshal(b []byte) error { |
1695 | 1739 | return xxx_messageInfo_InnerMessage.Unmarshal(m, b) |
1696 | 1740 | } |
1697 | 1741 | func (m *InnerMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
1698 | 1742 | return xxx_messageInfo_InnerMessage.Marshal(b, m, deterministic) |
1699 | 1743 | } |
1700 | func (dst *InnerMessage) XXX_Merge(src proto.Message) { | |
1701 | xxx_messageInfo_InnerMessage.Merge(dst, src) | |
1744 | func (m *InnerMessage) XXX_Merge(src proto.Message) { | |
1745 | xxx_messageInfo_InnerMessage.Merge(m, src) | |
1702 | 1746 | } |
1703 | 1747 | func (m *InnerMessage) XXX_Size() int { |
1704 | 1748 | return xxx_messageInfo_InnerMessage.Size(m) |
1747 | 1791 | func (m *OtherMessage) String() string { return proto.CompactTextString(m) } |
1748 | 1792 | func (*OtherMessage) ProtoMessage() {} |
1749 | 1793 | func (*OtherMessage) Descriptor() ([]byte, []int) { |
1750 | return fileDescriptor_test_ee9f66cbbebc227c, []int{11} | |
1794 | return fileDescriptor_8ca34d01332f1402, []int{11} | |
1751 | 1795 | } |
1752 | 1796 | |
1753 | 1797 | var extRange_OtherMessage = []proto.ExtensionRange{ |
1757 | 1801 | func (*OtherMessage) ExtensionRangeArray() []proto.ExtensionRange { |
1758 | 1802 | return extRange_OtherMessage |
1759 | 1803 | } |
1804 | ||
1760 | 1805 | func (m *OtherMessage) XXX_Unmarshal(b []byte) error { |
1761 | 1806 | return xxx_messageInfo_OtherMessage.Unmarshal(m, b) |
1762 | 1807 | } |
1763 | 1808 | func (m *OtherMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
1764 | 1809 | return xxx_messageInfo_OtherMessage.Marshal(b, m, deterministic) |
1765 | 1810 | } |
1766 | func (dst *OtherMessage) XXX_Merge(src proto.Message) { | |
1767 | xxx_messageInfo_OtherMessage.Merge(dst, src) | |
1811 | func (m *OtherMessage) XXX_Merge(src proto.Message) { | |
1812 | xxx_messageInfo_OtherMessage.Merge(m, src) | |
1768 | 1813 | } |
1769 | 1814 | func (m *OtherMessage) XXX_Size() int { |
1770 | 1815 | return xxx_messageInfo_OtherMessage.Size(m) |
1814 | 1859 | func (m *RequiredInnerMessage) String() string { return proto.CompactTextString(m) } |
1815 | 1860 | func (*RequiredInnerMessage) ProtoMessage() {} |
1816 | 1861 | func (*RequiredInnerMessage) Descriptor() ([]byte, []int) { |
1817 | return fileDescriptor_test_ee9f66cbbebc227c, []int{12} | |
1818 | } | |
1862 | return fileDescriptor_8ca34d01332f1402, []int{12} | |
1863 | } | |
1864 | ||
1819 | 1865 | func (m *RequiredInnerMessage) XXX_Unmarshal(b []byte) error { |
1820 | 1866 | return xxx_messageInfo_RequiredInnerMessage.Unmarshal(m, b) |
1821 | 1867 | } |
1822 | 1868 | func (m *RequiredInnerMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
1823 | 1869 | return xxx_messageInfo_RequiredInnerMessage.Marshal(b, m, deterministic) |
1824 | 1870 | } |
1825 | func (dst *RequiredInnerMessage) XXX_Merge(src proto.Message) { | |
1826 | xxx_messageInfo_RequiredInnerMessage.Merge(dst, src) | |
1871 | func (m *RequiredInnerMessage) XXX_Merge(src proto.Message) { | |
1872 | xxx_messageInfo_RequiredInnerMessage.Merge(m, src) | |
1827 | 1873 | } |
1828 | 1874 | func (m *RequiredInnerMessage) XXX_Size() int { |
1829 | 1875 | return xxx_messageInfo_RequiredInnerMessage.Size(m) |
1865 | 1911 | func (m *MyMessage) String() string { return proto.CompactTextString(m) } |
1866 | 1912 | func (*MyMessage) ProtoMessage() {} |
1867 | 1913 | func (*MyMessage) Descriptor() ([]byte, []int) { |
1868 | return fileDescriptor_test_ee9f66cbbebc227c, []int{13} | |
1914 | return fileDescriptor_8ca34d01332f1402, []int{13} | |
1869 | 1915 | } |
1870 | 1916 | |
1871 | 1917 | var extRange_MyMessage = []proto.ExtensionRange{ |
1875 | 1921 | func (*MyMessage) ExtensionRangeArray() []proto.ExtensionRange { |
1876 | 1922 | return extRange_MyMessage |
1877 | 1923 | } |
1924 | ||
1878 | 1925 | func (m *MyMessage) XXX_Unmarshal(b []byte) error { |
1879 | 1926 | return xxx_messageInfo_MyMessage.Unmarshal(m, b) |
1880 | 1927 | } |
1881 | 1928 | func (m *MyMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
1882 | 1929 | return xxx_messageInfo_MyMessage.Marshal(b, m, deterministic) |
1883 | 1930 | } |
1884 | func (dst *MyMessage) XXX_Merge(src proto.Message) { | |
1885 | xxx_messageInfo_MyMessage.Merge(dst, src) | |
1931 | func (m *MyMessage) XXX_Merge(src proto.Message) { | |
1932 | xxx_messageInfo_MyMessage.Merge(m, src) | |
1886 | 1933 | } |
1887 | 1934 | func (m *MyMessage) XXX_Size() int { |
1888 | 1935 | return xxx_messageInfo_MyMessage.Size(m) |
1988 | 2035 | func (m *MyMessage_SomeGroup) String() string { return proto.CompactTextString(m) } |
1989 | 2036 | func (*MyMessage_SomeGroup) ProtoMessage() {} |
1990 | 2037 | func (*MyMessage_SomeGroup) Descriptor() ([]byte, []int) { |
1991 | return fileDescriptor_test_ee9f66cbbebc227c, []int{13, 0} | |
1992 | } | |
2038 | return fileDescriptor_8ca34d01332f1402, []int{13, 0} | |
2039 | } | |
2040 | ||
1993 | 2041 | func (m *MyMessage_SomeGroup) XXX_Unmarshal(b []byte) error { |
1994 | 2042 | return xxx_messageInfo_MyMessage_SomeGroup.Unmarshal(m, b) |
1995 | 2043 | } |
1996 | 2044 | func (m *MyMessage_SomeGroup) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
1997 | 2045 | return xxx_messageInfo_MyMessage_SomeGroup.Marshal(b, m, deterministic) |
1998 | 2046 | } |
1999 | func (dst *MyMessage_SomeGroup) XXX_Merge(src proto.Message) { | |
2000 | xxx_messageInfo_MyMessage_SomeGroup.Merge(dst, src) | |
2047 | func (m *MyMessage_SomeGroup) XXX_Merge(src proto.Message) { | |
2048 | xxx_messageInfo_MyMessage_SomeGroup.Merge(m, src) | |
2001 | 2049 | } |
2002 | 2050 | func (m *MyMessage_SomeGroup) XXX_Size() int { |
2003 | 2051 | return xxx_messageInfo_MyMessage_SomeGroup.Size(m) |
2027 | 2075 | func (m *Ext) String() string { return proto.CompactTextString(m) } |
2028 | 2076 | func (*Ext) ProtoMessage() {} |
2029 | 2077 | func (*Ext) Descriptor() ([]byte, []int) { |
2030 | return fileDescriptor_test_ee9f66cbbebc227c, []int{14} | |
2031 | } | |
2078 | return fileDescriptor_8ca34d01332f1402, []int{14} | |
2079 | } | |
2080 | ||
2032 | 2081 | func (m *Ext) XXX_Unmarshal(b []byte) error { |
2033 | 2082 | return xxx_messageInfo_Ext.Unmarshal(m, b) |
2034 | 2083 | } |
2035 | 2084 | func (m *Ext) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
2036 | 2085 | return xxx_messageInfo_Ext.Marshal(b, m, deterministic) |
2037 | 2086 | } |
2038 | func (dst *Ext) XXX_Merge(src proto.Message) { | |
2039 | xxx_messageInfo_Ext.Merge(dst, src) | |
2087 | func (m *Ext) XXX_Merge(src proto.Message) { | |
2088 | xxx_messageInfo_Ext.Merge(m, src) | |
2040 | 2089 | } |
2041 | 2090 | func (m *Ext) XXX_Size() int { |
2042 | 2091 | return xxx_messageInfo_Ext.Size(m) |
2101 | 2150 | func (m *ComplexExtension) String() string { return proto.CompactTextString(m) } |
2102 | 2151 | func (*ComplexExtension) ProtoMessage() {} |
2103 | 2152 | func (*ComplexExtension) Descriptor() ([]byte, []int) { |
2104 | return fileDescriptor_test_ee9f66cbbebc227c, []int{15} | |
2105 | } | |
2153 | return fileDescriptor_8ca34d01332f1402, []int{15} | |
2154 | } | |
2155 | ||
2106 | 2156 | func (m *ComplexExtension) XXX_Unmarshal(b []byte) error { |
2107 | 2157 | return xxx_messageInfo_ComplexExtension.Unmarshal(m, b) |
2108 | 2158 | } |
2109 | 2159 | func (m *ComplexExtension) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
2110 | 2160 | return xxx_messageInfo_ComplexExtension.Marshal(b, m, deterministic) |
2111 | 2161 | } |
2112 | func (dst *ComplexExtension) XXX_Merge(src proto.Message) { | |
2113 | xxx_messageInfo_ComplexExtension.Merge(dst, src) | |
2162 | func (m *ComplexExtension) XXX_Merge(src proto.Message) { | |
2163 | xxx_messageInfo_ComplexExtension.Merge(m, src) | |
2114 | 2164 | } |
2115 | 2165 | func (m *ComplexExtension) XXX_Size() int { |
2116 | 2166 | return xxx_messageInfo_ComplexExtension.Size(m) |
2153 | 2203 | func (m *DefaultsMessage) String() string { return proto.CompactTextString(m) } |
2154 | 2204 | func (*DefaultsMessage) ProtoMessage() {} |
2155 | 2205 | func (*DefaultsMessage) Descriptor() ([]byte, []int) { |
2156 | return fileDescriptor_test_ee9f66cbbebc227c, []int{16} | |
2206 | return fileDescriptor_8ca34d01332f1402, []int{16} | |
2157 | 2207 | } |
2158 | 2208 | |
2159 | 2209 | var extRange_DefaultsMessage = []proto.ExtensionRange{ |
2163 | 2213 | func (*DefaultsMessage) ExtensionRangeArray() []proto.ExtensionRange { |
2164 | 2214 | return extRange_DefaultsMessage |
2165 | 2215 | } |
2216 | ||
2166 | 2217 | func (m *DefaultsMessage) XXX_Unmarshal(b []byte) error { |
2167 | 2218 | return xxx_messageInfo_DefaultsMessage.Unmarshal(m, b) |
2168 | 2219 | } |
2169 | 2220 | func (m *DefaultsMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
2170 | 2221 | return xxx_messageInfo_DefaultsMessage.Marshal(b, m, deterministic) |
2171 | 2222 | } |
2172 | func (dst *DefaultsMessage) XXX_Merge(src proto.Message) { | |
2173 | xxx_messageInfo_DefaultsMessage.Merge(dst, src) | |
2223 | func (m *DefaultsMessage) XXX_Merge(src proto.Message) { | |
2224 | xxx_messageInfo_DefaultsMessage.Merge(m, src) | |
2174 | 2225 | } |
2175 | 2226 | func (m *DefaultsMessage) XXX_Size() int { |
2176 | 2227 | return xxx_messageInfo_DefaultsMessage.Size(m) |
2192 | 2243 | func (m *MyMessageSet) String() string { return proto.CompactTextString(m) } |
2193 | 2244 | func (*MyMessageSet) ProtoMessage() {} |
2194 | 2245 | func (*MyMessageSet) Descriptor() ([]byte, []int) { |
2195 | return fileDescriptor_test_ee9f66cbbebc227c, []int{17} | |
2196 | } | |
2197 | ||
2198 | func (m *MyMessageSet) MarshalJSON() ([]byte, error) { | |
2199 | return proto.MarshalMessageSetJSON(&m.XXX_InternalExtensions) | |
2200 | } | |
2201 | func (m *MyMessageSet) UnmarshalJSON(buf []byte) error { | |
2202 | return proto.UnmarshalMessageSetJSON(buf, &m.XXX_InternalExtensions) | |
2246 | return fileDescriptor_8ca34d01332f1402, []int{17} | |
2203 | 2247 | } |
2204 | 2248 | |
2205 | 2249 | var extRange_MyMessageSet = []proto.ExtensionRange{ |
2209 | 2253 | func (*MyMessageSet) ExtensionRangeArray() []proto.ExtensionRange { |
2210 | 2254 | return extRange_MyMessageSet |
2211 | 2255 | } |
2256 | ||
2212 | 2257 | func (m *MyMessageSet) XXX_Unmarshal(b []byte) error { |
2213 | 2258 | return xxx_messageInfo_MyMessageSet.Unmarshal(m, b) |
2214 | 2259 | } |
2215 | 2260 | func (m *MyMessageSet) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
2216 | 2261 | return xxx_messageInfo_MyMessageSet.Marshal(b, m, deterministic) |
2217 | 2262 | } |
2218 | func (dst *MyMessageSet) XXX_Merge(src proto.Message) { | |
2219 | xxx_messageInfo_MyMessageSet.Merge(dst, src) | |
2263 | func (m *MyMessageSet) XXX_Merge(src proto.Message) { | |
2264 | xxx_messageInfo_MyMessageSet.Merge(m, src) | |
2220 | 2265 | } |
2221 | 2266 | func (m *MyMessageSet) XXX_Size() int { |
2222 | 2267 | return xxx_messageInfo_MyMessageSet.Size(m) |
2237 | 2282 | func (m *Empty) String() string { return proto.CompactTextString(m) } |
2238 | 2283 | func (*Empty) ProtoMessage() {} |
2239 | 2284 | func (*Empty) Descriptor() ([]byte, []int) { |
2240 | return fileDescriptor_test_ee9f66cbbebc227c, []int{18} | |
2241 | } | |
2285 | return fileDescriptor_8ca34d01332f1402, []int{18} | |
2286 | } | |
2287 | ||
2242 | 2288 | func (m *Empty) XXX_Unmarshal(b []byte) error { |
2243 | 2289 | return xxx_messageInfo_Empty.Unmarshal(m, b) |
2244 | 2290 | } |
2245 | 2291 | func (m *Empty) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
2246 | 2292 | return xxx_messageInfo_Empty.Marshal(b, m, deterministic) |
2247 | 2293 | } |
2248 | func (dst *Empty) XXX_Merge(src proto.Message) { | |
2249 | xxx_messageInfo_Empty.Merge(dst, src) | |
2294 | func (m *Empty) XXX_Merge(src proto.Message) { | |
2295 | xxx_messageInfo_Empty.Merge(m, src) | |
2250 | 2296 | } |
2251 | 2297 | func (m *Empty) XXX_Size() int { |
2252 | 2298 | return xxx_messageInfo_Empty.Size(m) |
2268 | 2314 | func (m *MessageList) String() string { return proto.CompactTextString(m) } |
2269 | 2315 | func (*MessageList) ProtoMessage() {} |
2270 | 2316 | func (*MessageList) Descriptor() ([]byte, []int) { |
2271 | return fileDescriptor_test_ee9f66cbbebc227c, []int{19} | |
2272 | } | |
2317 | return fileDescriptor_8ca34d01332f1402, []int{19} | |
2318 | } | |
2319 | ||
2273 | 2320 | func (m *MessageList) XXX_Unmarshal(b []byte) error { |
2274 | 2321 | return xxx_messageInfo_MessageList.Unmarshal(m, b) |
2275 | 2322 | } |
2276 | 2323 | func (m *MessageList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
2277 | 2324 | return xxx_messageInfo_MessageList.Marshal(b, m, deterministic) |
2278 | 2325 | } |
2279 | func (dst *MessageList) XXX_Merge(src proto.Message) { | |
2280 | xxx_messageInfo_MessageList.Merge(dst, src) | |
2326 | func (m *MessageList) XXX_Merge(src proto.Message) { | |
2327 | xxx_messageInfo_MessageList.Merge(m, src) | |
2281 | 2328 | } |
2282 | 2329 | func (m *MessageList) XXX_Size() int { |
2283 | 2330 | return xxx_messageInfo_MessageList.Size(m) |
2307 | 2354 | func (m *MessageList_Message) String() string { return proto.CompactTextString(m) } |
2308 | 2355 | func (*MessageList_Message) ProtoMessage() {} |
2309 | 2356 | func (*MessageList_Message) Descriptor() ([]byte, []int) { |
2310 | return fileDescriptor_test_ee9f66cbbebc227c, []int{19, 0} | |
2311 | } | |
2357 | return fileDescriptor_8ca34d01332f1402, []int{19, 0} | |
2358 | } | |
2359 | ||
2312 | 2360 | func (m *MessageList_Message) XXX_Unmarshal(b []byte) error { |
2313 | 2361 | return xxx_messageInfo_MessageList_Message.Unmarshal(m, b) |
2314 | 2362 | } |
2315 | 2363 | func (m *MessageList_Message) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
2316 | 2364 | return xxx_messageInfo_MessageList_Message.Marshal(b, m, deterministic) |
2317 | 2365 | } |
2318 | func (dst *MessageList_Message) XXX_Merge(src proto.Message) { | |
2319 | xxx_messageInfo_MessageList_Message.Merge(dst, src) | |
2366 | func (m *MessageList_Message) XXX_Merge(src proto.Message) { | |
2367 | xxx_messageInfo_MessageList_Message.Merge(m, src) | |
2320 | 2368 | } |
2321 | 2369 | func (m *MessageList_Message) XXX_Size() int { |
2322 | 2370 | return xxx_messageInfo_MessageList_Message.Size(m) |
2353 | 2401 | func (m *Strings) String() string { return proto.CompactTextString(m) } |
2354 | 2402 | func (*Strings) ProtoMessage() {} |
2355 | 2403 | func (*Strings) Descriptor() ([]byte, []int) { |
2356 | return fileDescriptor_test_ee9f66cbbebc227c, []int{20} | |
2357 | } | |
2404 | return fileDescriptor_8ca34d01332f1402, []int{20} | |
2405 | } | |
2406 | ||
2358 | 2407 | func (m *Strings) XXX_Unmarshal(b []byte) error { |
2359 | 2408 | return xxx_messageInfo_Strings.Unmarshal(m, b) |
2360 | 2409 | } |
2361 | 2410 | func (m *Strings) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
2362 | 2411 | return xxx_messageInfo_Strings.Marshal(b, m, deterministic) |
2363 | 2412 | } |
2364 | func (dst *Strings) XXX_Merge(src proto.Message) { | |
2365 | xxx_messageInfo_Strings.Merge(dst, src) | |
2413 | func (m *Strings) XXX_Merge(src proto.Message) { | |
2414 | xxx_messageInfo_Strings.Merge(m, src) | |
2366 | 2415 | } |
2367 | 2416 | func (m *Strings) XXX_Size() int { |
2368 | 2417 | return xxx_messageInfo_Strings.Size(m) |
2421 | 2470 | func (m *Defaults) String() string { return proto.CompactTextString(m) } |
2422 | 2471 | func (*Defaults) ProtoMessage() {} |
2423 | 2472 | func (*Defaults) Descriptor() ([]byte, []int) { |
2424 | return fileDescriptor_test_ee9f66cbbebc227c, []int{21} | |
2425 | } | |
2473 | return fileDescriptor_8ca34d01332f1402, []int{21} | |
2474 | } | |
2475 | ||
2426 | 2476 | func (m *Defaults) XXX_Unmarshal(b []byte) error { |
2427 | 2477 | return xxx_messageInfo_Defaults.Unmarshal(m, b) |
2428 | 2478 | } |
2429 | 2479 | func (m *Defaults) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
2430 | 2480 | return xxx_messageInfo_Defaults.Marshal(b, m, deterministic) |
2431 | 2481 | } |
2432 | func (dst *Defaults) XXX_Merge(src proto.Message) { | |
2433 | xxx_messageInfo_Defaults.Merge(dst, src) | |
2482 | func (m *Defaults) XXX_Merge(src proto.Message) { | |
2483 | xxx_messageInfo_Defaults.Merge(m, src) | |
2434 | 2484 | } |
2435 | 2485 | func (m *Defaults) XXX_Size() int { |
2436 | 2486 | return xxx_messageInfo_Defaults.Size(m) |
2606 | 2656 | func (m *SubDefaults) String() string { return proto.CompactTextString(m) } |
2607 | 2657 | func (*SubDefaults) ProtoMessage() {} |
2608 | 2658 | func (*SubDefaults) Descriptor() ([]byte, []int) { |
2609 | return fileDescriptor_test_ee9f66cbbebc227c, []int{22} | |
2610 | } | |
2659 | return fileDescriptor_8ca34d01332f1402, []int{22} | |
2660 | } | |
2661 | ||
2611 | 2662 | func (m *SubDefaults) XXX_Unmarshal(b []byte) error { |
2612 | 2663 | return xxx_messageInfo_SubDefaults.Unmarshal(m, b) |
2613 | 2664 | } |
2614 | 2665 | func (m *SubDefaults) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
2615 | 2666 | return xxx_messageInfo_SubDefaults.Marshal(b, m, deterministic) |
2616 | 2667 | } |
2617 | func (dst *SubDefaults) XXX_Merge(src proto.Message) { | |
2618 | xxx_messageInfo_SubDefaults.Merge(dst, src) | |
2668 | func (m *SubDefaults) XXX_Merge(src proto.Message) { | |
2669 | xxx_messageInfo_SubDefaults.Merge(m, src) | |
2619 | 2670 | } |
2620 | 2671 | func (m *SubDefaults) XXX_Size() int { |
2621 | 2672 | return xxx_messageInfo_SubDefaults.Size(m) |
2646 | 2697 | func (m *RepeatedEnum) String() string { return proto.CompactTextString(m) } |
2647 | 2698 | func (*RepeatedEnum) ProtoMessage() {} |
2648 | 2699 | func (*RepeatedEnum) Descriptor() ([]byte, []int) { |
2649 | return fileDescriptor_test_ee9f66cbbebc227c, []int{23} | |
2650 | } | |
2700 | return fileDescriptor_8ca34d01332f1402, []int{23} | |
2701 | } | |
2702 | ||
2651 | 2703 | func (m *RepeatedEnum) XXX_Unmarshal(b []byte) error { |
2652 | 2704 | return xxx_messageInfo_RepeatedEnum.Unmarshal(m, b) |
2653 | 2705 | } |
2654 | 2706 | func (m *RepeatedEnum) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
2655 | 2707 | return xxx_messageInfo_RepeatedEnum.Marshal(b, m, deterministic) |
2656 | 2708 | } |
2657 | func (dst *RepeatedEnum) XXX_Merge(src proto.Message) { | |
2658 | xxx_messageInfo_RepeatedEnum.Merge(dst, src) | |
2709 | func (m *RepeatedEnum) XXX_Merge(src proto.Message) { | |
2710 | xxx_messageInfo_RepeatedEnum.Merge(m, src) | |
2659 | 2711 | } |
2660 | 2712 | func (m *RepeatedEnum) XXX_Size() int { |
2661 | 2713 | return xxx_messageInfo_RepeatedEnum.Size(m) |
2690 | 2742 | func (m *MoreRepeated) String() string { return proto.CompactTextString(m) } |
2691 | 2743 | func (*MoreRepeated) ProtoMessage() {} |
2692 | 2744 | func (*MoreRepeated) Descriptor() ([]byte, []int) { |
2693 | return fileDescriptor_test_ee9f66cbbebc227c, []int{24} | |
2694 | } | |
2745 | return fileDescriptor_8ca34d01332f1402, []int{24} | |
2746 | } | |
2747 | ||
2695 | 2748 | func (m *MoreRepeated) XXX_Unmarshal(b []byte) error { |
2696 | 2749 | return xxx_messageInfo_MoreRepeated.Unmarshal(m, b) |
2697 | 2750 | } |
2698 | 2751 | func (m *MoreRepeated) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
2699 | 2752 | return xxx_messageInfo_MoreRepeated.Marshal(b, m, deterministic) |
2700 | 2753 | } |
2701 | func (dst *MoreRepeated) XXX_Merge(src proto.Message) { | |
2702 | xxx_messageInfo_MoreRepeated.Merge(dst, src) | |
2754 | func (m *MoreRepeated) XXX_Merge(src proto.Message) { | |
2755 | xxx_messageInfo_MoreRepeated.Merge(m, src) | |
2703 | 2756 | } |
2704 | 2757 | func (m *MoreRepeated) XXX_Size() int { |
2705 | 2758 | return xxx_messageInfo_MoreRepeated.Size(m) |
2770 | 2823 | func (m *GroupOld) String() string { return proto.CompactTextString(m) } |
2771 | 2824 | func (*GroupOld) ProtoMessage() {} |
2772 | 2825 | func (*GroupOld) Descriptor() ([]byte, []int) { |
2773 | return fileDescriptor_test_ee9f66cbbebc227c, []int{25} | |
2774 | } | |
2826 | return fileDescriptor_8ca34d01332f1402, []int{25} | |
2827 | } | |
2828 | ||
2775 | 2829 | func (m *GroupOld) XXX_Unmarshal(b []byte) error { |
2776 | 2830 | return xxx_messageInfo_GroupOld.Unmarshal(m, b) |
2777 | 2831 | } |
2778 | 2832 | func (m *GroupOld) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
2779 | 2833 | return xxx_messageInfo_GroupOld.Marshal(b, m, deterministic) |
2780 | 2834 | } |
2781 | func (dst *GroupOld) XXX_Merge(src proto.Message) { | |
2782 | xxx_messageInfo_GroupOld.Merge(dst, src) | |
2835 | func (m *GroupOld) XXX_Merge(src proto.Message) { | |
2836 | xxx_messageInfo_GroupOld.Merge(m, src) | |
2783 | 2837 | } |
2784 | 2838 | func (m *GroupOld) XXX_Size() int { |
2785 | 2839 | return xxx_messageInfo_GroupOld.Size(m) |
2808 | 2862 | func (m *GroupOld_G) String() string { return proto.CompactTextString(m) } |
2809 | 2863 | func (*GroupOld_G) ProtoMessage() {} |
2810 | 2864 | func (*GroupOld_G) Descriptor() ([]byte, []int) { |
2811 | return fileDescriptor_test_ee9f66cbbebc227c, []int{25, 0} | |
2812 | } | |
2865 | return fileDescriptor_8ca34d01332f1402, []int{25, 0} | |
2866 | } | |
2867 | ||
2813 | 2868 | func (m *GroupOld_G) XXX_Unmarshal(b []byte) error { |
2814 | 2869 | return xxx_messageInfo_GroupOld_G.Unmarshal(m, b) |
2815 | 2870 | } |
2816 | 2871 | func (m *GroupOld_G) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
2817 | 2872 | return xxx_messageInfo_GroupOld_G.Marshal(b, m, deterministic) |
2818 | 2873 | } |
2819 | func (dst *GroupOld_G) XXX_Merge(src proto.Message) { | |
2820 | xxx_messageInfo_GroupOld_G.Merge(dst, src) | |
2874 | func (m *GroupOld_G) XXX_Merge(src proto.Message) { | |
2875 | xxx_messageInfo_GroupOld_G.Merge(m, src) | |
2821 | 2876 | } |
2822 | 2877 | func (m *GroupOld_G) XXX_Size() int { |
2823 | 2878 | return xxx_messageInfo_GroupOld_G.Size(m) |
2846 | 2901 | func (m *GroupNew) String() string { return proto.CompactTextString(m) } |
2847 | 2902 | func (*GroupNew) ProtoMessage() {} |
2848 | 2903 | func (*GroupNew) Descriptor() ([]byte, []int) { |
2849 | return fileDescriptor_test_ee9f66cbbebc227c, []int{26} | |
2850 | } | |
2904 | return fileDescriptor_8ca34d01332f1402, []int{26} | |
2905 | } | |
2906 | ||
2851 | 2907 | func (m *GroupNew) XXX_Unmarshal(b []byte) error { |
2852 | 2908 | return xxx_messageInfo_GroupNew.Unmarshal(m, b) |
2853 | 2909 | } |
2854 | 2910 | func (m *GroupNew) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
2855 | 2911 | return xxx_messageInfo_GroupNew.Marshal(b, m, deterministic) |
2856 | 2912 | } |
2857 | func (dst *GroupNew) XXX_Merge(src proto.Message) { | |
2858 | xxx_messageInfo_GroupNew.Merge(dst, src) | |
2913 | func (m *GroupNew) XXX_Merge(src proto.Message) { | |
2914 | xxx_messageInfo_GroupNew.Merge(m, src) | |
2859 | 2915 | } |
2860 | 2916 | func (m *GroupNew) XXX_Size() int { |
2861 | 2917 | return xxx_messageInfo_GroupNew.Size(m) |
2885 | 2941 | func (m *GroupNew_G) String() string { return proto.CompactTextString(m) } |
2886 | 2942 | func (*GroupNew_G) ProtoMessage() {} |
2887 | 2943 | func (*GroupNew_G) Descriptor() ([]byte, []int) { |
2888 | return fileDescriptor_test_ee9f66cbbebc227c, []int{26, 0} | |
2889 | } | |
2944 | return fileDescriptor_8ca34d01332f1402, []int{26, 0} | |
2945 | } | |
2946 | ||
2890 | 2947 | func (m *GroupNew_G) XXX_Unmarshal(b []byte) error { |
2891 | 2948 | return xxx_messageInfo_GroupNew_G.Unmarshal(m, b) |
2892 | 2949 | } |
2893 | 2950 | func (m *GroupNew_G) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
2894 | 2951 | return xxx_messageInfo_GroupNew_G.Marshal(b, m, deterministic) |
2895 | 2952 | } |
2896 | func (dst *GroupNew_G) XXX_Merge(src proto.Message) { | |
2897 | xxx_messageInfo_GroupNew_G.Merge(dst, src) | |
2953 | func (m *GroupNew_G) XXX_Merge(src proto.Message) { | |
2954 | xxx_messageInfo_GroupNew_G.Merge(m, src) | |
2898 | 2955 | } |
2899 | 2956 | func (m *GroupNew_G) XXX_Size() int { |
2900 | 2957 | return xxx_messageInfo_GroupNew_G.Size(m) |
2931 | 2988 | func (m *FloatingPoint) String() string { return proto.CompactTextString(m) } |
2932 | 2989 | func (*FloatingPoint) ProtoMessage() {} |
2933 | 2990 | func (*FloatingPoint) Descriptor() ([]byte, []int) { |
2934 | return fileDescriptor_test_ee9f66cbbebc227c, []int{27} | |
2935 | } | |
2991 | return fileDescriptor_8ca34d01332f1402, []int{27} | |
2992 | } | |
2993 | ||
2936 | 2994 | func (m *FloatingPoint) XXX_Unmarshal(b []byte) error { |
2937 | 2995 | return xxx_messageInfo_FloatingPoint.Unmarshal(m, b) |
2938 | 2996 | } |
2939 | 2997 | func (m *FloatingPoint) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
2940 | 2998 | return xxx_messageInfo_FloatingPoint.Marshal(b, m, deterministic) |
2941 | 2999 | } |
2942 | func (dst *FloatingPoint) XXX_Merge(src proto.Message) { | |
2943 | xxx_messageInfo_FloatingPoint.Merge(dst, src) | |
3000 | func (m *FloatingPoint) XXX_Merge(src proto.Message) { | |
3001 | xxx_messageInfo_FloatingPoint.Merge(m, src) | |
2944 | 3002 | } |
2945 | 3003 | func (m *FloatingPoint) XXX_Size() int { |
2946 | 3004 | return xxx_messageInfo_FloatingPoint.Size(m) |
2979 | 3037 | func (m *MessageWithMap) String() string { return proto.CompactTextString(m) } |
2980 | 3038 | func (*MessageWithMap) ProtoMessage() {} |
2981 | 3039 | func (*MessageWithMap) Descriptor() ([]byte, []int) { |
2982 | return fileDescriptor_test_ee9f66cbbebc227c, []int{28} | |
2983 | } | |
3040 | return fileDescriptor_8ca34d01332f1402, []int{28} | |
3041 | } | |
3042 | ||
2984 | 3043 | func (m *MessageWithMap) XXX_Unmarshal(b []byte) error { |
2985 | 3044 | return xxx_messageInfo_MessageWithMap.Unmarshal(m, b) |
2986 | 3045 | } |
2987 | 3046 | func (m *MessageWithMap) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
2988 | 3047 | return xxx_messageInfo_MessageWithMap.Marshal(b, m, deterministic) |
2989 | 3048 | } |
2990 | func (dst *MessageWithMap) XXX_Merge(src proto.Message) { | |
2991 | xxx_messageInfo_MessageWithMap.Merge(dst, src) | |
3049 | func (m *MessageWithMap) XXX_Merge(src proto.Message) { | |
3050 | xxx_messageInfo_MessageWithMap.Merge(m, src) | |
2992 | 3051 | } |
2993 | 3052 | func (m *MessageWithMap) XXX_Size() int { |
2994 | 3053 | return xxx_messageInfo_MessageWithMap.Size(m) |
3059 | 3118 | func (m *Oneof) String() string { return proto.CompactTextString(m) } |
3060 | 3119 | func (*Oneof) ProtoMessage() {} |
3061 | 3120 | func (*Oneof) Descriptor() ([]byte, []int) { |
3062 | return fileDescriptor_test_ee9f66cbbebc227c, []int{29} | |
3063 | } | |
3121 | return fileDescriptor_8ca34d01332f1402, []int{29} | |
3122 | } | |
3123 | ||
3064 | 3124 | func (m *Oneof) XXX_Unmarshal(b []byte) error { |
3065 | 3125 | return xxx_messageInfo_Oneof.Unmarshal(m, b) |
3066 | 3126 | } |
3067 | 3127 | func (m *Oneof) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
3068 | 3128 | return xxx_messageInfo_Oneof.Marshal(b, m, deterministic) |
3069 | 3129 | } |
3070 | func (dst *Oneof) XXX_Merge(src proto.Message) { | |
3071 | xxx_messageInfo_Oneof.Merge(dst, src) | |
3130 | func (m *Oneof) XXX_Merge(src proto.Message) { | |
3131 | xxx_messageInfo_Oneof.Merge(m, src) | |
3072 | 3132 | } |
3073 | 3133 | func (m *Oneof) XXX_Size() int { |
3074 | 3134 | return xxx_messageInfo_Oneof.Size(m) |
3335 | 3395 | return 0 |
3336 | 3396 | } |
3337 | 3397 | |
3338 | // XXX_OneofFuncs is for the internal use of the proto package. | |
3339 | func (*Oneof) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { | |
3340 | return _Oneof_OneofMarshaler, _Oneof_OneofUnmarshaler, _Oneof_OneofSizer, []interface{}{ | |
3398 | // XXX_OneofWrappers is for the internal use of the proto package. | |
3399 | func (*Oneof) XXX_OneofWrappers() []interface{} { | |
3400 | return []interface{}{ | |
3341 | 3401 | (*Oneof_F_Bool)(nil), |
3342 | 3402 | (*Oneof_F_Int32)(nil), |
3343 | 3403 | (*Oneof_F_Int64)(nil), |
3359 | 3419 | } |
3360 | 3420 | } |
3361 | 3421 | |
3362 | func _Oneof_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { | |
3363 | m := msg.(*Oneof) | |
3364 | // union | |
3365 | switch x := m.Union.(type) { | |
3366 | case *Oneof_F_Bool: | |
3367 | t := uint64(0) | |
3368 | if x.F_Bool { | |
3369 | t = 1 | |
3370 | } | |
3371 | b.EncodeVarint(1<<3 | proto.WireVarint) | |
3372 | b.EncodeVarint(t) | |
3373 | case *Oneof_F_Int32: | |
3374 | b.EncodeVarint(2<<3 | proto.WireVarint) | |
3375 | b.EncodeVarint(uint64(x.F_Int32)) | |
3376 | case *Oneof_F_Int64: | |
3377 | b.EncodeVarint(3<<3 | proto.WireVarint) | |
3378 | b.EncodeVarint(uint64(x.F_Int64)) | |
3379 | case *Oneof_F_Fixed32: | |
3380 | b.EncodeVarint(4<<3 | proto.WireFixed32) | |
3381 | b.EncodeFixed32(uint64(x.F_Fixed32)) | |
3382 | case *Oneof_F_Fixed64: | |
3383 | b.EncodeVarint(5<<3 | proto.WireFixed64) | |
3384 | b.EncodeFixed64(uint64(x.F_Fixed64)) | |
3385 | case *Oneof_F_Uint32: | |
3386 | b.EncodeVarint(6<<3 | proto.WireVarint) | |
3387 | b.EncodeVarint(uint64(x.F_Uint32)) | |
3388 | case *Oneof_F_Uint64: | |
3389 | b.EncodeVarint(7<<3 | proto.WireVarint) | |
3390 | b.EncodeVarint(uint64(x.F_Uint64)) | |
3391 | case *Oneof_F_Float: | |
3392 | b.EncodeVarint(8<<3 | proto.WireFixed32) | |
3393 | b.EncodeFixed32(uint64(math.Float32bits(x.F_Float))) | |
3394 | case *Oneof_F_Double: | |
3395 | b.EncodeVarint(9<<3 | proto.WireFixed64) | |
3396 | b.EncodeFixed64(math.Float64bits(x.F_Double)) | |
3397 | case *Oneof_F_String: | |
3398 | b.EncodeVarint(10<<3 | proto.WireBytes) | |
3399 | b.EncodeStringBytes(x.F_String) | |
3400 | case *Oneof_F_Bytes: | |
3401 | b.EncodeVarint(11<<3 | proto.WireBytes) | |
3402 | b.EncodeRawBytes(x.F_Bytes) | |
3403 | case *Oneof_F_Sint32: | |
3404 | b.EncodeVarint(12<<3 | proto.WireVarint) | |
3405 | b.EncodeZigzag32(uint64(x.F_Sint32)) | |
3406 | case *Oneof_F_Sint64: | |
3407 | b.EncodeVarint(13<<3 | proto.WireVarint) | |
3408 | b.EncodeZigzag64(uint64(x.F_Sint64)) | |
3409 | case *Oneof_F_Enum: | |
3410 | b.EncodeVarint(14<<3 | proto.WireVarint) | |
3411 | b.EncodeVarint(uint64(x.F_Enum)) | |
3412 | case *Oneof_F_Message: | |
3413 | b.EncodeVarint(15<<3 | proto.WireBytes) | |
3414 | if err := b.EncodeMessage(x.F_Message); err != nil { | |
3415 | return err | |
3416 | } | |
3417 | case *Oneof_FGroup: | |
3418 | b.EncodeVarint(16<<3 | proto.WireStartGroup) | |
3419 | if err := b.Marshal(x.FGroup); err != nil { | |
3420 | return err | |
3421 | } | |
3422 | b.EncodeVarint(16<<3 | proto.WireEndGroup) | |
3423 | case *Oneof_F_Largest_Tag: | |
3424 | b.EncodeVarint(536870911<<3 | proto.WireVarint) | |
3425 | b.EncodeVarint(uint64(x.F_Largest_Tag)) | |
3426 | case nil: | |
3427 | default: | |
3428 | return fmt.Errorf("Oneof.Union has unexpected type %T", x) | |
3429 | } | |
3430 | // tormato | |
3431 | switch x := m.Tormato.(type) { | |
3432 | case *Oneof_Value: | |
3433 | b.EncodeVarint(100<<3 | proto.WireVarint) | |
3434 | b.EncodeVarint(uint64(x.Value)) | |
3435 | case nil: | |
3436 | default: | |
3437 | return fmt.Errorf("Oneof.Tormato has unexpected type %T", x) | |
3438 | } | |
3439 | return nil | |
3440 | } | |
3441 | ||
3442 | func _Oneof_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { | |
3443 | m := msg.(*Oneof) | |
3444 | switch tag { | |
3445 | case 1: // union.F_Bool | |
3446 | if wire != proto.WireVarint { | |
3447 | return true, proto.ErrInternalBadWireType | |
3448 | } | |
3449 | x, err := b.DecodeVarint() | |
3450 | m.Union = &Oneof_F_Bool{x != 0} | |
3451 | return true, err | |
3452 | case 2: // union.F_Int32 | |
3453 | if wire != proto.WireVarint { | |
3454 | return true, proto.ErrInternalBadWireType | |
3455 | } | |
3456 | x, err := b.DecodeVarint() | |
3457 | m.Union = &Oneof_F_Int32{int32(x)} | |
3458 | return true, err | |
3459 | case 3: // union.F_Int64 | |
3460 | if wire != proto.WireVarint { | |
3461 | return true, proto.ErrInternalBadWireType | |
3462 | } | |
3463 | x, err := b.DecodeVarint() | |
3464 | m.Union = &Oneof_F_Int64{int64(x)} | |
3465 | return true, err | |
3466 | case 4: // union.F_Fixed32 | |
3467 | if wire != proto.WireFixed32 { | |
3468 | return true, proto.ErrInternalBadWireType | |
3469 | } | |
3470 | x, err := b.DecodeFixed32() | |
3471 | m.Union = &Oneof_F_Fixed32{uint32(x)} | |
3472 | return true, err | |
3473 | case 5: // union.F_Fixed64 | |
3474 | if wire != proto.WireFixed64 { | |
3475 | return true, proto.ErrInternalBadWireType | |
3476 | } | |
3477 | x, err := b.DecodeFixed64() | |
3478 | m.Union = &Oneof_F_Fixed64{x} | |
3479 | return true, err | |
3480 | case 6: // union.F_Uint32 | |
3481 | if wire != proto.WireVarint { | |
3482 | return true, proto.ErrInternalBadWireType | |
3483 | } | |
3484 | x, err := b.DecodeVarint() | |
3485 | m.Union = &Oneof_F_Uint32{uint32(x)} | |
3486 | return true, err | |
3487 | case 7: // union.F_Uint64 | |
3488 | if wire != proto.WireVarint { | |
3489 | return true, proto.ErrInternalBadWireType | |
3490 | } | |
3491 | x, err := b.DecodeVarint() | |
3492 | m.Union = &Oneof_F_Uint64{x} | |
3493 | return true, err | |
3494 | case 8: // union.F_Float | |
3495 | if wire != proto.WireFixed32 { | |
3496 | return true, proto.ErrInternalBadWireType | |
3497 | } | |
3498 | x, err := b.DecodeFixed32() | |
3499 | m.Union = &Oneof_F_Float{math.Float32frombits(uint32(x))} | |
3500 | return true, err | |
3501 | case 9: // union.F_Double | |
3502 | if wire != proto.WireFixed64 { | |
3503 | return true, proto.ErrInternalBadWireType | |
3504 | } | |
3505 | x, err := b.DecodeFixed64() | |
3506 | m.Union = &Oneof_F_Double{math.Float64frombits(x)} | |
3507 | return true, err | |
3508 | case 10: // union.F_String | |
3509 | if wire != proto.WireBytes { | |
3510 | return true, proto.ErrInternalBadWireType | |
3511 | } | |
3512 | x, err := b.DecodeStringBytes() | |
3513 | m.Union = &Oneof_F_String{x} | |
3514 | return true, err | |
3515 | case 11: // union.F_Bytes | |
3516 | if wire != proto.WireBytes { | |
3517 | return true, proto.ErrInternalBadWireType | |
3518 | } | |
3519 | x, err := b.DecodeRawBytes(true) | |
3520 | m.Union = &Oneof_F_Bytes{x} | |
3521 | return true, err | |
3522 | case 12: // union.F_Sint32 | |
3523 | if wire != proto.WireVarint { | |
3524 | return true, proto.ErrInternalBadWireType | |
3525 | } | |
3526 | x, err := b.DecodeZigzag32() | |
3527 | m.Union = &Oneof_F_Sint32{int32(x)} | |
3528 | return true, err | |
3529 | case 13: // union.F_Sint64 | |
3530 | if wire != proto.WireVarint { | |
3531 | return true, proto.ErrInternalBadWireType | |
3532 | } | |
3533 | x, err := b.DecodeZigzag64() | |
3534 | m.Union = &Oneof_F_Sint64{int64(x)} | |
3535 | return true, err | |
3536 | case 14: // union.F_Enum | |
3537 | if wire != proto.WireVarint { | |
3538 | return true, proto.ErrInternalBadWireType | |
3539 | } | |
3540 | x, err := b.DecodeVarint() | |
3541 | m.Union = &Oneof_F_Enum{MyMessage_Color(x)} | |
3542 | return true, err | |
3543 | case 15: // union.F_Message | |
3544 | if wire != proto.WireBytes { | |
3545 | return true, proto.ErrInternalBadWireType | |
3546 | } | |
3547 | msg := new(GoTestField) | |
3548 | err := b.DecodeMessage(msg) | |
3549 | m.Union = &Oneof_F_Message{msg} | |
3550 | return true, err | |
3551 | case 16: // union.f_group | |
3552 | if wire != proto.WireStartGroup { | |
3553 | return true, proto.ErrInternalBadWireType | |
3554 | } | |
3555 | msg := new(Oneof_F_Group) | |
3556 | err := b.DecodeGroup(msg) | |
3557 | m.Union = &Oneof_FGroup{msg} | |
3558 | return true, err | |
3559 | case 536870911: // union.F_Largest_Tag | |
3560 | if wire != proto.WireVarint { | |
3561 | return true, proto.ErrInternalBadWireType | |
3562 | } | |
3563 | x, err := b.DecodeVarint() | |
3564 | m.Union = &Oneof_F_Largest_Tag{int32(x)} | |
3565 | return true, err | |
3566 | case 100: // tormato.value | |
3567 | if wire != proto.WireVarint { | |
3568 | return true, proto.ErrInternalBadWireType | |
3569 | } | |
3570 | x, err := b.DecodeVarint() | |
3571 | m.Tormato = &Oneof_Value{int32(x)} | |
3572 | return true, err | |
3573 | default: | |
3574 | return false, nil | |
3575 | } | |
3576 | } | |
3577 | ||
3578 | func _Oneof_OneofSizer(msg proto.Message) (n int) { | |
3579 | m := msg.(*Oneof) | |
3580 | // union | |
3581 | switch x := m.Union.(type) { | |
3582 | case *Oneof_F_Bool: | |
3583 | n += 1 // tag and wire | |
3584 | n += 1 | |
3585 | case *Oneof_F_Int32: | |
3586 | n += 1 // tag and wire | |
3587 | n += proto.SizeVarint(uint64(x.F_Int32)) | |
3588 | case *Oneof_F_Int64: | |
3589 | n += 1 // tag and wire | |
3590 | n += proto.SizeVarint(uint64(x.F_Int64)) | |
3591 | case *Oneof_F_Fixed32: | |
3592 | n += 1 // tag and wire | |
3593 | n += 4 | |
3594 | case *Oneof_F_Fixed64: | |
3595 | n += 1 // tag and wire | |
3596 | n += 8 | |
3597 | case *Oneof_F_Uint32: | |
3598 | n += 1 // tag and wire | |
3599 | n += proto.SizeVarint(uint64(x.F_Uint32)) | |
3600 | case *Oneof_F_Uint64: | |
3601 | n += 1 // tag and wire | |
3602 | n += proto.SizeVarint(uint64(x.F_Uint64)) | |
3603 | case *Oneof_F_Float: | |
3604 | n += 1 // tag and wire | |
3605 | n += 4 | |
3606 | case *Oneof_F_Double: | |
3607 | n += 1 // tag and wire | |
3608 | n += 8 | |
3609 | case *Oneof_F_String: | |
3610 | n += 1 // tag and wire | |
3611 | n += proto.SizeVarint(uint64(len(x.F_String))) | |
3612 | n += len(x.F_String) | |
3613 | case *Oneof_F_Bytes: | |
3614 | n += 1 // tag and wire | |
3615 | n += proto.SizeVarint(uint64(len(x.F_Bytes))) | |
3616 | n += len(x.F_Bytes) | |
3617 | case *Oneof_F_Sint32: | |
3618 | n += 1 // tag and wire | |
3619 | n += proto.SizeVarint(uint64((uint32(x.F_Sint32) << 1) ^ uint32((int32(x.F_Sint32) >> 31)))) | |
3620 | case *Oneof_F_Sint64: | |
3621 | n += 1 // tag and wire | |
3622 | n += proto.SizeVarint(uint64(uint64(x.F_Sint64<<1) ^ uint64((int64(x.F_Sint64) >> 63)))) | |
3623 | case *Oneof_F_Enum: | |
3624 | n += 1 // tag and wire | |
3625 | n += proto.SizeVarint(uint64(x.F_Enum)) | |
3626 | case *Oneof_F_Message: | |
3627 | s := proto.Size(x.F_Message) | |
3628 | n += 1 // tag and wire | |
3629 | n += proto.SizeVarint(uint64(s)) | |
3630 | n += s | |
3631 | case *Oneof_FGroup: | |
3632 | n += 2 // tag and wire | |
3633 | n += proto.Size(x.FGroup) | |
3634 | n += 2 // tag and wire | |
3635 | case *Oneof_F_Largest_Tag: | |
3636 | n += 5 // tag and wire | |
3637 | n += proto.SizeVarint(uint64(x.F_Largest_Tag)) | |
3638 | case nil: | |
3639 | default: | |
3640 | panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) | |
3641 | } | |
3642 | // tormato | |
3643 | switch x := m.Tormato.(type) { | |
3644 | case *Oneof_Value: | |
3645 | n += 2 // tag and wire | |
3646 | n += proto.SizeVarint(uint64(x.Value)) | |
3647 | case nil: | |
3648 | default: | |
3649 | panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) | |
3650 | } | |
3651 | return n | |
3652 | } | |
3653 | ||
3654 | 3422 | type Oneof_F_Group struct { |
3655 | 3423 | X *int32 `protobuf:"varint,17,opt,name=x" json:"x,omitempty"` |
3656 | 3424 | XXX_NoUnkeyedLiteral struct{} `json:"-"` |
3662 | 3430 | func (m *Oneof_F_Group) String() string { return proto.CompactTextString(m) } |
3663 | 3431 | func (*Oneof_F_Group) ProtoMessage() {} |
3664 | 3432 | func (*Oneof_F_Group) Descriptor() ([]byte, []int) { |
3665 | return fileDescriptor_test_ee9f66cbbebc227c, []int{29, 0} | |
3666 | } | |
3433 | return fileDescriptor_8ca34d01332f1402, []int{29, 0} | |
3434 | } | |
3435 | ||
3667 | 3436 | func (m *Oneof_F_Group) XXX_Unmarshal(b []byte) error { |
3668 | 3437 | return xxx_messageInfo_Oneof_F_Group.Unmarshal(m, b) |
3669 | 3438 | } |
3670 | 3439 | func (m *Oneof_F_Group) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
3671 | 3440 | return xxx_messageInfo_Oneof_F_Group.Marshal(b, m, deterministic) |
3672 | 3441 | } |
3673 | func (dst *Oneof_F_Group) XXX_Merge(src proto.Message) { | |
3674 | xxx_messageInfo_Oneof_F_Group.Merge(dst, src) | |
3442 | func (m *Oneof_F_Group) XXX_Merge(src proto.Message) { | |
3443 | xxx_messageInfo_Oneof_F_Group.Merge(m, src) | |
3675 | 3444 | } |
3676 | 3445 | func (m *Oneof_F_Group) XXX_Size() int { |
3677 | 3446 | return xxx_messageInfo_Oneof_F_Group.Size(m) |
3710 | 3479 | func (m *Communique) String() string { return proto.CompactTextString(m) } |
3711 | 3480 | func (*Communique) ProtoMessage() {} |
3712 | 3481 | func (*Communique) Descriptor() ([]byte, []int) { |
3713 | return fileDescriptor_test_ee9f66cbbebc227c, []int{30} | |
3714 | } | |
3482 | return fileDescriptor_8ca34d01332f1402, []int{30} | |
3483 | } | |
3484 | ||
3715 | 3485 | func (m *Communique) XXX_Unmarshal(b []byte) error { |
3716 | 3486 | return xxx_messageInfo_Communique.Unmarshal(m, b) |
3717 | 3487 | } |
3718 | 3488 | func (m *Communique) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
3719 | 3489 | return xxx_messageInfo_Communique.Marshal(b, m, deterministic) |
3720 | 3490 | } |
3721 | func (dst *Communique) XXX_Merge(src proto.Message) { | |
3722 | xxx_messageInfo_Communique.Merge(dst, src) | |
3491 | func (m *Communique) XXX_Merge(src proto.Message) { | |
3492 | xxx_messageInfo_Communique.Merge(m, src) | |
3723 | 3493 | } |
3724 | 3494 | func (m *Communique) XXX_Size() int { |
3725 | 3495 | return xxx_messageInfo_Communique.Size(m) |
3826 | 3596 | return nil |
3827 | 3597 | } |
3828 | 3598 | |
3829 | // XXX_OneofFuncs is for the internal use of the proto package. | |
3830 | func (*Communique) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { | |
3831 | return _Communique_OneofMarshaler, _Communique_OneofUnmarshaler, _Communique_OneofSizer, []interface{}{ | |
3599 | // XXX_OneofWrappers is for the internal use of the proto package. | |
3600 | func (*Communique) XXX_OneofWrappers() []interface{} { | |
3601 | return []interface{}{ | |
3832 | 3602 | (*Communique_Number)(nil), |
3833 | 3603 | (*Communique_Name)(nil), |
3834 | 3604 | (*Communique_Data)(nil), |
3836 | 3606 | (*Communique_Col)(nil), |
3837 | 3607 | (*Communique_Msg)(nil), |
3838 | 3608 | } |
3839 | } | |
3840 | ||
3841 | func _Communique_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { | |
3842 | m := msg.(*Communique) | |
3843 | // union | |
3844 | switch x := m.Union.(type) { | |
3845 | case *Communique_Number: | |
3846 | b.EncodeVarint(5<<3 | proto.WireVarint) | |
3847 | b.EncodeVarint(uint64(x.Number)) | |
3848 | case *Communique_Name: | |
3849 | b.EncodeVarint(6<<3 | proto.WireBytes) | |
3850 | b.EncodeStringBytes(x.Name) | |
3851 | case *Communique_Data: | |
3852 | b.EncodeVarint(7<<3 | proto.WireBytes) | |
3853 | b.EncodeRawBytes(x.Data) | |
3854 | case *Communique_TempC: | |
3855 | b.EncodeVarint(8<<3 | proto.WireFixed64) | |
3856 | b.EncodeFixed64(math.Float64bits(x.TempC)) | |
3857 | case *Communique_Col: | |
3858 | b.EncodeVarint(9<<3 | proto.WireVarint) | |
3859 | b.EncodeVarint(uint64(x.Col)) | |
3860 | case *Communique_Msg: | |
3861 | b.EncodeVarint(10<<3 | proto.WireBytes) | |
3862 | if err := b.EncodeMessage(x.Msg); err != nil { | |
3863 | return err | |
3864 | } | |
3865 | case nil: | |
3866 | default: | |
3867 | return fmt.Errorf("Communique.Union has unexpected type %T", x) | |
3868 | } | |
3869 | return nil | |
3870 | } | |
3871 | ||
3872 | func _Communique_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { | |
3873 | m := msg.(*Communique) | |
3874 | switch tag { | |
3875 | case 5: // union.number | |
3876 | if wire != proto.WireVarint { | |
3877 | return true, proto.ErrInternalBadWireType | |
3878 | } | |
3879 | x, err := b.DecodeVarint() | |
3880 | m.Union = &Communique_Number{int32(x)} | |
3881 | return true, err | |
3882 | case 6: // union.name | |
3883 | if wire != proto.WireBytes { | |
3884 | return true, proto.ErrInternalBadWireType | |
3885 | } | |
3886 | x, err := b.DecodeStringBytes() | |
3887 | m.Union = &Communique_Name{x} | |
3888 | return true, err | |
3889 | case 7: // union.data | |
3890 | if wire != proto.WireBytes { | |
3891 | return true, proto.ErrInternalBadWireType | |
3892 | } | |
3893 | x, err := b.DecodeRawBytes(true) | |
3894 | m.Union = &Communique_Data{x} | |
3895 | return true, err | |
3896 | case 8: // union.temp_c | |
3897 | if wire != proto.WireFixed64 { | |
3898 | return true, proto.ErrInternalBadWireType | |
3899 | } | |
3900 | x, err := b.DecodeFixed64() | |
3901 | m.Union = &Communique_TempC{math.Float64frombits(x)} | |
3902 | return true, err | |
3903 | case 9: // union.col | |
3904 | if wire != proto.WireVarint { | |
3905 | return true, proto.ErrInternalBadWireType | |
3906 | } | |
3907 | x, err := b.DecodeVarint() | |
3908 | m.Union = &Communique_Col{MyMessage_Color(x)} | |
3909 | return true, err | |
3910 | case 10: // union.msg | |
3911 | if wire != proto.WireBytes { | |
3912 | return true, proto.ErrInternalBadWireType | |
3913 | } | |
3914 | msg := new(Strings) | |
3915 | err := b.DecodeMessage(msg) | |
3916 | m.Union = &Communique_Msg{msg} | |
3917 | return true, err | |
3918 | default: | |
3919 | return false, nil | |
3920 | } | |
3921 | } | |
3922 | ||
3923 | func _Communique_OneofSizer(msg proto.Message) (n int) { | |
3924 | m := msg.(*Communique) | |
3925 | // union | |
3926 | switch x := m.Union.(type) { | |
3927 | case *Communique_Number: | |
3928 | n += 1 // tag and wire | |
3929 | n += proto.SizeVarint(uint64(x.Number)) | |
3930 | case *Communique_Name: | |
3931 | n += 1 // tag and wire | |
3932 | n += proto.SizeVarint(uint64(len(x.Name))) | |
3933 | n += len(x.Name) | |
3934 | case *Communique_Data: | |
3935 | n += 1 // tag and wire | |
3936 | n += proto.SizeVarint(uint64(len(x.Data))) | |
3937 | n += len(x.Data) | |
3938 | case *Communique_TempC: | |
3939 | n += 1 // tag and wire | |
3940 | n += 8 | |
3941 | case *Communique_Col: | |
3942 | n += 1 // tag and wire | |
3943 | n += proto.SizeVarint(uint64(x.Col)) | |
3944 | case *Communique_Msg: | |
3945 | s := proto.Size(x.Msg) | |
3946 | n += 1 // tag and wire | |
3947 | n += proto.SizeVarint(uint64(s)) | |
3948 | n += s | |
3949 | case nil: | |
3950 | default: | |
3951 | panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) | |
3952 | } | |
3953 | return n | |
3954 | 3609 | } |
3955 | 3610 | |
3956 | 3611 | type TestUTF8 struct { |
3970 | 3625 | func (m *TestUTF8) String() string { return proto.CompactTextString(m) } |
3971 | 3626 | func (*TestUTF8) ProtoMessage() {} |
3972 | 3627 | func (*TestUTF8) Descriptor() ([]byte, []int) { |
3973 | return fileDescriptor_test_ee9f66cbbebc227c, []int{31} | |
3974 | } | |
3628 | return fileDescriptor_8ca34d01332f1402, []int{31} | |
3629 | } | |
3630 | ||
3975 | 3631 | func (m *TestUTF8) XXX_Unmarshal(b []byte) error { |
3976 | 3632 | return xxx_messageInfo_TestUTF8.Unmarshal(m, b) |
3977 | 3633 | } |
3978 | 3634 | func (m *TestUTF8) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
3979 | 3635 | return xxx_messageInfo_TestUTF8.Marshal(b, m, deterministic) |
3980 | 3636 | } |
3981 | func (dst *TestUTF8) XXX_Merge(src proto.Message) { | |
3982 | xxx_messageInfo_TestUTF8.Merge(dst, src) | |
3637 | func (m *TestUTF8) XXX_Merge(src proto.Message) { | |
3638 | xxx_messageInfo_TestUTF8.Merge(m, src) | |
3983 | 3639 | } |
3984 | 3640 | func (m *TestUTF8) XXX_Size() int { |
3985 | 3641 | return xxx_messageInfo_TestUTF8.Size(m) |
4042 | 3698 | return nil |
4043 | 3699 | } |
4044 | 3700 | |
4045 | // XXX_OneofFuncs is for the internal use of the proto package. | |
4046 | func (*TestUTF8) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { | |
4047 | return _TestUTF8_OneofMarshaler, _TestUTF8_OneofUnmarshaler, _TestUTF8_OneofSizer, []interface{}{ | |
3701 | // XXX_OneofWrappers is for the internal use of the proto package. | |
3702 | func (*TestUTF8) XXX_OneofWrappers() []interface{} { | |
3703 | return []interface{}{ | |
4048 | 3704 | (*TestUTF8_Field)(nil), |
4049 | 3705 | } |
4050 | } | |
4051 | ||
4052 | func _TestUTF8_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { | |
4053 | m := msg.(*TestUTF8) | |
4054 | // oneof | |
4055 | switch x := m.Oneof.(type) { | |
4056 | case *TestUTF8_Field: | |
4057 | b.EncodeVarint(3<<3 | proto.WireBytes) | |
4058 | b.EncodeStringBytes(x.Field) | |
4059 | case nil: | |
4060 | default: | |
4061 | return fmt.Errorf("TestUTF8.Oneof has unexpected type %T", x) | |
4062 | } | |
4063 | return nil | |
4064 | } | |
4065 | ||
4066 | func _TestUTF8_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { | |
4067 | m := msg.(*TestUTF8) | |
4068 | switch tag { | |
4069 | case 3: // oneof.field | |
4070 | if wire != proto.WireBytes { | |
4071 | return true, proto.ErrInternalBadWireType | |
4072 | } | |
4073 | x, err := b.DecodeStringBytes() | |
4074 | m.Oneof = &TestUTF8_Field{x} | |
4075 | return true, err | |
4076 | default: | |
4077 | return false, nil | |
4078 | } | |
4079 | } | |
4080 | ||
4081 | func _TestUTF8_OneofSizer(msg proto.Message) (n int) { | |
4082 | m := msg.(*TestUTF8) | |
4083 | // oneof | |
4084 | switch x := m.Oneof.(type) { | |
4085 | case *TestUTF8_Field: | |
4086 | n += 1 // tag and wire | |
4087 | n += proto.SizeVarint(uint64(len(x.Field))) | |
4088 | n += len(x.Field) | |
4089 | case nil: | |
4090 | default: | |
4091 | panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) | |
4092 | } | |
4093 | return n | |
4094 | 3706 | } |
4095 | 3707 | |
4096 | 3708 | var E_Greeting = &proto.ExtensionDesc{ |
4116 | 3728 | ExtensionType: ([]*ComplexExtension)(nil), |
4117 | 3729 | Field: 201, |
4118 | 3730 | Name: "test_proto.r_complex", |
4119 | Tag: "bytes,201,rep,name=r_complex,json=rComplex", | |
3731 | Tag: "bytes,201,rep,name=r_complex", | |
4120 | 3732 | Filename: "test_proto/test.proto", |
4121 | 3733 | } |
4122 | 3734 | |
4125 | 3737 | ExtensionType: (*float64)(nil), |
4126 | 3738 | Field: 101, |
4127 | 3739 | Name: "test_proto.no_default_double", |
4128 | Tag: "fixed64,101,opt,name=no_default_double,json=noDefaultDouble", | |
3740 | Tag: "fixed64,101,opt,name=no_default_double", | |
4129 | 3741 | Filename: "test_proto/test.proto", |
4130 | 3742 | } |
4131 | 3743 | |
4134 | 3746 | ExtensionType: (*float32)(nil), |
4135 | 3747 | Field: 102, |
4136 | 3748 | Name: "test_proto.no_default_float", |
4137 | Tag: "fixed32,102,opt,name=no_default_float,json=noDefaultFloat", | |
3749 | Tag: "fixed32,102,opt,name=no_default_float", | |
4138 | 3750 | Filename: "test_proto/test.proto", |
4139 | 3751 | } |
4140 | 3752 | |
4143 | 3755 | ExtensionType: (*int32)(nil), |
4144 | 3756 | Field: 103, |
4145 | 3757 | Name: "test_proto.no_default_int32", |
4146 | Tag: "varint,103,opt,name=no_default_int32,json=noDefaultInt32", | |
3758 | Tag: "varint,103,opt,name=no_default_int32", | |
4147 | 3759 | Filename: "test_proto/test.proto", |
4148 | 3760 | } |
4149 | 3761 | |
4152 | 3764 | ExtensionType: (*int64)(nil), |
4153 | 3765 | Field: 104, |
4154 | 3766 | Name: "test_proto.no_default_int64", |
4155 | Tag: "varint,104,opt,name=no_default_int64,json=noDefaultInt64", | |
3767 | Tag: "varint,104,opt,name=no_default_int64", | |
4156 | 3768 | Filename: "test_proto/test.proto", |
4157 | 3769 | } |
4158 | 3770 | |
4161 | 3773 | ExtensionType: (*uint32)(nil), |
4162 | 3774 | Field: 105, |
4163 | 3775 | Name: "test_proto.no_default_uint32", |
4164 | Tag: "varint,105,opt,name=no_default_uint32,json=noDefaultUint32", | |
3776 | Tag: "varint,105,opt,name=no_default_uint32", | |
4165 | 3777 | Filename: "test_proto/test.proto", |
4166 | 3778 | } |
4167 | 3779 | |
4170 | 3782 | ExtensionType: (*uint64)(nil), |
4171 | 3783 | Field: 106, |
4172 | 3784 | Name: "test_proto.no_default_uint64", |
4173 | Tag: "varint,106,opt,name=no_default_uint64,json=noDefaultUint64", | |
3785 | Tag: "varint,106,opt,name=no_default_uint64", | |
4174 | 3786 | Filename: "test_proto/test.proto", |
4175 | 3787 | } |
4176 | 3788 | |
4179 | 3791 | ExtensionType: (*int32)(nil), |
4180 | 3792 | Field: 107, |
4181 | 3793 | Name: "test_proto.no_default_sint32", |
4182 | Tag: "zigzag32,107,opt,name=no_default_sint32,json=noDefaultSint32", | |
3794 | Tag: "zigzag32,107,opt,name=no_default_sint32", | |
4183 | 3795 | Filename: "test_proto/test.proto", |
4184 | 3796 | } |
4185 | 3797 | |
4188 | 3800 | ExtensionType: (*int64)(nil), |
4189 | 3801 | Field: 108, |
4190 | 3802 | Name: "test_proto.no_default_sint64", |
4191 | Tag: "zigzag64,108,opt,name=no_default_sint64,json=noDefaultSint64", | |
3803 | Tag: "zigzag64,108,opt,name=no_default_sint64", | |
4192 | 3804 | Filename: "test_proto/test.proto", |
4193 | 3805 | } |
4194 | 3806 | |
4197 | 3809 | ExtensionType: (*uint32)(nil), |
4198 | 3810 | Field: 109, |
4199 | 3811 | Name: "test_proto.no_default_fixed32", |
4200 | Tag: "fixed32,109,opt,name=no_default_fixed32,json=noDefaultFixed32", | |
3812 | Tag: "fixed32,109,opt,name=no_default_fixed32", | |
4201 | 3813 | Filename: "test_proto/test.proto", |
4202 | 3814 | } |
4203 | 3815 | |
4206 | 3818 | ExtensionType: (*uint64)(nil), |
4207 | 3819 | Field: 110, |
4208 | 3820 | Name: "test_proto.no_default_fixed64", |
4209 | Tag: "fixed64,110,opt,name=no_default_fixed64,json=noDefaultFixed64", | |
3821 | Tag: "fixed64,110,opt,name=no_default_fixed64", | |
4210 | 3822 | Filename: "test_proto/test.proto", |
4211 | 3823 | } |
4212 | 3824 | |
4215 | 3827 | ExtensionType: (*int32)(nil), |
4216 | 3828 | Field: 111, |
4217 | 3829 | Name: "test_proto.no_default_sfixed32", |
4218 | Tag: "fixed32,111,opt,name=no_default_sfixed32,json=noDefaultSfixed32", | |
3830 | Tag: "fixed32,111,opt,name=no_default_sfixed32", | |
4219 | 3831 | Filename: "test_proto/test.proto", |
4220 | 3832 | } |
4221 | 3833 | |
4224 | 3836 | ExtensionType: (*int64)(nil), |
4225 | 3837 | Field: 112, |
4226 | 3838 | Name: "test_proto.no_default_sfixed64", |
4227 | Tag: "fixed64,112,opt,name=no_default_sfixed64,json=noDefaultSfixed64", | |
3839 | Tag: "fixed64,112,opt,name=no_default_sfixed64", | |
4228 | 3840 | Filename: "test_proto/test.proto", |
4229 | 3841 | } |
4230 | 3842 | |
4233 | 3845 | ExtensionType: (*bool)(nil), |
4234 | 3846 | Field: 113, |
4235 | 3847 | Name: "test_proto.no_default_bool", |
4236 | Tag: "varint,113,opt,name=no_default_bool,json=noDefaultBool", | |
3848 | Tag: "varint,113,opt,name=no_default_bool", | |
4237 | 3849 | Filename: "test_proto/test.proto", |
4238 | 3850 | } |
4239 | 3851 | |
4242 | 3854 | ExtensionType: (*string)(nil), |
4243 | 3855 | Field: 114, |
4244 | 3856 | Name: "test_proto.no_default_string", |
4245 | Tag: "bytes,114,opt,name=no_default_string,json=noDefaultString", | |
3857 | Tag: "bytes,114,opt,name=no_default_string", | |
4246 | 3858 | Filename: "test_proto/test.proto", |
4247 | 3859 | } |
4248 | 3860 | |
4251 | 3863 | ExtensionType: ([]byte)(nil), |
4252 | 3864 | Field: 115, |
4253 | 3865 | Name: "test_proto.no_default_bytes", |
4254 | Tag: "bytes,115,opt,name=no_default_bytes,json=noDefaultBytes", | |
3866 | Tag: "bytes,115,opt,name=no_default_bytes", | |
4255 | 3867 | Filename: "test_proto/test.proto", |
4256 | 3868 | } |
4257 | 3869 | |
4260 | 3872 | ExtensionType: (*DefaultsMessage_DefaultsEnum)(nil), |
4261 | 3873 | Field: 116, |
4262 | 3874 | Name: "test_proto.no_default_enum", |
4263 | Tag: "varint,116,opt,name=no_default_enum,json=noDefaultEnum,enum=test_proto.DefaultsMessage_DefaultsEnum", | |
3875 | Tag: "varint,116,opt,name=no_default_enum,enum=test_proto.DefaultsMessage_DefaultsEnum", | |
4264 | 3876 | Filename: "test_proto/test.proto", |
4265 | 3877 | } |
4266 | 3878 | |
4269 | 3881 | ExtensionType: (*float64)(nil), |
4270 | 3882 | Field: 201, |
4271 | 3883 | Name: "test_proto.default_double", |
4272 | Tag: "fixed64,201,opt,name=default_double,json=defaultDouble,def=3.1415", | |
3884 | Tag: "fixed64,201,opt,name=default_double,def=3.1415", | |
4273 | 3885 | Filename: "test_proto/test.proto", |
4274 | 3886 | } |
4275 | 3887 | |
4278 | 3890 | ExtensionType: (*float32)(nil), |
4279 | 3891 | Field: 202, |
4280 | 3892 | Name: "test_proto.default_float", |
4281 | Tag: "fixed32,202,opt,name=default_float,json=defaultFloat,def=3.14", | |
3893 | Tag: "fixed32,202,opt,name=default_float,def=3.14", | |
4282 | 3894 | Filename: "test_proto/test.proto", |
4283 | 3895 | } |
4284 | 3896 | |
4287 | 3899 | ExtensionType: (*int32)(nil), |
4288 | 3900 | Field: 203, |
4289 | 3901 | Name: "test_proto.default_int32", |
4290 | Tag: "varint,203,opt,name=default_int32,json=defaultInt32,def=42", | |
3902 | Tag: "varint,203,opt,name=default_int32,def=42", | |
4291 | 3903 | Filename: "test_proto/test.proto", |
4292 | 3904 | } |
4293 | 3905 | |
4296 | 3908 | ExtensionType: (*int64)(nil), |
4297 | 3909 | Field: 204, |
4298 | 3910 | Name: "test_proto.default_int64", |
4299 | Tag: "varint,204,opt,name=default_int64,json=defaultInt64,def=43", | |
3911 | Tag: "varint,204,opt,name=default_int64,def=43", | |
4300 | 3912 | Filename: "test_proto/test.proto", |
4301 | 3913 | } |
4302 | 3914 | |
4305 | 3917 | ExtensionType: (*uint32)(nil), |
4306 | 3918 | Field: 205, |
4307 | 3919 | Name: "test_proto.default_uint32", |
4308 | Tag: "varint,205,opt,name=default_uint32,json=defaultUint32,def=44", | |
3920 | Tag: "varint,205,opt,name=default_uint32,def=44", | |
4309 | 3921 | Filename: "test_proto/test.proto", |
4310 | 3922 | } |
4311 | 3923 | |
4314 | 3926 | ExtensionType: (*uint64)(nil), |
4315 | 3927 | Field: 206, |
4316 | 3928 | Name: "test_proto.default_uint64", |
4317 | Tag: "varint,206,opt,name=default_uint64,json=defaultUint64,def=45", | |
3929 | Tag: "varint,206,opt,name=default_uint64,def=45", | |
4318 | 3930 | Filename: "test_proto/test.proto", |
4319 | 3931 | } |
4320 | 3932 | |
4323 | 3935 | ExtensionType: (*int32)(nil), |
4324 | 3936 | Field: 207, |
4325 | 3937 | Name: "test_proto.default_sint32", |
4326 | Tag: "zigzag32,207,opt,name=default_sint32,json=defaultSint32,def=46", | |
3938 | Tag: "zigzag32,207,opt,name=default_sint32,def=46", | |
4327 | 3939 | Filename: "test_proto/test.proto", |
4328 | 3940 | } |
4329 | 3941 | |
4332 | 3944 | ExtensionType: (*int64)(nil), |
4333 | 3945 | Field: 208, |
4334 | 3946 | Name: "test_proto.default_sint64", |
4335 | Tag: "zigzag64,208,opt,name=default_sint64,json=defaultSint64,def=47", | |
3947 | Tag: "zigzag64,208,opt,name=default_sint64,def=47", | |
4336 | 3948 | Filename: "test_proto/test.proto", |
4337 | 3949 | } |
4338 | 3950 | |
4341 | 3953 | ExtensionType: (*uint32)(nil), |
4342 | 3954 | Field: 209, |
4343 | 3955 | Name: "test_proto.default_fixed32", |
4344 | Tag: "fixed32,209,opt,name=default_fixed32,json=defaultFixed32,def=48", | |
3956 | Tag: "fixed32,209,opt,name=default_fixed32,def=48", | |
4345 | 3957 | Filename: "test_proto/test.proto", |
4346 | 3958 | } |
4347 | 3959 | |
4350 | 3962 | ExtensionType: (*uint64)(nil), |
4351 | 3963 | Field: 210, |
4352 | 3964 | Name: "test_proto.default_fixed64", |
4353 | Tag: "fixed64,210,opt,name=default_fixed64,json=defaultFixed64,def=49", | |
3965 | Tag: "fixed64,210,opt,name=default_fixed64,def=49", | |
4354 | 3966 | Filename: "test_proto/test.proto", |
4355 | 3967 | } |
4356 | 3968 | |
4359 | 3971 | ExtensionType: (*int32)(nil), |
4360 | 3972 | Field: 211, |
4361 | 3973 | Name: "test_proto.default_sfixed32", |
4362 | Tag: "fixed32,211,opt,name=default_sfixed32,json=defaultSfixed32,def=50", | |
3974 | Tag: "fixed32,211,opt,name=default_sfixed32,def=50", | |
4363 | 3975 | Filename: "test_proto/test.proto", |
4364 | 3976 | } |
4365 | 3977 | |
4368 | 3980 | ExtensionType: (*int64)(nil), |
4369 | 3981 | Field: 212, |
4370 | 3982 | Name: "test_proto.default_sfixed64", |
4371 | Tag: "fixed64,212,opt,name=default_sfixed64,json=defaultSfixed64,def=51", | |
3983 | Tag: "fixed64,212,opt,name=default_sfixed64,def=51", | |
4372 | 3984 | Filename: "test_proto/test.proto", |
4373 | 3985 | } |
4374 | 3986 | |
4377 | 3989 | ExtensionType: (*bool)(nil), |
4378 | 3990 | Field: 213, |
4379 | 3991 | Name: "test_proto.default_bool", |
4380 | Tag: "varint,213,opt,name=default_bool,json=defaultBool,def=1", | |
3992 | Tag: "varint,213,opt,name=default_bool,def=1", | |
4381 | 3993 | Filename: "test_proto/test.proto", |
4382 | 3994 | } |
4383 | 3995 | |
4386 | 3998 | ExtensionType: (*string)(nil), |
4387 | 3999 | Field: 214, |
4388 | 4000 | Name: "test_proto.default_string", |
4389 | Tag: "bytes,214,opt,name=default_string,json=defaultString,def=Hello, string,def=foo", | |
4001 | Tag: "bytes,214,opt,name=default_string,def=Hello, string,def=foo", | |
4390 | 4002 | Filename: "test_proto/test.proto", |
4391 | 4003 | } |
4392 | 4004 | |
4395 | 4007 | ExtensionType: ([]byte)(nil), |
4396 | 4008 | Field: 215, |
4397 | 4009 | Name: "test_proto.default_bytes", |
4398 | Tag: "bytes,215,opt,name=default_bytes,json=defaultBytes,def=Hello, bytes", | |
4010 | Tag: "bytes,215,opt,name=default_bytes,def=Hello, bytes", | |
4399 | 4011 | Filename: "test_proto/test.proto", |
4400 | 4012 | } |
4401 | 4013 | |
4404 | 4016 | ExtensionType: (*DefaultsMessage_DefaultsEnum)(nil), |
4405 | 4017 | Field: 216, |
4406 | 4018 | Name: "test_proto.default_enum", |
4407 | Tag: "varint,216,opt,name=default_enum,json=defaultEnum,enum=test_proto.DefaultsMessage_DefaultsEnum,def=1", | |
4019 | Tag: "varint,216,opt,name=default_enum,enum=test_proto.DefaultsMessage_DefaultsEnum,def=1", | |
4408 | 4020 | Filename: "test_proto/test.proto", |
4409 | 4021 | } |
4410 | 4022 | |
4859 | 4471 | } |
4860 | 4472 | |
4861 | 4473 | func init() { |
4474 | proto.RegisterEnum("test_proto.FOO", FOO_name, FOO_value) | |
4475 | proto.RegisterEnum("test_proto.GoTest_KIND", GoTest_KIND_name, GoTest_KIND_value) | |
4476 | proto.RegisterEnum("test_proto.MyMessage_Color", MyMessage_Color_name, MyMessage_Color_value) | |
4477 | proto.RegisterEnum("test_proto.DefaultsMessage_DefaultsEnum", DefaultsMessage_DefaultsEnum_name, DefaultsMessage_DefaultsEnum_value) | |
4478 | proto.RegisterEnum("test_proto.Defaults_Color", Defaults_Color_name, Defaults_Color_value) | |
4479 | proto.RegisterEnum("test_proto.RepeatedEnum_Color", RepeatedEnum_Color_name, RepeatedEnum_Color_value) | |
4862 | 4480 | proto.RegisterType((*GoEnum)(nil), "test_proto.GoEnum") |
4863 | 4481 | proto.RegisterType((*GoTestField)(nil), "test_proto.GoTestField") |
4864 | 4482 | proto.RegisterType((*GoTest)(nil), "test_proto.GoTest") |
4881 | 4499 | proto.RegisterType((*RequiredInnerMessage)(nil), "test_proto.RequiredInnerMessage") |
4882 | 4500 | proto.RegisterType((*MyMessage)(nil), "test_proto.MyMessage") |
4883 | 4501 | proto.RegisterType((*MyMessage_SomeGroup)(nil), "test_proto.MyMessage.SomeGroup") |
4502 | proto.RegisterExtension(E_Ext_More) | |
4503 | proto.RegisterExtension(E_Ext_Text) | |
4504 | proto.RegisterExtension(E_Ext_Number) | |
4884 | 4505 | proto.RegisterType((*Ext)(nil), "test_proto.Ext") |
4885 | 4506 | proto.RegisterMapType((map[int32]int32)(nil), "test_proto.Ext.MapFieldEntry") |
4886 | 4507 | proto.RegisterType((*ComplexExtension)(nil), "test_proto.ComplexExtension") |
4910 | 4531 | proto.RegisterType((*TestUTF8)(nil), "test_proto.TestUTF8") |
4911 | 4532 | proto.RegisterMapType((map[string]int64)(nil), "test_proto.TestUTF8.MapKeyEntry") |
4912 | 4533 | proto.RegisterMapType((map[int64]string)(nil), "test_proto.TestUTF8.MapValueEntry") |
4913 | proto.RegisterEnum("test_proto.FOO", FOO_name, FOO_value) | |
4914 | proto.RegisterEnum("test_proto.GoTest_KIND", GoTest_KIND_name, GoTest_KIND_value) | |
4915 | proto.RegisterEnum("test_proto.MyMessage_Color", MyMessage_Color_name, MyMessage_Color_value) | |
4916 | proto.RegisterEnum("test_proto.DefaultsMessage_DefaultsEnum", DefaultsMessage_DefaultsEnum_name, DefaultsMessage_DefaultsEnum_value) | |
4917 | proto.RegisterEnum("test_proto.Defaults_Color", Defaults_Color_name, Defaults_Color_value) | |
4918 | proto.RegisterEnum("test_proto.RepeatedEnum_Color", RepeatedEnum_Color_name, RepeatedEnum_Color_value) | |
4919 | proto.RegisterExtension(E_Ext_More) | |
4920 | proto.RegisterExtension(E_Ext_Text) | |
4921 | proto.RegisterExtension(E_Ext_Number) | |
4922 | 4534 | proto.RegisterExtension(E_Greeting) |
4923 | 4535 | proto.RegisterExtension(E_Complex) |
4924 | 4536 | proto.RegisterExtension(E_RComplex) |
5006 | 4618 | proto.RegisterExtension(E_X250) |
5007 | 4619 | } |
5008 | 4620 | |
5009 | func init() { proto.RegisterFile("test_proto/test.proto", fileDescriptor_test_ee9f66cbbebc227c) } | |
5010 | ||
5011 | var fileDescriptor_test_ee9f66cbbebc227c = []byte{ | |
4621 | func init() { proto.RegisterFile("test_proto/test.proto", fileDescriptor_8ca34d01332f1402) } | |
4622 | ||
4623 | var fileDescriptor_8ca34d01332f1402 = []byte{ | |
5012 | 4624 | // 4795 bytes of a gzipped FileDescriptorProto |
5013 | 4625 | 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x5b, 0xd9, 0x73, 0x1b, 0x47, |
5014 | 4626 | 0x7a, 0xd7, 0x0c, 0xee, 0x0f, 0x20, 0x31, 0x6c, 0xc9, 0x12, 0x44, 0x59, 0xd2, 0x08, 0x6b, 0xaf, |
0 | 0 | // Code generated by protoc-gen-go. DO NOT EDIT. |
1 | 1 | // source: google/protobuf/descriptor.proto |
2 | 2 | |
3 | package descriptor // import "github.com/golang/protobuf/protoc-gen-go/descriptor" | |
4 | ||
5 | import proto "github.com/golang/protobuf/proto" | |
6 | import fmt "fmt" | |
7 | import math "math" | |
3 | package descriptor | |
4 | ||
5 | import ( | |
6 | fmt "fmt" | |
7 | proto "github.com/golang/protobuf/proto" | |
8 | math "math" | |
9 | ) | |
8 | 10 | |
9 | 11 | // Reference imports to suppress errors if they are not otherwise used. |
10 | 12 | var _ = proto.Marshal |
15 | 17 | // is compatible with the proto package it is being compiled against. |
16 | 18 | // A compilation error at this line likely means your copy of the |
17 | 19 | // proto package needs to be updated. |
18 | const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package | |
20 | const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package | |
19 | 21 | |
20 | 22 | type FieldDescriptorProto_Type int32 |
21 | 23 | |
71 | 73 | 17: "TYPE_SINT32", |
72 | 74 | 18: "TYPE_SINT64", |
73 | 75 | } |
76 | ||
74 | 77 | var FieldDescriptorProto_Type_value = map[string]int32{ |
75 | 78 | "TYPE_DOUBLE": 1, |
76 | 79 | "TYPE_FLOAT": 2, |
97 | 100 | *p = x |
98 | 101 | return p |
99 | 102 | } |
103 | ||
100 | 104 | func (x FieldDescriptorProto_Type) String() string { |
101 | 105 | return proto.EnumName(FieldDescriptorProto_Type_name, int32(x)) |
102 | 106 | } |
107 | ||
103 | 108 | func (x *FieldDescriptorProto_Type) UnmarshalJSON(data []byte) error { |
104 | 109 | value, err := proto.UnmarshalJSONEnum(FieldDescriptorProto_Type_value, data, "FieldDescriptorProto_Type") |
105 | 110 | if err != nil { |
108 | 113 | *x = FieldDescriptorProto_Type(value) |
109 | 114 | return nil |
110 | 115 | } |
116 | ||
111 | 117 | func (FieldDescriptorProto_Type) EnumDescriptor() ([]byte, []int) { |
112 | return fileDescriptor_descriptor_4df4cb5f42392df6, []int{4, 0} | |
118 | return fileDescriptor_e5baabe45344a177, []int{4, 0} | |
113 | 119 | } |
114 | 120 | |
115 | 121 | type FieldDescriptorProto_Label int32 |
126 | 132 | 2: "LABEL_REQUIRED", |
127 | 133 | 3: "LABEL_REPEATED", |
128 | 134 | } |
135 | ||
129 | 136 | var FieldDescriptorProto_Label_value = map[string]int32{ |
130 | 137 | "LABEL_OPTIONAL": 1, |
131 | 138 | "LABEL_REQUIRED": 2, |
137 | 144 | *p = x |
138 | 145 | return p |
139 | 146 | } |
147 | ||
140 | 148 | func (x FieldDescriptorProto_Label) String() string { |
141 | 149 | return proto.EnumName(FieldDescriptorProto_Label_name, int32(x)) |
142 | 150 | } |
151 | ||
143 | 152 | func (x *FieldDescriptorProto_Label) UnmarshalJSON(data []byte) error { |
144 | 153 | value, err := proto.UnmarshalJSONEnum(FieldDescriptorProto_Label_value, data, "FieldDescriptorProto_Label") |
145 | 154 | if err != nil { |
148 | 157 | *x = FieldDescriptorProto_Label(value) |
149 | 158 | return nil |
150 | 159 | } |
160 | ||
151 | 161 | func (FieldDescriptorProto_Label) EnumDescriptor() ([]byte, []int) { |
152 | return fileDescriptor_descriptor_4df4cb5f42392df6, []int{4, 1} | |
162 | return fileDescriptor_e5baabe45344a177, []int{4, 1} | |
153 | 163 | } |
154 | 164 | |
155 | 165 | // Generated classes can be optimized for speed or code size. |
167 | 177 | 2: "CODE_SIZE", |
168 | 178 | 3: "LITE_RUNTIME", |
169 | 179 | } |
180 | ||
170 | 181 | var FileOptions_OptimizeMode_value = map[string]int32{ |
171 | 182 | "SPEED": 1, |
172 | 183 | "CODE_SIZE": 2, |
178 | 189 | *p = x |
179 | 190 | return p |
180 | 191 | } |
192 | ||
181 | 193 | func (x FileOptions_OptimizeMode) String() string { |
182 | 194 | return proto.EnumName(FileOptions_OptimizeMode_name, int32(x)) |
183 | 195 | } |
196 | ||
184 | 197 | func (x *FileOptions_OptimizeMode) UnmarshalJSON(data []byte) error { |
185 | 198 | value, err := proto.UnmarshalJSONEnum(FileOptions_OptimizeMode_value, data, "FileOptions_OptimizeMode") |
186 | 199 | if err != nil { |
189 | 202 | *x = FileOptions_OptimizeMode(value) |
190 | 203 | return nil |
191 | 204 | } |
205 | ||
192 | 206 | func (FileOptions_OptimizeMode) EnumDescriptor() ([]byte, []int) { |
193 | return fileDescriptor_descriptor_4df4cb5f42392df6, []int{10, 0} | |
207 | return fileDescriptor_e5baabe45344a177, []int{10, 0} | |
194 | 208 | } |
195 | 209 | |
196 | 210 | type FieldOptions_CType int32 |
207 | 221 | 1: "CORD", |
208 | 222 | 2: "STRING_PIECE", |
209 | 223 | } |
224 | ||
210 | 225 | var FieldOptions_CType_value = map[string]int32{ |
211 | 226 | "STRING": 0, |
212 | 227 | "CORD": 1, |
218 | 233 | *p = x |
219 | 234 | return p |
220 | 235 | } |
236 | ||
221 | 237 | func (x FieldOptions_CType) String() string { |
222 | 238 | return proto.EnumName(FieldOptions_CType_name, int32(x)) |
223 | 239 | } |
240 | ||
224 | 241 | func (x *FieldOptions_CType) UnmarshalJSON(data []byte) error { |
225 | 242 | value, err := proto.UnmarshalJSONEnum(FieldOptions_CType_value, data, "FieldOptions_CType") |
226 | 243 | if err != nil { |
229 | 246 | *x = FieldOptions_CType(value) |
230 | 247 | return nil |
231 | 248 | } |
249 | ||
232 | 250 | func (FieldOptions_CType) EnumDescriptor() ([]byte, []int) { |
233 | return fileDescriptor_descriptor_4df4cb5f42392df6, []int{12, 0} | |
251 | return fileDescriptor_e5baabe45344a177, []int{12, 0} | |
234 | 252 | } |
235 | 253 | |
236 | 254 | type FieldOptions_JSType int32 |
249 | 267 | 1: "JS_STRING", |
250 | 268 | 2: "JS_NUMBER", |
251 | 269 | } |
270 | ||
252 | 271 | var FieldOptions_JSType_value = map[string]int32{ |
253 | 272 | "JS_NORMAL": 0, |
254 | 273 | "JS_STRING": 1, |
260 | 279 | *p = x |
261 | 280 | return p |
262 | 281 | } |
282 | ||
263 | 283 | func (x FieldOptions_JSType) String() string { |
264 | 284 | return proto.EnumName(FieldOptions_JSType_name, int32(x)) |
265 | 285 | } |
286 | ||
266 | 287 | func (x *FieldOptions_JSType) UnmarshalJSON(data []byte) error { |
267 | 288 | value, err := proto.UnmarshalJSONEnum(FieldOptions_JSType_value, data, "FieldOptions_JSType") |
268 | 289 | if err != nil { |
271 | 292 | *x = FieldOptions_JSType(value) |
272 | 293 | return nil |
273 | 294 | } |
295 | ||
274 | 296 | func (FieldOptions_JSType) EnumDescriptor() ([]byte, []int) { |
275 | return fileDescriptor_descriptor_4df4cb5f42392df6, []int{12, 1} | |
297 | return fileDescriptor_e5baabe45344a177, []int{12, 1} | |
276 | 298 | } |
277 | 299 | |
278 | 300 | // Is this method side-effect-free (or safe in HTTP parlance), or idempotent, |
291 | 313 | 1: "NO_SIDE_EFFECTS", |
292 | 314 | 2: "IDEMPOTENT", |
293 | 315 | } |
316 | ||
294 | 317 | var MethodOptions_IdempotencyLevel_value = map[string]int32{ |
295 | 318 | "IDEMPOTENCY_UNKNOWN": 0, |
296 | 319 | "NO_SIDE_EFFECTS": 1, |
302 | 325 | *p = x |
303 | 326 | return p |
304 | 327 | } |
328 | ||
305 | 329 | func (x MethodOptions_IdempotencyLevel) String() string { |
306 | 330 | return proto.EnumName(MethodOptions_IdempotencyLevel_name, int32(x)) |
307 | 331 | } |
332 | ||
308 | 333 | func (x *MethodOptions_IdempotencyLevel) UnmarshalJSON(data []byte) error { |
309 | 334 | value, err := proto.UnmarshalJSONEnum(MethodOptions_IdempotencyLevel_value, data, "MethodOptions_IdempotencyLevel") |
310 | 335 | if err != nil { |
313 | 338 | *x = MethodOptions_IdempotencyLevel(value) |
314 | 339 | return nil |
315 | 340 | } |
341 | ||
316 | 342 | func (MethodOptions_IdempotencyLevel) EnumDescriptor() ([]byte, []int) { |
317 | return fileDescriptor_descriptor_4df4cb5f42392df6, []int{17, 0} | |
343 | return fileDescriptor_e5baabe45344a177, []int{17, 0} | |
318 | 344 | } |
319 | 345 | |
320 | 346 | // The protocol compiler can output a FileDescriptorSet containing the .proto |
330 | 356 | func (m *FileDescriptorSet) String() string { return proto.CompactTextString(m) } |
331 | 357 | func (*FileDescriptorSet) ProtoMessage() {} |
332 | 358 | func (*FileDescriptorSet) Descriptor() ([]byte, []int) { |
333 | return fileDescriptor_descriptor_4df4cb5f42392df6, []int{0} | |
334 | } | |
359 | return fileDescriptor_e5baabe45344a177, []int{0} | |
360 | } | |
361 | ||
335 | 362 | func (m *FileDescriptorSet) XXX_Unmarshal(b []byte) error { |
336 | 363 | return xxx_messageInfo_FileDescriptorSet.Unmarshal(m, b) |
337 | 364 | } |
338 | 365 | func (m *FileDescriptorSet) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
339 | 366 | return xxx_messageInfo_FileDescriptorSet.Marshal(b, m, deterministic) |
340 | 367 | } |
341 | func (dst *FileDescriptorSet) XXX_Merge(src proto.Message) { | |
342 | xxx_messageInfo_FileDescriptorSet.Merge(dst, src) | |
368 | func (m *FileDescriptorSet) XXX_Merge(src proto.Message) { | |
369 | xxx_messageInfo_FileDescriptorSet.Merge(m, src) | |
343 | 370 | } |
344 | 371 | func (m *FileDescriptorSet) XXX_Size() int { |
345 | 372 | return xxx_messageInfo_FileDescriptorSet.Size(m) |
391 | 418 | func (m *FileDescriptorProto) String() string { return proto.CompactTextString(m) } |
392 | 419 | func (*FileDescriptorProto) ProtoMessage() {} |
393 | 420 | func (*FileDescriptorProto) Descriptor() ([]byte, []int) { |
394 | return fileDescriptor_descriptor_4df4cb5f42392df6, []int{1} | |
395 | } | |
421 | return fileDescriptor_e5baabe45344a177, []int{1} | |
422 | } | |
423 | ||
396 | 424 | func (m *FileDescriptorProto) XXX_Unmarshal(b []byte) error { |
397 | 425 | return xxx_messageInfo_FileDescriptorProto.Unmarshal(m, b) |
398 | 426 | } |
399 | 427 | func (m *FileDescriptorProto) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
400 | 428 | return xxx_messageInfo_FileDescriptorProto.Marshal(b, m, deterministic) |
401 | 429 | } |
402 | func (dst *FileDescriptorProto) XXX_Merge(src proto.Message) { | |
403 | xxx_messageInfo_FileDescriptorProto.Merge(dst, src) | |
430 | func (m *FileDescriptorProto) XXX_Merge(src proto.Message) { | |
431 | xxx_messageInfo_FileDescriptorProto.Merge(m, src) | |
404 | 432 | } |
405 | 433 | func (m *FileDescriptorProto) XXX_Size() int { |
406 | 434 | return xxx_messageInfo_FileDescriptorProto.Size(m) |
518 | 546 | func (m *DescriptorProto) String() string { return proto.CompactTextString(m) } |
519 | 547 | func (*DescriptorProto) ProtoMessage() {} |
520 | 548 | func (*DescriptorProto) Descriptor() ([]byte, []int) { |
521 | return fileDescriptor_descriptor_4df4cb5f42392df6, []int{2} | |
522 | } | |
549 | return fileDescriptor_e5baabe45344a177, []int{2} | |
550 | } | |
551 | ||
523 | 552 | func (m *DescriptorProto) XXX_Unmarshal(b []byte) error { |
524 | 553 | return xxx_messageInfo_DescriptorProto.Unmarshal(m, b) |
525 | 554 | } |
526 | 555 | func (m *DescriptorProto) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
527 | 556 | return xxx_messageInfo_DescriptorProto.Marshal(b, m, deterministic) |
528 | 557 | } |
529 | func (dst *DescriptorProto) XXX_Merge(src proto.Message) { | |
530 | xxx_messageInfo_DescriptorProto.Merge(dst, src) | |
558 | func (m *DescriptorProto) XXX_Merge(src proto.Message) { | |
559 | xxx_messageInfo_DescriptorProto.Merge(m, src) | |
531 | 560 | } |
532 | 561 | func (m *DescriptorProto) XXX_Size() int { |
533 | 562 | return xxx_messageInfo_DescriptorProto.Size(m) |
621 | 650 | func (m *DescriptorProto_ExtensionRange) String() string { return proto.CompactTextString(m) } |
622 | 651 | func (*DescriptorProto_ExtensionRange) ProtoMessage() {} |
623 | 652 | func (*DescriptorProto_ExtensionRange) Descriptor() ([]byte, []int) { |
624 | return fileDescriptor_descriptor_4df4cb5f42392df6, []int{2, 0} | |
625 | } | |
653 | return fileDescriptor_e5baabe45344a177, []int{2, 0} | |
654 | } | |
655 | ||
626 | 656 | func (m *DescriptorProto_ExtensionRange) XXX_Unmarshal(b []byte) error { |
627 | 657 | return xxx_messageInfo_DescriptorProto_ExtensionRange.Unmarshal(m, b) |
628 | 658 | } |
629 | 659 | func (m *DescriptorProto_ExtensionRange) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
630 | 660 | return xxx_messageInfo_DescriptorProto_ExtensionRange.Marshal(b, m, deterministic) |
631 | 661 | } |
632 | func (dst *DescriptorProto_ExtensionRange) XXX_Merge(src proto.Message) { | |
633 | xxx_messageInfo_DescriptorProto_ExtensionRange.Merge(dst, src) | |
662 | func (m *DescriptorProto_ExtensionRange) XXX_Merge(src proto.Message) { | |
663 | xxx_messageInfo_DescriptorProto_ExtensionRange.Merge(m, src) | |
634 | 664 | } |
635 | 665 | func (m *DescriptorProto_ExtensionRange) XXX_Size() int { |
636 | 666 | return xxx_messageInfo_DescriptorProto_ExtensionRange.Size(m) |
677 | 707 | func (m *DescriptorProto_ReservedRange) String() string { return proto.CompactTextString(m) } |
678 | 708 | func (*DescriptorProto_ReservedRange) ProtoMessage() {} |
679 | 709 | func (*DescriptorProto_ReservedRange) Descriptor() ([]byte, []int) { |
680 | return fileDescriptor_descriptor_4df4cb5f42392df6, []int{2, 1} | |
681 | } | |
710 | return fileDescriptor_e5baabe45344a177, []int{2, 1} | |
711 | } | |
712 | ||
682 | 713 | func (m *DescriptorProto_ReservedRange) XXX_Unmarshal(b []byte) error { |
683 | 714 | return xxx_messageInfo_DescriptorProto_ReservedRange.Unmarshal(m, b) |
684 | 715 | } |
685 | 716 | func (m *DescriptorProto_ReservedRange) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
686 | 717 | return xxx_messageInfo_DescriptorProto_ReservedRange.Marshal(b, m, deterministic) |
687 | 718 | } |
688 | func (dst *DescriptorProto_ReservedRange) XXX_Merge(src proto.Message) { | |
689 | xxx_messageInfo_DescriptorProto_ReservedRange.Merge(dst, src) | |
719 | func (m *DescriptorProto_ReservedRange) XXX_Merge(src proto.Message) { | |
720 | xxx_messageInfo_DescriptorProto_ReservedRange.Merge(m, src) | |
690 | 721 | } |
691 | 722 | func (m *DescriptorProto_ReservedRange) XXX_Size() int { |
692 | 723 | return xxx_messageInfo_DescriptorProto_ReservedRange.Size(m) |
724 | 755 | func (m *ExtensionRangeOptions) String() string { return proto.CompactTextString(m) } |
725 | 756 | func (*ExtensionRangeOptions) ProtoMessage() {} |
726 | 757 | func (*ExtensionRangeOptions) Descriptor() ([]byte, []int) { |
727 | return fileDescriptor_descriptor_4df4cb5f42392df6, []int{3} | |
758 | return fileDescriptor_e5baabe45344a177, []int{3} | |
728 | 759 | } |
729 | 760 | |
730 | 761 | var extRange_ExtensionRangeOptions = []proto.ExtensionRange{ |
734 | 765 | func (*ExtensionRangeOptions) ExtensionRangeArray() []proto.ExtensionRange { |
735 | 766 | return extRange_ExtensionRangeOptions |
736 | 767 | } |
768 | ||
737 | 769 | func (m *ExtensionRangeOptions) XXX_Unmarshal(b []byte) error { |
738 | 770 | return xxx_messageInfo_ExtensionRangeOptions.Unmarshal(m, b) |
739 | 771 | } |
740 | 772 | func (m *ExtensionRangeOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
741 | 773 | return xxx_messageInfo_ExtensionRangeOptions.Marshal(b, m, deterministic) |
742 | 774 | } |
743 | func (dst *ExtensionRangeOptions) XXX_Merge(src proto.Message) { | |
744 | xxx_messageInfo_ExtensionRangeOptions.Merge(dst, src) | |
775 | func (m *ExtensionRangeOptions) XXX_Merge(src proto.Message) { | |
776 | xxx_messageInfo_ExtensionRangeOptions.Merge(m, src) | |
745 | 777 | } |
746 | 778 | func (m *ExtensionRangeOptions) XXX_Size() int { |
747 | 779 | return xxx_messageInfo_ExtensionRangeOptions.Size(m) |
800 | 832 | func (m *FieldDescriptorProto) String() string { return proto.CompactTextString(m) } |
801 | 833 | func (*FieldDescriptorProto) ProtoMessage() {} |
802 | 834 | func (*FieldDescriptorProto) Descriptor() ([]byte, []int) { |
803 | return fileDescriptor_descriptor_4df4cb5f42392df6, []int{4} | |
804 | } | |
835 | return fileDescriptor_e5baabe45344a177, []int{4} | |
836 | } | |
837 | ||
805 | 838 | func (m *FieldDescriptorProto) XXX_Unmarshal(b []byte) error { |
806 | 839 | return xxx_messageInfo_FieldDescriptorProto.Unmarshal(m, b) |
807 | 840 | } |
808 | 841 | func (m *FieldDescriptorProto) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
809 | 842 | return xxx_messageInfo_FieldDescriptorProto.Marshal(b, m, deterministic) |
810 | 843 | } |
811 | func (dst *FieldDescriptorProto) XXX_Merge(src proto.Message) { | |
812 | xxx_messageInfo_FieldDescriptorProto.Merge(dst, src) | |
844 | func (m *FieldDescriptorProto) XXX_Merge(src proto.Message) { | |
845 | xxx_messageInfo_FieldDescriptorProto.Merge(m, src) | |
813 | 846 | } |
814 | 847 | func (m *FieldDescriptorProto) XXX_Size() int { |
815 | 848 | return xxx_messageInfo_FieldDescriptorProto.Size(m) |
903 | 936 | func (m *OneofDescriptorProto) String() string { return proto.CompactTextString(m) } |
904 | 937 | func (*OneofDescriptorProto) ProtoMessage() {} |
905 | 938 | func (*OneofDescriptorProto) Descriptor() ([]byte, []int) { |
906 | return fileDescriptor_descriptor_4df4cb5f42392df6, []int{5} | |
907 | } | |
939 | return fileDescriptor_e5baabe45344a177, []int{5} | |
940 | } | |
941 | ||
908 | 942 | func (m *OneofDescriptorProto) XXX_Unmarshal(b []byte) error { |
909 | 943 | return xxx_messageInfo_OneofDescriptorProto.Unmarshal(m, b) |
910 | 944 | } |
911 | 945 | func (m *OneofDescriptorProto) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
912 | 946 | return xxx_messageInfo_OneofDescriptorProto.Marshal(b, m, deterministic) |
913 | 947 | } |
914 | func (dst *OneofDescriptorProto) XXX_Merge(src proto.Message) { | |
915 | xxx_messageInfo_OneofDescriptorProto.Merge(dst, src) | |
948 | func (m *OneofDescriptorProto) XXX_Merge(src proto.Message) { | |
949 | xxx_messageInfo_OneofDescriptorProto.Merge(m, src) | |
916 | 950 | } |
917 | 951 | func (m *OneofDescriptorProto) XXX_Size() int { |
918 | 952 | return xxx_messageInfo_OneofDescriptorProto.Size(m) |
958 | 992 | func (m *EnumDescriptorProto) String() string { return proto.CompactTextString(m) } |
959 | 993 | func (*EnumDescriptorProto) ProtoMessage() {} |
960 | 994 | func (*EnumDescriptorProto) Descriptor() ([]byte, []int) { |
961 | return fileDescriptor_descriptor_4df4cb5f42392df6, []int{6} | |
962 | } | |
995 | return fileDescriptor_e5baabe45344a177, []int{6} | |
996 | } | |
997 | ||
963 | 998 | func (m *EnumDescriptorProto) XXX_Unmarshal(b []byte) error { |
964 | 999 | return xxx_messageInfo_EnumDescriptorProto.Unmarshal(m, b) |
965 | 1000 | } |
966 | 1001 | func (m *EnumDescriptorProto) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
967 | 1002 | return xxx_messageInfo_EnumDescriptorProto.Marshal(b, m, deterministic) |
968 | 1003 | } |
969 | func (dst *EnumDescriptorProto) XXX_Merge(src proto.Message) { | |
970 | xxx_messageInfo_EnumDescriptorProto.Merge(dst, src) | |
1004 | func (m *EnumDescriptorProto) XXX_Merge(src proto.Message) { | |
1005 | xxx_messageInfo_EnumDescriptorProto.Merge(m, src) | |
971 | 1006 | } |
972 | 1007 | func (m *EnumDescriptorProto) XXX_Size() int { |
973 | 1008 | return xxx_messageInfo_EnumDescriptorProto.Size(m) |
1031 | 1066 | func (m *EnumDescriptorProto_EnumReservedRange) String() string { return proto.CompactTextString(m) } |
1032 | 1067 | func (*EnumDescriptorProto_EnumReservedRange) ProtoMessage() {} |
1033 | 1068 | func (*EnumDescriptorProto_EnumReservedRange) Descriptor() ([]byte, []int) { |
1034 | return fileDescriptor_descriptor_4df4cb5f42392df6, []int{6, 0} | |
1035 | } | |
1069 | return fileDescriptor_e5baabe45344a177, []int{6, 0} | |
1070 | } | |
1071 | ||
1036 | 1072 | func (m *EnumDescriptorProto_EnumReservedRange) XXX_Unmarshal(b []byte) error { |
1037 | 1073 | return xxx_messageInfo_EnumDescriptorProto_EnumReservedRange.Unmarshal(m, b) |
1038 | 1074 | } |
1039 | 1075 | func (m *EnumDescriptorProto_EnumReservedRange) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
1040 | 1076 | return xxx_messageInfo_EnumDescriptorProto_EnumReservedRange.Marshal(b, m, deterministic) |
1041 | 1077 | } |
1042 | func (dst *EnumDescriptorProto_EnumReservedRange) XXX_Merge(src proto.Message) { | |
1043 | xxx_messageInfo_EnumDescriptorProto_EnumReservedRange.Merge(dst, src) | |
1078 | func (m *EnumDescriptorProto_EnumReservedRange) XXX_Merge(src proto.Message) { | |
1079 | xxx_messageInfo_EnumDescriptorProto_EnumReservedRange.Merge(m, src) | |
1044 | 1080 | } |
1045 | 1081 | func (m *EnumDescriptorProto_EnumReservedRange) XXX_Size() int { |
1046 | 1082 | return xxx_messageInfo_EnumDescriptorProto_EnumReservedRange.Size(m) |
1079 | 1115 | func (m *EnumValueDescriptorProto) String() string { return proto.CompactTextString(m) } |
1080 | 1116 | func (*EnumValueDescriptorProto) ProtoMessage() {} |
1081 | 1117 | func (*EnumValueDescriptorProto) Descriptor() ([]byte, []int) { |
1082 | return fileDescriptor_descriptor_4df4cb5f42392df6, []int{7} | |
1083 | } | |
1118 | return fileDescriptor_e5baabe45344a177, []int{7} | |
1119 | } | |
1120 | ||
1084 | 1121 | func (m *EnumValueDescriptorProto) XXX_Unmarshal(b []byte) error { |
1085 | 1122 | return xxx_messageInfo_EnumValueDescriptorProto.Unmarshal(m, b) |
1086 | 1123 | } |
1087 | 1124 | func (m *EnumValueDescriptorProto) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
1088 | 1125 | return xxx_messageInfo_EnumValueDescriptorProto.Marshal(b, m, deterministic) |
1089 | 1126 | } |
1090 | func (dst *EnumValueDescriptorProto) XXX_Merge(src proto.Message) { | |
1091 | xxx_messageInfo_EnumValueDescriptorProto.Merge(dst, src) | |
1127 | func (m *EnumValueDescriptorProto) XXX_Merge(src proto.Message) { | |
1128 | xxx_messageInfo_EnumValueDescriptorProto.Merge(m, src) | |
1092 | 1129 | } |
1093 | 1130 | func (m *EnumValueDescriptorProto) XXX_Size() int { |
1094 | 1131 | return xxx_messageInfo_EnumValueDescriptorProto.Size(m) |
1134 | 1171 | func (m *ServiceDescriptorProto) String() string { return proto.CompactTextString(m) } |
1135 | 1172 | func (*ServiceDescriptorProto) ProtoMessage() {} |
1136 | 1173 | func (*ServiceDescriptorProto) Descriptor() ([]byte, []int) { |
1137 | return fileDescriptor_descriptor_4df4cb5f42392df6, []int{8} | |
1138 | } | |
1174 | return fileDescriptor_e5baabe45344a177, []int{8} | |
1175 | } | |
1176 | ||
1139 | 1177 | func (m *ServiceDescriptorProto) XXX_Unmarshal(b []byte) error { |
1140 | 1178 | return xxx_messageInfo_ServiceDescriptorProto.Unmarshal(m, b) |
1141 | 1179 | } |
1142 | 1180 | func (m *ServiceDescriptorProto) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
1143 | 1181 | return xxx_messageInfo_ServiceDescriptorProto.Marshal(b, m, deterministic) |
1144 | 1182 | } |
1145 | func (dst *ServiceDescriptorProto) XXX_Merge(src proto.Message) { | |
1146 | xxx_messageInfo_ServiceDescriptorProto.Merge(dst, src) | |
1183 | func (m *ServiceDescriptorProto) XXX_Merge(src proto.Message) { | |
1184 | xxx_messageInfo_ServiceDescriptorProto.Merge(m, src) | |
1147 | 1185 | } |
1148 | 1186 | func (m *ServiceDescriptorProto) XXX_Size() int { |
1149 | 1187 | return xxx_messageInfo_ServiceDescriptorProto.Size(m) |
1196 | 1234 | func (m *MethodDescriptorProto) String() string { return proto.CompactTextString(m) } |
1197 | 1235 | func (*MethodDescriptorProto) ProtoMessage() {} |
1198 | 1236 | func (*MethodDescriptorProto) Descriptor() ([]byte, []int) { |
1199 | return fileDescriptor_descriptor_4df4cb5f42392df6, []int{9} | |
1200 | } | |
1237 | return fileDescriptor_e5baabe45344a177, []int{9} | |
1238 | } | |
1239 | ||
1201 | 1240 | func (m *MethodDescriptorProto) XXX_Unmarshal(b []byte) error { |
1202 | 1241 | return xxx_messageInfo_MethodDescriptorProto.Unmarshal(m, b) |
1203 | 1242 | } |
1204 | 1243 | func (m *MethodDescriptorProto) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
1205 | 1244 | return xxx_messageInfo_MethodDescriptorProto.Marshal(b, m, deterministic) |
1206 | 1245 | } |
1207 | func (dst *MethodDescriptorProto) XXX_Merge(src proto.Message) { | |
1208 | xxx_messageInfo_MethodDescriptorProto.Merge(dst, src) | |
1246 | func (m *MethodDescriptorProto) XXX_Merge(src proto.Message) { | |
1247 | xxx_messageInfo_MethodDescriptorProto.Merge(m, src) | |
1209 | 1248 | } |
1210 | 1249 | func (m *MethodDescriptorProto) XXX_Size() int { |
1211 | 1250 | return xxx_messageInfo_MethodDescriptorProto.Size(m) |
1335 | 1374 | // is empty. When this option is empty, the package name will be used for |
1336 | 1375 | // determining the namespace. |
1337 | 1376 | PhpNamespace *string `protobuf:"bytes,41,opt,name=php_namespace,json=phpNamespace" json:"php_namespace,omitempty"` |
1377 | // Use this option to change the namespace of php generated metadata classes. | |
1378 | // Default is empty. When this option is empty, the proto file name will be used | |
1379 | // for determining the namespace. | |
1380 | PhpMetadataNamespace *string `protobuf:"bytes,44,opt,name=php_metadata_namespace,json=phpMetadataNamespace" json:"php_metadata_namespace,omitempty"` | |
1381 | // Use this option to change the package of ruby generated classes. Default | |
1382 | // is empty. When this option is not set, the package name will be used for | |
1383 | // determining the ruby package. | |
1384 | RubyPackage *string `protobuf:"bytes,45,opt,name=ruby_package,json=rubyPackage" json:"ruby_package,omitempty"` | |
1338 | 1385 | // The parser stores options it doesn't recognize here. |
1339 | 1386 | // See the documentation for the "Options" section above. |
1340 | 1387 | UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"` |
1348 | 1395 | func (m *FileOptions) String() string { return proto.CompactTextString(m) } |
1349 | 1396 | func (*FileOptions) ProtoMessage() {} |
1350 | 1397 | func (*FileOptions) Descriptor() ([]byte, []int) { |
1351 | return fileDescriptor_descriptor_4df4cb5f42392df6, []int{10} | |
1398 | return fileDescriptor_e5baabe45344a177, []int{10} | |
1352 | 1399 | } |
1353 | 1400 | |
1354 | 1401 | var extRange_FileOptions = []proto.ExtensionRange{ |
1358 | 1405 | func (*FileOptions) ExtensionRangeArray() []proto.ExtensionRange { |
1359 | 1406 | return extRange_FileOptions |
1360 | 1407 | } |
1408 | ||
1361 | 1409 | func (m *FileOptions) XXX_Unmarshal(b []byte) error { |
1362 | 1410 | return xxx_messageInfo_FileOptions.Unmarshal(m, b) |
1363 | 1411 | } |
1364 | 1412 | func (m *FileOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
1365 | 1413 | return xxx_messageInfo_FileOptions.Marshal(b, m, deterministic) |
1366 | 1414 | } |
1367 | func (dst *FileOptions) XXX_Merge(src proto.Message) { | |
1368 | xxx_messageInfo_FileOptions.Merge(dst, src) | |
1415 | func (m *FileOptions) XXX_Merge(src proto.Message) { | |
1416 | xxx_messageInfo_FileOptions.Merge(m, src) | |
1369 | 1417 | } |
1370 | 1418 | func (m *FileOptions) XXX_Size() int { |
1371 | 1419 | return xxx_messageInfo_FileOptions.Size(m) |
1509 | 1557 | func (m *FileOptions) GetPhpNamespace() string { |
1510 | 1558 | if m != nil && m.PhpNamespace != nil { |
1511 | 1559 | return *m.PhpNamespace |
1560 | } | |
1561 | return "" | |
1562 | } | |
1563 | ||
1564 | func (m *FileOptions) GetPhpMetadataNamespace() string { | |
1565 | if m != nil && m.PhpMetadataNamespace != nil { | |
1566 | return *m.PhpMetadataNamespace | |
1567 | } | |
1568 | return "" | |
1569 | } | |
1570 | ||
1571 | func (m *FileOptions) GetRubyPackage() string { | |
1572 | if m != nil && m.RubyPackage != nil { | |
1573 | return *m.RubyPackage | |
1512 | 1574 | } |
1513 | 1575 | return "" |
1514 | 1576 | } |
1583 | 1645 | func (m *MessageOptions) String() string { return proto.CompactTextString(m) } |
1584 | 1646 | func (*MessageOptions) ProtoMessage() {} |
1585 | 1647 | func (*MessageOptions) Descriptor() ([]byte, []int) { |
1586 | return fileDescriptor_descriptor_4df4cb5f42392df6, []int{11} | |
1648 | return fileDescriptor_e5baabe45344a177, []int{11} | |
1587 | 1649 | } |
1588 | 1650 | |
1589 | 1651 | var extRange_MessageOptions = []proto.ExtensionRange{ |
1593 | 1655 | func (*MessageOptions) ExtensionRangeArray() []proto.ExtensionRange { |
1594 | 1656 | return extRange_MessageOptions |
1595 | 1657 | } |
1658 | ||
1596 | 1659 | func (m *MessageOptions) XXX_Unmarshal(b []byte) error { |
1597 | 1660 | return xxx_messageInfo_MessageOptions.Unmarshal(m, b) |
1598 | 1661 | } |
1599 | 1662 | func (m *MessageOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
1600 | 1663 | return xxx_messageInfo_MessageOptions.Marshal(b, m, deterministic) |
1601 | 1664 | } |
1602 | func (dst *MessageOptions) XXX_Merge(src proto.Message) { | |
1603 | xxx_messageInfo_MessageOptions.Merge(dst, src) | |
1665 | func (m *MessageOptions) XXX_Merge(src proto.Message) { | |
1666 | xxx_messageInfo_MessageOptions.Merge(m, src) | |
1604 | 1667 | } |
1605 | 1668 | func (m *MessageOptions) XXX_Size() int { |
1606 | 1669 | return xxx_messageInfo_MessageOptions.Size(m) |
1722 | 1785 | func (m *FieldOptions) String() string { return proto.CompactTextString(m) } |
1723 | 1786 | func (*FieldOptions) ProtoMessage() {} |
1724 | 1787 | func (*FieldOptions) Descriptor() ([]byte, []int) { |
1725 | return fileDescriptor_descriptor_4df4cb5f42392df6, []int{12} | |
1788 | return fileDescriptor_e5baabe45344a177, []int{12} | |
1726 | 1789 | } |
1727 | 1790 | |
1728 | 1791 | var extRange_FieldOptions = []proto.ExtensionRange{ |
1732 | 1795 | func (*FieldOptions) ExtensionRangeArray() []proto.ExtensionRange { |
1733 | 1796 | return extRange_FieldOptions |
1734 | 1797 | } |
1798 | ||
1735 | 1799 | func (m *FieldOptions) XXX_Unmarshal(b []byte) error { |
1736 | 1800 | return xxx_messageInfo_FieldOptions.Unmarshal(m, b) |
1737 | 1801 | } |
1738 | 1802 | func (m *FieldOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
1739 | 1803 | return xxx_messageInfo_FieldOptions.Marshal(b, m, deterministic) |
1740 | 1804 | } |
1741 | func (dst *FieldOptions) XXX_Merge(src proto.Message) { | |
1742 | xxx_messageInfo_FieldOptions.Merge(dst, src) | |
1805 | func (m *FieldOptions) XXX_Merge(src proto.Message) { | |
1806 | xxx_messageInfo_FieldOptions.Merge(m, src) | |
1743 | 1807 | } |
1744 | 1808 | func (m *FieldOptions) XXX_Size() int { |
1745 | 1809 | return xxx_messageInfo_FieldOptions.Size(m) |
1818 | 1882 | func (m *OneofOptions) String() string { return proto.CompactTextString(m) } |
1819 | 1883 | func (*OneofOptions) ProtoMessage() {} |
1820 | 1884 | func (*OneofOptions) Descriptor() ([]byte, []int) { |
1821 | return fileDescriptor_descriptor_4df4cb5f42392df6, []int{13} | |
1885 | return fileDescriptor_e5baabe45344a177, []int{13} | |
1822 | 1886 | } |
1823 | 1887 | |
1824 | 1888 | var extRange_OneofOptions = []proto.ExtensionRange{ |
1828 | 1892 | func (*OneofOptions) ExtensionRangeArray() []proto.ExtensionRange { |
1829 | 1893 | return extRange_OneofOptions |
1830 | 1894 | } |
1895 | ||
1831 | 1896 | func (m *OneofOptions) XXX_Unmarshal(b []byte) error { |
1832 | 1897 | return xxx_messageInfo_OneofOptions.Unmarshal(m, b) |
1833 | 1898 | } |
1834 | 1899 | func (m *OneofOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
1835 | 1900 | return xxx_messageInfo_OneofOptions.Marshal(b, m, deterministic) |
1836 | 1901 | } |
1837 | func (dst *OneofOptions) XXX_Merge(src proto.Message) { | |
1838 | xxx_messageInfo_OneofOptions.Merge(dst, src) | |
1902 | func (m *OneofOptions) XXX_Merge(src proto.Message) { | |
1903 | xxx_messageInfo_OneofOptions.Merge(m, src) | |
1839 | 1904 | } |
1840 | 1905 | func (m *OneofOptions) XXX_Size() int { |
1841 | 1906 | return xxx_messageInfo_OneofOptions.Size(m) |
1874 | 1939 | func (m *EnumOptions) String() string { return proto.CompactTextString(m) } |
1875 | 1940 | func (*EnumOptions) ProtoMessage() {} |
1876 | 1941 | func (*EnumOptions) Descriptor() ([]byte, []int) { |
1877 | return fileDescriptor_descriptor_4df4cb5f42392df6, []int{14} | |
1942 | return fileDescriptor_e5baabe45344a177, []int{14} | |
1878 | 1943 | } |
1879 | 1944 | |
1880 | 1945 | var extRange_EnumOptions = []proto.ExtensionRange{ |
1884 | 1949 | func (*EnumOptions) ExtensionRangeArray() []proto.ExtensionRange { |
1885 | 1950 | return extRange_EnumOptions |
1886 | 1951 | } |
1952 | ||
1887 | 1953 | func (m *EnumOptions) XXX_Unmarshal(b []byte) error { |
1888 | 1954 | return xxx_messageInfo_EnumOptions.Unmarshal(m, b) |
1889 | 1955 | } |
1890 | 1956 | func (m *EnumOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
1891 | 1957 | return xxx_messageInfo_EnumOptions.Marshal(b, m, deterministic) |
1892 | 1958 | } |
1893 | func (dst *EnumOptions) XXX_Merge(src proto.Message) { | |
1894 | xxx_messageInfo_EnumOptions.Merge(dst, src) | |
1959 | func (m *EnumOptions) XXX_Merge(src proto.Message) { | |
1960 | xxx_messageInfo_EnumOptions.Merge(m, src) | |
1895 | 1961 | } |
1896 | 1962 | func (m *EnumOptions) XXX_Size() int { |
1897 | 1963 | return xxx_messageInfo_EnumOptions.Size(m) |
1943 | 2009 | func (m *EnumValueOptions) String() string { return proto.CompactTextString(m) } |
1944 | 2010 | func (*EnumValueOptions) ProtoMessage() {} |
1945 | 2011 | func (*EnumValueOptions) Descriptor() ([]byte, []int) { |
1946 | return fileDescriptor_descriptor_4df4cb5f42392df6, []int{15} | |
2012 | return fileDescriptor_e5baabe45344a177, []int{15} | |
1947 | 2013 | } |
1948 | 2014 | |
1949 | 2015 | var extRange_EnumValueOptions = []proto.ExtensionRange{ |
1953 | 2019 | func (*EnumValueOptions) ExtensionRangeArray() []proto.ExtensionRange { |
1954 | 2020 | return extRange_EnumValueOptions |
1955 | 2021 | } |
2022 | ||
1956 | 2023 | func (m *EnumValueOptions) XXX_Unmarshal(b []byte) error { |
1957 | 2024 | return xxx_messageInfo_EnumValueOptions.Unmarshal(m, b) |
1958 | 2025 | } |
1959 | 2026 | func (m *EnumValueOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
1960 | 2027 | return xxx_messageInfo_EnumValueOptions.Marshal(b, m, deterministic) |
1961 | 2028 | } |
1962 | func (dst *EnumValueOptions) XXX_Merge(src proto.Message) { | |
1963 | xxx_messageInfo_EnumValueOptions.Merge(dst, src) | |
2029 | func (m *EnumValueOptions) XXX_Merge(src proto.Message) { | |
2030 | xxx_messageInfo_EnumValueOptions.Merge(m, src) | |
1964 | 2031 | } |
1965 | 2032 | func (m *EnumValueOptions) XXX_Size() int { |
1966 | 2033 | return xxx_messageInfo_EnumValueOptions.Size(m) |
2005 | 2072 | func (m *ServiceOptions) String() string { return proto.CompactTextString(m) } |
2006 | 2073 | func (*ServiceOptions) ProtoMessage() {} |
2007 | 2074 | func (*ServiceOptions) Descriptor() ([]byte, []int) { |
2008 | return fileDescriptor_descriptor_4df4cb5f42392df6, []int{16} | |
2075 | return fileDescriptor_e5baabe45344a177, []int{16} | |
2009 | 2076 | } |
2010 | 2077 | |
2011 | 2078 | var extRange_ServiceOptions = []proto.ExtensionRange{ |
2015 | 2082 | func (*ServiceOptions) ExtensionRangeArray() []proto.ExtensionRange { |
2016 | 2083 | return extRange_ServiceOptions |
2017 | 2084 | } |
2085 | ||
2018 | 2086 | func (m *ServiceOptions) XXX_Unmarshal(b []byte) error { |
2019 | 2087 | return xxx_messageInfo_ServiceOptions.Unmarshal(m, b) |
2020 | 2088 | } |
2021 | 2089 | func (m *ServiceOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
2022 | 2090 | return xxx_messageInfo_ServiceOptions.Marshal(b, m, deterministic) |
2023 | 2091 | } |
2024 | func (dst *ServiceOptions) XXX_Merge(src proto.Message) { | |
2025 | xxx_messageInfo_ServiceOptions.Merge(dst, src) | |
2092 | func (m *ServiceOptions) XXX_Merge(src proto.Message) { | |
2093 | xxx_messageInfo_ServiceOptions.Merge(m, src) | |
2026 | 2094 | } |
2027 | 2095 | func (m *ServiceOptions) XXX_Size() int { |
2028 | 2096 | return xxx_messageInfo_ServiceOptions.Size(m) |
2068 | 2136 | func (m *MethodOptions) String() string { return proto.CompactTextString(m) } |
2069 | 2137 | func (*MethodOptions) ProtoMessage() {} |
2070 | 2138 | func (*MethodOptions) Descriptor() ([]byte, []int) { |
2071 | return fileDescriptor_descriptor_4df4cb5f42392df6, []int{17} | |
2139 | return fileDescriptor_e5baabe45344a177, []int{17} | |
2072 | 2140 | } |
2073 | 2141 | |
2074 | 2142 | var extRange_MethodOptions = []proto.ExtensionRange{ |
2078 | 2146 | func (*MethodOptions) ExtensionRangeArray() []proto.ExtensionRange { |
2079 | 2147 | return extRange_MethodOptions |
2080 | 2148 | } |
2149 | ||
2081 | 2150 | func (m *MethodOptions) XXX_Unmarshal(b []byte) error { |
2082 | 2151 | return xxx_messageInfo_MethodOptions.Unmarshal(m, b) |
2083 | 2152 | } |
2084 | 2153 | func (m *MethodOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
2085 | 2154 | return xxx_messageInfo_MethodOptions.Marshal(b, m, deterministic) |
2086 | 2155 | } |
2087 | func (dst *MethodOptions) XXX_Merge(src proto.Message) { | |
2088 | xxx_messageInfo_MethodOptions.Merge(dst, src) | |
2156 | func (m *MethodOptions) XXX_Merge(src proto.Message) { | |
2157 | xxx_messageInfo_MethodOptions.Merge(m, src) | |
2089 | 2158 | } |
2090 | 2159 | func (m *MethodOptions) XXX_Size() int { |
2091 | 2160 | return xxx_messageInfo_MethodOptions.Size(m) |
2145 | 2214 | func (m *UninterpretedOption) String() string { return proto.CompactTextString(m) } |
2146 | 2215 | func (*UninterpretedOption) ProtoMessage() {} |
2147 | 2216 | func (*UninterpretedOption) Descriptor() ([]byte, []int) { |
2148 | return fileDescriptor_descriptor_4df4cb5f42392df6, []int{18} | |
2149 | } | |
2217 | return fileDescriptor_e5baabe45344a177, []int{18} | |
2218 | } | |
2219 | ||
2150 | 2220 | func (m *UninterpretedOption) XXX_Unmarshal(b []byte) error { |
2151 | 2221 | return xxx_messageInfo_UninterpretedOption.Unmarshal(m, b) |
2152 | 2222 | } |
2153 | 2223 | func (m *UninterpretedOption) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
2154 | 2224 | return xxx_messageInfo_UninterpretedOption.Marshal(b, m, deterministic) |
2155 | 2225 | } |
2156 | func (dst *UninterpretedOption) XXX_Merge(src proto.Message) { | |
2157 | xxx_messageInfo_UninterpretedOption.Merge(dst, src) | |
2226 | func (m *UninterpretedOption) XXX_Merge(src proto.Message) { | |
2227 | xxx_messageInfo_UninterpretedOption.Merge(m, src) | |
2158 | 2228 | } |
2159 | 2229 | func (m *UninterpretedOption) XXX_Size() int { |
2160 | 2230 | return xxx_messageInfo_UninterpretedOption.Size(m) |
2231 | 2301 | func (m *UninterpretedOption_NamePart) String() string { return proto.CompactTextString(m) } |
2232 | 2302 | func (*UninterpretedOption_NamePart) ProtoMessage() {} |
2233 | 2303 | func (*UninterpretedOption_NamePart) Descriptor() ([]byte, []int) { |
2234 | return fileDescriptor_descriptor_4df4cb5f42392df6, []int{18, 0} | |
2235 | } | |
2304 | return fileDescriptor_e5baabe45344a177, []int{18, 0} | |
2305 | } | |
2306 | ||
2236 | 2307 | func (m *UninterpretedOption_NamePart) XXX_Unmarshal(b []byte) error { |
2237 | 2308 | return xxx_messageInfo_UninterpretedOption_NamePart.Unmarshal(m, b) |
2238 | 2309 | } |
2239 | 2310 | func (m *UninterpretedOption_NamePart) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
2240 | 2311 | return xxx_messageInfo_UninterpretedOption_NamePart.Marshal(b, m, deterministic) |
2241 | 2312 | } |
2242 | func (dst *UninterpretedOption_NamePart) XXX_Merge(src proto.Message) { | |
2243 | xxx_messageInfo_UninterpretedOption_NamePart.Merge(dst, src) | |
2313 | func (m *UninterpretedOption_NamePart) XXX_Merge(src proto.Message) { | |
2314 | xxx_messageInfo_UninterpretedOption_NamePart.Merge(m, src) | |
2244 | 2315 | } |
2245 | 2316 | func (m *UninterpretedOption_NamePart) XXX_Size() int { |
2246 | 2317 | return xxx_messageInfo_UninterpretedOption_NamePart.Size(m) |
2321 | 2392 | func (m *SourceCodeInfo) String() string { return proto.CompactTextString(m) } |
2322 | 2393 | func (*SourceCodeInfo) ProtoMessage() {} |
2323 | 2394 | func (*SourceCodeInfo) Descriptor() ([]byte, []int) { |
2324 | return fileDescriptor_descriptor_4df4cb5f42392df6, []int{19} | |
2325 | } | |
2395 | return fileDescriptor_e5baabe45344a177, []int{19} | |
2396 | } | |
2397 | ||
2326 | 2398 | func (m *SourceCodeInfo) XXX_Unmarshal(b []byte) error { |
2327 | 2399 | return xxx_messageInfo_SourceCodeInfo.Unmarshal(m, b) |
2328 | 2400 | } |
2329 | 2401 | func (m *SourceCodeInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
2330 | 2402 | return xxx_messageInfo_SourceCodeInfo.Marshal(b, m, deterministic) |
2331 | 2403 | } |
2332 | func (dst *SourceCodeInfo) XXX_Merge(src proto.Message) { | |
2333 | xxx_messageInfo_SourceCodeInfo.Merge(dst, src) | |
2404 | func (m *SourceCodeInfo) XXX_Merge(src proto.Message) { | |
2405 | xxx_messageInfo_SourceCodeInfo.Merge(m, src) | |
2334 | 2406 | } |
2335 | 2407 | func (m *SourceCodeInfo) XXX_Size() int { |
2336 | 2408 | return xxx_messageInfo_SourceCodeInfo.Size(m) |
2438 | 2510 | func (m *SourceCodeInfo_Location) String() string { return proto.CompactTextString(m) } |
2439 | 2511 | func (*SourceCodeInfo_Location) ProtoMessage() {} |
2440 | 2512 | func (*SourceCodeInfo_Location) Descriptor() ([]byte, []int) { |
2441 | return fileDescriptor_descriptor_4df4cb5f42392df6, []int{19, 0} | |
2442 | } | |
2513 | return fileDescriptor_e5baabe45344a177, []int{19, 0} | |
2514 | } | |
2515 | ||
2443 | 2516 | func (m *SourceCodeInfo_Location) XXX_Unmarshal(b []byte) error { |
2444 | 2517 | return xxx_messageInfo_SourceCodeInfo_Location.Unmarshal(m, b) |
2445 | 2518 | } |
2446 | 2519 | func (m *SourceCodeInfo_Location) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
2447 | 2520 | return xxx_messageInfo_SourceCodeInfo_Location.Marshal(b, m, deterministic) |
2448 | 2521 | } |
2449 | func (dst *SourceCodeInfo_Location) XXX_Merge(src proto.Message) { | |
2450 | xxx_messageInfo_SourceCodeInfo_Location.Merge(dst, src) | |
2522 | func (m *SourceCodeInfo_Location) XXX_Merge(src proto.Message) { | |
2523 | xxx_messageInfo_SourceCodeInfo_Location.Merge(m, src) | |
2451 | 2524 | } |
2452 | 2525 | func (m *SourceCodeInfo_Location) XXX_Size() int { |
2453 | 2526 | return xxx_messageInfo_SourceCodeInfo_Location.Size(m) |
2509 | 2582 | func (m *GeneratedCodeInfo) String() string { return proto.CompactTextString(m) } |
2510 | 2583 | func (*GeneratedCodeInfo) ProtoMessage() {} |
2511 | 2584 | func (*GeneratedCodeInfo) Descriptor() ([]byte, []int) { |
2512 | return fileDescriptor_descriptor_4df4cb5f42392df6, []int{20} | |
2513 | } | |
2585 | return fileDescriptor_e5baabe45344a177, []int{20} | |
2586 | } | |
2587 | ||
2514 | 2588 | func (m *GeneratedCodeInfo) XXX_Unmarshal(b []byte) error { |
2515 | 2589 | return xxx_messageInfo_GeneratedCodeInfo.Unmarshal(m, b) |
2516 | 2590 | } |
2517 | 2591 | func (m *GeneratedCodeInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
2518 | 2592 | return xxx_messageInfo_GeneratedCodeInfo.Marshal(b, m, deterministic) |
2519 | 2593 | } |
2520 | func (dst *GeneratedCodeInfo) XXX_Merge(src proto.Message) { | |
2521 | xxx_messageInfo_GeneratedCodeInfo.Merge(dst, src) | |
2594 | func (m *GeneratedCodeInfo) XXX_Merge(src proto.Message) { | |
2595 | xxx_messageInfo_GeneratedCodeInfo.Merge(m, src) | |
2522 | 2596 | } |
2523 | 2597 | func (m *GeneratedCodeInfo) XXX_Size() int { |
2524 | 2598 | return xxx_messageInfo_GeneratedCodeInfo.Size(m) |
2558 | 2632 | func (m *GeneratedCodeInfo_Annotation) String() string { return proto.CompactTextString(m) } |
2559 | 2633 | func (*GeneratedCodeInfo_Annotation) ProtoMessage() {} |
2560 | 2634 | func (*GeneratedCodeInfo_Annotation) Descriptor() ([]byte, []int) { |
2561 | return fileDescriptor_descriptor_4df4cb5f42392df6, []int{20, 0} | |
2562 | } | |
2635 | return fileDescriptor_e5baabe45344a177, []int{20, 0} | |
2636 | } | |
2637 | ||
2563 | 2638 | func (m *GeneratedCodeInfo_Annotation) XXX_Unmarshal(b []byte) error { |
2564 | 2639 | return xxx_messageInfo_GeneratedCodeInfo_Annotation.Unmarshal(m, b) |
2565 | 2640 | } |
2566 | 2641 | func (m *GeneratedCodeInfo_Annotation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
2567 | 2642 | return xxx_messageInfo_GeneratedCodeInfo_Annotation.Marshal(b, m, deterministic) |
2568 | 2643 | } |
2569 | func (dst *GeneratedCodeInfo_Annotation) XXX_Merge(src proto.Message) { | |
2570 | xxx_messageInfo_GeneratedCodeInfo_Annotation.Merge(dst, src) | |
2644 | func (m *GeneratedCodeInfo_Annotation) XXX_Merge(src proto.Message) { | |
2645 | xxx_messageInfo_GeneratedCodeInfo_Annotation.Merge(m, src) | |
2571 | 2646 | } |
2572 | 2647 | func (m *GeneratedCodeInfo_Annotation) XXX_Size() int { |
2573 | 2648 | return xxx_messageInfo_GeneratedCodeInfo_Annotation.Size(m) |
2607 | 2682 | } |
2608 | 2683 | |
2609 | 2684 | func init() { |
2685 | proto.RegisterEnum("google.protobuf.FieldDescriptorProto_Type", FieldDescriptorProto_Type_name, FieldDescriptorProto_Type_value) | |
2686 | proto.RegisterEnum("google.protobuf.FieldDescriptorProto_Label", FieldDescriptorProto_Label_name, FieldDescriptorProto_Label_value) | |
2687 | proto.RegisterEnum("google.protobuf.FileOptions_OptimizeMode", FileOptions_OptimizeMode_name, FileOptions_OptimizeMode_value) | |
2688 | proto.RegisterEnum("google.protobuf.FieldOptions_CType", FieldOptions_CType_name, FieldOptions_CType_value) | |
2689 | proto.RegisterEnum("google.protobuf.FieldOptions_JSType", FieldOptions_JSType_name, FieldOptions_JSType_value) | |
2690 | proto.RegisterEnum("google.protobuf.MethodOptions_IdempotencyLevel", MethodOptions_IdempotencyLevel_name, MethodOptions_IdempotencyLevel_value) | |
2610 | 2691 | proto.RegisterType((*FileDescriptorSet)(nil), "google.protobuf.FileDescriptorSet") |
2611 | 2692 | proto.RegisterType((*FileDescriptorProto)(nil), "google.protobuf.FileDescriptorProto") |
2612 | 2693 | proto.RegisterType((*DescriptorProto)(nil), "google.protobuf.DescriptorProto") |
2634 | 2715 | proto.RegisterType((*SourceCodeInfo_Location)(nil), "google.protobuf.SourceCodeInfo.Location") |
2635 | 2716 | proto.RegisterType((*GeneratedCodeInfo)(nil), "google.protobuf.GeneratedCodeInfo") |
2636 | 2717 | proto.RegisterType((*GeneratedCodeInfo_Annotation)(nil), "google.protobuf.GeneratedCodeInfo.Annotation") |
2637 | proto.RegisterEnum("google.protobuf.FieldDescriptorProto_Type", FieldDescriptorProto_Type_name, FieldDescriptorProto_Type_value) | |
2638 | proto.RegisterEnum("google.protobuf.FieldDescriptorProto_Label", FieldDescriptorProto_Label_name, FieldDescriptorProto_Label_value) | |
2639 | proto.RegisterEnum("google.protobuf.FileOptions_OptimizeMode", FileOptions_OptimizeMode_name, FileOptions_OptimizeMode_value) | |
2640 | proto.RegisterEnum("google.protobuf.FieldOptions_CType", FieldOptions_CType_name, FieldOptions_CType_value) | |
2641 | proto.RegisterEnum("google.protobuf.FieldOptions_JSType", FieldOptions_JSType_name, FieldOptions_JSType_value) | |
2642 | proto.RegisterEnum("google.protobuf.MethodOptions_IdempotencyLevel", MethodOptions_IdempotencyLevel_name, MethodOptions_IdempotencyLevel_value) | |
2643 | } | |
2644 | ||
2645 | func init() { | |
2646 | proto.RegisterFile("google/protobuf/descriptor.proto", fileDescriptor_descriptor_4df4cb5f42392df6) | |
2647 | } | |
2648 | ||
2649 | var fileDescriptor_descriptor_4df4cb5f42392df6 = []byte{ | |
2650 | // 2555 bytes of a gzipped FileDescriptorProto | |
2651 | 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x59, 0xdd, 0x6e, 0x1b, 0xc7, | |
2652 | 0xf5, 0xcf, 0xf2, 0x4b, 0xe4, 0x21, 0x45, 0x8d, 0x46, 0x8a, 0xbd, 0x56, 0x3e, 0x2c, 0x33, 0x1f, | |
2653 | 0x96, 0x9d, 0x7f, 0xa8, 0xc0, 0xb1, 0x1d, 0x47, 0xfe, 0x23, 0x2d, 0x45, 0xae, 0x15, 0xaa, 0x12, | |
2654 | 0xc9, 0x2e, 0xa9, 0xe6, 0x03, 0x28, 0x16, 0xa3, 0xdd, 0x21, 0xb9, 0xf6, 0x72, 0x77, 0xb3, 0xbb, | |
2655 | 0xb4, 0xad, 0xa0, 0x17, 0x06, 0x7a, 0xd5, 0xab, 0xde, 0x16, 0x45, 0xd1, 0x8b, 0xde, 0x04, 0xe8, | |
2656 | 0x03, 0x14, 0xc8, 0x5d, 0x9f, 0xa0, 0x40, 0xde, 0xa0, 0x68, 0x0b, 0xb4, 0x8f, 0xd0, 0xcb, 0x62, | |
2657 | 0x66, 0x76, 0x97, 0xbb, 0x24, 0x15, 0x2b, 0x01, 0xe2, 0x5c, 0x91, 0xf3, 0x9b, 0xdf, 0x39, 0x73, | |
2658 | 0xe6, 0xcc, 0x99, 0x33, 0x67, 0x66, 0x61, 0x7b, 0xe4, 0x38, 0x23, 0x8b, 0xee, 0xba, 0x9e, 0x13, | |
2659 | 0x38, 0xa7, 0xd3, 0xe1, 0xae, 0x41, 0x7d, 0xdd, 0x33, 0xdd, 0xc0, 0xf1, 0xea, 0x1c, 0xc3, 0x6b, | |
2660 | 0x82, 0x51, 0x8f, 0x18, 0xb5, 0x63, 0x58, 0x7f, 0x60, 0x5a, 0xb4, 0x15, 0x13, 0xfb, 0x34, 0xc0, | |
2661 | 0xf7, 0x20, 0x37, 0x34, 0x2d, 0x2a, 0x4b, 0xdb, 0xd9, 0x9d, 0xf2, 0xad, 0x37, 0xeb, 0x73, 0x42, | |
2662 | 0xf5, 0xb4, 0x44, 0x8f, 0xc1, 0x2a, 0x97, 0xa8, 0xfd, 0x2b, 0x07, 0x1b, 0x4b, 0x7a, 0x31, 0x86, | |
2663 | 0x9c, 0x4d, 0x26, 0x4c, 0xa3, 0xb4, 0x53, 0x52, 0xf9, 0x7f, 0x2c, 0xc3, 0x8a, 0x4b, 0xf4, 0x47, | |
2664 | 0x64, 0x44, 0xe5, 0x0c, 0x87, 0xa3, 0x26, 0x7e, 0x1d, 0xc0, 0xa0, 0x2e, 0xb5, 0x0d, 0x6a, 0xeb, | |
2665 | 0x67, 0x72, 0x76, 0x3b, 0xbb, 0x53, 0x52, 0x13, 0x08, 0x7e, 0x07, 0xd6, 0xdd, 0xe9, 0xa9, 0x65, | |
2666 | 0xea, 0x5a, 0x82, 0x06, 0xdb, 0xd9, 0x9d, 0xbc, 0x8a, 0x44, 0x47, 0x6b, 0x46, 0xbe, 0x0e, 0x6b, | |
2667 | 0x4f, 0x28, 0x79, 0x94, 0xa4, 0x96, 0x39, 0xb5, 0xca, 0xe0, 0x04, 0xb1, 0x09, 0x95, 0x09, 0xf5, | |
2668 | 0x7d, 0x32, 0xa2, 0x5a, 0x70, 0xe6, 0x52, 0x39, 0xc7, 0x67, 0xbf, 0xbd, 0x30, 0xfb, 0xf9, 0x99, | |
2669 | 0x97, 0x43, 0xa9, 0xc1, 0x99, 0x4b, 0x71, 0x03, 0x4a, 0xd4, 0x9e, 0x4e, 0x84, 0x86, 0xfc, 0x39, | |
2670 | 0xfe, 0x53, 0xec, 0xe9, 0x64, 0x5e, 0x4b, 0x91, 0x89, 0x85, 0x2a, 0x56, 0x7c, 0xea, 0x3d, 0x36, | |
2671 | 0x75, 0x2a, 0x17, 0xb8, 0x82, 0xeb, 0x0b, 0x0a, 0xfa, 0xa2, 0x7f, 0x5e, 0x47, 0x24, 0x87, 0x9b, | |
2672 | 0x50, 0xa2, 0x4f, 0x03, 0x6a, 0xfb, 0xa6, 0x63, 0xcb, 0x2b, 0x5c, 0xc9, 0x5b, 0x4b, 0x56, 0x91, | |
2673 | 0x5a, 0xc6, 0xbc, 0x8a, 0x99, 0x1c, 0xbe, 0x0b, 0x2b, 0x8e, 0x1b, 0x98, 0x8e, 0xed, 0xcb, 0xc5, | |
2674 | 0x6d, 0x69, 0xa7, 0x7c, 0xeb, 0xd5, 0xa5, 0x81, 0xd0, 0x15, 0x1c, 0x35, 0x22, 0xe3, 0x36, 0x20, | |
2675 | 0xdf, 0x99, 0x7a, 0x3a, 0xd5, 0x74, 0xc7, 0xa0, 0x9a, 0x69, 0x0f, 0x1d, 0xb9, 0xc4, 0x15, 0x5c, | |
2676 | 0x5d, 0x9c, 0x08, 0x27, 0x36, 0x1d, 0x83, 0xb6, 0xed, 0xa1, 0xa3, 0x56, 0xfd, 0x54, 0x1b, 0x5f, | |
2677 | 0x82, 0x82, 0x7f, 0x66, 0x07, 0xe4, 0xa9, 0x5c, 0xe1, 0x11, 0x12, 0xb6, 0x6a, 0x5f, 0x17, 0x60, | |
2678 | 0xed, 0x22, 0x21, 0x76, 0x1f, 0xf2, 0x43, 0x36, 0x4b, 0x39, 0xf3, 0x5d, 0x7c, 0x20, 0x64, 0xd2, | |
2679 | 0x4e, 0x2c, 0x7c, 0x4f, 0x27, 0x36, 0xa0, 0x6c, 0x53, 0x3f, 0xa0, 0x86, 0x88, 0x88, 0xec, 0x05, | |
2680 | 0x63, 0x0a, 0x84, 0xd0, 0x62, 0x48, 0xe5, 0xbe, 0x57, 0x48, 0x7d, 0x0a, 0x6b, 0xb1, 0x49, 0x9a, | |
2681 | 0x47, 0xec, 0x51, 0x14, 0x9b, 0xbb, 0xcf, 0xb3, 0xa4, 0xae, 0x44, 0x72, 0x2a, 0x13, 0x53, 0xab, | |
2682 | 0x34, 0xd5, 0xc6, 0x2d, 0x00, 0xc7, 0xa6, 0xce, 0x50, 0x33, 0xa8, 0x6e, 0xc9, 0xc5, 0x73, 0xbc, | |
2683 | 0xd4, 0x65, 0x94, 0x05, 0x2f, 0x39, 0x02, 0xd5, 0x2d, 0xfc, 0xe1, 0x2c, 0xd4, 0x56, 0xce, 0x89, | |
2684 | 0x94, 0x63, 0xb1, 0xc9, 0x16, 0xa2, 0xed, 0x04, 0xaa, 0x1e, 0x65, 0x71, 0x4f, 0x8d, 0x70, 0x66, | |
2685 | 0x25, 0x6e, 0x44, 0xfd, 0xb9, 0x33, 0x53, 0x43, 0x31, 0x31, 0xb1, 0x55, 0x2f, 0xd9, 0xc4, 0x6f, | |
2686 | 0x40, 0x0c, 0x68, 0x3c, 0xac, 0x80, 0x67, 0xa1, 0x4a, 0x04, 0x76, 0xc8, 0x84, 0x6e, 0x7d, 0x09, | |
2687 | 0xd5, 0xb4, 0x7b, 0xf0, 0x26, 0xe4, 0xfd, 0x80, 0x78, 0x01, 0x8f, 0xc2, 0xbc, 0x2a, 0x1a, 0x18, | |
2688 | 0x41, 0x96, 0xda, 0x06, 0xcf, 0x72, 0x79, 0x95, 0xfd, 0xc5, 0x3f, 0x9d, 0x4d, 0x38, 0xcb, 0x27, | |
2689 | 0xfc, 0xf6, 0xe2, 0x8a, 0xa6, 0x34, 0xcf, 0xcf, 0x7b, 0xeb, 0x03, 0x58, 0x4d, 0x4d, 0xe0, 0xa2, | |
2690 | 0x43, 0xd7, 0x7e, 0x05, 0x2f, 0x2f, 0x55, 0x8d, 0x3f, 0x85, 0xcd, 0xa9, 0x6d, 0xda, 0x01, 0xf5, | |
2691 | 0x5c, 0x8f, 0xb2, 0x88, 0x15, 0x43, 0xc9, 0xff, 0x5e, 0x39, 0x27, 0xe6, 0x4e, 0x92, 0x6c, 0xa1, | |
2692 | 0x45, 0xdd, 0x98, 0x2e, 0x82, 0x37, 0x4b, 0xc5, 0xff, 0xac, 0xa0, 0x67, 0xcf, 0x9e, 0x3d, 0xcb, | |
2693 | 0xd4, 0x7e, 0x57, 0x80, 0xcd, 0x65, 0x7b, 0x66, 0xe9, 0xf6, 0xbd, 0x04, 0x05, 0x7b, 0x3a, 0x39, | |
2694 | 0xa5, 0x1e, 0x77, 0x52, 0x5e, 0x0d, 0x5b, 0xb8, 0x01, 0x79, 0x8b, 0x9c, 0x52, 0x4b, 0xce, 0x6d, | |
2695 | 0x4b, 0x3b, 0xd5, 0x5b, 0xef, 0x5c, 0x68, 0x57, 0xd6, 0x8f, 0x98, 0x88, 0x2a, 0x24, 0xf1, 0x47, | |
2696 | 0x90, 0x0b, 0x53, 0x34, 0xd3, 0x70, 0xf3, 0x62, 0x1a, 0xd8, 0x5e, 0x52, 0xb9, 0x1c, 0x7e, 0x05, | |
2697 | 0x4a, 0xec, 0x57, 0xc4, 0x46, 0x81, 0xdb, 0x5c, 0x64, 0x00, 0x8b, 0x0b, 0xbc, 0x05, 0x45, 0xbe, | |
2698 | 0x4d, 0x0c, 0x1a, 0x1d, 0x6d, 0x71, 0x9b, 0x05, 0x96, 0x41, 0x87, 0x64, 0x6a, 0x05, 0xda, 0x63, | |
2699 | 0x62, 0x4d, 0x29, 0x0f, 0xf8, 0x92, 0x5a, 0x09, 0xc1, 0x5f, 0x30, 0x0c, 0x5f, 0x85, 0xb2, 0xd8, | |
2700 | 0x55, 0xa6, 0x6d, 0xd0, 0xa7, 0x3c, 0x7b, 0xe6, 0x55, 0xb1, 0xd1, 0xda, 0x0c, 0x61, 0xc3, 0x3f, | |
2701 | 0xf4, 0x1d, 0x3b, 0x0a, 0x4d, 0x3e, 0x04, 0x03, 0xf8, 0xf0, 0x1f, 0xcc, 0x27, 0xee, 0xd7, 0x96, | |
2702 | 0x4f, 0x6f, 0x3e, 0xa6, 0x6a, 0x7f, 0xc9, 0x40, 0x8e, 0xe7, 0x8b, 0x35, 0x28, 0x0f, 0x3e, 0xeb, | |
2703 | 0x29, 0x5a, 0xab, 0x7b, 0xb2, 0x7f, 0xa4, 0x20, 0x09, 0x57, 0x01, 0x38, 0xf0, 0xe0, 0xa8, 0xdb, | |
2704 | 0x18, 0xa0, 0x4c, 0xdc, 0x6e, 0x77, 0x06, 0x77, 0x6f, 0xa3, 0x6c, 0x2c, 0x70, 0x22, 0x80, 0x5c, | |
2705 | 0x92, 0xf0, 0xfe, 0x2d, 0x94, 0xc7, 0x08, 0x2a, 0x42, 0x41, 0xfb, 0x53, 0xa5, 0x75, 0xf7, 0x36, | |
2706 | 0x2a, 0xa4, 0x91, 0xf7, 0x6f, 0xa1, 0x15, 0xbc, 0x0a, 0x25, 0x8e, 0xec, 0x77, 0xbb, 0x47, 0xa8, | |
2707 | 0x18, 0xeb, 0xec, 0x0f, 0xd4, 0x76, 0xe7, 0x00, 0x95, 0x62, 0x9d, 0x07, 0x6a, 0xf7, 0xa4, 0x87, | |
2708 | 0x20, 0xd6, 0x70, 0xac, 0xf4, 0xfb, 0x8d, 0x03, 0x05, 0x95, 0x63, 0xc6, 0xfe, 0x67, 0x03, 0xa5, | |
2709 | 0x8f, 0x2a, 0x29, 0xb3, 0xde, 0xbf, 0x85, 0x56, 0xe3, 0x21, 0x94, 0xce, 0xc9, 0x31, 0xaa, 0xe2, | |
2710 | 0x75, 0x58, 0x15, 0x43, 0x44, 0x46, 0xac, 0xcd, 0x41, 0x77, 0x6f, 0x23, 0x34, 0x33, 0x44, 0x68, | |
2711 | 0x59, 0x4f, 0x01, 0x77, 0x6f, 0x23, 0x5c, 0x6b, 0x42, 0x9e, 0x47, 0x17, 0xc6, 0x50, 0x3d, 0x6a, | |
2712 | 0xec, 0x2b, 0x47, 0x5a, 0xb7, 0x37, 0x68, 0x77, 0x3b, 0x8d, 0x23, 0x24, 0xcd, 0x30, 0x55, 0xf9, | |
2713 | 0xf9, 0x49, 0x5b, 0x55, 0x5a, 0x28, 0x93, 0xc4, 0x7a, 0x4a, 0x63, 0xa0, 0xb4, 0x50, 0xb6, 0xa6, | |
2714 | 0xc3, 0xe6, 0xb2, 0x3c, 0xb9, 0x74, 0x67, 0x24, 0x96, 0x38, 0x73, 0xce, 0x12, 0x73, 0x5d, 0x0b, | |
2715 | 0x4b, 0xfc, 0xcf, 0x0c, 0x6c, 0x2c, 0x39, 0x2b, 0x96, 0x0e, 0xf2, 0x13, 0xc8, 0x8b, 0x10, 0x15, | |
2716 | 0xa7, 0xe7, 0x8d, 0xa5, 0x87, 0x0e, 0x0f, 0xd8, 0x85, 0x13, 0x94, 0xcb, 0x25, 0x2b, 0x88, 0xec, | |
2717 | 0x39, 0x15, 0x04, 0x53, 0xb1, 0x90, 0xd3, 0x7f, 0xb9, 0x90, 0xd3, 0xc5, 0xb1, 0x77, 0xf7, 0x22, | |
2718 | 0xc7, 0x1e, 0xc7, 0xbe, 0x5b, 0x6e, 0xcf, 0x2f, 0xc9, 0xed, 0xf7, 0x61, 0x7d, 0x41, 0xd1, 0x85, | |
2719 | 0x73, 0xec, 0xaf, 0x25, 0x90, 0xcf, 0x73, 0xce, 0x73, 0x32, 0x5d, 0x26, 0x95, 0xe9, 0xee, 0xcf, | |
2720 | 0x7b, 0xf0, 0xda, 0xf9, 0x8b, 0xb0, 0xb0, 0xd6, 0x5f, 0x49, 0x70, 0x69, 0x79, 0xa5, 0xb8, 0xd4, | |
2721 | 0x86, 0x8f, 0xa0, 0x30, 0xa1, 0xc1, 0xd8, 0x89, 0xaa, 0xa5, 0xb7, 0x97, 0x9c, 0xc1, 0xac, 0x7b, | |
2722 | 0x7e, 0xb1, 0x43, 0xa9, 0xe4, 0x21, 0x9e, 0x3d, 0xaf, 0xdc, 0x13, 0xd6, 0x2c, 0x58, 0xfa, 0x9b, | |
2723 | 0x0c, 0xbc, 0xbc, 0x54, 0xf9, 0x52, 0x43, 0x5f, 0x03, 0x30, 0x6d, 0x77, 0x1a, 0x88, 0x8a, 0x48, | |
2724 | 0x24, 0xd8, 0x12, 0x47, 0x78, 0xf2, 0x62, 0xc9, 0x73, 0x1a, 0xc4, 0xfd, 0x59, 0xde, 0x0f, 0x02, | |
2725 | 0xe2, 0x84, 0x7b, 0x33, 0x43, 0x73, 0xdc, 0xd0, 0xd7, 0xcf, 0x99, 0xe9, 0x42, 0x60, 0xbe, 0x07, | |
2726 | 0x48, 0xb7, 0x4c, 0x6a, 0x07, 0x9a, 0x1f, 0x78, 0x94, 0x4c, 0x4c, 0x7b, 0xc4, 0x4f, 0x90, 0xe2, | |
2727 | 0x5e, 0x7e, 0x48, 0x2c, 0x9f, 0xaa, 0x6b, 0xa2, 0xbb, 0x1f, 0xf5, 0x32, 0x09, 0x1e, 0x40, 0x5e, | |
2728 | 0x42, 0xa2, 0x90, 0x92, 0x10, 0xdd, 0xb1, 0x44, 0xed, 0xeb, 0x22, 0x94, 0x13, 0x75, 0x35, 0xbe, | |
2729 | 0x06, 0x95, 0x87, 0xe4, 0x31, 0xd1, 0xa2, 0xbb, 0x92, 0xf0, 0x44, 0x99, 0x61, 0xbd, 0xf0, 0xbe, | |
2730 | 0xf4, 0x1e, 0x6c, 0x72, 0x8a, 0x33, 0x0d, 0xa8, 0xa7, 0xe9, 0x16, 0xf1, 0x7d, 0xee, 0xb4, 0x22, | |
2731 | 0xa7, 0x62, 0xd6, 0xd7, 0x65, 0x5d, 0xcd, 0xa8, 0x07, 0xdf, 0x81, 0x0d, 0x2e, 0x31, 0x99, 0x5a, | |
2732 | 0x81, 0xe9, 0x5a, 0x54, 0x63, 0xb7, 0x37, 0x9f, 0x9f, 0x24, 0xb1, 0x65, 0xeb, 0x8c, 0x71, 0x1c, | |
2733 | 0x12, 0x98, 0x45, 0x3e, 0x6e, 0xc1, 0x6b, 0x5c, 0x6c, 0x44, 0x6d, 0xea, 0x91, 0x80, 0x6a, 0xf4, | |
2734 | 0x8b, 0x29, 0xb1, 0x7c, 0x8d, 0xd8, 0x86, 0x36, 0x26, 0xfe, 0x58, 0xde, 0x64, 0x0a, 0xf6, 0x33, | |
2735 | 0xb2, 0xa4, 0x5e, 0x61, 0xc4, 0x83, 0x90, 0xa7, 0x70, 0x5a, 0xc3, 0x36, 0x3e, 0x26, 0xfe, 0x18, | |
2736 | 0xef, 0xc1, 0x25, 0xae, 0xc5, 0x0f, 0x3c, 0xd3, 0x1e, 0x69, 0xfa, 0x98, 0xea, 0x8f, 0xb4, 0x69, | |
2737 | 0x30, 0xbc, 0x27, 0xbf, 0x92, 0x1c, 0x9f, 0x5b, 0xd8, 0xe7, 0x9c, 0x26, 0xa3, 0x9c, 0x04, 0xc3, | |
2738 | 0x7b, 0xb8, 0x0f, 0x15, 0xb6, 0x18, 0x13, 0xf3, 0x4b, 0xaa, 0x0d, 0x1d, 0x8f, 0x1f, 0x8d, 0xd5, | |
2739 | 0x25, 0xa9, 0x29, 0xe1, 0xc1, 0x7a, 0x37, 0x14, 0x38, 0x76, 0x0c, 0xba, 0x97, 0xef, 0xf7, 0x14, | |
2740 | 0xa5, 0xa5, 0x96, 0x23, 0x2d, 0x0f, 0x1c, 0x8f, 0x05, 0xd4, 0xc8, 0x89, 0x1d, 0x5c, 0x16, 0x01, | |
2741 | 0x35, 0x72, 0x22, 0xf7, 0xde, 0x81, 0x0d, 0x5d, 0x17, 0x73, 0x36, 0x75, 0x2d, 0xbc, 0x63, 0xf9, | |
2742 | 0x32, 0x4a, 0x39, 0x4b, 0xd7, 0x0f, 0x04, 0x21, 0x8c, 0x71, 0x1f, 0x7f, 0x08, 0x2f, 0xcf, 0x9c, | |
2743 | 0x95, 0x14, 0x5c, 0x5f, 0x98, 0xe5, 0xbc, 0xe8, 0x1d, 0xd8, 0x70, 0xcf, 0x16, 0x05, 0x71, 0x6a, | |
2744 | 0x44, 0xf7, 0x6c, 0x5e, 0xec, 0x03, 0xd8, 0x74, 0xc7, 0xee, 0xa2, 0xdc, 0xcd, 0xa4, 0x1c, 0x76, | |
2745 | 0xc7, 0xee, 0xbc, 0xe0, 0x5b, 0xfc, 0xc2, 0xed, 0x51, 0x9d, 0x04, 0xd4, 0x90, 0x2f, 0x27, 0xe9, | |
2746 | 0x89, 0x0e, 0xbc, 0x0b, 0x48, 0xd7, 0x35, 0x6a, 0x93, 0x53, 0x8b, 0x6a, 0xc4, 0xa3, 0x36, 0xf1, | |
2747 | 0xe5, 0xab, 0x49, 0x72, 0x55, 0xd7, 0x15, 0xde, 0xdb, 0xe0, 0x9d, 0xf8, 0x26, 0xac, 0x3b, 0xa7, | |
2748 | 0x0f, 0x75, 0x11, 0x92, 0x9a, 0xeb, 0xd1, 0xa1, 0xf9, 0x54, 0x7e, 0x93, 0xfb, 0x77, 0x8d, 0x75, | |
2749 | 0xf0, 0x80, 0xec, 0x71, 0x18, 0xdf, 0x00, 0xa4, 0xfb, 0x63, 0xe2, 0xb9, 0x3c, 0x27, 0xfb, 0x2e, | |
2750 | 0xd1, 0xa9, 0xfc, 0x96, 0xa0, 0x0a, 0xbc, 0x13, 0xc1, 0x6c, 0x4b, 0xf8, 0x4f, 0xcc, 0x61, 0x10, | |
2751 | 0x69, 0xbc, 0x2e, 0xb6, 0x04, 0xc7, 0x42, 0x6d, 0x3b, 0x80, 0x98, 0x2b, 0x52, 0x03, 0xef, 0x70, | |
2752 | 0x5a, 0xd5, 0x1d, 0xbb, 0xc9, 0x71, 0xdf, 0x80, 0x55, 0xc6, 0x9c, 0x0d, 0x7a, 0x43, 0x14, 0x64, | |
2753 | 0xee, 0x38, 0x31, 0xe2, 0x0f, 0x56, 0x1b, 0xd7, 0xf6, 0xa0, 0x92, 0x8c, 0x4f, 0x5c, 0x02, 0x11, | |
2754 | 0xa1, 0x48, 0x62, 0xc5, 0x4a, 0xb3, 0xdb, 0x62, 0x65, 0xc6, 0xe7, 0x0a, 0xca, 0xb0, 0x72, 0xe7, | |
2755 | 0xa8, 0x3d, 0x50, 0x34, 0xf5, 0xa4, 0x33, 0x68, 0x1f, 0x2b, 0x28, 0x9b, 0xa8, 0xab, 0x0f, 0x73, | |
2756 | 0xc5, 0xb7, 0xd1, 0xf5, 0xda, 0x37, 0x19, 0xa8, 0xa6, 0x2f, 0x4a, 0xf8, 0xff, 0xe1, 0x72, 0xf4, | |
2757 | 0xaa, 0xe1, 0xd3, 0x40, 0x7b, 0x62, 0x7a, 0x7c, 0xe3, 0x4c, 0x88, 0x38, 0xc4, 0xe2, 0xa5, 0xdb, | |
2758 | 0x0c, 0x59, 0x7d, 0x1a, 0x7c, 0x62, 0x7a, 0x6c, 0x5b, 0x4c, 0x48, 0x80, 0x8f, 0xe0, 0xaa, 0xed, | |
2759 | 0x68, 0x7e, 0x40, 0x6c, 0x83, 0x78, 0x86, 0x36, 0x7b, 0x4f, 0xd2, 0x88, 0xae, 0x53, 0xdf, 0x77, | |
2760 | 0xc4, 0x81, 0x15, 0x6b, 0x79, 0xd5, 0x76, 0xfa, 0x21, 0x79, 0x96, 0xc9, 0x1b, 0x21, 0x75, 0x2e, | |
2761 | 0xcc, 0xb2, 0xe7, 0x85, 0xd9, 0x2b, 0x50, 0x9a, 0x10, 0x57, 0xa3, 0x76, 0xe0, 0x9d, 0xf1, 0xf2, | |
2762 | 0xb8, 0xa8, 0x16, 0x27, 0xc4, 0x55, 0x58, 0xfb, 0x85, 0xdc, 0x52, 0x0e, 0x73, 0xc5, 0x22, 0x2a, | |
2763 | 0x1d, 0xe6, 0x8a, 0x25, 0x04, 0xb5, 0x7f, 0x64, 0xa1, 0x92, 0x2c, 0x97, 0xd9, 0xed, 0x43, 0xe7, | |
2764 | 0x27, 0x8b, 0xc4, 0x73, 0xcf, 0x1b, 0xdf, 0x5a, 0x5c, 0xd7, 0x9b, 0xec, 0xc8, 0xd9, 0x2b, 0x88, | |
2765 | 0x22, 0x56, 0x15, 0x92, 0xec, 0xb8, 0x67, 0xd9, 0x86, 0x8a, 0xa2, 0xa1, 0xa8, 0x86, 0x2d, 0x7c, | |
2766 | 0x00, 0x85, 0x87, 0x3e, 0xd7, 0x5d, 0xe0, 0xba, 0xdf, 0xfc, 0x76, 0xdd, 0x87, 0x7d, 0xae, 0xbc, | |
2767 | 0x74, 0xd8, 0xd7, 0x3a, 0x5d, 0xf5, 0xb8, 0x71, 0xa4, 0x86, 0xe2, 0xf8, 0x0a, 0xe4, 0x2c, 0xf2, | |
2768 | 0xe5, 0x59, 0xfa, 0x70, 0xe2, 0xd0, 0x45, 0x17, 0xe1, 0x0a, 0xe4, 0x9e, 0x50, 0xf2, 0x28, 0x7d, | |
2769 | 0x24, 0x70, 0xe8, 0x07, 0xdc, 0x0c, 0xbb, 0x90, 0xe7, 0xfe, 0xc2, 0x00, 0xa1, 0xc7, 0xd0, 0x4b, | |
2770 | 0xb8, 0x08, 0xb9, 0x66, 0x57, 0x65, 0x1b, 0x02, 0x41, 0x45, 0xa0, 0x5a, 0xaf, 0xad, 0x34, 0x15, | |
2771 | 0x94, 0xa9, 0xdd, 0x81, 0x82, 0x70, 0x02, 0xdb, 0x2c, 0xb1, 0x1b, 0xd0, 0x4b, 0x61, 0x33, 0xd4, | |
2772 | 0x21, 0x45, 0xbd, 0x27, 0xc7, 0xfb, 0x8a, 0x8a, 0x32, 0xe9, 0xa5, 0xce, 0xa1, 0x7c, 0xcd, 0x87, | |
2773 | 0x4a, 0xb2, 0x5e, 0x7e, 0x31, 0x77, 0xe1, 0xbf, 0x4a, 0x50, 0x4e, 0xd4, 0xbf, 0xac, 0x70, 0x21, | |
2774 | 0x96, 0xe5, 0x3c, 0xd1, 0x88, 0x65, 0x12, 0x3f, 0x0c, 0x0d, 0xe0, 0x50, 0x83, 0x21, 0x17, 0x5d, | |
2775 | 0xba, 0x17, 0xb4, 0x45, 0xf2, 0xa8, 0x50, 0xfb, 0xa3, 0x04, 0x68, 0xbe, 0x00, 0x9d, 0x33, 0x53, | |
2776 | 0xfa, 0x31, 0xcd, 0xac, 0xfd, 0x41, 0x82, 0x6a, 0xba, 0xea, 0x9c, 0x33, 0xef, 0xda, 0x8f, 0x6a, | |
2777 | 0xde, 0xdf, 0x33, 0xb0, 0x9a, 0xaa, 0x35, 0x2f, 0x6a, 0xdd, 0x17, 0xb0, 0x6e, 0x1a, 0x74, 0xe2, | |
2778 | 0x3a, 0x01, 0xb5, 0xf5, 0x33, 0xcd, 0xa2, 0x8f, 0xa9, 0x25, 0xd7, 0x78, 0xd2, 0xd8, 0xfd, 0xf6, | |
2779 | 0x6a, 0xb6, 0xde, 0x9e, 0xc9, 0x1d, 0x31, 0xb1, 0xbd, 0x8d, 0x76, 0x4b, 0x39, 0xee, 0x75, 0x07, | |
2780 | 0x4a, 0xa7, 0xf9, 0x99, 0x76, 0xd2, 0xf9, 0x59, 0xa7, 0xfb, 0x49, 0x47, 0x45, 0xe6, 0x1c, 0xed, | |
2781 | 0x07, 0xdc, 0xf6, 0x3d, 0x40, 0xf3, 0x46, 0xe1, 0xcb, 0xb0, 0xcc, 0x2c, 0xf4, 0x12, 0xde, 0x80, | |
2782 | 0xb5, 0x4e, 0x57, 0xeb, 0xb7, 0x5b, 0x8a, 0xa6, 0x3c, 0x78, 0xa0, 0x34, 0x07, 0x7d, 0xf1, 0x3e, | |
2783 | 0x11, 0xb3, 0x07, 0xa9, 0x0d, 0x5e, 0xfb, 0x7d, 0x16, 0x36, 0x96, 0x58, 0x82, 0x1b, 0xe1, 0xcd, | |
2784 | 0x42, 0x5c, 0x76, 0xde, 0xbd, 0x88, 0xf5, 0x75, 0x56, 0x10, 0xf4, 0x88, 0x17, 0x84, 0x17, 0x91, | |
2785 | 0x1b, 0xc0, 0xbc, 0x64, 0x07, 0xe6, 0xd0, 0xa4, 0x5e, 0xf8, 0x9c, 0x23, 0xae, 0x1b, 0x6b, 0x33, | |
2786 | 0x5c, 0xbc, 0xe8, 0xfc, 0x1f, 0x60, 0xd7, 0xf1, 0xcd, 0xc0, 0x7c, 0x4c, 0x35, 0xd3, 0x8e, 0xde, | |
2787 | 0x7e, 0xd8, 0xf5, 0x23, 0xa7, 0xa2, 0xa8, 0xa7, 0x6d, 0x07, 0x31, 0xdb, 0xa6, 0x23, 0x32, 0xc7, | |
2788 | 0x66, 0xc9, 0x3c, 0xab, 0xa2, 0xa8, 0x27, 0x66, 0x5f, 0x83, 0x8a, 0xe1, 0x4c, 0x59, 0x4d, 0x26, | |
2789 | 0x78, 0xec, 0xec, 0x90, 0xd4, 0xb2, 0xc0, 0x62, 0x4a, 0x58, 0x6d, 0xcf, 0x1e, 0x9d, 0x2a, 0x6a, | |
2790 | 0x59, 0x60, 0x82, 0x72, 0x1d, 0xd6, 0xc8, 0x68, 0xe4, 0x31, 0xe5, 0x91, 0x22, 0x71, 0x7f, 0xa8, | |
2791 | 0xc6, 0x30, 0x27, 0x6e, 0x1d, 0x42, 0x31, 0xf2, 0x03, 0x3b, 0xaa, 0x99, 0x27, 0x34, 0x57, 0x5c, | |
2792 | 0x8a, 0x33, 0x3b, 0x25, 0xb5, 0x68, 0x47, 0x9d, 0xd7, 0xa0, 0x62, 0xfa, 0xda, 0xec, 0x0d, 0x3d, | |
2793 | 0xb3, 0x9d, 0xd9, 0x29, 0xaa, 0x65, 0xd3, 0x8f, 0xdf, 0x1f, 0x6b, 0x5f, 0x65, 0xa0, 0x9a, 0xfe, | |
2794 | 0x06, 0x80, 0x5b, 0x50, 0xb4, 0x1c, 0x9d, 0xf0, 0xd0, 0x12, 0x1f, 0xa0, 0x76, 0x9e, 0xf3, 0xd9, | |
2795 | 0xa0, 0x7e, 0x14, 0xf2, 0xd5, 0x58, 0x72, 0xeb, 0x6f, 0x12, 0x14, 0x23, 0x18, 0x5f, 0x82, 0x9c, | |
2796 | 0x4b, 0x82, 0x31, 0x57, 0x97, 0xdf, 0xcf, 0x20, 0x49, 0xe5, 0x6d, 0x86, 0xfb, 0x2e, 0xb1, 0x79, | |
2797 | 0x08, 0x84, 0x38, 0x6b, 0xb3, 0x75, 0xb5, 0x28, 0x31, 0xf8, 0xe5, 0xc4, 0x99, 0x4c, 0xa8, 0x1d, | |
2798 | 0xf8, 0xd1, 0xba, 0x86, 0x78, 0x33, 0x84, 0xf1, 0x3b, 0xb0, 0x1e, 0x78, 0xc4, 0xb4, 0x52, 0xdc, | |
2799 | 0x1c, 0xe7, 0xa2, 0xa8, 0x23, 0x26, 0xef, 0xc1, 0x95, 0x48, 0xaf, 0x41, 0x03, 0xa2, 0x8f, 0xa9, | |
2800 | 0x31, 0x13, 0x2a, 0xf0, 0x47, 0x88, 0xcb, 0x21, 0xa1, 0x15, 0xf6, 0x47, 0xb2, 0xb5, 0x6f, 0x24, | |
2801 | 0x58, 0x8f, 0xae, 0x53, 0x46, 0xec, 0xac, 0x63, 0x00, 0x62, 0xdb, 0x4e, 0x90, 0x74, 0xd7, 0x62, | |
2802 | 0x28, 0x2f, 0xc8, 0xd5, 0x1b, 0xb1, 0x90, 0x9a, 0x50, 0xb0, 0x35, 0x01, 0x98, 0xf5, 0x9c, 0xeb, | |
2803 | 0xb6, 0xab, 0x50, 0x0e, 0x3f, 0xf0, 0xf0, 0xaf, 0x84, 0xe2, 0x02, 0x0e, 0x02, 0x62, 0xf7, 0x2e, | |
2804 | 0xbc, 0x09, 0xf9, 0x53, 0x3a, 0x32, 0xed, 0xf0, 0xd9, 0x56, 0x34, 0xa2, 0x67, 0x92, 0x5c, 0xfc, | |
2805 | 0x4c, 0xb2, 0xff, 0x5b, 0x09, 0x36, 0x74, 0x67, 0x32, 0x6f, 0xef, 0x3e, 0x9a, 0x7b, 0x05, 0xf0, | |
2806 | 0x3f, 0x96, 0x3e, 0xff, 0x68, 0x64, 0x06, 0xe3, 0xe9, 0x69, 0x5d, 0x77, 0x26, 0xbb, 0x23, 0xc7, | |
2807 | 0x22, 0xf6, 0x68, 0xf6, 0x99, 0x93, 0xff, 0xd1, 0xdf, 0x1d, 0x51, 0xfb, 0xdd, 0x91, 0x93, 0xf8, | |
2808 | 0xe8, 0x79, 0x7f, 0xf6, 0xf7, 0xbf, 0x92, 0xf4, 0xa7, 0x4c, 0xf6, 0xa0, 0xb7, 0xff, 0xe7, 0xcc, | |
2809 | 0xd6, 0x81, 0x18, 0xae, 0x17, 0xb9, 0x47, 0xa5, 0x43, 0x8b, 0xea, 0x6c, 0xca, 0xff, 0x0b, 0x00, | |
2810 | 0x00, 0xff, 0xff, 0x1a, 0x28, 0x25, 0x79, 0x42, 0x1d, 0x00, 0x00, | |
2811 | } | |
2718 | } | |
2719 | ||
2720 | func init() { proto.RegisterFile("google/protobuf/descriptor.proto", fileDescriptor_e5baabe45344a177) } | |
2721 | ||
2722 | var fileDescriptor_e5baabe45344a177 = []byte{ | |
2723 | // 2589 bytes of a gzipped FileDescriptorProto | |
2724 | 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x59, 0xdd, 0x8e, 0xdb, 0xc6, | |
2725 | 0x15, 0x0e, 0xf5, 0xb7, 0xd2, 0x91, 0x56, 0x3b, 0x3b, 0xbb, 0xb1, 0xe9, 0xcd, 0x8f, 0xd7, 0xca, | |
2726 | 0x8f, 0xd7, 0x4e, 0xac, 0x0d, 0x1c, 0xdb, 0x71, 0xd6, 0x45, 0x5a, 0xad, 0x44, 0x6f, 0xe4, 0xee, | |
2727 | 0x4a, 0x2a, 0xa5, 0x6d, 0x7e, 0x80, 0x82, 0x98, 0x25, 0x47, 0x12, 0x6d, 0x8a, 0x64, 0x48, 0xca, | |
2728 | 0xf6, 0x06, 0xbd, 0x30, 0xd0, 0xab, 0x5e, 0x15, 0xe8, 0x55, 0x51, 0x14, 0xbd, 0xe8, 0x4d, 0x80, | |
2729 | 0x3e, 0x40, 0x81, 0xde, 0xf5, 0x09, 0x0a, 0xe4, 0x0d, 0x8a, 0xb6, 0x40, 0xfb, 0x08, 0xbd, 0x2c, | |
2730 | 0x66, 0x86, 0xa4, 0x48, 0x49, 0x1b, 0x6f, 0x02, 0xc4, 0xb9, 0x92, 0xe6, 0x3b, 0xdf, 0x39, 0x73, | |
2731 | 0xe6, 0xcc, 0x99, 0x99, 0x33, 0x43, 0xd8, 0x1e, 0x39, 0xce, 0xc8, 0xa2, 0xbb, 0xae, 0xe7, 0x04, | |
2732 | 0xce, 0xc9, 0x74, 0xb8, 0x6b, 0x50, 0x5f, 0xf7, 0x4c, 0x37, 0x70, 0xbc, 0x3a, 0xc7, 0xf0, 0x9a, | |
2733 | 0x60, 0xd4, 0x23, 0x46, 0xed, 0x08, 0xd6, 0xef, 0x9b, 0x16, 0x6d, 0xc5, 0xc4, 0x3e, 0x0d, 0xf0, | |
2734 | 0x5d, 0xc8, 0x0d, 0x4d, 0x8b, 0xca, 0xd2, 0x76, 0x76, 0xa7, 0x7c, 0xf3, 0xcd, 0xfa, 0x9c, 0x52, | |
2735 | 0x3d, 0xad, 0xd1, 0x63, 0xb0, 0xca, 0x35, 0x6a, 0xff, 0xce, 0xc1, 0xc6, 0x12, 0x29, 0xc6, 0x90, | |
2736 | 0xb3, 0xc9, 0x84, 0x59, 0x94, 0x76, 0x4a, 0x2a, 0xff, 0x8f, 0x65, 0x58, 0x71, 0x89, 0xfe, 0x88, | |
2737 | 0x8c, 0xa8, 0x9c, 0xe1, 0x70, 0xd4, 0xc4, 0xaf, 0x03, 0x18, 0xd4, 0xa5, 0xb6, 0x41, 0x6d, 0xfd, | |
2738 | 0x54, 0xce, 0x6e, 0x67, 0x77, 0x4a, 0x6a, 0x02, 0xc1, 0xef, 0xc0, 0xba, 0x3b, 0x3d, 0xb1, 0x4c, | |
2739 | 0x5d, 0x4b, 0xd0, 0x60, 0x3b, 0xbb, 0x93, 0x57, 0x91, 0x10, 0xb4, 0x66, 0xe4, 0xab, 0xb0, 0xf6, | |
2740 | 0x84, 0x92, 0x47, 0x49, 0x6a, 0x99, 0x53, 0xab, 0x0c, 0x4e, 0x10, 0x9b, 0x50, 0x99, 0x50, 0xdf, | |
2741 | 0x27, 0x23, 0xaa, 0x05, 0xa7, 0x2e, 0x95, 0x73, 0x7c, 0xf4, 0xdb, 0x0b, 0xa3, 0x9f, 0x1f, 0x79, | |
2742 | 0x39, 0xd4, 0x1a, 0x9c, 0xba, 0x14, 0x37, 0xa0, 0x44, 0xed, 0xe9, 0x44, 0x58, 0xc8, 0x9f, 0x11, | |
2743 | 0x3f, 0xc5, 0x9e, 0x4e, 0xe6, 0xad, 0x14, 0x99, 0x5a, 0x68, 0x62, 0xc5, 0xa7, 0xde, 0x63, 0x53, | |
2744 | 0xa7, 0x72, 0x81, 0x1b, 0xb8, 0xba, 0x60, 0xa0, 0x2f, 0xe4, 0xf3, 0x36, 0x22, 0x3d, 0xdc, 0x84, | |
2745 | 0x12, 0x7d, 0x1a, 0x50, 0xdb, 0x37, 0x1d, 0x5b, 0x5e, 0xe1, 0x46, 0xde, 0x5a, 0x32, 0x8b, 0xd4, | |
2746 | 0x32, 0xe6, 0x4d, 0xcc, 0xf4, 0xf0, 0x1d, 0x58, 0x71, 0xdc, 0xc0, 0x74, 0x6c, 0x5f, 0x2e, 0x6e, | |
2747 | 0x4b, 0x3b, 0xe5, 0x9b, 0xaf, 0x2e, 0x4d, 0x84, 0xae, 0xe0, 0xa8, 0x11, 0x19, 0xb7, 0x01, 0xf9, | |
2748 | 0xce, 0xd4, 0xd3, 0xa9, 0xa6, 0x3b, 0x06, 0xd5, 0x4c, 0x7b, 0xe8, 0xc8, 0x25, 0x6e, 0xe0, 0xf2, | |
2749 | 0xe2, 0x40, 0x38, 0xb1, 0xe9, 0x18, 0xb4, 0x6d, 0x0f, 0x1d, 0xb5, 0xea, 0xa7, 0xda, 0xf8, 0x02, | |
2750 | 0x14, 0xfc, 0x53, 0x3b, 0x20, 0x4f, 0xe5, 0x0a, 0xcf, 0x90, 0xb0, 0x55, 0xfb, 0x6b, 0x01, 0xd6, | |
2751 | 0xce, 0x93, 0x62, 0xf7, 0x20, 0x3f, 0x64, 0xa3, 0x94, 0x33, 0xdf, 0x26, 0x06, 0x42, 0x27, 0x1d, | |
2752 | 0xc4, 0xc2, 0x77, 0x0c, 0x62, 0x03, 0xca, 0x36, 0xf5, 0x03, 0x6a, 0x88, 0x8c, 0xc8, 0x9e, 0x33, | |
2753 | 0xa7, 0x40, 0x28, 0x2d, 0xa6, 0x54, 0xee, 0x3b, 0xa5, 0xd4, 0xa7, 0xb0, 0x16, 0xbb, 0xa4, 0x79, | |
2754 | 0xc4, 0x1e, 0x45, 0xb9, 0xb9, 0xfb, 0x3c, 0x4f, 0xea, 0x4a, 0xa4, 0xa7, 0x32, 0x35, 0xb5, 0x4a, | |
2755 | 0x53, 0x6d, 0xdc, 0x02, 0x70, 0x6c, 0xea, 0x0c, 0x35, 0x83, 0xea, 0x96, 0x5c, 0x3c, 0x23, 0x4a, | |
2756 | 0x5d, 0x46, 0x59, 0x88, 0x92, 0x23, 0x50, 0xdd, 0xc2, 0x1f, 0xce, 0x52, 0x6d, 0xe5, 0x8c, 0x4c, | |
2757 | 0x39, 0x12, 0x8b, 0x6c, 0x21, 0xdb, 0x8e, 0xa1, 0xea, 0x51, 0x96, 0xf7, 0xd4, 0x08, 0x47, 0x56, | |
2758 | 0xe2, 0x4e, 0xd4, 0x9f, 0x3b, 0x32, 0x35, 0x54, 0x13, 0x03, 0x5b, 0xf5, 0x92, 0x4d, 0xfc, 0x06, | |
2759 | 0xc4, 0x80, 0xc6, 0xd3, 0x0a, 0xf8, 0x2e, 0x54, 0x89, 0xc0, 0x0e, 0x99, 0xd0, 0xad, 0x2f, 0xa1, | |
2760 | 0x9a, 0x0e, 0x0f, 0xde, 0x84, 0xbc, 0x1f, 0x10, 0x2f, 0xe0, 0x59, 0x98, 0x57, 0x45, 0x03, 0x23, | |
2761 | 0xc8, 0x52, 0xdb, 0xe0, 0xbb, 0x5c, 0x5e, 0x65, 0x7f, 0xf1, 0x4f, 0x66, 0x03, 0xce, 0xf2, 0x01, | |
2762 | 0xbf, 0xbd, 0x38, 0xa3, 0x29, 0xcb, 0xf3, 0xe3, 0xde, 0xfa, 0x00, 0x56, 0x53, 0x03, 0x38, 0x6f, | |
2763 | 0xd7, 0xb5, 0x5f, 0xc2, 0xcb, 0x4b, 0x4d, 0xe3, 0x4f, 0x61, 0x73, 0x6a, 0x9b, 0x76, 0x40, 0x3d, | |
2764 | 0xd7, 0xa3, 0x2c, 0x63, 0x45, 0x57, 0xf2, 0x7f, 0x56, 0xce, 0xc8, 0xb9, 0xe3, 0x24, 0x5b, 0x58, | |
2765 | 0x51, 0x37, 0xa6, 0x8b, 0xe0, 0xf5, 0x52, 0xf1, 0xbf, 0x2b, 0xe8, 0xd9, 0xb3, 0x67, 0xcf, 0x32, | |
2766 | 0xb5, 0xdf, 0x15, 0x60, 0x73, 0xd9, 0x9a, 0x59, 0xba, 0x7c, 0x2f, 0x40, 0xc1, 0x9e, 0x4e, 0x4e, | |
2767 | 0xa8, 0xc7, 0x83, 0x94, 0x57, 0xc3, 0x16, 0x6e, 0x40, 0xde, 0x22, 0x27, 0xd4, 0x92, 0x73, 0xdb, | |
2768 | 0xd2, 0x4e, 0xf5, 0xe6, 0x3b, 0xe7, 0x5a, 0x95, 0xf5, 0x43, 0xa6, 0xa2, 0x0a, 0x4d, 0xfc, 0x11, | |
2769 | 0xe4, 0xc2, 0x2d, 0x9a, 0x59, 0xb8, 0x7e, 0x3e, 0x0b, 0x6c, 0x2d, 0xa9, 0x5c, 0x0f, 0xbf, 0x02, | |
2770 | 0x25, 0xf6, 0x2b, 0x72, 0xa3, 0xc0, 0x7d, 0x2e, 0x32, 0x80, 0xe5, 0x05, 0xde, 0x82, 0x22, 0x5f, | |
2771 | 0x26, 0x06, 0x8d, 0x8e, 0xb6, 0xb8, 0xcd, 0x12, 0xcb, 0xa0, 0x43, 0x32, 0xb5, 0x02, 0xed, 0x31, | |
2772 | 0xb1, 0xa6, 0x94, 0x27, 0x7c, 0x49, 0xad, 0x84, 0xe0, 0xcf, 0x19, 0x86, 0x2f, 0x43, 0x59, 0xac, | |
2773 | 0x2a, 0xd3, 0x36, 0xe8, 0x53, 0xbe, 0x7b, 0xe6, 0x55, 0xb1, 0xd0, 0xda, 0x0c, 0x61, 0xdd, 0x3f, | |
2774 | 0xf4, 0x1d, 0x3b, 0x4a, 0x4d, 0xde, 0x05, 0x03, 0x78, 0xf7, 0x1f, 0xcc, 0x6f, 0xdc, 0xaf, 0x2d, | |
2775 | 0x1f, 0xde, 0x7c, 0x4e, 0xd5, 0xfe, 0x92, 0x81, 0x1c, 0xdf, 0x2f, 0xd6, 0xa0, 0x3c, 0xf8, 0xac, | |
2776 | 0xa7, 0x68, 0xad, 0xee, 0xf1, 0xfe, 0xa1, 0x82, 0x24, 0x5c, 0x05, 0xe0, 0xc0, 0xfd, 0xc3, 0x6e, | |
2777 | 0x63, 0x80, 0x32, 0x71, 0xbb, 0xdd, 0x19, 0xdc, 0xb9, 0x85, 0xb2, 0xb1, 0xc2, 0xb1, 0x00, 0x72, | |
2778 | 0x49, 0xc2, 0xfb, 0x37, 0x51, 0x1e, 0x23, 0xa8, 0x08, 0x03, 0xed, 0x4f, 0x95, 0xd6, 0x9d, 0x5b, | |
2779 | 0xa8, 0x90, 0x46, 0xde, 0xbf, 0x89, 0x56, 0xf0, 0x2a, 0x94, 0x38, 0xb2, 0xdf, 0xed, 0x1e, 0xa2, | |
2780 | 0x62, 0x6c, 0xb3, 0x3f, 0x50, 0xdb, 0x9d, 0x03, 0x54, 0x8a, 0x6d, 0x1e, 0xa8, 0xdd, 0xe3, 0x1e, | |
2781 | 0x82, 0xd8, 0xc2, 0x91, 0xd2, 0xef, 0x37, 0x0e, 0x14, 0x54, 0x8e, 0x19, 0xfb, 0x9f, 0x0d, 0x94, | |
2782 | 0x3e, 0xaa, 0xa4, 0xdc, 0x7a, 0xff, 0x26, 0x5a, 0x8d, 0xbb, 0x50, 0x3a, 0xc7, 0x47, 0xa8, 0x8a, | |
2783 | 0xd7, 0x61, 0x55, 0x74, 0x11, 0x39, 0xb1, 0x36, 0x07, 0xdd, 0xb9, 0x85, 0xd0, 0xcc, 0x11, 0x61, | |
2784 | 0x65, 0x3d, 0x05, 0xdc, 0xb9, 0x85, 0x70, 0xad, 0x09, 0x79, 0x9e, 0x5d, 0x18, 0x43, 0xf5, 0xb0, | |
2785 | 0xb1, 0xaf, 0x1c, 0x6a, 0xdd, 0xde, 0xa0, 0xdd, 0xed, 0x34, 0x0e, 0x91, 0x34, 0xc3, 0x54, 0xe5, | |
2786 | 0x67, 0xc7, 0x6d, 0x55, 0x69, 0xa1, 0x4c, 0x12, 0xeb, 0x29, 0x8d, 0x81, 0xd2, 0x42, 0xd9, 0x9a, | |
2787 | 0x0e, 0x9b, 0xcb, 0xf6, 0xc9, 0xa5, 0x2b, 0x23, 0x31, 0xc5, 0x99, 0x33, 0xa6, 0x98, 0xdb, 0x5a, | |
2788 | 0x98, 0xe2, 0x7f, 0x65, 0x60, 0x63, 0xc9, 0x59, 0xb1, 0xb4, 0x93, 0x1f, 0x43, 0x5e, 0xa4, 0xa8, | |
2789 | 0x38, 0x3d, 0xaf, 0x2d, 0x3d, 0x74, 0x78, 0xc2, 0x2e, 0x9c, 0xa0, 0x5c, 0x2f, 0x59, 0x41, 0x64, | |
2790 | 0xcf, 0xa8, 0x20, 0x98, 0x89, 0x85, 0x3d, 0xfd, 0x17, 0x0b, 0x7b, 0xba, 0x38, 0xf6, 0xee, 0x9c, | |
2791 | 0xe7, 0xd8, 0xe3, 0xd8, 0xb7, 0xdb, 0xdb, 0xf3, 0x4b, 0xf6, 0xf6, 0x7b, 0xb0, 0xbe, 0x60, 0xe8, | |
2792 | 0xdc, 0x7b, 0xec, 0xaf, 0x24, 0x90, 0xcf, 0x0a, 0xce, 0x73, 0x76, 0xba, 0x4c, 0x6a, 0xa7, 0xbb, | |
2793 | 0x37, 0x1f, 0xc1, 0x2b, 0x67, 0x4f, 0xc2, 0xc2, 0x5c, 0x7f, 0x25, 0xc1, 0x85, 0xe5, 0x95, 0xe2, | |
2794 | 0x52, 0x1f, 0x3e, 0x82, 0xc2, 0x84, 0x06, 0x63, 0x27, 0xaa, 0x96, 0xde, 0x5e, 0x72, 0x06, 0x33, | |
2795 | 0xf1, 0xfc, 0x64, 0x87, 0x5a, 0xc9, 0x43, 0x3c, 0x7b, 0x56, 0xb9, 0x27, 0xbc, 0x59, 0xf0, 0xf4, | |
2796 | 0xd7, 0x19, 0x78, 0x79, 0xa9, 0xf1, 0xa5, 0x8e, 0xbe, 0x06, 0x60, 0xda, 0xee, 0x34, 0x10, 0x15, | |
2797 | 0x91, 0xd8, 0x60, 0x4b, 0x1c, 0xe1, 0x9b, 0x17, 0xdb, 0x3c, 0xa7, 0x41, 0x2c, 0xcf, 0x72, 0x39, | |
2798 | 0x08, 0x88, 0x13, 0xee, 0xce, 0x1c, 0xcd, 0x71, 0x47, 0x5f, 0x3f, 0x63, 0xa4, 0x0b, 0x89, 0xf9, | |
2799 | 0x1e, 0x20, 0xdd, 0x32, 0xa9, 0x1d, 0x68, 0x7e, 0xe0, 0x51, 0x32, 0x31, 0xed, 0x11, 0x3f, 0x41, | |
2800 | 0x8a, 0x7b, 0xf9, 0x21, 0xb1, 0x7c, 0xaa, 0xae, 0x09, 0x71, 0x3f, 0x92, 0x32, 0x0d, 0x9e, 0x40, | |
2801 | 0x5e, 0x42, 0xa3, 0x90, 0xd2, 0x10, 0xe2, 0x58, 0xa3, 0xf6, 0xdb, 0x12, 0x94, 0x13, 0x75, 0x35, | |
2802 | 0xbe, 0x02, 0x95, 0x87, 0xe4, 0x31, 0xd1, 0xa2, 0xbb, 0x92, 0x88, 0x44, 0x99, 0x61, 0xbd, 0xf0, | |
2803 | 0xbe, 0xf4, 0x1e, 0x6c, 0x72, 0x8a, 0x33, 0x0d, 0xa8, 0xa7, 0xe9, 0x16, 0xf1, 0x7d, 0x1e, 0xb4, | |
2804 | 0x22, 0xa7, 0x62, 0x26, 0xeb, 0x32, 0x51, 0x33, 0x92, 0xe0, 0xdb, 0xb0, 0xc1, 0x35, 0x26, 0x53, | |
2805 | 0x2b, 0x30, 0x5d, 0x8b, 0x6a, 0xec, 0xf6, 0xe6, 0xf3, 0x93, 0x24, 0xf6, 0x6c, 0x9d, 0x31, 0x8e, | |
2806 | 0x42, 0x02, 0xf3, 0xc8, 0xc7, 0x2d, 0x78, 0x8d, 0xab, 0x8d, 0xa8, 0x4d, 0x3d, 0x12, 0x50, 0x8d, | |
2807 | 0x7e, 0x31, 0x25, 0x96, 0xaf, 0x11, 0xdb, 0xd0, 0xc6, 0xc4, 0x1f, 0xcb, 0x9b, 0xcc, 0xc0, 0x7e, | |
2808 | 0x46, 0x96, 0xd4, 0x4b, 0x8c, 0x78, 0x10, 0xf2, 0x14, 0x4e, 0x6b, 0xd8, 0xc6, 0xc7, 0xc4, 0x1f, | |
2809 | 0xe3, 0x3d, 0xb8, 0xc0, 0xad, 0xf8, 0x81, 0x67, 0xda, 0x23, 0x4d, 0x1f, 0x53, 0xfd, 0x91, 0x36, | |
2810 | 0x0d, 0x86, 0x77, 0xe5, 0x57, 0x92, 0xfd, 0x73, 0x0f, 0xfb, 0x9c, 0xd3, 0x64, 0x94, 0xe3, 0x60, | |
2811 | 0x78, 0x17, 0xf7, 0xa1, 0xc2, 0x26, 0x63, 0x62, 0x7e, 0x49, 0xb5, 0xa1, 0xe3, 0xf1, 0xa3, 0xb1, | |
2812 | 0xba, 0x64, 0x6b, 0x4a, 0x44, 0xb0, 0xde, 0x0d, 0x15, 0x8e, 0x1c, 0x83, 0xee, 0xe5, 0xfb, 0x3d, | |
2813 | 0x45, 0x69, 0xa9, 0xe5, 0xc8, 0xca, 0x7d, 0xc7, 0x63, 0x09, 0x35, 0x72, 0xe2, 0x00, 0x97, 0x45, | |
2814 | 0x42, 0x8d, 0x9c, 0x28, 0xbc, 0xb7, 0x61, 0x43, 0xd7, 0xc5, 0x98, 0x4d, 0x5d, 0x0b, 0xef, 0x58, | |
2815 | 0xbe, 0x8c, 0x52, 0xc1, 0xd2, 0xf5, 0x03, 0x41, 0x08, 0x73, 0xdc, 0xc7, 0x1f, 0xc2, 0xcb, 0xb3, | |
2816 | 0x60, 0x25, 0x15, 0xd7, 0x17, 0x46, 0x39, 0xaf, 0x7a, 0x1b, 0x36, 0xdc, 0xd3, 0x45, 0x45, 0x9c, | |
2817 | 0xea, 0xd1, 0x3d, 0x9d, 0x57, 0xfb, 0x00, 0x36, 0xdd, 0xb1, 0xbb, 0xa8, 0x77, 0x3d, 0xa9, 0x87, | |
2818 | 0xdd, 0xb1, 0x3b, 0xaf, 0xf8, 0x16, 0xbf, 0x70, 0x7b, 0x54, 0x27, 0x01, 0x35, 0xe4, 0x8b, 0x49, | |
2819 | 0x7a, 0x42, 0x80, 0x77, 0x01, 0xe9, 0xba, 0x46, 0x6d, 0x72, 0x62, 0x51, 0x8d, 0x78, 0xd4, 0x26, | |
2820 | 0xbe, 0x7c, 0x39, 0x49, 0xae, 0xea, 0xba, 0xc2, 0xa5, 0x0d, 0x2e, 0xc4, 0xd7, 0x61, 0xdd, 0x39, | |
2821 | 0x79, 0xa8, 0x8b, 0x94, 0xd4, 0x5c, 0x8f, 0x0e, 0xcd, 0xa7, 0xf2, 0x9b, 0x3c, 0xbe, 0x6b, 0x4c, | |
2822 | 0xc0, 0x13, 0xb2, 0xc7, 0x61, 0x7c, 0x0d, 0x90, 0xee, 0x8f, 0x89, 0xe7, 0xf2, 0x3d, 0xd9, 0x77, | |
2823 | 0x89, 0x4e, 0xe5, 0xb7, 0x04, 0x55, 0xe0, 0x9d, 0x08, 0x66, 0x4b, 0xc2, 0x7f, 0x62, 0x0e, 0x83, | |
2824 | 0xc8, 0xe2, 0x55, 0xb1, 0x24, 0x38, 0x16, 0x5a, 0xdb, 0x01, 0xc4, 0x42, 0x91, 0xea, 0x78, 0x87, | |
2825 | 0xd3, 0xaa, 0xee, 0xd8, 0x4d, 0xf6, 0xfb, 0x06, 0xac, 0x32, 0xe6, 0xac, 0xd3, 0x6b, 0xa2, 0x20, | |
2826 | 0x73, 0xc7, 0x89, 0x1e, 0x6f, 0xc1, 0x05, 0x46, 0x9a, 0xd0, 0x80, 0x18, 0x24, 0x20, 0x09, 0xf6, | |
2827 | 0xbb, 0x9c, 0xcd, 0xe2, 0x7e, 0x14, 0x0a, 0x53, 0x7e, 0x7a, 0xd3, 0x93, 0xd3, 0x38, 0xb3, 0x6e, | |
2828 | 0x08, 0x3f, 0x19, 0x16, 0xe5, 0xd6, 0xf7, 0x56, 0x74, 0xd7, 0xf6, 0xa0, 0x92, 0x4c, 0x7c, 0x5c, | |
2829 | 0x02, 0x91, 0xfa, 0x48, 0x62, 0x55, 0x50, 0xb3, 0xdb, 0x62, 0xf5, 0xcb, 0xe7, 0x0a, 0xca, 0xb0, | |
2830 | 0x3a, 0xea, 0xb0, 0x3d, 0x50, 0x34, 0xf5, 0xb8, 0x33, 0x68, 0x1f, 0x29, 0x28, 0x9b, 0x28, 0xd8, | |
2831 | 0x1f, 0xe4, 0x8a, 0x6f, 0xa3, 0xab, 0xb5, 0xaf, 0x33, 0x50, 0x4d, 0xdf, 0xc0, 0xf0, 0x8f, 0xe0, | |
2832 | 0x62, 0xf4, 0x5c, 0xe2, 0xd3, 0x40, 0x7b, 0x62, 0x7a, 0x7c, 0x45, 0x4e, 0x88, 0x38, 0x1d, 0xe3, | |
2833 | 0x9c, 0xd8, 0x0c, 0x59, 0x7d, 0x1a, 0x7c, 0x62, 0x7a, 0x6c, 0xbd, 0x4d, 0x48, 0x80, 0x0f, 0xe1, | |
2834 | 0xb2, 0xed, 0x68, 0x7e, 0x40, 0x6c, 0x83, 0x78, 0x86, 0x36, 0x7b, 0xa8, 0xd2, 0x88, 0xae, 0x53, | |
2835 | 0xdf, 0x77, 0xc4, 0x49, 0x18, 0x5b, 0x79, 0xd5, 0x76, 0xfa, 0x21, 0x79, 0x76, 0x44, 0x34, 0x42, | |
2836 | 0xea, 0x5c, 0xfe, 0x66, 0xcf, 0xca, 0xdf, 0x57, 0xa0, 0x34, 0x21, 0xae, 0x46, 0xed, 0xc0, 0x3b, | |
2837 | 0xe5, 0x75, 0x77, 0x51, 0x2d, 0x4e, 0x88, 0xab, 0xb0, 0xf6, 0x0b, 0xb9, 0xfe, 0x3c, 0xc8, 0x15, | |
2838 | 0x8b, 0xa8, 0xf4, 0x20, 0x57, 0x2c, 0x21, 0xa8, 0xfd, 0x33, 0x0b, 0x95, 0x64, 0x1d, 0xce, 0xae, | |
2839 | 0x35, 0x3a, 0x3f, 0xb2, 0x24, 0xbe, 0xa9, 0xbd, 0xf1, 0x8d, 0x55, 0x7b, 0xbd, 0xc9, 0xce, 0xb2, | |
2840 | 0xbd, 0x82, 0xa8, 0x8e, 0x55, 0xa1, 0xc9, 0xea, 0x08, 0x96, 0x6c, 0x54, 0x54, 0x23, 0x45, 0x35, | |
2841 | 0x6c, 0xe1, 0x03, 0x28, 0x3c, 0xf4, 0xb9, 0xed, 0x02, 0xb7, 0xfd, 0xe6, 0x37, 0xdb, 0x7e, 0xd0, | |
2842 | 0xe7, 0xc6, 0x4b, 0x0f, 0xfa, 0x5a, 0xa7, 0xab, 0x1e, 0x35, 0x0e, 0xd5, 0x50, 0x1d, 0x5f, 0x82, | |
2843 | 0x9c, 0x45, 0xbe, 0x3c, 0x4d, 0x9f, 0x7a, 0x1c, 0x3a, 0xef, 0x24, 0x5c, 0x82, 0xdc, 0x13, 0x4a, | |
2844 | 0x1e, 0xa5, 0xcf, 0x1a, 0x0e, 0x7d, 0x8f, 0x8b, 0x61, 0x17, 0xf2, 0x3c, 0x5e, 0x18, 0x20, 0x8c, | |
2845 | 0x18, 0x7a, 0x09, 0x17, 0x21, 0xd7, 0xec, 0xaa, 0x6c, 0x41, 0x20, 0xa8, 0x08, 0x54, 0xeb, 0xb5, | |
2846 | 0x95, 0xa6, 0x82, 0x32, 0xb5, 0xdb, 0x50, 0x10, 0x41, 0x60, 0x8b, 0x25, 0x0e, 0x03, 0x7a, 0x29, | |
2847 | 0x6c, 0x86, 0x36, 0xa4, 0x48, 0x7a, 0x7c, 0xb4, 0xaf, 0xa8, 0x28, 0x93, 0x9e, 0xea, 0x1c, 0xca, | |
2848 | 0xd7, 0x7c, 0xa8, 0x24, 0x0b, 0xf1, 0x17, 0x73, 0xc9, 0xfe, 0x9b, 0x04, 0xe5, 0x44, 0x61, 0xcd, | |
2849 | 0x2a, 0x22, 0x62, 0x59, 0xce, 0x13, 0x8d, 0x58, 0x26, 0xf1, 0xc3, 0xd4, 0x00, 0x0e, 0x35, 0x18, | |
2850 | 0x72, 0xde, 0xa9, 0x7b, 0x41, 0x4b, 0x24, 0x8f, 0x0a, 0xb5, 0x3f, 0x4a, 0x80, 0xe6, 0x2b, 0xdb, | |
2851 | 0x39, 0x37, 0xa5, 0x1f, 0xd2, 0xcd, 0xda, 0x1f, 0x24, 0xa8, 0xa6, 0xcb, 0xd9, 0x39, 0xf7, 0xae, | |
2852 | 0xfc, 0xa0, 0xee, 0xfd, 0x23, 0x03, 0xab, 0xa9, 0x22, 0xf6, 0xbc, 0xde, 0x7d, 0x01, 0xeb, 0xa6, | |
2853 | 0x41, 0x27, 0xae, 0x13, 0x50, 0x5b, 0x3f, 0xd5, 0x2c, 0xfa, 0x98, 0x5a, 0x72, 0x8d, 0x6f, 0x1a, | |
2854 | 0xbb, 0xdf, 0x5c, 0x26, 0xd7, 0xdb, 0x33, 0xbd, 0x43, 0xa6, 0xb6, 0xb7, 0xd1, 0x6e, 0x29, 0x47, | |
2855 | 0xbd, 0xee, 0x40, 0xe9, 0x34, 0x3f, 0xd3, 0x8e, 0x3b, 0x3f, 0xed, 0x74, 0x3f, 0xe9, 0xa8, 0xc8, | |
2856 | 0x9c, 0xa3, 0x7d, 0x8f, 0xcb, 0xbe, 0x07, 0x68, 0xde, 0x29, 0x7c, 0x11, 0x96, 0xb9, 0x85, 0x5e, | |
2857 | 0xc2, 0x1b, 0xb0, 0xd6, 0xe9, 0x6a, 0xfd, 0x76, 0x4b, 0xd1, 0x94, 0xfb, 0xf7, 0x95, 0xe6, 0xa0, | |
2858 | 0x2f, 0x1e, 0x3e, 0x62, 0xf6, 0x20, 0xb5, 0xc0, 0x6b, 0xbf, 0xcf, 0xc2, 0xc6, 0x12, 0x4f, 0x70, | |
2859 | 0x23, 0xbc, 0xb2, 0x88, 0x5b, 0xd4, 0x8d, 0xf3, 0x78, 0x5f, 0x67, 0x35, 0x43, 0x8f, 0x78, 0x41, | |
2860 | 0x78, 0xc3, 0xb9, 0x06, 0x2c, 0x4a, 0x76, 0x60, 0x0e, 0x4d, 0xea, 0x85, 0xef, 0x44, 0xe2, 0x1e, | |
2861 | 0xb3, 0x36, 0xc3, 0xc5, 0x53, 0xd1, 0xbb, 0x80, 0x5d, 0xc7, 0x37, 0x03, 0xf3, 0x31, 0xd5, 0x4c, | |
2862 | 0x3b, 0x7a, 0x54, 0x62, 0xf7, 0x9a, 0x9c, 0x8a, 0x22, 0x49, 0xdb, 0x0e, 0x62, 0xb6, 0x4d, 0x47, | |
2863 | 0x64, 0x8e, 0xcd, 0x36, 0xf3, 0xac, 0x8a, 0x22, 0x49, 0xcc, 0xbe, 0x02, 0x15, 0xc3, 0x99, 0xb2, | |
2864 | 0x62, 0x4f, 0xf0, 0xd8, 0xd9, 0x21, 0xa9, 0x65, 0x81, 0xc5, 0x94, 0xb0, 0x8c, 0x9f, 0xbd, 0x66, | |
2865 | 0x55, 0xd4, 0xb2, 0xc0, 0x04, 0xe5, 0x2a, 0xac, 0x91, 0xd1, 0xc8, 0x63, 0xc6, 0x23, 0x43, 0xe2, | |
2866 | 0x62, 0x52, 0x8d, 0x61, 0x4e, 0xdc, 0x7a, 0x00, 0xc5, 0x28, 0x0e, 0xec, 0xa8, 0x66, 0x91, 0xd0, | |
2867 | 0x5c, 0x71, 0xdb, 0xce, 0xec, 0x94, 0xd4, 0xa2, 0x1d, 0x09, 0xaf, 0x40, 0xc5, 0xf4, 0xb5, 0xd9, | |
2868 | 0xe3, 0x7c, 0x66, 0x3b, 0xb3, 0x53, 0x54, 0xcb, 0xa6, 0x1f, 0x3f, 0x6c, 0xd6, 0xbe, 0xca, 0x40, | |
2869 | 0x35, 0xfd, 0x71, 0x01, 0xb7, 0xa0, 0x68, 0x39, 0x3a, 0xe1, 0xa9, 0x25, 0xbe, 0x6c, 0xed, 0x3c, | |
2870 | 0xe7, 0x7b, 0x44, 0xfd, 0x30, 0xe4, 0xab, 0xb1, 0xe6, 0xd6, 0xdf, 0x25, 0x28, 0x46, 0x30, 0xbe, | |
2871 | 0x00, 0x39, 0x97, 0x04, 0x63, 0x6e, 0x2e, 0xbf, 0x9f, 0x41, 0x92, 0xca, 0xdb, 0x0c, 0xf7, 0x5d, | |
2872 | 0x62, 0xf3, 0x14, 0x08, 0x71, 0xd6, 0x66, 0xf3, 0x6a, 0x51, 0x62, 0xf0, 0x5b, 0x8f, 0x33, 0x99, | |
2873 | 0x50, 0x3b, 0xf0, 0xa3, 0x79, 0x0d, 0xf1, 0x66, 0x08, 0xe3, 0x77, 0x60, 0x3d, 0xf0, 0x88, 0x69, | |
2874 | 0xa5, 0xb8, 0x39, 0xce, 0x45, 0x91, 0x20, 0x26, 0xef, 0xc1, 0xa5, 0xc8, 0xae, 0x41, 0x03, 0xa2, | |
2875 | 0x8f, 0xa9, 0x31, 0x53, 0x2a, 0xf0, 0xd7, 0x8d, 0x8b, 0x21, 0xa1, 0x15, 0xca, 0x23, 0xdd, 0xda, | |
2876 | 0xd7, 0x12, 0xac, 0x47, 0xf7, 0x34, 0x23, 0x0e, 0xd6, 0x11, 0x00, 0xb1, 0x6d, 0x27, 0x48, 0x86, | |
2877 | 0x6b, 0x31, 0x95, 0x17, 0xf4, 0xea, 0x8d, 0x58, 0x49, 0x4d, 0x18, 0xd8, 0x9a, 0x00, 0xcc, 0x24, | |
2878 | 0x67, 0x86, 0xed, 0x32, 0x94, 0xc3, 0x2f, 0x47, 0xfc, 0xf3, 0xa3, 0xb8, 0xd9, 0x83, 0x80, 0xd8, | |
2879 | 0x85, 0x0e, 0x6f, 0x42, 0xfe, 0x84, 0x8e, 0x4c, 0x3b, 0x7c, 0x0f, 0x16, 0x8d, 0xe8, 0xfd, 0x25, | |
2880 | 0x17, 0xbf, 0xbf, 0xec, 0xff, 0x46, 0x82, 0x0d, 0xdd, 0x99, 0xcc, 0xfb, 0xbb, 0x8f, 0xe6, 0x9e, | |
2881 | 0x17, 0xfc, 0x8f, 0xa5, 0xcf, 0x3f, 0x1a, 0x99, 0xc1, 0x78, 0x7a, 0x52, 0xd7, 0x9d, 0xc9, 0xee, | |
2882 | 0xc8, 0xb1, 0x88, 0x3d, 0x9a, 0x7d, 0x3f, 0xe5, 0x7f, 0xf4, 0x1b, 0x23, 0x6a, 0xdf, 0x18, 0x39, | |
2883 | 0x89, 0xaf, 0xa9, 0xf7, 0x66, 0x7f, 0xff, 0x27, 0x49, 0x7f, 0xca, 0x64, 0x0f, 0x7a, 0xfb, 0x7f, | |
2884 | 0xce, 0x6c, 0x1d, 0x88, 0xee, 0x7a, 0x51, 0x78, 0x54, 0x3a, 0xb4, 0xa8, 0xce, 0x86, 0xfc, 0xff, | |
2885 | 0x00, 0x00, 0x00, 0xff, 0xff, 0x3e, 0xe8, 0xef, 0xc4, 0x9b, 0x1d, 0x00, 0x00, | |
2886 | } |
416 | 416 | // determining the namespace. |
417 | 417 | optional string php_namespace = 41; |
418 | 418 | |
419 | ||
420 | // Use this option to change the namespace of php generated metadata classes. | |
421 | // Default is empty. When this option is empty, the proto file name will be used | |
422 | // for determining the namespace. | |
423 | optional string php_metadata_namespace = 44; | |
424 | ||
425 | // Use this option to change the package of ruby generated classes. Default | |
426 | // is empty. When this option is not set, the package name will be used for | |
427 | // determining the ruby package. | |
428 | optional string ruby_package = 45; | |
429 | ||
419 | 430 | // The parser stores options it doesn't recognize here. |
420 | 431 | // See the documentation for the "Options" section above. |
421 | 432 | repeated UninterpretedOption uninterpreted_option = 999; |
42 | 42 | "crypto/sha256" |
43 | 43 | "encoding/hex" |
44 | 44 | "fmt" |
45 | "go/ast" | |
45 | 46 | "go/build" |
46 | 47 | "go/parser" |
47 | 48 | "go/printer" |
66 | 67 | // It is incremented whenever an incompatibility between the generated code and |
67 | 68 | // proto package is introduced; the generated code references |
68 | 69 | // a constant, proto.ProtoPackageIsVersionN (where N is generatedCodeVersion). |
69 | const generatedCodeVersion = 2 | |
70 | const generatedCodeVersion = 3 | |
70 | 71 | |
71 | 72 | // A Plugin provides functionality to add to the output during Go code generation, |
72 | 73 | // such as to produce RPC stubs. |
270 | 271 | // This is used for supporting public imports. |
271 | 272 | exported map[Object][]symbol |
272 | 273 | |
273 | fingerprint string // Fingerprint of this file's contents. | |
274 | 274 | importPath GoImportPath // Import path of this file's package. |
275 | 275 | packageName GoPackageName // Name of this file's Go package. |
276 | 276 | |
281 | 281 | // to the compressed bytes of this descriptor. It is not exported, so |
282 | 282 | // it is only valid inside the generated package. |
283 | 283 | func (d *FileDescriptor) VarName() string { |
284 | name := strings.Map(badToUnderscore, baseName(d.GetName())) | |
285 | return fmt.Sprintf("fileDescriptor_%s_%s", name, d.fingerprint) | |
284 | h := sha256.Sum256([]byte(d.GetName())) | |
285 | return fmt.Sprintf("fileDescriptor_%s", hex.EncodeToString(h[:8])) | |
286 | 286 | } |
287 | 287 | |
288 | 288 | // goPackageOption interprets the file's go_package option. |
339 | 339 | type symbol interface { |
340 | 340 | // GenerateAlias should generate an appropriate alias |
341 | 341 | // for the symbol from the named package. |
342 | GenerateAlias(g *Generator, pkg GoPackageName) | |
342 | GenerateAlias(g *Generator, filename string, pkg GoPackageName) | |
343 | 343 | } |
344 | 344 | |
345 | 345 | type messageSymbol struct { |
355 | 355 | genType bool // whether typ contains a generated type (message/group/enum) |
356 | 356 | } |
357 | 357 | |
358 | func (ms *messageSymbol) GenerateAlias(g *Generator, pkg GoPackageName) { | |
358 | func (ms *messageSymbol) GenerateAlias(g *Generator, filename string, pkg GoPackageName) { | |
359 | g.P("// ", ms.sym, " from public import ", filename) | |
359 | 360 | g.P("type ", ms.sym, " = ", pkg, ".", ms.sym) |
360 | 361 | for _, name := range ms.oneofTypes { |
361 | 362 | g.P("type ", name, " = ", pkg, ".", name) |
367 | 368 | proto3 bool // Whether this came from a proto3 file. |
368 | 369 | } |
369 | 370 | |
370 | func (es enumSymbol) GenerateAlias(g *Generator, pkg GoPackageName) { | |
371 | func (es enumSymbol) GenerateAlias(g *Generator, filename string, pkg GoPackageName) { | |
371 | 372 | s := es.name |
373 | g.P("// ", s, " from public import ", filename) | |
372 | 374 | g.P("type ", s, " = ", pkg, ".", s) |
373 | 375 | g.P("var ", s, "_name = ", pkg, ".", s, "_name") |
374 | 376 | g.P("var ", s, "_value = ", pkg, ".", s, "_value") |
380 | 382 | cast string // if non-empty, a type cast is required (used for enums) |
381 | 383 | } |
382 | 384 | |
383 | func (cs constOrVarSymbol) GenerateAlias(g *Generator, pkg GoPackageName) { | |
385 | func (cs constOrVarSymbol) GenerateAlias(g *Generator, filename string, pkg GoPackageName) { | |
384 | 386 | v := string(pkg) + "." + cs.sym |
385 | 387 | if cs.cast != "" { |
386 | 388 | v = cs.cast + "(" + v + ")" |
417 | 419 | packageNames map[GoImportPath]GoPackageName // Imported package names in the current file. |
418 | 420 | usedPackages map[GoImportPath]bool // Packages used in current file. |
419 | 421 | usedPackageNames map[GoPackageName]bool // Package names used in the current file. |
422 | addedImports map[GoImportPath]bool // Additional imports to emit. | |
420 | 423 | typeNameToObject map[string]Object // Key is a fully-qualified name in input syntax. |
421 | 424 | init []string // Lines to emit in the init function. |
422 | 425 | indent string |
531 | 534 | return name |
532 | 535 | } |
533 | 536 | name := cleanPackageName(baseName(string(importPath))) |
534 | for i, orig := 1, name; g.usedPackageNames[name]; i++ { | |
537 | for i, orig := 1, name; g.usedPackageNames[name] || isGoPredeclaredIdentifier[string(name)]; i++ { | |
535 | 538 | name = orig + GoPackageName(strconv.Itoa(i)) |
536 | 539 | } |
537 | 540 | g.packageNames[importPath] = name |
538 | 541 | g.usedPackageNames[name] = true |
539 | 542 | return name |
543 | } | |
544 | ||
545 | // AddImport adds a package to the generated file's import section. | |
546 | // It returns the name used for the package. | |
547 | func (g *Generator) AddImport(importPath GoImportPath) GoPackageName { | |
548 | g.addedImports[importPath] = true | |
549 | return g.GoPackageName(importPath) | |
540 | 550 | } |
541 | 551 | |
542 | 552 | var globalPackageNames = map[GoPackageName]bool{ |
584 | 594 | "var": true, |
585 | 595 | } |
586 | 596 | |
597 | var isGoPredeclaredIdentifier = map[string]bool{ | |
598 | "append": true, | |
599 | "bool": true, | |
600 | "byte": true, | |
601 | "cap": true, | |
602 | "close": true, | |
603 | "complex": true, | |
604 | "complex128": true, | |
605 | "complex64": true, | |
606 | "copy": true, | |
607 | "delete": true, | |
608 | "error": true, | |
609 | "false": true, | |
610 | "float32": true, | |
611 | "float64": true, | |
612 | "imag": true, | |
613 | "int": true, | |
614 | "int16": true, | |
615 | "int32": true, | |
616 | "int64": true, | |
617 | "int8": true, | |
618 | "iota": true, | |
619 | "len": true, | |
620 | "make": true, | |
621 | "new": true, | |
622 | "nil": true, | |
623 | "panic": true, | |
624 | "print": true, | |
625 | "println": true, | |
626 | "real": true, | |
627 | "recover": true, | |
628 | "rune": true, | |
629 | "string": true, | |
630 | "true": true, | |
631 | "uint": true, | |
632 | "uint16": true, | |
633 | "uint32": true, | |
634 | "uint64": true, | |
635 | "uint8": true, | |
636 | "uintptr": true, | |
637 | } | |
638 | ||
587 | 639 | func cleanPackageName(name string) GoPackageName { |
588 | 640 | name = strings.Map(badToUnderscore, name) |
589 | // Identifier must not be keyword: insert _. | |
641 | // Identifier must not be keyword or predeclared identifier: insert _. | |
590 | 642 | if isGoKeyword[name] { |
591 | 643 | name = "_" + name |
592 | 644 | } |
723 | 775 | if fd == nil { |
724 | 776 | g.Fail("could not find file named", fileName) |
725 | 777 | } |
726 | fingerprint, err := fingerprintProto(fd.FileDescriptorProto) | |
727 | if err != nil { | |
728 | g.Error(err) | |
729 | } | |
730 | fd.fingerprint = fingerprint | |
731 | 778 | g.genFiles = append(g.genFiles, fd) |
732 | 779 | } |
733 | } | |
734 | ||
735 | // fingerprintProto returns a fingerprint for a message. | |
736 | // The fingerprint is intended to prevent conflicts between generated fileds, | |
737 | // not to provide cryptographic security. | |
738 | func fingerprintProto(m proto.Message) (string, error) { | |
739 | b, err := proto.Marshal(m) | |
740 | if err != nil { | |
741 | return "", err | |
742 | } | |
743 | h := sha256.Sum256(b) | |
744 | return hex.EncodeToString(h[:8]), nil | |
745 | 780 | } |
746 | 781 | |
747 | 782 | // Scan the descriptors in this file. For each one, build the slice of nested descriptors |
937 | 972 | if !ok { |
938 | 973 | g.Fail("can't find object with type", typeName) |
939 | 974 | } |
940 | ||
941 | // If the file of this object isn't a direct dependency of the current file, | |
942 | // or in the current file, then this object has been publicly imported into | |
943 | // a dependency of the current file. | |
944 | // We should return the ImportedDescriptor object for it instead. | |
945 | direct := *o.File().Name == *g.file.Name | |
946 | if !direct { | |
947 | for _, dep := range g.file.Dependency { | |
948 | if *g.fileByName(dep).Name == *o.File().Name { | |
949 | direct = true | |
950 | break | |
951 | } | |
952 | } | |
953 | } | |
954 | if !direct { | |
955 | found := false | |
956 | Loop: | |
957 | for _, dep := range g.file.Dependency { | |
958 | df := g.fileByName(*g.fileByName(dep).Name) | |
959 | for _, td := range df.imp { | |
960 | if td.o == o { | |
961 | // Found it! | |
962 | o = td | |
963 | found = true | |
964 | break Loop | |
965 | } | |
966 | } | |
967 | } | |
968 | if !found { | |
969 | log.Printf("protoc-gen-go: WARNING: failed finding publicly imported dependency for %v, used in %v", typeName, *g.file.Name) | |
970 | } | |
971 | } | |
972 | ||
973 | 975 | return o |
974 | 976 | } |
975 | 977 | |
1123 | 1125 | g.usedPackages = make(map[GoImportPath]bool) |
1124 | 1126 | g.packageNames = make(map[GoImportPath]GoPackageName) |
1125 | 1127 | g.usedPackageNames = make(map[GoPackageName]bool) |
1128 | g.addedImports = make(map[GoImportPath]bool) | |
1126 | 1129 | for name := range globalPackageNames { |
1127 | 1130 | g.usedPackageNames[name] = true |
1128 | 1131 | } |
1151 | 1154 | g.generateExtension(ext) |
1152 | 1155 | } |
1153 | 1156 | g.generateInitFunction() |
1157 | g.generateFileDescriptor(file) | |
1154 | 1158 | |
1155 | 1159 | // Run the plugins before the imports so we know which imports are necessary. |
1156 | 1160 | g.runPlugins(file) |
1157 | ||
1158 | g.generateFileDescriptor(file) | |
1159 | 1161 | |
1160 | 1162 | // Generate header and imports last, though they appear first in the output. |
1161 | 1163 | rem := g.Buffer |
1182 | 1184 | // make a copy independent of g; we'll need it after Reset. |
1183 | 1185 | original = append([]byte(nil), original...) |
1184 | 1186 | } |
1185 | ast, err := parser.ParseFile(fset, "", original, parser.ParseComments) | |
1187 | fileAST, err := parser.ParseFile(fset, "", original, parser.ParseComments) | |
1186 | 1188 | if err != nil { |
1187 | 1189 | // Print out the bad code with line numbers. |
1188 | 1190 | // This should never happen in practice, but it can while changing generated code, |
1194 | 1196 | } |
1195 | 1197 | g.Fail("bad Go source code was generated:", err.Error(), "\n"+src.String()) |
1196 | 1198 | } |
1199 | ast.SortImports(fset, fileAST) | |
1197 | 1200 | g.Reset() |
1198 | err = (&printer.Config{Mode: printer.TabIndent | printer.UseSpaces, Tabwidth: 8}).Fprint(g, fset, ast) | |
1201 | err = (&printer.Config{Mode: printer.TabIndent | printer.UseSpaces, Tabwidth: 8}).Fprint(g, fset, fileAST) | |
1199 | 1202 | if err != nil { |
1200 | 1203 | g.Fail("generated Go source code could not be reformatted:", err.Error()) |
1201 | 1204 | } |
1224 | 1227 | g.P("// source: ", g.file.Name) |
1225 | 1228 | } |
1226 | 1229 | g.P() |
1227 | ||
1228 | importPath, _, _ := g.file.goPackageOption() | |
1229 | if importPath == "" { | |
1230 | g.P("package ", g.file.packageName) | |
1231 | } else { | |
1232 | g.P("package ", g.file.packageName, " // import ", GoImportPath(g.ImportPrefix)+importPath) | |
1233 | } | |
1230 | g.PrintComments(strconv.Itoa(packagePath)) | |
1234 | 1231 | g.P() |
1235 | ||
1236 | if loc, ok := g.file.comments[strconv.Itoa(packagePath)]; ok { | |
1237 | g.P("/*") | |
1238 | // not using g.PrintComments because this is a /* */ comment block. | |
1239 | text := strings.TrimSuffix(loc.GetLeadingComments(), "\n") | |
1240 | for _, line := range strings.Split(text, "\n") { | |
1241 | line = strings.TrimPrefix(line, " ") | |
1242 | // ensure we don't escape from the block comment | |
1243 | line = strings.Replace(line, "*/", "* /", -1) | |
1244 | g.P(line) | |
1245 | } | |
1246 | g.P("*/") | |
1247 | g.P() | |
1248 | } | |
1232 | g.P("package ", g.file.packageName) | |
1233 | g.P() | |
1249 | 1234 | } |
1250 | 1235 | |
1251 | 1236 | // deprecationComment is the standard comment added to deprecated |
1276 | 1261 | w := new(bytes.Buffer) |
1277 | 1262 | nl := "" |
1278 | 1263 | for _, line := range strings.Split(strings.TrimSuffix(loc.GetLeadingComments(), "\n"), "\n") { |
1279 | fmt.Fprintf(w, "%s// %s", nl, strings.TrimPrefix(line, " ")) | |
1264 | fmt.Fprintf(w, "%s//%s", nl, line) | |
1280 | 1265 | nl = "\n" |
1281 | 1266 | } |
1282 | 1267 | return w.String(), true |
1298 | 1283 | |
1299 | 1284 | // Generate the imports |
1300 | 1285 | func (g *Generator) generateImports() { |
1301 | // We almost always need a proto import. Rather than computing when we | |
1302 | // do, which is tricky when there's a plugin, just import it and | |
1303 | // reference it later. The same argument applies to the fmt and math packages. | |
1304 | g.P("import "+g.Pkg["proto"]+" ", GoImportPath(g.ImportPrefix)+"github.com/golang/protobuf/proto") | |
1305 | g.P("import " + g.Pkg["fmt"] + ` "fmt"`) | |
1306 | g.P("import " + g.Pkg["math"] + ` "math"`) | |
1307 | var ( | |
1308 | imports = make(map[GoImportPath]bool) | |
1309 | strongImports = make(map[GoImportPath]bool) | |
1310 | importPaths []string | |
1311 | ) | |
1286 | imports := make(map[GoImportPath]GoPackageName) | |
1312 | 1287 | for i, s := range g.file.Dependency { |
1313 | 1288 | fd := g.fileByName(s) |
1314 | 1289 | importPath := fd.importPath |
1316 | 1291 | if importPath == g.file.importPath { |
1317 | 1292 | continue |
1318 | 1293 | } |
1319 | if !imports[importPath] { | |
1320 | importPaths = append(importPaths, string(importPath)) | |
1321 | } | |
1322 | imports[importPath] = true | |
1323 | if !g.weak(int32(i)) { | |
1324 | strongImports[importPath] = true | |
1325 | } | |
1326 | } | |
1327 | sort.Strings(importPaths) | |
1328 | for i := range importPaths { | |
1329 | importPath := GoImportPath(importPaths[i]) | |
1330 | packageName := g.GoPackageName(importPath) | |
1331 | fullPath := GoImportPath(g.ImportPrefix) + importPath | |
1332 | // Skip weak imports. | |
1333 | if !strongImports[importPath] { | |
1334 | g.P("// skipping weak import ", packageName, " ", fullPath) | |
1294 | // Do not import weak imports. | |
1295 | if g.weak(int32(i)) { | |
1296 | continue | |
1297 | } | |
1298 | // Do not import a package twice. | |
1299 | if _, ok := imports[importPath]; ok { | |
1335 | 1300 | continue |
1336 | 1301 | } |
1337 | 1302 | // We need to import all the dependencies, even if we don't reference them, |
1338 | 1303 | // because other code and tools depend on having the full transitive closure |
1339 | 1304 | // of protocol buffer types in the binary. |
1305 | packageName := g.GoPackageName(importPath) | |
1340 | 1306 | if _, ok := g.usedPackages[importPath]; !ok { |
1341 | 1307 | packageName = "_" |
1342 | 1308 | } |
1343 | g.P("import ", packageName, " ", fullPath) | |
1344 | } | |
1309 | imports[importPath] = packageName | |
1310 | } | |
1311 | for importPath := range g.addedImports { | |
1312 | imports[importPath] = g.GoPackageName(importPath) | |
1313 | } | |
1314 | // We almost always need a proto import. Rather than computing when we | |
1315 | // do, which is tricky when there's a plugin, just import it and | |
1316 | // reference it later. The same argument applies to the fmt and math packages. | |
1317 | g.P("import (") | |
1318 | g.P(g.Pkg["fmt"] + ` "fmt"`) | |
1319 | g.P(g.Pkg["math"] + ` "math"`) | |
1320 | g.P(g.Pkg["proto"]+" ", GoImportPath(g.ImportPrefix)+"github.com/golang/protobuf/proto") | |
1321 | for importPath, packageName := range imports { | |
1322 | g.P(packageName, " ", GoImportPath(g.ImportPrefix)+importPath) | |
1323 | } | |
1324 | g.P(")") | |
1345 | 1325 | g.P() |
1346 | 1326 | // TODO: may need to worry about uniqueness across plugins |
1347 | 1327 | for _, p := range plugins { |
1356 | 1336 | } |
1357 | 1337 | |
1358 | 1338 | func (g *Generator) generateImported(id *ImportedDescriptor) { |
1359 | tn := id.TypeName() | |
1360 | sn := tn[len(tn)-1] | |
1361 | 1339 | df := id.o.File() |
1362 | 1340 | filename := *df.Name |
1363 | 1341 | if df.importPath == g.file.importPath { |
1364 | 1342 | // Don't generate type aliases for files in the same Go package as this one. |
1365 | g.P("// Ignoring public import of ", sn, " from ", filename) | |
1366 | g.P() | |
1367 | 1343 | return |
1368 | 1344 | } |
1369 | 1345 | if !supportTypeAliases { |
1370 | 1346 | g.Fail(fmt.Sprintf("%s: public imports require at least go1.9", filename)) |
1371 | 1347 | } |
1372 | g.P("// ", sn, " from public import ", filename) | |
1373 | 1348 | g.usedPackages[df.importPath] = true |
1374 | 1349 | |
1375 | 1350 | for _, sym := range df.exported[id.o] { |
1376 | sym.GenerateAlias(g, g.GoPackageName(df.importPath)) | |
1351 | sym.GenerateAlias(g, filename, g.GoPackageName(df.importPath)) | |
1377 | 1352 | } |
1378 | 1353 | |
1379 | 1354 | g.P() |
1409 | 1384 | g.file.addExport(enum, constOrVarSymbol{name, "const", ccTypeName}) |
1410 | 1385 | } |
1411 | 1386 | g.P(")") |
1387 | g.P() | |
1412 | 1388 | g.P("var ", ccTypeName, "_name = map[int32]string{") |
1413 | 1389 | generated := make(map[int32]bool) // avoid duplicate values |
1414 | 1390 | for _, e := range enum.Value { |
1420 | 1396 | generated[*e.Number] = true |
1421 | 1397 | } |
1422 | 1398 | g.P("}") |
1399 | g.P() | |
1423 | 1400 | g.P("var ", ccTypeName, "_value = map[string]int32{") |
1424 | 1401 | for _, e := range enum.Value { |
1425 | 1402 | g.P(strconv.Quote(*e.Name), ": ", e.Number, ",") |
1426 | 1403 | } |
1427 | 1404 | g.P("}") |
1405 | g.P() | |
1428 | 1406 | |
1429 | 1407 | if !enum.proto3() { |
1430 | 1408 | g.P("func (x ", ccTypeName, ") Enum() *", ccTypeName, " {") |
1432 | 1410 | g.P("*p = x") |
1433 | 1411 | g.P("return p") |
1434 | 1412 | g.P("}") |
1413 | g.P() | |
1435 | 1414 | } |
1436 | 1415 | |
1437 | 1416 | g.P("func (x ", ccTypeName, ") String() string {") |
1438 | 1417 | g.P("return ", g.Pkg["proto"], ".EnumName(", ccTypeName, "_name, int32(x))") |
1439 | 1418 | g.P("}") |
1419 | g.P() | |
1440 | 1420 | |
1441 | 1421 | if !enum.proto3() { |
1442 | 1422 | g.P("func (x *", ccTypeName, ") UnmarshalJSON(data []byte) error {") |
1447 | 1427 | g.P("*x = ", ccTypeName, "(value)") |
1448 | 1428 | g.P("return nil") |
1449 | 1429 | g.P("}") |
1430 | g.P() | |
1450 | 1431 | } |
1451 | 1432 | |
1452 | 1433 | var indexes []string |
1458 | 1439 | g.P("func (", ccTypeName, ") EnumDescriptor() ([]byte, []int) {") |
1459 | 1440 | g.P("return ", g.file.VarName(), ", []int{", strings.Join(indexes, ", "), "}") |
1460 | 1441 | g.P("}") |
1442 | g.P() | |
1461 | 1443 | if enum.file.GetPackage() == "google.protobuf" && enum.GetName() == "NullValue" { |
1462 | 1444 | g.P("func (", ccTypeName, `) XXX_WellKnownType() string { return "`, enum.GetName(), `" }`) |
1463 | } | |
1464 | ||
1465 | g.P() | |
1445 | g.P() | |
1446 | } | |
1447 | ||
1448 | g.generateEnumRegistration(enum) | |
1466 | 1449 | } |
1467 | 1450 | |
1468 | 1451 | // The tag is a string like "varint,2,opt,name=fieldname,def=7" that |
1519 | 1502 | g.Fail("unknown enum type", CamelCaseSlice(obj.TypeName())) |
1520 | 1503 | } |
1521 | 1504 | defaultValue = enum.integerValueAsString(defaultValue) |
1505 | case descriptor.FieldDescriptorProto_TYPE_FLOAT: | |
1506 | if def := defaultValue; def != "inf" && def != "-inf" && def != "nan" { | |
1507 | if f, err := strconv.ParseFloat(defaultValue, 32); err == nil { | |
1508 | defaultValue = fmt.Sprint(float32(f)) | |
1509 | } | |
1510 | } | |
1511 | case descriptor.FieldDescriptorProto_TYPE_DOUBLE: | |
1512 | if def := defaultValue; def != "inf" && def != "-inf" && def != "nan" { | |
1513 | if f, err := strconv.ParseFloat(defaultValue, 64); err == nil { | |
1514 | defaultValue = fmt.Sprint(f) | |
1515 | } | |
1516 | } | |
1522 | 1517 | } |
1523 | 1518 | defaultValue = ",def=" + defaultValue |
1524 | 1519 | } |
1556 | 1551 | name = name[i+1:] |
1557 | 1552 | } |
1558 | 1553 | } |
1559 | if json := field.GetJsonName(); json != "" && json != name { | |
1554 | if json := field.GetJsonName(); field.Extendee == nil && json != "" && json != name { | |
1560 | 1555 | // TODO: escaping might be needed, in which case |
1561 | 1556 | // perhaps this should be in its own "json" tag. |
1562 | 1557 | name += ",json=" + json |
1660 | 1655 | } |
1661 | 1656 | |
1662 | 1657 | func (g *Generator) RecordTypeUse(t string) { |
1663 | if _, ok := g.typeNameToObject[t]; ok { | |
1664 | // Call ObjectNamed to get the true object to record the use. | |
1665 | obj := g.ObjectNamed(t) | |
1666 | g.usedPackages[obj.GoImportPath()] = true | |
1667 | } | |
1658 | if _, ok := g.typeNameToObject[t]; !ok { | |
1659 | return | |
1660 | } | |
1661 | importPath := g.ObjectNamed(t).GoImportPath() | |
1662 | if importPath == g.outputImportPath { | |
1663 | // Don't record use of objects in our package. | |
1664 | return | |
1665 | } | |
1666 | g.AddImport(importPath) | |
1667 | g.usedPackages[importPath] = true | |
1668 | 1668 | } |
1669 | 1669 | |
1670 | 1670 | // Method names that may be generated. Fields with these names get an |
1764 | 1764 | // oneofField - field containing list of subfields: |
1765 | 1765 | // - oneofSubField - a field within the oneof |
1766 | 1766 | |
1767 | // msgCtx contais the context for the generator functions. | |
1767 | // msgCtx contains the context for the generator functions. | |
1768 | 1768 | type msgCtx struct { |
1769 | 1769 | goName string // Go struct name of the message, e.g. MessageName |
1770 | 1770 | message *Descriptor // The descriptor for the message |
1868 | 1868 | fieldNumber int // Actual field number, as defined in proto, e.g. 12 |
1869 | 1869 | getterDef string // Default for getters, e.g. "nil", `""` or "Default_MessageType_FieldName" |
1870 | 1870 | protoDef string // Default value as defined in the proto file, e.g "yoshi" or "5" |
1871 | } | |
1872 | ||
1873 | // wireTypeName returns a textual wire type, needed for oneof sub fields in generated code. | |
1874 | func (f *oneofSubField) wireTypeName() string { | |
1875 | switch f.protoType { | |
1876 | case descriptor.FieldDescriptorProto_TYPE_FIXED64, | |
1877 | descriptor.FieldDescriptorProto_TYPE_SFIXED64, | |
1878 | descriptor.FieldDescriptorProto_TYPE_DOUBLE: | |
1879 | return "WireFixed64" | |
1880 | case descriptor.FieldDescriptorProto_TYPE_FIXED32, | |
1881 | descriptor.FieldDescriptorProto_TYPE_SFIXED32, | |
1882 | descriptor.FieldDescriptorProto_TYPE_FLOAT: | |
1883 | return "WireFixed32" | |
1884 | case descriptor.FieldDescriptorProto_TYPE_GROUP: | |
1885 | return "WireStartGroup" | |
1886 | case descriptor.FieldDescriptorProto_TYPE_MESSAGE, | |
1887 | descriptor.FieldDescriptorProto_TYPE_STRING, | |
1888 | descriptor.FieldDescriptorProto_TYPE_BYTES: | |
1889 | return "WireBytes" | |
1890 | default: // All others are Varints | |
1891 | return "WireVarint" | |
1892 | } | |
1871 | deprecated string // Deprecation comment, if any. | |
1893 | 1872 | } |
1894 | 1873 | |
1895 | 1874 | // typedNil prints a nil casted to the pointer to this field. |
1896 | // - for XXX_OneofFuncs | |
1875 | // - for XXX_OneofWrappers | |
1897 | 1876 | func (f *oneofSubField) typedNil(g *Generator) { |
1898 | 1877 | g.P("(*", f.oneofTypeName, ")(nil),") |
1899 | } | |
1900 | ||
1901 | // marshalCase prints the case matching this oneof subfield in the marshalling code. | |
1902 | func (f *oneofSubField) marshalCase(g *Generator) { | |
1903 | g.P("case *", f.oneofTypeName, ":") | |
1904 | wire := f.wireTypeName() | |
1905 | var pre, post string | |
1906 | val := "x." + f.goName // overridden for TYPE_BOOL | |
1907 | switch f.protoType { | |
1908 | case descriptor.FieldDescriptorProto_TYPE_DOUBLE: | |
1909 | pre = "b.EncodeFixed64(" + g.Pkg["math"] + ".Float64bits(" | |
1910 | post = "))" | |
1911 | case descriptor.FieldDescriptorProto_TYPE_FLOAT: | |
1912 | pre = "b.EncodeFixed32(uint64(" + g.Pkg["math"] + ".Float32bits(" | |
1913 | post = ")))" | |
1914 | case descriptor.FieldDescriptorProto_TYPE_INT64, descriptor.FieldDescriptorProto_TYPE_UINT64: | |
1915 | pre, post = "b.EncodeVarint(uint64(", "))" | |
1916 | case descriptor.FieldDescriptorProto_TYPE_INT32, descriptor.FieldDescriptorProto_TYPE_UINT32, descriptor.FieldDescriptorProto_TYPE_ENUM: | |
1917 | pre, post = "b.EncodeVarint(uint64(", "))" | |
1918 | case descriptor.FieldDescriptorProto_TYPE_FIXED64, descriptor.FieldDescriptorProto_TYPE_SFIXED64: | |
1919 | pre, post = "b.EncodeFixed64(uint64(", "))" | |
1920 | case descriptor.FieldDescriptorProto_TYPE_FIXED32, descriptor.FieldDescriptorProto_TYPE_SFIXED32: | |
1921 | pre, post = "b.EncodeFixed32(uint64(", "))" | |
1922 | case descriptor.FieldDescriptorProto_TYPE_BOOL: | |
1923 | g.P("t := uint64(0)") | |
1924 | g.P("if ", val, " { t = 1 }") | |
1925 | val = "t" | |
1926 | pre, post = "b.EncodeVarint(", ")" | |
1927 | case descriptor.FieldDescriptorProto_TYPE_STRING: | |
1928 | pre, post = "b.EncodeStringBytes(", ")" | |
1929 | case descriptor.FieldDescriptorProto_TYPE_GROUP: | |
1930 | pre, post = "b.Marshal(", ")" | |
1931 | case descriptor.FieldDescriptorProto_TYPE_MESSAGE: | |
1932 | pre, post = "b.EncodeMessage(", ")" | |
1933 | case descriptor.FieldDescriptorProto_TYPE_BYTES: | |
1934 | pre, post = "b.EncodeRawBytes(", ")" | |
1935 | case descriptor.FieldDescriptorProto_TYPE_SINT32: | |
1936 | pre, post = "b.EncodeZigzag32(uint64(", "))" | |
1937 | case descriptor.FieldDescriptorProto_TYPE_SINT64: | |
1938 | pre, post = "b.EncodeZigzag64(uint64(", "))" | |
1939 | default: | |
1940 | g.Fail("unhandled oneof field type ", f.protoType.String()) | |
1941 | } | |
1942 | g.P("b.EncodeVarint(", f.fieldNumber, "<<3|", g.Pkg["proto"], ".", wire, ")") | |
1943 | if t := f.protoType; t != descriptor.FieldDescriptorProto_TYPE_GROUP && t != descriptor.FieldDescriptorProto_TYPE_MESSAGE { | |
1944 | g.P(pre, val, post) | |
1945 | } else { | |
1946 | g.P("if err := ", pre, val, post, "; err != nil {") | |
1947 | g.P("return err") | |
1948 | g.P("}") | |
1949 | } | |
1950 | if f.protoType == descriptor.FieldDescriptorProto_TYPE_GROUP { | |
1951 | g.P("b.EncodeVarint(", f.fieldNumber, "<<3|", g.Pkg["proto"], ".WireEndGroup)") | |
1952 | } | |
1953 | } | |
1954 | ||
1955 | // unmarshalCase prints the case matching this oneof subfield in the unmarshalling code. | |
1956 | func (f *oneofSubField) unmarshalCase(g *Generator, origOneofName string, oneofName string) { | |
1957 | g.P("case ", f.fieldNumber, ": // ", origOneofName, ".", f.getProtoName()) | |
1958 | g.P("if wire != ", g.Pkg["proto"], ".", f.wireTypeName(), " {") | |
1959 | g.P("return true, ", g.Pkg["proto"], ".ErrInternalBadWireType") | |
1960 | g.P("}") | |
1961 | lhs := "x, err" // overridden for TYPE_MESSAGE and TYPE_GROUP | |
1962 | var dec, cast, cast2 string | |
1963 | switch f.protoType { | |
1964 | case descriptor.FieldDescriptorProto_TYPE_DOUBLE: | |
1965 | dec, cast = "b.DecodeFixed64()", g.Pkg["math"]+".Float64frombits" | |
1966 | case descriptor.FieldDescriptorProto_TYPE_FLOAT: | |
1967 | dec, cast, cast2 = "b.DecodeFixed32()", "uint32", g.Pkg["math"]+".Float32frombits" | |
1968 | case descriptor.FieldDescriptorProto_TYPE_INT64: | |
1969 | dec, cast = "b.DecodeVarint()", "int64" | |
1970 | case descriptor.FieldDescriptorProto_TYPE_UINT64: | |
1971 | dec = "b.DecodeVarint()" | |
1972 | case descriptor.FieldDescriptorProto_TYPE_INT32: | |
1973 | dec, cast = "b.DecodeVarint()", "int32" | |
1974 | case descriptor.FieldDescriptorProto_TYPE_FIXED64: | |
1975 | dec = "b.DecodeFixed64()" | |
1976 | case descriptor.FieldDescriptorProto_TYPE_FIXED32: | |
1977 | dec, cast = "b.DecodeFixed32()", "uint32" | |
1978 | case descriptor.FieldDescriptorProto_TYPE_BOOL: | |
1979 | dec = "b.DecodeVarint()" | |
1980 | // handled specially below | |
1981 | case descriptor.FieldDescriptorProto_TYPE_STRING: | |
1982 | dec = "b.DecodeStringBytes()" | |
1983 | case descriptor.FieldDescriptorProto_TYPE_GROUP: | |
1984 | g.P("msg := new(", f.goType[1:], ")") // drop star | |
1985 | lhs = "err" | |
1986 | dec = "b.DecodeGroup(msg)" | |
1987 | // handled specially below | |
1988 | case descriptor.FieldDescriptorProto_TYPE_MESSAGE: | |
1989 | g.P("msg := new(", f.goType[1:], ")") // drop star | |
1990 | lhs = "err" | |
1991 | dec = "b.DecodeMessage(msg)" | |
1992 | // handled specially below | |
1993 | case descriptor.FieldDescriptorProto_TYPE_BYTES: | |
1994 | dec = "b.DecodeRawBytes(true)" | |
1995 | case descriptor.FieldDescriptorProto_TYPE_UINT32: | |
1996 | dec, cast = "b.DecodeVarint()", "uint32" | |
1997 | case descriptor.FieldDescriptorProto_TYPE_ENUM: | |
1998 | dec, cast = "b.DecodeVarint()", f.goType | |
1999 | case descriptor.FieldDescriptorProto_TYPE_SFIXED32: | |
2000 | dec, cast = "b.DecodeFixed32()", "int32" | |
2001 | case descriptor.FieldDescriptorProto_TYPE_SFIXED64: | |
2002 | dec, cast = "b.DecodeFixed64()", "int64" | |
2003 | case descriptor.FieldDescriptorProto_TYPE_SINT32: | |
2004 | dec, cast = "b.DecodeZigzag32()", "int32" | |
2005 | case descriptor.FieldDescriptorProto_TYPE_SINT64: | |
2006 | dec, cast = "b.DecodeZigzag64()", "int64" | |
2007 | default: | |
2008 | g.Fail("unhandled oneof field type ", f.protoType.String()) | |
2009 | } | |
2010 | g.P(lhs, " := ", dec) | |
2011 | val := "x" | |
2012 | if cast != "" { | |
2013 | val = cast + "(" + val + ")" | |
2014 | } | |
2015 | if cast2 != "" { | |
2016 | val = cast2 + "(" + val + ")" | |
2017 | } | |
2018 | switch f.protoType { | |
2019 | case descriptor.FieldDescriptorProto_TYPE_BOOL: | |
2020 | val += " != 0" | |
2021 | case descriptor.FieldDescriptorProto_TYPE_GROUP, | |
2022 | descriptor.FieldDescriptorProto_TYPE_MESSAGE: | |
2023 | val = "msg" | |
2024 | } | |
2025 | g.P("m.", oneofName, " = &", f.oneofTypeName, "{", val, "}") | |
2026 | g.P("return true, err") | |
2027 | } | |
2028 | ||
2029 | // sizerCase prints the case matching this oneof subfield in the sizer code. | |
2030 | func (f *oneofSubField) sizerCase(g *Generator) { | |
2031 | g.P("case *", f.oneofTypeName, ":") | |
2032 | val := "x." + f.goName | |
2033 | var varint, fixed string | |
2034 | switch f.protoType { | |
2035 | case descriptor.FieldDescriptorProto_TYPE_DOUBLE: | |
2036 | fixed = "8" | |
2037 | case descriptor.FieldDescriptorProto_TYPE_FLOAT: | |
2038 | fixed = "4" | |
2039 | case descriptor.FieldDescriptorProto_TYPE_INT64, descriptor.FieldDescriptorProto_TYPE_UINT64, descriptor.FieldDescriptorProto_TYPE_INT32, descriptor.FieldDescriptorProto_TYPE_UINT32, descriptor.FieldDescriptorProto_TYPE_ENUM: | |
2040 | varint = val | |
2041 | case descriptor.FieldDescriptorProto_TYPE_FIXED64, descriptor.FieldDescriptorProto_TYPE_SFIXED64: | |
2042 | fixed = "8" | |
2043 | case descriptor.FieldDescriptorProto_TYPE_FIXED32, descriptor.FieldDescriptorProto_TYPE_SFIXED32: | |
2044 | fixed = "4" | |
2045 | case descriptor.FieldDescriptorProto_TYPE_BOOL: | |
2046 | fixed = "1" | |
2047 | case descriptor.FieldDescriptorProto_TYPE_STRING: | |
2048 | fixed = "len(" + val + ")" | |
2049 | varint = fixed | |
2050 | case descriptor.FieldDescriptorProto_TYPE_GROUP: | |
2051 | fixed = g.Pkg["proto"] + ".Size(" + val + ")" | |
2052 | case descriptor.FieldDescriptorProto_TYPE_MESSAGE: | |
2053 | g.P("s := ", g.Pkg["proto"], ".Size(", val, ")") | |
2054 | fixed = "s" | |
2055 | varint = fixed | |
2056 | case descriptor.FieldDescriptorProto_TYPE_BYTES: | |
2057 | fixed = "len(" + val + ")" | |
2058 | varint = fixed | |
2059 | case descriptor.FieldDescriptorProto_TYPE_SINT32: | |
2060 | varint = "(uint32(" + val + ") << 1) ^ uint32((int32(" + val + ") >> 31))" | |
2061 | case descriptor.FieldDescriptorProto_TYPE_SINT64: | |
2062 | varint = "uint64(" + val + " << 1) ^ uint64((int64(" + val + ") >> 63))" | |
2063 | default: | |
2064 | g.Fail("unhandled oneof field type ", f.protoType.String()) | |
2065 | } | |
2066 | // Tag and wire varint is known statically, | |
2067 | // so don't generate code for that part of the size computation. | |
2068 | tagAndWireSize := proto.SizeVarint(uint64(f.fieldNumber << 3)) // wire doesn't affect varint size | |
2069 | g.P("n += ", tagAndWireSize, " // tag and wire") | |
2070 | if varint != "" { | |
2071 | g.P("n += ", g.Pkg["proto"], ".SizeVarint(uint64(", varint, "))") | |
2072 | } | |
2073 | if fixed != "" { | |
2074 | g.P("n += ", fixed) | |
2075 | } | |
2076 | if f.protoType == descriptor.FieldDescriptorProto_TYPE_GROUP { | |
2077 | g.P("n += ", tagAndWireSize, " // tag and wire") | |
2078 | } | |
2079 | 1878 | } |
2080 | 1879 | |
2081 | 1880 | // getProtoDef returns the default value explicitly stated in the proto file, e.g "yoshi" or "5". |
2137 | 1936 | g.P() |
2138 | 1937 | // Getters for each oneof |
2139 | 1938 | for _, sf := range f.subFields { |
1939 | if sf.deprecated != "" { | |
1940 | g.P(sf.deprecated) | |
1941 | } | |
2140 | 1942 | g.P("func (m *", mc.goName, ") ", Annotate(mc.message.file, sf.fullPath, sf.getterName), "() "+sf.goType+" {") |
2141 | 1943 | g.P("if x, ok := m.", f.getterName, "().(*", sf.oneofTypeName, "); ok {") |
2142 | 1944 | g.P("return x.", sf.goName) |
2214 | 2016 | def = "float32(" + def + ")" |
2215 | 2017 | } |
2216 | 2018 | kind = "var " |
2019 | case df.getProtoType() == descriptor.FieldDescriptorProto_TYPE_FLOAT: | |
2020 | if f, err := strconv.ParseFloat(def, 32); err == nil { | |
2021 | def = fmt.Sprint(float32(f)) | |
2022 | } | |
2023 | case df.getProtoType() == descriptor.FieldDescriptorProto_TYPE_DOUBLE: | |
2024 | if f, err := strconv.ParseFloat(def, 64); err == nil { | |
2025 | def = fmt.Sprint(f) | |
2026 | } | |
2217 | 2027 | case df.getProtoType() == descriptor.FieldDescriptorProto_TYPE_ENUM: |
2218 | 2028 | // Must be an enum. Need to construct the prefixed name. |
2219 | 2029 | obj := g.ObjectNamed(df.getProtoTypeName()) |
2262 | 2072 | if len(ofields) == 0 { |
2263 | 2073 | return |
2264 | 2074 | } |
2265 | enc := "_" + mc.goName + "_OneofMarshaler" | |
2266 | dec := "_" + mc.goName + "_OneofUnmarshaler" | |
2267 | size := "_" + mc.goName + "_OneofSizer" | |
2268 | encSig := "(msg " + g.Pkg["proto"] + ".Message, b *" + g.Pkg["proto"] + ".Buffer) error" | |
2269 | decSig := "(msg " + g.Pkg["proto"] + ".Message, tag, wire int, b *" + g.Pkg["proto"] + ".Buffer) (bool, error)" | |
2270 | sizeSig := "(msg " + g.Pkg["proto"] + ".Message) (n int)" | |
2271 | 2075 | |
2272 | 2076 | // OneofFuncs |
2273 | g.P("// XXX_OneofFuncs is for the internal use of the proto package.") | |
2274 | g.P("func (*", mc.goName, ") XXX_OneofFuncs() (func", encSig, ", func", decSig, ", func", sizeSig, ", []interface{}) {") | |
2275 | g.P("return ", enc, ", ", dec, ", ", size, ", []interface{}{") | |
2077 | g.P("// XXX_OneofWrappers is for the internal use of the proto package.") | |
2078 | g.P("func (*", mc.goName, ") XXX_OneofWrappers() []interface{} {") | |
2079 | g.P("return []interface{}{") | |
2276 | 2080 | for _, of := range ofields { |
2277 | 2081 | for _, sf := range of.subFields { |
2278 | 2082 | sf.typedNil(g) |
2279 | 2083 | } |
2280 | 2084 | } |
2281 | 2085 | g.P("}") |
2282 | g.P("}") | |
2283 | g.P() | |
2284 | ||
2285 | // marshaler | |
2286 | g.P("func ", enc, encSig, " {") | |
2287 | g.P("m := msg.(*", mc.goName, ")") | |
2288 | for _, of := range ofields { | |
2289 | g.P("// ", of.getProtoName()) | |
2290 | g.P("switch x := m.", of.goName, ".(type) {") | |
2291 | for _, sf := range of.subFields { | |
2292 | // also fills in field.wire | |
2293 | sf.marshalCase(g) | |
2294 | } | |
2295 | g.P("case nil:") | |
2296 | g.P("default:") | |
2297 | g.P(" return ", g.Pkg["fmt"], `.Errorf("`, mc.goName, ".", of.goName, ` has unexpected type %T", x)`) | |
2298 | g.P("}") | |
2299 | } | |
2300 | g.P("return nil") | |
2301 | g.P("}") | |
2302 | g.P() | |
2303 | ||
2304 | // unmarshaler | |
2305 | g.P("func ", dec, decSig, " {") | |
2306 | g.P("m := msg.(*", mc.goName, ")") | |
2307 | g.P("switch tag {") | |
2308 | for _, of := range ofields { | |
2309 | for _, sf := range of.subFields { | |
2310 | sf.unmarshalCase(g, of.getProtoName(), of.goName) | |
2311 | } | |
2312 | } | |
2313 | g.P("default:") | |
2314 | g.P("return false, nil") | |
2315 | g.P("}") | |
2316 | g.P("}") | |
2317 | g.P() | |
2318 | ||
2319 | // sizer | |
2320 | g.P("func ", size, sizeSig, " {") | |
2321 | g.P("m := msg.(*", mc.goName, ")") | |
2322 | for _, of := range ofields { | |
2323 | g.P("// ", of.getProtoName()) | |
2324 | g.P("switch x := m.", of.goName, ".(type) {") | |
2325 | for _, sf := range of.subFields { | |
2326 | // also fills in field.wire | |
2327 | sf.sizerCase(g) | |
2328 | } | |
2329 | g.P("case nil:") | |
2330 | g.P("default:") | |
2331 | g.P("panic(", g.Pkg["fmt"], ".Sprintf(\"proto: unexpected type %T in oneof\", x))") | |
2332 | g.P("}") | |
2333 | } | |
2334 | g.P("return n") | |
2335 | 2086 | g.P("}") |
2336 | 2087 | g.P() |
2337 | 2088 | } |
2385 | 2136 | g.P("func (*", mc.goName, ") Descriptor() ([]byte, []int) {") |
2386 | 2137 | g.P("return ", g.file.VarName(), ", []int{", strings.Join(indexes, ", "), "}") |
2387 | 2138 | g.P("}") |
2139 | g.P() | |
2388 | 2140 | // TODO: Revisit the decision to use a XXX_WellKnownType method |
2389 | 2141 | // if we change proto.MessageName to work with multiple equivalents. |
2390 | 2142 | if mc.message.file.GetPackage() == "google.protobuf" && wellKnownTypes[mc.message.GetName()] { |
2391 | 2143 | g.P("func (*", mc.goName, `) XXX_WellKnownType() string { return "`, mc.message.GetName(), `" }`) |
2144 | g.P() | |
2392 | 2145 | } |
2393 | 2146 | |
2394 | 2147 | // Extension support methods |
2395 | 2148 | if len(mc.message.ExtensionRange) > 0 { |
2396 | // message_set_wire_format only makes sense when extensions are defined. | |
2397 | if opts := mc.message.Options; opts != nil && opts.GetMessageSetWireFormat() { | |
2398 | g.P() | |
2399 | g.P("func (m *", mc.goName, ") MarshalJSON() ([]byte, error) {") | |
2400 | g.P("return ", g.Pkg["proto"], ".MarshalMessageSetJSON(&m.XXX_InternalExtensions)") | |
2401 | g.P("}") | |
2402 | g.P("func (m *", mc.goName, ") UnmarshalJSON(buf []byte) error {") | |
2403 | g.P("return ", g.Pkg["proto"], ".UnmarshalMessageSetJSON(buf, &m.XXX_InternalExtensions)") | |
2404 | g.P("}") | |
2405 | } | |
2406 | ||
2407 | 2149 | g.P() |
2408 | 2150 | g.P("var extRange_", mc.goName, " = []", g.Pkg["proto"], ".ExtensionRange{") |
2409 | 2151 | for _, r := range mc.message.ExtensionRange { |
2414 | 2156 | g.P("func (*", mc.goName, ") ExtensionRangeArray() []", g.Pkg["proto"], ".ExtensionRange {") |
2415 | 2157 | g.P("return extRange_", mc.goName) |
2416 | 2158 | g.P("}") |
2159 | g.P() | |
2417 | 2160 | } |
2418 | 2161 | |
2419 | 2162 | // TODO: It does not scale to keep adding another method for every |
2431 | 2174 | g.P("return xxx_messageInfo_", mc.goName, ".Marshal(b, m, deterministic)") |
2432 | 2175 | g.P("}") |
2433 | 2176 | |
2434 | g.P("func (dst *", mc.goName, ") XXX_Merge(src ", g.Pkg["proto"], ".Message) {") | |
2435 | g.P("xxx_messageInfo_", mc.goName, ".Merge(dst, src)") | |
2177 | g.P("func (m *", mc.goName, ") XXX_Merge(src ", g.Pkg["proto"], ".Message) {") | |
2178 | g.P("xxx_messageInfo_", mc.goName, ".Merge(m, src)") | |
2436 | 2179 | g.P("}") |
2437 | 2180 | |
2438 | 2181 | g.P("func (m *", mc.goName, ") XXX_Size() int {") // avoid name clash with "Size" field in some message |
2502 | 2245 | if oneof && oFields[*field.OneofIndex] == nil { |
2503 | 2246 | odp := message.OneofDecl[int(*field.OneofIndex)] |
2504 | 2247 | base := CamelCase(odp.GetName()) |
2505 | names := allocNames(base, "Get"+base) | |
2506 | fname, gname := names[0], names[1] | |
2248 | fname := allocNames(base)[0] | |
2507 | 2249 | |
2508 | 2250 | // This is the first field of a oneof we haven't seen before. |
2509 | 2251 | // Generate the union field. |
2521 | 2263 | of := oneofField{ |
2522 | 2264 | fieldCommon: fieldCommon{ |
2523 | 2265 | goName: fname, |
2524 | getterName: gname, | |
2266 | getterName: "Get"+fname, | |
2525 | 2267 | goType: dname, |
2526 | 2268 | tags: tag, |
2527 | 2269 | protoName: odp.GetName(), |
2561 | 2303 | |
2562 | 2304 | tag += fmt.Sprintf(" protobuf_key:%s protobuf_val:%s", keyTag, valTag) |
2563 | 2305 | } |
2306 | } | |
2307 | ||
2308 | fieldDeprecated := "" | |
2309 | if field.GetOptions().GetDeprecated() { | |
2310 | fieldDeprecated = deprecationComment | |
2564 | 2311 | } |
2565 | 2312 | |
2566 | 2313 | dvalue := g.getterDefault(field, goTypeName) |
2606 | 2353 | getterDef: dvalue, |
2607 | 2354 | protoDef: field.GetDefaultValue(), |
2608 | 2355 | oneofTypeName: tname, |
2356 | deprecated: fieldDeprecated, | |
2609 | 2357 | } |
2610 | 2358 | oneofField.subFields = append(oneofField.subFields, &sf) |
2611 | 2359 | g.RecordTypeUse(field.GetTypeName()) |
2612 | 2360 | continue |
2613 | } | |
2614 | ||
2615 | fieldDeprecated := "" | |
2616 | if field.GetOptions().GetDeprecated() { | |
2617 | fieldDeprecated = deprecationComment | |
2618 | 2361 | } |
2619 | 2362 | |
2620 | 2363 | fieldFullPath := fmt.Sprintf("%s,%d,%d", message.path, messageFieldPath, i) |
2662 | 2405 | g.generateOneofFuncs(mc, topLevelFields) |
2663 | 2406 | g.P() |
2664 | 2407 | |
2665 | if !message.group { | |
2666 | ||
2667 | var oneofTypes []string | |
2668 | for _, f := range topLevelFields { | |
2669 | if of, ok := f.(*oneofField); ok { | |
2670 | for _, osf := range of.subFields { | |
2671 | oneofTypes = append(oneofTypes, osf.oneofTypeName) | |
2672 | } | |
2673 | } | |
2674 | } | |
2675 | ||
2676 | opts := message.Options | |
2677 | ms := &messageSymbol{ | |
2678 | sym: goTypeName, | |
2679 | hasExtensions: len(message.ExtensionRange) > 0, | |
2680 | isMessageSet: opts != nil && opts.GetMessageSetWireFormat(), | |
2681 | oneofTypes: oneofTypes, | |
2682 | } | |
2683 | g.file.addExport(message, ms) | |
2684 | } | |
2408 | var oneofTypes []string | |
2409 | for _, f := range topLevelFields { | |
2410 | if of, ok := f.(*oneofField); ok { | |
2411 | for _, osf := range of.subFields { | |
2412 | oneofTypes = append(oneofTypes, osf.oneofTypeName) | |
2413 | } | |
2414 | } | |
2415 | } | |
2416 | ||
2417 | opts := message.Options | |
2418 | ms := &messageSymbol{ | |
2419 | sym: goTypeName, | |
2420 | hasExtensions: len(message.ExtensionRange) > 0, | |
2421 | isMessageSet: opts != nil && opts.GetMessageSetWireFormat(), | |
2422 | oneofTypes: oneofTypes, | |
2423 | } | |
2424 | g.file.addExport(message, ms) | |
2685 | 2425 | |
2686 | 2426 | for _, ext := range message.ext { |
2687 | 2427 | g.generateExtension(ext) |
2810 | 2550 | // In addition, the situation for when to apply this special case is implemented |
2811 | 2551 | // differently in other languages: |
2812 | 2552 | // https://github.com/google/protobuf/blob/aff10976/src/google/protobuf/text_format.cc#L1560 |
2813 | mset := false | |
2814 | 2553 | if extDesc.GetOptions().GetMessageSetWireFormat() && typeName[len(typeName)-1] == "message_set_extension" { |
2815 | 2554 | typeName = typeName[:len(typeName)-1] |
2816 | mset = true | |
2817 | 2555 | } |
2818 | 2556 | |
2819 | 2557 | // For text formatting, the package must be exactly what the .proto file declares, |
2834 | 2572 | g.P("}") |
2835 | 2573 | g.P() |
2836 | 2574 | |
2837 | if mset { | |
2838 | // Generate a bit more code to register with message_set.go. | |
2839 | g.addInitf("%s.RegisterMessageSetType((%s)(nil), %d, %q)", g.Pkg["proto"], fieldType, *field.Number, extName) | |
2840 | } | |
2575 | g.addInitf("%s.RegisterExtension(%s)", g.Pkg["proto"], ext.DescName()) | |
2841 | 2576 | |
2842 | 2577 | g.file.addExport(ext, constOrVarSymbol{ccTypeName, "var", ""}) |
2843 | 2578 | } |
2844 | 2579 | |
2845 | 2580 | func (g *Generator) generateInitFunction() { |
2846 | for _, enum := range g.file.enum { | |
2847 | g.generateEnumRegistration(enum) | |
2848 | } | |
2849 | for _, d := range g.file.desc { | |
2850 | for _, ext := range d.ext { | |
2851 | g.generateExtensionRegistration(ext) | |
2852 | } | |
2853 | } | |
2854 | for _, ext := range g.file.ext { | |
2855 | g.generateExtensionRegistration(ext) | |
2856 | } | |
2857 | 2581 | if len(g.init) == 0 { |
2858 | 2582 | return |
2859 | 2583 | } |
2915 | 2639 | // The full type name, CamelCased. |
2916 | 2640 | ccTypeName := CamelCaseSlice(typeName) |
2917 | 2641 | g.addInitf("%s.RegisterEnum(%q, %[3]s_name, %[3]s_value)", g.Pkg["proto"], pkg+ccTypeName, ccTypeName) |
2918 | } | |
2919 | ||
2920 | func (g *Generator) generateExtensionRegistration(ext *ExtensionDescriptor) { | |
2921 | g.addInitf("%s.RegisterExtension(%s)", g.Pkg["proto"], ext.DescName()) | |
2922 | 2642 | } |
2923 | 2643 | |
2924 | 2644 | // And now lots of helper functions. |
67 | 67 | {"foo", "", "foo", true}, |
68 | 68 | {"github.com/golang/bar", "github.com/golang/bar", "bar", true}, |
69 | 69 | {"github.com/golang/bar;baz", "github.com/golang/bar", "baz", true}, |
70 | {"github.com/golang/string", "github.com/golang/string", "string", true}, | |
70 | 71 | } |
71 | 72 | for _, tc := range tests { |
72 | 73 | d := &FileDescriptor{ |
80 | 81 | if impPath != tc.impPath || pkg != tc.pkg || ok != tc.ok { |
81 | 82 | t.Errorf("go_package = %q => (%q, %q, %t), want (%q, %q, %t)", tc.in, |
82 | 83 | impPath, pkg, ok, tc.impPath, tc.pkg, tc.ok) |
84 | } | |
85 | } | |
86 | } | |
87 | ||
88 | func TestPackageNames(t *testing.T) { | |
89 | g := New() | |
90 | g.packageNames = make(map[GoImportPath]GoPackageName) | |
91 | g.usedPackageNames = make(map[GoPackageName]bool) | |
92 | for _, test := range []struct { | |
93 | importPath GoImportPath | |
94 | want GoPackageName | |
95 | }{ | |
96 | {"github.com/golang/foo", "foo"}, | |
97 | {"github.com/golang/second/package/named/foo", "foo1"}, | |
98 | {"github.com/golang/third/package/named/foo", "foo2"}, | |
99 | {"github.com/golang/conflicts/with/predeclared/ident/string", "string1"}, | |
100 | } { | |
101 | if got := g.GoPackageName(test.importPath); got != test.want { | |
102 | t.Errorf("GoPackageName(%v) = %v, want %v", test.importPath, got, test.want) | |
83 | 103 | } |
84 | 104 | } |
85 | 105 | } |
2 | 2 | import ( |
3 | 3 | "bytes" |
4 | 4 | "flag" |
5 | "fmt" | |
6 | 5 | "go/build" |
7 | 6 | "go/parser" |
8 | 7 | "go/token" |
149 | 148 | wantPackageB: "test_beta", |
150 | 149 | wantImportsA: map[string]bool{ |
151 | 150 | "github.com/golang/protobuf/proto": true, |
152 | "beta": true, | |
151 | "beta": true, | |
153 | 152 | }, |
154 | 153 | }, { |
155 | 154 | parameters: "import_prefix=prefix", |
322 | 321 | } |
323 | 322 | } |
324 | 323 | |
325 | func TestPackageComment(t *testing.T) { | |
326 | workdir, err := ioutil.TempDir("", "proto-test") | |
327 | if err != nil { | |
328 | t.Fatal(err) | |
329 | } | |
330 | defer os.RemoveAll(workdir) | |
331 | ||
332 | var packageRE = regexp.MustCompile(`(?m)^package .*`) | |
333 | ||
334 | for i, test := range []struct { | |
335 | goPackageOption string | |
336 | wantPackage string | |
337 | }{{ | |
338 | goPackageOption: ``, | |
339 | wantPackage: `package proto_package`, | |
340 | }, { | |
341 | goPackageOption: `option go_package = "go_package";`, | |
342 | wantPackage: `package go_package`, | |
343 | }, { | |
344 | goPackageOption: `option go_package = "import/path/of/go_package";`, | |
345 | wantPackage: `package go_package // import "import/path/of/go_package"`, | |
346 | }, { | |
347 | goPackageOption: `option go_package = "import/path/of/something;go_package";`, | |
348 | wantPackage: `package go_package // import "import/path/of/something"`, | |
349 | }, { | |
350 | goPackageOption: `option go_package = "import_path;go_package";`, | |
351 | wantPackage: `package go_package // import "import_path"`, | |
352 | }} { | |
353 | srcName := filepath.Join(workdir, fmt.Sprintf("%d.proto", i)) | |
354 | tgtName := filepath.Join(workdir, fmt.Sprintf("%d.pb.go", i)) | |
355 | ||
356 | buf := &bytes.Buffer{} | |
357 | fmt.Fprintln(buf, `syntax = "proto3";`) | |
358 | fmt.Fprintln(buf, `package proto_package;`) | |
359 | fmt.Fprintln(buf, test.goPackageOption) | |
360 | if err := ioutil.WriteFile(srcName, buf.Bytes(), 0666); err != nil { | |
361 | t.Fatal(err) | |
362 | } | |
363 | ||
364 | protoc(t, []string{"-I" + workdir, "--go_out=paths=source_relative:" + workdir, srcName}) | |
365 | ||
366 | out, err := ioutil.ReadFile(tgtName) | |
367 | if err != nil { | |
368 | t.Fatal(err) | |
369 | } | |
370 | ||
371 | pkg := packageRE.Find(out) | |
372 | if pkg == nil { | |
373 | t.Errorf("generated .pb.go contains no package line\n\nsource:\n%v\n\noutput:\n%v", buf.String(), string(out)) | |
374 | continue | |
375 | } | |
376 | ||
377 | if got, want := string(pkg), test.wantPackage; got != want { | |
378 | t.Errorf("unexpected package statement with go_package = %q\n got: %v\nwant: %v", test.goPackageOption, got, want) | |
379 | } | |
380 | } | |
381 | } | |
382 | ||
383 | 324 | // parseFile returns a file's package name and a list of all packages it imports. |
384 | 325 | func parseFile(source string) (packageName string, imports []string, err error) { |
385 | 326 | fset := token.NewFileSet() |
35 | 35 | |
36 | 36 | import ( |
37 | 37 | "fmt" |
38 | "path" | |
39 | 38 | "strconv" |
40 | 39 | "strings" |
41 | 40 | |
52 | 51 | // Paths for packages used by code generated in this file, |
53 | 52 | // relative to the import_prefix of the generator.Generator. |
54 | 53 | const ( |
55 | contextPkgPath = "golang.org/x/net/context" | |
54 | contextPkgPath = "context" | |
56 | 55 | grpcPkgPath = "google.golang.org/grpc" |
56 | codePkgPath = "google.golang.org/grpc/codes" | |
57 | statusPkgPath = "google.golang.org/grpc/status" | |
57 | 58 | ) |
58 | 59 | |
59 | 60 | func init() { |
82 | 83 | // Init initializes the plugin. |
83 | 84 | func (g *grpc) Init(gen *generator.Generator) { |
84 | 85 | g.gen = gen |
85 | contextPkg = generator.RegisterUniquePackageName("context", nil) | |
86 | grpcPkg = generator.RegisterUniquePackageName("grpc", nil) | |
87 | 86 | } |
88 | 87 | |
89 | 88 | // Given a type name defined in a .proto, return its object. |
107 | 106 | return |
108 | 107 | } |
109 | 108 | |
109 | contextPkg = string(g.gen.AddImport(contextPkgPath)) | |
110 | grpcPkg = string(g.gen.AddImport(grpcPkgPath)) | |
111 | ||
110 | 112 | g.P("// Reference imports to suppress errors if they are not otherwise used.") |
111 | 113 | g.P("var _ ", contextPkg, ".Context") |
112 | 114 | g.P("var _ ", grpcPkg, ".ClientConn") |
125 | 127 | |
126 | 128 | // GenerateImports generates the import declaration for this file. |
127 | 129 | func (g *grpc) GenerateImports(file *generator.FileDescriptor) { |
128 | if len(file.FileDescriptorProto.Service) == 0 { | |
129 | return | |
130 | } | |
131 | g.P("import (") | |
132 | g.P(contextPkg, " ", generator.GoImportPath(path.Join(string(g.gen.ImportPrefix), contextPkgPath))) | |
133 | g.P(grpcPkg, " ", generator.GoImportPath(path.Join(string(g.gen.ImportPrefix), grpcPkgPath))) | |
134 | g.P(")") | |
135 | g.P() | |
136 | 130 | } |
137 | 131 | |
138 | 132 | // reservedClientName records whether a client name is reserved on the client side. |
222 | 216 | } |
223 | 217 | g.P("}") |
224 | 218 | g.P() |
219 | ||
220 | // Server Unimplemented struct for forward compatability. | |
221 | if deprecated { | |
222 | g.P(deprecationComment) | |
223 | } | |
224 | g.generateUnimplementedServer(servName, service) | |
225 | 225 | |
226 | 226 | // Server registration. |
227 | 227 | if deprecated { |
276 | 276 | g.P() |
277 | 277 | } |
278 | 278 | |
279 | // generateUnimplementedServer creates the unimplemented server struct | |
280 | func (g *grpc) generateUnimplementedServer(servName string, service *pb.ServiceDescriptorProto) { | |
281 | serverType := servName + "Server" | |
282 | g.P("// Unimplemented", serverType, " can be embedded to have forward compatible implementations.") | |
283 | g.P("type Unimplemented", serverType, " struct {") | |
284 | g.P("}") | |
285 | g.P() | |
286 | // Unimplemented<service_name>Server's concrete methods | |
287 | for _, method := range service.Method { | |
288 | g.generateServerMethodConcrete(servName, method) | |
289 | } | |
290 | g.P() | |
291 | } | |
292 | ||
293 | // generateServerMethodConcrete returns unimplemented methods which ensure forward compatibility | |
294 | func (g *grpc) generateServerMethodConcrete(servName string, method *pb.MethodDescriptorProto) { | |
295 | header := g.generateServerSignatureWithParamNames(servName, method) | |
296 | g.P("func (*Unimplemented", servName, "Server) ", header, " {") | |
297 | var nilArg string | |
298 | if !method.GetServerStreaming() && !method.GetClientStreaming() { | |
299 | nilArg = "nil, " | |
300 | } | |
301 | methName := generator.CamelCase(method.GetName()) | |
302 | statusPkg := string(g.gen.AddImport(statusPkgPath)) | |
303 | codePkg := string(g.gen.AddImport(codePkgPath)) | |
304 | g.P("return ", nilArg, statusPkg, `.Errorf(`, codePkg, `.Unimplemented, "method `, methName, ` not implemented")`) | |
305 | g.P("}") | |
306 | } | |
307 | ||
279 | 308 | // generateClientSignature returns the client-side signature for a method. |
280 | 309 | func (g *grpc) generateClientSignature(servName string, method *pb.MethodDescriptorProto) string { |
281 | 310 | origMethName := method.GetName() |
373 | 402 | g.P("}") |
374 | 403 | g.P() |
375 | 404 | } |
405 | } | |
406 | ||
407 | // generateServerSignatureWithParamNames returns the server-side signature for a method with parameter names. | |
408 | func (g *grpc) generateServerSignatureWithParamNames(servName string, method *pb.MethodDescriptorProto) string { | |
409 | origMethName := method.GetName() | |
410 | methName := generator.CamelCase(origMethName) | |
411 | if reservedClientName[methName] { | |
412 | methName += "_" | |
413 | } | |
414 | ||
415 | var reqArgs []string | |
416 | ret := "error" | |
417 | if !method.GetServerStreaming() && !method.GetClientStreaming() { | |
418 | reqArgs = append(reqArgs, "ctx "+contextPkg+".Context") | |
419 | ret = "(*" + g.typeName(method.GetOutputType()) + ", error)" | |
420 | } | |
421 | if !method.GetClientStreaming() { | |
422 | reqArgs = append(reqArgs, "req *"+g.typeName(method.GetInputType())) | |
423 | } | |
424 | if method.GetServerStreaming() || method.GetClientStreaming() { | |
425 | reqArgs = append(reqArgs, "srv "+servName+"_"+generator.CamelCase(origMethName)+"Server") | |
426 | } | |
427 | ||
428 | return methName + "(" + strings.Join(reqArgs, ", ") + ") " + ret | |
376 | 429 | } |
377 | 430 | |
378 | 431 | // generateServerSignature returns the server-side signature for a method. |
0 | 0 | // Code generated by protoc-gen-go. DO NOT EDIT. |
1 | 1 | // deprecated/deprecated.proto is a deprecated file. |
2 | 2 | |
3 | package deprecated // import "github.com/golang/protobuf/protoc-gen-go/testdata/deprecated" | |
4 | ||
5 | /* | |
6 | package deprecated contains only deprecated messages and services. | |
7 | */ | |
8 | ||
9 | import proto "github.com/golang/protobuf/proto" | |
10 | import fmt "fmt" | |
11 | import math "math" | |
3 | // package deprecated contains only deprecated messages and services. | |
4 | ||
5 | package deprecated | |
12 | 6 | |
13 | 7 | import ( |
14 | context "golang.org/x/net/context" | |
8 | context "context" | |
9 | fmt "fmt" | |
10 | proto "github.com/golang/protobuf/proto" | |
15 | 11 | grpc "google.golang.org/grpc" |
12 | codes "google.golang.org/grpc/codes" | |
13 | status "google.golang.org/grpc/status" | |
14 | math "math" | |
16 | 15 | ) |
17 | 16 | |
18 | 17 | // Reference imports to suppress errors if they are not otherwise used. |
24 | 23 | // is compatible with the proto package it is being compiled against. |
25 | 24 | // A compilation error at this line likely means your copy of the |
26 | 25 | // proto package needs to be updated. |
27 | const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package | |
26 | const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package | |
28 | 27 | |
29 | 28 | // DeprecatedEnum contains deprecated values. |
30 | 29 | type DeprecatedEnum int32 // Deprecated: Do not use. |
36 | 35 | var DeprecatedEnum_name = map[int32]string{ |
37 | 36 | 0: "DEPRECATED", |
38 | 37 | } |
38 | ||
39 | 39 | var DeprecatedEnum_value = map[string]int32{ |
40 | 40 | "DEPRECATED": 0, |
41 | 41 | } |
43 | 43 | func (x DeprecatedEnum) String() string { |
44 | 44 | return proto.EnumName(DeprecatedEnum_name, int32(x)) |
45 | 45 | } |
46 | ||
46 | 47 | func (DeprecatedEnum) EnumDescriptor() ([]byte, []int) { |
47 | return fileDescriptor_deprecated_9e1889ba21817fad, []int{0} | |
48 | return fileDescriptor_f64ba265cd7eae3f, []int{0} | |
48 | 49 | } |
49 | 50 | |
50 | 51 | // DeprecatedRequest is a request to DeprecatedCall. |
60 | 61 | func (m *DeprecatedRequest) String() string { return proto.CompactTextString(m) } |
61 | 62 | func (*DeprecatedRequest) ProtoMessage() {} |
62 | 63 | func (*DeprecatedRequest) Descriptor() ([]byte, []int) { |
63 | return fileDescriptor_deprecated_9e1889ba21817fad, []int{0} | |
64 | } | |
64 | return fileDescriptor_f64ba265cd7eae3f, []int{0} | |
65 | } | |
66 | ||
65 | 67 | func (m *DeprecatedRequest) XXX_Unmarshal(b []byte) error { |
66 | 68 | return xxx_messageInfo_DeprecatedRequest.Unmarshal(m, b) |
67 | 69 | } |
68 | 70 | func (m *DeprecatedRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
69 | 71 | return xxx_messageInfo_DeprecatedRequest.Marshal(b, m, deterministic) |
70 | 72 | } |
71 | func (dst *DeprecatedRequest) XXX_Merge(src proto.Message) { | |
72 | xxx_messageInfo_DeprecatedRequest.Merge(dst, src) | |
73 | func (m *DeprecatedRequest) XXX_Merge(src proto.Message) { | |
74 | xxx_messageInfo_DeprecatedRequest.Merge(m, src) | |
73 | 75 | } |
74 | 76 | func (m *DeprecatedRequest) XXX_Size() int { |
75 | 77 | return xxx_messageInfo_DeprecatedRequest.Size(m) |
83 | 85 | // Deprecated: Do not use. |
84 | 86 | type DeprecatedResponse struct { |
85 | 87 | // DeprecatedField contains a DeprecatedEnum. |
86 | DeprecatedField DeprecatedEnum `protobuf:"varint,1,opt,name=deprecated_field,json=deprecatedField,proto3,enum=deprecated.DeprecatedEnum" json:"deprecated_field,omitempty"` // Deprecated: Do not use. | |
87 | XXX_NoUnkeyedLiteral struct{} `json:"-"` | |
88 | XXX_unrecognized []byte `json:"-"` | |
89 | XXX_sizecache int32 `json:"-"` | |
88 | DeprecatedField DeprecatedEnum `protobuf:"varint,1,opt,name=deprecated_field,json=deprecatedField,proto3,enum=deprecated.DeprecatedEnum" json:"deprecated_field,omitempty"` // Deprecated: Do not use. | |
89 | // DeprecatedOneof contains a deprecated field. | |
90 | // | |
91 | // Types that are valid to be assigned to DeprecatedOneof: | |
92 | // *DeprecatedResponse_DeprecatedOneofField | |
93 | DeprecatedOneof isDeprecatedResponse_DeprecatedOneof `protobuf_oneof:"deprecated_oneof"` | |
94 | XXX_NoUnkeyedLiteral struct{} `json:"-"` | |
95 | XXX_unrecognized []byte `json:"-"` | |
96 | XXX_sizecache int32 `json:"-"` | |
90 | 97 | } |
91 | 98 | |
92 | 99 | func (m *DeprecatedResponse) Reset() { *m = DeprecatedResponse{} } |
93 | 100 | func (m *DeprecatedResponse) String() string { return proto.CompactTextString(m) } |
94 | 101 | func (*DeprecatedResponse) ProtoMessage() {} |
95 | 102 | func (*DeprecatedResponse) Descriptor() ([]byte, []int) { |
96 | return fileDescriptor_deprecated_9e1889ba21817fad, []int{1} | |
97 | } | |
103 | return fileDescriptor_f64ba265cd7eae3f, []int{1} | |
104 | } | |
105 | ||
98 | 106 | func (m *DeprecatedResponse) XXX_Unmarshal(b []byte) error { |
99 | 107 | return xxx_messageInfo_DeprecatedResponse.Unmarshal(m, b) |
100 | 108 | } |
101 | 109 | func (m *DeprecatedResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
102 | 110 | return xxx_messageInfo_DeprecatedResponse.Marshal(b, m, deterministic) |
103 | 111 | } |
104 | func (dst *DeprecatedResponse) XXX_Merge(src proto.Message) { | |
105 | xxx_messageInfo_DeprecatedResponse.Merge(dst, src) | |
112 | func (m *DeprecatedResponse) XXX_Merge(src proto.Message) { | |
113 | xxx_messageInfo_DeprecatedResponse.Merge(m, src) | |
106 | 114 | } |
107 | 115 | func (m *DeprecatedResponse) XXX_Size() int { |
108 | 116 | return xxx_messageInfo_DeprecatedResponse.Size(m) |
121 | 129 | return DeprecatedEnum_DEPRECATED |
122 | 130 | } |
123 | 131 | |
132 | type isDeprecatedResponse_DeprecatedOneof interface { | |
133 | isDeprecatedResponse_DeprecatedOneof() | |
134 | } | |
135 | ||
136 | type DeprecatedResponse_DeprecatedOneofField struct { | |
137 | DeprecatedOneofField string `protobuf:"bytes,2,opt,name=deprecated_oneof_field,json=deprecatedOneofField,proto3,oneof"` | |
138 | } | |
139 | ||
140 | func (*DeprecatedResponse_DeprecatedOneofField) isDeprecatedResponse_DeprecatedOneof() {} | |
141 | ||
142 | func (m *DeprecatedResponse) GetDeprecatedOneof() isDeprecatedResponse_DeprecatedOneof { | |
143 | if m != nil { | |
144 | return m.DeprecatedOneof | |
145 | } | |
146 | return nil | |
147 | } | |
148 | ||
149 | // Deprecated: Do not use. | |
150 | func (m *DeprecatedResponse) GetDeprecatedOneofField() string { | |
151 | if x, ok := m.GetDeprecatedOneof().(*DeprecatedResponse_DeprecatedOneofField); ok { | |
152 | return x.DeprecatedOneofField | |
153 | } | |
154 | return "" | |
155 | } | |
156 | ||
157 | // XXX_OneofWrappers is for the internal use of the proto package. | |
158 | func (*DeprecatedResponse) XXX_OneofWrappers() []interface{} { | |
159 | return []interface{}{ | |
160 | (*DeprecatedResponse_DeprecatedOneofField)(nil), | |
161 | } | |
162 | } | |
163 | ||
124 | 164 | func init() { |
165 | proto.RegisterEnum("deprecated.DeprecatedEnum", DeprecatedEnum_name, DeprecatedEnum_value) | |
125 | 166 | proto.RegisterType((*DeprecatedRequest)(nil), "deprecated.DeprecatedRequest") |
126 | 167 | proto.RegisterType((*DeprecatedResponse)(nil), "deprecated.DeprecatedResponse") |
127 | proto.RegisterEnum("deprecated.DeprecatedEnum", DeprecatedEnum_name, DeprecatedEnum_value) | |
168 | } | |
169 | ||
170 | func init() { proto.RegisterFile("deprecated/deprecated.proto", fileDescriptor_f64ba265cd7eae3f) } | |
171 | ||
172 | var fileDescriptor_f64ba265cd7eae3f = []byte{ | |
173 | // 287 bytes of a gzipped FileDescriptorProto | |
174 | 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x91, 0xcd, 0x4a, 0xf3, 0x40, | |
175 | 0x14, 0x86, 0x7b, 0xe6, 0x83, 0x0f, 0x9d, 0x45, 0xad, 0x83, 0x68, 0x88, 0x28, 0x25, 0xab, 0x20, | |
176 | 0x34, 0x81, 0xba, 0x2b, 0x6e, 0x9a, 0x26, 0xa2, 0x2b, 0x25, 0x76, 0xe5, 0x46, 0xf2, 0x73, 0x12, | |
177 | 0x03, 0xe9, 0x4c, 0x4c, 0x26, 0x5e, 0x83, 0xf7, 0xe3, 0xc6, 0xcb, 0x93, 0x49, 0x8b, 0x33, 0x05, | |
178 | 0xdd, 0x84, 0x93, 0x79, 0xdf, 0xe7, 0xfc, 0xd2, 0xf3, 0x1c, 0x9b, 0x16, 0xb3, 0x44, 0x62, 0xee, | |
179 | 0xeb, 0xd0, 0x6b, 0x5a, 0x21, 0x05, 0xa3, 0xfa, 0xc5, 0x39, 0xa3, 0xc7, 0xe1, 0xcf, 0x5f, 0x8c, | |
180 | 0x6f, 0x3d, 0x76, 0x72, 0x41, 0x2c, 0x70, 0x3e, 0x81, 0x32, 0x53, 0xe9, 0x1a, 0xc1, 0x3b, 0x64, | |
181 | 0xf7, 0x74, 0xa2, 0xe9, 0x97, 0xa2, 0xc2, 0x3a, 0xb7, 0x60, 0x0a, 0xee, 0x78, 0x6e, 0x7b, 0x46, | |
182 | 0x21, 0x4d, 0x46, 0xbc, 0xdf, 0x04, 0xc4, 0x82, 0xf8, 0x48, 0xcb, 0xb7, 0x0a, 0x63, 0x0b, 0x7a, | |
183 | 0x6a, 0xa4, 0x12, 0x1c, 0x45, 0xb1, 0x4b, 0x48, 0xa6, 0xe0, 0x1e, 0x2a, 0xe8, 0x6e, 0x14, 0x9f, | |
184 | 0x68, 0xcf, 0x83, 0xb2, 0x0c, 0xac, 0xea, 0x30, 0x60, 0x7b, 0xad, 0x0c, 0xfc, 0x95, 0x4b, 0xc7, | |
185 | 0xfb, 0xa5, 0x19, 0xa3, 0x34, 0x8c, 0x1e, 0xe3, 0x68, 0xb5, 0x5c, 0x47, 0xe1, 0x64, 0x64, 0x93, | |
186 | 0x03, 0xb0, 0x89, 0x05, 0x73, 0x6e, 0x0e, 0xfe, 0x84, 0xed, 0x7b, 0x95, 0x21, 0x5b, 0x9b, 0xf8, | |
187 | 0x2a, 0xa9, 0x6b, 0x76, 0xf1, 0xfb, 0x54, 0xbb, 0x4d, 0xd9, 0x97, 0x7f, 0xc9, 0xdb, 0x75, 0x39, | |
188 | 0xff, 0x3e, 0x08, 0xd8, 0xea, 0x13, 0x2c, 0x9f, 0x6f, 0xca, 0x4a, 0xbe, 0xf6, 0xa9, 0x97, 0x89, | |
189 | 0x8d, 0x5f, 0x8a, 0x3a, 0xe1, 0xa5, 0x3f, 0xdc, 0x23, 0xed, 0x8b, 0x6d, 0x90, 0xcd, 0x4a, 0xe4, | |
190 | 0xb3, 0x52, 0xf8, 0x12, 0x3b, 0x99, 0x27, 0x32, 0x31, 0x4e, 0xf7, 0x05, 0x90, 0xfe, 0x1f, 0x5c, | |
191 | 0xd7, 0xdf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x08, 0xd5, 0xa0, 0x89, 0xdd, 0x01, 0x00, 0x00, | |
128 | 192 | } |
129 | 193 | |
130 | 194 | // Reference imports to suppress errors if they are not otherwise used. |
170 | 234 | type DeprecatedServiceServer interface { |
171 | 235 | // DeprecatedCall takes a DeprecatedRequest and returns a DeprecatedResponse. |
172 | 236 | DeprecatedCall(context.Context, *DeprecatedRequest) (*DeprecatedResponse, error) |
237 | } | |
238 | ||
239 | // Deprecated: Do not use. | |
240 | // UnimplementedDeprecatedServiceServer can be embedded to have forward compatible implementations. | |
241 | type UnimplementedDeprecatedServiceServer struct { | |
242 | } | |
243 | ||
244 | func (*UnimplementedDeprecatedServiceServer) DeprecatedCall(ctx context.Context, req *DeprecatedRequest) (*DeprecatedResponse, error) { | |
245 | return nil, status.Errorf(codes.Unimplemented, "method DeprecatedCall not implemented") | |
173 | 246 | } |
174 | 247 | |
175 | 248 | // Deprecated: Do not use. |
207 | 280 | Streams: []grpc.StreamDesc{}, |
208 | 281 | Metadata: "deprecated/deprecated.proto", |
209 | 282 | } |
210 | ||
211 | func init() { | |
212 | proto.RegisterFile("deprecated/deprecated.proto", fileDescriptor_deprecated_9e1889ba21817fad) | |
213 | } | |
214 | ||
215 | var fileDescriptor_deprecated_9e1889ba21817fad = []byte{ | |
216 | // 248 bytes of a gzipped FileDescriptorProto | |
217 | 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4e, 0x49, 0x2d, 0x28, | |
218 | 0x4a, 0x4d, 0x4e, 0x2c, 0x49, 0x4d, 0xd1, 0x47, 0x30, 0xf5, 0x0a, 0x8a, 0xf2, 0x4b, 0xf2, 0x85, | |
219 | 0xb8, 0x10, 0x22, 0x4a, 0xe2, 0x5c, 0x82, 0x2e, 0x70, 0x5e, 0x50, 0x6a, 0x61, 0x69, 0x6a, 0x71, | |
220 | 0x89, 0x15, 0x93, 0x04, 0xa3, 0x52, 0x32, 0x97, 0x10, 0xb2, 0x44, 0x71, 0x41, 0x7e, 0x5e, 0x71, | |
221 | 0xaa, 0x90, 0x27, 0x97, 0x00, 0x42, 0x73, 0x7c, 0x5a, 0x66, 0x6a, 0x4e, 0x8a, 0x04, 0xa3, 0x02, | |
222 | 0xa3, 0x06, 0x9f, 0x91, 0x94, 0x1e, 0x92, 0x3d, 0x08, 0x9d, 0xae, 0x79, 0xa5, 0xb9, 0x4e, 0x4c, | |
223 | 0x12, 0x8c, 0x41, 0xfc, 0x08, 0x69, 0x37, 0x90, 0x36, 0x90, 0x25, 0x5a, 0x1a, 0x5c, 0x7c, 0xa8, | |
224 | 0x4a, 0x85, 0x84, 0xb8, 0xb8, 0x5c, 0x5c, 0x03, 0x82, 0x5c, 0x9d, 0x1d, 0x43, 0x5c, 0x5d, 0x04, | |
225 | 0x18, 0xa4, 0x98, 0x38, 0x18, 0xa5, 0x98, 0x24, 0x18, 0x8d, 0xf2, 0x90, 0xdd, 0x19, 0x9c, 0x5a, | |
226 | 0x54, 0x96, 0x99, 0x9c, 0x2a, 0x14, 0x82, 0xac, 0xdd, 0x39, 0x31, 0x27, 0x47, 0x48, 0x16, 0xbb, | |
227 | 0x2b, 0xa0, 0x1e, 0x93, 0x92, 0xc3, 0x25, 0x0d, 0xf1, 0x9e, 0x12, 0x73, 0x07, 0x13, 0xa3, 0x14, | |
228 | 0x88, 0x70, 0x72, 0x8c, 0xb2, 0x49, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, | |
229 | 0x4f, 0xcf, 0xcf, 0x49, 0xcc, 0x4b, 0xd7, 0x07, 0x07, 0x5f, 0x52, 0x69, 0x1a, 0x84, 0x91, 0xac, | |
230 | 0x9b, 0x9e, 0x9a, 0xa7, 0x9b, 0x9e, 0xaf, 0x5f, 0x92, 0x5a, 0x5c, 0x92, 0x92, 0x58, 0x92, 0x88, | |
231 | 0x14, 0xd2, 0x3b, 0x18, 0x19, 0x93, 0xd8, 0xc0, 0xaa, 0x8c, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, | |
232 | 0x0e, 0xf5, 0x6c, 0x87, 0x8c, 0x01, 0x00, 0x00, | |
233 | } |
48 | 48 | option deprecated = true; |
49 | 49 | // DeprecatedField contains a DeprecatedEnum. |
50 | 50 | DeprecatedEnum deprecated_field = 1 [deprecated=true]; |
51 | // DeprecatedOneof contains a deprecated field. | |
52 | oneof deprecated_oneof { | |
53 | // DeprecatedOneofField is a deprecated field. | |
54 | string deprecated_oneof_field = 2 [deprecated=true]; | |
55 | } | |
51 | 56 | } |
52 | 57 | |
53 | 58 | // DeprecatedEnum contains deprecated values. |
0 | 0 | // Code generated by protoc-gen-go. DO NOT EDIT. |
1 | 1 | // source: extension_base/extension_base.proto |
2 | 2 | |
3 | package extension_base // import "github.com/golang/protobuf/protoc-gen-go/testdata/extension_base" | |
3 | package extension_base | |
4 | 4 | |
5 | import proto "github.com/golang/protobuf/proto" | |
6 | import fmt "fmt" | |
7 | import math "math" | |
5 | import ( | |
6 | fmt "fmt" | |
7 | proto "github.com/golang/protobuf/proto" | |
8 | math "math" | |
9 | ) | |
8 | 10 | |
9 | 11 | // Reference imports to suppress errors if they are not otherwise used. |
10 | 12 | var _ = proto.Marshal |
15 | 17 | // is compatible with the proto package it is being compiled against. |
16 | 18 | // A compilation error at this line likely means your copy of the |
17 | 19 | // proto package needs to be updated. |
18 | const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package | |
20 | const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package | |
19 | 21 | |
20 | 22 | type BaseMessage struct { |
21 | 23 | Height *int32 `protobuf:"varint,1,opt,name=height" json:"height,omitempty"` |
29 | 31 | func (m *BaseMessage) String() string { return proto.CompactTextString(m) } |
30 | 32 | func (*BaseMessage) ProtoMessage() {} |
31 | 33 | func (*BaseMessage) Descriptor() ([]byte, []int) { |
32 | return fileDescriptor_extension_base_41d3c712c9fc37fc, []int{0} | |
34 | return fileDescriptor_2fbd53bac0b7ca8a, []int{0} | |
33 | 35 | } |
34 | 36 | |
35 | 37 | var extRange_BaseMessage = []proto.ExtensionRange{ |
40 | 42 | func (*BaseMessage) ExtensionRangeArray() []proto.ExtensionRange { |
41 | 43 | return extRange_BaseMessage |
42 | 44 | } |
45 | ||
43 | 46 | func (m *BaseMessage) XXX_Unmarshal(b []byte) error { |
44 | 47 | return xxx_messageInfo_BaseMessage.Unmarshal(m, b) |
45 | 48 | } |
46 | 49 | func (m *BaseMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
47 | 50 | return xxx_messageInfo_BaseMessage.Marshal(b, m, deterministic) |
48 | 51 | } |
49 | func (dst *BaseMessage) XXX_Merge(src proto.Message) { | |
50 | xxx_messageInfo_BaseMessage.Merge(dst, src) | |
52 | func (m *BaseMessage) XXX_Merge(src proto.Message) { | |
53 | xxx_messageInfo_BaseMessage.Merge(m, src) | |
51 | 54 | } |
52 | 55 | func (m *BaseMessage) XXX_Size() int { |
53 | 56 | return xxx_messageInfo_BaseMessage.Size(m) |
77 | 80 | func (m *OldStyleMessage) String() string { return proto.CompactTextString(m) } |
78 | 81 | func (*OldStyleMessage) ProtoMessage() {} |
79 | 82 | func (*OldStyleMessage) Descriptor() ([]byte, []int) { |
80 | return fileDescriptor_extension_base_41d3c712c9fc37fc, []int{1} | |
81 | } | |
82 | ||
83 | func (m *OldStyleMessage) MarshalJSON() ([]byte, error) { | |
84 | return proto.MarshalMessageSetJSON(&m.XXX_InternalExtensions) | |
85 | } | |
86 | func (m *OldStyleMessage) UnmarshalJSON(buf []byte) error { | |
87 | return proto.UnmarshalMessageSetJSON(buf, &m.XXX_InternalExtensions) | |
83 | return fileDescriptor_2fbd53bac0b7ca8a, []int{1} | |
88 | 84 | } |
89 | 85 | |
90 | 86 | var extRange_OldStyleMessage = []proto.ExtensionRange{ |
94 | 90 | func (*OldStyleMessage) ExtensionRangeArray() []proto.ExtensionRange { |
95 | 91 | return extRange_OldStyleMessage |
96 | 92 | } |
93 | ||
97 | 94 | func (m *OldStyleMessage) XXX_Unmarshal(b []byte) error { |
98 | 95 | return xxx_messageInfo_OldStyleMessage.Unmarshal(m, b) |
99 | 96 | } |
100 | 97 | func (m *OldStyleMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
101 | 98 | return xxx_messageInfo_OldStyleMessage.Marshal(b, m, deterministic) |
102 | 99 | } |
103 | func (dst *OldStyleMessage) XXX_Merge(src proto.Message) { | |
104 | xxx_messageInfo_OldStyleMessage.Merge(dst, src) | |
100 | func (m *OldStyleMessage) XXX_Merge(src proto.Message) { | |
101 | xxx_messageInfo_OldStyleMessage.Merge(m, src) | |
105 | 102 | } |
106 | 103 | func (m *OldStyleMessage) XXX_Size() int { |
107 | 104 | return xxx_messageInfo_OldStyleMessage.Size(m) |
118 | 115 | } |
119 | 116 | |
120 | 117 | func init() { |
121 | proto.RegisterFile("extension_base/extension_base.proto", fileDescriptor_extension_base_41d3c712c9fc37fc) | |
118 | proto.RegisterFile("extension_base/extension_base.proto", fileDescriptor_2fbd53bac0b7ca8a) | |
122 | 119 | } |
123 | 120 | |
124 | var fileDescriptor_extension_base_41d3c712c9fc37fc = []byte{ | |
121 | var fileDescriptor_2fbd53bac0b7ca8a = []byte{ | |
125 | 122 | // 179 bytes of a gzipped FileDescriptorProto |
126 | 123 | 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x4e, 0xad, 0x28, 0x49, |
127 | 124 | 0xcd, 0x2b, 0xce, 0xcc, 0xcf, 0x8b, 0x4f, 0x4a, 0x2c, 0x4e, 0xd5, 0x47, 0xe5, 0xea, 0x15, 0x14, |
0 | 0 | // Code generated by protoc-gen-go. DO NOT EDIT. |
1 | 1 | // source: extension_extra/extension_extra.proto |
2 | 2 | |
3 | package extension_extra // import "github.com/golang/protobuf/protoc-gen-go/testdata/extension_extra" | |
3 | package extension_extra | |
4 | 4 | |
5 | import proto "github.com/golang/protobuf/proto" | |
6 | import fmt "fmt" | |
7 | import math "math" | |
5 | import ( | |
6 | fmt "fmt" | |
7 | proto "github.com/golang/protobuf/proto" | |
8 | math "math" | |
9 | ) | |
8 | 10 | |
9 | 11 | // Reference imports to suppress errors if they are not otherwise used. |
10 | 12 | var _ = proto.Marshal |
15 | 17 | // is compatible with the proto package it is being compiled against. |
16 | 18 | // A compilation error at this line likely means your copy of the |
17 | 19 | // proto package needs to be updated. |
18 | const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package | |
20 | const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package | |
19 | 21 | |
20 | 22 | type ExtraMessage struct { |
21 | 23 | Width *int32 `protobuf:"varint,1,opt,name=width" json:"width,omitempty"` |
28 | 30 | func (m *ExtraMessage) String() string { return proto.CompactTextString(m) } |
29 | 31 | func (*ExtraMessage) ProtoMessage() {} |
30 | 32 | func (*ExtraMessage) Descriptor() ([]byte, []int) { |
31 | return fileDescriptor_extension_extra_83adf2410f49f816, []int{0} | |
33 | return fileDescriptor_fce75f5a63502cd5, []int{0} | |
32 | 34 | } |
35 | ||
33 | 36 | func (m *ExtraMessage) XXX_Unmarshal(b []byte) error { |
34 | 37 | return xxx_messageInfo_ExtraMessage.Unmarshal(m, b) |
35 | 38 | } |
36 | 39 | func (m *ExtraMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
37 | 40 | return xxx_messageInfo_ExtraMessage.Marshal(b, m, deterministic) |
38 | 41 | } |
39 | func (dst *ExtraMessage) XXX_Merge(src proto.Message) { | |
40 | xxx_messageInfo_ExtraMessage.Merge(dst, src) | |
42 | func (m *ExtraMessage) XXX_Merge(src proto.Message) { | |
43 | xxx_messageInfo_ExtraMessage.Merge(m, src) | |
41 | 44 | } |
42 | 45 | func (m *ExtraMessage) XXX_Size() int { |
43 | 46 | return xxx_messageInfo_ExtraMessage.Size(m) |
60 | 63 | } |
61 | 64 | |
62 | 65 | func init() { |
63 | proto.RegisterFile("extension_extra/extension_extra.proto", fileDescriptor_extension_extra_83adf2410f49f816) | |
66 | proto.RegisterFile("extension_extra/extension_extra.proto", fileDescriptor_fce75f5a63502cd5) | |
64 | 67 | } |
65 | 68 | |
66 | var fileDescriptor_extension_extra_83adf2410f49f816 = []byte{ | |
69 | var fileDescriptor_fce75f5a63502cd5 = []byte{ | |
67 | 70 | // 133 bytes of a gzipped FileDescriptorProto |
68 | 71 | 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x4d, 0xad, 0x28, 0x49, |
69 | 72 | 0xcd, 0x2b, 0xce, 0xcc, 0xcf, 0x8b, 0x4f, 0xad, 0x28, 0x29, 0x4a, 0xd4, 0x47, 0xe3, 0xeb, 0x15, |
0 | 0 | // Code generated by protoc-gen-go. DO NOT EDIT. |
1 | 1 | // source: extension_user/extension_user.proto |
2 | 2 | |
3 | package extension_user // import "github.com/golang/protobuf/protoc-gen-go/testdata/extension_user" | |
4 | ||
5 | import proto "github.com/golang/protobuf/proto" | |
6 | import fmt "fmt" | |
7 | import math "math" | |
8 | import extension_base "github.com/golang/protobuf/protoc-gen-go/testdata/extension_base" | |
9 | import extension_extra "github.com/golang/protobuf/protoc-gen-go/testdata/extension_extra" | |
3 | package extension_user | |
4 | ||
5 | import ( | |
6 | fmt "fmt" | |
7 | proto "github.com/golang/protobuf/proto" | |
8 | extension_base "github.com/golang/protobuf/protoc-gen-go/testdata/extension_base" | |
9 | extension_extra "github.com/golang/protobuf/protoc-gen-go/testdata/extension_extra" | |
10 | math "math" | |
11 | ) | |
10 | 12 | |
11 | 13 | // Reference imports to suppress errors if they are not otherwise used. |
12 | 14 | var _ = proto.Marshal |
17 | 19 | // is compatible with the proto package it is being compiled against. |
18 | 20 | // A compilation error at this line likely means your copy of the |
19 | 21 | // proto package needs to be updated. |
20 | const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package | |
22 | const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package | |
21 | 23 | |
22 | 24 | type UserMessage struct { |
23 | 25 | Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` |
31 | 33 | func (m *UserMessage) String() string { return proto.CompactTextString(m) } |
32 | 34 | func (*UserMessage) ProtoMessage() {} |
33 | 35 | func (*UserMessage) Descriptor() ([]byte, []int) { |
34 | return fileDescriptor_extension_user_af41b5e0bdfb7846, []int{0} | |
35 | } | |
36 | return fileDescriptor_359ba8abf543ca10, []int{0} | |
37 | } | |
38 | ||
36 | 39 | func (m *UserMessage) XXX_Unmarshal(b []byte) error { |
37 | 40 | return xxx_messageInfo_UserMessage.Unmarshal(m, b) |
38 | 41 | } |
39 | 42 | func (m *UserMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
40 | 43 | return xxx_messageInfo_UserMessage.Marshal(b, m, deterministic) |
41 | 44 | } |
42 | func (dst *UserMessage) XXX_Merge(src proto.Message) { | |
43 | xxx_messageInfo_UserMessage.Merge(dst, src) | |
45 | func (m *UserMessage) XXX_Merge(src proto.Message) { | |
46 | xxx_messageInfo_UserMessage.Merge(m, src) | |
44 | 47 | } |
45 | 48 | func (m *UserMessage) XXX_Size() int { |
46 | 49 | return xxx_messageInfo_UserMessage.Size(m) |
77 | 80 | func (m *LoudMessage) String() string { return proto.CompactTextString(m) } |
78 | 81 | func (*LoudMessage) ProtoMessage() {} |
79 | 82 | func (*LoudMessage) Descriptor() ([]byte, []int) { |
80 | return fileDescriptor_extension_user_af41b5e0bdfb7846, []int{1} | |
83 | return fileDescriptor_359ba8abf543ca10, []int{1} | |
81 | 84 | } |
82 | 85 | |
83 | 86 | var extRange_LoudMessage = []proto.ExtensionRange{ |
87 | 90 | func (*LoudMessage) ExtensionRangeArray() []proto.ExtensionRange { |
88 | 91 | return extRange_LoudMessage |
89 | 92 | } |
93 | ||
90 | 94 | func (m *LoudMessage) XXX_Unmarshal(b []byte) error { |
91 | 95 | return xxx_messageInfo_LoudMessage.Unmarshal(m, b) |
92 | 96 | } |
93 | 97 | func (m *LoudMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
94 | 98 | return xxx_messageInfo_LoudMessage.Marshal(b, m, deterministic) |
95 | 99 | } |
96 | func (dst *LoudMessage) XXX_Merge(src proto.Message) { | |
97 | xxx_messageInfo_LoudMessage.Merge(dst, src) | |
100 | func (m *LoudMessage) XXX_Merge(src proto.Message) { | |
101 | xxx_messageInfo_LoudMessage.Merge(m, src) | |
98 | 102 | } |
99 | 103 | func (m *LoudMessage) XXX_Size() int { |
100 | 104 | return xxx_messageInfo_LoudMessage.Size(m) |
125 | 129 | func (m *LoginMessage) String() string { return proto.CompactTextString(m) } |
126 | 130 | func (*LoginMessage) ProtoMessage() {} |
127 | 131 | func (*LoginMessage) Descriptor() ([]byte, []int) { |
128 | return fileDescriptor_extension_user_af41b5e0bdfb7846, []int{2} | |
129 | } | |
132 | return fileDescriptor_359ba8abf543ca10, []int{2} | |
133 | } | |
134 | ||
130 | 135 | func (m *LoginMessage) XXX_Unmarshal(b []byte) error { |
131 | 136 | return xxx_messageInfo_LoginMessage.Unmarshal(m, b) |
132 | 137 | } |
133 | 138 | func (m *LoginMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
134 | 139 | return xxx_messageInfo_LoginMessage.Marshal(b, m, deterministic) |
135 | 140 | } |
136 | func (dst *LoginMessage) XXX_Merge(src proto.Message) { | |
137 | xxx_messageInfo_LoginMessage.Merge(dst, src) | |
141 | func (m *LoginMessage) XXX_Merge(src proto.Message) { | |
142 | xxx_messageInfo_LoginMessage.Merge(m, src) | |
138 | 143 | } |
139 | 144 | func (m *LoginMessage) XXX_Size() int { |
140 | 145 | return xxx_messageInfo_LoginMessage.Size(m) |
150 | 155 | ExtensionType: (*UserMessage)(nil), |
151 | 156 | Field: 16, |
152 | 157 | Name: "extension_user.LoginMessage.user_message", |
153 | Tag: "bytes,16,opt,name=user_message,json=userMessage", | |
158 | Tag: "bytes,16,opt,name=user_message", | |
154 | 159 | Filename: "extension_user/extension_user.proto", |
155 | 160 | } |
156 | 161 | |
165 | 170 | func (m *Detail) String() string { return proto.CompactTextString(m) } |
166 | 171 | func (*Detail) ProtoMessage() {} |
167 | 172 | func (*Detail) Descriptor() ([]byte, []int) { |
168 | return fileDescriptor_extension_user_af41b5e0bdfb7846, []int{3} | |
169 | } | |
173 | return fileDescriptor_359ba8abf543ca10, []int{3} | |
174 | } | |
175 | ||
170 | 176 | func (m *Detail) XXX_Unmarshal(b []byte) error { |
171 | 177 | return xxx_messageInfo_Detail.Unmarshal(m, b) |
172 | 178 | } |
173 | 179 | func (m *Detail) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
174 | 180 | return xxx_messageInfo_Detail.Marshal(b, m, deterministic) |
175 | 181 | } |
176 | func (dst *Detail) XXX_Merge(src proto.Message) { | |
177 | xxx_messageInfo_Detail.Merge(dst, src) | |
182 | func (m *Detail) XXX_Merge(src proto.Message) { | |
183 | xxx_messageInfo_Detail.Merge(m, src) | |
178 | 184 | } |
179 | 185 | func (m *Detail) XXX_Size() int { |
180 | 186 | return xxx_messageInfo_Detail.Size(m) |
204 | 210 | func (m *Announcement) String() string { return proto.CompactTextString(m) } |
205 | 211 | func (*Announcement) ProtoMessage() {} |
206 | 212 | func (*Announcement) Descriptor() ([]byte, []int) { |
207 | return fileDescriptor_extension_user_af41b5e0bdfb7846, []int{4} | |
208 | } | |
213 | return fileDescriptor_359ba8abf543ca10, []int{4} | |
214 | } | |
215 | ||
209 | 216 | func (m *Announcement) XXX_Unmarshal(b []byte) error { |
210 | 217 | return xxx_messageInfo_Announcement.Unmarshal(m, b) |
211 | 218 | } |
212 | 219 | func (m *Announcement) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
213 | 220 | return xxx_messageInfo_Announcement.Marshal(b, m, deterministic) |
214 | 221 | } |
215 | func (dst *Announcement) XXX_Merge(src proto.Message) { | |
216 | xxx_messageInfo_Announcement.Merge(dst, src) | |
222 | func (m *Announcement) XXX_Merge(src proto.Message) { | |
223 | xxx_messageInfo_Announcement.Merge(m, src) | |
217 | 224 | } |
218 | 225 | func (m *Announcement) XXX_Size() int { |
219 | 226 | return xxx_messageInfo_Announcement.Size(m) |
236 | 243 | ExtensionType: (*Announcement)(nil), |
237 | 244 | Field: 100, |
238 | 245 | Name: "extension_user.Announcement.loud_ext", |
239 | Tag: "bytes,100,opt,name=loud_ext,json=loudExt", | |
246 | Tag: "bytes,100,opt,name=loud_ext", | |
240 | 247 | Filename: "extension_user/extension_user.proto", |
241 | 248 | } |
242 | 249 | |
253 | 260 | func (m *OldStyleParcel) String() string { return proto.CompactTextString(m) } |
254 | 261 | func (*OldStyleParcel) ProtoMessage() {} |
255 | 262 | func (*OldStyleParcel) Descriptor() ([]byte, []int) { |
256 | return fileDescriptor_extension_user_af41b5e0bdfb7846, []int{5} | |
257 | } | |
263 | return fileDescriptor_359ba8abf543ca10, []int{5} | |
264 | } | |
265 | ||
258 | 266 | func (m *OldStyleParcel) XXX_Unmarshal(b []byte) error { |
259 | 267 | return xxx_messageInfo_OldStyleParcel.Unmarshal(m, b) |
260 | 268 | } |
261 | 269 | func (m *OldStyleParcel) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
262 | 270 | return xxx_messageInfo_OldStyleParcel.Marshal(b, m, deterministic) |
263 | 271 | } |
264 | func (dst *OldStyleParcel) XXX_Merge(src proto.Message) { | |
265 | xxx_messageInfo_OldStyleParcel.Merge(dst, src) | |
272 | func (m *OldStyleParcel) XXX_Merge(src proto.Message) { | |
273 | xxx_messageInfo_OldStyleParcel.Merge(m, src) | |
266 | 274 | } |
267 | 275 | func (m *OldStyleParcel) XXX_Size() int { |
268 | 276 | return xxx_messageInfo_OldStyleParcel.Size(m) |
292 | 300 | ExtensionType: (*OldStyleParcel)(nil), |
293 | 301 | Field: 2001, |
294 | 302 | Name: "extension_user.OldStyleParcel", |
295 | Tag: "bytes,2001,opt,name=message_set_extension,json=messageSetExtension", | |
303 | Tag: "bytes,2001,opt,name=message_set_extension", | |
296 | 304 | Filename: "extension_user/extension_user.proto", |
297 | 305 | } |
298 | 306 | |
301 | 309 | ExtensionType: (*UserMessage)(nil), |
302 | 310 | Field: 5, |
303 | 311 | Name: "extension_user.user_message", |
304 | Tag: "bytes,5,opt,name=user_message,json=userMessage", | |
312 | Tag: "bytes,5,opt,name=user_message", | |
305 | 313 | Filename: "extension_user/extension_user.proto", |
306 | 314 | } |
307 | 315 | |
310 | 318 | ExtensionType: (*extension_extra.ExtraMessage)(nil), |
311 | 319 | Field: 9, |
312 | 320 | Name: "extension_user.extra_message", |
313 | Tag: "bytes,9,opt,name=extra_message,json=extraMessage", | |
321 | Tag: "bytes,9,opt,name=extra_message", | |
314 | 322 | Filename: "extension_user/extension_user.proto", |
315 | 323 | } |
316 | 324 | |
343 | 351 | |
344 | 352 | func init() { |
345 | 353 | proto.RegisterType((*UserMessage)(nil), "extension_user.UserMessage") |
354 | proto.RegisterExtension(E_LoudMessage_Volume) | |
346 | 355 | proto.RegisterType((*LoudMessage)(nil), "extension_user.LoudMessage") |
356 | proto.RegisterExtension(E_LoginMessage_UserMessage) | |
347 | 357 | proto.RegisterType((*LoginMessage)(nil), "extension_user.LoginMessage") |
348 | 358 | proto.RegisterType((*Detail)(nil), "extension_user.Detail") |
359 | proto.RegisterExtension(E_Announcement_LoudExt) | |
349 | 360 | proto.RegisterType((*Announcement)(nil), "extension_user.Announcement") |
350 | proto.RegisterMessageSetType((*OldStyleParcel)(nil), 2001, "extension_user.OldStyleParcel") | |
361 | proto.RegisterExtension(E_OldStyleParcel_MessageSetExtension) | |
351 | 362 | proto.RegisterType((*OldStyleParcel)(nil), "extension_user.OldStyleParcel") |
352 | proto.RegisterExtension(E_LoudMessage_Volume) | |
353 | proto.RegisterExtension(E_LoginMessage_UserMessage) | |
354 | proto.RegisterExtension(E_Announcement_LoudExt) | |
355 | proto.RegisterExtension(E_OldStyleParcel_MessageSetExtension) | |
356 | 363 | proto.RegisterExtension(E_UserMessage) |
357 | 364 | proto.RegisterExtension(E_ExtraMessage) |
358 | 365 | proto.RegisterExtension(E_Width) |
361 | 368 | } |
362 | 369 | |
363 | 370 | func init() { |
364 | proto.RegisterFile("extension_user/extension_user.proto", fileDescriptor_extension_user_af41b5e0bdfb7846) | |
365 | } | |
366 | ||
367 | var fileDescriptor_extension_user_af41b5e0bdfb7846 = []byte{ | |
371 | proto.RegisterFile("extension_user/extension_user.proto", fileDescriptor_359ba8abf543ca10) | |
372 | } | |
373 | ||
374 | var fileDescriptor_359ba8abf543ca10 = []byte{ | |
368 | 375 | // 492 bytes of a gzipped FileDescriptorProto |
369 | 376 | 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x54, 0x51, 0x6f, 0x94, 0x40, |
370 | 377 | 0x10, 0x0e, 0x6d, 0x8f, 0x5e, 0x87, 0x6b, 0xad, 0xa8, 0xcd, 0xa5, 0x6a, 0x25, 0x18, 0x13, 0x62, |
0 | 0 | // Code generated by protoc-gen-go. DO NOT EDIT. |
1 | 1 | // source: grpc/grpc.proto |
2 | 2 | |
3 | package testing // import "github.com/golang/protobuf/protoc-gen-go/testdata/grpc" | |
4 | ||
5 | import proto "github.com/golang/protobuf/proto" | |
6 | import fmt "fmt" | |
7 | import math "math" | |
3 | package testing | |
8 | 4 | |
9 | 5 | import ( |
10 | context "golang.org/x/net/context" | |
6 | context "context" | |
7 | fmt "fmt" | |
8 | proto "github.com/golang/protobuf/proto" | |
11 | 9 | grpc "google.golang.org/grpc" |
10 | codes "google.golang.org/grpc/codes" | |
11 | status "google.golang.org/grpc/status" | |
12 | math "math" | |
12 | 13 | ) |
13 | 14 | |
14 | 15 | // Reference imports to suppress errors if they are not otherwise used. |
20 | 21 | // is compatible with the proto package it is being compiled against. |
21 | 22 | // A compilation error at this line likely means your copy of the |
22 | 23 | // proto package needs to be updated. |
23 | const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package | |
24 | const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package | |
24 | 25 | |
25 | 26 | type SimpleRequest struct { |
26 | 27 | XXX_NoUnkeyedLiteral struct{} `json:"-"` |
32 | 33 | func (m *SimpleRequest) String() string { return proto.CompactTextString(m) } |
33 | 34 | func (*SimpleRequest) ProtoMessage() {} |
34 | 35 | func (*SimpleRequest) Descriptor() ([]byte, []int) { |
35 | return fileDescriptor_grpc_65bf3902e49ee873, []int{0} | |
36 | } | |
36 | return fileDescriptor_81ea47a3f88c2082, []int{0} | |
37 | } | |
38 | ||
37 | 39 | func (m *SimpleRequest) XXX_Unmarshal(b []byte) error { |
38 | 40 | return xxx_messageInfo_SimpleRequest.Unmarshal(m, b) |
39 | 41 | } |
40 | 42 | func (m *SimpleRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
41 | 43 | return xxx_messageInfo_SimpleRequest.Marshal(b, m, deterministic) |
42 | 44 | } |
43 | func (dst *SimpleRequest) XXX_Merge(src proto.Message) { | |
44 | xxx_messageInfo_SimpleRequest.Merge(dst, src) | |
45 | func (m *SimpleRequest) XXX_Merge(src proto.Message) { | |
46 | xxx_messageInfo_SimpleRequest.Merge(m, src) | |
45 | 47 | } |
46 | 48 | func (m *SimpleRequest) XXX_Size() int { |
47 | 49 | return xxx_messageInfo_SimpleRequest.Size(m) |
62 | 64 | func (m *SimpleResponse) String() string { return proto.CompactTextString(m) } |
63 | 65 | func (*SimpleResponse) ProtoMessage() {} |
64 | 66 | func (*SimpleResponse) Descriptor() ([]byte, []int) { |
65 | return fileDescriptor_grpc_65bf3902e49ee873, []int{1} | |
66 | } | |
67 | return fileDescriptor_81ea47a3f88c2082, []int{1} | |
68 | } | |
69 | ||
67 | 70 | func (m *SimpleResponse) XXX_Unmarshal(b []byte) error { |
68 | 71 | return xxx_messageInfo_SimpleResponse.Unmarshal(m, b) |
69 | 72 | } |
70 | 73 | func (m *SimpleResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
71 | 74 | return xxx_messageInfo_SimpleResponse.Marshal(b, m, deterministic) |
72 | 75 | } |
73 | func (dst *SimpleResponse) XXX_Merge(src proto.Message) { | |
74 | xxx_messageInfo_SimpleResponse.Merge(dst, src) | |
76 | func (m *SimpleResponse) XXX_Merge(src proto.Message) { | |
77 | xxx_messageInfo_SimpleResponse.Merge(m, src) | |
75 | 78 | } |
76 | 79 | func (m *SimpleResponse) XXX_Size() int { |
77 | 80 | return xxx_messageInfo_SimpleResponse.Size(m) |
92 | 95 | func (m *StreamMsg) String() string { return proto.CompactTextString(m) } |
93 | 96 | func (*StreamMsg) ProtoMessage() {} |
94 | 97 | func (*StreamMsg) Descriptor() ([]byte, []int) { |
95 | return fileDescriptor_grpc_65bf3902e49ee873, []int{2} | |
96 | } | |
98 | return fileDescriptor_81ea47a3f88c2082, []int{2} | |
99 | } | |
100 | ||
97 | 101 | func (m *StreamMsg) XXX_Unmarshal(b []byte) error { |
98 | 102 | return xxx_messageInfo_StreamMsg.Unmarshal(m, b) |
99 | 103 | } |
100 | 104 | func (m *StreamMsg) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
101 | 105 | return xxx_messageInfo_StreamMsg.Marshal(b, m, deterministic) |
102 | 106 | } |
103 | func (dst *StreamMsg) XXX_Merge(src proto.Message) { | |
104 | xxx_messageInfo_StreamMsg.Merge(dst, src) | |
107 | func (m *StreamMsg) XXX_Merge(src proto.Message) { | |
108 | xxx_messageInfo_StreamMsg.Merge(m, src) | |
105 | 109 | } |
106 | 110 | func (m *StreamMsg) XXX_Size() int { |
107 | 111 | return xxx_messageInfo_StreamMsg.Size(m) |
122 | 126 | func (m *StreamMsg2) String() string { return proto.CompactTextString(m) } |
123 | 127 | func (*StreamMsg2) ProtoMessage() {} |
124 | 128 | func (*StreamMsg2) Descriptor() ([]byte, []int) { |
125 | return fileDescriptor_grpc_65bf3902e49ee873, []int{3} | |
126 | } | |
129 | return fileDescriptor_81ea47a3f88c2082, []int{3} | |
130 | } | |
131 | ||
127 | 132 | func (m *StreamMsg2) XXX_Unmarshal(b []byte) error { |
128 | 133 | return xxx_messageInfo_StreamMsg2.Unmarshal(m, b) |
129 | 134 | } |
130 | 135 | func (m *StreamMsg2) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
131 | 136 | return xxx_messageInfo_StreamMsg2.Marshal(b, m, deterministic) |
132 | 137 | } |
133 | func (dst *StreamMsg2) XXX_Merge(src proto.Message) { | |
134 | xxx_messageInfo_StreamMsg2.Merge(dst, src) | |
138 | func (m *StreamMsg2) XXX_Merge(src proto.Message) { | |
139 | xxx_messageInfo_StreamMsg2.Merge(m, src) | |
135 | 140 | } |
136 | 141 | func (m *StreamMsg2) XXX_Size() int { |
137 | 142 | return xxx_messageInfo_StreamMsg2.Size(m) |
147 | 152 | proto.RegisterType((*SimpleResponse)(nil), "grpc.testing.SimpleResponse") |
148 | 153 | proto.RegisterType((*StreamMsg)(nil), "grpc.testing.StreamMsg") |
149 | 154 | proto.RegisterType((*StreamMsg2)(nil), "grpc.testing.StreamMsg2") |
155 | } | |
156 | ||
157 | func init() { proto.RegisterFile("grpc/grpc.proto", fileDescriptor_81ea47a3f88c2082) } | |
158 | ||
159 | var fileDescriptor_81ea47a3f88c2082 = []byte{ | |
160 | // 244 bytes of a gzipped FileDescriptorProto | |
161 | 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x4f, 0x2f, 0x2a, 0x48, | |
162 | 0xd6, 0x07, 0x11, 0x7a, 0x05, 0x45, 0xf9, 0x25, 0xf9, 0x42, 0x3c, 0x60, 0x76, 0x49, 0x6a, 0x71, | |
163 | 0x49, 0x66, 0x5e, 0xba, 0x12, 0x3f, 0x17, 0x6f, 0x70, 0x66, 0x6e, 0x41, 0x4e, 0x6a, 0x50, 0x6a, | |
164 | 0x61, 0x69, 0x6a, 0x71, 0x89, 0x92, 0x00, 0x17, 0x1f, 0x4c, 0xa0, 0xb8, 0x20, 0x3f, 0xaf, 0x38, | |
165 | 0x55, 0x89, 0x9b, 0x8b, 0x33, 0xb8, 0xa4, 0x28, 0x35, 0x31, 0xd7, 0xb7, 0x38, 0x5d, 0x89, 0x87, | |
166 | 0x8b, 0x0b, 0xce, 0x31, 0x32, 0x9a, 0xc1, 0xc4, 0xc5, 0x12, 0x92, 0x5a, 0x5c, 0x22, 0xe4, 0xc6, | |
167 | 0xc5, 0x19, 0x9a, 0x97, 0x58, 0x54, 0xe9, 0x9c, 0x98, 0x93, 0x23, 0x24, 0xad, 0x87, 0x6c, 0x85, | |
168 | 0x1e, 0x8a, 0xf9, 0x52, 0x32, 0xd8, 0x25, 0x21, 0x76, 0x09, 0xb9, 0x70, 0x71, 0xb9, 0xe4, 0x97, | |
169 | 0xe7, 0x15, 0x83, 0xad, 0xc0, 0x6f, 0x90, 0x38, 0x9a, 0x24, 0xcc, 0x55, 0x06, 0x8c, 0x42, 0xce, | |
170 | 0x5c, 0x1c, 0xa1, 0x05, 0x50, 0x33, 0x70, 0x29, 0xc3, 0xef, 0x10, 0x0d, 0x46, 0x21, 0x5b, 0x2e, | |
171 | 0x16, 0xa7, 0xcc, 0x94, 0x4c, 0xdc, 0x06, 0x48, 0xe0, 0x90, 0x30, 0xd2, 0x60, 0x34, 0x60, 0x74, | |
172 | 0x72, 0x88, 0xb2, 0x4b, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x4f, 0xcf, | |
173 | 0xcf, 0x49, 0xcc, 0x4b, 0xd7, 0x07, 0xc7, 0x40, 0x52, 0x69, 0x1a, 0x84, 0x91, 0xac, 0x9b, 0x9e, | |
174 | 0x9a, 0xa7, 0x9b, 0x9e, 0xaf, 0x0f, 0x32, 0x22, 0x25, 0xb1, 0x24, 0x11, 0x1c, 0x4d, 0xd6, 0x50, | |
175 | 0x03, 0x93, 0xd8, 0xc0, 0x8a, 0x8c, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0x90, 0xb9, 0x95, 0x42, | |
176 | 0xc2, 0x01, 0x00, 0x00, | |
150 | 177 | } |
151 | 178 | |
152 | 179 | // Reference imports to suppress errors if they are not otherwise used. |
293 | 320 | Upstream(Test_UpstreamServer) error |
294 | 321 | // This one streams in both directions. |
295 | 322 | Bidi(Test_BidiServer) error |
323 | } | |
324 | ||
325 | // UnimplementedTestServer can be embedded to have forward compatible implementations. | |
326 | type UnimplementedTestServer struct { | |
327 | } | |
328 | ||
329 | func (*UnimplementedTestServer) UnaryCall(ctx context.Context, req *SimpleRequest) (*SimpleResponse, error) { | |
330 | return nil, status.Errorf(codes.Unimplemented, "method UnaryCall not implemented") | |
331 | } | |
332 | func (*UnimplementedTestServer) Downstream(req *SimpleRequest, srv Test_DownstreamServer) error { | |
333 | return status.Errorf(codes.Unimplemented, "method Downstream not implemented") | |
334 | } | |
335 | func (*UnimplementedTestServer) Upstream(srv Test_UpstreamServer) error { | |
336 | return status.Errorf(codes.Unimplemented, "method Upstream not implemented") | |
337 | } | |
338 | func (*UnimplementedTestServer) Bidi(srv Test_BidiServer) error { | |
339 | return status.Errorf(codes.Unimplemented, "method Bidi not implemented") | |
296 | 340 | } |
297 | 341 | |
298 | 342 | func RegisterTestServer(s *grpc.Server, srv TestServer) { |
419 | 463 | }, |
420 | 464 | Metadata: "grpc/grpc.proto", |
421 | 465 | } |
422 | ||
423 | func init() { proto.RegisterFile("grpc/grpc.proto", fileDescriptor_grpc_65bf3902e49ee873) } | |
424 | ||
425 | var fileDescriptor_grpc_65bf3902e49ee873 = []byte{ | |
426 | // 244 bytes of a gzipped FileDescriptorProto | |
427 | 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x4f, 0x2f, 0x2a, 0x48, | |
428 | 0xd6, 0x07, 0x11, 0x7a, 0x05, 0x45, 0xf9, 0x25, 0xf9, 0x42, 0x3c, 0x60, 0x76, 0x49, 0x6a, 0x71, | |
429 | 0x49, 0x66, 0x5e, 0xba, 0x12, 0x3f, 0x17, 0x6f, 0x70, 0x66, 0x6e, 0x41, 0x4e, 0x6a, 0x50, 0x6a, | |
430 | 0x61, 0x69, 0x6a, 0x71, 0x89, 0x92, 0x00, 0x17, 0x1f, 0x4c, 0xa0, 0xb8, 0x20, 0x3f, 0xaf, 0x38, | |
431 | 0x55, 0x89, 0x9b, 0x8b, 0x33, 0xb8, 0xa4, 0x28, 0x35, 0x31, 0xd7, 0xb7, 0x38, 0x5d, 0x89, 0x87, | |
432 | 0x8b, 0x0b, 0xce, 0x31, 0x32, 0x9a, 0xc1, 0xc4, 0xc5, 0x12, 0x92, 0x5a, 0x5c, 0x22, 0xe4, 0xc6, | |
433 | 0xc5, 0x19, 0x9a, 0x97, 0x58, 0x54, 0xe9, 0x9c, 0x98, 0x93, 0x23, 0x24, 0xad, 0x87, 0x6c, 0x85, | |
434 | 0x1e, 0x8a, 0xf9, 0x52, 0x32, 0xd8, 0x25, 0x21, 0x76, 0x09, 0xb9, 0x70, 0x71, 0xb9, 0xe4, 0x97, | |
435 | 0xe7, 0x15, 0x83, 0xad, 0xc0, 0x6f, 0x90, 0x38, 0x9a, 0x24, 0xcc, 0x55, 0x06, 0x8c, 0x42, 0xce, | |
436 | 0x5c, 0x1c, 0xa1, 0x05, 0x50, 0x33, 0x70, 0x29, 0xc3, 0xef, 0x10, 0x0d, 0x46, 0x21, 0x5b, 0x2e, | |
437 | 0x16, 0xa7, 0xcc, 0x94, 0x4c, 0xdc, 0x06, 0x48, 0xe0, 0x90, 0x30, 0xd2, 0x60, 0x34, 0x60, 0x74, | |
438 | 0x72, 0x88, 0xb2, 0x4b, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x4f, 0xcf, | |
439 | 0xcf, 0x49, 0xcc, 0x4b, 0xd7, 0x07, 0xc7, 0x40, 0x52, 0x69, 0x1a, 0x84, 0x91, 0xac, 0x9b, 0x9e, | |
440 | 0x9a, 0xa7, 0x9b, 0x9e, 0xaf, 0x0f, 0x32, 0x22, 0x25, 0xb1, 0x24, 0x11, 0x1c, 0x4d, 0xd6, 0x50, | |
441 | 0x03, 0x93, 0xd8, 0xc0, 0x8a, 0x8c, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0x90, 0xb9, 0x95, 0x42, | |
442 | 0xc2, 0x01, 0x00, 0x00, | |
443 | } |
0 | // Code generated by protoc-gen-go. DO NOT EDIT. | |
1 | // source: grpc/grpc_empty.proto | |
2 | ||
3 | package testing | |
4 | ||
5 | import ( | |
6 | context "context" | |
7 | fmt "fmt" | |
8 | proto "github.com/golang/protobuf/proto" | |
9 | grpc "google.golang.org/grpc" | |
10 | math "math" | |
11 | ) | |
12 | ||
13 | // Reference imports to suppress errors if they are not otherwise used. | |
14 | var _ = proto.Marshal | |
15 | var _ = fmt.Errorf | |
16 | var _ = math.Inf | |
17 | ||
18 | // This is a compile-time assertion to ensure that this generated file | |
19 | // is compatible with the proto package it is being compiled against. | |
20 | // A compilation error at this line likely means your copy of the | |
21 | // proto package needs to be updated. | |
22 | const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package | |
23 | ||
24 | func init() { proto.RegisterFile("grpc/grpc_empty.proto", fileDescriptor_c580a37f1c90e9b1) } | |
25 | ||
26 | var fileDescriptor_c580a37f1c90e9b1 = []byte{ | |
27 | // 125 bytes of a gzipped FileDescriptorProto | |
28 | 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x4d, 0x2f, 0x2a, 0x48, | |
29 | 0xd6, 0x07, 0x11, 0xf1, 0xa9, 0xb9, 0x05, 0x25, 0x95, 0x7a, 0x05, 0x45, 0xf9, 0x25, 0xf9, 0x42, | |
30 | 0x3c, 0x20, 0x11, 0xbd, 0x92, 0xd4, 0xe2, 0x92, 0xcc, 0xbc, 0x74, 0x23, 0x3e, 0x2e, 0x1e, 0x57, | |
31 | 0x90, 0x64, 0x70, 0x6a, 0x51, 0x59, 0x66, 0x72, 0xaa, 0x93, 0x43, 0x94, 0x5d, 0x7a, 0x66, 0x49, | |
32 | 0x46, 0x69, 0x92, 0x5e, 0x72, 0x7e, 0xae, 0x7e, 0x7a, 0x7e, 0x4e, 0x62, 0x5e, 0xba, 0x3e, 0x58, | |
33 | 0x63, 0x52, 0x69, 0x1a, 0x84, 0x91, 0xac, 0x9b, 0x9e, 0x9a, 0xa7, 0x9b, 0x9e, 0xaf, 0x0f, 0x32, | |
34 | 0x23, 0x25, 0xb1, 0x24, 0x11, 0x6c, 0x87, 0x35, 0xd4, 0xc4, 0x24, 0x36, 0xb0, 0x22, 0x63, 0x40, | |
35 | 0x00, 0x00, 0x00, 0xff, 0xff, 0x93, 0x1d, 0xf2, 0x47, 0x7f, 0x00, 0x00, 0x00, | |
36 | } | |
37 | ||
38 | // Reference imports to suppress errors if they are not otherwise used. | |
39 | var _ context.Context | |
40 | var _ grpc.ClientConn | |
41 | ||
42 | // This is a compile-time assertion to ensure that this generated file | |
43 | // is compatible with the grpc package it is being compiled against. | |
44 | const _ = grpc.SupportPackageIsVersion4 | |
45 | ||
46 | // EmptyServiceClient is the client API for EmptyService service. | |
47 | // | |
48 | // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. | |
49 | type EmptyServiceClient interface { | |
50 | } | |
51 | ||
52 | type emptyServiceClient struct { | |
53 | cc *grpc.ClientConn | |
54 | } | |
55 | ||
56 | func NewEmptyServiceClient(cc *grpc.ClientConn) EmptyServiceClient { | |
57 | return &emptyServiceClient{cc} | |
58 | } | |
59 | ||
60 | // EmptyServiceServer is the server API for EmptyService service. | |
61 | type EmptyServiceServer interface { | |
62 | } | |
63 | ||
64 | // UnimplementedEmptyServiceServer can be embedded to have forward compatible implementations. | |
65 | type UnimplementedEmptyServiceServer struct { | |
66 | } | |
67 | ||
68 | func RegisterEmptyServiceServer(s *grpc.Server, srv EmptyServiceServer) { | |
69 | s.RegisterService(&_EmptyService_serviceDesc, srv) | |
70 | } | |
71 | ||
72 | var _EmptyService_serviceDesc = grpc.ServiceDesc{ | |
73 | ServiceName: "grpc.testing.EmptyService", | |
74 | HandlerType: (*EmptyServiceServer)(nil), | |
75 | Methods: []grpc.MethodDesc{}, | |
76 | Streams: []grpc.StreamDesc{}, | |
77 | Metadata: "grpc/grpc_empty.proto", | |
78 | } |
0 | // Go support for Protocol Buffers - Google's data interchange format | |
1 | // | |
2 | // Copyright 2019 The Go Authors. All rights reserved. | |
3 | // https://github.com/golang/protobuf | |
4 | // | |
5 | // Redistribution and use in source and binary forms, with or without | |
6 | // modification, are permitted provided that the following conditions are | |
7 | // met: | |
8 | // | |
9 | // * Redistributions of source code must retain the above copyright | |
10 | // notice, this list of conditions and the following disclaimer. | |
11 | // * Redistributions in binary form must reproduce the above | |
12 | // copyright notice, this list of conditions and the following disclaimer | |
13 | // in the documentation and/or other materials provided with the | |
14 | // distribution. | |
15 | // * Neither the name of Google Inc. nor the names of its | |
16 | // contributors may be used to endorse or promote products derived from | |
17 | // this software without specific prior written permission. | |
18 | // | |
19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | |
20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | |
21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | |
22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | |
23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | |
24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | |
25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | |
26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | |
27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | |
28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | |
29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |
30 | ||
31 | syntax = "proto3"; | |
32 | ||
33 | package grpc.testing; | |
34 | ||
35 | option go_package = "github.com/golang/protobuf/protoc-gen-go/testdata/grpc;testing"; | |
36 | ||
37 | service EmptyService {} |
0 | 0 | // Code generated by protoc-gen-go. DO NOT EDIT. |
1 | 1 | // source: import_public/a.proto |
2 | 2 | |
3 | package import_public // import "github.com/golang/protobuf/protoc-gen-go/testdata/import_public" | |
3 | package import_public | |
4 | 4 | |
5 | import proto "github.com/golang/protobuf/proto" | |
6 | import fmt "fmt" | |
7 | import math "math" | |
8 | import sub "github.com/golang/protobuf/protoc-gen-go/testdata/import_public/sub" | |
5 | import ( | |
6 | fmt "fmt" | |
7 | proto "github.com/golang/protobuf/proto" | |
8 | sub "github.com/golang/protobuf/protoc-gen-go/testdata/import_public/sub" | |
9 | math "math" | |
10 | ) | |
9 | 11 | |
10 | 12 | // Reference imports to suppress errors if they are not otherwise used. |
11 | 13 | var _ = proto.Marshal |
16 | 18 | // is compatible with the proto package it is being compiled against. |
17 | 19 | // A compilation error at this line likely means your copy of the |
18 | 20 | // proto package needs to be updated. |
19 | const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package | |
21 | const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package | |
22 | ||
23 | const Default_M_DefaultField = sub.Default_M_DefaultField | |
20 | 24 | |
21 | 25 | // M from public import import_public/sub/a.proto |
22 | 26 | type M = sub.M |
27 | type M_OneofInt32 = sub.M_OneofInt32 | |
28 | type M_OneofInt64 = sub.M_OneofInt64 | |
29 | ||
30 | // M_Grouping from public import import_public/sub/a.proto | |
31 | type M_Grouping = sub.M_Grouping | |
32 | ||
33 | // M_Submessage from public import import_public/sub/a.proto | |
34 | type M_Submessage = sub.M_Submessage | |
35 | type M_Submessage_SubmessageOneofInt32 = sub.M_Submessage_SubmessageOneofInt32 | |
36 | type M_Submessage_SubmessageOneofInt64 = sub.M_Submessage_SubmessageOneofInt64 | |
23 | 37 | |
24 | 38 | // E from public import import_public/sub/a.proto |
25 | 39 | type E = sub.E |
29 | 43 | |
30 | 44 | const E_ZERO = E(sub.E_ZERO) |
31 | 45 | |
32 | // Ignoring public import of Local from import_public/b.proto | |
46 | // M_Subenum from public import import_public/sub/a.proto | |
47 | type M_Subenum = sub.M_Subenum | |
48 | ||
49 | var M_Subenum_name = sub.M_Subenum_name | |
50 | var M_Subenum_value = sub.M_Subenum_value | |
51 | ||
52 | const M_M_ZERO = M_Subenum(sub.M_M_ZERO) | |
53 | ||
54 | // M_Submessage_Submessage_Subenum from public import import_public/sub/a.proto | |
55 | type M_Submessage_Submessage_Subenum = sub.M_Submessage_Submessage_Subenum | |
56 | ||
57 | var M_Submessage_Submessage_Subenum_name = sub.M_Submessage_Submessage_Subenum_name | |
58 | var M_Submessage_Submessage_Subenum_value = sub.M_Submessage_Submessage_Subenum_value | |
59 | ||
60 | const M_Submessage_M_SUBMESSAGE_ZERO = M_Submessage_Submessage_Subenum(sub.M_Submessage_M_SUBMESSAGE_ZERO) | |
61 | ||
62 | var E_ExtensionField = sub.E_ExtensionField | |
33 | 63 | |
34 | 64 | type Public struct { |
35 | M *sub.M `protobuf:"bytes,1,opt,name=m,proto3" json:"m,omitempty"` | |
36 | E sub.E `protobuf:"varint,2,opt,name=e,proto3,enum=goproto.test.import_public.sub.E" json:"e,omitempty"` | |
37 | Local *Local `protobuf:"bytes,3,opt,name=local,proto3" json:"local,omitempty"` | |
65 | M *sub.M `protobuf:"bytes,1,opt,name=m" json:"m,omitempty"` | |
66 | E *sub.E `protobuf:"varint,2,opt,name=e,enum=goproto.test.import_public.sub.E" json:"e,omitempty"` | |
67 | Local *Local `protobuf:"bytes,3,opt,name=local" json:"local,omitempty"` | |
38 | 68 | XXX_NoUnkeyedLiteral struct{} `json:"-"` |
39 | 69 | XXX_unrecognized []byte `json:"-"` |
40 | 70 | XXX_sizecache int32 `json:"-"` |
44 | 74 | func (m *Public) String() string { return proto.CompactTextString(m) } |
45 | 75 | func (*Public) ProtoMessage() {} |
46 | 76 | func (*Public) Descriptor() ([]byte, []int) { |
47 | return fileDescriptor_a_c0314c022b7c17d8, []int{0} | |
77 | return fileDescriptor_73b7577c95fa6b70, []int{0} | |
48 | 78 | } |
79 | ||
49 | 80 | func (m *Public) XXX_Unmarshal(b []byte) error { |
50 | 81 | return xxx_messageInfo_Public.Unmarshal(m, b) |
51 | 82 | } |
52 | 83 | func (m *Public) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
53 | 84 | return xxx_messageInfo_Public.Marshal(b, m, deterministic) |
54 | 85 | } |
55 | func (dst *Public) XXX_Merge(src proto.Message) { | |
56 | xxx_messageInfo_Public.Merge(dst, src) | |
86 | func (m *Public) XXX_Merge(src proto.Message) { | |
87 | xxx_messageInfo_Public.Merge(m, src) | |
57 | 88 | } |
58 | 89 | func (m *Public) XXX_Size() int { |
59 | 90 | return xxx_messageInfo_Public.Size(m) |
72 | 103 | } |
73 | 104 | |
74 | 105 | func (m *Public) GetE() sub.E { |
75 | if m != nil { | |
76 | return m.E | |
106 | if m != nil && m.E != nil { | |
107 | return *m.E | |
77 | 108 | } |
78 | 109 | return sub.E_ZERO |
79 | 110 | } |
89 | 120 | proto.RegisterType((*Public)(nil), "goproto.test.import_public.Public") |
90 | 121 | } |
91 | 122 | |
92 | func init() { proto.RegisterFile("import_public/a.proto", fileDescriptor_a_c0314c022b7c17d8) } | |
123 | func init() { proto.RegisterFile("import_public/a.proto", fileDescriptor_73b7577c95fa6b70) } | |
93 | 124 | |
94 | var fileDescriptor_a_c0314c022b7c17d8 = []byte{ | |
95 | // 200 bytes of a gzipped FileDescriptorProto | |
125 | var fileDescriptor_73b7577c95fa6b70 = []byte{ | |
126 | // 195 bytes of a gzipped FileDescriptorProto | |
96 | 127 | 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0xcd, 0xcc, 0x2d, 0xc8, |
97 | 128 | 0x2f, 0x2a, 0x89, 0x2f, 0x28, 0x4d, 0xca, 0xc9, 0x4c, 0xd6, 0x4f, 0xd4, 0x2b, 0x28, 0xca, 0x2f, |
98 | 129 | 0xc9, 0x17, 0x92, 0x4a, 0xcf, 0x07, 0x33, 0xf4, 0x4a, 0x52, 0x8b, 0x4b, 0xf4, 0x50, 0xd4, 0x48, |
104 | 135 | 0x04, 0x51, 0xef, 0xe4, 0x18, 0x65, 0x9f, 0x9e, 0x59, 0x92, 0x51, 0x9a, 0xa4, 0x97, 0x9c, 0x9f, |
105 | 136 | 0xab, 0x9f, 0x9e, 0x9f, 0x93, 0x98, 0x97, 0xae, 0x0f, 0xd6, 0x9a, 0x54, 0x9a, 0x06, 0x61, 0x24, |
106 | 137 | 0xeb, 0xa6, 0xa7, 0xe6, 0xe9, 0xa6, 0xe7, 0xeb, 0x83, 0xcc, 0x4a, 0x49, 0x2c, 0x49, 0xd4, 0x47, |
107 | 0x31, 0x2f, 0x80, 0x21, 0x80, 0x31, 0x89, 0x0d, 0xac, 0xd2, 0x18, 0x10, 0x00, 0x00, 0xff, 0xff, | |
108 | 0x70, 0xc5, 0xc3, 0x79, 0x5a, 0x01, 0x00, 0x00, | |
138 | 0x31, 0x2f, 0x80, 0x21, 0x80, 0x11, 0x10, 0x00, 0x00, 0xff, 0xff, 0x17, 0x83, 0x2d, 0xd4, 0x52, | |
139 | 0x01, 0x00, 0x00, | |
109 | 140 | } |
28 | 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
29 | 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
30 | 30 | |
31 | syntax = "proto3"; | |
31 | syntax = "proto2"; | |
32 | 32 | |
33 | 33 | package goproto.test.import_public; |
34 | 34 | |
38 | 38 | import public "import_public/b.proto"; // Same Go package. |
39 | 39 | |
40 | 40 | message Public { |
41 | goproto.test.import_public.sub.M m = 1; | |
42 | goproto.test.import_public.sub.E e = 2; | |
43 | Local local = 3; | |
41 | optional goproto.test.import_public.sub.M m = 1; | |
42 | optional goproto.test.import_public.sub.E e = 2; | |
43 | optional Local local = 3; | |
44 | 44 | } |
0 | 0 | // Code generated by protoc-gen-go. DO NOT EDIT. |
1 | 1 | // source: import_public/b.proto |
2 | 2 | |
3 | package import_public // import "github.com/golang/protobuf/protoc-gen-go/testdata/import_public" | |
3 | package import_public | |
4 | 4 | |
5 | import proto "github.com/golang/protobuf/proto" | |
6 | import fmt "fmt" | |
7 | import math "math" | |
8 | import sub "github.com/golang/protobuf/protoc-gen-go/testdata/import_public/sub" | |
5 | import ( | |
6 | fmt "fmt" | |
7 | proto "github.com/golang/protobuf/proto" | |
8 | sub "github.com/golang/protobuf/protoc-gen-go/testdata/import_public/sub" | |
9 | math "math" | |
10 | ) | |
9 | 11 | |
10 | 12 | // Reference imports to suppress errors if they are not otherwise used. |
11 | 13 | var _ = proto.Marshal |
16 | 18 | // is compatible with the proto package it is being compiled against. |
17 | 19 | // A compilation error at this line likely means your copy of the |
18 | 20 | // proto package needs to be updated. |
19 | const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package | |
21 | const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package | |
20 | 22 | |
21 | 23 | type Local struct { |
22 | M *sub.M `protobuf:"bytes,1,opt,name=m,proto3" json:"m,omitempty"` | |
23 | E sub.E `protobuf:"varint,2,opt,name=e,proto3,enum=goproto.test.import_public.sub.E" json:"e,omitempty"` | |
24 | M *sub.M `protobuf:"bytes,1,opt,name=m" json:"m,omitempty"` | |
25 | E *sub.E `protobuf:"varint,2,opt,name=e,enum=goproto.test.import_public.sub.E" json:"e,omitempty"` | |
24 | 26 | XXX_NoUnkeyedLiteral struct{} `json:"-"` |
25 | 27 | XXX_unrecognized []byte `json:"-"` |
26 | 28 | XXX_sizecache int32 `json:"-"` |
30 | 32 | func (m *Local) String() string { return proto.CompactTextString(m) } |
31 | 33 | func (*Local) ProtoMessage() {} |
32 | 34 | func (*Local) Descriptor() ([]byte, []int) { |
33 | return fileDescriptor_b_7f20a805fad67bd0, []int{0} | |
35 | return fileDescriptor_84995586b3d09710, []int{0} | |
34 | 36 | } |
37 | ||
35 | 38 | func (m *Local) XXX_Unmarshal(b []byte) error { |
36 | 39 | return xxx_messageInfo_Local.Unmarshal(m, b) |
37 | 40 | } |
38 | 41 | func (m *Local) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
39 | 42 | return xxx_messageInfo_Local.Marshal(b, m, deterministic) |
40 | 43 | } |
41 | func (dst *Local) XXX_Merge(src proto.Message) { | |
42 | xxx_messageInfo_Local.Merge(dst, src) | |
44 | func (m *Local) XXX_Merge(src proto.Message) { | |
45 | xxx_messageInfo_Local.Merge(m, src) | |
43 | 46 | } |
44 | 47 | func (m *Local) XXX_Size() int { |
45 | 48 | return xxx_messageInfo_Local.Size(m) |
58 | 61 | } |
59 | 62 | |
60 | 63 | func (m *Local) GetE() sub.E { |
61 | if m != nil { | |
62 | return m.E | |
64 | if m != nil && m.E != nil { | |
65 | return *m.E | |
63 | 66 | } |
64 | 67 | return sub.E_ZERO |
65 | 68 | } |
68 | 71 | proto.RegisterType((*Local)(nil), "goproto.test.import_public.Local") |
69 | 72 | } |
70 | 73 | |
71 | func init() { proto.RegisterFile("import_public/b.proto", fileDescriptor_b_7f20a805fad67bd0) } | |
74 | func init() { proto.RegisterFile("import_public/b.proto", fileDescriptor_84995586b3d09710) } | |
72 | 75 | |
73 | var fileDescriptor_b_7f20a805fad67bd0 = []byte{ | |
74 | // 174 bytes of a gzipped FileDescriptorProto | |
76 | var fileDescriptor_84995586b3d09710 = []byte{ | |
77 | // 169 bytes of a gzipped FileDescriptorProto | |
75 | 78 | 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0xcd, 0xcc, 0x2d, 0xc8, |
76 | 79 | 0x2f, 0x2a, 0x89, 0x2f, 0x28, 0x4d, 0xca, 0xc9, 0x4c, 0xd6, 0x4f, 0xd2, 0x2b, 0x28, 0xca, 0x2f, |
77 | 80 | 0xc9, 0x17, 0x92, 0x4a, 0xcf, 0x07, 0x33, 0xf4, 0x4a, 0x52, 0x8b, 0x4b, 0xf4, 0x50, 0xd4, 0x48, |
81 | 84 | 0x04, 0x93, 0x02, 0xa3, 0x06, 0x1f, 0x61, 0x0d, 0xae, 0x41, 0x8c, 0xa9, 0x4e, 0x8e, 0x51, 0xf6, |
82 | 85 | 0xe9, 0x99, 0x25, 0x19, 0xa5, 0x49, 0x7a, 0xc9, 0xf9, 0xb9, 0xfa, 0xe9, 0xf9, 0x39, 0x89, 0x79, |
83 | 86 | 0xe9, 0xfa, 0x60, 0x6d, 0x49, 0xa5, 0x69, 0x10, 0x46, 0xb2, 0x6e, 0x7a, 0x6a, 0x9e, 0x6e, 0x7a, |
84 | 0xbe, 0x3e, 0xc8, 0x9c, 0x94, 0xc4, 0x92, 0x44, 0x7d, 0x14, 0xb3, 0x92, 0xd8, 0xc0, 0xaa, 0x8c, | |
85 | 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0xd6, 0x2b, 0x5f, 0x8e, 0x04, 0x01, 0x00, 0x00, | |
87 | 0xbe, 0x3e, 0xc8, 0x9c, 0x94, 0xc4, 0x92, 0x44, 0x7d, 0x14, 0xb3, 0x00, 0x01, 0x00, 0x00, 0xff, | |
88 | 0xff, 0x35, 0x0e, 0x6a, 0x82, 0xfc, 0x00, 0x00, 0x00, | |
86 | 89 | } |
28 | 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
29 | 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
30 | 30 | |
31 | syntax = "proto3"; | |
31 | syntax = "proto2"; | |
32 | 32 | |
33 | 33 | package goproto.test.import_public; |
34 | 34 | |
37 | 37 | import "import_public/sub/a.proto"; |
38 | 38 | |
39 | 39 | message Local { |
40 | goproto.test.import_public.sub.M m = 1; | |
41 | goproto.test.import_public.sub.E e = 2; | |
40 | optional goproto.test.import_public.sub.M m = 1; | |
41 | optional goproto.test.import_public.sub.E e = 2; | |
42 | 42 | } |
0 | // Code generated by protoc-gen-go. DO NOT EDIT. | |
1 | // source: import_public/importing/importing.proto | |
2 | ||
3 | package importing | |
4 | ||
5 | import ( | |
6 | fmt "fmt" | |
7 | proto "github.com/golang/protobuf/proto" | |
8 | _ "github.com/golang/protobuf/protoc-gen-go/testdata/import_public" | |
9 | sub "github.com/golang/protobuf/protoc-gen-go/testdata/import_public/sub" | |
10 | math "math" | |
11 | ) | |
12 | ||
13 | // Reference imports to suppress errors if they are not otherwise used. | |
14 | var _ = proto.Marshal | |
15 | var _ = fmt.Errorf | |
16 | var _ = math.Inf | |
17 | ||
18 | // This is a compile-time assertion to ensure that this generated file | |
19 | // is compatible with the proto package it is being compiled against. | |
20 | // A compilation error at this line likely means your copy of the | |
21 | // proto package needs to be updated. | |
22 | const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package | |
23 | ||
24 | type M struct { | |
25 | // Message type defined in a file publicly imported by a file we import. | |
26 | M *sub.M `protobuf:"bytes,1,opt,name=m" json:"m,omitempty"` | |
27 | XXX_NoUnkeyedLiteral struct{} `json:"-"` | |
28 | XXX_unrecognized []byte `json:"-"` | |
29 | XXX_sizecache int32 `json:"-"` | |
30 | } | |
31 | ||
32 | func (m *M) Reset() { *m = M{} } | |
33 | func (m *M) String() string { return proto.CompactTextString(m) } | |
34 | func (*M) ProtoMessage() {} | |
35 | func (*M) Descriptor() ([]byte, []int) { | |
36 | return fileDescriptor_36b835b3b8f6171a, []int{0} | |
37 | } | |
38 | ||
39 | func (m *M) XXX_Unmarshal(b []byte) error { | |
40 | return xxx_messageInfo_M.Unmarshal(m, b) | |
41 | } | |
42 | func (m *M) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { | |
43 | return xxx_messageInfo_M.Marshal(b, m, deterministic) | |
44 | } | |
45 | func (m *M) XXX_Merge(src proto.Message) { | |
46 | xxx_messageInfo_M.Merge(m, src) | |
47 | } | |
48 | func (m *M) XXX_Size() int { | |
49 | return xxx_messageInfo_M.Size(m) | |
50 | } | |
51 | func (m *M) XXX_DiscardUnknown() { | |
52 | xxx_messageInfo_M.DiscardUnknown(m) | |
53 | } | |
54 | ||
55 | var xxx_messageInfo_M proto.InternalMessageInfo | |
56 | ||
57 | func (m *M) GetM() *sub.M { | |
58 | if m != nil { | |
59 | return m.M | |
60 | } | |
61 | return nil | |
62 | } | |
63 | ||
64 | func init() { | |
65 | proto.RegisterType((*M)(nil), "goproto.test.import_public.importing.M") | |
66 | } | |
67 | ||
68 | func init() { | |
69 | proto.RegisterFile("import_public/importing/importing.proto", fileDescriptor_36b835b3b8f6171a) | |
70 | } | |
71 | ||
72 | var fileDescriptor_36b835b3b8f6171a = []byte{ | |
73 | // 153 bytes of a gzipped FileDescriptorProto | |
74 | 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0xcf, 0xcc, 0x2d, 0xc8, | |
75 | 0x2f, 0x2a, 0x89, 0x2f, 0x28, 0x4d, 0xca, 0xc9, 0x4c, 0xd6, 0x87, 0xf0, 0x32, 0xf3, 0xd2, 0x11, | |
76 | 0x2c, 0xbd, 0x82, 0xa2, 0xfc, 0x92, 0x7c, 0x21, 0x95, 0xf4, 0x7c, 0x30, 0x43, 0xaf, 0x24, 0xb5, | |
77 | 0xb8, 0x44, 0x0f, 0x45, 0x97, 0x1e, 0x5c, 0xad, 0x94, 0x28, 0xaa, 0x71, 0x89, 0x10, 0xcd, 0x4a, | |
78 | 0x26, 0x5c, 0x8c, 0xbe, 0x42, 0xfa, 0x5c, 0x8c, 0xb9, 0x12, 0x8c, 0x0a, 0x8c, 0x1a, 0xdc, 0x46, | |
79 | 0x8a, 0x7a, 0x78, 0x4c, 0x2b, 0x2e, 0x4d, 0xd2, 0xf3, 0x0d, 0x62, 0xcc, 0x75, 0xf2, 0x8e, 0xf2, | |
80 | 0x4c, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x4f, 0xcf, 0xcf, 0x49, 0xcc, | |
81 | 0x4b, 0xd7, 0x07, 0x6b, 0x4b, 0x2a, 0x4d, 0x83, 0x30, 0x92, 0x75, 0xd3, 0x53, 0xf3, 0x74, 0xd3, | |
82 | 0xf3, 0xf5, 0x41, 0xe6, 0xa4, 0x24, 0x96, 0x24, 0xea, 0xe3, 0xf0, 0x0f, 0x20, 0x00, 0x00, 0xff, | |
83 | 0xff, 0xd8, 0x7e, 0x58, 0x1c, 0xe9, 0x00, 0x00, 0x00, | |
84 | } |
0 | // Go support for Protocol Buffers - Google's data interchange format | |
1 | // | |
2 | // Copyright 2018 The Go Authors. All rights reserved. | |
3 | // https://github.com/golang/protobuf | |
4 | // | |
5 | // Redistribution and use in source and binary forms, with or without | |
6 | // modification, are permitted provided that the following conditions are | |
7 | // met: | |
8 | // | |
9 | // * Redistributions of source code must retain the above copyright | |
10 | // notice, this list of conditions and the following disclaimer. | |
11 | // * Redistributions in binary form must reproduce the above | |
12 | // copyright notice, this list of conditions and the following disclaimer | |
13 | // in the documentation and/or other materials provided with the | |
14 | // distribution. | |
15 | // * Neither the name of Google Inc. nor the names of its | |
16 | // contributors may be used to endorse or promote products derived from | |
17 | // this software without specific prior written permission. | |
18 | // | |
19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | |
20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | |
21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | |
22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | |
23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | |
24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | |
25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | |
26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | |
27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | |
28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | |
29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |
30 | ||
31 | syntax = "proto2"; | |
32 | ||
33 | package goproto.test.import_public.importing; | |
34 | ||
35 | option go_package = "github.com/golang/protobuf/protoc-gen-go/testdata/import_public/importing"; | |
36 | ||
37 | import "import_public/a.proto"; | |
38 | ||
39 | message M { | |
40 | // Message type defined in a file publicly imported by a file we import. | |
41 | optional goproto.test.import_public.sub.M m = 1; | |
42 | } |
0 | 0 | // Code generated by protoc-gen-go. DO NOT EDIT. |
1 | 1 | // source: import_public/sub/a.proto |
2 | 2 | |
3 | package sub // import "github.com/golang/protobuf/protoc-gen-go/testdata/import_public/sub" | |
4 | ||
5 | import proto "github.com/golang/protobuf/proto" | |
6 | import fmt "fmt" | |
7 | import math "math" | |
3 | package sub | |
4 | ||
5 | import ( | |
6 | fmt "fmt" | |
7 | proto "github.com/golang/protobuf/proto" | |
8 | math "math" | |
9 | ) | |
8 | 10 | |
9 | 11 | // Reference imports to suppress errors if they are not otherwise used. |
10 | 12 | var _ = proto.Marshal |
15 | 17 | // is compatible with the proto package it is being compiled against. |
16 | 18 | // A compilation error at this line likely means your copy of the |
17 | 19 | // proto package needs to be updated. |
18 | const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package | |
20 | const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package | |
19 | 21 | |
20 | 22 | type E int32 |
21 | 23 | |
26 | 28 | var E_name = map[int32]string{ |
27 | 29 | 0: "ZERO", |
28 | 30 | } |
31 | ||
29 | 32 | var E_value = map[string]int32{ |
30 | 33 | "ZERO": 0, |
31 | 34 | } |
32 | 35 | |
36 | func (x E) Enum() *E { | |
37 | p := new(E) | |
38 | *p = x | |
39 | return p | |
40 | } | |
41 | ||
33 | 42 | func (x E) String() string { |
34 | 43 | return proto.EnumName(E_name, int32(x)) |
35 | 44 | } |
45 | ||
46 | func (x *E) UnmarshalJSON(data []byte) error { | |
47 | value, err := proto.UnmarshalJSONEnum(E_value, data, "E") | |
48 | if err != nil { | |
49 | return err | |
50 | } | |
51 | *x = E(value) | |
52 | return nil | |
53 | } | |
54 | ||
36 | 55 | func (E) EnumDescriptor() ([]byte, []int) { |
37 | return fileDescriptor_a_91ca0264a534463a, []int{0} | |
56 | return fileDescriptor_382f7805394b5c4e, []int{0} | |
57 | } | |
58 | ||
59 | type M_Subenum int32 | |
60 | ||
61 | const ( | |
62 | M_M_ZERO M_Subenum = 0 | |
63 | ) | |
64 | ||
65 | var M_Subenum_name = map[int32]string{ | |
66 | 0: "M_ZERO", | |
67 | } | |
68 | ||
69 | var M_Subenum_value = map[string]int32{ | |
70 | "M_ZERO": 0, | |
71 | } | |
72 | ||
73 | func (x M_Subenum) Enum() *M_Subenum { | |
74 | p := new(M_Subenum) | |
75 | *p = x | |
76 | return p | |
77 | } | |
78 | ||
79 | func (x M_Subenum) String() string { | |
80 | return proto.EnumName(M_Subenum_name, int32(x)) | |
81 | } | |
82 | ||
83 | func (x *M_Subenum) UnmarshalJSON(data []byte) error { | |
84 | value, err := proto.UnmarshalJSONEnum(M_Subenum_value, data, "M_Subenum") | |
85 | if err != nil { | |
86 | return err | |
87 | } | |
88 | *x = M_Subenum(value) | |
89 | return nil | |
90 | } | |
91 | ||
92 | func (M_Subenum) EnumDescriptor() ([]byte, []int) { | |
93 | return fileDescriptor_382f7805394b5c4e, []int{0, 0} | |
94 | } | |
95 | ||
96 | type M_Submessage_Submessage_Subenum int32 | |
97 | ||
98 | const ( | |
99 | M_Submessage_M_SUBMESSAGE_ZERO M_Submessage_Submessage_Subenum = 0 | |
100 | ) | |
101 | ||
102 | var M_Submessage_Submessage_Subenum_name = map[int32]string{ | |
103 | 0: "M_SUBMESSAGE_ZERO", | |
104 | } | |
105 | ||
106 | var M_Submessage_Submessage_Subenum_value = map[string]int32{ | |
107 | "M_SUBMESSAGE_ZERO": 0, | |
108 | } | |
109 | ||
110 | func (x M_Submessage_Submessage_Subenum) Enum() *M_Submessage_Submessage_Subenum { | |
111 | p := new(M_Submessage_Submessage_Subenum) | |
112 | *p = x | |
113 | return p | |
114 | } | |
115 | ||
116 | func (x M_Submessage_Submessage_Subenum) String() string { | |
117 | return proto.EnumName(M_Submessage_Submessage_Subenum_name, int32(x)) | |
118 | } | |
119 | ||
120 | func (x *M_Submessage_Submessage_Subenum) UnmarshalJSON(data []byte) error { | |
121 | value, err := proto.UnmarshalJSONEnum(M_Submessage_Submessage_Subenum_value, data, "M_Submessage_Submessage_Subenum") | |
122 | if err != nil { | |
123 | return err | |
124 | } | |
125 | *x = M_Submessage_Submessage_Subenum(value) | |
126 | return nil | |
127 | } | |
128 | ||
129 | func (M_Submessage_Submessage_Subenum) EnumDescriptor() ([]byte, []int) { | |
130 | return fileDescriptor_382f7805394b5c4e, []int{0, 1, 0} | |
38 | 131 | } |
39 | 132 | |
40 | 133 | type M struct { |
41 | 134 | // Field using a type in the same Go package, but a different source file. |
42 | M2 *M2 `protobuf:"bytes,1,opt,name=m2,proto3" json:"m2,omitempty"` | |
43 | XXX_NoUnkeyedLiteral struct{} `json:"-"` | |
44 | XXX_unrecognized []byte `json:"-"` | |
45 | XXX_sizecache int32 `json:"-"` | |
135 | M2 *M2 `protobuf:"bytes,1,opt,name=m2" json:"m2,omitempty"` | |
136 | // Types that are valid to be assigned to OneofField: | |
137 | // *M_OneofInt32 | |
138 | // *M_OneofInt64 | |
139 | OneofField isM_OneofField `protobuf_oneof:"oneof_field"` | |
140 | Grouping *M_Grouping `protobuf:"group,4,opt,name=Grouping,json=grouping" json:"grouping,omitempty"` | |
141 | DefaultField *string `protobuf:"bytes,6,opt,name=default_field,json=defaultField,def=def" json:"default_field,omitempty"` | |
142 | XXX_NoUnkeyedLiteral struct{} `json:"-"` | |
143 | XXX_unrecognized []byte `json:"-"` | |
144 | XXX_sizecache int32 `json:"-"` | |
46 | 145 | } |
47 | 146 | |
48 | 147 | func (m *M) Reset() { *m = M{} } |
49 | 148 | func (m *M) String() string { return proto.CompactTextString(m) } |
50 | 149 | func (*M) ProtoMessage() {} |
51 | 150 | func (*M) Descriptor() ([]byte, []int) { |
52 | return fileDescriptor_a_91ca0264a534463a, []int{0} | |
53 | } | |
151 | return fileDescriptor_382f7805394b5c4e, []int{0} | |
152 | } | |
153 | ||
54 | 154 | func (m *M) XXX_Unmarshal(b []byte) error { |
55 | 155 | return xxx_messageInfo_M.Unmarshal(m, b) |
56 | 156 | } |
57 | 157 | func (m *M) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
58 | 158 | return xxx_messageInfo_M.Marshal(b, m, deterministic) |
59 | 159 | } |
60 | func (dst *M) XXX_Merge(src proto.Message) { | |
61 | xxx_messageInfo_M.Merge(dst, src) | |
160 | func (m *M) XXX_Merge(src proto.Message) { | |
161 | xxx_messageInfo_M.Merge(m, src) | |
62 | 162 | } |
63 | 163 | func (m *M) XXX_Size() int { |
64 | 164 | return xxx_messageInfo_M.Size(m) |
68 | 168 | } |
69 | 169 | |
70 | 170 | var xxx_messageInfo_M proto.InternalMessageInfo |
171 | ||
172 | const Default_M_DefaultField string = "def" | |
71 | 173 | |
72 | 174 | func (m *M) GetM2() *M2 { |
73 | 175 | if m != nil { |
76 | 178 | return nil |
77 | 179 | } |
78 | 180 | |
181 | type isM_OneofField interface { | |
182 | isM_OneofField() | |
183 | } | |
184 | ||
185 | type M_OneofInt32 struct { | |
186 | OneofInt32 int32 `protobuf:"varint,2,opt,name=oneof_int32,json=oneofInt32,oneof"` | |
187 | } | |
188 | ||
189 | type M_OneofInt64 struct { | |
190 | OneofInt64 int64 `protobuf:"varint,3,opt,name=oneof_int64,json=oneofInt64,oneof"` | |
191 | } | |
192 | ||
193 | func (*M_OneofInt32) isM_OneofField() {} | |
194 | ||
195 | func (*M_OneofInt64) isM_OneofField() {} | |
196 | ||
197 | func (m *M) GetOneofField() isM_OneofField { | |
198 | if m != nil { | |
199 | return m.OneofField | |
200 | } | |
201 | return nil | |
202 | } | |
203 | ||
204 | func (m *M) GetOneofInt32() int32 { | |
205 | if x, ok := m.GetOneofField().(*M_OneofInt32); ok { | |
206 | return x.OneofInt32 | |
207 | } | |
208 | return 0 | |
209 | } | |
210 | ||
211 | func (m *M) GetOneofInt64() int64 { | |
212 | if x, ok := m.GetOneofField().(*M_OneofInt64); ok { | |
213 | return x.OneofInt64 | |
214 | } | |
215 | return 0 | |
216 | } | |
217 | ||
218 | func (m *M) GetGrouping() *M_Grouping { | |
219 | if m != nil { | |
220 | return m.Grouping | |
221 | } | |
222 | return nil | |
223 | } | |
224 | ||
225 | func (m *M) GetDefaultField() string { | |
226 | if m != nil && m.DefaultField != nil { | |
227 | return *m.DefaultField | |
228 | } | |
229 | return Default_M_DefaultField | |
230 | } | |
231 | ||
232 | // XXX_OneofWrappers is for the internal use of the proto package. | |
233 | func (*M) XXX_OneofWrappers() []interface{} { | |
234 | return []interface{}{ | |
235 | (*M_OneofInt32)(nil), | |
236 | (*M_OneofInt64)(nil), | |
237 | } | |
238 | } | |
239 | ||
240 | type M_Grouping struct { | |
241 | GroupField *string `protobuf:"bytes,5,opt,name=group_field,json=groupField" json:"group_field,omitempty"` | |
242 | XXX_NoUnkeyedLiteral struct{} `json:"-"` | |
243 | XXX_unrecognized []byte `json:"-"` | |
244 | XXX_sizecache int32 `json:"-"` | |
245 | } | |
246 | ||
247 | func (m *M_Grouping) Reset() { *m = M_Grouping{} } | |
248 | func (m *M_Grouping) String() string { return proto.CompactTextString(m) } | |
249 | func (*M_Grouping) ProtoMessage() {} | |
250 | func (*M_Grouping) Descriptor() ([]byte, []int) { | |
251 | return fileDescriptor_382f7805394b5c4e, []int{0, 0} | |
252 | } | |
253 | ||
254 | func (m *M_Grouping) XXX_Unmarshal(b []byte) error { | |
255 | return xxx_messageInfo_M_Grouping.Unmarshal(m, b) | |
256 | } | |
257 | func (m *M_Grouping) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { | |
258 | return xxx_messageInfo_M_Grouping.Marshal(b, m, deterministic) | |
259 | } | |
260 | func (m *M_Grouping) XXX_Merge(src proto.Message) { | |
261 | xxx_messageInfo_M_Grouping.Merge(m, src) | |
262 | } | |
263 | func (m *M_Grouping) XXX_Size() int { | |
264 | return xxx_messageInfo_M_Grouping.Size(m) | |
265 | } | |
266 | func (m *M_Grouping) XXX_DiscardUnknown() { | |
267 | xxx_messageInfo_M_Grouping.DiscardUnknown(m) | |
268 | } | |
269 | ||
270 | var xxx_messageInfo_M_Grouping proto.InternalMessageInfo | |
271 | ||
272 | func (m *M_Grouping) GetGroupField() string { | |
273 | if m != nil && m.GroupField != nil { | |
274 | return *m.GroupField | |
275 | } | |
276 | return "" | |
277 | } | |
278 | ||
279 | type M_Submessage struct { | |
280 | // Types that are valid to be assigned to SubmessageOneofField: | |
281 | // *M_Submessage_SubmessageOneofInt32 | |
282 | // *M_Submessage_SubmessageOneofInt64 | |
283 | SubmessageOneofField isM_Submessage_SubmessageOneofField `protobuf_oneof:"submessage_oneof_field"` | |
284 | XXX_NoUnkeyedLiteral struct{} `json:"-"` | |
285 | XXX_unrecognized []byte `json:"-"` | |
286 | XXX_sizecache int32 `json:"-"` | |
287 | } | |
288 | ||
289 | func (m *M_Submessage) Reset() { *m = M_Submessage{} } | |
290 | func (m *M_Submessage) String() string { return proto.CompactTextString(m) } | |
291 | func (*M_Submessage) ProtoMessage() {} | |
292 | func (*M_Submessage) Descriptor() ([]byte, []int) { | |
293 | return fileDescriptor_382f7805394b5c4e, []int{0, 1} | |
294 | } | |
295 | ||
296 | func (m *M_Submessage) XXX_Unmarshal(b []byte) error { | |
297 | return xxx_messageInfo_M_Submessage.Unmarshal(m, b) | |
298 | } | |
299 | func (m *M_Submessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { | |
300 | return xxx_messageInfo_M_Submessage.Marshal(b, m, deterministic) | |
301 | } | |
302 | func (m *M_Submessage) XXX_Merge(src proto.Message) { | |
303 | xxx_messageInfo_M_Submessage.Merge(m, src) | |
304 | } | |
305 | func (m *M_Submessage) XXX_Size() int { | |
306 | return xxx_messageInfo_M_Submessage.Size(m) | |
307 | } | |
308 | func (m *M_Submessage) XXX_DiscardUnknown() { | |
309 | xxx_messageInfo_M_Submessage.DiscardUnknown(m) | |
310 | } | |
311 | ||
312 | var xxx_messageInfo_M_Submessage proto.InternalMessageInfo | |
313 | ||
314 | type isM_Submessage_SubmessageOneofField interface { | |
315 | isM_Submessage_SubmessageOneofField() | |
316 | } | |
317 | ||
318 | type M_Submessage_SubmessageOneofInt32 struct { | |
319 | SubmessageOneofInt32 int32 `protobuf:"varint,1,opt,name=submessage_oneof_int32,json=submessageOneofInt32,oneof"` | |
320 | } | |
321 | ||
322 | type M_Submessage_SubmessageOneofInt64 struct { | |
323 | SubmessageOneofInt64 int64 `protobuf:"varint,2,opt,name=submessage_oneof_int64,json=submessageOneofInt64,oneof"` | |
324 | } | |
325 | ||
326 | func (*M_Submessage_SubmessageOneofInt32) isM_Submessage_SubmessageOneofField() {} | |
327 | ||
328 | func (*M_Submessage_SubmessageOneofInt64) isM_Submessage_SubmessageOneofField() {} | |
329 | ||
330 | func (m *M_Submessage) GetSubmessageOneofField() isM_Submessage_SubmessageOneofField { | |
331 | if m != nil { | |
332 | return m.SubmessageOneofField | |
333 | } | |
334 | return nil | |
335 | } | |
336 | ||
337 | func (m *M_Submessage) GetSubmessageOneofInt32() int32 { | |
338 | if x, ok := m.GetSubmessageOneofField().(*M_Submessage_SubmessageOneofInt32); ok { | |
339 | return x.SubmessageOneofInt32 | |
340 | } | |
341 | return 0 | |
342 | } | |
343 | ||
344 | func (m *M_Submessage) GetSubmessageOneofInt64() int64 { | |
345 | if x, ok := m.GetSubmessageOneofField().(*M_Submessage_SubmessageOneofInt64); ok { | |
346 | return x.SubmessageOneofInt64 | |
347 | } | |
348 | return 0 | |
349 | } | |
350 | ||
351 | // XXX_OneofWrappers is for the internal use of the proto package. | |
352 | func (*M_Submessage) XXX_OneofWrappers() []interface{} { | |
353 | return []interface{}{ | |
354 | (*M_Submessage_SubmessageOneofInt32)(nil), | |
355 | (*M_Submessage_SubmessageOneofInt64)(nil), | |
356 | } | |
357 | } | |
358 | ||
359 | var E_ExtensionField = &proto.ExtensionDesc{ | |
360 | ExtendedType: (*M2)(nil), | |
361 | ExtensionType: (*string)(nil), | |
362 | Field: 1, | |
363 | Name: "goproto.test.import_public.sub.extension_field", | |
364 | Tag: "bytes,1,opt,name=extension_field", | |
365 | Filename: "import_public/sub/a.proto", | |
366 | } | |
367 | ||
79 | 368 | func init() { |
369 | proto.RegisterEnum("goproto.test.import_public.sub.E", E_name, E_value) | |
370 | proto.RegisterEnum("goproto.test.import_public.sub.M_Subenum", M_Subenum_name, M_Subenum_value) | |
371 | proto.RegisterEnum("goproto.test.import_public.sub.M_Submessage_Submessage_Subenum", M_Submessage_Submessage_Subenum_name, M_Submessage_Submessage_Subenum_value) | |
80 | 372 | proto.RegisterType((*M)(nil), "goproto.test.import_public.sub.M") |
81 | proto.RegisterEnum("goproto.test.import_public.sub.E", E_name, E_value) | |
82 | } | |
83 | ||
84 | func init() { proto.RegisterFile("import_public/sub/a.proto", fileDescriptor_a_91ca0264a534463a) } | |
85 | ||
86 | var fileDescriptor_a_91ca0264a534463a = []byte{ | |
87 | // 172 bytes of a gzipped FileDescriptorProto | |
88 | 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0xcc, 0xcc, 0x2d, 0xc8, | |
89 | 0x2f, 0x2a, 0x89, 0x2f, 0x28, 0x4d, 0xca, 0xc9, 0x4c, 0xd6, 0x2f, 0x2e, 0x4d, 0xd2, 0x4f, 0xd4, | |
90 | 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x92, 0x4b, 0xcf, 0x07, 0x33, 0xf4, 0x4a, 0x52, 0x8b, 0x4b, | |
91 | 0xf4, 0x50, 0xd4, 0xe9, 0x15, 0x97, 0x26, 0x49, 0x61, 0xd1, 0x9a, 0x04, 0xd1, 0xaa, 0x64, 0xce, | |
92 | 0xc5, 0xe8, 0x2b, 0x64, 0xc4, 0xc5, 0x94, 0x6b, 0x24, 0xc1, 0xa8, 0xc0, 0xa8, 0xc1, 0x6d, 0xa4, | |
93 | 0xa4, 0x87, 0xdf, 0x30, 0x3d, 0x5f, 0xa3, 0x20, 0xa6, 0x5c, 0x23, 0x2d, 0x5e, 0x2e, 0x46, 0x57, | |
94 | 0x21, 0x0e, 0x2e, 0x96, 0x28, 0xd7, 0x20, 0x7f, 0x01, 0x06, 0x27, 0xd7, 0x28, 0xe7, 0xf4, 0xcc, | |
95 | 0x92, 0x8c, 0xd2, 0x24, 0xbd, 0xe4, 0xfc, 0x5c, 0xfd, 0xf4, 0xfc, 0x9c, 0xc4, 0xbc, 0x74, 0x7d, | |
96 | 0xb0, 0x39, 0x49, 0xa5, 0x69, 0x10, 0x46, 0xb2, 0x6e, 0x7a, 0x6a, 0x9e, 0x6e, 0x7a, 0xbe, 0x3e, | |
97 | 0xc8, 0xe0, 0x94, 0xc4, 0x92, 0x44, 0x7d, 0x0c, 0x67, 0x25, 0xb1, 0x81, 0x55, 0x1a, 0x03, 0x02, | |
98 | 0x00, 0x00, 0xff, 0xff, 0x81, 0xcc, 0x07, 0x7d, 0xed, 0x00, 0x00, 0x00, | |
99 | } | |
373 | proto.RegisterType((*M_Grouping)(nil), "goproto.test.import_public.sub.M.Grouping") | |
374 | proto.RegisterType((*M_Submessage)(nil), "goproto.test.import_public.sub.M.Submessage") | |
375 | proto.RegisterExtension(E_ExtensionField) | |
376 | } | |
377 | ||
378 | func init() { proto.RegisterFile("import_public/sub/a.proto", fileDescriptor_382f7805394b5c4e) } | |
379 | ||
380 | var fileDescriptor_382f7805394b5c4e = []byte{ | |
381 | // 410 bytes of a gzipped FileDescriptorProto | |
382 | 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x92, 0xcf, 0x6e, 0xd3, 0x40, | |
383 | 0x10, 0xc6, 0xbb, 0x49, 0x5a, 0xd2, 0x09, 0xe1, 0xcf, 0x8a, 0x22, 0xd3, 0x03, 0x98, 0x9c, 0xac, | |
384 | 0x56, 0x5d, 0x4b, 0x26, 0xf2, 0xa1, 0x37, 0x82, 0xdc, 0x82, 0x90, 0x55, 0xc9, 0x16, 0x97, 0x5e, | |
385 | 0x2c, 0x6f, 0xbc, 0x5e, 0x2c, 0xd9, 0xbb, 0x56, 0xbc, 0x2b, 0xf1, 0x08, 0xbc, 0x17, 0x2f, 0x86, | |
386 | 0xbc, 0xb6, 0x93, 0x46, 0x04, 0xe8, 0x6d, 0x3d, 0xf3, 0xfd, 0xbe, 0xd1, 0x7c, 0x1e, 0x78, 0x53, | |
387 | 0x54, 0xb5, 0xdc, 0xa8, 0xa4, 0xd6, 0xb4, 0x2c, 0xd6, 0x6e, 0xa3, 0xa9, 0x9b, 0x92, 0x7a, 0x23, | |
388 | 0x95, 0xc4, 0x6f, 0xb9, 0x34, 0x0f, 0xa2, 0x58, 0xa3, 0xc8, 0x9e, 0x8e, 0x34, 0x9a, 0x9e, 0x1f, | |
389 | 0x40, 0x69, 0x87, 0x2e, 0x7e, 0x4e, 0x00, 0x85, 0xd8, 0x83, 0x51, 0xe5, 0x59, 0xc8, 0x46, 0xce, | |
390 | 0xcc, 0x5b, 0x90, 0x7f, 0xbb, 0x91, 0xd0, 0x8b, 0x46, 0x95, 0x87, 0xdf, 0xc3, 0x4c, 0x0a, 0x26, | |
391 | 0xf3, 0xa4, 0x10, 0xea, 0x83, 0x67, 0x8d, 0x6c, 0xe4, 0x1c, 0x7f, 0x3e, 0x8a, 0xc0, 0x14, 0xbf, | |
392 | 0xb4, 0xb5, 0x3d, 0x89, 0xbf, 0xb4, 0xc6, 0x36, 0x72, 0xc6, 0x0f, 0x25, 0xfe, 0x12, 0xdf, 0xc0, | |
393 | 0x94, 0x6f, 0xa4, 0xae, 0x0b, 0xc1, 0xad, 0x89, 0x8d, 0x1c, 0xf0, 0x2e, 0xfe, 0x3b, 0x9f, 0xdc, | |
394 | 0xf6, 0x44, 0xb4, 0x65, 0xb1, 0x03, 0xf3, 0x8c, 0xe5, 0xa9, 0x2e, 0x55, 0x92, 0x17, 0xac, 0xcc, | |
395 | 0xac, 0x13, 0x1b, 0x39, 0xa7, 0xd7, 0xe3, 0x8c, 0xe5, 0xd1, 0xd3, 0xbe, 0x73, 0xd3, 0x36, 0xce, | |
396 | 0x2f, 0x61, 0x3a, 0xf0, 0xf8, 0x1d, 0xcc, 0x8c, 0x43, 0xcf, 0x1c, 0xb7, 0x4c, 0x04, 0xa6, 0xd4, | |
397 | 0x89, 0x7f, 0x21, 0x80, 0x58, 0xd3, 0x8a, 0x35, 0x4d, 0xca, 0x19, 0xf6, 0xe1, 0x75, 0xb3, 0xfd, | |
398 | 0x4a, 0x1e, 0xae, 0x8f, 0xfa, 0xf5, 0x5f, 0xed, 0xfa, 0x77, 0xbb, 0x20, 0xfe, 0xc2, 0xf9, 0x4b, | |
399 | 0x13, 0xdb, 0xf8, 0x30, 0xe7, 0x2f, 0x17, 0x97, 0x80, 0x77, 0xd3, 0x93, 0x58, 0x53, 0x26, 0x74, | |
400 | 0x85, 0xcf, 0xe0, 0x65, 0x98, 0xc4, 0xdf, 0x56, 0x61, 0x10, 0xc7, 0x1f, 0x6f, 0x83, 0xe4, 0x3e, | |
401 | 0x88, 0xee, 0x5e, 0x1c, 0xad, 0xac, 0x03, 0x43, 0xcc, 0x5e, 0x8b, 0x33, 0x78, 0x32, 0xb0, 0x00, | |
402 | 0x27, 0xe1, 0x00, 0xcc, 0x87, 0xdf, 0x63, 0x54, 0x17, 0x73, 0x40, 0x01, 0x9e, 0xc2, 0xa4, 0xeb, | |
403 | 0x5e, 0x7f, 0x85, 0xe7, 0xec, 0x87, 0x62, 0xa2, 0x29, 0xa4, 0xe8, 0x14, 0xf8, 0x11, 0xa7, 0x61, | |
404 | 0x82, 0x38, 0x8d, 0x9e, 0x6d, 0x51, 0x93, 0xe3, 0x2a, 0xb8, 0xff, 0xc4, 0x0b, 0xf5, 0x5d, 0x53, | |
405 | 0xb2, 0x96, 0x95, 0xcb, 0x65, 0x99, 0x0a, 0xee, 0x1a, 0x2b, 0xaa, 0xf3, 0xee, 0xb1, 0xbe, 0xe2, | |
406 | 0x4c, 0x5c, 0x71, 0xe9, 0xb6, 0xde, 0x59, 0xaa, 0x52, 0xf7, 0x8f, 0xab, 0xfd, 0x1d, 0x00, 0x00, | |
407 | 0xff, 0xff, 0x13, 0x4f, 0x31, 0x07, 0x04, 0x03, 0x00, 0x00, | |
408 | } |
28 | 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
29 | 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
30 | 30 | |
31 | syntax = "proto3"; | |
31 | syntax = "proto2"; | |
32 | 32 | |
33 | 33 | package goproto.test.import_public.sub; |
34 | 34 | |
38 | 38 | |
39 | 39 | message M { |
40 | 40 | // Field using a type in the same Go package, but a different source file. |
41 | M2 m2 = 1; | |
41 | optional M2 m2 = 1; | |
42 | ||
43 | oneof oneof_field { | |
44 | int32 oneof_int32 = 2; | |
45 | int64 oneof_int64 = 3; | |
46 | } | |
47 | ||
48 | optional group Grouping = 4 { | |
49 | optional string group_field = 5; | |
50 | } | |
51 | ||
52 | optional string default_field = 6 [default="def"]; | |
53 | ||
54 | message Submessage { | |
55 | enum Submessage_Subenum { | |
56 | M_SUBMESSAGE_ZERO = 0; | |
57 | } | |
58 | ||
59 | oneof submessage_oneof_field { | |
60 | int32 submessage_oneof_int32 = 1; | |
61 | int64 submessage_oneof_int64 = 2; | |
62 | } | |
63 | } | |
64 | ||
65 | enum Subenum { | |
66 | M_ZERO = 0; | |
67 | } | |
42 | 68 | } |
43 | 69 | |
44 | 70 | enum E { |
45 | 71 | ZERO = 0; |
46 | 72 | } |
73 | ||
74 | extend M2 { | |
75 | optional string extension_field = 1; | |
76 | } |
0 | 0 | // Code generated by protoc-gen-go. DO NOT EDIT. |
1 | 1 | // source: import_public/sub/b.proto |
2 | 2 | |
3 | package sub // import "github.com/golang/protobuf/protoc-gen-go/testdata/import_public/sub" | |
3 | package sub | |
4 | 4 | |
5 | import proto "github.com/golang/protobuf/proto" | |
6 | import fmt "fmt" | |
7 | import math "math" | |
5 | import ( | |
6 | fmt "fmt" | |
7 | proto "github.com/golang/protobuf/proto" | |
8 | math "math" | |
9 | ) | |
8 | 10 | |
9 | 11 | // Reference imports to suppress errors if they are not otherwise used. |
10 | 12 | var _ = proto.Marshal |
15 | 17 | // is compatible with the proto package it is being compiled against. |
16 | 18 | // A compilation error at this line likely means your copy of the |
17 | 19 | // proto package needs to be updated. |
18 | const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package | |
20 | const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package | |
19 | 21 | |
20 | 22 | type M2 struct { |
21 | XXX_NoUnkeyedLiteral struct{} `json:"-"` | |
22 | XXX_unrecognized []byte `json:"-"` | |
23 | XXX_sizecache int32 `json:"-"` | |
23 | XXX_NoUnkeyedLiteral struct{} `json:"-"` | |
24 | proto.XXX_InternalExtensions `json:"-"` | |
25 | XXX_unrecognized []byte `json:"-"` | |
26 | XXX_sizecache int32 `json:"-"` | |
24 | 27 | } |
25 | 28 | |
26 | 29 | func (m *M2) Reset() { *m = M2{} } |
27 | 30 | func (m *M2) String() string { return proto.CompactTextString(m) } |
28 | 31 | func (*M2) ProtoMessage() {} |
29 | 32 | func (*M2) Descriptor() ([]byte, []int) { |
30 | return fileDescriptor_b_eba25180453d86b4, []int{0} | |
33 | return fileDescriptor_fc66afda3d7c2232, []int{0} | |
31 | 34 | } |
35 | ||
36 | var extRange_M2 = []proto.ExtensionRange{ | |
37 | {Start: 1, End: 536870911}, | |
38 | } | |
39 | ||
40 | func (*M2) ExtensionRangeArray() []proto.ExtensionRange { | |
41 | return extRange_M2 | |
42 | } | |
43 | ||
32 | 44 | func (m *M2) XXX_Unmarshal(b []byte) error { |
33 | 45 | return xxx_messageInfo_M2.Unmarshal(m, b) |
34 | 46 | } |
35 | 47 | func (m *M2) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
36 | 48 | return xxx_messageInfo_M2.Marshal(b, m, deterministic) |
37 | 49 | } |
38 | func (dst *M2) XXX_Merge(src proto.Message) { | |
39 | xxx_messageInfo_M2.Merge(dst, src) | |
50 | func (m *M2) XXX_Merge(src proto.Message) { | |
51 | xxx_messageInfo_M2.Merge(m, src) | |
40 | 52 | } |
41 | 53 | func (m *M2) XXX_Size() int { |
42 | 54 | return xxx_messageInfo_M2.Size(m) |
51 | 63 | proto.RegisterType((*M2)(nil), "goproto.test.import_public.sub.M2") |
52 | 64 | } |
53 | 65 | |
54 | func init() { proto.RegisterFile("import_public/sub/b.proto", fileDescriptor_b_eba25180453d86b4) } | |
66 | func init() { proto.RegisterFile("import_public/sub/b.proto", fileDescriptor_fc66afda3d7c2232) } | |
55 | 67 | |
56 | var fileDescriptor_b_eba25180453d86b4 = []byte{ | |
57 | // 127 bytes of a gzipped FileDescriptorProto | |
68 | var fileDescriptor_fc66afda3d7c2232 = []byte{ | |
69 | // 132 bytes of a gzipped FileDescriptorProto | |
58 | 70 | 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0xcc, 0xcc, 0x2d, 0xc8, |
59 | 71 | 0x2f, 0x2a, 0x89, 0x2f, 0x28, 0x4d, 0xca, 0xc9, 0x4c, 0xd6, 0x2f, 0x2e, 0x4d, 0xd2, 0x4f, 0xd2, |
60 | 72 | 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x92, 0x4b, 0xcf, 0x07, 0x33, 0xf4, 0x4a, 0x52, 0x8b, 0x4b, |
61 | 0xf4, 0x50, 0xd4, 0xe9, 0x15, 0x97, 0x26, 0x29, 0xb1, 0x70, 0x31, 0xf9, 0x1a, 0x39, 0xb9, 0x46, | |
62 | 0x39, 0xa7, 0x67, 0x96, 0x64, 0x94, 0x26, 0xe9, 0x25, 0xe7, 0xe7, 0xea, 0xa7, 0xe7, 0xe7, 0x24, | |
63 | 0xe6, 0xa5, 0xeb, 0x83, 0xf5, 0x25, 0x95, 0xa6, 0x41, 0x18, 0xc9, 0xba, 0xe9, 0xa9, 0x79, 0xba, | |
64 | 0xe9, 0xf9, 0xfa, 0x20, 0x83, 0x52, 0x12, 0x4b, 0x12, 0xf5, 0x31, 0x2c, 0x4d, 0x62, 0x03, 0xab, | |
65 | 0x34, 0x06, 0x04, 0x00, 0x00, 0xff, 0xff, 0x64, 0x42, 0xe4, 0xa8, 0x90, 0x00, 0x00, 0x00, | |
73 | 0xf4, 0x50, 0xd4, 0xe9, 0x15, 0x97, 0x26, 0x29, 0xf1, 0x71, 0x31, 0xf9, 0x1a, 0x69, 0x71, 0x70, | |
74 | 0x30, 0x0a, 0x34, 0x34, 0x34, 0x34, 0x30, 0x39, 0xb9, 0x46, 0x39, 0xa7, 0x67, 0x96, 0x64, 0x94, | |
75 | 0x26, 0xe9, 0x25, 0xe7, 0xe7, 0xea, 0xa7, 0xe7, 0xe7, 0x24, 0xe6, 0xa5, 0xeb, 0x83, 0x4d, 0x48, | |
76 | 0x2a, 0x4d, 0x83, 0x30, 0x92, 0x75, 0xd3, 0x53, 0xf3, 0x74, 0xd3, 0xf3, 0xf5, 0x41, 0x46, 0xa6, | |
77 | 0x24, 0x96, 0x24, 0xea, 0x63, 0x58, 0x0f, 0x08, 0x00, 0x00, 0xff, 0xff, 0x87, 0x44, 0x22, 0x2d, | |
78 | 0x92, 0x00, 0x00, 0x00, | |
66 | 79 | } |
28 | 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
29 | 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
30 | 30 | |
31 | syntax = "proto3"; | |
31 | syntax = "proto2"; | |
32 | 32 | |
33 | 33 | package goproto.test.import_public.sub; |
34 | 34 | |
35 | 35 | option go_package = "github.com/golang/protobuf/protoc-gen-go/testdata/import_public/sub"; |
36 | 36 | |
37 | 37 | message M2 { |
38 | extensions 1 to max; | |
38 | 39 | } |
45 | 45 | var _ mainpb.E = subpb.E(0) |
46 | 46 | _ = &mainpb.Public{ |
47 | 47 | M: &mainpb.M{}, |
48 | E: mainpb.E_ZERO, | |
48 | E: mainpb.E_ZERO.Enum(), | |
49 | 49 | Local: &mainpb.Local{ |
50 | 50 | M: &mainpb.M{}, |
51 | E: mainpb.E_ZERO, | |
51 | E: mainpb.E_ZERO.Enum(), | |
52 | 52 | }, |
53 | 53 | } |
54 | 54 | _ = &mainpb.Public{ |
55 | 55 | M: &subpb.M{}, |
56 | E: subpb.E_ZERO, | |
56 | E: subpb.E_ZERO.Enum(), | |
57 | 57 | Local: &mainpb.Local{ |
58 | 58 | M: &subpb.M{}, |
59 | E: subpb.E_ZERO, | |
59 | E: subpb.E_ZERO.Enum(), | |
60 | 60 | }, |
61 | 61 | } |
62 | 62 | _ = &mainpb.M{ |
0 | 0 | // Code generated by protoc-gen-go. DO NOT EDIT. |
1 | 1 | // source: imports/fmt/m.proto |
2 | 2 | |
3 | package fmt // import "github.com/golang/protobuf/protoc-gen-go/testdata/imports/fmt" | |
3 | package fmt | |
4 | 4 | |
5 | import proto "github.com/golang/protobuf/proto" | |
6 | import fmt "fmt" | |
7 | import math "math" | |
5 | import ( | |
6 | fmt "fmt" | |
7 | proto "github.com/golang/protobuf/proto" | |
8 | math "math" | |
9 | ) | |
8 | 10 | |
9 | 11 | // Reference imports to suppress errors if they are not otherwise used. |
10 | 12 | var _ = proto.Marshal |
15 | 17 | // is compatible with the proto package it is being compiled against. |
16 | 18 | // A compilation error at this line likely means your copy of the |
17 | 19 | // proto package needs to be updated. |
18 | const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package | |
20 | const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package | |
19 | 21 | |
20 | 22 | type M struct { |
21 | 23 | XXX_NoUnkeyedLiteral struct{} `json:"-"` |
27 | 29 | func (m *M) String() string { return proto.CompactTextString(m) } |
28 | 30 | func (*M) ProtoMessage() {} |
29 | 31 | func (*M) Descriptor() ([]byte, []int) { |
30 | return fileDescriptor_m_867dd34c461422b8, []int{0} | |
32 | return fileDescriptor_72c126fcd452e392, []int{0} | |
31 | 33 | } |
34 | ||
32 | 35 | func (m *M) XXX_Unmarshal(b []byte) error { |
33 | 36 | return xxx_messageInfo_M.Unmarshal(m, b) |
34 | 37 | } |
35 | 38 | func (m *M) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
36 | 39 | return xxx_messageInfo_M.Marshal(b, m, deterministic) |
37 | 40 | } |
38 | func (dst *M) XXX_Merge(src proto.Message) { | |
39 | xxx_messageInfo_M.Merge(dst, src) | |
41 | func (m *M) XXX_Merge(src proto.Message) { | |
42 | xxx_messageInfo_M.Merge(m, src) | |
40 | 43 | } |
41 | 44 | func (m *M) XXX_Size() int { |
42 | 45 | return xxx_messageInfo_M.Size(m) |
51 | 54 | proto.RegisterType((*M)(nil), "fmt.M") |
52 | 55 | } |
53 | 56 | |
54 | func init() { proto.RegisterFile("imports/fmt/m.proto", fileDescriptor_m_867dd34c461422b8) } | |
57 | func init() { proto.RegisterFile("imports/fmt/m.proto", fileDescriptor_72c126fcd452e392) } | |
55 | 58 | |
56 | var fileDescriptor_m_867dd34c461422b8 = []byte{ | |
59 | var fileDescriptor_72c126fcd452e392 = []byte{ | |
57 | 60 | // 109 bytes of a gzipped FileDescriptorProto |
58 | 61 | 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0xce, 0xcc, 0x2d, 0xc8, |
59 | 62 | 0x2f, 0x2a, 0x29, 0xd6, 0x4f, 0xcb, 0x2d, 0xd1, 0xcf, 0xd5, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, |
0 | 0 | // Code generated by protoc-gen-go. DO NOT EDIT. |
1 | 1 | // source: imports/test_a_1/m1.proto |
2 | 2 | |
3 | package test_a_1 // import "github.com/golang/protobuf/protoc-gen-go/testdata/imports/test_a_1" | |
3 | package test_a_1 | |
4 | 4 | |
5 | import proto "github.com/golang/protobuf/proto" | |
6 | import fmt "fmt" | |
7 | import math "math" | |
5 | import ( | |
6 | fmt "fmt" | |
7 | proto "github.com/golang/protobuf/proto" | |
8 | math "math" | |
9 | ) | |
8 | 10 | |
9 | 11 | // Reference imports to suppress errors if they are not otherwise used. |
10 | 12 | var _ = proto.Marshal |
15 | 17 | // is compatible with the proto package it is being compiled against. |
16 | 18 | // A compilation error at this line likely means your copy of the |
17 | 19 | // proto package needs to be updated. |
18 | const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package | |
20 | const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package | |
19 | 21 | |
20 | 22 | type E1 int32 |
21 | 23 | |
26 | 28 | var E1_name = map[int32]string{ |
27 | 29 | 0: "E1_ZERO", |
28 | 30 | } |
31 | ||
29 | 32 | var E1_value = map[string]int32{ |
30 | 33 | "E1_ZERO": 0, |
31 | 34 | } |
33 | 36 | func (x E1) String() string { |
34 | 37 | return proto.EnumName(E1_name, int32(x)) |
35 | 38 | } |
39 | ||
36 | 40 | func (E1) EnumDescriptor() ([]byte, []int) { |
37 | return fileDescriptor_m1_56a2598431d21e61, []int{0} | |
41 | return fileDescriptor_c1091de3fa870a14, []int{0} | |
38 | 42 | } |
39 | 43 | |
40 | 44 | type M1 struct { |
47 | 51 | func (m *M1) String() string { return proto.CompactTextString(m) } |
48 | 52 | func (*M1) ProtoMessage() {} |
49 | 53 | func (*M1) Descriptor() ([]byte, []int) { |
50 | return fileDescriptor_m1_56a2598431d21e61, []int{0} | |
54 | return fileDescriptor_c1091de3fa870a14, []int{0} | |
51 | 55 | } |
56 | ||
52 | 57 | func (m *M1) XXX_Unmarshal(b []byte) error { |
53 | 58 | return xxx_messageInfo_M1.Unmarshal(m, b) |
54 | 59 | } |
55 | 60 | func (m *M1) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
56 | 61 | return xxx_messageInfo_M1.Marshal(b, m, deterministic) |
57 | 62 | } |
58 | func (dst *M1) XXX_Merge(src proto.Message) { | |
59 | xxx_messageInfo_M1.Merge(dst, src) | |
63 | func (m *M1) XXX_Merge(src proto.Message) { | |
64 | xxx_messageInfo_M1.Merge(m, src) | |
60 | 65 | } |
61 | 66 | func (m *M1) XXX_Size() int { |
62 | 67 | return xxx_messageInfo_M1.Size(m) |
78 | 83 | func (m *M1_1) String() string { return proto.CompactTextString(m) } |
79 | 84 | func (*M1_1) ProtoMessage() {} |
80 | 85 | func (*M1_1) Descriptor() ([]byte, []int) { |
81 | return fileDescriptor_m1_56a2598431d21e61, []int{1} | |
86 | return fileDescriptor_c1091de3fa870a14, []int{1} | |
82 | 87 | } |
88 | ||
83 | 89 | func (m *M1_1) XXX_Unmarshal(b []byte) error { |
84 | 90 | return xxx_messageInfo_M1_1.Unmarshal(m, b) |
85 | 91 | } |
86 | 92 | func (m *M1_1) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
87 | 93 | return xxx_messageInfo_M1_1.Marshal(b, m, deterministic) |
88 | 94 | } |
89 | func (dst *M1_1) XXX_Merge(src proto.Message) { | |
90 | xxx_messageInfo_M1_1.Merge(dst, src) | |
95 | func (m *M1_1) XXX_Merge(src proto.Message) { | |
96 | xxx_messageInfo_M1_1.Merge(m, src) | |
91 | 97 | } |
92 | 98 | func (m *M1_1) XXX_Size() int { |
93 | 99 | return xxx_messageInfo_M1_1.Size(m) |
106 | 112 | } |
107 | 113 | |
108 | 114 | func init() { |
115 | proto.RegisterEnum("test.a.E1", E1_name, E1_value) | |
109 | 116 | proto.RegisterType((*M1)(nil), "test.a.M1") |
110 | 117 | proto.RegisterType((*M1_1)(nil), "test.a.M1_1") |
111 | proto.RegisterEnum("test.a.E1", E1_name, E1_value) | |
112 | 118 | } |
113 | 119 | |
114 | func init() { proto.RegisterFile("imports/test_a_1/m1.proto", fileDescriptor_m1_56a2598431d21e61) } | |
120 | func init() { proto.RegisterFile("imports/test_a_1/m1.proto", fileDescriptor_c1091de3fa870a14) } | |
115 | 121 | |
116 | var fileDescriptor_m1_56a2598431d21e61 = []byte{ | |
122 | var fileDescriptor_c1091de3fa870a14 = []byte{ | |
117 | 123 | // 165 bytes of a gzipped FileDescriptorProto |
118 | 124 | 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0xcc, 0xcc, 0x2d, 0xc8, |
119 | 125 | 0x2f, 0x2a, 0x29, 0xd6, 0x2f, 0x49, 0x2d, 0x2e, 0x89, 0x4f, 0x8c, 0x37, 0xd4, 0xcf, 0x35, 0xd4, |
0 | 0 | // Code generated by protoc-gen-go. DO NOT EDIT. |
1 | 1 | // source: imports/test_a_1/m2.proto |
2 | 2 | |
3 | package test_a_1 // import "github.com/golang/protobuf/protoc-gen-go/testdata/imports/test_a_1" | |
3 | package test_a_1 | |
4 | 4 | |
5 | import proto "github.com/golang/protobuf/proto" | |
6 | import fmt "fmt" | |
7 | import math "math" | |
5 | import ( | |
6 | fmt "fmt" | |
7 | proto "github.com/golang/protobuf/proto" | |
8 | math "math" | |
9 | ) | |
8 | 10 | |
9 | 11 | // Reference imports to suppress errors if they are not otherwise used. |
10 | 12 | var _ = proto.Marshal |
15 | 17 | // is compatible with the proto package it is being compiled against. |
16 | 18 | // A compilation error at this line likely means your copy of the |
17 | 19 | // proto package needs to be updated. |
18 | const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package | |
20 | const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package | |
19 | 21 | |
20 | 22 | type M2 struct { |
21 | 23 | XXX_NoUnkeyedLiteral struct{} `json:"-"` |
27 | 29 | func (m *M2) String() string { return proto.CompactTextString(m) } |
28 | 30 | func (*M2) ProtoMessage() {} |
29 | 31 | func (*M2) Descriptor() ([]byte, []int) { |
30 | return fileDescriptor_m2_ccd6356c045a9ac3, []int{0} | |
32 | return fileDescriptor_20cf27515c0d621c, []int{0} | |
31 | 33 | } |
34 | ||
32 | 35 | func (m *M2) XXX_Unmarshal(b []byte) error { |
33 | 36 | return xxx_messageInfo_M2.Unmarshal(m, b) |
34 | 37 | } |
35 | 38 | func (m *M2) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
36 | 39 | return xxx_messageInfo_M2.Marshal(b, m, deterministic) |
37 | 40 | } |
38 | func (dst *M2) XXX_Merge(src proto.Message) { | |
39 | xxx_messageInfo_M2.Merge(dst, src) | |
41 | func (m *M2) XXX_Merge(src proto.Message) { | |
42 | xxx_messageInfo_M2.Merge(m, src) | |
40 | 43 | } |
41 | 44 | func (m *M2) XXX_Size() int { |
42 | 45 | return xxx_messageInfo_M2.Size(m) |
51 | 54 | proto.RegisterType((*M2)(nil), "test.a.M2") |
52 | 55 | } |
53 | 56 | |
54 | func init() { proto.RegisterFile("imports/test_a_1/m2.proto", fileDescriptor_m2_ccd6356c045a9ac3) } | |
57 | func init() { proto.RegisterFile("imports/test_a_1/m2.proto", fileDescriptor_20cf27515c0d621c) } | |
55 | 58 | |
56 | var fileDescriptor_m2_ccd6356c045a9ac3 = []byte{ | |
59 | var fileDescriptor_20cf27515c0d621c = []byte{ | |
57 | 60 | // 114 bytes of a gzipped FileDescriptorProto |
58 | 61 | 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0xcc, 0xcc, 0x2d, 0xc8, |
59 | 62 | 0x2f, 0x2a, 0x29, 0xd6, 0x2f, 0x49, 0x2d, 0x2e, 0x89, 0x4f, 0x8c, 0x37, 0xd4, 0xcf, 0x35, 0xd2, |
0 | 0 | // Code generated by protoc-gen-go. DO NOT EDIT. |
1 | 1 | // source: imports/test_a_2/m3.proto |
2 | 2 | |
3 | package test_a_2 // import "github.com/golang/protobuf/protoc-gen-go/testdata/imports/test_a_2" | |
3 | package test_a_2 | |
4 | 4 | |
5 | import proto "github.com/golang/protobuf/proto" | |
6 | import fmt "fmt" | |
7 | import math "math" | |
5 | import ( | |
6 | fmt "fmt" | |
7 | proto "github.com/golang/protobuf/proto" | |
8 | math "math" | |
9 | ) | |
8 | 10 | |
9 | 11 | // Reference imports to suppress errors if they are not otherwise used. |
10 | 12 | var _ = proto.Marshal |
15 | 17 | // is compatible with the proto package it is being compiled against. |
16 | 18 | // A compilation error at this line likely means your copy of the |
17 | 19 | // proto package needs to be updated. |
18 | const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package | |
20 | const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package | |
19 | 21 | |
20 | 22 | type M3 struct { |
21 | 23 | XXX_NoUnkeyedLiteral struct{} `json:"-"` |
27 | 29 | func (m *M3) String() string { return proto.CompactTextString(m) } |
28 | 30 | func (*M3) ProtoMessage() {} |
29 | 31 | func (*M3) Descriptor() ([]byte, []int) { |
30 | return fileDescriptor_m3_de310e87d08d4216, []int{0} | |
32 | return fileDescriptor_ff9d8f834875c9c5, []int{0} | |
31 | 33 | } |
34 | ||
32 | 35 | func (m *M3) XXX_Unmarshal(b []byte) error { |
33 | 36 | return xxx_messageInfo_M3.Unmarshal(m, b) |
34 | 37 | } |
35 | 38 | func (m *M3) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
36 | 39 | return xxx_messageInfo_M3.Marshal(b, m, deterministic) |
37 | 40 | } |
38 | func (dst *M3) XXX_Merge(src proto.Message) { | |
39 | xxx_messageInfo_M3.Merge(dst, src) | |
41 | func (m *M3) XXX_Merge(src proto.Message) { | |
42 | xxx_messageInfo_M3.Merge(m, src) | |
40 | 43 | } |
41 | 44 | func (m *M3) XXX_Size() int { |
42 | 45 | return xxx_messageInfo_M3.Size(m) |
51 | 54 | proto.RegisterType((*M3)(nil), "test.a.M3") |
52 | 55 | } |
53 | 56 | |
54 | func init() { proto.RegisterFile("imports/test_a_2/m3.proto", fileDescriptor_m3_de310e87d08d4216) } | |
57 | func init() { proto.RegisterFile("imports/test_a_2/m3.proto", fileDescriptor_ff9d8f834875c9c5) } | |
55 | 58 | |
56 | var fileDescriptor_m3_de310e87d08d4216 = []byte{ | |
59 | var fileDescriptor_ff9d8f834875c9c5 = []byte{ | |
57 | 60 | // 114 bytes of a gzipped FileDescriptorProto |
58 | 61 | 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0xcc, 0xcc, 0x2d, 0xc8, |
59 | 62 | 0x2f, 0x2a, 0x29, 0xd6, 0x2f, 0x49, 0x2d, 0x2e, 0x89, 0x4f, 0x8c, 0x37, 0xd2, 0xcf, 0x35, 0xd6, |
0 | 0 | // Code generated by protoc-gen-go. DO NOT EDIT. |
1 | 1 | // source: imports/test_a_2/m4.proto |
2 | 2 | |
3 | package test_a_2 // import "github.com/golang/protobuf/protoc-gen-go/testdata/imports/test_a_2" | |
3 | package test_a_2 | |
4 | 4 | |
5 | import proto "github.com/golang/protobuf/proto" | |
6 | import fmt "fmt" | |
7 | import math "math" | |
5 | import ( | |
6 | fmt "fmt" | |
7 | proto "github.com/golang/protobuf/proto" | |
8 | math "math" | |
9 | ) | |
8 | 10 | |
9 | 11 | // Reference imports to suppress errors if they are not otherwise used. |
10 | 12 | var _ = proto.Marshal |
15 | 17 | // is compatible with the proto package it is being compiled against. |
16 | 18 | // A compilation error at this line likely means your copy of the |
17 | 19 | // proto package needs to be updated. |
18 | const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package | |
20 | const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package | |
19 | 21 | |
20 | 22 | type M4 struct { |
21 | 23 | XXX_NoUnkeyedLiteral struct{} `json:"-"` |
27 | 29 | func (m *M4) String() string { return proto.CompactTextString(m) } |
28 | 30 | func (*M4) ProtoMessage() {} |
29 | 31 | func (*M4) Descriptor() ([]byte, []int) { |
30 | return fileDescriptor_m4_da12b386229f3791, []int{0} | |
32 | return fileDescriptor_fdd24f82f6c5a786, []int{0} | |
31 | 33 | } |
34 | ||
32 | 35 | func (m *M4) XXX_Unmarshal(b []byte) error { |
33 | 36 | return xxx_messageInfo_M4.Unmarshal(m, b) |
34 | 37 | } |
35 | 38 | func (m *M4) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
36 | 39 | return xxx_messageInfo_M4.Marshal(b, m, deterministic) |
37 | 40 | } |
38 | func (dst *M4) XXX_Merge(src proto.Message) { | |
39 | xxx_messageInfo_M4.Merge(dst, src) | |
41 | func (m *M4) XXX_Merge(src proto.Message) { | |
42 | xxx_messageInfo_M4.Merge(m, src) | |
40 | 43 | } |
41 | 44 | func (m *M4) XXX_Size() int { |
42 | 45 | return xxx_messageInfo_M4.Size(m) |
51 | 54 | proto.RegisterType((*M4)(nil), "test.a.M4") |
52 | 55 | } |
53 | 56 | |
54 | func init() { proto.RegisterFile("imports/test_a_2/m4.proto", fileDescriptor_m4_da12b386229f3791) } | |
57 | func init() { proto.RegisterFile("imports/test_a_2/m4.proto", fileDescriptor_fdd24f82f6c5a786) } | |
55 | 58 | |
56 | var fileDescriptor_m4_da12b386229f3791 = []byte{ | |
59 | var fileDescriptor_fdd24f82f6c5a786 = []byte{ | |
57 | 60 | // 114 bytes of a gzipped FileDescriptorProto |
58 | 61 | 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0xcc, 0xcc, 0x2d, 0xc8, |
59 | 62 | 0x2f, 0x2a, 0x29, 0xd6, 0x2f, 0x49, 0x2d, 0x2e, 0x89, 0x4f, 0x8c, 0x37, 0xd2, 0xcf, 0x35, 0xd1, |
0 | 0 | // Code generated by protoc-gen-go. DO NOT EDIT. |
1 | 1 | // source: imports/test_b_1/m1.proto |
2 | 2 | |
3 | package beta // import "github.com/golang/protobuf/protoc-gen-go/testdata/imports/test_b_1" | |
3 | package beta | |
4 | 4 | |
5 | import proto "github.com/golang/protobuf/proto" | |
6 | import fmt "fmt" | |
7 | import math "math" | |
5 | import ( | |
6 | fmt "fmt" | |
7 | proto "github.com/golang/protobuf/proto" | |
8 | math "math" | |
9 | ) | |
8 | 10 | |
9 | 11 | // Reference imports to suppress errors if they are not otherwise used. |
10 | 12 | var _ = proto.Marshal |
15 | 17 | // is compatible with the proto package it is being compiled against. |
16 | 18 | // A compilation error at this line likely means your copy of the |
17 | 19 | // proto package needs to be updated. |
18 | const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package | |
20 | const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package | |
19 | 21 | |
20 | 22 | type M1 struct { |
21 | 23 | XXX_NoUnkeyedLiteral struct{} `json:"-"` |
27 | 29 | func (m *M1) String() string { return proto.CompactTextString(m) } |
28 | 30 | func (*M1) ProtoMessage() {} |
29 | 31 | func (*M1) Descriptor() ([]byte, []int) { |
30 | return fileDescriptor_m1_aff127b054aec649, []int{0} | |
32 | return fileDescriptor_7f49573d035512a8, []int{0} | |
31 | 33 | } |
34 | ||
32 | 35 | func (m *M1) XXX_Unmarshal(b []byte) error { |
33 | 36 | return xxx_messageInfo_M1.Unmarshal(m, b) |
34 | 37 | } |
35 | 38 | func (m *M1) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
36 | 39 | return xxx_messageInfo_M1.Marshal(b, m, deterministic) |
37 | 40 | } |
38 | func (dst *M1) XXX_Merge(src proto.Message) { | |
39 | xxx_messageInfo_M1.Merge(dst, src) | |
41 | func (m *M1) XXX_Merge(src proto.Message) { | |
42 | xxx_messageInfo_M1.Merge(m, src) | |
40 | 43 | } |
41 | 44 | func (m *M1) XXX_Size() int { |
42 | 45 | return xxx_messageInfo_M1.Size(m) |
51 | 54 | proto.RegisterType((*M1)(nil), "test.b.part1.M1") |
52 | 55 | } |
53 | 56 | |
54 | func init() { proto.RegisterFile("imports/test_b_1/m1.proto", fileDescriptor_m1_aff127b054aec649) } | |
57 | func init() { proto.RegisterFile("imports/test_b_1/m1.proto", fileDescriptor_7f49573d035512a8) } | |
55 | 58 | |
56 | var fileDescriptor_m1_aff127b054aec649 = []byte{ | |
59 | var fileDescriptor_7f49573d035512a8 = []byte{ | |
57 | 60 | // 125 bytes of a gzipped FileDescriptorProto |
58 | 61 | 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0xcc, 0xcc, 0x2d, 0xc8, |
59 | 62 | 0x2f, 0x2a, 0x29, 0xd6, 0x2f, 0x49, 0x2d, 0x2e, 0x89, 0x4f, 0x8a, 0x37, 0xd4, 0xcf, 0x35, 0xd4, |
0 | 0 | // Code generated by protoc-gen-go. DO NOT EDIT. |
1 | 1 | // source: imports/test_b_1/m2.proto |
2 | 2 | |
3 | package beta // import "github.com/golang/protobuf/protoc-gen-go/testdata/imports/test_b_1" | |
3 | package beta | |
4 | 4 | |
5 | import proto "github.com/golang/protobuf/proto" | |
6 | import fmt "fmt" | |
7 | import math "math" | |
5 | import ( | |
6 | fmt "fmt" | |
7 | proto "github.com/golang/protobuf/proto" | |
8 | math "math" | |
9 | ) | |
8 | 10 | |
9 | 11 | // Reference imports to suppress errors if they are not otherwise used. |
10 | 12 | var _ = proto.Marshal |
15 | 17 | // is compatible with the proto package it is being compiled against. |
16 | 18 | // A compilation error at this line likely means your copy of the |
17 | 19 | // proto package needs to be updated. |
18 | const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package | |
20 | const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package | |
19 | 21 | |
20 | 22 | type M2 struct { |
21 | 23 | XXX_NoUnkeyedLiteral struct{} `json:"-"` |
27 | 29 | func (m *M2) String() string { return proto.CompactTextString(m) } |
28 | 30 | func (*M2) ProtoMessage() {} |
29 | 31 | func (*M2) Descriptor() ([]byte, []int) { |
30 | return fileDescriptor_m2_0c59cab35ba1b0d8, []int{0} | |
32 | return fileDescriptor_a1becddceeb586f2, []int{0} | |
31 | 33 | } |
34 | ||
32 | 35 | func (m *M2) XXX_Unmarshal(b []byte) error { |
33 | 36 | return xxx_messageInfo_M2.Unmarshal(m, b) |
34 | 37 | } |
35 | 38 | func (m *M2) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
36 | 39 | return xxx_messageInfo_M2.Marshal(b, m, deterministic) |
37 | 40 | } |
38 | func (dst *M2) XXX_Merge(src proto.Message) { | |
39 | xxx_messageInfo_M2.Merge(dst, src) | |
41 | func (m *M2) XXX_Merge(src proto.Message) { | |
42 | xxx_messageInfo_M2.Merge(m, src) | |
40 | 43 | } |
41 | 44 | func (m *M2) XXX_Size() int { |
42 | 45 | return xxx_messageInfo_M2.Size(m) |
51 | 54 | proto.RegisterType((*M2)(nil), "test.b.part2.M2") |
52 | 55 | } |
53 | 56 | |
54 | func init() { proto.RegisterFile("imports/test_b_1/m2.proto", fileDescriptor_m2_0c59cab35ba1b0d8) } | |
57 | func init() { proto.RegisterFile("imports/test_b_1/m2.proto", fileDescriptor_a1becddceeb586f2) } | |
55 | 58 | |
56 | var fileDescriptor_m2_0c59cab35ba1b0d8 = []byte{ | |
59 | var fileDescriptor_a1becddceeb586f2 = []byte{ | |
57 | 60 | // 125 bytes of a gzipped FileDescriptorProto |
58 | 61 | 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0xcc, 0xcc, 0x2d, 0xc8, |
59 | 62 | 0x2f, 0x2a, 0x29, 0xd6, 0x2f, 0x49, 0x2d, 0x2e, 0x89, 0x4f, 0x8a, 0x37, 0xd4, 0xcf, 0x35, 0xd2, |
0 | 0 | // Code generated by protoc-gen-go. DO NOT EDIT. |
1 | 1 | // source: imports/test_import_a1m1.proto |
2 | 2 | |
3 | package imports // import "github.com/golang/protobuf/protoc-gen-go/testdata/imports" | |
3 | package imports | |
4 | 4 | |
5 | import proto "github.com/golang/protobuf/proto" | |
6 | import fmt "fmt" | |
7 | import math "math" | |
8 | import test_a_1 "github.com/golang/protobuf/protoc-gen-go/testdata/imports/test_a_1" | |
5 | import ( | |
6 | fmt "fmt" | |
7 | proto "github.com/golang/protobuf/proto" | |
8 | test_a_1 "github.com/golang/protobuf/protoc-gen-go/testdata/imports/test_a_1" | |
9 | math "math" | |
10 | ) | |
9 | 11 | |
10 | 12 | // Reference imports to suppress errors if they are not otherwise used. |
11 | 13 | var _ = proto.Marshal |
16 | 18 | // is compatible with the proto package it is being compiled against. |
17 | 19 | // A compilation error at this line likely means your copy of the |
18 | 20 | // proto package needs to be updated. |
19 | const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package | |
21 | const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package | |
20 | 22 | |
21 | 23 | type A1M1 struct { |
22 | 24 | F *test_a_1.M1 `protobuf:"bytes,1,opt,name=f,proto3" json:"f,omitempty"` |
29 | 31 | func (m *A1M1) String() string { return proto.CompactTextString(m) } |
30 | 32 | func (*A1M1) ProtoMessage() {} |
31 | 33 | func (*A1M1) Descriptor() ([]byte, []int) { |
32 | return fileDescriptor_test_import_a1m1_d7f2b5c638a69f6e, []int{0} | |
34 | return fileDescriptor_3b904a47327455f3, []int{0} | |
33 | 35 | } |
36 | ||
34 | 37 | func (m *A1M1) XXX_Unmarshal(b []byte) error { |
35 | 38 | return xxx_messageInfo_A1M1.Unmarshal(m, b) |
36 | 39 | } |
37 | 40 | func (m *A1M1) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
38 | 41 | return xxx_messageInfo_A1M1.Marshal(b, m, deterministic) |
39 | 42 | } |
40 | func (dst *A1M1) XXX_Merge(src proto.Message) { | |
41 | xxx_messageInfo_A1M1.Merge(dst, src) | |
43 | func (m *A1M1) XXX_Merge(src proto.Message) { | |
44 | xxx_messageInfo_A1M1.Merge(m, src) | |
42 | 45 | } |
43 | 46 | func (m *A1M1) XXX_Size() int { |
44 | 47 | return xxx_messageInfo_A1M1.Size(m) |
60 | 63 | proto.RegisterType((*A1M1)(nil), "test.A1M1") |
61 | 64 | } |
62 | 65 | |
63 | func init() { | |
64 | proto.RegisterFile("imports/test_import_a1m1.proto", fileDescriptor_test_import_a1m1_d7f2b5c638a69f6e) | |
65 | } | |
66 | func init() { proto.RegisterFile("imports/test_import_a1m1.proto", fileDescriptor_3b904a47327455f3) } | |
66 | 67 | |
67 | var fileDescriptor_test_import_a1m1_d7f2b5c638a69f6e = []byte{ | |
68 | var fileDescriptor_3b904a47327455f3 = []byte{ | |
68 | 69 | // 149 bytes of a gzipped FileDescriptorProto |
69 | 70 | 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0xcb, 0xcc, 0x2d, 0xc8, |
70 | 71 | 0x2f, 0x2a, 0x29, 0xd6, 0x2f, 0x49, 0x2d, 0x2e, 0x89, 0x87, 0x70, 0xe2, 0x13, 0x0d, 0x73, 0x0d, |
0 | 0 | // Code generated by protoc-gen-go. DO NOT EDIT. |
1 | 1 | // source: imports/test_import_a1m2.proto |
2 | 2 | |
3 | package imports // import "github.com/golang/protobuf/protoc-gen-go/testdata/imports" | |
3 | package imports | |
4 | 4 | |
5 | import proto "github.com/golang/protobuf/proto" | |
6 | import fmt "fmt" | |
7 | import math "math" | |
8 | import test_a_1 "github.com/golang/protobuf/protoc-gen-go/testdata/imports/test_a_1" | |
5 | import ( | |
6 | fmt "fmt" | |
7 | proto "github.com/golang/protobuf/proto" | |
8 | test_a_1 "github.com/golang/protobuf/protoc-gen-go/testdata/imports/test_a_1" | |
9 | math "math" | |
10 | ) | |
9 | 11 | |
10 | 12 | // Reference imports to suppress errors if they are not otherwise used. |
11 | 13 | var _ = proto.Marshal |
16 | 18 | // is compatible with the proto package it is being compiled against. |
17 | 19 | // A compilation error at this line likely means your copy of the |
18 | 20 | // proto package needs to be updated. |
19 | const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package | |
21 | const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package | |
20 | 22 | |
21 | 23 | type A1M2 struct { |
22 | 24 | F *test_a_1.M2 `protobuf:"bytes,1,opt,name=f,proto3" json:"f,omitempty"` |
29 | 31 | func (m *A1M2) String() string { return proto.CompactTextString(m) } |
30 | 32 | func (*A1M2) ProtoMessage() {} |
31 | 33 | func (*A1M2) Descriptor() ([]byte, []int) { |
32 | return fileDescriptor_test_import_a1m2_9a3281ce9464e116, []int{0} | |
34 | return fileDescriptor_bdb27b114687957d, []int{0} | |
33 | 35 | } |
36 | ||
34 | 37 | func (m *A1M2) XXX_Unmarshal(b []byte) error { |
35 | 38 | return xxx_messageInfo_A1M2.Unmarshal(m, b) |
36 | 39 | } |
37 | 40 | func (m *A1M2) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
38 | 41 | return xxx_messageInfo_A1M2.Marshal(b, m, deterministic) |
39 | 42 | } |
40 | func (dst *A1M2) XXX_Merge(src proto.Message) { | |
41 | xxx_messageInfo_A1M2.Merge(dst, src) | |
43 | func (m *A1M2) XXX_Merge(src proto.Message) { | |
44 | xxx_messageInfo_A1M2.Merge(m, src) | |
42 | 45 | } |
43 | 46 | func (m *A1M2) XXX_Size() int { |
44 | 47 | return xxx_messageInfo_A1M2.Size(m) |
60 | 63 | proto.RegisterType((*A1M2)(nil), "test.A1M2") |
61 | 64 | } |
62 | 65 | |
63 | func init() { | |
64 | proto.RegisterFile("imports/test_import_a1m2.proto", fileDescriptor_test_import_a1m2_9a3281ce9464e116) | |
65 | } | |
66 | func init() { proto.RegisterFile("imports/test_import_a1m2.proto", fileDescriptor_bdb27b114687957d) } | |
66 | 67 | |
67 | var fileDescriptor_test_import_a1m2_9a3281ce9464e116 = []byte{ | |
68 | var fileDescriptor_bdb27b114687957d = []byte{ | |
68 | 69 | // 149 bytes of a gzipped FileDescriptorProto |
69 | 70 | 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0xcb, 0xcc, 0x2d, 0xc8, |
70 | 71 | 0x2f, 0x2a, 0x29, 0xd6, 0x2f, 0x49, 0x2d, 0x2e, 0x89, 0x87, 0x70, 0xe2, 0x13, 0x0d, 0x73, 0x8d, |
0 | 0 | // Code generated by protoc-gen-go. DO NOT EDIT. |
1 | 1 | // source: imports/test_import_all.proto |
2 | 2 | |
3 | package imports // import "github.com/golang/protobuf/protoc-gen-go/testdata/imports" | |
3 | package imports | |
4 | 4 | |
5 | import proto "github.com/golang/protobuf/proto" | |
6 | import fmt "fmt" | |
7 | import math "math" | |
8 | import fmt1 "github.com/golang/protobuf/protoc-gen-go/testdata/imports/fmt" | |
9 | import test_a_1 "github.com/golang/protobuf/protoc-gen-go/testdata/imports/test_a_1" | |
10 | import test_a_2 "github.com/golang/protobuf/protoc-gen-go/testdata/imports/test_a_2" | |
11 | import test_b_1 "github.com/golang/protobuf/protoc-gen-go/testdata/imports/test_b_1" | |
5 | import ( | |
6 | fmt "fmt" | |
7 | proto "github.com/golang/protobuf/proto" | |
8 | fmt1 "github.com/golang/protobuf/protoc-gen-go/testdata/imports/fmt" | |
9 | test_a_1 "github.com/golang/protobuf/protoc-gen-go/testdata/imports/test_a_1" | |
10 | test_a_2 "github.com/golang/protobuf/protoc-gen-go/testdata/imports/test_a_2" | |
11 | test_b_1 "github.com/golang/protobuf/protoc-gen-go/testdata/imports/test_b_1" | |
12 | math "math" | |
13 | ) | |
12 | 14 | |
13 | 15 | // Reference imports to suppress errors if they are not otherwise used. |
14 | 16 | var _ = proto.Marshal |
19 | 21 | // is compatible with the proto package it is being compiled against. |
20 | 22 | // A compilation error at this line likely means your copy of the |
21 | 23 | // proto package needs to be updated. |
22 | const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package | |
24 | const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package | |
23 | 25 | |
24 | 26 | type All struct { |
25 | 27 | Am1 *test_a_1.M1 `protobuf:"bytes,1,opt,name=am1,proto3" json:"am1,omitempty"` |
38 | 40 | func (m *All) String() string { return proto.CompactTextString(m) } |
39 | 41 | func (*All) ProtoMessage() {} |
40 | 42 | func (*All) Descriptor() ([]byte, []int) { |
41 | return fileDescriptor_test_import_all_b41dc4592e4a4f3b, []int{0} | |
43 | return fileDescriptor_324466f0afc16f77, []int{0} | |
42 | 44 | } |
45 | ||
43 | 46 | func (m *All) XXX_Unmarshal(b []byte) error { |
44 | 47 | return xxx_messageInfo_All.Unmarshal(m, b) |
45 | 48 | } |
46 | 49 | func (m *All) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
47 | 50 | return xxx_messageInfo_All.Marshal(b, m, deterministic) |
48 | 51 | } |
49 | func (dst *All) XXX_Merge(src proto.Message) { | |
50 | xxx_messageInfo_All.Merge(dst, src) | |
52 | func (m *All) XXX_Merge(src proto.Message) { | |
53 | xxx_messageInfo_All.Merge(m, src) | |
51 | 54 | } |
52 | 55 | func (m *All) XXX_Size() int { |
53 | 56 | return xxx_messageInfo_All.Size(m) |
111 | 114 | proto.RegisterType((*All)(nil), "test.All") |
112 | 115 | } |
113 | 116 | |
114 | func init() { | |
115 | proto.RegisterFile("imports/test_import_all.proto", fileDescriptor_test_import_all_b41dc4592e4a4f3b) | |
116 | } | |
117 | func init() { proto.RegisterFile("imports/test_import_all.proto", fileDescriptor_324466f0afc16f77) } | |
117 | 118 | |
118 | var fileDescriptor_test_import_all_b41dc4592e4a4f3b = []byte{ | |
119 | var fileDescriptor_324466f0afc16f77 = []byte{ | |
119 | 120 | // 258 bytes of a gzipped FileDescriptorProto |
120 | 121 | 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0xd0, 0xb1, 0x4e, 0xc3, 0x30, |
121 | 122 | 0x10, 0x06, 0x60, 0x15, 0x97, 0x20, 0x99, 0x05, 0x85, 0xc5, 0x20, 0x90, 0x50, 0x27, 0x96, 0xda, |
0 | // Code generated by protoc-gen-go. DO NOT EDIT. | |
1 | // source: issue780_oneof_conflict/test.proto | |
2 | ||
3 | package oneoftest | |
4 | ||
5 | import ( | |
6 | fmt "fmt" | |
7 | proto "github.com/golang/protobuf/proto" | |
8 | math "math" | |
9 | ) | |
10 | ||
11 | // Reference imports to suppress errors if they are not otherwise used. | |
12 | var _ = proto.Marshal | |
13 | var _ = fmt.Errorf | |
14 | var _ = math.Inf | |
15 | ||
16 | // This is a compile-time assertion to ensure that this generated file | |
17 | // is compatible with the proto package it is being compiled against. | |
18 | // A compilation error at this line likely means your copy of the | |
19 | // proto package needs to be updated. | |
20 | const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package | |
21 | ||
22 | type Foo struct { | |
23 | // Types that are valid to be assigned to Bar: | |
24 | // *Foo_GetBar | |
25 | Bar isFoo_Bar `protobuf_oneof:"bar"` | |
26 | XXX_NoUnkeyedLiteral struct{} `json:"-"` | |
27 | XXX_unrecognized []byte `json:"-"` | |
28 | XXX_sizecache int32 `json:"-"` | |
29 | } | |
30 | ||
31 | func (m *Foo) Reset() { *m = Foo{} } | |
32 | func (m *Foo) String() string { return proto.CompactTextString(m) } | |
33 | func (*Foo) ProtoMessage() {} | |
34 | func (*Foo) Descriptor() ([]byte, []int) { | |
35 | return fileDescriptor_48462cafc802a68e, []int{0} | |
36 | } | |
37 | ||
38 | func (m *Foo) XXX_Unmarshal(b []byte) error { | |
39 | return xxx_messageInfo_Foo.Unmarshal(m, b) | |
40 | } | |
41 | func (m *Foo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { | |
42 | return xxx_messageInfo_Foo.Marshal(b, m, deterministic) | |
43 | } | |
44 | func (m *Foo) XXX_Merge(src proto.Message) { | |
45 | xxx_messageInfo_Foo.Merge(m, src) | |
46 | } | |
47 | func (m *Foo) XXX_Size() int { | |
48 | return xxx_messageInfo_Foo.Size(m) | |
49 | } | |
50 | func (m *Foo) XXX_DiscardUnknown() { | |
51 | xxx_messageInfo_Foo.DiscardUnknown(m) | |
52 | } | |
53 | ||
54 | var xxx_messageInfo_Foo proto.InternalMessageInfo | |
55 | ||
56 | type isFoo_Bar interface { | |
57 | isFoo_Bar() | |
58 | } | |
59 | ||
60 | type Foo_GetBar struct { | |
61 | GetBar string `protobuf:"bytes,1,opt,name=get_bar,json=getBar,oneof"` | |
62 | } | |
63 | ||
64 | func (*Foo_GetBar) isFoo_Bar() {} | |
65 | ||
66 | func (m *Foo) GetBar() isFoo_Bar { | |
67 | if m != nil { | |
68 | return m.Bar | |
69 | } | |
70 | return nil | |
71 | } | |
72 | ||
73 | func (m *Foo) GetGetBar() string { | |
74 | if x, ok := m.GetBar().(*Foo_GetBar); ok { | |
75 | return x.GetBar | |
76 | } | |
77 | return "" | |
78 | } | |
79 | ||
80 | // XXX_OneofWrappers is for the internal use of the proto package. | |
81 | func (*Foo) XXX_OneofWrappers() []interface{} { | |
82 | return []interface{}{ | |
83 | (*Foo_GetBar)(nil), | |
84 | } | |
85 | } | |
86 | ||
87 | func init() { | |
88 | proto.RegisterType((*Foo)(nil), "oneoftest.Foo") | |
89 | } | |
90 | ||
91 | func init() { proto.RegisterFile("issue780_oneof_conflict/test.proto", fileDescriptor_48462cafc802a68e) } | |
92 | ||
93 | var fileDescriptor_48462cafc802a68e = []byte{ | |
94 | // 107 bytes of a gzipped FileDescriptorProto | |
95 | 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0xca, 0x2c, 0x2e, 0x2e, | |
96 | 0x4d, 0x35, 0xb7, 0x30, 0x88, 0xcf, 0xcf, 0x4b, 0xcd, 0x4f, 0x8b, 0x4f, 0xce, 0xcf, 0x4b, 0xcb, | |
97 | 0xc9, 0x4c, 0x2e, 0xd1, 0x2f, 0x49, 0x2d, 0x2e, 0xd1, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, | |
98 | 0x04, 0x4b, 0x81, 0x04, 0x94, 0xd4, 0xb9, 0x98, 0xdd, 0xf2, 0xf3, 0x85, 0x24, 0xb9, 0xd8, 0xd3, | |
99 | 0x53, 0x4b, 0xe2, 0x93, 0x12, 0x8b, 0x24, 0x18, 0x15, 0x18, 0x35, 0x38, 0x3d, 0x18, 0x82, 0xd8, | |
100 | 0xd2, 0x53, 0x4b, 0x9c, 0x12, 0x8b, 0x9c, 0x58, 0xb9, 0x98, 0x93, 0x12, 0x8b, 0x00, 0x01, 0x00, | |
101 | 0x00, 0xff, 0xff, 0x12, 0x66, 0x0c, 0x02, 0x58, 0x00, 0x00, 0x00, | |
102 | } |
0 | syntax = "proto2"; | |
1 | ||
2 | package oneoftest; | |
3 | ||
4 | message Foo { | |
5 | oneof bar { | |
6 | string get_bar = 1; | |
7 | } | |
8 | } |
0 | 0 | // Code generated by protoc-gen-go. DO NOT EDIT. |
1 | 1 | // source: multi/multi1.proto |
2 | 2 | |
3 | package multitest // import "github.com/golang/protobuf/protoc-gen-go/testdata/multi" | |
3 | package multitest | |
4 | 4 | |
5 | import proto "github.com/golang/protobuf/proto" | |
6 | import fmt "fmt" | |
7 | import math "math" | |
5 | import ( | |
6 | fmt "fmt" | |
7 | proto "github.com/golang/protobuf/proto" | |
8 | math "math" | |
9 | ) | |
8 | 10 | |
9 | 11 | // Reference imports to suppress errors if they are not otherwise used. |
10 | 12 | var _ = proto.Marshal |
15 | 17 | // is compatible with the proto package it is being compiled against. |
16 | 18 | // A compilation error at this line likely means your copy of the |
17 | 19 | // proto package needs to be updated. |
18 | const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package | |
20 | const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package | |
19 | 21 | |
20 | 22 | type Multi1 struct { |
21 | 23 | Multi2 *Multi2 `protobuf:"bytes,1,req,name=multi2" json:"multi2,omitempty"` |
30 | 32 | func (m *Multi1) String() string { return proto.CompactTextString(m) } |
31 | 33 | func (*Multi1) ProtoMessage() {} |
32 | 34 | func (*Multi1) Descriptor() ([]byte, []int) { |
33 | return fileDescriptor_multi1_08e50c6822e808b8, []int{0} | |
35 | return fileDescriptor_e0bffc140cd1b1d9, []int{0} | |
34 | 36 | } |
37 | ||
35 | 38 | func (m *Multi1) XXX_Unmarshal(b []byte) error { |
36 | 39 | return xxx_messageInfo_Multi1.Unmarshal(m, b) |
37 | 40 | } |
38 | 41 | func (m *Multi1) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
39 | 42 | return xxx_messageInfo_Multi1.Marshal(b, m, deterministic) |
40 | 43 | } |
41 | func (dst *Multi1) XXX_Merge(src proto.Message) { | |
42 | xxx_messageInfo_Multi1.Merge(dst, src) | |
44 | func (m *Multi1) XXX_Merge(src proto.Message) { | |
45 | xxx_messageInfo_Multi1.Merge(m, src) | |
43 | 46 | } |
44 | 47 | func (m *Multi1) XXX_Size() int { |
45 | 48 | return xxx_messageInfo_Multi1.Size(m) |
75 | 78 | proto.RegisterType((*Multi1)(nil), "multitest.Multi1") |
76 | 79 | } |
77 | 80 | |
78 | func init() { proto.RegisterFile("multi/multi1.proto", fileDescriptor_multi1_08e50c6822e808b8) } | |
81 | func init() { proto.RegisterFile("multi/multi1.proto", fileDescriptor_e0bffc140cd1b1d9) } | |
79 | 82 | |
80 | var fileDescriptor_multi1_08e50c6822e808b8 = []byte{ | |
83 | var fileDescriptor_e0bffc140cd1b1d9 = []byte{ | |
81 | 84 | // 200 bytes of a gzipped FileDescriptorProto |
82 | 85 | 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0xca, 0x2d, 0xcd, 0x29, |
83 | 86 | 0xc9, 0xd4, 0x07, 0x93, 0x86, 0x7a, 0x05, 0x45, 0xf9, 0x25, 0xf9, 0x42, 0x9c, 0x60, 0x5e, 0x49, |
0 | 0 | // Code generated by protoc-gen-go. DO NOT EDIT. |
1 | 1 | // source: multi/multi2.proto |
2 | 2 | |
3 | package multitest // import "github.com/golang/protobuf/protoc-gen-go/testdata/multi" | |
3 | package multitest | |
4 | 4 | |
5 | import proto "github.com/golang/protobuf/proto" | |
6 | import fmt "fmt" | |
7 | import math "math" | |
5 | import ( | |
6 | fmt "fmt" | |
7 | proto "github.com/golang/protobuf/proto" | |
8 | math "math" | |
9 | ) | |
8 | 10 | |
9 | 11 | // Reference imports to suppress errors if they are not otherwise used. |
10 | 12 | var _ = proto.Marshal |
15 | 17 | // is compatible with the proto package it is being compiled against. |
16 | 18 | // A compilation error at this line likely means your copy of the |
17 | 19 | // proto package needs to be updated. |
18 | const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package | |
20 | const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package | |
19 | 21 | |
20 | 22 | type Multi2_Color int32 |
21 | 23 | |
30 | 32 | 2: "GREEN", |
31 | 33 | 3: "RED", |
32 | 34 | } |
35 | ||
33 | 36 | var Multi2_Color_value = map[string]int32{ |
34 | 37 | "BLUE": 1, |
35 | 38 | "GREEN": 2, |
41 | 44 | *p = x |
42 | 45 | return p |
43 | 46 | } |
47 | ||
44 | 48 | func (x Multi2_Color) String() string { |
45 | 49 | return proto.EnumName(Multi2_Color_name, int32(x)) |
46 | 50 | } |
51 | ||
47 | 52 | func (x *Multi2_Color) UnmarshalJSON(data []byte) error { |
48 | 53 | value, err := proto.UnmarshalJSONEnum(Multi2_Color_value, data, "Multi2_Color") |
49 | 54 | if err != nil { |
52 | 57 | *x = Multi2_Color(value) |
53 | 58 | return nil |
54 | 59 | } |
60 | ||
55 | 61 | func (Multi2_Color) EnumDescriptor() ([]byte, []int) { |
56 | return fileDescriptor_multi2_c47490ad66d93e67, []int{0, 0} | |
62 | return fileDescriptor_a2aebe588a0b2853, []int{0, 0} | |
57 | 63 | } |
58 | 64 | |
59 | 65 | type Multi2 struct { |
68 | 74 | func (m *Multi2) String() string { return proto.CompactTextString(m) } |
69 | 75 | func (*Multi2) ProtoMessage() {} |
70 | 76 | func (*Multi2) Descriptor() ([]byte, []int) { |
71 | return fileDescriptor_multi2_c47490ad66d93e67, []int{0} | |
77 | return fileDescriptor_a2aebe588a0b2853, []int{0} | |
72 | 78 | } |
79 | ||
73 | 80 | func (m *Multi2) XXX_Unmarshal(b []byte) error { |
74 | 81 | return xxx_messageInfo_Multi2.Unmarshal(m, b) |
75 | 82 | } |
76 | 83 | func (m *Multi2) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
77 | 84 | return xxx_messageInfo_Multi2.Marshal(b, m, deterministic) |
78 | 85 | } |
79 | func (dst *Multi2) XXX_Merge(src proto.Message) { | |
80 | xxx_messageInfo_Multi2.Merge(dst, src) | |
86 | func (m *Multi2) XXX_Merge(src proto.Message) { | |
87 | xxx_messageInfo_Multi2.Merge(m, src) | |
81 | 88 | } |
82 | 89 | func (m *Multi2) XXX_Size() int { |
83 | 90 | return xxx_messageInfo_Multi2.Size(m) |
103 | 110 | } |
104 | 111 | |
105 | 112 | func init() { |
113 | proto.RegisterEnum("multitest.Multi2_Color", Multi2_Color_name, Multi2_Color_value) | |
106 | 114 | proto.RegisterType((*Multi2)(nil), "multitest.Multi2") |
107 | proto.RegisterEnum("multitest.Multi2_Color", Multi2_Color_name, Multi2_Color_value) | |
108 | 115 | } |
109 | 116 | |
110 | func init() { proto.RegisterFile("multi/multi2.proto", fileDescriptor_multi2_c47490ad66d93e67) } | |
117 | func init() { proto.RegisterFile("multi/multi2.proto", fileDescriptor_a2aebe588a0b2853) } | |
111 | 118 | |
112 | var fileDescriptor_multi2_c47490ad66d93e67 = []byte{ | |
119 | var fileDescriptor_a2aebe588a0b2853 = []byte{ | |
113 | 120 | // 202 bytes of a gzipped FileDescriptorProto |
114 | 121 | 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0xca, 0x2d, 0xcd, 0x29, |
115 | 122 | 0xc9, 0xd4, 0x07, 0x93, 0x46, 0x7a, 0x05, 0x45, 0xf9, 0x25, 0xf9, 0x42, 0x9c, 0x60, 0x5e, 0x49, |
0 | 0 | // Code generated by protoc-gen-go. DO NOT EDIT. |
1 | 1 | // source: multi/multi3.proto |
2 | 2 | |
3 | package multitest // import "github.com/golang/protobuf/protoc-gen-go/testdata/multi" | |
3 | package multitest | |
4 | 4 | |
5 | import proto "github.com/golang/protobuf/proto" | |
6 | import fmt "fmt" | |
7 | import math "math" | |
5 | import ( | |
6 | fmt "fmt" | |
7 | proto "github.com/golang/protobuf/proto" | |
8 | math "math" | |
9 | ) | |
8 | 10 | |
9 | 11 | // Reference imports to suppress errors if they are not otherwise used. |
10 | 12 | var _ = proto.Marshal |
15 | 17 | // is compatible with the proto package it is being compiled against. |
16 | 18 | // A compilation error at this line likely means your copy of the |
17 | 19 | // proto package needs to be updated. |
18 | const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package | |
20 | const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package | |
19 | 21 | |
20 | 22 | type Multi3_HatType int32 |
21 | 23 | |
28 | 30 | 1: "FEDORA", |
29 | 31 | 2: "FEZ", |
30 | 32 | } |
33 | ||
31 | 34 | var Multi3_HatType_value = map[string]int32{ |
32 | 35 | "FEDORA": 1, |
33 | 36 | "FEZ": 2, |
38 | 41 | *p = x |
39 | 42 | return p |
40 | 43 | } |
44 | ||
41 | 45 | func (x Multi3_HatType) String() string { |
42 | 46 | return proto.EnumName(Multi3_HatType_name, int32(x)) |
43 | 47 | } |
48 | ||
44 | 49 | func (x *Multi3_HatType) UnmarshalJSON(data []byte) error { |
45 | 50 | value, err := proto.UnmarshalJSONEnum(Multi3_HatType_value, data, "Multi3_HatType") |
46 | 51 | if err != nil { |
49 | 54 | *x = Multi3_HatType(value) |
50 | 55 | return nil |
51 | 56 | } |
57 | ||
52 | 58 | func (Multi3_HatType) EnumDescriptor() ([]byte, []int) { |
53 | return fileDescriptor_multi3_d55a72b4628b7875, []int{0, 0} | |
59 | return fileDescriptor_580398fc0bbeeaa7, []int{0, 0} | |
54 | 60 | } |
55 | 61 | |
56 | 62 | type Multi3 struct { |
64 | 70 | func (m *Multi3) String() string { return proto.CompactTextString(m) } |
65 | 71 | func (*Multi3) ProtoMessage() {} |
66 | 72 | func (*Multi3) Descriptor() ([]byte, []int) { |
67 | return fileDescriptor_multi3_d55a72b4628b7875, []int{0} | |
73 | return fileDescriptor_580398fc0bbeeaa7, []int{0} | |
68 | 74 | } |
75 | ||
69 | 76 | func (m *Multi3) XXX_Unmarshal(b []byte) error { |
70 | 77 | return xxx_messageInfo_Multi3.Unmarshal(m, b) |
71 | 78 | } |
72 | 79 | func (m *Multi3) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
73 | 80 | return xxx_messageInfo_Multi3.Marshal(b, m, deterministic) |
74 | 81 | } |
75 | func (dst *Multi3) XXX_Merge(src proto.Message) { | |
76 | xxx_messageInfo_Multi3.Merge(dst, src) | |
82 | func (m *Multi3) XXX_Merge(src proto.Message) { | |
83 | xxx_messageInfo_Multi3.Merge(m, src) | |
77 | 84 | } |
78 | 85 | func (m *Multi3) XXX_Size() int { |
79 | 86 | return xxx_messageInfo_Multi3.Size(m) |
92 | 99 | } |
93 | 100 | |
94 | 101 | func init() { |
102 | proto.RegisterEnum("multitest.Multi3_HatType", Multi3_HatType_name, Multi3_HatType_value) | |
95 | 103 | proto.RegisterType((*Multi3)(nil), "multitest.Multi3") |
96 | proto.RegisterEnum("multitest.Multi3_HatType", Multi3_HatType_name, Multi3_HatType_value) | |
97 | 104 | } |
98 | 105 | |
99 | func init() { proto.RegisterFile("multi/multi3.proto", fileDescriptor_multi3_d55a72b4628b7875) } | |
106 | func init() { proto.RegisterFile("multi/multi3.proto", fileDescriptor_580398fc0bbeeaa7) } | |
100 | 107 | |
101 | var fileDescriptor_multi3_d55a72b4628b7875 = []byte{ | |
108 | var fileDescriptor_580398fc0bbeeaa7 = []byte{ | |
102 | 109 | // 170 bytes of a gzipped FileDescriptorProto |
103 | 110 | 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0xca, 0x2d, 0xcd, 0x29, |
104 | 111 | 0xc9, 0xd4, 0x07, 0x93, 0xc6, 0x7a, 0x05, 0x45, 0xf9, 0x25, 0xf9, 0x42, 0x9c, 0x60, 0x5e, 0x49, |
0 | 0 | // Code generated by protoc-gen-go. DO NOT EDIT. |
1 | 1 | // source: my_test/test.proto |
2 | 2 | |
3 | package test // import "github.com/golang/protobuf/protoc-gen-go/testdata/my_test" | |
4 | ||
5 | /* | |
6 | This package holds interesting messages. | |
7 | */ | |
8 | ||
9 | import proto "github.com/golang/protobuf/proto" | |
10 | import fmt "fmt" | |
11 | import math "math" | |
12 | import _ "github.com/golang/protobuf/protoc-gen-go/testdata/multi" | |
3 | // This package holds interesting messages. | |
4 | ||
5 | package test | |
6 | ||
7 | import ( | |
8 | fmt "fmt" | |
9 | proto "github.com/golang/protobuf/proto" | |
10 | _ "github.com/golang/protobuf/protoc-gen-go/testdata/multi" | |
11 | math "math" | |
12 | ) | |
13 | 13 | |
14 | 14 | // Reference imports to suppress errors if they are not otherwise used. |
15 | 15 | var _ = proto.Marshal |
20 | 20 | // is compatible with the proto package it is being compiled against. |
21 | 21 | // A compilation error at this line likely means your copy of the |
22 | 22 | // proto package needs to be updated. |
23 | const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package | |
23 | const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package | |
24 | 24 | |
25 | 25 | type HatType int32 |
26 | 26 | |
34 | 34 | 1: "FEDORA", |
35 | 35 | 2: "FEZ", |
36 | 36 | } |
37 | ||
37 | 38 | var HatType_value = map[string]int32{ |
38 | 39 | "FEDORA": 1, |
39 | 40 | "FEZ": 2, |
44 | 45 | *p = x |
45 | 46 | return p |
46 | 47 | } |
48 | ||
47 | 49 | func (x HatType) String() string { |
48 | 50 | return proto.EnumName(HatType_name, int32(x)) |
49 | 51 | } |
52 | ||
50 | 53 | func (x *HatType) UnmarshalJSON(data []byte) error { |
51 | 54 | value, err := proto.UnmarshalJSONEnum(HatType_value, data, "HatType") |
52 | 55 | if err != nil { |
55 | 58 | *x = HatType(value) |
56 | 59 | return nil |
57 | 60 | } |
61 | ||
58 | 62 | func (HatType) EnumDescriptor() ([]byte, []int) { |
59 | return fileDescriptor_test_2309d445eee26af7, []int{0} | |
63 | return fileDescriptor_2c9b60a40d5131b9, []int{0} | |
60 | 64 | } |
61 | 65 | |
62 | 66 | // This enum represents days of the week. |
73 | 77 | 2: "TUESDAY", |
74 | 78 | // Duplicate value: 1: "LUNDI", |
75 | 79 | } |
80 | ||
76 | 81 | var Days_value = map[string]int32{ |
77 | 82 | "MONDAY": 1, |
78 | 83 | "TUESDAY": 2, |
84 | 89 | *p = x |
85 | 90 | return p |
86 | 91 | } |
92 | ||
87 | 93 | func (x Days) String() string { |
88 | 94 | return proto.EnumName(Days_name, int32(x)) |
89 | 95 | } |
96 | ||
90 | 97 | func (x *Days) UnmarshalJSON(data []byte) error { |
91 | 98 | value, err := proto.UnmarshalJSONEnum(Days_value, data, "Days") |
92 | 99 | if err != nil { |
95 | 102 | *x = Days(value) |
96 | 103 | return nil |
97 | 104 | } |
105 | ||
98 | 106 | func (Days) EnumDescriptor() ([]byte, []int) { |
99 | return fileDescriptor_test_2309d445eee26af7, []int{1} | |
107 | return fileDescriptor_2c9b60a40d5131b9, []int{1} | |
100 | 108 | } |
101 | 109 | |
102 | 110 | type Request_Color int32 |
112 | 120 | 1: "GREEN", |
113 | 121 | 2: "BLUE", |
114 | 122 | } |
123 | ||
115 | 124 | var Request_Color_value = map[string]int32{ |
116 | 125 | "RED": 0, |
117 | 126 | "GREEN": 1, |
123 | 132 | *p = x |
124 | 133 | return p |
125 | 134 | } |
135 | ||
126 | 136 | func (x Request_Color) String() string { |
127 | 137 | return proto.EnumName(Request_Color_name, int32(x)) |
128 | 138 | } |
139 | ||
129 | 140 | func (x *Request_Color) UnmarshalJSON(data []byte) error { |
130 | 141 | value, err := proto.UnmarshalJSONEnum(Request_Color_value, data, "Request_Color") |
131 | 142 | if err != nil { |
134 | 145 | *x = Request_Color(value) |
135 | 146 | return nil |
136 | 147 | } |
148 | ||
137 | 149 | func (Request_Color) EnumDescriptor() ([]byte, []int) { |
138 | return fileDescriptor_test_2309d445eee26af7, []int{0, 0} | |
150 | return fileDescriptor_2c9b60a40d5131b9, []int{0, 0} | |
139 | 151 | } |
140 | 152 | |
141 | 153 | type Reply_Entry_Game int32 |
149 | 161 | 1: "FOOTBALL", |
150 | 162 | 2: "TENNIS", |
151 | 163 | } |
164 | ||
152 | 165 | var Reply_Entry_Game_value = map[string]int32{ |
153 | 166 | "FOOTBALL": 1, |
154 | 167 | "TENNIS": 2, |
159 | 172 | *p = x |
160 | 173 | return p |
161 | 174 | } |
175 | ||
162 | 176 | func (x Reply_Entry_Game) String() string { |
163 | 177 | return proto.EnumName(Reply_Entry_Game_name, int32(x)) |
164 | 178 | } |
179 | ||
165 | 180 | func (x *Reply_Entry_Game) UnmarshalJSON(data []byte) error { |
166 | 181 | value, err := proto.UnmarshalJSONEnum(Reply_Entry_Game_value, data, "Reply_Entry_Game") |
167 | 182 | if err != nil { |
170 | 185 | *x = Reply_Entry_Game(value) |
171 | 186 | return nil |
172 | 187 | } |
188 | ||
173 | 189 | func (Reply_Entry_Game) EnumDescriptor() ([]byte, []int) { |
174 | return fileDescriptor_test_2309d445eee26af7, []int{1, 0, 0} | |
190 | return fileDescriptor_2c9b60a40d5131b9, []int{1, 0, 0} | |
175 | 191 | } |
176 | 192 | |
177 | 193 | // This is a message that might be sent somewhere. |
190 | 206 | Reset_ *int32 `protobuf:"varint,12,opt,name=reset" json:"reset,omitempty"` |
191 | 207 | // This field should not conflict with any getters. |
192 | 208 | GetKey_ *string `protobuf:"bytes,16,opt,name=get_key,json=getKey" json:"get_key,omitempty"` |
209 | FloatNinf *float32 `protobuf:"fixed32,20,opt,name=float_ninf,json=floatNinf,def=-inf" json:"float_ninf,omitempty"` | |
210 | FloatPinf *float32 `protobuf:"fixed32,21,opt,name=float_pinf,json=floatPinf,def=inf" json:"float_pinf,omitempty"` | |
211 | FloatExp *float32 `protobuf:"fixed32,22,opt,name=float_exp,json=floatExp,def=1e+09" json:"float_exp,omitempty"` | |
212 | DoubleNinf *float64 `protobuf:"fixed64,23,opt,name=double_ninf,json=doubleNinf,def=-inf" json:"double_ninf,omitempty"` | |
213 | DoublePinf *float64 `protobuf:"fixed64,24,opt,name=double_pinf,json=doublePinf,def=inf" json:"double_pinf,omitempty"` | |
214 | DoubleExp *float64 `protobuf:"fixed64,25,opt,name=double_exp,json=doubleExp,def=1e+09" json:"double_exp,omitempty"` | |
193 | 215 | XXX_NoUnkeyedLiteral struct{} `json:"-"` |
194 | 216 | XXX_unrecognized []byte `json:"-"` |
195 | 217 | XXX_sizecache int32 `json:"-"` |
199 | 221 | func (m *Request) String() string { return proto.CompactTextString(m) } |
200 | 222 | func (*Request) ProtoMessage() {} |
201 | 223 | func (*Request) Descriptor() ([]byte, []int) { |
202 | return fileDescriptor_test_2309d445eee26af7, []int{0} | |
203 | } | |
224 | return fileDescriptor_2c9b60a40d5131b9, []int{0} | |
225 | } | |
226 | ||
204 | 227 | func (m *Request) XXX_Unmarshal(b []byte) error { |
205 | 228 | return xxx_messageInfo_Request.Unmarshal(m, b) |
206 | 229 | } |
207 | 230 | func (m *Request) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
208 | 231 | return xxx_messageInfo_Request.Marshal(b, m, deterministic) |
209 | 232 | } |
210 | func (dst *Request) XXX_Merge(src proto.Message) { | |
211 | xxx_messageInfo_Request.Merge(dst, src) | |
233 | func (m *Request) XXX_Merge(src proto.Message) { | |
234 | xxx_messageInfo_Request.Merge(m, src) | |
212 | 235 | } |
213 | 236 | func (m *Request) XXX_Size() int { |
214 | 237 | return xxx_messageInfo_Request.Size(m) |
222 | 245 | const Default_Request_Hat HatType = HatType_FEDORA |
223 | 246 | |
224 | 247 | var Default_Request_Deadline float32 = float32(math.Inf(1)) |
248 | var Default_Request_FloatNinf float32 = float32(math.Inf(-1)) | |
249 | var Default_Request_FloatPinf float32 = float32(math.Inf(1)) | |
250 | ||
251 | const Default_Request_FloatExp float32 = 1e+09 | |
252 | ||
253 | var Default_Request_DoubleNinf float64 = math.Inf(-1) | |
254 | var Default_Request_DoublePinf float64 = math.Inf(1) | |
255 | ||
256 | const Default_Request_DoubleExp float64 = 1e+09 | |
225 | 257 | |
226 | 258 | func (m *Request) GetKey() []int64 { |
227 | 259 | if m != nil { |
284 | 316 | return *m.GetKey_ |
285 | 317 | } |
286 | 318 | return "" |
319 | } | |
320 | ||
321 | func (m *Request) GetFloatNinf() float32 { | |
322 | if m != nil && m.FloatNinf != nil { | |
323 | return *m.FloatNinf | |
324 | } | |
325 | return Default_Request_FloatNinf | |
326 | } | |
327 | ||
328 | func (m *Request) GetFloatPinf() float32 { | |
329 | if m != nil && m.FloatPinf != nil { | |
330 | return *m.FloatPinf | |
331 | } | |
332 | return Default_Request_FloatPinf | |
333 | } | |
334 | ||
335 | func (m *Request) GetFloatExp() float32 { | |
336 | if m != nil && m.FloatExp != nil { | |
337 | return *m.FloatExp | |
338 | } | |
339 | return Default_Request_FloatExp | |
340 | } | |
341 | ||
342 | func (m *Request) GetDoubleNinf() float64 { | |
343 | if m != nil && m.DoubleNinf != nil { | |
344 | return *m.DoubleNinf | |
345 | } | |
346 | return Default_Request_DoubleNinf | |
347 | } | |
348 | ||
349 | func (m *Request) GetDoublePinf() float64 { | |
350 | if m != nil && m.DoublePinf != nil { | |
351 | return *m.DoublePinf | |
352 | } | |
353 | return Default_Request_DoublePinf | |
354 | } | |
355 | ||
356 | func (m *Request) GetDoubleExp() float64 { | |
357 | if m != nil && m.DoubleExp != nil { | |
358 | return *m.DoubleExp | |
359 | } | |
360 | return Default_Request_DoubleExp | |
287 | 361 | } |
288 | 362 | |
289 | 363 | type Request_SomeGroup struct { |
297 | 371 | func (m *Request_SomeGroup) String() string { return proto.CompactTextString(m) } |
298 | 372 | func (*Request_SomeGroup) ProtoMessage() {} |
299 | 373 | func (*Request_SomeGroup) Descriptor() ([]byte, []int) { |
300 | return fileDescriptor_test_2309d445eee26af7, []int{0, 0} | |
301 | } | |
374 | return fileDescriptor_2c9b60a40d5131b9, []int{0, 0} | |
375 | } | |
376 | ||
302 | 377 | func (m *Request_SomeGroup) XXX_Unmarshal(b []byte) error { |
303 | 378 | return xxx_messageInfo_Request_SomeGroup.Unmarshal(m, b) |
304 | 379 | } |
305 | 380 | func (m *Request_SomeGroup) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
306 | 381 | return xxx_messageInfo_Request_SomeGroup.Marshal(b, m, deterministic) |
307 | 382 | } |
308 | func (dst *Request_SomeGroup) XXX_Merge(src proto.Message) { | |
309 | xxx_messageInfo_Request_SomeGroup.Merge(dst, src) | |
383 | func (m *Request_SomeGroup) XXX_Merge(src proto.Message) { | |
384 | xxx_messageInfo_Request_SomeGroup.Merge(m, src) | |
310 | 385 | } |
311 | 386 | func (m *Request_SomeGroup) XXX_Size() int { |
312 | 387 | return xxx_messageInfo_Request_SomeGroup.Size(m) |
337 | 412 | func (m *Reply) String() string { return proto.CompactTextString(m) } |
338 | 413 | func (*Reply) ProtoMessage() {} |
339 | 414 | func (*Reply) Descriptor() ([]byte, []int) { |
340 | return fileDescriptor_test_2309d445eee26af7, []int{1} | |
415 | return fileDescriptor_2c9b60a40d5131b9, []int{1} | |
341 | 416 | } |
342 | 417 | |
343 | 418 | var extRange_Reply = []proto.ExtensionRange{ |
347 | 422 | func (*Reply) ExtensionRangeArray() []proto.ExtensionRange { |
348 | 423 | return extRange_Reply |
349 | 424 | } |
425 | ||
350 | 426 | func (m *Reply) XXX_Unmarshal(b []byte) error { |
351 | 427 | return xxx_messageInfo_Reply.Unmarshal(m, b) |
352 | 428 | } |
353 | 429 | func (m *Reply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
354 | 430 | return xxx_messageInfo_Reply.Marshal(b, m, deterministic) |
355 | 431 | } |
356 | func (dst *Reply) XXX_Merge(src proto.Message) { | |
357 | xxx_messageInfo_Reply.Merge(dst, src) | |
432 | func (m *Reply) XXX_Merge(src proto.Message) { | |
433 | xxx_messageInfo_Reply.Merge(m, src) | |
358 | 434 | } |
359 | 435 | func (m *Reply) XXX_Size() int { |
360 | 436 | return xxx_messageInfo_Reply.Size(m) |
392 | 468 | func (m *Reply_Entry) String() string { return proto.CompactTextString(m) } |
393 | 469 | func (*Reply_Entry) ProtoMessage() {} |
394 | 470 | func (*Reply_Entry) Descriptor() ([]byte, []int) { |
395 | return fileDescriptor_test_2309d445eee26af7, []int{1, 0} | |
396 | } | |
471 | return fileDescriptor_2c9b60a40d5131b9, []int{1, 0} | |
472 | } | |
473 | ||
397 | 474 | func (m *Reply_Entry) XXX_Unmarshal(b []byte) error { |
398 | 475 | return xxx_messageInfo_Reply_Entry.Unmarshal(m, b) |
399 | 476 | } |
400 | 477 | func (m *Reply_Entry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
401 | 478 | return xxx_messageInfo_Reply_Entry.Marshal(b, m, deterministic) |
402 | 479 | } |
403 | func (dst *Reply_Entry) XXX_Merge(src proto.Message) { | |
404 | xxx_messageInfo_Reply_Entry.Merge(dst, src) | |
480 | func (m *Reply_Entry) XXX_Merge(src proto.Message) { | |
481 | xxx_messageInfo_Reply_Entry.Merge(m, src) | |
405 | 482 | } |
406 | 483 | func (m *Reply_Entry) XXX_Size() int { |
407 | 484 | return xxx_messageInfo_Reply_Entry.Size(m) |
447 | 524 | func (m *OtherBase) String() string { return proto.CompactTextString(m) } |
448 | 525 | func (*OtherBase) ProtoMessage() {} |
449 | 526 | func (*OtherBase) Descriptor() ([]byte, []int) { |
450 | return fileDescriptor_test_2309d445eee26af7, []int{2} | |
527 | return fileDescriptor_2c9b60a40d5131b9, []int{2} | |
451 | 528 | } |
452 | 529 | |
453 | 530 | var extRange_OtherBase = []proto.ExtensionRange{ |
457 | 534 | func (*OtherBase) ExtensionRangeArray() []proto.ExtensionRange { |
458 | 535 | return extRange_OtherBase |
459 | 536 | } |
537 | ||
460 | 538 | func (m *OtherBase) XXX_Unmarshal(b []byte) error { |
461 | 539 | return xxx_messageInfo_OtherBase.Unmarshal(m, b) |
462 | 540 | } |
463 | 541 | func (m *OtherBase) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
464 | 542 | return xxx_messageInfo_OtherBase.Marshal(b, m, deterministic) |
465 | 543 | } |
466 | func (dst *OtherBase) XXX_Merge(src proto.Message) { | |
467 | xxx_messageInfo_OtherBase.Merge(dst, src) | |
544 | func (m *OtherBase) XXX_Merge(src proto.Message) { | |
545 | xxx_messageInfo_OtherBase.Merge(m, src) | |
468 | 546 | } |
469 | 547 | func (m *OtherBase) XXX_Size() int { |
470 | 548 | return xxx_messageInfo_OtherBase.Size(m) |
492 | 570 | func (m *ReplyExtensions) String() string { return proto.CompactTextString(m) } |
493 | 571 | func (*ReplyExtensions) ProtoMessage() {} |
494 | 572 | func (*ReplyExtensions) Descriptor() ([]byte, []int) { |
495 | return fileDescriptor_test_2309d445eee26af7, []int{3} | |
496 | } | |
573 | return fileDescriptor_2c9b60a40d5131b9, []int{3} | |
574 | } | |
575 | ||
497 | 576 | func (m *ReplyExtensions) XXX_Unmarshal(b []byte) error { |
498 | 577 | return xxx_messageInfo_ReplyExtensions.Unmarshal(m, b) |
499 | 578 | } |
500 | 579 | func (m *ReplyExtensions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
501 | 580 | return xxx_messageInfo_ReplyExtensions.Marshal(b, m, deterministic) |
502 | 581 | } |
503 | func (dst *ReplyExtensions) XXX_Merge(src proto.Message) { | |
504 | xxx_messageInfo_ReplyExtensions.Merge(dst, src) | |
582 | func (m *ReplyExtensions) XXX_Merge(src proto.Message) { | |
583 | xxx_messageInfo_ReplyExtensions.Merge(m, src) | |
505 | 584 | } |
506 | 585 | func (m *ReplyExtensions) XXX_Size() int { |
507 | 586 | return xxx_messageInfo_ReplyExtensions.Size(m) |
550 | 629 | func (m *OtherReplyExtensions) String() string { return proto.CompactTextString(m) } |
551 | 630 | func (*OtherReplyExtensions) ProtoMessage() {} |
552 | 631 | func (*OtherReplyExtensions) Descriptor() ([]byte, []int) { |
553 | return fileDescriptor_test_2309d445eee26af7, []int{4} | |
554 | } | |
632 | return fileDescriptor_2c9b60a40d5131b9, []int{4} | |
633 | } | |
634 | ||
555 | 635 | func (m *OtherReplyExtensions) XXX_Unmarshal(b []byte) error { |
556 | 636 | return xxx_messageInfo_OtherReplyExtensions.Unmarshal(m, b) |
557 | 637 | } |
558 | 638 | func (m *OtherReplyExtensions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
559 | 639 | return xxx_messageInfo_OtherReplyExtensions.Marshal(b, m, deterministic) |
560 | 640 | } |
561 | func (dst *OtherReplyExtensions) XXX_Merge(src proto.Message) { | |
562 | xxx_messageInfo_OtherReplyExtensions.Merge(dst, src) | |
641 | func (m *OtherReplyExtensions) XXX_Merge(src proto.Message) { | |
642 | xxx_messageInfo_OtherReplyExtensions.Merge(m, src) | |
563 | 643 | } |
564 | 644 | func (m *OtherReplyExtensions) XXX_Size() int { |
565 | 645 | return xxx_messageInfo_OtherReplyExtensions.Size(m) |
588 | 668 | func (m *OldReply) String() string { return proto.CompactTextString(m) } |
589 | 669 | func (*OldReply) ProtoMessage() {} |
590 | 670 | func (*OldReply) Descriptor() ([]byte, []int) { |
591 | return fileDescriptor_test_2309d445eee26af7, []int{5} | |
592 | } | |
593 | ||
594 | func (m *OldReply) MarshalJSON() ([]byte, error) { | |
595 | return proto.MarshalMessageSetJSON(&m.XXX_InternalExtensions) | |
596 | } | |
597 | func (m *OldReply) UnmarshalJSON(buf []byte) error { | |
598 | return proto.UnmarshalMessageSetJSON(buf, &m.XXX_InternalExtensions) | |
671 | return fileDescriptor_2c9b60a40d5131b9, []int{5} | |
599 | 672 | } |
600 | 673 | |
601 | 674 | var extRange_OldReply = []proto.ExtensionRange{ |
605 | 678 | func (*OldReply) ExtensionRangeArray() []proto.ExtensionRange { |
606 | 679 | return extRange_OldReply |
607 | 680 | } |
681 | ||
608 | 682 | func (m *OldReply) XXX_Unmarshal(b []byte) error { |
609 | 683 | return xxx_messageInfo_OldReply.Unmarshal(m, b) |
610 | 684 | } |
611 | 685 | func (m *OldReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
612 | 686 | return xxx_messageInfo_OldReply.Marshal(b, m, deterministic) |
613 | 687 | } |
614 | func (dst *OldReply) XXX_Merge(src proto.Message) { | |
615 | xxx_messageInfo_OldReply.Merge(dst, src) | |
688 | func (m *OldReply) XXX_Merge(src proto.Message) { | |
689 | xxx_messageInfo_OldReply.Merge(m, src) | |
616 | 690 | } |
617 | 691 | func (m *OldReply) XXX_Size() int { |
618 | 692 | return xxx_messageInfo_OldReply.Size(m) |
648 | 722 | func (m *Communique) String() string { return proto.CompactTextString(m) } |
649 | 723 | func (*Communique) ProtoMessage() {} |
650 | 724 | func (*Communique) Descriptor() ([]byte, []int) { |
651 | return fileDescriptor_test_2309d445eee26af7, []int{6} | |
652 | } | |
725 | return fileDescriptor_2c9b60a40d5131b9, []int{6} | |
726 | } | |
727 | ||
653 | 728 | func (m *Communique) XXX_Unmarshal(b []byte) error { |
654 | 729 | return xxx_messageInfo_Communique.Unmarshal(m, b) |
655 | 730 | } |
656 | 731 | func (m *Communique) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
657 | 732 | return xxx_messageInfo_Communique.Marshal(b, m, deterministic) |
658 | 733 | } |
659 | func (dst *Communique) XXX_Merge(src proto.Message) { | |
660 | xxx_messageInfo_Communique.Merge(dst, src) | |
734 | func (m *Communique) XXX_Merge(src proto.Message) { | |
735 | xxx_messageInfo_Communique.Merge(m, src) | |
661 | 736 | } |
662 | 737 | func (m *Communique) XXX_Size() int { |
663 | 738 | return xxx_messageInfo_Communique.Size(m) |
816 | 891 | return nil |
817 | 892 | } |
818 | 893 | |
819 | // XXX_OneofFuncs is for the internal use of the proto package. | |
820 | func (*Communique) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { | |
821 | return _Communique_OneofMarshaler, _Communique_OneofUnmarshaler, _Communique_OneofSizer, []interface{}{ | |
894 | // XXX_OneofWrappers is for the internal use of the proto package. | |
895 | func (*Communique) XXX_OneofWrappers() []interface{} { | |
896 | return []interface{}{ | |
822 | 897 | (*Communique_Number)(nil), |
823 | 898 | (*Communique_Name)(nil), |
824 | 899 | (*Communique_Data)(nil), |
832 | 907 | } |
833 | 908 | } |
834 | 909 | |
835 | func _Communique_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { | |
836 | m := msg.(*Communique) | |
837 | // union | |
838 | switch x := m.Union.(type) { | |
839 | case *Communique_Number: | |
840 | b.EncodeVarint(5<<3 | proto.WireVarint) | |
841 | b.EncodeVarint(uint64(x.Number)) | |
842 | case *Communique_Name: | |
843 | b.EncodeVarint(6<<3 | proto.WireBytes) | |
844 | b.EncodeStringBytes(x.Name) | |
845 | case *Communique_Data: | |
846 | b.EncodeVarint(7<<3 | proto.WireBytes) | |
847 | b.EncodeRawBytes(x.Data) | |
848 | case *Communique_TempC: | |
849 | b.EncodeVarint(8<<3 | proto.WireFixed64) | |
850 | b.EncodeFixed64(math.Float64bits(x.TempC)) | |
851 | case *Communique_Height: | |
852 | b.EncodeVarint(9<<3 | proto.WireFixed32) | |
853 | b.EncodeFixed32(uint64(math.Float32bits(x.Height))) | |
854 | case *Communique_Today: | |
855 | b.EncodeVarint(10<<3 | proto.WireVarint) | |
856 | b.EncodeVarint(uint64(x.Today)) | |
857 | case *Communique_Maybe: | |
858 | t := uint64(0) | |
859 | if x.Maybe { | |
860 | t = 1 | |
861 | } | |
862 | b.EncodeVarint(11<<3 | proto.WireVarint) | |
863 | b.EncodeVarint(t) | |
864 | case *Communique_Delta_: | |
865 | b.EncodeVarint(12<<3 | proto.WireVarint) | |
866 | b.EncodeZigzag32(uint64(x.Delta)) | |
867 | case *Communique_Msg: | |
868 | b.EncodeVarint(16<<3 | proto.WireBytes) | |
869 | if err := b.EncodeMessage(x.Msg); err != nil { | |
870 | return err | |
871 | } | |
872 | case *Communique_Somegroup: | |
873 | b.EncodeVarint(14<<3 | proto.WireStartGroup) | |
874 | if err := b.Marshal(x.Somegroup); err != nil { | |
875 | return err | |
876 | } | |
877 | b.EncodeVarint(14<<3 | proto.WireEndGroup) | |
878 | case nil: | |
879 | default: | |
880 | return fmt.Errorf("Communique.Union has unexpected type %T", x) | |
881 | } | |
882 | return nil | |
883 | } | |
884 | ||
885 | func _Communique_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { | |
886 | m := msg.(*Communique) | |
887 | switch tag { | |
888 | case 5: // union.number | |
889 | if wire != proto.WireVarint { | |
890 | return true, proto.ErrInternalBadWireType | |
891 | } | |
892 | x, err := b.DecodeVarint() | |
893 | m.Union = &Communique_Number{int32(x)} | |
894 | return true, err | |
895 | case 6: // union.name | |
896 | if wire != proto.WireBytes { | |
897 | return true, proto.ErrInternalBadWireType | |
898 | } | |
899 | x, err := b.DecodeStringBytes() | |
900 | m.Union = &Communique_Name{x} | |
901 | return true, err | |
902 | case 7: // union.data | |
903 | if wire != proto.WireBytes { | |
904 | return true, proto.ErrInternalBadWireType | |
905 | } | |
906 | x, err := b.DecodeRawBytes(true) | |
907 | m.Union = &Communique_Data{x} | |
908 | return true, err | |
909 | case 8: // union.temp_c | |
910 | if wire != proto.WireFixed64 { | |
911 | return true, proto.ErrInternalBadWireType | |
912 | } | |
913 | x, err := b.DecodeFixed64() | |
914 | m.Union = &Communique_TempC{math.Float64frombits(x)} | |
915 | return true, err | |
916 | case 9: // union.height | |
917 | if wire != proto.WireFixed32 { | |
918 | return true, proto.ErrInternalBadWireType | |
919 | } | |
920 | x, err := b.DecodeFixed32() | |
921 | m.Union = &Communique_Height{math.Float32frombits(uint32(x))} | |
922 | return true, err | |
923 | case 10: // union.today | |
924 | if wire != proto.WireVarint { | |
925 | return true, proto.ErrInternalBadWireType | |
926 | } | |
927 | x, err := b.DecodeVarint() | |
928 | m.Union = &Communique_Today{Days(x)} | |
929 | return true, err | |
930 | case 11: // union.maybe | |
931 | if wire != proto.WireVarint { | |
932 | return true, proto.ErrInternalBadWireType | |
933 | } | |
934 | x, err := b.DecodeVarint() | |
935 | m.Union = &Communique_Maybe{x != 0} | |
936 | return true, err | |
937 | case 12: // union.delta | |
938 | if wire != proto.WireVarint { | |
939 | return true, proto.ErrInternalBadWireType | |
940 | } | |
941 | x, err := b.DecodeZigzag32() | |
942 | m.Union = &Communique_Delta_{int32(x)} | |
943 | return true, err | |
944 | case 16: // union.msg | |
945 | if wire != proto.WireBytes { | |
946 | return true, proto.ErrInternalBadWireType | |
947 | } | |
948 | msg := new(Reply) | |
949 | err := b.DecodeMessage(msg) | |
950 | m.Union = &Communique_Msg{msg} | |
951 | return true, err | |
952 | case 14: // union.somegroup | |
953 | if wire != proto.WireStartGroup { | |
954 | return true, proto.ErrInternalBadWireType | |
955 | } | |
956 | msg := new(Communique_SomeGroup) | |
957 | err := b.DecodeGroup(msg) | |
958 | m.Union = &Communique_Somegroup{msg} | |
959 | return true, err | |
960 | default: | |
961 | return false, nil | |
962 | } | |
963 | } | |
964 | ||
965 | func _Communique_OneofSizer(msg proto.Message) (n int) { | |
966 | m := msg.(*Communique) | |
967 | // union | |
968 | switch x := m.Union.(type) { | |
969 | case *Communique_Number: | |
970 | n += 1 // tag and wire | |
971 | n += proto.SizeVarint(uint64(x.Number)) | |
972 | case *Communique_Name: | |
973 | n += 1 // tag and wire | |
974 | n += proto.SizeVarint(uint64(len(x.Name))) | |
975 | n += len(x.Name) | |
976 | case *Communique_Data: | |
977 | n += 1 // tag and wire | |
978 | n += proto.SizeVarint(uint64(len(x.Data))) | |
979 | n += len(x.Data) | |
980 | case *Communique_TempC: | |
981 | n += 1 // tag and wire | |
982 | n += 8 | |
983 | case *Communique_Height: | |
984 | n += 1 // tag and wire | |
985 | n += 4 | |
986 | case *Communique_Today: | |
987 | n += 1 // tag and wire | |
988 | n += proto.SizeVarint(uint64(x.Today)) | |
989 | case *Communique_Maybe: | |
990 | n += 1 // tag and wire | |
991 | n += 1 | |
992 | case *Communique_Delta_: | |
993 | n += 1 // tag and wire | |
994 | n += proto.SizeVarint(uint64((uint32(x.Delta) << 1) ^ uint32((int32(x.Delta) >> 31)))) | |
995 | case *Communique_Msg: | |
996 | s := proto.Size(x.Msg) | |
997 | n += 2 // tag and wire | |
998 | n += proto.SizeVarint(uint64(s)) | |
999 | n += s | |
1000 | case *Communique_Somegroup: | |
1001 | n += 1 // tag and wire | |
1002 | n += proto.Size(x.Somegroup) | |
1003 | n += 1 // tag and wire | |
1004 | case nil: | |
1005 | default: | |
1006 | panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) | |
1007 | } | |
1008 | return n | |
1009 | } | |
1010 | ||
1011 | 910 | type Communique_SomeGroup struct { |
1012 | 911 | Member *string `protobuf:"bytes,15,opt,name=member" json:"member,omitempty"` |
1013 | 912 | XXX_NoUnkeyedLiteral struct{} `json:"-"` |
1019 | 918 | func (m *Communique_SomeGroup) String() string { return proto.CompactTextString(m) } |
1020 | 919 | func (*Communique_SomeGroup) ProtoMessage() {} |
1021 | 920 | func (*Communique_SomeGroup) Descriptor() ([]byte, []int) { |
1022 | return fileDescriptor_test_2309d445eee26af7, []int{6, 0} | |
1023 | } | |
921 | return fileDescriptor_2c9b60a40d5131b9, []int{6, 0} | |
922 | } | |
923 | ||
1024 | 924 | func (m *Communique_SomeGroup) XXX_Unmarshal(b []byte) error { |
1025 | 925 | return xxx_messageInfo_Communique_SomeGroup.Unmarshal(m, b) |
1026 | 926 | } |
1027 | 927 | func (m *Communique_SomeGroup) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
1028 | 928 | return xxx_messageInfo_Communique_SomeGroup.Marshal(b, m, deterministic) |
1029 | 929 | } |
1030 | func (dst *Communique_SomeGroup) XXX_Merge(src proto.Message) { | |
1031 | xxx_messageInfo_Communique_SomeGroup.Merge(dst, src) | |
930 | func (m *Communique_SomeGroup) XXX_Merge(src proto.Message) { | |
931 | xxx_messageInfo_Communique_SomeGroup.Merge(m, src) | |
1032 | 932 | } |
1033 | 933 | func (m *Communique_SomeGroup) XXX_Size() int { |
1034 | 934 | return xxx_messageInfo_Communique_SomeGroup.Size(m) |
1056 | 956 | func (m *Communique_Delta) String() string { return proto.CompactTextString(m) } |
1057 | 957 | func (*Communique_Delta) ProtoMessage() {} |
1058 | 958 | func (*Communique_Delta) Descriptor() ([]byte, []int) { |
1059 | return fileDescriptor_test_2309d445eee26af7, []int{6, 1} | |
1060 | } | |
959 | return fileDescriptor_2c9b60a40d5131b9, []int{6, 1} | |
960 | } | |
961 | ||
1061 | 962 | func (m *Communique_Delta) XXX_Unmarshal(b []byte) error { |
1062 | 963 | return xxx_messageInfo_Communique_Delta.Unmarshal(m, b) |
1063 | 964 | } |
1064 | 965 | func (m *Communique_Delta) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
1065 | 966 | return xxx_messageInfo_Communique_Delta.Marshal(b, m, deterministic) |
1066 | 967 | } |
1067 | func (dst *Communique_Delta) XXX_Merge(src proto.Message) { | |
1068 | xxx_messageInfo_Communique_Delta.Merge(dst, src) | |
968 | func (m *Communique_Delta) XXX_Merge(src proto.Message) { | |
969 | xxx_messageInfo_Communique_Delta.Merge(m, src) | |
1069 | 970 | } |
1070 | 971 | func (m *Communique_Delta) XXX_Size() int { |
1071 | 972 | return xxx_messageInfo_Communique_Delta.Size(m) |
1095 | 996 | } |
1096 | 997 | |
1097 | 998 | func init() { |
999 | proto.RegisterEnum("my.test.HatType", HatType_name, HatType_value) | |
1000 | proto.RegisterEnum("my.test.Days", Days_name, Days_value) | |
1001 | proto.RegisterEnum("my.test.Request_Color", Request_Color_name, Request_Color_value) | |
1002 | proto.RegisterEnum("my.test.Reply_Entry_Game", Reply_Entry_Game_name, Reply_Entry_Game_value) | |
1098 | 1003 | proto.RegisterType((*Request)(nil), "my.test.Request") |
1099 | 1004 | proto.RegisterMapType((map[int64]*Reply)(nil), "my.test.Request.MsgMappingEntry") |
1100 | 1005 | proto.RegisterMapType((map[int32]string)(nil), "my.test.Request.NameMappingEntry") |
1102 | 1007 | proto.RegisterType((*Reply)(nil), "my.test.Reply") |
1103 | 1008 | proto.RegisterType((*Reply_Entry)(nil), "my.test.Reply.Entry") |
1104 | 1009 | proto.RegisterType((*OtherBase)(nil), "my.test.OtherBase") |
1010 | proto.RegisterExtension(E_ReplyExtensions_Time) | |
1011 | proto.RegisterExtension(E_ReplyExtensions_Carrot) | |
1012 | proto.RegisterExtension(E_ReplyExtensions_Donut) | |
1105 | 1013 | proto.RegisterType((*ReplyExtensions)(nil), "my.test.ReplyExtensions") |
1106 | 1014 | proto.RegisterType((*OtherReplyExtensions)(nil), "my.test.OtherReplyExtensions") |
1107 | 1015 | proto.RegisterType((*OldReply)(nil), "my.test.OldReply") |
1108 | 1016 | proto.RegisterType((*Communique)(nil), "my.test.Communique") |
1109 | 1017 | proto.RegisterType((*Communique_SomeGroup)(nil), "my.test.Communique.SomeGroup") |
1110 | 1018 | proto.RegisterType((*Communique_Delta)(nil), "my.test.Communique.Delta") |
1111 | proto.RegisterEnum("my.test.HatType", HatType_name, HatType_value) | |
1112 | proto.RegisterEnum("my.test.Days", Days_name, Days_value) | |
1113 | proto.RegisterEnum("my.test.Request_Color", Request_Color_name, Request_Color_value) | |
1114 | proto.RegisterEnum("my.test.Reply_Entry_Game", Reply_Entry_Game_name, Reply_Entry_Game_value) | |
1115 | proto.RegisterExtension(E_ReplyExtensions_Time) | |
1116 | proto.RegisterExtension(E_ReplyExtensions_Carrot) | |
1117 | proto.RegisterExtension(E_ReplyExtensions_Donut) | |
1118 | 1019 | proto.RegisterExtension(E_Tag) |
1119 | 1020 | proto.RegisterExtension(E_Donut) |
1120 | 1021 | } |
1121 | 1022 | |
1122 | func init() { proto.RegisterFile("my_test/test.proto", fileDescriptor_test_2309d445eee26af7) } | |
1123 | ||
1124 | var fileDescriptor_test_2309d445eee26af7 = []byte{ | |
1125 | // 1033 bytes of a gzipped FileDescriptorProto | |
1126 | 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x55, 0xdd, 0x6e, 0xe3, 0x44, | |
1127 | 0x14, 0xce, 0xd8, 0x71, 0x7e, 0x4e, 0x42, 0x6b, 0x46, 0x55, 0x6b, 0x05, 0xed, 0xd6, 0x04, 0x8a, | |
1128 | 0x4c, 0xc5, 0xa6, 0xda, 0x80, 0xc4, 0x2a, 0x88, 0xd5, 0x36, 0x3f, 0x6d, 0xaa, 0x6d, 0x12, 0x69, | |
1129 | 0xda, 0x5e, 0xb0, 0x37, 0xd6, 0x34, 0x9e, 0x3a, 0xa6, 0x19, 0x3b, 0x6b, 0x8f, 0x11, 0xbe, 0xeb, | |
1130 | 0x53, 0xc0, 0x6b, 0x70, 0xcf, 0x0b, 0xf1, 0x16, 0x45, 0x33, 0x0e, 0x49, 0xda, 0xa0, 0xbd, 0xb1, | |
1131 | 0x7c, 0xce, 0xf9, 0xce, 0xe7, 0x39, 0x3f, 0xfe, 0x06, 0x30, 0xcf, 0x5c, 0xc1, 0x12, 0x71, 0x22, | |
1132 | 0x1f, 0xad, 0x45, 0x1c, 0x89, 0x08, 0x97, 0x79, 0xd6, 0x92, 0x66, 0x03, 0xf3, 0x74, 0x2e, 0x82, | |
1133 | 0x13, 0xf5, 0x7c, 0x9d, 0x07, 0x9b, 0xff, 0x14, 0xa1, 0x4c, 0xd8, 0xc7, 0x94, 0x25, 0x02, 0x9b, | |
1134 | 0xa0, 0xdf, 0xb3, 0xcc, 0x42, 0xb6, 0xee, 0xe8, 0x44, 0xbe, 0x62, 0x07, 0xf4, 0x59, 0xca, 0x2c, | |
1135 | 0xdd, 0x46, 0xce, 0x4e, 0x7b, 0xbf, 0xb5, 0x24, 0x6a, 0x2d, 0x13, 0x5a, 0xbd, 0x68, 0x1e, 0xc5, | |
1136 | 0x44, 0x42, 0xf0, 0x31, 0xe8, 0x33, 0x2a, 0xac, 0xa2, 0x42, 0x9a, 0x2b, 0xe4, 0x90, 0x8a, 0xeb, | |
1137 | 0x6c, 0xc1, 0x3a, 0xa5, 0xb3, 0x41, 0x7f, 0x42, 0x4e, 0x89, 0x04, 0xe1, 0x43, 0xa8, 0x78, 0x8c, | |
1138 | 0x7a, 0xf3, 0x20, 0x64, 0x56, 0xd9, 0x46, 0x8e, 0xd6, 0xd1, 0x83, 0xf0, 0x8e, 0xac, 0x9c, 0xf8, | |
1139 | 0x0d, 0x54, 0x93, 0x88, 0x33, 0x3f, 0x8e, 0xd2, 0x85, 0x55, 0xb1, 0x91, 0x03, 0xed, 0xc6, 0xd6, | |
1140 | 0xc7, 0xaf, 0x22, 0xce, 0xce, 0x25, 0x82, 0xac, 0xc1, 0xb8, 0x0f, 0xf5, 0x90, 0x72, 0xe6, 0x72, | |
1141 | 0xba, 0x58, 0x04, 0xa1, 0x6f, 0xed, 0xd8, 0xba, 0x53, 0x6b, 0x7f, 0xb9, 0x95, 0x3c, 0xa6, 0x9c, | |
1142 | 0x8d, 0x72, 0xcc, 0x20, 0x14, 0x71, 0x46, 0x6a, 0xe1, 0xda, 0x83, 0x4f, 0xa1, 0xc6, 0x13, 0x7f, | |
1143 | 0x45, 0xb2, 0xab, 0x48, 0xec, 0x2d, 0x92, 0x51, 0xe2, 0x3f, 0xe1, 0x00, 0xbe, 0x72, 0xe0, 0x3d, | |
1144 | 0x30, 0x62, 0x96, 0x30, 0x61, 0xd5, 0x6d, 0xe4, 0x18, 0x24, 0x37, 0xf0, 0x01, 0x94, 0x7d, 0x26, | |
1145 | 0x5c, 0xd9, 0x65, 0xd3, 0x46, 0x4e, 0x95, 0x94, 0x7c, 0x26, 0xde, 0xb3, 0xac, 0xf1, 0x1d, 0x54, | |
1146 | 0x57, 0xf5, 0xe0, 0x43, 0xa8, 0xa9, 0x6a, 0xdc, 0xbb, 0x80, 0xcd, 0x3d, 0xab, 0xaa, 0x18, 0x40, | |
1147 | 0xb9, 0xce, 0xa4, 0xa7, 0xf1, 0x16, 0xcc, 0xe7, 0x05, 0xac, 0x87, 0x27, 0xc1, 0x6a, 0x78, 0x7b, | |
1148 | 0x60, 0xfc, 0x46, 0xe7, 0x29, 0xb3, 0x34, 0xf5, 0xa9, 0xdc, 0xe8, 0x68, 0x6f, 0x50, 0x63, 0x04, | |
1149 | 0xbb, 0xcf, 0xce, 0xbe, 0x99, 0x8e, 0xf3, 0xf4, 0xaf, 0x37, 0xd3, 0x6b, 0xed, 0x9d, 0x8d, 0xf2, | |
1150 | 0x17, 0xf3, 0x6c, 0x83, 0xae, 0x79, 0x04, 0x86, 0xda, 0x04, 0x5c, 0x06, 0x9d, 0x0c, 0xfa, 0x66, | |
1151 | 0x01, 0x57, 0xc1, 0x38, 0x27, 0x83, 0xc1, 0xd8, 0x44, 0xb8, 0x02, 0xc5, 0xee, 0xe5, 0xcd, 0xc0, | |
1152 | 0xd4, 0x9a, 0x7f, 0x6a, 0x60, 0xa8, 0x5c, 0x7c, 0x0c, 0xc6, 0x5d, 0x94, 0x86, 0x9e, 0x5a, 0xb5, | |
1153 | 0x5a, 0x7b, 0xef, 0x29, 0x75, 0x2b, 0xef, 0x66, 0x0e, 0xc1, 0x47, 0x50, 0x9f, 0x46, 0x7c, 0x41, | |
1154 | 0xa7, 0xaa, 0x6d, 0x89, 0xa5, 0xd9, 0xba, 0x63, 0x74, 0x35, 0x13, 0x91, 0xda, 0xd2, 0xff, 0x9e, | |
1155 | 0x65, 0x49, 0xe3, 0x2f, 0x04, 0x46, 0x5e, 0x49, 0x1f, 0x0e, 0xef, 0x59, 0xe6, 0x8a, 0x19, 0x15, | |
1156 | 0x6e, 0xc8, 0x98, 0x97, 0xb8, 0xaf, 0xdb, 0xdf, 0xff, 0x30, 0xa5, 0x9c, 0xcd, 0xdd, 0x1e, 0x4d, | |
1157 | 0x2e, 0x42, 0xdf, 0x42, 0xb6, 0xe6, 0xe8, 0xe4, 0x8b, 0x7b, 0x96, 0x5d, 0xcf, 0xa8, 0x18, 0x4b, | |
1158 | 0xd0, 0x0a, 0x93, 0x43, 0xf0, 0xc1, 0x66, 0xf5, 0x7a, 0x07, 0xfd, 0xb8, 0x2c, 0x18, 0x7f, 0x03, | |
1159 | 0xa6, 0xcb, 0xb3, 0x7c, 0x34, 0xae, 0xda, 0xb5, 0xb6, 0xfa, 0x3f, 0x74, 0x52, 0x1f, 0x65, 0x6a, | |
1160 | 0x3c, 0x72, 0x34, 0xed, 0xa6, 0x0d, 0xc5, 0x73, 0xca, 0x19, 0xae, 0x43, 0xe5, 0x6c, 0x32, 0xb9, | |
1161 | 0xee, 0x9e, 0x5e, 0x5e, 0x9a, 0x08, 0x03, 0x94, 0xae, 0x07, 0xe3, 0xf1, 0xc5, 0x95, 0xa9, 0x1d, | |
1162 | 0x57, 0x2a, 0x9e, 0xf9, 0xf0, 0xf0, 0xf0, 0xa0, 0x35, 0xbf, 0x85, 0xea, 0x44, 0xcc, 0x58, 0xdc, | |
1163 | 0xa5, 0x09, 0xc3, 0x18, 0x8a, 0x92, 0x56, 0x8d, 0xa2, 0x4a, 0xd4, 0xfb, 0x06, 0xf4, 0x6f, 0x04, | |
1164 | 0xbb, 0xaa, 0x4b, 0x83, 0xdf, 0x05, 0x0b, 0x93, 0x20, 0x0a, 0x93, 0x76, 0x13, 0x8a, 0x22, 0xe0, | |
1165 | 0x0c, 0x3f, 0x1b, 0x91, 0xc5, 0x6c, 0xe4, 0x20, 0xa2, 0x62, 0xed, 0x77, 0x50, 0x9a, 0xd2, 0x38, | |
1166 | 0x8e, 0xc4, 0x16, 0x2a, 0x50, 0xe3, 0xb5, 0x9e, 0x7a, 0xd7, 0xec, 0x64, 0x99, 0xd7, 0xee, 0x82, | |
1167 | 0xe1, 0x45, 0x61, 0x2a, 0x30, 0x5e, 0x41, 0x57, 0x87, 0x56, 0x9f, 0xfa, 0x14, 0x49, 0x9e, 0xda, | |
1168 | 0x74, 0x60, 0x4f, 0xe5, 0x3c, 0x0b, 0x6f, 0x2f, 0x6f, 0xd3, 0x82, 0xca, 0x64, 0xee, 0x29, 0x9c, | |
1169 | 0xaa, 0xfe, 0xf1, 0xf1, 0xf1, 0xb1, 0xdc, 0xd1, 0x2a, 0xa8, 0xf9, 0x87, 0x0e, 0xd0, 0x8b, 0x38, | |
1170 | 0x4f, 0xc3, 0xe0, 0x63, 0xca, 0xf0, 0x4b, 0xa8, 0x71, 0x7a, 0xcf, 0x5c, 0xce, 0xdc, 0x69, 0x9c, | |
1171 | 0x53, 0x54, 0x48, 0x55, 0xba, 0x46, 0xac, 0x17, 0x67, 0xd8, 0x82, 0x52, 0x98, 0xf2, 0x5b, 0x16, | |
1172 | 0x5b, 0x86, 0x64, 0x1f, 0x16, 0xc8, 0xd2, 0xc6, 0x7b, 0xcb, 0x46, 0x97, 0x64, 0xa3, 0x87, 0x85, | |
1173 | 0xbc, 0xd5, 0xd2, 0xeb, 0x51, 0x41, 0x95, 0x30, 0xd5, 0xa5, 0x57, 0x5a, 0xf8, 0x00, 0x4a, 0x82, | |
1174 | 0xf1, 0x85, 0x3b, 0x55, 0x72, 0x84, 0x86, 0x05, 0x62, 0x48, 0xbb, 0x27, 0xe9, 0x67, 0x2c, 0xf0, | |
1175 | 0x67, 0x42, 0xfd, 0xa6, 0x9a, 0xa4, 0xcf, 0x6d, 0x7c, 0x04, 0x86, 0x88, 0x3c, 0x9a, 0x59, 0xa0, | |
1176 | 0x34, 0xf1, 0xb3, 0x55, 0x6f, 0xfa, 0x34, 0x4b, 0x14, 0x81, 0x8c, 0xe2, 0x7d, 0x30, 0x38, 0xcd, | |
1177 | 0x6e, 0x99, 0x55, 0x93, 0x27, 0x97, 0x7e, 0x65, 0x4a, 0xbf, 0xc7, 0xe6, 0x82, 0x2a, 0x01, 0xf9, | |
1178 | 0x5c, 0xfa, 0x95, 0x89, 0x9b, 0xa0, 0xf3, 0xc4, 0x57, 0xf2, 0xb1, 0xf5, 0x53, 0x0e, 0x0b, 0x44, | |
1179 | 0x06, 0xf1, 0xcf, 0x9b, 0xfa, 0xb9, 0xa3, 0xf4, 0xf3, 0xc5, 0x0a, 0xb9, 0xee, 0xdd, 0x5a, 0x42, | |
1180 | 0x87, 0x85, 0x0d, 0x11, 0x6d, 0x7c, 0xb5, 0x29, 0x46, 0xfb, 0x50, 0xe2, 0x4c, 0xf5, 0x6f, 0x37, | |
1181 | 0x57, 0xac, 0xdc, 0x6a, 0x94, 0xc1, 0xe8, 0xcb, 0x03, 0x75, 0xcb, 0x60, 0xa4, 0x61, 0x10, 0x85, | |
1182 | 0xc7, 0x2f, 0xa1, 0xbc, 0x94, 0x7b, 0xb9, 0xe6, 0xb9, 0xe0, 0x9b, 0x48, 0x8a, 0xc2, 0xd9, 0xe0, | |
1183 | 0x83, 0xa9, 0x1d, 0xb7, 0xa0, 0x28, 0x4b, 0x97, 0xc1, 0xd1, 0x64, 0xdc, 0x3f, 0xfd, 0xc5, 0x44, | |
1184 | 0xb8, 0x06, 0xe5, 0xeb, 0x9b, 0xc1, 0x95, 0x34, 0x34, 0xa9, 0x1a, 0x97, 0x37, 0xe3, 0xfe, 0x85, | |
1185 | 0x89, 0x1a, 0x9a, 0x89, 0x3a, 0x36, 0xe8, 0x82, 0xfa, 0x5b, 0xfb, 0xea, 0xab, 0x63, 0xc8, 0x50, | |
1186 | 0xa7, 0xf7, 0xdf, 0x4a, 0x3e, 0xc7, 0xfc, 0xaa, 0xba, 0xf3, 0xe2, 0xe9, 0xa2, 0xfe, 0xff, 0x4e, | |
1187 | 0x76, 0xdf, 0x7d, 0x78, 0xeb, 0x07, 0x62, 0x96, 0xde, 0xb6, 0xa6, 0x11, 0x3f, 0xf1, 0xa3, 0x39, | |
1188 | 0x0d, 0xfd, 0x13, 0x75, 0x39, 0xde, 0xa6, 0x77, 0xf9, 0xcb, 0xf4, 0x95, 0xcf, 0xc2, 0x57, 0x7e, | |
1189 | 0xa4, 0x6e, 0x55, 0xb9, 0x0f, 0x27, 0xcb, 0x6b, 0xf6, 0x27, 0xf9, 0xf8, 0x37, 0x00, 0x00, 0xff, | |
1190 | 0xff, 0x12, 0xd5, 0x46, 0x00, 0x75, 0x07, 0x00, 0x00, | |
1191 | } | |
1023 | func init() { proto.RegisterFile("my_test/test.proto", fileDescriptor_2c9b60a40d5131b9) } | |
1024 | ||
1025 | var fileDescriptor_2c9b60a40d5131b9 = []byte{ | |
1026 | // 1148 bytes of a gzipped FileDescriptorProto | |
1027 | 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x56, 0xcf, 0x6e, 0xdb, 0x46, | |
1028 | 0x13, 0x37, 0x49, 0x51, 0x7f, 0x46, 0xfe, 0x6c, 0x7e, 0x0b, 0xd7, 0x66, 0x55, 0x24, 0x61, 0x95, | |
1029 | 0xb8, 0x50, 0xdc, 0x46, 0x8e, 0xd5, 0x02, 0x4d, 0x55, 0x34, 0x88, 0x65, 0xc9, 0x71, 0x10, 0x5b, | |
1030 | 0x2e, 0x36, 0xce, 0xa1, 0xb9, 0x10, 0x6b, 0x69, 0x45, 0xb1, 0xd6, 0x92, 0x8c, 0xb8, 0x2c, 0xcc, | |
1031 | 0x9b, 0x9f, 0xa2, 0x7d, 0x8d, 0xde, 0xfb, 0x0c, 0x7d, 0x26, 0x17, 0x3b, 0xab, 0x48, 0xb2, 0x55, | |
1032 | 0x94, 0x07, 0x82, 0x33, 0xf3, 0x9b, 0xdf, 0xec, 0xce, 0xcc, 0xce, 0x12, 0x88, 0xc8, 0x7d, 0xc9, | |
1033 | 0x53, 0xb9, 0xaf, 0x5e, 0xcd, 0x64, 0x1a, 0xcb, 0x98, 0x94, 0x44, 0xde, 0x54, 0x62, 0x8d, 0x88, | |
1034 | 0x6c, 0x22, 0xc3, 0x7d, 0x7c, 0x1f, 0x68, 0x63, 0xfd, 0xef, 0x22, 0x94, 0x28, 0xff, 0x98, 0xf1, | |
1035 | 0x54, 0x12, 0x07, 0xac, 0x2b, 0x9e, 0xbb, 0x86, 0x67, 0x35, 0x2c, 0xaa, 0x3e, 0x49, 0x03, 0xac, | |
1036 | 0x71, 0xc6, 0x5d, 0xcb, 0x33, 0x1a, 0x1b, 0xad, 0xed, 0xe6, 0x8c, 0xa8, 0x39, 0x73, 0x68, 0x1e, | |
1037 | 0xc5, 0x93, 0x78, 0x4a, 0x15, 0x84, 0xec, 0x81, 0x35, 0x66, 0xd2, 0x2d, 0x20, 0xd2, 0x99, 0x23, | |
1038 | 0x4f, 0x98, 0xbc, 0xc8, 0x13, 0xde, 0x2e, 0x1e, 0xf7, 0xba, 0xe7, 0xf4, 0x90, 0x2a, 0x10, 0x79, | |
1039 | 0x04, 0xe5, 0x21, 0x67, 0xc3, 0x49, 0x18, 0x71, 0xb7, 0xe4, 0x19, 0x0d, 0xb3, 0x6d, 0x85, 0xd1, | |
1040 | 0x88, 0xce, 0x95, 0xe4, 0x05, 0x54, 0xd2, 0x58, 0xf0, 0x60, 0x1a, 0x67, 0x89, 0x5b, 0xf6, 0x8c, | |
1041 | 0x06, 0xb4, 0x6a, 0x2b, 0xc1, 0xdf, 0xc5, 0x82, 0xbf, 0x56, 0x08, 0xba, 0x00, 0x93, 0x2e, 0xac, | |
1042 | 0x47, 0x4c, 0x70, 0x5f, 0xb0, 0x24, 0x09, 0xa3, 0xc0, 0xdd, 0xf0, 0xac, 0x46, 0xb5, 0xf5, 0xe5, | |
1043 | 0x8a, 0x73, 0x9f, 0x09, 0x7e, 0xa6, 0x31, 0xbd, 0x48, 0x4e, 0x73, 0x5a, 0x8d, 0x16, 0x1a, 0x72, | |
1044 | 0x08, 0x55, 0x91, 0x06, 0x73, 0x92, 0x4d, 0x24, 0xf1, 0x56, 0x48, 0xce, 0xd2, 0xe0, 0x0e, 0x07, | |
1045 | 0x88, 0xb9, 0x82, 0x6c, 0x81, 0x3d, 0xe5, 0x29, 0x97, 0xee, 0xba, 0x67, 0x34, 0x6c, 0xaa, 0x05, | |
1046 | 0xb2, 0x03, 0xa5, 0x80, 0x4b, 0x5f, 0x65, 0xd9, 0xf1, 0x8c, 0x46, 0x85, 0x16, 0x03, 0x2e, 0xdf, | |
1047 | 0xf2, 0x9c, 0x3c, 0x06, 0x18, 0x4d, 0x62, 0x26, 0xfd, 0x28, 0x8c, 0x46, 0xee, 0x16, 0x26, 0xa5, | |
1048 | 0xf0, 0x4c, 0x65, 0xa5, 0x82, 0xfa, 0x7e, 0x18, 0x8d, 0x48, 0xfd, 0x13, 0x28, 0x51, 0xa0, 0xcf, | |
1049 | 0x16, 0x99, 0xd3, 0x98, 0x9f, 0x35, 0x46, 0x0b, 0x3e, 0xbf, 0x4e, 0xdc, 0x6d, 0x84, 0xd8, 0x07, | |
1050 | 0xfc, 0xeb, 0xe7, 0x3f, 0xd0, 0x32, 0xea, 0x7b, 0xd7, 0x09, 0xd9, 0x85, 0xea, 0x30, 0xce, 0x2e, | |
1051 | 0x27, 0x5c, 0x47, 0xdb, 0xf1, 0x8c, 0x86, 0x31, 0x8b, 0x06, 0xda, 0x80, 0xe1, 0x9e, 0xcc, 0x61, | |
1052 | 0x18, 0xcf, 0x45, 0x98, 0xb5, 0x84, 0xc2, 0x80, 0x4f, 0x61, 0x26, 0x61, 0xc4, 0xcf, 0x11, 0x04, | |
1053 | 0x07, 0xcf, 0x3f, 0x3d, 0xb4, 0xa2, 0xad, 0xbd, 0xeb, 0xa4, 0xf6, 0x0d, 0x54, 0xe6, 0x45, 0x23, | |
1054 | 0x8f, 0xa0, 0x8a, 0x25, 0xf3, 0x47, 0x21, 0x9f, 0x0c, 0xdd, 0x0a, 0xa6, 0x09, 0x50, 0x75, 0xac, | |
1055 | 0x34, 0xb5, 0x97, 0xe0, 0xdc, 0xaf, 0xd2, 0xa2, 0x43, 0x15, 0x18, 0x3b, 0x74, 0x0b, 0xec, 0xdf, | |
1056 | 0xd8, 0x24, 0xe3, 0xae, 0x89, 0xf9, 0xd4, 0x42, 0xdb, 0x7c, 0x61, 0xd4, 0xce, 0x60, 0xf3, 0x5e, | |
1057 | 0x81, 0x96, 0xdd, 0x89, 0x76, 0x7f, 0xb2, 0xec, 0x5e, 0x6d, 0x6d, 0x2c, 0xd5, 0x38, 0x99, 0xe4, | |
1058 | 0x4b, 0x74, 0xf5, 0x5d, 0xb0, 0xb1, 0xdd, 0x49, 0x09, 0x2c, 0xda, 0xeb, 0x3a, 0x6b, 0xa4, 0x02, | |
1059 | 0xf6, 0x6b, 0xda, 0xeb, 0xf5, 0x1d, 0x83, 0x94, 0xa1, 0xd0, 0x39, 0x7d, 0xdf, 0x73, 0xcc, 0xfa, | |
1060 | 0x1f, 0x26, 0xd8, 0xe8, 0x4b, 0xf6, 0xc0, 0x1e, 0xc5, 0x59, 0x34, 0xc4, 0xf3, 0x54, 0x6d, 0x6d, | |
1061 | 0xdd, 0xa5, 0x6e, 0xea, 0x96, 0xd1, 0x10, 0xb2, 0x0b, 0xeb, 0x83, 0x58, 0x24, 0x6c, 0x80, 0xbd, | |
1062 | 0x91, 0xba, 0xa6, 0x67, 0x35, 0xec, 0x8e, 0xe9, 0x18, 0xb4, 0x3a, 0xd3, 0xbf, 0xe5, 0x79, 0x5a, | |
1063 | 0xfb, 0xd3, 0x00, 0x5b, 0xef, 0xa4, 0x0b, 0x8f, 0xae, 0x78, 0xee, 0xcb, 0xb1, 0x6a, 0x19, 0xce, | |
1064 | 0x87, 0xa9, 0x7f, 0xd0, 0xfa, 0xf6, 0xbb, 0x01, 0x13, 0x7c, 0xe2, 0x1f, 0xb1, 0xf4, 0x4d, 0x14, | |
1065 | 0xb8, 0x86, 0x67, 0x36, 0x2c, 0xfa, 0xc5, 0x15, 0xcf, 0x2f, 0xc6, 0x4c, 0xf6, 0x15, 0x68, 0x8e, | |
1066 | 0xd1, 0x10, 0xb2, 0xb3, 0xbc, 0x7b, 0xab, 0x6d, 0x7c, 0x3f, 0xdb, 0x30, 0xf9, 0x0a, 0x1c, 0x5f, | |
1067 | 0xe4, 0xba, 0x34, 0x3e, 0x1e, 0xa8, 0x16, 0x0e, 0x01, 0x8b, 0xae, 0x9f, 0xe5, 0x58, 0x1e, 0x55, | |
1068 | 0x9a, 0x56, 0xdd, 0x83, 0xc2, 0x6b, 0x26, 0x38, 0x59, 0x87, 0xf2, 0xf1, 0xf9, 0xf9, 0x45, 0xe7, | |
1069 | 0xf0, 0xf4, 0xd4, 0x31, 0x08, 0x40, 0xf1, 0xa2, 0xd7, 0xef, 0xbf, 0x79, 0xe7, 0x98, 0x7b, 0xe5, | |
1070 | 0xf2, 0xd0, 0xb9, 0xb9, 0xb9, 0xb9, 0x31, 0xeb, 0x4f, 0xa1, 0x72, 0x2e, 0xc7, 0x7c, 0xda, 0x61, | |
1071 | 0x29, 0x27, 0x04, 0x0a, 0x8a, 0x16, 0x4b, 0x51, 0xa1, 0xf8, 0xbd, 0x04, 0xfd, 0xcb, 0x80, 0x4d, | |
1072 | 0xcc, 0x52, 0xef, 0x5a, 0xf2, 0x28, 0x0d, 0xe3, 0x28, 0x6d, 0xd5, 0xa1, 0x20, 0x43, 0xc1, 0xc9, | |
1073 | 0xbd, 0x12, 0xb9, 0x5c, 0x75, 0x1c, 0x45, 0x5b, 0xeb, 0x15, 0x14, 0x07, 0x6c, 0x3a, 0x8d, 0xe5, | |
1074 | 0x0a, 0x2a, 0xc4, 0xf2, 0xba, 0x77, 0xb5, 0x0b, 0x76, 0x3a, 0xf3, 0x6b, 0x75, 0xc0, 0x1e, 0xc6, | |
1075 | 0x51, 0x26, 0x09, 0x99, 0x43, 0xe7, 0x8b, 0xc6, 0x50, 0xff, 0x45, 0xa2, 0x5d, 0xeb, 0x0d, 0xd8, | |
1076 | 0x42, 0x9f, 0x7b, 0xe6, 0xd5, 0xe6, 0xad, 0xbb, 0x50, 0x3e, 0x9f, 0x0c, 0x11, 0x87, 0xbb, 0xbf, | |
1077 | 0xbd, 0xbd, 0xbd, 0x2d, 0xb5, 0xcd, 0xb2, 0x51, 0xff, 0xdd, 0x02, 0x38, 0x8a, 0x85, 0xc8, 0xa2, | |
1078 | 0xf0, 0x63, 0xc6, 0xc9, 0x43, 0xa8, 0x0a, 0x76, 0xc5, 0x7d, 0xc1, 0xfd, 0xc1, 0x54, 0x53, 0x94, | |
1079 | 0x69, 0x45, 0xa9, 0xce, 0xf8, 0xd1, 0x34, 0x27, 0x2e, 0x14, 0xa3, 0x4c, 0x5c, 0xf2, 0xa9, 0x6b, | |
1080 | 0x2b, 0xf6, 0x93, 0x35, 0x3a, 0x93, 0xc9, 0xd6, 0x2c, 0xd1, 0x45, 0x95, 0xe8, 0x93, 0x35, 0x9d, | |
1081 | 0x6a, 0xa5, 0x1d, 0x32, 0xc9, 0x70, 0xfa, 0xae, 0x2b, 0xad, 0x92, 0xc8, 0x0e, 0x14, 0x25, 0x17, | |
1082 | 0x89, 0x3f, 0xc0, 0x99, 0x6b, 0x9c, 0xac, 0x51, 0x5b, 0xc9, 0x47, 0x8a, 0x7e, 0xcc, 0xc3, 0x60, | |
1083 | 0x2c, 0xf1, 0x98, 0x9a, 0x8a, 0x5e, 0xcb, 0x64, 0x17, 0x6c, 0x19, 0x0f, 0x59, 0xee, 0x02, 0x0e, | |
1084 | 0xfe, 0xff, 0xcd, 0x73, 0xd3, 0x65, 0x79, 0x8a, 0x04, 0xca, 0x4a, 0xb6, 0xc1, 0x16, 0x2c, 0xbf, | |
1085 | 0xe4, 0x6e, 0x55, 0xad, 0x5c, 0xe9, 0x51, 0x54, 0xfa, 0x21, 0x9f, 0x48, 0x86, 0x53, 0xf2, 0xff, | |
1086 | 0x4a, 0x8f, 0x22, 0xa9, 0x83, 0x25, 0xd2, 0x00, 0x67, 0xe4, 0xca, 0xa1, 0x3c, 0x59, 0xa3, 0xca, | |
1087 | 0x48, 0x7e, 0x5a, 0xbe, 0x24, 0x36, 0xf0, 0x92, 0x78, 0x30, 0x47, 0x2e, 0x72, 0xb7, 0xb8, 0x27, | |
1088 | 0x4e, 0xd6, 0x96, 0x6e, 0x8a, 0xda, 0xe3, 0xe5, 0x61, 0xb4, 0x0d, 0x45, 0xc1, 0x31, 0x7f, 0x9b, | |
1089 | 0x7a, 0x2c, 0x6b, 0xa9, 0x56, 0x02, 0xbb, 0xab, 0x16, 0xd4, 0x29, 0x81, 0x9d, 0x45, 0x61, 0x1c, | |
1090 | 0xed, 0x3d, 0x84, 0xd2, 0xec, 0x4e, 0x53, 0x6d, 0xae, 0x6f, 0x35, 0xc7, 0x50, 0x43, 0xe1, 0xb8, | |
1091 | 0xf7, 0xc1, 0x31, 0xf7, 0x9a, 0x50, 0x50, 0x5b, 0x57, 0xc6, 0xb3, 0xf3, 0x7e, 0xf7, 0xf0, 0x17, | |
1092 | 0xc7, 0x20, 0x55, 0x28, 0x5d, 0xbc, 0xef, 0xbd, 0x53, 0x82, 0xa9, 0xa6, 0xc6, 0xe9, 0xfb, 0x7e, | |
1093 | 0xf7, 0x8d, 0x63, 0xd4, 0x4c, 0xc7, 0x68, 0x7b, 0x60, 0x49, 0x16, 0xac, 0xf4, 0x6b, 0x80, 0xcb, | |
1094 | 0x50, 0xa6, 0xf6, 0xd1, 0xa7, 0x96, 0xbc, 0x8f, 0xf9, 0x15, 0xb3, 0xf3, 0xe0, 0x6e, 0xa3, 0xfe, | |
1095 | 0x7b, 0x4f, 0x76, 0x5e, 0x7d, 0x78, 0x19, 0x84, 0x72, 0x9c, 0x5d, 0x36, 0x07, 0xb1, 0xd8, 0x0f, | |
1096 | 0xe2, 0x09, 0x8b, 0x82, 0x7d, 0xfc, 0x03, 0xb8, 0xcc, 0x46, 0xfa, 0x63, 0xf0, 0x2c, 0xe0, 0xd1, | |
1097 | 0xb3, 0x20, 0xc6, 0x5f, 0x07, 0xd5, 0x0f, 0xfb, 0xb3, 0x7f, 0x89, 0x1f, 0xd5, 0xeb, 0x9f, 0x00, | |
1098 | 0x00, 0x00, 0xff, 0xff, 0x31, 0xff, 0x4e, 0x30, 0x5a, 0x08, 0x00, 0x00, | |
1099 | } |
84 | 84 | optional int32 reset = 12; |
85 | 85 | // This field should not conflict with any getters. |
86 | 86 | optional string get_key = 16; |
87 | ||
88 | optional float float_ninf = 20 [default=-inf]; | |
89 | optional float float_pinf = 21 [default=inf]; | |
90 | optional float float_exp = 22 [default=1e9]; | |
91 | optional double double_ninf = 23 [default=-inf]; | |
92 | optional double double_pinf = 24 [default=inf]; | |
93 | optional double double_exp = 25 [default=1e9]; | |
87 | 94 | } |
88 | 95 | |
89 | 96 | message Reply { |
0 | 0 | // Code generated by protoc-gen-go. DO NOT EDIT. |
1 | 1 | // source: proto3/proto3.proto |
2 | 2 | |
3 | package proto3 // import "github.com/golang/protobuf/protoc-gen-go/testdata/proto3" | |
4 | ||
5 | import proto "github.com/golang/protobuf/proto" | |
6 | import fmt "fmt" | |
7 | import math "math" | |
3 | package proto3 | |
4 | ||
5 | import ( | |
6 | fmt "fmt" | |
7 | proto "github.com/golang/protobuf/proto" | |
8 | math "math" | |
9 | ) | |
8 | 10 | |
9 | 11 | // Reference imports to suppress errors if they are not otherwise used. |
10 | 12 | var _ = proto.Marshal |
15 | 17 | // is compatible with the proto package it is being compiled against. |
16 | 18 | // A compilation error at this line likely means your copy of the |
17 | 19 | // proto package needs to be updated. |
18 | const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package | |
20 | const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package | |
19 | 21 | |
20 | 22 | type Request_Flavour int32 |
21 | 23 | |
32 | 34 | 2: "UMAMI", |
33 | 35 | 3: "GOPHERLICIOUS", |
34 | 36 | } |
37 | ||
35 | 38 | var Request_Flavour_value = map[string]int32{ |
36 | 39 | "SWEET": 0, |
37 | 40 | "SOUR": 1, |
42 | 45 | func (x Request_Flavour) String() string { |
43 | 46 | return proto.EnumName(Request_Flavour_name, int32(x)) |
44 | 47 | } |
48 | ||
45 | 49 | func (Request_Flavour) EnumDescriptor() ([]byte, []int) { |
46 | return fileDescriptor_proto3_a752e09251f17e01, []int{0, 0} | |
50 | return fileDescriptor_ab04eb4084a521db, []int{0, 0} | |
47 | 51 | } |
48 | 52 | |
49 | 53 | type Request struct { |
61 | 65 | func (m *Request) String() string { return proto.CompactTextString(m) } |
62 | 66 | func (*Request) ProtoMessage() {} |
63 | 67 | func (*Request) Descriptor() ([]byte, []int) { |
64 | return fileDescriptor_proto3_a752e09251f17e01, []int{0} | |
65 | } | |
68 | return fileDescriptor_ab04eb4084a521db, []int{0} | |
69 | } | |
70 | ||
66 | 71 | func (m *Request) XXX_Unmarshal(b []byte) error { |
67 | 72 | return xxx_messageInfo_Request.Unmarshal(m, b) |
68 | 73 | } |
69 | 74 | func (m *Request) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
70 | 75 | return xxx_messageInfo_Request.Marshal(b, m, deterministic) |
71 | 76 | } |
72 | func (dst *Request) XXX_Merge(src proto.Message) { | |
73 | xxx_messageInfo_Request.Merge(dst, src) | |
77 | func (m *Request) XXX_Merge(src proto.Message) { | |
78 | xxx_messageInfo_Request.Merge(m, src) | |
74 | 79 | } |
75 | 80 | func (m *Request) XXX_Size() int { |
76 | 81 | return xxx_messageInfo_Request.Size(m) |
128 | 133 | func (m *Book) String() string { return proto.CompactTextString(m) } |
129 | 134 | func (*Book) ProtoMessage() {} |
130 | 135 | func (*Book) Descriptor() ([]byte, []int) { |
131 | return fileDescriptor_proto3_a752e09251f17e01, []int{1} | |
132 | } | |
136 | return fileDescriptor_ab04eb4084a521db, []int{1} | |
137 | } | |
138 | ||
133 | 139 | func (m *Book) XXX_Unmarshal(b []byte) error { |
134 | 140 | return xxx_messageInfo_Book.Unmarshal(m, b) |
135 | 141 | } |
136 | 142 | func (m *Book) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
137 | 143 | return xxx_messageInfo_Book.Marshal(b, m, deterministic) |
138 | 144 | } |
139 | func (dst *Book) XXX_Merge(src proto.Message) { | |
140 | xxx_messageInfo_Book.Merge(dst, src) | |
145 | func (m *Book) XXX_Merge(src proto.Message) { | |
146 | xxx_messageInfo_Book.Merge(m, src) | |
141 | 147 | } |
142 | 148 | func (m *Book) XXX_Size() int { |
143 | 149 | return xxx_messageInfo_Book.Size(m) |
163 | 169 | } |
164 | 170 | |
165 | 171 | func init() { |
172 | proto.RegisterEnum("proto3.Request_Flavour", Request_Flavour_name, Request_Flavour_value) | |
166 | 173 | proto.RegisterType((*Request)(nil), "proto3.Request") |
167 | 174 | proto.RegisterType((*Book)(nil), "proto3.Book") |
168 | proto.RegisterEnum("proto3.Request_Flavour", Request_Flavour_name, Request_Flavour_value) | |
169 | } | |
170 | ||
171 | func init() { proto.RegisterFile("proto3/proto3.proto", fileDescriptor_proto3_a752e09251f17e01) } | |
172 | ||
173 | var fileDescriptor_proto3_a752e09251f17e01 = []byte{ | |
175 | } | |
176 | ||
177 | func init() { proto.RegisterFile("proto3/proto3.proto", fileDescriptor_ab04eb4084a521db) } | |
178 | ||
179 | var fileDescriptor_ab04eb4084a521db = []byte{ | |
174 | 180 | // 306 bytes of a gzipped FileDescriptorProto |
175 | 181 | 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x3c, 0x90, 0xcf, 0x4e, 0xf2, 0x40, |
176 | 182 | 0x14, 0xc5, 0x99, 0xfe, 0xf9, 0x80, 0xfb, 0xa1, 0x19, 0xaf, 0x26, 0x8e, 0x1b, 0x33, 0x61, 0xd5, |
0 | 0 | // Code generated by protoc-gen-go. DO NOT EDIT. |
1 | 1 | // source: google/protobuf/any.proto |
2 | 2 | |
3 | package any // import "github.com/golang/protobuf/ptypes/any" | |
4 | ||
5 | import proto "github.com/golang/protobuf/proto" | |
6 | import fmt "fmt" | |
7 | import math "math" | |
3 | package any | |
4 | ||
5 | import ( | |
6 | fmt "fmt" | |
7 | proto "github.com/golang/protobuf/proto" | |
8 | math "math" | |
9 | ) | |
8 | 10 | |
9 | 11 | // Reference imports to suppress errors if they are not otherwise used. |
10 | 12 | var _ = proto.Marshal |
15 | 17 | // is compatible with the proto package it is being compiled against. |
16 | 18 | // A compilation error at this line likely means your copy of the |
17 | 19 | // proto package needs to be updated. |
18 | const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package | |
20 | const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package | |
19 | 21 | |
20 | 22 | // `Any` contains an arbitrary serialized protocol buffer message along with a |
21 | 23 | // URL that describes the type of the serialized message. |
98 | 100 | // } |
99 | 101 | // |
100 | 102 | type Any struct { |
101 | // A URL/resource name whose content describes the type of the | |
102 | // serialized protocol buffer message. | |
103 | // | |
104 | // For URLs which use the scheme `http`, `https`, or no scheme, the | |
105 | // following restrictions and interpretations apply: | |
103 | // A URL/resource name that uniquely identifies the type of the serialized | |
104 | // protocol buffer message. The last segment of the URL's path must represent | |
105 | // the fully qualified name of the type (as in | |
106 | // `path/google.protobuf.Duration`). The name should be in a canonical form | |
107 | // (e.g., leading "." is not accepted). | |
108 | // | |
109 | // In practice, teams usually precompile into the binary all types that they | |
110 | // expect it to use in the context of Any. However, for URLs which use the | |
111 | // scheme `http`, `https`, or no scheme, one can optionally set up a type | |
112 | // server that maps type URLs to message definitions as follows: | |
106 | 113 | // |
107 | 114 | // * If no scheme is provided, `https` is assumed. |
108 | // * The last segment of the URL's path must represent the fully | |
109 | // qualified name of the type (as in `path/google.protobuf.Duration`). | |
110 | // The name should be in a canonical form (e.g., leading "." is | |
111 | // not accepted). | |
112 | 115 | // * An HTTP GET on the URL must yield a [google.protobuf.Type][] |
113 | 116 | // value in binary format, or produce an error. |
114 | 117 | // * Applications are allowed to cache lookup results based on the |
117 | 120 | // on changes to types. (Use versioned type names to manage |
118 | 121 | // breaking changes.) |
119 | 122 | // |
123 | // Note: this functionality is not currently available in the official | |
124 | // protobuf release, and it is not used for type URLs beginning with | |
125 | // type.googleapis.com. | |
126 | // | |
120 | 127 | // Schemes other than `http`, `https` (or the empty scheme) might be |
121 | 128 | // used with implementation specific semantics. |
122 | 129 | // |
132 | 139 | func (m *Any) String() string { return proto.CompactTextString(m) } |
133 | 140 | func (*Any) ProtoMessage() {} |
134 | 141 | func (*Any) Descriptor() ([]byte, []int) { |
135 | return fileDescriptor_any_744b9ca530f228db, []int{0} | |
136 | } | |
142 | return fileDescriptor_b53526c13ae22eb4, []int{0} | |
143 | } | |
144 | ||
137 | 145 | func (*Any) XXX_WellKnownType() string { return "Any" } |
146 | ||
138 | 147 | func (m *Any) XXX_Unmarshal(b []byte) error { |
139 | 148 | return xxx_messageInfo_Any.Unmarshal(m, b) |
140 | 149 | } |
141 | 150 | func (m *Any) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
142 | 151 | return xxx_messageInfo_Any.Marshal(b, m, deterministic) |
143 | 152 | } |
144 | func (dst *Any) XXX_Merge(src proto.Message) { | |
145 | xxx_messageInfo_Any.Merge(dst, src) | |
153 | func (m *Any) XXX_Merge(src proto.Message) { | |
154 | xxx_messageInfo_Any.Merge(m, src) | |
146 | 155 | } |
147 | 156 | func (m *Any) XXX_Size() int { |
148 | 157 | return xxx_messageInfo_Any.Size(m) |
171 | 180 | proto.RegisterType((*Any)(nil), "google.protobuf.Any") |
172 | 181 | } |
173 | 182 | |
174 | func init() { proto.RegisterFile("google/protobuf/any.proto", fileDescriptor_any_744b9ca530f228db) } | |
175 | ||
176 | var fileDescriptor_any_744b9ca530f228db = []byte{ | |
183 | func init() { proto.RegisterFile("google/protobuf/any.proto", fileDescriptor_b53526c13ae22eb4) } | |
184 | ||
185 | var fileDescriptor_b53526c13ae22eb4 = []byte{ | |
177 | 186 | // 185 bytes of a gzipped FileDescriptorProto |
178 | 187 | 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4c, 0xcf, 0xcf, 0x4f, |
179 | 188 | 0xcf, 0x49, 0xd5, 0x2f, 0x28, 0xca, 0x2f, 0xc9, 0x4f, 0x2a, 0x4d, 0xd3, 0x4f, 0xcc, 0xab, 0xd4, |
119 | 119 | // } |
120 | 120 | // |
121 | 121 | message Any { |
122 | // A URL/resource name whose content describes the type of the | |
123 | // serialized protocol buffer message. | |
122 | // A URL/resource name that uniquely identifies the type of the serialized | |
123 | // protocol buffer message. The last segment of the URL's path must represent | |
124 | // the fully qualified name of the type (as in | |
125 | // `path/google.protobuf.Duration`). The name should be in a canonical form | |
126 | // (e.g., leading "." is not accepted). | |
124 | 127 | // |
125 | // For URLs which use the scheme `http`, `https`, or no scheme, the | |
126 | // following restrictions and interpretations apply: | |
128 | // In practice, teams usually precompile into the binary all types that they | |
129 | // expect it to use in the context of Any. However, for URLs which use the | |
130 | // scheme `http`, `https`, or no scheme, one can optionally set up a type | |
131 | // server that maps type URLs to message definitions as follows: | |
127 | 132 | // |
128 | 133 | // * If no scheme is provided, `https` is assumed. |
129 | // * The last segment of the URL's path must represent the fully | |
130 | // qualified name of the type (as in `path/google.protobuf.Duration`). | |
131 | // The name should be in a canonical form (e.g., leading "." is | |
132 | // not accepted). | |
133 | 134 | // * An HTTP GET on the URL must yield a [google.protobuf.Type][] |
134 | 135 | // value in binary format, or produce an error. |
135 | 136 | // * Applications are allowed to cache lookup results based on the |
137 | 138 | // lookup. Therefore, binary compatibility needs to be preserved |
138 | 139 | // on changes to types. (Use versioned type names to manage |
139 | 140 | // breaking changes.) |
141 | // | |
142 | // Note: this functionality is not currently available in the official | |
143 | // protobuf release, and it is not used for type URLs beginning with | |
144 | // type.googleapis.com. | |
140 | 145 | // |
141 | 146 | // Schemes other than `http`, `https` (or the empty scheme) might be |
142 | 147 | // used with implementation specific semantics. |
0 | 0 | // Code generated by protoc-gen-go. DO NOT EDIT. |
1 | 1 | // source: google/protobuf/duration.proto |
2 | 2 | |
3 | package duration // import "github.com/golang/protobuf/ptypes/duration" | |
3 | package duration | |
4 | 4 | |
5 | import proto "github.com/golang/protobuf/proto" | |
6 | import fmt "fmt" | |
7 | import math "math" | |
5 | import ( | |
6 | fmt "fmt" | |
7 | proto "github.com/golang/protobuf/proto" | |
8 | math "math" | |
9 | ) | |
8 | 10 | |
9 | 11 | // Reference imports to suppress errors if they are not otherwise used. |
10 | 12 | var _ = proto.Marshal |
15 | 17 | // is compatible with the proto package it is being compiled against. |
16 | 18 | // A compilation error at this line likely means your copy of the |
17 | 19 | // proto package needs to be updated. |
18 | const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package | |
20 | const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package | |
19 | 21 | |
20 | 22 | // A Duration represents a signed, fixed-length span of time represented |
21 | 23 | // as a count of seconds and fractions of seconds at nanosecond |
98 | 100 | func (m *Duration) String() string { return proto.CompactTextString(m) } |
99 | 101 | func (*Duration) ProtoMessage() {} |
100 | 102 | func (*Duration) Descriptor() ([]byte, []int) { |
101 | return fileDescriptor_duration_e7d612259e3f0613, []int{0} | |
103 | return fileDescriptor_23597b2ebd7ac6c5, []int{0} | |
102 | 104 | } |
105 | ||
103 | 106 | func (*Duration) XXX_WellKnownType() string { return "Duration" } |
107 | ||
104 | 108 | func (m *Duration) XXX_Unmarshal(b []byte) error { |
105 | 109 | return xxx_messageInfo_Duration.Unmarshal(m, b) |
106 | 110 | } |
107 | 111 | func (m *Duration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
108 | 112 | return xxx_messageInfo_Duration.Marshal(b, m, deterministic) |
109 | 113 | } |
110 | func (dst *Duration) XXX_Merge(src proto.Message) { | |
111 | xxx_messageInfo_Duration.Merge(dst, src) | |
114 | func (m *Duration) XXX_Merge(src proto.Message) { | |
115 | xxx_messageInfo_Duration.Merge(m, src) | |
112 | 116 | } |
113 | 117 | func (m *Duration) XXX_Size() int { |
114 | 118 | return xxx_messageInfo_Duration.Size(m) |
137 | 141 | proto.RegisterType((*Duration)(nil), "google.protobuf.Duration") |
138 | 142 | } |
139 | 143 | |
140 | func init() { | |
141 | proto.RegisterFile("google/protobuf/duration.proto", fileDescriptor_duration_e7d612259e3f0613) | |
142 | } | |
144 | func init() { proto.RegisterFile("google/protobuf/duration.proto", fileDescriptor_23597b2ebd7ac6c5) } | |
143 | 145 | |
144 | var fileDescriptor_duration_e7d612259e3f0613 = []byte{ | |
146 | var fileDescriptor_23597b2ebd7ac6c5 = []byte{ | |
145 | 147 | // 190 bytes of a gzipped FileDescriptorProto |
146 | 148 | 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4b, 0xcf, 0xcf, 0x4f, |
147 | 149 | 0xcf, 0x49, 0xd5, 0x2f, 0x28, 0xca, 0x2f, 0xc9, 0x4f, 0x2a, 0x4d, 0xd3, 0x4f, 0x29, 0x2d, 0x4a, |
81 | 81 | return 0, fmt.Errorf("duration: %v is out of range for time.Duration", p) |
82 | 82 | } |
83 | 83 | if p.Nanos != 0 { |
84 | d += time.Duration(p.Nanos) | |
84 | d += time.Duration(p.Nanos) * time.Nanosecond | |
85 | 85 | if (d < 0) != (p.Nanos < 0) { |
86 | 86 | return 0, fmt.Errorf("duration: %v is out of range for time.Duration", p) |
87 | 87 | } |
0 | 0 | // Code generated by protoc-gen-go. DO NOT EDIT. |
1 | 1 | // source: google/protobuf/empty.proto |
2 | 2 | |
3 | package empty // import "github.com/golang/protobuf/ptypes/empty" | |
3 | package empty | |
4 | 4 | |
5 | import proto "github.com/golang/protobuf/proto" | |
6 | import fmt "fmt" | |
7 | import math "math" | |
5 | import ( | |
6 | fmt "fmt" | |
7 | proto "github.com/golang/protobuf/proto" | |
8 | math "math" | |
9 | ) | |
8 | 10 | |
9 | 11 | // Reference imports to suppress errors if they are not otherwise used. |
10 | 12 | var _ = proto.Marshal |
15 | 17 | // is compatible with the proto package it is being compiled against. |
16 | 18 | // A compilation error at this line likely means your copy of the |
17 | 19 | // proto package needs to be updated. |
18 | const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package | |
20 | const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package | |
19 | 21 | |
20 | 22 | // A generic empty message that you can re-use to avoid defining duplicated |
21 | 23 | // empty messages in your APIs. A typical example is to use it as the request |
36 | 38 | func (m *Empty) String() string { return proto.CompactTextString(m) } |
37 | 39 | func (*Empty) ProtoMessage() {} |
38 | 40 | func (*Empty) Descriptor() ([]byte, []int) { |
39 | return fileDescriptor_empty_39e6d6db0632e5b2, []int{0} | |
41 | return fileDescriptor_900544acb223d5b8, []int{0} | |
40 | 42 | } |
43 | ||
41 | 44 | func (*Empty) XXX_WellKnownType() string { return "Empty" } |
45 | ||
42 | 46 | func (m *Empty) XXX_Unmarshal(b []byte) error { |
43 | 47 | return xxx_messageInfo_Empty.Unmarshal(m, b) |
44 | 48 | } |
45 | 49 | func (m *Empty) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
46 | 50 | return xxx_messageInfo_Empty.Marshal(b, m, deterministic) |
47 | 51 | } |
48 | func (dst *Empty) XXX_Merge(src proto.Message) { | |
49 | xxx_messageInfo_Empty.Merge(dst, src) | |
52 | func (m *Empty) XXX_Merge(src proto.Message) { | |
53 | xxx_messageInfo_Empty.Merge(m, src) | |
50 | 54 | } |
51 | 55 | func (m *Empty) XXX_Size() int { |
52 | 56 | return xxx_messageInfo_Empty.Size(m) |
61 | 65 | proto.RegisterType((*Empty)(nil), "google.protobuf.Empty") |
62 | 66 | } |
63 | 67 | |
64 | func init() { proto.RegisterFile("google/protobuf/empty.proto", fileDescriptor_empty_39e6d6db0632e5b2) } | |
68 | func init() { proto.RegisterFile("google/protobuf/empty.proto", fileDescriptor_900544acb223d5b8) } | |
65 | 69 | |
66 | var fileDescriptor_empty_39e6d6db0632e5b2 = []byte{ | |
70 | var fileDescriptor_900544acb223d5b8 = []byte{ | |
67 | 71 | // 148 bytes of a gzipped FileDescriptorProto |
68 | 72 | 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4e, 0xcf, 0xcf, 0x4f, |
69 | 73 | 0xcf, 0x49, 0xd5, 0x2f, 0x28, 0xca, 0x2f, 0xc9, 0x4f, 0x2a, 0x4d, 0xd3, 0x4f, 0xcd, 0x2d, 0x28, |
0 | 0 | // Code generated by protoc-gen-go. DO NOT EDIT. |
1 | 1 | // source: google/protobuf/struct.proto |
2 | 2 | |
3 | package structpb // import "github.com/golang/protobuf/ptypes/struct" | |
4 | ||
5 | import proto "github.com/golang/protobuf/proto" | |
6 | import fmt "fmt" | |
7 | import math "math" | |
3 | package structpb | |
4 | ||
5 | import ( | |
6 | fmt "fmt" | |
7 | proto "github.com/golang/protobuf/proto" | |
8 | math "math" | |
9 | ) | |
8 | 10 | |
9 | 11 | // Reference imports to suppress errors if they are not otherwise used. |
10 | 12 | var _ = proto.Marshal |
15 | 17 | // is compatible with the proto package it is being compiled against. |
16 | 18 | // A compilation error at this line likely means your copy of the |
17 | 19 | // proto package needs to be updated. |
18 | const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package | |
20 | const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package | |
19 | 21 | |
20 | 22 | // `NullValue` is a singleton enumeration to represent the null value for the |
21 | 23 | // `Value` type union. |
31 | 33 | var NullValue_name = map[int32]string{ |
32 | 34 | 0: "NULL_VALUE", |
33 | 35 | } |
36 | ||
34 | 37 | var NullValue_value = map[string]int32{ |
35 | 38 | "NULL_VALUE": 0, |
36 | 39 | } |
38 | 41 | func (x NullValue) String() string { |
39 | 42 | return proto.EnumName(NullValue_name, int32(x)) |
40 | 43 | } |
44 | ||
41 | 45 | func (NullValue) EnumDescriptor() ([]byte, []int) { |
42 | return fileDescriptor_struct_3a5a94e0c7801b27, []int{0} | |
43 | } | |
46 | return fileDescriptor_df322afd6c9fb402, []int{0} | |
47 | } | |
48 | ||
44 | 49 | func (NullValue) XXX_WellKnownType() string { return "NullValue" } |
45 | 50 | |
46 | 51 | // `Struct` represents a structured data value, consisting of fields |
63 | 68 | func (m *Struct) String() string { return proto.CompactTextString(m) } |
64 | 69 | func (*Struct) ProtoMessage() {} |
65 | 70 | func (*Struct) Descriptor() ([]byte, []int) { |
66 | return fileDescriptor_struct_3a5a94e0c7801b27, []int{0} | |
67 | } | |
71 | return fileDescriptor_df322afd6c9fb402, []int{0} | |
72 | } | |
73 | ||
68 | 74 | func (*Struct) XXX_WellKnownType() string { return "Struct" } |
75 | ||
69 | 76 | func (m *Struct) XXX_Unmarshal(b []byte) error { |
70 | 77 | return xxx_messageInfo_Struct.Unmarshal(m, b) |
71 | 78 | } |
72 | 79 | func (m *Struct) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
73 | 80 | return xxx_messageInfo_Struct.Marshal(b, m, deterministic) |
74 | 81 | } |
75 | func (dst *Struct) XXX_Merge(src proto.Message) { | |
76 | xxx_messageInfo_Struct.Merge(dst, src) | |
82 | func (m *Struct) XXX_Merge(src proto.Message) { | |
83 | xxx_messageInfo_Struct.Merge(m, src) | |
77 | 84 | } |
78 | 85 | func (m *Struct) XXX_Size() int { |
79 | 86 | return xxx_messageInfo_Struct.Size(m) |
117 | 124 | func (m *Value) String() string { return proto.CompactTextString(m) } |
118 | 125 | func (*Value) ProtoMessage() {} |
119 | 126 | func (*Value) Descriptor() ([]byte, []int) { |
120 | return fileDescriptor_struct_3a5a94e0c7801b27, []int{1} | |
121 | } | |
127 | return fileDescriptor_df322afd6c9fb402, []int{1} | |
128 | } | |
129 | ||
122 | 130 | func (*Value) XXX_WellKnownType() string { return "Value" } |
131 | ||
123 | 132 | func (m *Value) XXX_Unmarshal(b []byte) error { |
124 | 133 | return xxx_messageInfo_Value.Unmarshal(m, b) |
125 | 134 | } |
126 | 135 | func (m *Value) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
127 | 136 | return xxx_messageInfo_Value.Marshal(b, m, deterministic) |
128 | 137 | } |
129 | func (dst *Value) XXX_Merge(src proto.Message) { | |
130 | xxx_messageInfo_Value.Merge(dst, src) | |
138 | func (m *Value) XXX_Merge(src proto.Message) { | |
139 | xxx_messageInfo_Value.Merge(m, src) | |
131 | 140 | } |
132 | 141 | func (m *Value) XXX_Size() int { |
133 | 142 | return xxx_messageInfo_Value.Size(m) |
227 | 236 | return nil |
228 | 237 | } |
229 | 238 | |
230 | // XXX_OneofFuncs is for the internal use of the proto package. | |
231 | func (*Value) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { | |
232 | return _Value_OneofMarshaler, _Value_OneofUnmarshaler, _Value_OneofSizer, []interface{}{ | |
239 | // XXX_OneofWrappers is for the internal use of the proto package. | |
240 | func (*Value) XXX_OneofWrappers() []interface{} { | |
241 | return []interface{}{ | |
233 | 242 | (*Value_NullValue)(nil), |
234 | 243 | (*Value_NumberValue)(nil), |
235 | 244 | (*Value_StringValue)(nil), |
237 | 246 | (*Value_StructValue)(nil), |
238 | 247 | (*Value_ListValue)(nil), |
239 | 248 | } |
240 | } | |
241 | ||
242 | func _Value_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { | |
243 | m := msg.(*Value) | |
244 | // kind | |
245 | switch x := m.Kind.(type) { | |
246 | case *Value_NullValue: | |
247 | b.EncodeVarint(1<<3 | proto.WireVarint) | |
248 | b.EncodeVarint(uint64(x.NullValue)) | |
249 | case *Value_NumberValue: | |
250 | b.EncodeVarint(2<<3 | proto.WireFixed64) | |
251 | b.EncodeFixed64(math.Float64bits(x.NumberValue)) | |
252 | case *Value_StringValue: | |
253 | b.EncodeVarint(3<<3 | proto.WireBytes) | |
254 | b.EncodeStringBytes(x.StringValue) | |
255 | case *Value_BoolValue: | |
256 | t := uint64(0) | |
257 | if x.BoolValue { | |
258 | t = 1 | |
259 | } | |
260 | b.EncodeVarint(4<<3 | proto.WireVarint) | |
261 | b.EncodeVarint(t) | |
262 | case *Value_StructValue: | |
263 | b.EncodeVarint(5<<3 | proto.WireBytes) | |
264 | if err := b.EncodeMessage(x.StructValue); err != nil { | |
265 | return err | |
266 | } | |
267 | case *Value_ListValue: | |
268 | b.EncodeVarint(6<<3 | proto.WireBytes) | |
269 | if err := b.EncodeMessage(x.ListValue); err != nil { | |
270 | return err | |
271 | } | |
272 | case nil: | |
273 | default: | |
274 | return fmt.Errorf("Value.Kind has unexpected type %T", x) | |
275 | } | |
276 | return nil | |
277 | } | |
278 | ||
279 | func _Value_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { | |
280 | m := msg.(*Value) | |
281 | switch tag { | |
282 | case 1: // kind.null_value | |
283 | if wire != proto.WireVarint { | |
284 | return true, proto.ErrInternalBadWireType | |
285 | } | |
286 | x, err := b.DecodeVarint() | |
287 | m.Kind = &Value_NullValue{NullValue(x)} | |
288 | return true, err | |
289 | case 2: // kind.number_value | |
290 | if wire != proto.WireFixed64 { | |
291 | return true, proto.ErrInternalBadWireType | |
292 | } | |
293 | x, err := b.DecodeFixed64() | |
294 | m.Kind = &Value_NumberValue{math.Float64frombits(x)} | |
295 | return true, err | |
296 | case 3: // kind.string_value | |
297 | if wire != proto.WireBytes { | |
298 | return true, proto.ErrInternalBadWireType | |
299 | } | |
300 | x, err := b.DecodeStringBytes() | |
301 | m.Kind = &Value_StringValue{x} | |
302 | return true, err | |
303 | case 4: // kind.bool_value | |
304 | if wire != proto.WireVarint { | |
305 | return true, proto.ErrInternalBadWireType | |
306 | } | |
307 | x, err := b.DecodeVarint() | |
308 | m.Kind = &Value_BoolValue{x != 0} | |
309 | return true, err | |
310 | case 5: // kind.struct_value | |
311 | if wire != proto.WireBytes { | |
312 | return true, proto.ErrInternalBadWireType | |
313 | } | |
314 | msg := new(Struct) | |
315 | err := b.DecodeMessage(msg) | |
316 | m.Kind = &Value_StructValue{msg} | |
317 | return true, err | |
318 | case 6: // kind.list_value | |
319 | if wire != proto.WireBytes { | |
320 | return true, proto.ErrInternalBadWireType | |
321 | } | |
322 | msg := new(ListValue) | |
323 | err := b.DecodeMessage(msg) | |
324 | m.Kind = &Value_ListValue{msg} | |
325 | return true, err | |
326 | default: | |
327 | return false, nil | |
328 | } | |
329 | } | |
330 | ||
331 | func _Value_OneofSizer(msg proto.Message) (n int) { | |
332 | m := msg.(*Value) | |
333 | // kind | |
334 | switch x := m.Kind.(type) { | |
335 | case *Value_NullValue: | |
336 | n += 1 // tag and wire | |
337 | n += proto.SizeVarint(uint64(x.NullValue)) | |
338 | case *Value_NumberValue: | |
339 | n += 1 // tag and wire | |
340 | n += 8 | |
341 | case *Value_StringValue: | |
342 | n += 1 // tag and wire | |
343 | n += proto.SizeVarint(uint64(len(x.StringValue))) | |
344 | n += len(x.StringValue) | |
345 | case *Value_BoolValue: | |
346 | n += 1 // tag and wire | |
347 | n += 1 | |
348 | case *Value_StructValue: | |
349 | s := proto.Size(x.StructValue) | |
350 | n += 1 // tag and wire | |
351 | n += proto.SizeVarint(uint64(s)) | |
352 | n += s | |
353 | case *Value_ListValue: | |
354 | s := proto.Size(x.ListValue) | |
355 | n += 1 // tag and wire | |
356 | n += proto.SizeVarint(uint64(s)) | |
357 | n += s | |
358 | case nil: | |
359 | default: | |
360 | panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) | |
361 | } | |
362 | return n | |
363 | 249 | } |
364 | 250 | |
365 | 251 | // `ListValue` is a wrapper around a repeated field of values. |
377 | 263 | func (m *ListValue) String() string { return proto.CompactTextString(m) } |
378 | 264 | func (*ListValue) ProtoMessage() {} |
379 | 265 | func (*ListValue) Descriptor() ([]byte, []int) { |
380 | return fileDescriptor_struct_3a5a94e0c7801b27, []int{2} | |
381 | } | |
266 | return fileDescriptor_df322afd6c9fb402, []int{2} | |
267 | } | |
268 | ||
382 | 269 | func (*ListValue) XXX_WellKnownType() string { return "ListValue" } |
270 | ||
383 | 271 | func (m *ListValue) XXX_Unmarshal(b []byte) error { |
384 | 272 | return xxx_messageInfo_ListValue.Unmarshal(m, b) |
385 | 273 | } |
386 | 274 | func (m *ListValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
387 | 275 | return xxx_messageInfo_ListValue.Marshal(b, m, deterministic) |
388 | 276 | } |
389 | func (dst *ListValue) XXX_Merge(src proto.Message) { | |
390 | xxx_messageInfo_ListValue.Merge(dst, src) | |
277 | func (m *ListValue) XXX_Merge(src proto.Message) { | |
278 | xxx_messageInfo_ListValue.Merge(m, src) | |
391 | 279 | } |
392 | 280 | func (m *ListValue) XXX_Size() int { |
393 | 281 | return xxx_messageInfo_ListValue.Size(m) |
406 | 294 | } |
407 | 295 | |
408 | 296 | func init() { |
297 | proto.RegisterEnum("google.protobuf.NullValue", NullValue_name, NullValue_value) | |
409 | 298 | proto.RegisterType((*Struct)(nil), "google.protobuf.Struct") |
410 | 299 | proto.RegisterMapType((map[string]*Value)(nil), "google.protobuf.Struct.FieldsEntry") |
411 | 300 | proto.RegisterType((*Value)(nil), "google.protobuf.Value") |
412 | 301 | proto.RegisterType((*ListValue)(nil), "google.protobuf.ListValue") |
413 | proto.RegisterEnum("google.protobuf.NullValue", NullValue_name, NullValue_value) | |
414 | } | |
415 | ||
416 | func init() { | |
417 | proto.RegisterFile("google/protobuf/struct.proto", fileDescriptor_struct_3a5a94e0c7801b27) | |
418 | } | |
419 | ||
420 | var fileDescriptor_struct_3a5a94e0c7801b27 = []byte{ | |
302 | } | |
303 | ||
304 | func init() { proto.RegisterFile("google/protobuf/struct.proto", fileDescriptor_df322afd6c9fb402) } | |
305 | ||
306 | var fileDescriptor_df322afd6c9fb402 = []byte{ | |
421 | 307 | // 417 bytes of a gzipped FileDescriptorProto |
422 | 308 | 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x92, 0x41, 0x8b, 0xd3, 0x40, |
423 | 309 | 0x14, 0xc7, 0x3b, 0xc9, 0x36, 0x98, 0x17, 0x59, 0x97, 0x11, 0xb4, 0xac, 0xa2, 0xa1, 0x7b, 0x09, |
0 | 0 | // Code generated by protoc-gen-go. DO NOT EDIT. |
1 | 1 | // source: google/protobuf/timestamp.proto |
2 | 2 | |
3 | package timestamp // import "github.com/golang/protobuf/ptypes/timestamp" | |
3 | package timestamp | |
4 | 4 | |
5 | import proto "github.com/golang/protobuf/proto" | |
6 | import fmt "fmt" | |
7 | import math "math" | |
5 | import ( | |
6 | fmt "fmt" | |
7 | proto "github.com/golang/protobuf/proto" | |
8 | math "math" | |
9 | ) | |
8 | 10 | |
9 | 11 | // Reference imports to suppress errors if they are not otherwise used. |
10 | 12 | var _ = proto.Marshal |
15 | 17 | // is compatible with the proto package it is being compiled against. |
16 | 18 | // A compilation error at this line likely means your copy of the |
17 | 19 | // proto package needs to be updated. |
18 | const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package | |
20 | const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package | |
19 | 21 | |
20 | 22 | // A Timestamp represents a point in time independent of any time zone |
21 | 23 | // or calendar, represented as seconds and fractions of seconds at |
80 | 82 | // {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional |
81 | 83 | // seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), |
82 | 84 | // are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone |
83 | // is required, though only UTC (as indicated by "Z") is presently supported. | |
85 | // is required. A proto3 JSON serializer should always use UTC (as indicated by | |
86 | // "Z") when printing the Timestamp type and a proto3 JSON parser should be | |
87 | // able to accept both UTC and other timezones (as indicated by an offset). | |
84 | 88 | // |
85 | 89 | // For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past |
86 | 90 | // 01:30 UTC on January 15, 2017. |
91 | 95 | // to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) |
92 | 96 | // with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one |
93 | 97 | // can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( |
94 | // http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime--) | |
95 | // to obtain a formatter capable of generating timestamps in this format. | |
98 | // http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime-- | |
99 | // ) to obtain a formatter capable of generating timestamps in this format. | |
96 | 100 | // |
97 | 101 | // |
98 | 102 | type Timestamp struct { |
114 | 118 | func (m *Timestamp) String() string { return proto.CompactTextString(m) } |
115 | 119 | func (*Timestamp) ProtoMessage() {} |
116 | 120 | func (*Timestamp) Descriptor() ([]byte, []int) { |
117 | return fileDescriptor_timestamp_b826e8e5fba671a8, []int{0} | |
121 | return fileDescriptor_292007bbfe81227e, []int{0} | |
118 | 122 | } |
123 | ||
119 | 124 | func (*Timestamp) XXX_WellKnownType() string { return "Timestamp" } |
125 | ||
120 | 126 | func (m *Timestamp) XXX_Unmarshal(b []byte) error { |
121 | 127 | return xxx_messageInfo_Timestamp.Unmarshal(m, b) |
122 | 128 | } |
123 | 129 | func (m *Timestamp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
124 | 130 | return xxx_messageInfo_Timestamp.Marshal(b, m, deterministic) |
125 | 131 | } |
126 | func (dst *Timestamp) XXX_Merge(src proto.Message) { | |
127 | xxx_messageInfo_Timestamp.Merge(dst, src) | |
132 | func (m *Timestamp) XXX_Merge(src proto.Message) { | |
133 | xxx_messageInfo_Timestamp.Merge(m, src) | |
128 | 134 | } |
129 | 135 | func (m *Timestamp) XXX_Size() int { |
130 | 136 | return xxx_messageInfo_Timestamp.Size(m) |
153 | 159 | proto.RegisterType((*Timestamp)(nil), "google.protobuf.Timestamp") |
154 | 160 | } |
155 | 161 | |
156 | func init() { | |
157 | proto.RegisterFile("google/protobuf/timestamp.proto", fileDescriptor_timestamp_b826e8e5fba671a8) | |
158 | } | |
162 | func init() { proto.RegisterFile("google/protobuf/timestamp.proto", fileDescriptor_292007bbfe81227e) } | |
159 | 163 | |
160 | var fileDescriptor_timestamp_b826e8e5fba671a8 = []byte{ | |
164 | var fileDescriptor_292007bbfe81227e = []byte{ | |
161 | 165 | // 191 bytes of a gzipped FileDescriptorProto |
162 | 166 | 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4f, 0xcf, 0xcf, 0x4f, |
163 | 167 | 0xcf, 0x49, 0xd5, 0x2f, 0x28, 0xca, 0x2f, 0xc9, 0x4f, 0x2a, 0x4d, 0xd3, 0x2f, 0xc9, 0xcc, 0x4d, |
102 | 102 | // {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional |
103 | 103 | // seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), |
104 | 104 | // are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone |
105 | // is required, though only UTC (as indicated by "Z") is presently supported. | |
105 | // is required. A proto3 JSON serializer should always use UTC (as indicated by | |
106 | // "Z") when printing the Timestamp type and a proto3 JSON parser should be | |
107 | // able to accept both UTC and other timezones (as indicated by an offset). | |
106 | 108 | // |
107 | 109 | // For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past |
108 | 110 | // 01:30 UTC on January 15, 2017. |
113 | 115 | // to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) |
114 | 116 | // with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one |
115 | 117 | // can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( |
116 | // http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime--) | |
117 | // to obtain a formatter capable of generating timestamps in this format. | |
118 | // http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime-- | |
119 | // ) to obtain a formatter capable of generating timestamps in this format. | |
118 | 120 | // |
119 | 121 | // |
120 | 122 | message Timestamp { |
110 | 110 | // TimestampProto converts the time.Time to a google.protobuf.Timestamp proto. |
111 | 111 | // It returns an error if the resulting Timestamp is invalid. |
112 | 112 | func TimestampProto(t time.Time) (*tspb.Timestamp, error) { |
113 | seconds := t.Unix() | |
114 | nanos := int32(t.Sub(time.Unix(seconds, 0))) | |
115 | 113 | ts := &tspb.Timestamp{ |
116 | Seconds: seconds, | |
117 | Nanos: nanos, | |
114 | Seconds: t.Unix(), | |
115 | Nanos: int32(t.Nanosecond()), | |
118 | 116 | } |
119 | 117 | if err := validateTimestamp(ts); err != nil { |
120 | 118 | return nil, err |
0 | 0 | // Code generated by protoc-gen-go. DO NOT EDIT. |
1 | 1 | // source: google/protobuf/wrappers.proto |
2 | 2 | |
3 | package wrappers // import "github.com/golang/protobuf/ptypes/wrappers" | |
4 | ||
5 | import proto "github.com/golang/protobuf/proto" | |
6 | import fmt "fmt" | |
7 | import math "math" | |
3 | package wrappers | |
4 | ||
5 | import ( | |
6 | fmt "fmt" | |
7 | proto "github.com/golang/protobuf/proto" | |
8 | math "math" | |
9 | ) | |
8 | 10 | |
9 | 11 | // Reference imports to suppress errors if they are not otherwise used. |
10 | 12 | var _ = proto.Marshal |
15 | 17 | // is compatible with the proto package it is being compiled against. |
16 | 18 | // A compilation error at this line likely means your copy of the |
17 | 19 | // proto package needs to be updated. |
18 | const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package | |
20 | const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package | |
19 | 21 | |
20 | 22 | // Wrapper message for `double`. |
21 | 23 | // |
32 | 34 | func (m *DoubleValue) String() string { return proto.CompactTextString(m) } |
33 | 35 | func (*DoubleValue) ProtoMessage() {} |
34 | 36 | func (*DoubleValue) Descriptor() ([]byte, []int) { |
35 | return fileDescriptor_wrappers_16c7c35c009f3253, []int{0} | |
36 | } | |
37 | return fileDescriptor_5377b62bda767935, []int{0} | |
38 | } | |
39 | ||
37 | 40 | func (*DoubleValue) XXX_WellKnownType() string { return "DoubleValue" } |
41 | ||
38 | 42 | func (m *DoubleValue) XXX_Unmarshal(b []byte) error { |
39 | 43 | return xxx_messageInfo_DoubleValue.Unmarshal(m, b) |
40 | 44 | } |
41 | 45 | func (m *DoubleValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
42 | 46 | return xxx_messageInfo_DoubleValue.Marshal(b, m, deterministic) |
43 | 47 | } |
44 | func (dst *DoubleValue) XXX_Merge(src proto.Message) { | |
45 | xxx_messageInfo_DoubleValue.Merge(dst, src) | |
48 | func (m *DoubleValue) XXX_Merge(src proto.Message) { | |
49 | xxx_messageInfo_DoubleValue.Merge(m, src) | |
46 | 50 | } |
47 | 51 | func (m *DoubleValue) XXX_Size() int { |
48 | 52 | return xxx_messageInfo_DoubleValue.Size(m) |
75 | 79 | func (m *FloatValue) String() string { return proto.CompactTextString(m) } |
76 | 80 | func (*FloatValue) ProtoMessage() {} |
77 | 81 | func (*FloatValue) Descriptor() ([]byte, []int) { |
78 | return fileDescriptor_wrappers_16c7c35c009f3253, []int{1} | |
79 | } | |
82 | return fileDescriptor_5377b62bda767935, []int{1} | |
83 | } | |
84 | ||
80 | 85 | func (*FloatValue) XXX_WellKnownType() string { return "FloatValue" } |
86 | ||
81 | 87 | func (m *FloatValue) XXX_Unmarshal(b []byte) error { |
82 | 88 | return xxx_messageInfo_FloatValue.Unmarshal(m, b) |
83 | 89 | } |
84 | 90 | func (m *FloatValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
85 | 91 | return xxx_messageInfo_FloatValue.Marshal(b, m, deterministic) |
86 | 92 | } |
87 | func (dst *FloatValue) XXX_Merge(src proto.Message) { | |
88 | xxx_messageInfo_FloatValue.Merge(dst, src) | |
93 | func (m *FloatValue) XXX_Merge(src proto.Message) { | |
94 | xxx_messageInfo_FloatValue.Merge(m, src) | |
89 | 95 | } |
90 | 96 | func (m *FloatValue) XXX_Size() int { |
91 | 97 | return xxx_messageInfo_FloatValue.Size(m) |
118 | 124 | func (m *Int64Value) String() string { return proto.CompactTextString(m) } |
119 | 125 | func (*Int64Value) ProtoMessage() {} |
120 | 126 | func (*Int64Value) Descriptor() ([]byte, []int) { |
121 | return fileDescriptor_wrappers_16c7c35c009f3253, []int{2} | |
122 | } | |
127 | return fileDescriptor_5377b62bda767935, []int{2} | |
128 | } | |
129 | ||
123 | 130 | func (*Int64Value) XXX_WellKnownType() string { return "Int64Value" } |
131 | ||
124 | 132 | func (m *Int64Value) XXX_Unmarshal(b []byte) error { |
125 | 133 | return xxx_messageInfo_Int64Value.Unmarshal(m, b) |
126 | 134 | } |
127 | 135 | func (m *Int64Value) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
128 | 136 | return xxx_messageInfo_Int64Value.Marshal(b, m, deterministic) |
129 | 137 | } |
130 | func (dst *Int64Value) XXX_Merge(src proto.Message) { | |
131 | xxx_messageInfo_Int64Value.Merge(dst, src) | |
138 | func (m *Int64Value) XXX_Merge(src proto.Message) { | |
139 | xxx_messageInfo_Int64Value.Merge(m, src) | |
132 | 140 | } |
133 | 141 | func (m *Int64Value) XXX_Size() int { |
134 | 142 | return xxx_messageInfo_Int64Value.Size(m) |
161 | 169 | func (m *UInt64Value) String() string { return proto.CompactTextString(m) } |
162 | 170 | func (*UInt64Value) ProtoMessage() {} |
163 | 171 | func (*UInt64Value) Descriptor() ([]byte, []int) { |
164 | return fileDescriptor_wrappers_16c7c35c009f3253, []int{3} | |
165 | } | |
172 | return fileDescriptor_5377b62bda767935, []int{3} | |
173 | } | |
174 | ||
166 | 175 | func (*UInt64Value) XXX_WellKnownType() string { return "UInt64Value" } |
176 | ||
167 | 177 | func (m *UInt64Value) XXX_Unmarshal(b []byte) error { |
168 | 178 | return xxx_messageInfo_UInt64Value.Unmarshal(m, b) |
169 | 179 | } |
170 | 180 | func (m *UInt64Value) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
171 | 181 | return xxx_messageInfo_UInt64Value.Marshal(b, m, deterministic) |
172 | 182 | } |
173 | func (dst *UInt64Value) XXX_Merge(src proto.Message) { | |
174 | xxx_messageInfo_UInt64Value.Merge(dst, src) | |
183 | func (m *UInt64Value) XXX_Merge(src proto.Message) { | |
184 | xxx_messageInfo_UInt64Value.Merge(m, src) | |
175 | 185 | } |
176 | 186 | func (m *UInt64Value) XXX_Size() int { |
177 | 187 | return xxx_messageInfo_UInt64Value.Size(m) |
204 | 214 | func (m *Int32Value) String() string { return proto.CompactTextString(m) } |
205 | 215 | func (*Int32Value) ProtoMessage() {} |
206 | 216 | func (*Int32Value) Descriptor() ([]byte, []int) { |
207 | return fileDescriptor_wrappers_16c7c35c009f3253, []int{4} | |
208 | } | |
217 | return fileDescriptor_5377b62bda767935, []int{4} | |
218 | } | |
219 | ||
209 | 220 | func (*Int32Value) XXX_WellKnownType() string { return "Int32Value" } |
221 | ||
210 | 222 | func (m *Int32Value) XXX_Unmarshal(b []byte) error { |
211 | 223 | return xxx_messageInfo_Int32Value.Unmarshal(m, b) |
212 | 224 | } |
213 | 225 | func (m *Int32Value) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
214 | 226 | return xxx_messageInfo_Int32Value.Marshal(b, m, deterministic) |
215 | 227 | } |
216 | func (dst *Int32Value) XXX_Merge(src proto.Message) { | |
217 | xxx_messageInfo_Int32Value.Merge(dst, src) | |
228 | func (m *Int32Value) XXX_Merge(src proto.Message) { | |
229 | xxx_messageInfo_Int32Value.Merge(m, src) | |
218 | 230 | } |
219 | 231 | func (m *Int32Value) XXX_Size() int { |
220 | 232 | return xxx_messageInfo_Int32Value.Size(m) |
247 | 259 | func (m *UInt32Value) String() string { return proto.CompactTextString(m) } |
248 | 260 | func (*UInt32Value) ProtoMessage() {} |
249 | 261 | func (*UInt32Value) Descriptor() ([]byte, []int) { |
250 | return fileDescriptor_wrappers_16c7c35c009f3253, []int{5} | |
251 | } | |
262 | return fileDescriptor_5377b62bda767935, []int{5} | |
263 | } | |
264 | ||
252 | 265 | func (*UInt32Value) XXX_WellKnownType() string { return "UInt32Value" } |
266 | ||
253 | 267 | func (m *UInt32Value) XXX_Unmarshal(b []byte) error { |
254 | 268 | return xxx_messageInfo_UInt32Value.Unmarshal(m, b) |
255 | 269 | } |
256 | 270 | func (m *UInt32Value) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
257 | 271 | return xxx_messageInfo_UInt32Value.Marshal(b, m, deterministic) |
258 | 272 | } |
259 | func (dst *UInt32Value) XXX_Merge(src proto.Message) { | |
260 | xxx_messageInfo_UInt32Value.Merge(dst, src) | |
273 | func (m *UInt32Value) XXX_Merge(src proto.Message) { | |
274 | xxx_messageInfo_UInt32Value.Merge(m, src) | |
261 | 275 | } |
262 | 276 | func (m *UInt32Value) XXX_Size() int { |
263 | 277 | return xxx_messageInfo_UInt32Value.Size(m) |
290 | 304 | func (m *BoolValue) String() string { return proto.CompactTextString(m) } |
291 | 305 | func (*BoolValue) ProtoMessage() {} |
292 | 306 | func (*BoolValue) Descriptor() ([]byte, []int) { |
293 | return fileDescriptor_wrappers_16c7c35c009f3253, []int{6} | |
294 | } | |
307 | return fileDescriptor_5377b62bda767935, []int{6} | |
308 | } | |
309 | ||
295 | 310 | func (*BoolValue) XXX_WellKnownType() string { return "BoolValue" } |
311 | ||
296 | 312 | func (m *BoolValue) XXX_Unmarshal(b []byte) error { |
297 | 313 | return xxx_messageInfo_BoolValue.Unmarshal(m, b) |
298 | 314 | } |
299 | 315 | func (m *BoolValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
300 | 316 | return xxx_messageInfo_BoolValue.Marshal(b, m, deterministic) |
301 | 317 | } |
302 | func (dst *BoolValue) XXX_Merge(src proto.Message) { | |
303 | xxx_messageInfo_BoolValue.Merge(dst, src) | |
318 | func (m *BoolValue) XXX_Merge(src proto.Message) { | |
319 | xxx_messageInfo_BoolValue.Merge(m, src) | |
304 | 320 | } |
305 | 321 | func (m *BoolValue) XXX_Size() int { |
306 | 322 | return xxx_messageInfo_BoolValue.Size(m) |
333 | 349 | func (m *StringValue) String() string { return proto.CompactTextString(m) } |
334 | 350 | func (*StringValue) ProtoMessage() {} |
335 | 351 | func (*StringValue) Descriptor() ([]byte, []int) { |
336 | return fileDescriptor_wrappers_16c7c35c009f3253, []int{7} | |
337 | } | |
352 | return fileDescriptor_5377b62bda767935, []int{7} | |
353 | } | |
354 | ||
338 | 355 | func (*StringValue) XXX_WellKnownType() string { return "StringValue" } |
356 | ||
339 | 357 | func (m *StringValue) XXX_Unmarshal(b []byte) error { |
340 | 358 | return xxx_messageInfo_StringValue.Unmarshal(m, b) |
341 | 359 | } |
342 | 360 | func (m *StringValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
343 | 361 | return xxx_messageInfo_StringValue.Marshal(b, m, deterministic) |
344 | 362 | } |
345 | func (dst *StringValue) XXX_Merge(src proto.Message) { | |
346 | xxx_messageInfo_StringValue.Merge(dst, src) | |
363 | func (m *StringValue) XXX_Merge(src proto.Message) { | |
364 | xxx_messageInfo_StringValue.Merge(m, src) | |
347 | 365 | } |
348 | 366 | func (m *StringValue) XXX_Size() int { |
349 | 367 | return xxx_messageInfo_StringValue.Size(m) |
376 | 394 | func (m *BytesValue) String() string { return proto.CompactTextString(m) } |
377 | 395 | func (*BytesValue) ProtoMessage() {} |
378 | 396 | func (*BytesValue) Descriptor() ([]byte, []int) { |
379 | return fileDescriptor_wrappers_16c7c35c009f3253, []int{8} | |
380 | } | |
397 | return fileDescriptor_5377b62bda767935, []int{8} | |
398 | } | |
399 | ||
381 | 400 | func (*BytesValue) XXX_WellKnownType() string { return "BytesValue" } |
401 | ||
382 | 402 | func (m *BytesValue) XXX_Unmarshal(b []byte) error { |
383 | 403 | return xxx_messageInfo_BytesValue.Unmarshal(m, b) |
384 | 404 | } |
385 | 405 | func (m *BytesValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
386 | 406 | return xxx_messageInfo_BytesValue.Marshal(b, m, deterministic) |
387 | 407 | } |
388 | func (dst *BytesValue) XXX_Merge(src proto.Message) { | |
389 | xxx_messageInfo_BytesValue.Merge(dst, src) | |
408 | func (m *BytesValue) XXX_Merge(src proto.Message) { | |
409 | xxx_messageInfo_BytesValue.Merge(m, src) | |
390 | 410 | } |
391 | 411 | func (m *BytesValue) XXX_Size() int { |
392 | 412 | return xxx_messageInfo_BytesValue.Size(m) |
416 | 436 | proto.RegisterType((*BytesValue)(nil), "google.protobuf.BytesValue") |
417 | 437 | } |
418 | 438 | |
419 | func init() { | |
420 | proto.RegisterFile("google/protobuf/wrappers.proto", fileDescriptor_wrappers_16c7c35c009f3253) | |
421 | } | |
422 | ||
423 | var fileDescriptor_wrappers_16c7c35c009f3253 = []byte{ | |
439 | func init() { proto.RegisterFile("google/protobuf/wrappers.proto", fileDescriptor_5377b62bda767935) } | |
440 | ||
441 | var fileDescriptor_5377b62bda767935 = []byte{ | |
424 | 442 | // 259 bytes of a gzipped FileDescriptorProto |
425 | 443 | 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4b, 0xcf, 0xcf, 0x4f, |
426 | 444 | 0xcf, 0x49, 0xd5, 0x2f, 0x28, 0xca, 0x2f, 0xc9, 0x4f, 0x2a, 0x4d, 0xd3, 0x2f, 0x2f, 0x4a, 0x2c, |