Documentation ¶
Overview ¶
Package pquads implements Cayley-specific protobuf-based quads format.
Package pquads is a generated protocol buffer package. It is generated from these files: quads.proto It has these top-level messages: Quad WireQuad StrictQuad Value Header
Index ¶
- Variables
- func MarshalValue(v quad.Value) ([]byte, error)
- func UnmarshalValue(data []byte) (quad.Value, error)
- type Header
- func (*Header) Descriptor() ([]byte, []int)
- func (m *Header) Marshal() (data []byte, err error)
- func (m *Header) MarshalTo(data []byte) (int, error)
- func (*Header) ProtoMessage()
- func (m *Header) ProtoSize() (n int)
- func (m *Header) Reset()
- func (m *Header) String() string
- func (m *Header) Unmarshal(data []byte) error
- type Options
- type Quad
- func (*Quad) Descriptor() ([]byte, []int)
- func (m *Quad) GetLabelValue() *Value
- func (m *Quad) GetObjectValue() *Value
- func (m *Quad) GetPredicateValue() *Value
- func (m *Quad) GetSubjectValue() *Value
- func (m *Quad) Marshal() (data []byte, err error)
- func (m *Quad) MarshalTo(data []byte) (int, error)
- func (*Quad) ProtoMessage()
- func (m *Quad) ProtoSize() (n int)
- func (m *Quad) Reset()
- func (m *Quad) String() string
- func (m *Quad) ToNative() (q quad.Quad)
- func (m *Quad) Unmarshal(data []byte) error
- func (m *Quad) Upgrade()
- type Reader
- type StrictQuad
- func (*StrictQuad) Descriptor() ([]byte, []int)
- func (m *StrictQuad) GetLabel() *StrictQuad_Ref
- func (m *StrictQuad) GetObject() *Value
- func (m *StrictQuad) GetPredicate() *StrictQuad_Ref
- func (m *StrictQuad) GetSubject() *StrictQuad_Ref
- func (m *StrictQuad) Marshal() (data []byte, err error)
- func (m *StrictQuad) MarshalTo(data []byte) (int, error)
- func (*StrictQuad) ProtoMessage()
- func (m *StrictQuad) ProtoSize() (n int)
- func (m *StrictQuad) Reset()
- func (m *StrictQuad) String() string
- func (m *StrictQuad) ToNative() (q quad.Quad)
- func (m *StrictQuad) Unmarshal(data []byte) error
- type StrictQuad_Ref
- func (*StrictQuad_Ref) Descriptor() ([]byte, []int)
- func (m *StrictQuad_Ref) GetBnodeLabel() string
- func (m *StrictQuad_Ref) GetIri() string
- func (m *StrictQuad_Ref) GetValue() isStrictQuad_Ref_Value
- func (m *StrictQuad_Ref) Marshal() (data []byte, err error)
- func (m *StrictQuad_Ref) MarshalTo(data []byte) (int, error)
- func (*StrictQuad_Ref) ProtoMessage()
- func (m *StrictQuad_Ref) ProtoSize() (n int)
- func (m *StrictQuad_Ref) Reset()
- func (m *StrictQuad_Ref) String() string
- func (m *StrictQuad_Ref) ToNative() (qv quad.Value)
- func (m *StrictQuad_Ref) Unmarshal(data []byte) error
- func (*StrictQuad_Ref) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, ...)
- type StrictQuad_Ref_BnodeLabel
- type StrictQuad_Ref_Iri
- type Value
- func (*Value) Descriptor() ([]byte, []int)
- func (m *Value) GetBnode() string
- func (m *Value) GetBoolean() bool
- func (m *Value) GetFloat() float64
- func (m *Value) GetInt() int64
- func (m *Value) GetIri() string
- func (m *Value) GetLangStr() *Value_LangString
- func (m *Value) GetRaw() []byte
- func (m *Value) GetStr() string
- func (m *Value) GetTime() *Value_Timestamp
- func (m *Value) GetTypedStr() *Value_TypedString
- func (m *Value) GetValue() isValue_Value
- func (m *Value) Marshal() (data []byte, err error)
- func (m *Value) MarshalTo(data []byte) (int, error)
- func (*Value) ProtoMessage()
- func (m *Value) ProtoSize() (n int)
- func (m *Value) Reset()
- func (m *Value) String() string
- func (m *Value) ToNative() (qv quad.Value)
- func (m *Value) Unmarshal(data []byte) error
- func (*Value) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, ...)
- type Value_Bnode
- type Value_Boolean
- type Value_Float
- type Value_Int
- type Value_Iri
- type Value_LangStr
- type Value_LangString
- func (*Value_LangString) Descriptor() ([]byte, []int)
- func (m *Value_LangString) Marshal() (data []byte, err error)
- func (m *Value_LangString) MarshalTo(data []byte) (int, error)
- func (*Value_LangString) ProtoMessage()
- func (m *Value_LangString) ProtoSize() (n int)
- func (m *Value_LangString) Reset()
- func (m *Value_LangString) String() string
- func (m *Value_LangString) Unmarshal(data []byte) error
- type Value_Raw
- type Value_Str
- type Value_Time
- type Value_Timestamp
- func (*Value_Timestamp) Descriptor() ([]byte, []int)
- func (m *Value_Timestamp) Marshal() (data []byte, err error)
- func (m *Value_Timestamp) MarshalTo(data []byte) (int, error)
- func (*Value_Timestamp) ProtoMessage()
- func (m *Value_Timestamp) ProtoSize() (n int)
- func (m *Value_Timestamp) Reset()
- func (m *Value_Timestamp) String() string
- func (m *Value_Timestamp) Unmarshal(data []byte) error
- type Value_TypedStr
- type Value_TypedString
- func (*Value_TypedString) Descriptor() ([]byte, []int)
- func (m *Value_TypedString) Marshal() (data []byte, err error)
- func (m *Value_TypedString) MarshalTo(data []byte) (int, error)
- func (*Value_TypedString) ProtoMessage()
- func (m *Value_TypedString) ProtoSize() (n int)
- func (m *Value_TypedString) Reset()
- func (m *Value_TypedString) String() string
- func (m *Value_TypedString) Unmarshal(data []byte) error
- type WireQuad
- func (*WireQuad) Descriptor() ([]byte, []int)
- func (m *WireQuad) GetLabel() *Value
- func (m *WireQuad) GetObject() *Value
- func (m *WireQuad) GetPredicate() *Value
- func (m *WireQuad) GetSubject() *Value
- func (m *WireQuad) Marshal() (data []byte, err error)
- func (m *WireQuad) MarshalTo(data []byte) (int, error)
- func (*WireQuad) ProtoMessage()
- func (m *WireQuad) ProtoSize() (n int)
- func (m *WireQuad) Reset()
- func (m *WireQuad) String() string
- func (m *WireQuad) ToNative() (q quad.Quad)
- func (m *WireQuad) Unmarshal(data []byte) error
- type Writer
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidLengthQuads = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowQuads = fmt.Errorf("proto: integer overflow") )
View Source
var DefaultMaxSize = 1024 * 1024
Functions ¶
func MarshalValue ¶
MarshalValue is a helper for serialization of quad.Value.
Types ¶
type Header ¶
type Header struct { // Full is set if encoder always writes every quad directions instead of // skipping duplicated values on each direction (except label) for subsequent quads. Full bool `protobuf:"varint,1,opt,name=full,proto3" json:"full,omitempty"` // NotStrict is set if encoder emits WireQuad instead of StrictQuad messages. NotStrict bool `protobuf:"varint,2,opt,name=not_strict,json=notStrict,proto3" json:"not_strict,omitempty"` }
func (*Header) Descriptor ¶
func (*Header) ProtoMessage ¶
func (*Header) ProtoMessage()
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=subjectValue" json:"subject_value,omitempty"` PredicateValue *Value `protobuf:"bytes,6,opt,name=predicate_value,json=predicateValue" json:"predicate_value,omitempty"` ObjectValue *Value `protobuf:"bytes,7,opt,name=object_value,json=objectValue" json:"object_value,omitempty"` LabelValue *Value `protobuf:"bytes,8,opt,name=label_value,json=labelValue" json:"label_value,omitempty"` }
Quad is in internal representation of quad used by Cayley.
func (*Quad) Descriptor ¶
func (*Quad) GetLabelValue ¶
func (*Quad) GetObjectValue ¶
func (*Quad) GetPredicateValue ¶
func (*Quad) GetSubjectValue ¶
func (*Quad) ProtoMessage ¶
func (*Quad) ProtoMessage()
type Reader ¶
type Reader struct {
// contains filtered or unexported fields
}
type StrictQuad ¶
type StrictQuad struct { Subject *StrictQuad_Ref `protobuf:"bytes,1,opt,name=subject" json:"subject,omitempty"` Predicate *StrictQuad_Ref `protobuf:"bytes,2,opt,name=predicate" json:"predicate,omitempty"` Object *Value `protobuf:"bytes,3,opt,name=object" json:"object,omitempty"` Label *StrictQuad_Ref `protobuf:"bytes,4,opt,name=label" json:"label,omitempty"` }
StrictQuad is a quad as described by RDF spec.
func (*StrictQuad) Descriptor ¶
func (*StrictQuad) Descriptor() ([]byte, []int)
func (*StrictQuad) GetLabel ¶
func (m *StrictQuad) GetLabel() *StrictQuad_Ref
func (*StrictQuad) GetObject ¶
func (m *StrictQuad) GetObject() *Value
func (*StrictQuad) GetPredicate ¶
func (m *StrictQuad) GetPredicate() *StrictQuad_Ref
func (*StrictQuad) GetSubject ¶
func (m *StrictQuad) GetSubject() *StrictQuad_Ref
func (*StrictQuad) Marshal ¶
func (m *StrictQuad) Marshal() (data []byte, err error)
func (*StrictQuad) ProtoMessage ¶
func (*StrictQuad) ProtoMessage()
func (*StrictQuad) ProtoSize ¶
func (m *StrictQuad) ProtoSize() (n int)
func (*StrictQuad) Reset ¶
func (m *StrictQuad) Reset()
func (*StrictQuad) String ¶
func (m *StrictQuad) String() string
func (*StrictQuad) ToNative ¶
func (m *StrictQuad) ToNative() (q quad.Quad)
ToNative converts protobuf StrictQuad to quad.Quad.
func (*StrictQuad) Unmarshal ¶
func (m *StrictQuad) Unmarshal(data []byte) error
type StrictQuad_Ref ¶
type StrictQuad_Ref struct { // Types that are valid to be assigned to Value: // *StrictQuad_Ref_BnodeLabel // *StrictQuad_Ref_Iri Value isStrictQuad_Ref_Value `protobuf_oneof:"value"` }
func (*StrictQuad_Ref) Descriptor ¶
func (*StrictQuad_Ref) Descriptor() ([]byte, []int)
func (*StrictQuad_Ref) GetBnodeLabel ¶
func (m *StrictQuad_Ref) GetBnodeLabel() string
func (*StrictQuad_Ref) GetIri ¶
func (m *StrictQuad_Ref) GetIri() string
func (*StrictQuad_Ref) GetValue ¶
func (m *StrictQuad_Ref) GetValue() isStrictQuad_Ref_Value
func (*StrictQuad_Ref) Marshal ¶
func (m *StrictQuad_Ref) Marshal() (data []byte, err error)
func (*StrictQuad_Ref) ProtoMessage ¶
func (*StrictQuad_Ref) ProtoMessage()
func (*StrictQuad_Ref) ProtoSize ¶
func (m *StrictQuad_Ref) ProtoSize() (n int)
func (*StrictQuad_Ref) Reset ¶
func (m *StrictQuad_Ref) Reset()
func (*StrictQuad_Ref) String ¶
func (m *StrictQuad_Ref) String() string
func (*StrictQuad_Ref) ToNative ¶
func (m *StrictQuad_Ref) ToNative() (qv quad.Value)
ToNative converts protobuf Value to quad.Value.
func (*StrictQuad_Ref) Unmarshal ¶
func (m *StrictQuad_Ref) Unmarshal(data []byte) error
func (*StrictQuad_Ref) XXX_OneofFuncs ¶
func (*StrictQuad_Ref) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{})
XXX_OneofFuncs is for the internal use of the proto package.
type StrictQuad_Ref_BnodeLabel ¶
type StrictQuad_Ref_BnodeLabel struct {
BnodeLabel string `protobuf:"bytes,2,opt,name=bnode_label,json=bnodeLabel,proto3,oneof"`
}
func (*StrictQuad_Ref_BnodeLabel) MarshalTo ¶
func (m *StrictQuad_Ref_BnodeLabel) MarshalTo(data []byte) (int, error)
func (*StrictQuad_Ref_BnodeLabel) ProtoSize ¶
func (m *StrictQuad_Ref_BnodeLabel) ProtoSize() (n int)
type StrictQuad_Ref_Iri ¶
type StrictQuad_Ref_Iri struct {
Iri string `protobuf:"bytes,3,opt,name=iri,proto3,oneof"`
}
func (*StrictQuad_Ref_Iri) MarshalTo ¶
func (m *StrictQuad_Ref_Iri) MarshalTo(data []byte) (int, error)
func (*StrictQuad_Ref_Iri) ProtoSize ¶
func (m *StrictQuad_Ref_Iri) ProtoSize() (n int)
type Value ¶
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 (*Value) Descriptor ¶
func (*Value) GetBoolean ¶
func (*Value) GetLangStr ¶
func (m *Value) GetLangStr() *Value_LangString
func (*Value) GetTime ¶
func (m *Value) GetTime() *Value_Timestamp
func (*Value) GetTypedStr ¶
func (m *Value) GetTypedStr() *Value_TypedString
func (*Value) ProtoMessage ¶
func (*Value) ProtoMessage()
type Value_Bnode ¶
type Value_Bnode struct {
Bnode string `protobuf:"bytes,4,opt,name=bnode,proto3,oneof"`
}
func (*Value_Bnode) ProtoSize ¶
func (m *Value_Bnode) ProtoSize() (n int)
type Value_Boolean ¶
type Value_Boolean struct {
Boolean bool `protobuf:"varint,9,opt,name=boolean,proto3,oneof"`
}
func (*Value_Boolean) ProtoSize ¶
func (m *Value_Boolean) ProtoSize() (n int)
type Value_Float ¶
type Value_Float struct {
Float float64 `protobuf:"fixed64,8,opt,name=float,proto3,oneof"`
}
func (*Value_Float) ProtoSize ¶
func (m *Value_Float) ProtoSize() (n int)
type Value_Int ¶
type Value_Int struct {
Int int64 `protobuf:"varint,7,opt,name=int,proto3,oneof"`
}
type Value_Iri ¶
type Value_Iri struct {
Iri string `protobuf:"bytes,3,opt,name=iri,proto3,oneof"`
}
type Value_LangStr ¶
type Value_LangStr struct {
LangStr *Value_LangString `protobuf:"bytes,6,opt,name=lang_str,json=langStr,oneof"`
}
func (*Value_LangStr) ProtoSize ¶
func (m *Value_LangStr) ProtoSize() (n int)
type Value_LangString ¶
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) Descriptor ¶
func (*Value_LangString) Descriptor() ([]byte, []int)
func (*Value_LangString) Marshal ¶
func (m *Value_LangString) Marshal() (data []byte, err error)
func (*Value_LangString) ProtoMessage ¶
func (*Value_LangString) ProtoMessage()
func (*Value_LangString) ProtoSize ¶
func (m *Value_LangString) ProtoSize() (n int)
func (*Value_LangString) Reset ¶
func (m *Value_LangString) Reset()
func (*Value_LangString) String ¶
func (m *Value_LangString) String() string
func (*Value_LangString) Unmarshal ¶
func (m *Value_LangString) Unmarshal(data []byte) error
type Value_Raw ¶
type Value_Raw struct {
Raw []byte `protobuf:"bytes,1,opt,name=raw,proto3,oneof"`
}
type Value_Str ¶
type Value_Str struct {
Str string `protobuf:"bytes,2,opt,name=str,proto3,oneof"`
}
type Value_Time ¶
type Value_Time struct {
Time *Value_Timestamp `protobuf:"bytes,10,opt,name=time,oneof"`
}
func (*Value_Time) ProtoSize ¶
func (m *Value_Time) ProtoSize() (n int)
type Value_Timestamp ¶
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) Descriptor ¶
func (*Value_Timestamp) Descriptor() ([]byte, []int)
func (*Value_Timestamp) Marshal ¶
func (m *Value_Timestamp) Marshal() (data []byte, err error)
func (*Value_Timestamp) ProtoMessage ¶
func (*Value_Timestamp) ProtoMessage()
func (*Value_Timestamp) ProtoSize ¶
func (m *Value_Timestamp) ProtoSize() (n int)
func (*Value_Timestamp) Reset ¶
func (m *Value_Timestamp) Reset()
func (*Value_Timestamp) String ¶
func (m *Value_Timestamp) String() string
func (*Value_Timestamp) Unmarshal ¶
func (m *Value_Timestamp) Unmarshal(data []byte) error
type Value_TypedStr ¶
type Value_TypedStr struct {
TypedStr *Value_TypedString `protobuf:"bytes,5,opt,name=typed_str,json=typedStr,oneof"`
}
func (*Value_TypedStr) ProtoSize ¶
func (m *Value_TypedStr) ProtoSize() (n int)
type Value_TypedString ¶
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) Descriptor ¶
func (*Value_TypedString) Descriptor() ([]byte, []int)
func (*Value_TypedString) Marshal ¶
func (m *Value_TypedString) Marshal() (data []byte, err error)
func (*Value_TypedString) MarshalTo ¶
func (m *Value_TypedString) MarshalTo(data []byte) (int, error)
func (*Value_TypedString) ProtoMessage ¶
func (*Value_TypedString) ProtoMessage()
func (*Value_TypedString) ProtoSize ¶
func (m *Value_TypedString) ProtoSize() (n int)
func (*Value_TypedString) Reset ¶
func (m *Value_TypedString) Reset()
func (*Value_TypedString) String ¶
func (m *Value_TypedString) String() string
func (*Value_TypedString) Unmarshal ¶
func (m *Value_TypedString) Unmarshal(data []byte) error
type WireQuad ¶
type WireQuad struct { Subject *Value `protobuf:"bytes,1,opt,name=subject" json:"subject,omitempty"` Predicate *Value `protobuf:"bytes,2,opt,name=predicate" json:"predicate,omitempty"` Object *Value `protobuf:"bytes,3,opt,name=object" json:"object,omitempty"` Label *Value `protobuf:"bytes,4,opt,name=label" json:"label,omitempty"` }
WireQuad is a quad that allows any value for it's directions.
func (*WireQuad) Descriptor ¶
func (*WireQuad) GetPredicate ¶
func (*WireQuad) GetSubject ¶
func (*WireQuad) ProtoMessage ¶
func (*WireQuad) ProtoMessage()
Click to show internal directories.
Click to hide internal directories.