...

Text file src/github.com/gogo/protobuf/test/theproto3/header.proto

Documentation: github.com/gogo/protobuf/test/theproto3

     1// Protocol Buffers for Go with Gadgets
     2//
     3// Copyright (c) 2013, The GoGo Authors. All rights reserved.
     4// http://github.com/gogo/protobuf
     5//
     6// Go support for Protocol Buffers - Google's data interchange format
     7//
     8// Copyright 2014 The Go Authors.  All rights reserved.
     9// https://github.com/golang/protobuf
    10//
    11// Redistribution and use in source and binary forms, with or without
    12// modification, are permitted provided that the following conditions are
    13// met:
    14//
    15//     * Redistributions of source code must retain the above copyright
    16// notice, this list of conditions and the following disclaimer.
    17//     * Redistributions in binary form must reproduce the above
    18// copyright notice, this list of conditions and the following disclaimer
    19// in the documentation and/or other materials provided with the
    20// distribution.
    21//     * Neither the name of Google Inc. nor the names of its
    22// contributors may be used to endorse or promote products derived from
    23// this software without specific prior written permission.
    24//
    25// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
    26// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
    27// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
    28// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
    29// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
    30// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
    31// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
    32// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
    33// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
    34// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
    35// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    36
    37syntax = "proto3";
    38
    39package theproto3;
    40
    41import "github.com/gogo/protobuf/gogoproto/gogo.proto";
    42
    43import "github.com/gogo/protobuf/test/combos/both/thetest.proto";
    44
    45option (gogoproto.goproto_stringer_all) = false;
    46option (gogoproto.goproto_enum_prefix_all) = false;
    47option (gogoproto.goproto_getters_all) = false;
    48
    49option (gogoproto.equal_all) = true;
    50option (gogoproto.verbose_equal_all) = true;
    51option (gogoproto.stringer_all) = true;
    52option (gogoproto.gostring_all) = true;
    53option (gogoproto.face_all) = true;
    54option (gogoproto.description_all) = true;
    55
    56option (gogoproto.testgen_all) = true;
    57option (gogoproto.populate_all) = true;
    58option (gogoproto.benchgen_all) = true;
    59option (gogoproto.unmarshaler_all) = false;
    60option (gogoproto.marshaler_all) = false;
    61option (gogoproto.sizer_all) = true;
    62
    63option (gogoproto.goproto_enum_stringer_all) = false;
    64option (gogoproto.enum_stringer_all) = true;
    65
    66option (gogoproto.unsafe_marshaler_all) = false;
    67option (gogoproto.unsafe_unmarshaler_all) = false;
    68
    69message Message {
    70  enum Humour {
    71    UNKNOWN = 0;
    72    PUNS = 1;
    73    SLAPSTICK = 2;
    74    BILL_BAILEY = 3;
    75  }
    76
    77  string name = 1;
    78  Humour hilarity = 2;
    79  uint32 height_in_cm = 3;
    80  bytes data = 4;
    81  int64 result_count = 7;
    82  bool true_scotsman = 8;
    83  float score = 9;
    84
    85  repeated uint64 key = 5;
    86  Nested nested = 6;
    87
    88  map<int64, Nested> terrain = 10;
    89  test.NinOptNative proto2_field = 11;
    90  map<int64, test.NinOptEnum> proto2_value = 13;
    91}
    92
    93message Nested {
    94  string bunny = 1;
    95}

View as plain text