proto

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2016 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package proto is a generated protocol buffer package.

It is generated from these files:

serializations.proto

It has these top-level messages:

LogDelta
HistoryEntry
NodeData
Quad
Value

Index

Constants

This section is empty.

Variables

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

Functions

func MarshalValue added in v0.6.0

func MarshalValue(v quad.Value) ([]byte, error)

MarshalValue is a helper for serialization of quad.Value.

func UnmarshalValue added in v0.6.0

func UnmarshalValue(data []byte) (quad.Value, error)

UnmarshalValue is a helper for deserialization of quad.Value.

Types

type HistoryEntry

type HistoryEntry struct {
	History []uint64 `protobuf:"varint,1,rep,name=History" json:"History,omitempty"`
}

func (*HistoryEntry) Marshal

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

func (*HistoryEntry) MarshalTo

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

func (*HistoryEntry) ProtoMessage

func (*HistoryEntry) ProtoMessage()

func (*HistoryEntry) ProtoSize added in v0.6.0

func (m *HistoryEntry) ProtoSize() (n int)

func (*HistoryEntry) Reset

func (m *HistoryEntry) Reset()

func (*HistoryEntry) String

func (m *HistoryEntry) String() string

func (*HistoryEntry) Unmarshal

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

type LogDelta

type LogDelta struct {
	ID        uint64 `protobuf:"varint,1,opt,name=ID,proto3" json:"ID,omitempty"`
	Quad      *Quad  `protobuf:"bytes,2,opt,name=Quad" json:"Quad,omitempty"`
	Action    int32  `protobuf:"varint,3,opt,name=Action,proto3" json:"Action,omitempty"`
	Timestamp int64  `protobuf:"varint,4,opt,name=Timestamp,proto3" json:"Timestamp,omitempty"`
}

func (*LogDelta) GetQuad

func (m *LogDelta) GetQuad() *Quad

func (*LogDelta) Marshal

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

func (*LogDelta) MarshalTo

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

func (*LogDelta) ProtoMessage

func (*LogDelta) ProtoMessage()

func (*LogDelta) ProtoSize added in v0.6.0

func (m *LogDelta) ProtoSize() (n int)

func (*LogDelta) Reset

func (m *LogDelta) Reset()

func (*LogDelta) String

func (m *LogDelta) String() string

func (*LogDelta) Unmarshal

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

type NodeData

type NodeData struct {
	Name  string `protobuf:"bytes,1,opt,name=Name,proto3" json:"Name,omitempty"`
	Size  int64  `protobuf:"varint,2,opt,name=Size,proto3" json:"Size,omitempty"`
	Value *Value `protobuf:"bytes,3,opt,name=value" json:"value,omitempty"`
}

func (*NodeData) GetNativeValue added in v0.6.0

func (m *NodeData) GetNativeValue() quad.Value

GetNativeValue returns the value stored in Node.

func (*NodeData) GetValue added in v0.6.0

func (m *NodeData) GetValue() *Value

func (*NodeData) Marshal

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

func (*NodeData) MarshalTo

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

func (*NodeData) ProtoMessage

func (*NodeData) ProtoMessage()

func (*NodeData) ProtoSize added in v0.6.0

func (m *NodeData) ProtoSize() (n int)

func (*NodeData) Reset

func (m *NodeData) Reset()

func (*NodeData) String

func (m *NodeData) String() string

func (*NodeData) Unmarshal

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

func (*NodeData) Upgrade added in v0.6.0

func (m *NodeData) Upgrade()

type Quad

type Quad struct {
	Subject        string `protobuf:"bytes,1,opt,name=subject,proto3" json:"subject,omitempty"`
	Predicate      string `protobuf:"bytes,2,opt,name=predicate,proto3" json:"predicate,omitempty"`
	Object         string `protobuf:"bytes,3,opt,name=object,proto3" json:"object,omitempty"`
	Label          string `protobuf:"bytes,4,opt,name=label,proto3" json:"label,omitempty"`
	SubjectValue   *Value `protobuf:"bytes,5,opt,name=subject_value" json:"subject_value,omitempty"`
	PredicateValue *Value `protobuf:"bytes,6,opt,name=predicate_value" json:"predicate_value,omitempty"`
	ObjectValue    *Value `protobuf:"bytes,7,opt,name=object_value" json:"object_value,omitempty"`
	LabelValue     *Value `protobuf:"bytes,8,opt,name=label_value" json:"label_value,omitempty"`
}

func MakeQuad added in v0.6.0

func MakeQuad(q quad.Quad) *Quad

MakeQuad converts quad.Quad to its protobuf representation.

func (*Quad) GetLabelValue added in v0.6.0

func (m *Quad) GetLabelValue() *Value

func (*Quad) GetObjectValue added in v0.6.0

func (m *Quad) GetObjectValue() *Value

func (*Quad) GetPredicateValue added in v0.6.0

