xrefs

package
v0.0.29 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 29, 2018 License: Apache-2.0, NCSA Imports: 14 Imported by: 1

Documentation

Overview

Package xrefs provides test utilities for the xrefs.Service.

This package includes the Atomizer which allows for XRefService proto response messages to be shattered in GraphStore entries. By indexing, post-processing, and serving source code with verifier (http://www.kythe.io/docs/kythe-verifier.html) goals, using the Atomizer to shatter the served DecorationsReply and CrossReferencesReply messages, and feeding the resulting entries into the verifier, one can write integration tests between the Kythe indexers and Kythe server.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Atomizer

type Atomizer func(context.Context, *spb.Entry) error

An Atomizer shatters XRefService proto replies into equivalent GraphStore entries. The resulting composition of the emitted entries reflects a Kythe graph following the Kythe schema in most respects. In particular, the emitted graph approximates an input Kythe graph that was used to derive the XRefService replies (through post-processing and serving).

func (Atomizer) CrossReferences

func (a Atomizer) CrossReferences(ctx context.Context, xrefs *xpb.CrossReferencesReply) (ret error)

CrossReferences emits anchor nodes for all RelatedAnchors along with edges to their targets, emits edges for each RelatedNode, and emits all node facts directly. TODO(schroederc): handle Callers

func (Atomizer) Decorations

func (a Atomizer) Decorations(ctx context.Context, decor *xpb.DecorationsReply) (ret error)

Decorations emits a file node for the reply's Location, emits an anchor node for each reference along with an edge to its target, and emits all node facts directly.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL