schema

package
v0.0.67 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2024 License: Apache-2.0, NCSA Imports: 3 Imported by: 0

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

func EdgeKind added in v0.0.27

func EdgeKind(k string) scpb.EdgeKind

EdgeKind returns the schema enum for the given edge kind.

func EdgeKindString added in v0.0.27

func EdgeKindString(k scpb.EdgeKind) string

EdgeKindString returns the string representation of the given edge kind.

func FactName added in v0.0.27

func FactName(f string) scpb.FactName

FactName returns the schema enum for the given fact name.

func FactNameString added in v0.0.27

func FactNameString(f scpb.FactName) string

FactNameString returns the string representation of the given fact name.

func GetEdgeKind added in v0.0.29

func GetEdgeKind(e *scpb.Edge) string

GetEdgeKind returns the string representation of the edge's kind.

func GetFactName added in v0.0.29

func GetFactName(f *scpb.Fact) string

GetFactName returns the string representation of the fact's name.

func GetNodeKind added in v0.0.29

func GetNodeKind(n *scpb.Node) string

GetNodeKind returns the string representation of the node's kind.

func GetSubkind added in v0.0.29

func GetSubkind(n *scpb.Node) string

GetSubkind returns the string representation of the node's subkind.

func NodeKind added in v0.0.27

func NodeKind(k string) scpb.NodeKind

NodeKind returns the schema enum for the given node kind.

func NodeKindString added in v0.0.27

func NodeKindString(k scpb.NodeKind) string

NodeKindString returns the string representation of the given node kind.

func Subkind added in v0.0.27

func Subkind(k string) scpb.Subkind

Subkind returns the schema enum for the given subkind.

func SubkindString added in v0.0.27

func SubkindString(k scpb.Subkind) string

SubkindString returns the string representation of the given subkind.

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.
Program mkdata parses the kythe.proto.schema.Metadata from the Kythe schema.proto file descriptor into a Go/Java source file that can be compiled into the schema util package.
Program mkdata parses the kythe.proto.schema.Metadata from the Kythe schema.proto file descriptor into a Go/Java source file that can be compiled into the schema util package.
Package nodes defines constants for Kythe nodes.
Package nodes defines constants for Kythe nodes.
Package tickets defines functions for manipulating Kythe tickets.
Package tickets defines functions for manipulating Kythe tickets.

Jump to

Keyboard shortcuts

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