pax_global_header00006660000000000000000000000064127071270770014524gustar00rootroot0000000000000052 comment=c12348ce28de40eed0136aa2b644d0ee0650e56c golang-protobuf-extensions-1.0.1/000077500000000000000000000000001270712707700170255ustar00rootroot00000000000000golang-protobuf-extensions-1.0.1/.travis.yml000066400000000000000000000001351270712707700211350ustar00rootroot00000000000000language: go go: - 1.5 - 1.6 - tip script: make -f Makefile.TRAVIS golang-protobuf-extensions-1.0.1/LICENSE000066400000000000000000000261351270712707700200410ustar00rootroot00000000000000 Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "{}" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright {yyyy} {name of copyright owner} Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. golang-protobuf-extensions-1.0.1/Makefile.TRAVIS000066400000000000000000000002651270712707700214770ustar00rootroot00000000000000all: build cover test vet build: go build -v ./... cover: test $(MAKE) -C pbutil cover test: build go test -v ./... vet: build go vet -v ./... .PHONY: build cover test vet golang-protobuf-extensions-1.0.1/NOTICE000066400000000000000000000000641270712707700177310ustar00rootroot00000000000000Copyright 2012 Matt T. Proud (matt.proud@gmail.com) golang-protobuf-extensions-1.0.1/README.md000066400000000000000000000017031270712707700203050ustar00rootroot00000000000000# Overview This repository provides various Protocol Buffer extensions for the Go language (golang), namely support for record length-delimited message streaming. | Java | Go | | ------------------------------ | --------------------- | | MessageLite#parseDelimitedFrom | pbutil.ReadDelimited | | MessageLite#writeDelimitedTo | pbutil.WriteDelimited | Because [Code Review 9102043](https://codereview.appspot.com/9102043/) is destined to never be merged into mainline (i.e., never be promoted to formal [goprotobuf features](https://github.com/golang/protobuf)), this repository will live here in the wild. # Documentation We have [generated Go Doc documentation](http://godoc.org/github.com/matttproud/golang_protobuf_extensions/pbutil) here. # Testing [![Build Status](https://travis-ci.org/matttproud/golang_protobuf_extensions.png?branch=master)](https://travis-ci.org/matttproud/golang_protobuf_extensions) golang-protobuf-extensions-1.0.1/ext/000077500000000000000000000000001270712707700176255ustar00rootroot00000000000000golang-protobuf-extensions-1.0.1/ext/moved.go000066400000000000000000000001551270712707700212670ustar00rootroot00000000000000// Package ext moved to a new location: github.com/matttproud/golang_protobuf_extensions/pbutil. package ext golang-protobuf-extensions-1.0.1/pbtest/000077500000000000000000000000001270712707700203265ustar00rootroot00000000000000golang-protobuf-extensions-1.0.1/pbtest/deleted.go000066400000000000000000000002471270712707700222660ustar00rootroot00000000000000// Package pbtest is deleted for the time being, because upstream Protocol Buffer 3 may have rendered quick.Value-based blackbox generation impossible. package pbtest golang-protobuf-extensions-1.0.1/pbutil/000077500000000000000000000000001270712707700203245ustar00rootroot00000000000000golang-protobuf-extensions-1.0.1/pbutil/.gitignore000066400000000000000000000000121270712707700223050ustar00rootroot00000000000000cover.dat golang-protobuf-extensions-1.0.1/pbutil/Makefile000066400000000000000000000001541270712707700217640ustar00rootroot00000000000000all: cover: go test -cover -v -coverprofile=cover.dat ./... go tool cover -func cover.dat .PHONY: cover golang-protobuf-extensions-1.0.1/pbutil/all_test.go000066400000000000000000000150731270712707700224700ustar00rootroot00000000000000// Copyright 2013 Matt T. Proud // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package pbutil import ( "bytes" "testing" "github.com/golang/protobuf/proto" . "github.com/matttproud/golang_protobuf_extensions/testdata" ) func TestWriteDelimited(t *testing.T) { t.Parallel() for _, test := range []struct { msg proto.Message buf []byte n int err error }{ { msg: &Empty{}, n: 1, buf: []byte{0}, }, { msg: &GoEnum{Foo: FOO_FOO1.Enum()}, n: 3, buf: []byte{2, 8, 1}, }, { msg: &Strings{ StringField: proto.String(`This is my gigantic, unhappy string. It exceeds the encoding size of a single byte varint. We are using it to fuzz test the correctness of the header decoding mechanisms, which may prove problematic. I expect it may. Let's hope you enjoy testing as much as we do.`), }, n: 271, buf: []byte{141, 2, 10, 138, 2, 84, 104, 105, 115, 32, 105, 115, 32, 109, 121, 32, 103, 105, 103, 97, 110, 116, 105, 99, 44, 32, 117, 110, 104, 97, 112, 112, 121, 32, 115, 116, 114, 105, 110, 103, 46, 32, 32, 73, 116, 32, 101, 120, 99, 101, 101, 100, 115, 10, 116, 104, 101, 32, 101, 110, 99, 111, 100, 105, 110, 103, 32, 115, 105, 122, 101, 32, 111, 102, 32, 97, 32, 115, 105, 110, 103, 108, 101, 32, 98, 121, 116, 101, 32, 118, 97, 114, 105, 110, 116, 46, 32, 32, 87, 101, 32, 97, 114, 101, 32, 117, 115, 105, 110, 103, 32, 105, 116, 32, 116, 111, 32, 102, 117, 122, 122, 32, 116, 101, 115, 116, 32, 116, 104, 101, 10, 99, 111, 114, 114, 101, 99, 116, 110, 101, 115, 115, 32, 111, 102, 32, 116, 104, 101, 32, 104, 101, 97, 100, 101, 114, 32, 100, 101, 99, 111, 100, 105, 110, 103, 32, 109, 101, 99, 104, 97, 110, 105, 115, 109, 115, 44, 32, 119, 104, 105, 99, 104, 32, 109, 97, 121, 32, 112, 114, 111, 118, 101, 32, 112, 114, 111, 98, 108, 101, 109, 97, 116, 105, 99, 46, 10, 73, 32, 101, 120, 112, 101, 99, 116, 32, 105, 116, 32, 109, 97, 121, 46, 32, 32, 76, 101, 116, 39, 115, 32, 104, 111, 112, 101, 32, 121, 111, 117, 32, 101, 110, 106, 111, 121, 32, 116, 101, 115, 116, 105, 110, 103, 32, 97, 115, 32, 109, 117, 99, 104, 32, 97, 115, 32, 119, 101, 32, 100, 111, 46}, }, } { var buf bytes.Buffer if n, err := WriteDelimited(&buf, test.msg); n != test.n || err != test.err { t.Fatalf("WriteDelimited(buf, %#v) = %v, %v; want %v, %v", test.msg, n, err, test.n, test.err) } if out := buf.Bytes(); !bytes.Equal(out, test.buf) { t.Fatalf("WriteDelimited(buf, %#v); buf = %v; want %v", test.msg, out, test.buf) } } } func TestReadDelimited(t *testing.T) { t.Parallel() for _, test := range []struct { buf []byte msg proto.Message n int err error }{ { buf: []byte{0}, msg: &Empty{}, n: 1, }, { n: 3, buf: []byte{2, 8, 1}, msg: &GoEnum{Foo: FOO_FOO1.Enum()}, }, { buf: []byte{141, 2, 10, 138, 2, 84, 104, 105, 115, 32, 105, 115, 32, 109, 121, 32, 103, 105, 103, 97, 110, 116, 105, 99, 44, 32, 117, 110, 104, 97, 112, 112, 121, 32, 115, 116, 114, 105, 110, 103, 46, 32, 32, 73, 116, 32, 101, 120, 99, 101, 101, 100, 115, 10, 116, 104, 101, 32, 101, 110, 99, 111, 100, 105, 110, 103, 32, 115, 105, 122, 101, 32, 111, 102, 32, 97, 32, 115, 105, 110, 103, 108, 101, 32, 98, 121, 116, 101, 32, 118, 97, 114, 105, 110, 116, 46, 32, 32, 87, 101, 32, 97, 114, 101, 32, 117, 115, 105, 110, 103, 32, 105, 116, 32, 116, 111, 32, 102, 117, 122, 122, 32, 116, 101, 115, 116, 32, 116, 104, 101, 10, 99, 111, 114, 114, 101, 99, 116, 110, 101, 115, 115, 32, 111, 102, 32, 116, 104, 101, 32, 104, 101, 97, 100, 101, 114, 32, 100, 101, 99, 111, 100, 105, 110, 103, 32, 109, 101, 99, 104, 97, 110, 105, 115, 109, 115, 44, 32, 119, 104, 105, 99, 104, 32, 109, 97, 121, 32, 112, 114, 111, 118, 101, 32, 112, 114, 111, 98, 108, 101, 109, 97, 116, 105, 99, 46, 10, 73, 32, 101, 120, 112, 101, 99, 116, 32, 105, 116, 32, 109, 97, 121, 46, 32, 32, 76, 101, 116, 39, 115, 32, 104, 111, 112, 101, 32, 121, 111, 117, 32, 101, 110, 106, 111, 121, 32, 116, 101, 115, 116, 105, 110, 103, 32, 97, 115, 32, 109, 117, 99, 104, 32, 97, 115, 32, 119, 101, 32, 100, 111, 46}, msg: &Strings{ StringField: proto.String(`This is my gigantic, unhappy string. It exceeds the encoding size of a single byte varint. We are using it to fuzz test the correctness of the header decoding mechanisms, which may prove problematic. I expect it may. Let's hope you enjoy testing as much as we do.`), }, n: 271, }, } { msg := proto.Clone(test.msg) msg.Reset() if n, err := ReadDelimited(bytes.NewBuffer(test.buf), msg); n != test.n || err != test.err { t.Fatalf("ReadDelimited(%v, msg) = %v, %v; want %v, %v", test.buf, n, err, test.n, test.err) } if !proto.Equal(msg, test.msg) { t.Fatalf("ReadDelimited(%v, msg); msg = %v; want %v", test.buf, msg, test.msg) } } } func TestEndToEndValid(t *testing.T) { t.Parallel() for _, test := range [][]proto.Message{ {&Empty{}}, {&GoEnum{Foo: FOO_FOO1.Enum()}, &Empty{}, &GoEnum{Foo: FOO_FOO1.Enum()}}, {&GoEnum{Foo: FOO_FOO1.Enum()}}, {&Strings{ StringField: proto.String(`This is my gigantic, unhappy string. It exceeds the encoding size of a single byte varint. We are using it to fuzz test the correctness of the header decoding mechanisms, which may prove problematic. I expect it may. Let's hope you enjoy testing as much as we do.`), }}, } { var buf bytes.Buffer var written int for i, msg := range test { n, err := WriteDelimited(&buf, msg) if err != nil { // Assumption: TestReadDelimited and TestWriteDelimited are sufficient // and inputs for this test are explicitly exercised there. t.Fatalf("WriteDelimited(buf, %v[%d]) = ?, %v; wanted ?, nil", test, i, err) } written += n } var read int for i, msg := range test { out := proto.Clone(msg) out.Reset() n, _ := ReadDelimited(&buf, out) // Decide to do EOF checking? read += n if !proto.Equal(out, msg) { t.Fatalf("out = %v; want %v[%d] = %#v", out, test, i, msg) } } if read != written { t.Fatalf("%v read = %d; want %d", test, read, written) } } } golang-protobuf-extensions-1.0.1/pbutil/decode.go000066400000000000000000000054241270712707700221030ustar00rootroot00000000000000// Copyright 2013 Matt T. Proud // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package pbutil import ( "encoding/binary" "errors" "io" "github.com/golang/protobuf/proto" ) var errInvalidVarint = errors.New("invalid varint32 encountered") // ReadDelimited decodes a message from the provided length-delimited stream, // where the length is encoded as 32-bit varint prefix to the message body. // It returns the total number of bytes read and any applicable error. This is // roughly equivalent to the companion Java API's // MessageLite#parseDelimitedFrom. As per the reader contract, this function // calls r.Read repeatedly as required until exactly one message including its // prefix is read and decoded (or an error has occurred). The function never // reads more bytes from the stream than required. The function never returns // an error if a message has been read and decoded correctly, even if the end // of the stream has been reached in doing so. In that case, any subsequent // calls return (0, io.EOF). func ReadDelimited(r io.Reader, m proto.Message) (n int, err error) { // Per AbstractParser#parsePartialDelimitedFrom with // CodedInputStream#readRawVarint32. var headerBuf [binary.MaxVarintLen32]byte var bytesRead, varIntBytes int var messageLength uint64 for varIntBytes == 0 { // i.e. no varint has been decoded yet. if bytesRead >= len(headerBuf) { return bytesRead, errInvalidVarint } // We have to read byte by byte here to avoid reading more bytes // than required. Each read byte is appended to what we have // read before. newBytesRead, err := r.Read(headerBuf[bytesRead : bytesRead+1]) if newBytesRead == 0 { if err != nil { return bytesRead, err } // A Reader should not return (0, nil), but if it does, // it should be treated as no-op (according to the // Reader contract). So let's go on... continue } bytesRead += newBytesRead // Now present everything read so far to the varint decoder and // see if a varint can be decoded already. messageLength, varIntBytes = proto.DecodeVarint(headerBuf[:bytesRead]) } messageBuf := make([]byte, messageLength) newBytesRead, err := io.ReadFull(r, messageBuf) bytesRead += newBytesRead if err != nil { return bytesRead, err } return bytesRead, proto.Unmarshal(messageBuf, m) } golang-protobuf-extensions-1.0.1/pbutil/decode_test.go000066400000000000000000000060741270712707700231440ustar00rootroot00000000000000// Copyright 2016 Matt T. Proud // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package pbutil import ( "bytes" "io" "testing" "testing/iotest" ) func TestReadDelimitedIllegalVarint(t *testing.T) { t.Parallel() var tests = []struct { in []byte n int err error }{ { in: []byte{255, 255, 255, 255, 255}, n: 5, err: errInvalidVarint, }, { in: []byte{255, 255, 255, 255, 255, 255}, n: 5, err: errInvalidVarint, }, } for _, test := range tests { n, err := ReadDelimited(bytes.NewReader(test.in), nil) if got, want := n, test.n; got != want { t.Errorf("ReadDelimited(%#v, nil) = %#v, ?; want = %v#, ?", test.in, got, want) } if got, want := err, test.err; got != want { t.Errorf("ReadDelimited(%#v, nil) = ?, %#v; want = ?, %#v", test.in, got, want) } } } func TestReadDelimitedPrematureHeader(t *testing.T) { t.Parallel() var data = []byte{128, 5} // 256 + 256 + 128 n, err := ReadDelimited(bytes.NewReader(data[0:1]), nil) if got, want := n, 1; got != want { t.Errorf("ReadDelimited(%#v, nil) = %#v, ?; want = %v#, ?", data[0:1], got, want) } if got, want := err, io.EOF; got != want { t.Errorf("ReadDelimited(%#v, nil) = ?, %#v; want = ?, %#v", data[0:1], got, want) } } func TestReadDelimitedPrematureBody(t *testing.T) { t.Parallel() var data = []byte{128, 5, 0, 0, 0} // 256 + 256 + 128 n, err := ReadDelimited(bytes.NewReader(data[:]), nil) if got, want := n, 5; got != want { t.Errorf("ReadDelimited(%#v, nil) = %#v, ?; want = %v#, ?", data, got, want) } if got, want := err, io.ErrUnexpectedEOF; got != want { t.Errorf("ReadDelimited(%#v, nil) = ?, %#v; want = ?, %#v", data, got, want) } } func TestReadDelimitedPrematureHeaderIncremental(t *testing.T) { t.Parallel() var data = []byte{128, 5} // 256 + 256 + 128 n, err := ReadDelimited(iotest.OneByteReader(bytes.NewReader(data[0:1])), nil) if got, want := n, 1; got != want { t.Errorf("ReadDelimited(%#v, nil) = %#v, ?; want = %v#, ?", data[0:1], got, want) } if got, want := err, io.EOF; got != want { t.Errorf("ReadDelimited(%#v, nil) = ?, %#v; want = ?, %#v", data[0:1], got, want) } } func TestReadDelimitedPrematureBodyIncremental(t *testing.T) { t.Parallel() var data = []byte{128, 5, 0, 0, 0} // 256 + 256 + 128 n, err := ReadDelimited(iotest.OneByteReader(bytes.NewReader(data[:])), nil) if got, want := n, 5; got != want { t.Errorf("ReadDelimited(%#v, nil) = %#v, ?; want = %v#, ?", data, got, want) } if got, want := err, io.ErrUnexpectedEOF; got != want { t.Errorf("ReadDelimited(%#v, nil) = ?, %#v; want = ?, %#v", data, got, want) } } golang-protobuf-extensions-1.0.1/pbutil/doc.go000066400000000000000000000012541270712707700214220ustar00rootroot00000000000000// Copyright 2013 Matt T. Proud // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // Package pbutil provides record length-delimited Protocol Buffer streaming. package pbutil golang-protobuf-extensions-1.0.1/pbutil/encode.go000066400000000000000000000027461270712707700221210ustar00rootroot00000000000000// Copyright 2013 Matt T. Proud // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package pbutil import ( "encoding/binary" "io" "github.com/golang/protobuf/proto" ) // WriteDelimited encodes and dumps a message to the provided writer prefixed // with a 32-bit varint indicating the length of the encoded message, producing // a length-delimited record stream, which can be used to chain together // encoded messages of the same type together in a file. It returns the total // number of bytes written and any applicable error. This is roughly // equivalent to the companion Java API's MessageLite#writeDelimitedTo. func WriteDelimited(w io.Writer, m proto.Message) (n int, err error) { buffer, err := proto.Marshal(m) if err != nil { return 0, err } var buf [binary.MaxVarintLen32]byte encodedLength := binary.PutUvarint(buf[:], uint64(len(buffer))) sync, err := w.Write(buf[:encodedLength]) if err != nil { return sync, err } n, err = w.Write(buffer) return n + sync, err } golang-protobuf-extensions-1.0.1/pbutil/encode_test.go000066400000000000000000000036401270712707700231520ustar00rootroot00000000000000// Copyright 2016 Matt T. Proud // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package pbutil import ( "bytes" "errors" "testing" "github.com/golang/protobuf/proto" ) var errMarshal = errors.New("pbutil: can't marshal") type cantMarshal struct{ proto.Message } func (cantMarshal) Marshal() ([]byte, error) { return nil, errMarshal } var _ proto.Message = cantMarshal{} func TestWriteDelimitedMarshalErr(t *testing.T) { t.Parallel() var data cantMarshal var buf bytes.Buffer n, err := WriteDelimited(&buf, data) if got, want := n, 0; got != want { t.Errorf("WriteDelimited(buf, %#v) = %#v, ?; want = %v#, ?", data, got, want) } if got, want := err, errMarshal; got != want { t.Errorf("WriteDelimited(buf, %#v) = ?, %#v; want = ?, %#v", data, got, want) } } type canMarshal struct{ proto.Message } func (canMarshal) Marshal() ([]byte, error) { return []byte{0, 1, 2, 3, 4, 5}, nil } var errWrite = errors.New("pbutil: can't write") type cantWrite struct{} func (cantWrite) Write([]byte) (int, error) { return 0, errWrite } func TestWriteDelimitedWriteErr(t *testing.T) { t.Parallel() var data canMarshal var buf cantWrite n, err := WriteDelimited(buf, data) if got, want := n, 0; got != want { t.Errorf("WriteDelimited(buf, %#v) = %#v, ?; want = %v#, ?", data, got, want) } if got, want := err, errWrite; got != want { t.Errorf("WriteDelimited(buf, %#v) = ?, %#v; want = ?, %#v", data, got, want) } } golang-protobuf-extensions-1.0.1/testdata/000077500000000000000000000000001270712707700206365ustar00rootroot00000000000000golang-protobuf-extensions-1.0.1/testdata/README.THIRD_PARTY000066400000000000000000000002171270712707700233460ustar00rootroot00000000000000test.pb.go and test.proto are third-party data. SOURCE: https://github.com/golang/protobuf REVISION: bf531ff1a004f24ee53329dfd5ce0b41bfdc17df golang-protobuf-extensions-1.0.1/testdata/test.pb.go000066400000000000000000004256571270712707700225670ustar00rootroot00000000000000// Code generated by protoc-gen-go. // source: test.proto // DO NOT EDIT! /* Package testdata is a generated protocol buffer package. It is generated from these files: test.proto It has these top-level messages: GoEnum GoTestField GoTest GoSkipTest NonPackedTest PackedTest MaxTag OldMessage NewMessage InnerMessage OtherMessage RequiredInnerMessage MyMessage Ext ComplexExtension DefaultsMessage MyMessageSet Empty MessageList Strings Defaults SubDefaults RepeatedEnum MoreRepeated GroupOld GroupNew FloatingPoint MessageWithMap Oneof Communique */ package testdata import proto "github.com/golang/protobuf/proto" import fmt "fmt" import math "math" // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal var _ = fmt.Errorf var _ = math.Inf // This is a compile-time assertion to ensure that this generated file // is compatible with the proto package it is being compiled against. const _ = proto.ProtoPackageIsVersion1 type FOO int32 const ( FOO_FOO1 FOO = 1 ) var FOO_name = map[int32]string{ 1: "FOO1", } var FOO_value = map[string]int32{ "FOO1": 1, } func (x FOO) Enum() *FOO { p := new(FOO) *p = x return p } func (x FOO) String() string { return proto.EnumName(FOO_name, int32(x)) } func (x *FOO) UnmarshalJSON(data []byte) error { value, err := proto.UnmarshalJSONEnum(FOO_value, data, "FOO") if err != nil { return err } *x = FOO(value) return nil } func (FOO) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{0} } // An enum, for completeness. type GoTest_KIND int32 const ( GoTest_VOID GoTest_KIND = 0 // Basic types GoTest_BOOL GoTest_KIND = 1 GoTest_BYTES GoTest_KIND = 2 GoTest_FINGERPRINT GoTest_KIND = 3 GoTest_FLOAT GoTest_KIND = 4 GoTest_INT GoTest_KIND = 5 GoTest_STRING GoTest_KIND = 6 GoTest_TIME GoTest_KIND = 7 // Groupings GoTest_TUPLE GoTest_KIND = 8 GoTest_ARRAY GoTest_KIND = 9 GoTest_MAP GoTest_KIND = 10 // Table types GoTest_TABLE GoTest_KIND = 11 // Functions GoTest_FUNCTION GoTest_KIND = 12 ) var GoTest_KIND_name = map[int32]string{ 0: "VOID", 1: "BOOL", 2: "BYTES", 3: "FINGERPRINT", 4: "FLOAT", 5: "INT", 6: "STRING", 7: "TIME", 8: "TUPLE", 9: "ARRAY", 10: "MAP", 11: "TABLE", 12: "FUNCTION", } var GoTest_KIND_value = map[string]int32{ "VOID": 0, "BOOL": 1, "BYTES": 2, "FINGERPRINT": 3, "FLOAT": 4, "INT": 5, "STRING": 6, "TIME": 7, "TUPLE": 8, "ARRAY": 9, "MAP": 10, "TABLE": 11, "FUNCTION": 12, } func (x GoTest_KIND) Enum() *GoTest_KIND { p := new(GoTest_KIND) *p = x return p } func (x GoTest_KIND) String() string { return proto.EnumName(GoTest_KIND_name, int32(x)) } func (x *GoTest_KIND) UnmarshalJSON(data []byte) error { value, err := proto.UnmarshalJSONEnum(GoTest_KIND_value, data, "GoTest_KIND") if err != nil { return err } *x = GoTest_KIND(value) return nil } func (GoTest_KIND) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{2, 0} } type MyMessage_Color int32 const ( MyMessage_RED MyMessage_Color = 0 MyMessage_GREEN MyMessage_Color = 1 MyMessage_BLUE MyMessage_Color = 2 ) var MyMessage_Color_name = map[int32]string{ 0: "RED", 1: "GREEN", 2: "BLUE", } var MyMessage_Color_value = map[string]int32{ "RED": 0, "GREEN": 1, "BLUE": 2, } func (x MyMessage_Color) Enum() *MyMessage_Color { p := new(MyMessage_Color) *p = x return p } func (x MyMessage_Color) String() string { return proto.EnumName(MyMessage_Color_name, int32(x)) } func (x *MyMessage_Color) UnmarshalJSON(data []byte) error { value, err := proto.UnmarshalJSONEnum(MyMessage_Color_value, data, "MyMessage_Color") if err != nil { return err } *x = MyMessage_Color(value) return nil } func (MyMessage_Color) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{12, 0} } type DefaultsMessage_DefaultsEnum int32 const ( DefaultsMessage_ZERO DefaultsMessage_DefaultsEnum = 0 DefaultsMessage_ONE DefaultsMessage_DefaultsEnum = 1 DefaultsMessage_TWO DefaultsMessage_DefaultsEnum = 2 ) var DefaultsMessage_DefaultsEnum_name = map[int32]string{ 0: "ZERO", 1: "ONE", 2: "TWO", } var DefaultsMessage_DefaultsEnum_value = map[string]int32{ "ZERO": 0, "ONE": 1, "TWO": 2, } func (x DefaultsMessage_DefaultsEnum) Enum() *DefaultsMessage_DefaultsEnum { p := new(DefaultsMessage_DefaultsEnum) *p = x return p } func (x DefaultsMessage_DefaultsEnum) String() string { return proto.EnumName(DefaultsMessage_DefaultsEnum_name, int32(x)) } func (x *DefaultsMessage_DefaultsEnum) UnmarshalJSON(data []byte) error { value, err := proto.UnmarshalJSONEnum(DefaultsMessage_DefaultsEnum_value, data, "DefaultsMessage_DefaultsEnum") if err != nil { return err } *x = DefaultsMessage_DefaultsEnum(value) return nil } func (DefaultsMessage_DefaultsEnum) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{15, 0} } type Defaults_Color int32 const ( Defaults_RED Defaults_Color = 0 Defaults_GREEN Defaults_Color = 1 Defaults_BLUE Defaults_Color = 2 ) var Defaults_Color_name = map[int32]string{ 0: "RED", 1: "GREEN", 2: "BLUE", } var Defaults_Color_value = map[string]int32{ "RED": 0, "GREEN": 1, "BLUE": 2, } func (x Defaults_Color) Enum() *Defaults_Color { p := new(Defaults_Color) *p = x return p } func (x Defaults_Color) String() string { return proto.EnumName(Defaults_Color_name, int32(x)) } func (x *Defaults_Color) UnmarshalJSON(data []byte) error { value, err := proto.UnmarshalJSONEnum(Defaults_Color_value, data, "Defaults_Color") if err != nil { return err } *x = Defaults_Color(value) return nil } func (Defaults_Color) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{20, 0} } type RepeatedEnum_Color int32 const ( RepeatedEnum_RED RepeatedEnum_Color = 1 ) var RepeatedEnum_Color_name = map[int32]string{ 1: "RED", } var RepeatedEnum_Color_value = map[string]int32{ "RED": 1, } func (x RepeatedEnum_Color) Enum() *RepeatedEnum_Color { p := new(RepeatedEnum_Color) *p = x return p } func (x RepeatedEnum_Color) String() string { return proto.EnumName(RepeatedEnum_Color_name, int32(x)) } func (x *RepeatedEnum_Color) UnmarshalJSON(data []byte) error { value, err := proto.UnmarshalJSONEnum(RepeatedEnum_Color_value, data, "RepeatedEnum_Color") if err != nil { return err } *x = RepeatedEnum_Color(value) return nil } func (RepeatedEnum_Color) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{22, 0} } type GoEnum struct { Foo *FOO `protobuf:"varint,1,req,name=foo,enum=testdata.FOO" json:"foo,omitempty"` XXX_unrecognized []byte `json:"-"` } func (m *GoEnum) Reset() { *m = GoEnum{} } func (m *GoEnum) String() string { return proto.CompactTextString(m) } func (*GoEnum) ProtoMessage() {} func (*GoEnum) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} } func (m *GoEnum) GetFoo() FOO { if m != nil && m.Foo != nil { return *m.Foo } return FOO_FOO1 } type GoTestField struct { Label *string `protobuf:"bytes,1,req,name=Label,json=label" json:"Label,omitempty"` Type *string `protobuf:"bytes,2,req,name=Type,json=type" json:"Type,omitempty"` XXX_unrecognized []byte `json:"-"` } func (m *GoTestField) Reset() { *m = GoTestField{} } func (m *GoTestField) String() string { return proto.CompactTextString(m) } func (*GoTestField) ProtoMessage() {} func (*GoTestField) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} } func (m *GoTestField) GetLabel() string { if m != nil && m.Label != nil { return *m.Label } return "" } func (m *GoTestField) GetType() string { if m != nil && m.Type != nil { return *m.Type } return "" } type GoTest struct { // Some typical parameters Kind *GoTest_KIND `protobuf:"varint,1,req,name=Kind,json=kind,enum=testdata.GoTest_KIND" json:"Kind,omitempty"` Table *string `protobuf:"bytes,2,opt,name=Table,json=table" json:"Table,omitempty"` Param *int32 `protobuf:"varint,3,opt,name=Param,json=param" json:"Param,omitempty"` // Required, repeated and optional foreign fields. RequiredField *GoTestField `protobuf:"bytes,4,req,name=RequiredField,json=requiredField" json:"RequiredField,omitempty"` RepeatedField []*GoTestField `protobuf:"bytes,5,rep,name=RepeatedField,json=repeatedField" json:"RepeatedField,omitempty"` OptionalField *GoTestField `protobuf:"bytes,6,opt,name=OptionalField,json=optionalField" json:"OptionalField,omitempty"` // Required fields of all basic types F_BoolRequired *bool `protobuf:"varint,10,req,name=F_Bool_required,json=fBoolRequired" json:"F_Bool_required,omitempty"` F_Int32Required *int32 `protobuf:"varint,11,req,name=F_Int32_required,json=fInt32Required" json:"F_Int32_required,omitempty"` F_Int64Required *int64 `protobuf:"varint,12,req,name=F_Int64_required,json=fInt64Required" json:"F_Int64_required,omitempty"` F_Fixed32Required *uint32 `protobuf:"fixed32,13,req,name=F_Fixed32_required,json=fFixed32Required" json:"F_Fixed32_required,omitempty"` F_Fixed64Required *uint64 `protobuf:"fixed64,14,req,name=F_Fixed64_required,json=fFixed64Required" json:"F_Fixed64_required,omitempty"` F_Uint32Required *uint32 `protobuf:"varint,15,req,name=F_Uint32_required,json=fUint32Required" json:"F_Uint32_required,omitempty"` F_Uint64Required *uint64 `protobuf:"varint,16,req,name=F_Uint64_required,json=fUint64Required" json:"F_Uint64_required,omitempty"` F_FloatRequired *float32 `protobuf:"fixed32,17,req,name=F_Float_required,json=fFloatRequired" json:"F_Float_required,omitempty"` F_DoubleRequired *float64 `protobuf:"fixed64,18,req,name=F_Double_required,json=fDoubleRequired" json:"F_Double_required,omitempty"` F_StringRequired *string `protobuf:"bytes,19,req,name=F_String_required,json=fStringRequired" json:"F_String_required,omitempty"` F_BytesRequired []byte `protobuf:"bytes,101,req,name=F_Bytes_required,json=fBytesRequired" json:"F_Bytes_required,omitempty"` F_Sint32Required *int32 `protobuf:"zigzag32,102,req,name=F_Sint32_required,json=fSint32Required" json:"F_Sint32_required,omitempty"` F_Sint64Required *int64 `protobuf:"zigzag64,103,req,name=F_Sint64_required,json=fSint64Required" json:"F_Sint64_required,omitempty"` // Repeated fields of all basic types F_BoolRepeated []bool `protobuf:"varint,20,rep,name=F_Bool_repeated,json=fBoolRepeated" json:"F_Bool_repeated,omitempty"` F_Int32Repeated []int32 `protobuf:"varint,21,rep,name=F_Int32_repeated,json=fInt32Repeated" json:"F_Int32_repeated,omitempty"` F_Int64Repeated []int64 `protobuf:"varint,22,rep,name=F_Int64_repeated,json=fInt64Repeated" json:"F_Int64_repeated,omitempty"` F_Fixed32Repeated []uint32 `protobuf:"fixed32,23,rep,name=F_Fixed32_repeated,json=fFixed32Repeated" json:"F_Fixed32_repeated,omitempty"` F_Fixed64Repeated []uint64 `protobuf:"fixed64,24,rep,name=F_Fixed64_repeated,json=fFixed64Repeated" json:"F_Fixed64_repeated,omitempty"` F_Uint32Repeated []uint32 `protobuf:"varint,25,rep,name=F_Uint32_repeated,json=fUint32Repeated" json:"F_Uint32_repeated,omitempty"` F_Uint64Repeated []uint64 `protobuf:"varint,26,rep,name=F_Uint64_repeated,json=fUint64Repeated" json:"F_Uint64_repeated,omitempty"` F_FloatRepeated []float32 `protobuf:"fixed32,27,rep,name=F_Float_repeated,json=fFloatRepeated" json:"F_Float_repeated,omitempty"` F_DoubleRepeated []float64 `protobuf:"fixed64,28,rep,name=F_Double_repeated,json=fDoubleRepeated" json:"F_Double_repeated,omitempty"` F_StringRepeated []string `protobuf:"bytes,29,rep,name=F_String_repeated,json=fStringRepeated" json:"F_String_repeated,omitempty"` F_BytesRepeated [][]byte `protobuf:"bytes,201,rep,name=F_Bytes_repeated,json=fBytesRepeated" json:"F_Bytes_repeated,omitempty"` F_Sint32Repeated []int32 `protobuf:"zigzag32,202,rep,name=F_Sint32_repeated,json=fSint32Repeated" json:"F_Sint32_repeated,omitempty"` F_Sint64Repeated []int64 `protobuf:"zigzag64,203,rep,name=F_Sint64_repeated,json=fSint64Repeated" json:"F_Sint64_repeated,omitempty"` // Optional fields of all basic types F_BoolOptional *bool `protobuf:"varint,30,opt,name=F_Bool_optional,json=fBoolOptional" json:"F_Bool_optional,omitempty"` F_Int32Optional *int32 `protobuf:"varint,31,opt,name=F_Int32_optional,json=fInt32Optional" json:"F_Int32_optional,omitempty"` F_Int64Optional *int64 `protobuf:"varint,32,opt,name=F_Int64_optional,json=fInt64Optional" json:"F_Int64_optional,omitempty"` F_Fixed32Optional *uint32 `protobuf:"fixed32,33,opt,name=F_Fixed32_optional,json=fFixed32Optional" json:"F_Fixed32_optional,omitempty"` F_Fixed64Optional *uint64 `protobuf:"fixed64,34,opt,name=F_Fixed64_optional,json=fFixed64Optional" json:"F_Fixed64_optional,omitempty"` F_Uint32Optional *uint32 `protobuf:"varint,35,opt,name=F_Uint32_optional,json=fUint32Optional" json:"F_Uint32_optional,omitempty"` F_Uint64Optional *uint64 `protobuf:"varint,36,opt,name=F_Uint64_optional,json=fUint64Optional" json:"F_Uint64_optional,omitempty"` F_FloatOptional *float32 `protobuf:"fixed32,37,opt,name=F_Float_optional,json=fFloatOptional" json:"F_Float_optional,omitempty"` F_DoubleOptional *float64 `protobuf:"fixed64,38,opt,name=F_Double_optional,json=fDoubleOptional" json:"F_Double_optional,omitempty"` F_StringOptional *string `protobuf:"bytes,39,opt,name=F_String_optional,json=fStringOptional" json:"F_String_optional,omitempty"` F_BytesOptional []byte `protobuf:"bytes,301,opt,name=F_Bytes_optional,json=fBytesOptional" json:"F_Bytes_optional,omitempty"` F_Sint32Optional *int32 `protobuf:"zigzag32,302,opt,name=F_Sint32_optional,json=fSint32Optional" json:"F_Sint32_optional,omitempty"` F_Sint64Optional *int64 `protobuf:"zigzag64,303,opt,name=F_Sint64_optional,json=fSint64Optional" json:"F_Sint64_optional,omitempty"` // Default-valued fields of all basic types F_BoolDefaulted *bool `protobuf:"varint,40,opt,name=F_Bool_defaulted,json=fBoolDefaulted,def=1" json:"F_Bool_defaulted,omitempty"` F_Int32Defaulted *int32 `protobuf:"varint,41,opt,name=F_Int32_defaulted,json=fInt32Defaulted,def=32" json:"F_Int32_defaulted,omitempty"` F_Int64Defaulted *int64 `protobuf:"varint,42,opt,name=F_Int64_defaulted,json=fInt64Defaulted,def=64" json:"F_Int64_defaulted,omitempty"` F_Fixed32Defaulted *uint32 `protobuf:"fixed32,43,opt,name=F_Fixed32_defaulted,json=fFixed32Defaulted,def=320" json:"F_Fixed32_defaulted,omitempty"` F_Fixed64Defaulted *uint64 `protobuf:"fixed64,44,opt,name=F_Fixed64_defaulted,json=fFixed64Defaulted,def=640" json:"F_Fixed64_defaulted,omitempty"` F_Uint32Defaulted *uint32 `protobuf:"varint,45,opt,name=F_Uint32_defaulted,json=fUint32Defaulted,def=3200" json:"F_Uint32_defaulted,omitempty"` F_Uint64Defaulted *uint64 `protobuf:"varint,46,opt,name=F_Uint64_defaulted,json=fUint64Defaulted,def=6400" json:"F_Uint64_defaulted,omitempty"` F_FloatDefaulted *float32 `protobuf:"fixed32,47,opt,name=F_Float_defaulted,json=fFloatDefaulted,def=314159" json:"F_Float_defaulted,omitempty"` F_DoubleDefaulted *float64 `protobuf:"fixed64,48,opt,name=F_Double_defaulted,json=fDoubleDefaulted,def=271828" json:"F_Double_defaulted,omitempty"` F_StringDefaulted *string `protobuf:"bytes,49,opt,name=F_String_defaulted,json=fStringDefaulted,def=hello, \"world!\"\n" json:"F_String_defaulted,omitempty"` F_BytesDefaulted []byte `protobuf:"bytes,401,opt,name=F_Bytes_defaulted,json=fBytesDefaulted,def=Bignose" json:"F_Bytes_defaulted,omitempty"` F_Sint32Defaulted *int32 `protobuf:"zigzag32,402,opt,name=F_Sint32_defaulted,json=fSint32Defaulted,def=-32" json:"F_Sint32_defaulted,omitempty"` F_Sint64Defaulted *int64 `protobuf:"zigzag64,403,opt,name=F_Sint64_defaulted,json=fSint64Defaulted,def=-64" json:"F_Sint64_defaulted,omitempty"` // Packed repeated fields (no string or bytes). F_BoolRepeatedPacked []bool `protobuf:"varint,50,rep,packed,name=F_Bool_repeated_packed,json=fBoolRepeatedPacked" json:"F_Bool_repeated_packed,omitempty"` F_Int32RepeatedPacked []int32 `protobuf:"varint,51,rep,packed,name=F_Int32_repeated_packed,json=fInt32RepeatedPacked" json:"F_Int32_repeated_packed,omitempty"` F_Int64RepeatedPacked []int64 `protobuf:"varint,52,rep,packed,name=F_Int64_repeated_packed,json=fInt64RepeatedPacked" json:"F_Int64_repeated_packed,omitempty"` F_Fixed32RepeatedPacked []uint32 `protobuf:"fixed32,53,rep,packed,name=F_Fixed32_repeated_packed,json=fFixed32RepeatedPacked" json:"F_Fixed32_repeated_packed,omitempty"` F_Fixed64RepeatedPacked []uint64 `protobuf:"fixed64,54,rep,packed,name=F_Fixed64_repeated_packed,json=fFixed64RepeatedPacked" json:"F_Fixed64_repeated_packed,omitempty"` F_Uint32RepeatedPacked []uint32 `protobuf:"varint,55,rep,packed,name=F_Uint32_repeated_packed,json=fUint32RepeatedPacked" json:"F_Uint32_repeated_packed,omitempty"` F_Uint64RepeatedPacked []uint64 `protobuf:"varint,56,rep,packed,name=F_Uint64_repeated_packed,json=fUint64RepeatedPacked" json:"F_Uint64_repeated_packed,omitempty"` F_FloatRepeatedPacked []float32 `protobuf:"fixed32,57,rep,packed,name=F_Float_repeated_packed,json=fFloatRepeatedPacked" json:"F_Float_repeated_packed,omitempty"` F_DoubleRepeatedPacked []float64 `protobuf:"fixed64,58,rep,packed,name=F_Double_repeated_packed,json=fDoubleRepeatedPacked" json:"F_Double_repeated_packed,omitempty"` F_Sint32RepeatedPacked []int32 `protobuf:"zigzag32,502,rep,packed,name=F_Sint32_repeated_packed,json=fSint32RepeatedPacked" json:"F_Sint32_repeated_packed,omitempty"` F_Sint64RepeatedPacked []int64 `protobuf:"zigzag64,503,rep,packed,name=F_Sint64_repeated_packed,json=fSint64RepeatedPacked" json:"F_Sint64_repeated_packed,omitempty"` Requiredgroup *GoTest_RequiredGroup `protobuf:"group,70,req,name=RequiredGroup,json=requiredgroup" json:"requiredgroup,omitempty"` Repeatedgroup []*GoTest_RepeatedGroup `protobuf:"group,80,rep,name=RepeatedGroup,json=repeatedgroup" json:"repeatedgroup,omitempty"` Optionalgroup *GoTest_OptionalGroup `protobuf:"group,90,opt,name=OptionalGroup,json=optionalgroup" json:"optionalgroup,omitempty"` XXX_unrecognized []byte `json:"-"` } func (m *GoTest) Reset() { *m = GoTest{} } func (m *GoTest) String() string { return proto.CompactTextString(m) } func (*GoTest) ProtoMessage() {} func (*GoTest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} } const Default_GoTest_F_BoolDefaulted bool = true const Default_GoTest_F_Int32Defaulted int32 = 32 const Default_GoTest_F_Int64Defaulted int64 = 64 const Default_GoTest_F_Fixed32Defaulted uint32 = 320 const Default_GoTest_F_Fixed64Defaulted uint64 = 640 const Default_GoTest_F_Uint32Defaulted uint32 = 3200 const Default_GoTest_F_Uint64Defaulted uint64 = 6400 const Default_GoTest_F_FloatDefaulted float32 = 314159 const Default_GoTest_F_DoubleDefaulted float64 = 271828 const Default_GoTest_F_StringDefaulted string = "hello, \"world!\"\n" var Default_GoTest_F_BytesDefaulted []byte = []byte("Bignose") const Default_GoTest_F_Sint32Defaulted int32 = -32 const Default_GoTest_F_Sint64Defaulted int64 = -64 func (m *GoTest) GetKind() GoTest_KIND { if m != nil && m.Kind != nil { return *m.Kind } return GoTest_VOID } func (m *GoTest) GetTable() string { if m != nil && m.Table != nil { return *m.Table } return "" } func (m *GoTest) GetParam() int32 { if m != nil && m.Param != nil { return *m.Param } return 0 } func (m *GoTest) GetRequiredField() *GoTestField { if m != nil { return m.RequiredField } return nil } func (m *GoTest) GetRepeatedField() []*GoTestField { if m != nil { return m.RepeatedField } return nil } func (m *GoTest) GetOptionalField() *GoTestField { if m != nil { return m.OptionalField } return nil } func (m *GoTest) GetF_BoolRequired() bool { if m != nil && m.F_BoolRequired != nil { return *m.F_BoolRequired } return false } func (m *GoTest) GetF_Int32Required() int32 { if m != nil && m.F_Int32Required != nil { return *m.F_Int32Required } return 0 } func (m *GoTest) GetF_Int64Required() int64 { if m != nil && m.F_Int64Required != nil { return *m.F_Int64Required } return 0 } func (m *GoTest) GetF_Fixed32Required() uint32 { if m != nil && m.F_Fixed32Required != nil { return *m.F_Fixed32Required } return 0 } func (m *GoTest) GetF_Fixed64Required() uint64 { if m != nil && m.F_Fixed64Required != nil { return *m.F_Fixed64Required } return 0 } func (m *GoTest) GetF_Uint32Required() uint32 { if m != nil && m.F_Uint32Required != nil { return *m.F_Uint32Required } return 0 } func (m *GoTest) GetF_Uint64Required() uint64 { if m != nil && m.F_Uint64Required != nil { return *m.F_Uint64Required } return 0 } func (m *GoTest) GetF_FloatRequired() float32 { if m != nil && m.F_FloatRequired != nil { return *m.F_FloatRequired } return 0 } func (m *GoTest) GetF_DoubleRequired() float64 { if m != nil && m.F_DoubleRequired != nil { return *m.F_DoubleRequired } return 0 } func (m *GoTest) GetF_StringRequired() string { if m != nil && m.F_StringRequired != nil { return *m.F_StringRequired } return "" } func (m *GoTest) GetF_BytesRequired() []byte { if m != nil { return m.F_BytesRequired } return nil } func (m *GoTest) GetF_Sint32Required() int32 { if m != nil && m.F_Sint32Required != nil { return *m.F_Sint32Required } return 0 } func (m *GoTest) GetF_Sint64Required() int64 { if m != nil && m.F_Sint64Required != nil { return *m.F_Sint64Required } return 0 } func (m *GoTest) GetF_BoolRepeated() []bool { if m != nil { return m.F_BoolRepeated } return nil } func (m *GoTest) GetF_Int32Repeated() []int32 { if m != nil { return m.F_Int32Repeated } return nil } func (m *GoTest) GetF_Int64Repeated() []int64 { if m != nil { return m.F_Int64Repeated } return nil } func (m *GoTest) GetF_Fixed32Repeated() []uint32 { if m != nil { return m.F_Fixed32Repeated } return nil } func (m *GoTest) GetF_Fixed64Repeated() []uint64 { if m != nil { return m.F_Fixed64Repeated } return nil } func (m *GoTest) GetF_Uint32Repeated() []uint32 { if m != nil { return m.F_Uint32Repeated } return nil } func (m *GoTest) GetF_Uint64Repeated() []uint64 { if m != nil { return m.F_Uint64Repeated } return nil } func (m *GoTest) GetF_FloatRepeated() []float32 { if m != nil { return m.F_FloatRepeated } return nil } func (m *GoTest) GetF_DoubleRepeated() []float64 { if m != nil { return m.F_DoubleRepeated } return nil } func (m *GoTest) GetF_StringRepeated() []string { if m != nil { return m.F_StringRepeated } return nil } func (m *GoTest) GetF_BytesRepeated() [][]byte { if m != nil { return m.F_BytesRepeated } return nil } func (m *GoTest) GetF_Sint32Repeated() []int32 { if m != nil { return m.F_Sint32Repeated } return nil } func (m *GoTest) GetF_Sint64Repeated() []int64 { if m != nil { return m.F_Sint64Repeated } return nil } func (m *GoTest) GetF_BoolOptional() bool { if m != nil && m.F_BoolOptional != nil { return *m.F_BoolOptional } return false } func (m *GoTest) GetF_Int32Optional() int32 { if m != nil && m.F_Int32Optional != nil { return *m.F_Int32Optional } return 0 } func (m *GoTest) GetF_Int64Optional() int64 { if m != nil && m.F_Int64Optional != nil { return *m.F_Int64Optional } return 0 } func (m *GoTest) GetF_Fixed32Optional() uint32 { if m != nil && m.F_Fixed32Optional != nil { return *m.F_Fixed32Optional } return 0 } func (m *GoTest) GetF_Fixed64Optional() uint64 { if m != nil && m.F_Fixed64Optional != nil { return *m.F_Fixed64Optional } return 0 } func (m *GoTest) GetF_Uint32Optional() uint32 { if m != nil && m.F_Uint32Optional != nil { return *m.F_Uint32Optional } return 0 } func (m *GoTest) GetF_Uint64Optional() uint64 { if m != nil && m.F_Uint64Optional != nil { return *m.F_Uint64Optional } return 0 } func (m *GoTest) GetF_FloatOptional() float32 { if m != nil && m.F_FloatOptional != nil { return *m.F_FloatOptional } return 0 } func (m *GoTest) GetF_DoubleOptional() float64 { if m != nil && m.F_DoubleOptional != nil { return *m.F_DoubleOptional } return 0 } func (m *GoTest) GetF_StringOptional() string { if m != nil && m.F_StringOptional != nil { return *m.F_StringOptional } return "" } func (m *GoTest) GetF_BytesOptional() []byte { if m != nil { return m.F_BytesOptional } return nil } func (m *GoTest) GetF_Sint32Optional() int32 { if m != nil && m.F_Sint32Optional != nil { return *m.F_Sint32Optional } return 0 } func (m *GoTest) GetF_Sint64Optional() int64 { if m != nil && m.F_Sint64Optional != nil { return *m.F_Sint64Optional } return 0 } func (m *GoTest) GetF_BoolDefaulted() bool { if m != nil && m.F_BoolDefaulted != nil { return *m.F_BoolDefaulted } return Default_GoTest_F_BoolDefaulted } func (m *GoTest) GetF_Int32Defaulted() int32 { if m != nil && m.F_Int32Defaulted != nil { return *m.F_Int32Defaulted } return Default_GoTest_F_Int32Defaulted } func (m *GoTest) GetF_Int64Defaulted() int64 { if m != nil && m.F_Int64Defaulted != nil { return *m.F_Int64Defaulted } return Default_GoTest_F_Int64Defaulted } func (m *GoTest) GetF_Fixed32Defaulted() uint32 { if m != nil && m.F_Fixed32Defaulted != nil { return *m.F_Fixed32Defaulted } return Default_GoTest_F_Fixed32Defaulted } func (m *GoTest) GetF_Fixed64Defaulted() uint64 { if m != nil && m.F_Fixed64Defaulted != nil { return *m.F_Fixed64Defaulted } return Default_GoTest_F_Fixed64Defaulted } func (m *GoTest) GetF_Uint32Defaulted() uint32 { if m != nil && m.F_Uint32Defaulted != nil { return *m.F_Uint32Defaulted } return Default_GoTest_F_Uint32Defaulted } func (m *GoTest) GetF_Uint64Defaulted() uint64 { if m != nil && m.F_Uint64Defaulted != nil { return *m.F_Uint64Defaulted } return Default_GoTest_F_Uint64Defaulted } func (m *GoTest) GetF_FloatDefaulted() float32 { if m != nil && m.F_FloatDefaulted != nil { return *m.F_FloatDefaulted } return Default_GoTest_F_FloatDefaulted } func (m *GoTest) GetF_DoubleDefaulted() float64 { if m != nil && m.F_DoubleDefaulted != nil { return *m.F_DoubleDefaulted } return Default_GoTest_F_DoubleDefaulted } func (m *GoTest) GetF_StringDefaulted() string { if m != nil && m.F_StringDefaulted != nil { return *m.F_StringDefaulted } return Default_GoTest_F_StringDefaulted } func (m *GoTest) GetF_BytesDefaulted() []byte { if m != nil && m.F_BytesDefaulted != nil { return m.F_BytesDefaulted } return append([]byte(nil), Default_GoTest_F_BytesDefaulted...) } func (m *GoTest) GetF_Sint32Defaulted() int32 { if m != nil && m.F_Sint32Defaulted != nil { return *m.F_Sint32Defaulted } return Default_GoTest_F_Sint32Defaulted } func (m *GoTest) GetF_Sint64Defaulted() int64 { if m != nil && m.F_Sint64Defaulted != nil { return *m.F_Sint64Defaulted } return Default_GoTest_F_Sint64Defaulted } func (m *GoTest) GetF_BoolRepeatedPacked() []bool { if m != nil { return m.F_BoolRepeatedPacked } return nil } func (m *GoTest) GetF_Int32RepeatedPacked() []int32 { if m != nil { return m.F_Int32RepeatedPacked } return nil } func (m *GoTest) GetF_Int64RepeatedPacked() []int64 { if m != nil { return m.F_Int64RepeatedPacked } return nil } func (m *GoTest) GetF_Fixed32RepeatedPacked() []uint32 { if m != nil { return m.F_Fixed32RepeatedPacked } return nil } func (m *GoTest) GetF_Fixed64RepeatedPacked() []uint64 { if m != nil { return m.F_Fixed64RepeatedPacked } return nil } func (m *GoTest) GetF_Uint32RepeatedPacked() []uint32 { if m != nil { return m.F_Uint32RepeatedPacked } return nil } func (m *GoTest) GetF_Uint64RepeatedPacked() []uint64 { if m != nil { return m.F_Uint64RepeatedPacked } return nil } func (m *GoTest) GetF_FloatRepeatedPacked() []float32 { if m != nil { return m.F_FloatRepeatedPacked } return nil } func (m *GoTest) GetF_DoubleRepeatedPacked() []float64 { if m != nil { return m.F_DoubleRepeatedPacked } return nil } func (m *GoTest) GetF_Sint32RepeatedPacked() []int32 { if m != nil { return m.F_Sint32RepeatedPacked } return nil } func (m *GoTest) GetF_Sint64RepeatedPacked() []int64 { if m != nil { return m.F_Sint64RepeatedPacked } return nil } func (m *GoTest) GetRequiredgroup() *GoTest_RequiredGroup { if m != nil { return m.Requiredgroup } return nil } func (m *GoTest) GetRepeatedgroup() []*GoTest_RepeatedGroup { if m != nil { return m.Repeatedgroup } return nil } func (m *GoTest) GetOptionalgroup() *GoTest_OptionalGroup { if m != nil { return m.Optionalgroup } return nil } // Required, repeated, and optional groups. type GoTest_RequiredGroup struct { RequiredField *string `protobuf:"bytes,71,req,name=RequiredField,json=requiredField" json:"RequiredField,omitempty"` XXX_unrecognized []byte `json:"-"` } func (m *GoTest_RequiredGroup) Reset() { *m = GoTest_RequiredGroup{} } func (m *GoTest_RequiredGroup) String() string { return proto.CompactTextString(m) } func (*GoTest_RequiredGroup) ProtoMessage() {} func (*GoTest_RequiredGroup) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2, 0} } func (m *GoTest_RequiredGroup) GetRequiredField() string { if m != nil && m.RequiredField != nil { return *m.RequiredField } return "" } type GoTest_RepeatedGroup struct { RequiredField *string `protobuf:"bytes,81,req,name=RequiredField,json=requiredField" json:"RequiredField,omitempty"` XXX_unrecognized []byte `json:"-"` } func (m *GoTest_RepeatedGroup) Reset() { *m = GoTest_RepeatedGroup{} } func (m *GoTest_RepeatedGroup) String() string { return proto.CompactTextString(m) } func (*GoTest_RepeatedGroup) ProtoMessage() {} func (*GoTest_RepeatedGroup) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2, 1} } func (m *GoTest_RepeatedGroup) GetRequiredField() string { if m != nil && m.RequiredField != nil { return *m.RequiredField } return "" } type GoTest_OptionalGroup struct { RequiredField *string `protobuf:"bytes,91,req,name=RequiredField,json=requiredField" json:"RequiredField,omitempty"` XXX_unrecognized []byte `json:"-"` } func (m *GoTest_OptionalGroup) Reset() { *m = GoTest_OptionalGroup{} } func (m *GoTest_OptionalGroup) String() string { return proto.CompactTextString(m) } func (*GoTest_OptionalGroup) ProtoMessage() {} func (*GoTest_OptionalGroup) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2, 2} } func (m *GoTest_OptionalGroup) GetRequiredField() string { if m != nil && m.RequiredField != nil { return *m.RequiredField } return "" } // For testing skipping of unrecognized fields. // Numbers are all big, larger than tag numbers in GoTestField, // the message used in the corresponding test. type GoSkipTest struct { SkipInt32 *int32 `protobuf:"varint,11,req,name=skip_int32,json=skipInt32" json:"skip_int32,omitempty"` SkipFixed32 *uint32 `protobuf:"fixed32,12,req,name=skip_fixed32,json=skipFixed32" json:"skip_fixed32,omitempty"` SkipFixed64 *uint64 `protobuf:"fixed64,13,req,name=skip_fixed64,json=skipFixed64" json:"skip_fixed64,omitempty"` SkipString *string `protobuf:"bytes,14,req,name=skip_string,json=skipString" json:"skip_string,omitempty"` Skipgroup *GoSkipTest_SkipGroup `protobuf:"group,15,req,name=SkipGroup,json=skipgroup" json:"skipgroup,omitempty"` XXX_unrecognized []byte `json:"-"` } func (m *GoSkipTest) Reset() { *m = GoSkipTest{} } func (m *GoSkipTest) String() string { return proto.CompactTextString(m) } func (*GoSkipTest) ProtoMessage() {} func (*GoSkipTest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} } func (m *GoSkipTest) GetSkipInt32() int32 { if m != nil && m.SkipInt32 != nil { return *m.SkipInt32 } return 0 } func (m *GoSkipTest) GetSkipFixed32() uint32 { if m != nil && m.SkipFixed32 != nil { return *m.SkipFixed32 } return 0 } func (m *GoSkipTest) GetSkipFixed64() uint64 { if m != nil && m.SkipFixed64 != nil { return *m.SkipFixed64 } return 0 } func (m *GoSkipTest) GetSkipString() string { if m != nil && m.SkipString != nil { return *m.SkipString } return "" } func (m *GoSkipTest) GetSkipgroup() *GoSkipTest_SkipGroup { if m != nil { return m.Skipgroup } return nil } type GoSkipTest_SkipGroup struct { GroupInt32 *int32 `protobuf:"varint,16,req,name=group_int32,json=groupInt32" json:"group_int32,omitempty"` GroupString *string `protobuf:"bytes,17,req,name=group_string,json=groupString" json:"group_string,omitempty"` XXX_unrecognized []byte `json:"-"` } func (m *GoSkipTest_SkipGroup) Reset() { *m = GoSkipTest_SkipGroup{} } func (m *GoSkipTest_SkipGroup) String() string { return proto.CompactTextString(m) } func (*GoSkipTest_SkipGroup) ProtoMessage() {} func (*GoSkipTest_SkipGroup) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3, 0} } func (m *GoSkipTest_SkipGroup) GetGroupInt32() int32 { if m != nil && m.GroupInt32 != nil { return *m.GroupInt32 } return 0 } func (m *GoSkipTest_SkipGroup) GetGroupString() string { if m != nil && m.GroupString != nil { return *m.GroupString } return "" } // For testing packed/non-packed decoder switching. // A serialized instance of one should be deserializable as the other. type NonPackedTest struct { A []int32 `protobuf:"varint,1,rep,name=a" json:"a,omitempty"` XXX_unrecognized []byte `json:"-"` } func (m *NonPackedTest) Reset() { *m = NonPackedTest{} } func (m *NonPackedTest) String() string { return proto.CompactTextString(m) } func (*NonPackedTest) ProtoMessage() {} func (*NonPackedTest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4} } func (m *NonPackedTest) GetA() []int32 { if m != nil { return m.A } return nil } type PackedTest struct { B []int32 `protobuf:"varint,1,rep,packed,name=b" json:"b,omitempty"` XXX_unrecognized []byte `json:"-"` } func (m *PackedTest) Reset() { *m = PackedTest{} } func (m *PackedTest) String() string { return proto.CompactTextString(m) } func (*PackedTest) ProtoMessage() {} func (*PackedTest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{5} } func (m *PackedTest) GetB() []int32 { if m != nil { return m.B } return nil } type MaxTag struct { // Maximum possible tag number. LastField *string `protobuf:"bytes,536870911,opt,name=last_field,json=lastField" json:"last_field,omitempty"` XXX_unrecognized []byte `json:"-"` } func (m *MaxTag) Reset() { *m = MaxTag{} } func (m *MaxTag) String() string { return proto.CompactTextString(m) } func (*MaxTag) ProtoMessage() {} func (*MaxTag) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{6} } func (m *MaxTag) GetLastField() string { if m != nil && m.LastField != nil { return *m.LastField } return "" } type OldMessage struct { Nested *OldMessage_Nested `protobuf:"bytes,1,opt,name=nested" json:"nested,omitempty"` Num *int32 `protobuf:"varint,2,opt,name=num" json:"num,omitempty"` XXX_unrecognized []byte `json:"-"` } func (m *OldMessage) Reset() { *m = OldMessage{} } func (m *OldMessage) String() string { return proto.CompactTextString(m) } func (*OldMessage) ProtoMessage() {} func (*OldMessage) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{7} } func (m *OldMessage) GetNested() *OldMessage_Nested { if m != nil { return m.Nested } return nil } func (m *OldMessage) GetNum() int32 { if m != nil && m.Num != nil { return *m.Num } return 0 } type OldMessage_Nested struct { Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` XXX_unrecognized []byte `json:"-"` } func (m *OldMessage_Nested) Reset() { *m = OldMessage_Nested{} } func (m *OldMessage_Nested) String() string { return proto.CompactTextString(m) } func (*OldMessage_Nested) ProtoMessage() {} func (*OldMessage_Nested) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{7, 0} } func (m *OldMessage_Nested) GetName() string { if m != nil && m.Name != nil { return *m.Name } return "" } // NewMessage is wire compatible with OldMessage; // imagine it as a future version. type NewMessage struct { Nested *NewMessage_Nested `protobuf:"bytes,1,opt,name=nested" json:"nested,omitempty"` // This is an int32 in OldMessage. Num *int64 `protobuf:"varint,2,opt,name=num" json:"num,omitempty"` XXX_unrecognized []byte `json:"-"` } func (m *NewMessage) Reset() { *m = NewMessage{} } func (m *NewMessage) String() string { return proto.CompactTextString(m) } func (*NewMessage) ProtoMessage() {} func (*NewMessage) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{8} } func (m *NewMessage) GetNested() *NewMessage_Nested { if m != nil { return m.Nested } return nil } func (m *NewMessage) GetNum() int64 { if m != nil && m.Num != nil { return *m.Num } return 0 } type NewMessage_Nested struct { Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` FoodGroup *string `protobuf:"bytes,2,opt,name=food_group,json=foodGroup" json:"food_group,omitempty"` XXX_unrecognized []byte `json:"-"` } func (m *NewMessage_Nested) Reset() { *m = NewMessage_Nested{} } func (m *NewMessage_Nested) String() string { return proto.CompactTextString(m) } func (*NewMessage_Nested) ProtoMessage() {} func (*NewMessage_Nested) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{8, 0} } func (m *NewMessage_Nested) GetName() string { if m != nil && m.Name != nil { return *m.Name } return "" } func (m *NewMessage_Nested) GetFoodGroup() string { if m != nil && m.FoodGroup != nil { return *m.FoodGroup } return "" } type InnerMessage struct { Host *string `protobuf:"bytes,1,req,name=host" json:"host,omitempty"` Port *int32 `protobuf:"varint,2,opt,name=port,def=4000" json:"port,omitempty"` Connected *bool `protobuf:"varint,3,opt,name=connected" json:"connected,omitempty"` XXX_unrecognized []byte `json:"-"` } func (m *InnerMessage) Reset() { *m = InnerMessage{} } func (m *InnerMessage) String() string { return proto.CompactTextString(m) } func (*InnerMessage) ProtoMessage() {} func (*InnerMessage) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{9} } const Default_InnerMessage_Port int32 = 4000 func (m *InnerMessage) GetHost() string { if m != nil && m.Host != nil { return *m.Host } return "" } func (m *InnerMessage) GetPort() int32 { if m != nil && m.Port != nil { return *m.Port } return Default_InnerMessage_Port } func (m *InnerMessage) GetConnected() bool { if m != nil && m.Connected != nil { return *m.Connected } return false } type OtherMessage struct { Key *int64 `protobuf:"varint,1,opt,name=key" json:"key,omitempty"` Value []byte `protobuf:"bytes,2,opt,name=value" json:"value,omitempty"` Weight *float32 `protobuf:"fixed32,3,opt,name=weight" json:"weight,omitempty"` Inner *InnerMessage `protobuf:"bytes,4,opt,name=inner" json:"inner,omitempty"` XXX_extensions map[int32]proto.Extension `json:"-"` XXX_unrecognized []byte `json:"-"` } func (m *OtherMessage) Reset() { *m = OtherMessage{} } func (m *OtherMessage) String() string { return proto.CompactTextString(m) } func (*OtherMessage) ProtoMessage() {} func (*OtherMessage) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{10} } var extRange_OtherMessage = []proto.ExtensionRange{ {100, 536870911}, } func (*OtherMessage) ExtensionRangeArray() []proto.ExtensionRange { return extRange_OtherMessage } func (m *OtherMessage) ExtensionMap() map[int32]proto.Extension { if m.XXX_extensions == nil { m.XXX_extensions = make(map[int32]proto.Extension) } return m.XXX_extensions } func (m *OtherMessage) GetKey() int64 { if m != nil && m.Key != nil { return *m.Key } return 0 } func (m *OtherMessage) GetValue() []byte { if m != nil { return m.Value } return nil } func (m *OtherMessage) GetWeight() float32 { if m != nil && m.Weight != nil { return *m.Weight } return 0 } func (m *OtherMessage) GetInner() *InnerMessage { if m != nil { return m.Inner } return nil } type RequiredInnerMessage struct { LeoFinallyWonAnOscar *InnerMessage `protobuf:"bytes,1,req,name=leo_finally_won_an_oscar,json=leoFinallyWonAnOscar" json:"leo_finally_won_an_oscar,omitempty"` XXX_unrecognized []byte `json:"-"` } func (m *RequiredInnerMessage) Reset() { *m = RequiredInnerMessage{} } func (m *RequiredInnerMessage) String() string { return proto.CompactTextString(m) } func (*RequiredInnerMessage) ProtoMessage() {} func (*RequiredInnerMessage) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{11} } func (m *RequiredInnerMessage) GetLeoFinallyWonAnOscar() *InnerMessage { if m != nil { return m.LeoFinallyWonAnOscar } return nil } type MyMessage struct { Count *int32 `protobuf:"varint,1,req,name=count" json:"count,omitempty"` Name *string `protobuf:"bytes,2,opt,name=name" json:"name,omitempty"` Quote *string `protobuf:"bytes,3,opt,name=quote" json:"quote,omitempty"` Pet []string `protobuf:"bytes,4,rep,name=pet" json:"pet,omitempty"` Inner *InnerMessage `protobuf:"bytes,5,opt,name=inner" json:"inner,omitempty"` Others []*OtherMessage `protobuf:"bytes,6,rep,name=others" json:"others,omitempty"` WeMustGoDeeper *RequiredInnerMessage `protobuf:"bytes,13,opt,name=we_must_go_deeper,json=weMustGoDeeper" json:"we_must_go_deeper,omitempty"` RepInner []*InnerMessage `protobuf:"bytes,12,rep,name=rep_inner,json=repInner" json:"rep_inner,omitempty"` Bikeshed *MyMessage_Color `protobuf:"varint,7,opt,name=bikeshed,enum=testdata.MyMessage_Color" json:"bikeshed,omitempty"` Somegroup *MyMessage_SomeGroup `protobuf:"group,8,opt,name=SomeGroup,json=somegroup" json:"somegroup,omitempty"` // This field becomes [][]byte in the generated code. RepBytes [][]byte `protobuf:"bytes,10,rep,name=rep_bytes,json=repBytes" json:"rep_bytes,omitempty"` Bigfloat *float64 `protobuf:"fixed64,11,opt,name=bigfloat" json:"bigfloat,omitempty"` XXX_extensions map[int32]proto.Extension `json:"-"` XXX_unrecognized []byte `json:"-"` } func (m *MyMessage) Reset() { *m = MyMessage{} } func (m *MyMessage) String() string { return proto.CompactTextString(m) } func (*MyMessage) ProtoMessage() {} func (*MyMessage) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{12} } var extRange_MyMessage = []proto.ExtensionRange{ {100, 536870911}, } func (*MyMessage) ExtensionRangeArray() []proto.ExtensionRange { return extRange_MyMessage } func (m *MyMessage) ExtensionMap() map[int32]proto.Extension { if m.XXX_extensions == nil { m.XXX_extensions = make(map[int32]proto.Extension) } return m.XXX_extensions } func (m *MyMessage) GetCount() int32 { if m != nil && m.Count != nil { return *m.Count } return 0 } func (m *MyMessage) GetName() string { if m != nil && m.Name != nil { return *m.Name } return "" } func (m *MyMessage) GetQuote() string { if m != nil && m.Quote != nil { return *m.Quote } return "" } func (m *MyMessage) GetPet() []string { if m != nil { return m.Pet } return nil } func (m *MyMessage) GetInner() *InnerMessage { if m != nil { return m.Inner } return nil } func (m *MyMessage) GetOthers() []*OtherMessage { if m != nil { return m.Others } return nil } func (m *MyMessage) GetWeMustGoDeeper() *RequiredInnerMessage { if m != nil { return m.WeMustGoDeeper } return nil } func (m *MyMessage) GetRepInner() []*InnerMessage { if m != nil { return m.RepInner } return nil } func (m *MyMessage) GetBikeshed() MyMessage_Color { if m != nil && m.Bikeshed != nil { return *m.Bikeshed } return MyMessage_RED } func (m *MyMessage) GetSomegroup() *MyMessage_SomeGroup { if m != nil { return m.Somegroup } return nil } func (m *MyMessage) GetRepBytes() [][]byte { if m != nil { return m.RepBytes } return nil } func (m *MyMessage) GetBigfloat() float64 { if m != nil && m.Bigfloat != nil { return *m.Bigfloat } return 0 } type MyMessage_SomeGroup struct { GroupField *int32 `protobuf:"varint,9,opt,name=group_field,json=groupField" json:"group_field,omitempty"` XXX_unrecognized []byte `json:"-"` } func (m *MyMessage_SomeGroup) Reset() { *m = MyMessage_SomeGroup{} } func (m *MyMessage_SomeGroup) String() string { return proto.CompactTextString(m) } func (*MyMessage_SomeGroup) ProtoMessage() {} func (*MyMessage_SomeGroup) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{12, 0} } func (m *MyMessage_SomeGroup) GetGroupField() int32 { if m != nil && m.GroupField != nil { return *m.GroupField } return 0 } type Ext struct { Data *string `protobuf:"bytes,1,opt,name=data" json:"data,omitempty"` XXX_unrecognized []byte `json:"-"` } func (m *Ext) Reset() { *m = Ext{} } func (m *Ext) String() string { return proto.CompactTextString(m) } func (*Ext) ProtoMessage() {} func (*Ext) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{13} } func (m *Ext) GetData() string { if m != nil && m.Data != nil { return *m.Data } return "" } var E_Ext_More = &proto.ExtensionDesc{ ExtendedType: (*MyMessage)(nil), ExtensionType: (*Ext)(nil), Field: 103, Name: "testdata.Ext.more", Tag: "bytes,103,opt,name=more", } var E_Ext_Text = &proto.ExtensionDesc{ ExtendedType: (*MyMessage)(nil), ExtensionType: (*string)(nil), Field: 104, Name: "testdata.Ext.text", Tag: "bytes,104,opt,name=text", } var E_Ext_Number = &proto.ExtensionDesc{ ExtendedType: (*MyMessage)(nil), ExtensionType: (*int32)(nil), Field: 105, Name: "testdata.Ext.number", Tag: "varint,105,opt,name=number", } type ComplexExtension struct { First *int32 `protobuf:"varint,1,opt,name=first" json:"first,omitempty"` Second *int32 `protobuf:"varint,2,opt,name=second" json:"second,omitempty"` Third []int32 `protobuf:"varint,3,rep,name=third" json:"third,omitempty"` XXX_unrecognized []byte `json:"-"` } func (m *ComplexExtension) Reset() { *m = ComplexExtension{} } func (m *ComplexExtension) String() string { return proto.CompactTextString(m) } func (*ComplexExtension) ProtoMessage() {} func (*ComplexExtension) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{14} } func (m *ComplexExtension) GetFirst() int32 { if m != nil && m.First != nil { return *m.First } return 0 } func (m *ComplexExtension) GetSecond() int32 { if m != nil && m.Second != nil { return *m.Second } return 0 } func (m *ComplexExtension) GetThird() []int32 { if m != nil { return m.Third } return nil } type DefaultsMessage struct { XXX_extensions map[int32]proto.Extension `json:"-"` XXX_unrecognized []byte `json:"-"` } func (m *DefaultsMessage) Reset() { *m = DefaultsMessage{} } func (m *DefaultsMessage) String() string { return proto.CompactTextString(m) } func (*DefaultsMessage) ProtoMessage() {} func (*DefaultsMessage) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{15} } var extRange_DefaultsMessage = []proto.ExtensionRange{ {100, 536870911}, } func (*DefaultsMessage) ExtensionRangeArray() []proto.ExtensionRange { return extRange_DefaultsMessage } func (m *DefaultsMessage) ExtensionMap() map[int32]proto.Extension { if m.XXX_extensions == nil { m.XXX_extensions = make(map[int32]proto.Extension) } return m.XXX_extensions } type MyMessageSet struct { XXX_extensions map[int32]proto.Extension `json:"-"` XXX_unrecognized []byte `json:"-"` } func (m *MyMessageSet) Reset() { *m = MyMessageSet{} } func (m *MyMessageSet) String() string { return proto.CompactTextString(m) } func (*MyMessageSet) ProtoMessage() {} func (*MyMessageSet) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{16} } func (m *MyMessageSet) Marshal() ([]byte, error) { return proto.MarshalMessageSet(m.ExtensionMap()) } func (m *MyMessageSet) Unmarshal(buf []byte) error { return proto.UnmarshalMessageSet(buf, m.ExtensionMap()) } func (m *MyMessageSet) MarshalJSON() ([]byte, error) { return proto.MarshalMessageSetJSON(m.XXX_extensions) } func (m *MyMessageSet) UnmarshalJSON(buf []byte) error { return proto.UnmarshalMessageSetJSON(buf, m.XXX_extensions) } // ensure MyMessageSet satisfies proto.Marshaler and proto.Unmarshaler var _ proto.Marshaler = (*MyMessageSet)(nil) var _ proto.Unmarshaler = (*MyMessageSet)(nil) var extRange_MyMessageSet = []proto.ExtensionRange{ {100, 2147483646}, } func (*MyMessageSet) ExtensionRangeArray() []proto.ExtensionRange { return extRange_MyMessageSet } func (m *MyMessageSet) ExtensionMap() map[int32]proto.Extension { if m.XXX_extensions == nil { m.XXX_extensions = make(map[int32]proto.Extension) } return m.XXX_extensions } type Empty struct { XXX_unrecognized []byte `json:"-"` } func (m *Empty) Reset() { *m = Empty{} } func (m *Empty) String() string { return proto.CompactTextString(m) } func (*Empty) ProtoMessage() {} func (*Empty) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{17} } type MessageList struct { Message []*MessageList_Message `protobuf:"group,1,rep,name=Message,json=message" json:"message,omitempty"` XXX_unrecognized []byte `json:"-"` } func (m *MessageList) Reset() { *m = MessageList{} } func (m *MessageList) String() string { return proto.CompactTextString(m) } func (*MessageList) ProtoMessage() {} func (*MessageList) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{18} } func (m *MessageList) GetMessage() []*MessageList_Message { if m != nil { return m.Message } return nil } type MessageList_Message struct { Name *string `protobuf:"bytes,2,req,name=name" json:"name,omitempty"` Count *int32 `protobuf:"varint,3,req,name=count" json:"count,omitempty"` XXX_unrecognized []byte `json:"-"` } func (m *MessageList_Message) Reset() { *m = MessageList_Message{} } func (m *MessageList_Message) String() string { return proto.CompactTextString(m) } func (*MessageList_Message) ProtoMessage() {} func (*MessageList_Message) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{18, 0} } func (m *MessageList_Message) GetName() string { if m != nil && m.Name != nil { return *m.Name } return "" } func (m *MessageList_Message) GetCount() int32 { if m != nil && m.Count != nil { return *m.Count } return 0 } type Strings struct { StringField *string `protobuf:"bytes,1,opt,name=string_field,json=stringField" json:"string_field,omitempty"` BytesField []byte `protobuf:"bytes,2,opt,name=bytes_field,json=bytesField" json:"bytes_field,omitempty"` XXX_unrecognized []byte `json:"-"` } func (m *Strings) Reset() { *m = Strings{} } func (m *Strings) String() string { return proto.CompactTextString(m) } func (*Strings) ProtoMessage() {} func (*Strings) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{19} } func (m *Strings) GetStringField() string { if m != nil && m.StringField != nil { return *m.StringField } return "" } func (m *Strings) GetBytesField() []byte { if m != nil { return m.BytesField } return nil } type Defaults struct { // Default-valued fields of all basic types. // Same as GoTest, but copied here to make testing easier. F_Bool *bool `protobuf:"varint,1,opt,name=F_Bool,json=fBool,def=1" json:"F_Bool,omitempty"` F_Int32 *int32 `protobuf:"varint,2,opt,name=F_Int32,json=fInt32,def=32" json:"F_Int32,omitempty"` F_Int64 *int64 `protobuf:"varint,3,opt,name=F_Int64,json=fInt64,def=64" json:"F_Int64,omitempty"` F_Fixed32 *uint32 `protobuf:"fixed32,4,opt,name=F_Fixed32,json=fFixed32,def=320" json:"F_Fixed32,omitempty"` F_Fixed64 *uint64 `protobuf:"fixed64,5,opt,name=F_Fixed64,json=fFixed64,def=640" json:"F_Fixed64,omitempty"` F_Uint32 *uint32 `protobuf:"varint,6,opt,name=F_Uint32,json=fUint32,def=3200" json:"F_Uint32,omitempty"` F_Uint64 *uint64 `protobuf:"varint,7,opt,name=F_Uint64,json=fUint64,def=6400" json:"F_Uint64,omitempty"` F_Float *float32 `protobuf:"fixed32,8,opt,name=F_Float,json=fFloat,def=314159" json:"F_Float,omitempty"` F_Double *float64 `protobuf:"fixed64,9,opt,name=F_Double,json=fDouble,def=271828" json:"F_Double,omitempty"` F_String *string `protobuf:"bytes,10,opt,name=F_String,json=fString,def=hello, \"world!\"\n" json:"F_String,omitempty"` F_Bytes []byte `protobuf:"bytes,11,opt,name=F_Bytes,json=fBytes,def=Bignose" json:"F_Bytes,omitempty"` F_Sint32 *int32 `protobuf:"zigzag32,12,opt,name=F_Sint32,json=fSint32,def=-32" json:"F_Sint32,omitempty"` F_Sint64 *int64 `protobuf:"zigzag64,13,opt,name=F_Sint64,json=fSint64,def=-64" json:"F_Sint64,omitempty"` F_Enum *Defaults_Color `protobuf:"varint,14,opt,name=F_Enum,json=fEnum,enum=testdata.Defaults_Color,def=1" json:"F_Enum,omitempty"` // More fields with crazy defaults. F_Pinf *float32 `protobuf:"fixed32,15,opt,name=F_Pinf,json=fPinf,def=inf" json:"F_Pinf,omitempty"` F_Ninf *float32 `protobuf:"fixed32,16,opt,name=F_Ninf,json=fNinf,def=-inf" json:"F_Ninf,omitempty"` F_Nan *float32 `protobuf:"fixed32,17,opt,name=F_Nan,json=fNan,def=nan" json:"F_Nan,omitempty"` // Sub-message. Sub *SubDefaults `protobuf:"bytes,18,opt,name=sub" json:"sub,omitempty"` // Redundant but explicit defaults. StrZero *string `protobuf:"bytes,19,opt,name=str_zero,json=strZero,def=" json:"str_zero,omitempty"` XXX_unrecognized []byte `json:"-"` } func (m *Defaults) Reset() { *m = Defaults{} } func (m *Defaults) String() string { return proto.CompactTextString(m) } func (*Defaults) ProtoMessage() {} func (*Defaults) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{20} } const Default_Defaults_F_Bool bool = true const Default_Defaults_F_Int32 int32 = 32 const Default_Defaults_F_Int64 int64 = 64 const Default_Defaults_F_Fixed32 uint32 = 320 const Default_Defaults_F_Fixed64 uint64 = 640 const Default_Defaults_F_Uint32 uint32 = 3200 const Default_Defaults_F_Uint64 uint64 = 6400 const Default_Defaults_F_Float float32 = 314159 const Default_Defaults_F_Double float64 = 271828 const Default_Defaults_F_String string = "hello, \"world!\"\n" var Default_Defaults_F_Bytes []byte = []byte("Bignose") const Default_Defaults_F_Sint32 int32 = -32 const Default_Defaults_F_Sint64 int64 = -64 const Default_Defaults_F_Enum Defaults_Color = Defaults_GREEN var Default_Defaults_F_Pinf float32 = float32(math.Inf(1)) var Default_Defaults_F_Ninf float32 = float32(math.Inf(-1)) var Default_Defaults_F_Nan float32 = float32(math.NaN()) func (m *Defaults) GetF_Bool() bool { if m != nil && m.F_Bool != nil { return *m.F_Bool } return Default_Defaults_F_Bool } func (m *Defaults) GetF_Int32() int32 { if m != nil && m.F_Int32 != nil { return *m.F_Int32 } return Default_Defaults_F_Int32 } func (m *Defaults) GetF_Int64() int64 { if m != nil && m.F_Int64 != nil { return *m.F_Int64 } return Default_Defaults_F_Int64 } func (m *Defaults) GetF_Fixed32() uint32 { if m != nil && m.F_Fixed32 != nil { return *m.F_Fixed32 } return Default_Defaults_F_Fixed32 } func (m *Defaults) GetF_Fixed64() uint64 { if m != nil && m.F_Fixed64 != nil { return *m.F_Fixed64 } return Default_Defaults_F_Fixed64 } func (m *Defaults) GetF_Uint32() uint32 { if m != nil && m.F_Uint32 != nil { return *m.F_Uint32 } return Default_Defaults_F_Uint32 } func (m *Defaults) GetF_Uint64() uint64 { if m != nil && m.F_Uint64 != nil { return *m.F_Uint64 } return Default_Defaults_F_Uint64 } func (m *Defaults) GetF_Float() float32 { if m != nil && m.F_Float != nil { return *m.F_Float } return Default_Defaults_F_Float } func (m *Defaults) GetF_Double() float64 { if m != nil && m.F_Double != nil { return *m.F_Double } return Default_Defaults_F_Double } func (m *Defaults) GetF_String() string { if m != nil && m.F_String != nil { return *m.F_String } return Default_Defaults_F_String } func (m *Defaults) GetF_Bytes() []byte { if m != nil && m.F_Bytes != nil { return m.F_Bytes } return append([]byte(nil), Default_Defaults_F_Bytes...) } func (m *Defaults) GetF_Sint32() int32 { if m != nil && m.F_Sint32 != nil { return *m.F_Sint32 } return Default_Defaults_F_Sint32 } func (m *Defaults) GetF_Sint64() int64 { if m != nil && m.F_Sint64 != nil { return *m.F_Sint64 } return Default_Defaults_F_Sint64 } func (m *Defaults) GetF_Enum() Defaults_Color { if m != nil && m.F_Enum != nil { return *m.F_Enum } return Default_Defaults_F_Enum } func (m *Defaults) GetF_Pinf() float32 { if m != nil && m.F_Pinf != nil { return *m.F_Pinf } return Default_Defaults_F_Pinf } func (m *Defaults) GetF_Ninf() float32 { if m != nil && m.F_Ninf != nil { return *m.F_Ninf } return Default_Defaults_F_Ninf } func (m *Defaults) GetF_Nan() float32 { if m != nil && m.F_Nan != nil { return *m.F_Nan } return Default_Defaults_F_Nan } func (m *Defaults) GetSub() *SubDefaults { if m != nil { return m.Sub } return nil } func (m *Defaults) GetStrZero() string { if m != nil && m.StrZero != nil { return *m.StrZero } return "" } type SubDefaults struct { N *int64 `protobuf:"varint,1,opt,name=n,def=7" json:"n,omitempty"` XXX_unrecognized []byte `json:"-"` } func (m *SubDefaults) Reset() { *m = SubDefaults{} } func (m *SubDefaults) String() string { return proto.CompactTextString(m) } func (*SubDefaults) ProtoMessage() {} func (*SubDefaults) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{21} } const Default_SubDefaults_N int64 = 7 func (m *SubDefaults) GetN() int64 { if m != nil && m.N != nil { return *m.N } return Default_SubDefaults_N } type RepeatedEnum struct { Color []RepeatedEnum_Color `protobuf:"varint,1,rep,name=color,enum=testdata.RepeatedEnum_Color" json:"color,omitempty"` XXX_unrecognized []byte `json:"-"` } func (m *RepeatedEnum) Reset() { *m = RepeatedEnum{} } func (m *RepeatedEnum) String() string { return proto.CompactTextString(m) } func (*RepeatedEnum) ProtoMessage() {} func (*RepeatedEnum) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{22} } func (m *RepeatedEnum) GetColor() []RepeatedEnum_Color { if m != nil { return m.Color } return nil } type MoreRepeated struct { Bools []bool `protobuf:"varint,1,rep,name=bools" json:"bools,omitempty"` BoolsPacked []bool `protobuf:"varint,2,rep,packed,name=bools_packed,json=boolsPacked" json:"bools_packed,omitempty"` Ints []int32 `protobuf:"varint,3,rep,name=ints" json:"ints,omitempty"` IntsPacked []int32 `protobuf:"varint,4,rep,packed,name=ints_packed,json=intsPacked" json:"ints_packed,omitempty"` Int64SPacked []int64 `protobuf:"varint,7,rep,packed,name=int64s_packed,json=int64sPacked" json:"int64s_packed,omitempty"` Strings []string `protobuf:"bytes,5,rep,name=strings" json:"strings,omitempty"` Fixeds []uint32 `protobuf:"fixed32,6,rep,name=fixeds" json:"fixeds,omitempty"` XXX_unrecognized []byte `json:"-"` } func (m *MoreRepeated) Reset() { *m = MoreRepeated{} } func (m *MoreRepeated) String() string { return proto.CompactTextString(m) } func (*MoreRepeated) ProtoMessage() {} func (*MoreRepeated) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{23} } func (m *MoreRepeated) GetBools() []bool { if m != nil { return m.Bools } return nil } func (m *MoreRepeated) GetBoolsPacked() []bool { if m != nil { return m.BoolsPacked } return nil } func (m *MoreRepeated) GetInts() []int32 { if m != nil { return m.Ints } return nil } func (m *MoreRepeated) GetIntsPacked() []int32 { if m != nil { return m.IntsPacked } return nil } func (m *MoreRepeated) GetInt64SPacked() []int64 { if m != nil { return m.Int64SPacked } return nil } func (m *MoreRepeated) GetStrings() []string { if m != nil { return m.Strings } return nil } func (m *MoreRepeated) GetFixeds() []uint32 { if m != nil { return m.Fixeds } return nil } type GroupOld struct { G *GroupOld_G `protobuf:"group,101,opt,name=G,json=g" json:"g,omitempty"` XXX_unrecognized []byte `json:"-"` } func (m *GroupOld) Reset() { *m = GroupOld{} } func (m *GroupOld) String() string { return proto.CompactTextString(m) } func (*GroupOld) ProtoMessage() {} func (*GroupOld) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{24} } func (m *GroupOld) GetG() *GroupOld_G { if m != nil { return m.G } return nil } type GroupOld_G struct { X *int32 `protobuf:"varint,2,opt,name=x" json:"x,omitempty"` XXX_unrecognized []byte `json:"-"` } func (m *GroupOld_G) Reset() { *m = GroupOld_G{} } func (m *GroupOld_G) String() string { return proto.CompactTextString(m) } func (*GroupOld_G) ProtoMessage() {} func (*GroupOld_G) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{24, 0} } func (m *GroupOld_G) GetX() int32 { if m != nil && m.X != nil { return *m.X } return 0 } type GroupNew struct { G *GroupNew_G `protobuf:"group,101,opt,name=G,json=g" json:"g,omitempty"` XXX_unrecognized []byte `json:"-"` } func (m *GroupNew) Reset() { *m = GroupNew{} } func (m *GroupNew) String() string { return proto.CompactTextString(m) } func (*GroupNew) ProtoMessage() {} func (*GroupNew) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{25} } func (m *GroupNew) GetG() *GroupNew_G { if m != nil { return m.G } return nil } type GroupNew_G struct { X *int32 `protobuf:"varint,2,opt,name=x" json:"x,omitempty"` Y *int32 `protobuf:"varint,3,opt,name=y" json:"y,omitempty"` XXX_unrecognized []byte `json:"-"` } func (m *GroupNew_G) Reset() { *m = GroupNew_G{} } func (m *GroupNew_G) String() string { return proto.CompactTextString(m) } func (*GroupNew_G) ProtoMessage() {} func (*GroupNew_G) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{25, 0} } func (m *GroupNew_G) GetX() int32 { if m != nil && m.X != nil { return *m.X } return 0 } func (m *GroupNew_G) GetY() int32 { if m != nil && m.Y != nil { return *m.Y } return 0 } type FloatingPoint struct { F *float64 `protobuf:"fixed64,1,req,name=f" json:"f,omitempty"` XXX_unrecognized []byte `json:"-"` } func (m *FloatingPoint) Reset() { *m = FloatingPoint{} } func (m *FloatingPoint) String() string { return proto.CompactTextString(m) } func (*FloatingPoint) ProtoMessage() {} func (*FloatingPoint) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{26} } func (m *FloatingPoint) GetF() float64 { if m != nil && m.F != nil { return *m.F } return 0 } type MessageWithMap struct { NameMapping map[int32]string `protobuf:"bytes,1,rep,name=name_mapping,json=nameMapping" json:"name_mapping,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` MsgMapping map[int64]*FloatingPoint `protobuf:"bytes,2,rep,name=msg_mapping,json=msgMapping" json:"msg_mapping,omitempty" protobuf_key:"zigzag64,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` ByteMapping map[bool][]byte `protobuf:"bytes,3,rep,name=byte_mapping,json=byteMapping" json:"byte_mapping,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` StrToStr map[string]string `protobuf:"bytes,4,rep,name=str_to_str,json=strToStr" json:"str_to_str,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` XXX_unrecognized []byte `json:"-"` } func (m *MessageWithMap) Reset() { *m = MessageWithMap{} } func (m *MessageWithMap) String() string { return proto.CompactTextString(m) } func (*MessageWithMap) ProtoMessage() {} func (*MessageWithMap) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{27} } func (m *MessageWithMap) GetNameMapping() map[int32]string { if m != nil { return m.NameMapping } return nil } func (m *MessageWithMap) GetMsgMapping() map[int64]*FloatingPoint { if m != nil { return m.MsgMapping } return nil } func (m *MessageWithMap) GetByteMapping() map[bool][]byte { if m != nil { return m.ByteMapping } return nil } func (m *MessageWithMap) GetStrToStr() map[string]string { if m != nil { return m.StrToStr } return nil } type Oneof struct { // Types that are valid to be assigned to Union: // *Oneof_F_Bool // *Oneof_F_Int32 // *Oneof_F_Int64 // *Oneof_F_Fixed32 // *Oneof_F_Fixed64 // *Oneof_F_Uint32 // *Oneof_F_Uint64 // *Oneof_F_Float // *Oneof_F_Double // *Oneof_F_String // *Oneof_F_Bytes // *Oneof_F_Sint32 // *Oneof_F_Sint64 // *Oneof_F_Enum // *Oneof_F_Message // *Oneof_FGroup // *Oneof_F_Largest_Tag Union isOneof_Union `protobuf_oneof:"union"` // Types that are valid to be assigned to Tormato: // *Oneof_Value Tormato isOneof_Tormato `protobuf_oneof:"tormato"` XXX_unrecognized []byte `json:"-"` } func (m *Oneof) Reset() { *m = Oneof{} } func (m *Oneof) String() string { return proto.CompactTextString(m) } func (*Oneof) ProtoMessage() {} func (*Oneof) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{28} } type isOneof_Union interface { isOneof_Union() } type isOneof_Tormato interface { isOneof_Tormato() } type Oneof_F_Bool struct { F_Bool bool `protobuf:"varint,1,opt,name=F_Bool,json=fBool,oneof"` } type Oneof_F_Int32 struct { F_Int32 int32 `protobuf:"varint,2,opt,name=F_Int32,json=fInt32,oneof"` } type Oneof_F_Int64 struct { F_Int64 int64 `protobuf:"varint,3,opt,name=F_Int64,json=fInt64,oneof"` } type Oneof_F_Fixed32 struct { F_Fixed32 uint32 `protobuf:"fixed32,4,opt,name=F_Fixed32,json=fFixed32,oneof"` } type Oneof_F_Fixed64 struct { F_Fixed64 uint64 `protobuf:"fixed64,5,opt,name=F_Fixed64,json=fFixed64,oneof"` } type Oneof_F_Uint32 struct { F_Uint32 uint32 `protobuf:"varint,6,opt,name=F_Uint32,json=fUint32,oneof"` } type Oneof_F_Uint64 struct { F_Uint64 uint64 `protobuf:"varint,7,opt,name=F_Uint64,json=fUint64,oneof"` } type Oneof_F_Float struct { F_Float float32 `protobuf:"fixed32,8,opt,name=F_Float,json=fFloat,oneof"` } type Oneof_F_Double struct { F_Double float64 `protobuf:"fixed64,9,opt,name=F_Double,json=fDouble,oneof"` } type Oneof_F_String struct { F_String string `protobuf:"bytes,10,opt,name=F_String,json=fString,oneof"` } type Oneof_F_Bytes struct { F_Bytes []byte `protobuf:"bytes,11,opt,name=F_Bytes,json=fBytes,oneof"` } type Oneof_F_Sint32 struct { F_Sint32 int32 `protobuf:"zigzag32,12,opt,name=F_Sint32,json=fSint32,oneof"` } type Oneof_F_Sint64 struct { F_Sint64 int64 `protobuf:"zigzag64,13,opt,name=F_Sint64,json=fSint64,oneof"` } type Oneof_F_Enum struct { F_Enum MyMessage_Color `protobuf:"varint,14,opt,name=F_Enum,json=fEnum,enum=testdata.MyMessage_Color,oneof"` } type Oneof_F_Message struct { F_Message *GoTestField `protobuf:"bytes,15,opt,name=F_Message,json=fMessage,oneof"` } type Oneof_FGroup struct { FGroup *Oneof_F_Group `protobuf:"group,16,opt,name=F_Group,json=fGroup,oneof"` } type Oneof_F_Largest_Tag struct { F_Largest_Tag int32 `protobuf:"varint,536870911,opt,name=F_Largest_Tag,json=fLargestTag,oneof"` } type Oneof_Value struct { Value int32 `protobuf:"varint,100,opt,name=value,oneof"` } func (*Oneof_F_Bool) isOneof_Union() {} func (*Oneof_F_Int32) isOneof_Union() {} func (*Oneof_F_Int64) isOneof_Union() {} func (*Oneof_F_Fixed32) isOneof_Union() {} func (*Oneof_F_Fixed64) isOneof_Union() {} func (*Oneof_F_Uint32) isOneof_Union() {} func (*Oneof_F_Uint64) isOneof_Union() {} func (*Oneof_F_Float) isOneof_Union() {} func (*Oneof_F_Double) isOneof_Union() {} func (*Oneof_F_String) isOneof_Union() {} func (*Oneof_F_Bytes) isOneof_Union() {} func (*Oneof_F_Sint32) isOneof_Union() {} func (*Oneof_F_Sint64) isOneof_Union() {} func (*Oneof_F_Enum) isOneof_Union() {} func (*Oneof_F_Message) isOneof_Union() {} func (*Oneof_FGroup) isOneof_Union() {} func (*Oneof_F_Largest_Tag) isOneof_Union() {} func (*Oneof_Value) isOneof_Tormato() {} func (m *Oneof) GetUnion() isOneof_Union { if m != nil { return m.Union } return nil } func (m *Oneof) GetTormato() isOneof_Tormato { if m != nil { return m.Tormato } return nil } func (m *Oneof) GetF_Bool() bool { if x, ok := m.GetUnion().(*Oneof_F_Bool); ok { return x.F_Bool } return false } func (m *Oneof) GetF_Int32() int32 { if x, ok := m.GetUnion().(*Oneof_F_Int32); ok { return x.F_Int32 } return 0 } func (m *Oneof) GetF_Int64() int64 { if x, ok := m.GetUnion().(*Oneof_F_Int64); ok { return x.F_Int64 } return 0 } func (m *Oneof) GetF_Fixed32() uint32 { if x, ok := m.GetUnion().(*Oneof_F_Fixed32); ok { return x.F_Fixed32 } return 0 } func (m *Oneof) GetF_Fixed64() uint64 { if x, ok := m.GetUnion().(*Oneof_F_Fixed64); ok { return x.F_Fixed64 } return 0 } func (m *Oneof) GetF_Uint32() uint32 { if x, ok := m.GetUnion().(*Oneof_F_Uint32); ok { return x.F_Uint32 } return 0 } func (m *Oneof) GetF_Uint64() uint64 { if x, ok := m.GetUnion().(*Oneof_F_Uint64); ok { return x.F_Uint64 } return 0 } func (m *Oneof) GetF_Float() float32 { if x, ok := m.GetUnion().(*Oneof_F_Float); ok { return x.F_Float } return 0 } func (m *Oneof) GetF_Double() float64 { if x, ok := m.GetUnion().(*Oneof_F_Double); ok { return x.F_Double } return 0 } func (m *Oneof) GetF_String() string { if x, ok := m.GetUnion().(*Oneof_F_String); ok { return x.F_String } return "" } func (m *Oneof) GetF_Bytes() []byte { if x, ok := m.GetUnion().(*Oneof_F_Bytes); ok { return x.F_Bytes } return nil } func (m *Oneof) GetF_Sint32() int32 { if x, ok := m.GetUnion().(*Oneof_F_Sint32); ok { return x.F_Sint32 } return 0 } func (m *Oneof) GetF_Sint64() int64 { if x, ok := m.GetUnion().(*Oneof_F_Sint64); ok { return x.F_Sint64 } return 0 } func (m *Oneof) GetF_Enum() MyMessage_Color { if x, ok := m.GetUnion().(*Oneof_F_Enum); ok { return x.F_Enum } return MyMessage_RED } func (m *Oneof) GetF_Message() *GoTestField { if x, ok := m.GetUnion().(*Oneof_F_Message); ok { return x.F_Message } return nil } func (m *Oneof) GetFGroup() *Oneof_F_Group { if x, ok := m.GetUnion().(*Oneof_FGroup); ok { return x.FGroup } return nil } func (m *Oneof) GetF_Largest_Tag() int32 { if x, ok := m.GetUnion().(*Oneof_F_Largest_Tag); ok { return x.F_Largest_Tag } return 0 } func (m *Oneof) GetValue() int32 { if x, ok := m.GetTormato().(*Oneof_Value); ok { return x.Value } return 0 } // XXX_OneofFuncs is for the internal use of the proto package. 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{}) { return _Oneof_OneofMarshaler, _Oneof_OneofUnmarshaler, _Oneof_OneofSizer, []interface{}{ (*Oneof_F_Bool)(nil), (*Oneof_F_Int32)(nil), (*Oneof_F_Int64)(nil), (*Oneof_F_Fixed32)(nil), (*Oneof_F_Fixed64)(nil), (*Oneof_F_Uint32)(nil), (*Oneof_F_Uint64)(nil), (*Oneof_F_Float)(nil), (*Oneof_F_Double)(nil), (*Oneof_F_String)(nil), (*Oneof_F_Bytes)(nil), (*Oneof_F_Sint32)(nil), (*Oneof_F_Sint64)(nil), (*Oneof_F_Enum)(nil), (*Oneof_F_Message)(nil), (*Oneof_FGroup)(nil), (*Oneof_F_Largest_Tag)(nil), (*Oneof_Value)(nil), } } func _Oneof_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { m := msg.(*Oneof) // union switch x := m.Union.(type) { case *Oneof_F_Bool: t := uint64(0) if x.F_Bool { t = 1 } b.EncodeVarint(1<<3 | proto.WireVarint) b.EncodeVarint(t) case *Oneof_F_Int32: b.EncodeVarint(2<<3 | proto.WireVarint) b.EncodeVarint(uint64(x.F_Int32)) case *Oneof_F_Int64: b.EncodeVarint(3<<3 | proto.WireVarint) b.EncodeVarint(uint64(x.F_Int64)) case *Oneof_F_Fixed32: b.EncodeVarint(4<<3 | proto.WireFixed32) b.EncodeFixed32(uint64(x.F_Fixed32)) case *Oneof_F_Fixed64: b.EncodeVarint(5<<3 | proto.WireFixed64) b.EncodeFixed64(uint64(x.F_Fixed64)) case *Oneof_F_Uint32: b.EncodeVarint(6<<3 | proto.WireVarint) b.EncodeVarint(uint64(x.F_Uint32)) case *Oneof_F_Uint64: b.EncodeVarint(7<<3 | proto.WireVarint) b.EncodeVarint(uint64(x.F_Uint64)) case *Oneof_F_Float: b.EncodeVarint(8<<3 | proto.WireFixed32) b.EncodeFixed32(uint64(math.Float32bits(x.F_Float))) case *Oneof_F_Double: b.EncodeVarint(9<<3 | proto.WireFixed64) b.EncodeFixed64(math.Float64bits(x.F_Double)) case *Oneof_F_String: b.EncodeVarint(10<<3 | proto.WireBytes) b.EncodeStringBytes(x.F_String) case *Oneof_F_Bytes: b.EncodeVarint(11<<3 | proto.WireBytes) b.EncodeRawBytes(x.F_Bytes) case *Oneof_F_Sint32: b.EncodeVarint(12<<3 | proto.WireVarint) b.EncodeZigzag32(uint64(x.F_Sint32)) case *Oneof_F_Sint64: b.EncodeVarint(13<<3 | proto.WireVarint) b.EncodeZigzag64(uint64(x.F_Sint64)) case *Oneof_F_Enum: b.EncodeVarint(14<<3 | proto.WireVarint) b.EncodeVarint(uint64(x.F_Enum)) case *Oneof_F_Message: b.EncodeVarint(15<<3 | proto.WireBytes) if err := b.EncodeMessage(x.F_Message); err != nil { return err } case *Oneof_FGroup: b.EncodeVarint(16<<3 | proto.WireStartGroup) if err := b.Marshal(x.FGroup); err != nil { return err } b.EncodeVarint(16<<3 | proto.WireEndGroup) case *Oneof_F_Largest_Tag: b.EncodeVarint(536870911<<3 | proto.WireVarint) b.EncodeVarint(uint64(x.F_Largest_Tag)) case nil: default: return fmt.Errorf("Oneof.Union has unexpected type %T", x) } // tormato switch x := m.Tormato.(type) { case *Oneof_Value: b.EncodeVarint(100<<3 | proto.WireVarint) b.EncodeVarint(uint64(x.Value)) case nil: default: return fmt.Errorf("Oneof.Tormato has unexpected type %T", x) } return nil } func _Oneof_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { m := msg.(*Oneof) switch tag { case 1: // union.F_Bool if wire != proto.WireVarint { return true, proto.ErrInternalBadWireType } x, err := b.DecodeVarint() m.Union = &Oneof_F_Bool{x != 0} return true, err case 2: // union.F_Int32 if wire != proto.WireVarint { return true, proto.ErrInternalBadWireType } x, err := b.DecodeVarint() m.Union = &Oneof_F_Int32{int32(x)} return true, err case 3: // union.F_Int64 if wire != proto.WireVarint { return true, proto.ErrInternalBadWireType } x, err := b.DecodeVarint() m.Union = &Oneof_F_Int64{int64(x)} return true, err case 4: // union.F_Fixed32 if wire != proto.WireFixed32 { return true, proto.ErrInternalBadWireType } x, err := b.DecodeFixed32() m.Union = &Oneof_F_Fixed32{uint32(x)} return true, err case 5: // union.F_Fixed64 if wire != proto.WireFixed64 { return true, proto.ErrInternalBadWireType } x, err := b.DecodeFixed64() m.Union = &Oneof_F_Fixed64{x} return true, err case 6: // union.F_Uint32 if wire != proto.WireVarint { return true, proto.ErrInternalBadWireType } x, err := b.DecodeVarint() m.Union = &Oneof_F_Uint32{uint32(x)} return true, err case 7: // union.F_Uint64 if wire != proto.WireVarint { return true, proto.ErrInternalBadWireType } x, err := b.DecodeVarint() m.Union = &Oneof_F_Uint64{x} return true, err case 8: // union.F_Float if wire != proto.WireFixed32 { return true, proto.ErrInternalBadWireType } x, err := b.DecodeFixed32() m.Union = &Oneof_F_Float{math.Float32frombits(uint32(x))} return true, err case 9: // union.F_Double if wire != proto.WireFixed64 { return true, proto.ErrInternalBadWireType } x, err := b.DecodeFixed64() m.Union = &Oneof_F_Double{math.Float64frombits(x)} return true, err case 10: // union.F_String if wire != proto.WireBytes { return true, proto.ErrInternalBadWireType } x, err := b.DecodeStringBytes() m.Union = &Oneof_F_String{x} return true, err case 11: // union.F_Bytes if wire != proto.WireBytes { return true, proto.ErrInternalBadWireType } x, err := b.DecodeRawBytes(true) m.Union = &Oneof_F_Bytes{x} return true, err case 12: // union.F_Sint32 if wire != proto.WireVarint { return true, proto.ErrInternalBadWireType } x, err := b.DecodeZigzag32() m.Union = &Oneof_F_Sint32{int32(x)} return true, err case 13: // union.F_Sint64 if wire != proto.WireVarint { return true, proto.ErrInternalBadWireType } x, err := b.DecodeZigzag64() m.Union = &Oneof_F_Sint64{int64(x)} return true, err case 14: // union.F_Enum if wire != proto.WireVarint { return true, proto.ErrInternalBadWireType } x, err := b.DecodeVarint() m.Union = &Oneof_F_Enum{MyMessage_Color(x)} return true, err case 15: // union.F_Message if wire != proto.WireBytes { return true, proto.ErrInternalBadWireType } msg := new(GoTestField) err := b.DecodeMessage(msg) m.Union = &Oneof_F_Message{msg} return true, err case 16: // union.f_group if wire != proto.WireStartGroup { return true, proto.ErrInternalBadWireType } msg := new(Oneof_F_Group) err := b.DecodeGroup(msg) m.Union = &Oneof_FGroup{msg} return true, err case 536870911: // union.F_Largest_Tag if wire != proto.WireVarint { return true, proto.ErrInternalBadWireType } x, err := b.DecodeVarint() m.Union = &Oneof_F_Largest_Tag{int32(x)} return true, err case 100: // tormato.value if wire != proto.WireVarint { return true, proto.ErrInternalBadWireType } x, err := b.DecodeVarint() m.Tormato = &Oneof_Value{int32(x)} return true, err default: return false, nil } } func _Oneof_OneofSizer(msg proto.Message) (n int) { m := msg.(*Oneof) // union switch x := m.Union.(type) { case *Oneof_F_Bool: n += proto.SizeVarint(1<<3 | proto.WireVarint) n += 1 case *Oneof_F_Int32: n += proto.SizeVarint(2<<3 | proto.WireVarint) n += proto.SizeVarint(uint64(x.F_Int32)) case *Oneof_F_Int64: n += proto.SizeVarint(3<<3 | proto.WireVarint) n += proto.SizeVarint(uint64(x.F_Int64)) case *Oneof_F_Fixed32: n += proto.SizeVarint(4<<3 | proto.WireFixed32) n += 4 case *Oneof_F_Fixed64: n += proto.SizeVarint(5<<3 | proto.WireFixed64) n += 8 case *Oneof_F_Uint32: n += proto.SizeVarint(6<<3 | proto.WireVarint) n += proto.SizeVarint(uint64(x.F_Uint32)) case *Oneof_F_Uint64: n += proto.SizeVarint(7<<3 | proto.WireVarint) n += proto.SizeVarint(uint64(x.F_Uint64)) case *Oneof_F_Float: n += proto.SizeVarint(8<<3 | proto.WireFixed32) n += 4 case *Oneof_F_Double: n += proto.SizeVarint(9<<3 | proto.WireFixed64) n += 8 case *Oneof_F_String: n += proto.SizeVarint(10<<3 | proto.WireBytes) n += proto.SizeVarint(uint64(len(x.F_String))) n += len(x.F_String) case *Oneof_F_Bytes: n += proto.SizeVarint(11<<3 | proto.WireBytes) n += proto.SizeVarint(uint64(len(x.F_Bytes))) n += len(x.F_Bytes) case *Oneof_F_Sint32: n += proto.SizeVarint(12<<3 | proto.WireVarint) n += proto.SizeVarint(uint64((uint32(x.F_Sint32) << 1) ^ uint32((int32(x.F_Sint32) >> 31)))) case *Oneof_F_Sint64: n += proto.SizeVarint(13<<3 | proto.WireVarint) n += proto.SizeVarint(uint64(uint64(x.F_Sint64<<1) ^ uint64((int64(x.F_Sint64) >> 63)))) case *Oneof_F_Enum: n += proto.SizeVarint(14<<3 | proto.WireVarint) n += proto.SizeVarint(uint64(x.F_Enum)) case *Oneof_F_Message: s := proto.Size(x.F_Message) n += proto.SizeVarint(15<<3 | proto.WireBytes) n += proto.SizeVarint(uint64(s)) n += s case *Oneof_FGroup: n += proto.SizeVarint(16<<3 | proto.WireStartGroup) n += proto.Size(x.FGroup) n += proto.SizeVarint(16<<3 | proto.WireEndGroup) case *Oneof_F_Largest_Tag: n += proto.SizeVarint(536870911<<3 | proto.WireVarint) n += proto.SizeVarint(uint64(x.F_Largest_Tag)) case nil: default: panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) } // tormato switch x := m.Tormato.(type) { case *Oneof_Value: n += proto.SizeVarint(100<<3 | proto.WireVarint) n += proto.SizeVarint(uint64(x.Value)) case nil: default: panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) } return n } type Oneof_F_Group struct { X *int32 `protobuf:"varint,17,opt,name=x" json:"x,omitempty"` XXX_unrecognized []byte `json:"-"` } func (m *Oneof_F_Group) Reset() { *m = Oneof_F_Group{} } func (m *Oneof_F_Group) String() string { return proto.CompactTextString(m) } func (*Oneof_F_Group) ProtoMessage() {} func (*Oneof_F_Group) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{28, 0} } func (m *Oneof_F_Group) GetX() int32 { if m != nil && m.X != nil { return *m.X } return 0 } type Communique struct { MakeMeCry *bool `protobuf:"varint,1,opt,name=make_me_cry,json=makeMeCry" json:"make_me_cry,omitempty"` // This is a oneof, called "union". // // Types that are valid to be assigned to Union: // *Communique_Number // *Communique_Name // *Communique_Data // *Communique_TempC // *Communique_Col // *Communique_Msg Union isCommunique_Union `protobuf_oneof:"union"` XXX_unrecognized []byte `json:"-"` } func (m *Communique) Reset() { *m = Communique{} } func (m *Communique) String() string { return proto.CompactTextString(m) } func (*Communique) ProtoMessage() {} func (*Communique) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{29} } type isCommunique_Union interface { isCommunique_Union() } type Communique_Number struct { Number int32 `protobuf:"varint,5,opt,name=number,oneof"` } type Communique_Name struct { Name string `protobuf:"bytes,6,opt,name=name,oneof"` } type Communique_Data struct { Data []byte `protobuf:"bytes,7,opt,name=data,oneof"` } type Communique_TempC struct { TempC float64 `protobuf:"fixed64,8,opt,name=temp_c,json=tempC,oneof"` } type Communique_Col struct { Col MyMessage_Color `protobuf:"varint,9,opt,name=col,enum=testdata.MyMessage_Color,oneof"` } type Communique_Msg struct { Msg *Strings `protobuf:"bytes,10,opt,name=msg,oneof"` } func (*Communique_Number) isCommunique_Union() {} func (*Communique_Name) isCommunique_Union() {} func (*Communique_Data) isCommunique_Union() {} func (*Communique_TempC) isCommunique_Union() {} func (*Communique_Col) isCommunique_Union() {} func (*Communique_Msg) isCommunique_Union() {} func (m *Communique) GetUnion() isCommunique_Union { if m != nil { return m.Union } return nil } func (m *Communique) GetMakeMeCry() bool { if m != nil && m.MakeMeCry != nil { return *m.MakeMeCry } return false } func (m *Communique) GetNumber() int32 { if x, ok := m.GetUnion().(*Communique_Number); ok { return x.Number } return 0 } func (m *Communique) GetName() string { if x, ok := m.GetUnion().(*Communique_Name); ok { return x.Name } return "" } func (m *Communique) GetData() []byte { if x, ok := m.GetUnion().(*Communique_Data); ok { return x.Data } return nil } func (m *Communique) GetTempC() float64 { if x, ok := m.GetUnion().(*Communique_TempC); ok { return x.TempC } return 0 } func (m *Communique) GetCol() MyMessage_Color { if x, ok := m.GetUnion().(*Communique_Col); ok { return x.Col } return MyMessage_RED } func (m *Communique) GetMsg() *Strings { if x, ok := m.GetUnion().(*Communique_Msg); ok { return x.Msg } return nil } // XXX_OneofFuncs is for the internal use of the proto package. 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{}) { return _Communique_OneofMarshaler, _Communique_OneofUnmarshaler, _Communique_OneofSizer, []interface{}{ (*Communique_Number)(nil), (*Communique_Name)(nil), (*Communique_Data)(nil), (*Communique_TempC)(nil), (*Communique_Col)(nil), (*Communique_Msg)(nil), } } func _Communique_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { m := msg.(*Communique) // union switch x := m.Union.(type) { case *Communique_Number: b.EncodeVarint(5<<3 | proto.WireVarint) b.EncodeVarint(uint64(x.Number)) case *Communique_Name: b.EncodeVarint(6<<3 | proto.WireBytes) b.EncodeStringBytes(x.Name) case *Communique_Data: b.EncodeVarint(7<<3 | proto.WireBytes) b.EncodeRawBytes(x.Data) case *Communique_TempC: b.EncodeVarint(8<<3 | proto.WireFixed64) b.EncodeFixed64(math.Float64bits(x.TempC)) case *Communique_Col: b.EncodeVarint(9<<3 | proto.WireVarint) b.EncodeVarint(uint64(x.Col)) case *Communique_Msg: b.EncodeVarint(10<<3 | proto.WireBytes) if err := b.EncodeMessage(x.Msg); err != nil { return err } case nil: default: return fmt.Errorf("Communique.Union has unexpected type %T", x) } return nil } func _Communique_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { m := msg.(*Communique) switch tag { case 5: // union.number if wire != proto.WireVarint { return true, proto.ErrInternalBadWireType } x, err := b.DecodeVarint() m.Union = &Communique_Number{int32(x)} return true, err case 6: // union.name if wire != proto.WireBytes { return true, proto.ErrInternalBadWireType } x, err := b.DecodeStringBytes() m.Union = &Communique_Name{x} return true, err case 7: // union.data if wire != proto.WireBytes { return true, proto.ErrInternalBadWireType } x, err := b.DecodeRawBytes(true) m.Union = &Communique_Data{x} return true, err case 8: // union.temp_c if wire != proto.WireFixed64 { return true, proto.ErrInternalBadWireType } x, err := b.DecodeFixed64() m.Union = &Communique_TempC{math.Float64frombits(x)} return true, err case 9: // union.col if wire != proto.WireVarint { return true, proto.ErrInternalBadWireType } x, err := b.DecodeVarint() m.Union = &Communique_Col{MyMessage_Color(x)} return true, err case 10: // union.msg if wire != proto.WireBytes { return true, proto.ErrInternalBadWireType } msg := new(Strings) err := b.DecodeMessage(msg) m.Union = &Communique_Msg{msg} return true, err default: return false, nil } } func _Communique_OneofSizer(msg proto.Message) (n int) { m := msg.(*Communique) // union switch x := m.Union.(type) { case *Communique_Number: n += proto.SizeVarint(5<<3 | proto.WireVarint) n += proto.SizeVarint(uint64(x.Number)) case *Communique_Name: n += proto.SizeVarint(6<<3 | proto.WireBytes) n += proto.SizeVarint(uint64(len(x.Name))) n += len(x.Name) case *Communique_Data: n += proto.SizeVarint(7<<3 | proto.WireBytes) n += proto.SizeVarint(uint64(len(x.Data))) n += len(x.Data) case *Communique_TempC: n += proto.SizeVarint(8<<3 | proto.WireFixed64) n += 8 case *Communique_Col: n += proto.SizeVarint(9<<3 | proto.WireVarint) n += proto.SizeVarint(uint64(x.Col)) case *Communique_Msg: s := proto.Size(x.Msg) n += proto.SizeVarint(10<<3 | proto.WireBytes) n += proto.SizeVarint(uint64(s)) n += s case nil: default: panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) } return n } var E_Greeting = &proto.ExtensionDesc{ ExtendedType: (*MyMessage)(nil), ExtensionType: ([]string)(nil), Field: 106, Name: "testdata.greeting", Tag: "bytes,106,rep,name=greeting", } var E_Complex = &proto.ExtensionDesc{ ExtendedType: (*OtherMessage)(nil), ExtensionType: (*ComplexExtension)(nil), Field: 200, Name: "testdata.complex", Tag: "bytes,200,opt,name=complex", } var E_RComplex = &proto.ExtensionDesc{ ExtendedType: (*OtherMessage)(nil), ExtensionType: ([]*ComplexExtension)(nil), Field: 201, Name: "testdata.r_complex", Tag: "bytes,201,rep,name=r_complex,json=rComplex", } var E_NoDefaultDouble = &proto.ExtensionDesc{ ExtendedType: (*DefaultsMessage)(nil), ExtensionType: (*float64)(nil), Field: 101, Name: "testdata.no_default_double", Tag: "fixed64,101,opt,name=no_default_double,json=noDefaultDouble", } var E_NoDefaultFloat = &proto.ExtensionDesc{ ExtendedType: (*DefaultsMessage)(nil), ExtensionType: (*float32)(nil), Field: 102, Name: "testdata.no_default_float", Tag: "fixed32,102,opt,name=no_default_float,json=noDefaultFloat", } var E_NoDefaultInt32 = &proto.ExtensionDesc{ ExtendedType: (*DefaultsMessage)(nil), ExtensionType: (*int32)(nil), Field: 103, Name: "testdata.no_default_int32", Tag: "varint,103,opt,name=no_default_int32,json=noDefaultInt32", } var E_NoDefaultInt64 = &proto.ExtensionDesc{ ExtendedType: (*DefaultsMessage)(nil), ExtensionType: (*int64)(nil), Field: 104, Name: "testdata.no_default_int64", Tag: "varint,104,opt,name=no_default_int64,json=noDefaultInt64", } var E_NoDefaultUint32 = &proto.ExtensionDesc{ ExtendedType: (*DefaultsMessage)(nil), ExtensionType: (*uint32)(nil), Field: 105, Name: "testdata.no_default_uint32", Tag: "varint,105,opt,name=no_default_uint32,json=noDefaultUint32", } var E_NoDefaultUint64 = &proto.ExtensionDesc{ ExtendedType: (*DefaultsMessage)(nil), ExtensionType: (*uint64)(nil), Field: 106, Name: "testdata.no_default_uint64", Tag: "varint,106,opt,name=no_default_uint64,json=noDefaultUint64", } var E_NoDefaultSint32 = &proto.ExtensionDesc{ ExtendedType: (*DefaultsMessage)(nil), ExtensionType: (*int32)(nil), Field: 107, Name: "testdata.no_default_sint32", Tag: "zigzag32,107,opt,name=no_default_sint32,json=noDefaultSint32", } var E_NoDefaultSint64 = &proto.ExtensionDesc{ ExtendedType: (*DefaultsMessage)(nil), ExtensionType: (*int64)(nil), Field: 108, Name: "testdata.no_default_sint64", Tag: "zigzag64,108,opt,name=no_default_sint64,json=noDefaultSint64", } var E_NoDefaultFixed32 = &proto.ExtensionDesc{ ExtendedType: (*DefaultsMessage)(nil), ExtensionType: (*uint32)(nil), Field: 109, Name: "testdata.no_default_fixed32", Tag: "fixed32,109,opt,name=no_default_fixed32,json=noDefaultFixed32", } var E_NoDefaultFixed64 = &proto.ExtensionDesc{ ExtendedType: (*DefaultsMessage)(nil), ExtensionType: (*uint64)(nil), Field: 110, Name: "testdata.no_default_fixed64", Tag: "fixed64,110,opt,name=no_default_fixed64,json=noDefaultFixed64", } var E_NoDefaultSfixed32 = &proto.ExtensionDesc{ ExtendedType: (*DefaultsMessage)(nil), ExtensionType: (*int32)(nil), Field: 111, Name: "testdata.no_default_sfixed32", Tag: "fixed32,111,opt,name=no_default_sfixed32,json=noDefaultSfixed32", } var E_NoDefaultSfixed64 = &proto.ExtensionDesc{ ExtendedType: (*DefaultsMessage)(nil), ExtensionType: (*int64)(nil), Field: 112, Name: "testdata.no_default_sfixed64", Tag: "fixed64,112,opt,name=no_default_sfixed64,json=noDefaultSfixed64", } var E_NoDefaultBool = &proto.ExtensionDesc{ ExtendedType: (*DefaultsMessage)(nil), ExtensionType: (*bool)(nil), Field: 113, Name: "testdata.no_default_bool", Tag: "varint,113,opt,name=no_default_bool,json=noDefaultBool", } var E_NoDefaultString = &proto.ExtensionDesc{ ExtendedType: (*DefaultsMessage)(nil), ExtensionType: (*string)(nil), Field: 114, Name: "testdata.no_default_string", Tag: "bytes,114,opt,name=no_default_string,json=noDefaultString", } var E_NoDefaultBytes = &proto.ExtensionDesc{ ExtendedType: (*DefaultsMessage)(nil), ExtensionType: ([]byte)(nil), Field: 115, Name: "testdata.no_default_bytes", Tag: "bytes,115,opt,name=no_default_bytes,json=noDefaultBytes", } var E_NoDefaultEnum = &proto.ExtensionDesc{ ExtendedType: (*DefaultsMessage)(nil), ExtensionType: (*DefaultsMessage_DefaultsEnum)(nil), Field: 116, Name: "testdata.no_default_enum", Tag: "varint,116,opt,name=no_default_enum,json=noDefaultEnum,enum=testdata.DefaultsMessage_DefaultsEnum", } var E_DefaultDouble = &proto.ExtensionDesc{ ExtendedType: (*DefaultsMessage)(nil), ExtensionType: (*float64)(nil), Field: 201, Name: "testdata.default_double", Tag: "fixed64,201,opt,name=default_double,json=defaultDouble,def=3.1415", } var E_DefaultFloat = &proto.ExtensionDesc{ ExtendedType: (*DefaultsMessage)(nil), ExtensionType: (*float32)(nil), Field: 202, Name: "testdata.default_float", Tag: "fixed32,202,opt,name=default_float,json=defaultFloat,def=3.14", } var E_DefaultInt32 = &proto.ExtensionDesc{ ExtendedType: (*DefaultsMessage)(nil), ExtensionType: (*int32)(nil), Field: 203, Name: "testdata.default_int32", Tag: "varint,203,opt,name=default_int32,json=defaultInt32,def=42", } var E_DefaultInt64 = &proto.ExtensionDesc{ ExtendedType: (*DefaultsMessage)(nil), ExtensionType: (*int64)(nil), Field: 204, Name: "testdata.default_int64", Tag: "varint,204,opt,name=default_int64,json=defaultInt64,def=43", } var E_DefaultUint32 = &proto.ExtensionDesc{ ExtendedType: (*DefaultsMessage)(nil), ExtensionType: (*uint32)(nil), Field: 205, Name: "testdata.default_uint32", Tag: "varint,205,opt,name=default_uint32,json=defaultUint32,def=44", } var E_DefaultUint64 = &proto.ExtensionDesc{ ExtendedType: (*DefaultsMessage)(nil), ExtensionType: (*uint64)(nil), Field: 206, Name: "testdata.default_uint64", Tag: "varint,206,opt,name=default_uint64,json=defaultUint64,def=45", } var E_DefaultSint32 = &proto.ExtensionDesc{ ExtendedType: (*DefaultsMessage)(nil), ExtensionType: (*int32)(nil), Field: 207, Name: "testdata.default_sint32", Tag: "zigzag32,207,opt,name=default_sint32,json=defaultSint32,def=46", } var E_DefaultSint64 = &proto.ExtensionDesc{ ExtendedType: (*DefaultsMessage)(nil), ExtensionType: (*int64)(nil), Field: 208, Name: "testdata.default_sint64", Tag: "zigzag64,208,opt,name=default_sint64,json=defaultSint64,def=47", } var E_DefaultFixed32 = &proto.ExtensionDesc{ ExtendedType: (*DefaultsMessage)(nil), ExtensionType: (*uint32)(nil), Field: 209, Name: "testdata.default_fixed32", Tag: "fixed32,209,opt,name=default_fixed32,json=defaultFixed32,def=48", } var E_DefaultFixed64 = &proto.ExtensionDesc{ ExtendedType: (*DefaultsMessage)(nil), ExtensionType: (*uint64)(nil), Field: 210, Name: "testdata.default_fixed64", Tag: "fixed64,210,opt,name=default_fixed64,json=defaultFixed64,def=49", } var E_DefaultSfixed32 = &proto.ExtensionDesc{ ExtendedType: (*DefaultsMessage)(nil), ExtensionType: (*int32)(nil), Field: 211, Name: "testdata.default_sfixed32", Tag: "fixed32,211,opt,name=default_sfixed32,json=defaultSfixed32,def=50", } var E_DefaultSfixed64 = &proto.ExtensionDesc{ ExtendedType: (*DefaultsMessage)(nil), ExtensionType: (*int64)(nil), Field: 212, Name: "testdata.default_sfixed64", Tag: "fixed64,212,opt,name=default_sfixed64,json=defaultSfixed64,def=51", } var E_DefaultBool = &proto.ExtensionDesc{ ExtendedType: (*DefaultsMessage)(nil), ExtensionType: (*bool)(nil), Field: 213, Name: "testdata.default_bool", Tag: "varint,213,opt,name=default_bool,json=defaultBool,def=1", } var E_DefaultString = &proto.ExtensionDesc{ ExtendedType: (*DefaultsMessage)(nil), ExtensionType: (*string)(nil), Field: 214, Name: "testdata.default_string", Tag: "bytes,214,opt,name=default_string,json=defaultString,def=Hello, string", } var E_DefaultBytes = &proto.ExtensionDesc{ ExtendedType: (*DefaultsMessage)(nil), ExtensionType: ([]byte)(nil), Field: 215, Name: "testdata.default_bytes", Tag: "bytes,215,opt,name=default_bytes,json=defaultBytes,def=Hello, bytes", } var E_DefaultEnum = &proto.ExtensionDesc{ ExtendedType: (*DefaultsMessage)(nil), ExtensionType: (*DefaultsMessage_DefaultsEnum)(nil), Field: 216, Name: "testdata.default_enum", Tag: "varint,216,opt,name=default_enum,json=defaultEnum,enum=testdata.DefaultsMessage_DefaultsEnum,def=1", } var E_X201 = &proto.ExtensionDesc{ ExtendedType: (*MyMessageSet)(nil), ExtensionType: (*Empty)(nil), Field: 201, Name: "testdata.x201", Tag: "bytes,201,opt,name=x201", } var E_X202 = &proto.ExtensionDesc{ ExtendedType: (*MyMessageSet)(nil), ExtensionType: (*Empty)(nil), Field: 202, Name: "testdata.x202", Tag: "bytes,202,opt,name=x202", } var E_X203 = &proto.ExtensionDesc{ ExtendedType: (*MyMessageSet)(nil), ExtensionType: (*Empty)(nil), Field: 203, Name: "testdata.x203", Tag: "bytes,203,opt,name=x203", } var E_X204 = &proto.ExtensionDesc{ ExtendedType: (*MyMessageSet)(nil), ExtensionType: (*Empty)(nil), Field: 204, Name: "testdata.x204", Tag: "bytes,204,opt,name=x204", } var E_X205 = &proto.ExtensionDesc{ ExtendedType: (*MyMessageSet)(nil), ExtensionType: (*Empty)(nil), Field: 205, Name: "testdata.x205", Tag: "bytes,205,opt,name=x205", } var E_X206 = &proto.ExtensionDesc{ ExtendedType: (*MyMessageSet)(nil), ExtensionType: (*Empty)(nil), Field: 206, Name: "testdata.x206", Tag: "bytes,206,opt,name=x206", } var E_X207 = &proto.ExtensionDesc{ ExtendedType: (*MyMessageSet)(nil), ExtensionType: (*Empty)(nil), Field: 207, Name: "testdata.x207", Tag: "bytes,207,opt,name=x207", } var E_X208 = &proto.ExtensionDesc{ ExtendedType: (*MyMessageSet)(nil), ExtensionType: (*Empty)(nil), Field: 208, Name: "testdata.x208", Tag: "bytes,208,opt,name=x208", } var E_X209 = &proto.ExtensionDesc{ ExtendedType: (*MyMessageSet)(nil), ExtensionType: (*Empty)(nil), Field: 209, Name: "testdata.x209", Tag: "bytes,209,opt,name=x209", } var E_X210 = &proto.ExtensionDesc{ ExtendedType: (*MyMessageSet)(nil), ExtensionType: (*Empty)(nil), Field: 210, Name: "testdata.x210", Tag: "bytes,210,opt,name=x210", } var E_X211 = &proto.ExtensionDesc{ ExtendedType: (*MyMessageSet)(nil), ExtensionType: (*Empty)(nil), Field: 211, Name: "testdata.x211", Tag: "bytes,211,opt,name=x211", } var E_X212 = &proto.ExtensionDesc{ ExtendedType: (*MyMessageSet)(nil), ExtensionType: (*Empty)(nil), Field: 212, Name: "testdata.x212", Tag: "bytes,212,opt,name=x212", } var E_X213 = &proto.ExtensionDesc{ ExtendedType: (*MyMessageSet)(nil), ExtensionType: (*Empty)(nil), Field: 213, Name: "testdata.x213", Tag: "bytes,213,opt,name=x213", } var E_X214 = &proto.ExtensionDesc{ ExtendedType: (*MyMessageSet)(nil), ExtensionType: (*Empty)(nil), Field: 214, Name: "testdata.x214", Tag: "bytes,214,opt,name=x214", } var E_X215 = &proto.ExtensionDesc{ ExtendedType: (*MyMessageSet)(nil), ExtensionType: (*Empty)(nil), Field: 215, Name: "testdata.x215", Tag: "bytes,215,opt,name=x215", } var E_X216 = &proto.ExtensionDesc{ ExtendedType: (*MyMessageSet)(nil), ExtensionType: (*Empty)(nil), Field: 216, Name: "testdata.x216", Tag: "bytes,216,opt,name=x216", } var E_X217 = &proto.ExtensionDesc{ ExtendedType: (*MyMessageSet)(nil), ExtensionType: (*Empty)(nil), Field: 217, Name: "testdata.x217", Tag: "bytes,217,opt,name=x217", } var E_X218 = &proto.ExtensionDesc{ ExtendedType: (*MyMessageSet)(nil), ExtensionType: (*Empty)(nil), Field: 218, Name: "testdata.x218", Tag: "bytes,218,opt,name=x218", } var E_X219 = &proto.ExtensionDesc{ ExtendedType: (*MyMessageSet)(nil), ExtensionType: (*Empty)(nil), Field: 219, Name: "testdata.x219", Tag: "bytes,219,opt,name=x219", } var E_X220 = &proto.ExtensionDesc{ ExtendedType: (*MyMessageSet)(nil), ExtensionType: (*Empty)(nil), Field: 220, Name: "testdata.x220", Tag: "bytes,220,opt,name=x220", } var E_X221 = &proto.ExtensionDesc{ ExtendedType: (*MyMessageSet)(nil), ExtensionType: (*Empty)(nil), Field: 221, Name: "testdata.x221", Tag: "bytes,221,opt,name=x221", } var E_X222 = &proto.ExtensionDesc{ ExtendedType: (*MyMessageSet)(nil), ExtensionType: (*Empty)(nil), Field: 222, Name: "testdata.x222", Tag: "bytes,222,opt,name=x222", } var E_X223 = &proto.ExtensionDesc{ ExtendedType: (*MyMessageSet)(nil), ExtensionType: (*Empty)(nil), Field: 223, Name: "testdata.x223", Tag: "bytes,223,opt,name=x223", } var E_X224 = &proto.ExtensionDesc{ ExtendedType: (*MyMessageSet)(nil), ExtensionType: (*Empty)(nil), Field: 224, Name: "testdata.x224", Tag: "bytes,224,opt,name=x224", } var E_X225 = &proto.ExtensionDesc{ ExtendedType: (*MyMessageSet)(nil), ExtensionType: (*Empty)(nil), Field: 225, Name: "testdata.x225", Tag: "bytes,225,opt,name=x225", } var E_X226 = &proto.ExtensionDesc{ ExtendedType: (*MyMessageSet)(nil), ExtensionType: (*Empty)(nil), Field: 226, Name: "testdata.x226", Tag: "bytes,226,opt,name=x226", } var E_X227 = &proto.ExtensionDesc{ ExtendedType: (*MyMessageSet)(nil), ExtensionType: (*Empty)(nil), Field: 227, Name: "testdata.x227", Tag: "bytes,227,opt,name=x227", } var E_X228 = &proto.ExtensionDesc{ ExtendedType: (*MyMessageSet)(nil), ExtensionType: (*Empty)(nil), Field: 228, Name: "testdata.x228", Tag: "bytes,228,opt,name=x228", } var E_X229 = &proto.ExtensionDesc{ ExtendedType: (*MyMessageSet)(nil), ExtensionType: (*Empty)(nil), Field: 229, Name: "testdata.x229", Tag: "bytes,229,opt,name=x229", } var E_X230 = &proto.ExtensionDesc{ ExtendedType: (*MyMessageSet)(nil), ExtensionType: (*Empty)(nil), Field: 230, Name: "testdata.x230", Tag: "bytes,230,opt,name=x230", } var E_X231 = &proto.ExtensionDesc{ ExtendedType: (*MyMessageSet)(nil), ExtensionType: (*Empty)(nil), Field: 231, Name: "testdata.x231", Tag: "bytes,231,opt,name=x231", } var E_X232 = &proto.ExtensionDesc{ ExtendedType: (*MyMessageSet)(nil), ExtensionType: (*Empty)(nil), Field: 232, Name: "testdata.x232", Tag: "bytes,232,opt,name=x232", } var E_X233 = &proto.ExtensionDesc{ ExtendedType: (*MyMessageSet)(nil), ExtensionType: (*Empty)(nil), Field: 233, Name: "testdata.x233", Tag: "bytes,233,opt,name=x233", } var E_X234 = &proto.ExtensionDesc{ ExtendedType: (*MyMessageSet)(nil), ExtensionType: (*Empty)(nil), Field: 234, Name: "testdata.x234", Tag: "bytes,234,opt,name=x234", } var E_X235 = &proto.ExtensionDesc{ ExtendedType: (*MyMessageSet)(nil), ExtensionType: (*Empty)(nil), Field: 235, Name: "testdata.x235", Tag: "bytes,235,opt,name=x235", } var E_X236 = &proto.ExtensionDesc{ ExtendedType: (*MyMessageSet)(nil), ExtensionType: (*Empty)(nil), Field: 236, Name: "testdata.x236", Tag: "bytes,236,opt,name=x236", } var E_X237 = &proto.ExtensionDesc{ ExtendedType: (*MyMessageSet)(nil), ExtensionType: (*Empty)(nil), Field: 237, Name: "testdata.x237", Tag: "bytes,237,opt,name=x237", } var E_X238 = &proto.ExtensionDesc{ ExtendedType: (*MyMessageSet)(nil), ExtensionType: (*Empty)(nil), Field: 238, Name: "testdata.x238", Tag: "bytes,238,opt,name=x238", } var E_X239 = &proto.ExtensionDesc{ ExtendedType: (*MyMessageSet)(nil), ExtensionType: (*Empty)(nil), Field: 239, Name: "testdata.x239", Tag: "bytes,239,opt,name=x239", } var E_X240 = &proto.ExtensionDesc{ ExtendedType: (*MyMessageSet)(nil), ExtensionType: (*Empty)(nil), Field: 240, Name: "testdata.x240", Tag: "bytes,240,opt,name=x240", } var E_X241 = &proto.ExtensionDesc{ ExtendedType: (*MyMessageSet)(nil), ExtensionType: (*Empty)(nil), Field: 241, Name: "testdata.x241", Tag: "bytes,241,opt,name=x241", } var E_X242 = &proto.ExtensionDesc{ ExtendedType: (*MyMessageSet)(nil), ExtensionType: (*Empty)(nil), Field: 242, Name: "testdata.x242", Tag: "bytes,242,opt,name=x242", } var E_X243 = &proto.ExtensionDesc{ ExtendedType: (*MyMessageSet)(nil), ExtensionType: (*Empty)(nil), Field: 243, Name: "testdata.x243", Tag: "bytes,243,opt,name=x243", } var E_X244 = &proto.ExtensionDesc{ ExtendedType: (*MyMessageSet)(nil), ExtensionType: (*Empty)(nil), Field: 244, Name: "testdata.x244", Tag: "bytes,244,opt,name=x244", } var E_X245 = &proto.ExtensionDesc{ ExtendedType: (*MyMessageSet)(nil), ExtensionType: (*Empty)(nil), Field: 245, Name: "testdata.x245", Tag: "bytes,245,opt,name=x245", } var E_X246 = &proto.ExtensionDesc{ ExtendedType: (*MyMessageSet)(nil), ExtensionType: (*Empty)(nil), Field: 246, Name: "testdata.x246", Tag: "bytes,246,opt,name=x246", } var E_X247 = &proto.ExtensionDesc{ ExtendedType: (*MyMessageSet)(nil), ExtensionType: (*Empty)(nil), Field: 247, Name: "testdata.x247", Tag: "bytes,247,opt,name=x247", } var E_X248 = &proto.ExtensionDesc{ ExtendedType: (*MyMessageSet)(nil), ExtensionType: (*Empty)(nil), Field: 248, Name: "testdata.x248", Tag: "bytes,248,opt,name=x248", } var E_X249 = &proto.ExtensionDesc{ ExtendedType: (*MyMessageSet)(nil), ExtensionType: (*Empty)(nil), Field: 249, Name: "testdata.x249", Tag: "bytes,249,opt,name=x249", } var E_X250 = &proto.ExtensionDesc{ ExtendedType: (*MyMessageSet)(nil), ExtensionType: (*Empty)(nil), Field: 250, Name: "testdata.x250", Tag: "bytes,250,opt,name=x250", } func init() { proto.RegisterType((*GoEnum)(nil), "testdata.GoEnum") proto.RegisterType((*GoTestField)(nil), "testdata.GoTestField") proto.RegisterType((*GoTest)(nil), "testdata.GoTest") proto.RegisterType((*GoTest_RequiredGroup)(nil), "testdata.GoTest.RequiredGroup") proto.RegisterType((*GoTest_RepeatedGroup)(nil), "testdata.GoTest.RepeatedGroup") proto.RegisterType((*GoTest_OptionalGroup)(nil), "testdata.GoTest.OptionalGroup") proto.RegisterType((*GoSkipTest)(nil), "testdata.GoSkipTest") proto.RegisterType((*GoSkipTest_SkipGroup)(nil), "testdata.GoSkipTest.SkipGroup") proto.RegisterType((*NonPackedTest)(nil), "testdata.NonPackedTest") proto.RegisterType((*PackedTest)(nil), "testdata.PackedTest") proto.RegisterType((*MaxTag)(nil), "testdata.MaxTag") proto.RegisterType((*OldMessage)(nil), "testdata.OldMessage") proto.RegisterType((*OldMessage_Nested)(nil), "testdata.OldMessage.Nested") proto.RegisterType((*NewMessage)(nil), "testdata.NewMessage") proto.RegisterType((*NewMessage_Nested)(nil), "testdata.NewMessage.Nested") proto.RegisterType((*InnerMessage)(nil), "testdata.InnerMessage") proto.RegisterType((*OtherMessage)(nil), "testdata.OtherMessage") proto.RegisterType((*RequiredInnerMessage)(nil), "testdata.RequiredInnerMessage") proto.RegisterType((*MyMessage)(nil), "testdata.MyMessage") proto.RegisterType((*MyMessage_SomeGroup)(nil), "testdata.MyMessage.SomeGroup") proto.RegisterType((*Ext)(nil), "testdata.Ext") proto.RegisterType((*ComplexExtension)(nil), "testdata.ComplexExtension") proto.RegisterType((*DefaultsMessage)(nil), "testdata.DefaultsMessage") proto.RegisterType((*MyMessageSet)(nil), "testdata.MyMessageSet") proto.RegisterType((*Empty)(nil), "testdata.Empty") proto.RegisterType((*MessageList)(nil), "testdata.MessageList") proto.RegisterType((*MessageList_Message)(nil), "testdata.MessageList.Message") proto.RegisterType((*Strings)(nil), "testdata.Strings") proto.RegisterType((*Defaults)(nil), "testdata.Defaults") proto.RegisterType((*SubDefaults)(nil), "testdata.SubDefaults") proto.RegisterType((*RepeatedEnum)(nil), "testdata.RepeatedEnum") proto.RegisterType((*MoreRepeated)(nil), "testdata.MoreRepeated") proto.RegisterType((*GroupOld)(nil), "testdata.GroupOld") proto.RegisterType((*GroupOld_G)(nil), "testdata.GroupOld.G") proto.RegisterType((*GroupNew)(nil), "testdata.GroupNew") proto.RegisterType((*GroupNew_G)(nil), "testdata.GroupNew.G") proto.RegisterType((*FloatingPoint)(nil), "testdata.FloatingPoint") proto.RegisterType((*MessageWithMap)(nil), "testdata.MessageWithMap") proto.RegisterType((*Oneof)(nil), "testdata.Oneof") proto.RegisterType((*Oneof_F_Group)(nil), "testdata.Oneof.F_Group") proto.RegisterType((*Communique)(nil), "testdata.Communique") proto.RegisterEnum("testdata.FOO", FOO_name, FOO_value) proto.RegisterEnum("testdata.GoTest_KIND", GoTest_KIND_name, GoTest_KIND_value) proto.RegisterEnum("testdata.MyMessage_Color", MyMessage_Color_name, MyMessage_Color_value) proto.RegisterEnum("testdata.DefaultsMessage_DefaultsEnum", DefaultsMessage_DefaultsEnum_name, DefaultsMessage_DefaultsEnum_value) proto.RegisterEnum("testdata.Defaults_Color", Defaults_Color_name, Defaults_Color_value) proto.RegisterEnum("testdata.RepeatedEnum_Color", RepeatedEnum_Color_name, RepeatedEnum_Color_value) proto.RegisterExtension(E_Ext_More) proto.RegisterExtension(E_Ext_Text) proto.RegisterExtension(E_Ext_Number) proto.RegisterExtension(E_Greeting) proto.RegisterExtension(E_Complex) proto.RegisterExtension(E_RComplex) proto.RegisterExtension(E_NoDefaultDouble) proto.RegisterExtension(E_NoDefaultFloat) proto.RegisterExtension(E_NoDefaultInt32) proto.RegisterExtension(E_NoDefaultInt64) proto.RegisterExtension(E_NoDefaultUint32) proto.RegisterExtension(E_NoDefaultUint64) proto.RegisterExtension(E_NoDefaultSint32) proto.RegisterExtension(E_NoDefaultSint64) proto.RegisterExtension(E_NoDefaultFixed32) proto.RegisterExtension(E_NoDefaultFixed64) proto.RegisterExtension(E_NoDefaultSfixed32) proto.RegisterExtension(E_NoDefaultSfixed64) proto.RegisterExtension(E_NoDefaultBool) proto.RegisterExtension(E_NoDefaultString) proto.RegisterExtension(E_NoDefaultBytes) proto.RegisterExtension(E_NoDefaultEnum) proto.RegisterExtension(E_DefaultDouble) proto.RegisterExtension(E_DefaultFloat) proto.RegisterExtension(E_DefaultInt32) proto.RegisterExtension(E_DefaultInt64) proto.RegisterExtension(E_DefaultUint32) proto.RegisterExtension(E_DefaultUint64) proto.RegisterExtension(E_DefaultSint32) proto.RegisterExtension(E_DefaultSint64) proto.RegisterExtension(E_DefaultFixed32) proto.RegisterExtension(E_DefaultFixed64) proto.RegisterExtension(E_DefaultSfixed32) proto.RegisterExtension(E_DefaultSfixed64) proto.RegisterExtension(E_DefaultBool) proto.RegisterExtension(E_DefaultString) proto.RegisterExtension(E_DefaultBytes) proto.RegisterExtension(E_DefaultEnum) proto.RegisterExtension(E_X201) proto.RegisterExtension(E_X202) proto.RegisterExtension(E_X203) proto.RegisterExtension(E_X204) proto.RegisterExtension(E_X205) proto.RegisterExtension(E_X206) proto.RegisterExtension(E_X207) proto.RegisterExtension(E_X208) proto.RegisterExtension(E_X209) proto.RegisterExtension(E_X210) proto.RegisterExtension(E_X211) proto.RegisterExtension(E_X212) proto.RegisterExtension(E_X213) proto.RegisterExtension(E_X214) proto.RegisterExtension(E_X215) proto.RegisterExtension(E_X216) proto.RegisterExtension(E_X217) proto.RegisterExtension(E_X218) proto.RegisterExtension(E_X219) proto.RegisterExtension(E_X220) proto.RegisterExtension(E_X221) proto.RegisterExtension(E_X222) proto.RegisterExtension(E_X223) proto.RegisterExtension(E_X224) proto.RegisterExtension(E_X225) proto.RegisterExtension(E_X226) proto.RegisterExtension(E_X227) proto.RegisterExtension(E_X228) proto.RegisterExtension(E_X229) proto.RegisterExtension(E_X230) proto.RegisterExtension(E_X231) proto.RegisterExtension(E_X232) proto.RegisterExtension(E_X233) proto.RegisterExtension(E_X234) proto.RegisterExtension(E_X235) proto.RegisterExtension(E_X236) proto.RegisterExtension(E_X237) proto.RegisterExtension(E_X238) proto.RegisterExtension(E_X239) proto.RegisterExtension(E_X240) proto.RegisterExtension(E_X241) proto.RegisterExtension(E_X242) proto.RegisterExtension(E_X243) proto.RegisterExtension(E_X244) proto.RegisterExtension(E_X245) proto.RegisterExtension(E_X246) proto.RegisterExtension(E_X247) proto.RegisterExtension(E_X248) proto.RegisterExtension(E_X249) proto.RegisterExtension(E_X250) } var fileDescriptor0 = []byte{ // 4407 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x94, 0x5a, 0x59, 0x77, 0xdb, 0x48, 0x76, 0x36, 0xc0, 0xfd, 0x92, 0x12, 0xa1, 0xb2, 0xda, 0x4d, 0x4b, 0x5e, 0x60, 0xce, 0x74, 0x37, 0xbd, 0x69, 0x24, 0x10, 0xa2, 0x6d, 0xba, 0xd3, 0xe7, 0x78, 0xa1, 0x64, 0x9d, 0xb1, 0x44, 0x05, 0x52, 0x77, 0x9f, 0xe9, 0x3c, 0xf0, 0x50, 0x22, 0x48, 0xb3, 0x4d, 0x02, 0x34, 0x09, 0xc5, 0x52, 0xf2, 0xd2, 0x2f, 0xc9, 0x6b, 0xb6, 0x97, 0xbc, 0xe6, 0x29, 0x4f, 0x49, 0xce, 0xc9, 0x9f, 0x48, 0xba, 0x7b, 0xd6, 0x9e, 0x35, 0xeb, 0x64, 0x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3d, 0x5a, 0x6b, 0xff, 0x19, 0xc3, 0xe6, 0x5a, 0xd3, 0xa3, 0xb5, 0xf6, 0x5f, 0x31, 0x6c, 0xae, 0x35, 0x3d, 0x5a, 0x6b, 0xff, 0x1d, 0xc3, 0xe6, 0x5a, 0xd3, 0xa3, 0xb5, 0xf6, 0x3f, 0x31, 0x6c, 0xae, 0x35, 0x3d, 0x5a, 0x6b, 0x3f, 0x8e, 0x61, 0x73, 0xad, 0xe9, 0xd1, 0x5a, 0xfb, 0x49, 0x0c, 0x9b, 0x6b, 0x4d, 0x8f, 0xd6, 0xda, 0xff, 0xc6, 0xb0, 0xb9, 0xd6, 0xf4, 0x68, 0xad, 0xfd, 0x5f, 0x0c, 0x9b, 0x6b, 0x6d, 0x3d, 0x5a, 0x6b, 0xff, 0x1f, 0xcd, 0x5e, 0x5f, 0xfd, 0x69, 0x00, 0x00, 0x00, 0xff, 0xff, 0x81, 0x23, 0xc6, 0xe6, 0xc6, 0x38, 0x00, 0x00, } golang-protobuf-extensions-1.0.1/testdata/test.proto000066400000000000000000000362401270712707700227070ustar00rootroot00000000000000// Go support for Protocol Buffers - Google's data interchange format // // Copyright 2010 The Go Authors. All rights reserved. // https://github.com/golang/protobuf // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: // // * Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // * Redistributions in binary form must reproduce the above // copyright notice, this list of conditions and the following disclaimer // in the documentation and/or other materials provided with the // distribution. // * Neither the name of Google Inc. nor the names of its // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // A feature-rich test file for the protocol compiler and libraries. syntax = "proto2"; package testdata; enum FOO { FOO1 = 1; }; message GoEnum { required FOO foo = 1; } message GoTestField { required string Label = 1; required string Type = 2; } message GoTest { // An enum, for completeness. enum KIND { VOID = 0; // Basic types BOOL = 1; BYTES = 2; FINGERPRINT = 3; FLOAT = 4; INT = 5; STRING = 6; TIME = 7; // Groupings TUPLE = 8; ARRAY = 9; MAP = 10; // Table types TABLE = 11; // Functions FUNCTION = 12; // last tag }; // Some typical parameters required KIND Kind = 1; optional string Table = 2; optional int32 Param = 3; // Required, repeated and optional foreign fields. required GoTestField RequiredField = 4; repeated GoTestField RepeatedField = 5; optional GoTestField OptionalField = 6; // Required fields of all basic types required bool F_Bool_required = 10; required int32 F_Int32_required = 11; required int64 F_Int64_required = 12; required fixed32 F_Fixed32_required = 13; required fixed64 F_Fixed64_required = 14; required uint32 F_Uint32_required = 15; required uint64 F_Uint64_required = 16; required float F_Float_required = 17; required double F_Double_required = 18; required string F_String_required = 19; required bytes F_Bytes_required = 101; required sint32 F_Sint32_required = 102; required sint64 F_Sint64_required = 103; // Repeated fields of all basic types repeated bool F_Bool_repeated = 20; repeated int32 F_Int32_repeated = 21; repeated int64 F_Int64_repeated = 22; repeated fixed32 F_Fixed32_repeated = 23; repeated fixed64 F_Fixed64_repeated = 24; repeated uint32 F_Uint32_repeated = 25; repeated uint64 F_Uint64_repeated = 26; repeated float F_Float_repeated = 27; repeated double F_Double_repeated = 28; repeated string F_String_repeated = 29; repeated bytes F_Bytes_repeated = 201; repeated sint32 F_Sint32_repeated = 202; repeated sint64 F_Sint64_repeated = 203; // Optional fields of all basic types optional bool F_Bool_optional = 30; optional int32 F_Int32_optional = 31; optional int64 F_Int64_optional = 32; optional fixed32 F_Fixed32_optional = 33; optional fixed64 F_Fixed64_optional = 34; optional uint32 F_Uint32_optional = 35; optional uint64 F_Uint64_optional = 36; optional float F_Float_optional = 37; optional double F_Double_optional = 38; optional string F_String_optional = 39; optional bytes F_Bytes_optional = 301; optional sint32 F_Sint32_optional = 302; optional sint64 F_Sint64_optional = 303; // Default-valued fields of all basic types optional bool F_Bool_defaulted = 40 [default=true]; optional int32 F_Int32_defaulted = 41 [default=32]; optional int64 F_Int64_defaulted = 42 [default=64]; optional fixed32 F_Fixed32_defaulted = 43 [default=320]; optional fixed64 F_Fixed64_defaulted = 44 [default=640]; optional uint32 F_Uint32_defaulted = 45 [default=3200]; optional uint64 F_Uint64_defaulted = 46 [default=6400]; optional float F_Float_defaulted = 47 [default=314159.]; optional double F_Double_defaulted = 48 [default=271828.]; optional string F_String_defaulted = 49 [default="hello, \"world!\"\n"]; optional bytes F_Bytes_defaulted = 401 [default="Bignose"]; optional sint32 F_Sint32_defaulted = 402 [default = -32]; optional sint64 F_Sint64_defaulted = 403 [default = -64]; // Packed repeated fields (no string or bytes). repeated bool F_Bool_repeated_packed = 50 [packed=true]; repeated int32 F_Int32_repeated_packed = 51 [packed=true]; repeated int64 F_Int64_repeated_packed = 52 [packed=true]; repeated fixed32 F_Fixed32_repeated_packed = 53 [packed=true]; repeated fixed64 F_Fixed64_repeated_packed = 54 [packed=true]; repeated uint32 F_Uint32_repeated_packed = 55 [packed=true]; repeated uint64 F_Uint64_repeated_packed = 56 [packed=true]; repeated float F_Float_repeated_packed = 57 [packed=true]; repeated double F_Double_repeated_packed = 58 [packed=true]; repeated sint32 F_Sint32_repeated_packed = 502 [packed=true]; repeated sint64 F_Sint64_repeated_packed = 503 [packed=true]; // Required, repeated, and optional groups. required group RequiredGroup = 70 { required string RequiredField = 71; }; repeated group RepeatedGroup = 80 { required string RequiredField = 81; }; optional group OptionalGroup = 90 { required string RequiredField = 91; }; } // For testing skipping of unrecognized fields. // Numbers are all big, larger than tag numbers in GoTestField, // the message used in the corresponding test. message GoSkipTest { required int32 skip_int32 = 11; required fixed32 skip_fixed32 = 12; required fixed64 skip_fixed64 = 13; required string skip_string = 14; required group SkipGroup = 15 { required int32 group_int32 = 16; required string group_string = 17; } } // For testing packed/non-packed decoder switching. // A serialized instance of one should be deserializable as the other. message NonPackedTest { repeated int32 a = 1; } message PackedTest { repeated int32 b = 1 [packed=true]; } message MaxTag { // Maximum possible tag number. optional string last_field = 536870911; } message OldMessage { message Nested { optional string name = 1; } optional Nested nested = 1; optional int32 num = 2; } // NewMessage is wire compatible with OldMessage; // imagine it as a future version. message NewMessage { message Nested { optional string name = 1; optional string food_group = 2; } optional Nested nested = 1; // This is an int32 in OldMessage. optional int64 num = 2; } // Smaller tests for ASCII formatting. message InnerMessage { required string host = 1; optional int32 port = 2 [default=4000]; optional bool connected = 3; } message OtherMessage { optional int64 key = 1; optional bytes value = 2; optional float weight = 3; optional InnerMessage inner = 4; extensions 100 to max; } message RequiredInnerMessage { required InnerMessage leo_finally_won_an_oscar = 1; } message MyMessage { required int32 count = 1; optional string name = 2; optional string quote = 3; repeated string pet = 4; optional InnerMessage inner = 5; repeated OtherMessage others = 6; optional RequiredInnerMessage we_must_go_deeper = 13; repeated InnerMessage rep_inner = 12; enum Color { RED = 0; GREEN = 1; BLUE = 2; }; optional Color bikeshed = 7; optional group SomeGroup = 8 { optional int32 group_field = 9; } // This field becomes [][]byte in the generated code. repeated bytes rep_bytes = 10; optional double bigfloat = 11; extensions 100 to max; } message Ext { extend MyMessage { optional Ext more = 103; optional string text = 104; optional int32 number = 105; } optional string data = 1; } extend MyMessage { repeated string greeting = 106; } message ComplexExtension { optional int32 first = 1; optional int32 second = 2; repeated int32 third = 3; } extend OtherMessage { optional ComplexExtension complex = 200; repeated ComplexExtension r_complex = 201; } message DefaultsMessage { enum DefaultsEnum { ZERO = 0; ONE = 1; TWO = 2; }; extensions 100 to max; } extend DefaultsMessage { optional double no_default_double = 101; optional float no_default_float = 102; optional int32 no_default_int32 = 103; optional int64 no_default_int64 = 104; optional uint32 no_default_uint32 = 105; optional uint64 no_default_uint64 = 106; optional sint32 no_default_sint32 = 107; optional sint64 no_default_sint64 = 108; optional fixed32 no_default_fixed32 = 109; optional fixed64 no_default_fixed64 = 110; optional sfixed32 no_default_sfixed32 = 111; optional sfixed64 no_default_sfixed64 = 112; optional bool no_default_bool = 113; optional string no_default_string = 114; optional bytes no_default_bytes = 115; optional DefaultsMessage.DefaultsEnum no_default_enum = 116; optional double default_double = 201 [default = 3.1415]; optional float default_float = 202 [default = 3.14]; optional int32 default_int32 = 203 [default = 42]; optional int64 default_int64 = 204 [default = 43]; optional uint32 default_uint32 = 205 [default = 44]; optional uint64 default_uint64 = 206 [default = 45]; optional sint32 default_sint32 = 207 [default = 46]; optional sint64 default_sint64 = 208 [default = 47]; optional fixed32 default_fixed32 = 209 [default = 48]; optional fixed64 default_fixed64 = 210 [default = 49]; optional sfixed32 default_sfixed32 = 211 [default = 50]; optional sfixed64 default_sfixed64 = 212 [default = 51]; optional bool default_bool = 213 [default = true]; optional string default_string = 214 [default = "Hello, string"]; optional bytes default_bytes = 215 [default = "Hello, bytes"]; optional DefaultsMessage.DefaultsEnum default_enum = 216 [default = ONE]; } message MyMessageSet { option message_set_wire_format = true; extensions 100 to max; } message Empty { } extend MyMessageSet { optional Empty x201 = 201; optional Empty x202 = 202; optional Empty x203 = 203; optional Empty x204 = 204; optional Empty x205 = 205; optional Empty x206 = 206; optional Empty x207 = 207; optional Empty x208 = 208; optional Empty x209 = 209; optional Empty x210 = 210; optional Empty x211 = 211; optional Empty x212 = 212; optional Empty x213 = 213; optional Empty x214 = 214; optional Empty x215 = 215; optional Empty x216 = 216; optional Empty x217 = 217; optional Empty x218 = 218; optional Empty x219 = 219; optional Empty x220 = 220; optional Empty x221 = 221; optional Empty x222 = 222; optional Empty x223 = 223; optional Empty x224 = 224; optional Empty x225 = 225; optional Empty x226 = 226; optional Empty x227 = 227; optional Empty x228 = 228; optional Empty x229 = 229; optional Empty x230 = 230; optional Empty x231 = 231; optional Empty x232 = 232; optional Empty x233 = 233; optional Empty x234 = 234; optional Empty x235 = 235; optional Empty x236 = 236; optional Empty x237 = 237; optional Empty x238 = 238; optional Empty x239 = 239; optional Empty x240 = 240; optional Empty x241 = 241; optional Empty x242 = 242; optional Empty x243 = 243; optional Empty x244 = 244; optional Empty x245 = 245; optional Empty x246 = 246; optional Empty x247 = 247; optional Empty x248 = 248; optional Empty x249 = 249; optional Empty x250 = 250; } message MessageList { repeated group Message = 1 { required string name = 2; required int32 count = 3; } } message Strings { optional string string_field = 1; optional bytes bytes_field = 2; } message Defaults { enum Color { RED = 0; GREEN = 1; BLUE = 2; } // Default-valued fields of all basic types. // Same as GoTest, but copied here to make testing easier. optional bool F_Bool = 1 [default=true]; optional int32 F_Int32 = 2 [default=32]; optional int64 F_Int64 = 3 [default=64]; optional fixed32 F_Fixed32 = 4 [default=320]; optional fixed64 F_Fixed64 = 5 [default=640]; optional uint32 F_Uint32 = 6 [default=3200]; optional uint64 F_Uint64 = 7 [default=6400]; optional float F_Float = 8 [default=314159.]; optional double F_Double = 9 [default=271828.]; optional string F_String = 10 [default="hello, \"world!\"\n"]; optional bytes F_Bytes = 11 [default="Bignose"]; optional sint32 F_Sint32 = 12 [default=-32]; optional sint64 F_Sint64 = 13 [default=-64]; optional Color F_Enum = 14 [default=GREEN]; // More fields with crazy defaults. optional float F_Pinf = 15 [default=inf]; optional float F_Ninf = 16 [default=-inf]; optional float F_Nan = 17 [default=nan]; // Sub-message. optional SubDefaults sub = 18; // Redundant but explicit defaults. optional string str_zero = 19 [default=""]; } message SubDefaults { optional int64 n = 1 [default=7]; } message RepeatedEnum { enum Color { RED = 1; } repeated Color color = 1; } message MoreRepeated { repeated bool bools = 1; repeated bool bools_packed = 2 [packed=true]; repeated int32 ints = 3; repeated int32 ints_packed = 4 [packed=true]; repeated int64 int64s_packed = 7 [packed=true]; repeated string strings = 5; repeated fixed32 fixeds = 6; } // GroupOld and GroupNew have the same wire format. // GroupNew has a new field inside a group. message GroupOld { optional group G = 101 { optional int32 x = 2; } } message GroupNew { optional group G = 101 { optional int32 x = 2; optional int32 y = 3; } } message FloatingPoint { required double f = 1; } message MessageWithMap { map name_mapping = 1; map msg_mapping = 2; map byte_mapping = 3; map str_to_str = 4; } message Oneof { oneof union { bool F_Bool = 1; int32 F_Int32 = 2; int64 F_Int64 = 3; fixed32 F_Fixed32 = 4; fixed64 F_Fixed64 = 5; uint32 F_Uint32 = 6; uint64 F_Uint64 = 7; float F_Float = 8; double F_Double = 9; string F_String = 10; bytes F_Bytes = 11; sint32 F_Sint32 = 12; sint64 F_Sint64 = 13; MyMessage.Color F_Enum = 14; GoTestField F_Message = 15; group F_Group = 16 { optional int32 x = 17; } int32 F_Largest_Tag = 536870911; } oneof tormato { int32 value = 100; } } message Communique { optional bool make_me_cry = 1; // This is a oneof, called "union". oneof union { int32 number = 5; string name = 6; bytes data = 7; double temp_c = 8; MyMessage.Color col = 9; Strings msg = 10; } }