storage_proto

package
v0.0.26 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2016 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package storage_proto is a generated protocol buffer package.

It is generated from these files:

kythe/proto/storage.proto

It has these top-level messages:

VName
VNameMask
Entry
Entries
ReadRequest
WriteRequest
WriteReply
ScanRequest
CountRequest
CountReply
ShardRequest

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthStorage = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowStorage   = fmt.Errorf("proto: integer overflow")
)

Functions

This section is empty.

Types

type CountReply

type CountReply struct {
	// Total number of entries in the specified shard.
	Entries int64 `protobuf:"varint,1,opt,name=entries,proto3" json:"entries,omitempty"`
}

Response for a CountRequest

func (*CountReply) Descriptor added in v0.0.21

func (*CountReply) Descriptor() ([]byte, []int)

func (*CountReply) Marshal added in v0.0.17

func (m *CountReply) Marshal() (data []byte, err error)

func (*CountReply) MarshalTo added in v0.0.17

func (m *CountReply) MarshalTo(data []byte) (int, error)

func (*CountReply) ProtoMessage

func (*CountReply) ProtoMessage()

func (*CountReply) Reset

func (m *CountReply) Reset()

func (*CountReply) Size added in v0.0.17

func (m *CountReply) Size() (n int)

func (*CountReply) String

func (m *CountReply) String() string

func (*CountReply) Unmarshal added in v0.0.17

func (m *CountReply) Unmarshal(data []byte) error

type CountRequest

type CountRequest struct {
	Index  int64 `protobuf:"varint,1,opt,name=index,proto3" json:"index,omitempty"`
	Shards int64 `protobuf:"varint,2,opt,name=shards,proto3" json:"shards,omitempty"`
}

Request for the size of the shard at the given index.

func (*CountRequest) Descriptor added in v0.0.21

func (*CountRequest) Descriptor() ([]byte, []int)

func (*CountRequest) Marshal added in v0.0.17

func (m *CountRequest) Marshal() (data []byte, err error)

func (*CountRequest) MarshalTo added in v0.0.17

func (m *CountRequest) MarshalTo(data []byte) (int, error)

func (*CountRequest) ProtoMessage

func (*CountRequest) ProtoMessage()

func (*CountRequest) Reset

func (m *CountRequest) Reset()

func (*CountRequest) Size added in v0.0.17

func (m *CountRequest) Size() (n int)

func (*CountRequest) String

func (m *CountRequest) String() string

func (*CountRequest) Unmarshal added in v0.0.17

func (m *CountRequest) Unmarshal(data []byte) error

type Entries

type Entries struct {
	Entries []*Entry `protobuf:"bytes,1,rep,name=entries" json:"entries,omitempty"`
}

A collection of Entry instances.

func (*Entries) Descriptor added in v0.0.21

func (*Entries) Descriptor() ([]byte, []int)

func (*Entries) GetEntries

func (m *Entries) GetEntries() []*Entry

func (*Entries) Marshal added in v0.0.17

func (m *Entries) Marshal() (data []byte, err error)

func (*Entries) MarshalTo added in v0.0.17

func (m *Entries) MarshalTo(data []byte) (int, error)

func (*Entries) ProtoMessage

func (*Entries) ProtoMessage()

func (*Entries) Reset

func (m *Entries) Reset()

func (*Entries) Size added in v0.0.17

func (m *Entries) Size() (n int)

func (*Entries) String

func (m *Entries) String() string

func (*Entries) Unmarshal added in v0.0.17

func (m *Entries) Unmarshal(data []byte) error

type Entry

type Entry struct {
	Source *VName `protobuf:"bytes,1,opt,name=source" json:"source,omitempty"`
	// The following two fields must either be both empty, or both nonempty.
	EdgeKind string `protobuf:"bytes,2,opt,name=edge_kind,json=edgeKind,proto3" json:"edge_kind,omitempty"`
	Target   *VName `protobuf:"bytes,3,opt,name=target" json:"target,omitempty"`
	// The grammar for fact_name:
	//  name   = "/" | 1*path
	//  path   = "/" word
	//  word   = 1*{LETTER|DIGIT|PUNCT}
	//  LETTER = [A-Za-z]
	//  DIGIT  = [0-9]
	//  PUNCT  = [-.@#$%&_+:()]
	FactName  string `protobuf:"bytes,4,opt,name=fact_name,json=factName,proto3" json:"fact_name,omitempty"`
	FactValue []byte `protobuf:"bytes,5,opt,name=fact_value,json=factValue,proto3" json:"fact_value,omitempty"`
}

An Entry associates a fact with a graph object (node or edge). This is the the primary unit of storage.

