xref_proto

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2015 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package xref_proto is a generated protocol buffer package.

It is generated from these files:

kythe/proto/xref.proto

It has these top-level messages:

NodesRequest
NodeInfo
NodesReply
EdgesRequest
EdgeSet
EdgesReply
Fact
Location
DecorationsRequest
DecorationsReply

Index

Constants

This section is empty.

Variables

View Source
var Location_Kind_name = map[int32]string{
	0: "FILE",
	1: "SPAN",
}
View Source
var Location_Kind_value = map[string]int32{
	"FILE": 0,
	"SPAN": 1,
}

Functions

func RegisterXRefServiceServer

func RegisterXRefServiceServer(s *grpc.Server, srv XRefServiceServer)

Types

type DecorationsReply

type DecorationsReply struct {
	// The normalized location for which decorations are returned.
	Location *Location `protobuf:"bytes,1,opt,name=location" json:"location,omitempty"`
	// The encoded source text for the selected window.
	SourceText []byte `protobuf:"bytes,2,opt,name=source_text,proto3" json:"source_text,omitempty"`
	Encoding   string `protobuf:"bytes,3,opt,name=encoding" json:"encoding,omitempty"`
	// The reference edges located in the specified window.
	Reference []*DecorationsReply_Reference `protobuf:"bytes,4,rep,name=reference" json:"reference,omitempty"`
	// This field will contain one entry for each distinct node referenced by a
	// reference edge.
	Node []*NodeInfo `protobuf:"bytes,15,rep,name=node" json:"node,omitempty"`
}

func (*DecorationsReply) GetLocation

func (m *DecorationsReply) GetLocation() *Location

func (*DecorationsReply) GetNode

func (m *DecorationsReply) GetNode() []*NodeInfo

func (*DecorationsReply) GetReference

func (m *DecorationsReply) GetReference() []*DecorationsReply_Reference

func (*DecorationsReply) ProtoMessage

func (*DecorationsReply) ProtoMessage()

func (*DecorationsReply) Reset

func (m *DecorationsReply) Reset()

func (*DecorationsReply) String

func (m *DecorationsReply) String() string

type DecorationsReply_Reference

type DecorationsReply_Reference struct {
	SourceTicket string `protobuf:"bytes,1,opt,name=source_ticket" json:"source_ticket,omitempty"`
	TargetTicket string `protobuf:"bytes,2,opt,name=target_ticket" json:"target_ticket,omitempty"`
	Kind         string `protobuf:"bytes,3,opt,name=kind" json:"kind,omitempty"`
}

Represents a reference edge source ---KIND---> target.

func (*DecorationsReply_Reference) ProtoMessage

func (*DecorationsReply_Reference) ProtoMessage()

func (*DecorationsReply_Reference) Reset

func (m *DecorationsReply_Reference) Reset()

func (*DecorationsReply_Reference) String

func (m *DecorationsReply_Reference) String() string

type DecorationsRequest

type DecorationsRequest struct {
	// The location of the file to fetch decorations for.  The ticket of location
	// must be non-empty.
	//
	// If the location is a SPAN, decorations are only returned for the specified
	// window of the file.  It is an error in any case if location is invalid.
	Location *Location `protobuf:"bytes,1,opt,name=location" json:"location,omitempty"`
	// If dirty_buffer is non-empty, the results will be adjusted (patched) to
	// account for the regions of the specified file differing from the contents
	// of the dirty buffer.
	DirtyBuffer []byte `protobuf:"bytes,2,opt,name=dirty_buffer,proto3" json:"dirty_buffer,omitempty"`
	// If true, return the encoded source text for the selected window.  Source
	// text is not affected by patching.
	SourceText bool `protobuf:"varint,3,opt,name=source_text" json:"source_text,omitempty"`
	// If true, return reference edges whose source nodes are located in the
	// selected window.  References are affected by patching.
	References bool `protobuf:"varint,4,opt,name=references" json:"references,omitempty"`
}

func (*DecorationsRequest) GetLocation

func (m *DecorationsRequest) GetLocation() *Location

func (*DecorationsRequest) ProtoMessage

func (*DecorationsRequest) ProtoMessage()

