1 // Copyright 2014 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
7 // This file defines types used by client-side JavaScript.
9 type anchorJSON struct {
14 type commOpJSON struct {
19 // JavaScript's onClickComm() expects a commJSON.
20 type commJSON struct {
24 // Indicates one of these forms of fact about a type T:
25 // T "is implemented by <ByKind> type <Other>" (ByKind != "", e.g. "array")
26 // T "implements <Other>" (ByKind == "")
27 type implFactJSON struct {
28 ByKind string `json:",omitempty"`
32 // Implements facts are grouped by form, for ease of reading.
33 type implGroupJSON struct {
38 // JavaScript's onClickIdent() expects a TypeInfoJSON.
39 type TypeInfoJSON struct {
40 Name string // type name
43 ImplGroups []implGroupJSON
46 // JavaScript's onClickCallees() expects a calleesJSON.
47 type calleesJSON struct {
49 Callees []anchorJSON // markup for called function
52 type callerJSON struct {
57 // JavaScript's onClickCallers() expects a callersJSON.
58 type callersJSON struct {
63 // JavaScript's cgAddChild requires a global array of PCGNodeJSON
64 // called CALLGRAPH, representing the intra-package call graph.
65 // The first element is special and represents "all external callers".
66 type PCGNodeJSON struct {
68 Callees []int // indices within CALLGRAPH of nodes called by this one