github.com/gogo/protobuf@v1.3.2/test/mapsproto2/header.proto (about)

     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  
    37  syntax = "proto2";
    38  
    39  package proto2.maps;
    40  
    41  import "github.com/gogo/protobuf/gogoproto/gogo.proto";
    42  
    43  option (gogoproto.goproto_stringer_all) = false;
    44  option (gogoproto.goproto_enum_prefix_all) = false;
    45  option (gogoproto.goproto_getters_all) = false;
    46  
    47  option (gogoproto.equal_all) = true;
    48  option (gogoproto.verbose_equal_all) = true;
    49  option (gogoproto.stringer_all) = true;
    50  option (gogoproto.gostring_all) = true;
    51  option (gogoproto.face_all) = true;
    52  option (gogoproto.description_all) = true;
    53  
    54  option (gogoproto.testgen_all) = true;
    55  option (gogoproto.populate_all) = true;
    56  option (gogoproto.benchgen_all) = true;
    57  option (gogoproto.unmarshaler_all) = false;
    58  option (gogoproto.marshaler_all) = false;
    59  option (gogoproto.sizer_all) = true;
    60  
    61  option (gogoproto.goproto_enum_stringer_all) = false;
    62  option (gogoproto.enum_stringer_all) = true;
    63  
    64  option (gogoproto.unsafe_marshaler_all) = false;
    65  option (gogoproto.unsafe_unmarshaler_all) = false;
    66  
    67  message FloatingPoint {
    68    optional double f = 1;
    69  }
    70  
    71  message CustomMap {
    72    map<string, bytes> Nullable128s = 1 [(gogoproto.customtype)="github.com/gogo/protobuf/test/custom.Uint128"];
    73    map<string, bytes> Uint128s = 2 [(gogoproto.customtype)="github.com/gogo/protobuf/test/custom.Uint128", (gogoproto.nullable)=false];
    74    map<string, bytes> NullableIds = 3 [(gogoproto.customtype)="github.com/gogo/protobuf/test.Uuid"];
    75    map<string, bytes> Ids = 4 [(gogoproto.customtype)="github.com/gogo/protobuf/test.Uuid", (gogoproto.nullable)=false];
    76  }