func (*DecorationsRequest) Reset

func (m *DecorationsRequest) Reset()

func (*DecorationsRequest) String

func (m *DecorationsRequest) String() string

type EdgeSet

type EdgeSet struct {
	// The ticket of the source node for all the edges in the edge set.
	SourceTicket string `protobuf:"bytes,1,opt,name=source_ticket" json:"source_ticket,omitempty"`
	// Each group is a collection of outbound edges from source node sharing a
	// given kind.  In a given EdgeSet, the server will not send more than one
	// group with the same kind label.
	Group []*EdgeSet_Group `protobuf:"bytes,2,rep,name=group" json:"group,omitempty"`
}

An EdgeSet represents a collection of edges outbound from a single node. The edges are organized into groups, each sharing a common edge kind.

The number of edges represented by an EdgeSet es, denoted len(es), is the sum of the lengths of the repeated target_ticket fields for all the groups in the EdgeSet. This count is used to determine page size in a request.

TODO(fromberger): Sort out what to do about the rare case of facts attached to edges.

func (*EdgeSet) GetGroup

func (m *EdgeSet) GetGroup() []*EdgeSet_Group

func (*EdgeSet) ProtoMessage

func (*EdgeSet) ProtoMessage()

func (*EdgeSet) Reset

func (m *EdgeSet) Reset()

func (*EdgeSet) String

func (m *EdgeSet) String() string

type EdgeSet_Group

type EdgeSet_Group struct {
	Kind         string   `protobuf:"bytes,1,opt,name=kind" json:"kind,omitempty"`
	TargetTicket []string `protobuf:"bytes,2,rep,name=target_ticket" json:"target_ticket,omitempty"`
}

func (*EdgeSet_Group) ProtoMessage

func (*EdgeSet_Group) ProtoMessage()

func (*EdgeSet_Group) Reset

func (m *EdgeSet_Group) Reset()

func (*EdgeSet_Group) String

func (m *EdgeSet_Group) String() string

type EdgesReply

type EdgesReply struct {
	// This field will contain one EdgeSet for each source node with one or more
	// matching outbound edges.  The number of edges represented by an EdgesReply
	// er, denoted len(er), is the sum of len(es) for each es in edgeset.  This
	// count is used to determine the page size.
	EdgeSet []*EdgeSet `protobuf:"bytes,1,rep,name=edge_set" json:"edge_set,omitempty"`
	// This field will contain one entry for each distinct node referenced by
	// some edge in edgesets, for which there is one or more matching facts.
	//
	// Rationale: This prevents us from having to copy the data to all the end
	// nodes, but allows the client to have that information without making
	// additional requests.
	Node []*NodeInfo `protobuf:"bytes,2,rep,name=node" json:"node,omitempty"`
	// If there are additional pages of edges after the ones returned in this
	// reply, next_page_token is the page token that may be passed to fetch the
	// next page in sequence after this one.  If there are no additional edges,
	// this field will be empty.
	NextPageToken string `protobuf:"bytes,9,opt,name=next_page_token" json:"next_page_token,omitempty"`
}

func (*EdgesReply) GetEdgeSet

func (m *EdgesReply) GetEdgeSet() []*EdgeSet

func (*EdgesReply) GetNode

func (m *EdgesReply) GetNode() []*NodeInfo

func (*EdgesReply) ProtoMessage

func (*EdgesReply) ProtoMessage()

func (*EdgesReply) Reset

func (m *EdgesReply) Reset()

func (*EdgesReply) String

func (m *EdgesReply) String() string

type EdgesRequest

