Documentation
¶
Overview ¶
Package cxpb is a generated protocol buffer package.
It is generated from these files:
cx.proto
It has these top-level messages:
Element NumberVerification MetaData Property Parameter Error Node Edge NodeAttribute EdgeAttribute NetworkAttribute CartesianLayout AnonymousAspect
Index ¶
- Variables
- func RegisterCyServiceServer(s *grpc.Server, srv CyServiceServer)
- type AnonymousAspect
- type CartesianLayout
- func (*CartesianLayout) Descriptor() ([]byte, []int)
- func (m *CartesianLayout) GetNodeid() int64
- func (m *CartesianLayout) GetViewid() int64
- func (m *CartesianLayout) GetX() float64
- func (m *CartesianLayout) GetY() float64
- func (*CartesianLayout) ProtoMessage()
- func (m *CartesianLayout) Reset()
- func (m *CartesianLayout) String() string
- type CyServiceClient
- type CyServiceServer
- type CyService_StreamElementsClient
- type CyService_StreamElementsServer
- type Decoder
- type DecoderOptions
- type Edge
- type EdgeAttribute
- func (*EdgeAttribute) Descriptor() ([]byte, []int)
- func (m *EdgeAttribute) GetEdgeId() int64
- func (m *EdgeAttribute) GetName() string
- func (m *EdgeAttribute) GetSubnetId() int64
- func (m *EdgeAttribute) GetType() string
- func (m *EdgeAttribute) GetValue() string
- func (*EdgeAttribute) ProtoMessage()
- func (m *EdgeAttribute) Reset()
- func (m *EdgeAttribute) String() string
- type Element
- func (*Element) Descriptor() ([]byte, []int)
- func (m *Element) GetAspect() *AnonymousAspect
- func (m *Element) GetCartesianLayout() *CartesianLayout
- func (m *Element) GetEdge() *Edge
- func (m *Element) GetEdgeAttribute() *EdgeAttribute
- func (m *Element) GetError() *Error
- func (m *Element) GetMetadata() *MetaData
- func (m *Element) GetNetworkAttribute() *NetworkAttribute
- func (m *Element) GetNetworkId() int64
- func (m *Element) GetNode() *Node
- func (m *Element) GetNodeAttribute() *NodeAttribute
- func (m *Element) GetNumberVerification() *NumberVerification
- func (m *Element) GetParameter() *Parameter
- func (m *Element) GetValue() isElement_Value
- func (*Element) ProtoMessage()
- func (m *Element) Reset()
- func (m *Element) String() string
- func (*Element) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, ...)
- type Element_Aspect
- type Element_CartesianLayout
- type Element_Edge
- type Element_EdgeAttribute
- type Element_Error
- type Element_Metadata
- type Element_NetworkAttribute
- type Element_Node
- type Element_NodeAttribute
- type Element_NumberVerification
- type Element_Parameter
- type Encoder
- type EncoderOptions
- type Error
- type MetaData
- func (*MetaData) Descriptor() ([]byte, []int)
- func (m *MetaData) GetChecksum() int64
- func (m *MetaData) GetConsistencyGroup() int64
- func (m *MetaData) GetElementCount() int64
- func (m *MetaData) GetIdCounter() int64
- func (m *MetaData) GetName() string
- func (m *MetaData) GetProperties() []*Property
- func (m *MetaData) GetVersion() string
- func (*MetaData) ProtoMessage()
- func (m *MetaData) Reset()
- func (m *MetaData) String() string
- type NetworkAttribute
- func (*NetworkAttribute) Descriptor() ([]byte, []int)
- func (m *NetworkAttribute) GetEdgeId() int64
- func (m *NetworkAttribute) GetName() string
- func (m *NetworkAttribute) GetSubnetId() int64
- func (m *NetworkAttribute) GetType() string
- func (m *NetworkAttribute) GetValue() string
- func (*NetworkAttribute) ProtoMessage()
- func (m *NetworkAttribute) Reset()
- func (m *NetworkAttribute) String() string
- type Node
- type NodeAttribute
- func (*NodeAttribute) Descriptor() ([]byte, []int)
- func (m *NodeAttribute) GetName() string
- func (m *NodeAttribute) GetNodeId() int64
- func (m *NodeAttribute) GetSubnetId() int64
- func (m *NodeAttribute) GetType() string
- func (m *NodeAttribute) GetValue() string
- func (*NodeAttribute) ProtoMessage()
- func (m *NodeAttribute) Reset()
- func (m *NodeAttribute) String() string
- type NumberVerification
- type Parameter
- type Property
- type ServiceError
Constants ¶
This section is empty.
Variables ¶
var KnownAspects = map[string]proto.Message{ "metaData": &MetaData{}, "nodes": &Node{}, "edges": &Edge{}, "nodeAttributes": &NodeAttribute{}, "edgeAttributes": &EdgeAttribute{}, "networkAttributes": &NetworkAttribute{}, }
KnownAspects specifies the full set of aspects the Decoder can understand. It provides a map between an aspect name and the Protocol Buffers struct representing the type. The Decoder uses this map to convert JSON elements to their protocol buffers representation.
Functions ¶
func RegisterCyServiceServer ¶
func RegisterCyServiceServer(s *grpc.Server, srv CyServiceServer)
Types ¶
type AnonymousAspect ¶
type AnonymousAspect struct { Type string `protobuf:"bytes,1,opt,name=type" json:"type,omitempty"` Element []byte `protobuf:"bytes,2,opt,name=element,proto3" json:"element,omitempty"` }
func (*AnonymousAspect) Descriptor ¶
func (*AnonymousAspect) Descriptor() ([]byte, []int)
func (*AnonymousAspect) GetElement ¶
func (m *AnonymousAspect) GetElement() []byte
func (*AnonymousAspect) GetType ¶
func (m *AnonymousAspect) GetType() string
func (*AnonymousAspect) ProtoMessage ¶
func (*AnonymousAspect) ProtoMessage()
func (*AnonymousAspect) Reset ¶
func (m *AnonymousAspect) Reset()
func (*AnonymousAspect) String ¶
func (m *AnonymousAspect) String() string
type CartesianLayout ¶
type CartesianLayout struct { Nodeid int64 `protobuf:"varint,1,opt,name=nodeid" json:"nodeid,omitempty"` X float64 `protobuf:"fixed64,2,opt,name=x" json:"x,omitempty"` Y float64 `protobuf:"fixed64,3,opt,name=y" json:"y,omitempty"` Viewid int64 `protobuf:"varint,4,opt,name=viewid" json:"viewid,omitempty"` }
func (*CartesianLayout) Descriptor ¶
func (*CartesianLayout) Descriptor() ([]byte, []int)
func (*CartesianLayout) GetNodeid ¶
func (m *CartesianLayout) GetNodeid() int64
func (*CartesianLayout) GetViewid ¶
func (m *CartesianLayout) GetViewid() int64
func (*CartesianLayout) GetX ¶
func (m *CartesianLayout) GetX() float64
func (*CartesianLayout) GetY ¶
func (m *CartesianLayout) GetY() float64
func (*CartesianLayout) ProtoMessage ¶
func (*CartesianLayout) ProtoMessage()
func (*CartesianLayout) Reset ¶
func (m *CartesianLayout) Reset()
func (*CartesianLayout) String ¶
func (m *CartesianLayout) String() string
type CyServiceClient ¶
type CyServiceClient interface {
StreamElements(ctx context.Context, opts ...grpc.CallOption) (CyService_StreamElementsClient, error)
}
func NewCyServiceClient ¶
func NewCyServiceClient(cc *grpc.ClientConn) CyServiceClient
type CyServiceServer ¶
type CyServiceServer interface {
StreamElements(CyService_StreamElementsServer) error
}
type Decoder ¶
type Decoder struct {
// contains filtered or unexported fields
}
Decoder decodes a JSON stream into a stream of protocol buffer elements, and hands them off to it's internal streamer for further processing.
func NewDecoder ¶
NewDecoder initializes and returns a JSON Decoder that decodes to a stream of protobuf elements defined in this package. NewDecoder accepts a stream to read from, r, an options struct, o, and a calback function, s, that accepts a single element s that can stream the element elewhere or handle it in some way. Before calling NewDecoder, a DecoderOptions struct should be made detailing the expected input from the stream.
func (*Decoder) Decode ¶
func (dec *Decoder) Decode()
Decode parses a json stream as specified by the DecoderOptions in protobuf elements. It can parse a singleton network or a list of one or more networks. Every decoded element has a networkId specifing which network it belongs to. A singleton network's elements will all have networkId set to 0. A list of networks will have elements with networkId 1 through DecoderOptions.NumNetworks inclusive. For every element in a network, Decode will call the streamer passed into NewDecoder with the element as the sole argument. The streamer may then decide what to do with the element.
type DecoderOptions ¶
DecoderOptions provides a simple interfaces to configure a cxpb JSON Decoder. The IsCollection flag specifies whether the Decoder should expect an array of 0 or more networks, or a singleton network. If IsCollection is set, the Decoder will decode the number of networks specified in NumNetworks. Any network Decoded, singleton or nested, should contain at least the Aspects defined in RequiredAspects. RequiredAspects must, in turn, be a subset of KnownAspects. The Decoder will only parse and send Aspects that are in both RequiredAspects and KnownAspects to the streamer.
type Edge ¶
type Edge struct { Id int64 `protobuf:"varint,1,opt,name=id,json=@id" json:"id,omitempty"` SourceId int64 `protobuf:"varint,2,opt,name=sourceId,json=s" json:"sourceId,omitempty"` TargetId int64 `protobuf:"varint,3,opt,name=targetId,json=t" json:"targetId,omitempty"` Interaction string `protobuf:"bytes,4,opt,name=interaction,json=i" json:"interaction,omitempty"` }
func (*Edge) Descriptor ¶
func (*Edge) GetInteraction ¶
func (*Edge) GetSourceId ¶
func (*Edge) GetTargetId ¶
func (*Edge) ProtoMessage ¶
func (*Edge) ProtoMessage()
type EdgeAttribute ¶
type EdgeAttribute struct { EdgeId int64 `protobuf:"varint,1,opt,name=edgeId,json=po" json:"edgeId,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,json=n" json:"name,omitempty"` Value string `protobuf:"bytes,3,opt,name=value,json=v" json:"value,omitempty"` Type string `protobuf:"bytes,4,opt,name=type,json=d" json:"type,omitempty"` SubnetId int64 `protobuf:"varint,5,opt,name=subnetId,json=s" json:"subnetId,omitempty"` }
func (*EdgeAttribute) Descriptor ¶
func (*EdgeAttribute) Descriptor() ([]byte, []int)
func (*EdgeAttribute) GetEdgeId ¶
func (m *EdgeAttribute) GetEdgeId() int64
func (*EdgeAttribute) GetName ¶
func (m *EdgeAttribute) GetName() string
func (*EdgeAttribute) GetSubnetId ¶
func (m *EdgeAttribute) GetSubnetId() int64
func (*EdgeAttribute) GetType ¶
func (m *EdgeAttribute) GetType() string
func (*EdgeAttribute) GetValue ¶
func (m *EdgeAttribute) GetValue() string
func (*EdgeAttribute) ProtoMessage ¶
func (*EdgeAttribute) ProtoMessage()
func (*EdgeAttribute) Reset ¶
func (m *EdgeAttribute) Reset()
func (*EdgeAttribute) String ¶
func (m *EdgeAttribute) String() string
type Element ¶
type Element struct { NetworkId int64 `protobuf:"varint,1,opt,name=networkId" json:"networkId,omitempty"` // Types that are valid to be assigned to Value: // *Element_Parameter // *Element_Error // *Element_NumberVerification // *Element_Metadata // *Element_Aspect // *Element_Node // *Element_Edge // *Element_NodeAttribute // *Element_EdgeAttribute // *Element_NetworkAttribute // *Element_CartesianLayout Value isElement_Value `protobuf_oneof:"value"` }
func (*Element) Descriptor ¶
func (*Element) GetAspect ¶
func (m *Element) GetAspect() *AnonymousAspect
func (*Element) GetCartesianLayout ¶
func (m *Element) GetCartesianLayout() *CartesianLayout
func (*Element) GetEdgeAttribute ¶
func (m *Element) GetEdgeAttribute() *EdgeAttribute
func (*Element) GetMetadata ¶
func (*Element) GetNetworkAttribute ¶
func (m *Element) GetNetworkAttribute() *NetworkAttribute
func (*Element) GetNetworkId ¶
func (*Element) GetNodeAttribute ¶
func (m *Element) GetNodeAttribute() *NodeAttribute
func (*Element) GetNumberVerification ¶
func (m *Element) GetNumberVerification() *NumberVerification
func (*Element) GetParameter ¶
func (*Element) ProtoMessage ¶
func (*Element) ProtoMessage()
type Element_Aspect ¶
type Element_Aspect struct {
Aspect *AnonymousAspect `protobuf:"bytes,6,opt,name=aspect,oneof"`
}
type Element_CartesianLayout ¶
type Element_CartesianLayout struct {
CartesianLayout *CartesianLayout `protobuf:"bytes,12,opt,name=cartesianLayout,oneof"`
}
type Element_Edge ¶
type Element_Edge struct {
Edge *Edge `protobuf:"bytes,8,opt,name=edge,oneof"`
}
type Element_EdgeAttribute ¶
type Element_EdgeAttribute struct {
EdgeAttribute *EdgeAttribute `protobuf:"bytes,10,opt,name=edgeAttribute,oneof"`
}
type Element_Error ¶
type Element_Error struct {
Error *Error `protobuf:"bytes,3,opt,name=error,oneof"`
}
type Element_Metadata ¶
type Element_Metadata struct {
Metadata *MetaData `protobuf:"bytes,5,opt,name=metadata,oneof"`
}
type Element_NetworkAttribute ¶
type Element_NetworkAttribute struct {
NetworkAttribute *NetworkAttribute `protobuf:"bytes,11,opt,name=networkAttribute,oneof"`
}
type Element_Node ¶
type Element_Node struct {
Node *Node `protobuf:"bytes,7,opt,name=node,oneof"`
}
type Element_NodeAttribute ¶
type Element_NodeAttribute struct {
NodeAttribute *NodeAttribute `protobuf:"bytes,9,opt,name=nodeAttribute,oneof"`
}
type Element_NumberVerification ¶
type Element_NumberVerification struct {
NumberVerification *NumberVerification `protobuf:"bytes,4,opt,name=numberVerification,oneof"`
}
type Element_Parameter ¶
type Element_Parameter struct {
Parameter *Parameter `protobuf:"bytes,2,opt,name=parameter,oneof"`
}
type EncoderOptions ¶
type Error ¶
type Error struct { Status int64 `protobuf:"varint,1,opt,name=status" json:"status,omitempty"` Code string `protobuf:"bytes,2,opt,name=code" json:"code,omitempty"` Message string `protobuf:"bytes,3,opt,name=message" json:"message,omitempty"` Link string `protobuf:"bytes,4,opt,name=link" json:"link,omitempty"` }
func (*Error) Descriptor ¶
func (*Error) GetMessage ¶
func (*Error) ProtoMessage ¶
func (*Error) ProtoMessage()
type MetaData ¶
type MetaData struct { Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` Version string `protobuf:"bytes,2,opt,name=version" json:"version,omitempty"` IdCounter int64 `protobuf:"varint,3,opt,name=idCounter" json:"idCounter,omitempty"` ElementCount int64 `protobuf:"varint,4,opt,name=elementCount" json:"elementCount,omitempty"` ConsistencyGroup int64 `protobuf:"varint,5,opt,name=consistencyGroup" json:"consistencyGroup,omitempty"` Checksum int64 `protobuf:"varint,6,opt,name=checksum" json:"checksum,omitempty"` Properties []*Property `protobuf:"bytes,7,rep,name=properties" json:"properties,omitempty"` }
func (*MetaData) Descriptor ¶
func (*MetaData) GetChecksum ¶
func (*MetaData) GetConsistencyGroup ¶
func (*MetaData) GetElementCount ¶
func (*MetaData) GetIdCounter ¶
func (*MetaData) GetProperties ¶
func (*MetaData) GetVersion ¶
func (*MetaData) ProtoMessage ¶
func (*MetaData) ProtoMessage()
type NetworkAttribute ¶
type NetworkAttribute struct { EdgeId int64 `protobuf:"varint,1,opt,name=edgeId,json=po" json:"edgeId,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,json=n" json:"name,omitempty"` Value string `protobuf:"bytes,3,opt,name=value,json=v" json:"value,omitempty"` Type string `protobuf:"bytes,4,opt,name=type,json=d" json:"type,omitempty"` SubnetId int64 `protobuf:"varint,5,opt,name=subnetId,json=s" json:"subnetId,omitempty"` }
func (*NetworkAttribute) Descriptor ¶
func (*NetworkAttribute) Descriptor() ([]byte, []int)
func (*NetworkAttribute) GetEdgeId ¶
func (m *NetworkAttribute) GetEdgeId() int64
func (*NetworkAttribute) GetName ¶
func (m *NetworkAttribute) GetName() string
func (*NetworkAttribute) GetSubnetId ¶
func (m *NetworkAttribute) GetSubnetId() int64
func (*NetworkAttribute) GetType ¶
func (m *NetworkAttribute) GetType() string
func (*NetworkAttribute) GetValue ¶
func (m *NetworkAttribute) GetValue() string
func (*NetworkAttribute) ProtoMessage ¶
func (*NetworkAttribute) ProtoMessage()
func (*NetworkAttribute) Reset ¶
func (m *NetworkAttribute) Reset()
func (*NetworkAttribute) String ¶
func (m *NetworkAttribute) String() string
type Node ¶
type Node struct { Id int64 `protobuf:"varint,1,opt,name=id,json=@id" json:"id,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,json=n" json:"name,omitempty"` Represents string `protobuf:"bytes,3,opt,name=represents,json=r" json:"represents,omitempty"` }
func (*Node) Descriptor ¶
func (*Node) GetRepresents ¶
func (*Node) ProtoMessage ¶
func (*Node) ProtoMessage()
type NodeAttribute ¶
type NodeAttribute struct { NodeId int64 `protobuf:"varint,1,opt,name=nodeId,json=po" json:"nodeId,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,json=n" json:"name,omitempty"` Value string `protobuf:"bytes,3,opt,name=value,json=v" json:"value,omitempty"` Type string `protobuf:"bytes,4,opt,name=type,json=d" json:"type,omitempty"` SubnetId int64 `protobuf:"varint,5,opt,name=subnetId,json=s" json:"subnetId,omitempty"` }
func (*NodeAttribute) Descriptor ¶
func (*NodeAttribute) Descriptor() ([]byte, []int)
func (*NodeAttribute) GetName ¶
func (m *NodeAttribute) GetName() string
func (*NodeAttribute) GetNodeId ¶
func (m *NodeAttribute) GetNodeId() int64
func (*NodeAttribute) GetSubnetId ¶
func (m *NodeAttribute) GetSubnetId() int64
func (*NodeAttribute) GetType ¶
func (m *NodeAttribute) GetType() string
func (*NodeAttribute) GetValue ¶
func (m *NodeAttribute) GetValue() string
func (*NodeAttribute) ProtoMessage ¶
func (*NodeAttribute) ProtoMessage()
func (*NodeAttribute) Reset ¶
func (m *NodeAttribute) Reset()
func (*NodeAttribute) String ¶
func (m *NodeAttribute) String() string
type NumberVerification ¶
type NumberVerification struct {
LongNumber int64 `protobuf:"varint,1,opt,name=longNumber" json:"longNumber,omitempty"`
}
func (*NumberVerification) Descriptor ¶
func (*NumberVerification) Descriptor() ([]byte, []int)
func (*NumberVerification) GetLongNumber ¶
func (m *NumberVerification) GetLongNumber() int64
func (*NumberVerification) ProtoMessage ¶
func (*NumberVerification) ProtoMessage()
func (*NumberVerification) Reset ¶
func (m *NumberVerification) Reset()
func (*NumberVerification) String ¶
func (m *NumberVerification) String() string
type Parameter ¶
type Parameter struct { Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` Value string `protobuf:"bytes,2,opt,name=value" json:"value,omitempty"` }
func (*Parameter) Descriptor ¶
func (*Parameter) ProtoMessage ¶
func (*Parameter) ProtoMessage()
type Property ¶
type Property struct { Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` Value string `protobuf:"bytes,2,opt,name=value" json:"value,omitempty"` }
func (*Property) Descriptor ¶
func (*Property) ProtoMessage ¶
func (*Property) ProtoMessage()
type ServiceError ¶
type ServiceError struct{}
func (*ServiceError) Error ¶
func (s *ServiceError) Error() string