func (*Entry) Descriptor added in v0.0.21

func (*Entry) Descriptor() ([]byte, []int)

func (*Entry) GetSource

func (m *Entry) GetSource() *VName

func (*Entry) GetTarget

func (m *Entry) GetTarget() *VName

func (*Entry) Marshal added in v0.0.17

func (m *Entry) Marshal() (data []byte, err error)

func (*Entry) MarshalTo added in v0.0.17

func (m *Entry) MarshalTo(data []byte) (int, error)

func (*Entry) ProtoMessage

func (*Entry) ProtoMessage()

func (*Entry) Reset

func (m *Entry) Reset()

func (*Entry) Size added in v0.0.17

func (m *Entry) Size() (n int)

func (*Entry) String

func (m *Entry) String() string

func (*Entry) Unmarshal added in v0.0.17

func (m *Entry) Unmarshal(data []byte) error

type ReadRequest

type ReadRequest struct {
	// Return entries having this source VName, which may not be empty.
	Source *VName `protobuf:"bytes,1,opt,name=source" json:"source,omitempty"`
	// Return entries having this edge kind; if empty, only entries with an empty
	// edge kind are returned; if "*", entries of any edge kind are returned.
	EdgeKind string `protobuf:"bytes,2,opt,name=edge_kind,json=edgeKind,proto3" json:"edge_kind,omitempty"`
}

Request for a stream of Entry objects from a GraphStore. Read operations should be implemented with time complexity proportional to the size of the return set.

func (*ReadRequest) Descriptor added in v0.0.21

func (*ReadRequest) Descriptor() ([]byte, []int)

func (*ReadRequest) GetSource

func (m *ReadRequest) GetSource() *VName

func (*ReadRequest) Marshal added in v0.0.17

func (m *ReadRequest) Marshal() (data []byte, err error)

func (*ReadRequest) MarshalTo added in v0.0.17

func (m *ReadRequest) MarshalTo(data []byte) (int, error)

func (*ReadRequest) ProtoMessage

func (*ReadRequest) ProtoMessage()

func (*ReadRequest) Reset

func (m *ReadRequest) Reset()

func (*ReadRequest) Size added in v0.0.17

func (m *ReadRequest) Size() (n int)

func (*ReadRequest) String

func (m *ReadRequest) String() string

func (*ReadRequest) Unmarshal added in v0.0.17

func (m *ReadRequest) Unmarshal(data []byte) error

type ScanRequest

type ScanRequest struct {
	// Return entries having this target VName; if empty, any target field is
	// matched, including empty.
	Target *VName `protobuf:"bytes,1,opt,name=target" json:"target,omitempty"`
	// Return entries having this kind; if empty, any kind is matched, including
	// empty.
	EdgeKind string `protobuf:"bytes,2,opt,name=edge_kind,json=edgeKind,proto3" json:"edge_kind,omitempty"`
	// Return entries having fact labels with this prefix; if empty, any fact
	// label is matched,
	FactPrefix string `protobuf:"bytes,3,opt,name=fact_prefix,json=factPrefix,proto3" json:"fact_prefix,omitempty"`
}

Request for a stream of Entry objects resulting from a full scan of a GraphStore.

func (*ScanRequest) Descriptor added in v0.0.21

func (*ScanRequest) Descriptor() ([]byte, []int)

func (*ScanRequest) GetTarget

func (m *ScanRequest) GetTarget() *VName

func (*ScanRequest) Marshal added in v0.0.17

func (m *ScanRequest) Marshal() (data []byte, err error)

func (*ScanRequest) MarshalTo added in v0.0.17

func (m *ScanRequest) MarshalTo(data []byte) (int, error)

func (*ScanRequest) ProtoMessage

func (*ScanRequest) ProtoMessage()

func (*ScanRequest) Reset

func (m *ScanRequest) Reset()

func (*ScanRequest) Size added in v0.0.17

func (m *ScanRequest) Size() (n int)

func (*ScanRequest) String

func (m *ScanRequest) String() string

func (*ScanRequest) Unmarshal added in v0.0.17

func (m *ScanRequest) Unmarshal(data []byte) error

type ShardRequest

type ShardRequest struct {
	Index  int64 `protobuf:"varint,1,opt,name=index,proto3" json:"index,omitempty"`
	Shards int64 `protobuf:"varint,2,opt,name=shards,proto3" json:"shards,omitempty"`
}

Request for a stream of Entry objects in the given shard.

func (*ShardRequest) Descriptor added in v0.0.21

func (*ShardRequest) Descriptor() ([]byte, []int)