type EdgesRequest struct {
	// The tickets of the source nodes for which edges are requested.
	// The service will return an error if no tickets are specified.
	Ticket []string `protobuf:"bytes,1,rep,name=ticket" json:"ticket,omitempty"`
	// The kinds of outbound edges that should be returned for each matching
	// source node.  If empty, all available edge kinds are returned.
	Kind []string `protobuf:"bytes,2,rep,name=kind" json:"kind,omitempty"`
	// A collection of filter globs that specify which facts (by name) should be
	// returned for the target node of each matching edge.  If filter is empty,
	// no facts are returned.
	//
	// The supported glob operators are:
	//   *   zero or more non-slash characters ([^/]*)
	//   ?   any single non-slash character ([^/])
	//   **  zero or more of any character (.*)
	//
	// All other characters match literally, and the glob must consume the entire
	// name in order to match.  The facts returned are the union of those matched
	// by all the globs provided.
	Filter []string `protobuf:"bytes,3,rep,name=filter" json:"filter,omitempty"`
	// The edges matching a request are organized into logical pages.  The size
	// of each page is a number of distinct edges.  Notionally: All the matching
	// edges are ordered lexicographically by (start_ticket, kind, end_ticket);
	// the page_token determines where in the ordering to start, and page_size
	// determines how many edges should be returned.
	//
	// If page_token is empty, edges will be returned starting at the beginning
	// of the sequence; otherwise the starting point named by the page_token will
	// be used.  Legal values of page_token are returned by the server in the
	// next_page_token field of the EdgesReply.  A page token should be treated
	// as an opaque value by the client, and is valid only relative to a
	// particular set of tickets and kinds.  If an invalid page token is
	// requested, the server will return an error.
	//
	// If page_size > 0, at most that number of edges will be returned by the
	// service for this request (see EdgeSet and EdgesReply below).
	// If page_size = 0, the default, the server will assume a reasonable default
	// page size.  The server will return an error if page_size < 0.
	//
	// The server is allowed to return fewer edges than the requested page_size,
	// even if more are available, save that it must return at least 1 edge if
	// any are available at all.
	PageSize  int32  `protobuf:"varint,8,opt,name=page_size" json:"page_size,omitempty"`
	PageToken string `protobuf:"bytes,9,opt,name=page_token" json:"page_token,omitempty"`
}

func (*EdgesRequest) ProtoMessage

func (*EdgesRequest) ProtoMessage()

func (*EdgesRequest) Reset

func (m *EdgesRequest) Reset()

func (*EdgesRequest) String

func (m *EdgesRequest) String() string

type Fact

type Fact struct {
	Name  string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
	Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
}

Fact represents a single key/value fact from the graph.

func (*Fact) ProtoMessage

func (*Fact) ProtoMessage()

func (*Fact) Reset

func (m *Fact) Reset()

func (*Fact) String

func (m *Fact) String() string

type Location

type Location struct {
	// The ticket of the file this location belongs to.  If the location
	// represents a memory buffer, the ticket should be omitted.
	Ticket string `protobuf:"bytes,1,opt,name=ticket" json:"ticket,omitempty"`
	// What kind of location this is.
	Kind Location_Kind `protobuf:"varint,2,opt,name=kind,enum=kythe.proto.Location_Kind" json:"kind,omitempty"`
	// The starting point of the location.
	Start *Location_Point `protobuf:"bytes,3,opt,name=start" json:"start,omitempty"`
	// The ending point of the location.
	End *Location_Point `protobuf:"bytes,4,opt,name=end" json:"end,omitempty"`
}

A Location represents a single span of zero or more contiguous bytes of a file or buffer. An empty LOCATION denotes the entirety of the referenced file or buffer.

func (*Location) GetEnd

func (m *Location) GetEnd() *Location_Point

func (*Location) GetStart

func (m *Location) GetStart() *Location_Point

func (*Location) ProtoMessage

func (*Location) ProtoMessage()

func (*Location) Reset

func (m *Location) Reset()

func (*Location) String

func (m *Location) String() string

type Location_Kind

type Location_Kind int32
const (
	// The entire file; the start and end fields are ignored.
	Location_FILE Location_Kind = 0
	// The point or span of file subtended by start and end.
	Location_SPAN Location_Kind = 1
)

func (Location_Kind) String

func (x Location_Kind) String() string

type Location_Point

type Location_Point struct {
	// The offset in bytes from the beginning of the file.
	// Requires 0 ≤ byte_offset ≤ len(file).
	ByteOffset int32 `protobuf:"varint,1,opt,name=byte_offset" json:"byte_offset,omitempty"`
	// The line number containing the point, 1-based.
	LineNumber int32 `protobuf:"varint,2,opt,name=line_number" json:"line_number,omitempty"`
	// The byte offset of the point within its line.
	ColumnOffset int32 `protobuf:"varint,3,opt,name=column_offset" json:"column_offset,omitempty"`
}

