kythe.io@v0.0.68-0.20240422202219-7225dbc01741/kythe/go/util/schema/indexdata.go (about)

     1  /*
     2   * Copyright 2018 The Kythe Authors. All rights reserved.
     3   *
     4   * Licensed under the Apache License, Version 2.0 (the "License");
     5   * you may not use this file except in compliance with the License.
     6   * You may obtain a copy of the License at
     7   *
     8   *   http://www.apache.org/licenses/LICENSE-2.0
     9   *
    10   * Unless required by applicable law or agreed to in writing, software
    11   * distributed under the License is distributed on an "AS IS" BASIS,
    12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    13   * See the License for the specific language governing permissions and
    14   * limitations under the License.
    15   */
    16  
    17  package schema
    18  
    19  // This is a generated file -- do not edit it by hand.
    20  // Input file: kythe/proto/schema.proto
    21  
    22  import scpb "kythe.io/kythe/proto/schema_go_proto"
    23  
    24  var (
    25  	langs = map[string]scpb.Language{
    26  		"c++":        1,
    27  		"dart":       2,
    28  		"go":         3,
    29  		"haskell":    4,
    30  		"java":       5,
    31  		"kotlin":     6,
    32  		"protobuf":   7,
    33  		"textproto":  8,
    34  		"typescript": 9,
    35  		"verilog":    10,
    36  	}
    37  	nodeKinds = map[string]scpb.NodeKind{
    38  		"anchor":       3,
    39  		"constant":     4,
    40  		"diagnostic":   5,
    41  		"doc":          6,
    42  		"file":         7,
    43  		"function":     9,
    44  		"google/gflag": 27,
    45  		"interface":    8,
    46  		"lookup":       10,
    47  		"macro":        11,
    48  		"meta":         12,
    49  		"name":         13,
    50  		"package":      14,
    51  		"process":      15,
    52  		"record":       16,
    53  		"sum":          17,
    54  		"symbol":       18,
    55  		"talias":       19,
    56  		"tapp":         20,
    57  		"tbuiltin":     21,
    58  		"tnominal":     22,
    59  		"tsigma":       23,
    60  		"tvar":         26,
    61  		"variable":     24,
    62  		"vcs":          25,
    63  	}
    64  
    65  	subkinds = map[string]scpb.Subkind{
    66  		"category":        1,
    67  		"class":           2,
    68  		"constructor":     3,
    69  		"destructor":      4,
    70  		"enum":            5,
    71  		"enumClass":       6,
    72  		"field":           7,
    73  		"implicit":        8,
    74  		"import":          9,
    75  		"initializer":     10,
    76  		"local":           11,
    77  		"local/parameter": 12,
    78  		"method":          13,
    79  		"namespace":       14,
    80  		"struct":          15,
    81  		"type":            16,
    82  		"union":           17,
    83  	}
    84  
    85  	factNames = map[string]scpb.FactName{
    86  		"/kythe/build/config":   19,
    87  		"/kythe/code":           1,
    88  		"/kythe/complete":       2,
    89  		"/kythe/context/url":    3,
    90  		"/kythe/details":        4,
    91  		"/kythe/doc/uri":        5,
    92  		"/kythe/label":          6,
    93  		"/kythe/loc/end":        7,
    94  		"/kythe/loc/start":      8,
    95  		"/kythe/message":        9,
    96  		"/kythe/node/kind":      10,
    97  		"/kythe/param/default":  11,
    98  		"/kythe/ruleclass":      12,
    99  		"/kythe/snippet/end":    13,
   100  		"/kythe/snippet/start":  14,
   101  		"/kythe/subkind":        15,
   102  		"/kythe/tag/deprecated": 20,
   103  		"/kythe/text":           16,
   104  		"/kythe/text/encoding":  17,
   105  		"/kythe/visibility":     18,
   106  	}
   107  
   108  	edgeKinds = map[string]scpb.EdgeKind{
   109  		"/kythe/edge/aliases":                  1,
   110  		"/kythe/edge/aliases/root":             2,
   111  		"/kythe/edge/annotatedby":              3,
   112  		"/kythe/edge/bounded/lower":            4,
   113  		"/kythe/edge/bounded/upper":            5,
   114  		"/kythe/edge/childof":                  6,
   115  		"/kythe/edge/childof/context":          7,
   116  		"/kythe/edge/completedby":              49,
   117  		"/kythe/edge/defines":                  10,
   118  		"/kythe/edge/defines/binding":          11,
   119  		"/kythe/edge/defines/implicit":         50,
   120  		"/kythe/edge/denotes":                  51,
   121  		"/kythe/edge/depends":                  12,
   122  		"/kythe/edge/documents":                13,
   123  		"/kythe/edge/exports":                  14,
   124  		"/kythe/edge/extends":                  15,
   125  		"/kythe/edge/generates":                16,
   126  		"/kythe/edge/imputes":                  17,
   127  		"/kythe/edge/instantiates":             18,
   128  		"/kythe/edge/instantiates/speculative": 19,
   129  		"/kythe/edge/named":                    20,
   130  		"/kythe/edge/overrides":                21,
   131  		"/kythe/edge/overrides/root":           22,
   132  		"/kythe/edge/overrides/transitive":     23,
   133  		"/kythe/edge/param":                    24,
   134  		"/kythe/edge/property/reads":           44,
   135  		"/kythe/edge/property/writes":          45,
   136  		"/kythe/edge/ref":                      25,
   137  		"/kythe/edge/ref/call":                 26,
   138  		"/kythe/edge/ref/call/implicit":        27,
   139  		"/kythe/edge/ref/doc":                  28,
   140  		"/kythe/edge/ref/expands":              29,
   141  		"/kythe/edge/ref/expands/transitive":   30,
   142  		"/kythe/edge/ref/file":                 31,
   143  		"/kythe/edge/ref/id":                   46,
   144  		"/kythe/edge/ref/implicit":             32,
   145  		"/kythe/edge/ref/imports":              33,
   146  		"/kythe/edge/ref/includes":             34,
   147  		"/kythe/edge/ref/init":                 35,
   148  		"/kythe/edge/ref/init/implicit":        36,
   149  		"/kythe/edge/ref/queries":              37,
   150  		"/kythe/edge/ref/writes":               47,
   151  		"/kythe/edge/satisfies":                38,
   152  		"/kythe/edge/specializes":              39,
   153  		"/kythe/edge/specializes/speculative":  40,
   154  		"/kythe/edge/tagged":                   41,
   155  		"/kythe/edge/tparam":                   48,
   156  		"/kythe/edge/typed":                    42,
   157  		"/kythe/edge/undefines":                43,
   158  	}
   159  
   160  	langsRev = map[scpb.Language]string{
   161  		1:  "c++",
   162  		2:  "dart",
   163  		3:  "go",
   164  		4:  "haskell",
   165  		5:  "java",
   166  		6:  "kotlin",
   167  		7:  "protobuf",
   168  		8:  "textproto",
   169  		9:  "typescript",
   170  		10: "verilog",
   171  	}
   172  
   173  	nodeKindsRev = map[scpb.NodeKind]string{
   174  		3:  "anchor",
   175  		4:  "constant",
   176  		5:  "diagnostic",
   177  		6:  "doc",
   178  		7:  "file",
   179  		8:  "interface",
   180  		9:  "function",
   181  		10: "lookup",
   182  		11: "macro",
   183  		12: "meta",
   184  		13: "name",
   185  		14: "package",
   186  		15: "process",
   187  		16: "record",
   188  		17: "sum",
   189  		18: "symbol",
   190  		19: "talias",
   191  		20: "tapp",
   192  		21: "tbuiltin",
   193  		22: "tnominal",
   194  		23: "tsigma",
   195  		24: "variable",
   196  		25: "vcs",
   197  		26: "tvar",
   198  		27: "google/gflag",
   199  	}
   200  
   201  	subkindsRev = map[scpb.Subkind]string{
   202  		1:  "category",
   203  		2:  "class",
   204  		3:  "constructor",
   205  		4:  "destructor",
   206  		5:  "enum",
   207  		6:  "enumClass",
   208  		7:  "field",
   209  		8:  "implicit",
   210  		9:  "import",
   211  		10: "initializer",
   212  		11: "local",
   213  		12: "local/parameter",
   214  		13: "method",
   215  		14: "namespace",
   216  		15: "struct",
   217  		16: "type",
   218  		17: "union",
   219  	}
   220  
   221  	factNamesRev = map[scpb.FactName]string{
   222  		1:  "/kythe/code",
   223  		2:  "/kythe/complete",
   224  		3:  "/kythe/context/url",
   225  		4:  "/kythe/details",
   226  		5:  "/kythe/doc/uri",
   227  		6:  "/kythe/label",
   228  		7:  "/kythe/loc/end",
   229  		8:  "/kythe/loc/start",
   230  		9:  "/kythe/message",
   231  		10: "/kythe/node/kind",
   232  		11: "/kythe/param/default",
   233  		12: "/kythe/ruleclass",
   234  		13: "/kythe/snippet/end",
   235  		14: "/kythe/snippet/start",
   236  		15: "/kythe/subkind",
   237  		16: "/kythe/text",
   238  		17: "/kythe/text/encoding",
   239  		18: "/kythe/visibility",
   240  		19: "/kythe/build/config",
   241  		20: "/kythe/tag/deprecated",
   242  	}
   243  
   244  	edgeKindsRev = map[scpb.EdgeKind]string{
   245  		1:  "/kythe/edge/aliases",
   246  		2:  "/kythe/edge/aliases/root",
   247  		3:  "/kythe/edge/annotatedby",
   248  		4:  "/kythe/edge/bounded/lower",
   249  		5:  "/kythe/edge/bounded/upper",
   250  		6:  "/kythe/edge/childof",
   251  		7:  "/kythe/edge/childof/context",
   252  		10: "/kythe/edge/defines",
   253  		11: "/kythe/edge/defines/binding",
   254  		12: "/kythe/edge/depends",
   255  		13: "/kythe/edge/documents",
   256  		14: "/kythe/edge/exports",
   257  		15: "/kythe/edge/extends",
   258  		16: "/kythe/edge/generates",
   259  		17: "/kythe/edge/imputes",
   260  		18: "/kythe/edge/instantiates",
   261  		19: "/kythe/edge/instantiates/speculative",
   262  		20: "/kythe/edge/named",
   263  		21: "/kythe/edge/overrides",
   264  		22: "/kythe/edge/overrides/root",
   265  		23: "/kythe/edge/overrides/transitive",
   266  		24: "/kythe/edge/param",
   267  		25: "/kythe/edge/ref",
   268  		26: "/kythe/edge/ref/call",
   269  		27: "/kythe/edge/ref/call/implicit",
   270  		28: "/kythe/edge/ref/doc",
   271  		29: "/kythe/edge/ref/expands",
   272  		30: "/kythe/edge/ref/expands/transitive",
   273  		31: "/kythe/edge/ref/file",
   274  		32: "/kythe/edge/ref/implicit",
   275  		33: "/kythe/edge/ref/imports",
   276  		34: "/kythe/edge/ref/includes",
   277  		35: "/kythe/edge/ref/init",
   278  		36: "/kythe/edge/ref/init/implicit",
   279  		37: "/kythe/edge/ref/queries",
   280  		38: "/kythe/edge/satisfies",
   281  		39: "/kythe/edge/specializes",
   282  		40: "/kythe/edge/specializes/speculative",
   283  		41: "/kythe/edge/tagged",
   284  		42: "/kythe/edge/typed",
   285  		43: "/kythe/edge/undefines",
   286  		44: "/kythe/edge/property/reads",
   287  		45: "/kythe/edge/property/writes",
   288  		46: "/kythe/edge/ref/id",
   289  		47: "/kythe/edge/ref/writes",
   290  		48: "/kythe/edge/tparam",
   291  		49: "/kythe/edge/completedby",
   292  		50: "/kythe/edge/defines/implicit",
   293  		51: "/kythe/edge/denotes",
   294  	}
   295  )
   296  
   297  // Language returns the schema enum for the given language.
   298  func Language(k string) scpb.Language { return langs[k] }
   299  
   300  // NodeKind returns the schema enum for the given node kind.
   301  func NodeKind(k string) scpb.NodeKind { return nodeKinds[k] }
   302  
   303  // EdgeKind returns the schema enum for the given edge kind.
   304  func EdgeKind(k string) scpb.EdgeKind { return edgeKinds[k] }
   305  
   306  // FactName returns the schema enum for the given fact name.
   307  func FactName(f string) scpb.FactName { return factNames[f] }
   308  
   309  // Subkind returns the schema enum for the given subkind.
   310  func Subkind(k string) scpb.Subkind { return subkinds[k] }
   311  
   312  // LanguageString returns the string representation of the given language.
   313  func LanguageString(k scpb.Language) string { return langsRev[k] }
   314  
   315  // NodeKindString returns the string representation of the given node kind.
   316  func NodeKindString(k scpb.NodeKind) string { return nodeKindsRev[k] }
   317  
   318  // EdgeKindString returns the string representation of the given edge kind.
   319  func EdgeKindString(k scpb.EdgeKind) string { return edgeKindsRev[k] }
   320  
   321  // FactNameString returns the string representation of the given fact name.
   322  func FactNameString(f scpb.FactName) string { return factNamesRev[f] }
   323  
   324  // SubkindString returns the string representation of the given subkind.
   325  func SubkindString(k scpb.Subkind) string { return subkindsRev[k] }