github.com/psrajat/prototool@v1.3.0/internal/wkt/wkt.go (about)

     1  // Copyright (c) 2018 Uber Technologies, Inc.
     2  //
     3  // Permission is hereby granted, free of charge, to any person obtaining a copy
     4  // of this software and associated documentation files (the "Software"), to deal
     5  // in the Software without restriction, including without limitation the rights
     6  // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
     7  // copies of the Software, and to permit persons to whom the Software is
     8  // furnished to do so, subject to the following conditions:
     9  //
    10  // The above copyright notice and this permission notice shall be included in
    11  // all copies or substantial portions of the Software.
    12  //
    13  // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    14  // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    15  // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
    16  // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
    17  // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
    18  // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
    19  // THE SOFTWARE.
    20  
    21  // Package wkt contains the list of the Google Well-Known Types as well
    22  // as the Golang package mappings for the generated code for
    23  // github.com/golang/protobuf and github.com/gogo/protobuf.
    24  //
    25  // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf
    26  package wkt
    27  
    28  var (
    29  	// Filenames contains the Google Well-Known Types filenames.
    30  	Filenames = map[string]struct{}{
    31  		"google/protobuf/any.proto":             struct{}{},
    32  		"google/protobuf/api.proto":             struct{}{},
    33  		"google/protobuf/compiler/plugin.proto": struct{}{},
    34  		"google/protobuf/descriptor.proto":      struct{}{},
    35  		"google/protobuf/duration.proto":        struct{}{},
    36  		"google/protobuf/empty.proto":           struct{}{},
    37  		"google/protobuf/field_mask.proto":      struct{}{},
    38  		"google/protobuf/source_context.proto":  struct{}{},
    39  		"google/protobuf/struct.proto":          struct{}{},
    40  		"google/protobuf/timestamp.proto":       struct{}{},
    41  		"google/protobuf/type.proto":            struct{}{},
    42  		"google/protobuf/wrappers.proto":        struct{}{},
    43  	}
    44  
    45  	// FilenameToGoModifierMap is a map from filename to package for github.com/golang/protobuf.
    46  	FilenameToGoModifierMap = map[string]string{
    47  		"google/protobuf/any.proto":             "github.com/golang/protobuf/ptypes/any",
    48  		"google/protobuf/api.proto":             "google.golang.org/genproto/protobuf/api",
    49  		"google/protobuf/compiler/plugin.proto": "github.com/golang/protobuf/protoc-gen-go/plugin",
    50  		"google/protobuf/descriptor.proto":      "github.com/golang/protobuf/protoc-gen-go/descriptor",
    51  		"google/protobuf/duration.proto":        "github.com/golang/protobuf/ptypes/duration",
    52  		"google/protobuf/empty.proto":           "github.com/golang/protobuf/ptypes/empty",
    53  		"google/protobuf/field_mask.proto":      "google.golang.org/genproto/protobuf/field_mask",
    54  		"google/protobuf/source_context.proto":  "google.golang.org/genproto/protobuf/source_context",
    55  		"google/protobuf/struct.proto":          "github.com/golang/protobuf/ptypes/struct",
    56  		"google/protobuf/timestamp.proto":       "github.com/golang/protobuf/ptypes/timestamp",
    57  		"google/protobuf/type.proto":            "google.golang.org/genproto/protobuf/ptype",
    58  		"google/protobuf/wrappers.proto":        "github.com/golang/protobuf/ptypes/wrappers",
    59  	}
    60  
    61  	// FilenameToGogoModifierMap is a map from filename to package for github.com/gogo/protobuf.
    62  	FilenameToGogoModifierMap = map[string]string{
    63  		"google/protobuf/any.proto":             "github.com/gogo/protobuf/types",
    64  		"google/protobuf/api.proto":             "google.golang.org/genproto/protobuf/api",
    65  		"google/protobuf/compiler/plugin.proto": "github.com/gogo/protobuf/protoc-gen-gogo/plugin",
    66  		"google/protobuf/descriptor.proto":      "github.com/gogo/protobuf/protoc-gen-gogo/descriptor",
    67  		"google/protobuf/duration.proto":        "github.com/gogo/protobuf/types",
    68  		"google/protobuf/empty.proto":           "github.com/gogo/protobuf/types",
    69  		"google/protobuf/field_mask.proto":      "github.com/gogo/protobuf/types",
    70  		"google/protobuf/source_context.proto":  "google.golang.org/genproto/protobuf/source_context",
    71  		"google/protobuf/struct.proto":          "github.com/gogo/protobuf/types",
    72  		"google/protobuf/timestamp.proto":       "github.com/gogo/protobuf/types",
    73  		"google/protobuf/type.proto":            "google.golang.org/genproto/protobuf/ptype",
    74  		"google/protobuf/wrappers.proto":        "github.com/gogo/protobuf/types",
    75  	}
    76  )