func (m *Quad) GetPredicateValue() *Value

func (*Quad) GetSubjectValue added in v0.6.0

func (m *Quad) GetSubjectValue() *Value

func (*Quad) Marshal

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

func (*Quad) MarshalTo

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

func (*Quad) ProtoMessage

func (*Quad) ProtoMessage()

func (*Quad) ProtoSize added in v0.6.0

func (m *Quad) ProtoSize() (n int)

func (*Quad) Reset

func (m *Quad) Reset()

func (*Quad) String

func (m *Quad) String() string

func (*Quad) ToNative added in v0.6.0

func (m *Quad) ToNative() (q quad.Quad)

ToNative converts protobuf Quad to quad.Quad.

func (*Quad) Unmarshal

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

func (*Quad) Upgrade added in v0.6.0

func (m *Quad) Upgrade()

type Value added in v0.6.0

type Value struct {
	// Types that are valid to be assigned to Value:
	//	*Value_Raw
	//	*Value_Str
	//	*Value_Iri
	//	*Value_Bnode
	//	*Value_TypedStr
	//	*Value_LangStr
	//	*Value_Int
	//	*Value_Float_
	//	*Value_Boolean
	//	*Value_Time
	Value isValue_Value `protobuf_oneof:"value"`
}

func MakeValue added in v0.6.0

func MakeValue(qv quad.Value) *Value

MakeValue converts quad.Value to its protobuf representation.

func (*Value) GetBnode added in v0.6.0

func (m *Value) GetBnode() string

func (*Value) GetBoolean added in v0.6.0

func (m *Value) GetBoolean() bool

func (*Value) GetFloat_ added in v0.6.0

func (m *Value) GetFloat_() float64

func (*Value) GetInt added in v0.6.0

func (m *Value) GetInt() int64

func (*Value) GetIri added in v0.6.0

func (m *Value) GetIri() string

func (*Value) GetLangStr added in v0.6.0

func (m *Value) GetLangStr() *Value_LangString

func (*Value) GetRaw added in v0.6.0

func (m *Value) GetRaw() []byte

func (*Value) GetStr added in v0.6.0

func (m *Value) GetStr() string

func (*Value) GetTime added in v0.6.0

func (m *Value) GetTime() *Value_Timestamp

func (*Value) GetTypedStr added in v0.6.0

func (m *Value) GetTypedStr() *Value_TypedString

func (*Value) GetValue added in v0.6.0

func (m *Value) GetValue() isValue_Value

func (*Value) Marshal added in v0.6.0

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

func (*Value) MarshalTo added in v0.6.0

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

func (*Value) ProtoMessage added in v0.6.0

func (*Value) ProtoMessage()

func (*Value) ProtoSize added in v0.6.0

func (m *Value) ProtoSize() (n int)

func (*Value) Reset added in v0.6.0

func (m *Value) Reset()

func (*Value) String added in v0.6.0

func (m *Value) String() string

func (*Value) ToNative added in v0.6.0

func (m *Value) ToNative() (qv quad.Value)

ToNative converts protobuf Value to quad.Value.

func (*Value) Unmarshal added in v0.6.0

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

func (*Value) XXX_OneofFuncs added in v0.6.0

func (*Value) XXX_OneofFuncs() (func(msg proto1.Message, b *proto1.Buffer) error, func(msg proto1.Message, tag, wire int, b *proto1.Buffer) (bool, error), []interface{})

XXX_OneofFuncs is for the internal use of the proto package.

type Value_Bnode added in v0.6.0

type Value_Bnode struct {
	Bnode string `protobuf:"bytes,4,opt,name=bnode,proto3,oneof"`
}

func (*Value_Bnode) MarshalTo added in v0.6.0

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

func (*Value_Bnode) ProtoSize added in v0.6.0

func (m *Value_Bnode) ProtoSize() (n int)

type Value_Boolean added in v0.6.0

type Value_Boolean struct {
	Boolean bool `protobuf:"varint,9,opt,name=boolean,proto3,oneof"`
}

func (*Value_Boolean) MarshalTo added in v0.6.0

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

func (*Value_Boolean) ProtoSize added in v0.6.0

func (m *Value_Boolean) ProtoSize() (n int)

type Value_Float_ added in v0.6.0

type Value_Float_ struct {
	Float_ float64 `protobuf:"fixed64,8,opt,name=float_,proto3,oneof"`
}

func (*Value_Float_) MarshalTo added in v0.6.0

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

func (*Value_Float_) ProtoSize added in v0.6.0

func (m *Value_Float_) ProtoSize() (n int)

type Value_Int added in v0.6.0

type Value_Int struct {
	Int int64 `protobuf:"varint,7,opt,name=int,proto3,oneof"`
}

func (*Value_Int) MarshalTo added in v0.6.0

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

func (*Value_Int) ProtoSize added in v0.6.0

func (m *Value_Int) ProtoSize() (n int)