func (*ShardRequest) Marshal added in v0.0.17

func (m *ShardRequest) Marshal() (data []byte, err error)

func (*ShardRequest) MarshalTo added in v0.0.17

func (m *ShardRequest) MarshalTo(data []byte) (int, error)

func (*ShardRequest) ProtoMessage

func (*ShardRequest) ProtoMessage()

func (*ShardRequest) Reset

func (m *ShardRequest) Reset()

func (*ShardRequest) Size added in v0.0.17

func (m *ShardRequest) Size() (n int)

func (*ShardRequest) String

func (m *ShardRequest) String() string

func (*ShardRequest) Unmarshal added in v0.0.17

func (m *ShardRequest) Unmarshal(data []byte) error

type VName

type VName struct {
	// A language-specific signature assigned by the analyzer.
	// e.g., "com.google.common.collect.Lists.newLinkedList<#1>()"
	Signature string `protobuf:"bytes,1,opt,name=signature,proto3" json:"signature,omitempty"`
	// The corpus this name belongs to.
	// e.g., "kythe", "chromium", "github.com/creachadair/imath", "aosp"
	// The corpus label "kythe" is reserved for internal use.
	Corpus string `protobuf:"bytes,2,opt,name=corpus,proto3" json:"corpus,omitempty"`
	// A corpus-specific root label, designating a subordinate collection within
	// the corpus.  If a corpus stores files in unrelated directory structures,
	// for example, the root can be used to distinguish them.  Or, of a corpus
	// incorporates subprojects, the root can be a project ID that it governs.
	// This may also be used to distinguish virtual subgroups of a corpus such as
	// generated files.
	Root string `protobuf:"bytes,3,opt,name=root,proto3" json:"root,omitempty"`
	// A path-structured label describing the location of this object relative to
	// the corpus and the root.  For code, this will generally be the relative
	// path to the file containing the code, e.g., "storage/service.go" in kythe.
	//
	// However, this need not be a true file path; virtual objects like figments
	// can assign an ad-hoc abstract ID, or omit it entirely.
	//
	// Examples:
	//   "devools/kythe/platform/go/datastore.go" (a file)
	//   "type/cpp/void.cc" (a type figment)
	Path string `protobuf:"bytes,4,opt,name=path,proto3" json:"path,omitempty"`
	// The language this name belongs to.
	// e.g., "c++", "python", "elisp", "haskell", "java"
	//
	// The schema will define specific labels for each supported language, so we
	// don't wind up with a confusion of names like "cxx", "cpp", "C++", etc.
	// Prototype: Official language name converted to lowercase.  If a version
	// number is necessary, include it, e.g., "python3".
	Language string `protobuf:"bytes,5,opt,name=language,proto3" json:"language,omitempty"`
}

VName is a proto representation of a vector name.

Rules:

  • All fields must be optional, and must have default values.
  • No field may ever be removed. If a field is deprecated, it may be renamed or marked with a comment, but must not be deleted.
  • New fields are always added to the end of the message.
  • All fields must be strings, not messages.

One of the key principles is that we want as few fields as possible in a vname. We're not trying to exhaust the possible dimensions along which a name could vary, but to find a minimal basis. Be conservative.

func (*VName) Descriptor added in v0.0.21

func (*VName) Descriptor() ([]byte, []int)

func (*VName) Marshal added in v0.0.17

func (m *VName) Marshal() (data []byte, err error)

func (*VName) MarshalTo added in v0.0.17

func (m *VName) MarshalTo(data []byte) (int, error)

func (*VName) ProtoMessage

func (*VName) ProtoMessage()

func (*VName) Reset

func (m *VName) Reset()

func (*VName) Size added in v0.0.17

func (m *VName) Size() (n int)

func (*VName) String

func (m *VName) String() string

func (*VName) Unmarshal added in v0.0.17

func (m *VName) Unmarshal(data []byte) error

type VNameMask

type VNameMask struct {
	Signature bool `protobuf:"varint,1,opt,name=signature,proto3" json:"signature,omitempty"`
	Corpus    bool `protobuf:"varint,2,opt,name=corpus,proto3" json:"corpus,omitempty"`
	Root      bool `protobuf:"varint,3,opt,name=root,proto3" json:"root,omitempty"`
	Path      bool `protobuf:"varint,4,opt,name=path,proto3" json:"path,omitempty"`
	Language  bool `protobuf:"varint,5,opt,name=language,proto3" json:"language,omitempty"`
}

func (*VNameMask) Descriptor added in v0.0.21

func (*VNameMask) Descriptor() ([]byte, []int)

func (*VNameMask) Marshal added in v0.0.17

