schema

package
v0.0.25 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2016 License: Apache-2.0 Imports: 2 Imported by: 6

Documentation

Overview

Package schema defines constants used in the Kythe schema.

Index

Constants

View Source
const (
	// AnchorLocFilter is a fact filter for anchor locations.
	AnchorLocFilter = "/kythe/loc/*"

	// SnippetLocFilter is a fact filter for snippet locations.
	SnippetLocFilter = "/kythe/snippet/*"
)
View Source
const Prefix = "/kythe/"

Prefix is the label prefix for the Kythe schema.

Variables

This section is empty.

Functions

This section is empty.

Types

type Edge added in v0.0.25

type Edge struct {
	Source, Target *spb.VName
	Kind           string
}

An Edge represents an edge.

func (*Edge) ToEntry added in v0.0.25

func (e *Edge) ToEntry() *spb.Entry

ToEntry converts e to a kythe.proto.Entry message.

type Facts added in v0.0.25

type Facts map[string]string

Facts represents a collection of key/value facts.

type Node added in v0.0.25

type Node struct {
	VName *spb.VName
	Kind  string
	Facts Facts
}

A Node represents a collection of facts about a node.

func (*Node) AddFact added in v0.0.25

func (n *Node) AddFact(name, value string)

AddFact adds the specified fact to n, replacing any previous value for that fact that may exist.

func (*Node) ToEntries added in v0.0.25

func (n *Node) ToEntries() []*spb.Entry

ToEntries converts n to a slice of kythe.proto.Entry messages. The result will have at least one entry for the node kind. If n contains a text fact and does not supply an explicit encoding, the default one is also added. The resulting slice is not ordered.

Directories

Path Synopsis
Package edges defines constants for Kythe edges.
Package edges defines constants for Kythe edges.
Package facts defines constants for Kythe facts.
Package facts defines constants for Kythe facts.
Package nodes defines constants for Kythe nodes.
Package nodes defines constants for Kythe nodes.

Jump to

Keyboard shortcuts

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