type Value_Iri added in v0.6.0

type Value_Iri struct {
	Iri string `protobuf:"bytes,3,opt,name=iri,proto3,oneof"`
}

func (*Value_Iri) MarshalTo added in v0.6.0

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

func (*Value_Iri) ProtoSize added in v0.6.0

func (m *Value_Iri) ProtoSize() (n int)

type Value_LangStr added in v0.6.0

type Value_LangStr struct {
	LangStr *Value_LangString `protobuf:"bytes,6,opt,name=lang_str,oneof"`
}

func (*Value_LangStr) MarshalTo added in v0.6.0

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

func (*Value_LangStr) ProtoSize added in v0.6.0

func (m *Value_LangStr) ProtoSize() (n int)

type Value_LangString added in v0.6.0

type Value_LangString struct {
	Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"`
	Lang  string `protobuf:"bytes,2,opt,name=lang,proto3" json:"lang,omitempty"`
}

func (*Value_LangString) Marshal added in v0.6.0

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

func (*Value_LangString) MarshalTo added in v0.6.0

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

func (*Value_LangString) ProtoMessage added in v0.6.0

func (*Value_LangString) ProtoMessage()

func (*Value_LangString) ProtoSize added in v0.6.0

func (m *Value_LangString) ProtoSize() (n int)

func (*Value_LangString) Reset added in v0.6.0

func (m *Value_LangString) Reset()

func (*Value_LangString) String added in v0.6.0

func (m *Value_LangString) String() string

func (*Value_LangString) Unmarshal added in v0.6.0

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

type Value_Raw added in v0.6.0

type Value_Raw struct {
	Raw []byte `protobuf:"bytes,1,opt,name=raw,proto3,oneof"`
}

func (*Value_Raw) MarshalTo added in v0.6.0

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

func (*Value_Raw) ProtoSize added in v0.6.0

func (m *Value_Raw) ProtoSize() (n int)

type Value_Str added in v0.6.0

type Value_Str struct {
	Str string `protobuf:"bytes,2,opt,name=str,proto3,oneof"`
}

func (*Value_Str) MarshalTo added in v0.6.0

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

func (*Value_Str) ProtoSize added in v0.6.0

func (m *Value_Str) ProtoSize() (n int)

type Value_Time added in v0.6.0

type Value_Time struct {
	Time *Value_Timestamp `protobuf:"bytes,10,opt,name=time,oneof"`
}

func (*Value_Time) MarshalTo added in v0.6.0

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

func (*Value_Time) ProtoSize added in v0.6.0

func (m *Value_Time) ProtoSize() (n int)

type Value_Timestamp added in v0.6.0

type Value_Timestamp struct {
	Seconds int64 `protobuf:"varint,1,opt,name=seconds,proto3" json:"seconds,omitempty"`
	Nanos   int32 `protobuf:"varint,2,opt,name=nanos,proto3" json:"nanos,omitempty"`
}

From https://github.com/golang/protobuf/blob/master/ptypes/timestamp/timestamp.proto

func (*Value_Timestamp) Marshal added in v0.6.0

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

func (*Value_Timestamp) MarshalTo added in v0.6.0

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

func (*Value_Timestamp) ProtoMessage added in v0.6.0

func (*Value_Timestamp) ProtoMessage()

func (*Value_Timestamp) ProtoSize added in v0.6.0

func (m *Value_Timestamp) ProtoSize() (n int)

func (*Value_Timestamp) Reset added in v0.6.0

func (m *Value_Timestamp) Reset()

func (*Value_Timestamp) String added in v0.6.0

func (m *Value_Timestamp) String() string

func (*Value_Timestamp) Unmarshal added in v0.6.0

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

type Value_TypedStr added in v0.6.0

type Value_TypedStr struct {
	TypedStr *Value_TypedString `protobuf:"bytes,5,opt,name=typed_str,oneof"`
}

func (*Value_TypedStr) MarshalTo added in v0.6.0

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

func (*Value_TypedStr) ProtoSize added in v0.6.0

func (m *Value_TypedStr) ProtoSize() (n int)

type Value_TypedString added in v0.6.0

type Value_TypedString struct {
	Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"`
	Type  string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"`
}

func (*Value_TypedString) Marshal added in v0.6.0

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

func (*Value_TypedString) MarshalTo added in v0.6.0

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

func (*Value_TypedString) ProtoMessage added in v0.6.0

func (*Value_TypedString) ProtoMessage()

func (*Value_TypedString) ProtoSize added in v0.6.0

func (m *Value_TypedString) ProtoSize() (n int)

func (*Value_TypedString) Reset added in v0.6.0

func (m *Value_TypedString) Reset()

func (*Value_TypedString) String added in v0.6.0

func (m *Value_TypedString) String() string

func (*Value_TypedString) Unmarshal added in v0.6.0

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

Jump to

Keyboard shortcuts

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