A Point represents a location within a file or buffer.

If line_number ≤ 0, the line number and column offset are considered unknown and will be ignored.

A point with line_number > 0 is said to be _normalized_ if it satisfies the constraint 0 ≤ column_offset ≤ bytelen(line_number); that is, if the column_offset is within the actual range of the corresponding line. A point can be normalized by adjusting line_number and column_offset so that this constraint is satisfied. This may be impossible if the column offset exceeds the bounds of the file.

func (*Location_Point) ProtoMessage

func (*Location_Point) ProtoMessage()

func (*Location_Point) Reset

func (m *Location_Point) Reset()

func (*Location_Point) String

func (m *Location_Point) String() string

type NodeInfo

type NodeInfo struct {
	Ticket string  `protobuf:"bytes,1,opt,name=ticket" json:"ticket,omitempty"`
	Fact   []*Fact `protobuf:"bytes,2,rep,name=fact" json:"fact,omitempty"`
}

func (*NodeInfo) GetFact

func (m *NodeInfo) GetFact() []*Fact

func (*NodeInfo) ProtoMessage

func (*NodeInfo) ProtoMessage()

func (*NodeInfo) Reset

func (m *NodeInfo) Reset()

func (*NodeInfo) String

func (m *NodeInfo) String() string

type NodesReply

type NodesReply struct {
	// One NodeInfo is returned for each requested node that had a non-zero
	// number of matching facts.
	Node []*NodeInfo `protobuf:"bytes,1,rep,name=node" json:"node,omitempty"`
}

func (*NodesReply) GetNode

func (m *NodesReply) GetNode() []*NodeInfo

func (*NodesReply) ProtoMessage

func (*NodesReply) ProtoMessage()

func (*NodesReply) Reset

func (m *NodesReply) Reset()

func (*NodesReply) String

func (m *NodesReply) String() string

type NodesRequest

type NodesRequest struct {
	// The tickets of the nodes to be looked up.
	Ticket []string `protobuf:"bytes,1,rep,name=ticket" json:"ticket,omitempty"`
	// A collection of filter globs that specify which facts (by name) should be
	// returned for each node.  If filter is empty or unset, all available facts
	// are returned for each matching node.  The filter applies to ALL requested
	// nodes.  For different filters per node, the client must issue separate
	// requests.  See EdgesRequest for the format of the filter globs.
	Filter []string `protobuf:"bytes,2,rep,name=filter" json:"filter,omitempty"`
}

func (*NodesRequest) ProtoMessage

func (*NodesRequest) ProtoMessage()

func (*NodesRequest) Reset

func (m *NodesRequest) Reset()

func (*NodesRequest) String

func (m *NodesRequest) String() string

type XRefServiceClient

type XRefServiceClient interface {
	// Nodes returns a subset of the facts for each of the requested nodes.
	Nodes(ctx context.Context, in *NodesRequest, opts ...grpc.CallOption) (*NodesReply, error)
	// Edges returns a subset of the outbound edges for each of a set of
	// requested nodes.
	Edges(ctx context.Context, in *EdgesRequest, opts ...grpc.CallOption) (*EdgesReply, error)
	// Decorations returns an index of the nodes and edges associated with a
	// particular file node.
	Decorations(ctx context.Context, in *DecorationsRequest, opts ...grpc.CallOption) (*DecorationsReply, error)
}

func NewXRefServiceClient

func NewXRefServiceClient(cc *grpc.ClientConn) XRefServiceClient

type XRefServiceServer

type XRefServiceServer interface {
	// Nodes returns a subset of the facts for each of the requested nodes.
	Nodes(context.Context, *NodesRequest) (*NodesReply, error)
	// Edges returns a subset of the outbound edges for each of a set of
	// requested nodes.
	Edges(context.Context, *EdgesRequest) (*EdgesReply, error)
	// Decorations returns an index of the nodes and edges associated with a
	// particular file node.
	Decorations(context.Context, *DecorationsRequest) (*DecorationsReply, error)
}

Jump to

Keyboard shortcuts

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