func (m *VNameMask) Marshal() (data []byte, err error)

func (*VNameMask) MarshalTo added in v0.0.17

func (m *VNameMask) MarshalTo(data []byte) (int, error)

func (*VNameMask) ProtoMessage

func (*VNameMask) ProtoMessage()

func (*VNameMask) Reset

func (m *VNameMask) Reset()

func (*VNameMask) Size added in v0.0.17

func (m *VNameMask) Size() (n int)

func (*VNameMask) String

func (m *VNameMask) String() string

func (*VNameMask) Unmarshal added in v0.0.17

func (m *VNameMask) Unmarshal(data []byte) error

type WriteReply

type WriteReply struct {
}

Response to a WriteRequest

func (*WriteReply) Descriptor added in v0.0.21

func (*WriteReply) Descriptor() ([]byte, []int)

func (*WriteReply) Marshal added in v0.0.17

func (m *WriteReply) Marshal() (data []byte, err error)

func (*WriteReply) MarshalTo added in v0.0.17

func (m *WriteReply) MarshalTo(data []byte) (int, error)

func (*WriteReply) ProtoMessage

func (*WriteReply) ProtoMessage()

func (*WriteReply) Reset

func (m *WriteReply) Reset()

func (*WriteReply) Size added in v0.0.17

func (m *WriteReply) Size() (n int)

func (*WriteReply) String

func (m *WriteReply) String() string

func (*WriteReply) Unmarshal added in v0.0.17

func (m *WriteReply) Unmarshal(data []byte) error

type WriteRequest

type WriteRequest struct {
	Source *VName                 `protobuf:"bytes,1,opt,name=source" json:"source,omitempty"`
	Update []*WriteRequest_Update `protobuf:"bytes,2,rep,name=update" json:"update,omitempty"`
}

Request to write Entry objects to a GraphStore

func (*WriteRequest) Descriptor added in v0.0.21

func (*WriteRequest) Descriptor() ([]byte, []int)

func (*WriteRequest) GetSource

func (m *WriteRequest) GetSource() *VName

func (*WriteRequest) GetUpdate

func (m *WriteRequest) GetUpdate() []*WriteRequest_Update

func (*WriteRequest) Marshal added in v0.0.17

func (m *WriteRequest) Marshal() (data []byte, err error)

func (*WriteRequest) MarshalTo added in v0.0.17

func (m *WriteRequest) MarshalTo(data []byte) (int, error)

func (*WriteRequest) ProtoMessage

func (*WriteRequest) ProtoMessage()

func (*WriteRequest) Reset

func (m *WriteRequest) Reset()

func (*WriteRequest) Size added in v0.0.17

func (m *WriteRequest) Size() (n int)

func (*WriteRequest) String

func (m *WriteRequest) String() string

func (*WriteRequest) Unmarshal added in v0.0.17

func (m *WriteRequest) Unmarshal(data []byte) error

type WriteRequest_Update

type WriteRequest_Update struct {
	EdgeKind  string `protobuf:"bytes,1,opt,name=edge_kind,json=edgeKind,proto3" json:"edge_kind,omitempty"`
	Target    *VName `protobuf:"bytes,2,opt,name=target" json:"target,omitempty"`
	FactName  string `protobuf:"bytes,3,opt,name=fact_name,json=factName,proto3" json:"fact_name,omitempty"`
	FactValue []byte `protobuf:"bytes,4,opt,name=fact_value,json=factValue,proto3" json:"fact_value,omitempty"`
}

func (*WriteRequest_Update) Descriptor added in v0.0.21

func (*WriteRequest_Update) Descriptor() ([]byte, []int)

func (*WriteRequest_Update) GetTarget

func (m *WriteRequest_Update) GetTarget() *VName

func (*WriteRequest_Update) Marshal added in v0.0.17

func (m *WriteRequest_Update) Marshal() (data []byte, err error)

func (*WriteRequest_Update) MarshalTo added in v0.0.17

func (m *WriteRequest_Update) MarshalTo(data []byte) (int, error)

func (*WriteRequest_Update) ProtoMessage

func (*WriteRequest_Update) ProtoMessage()

func (*WriteRequest_Update) Reset

func (m *WriteRequest_Update) Reset()

func (*WriteRequest_Update) Size added in v0.0.17

func (m *WriteRequest_Update) Size() (n int)

func (*WriteRequest_Update) String

func (m *WriteRequest_Update) String() string

func (*WriteRequest_Update) Unmarshal added in v0.0.17

func (m *WriteRequest_Update) Unmarshal(data []byte) error

Jump to

Keyboard shortcuts

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