proto

package
v0.0.0-...-c729bb3 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2019 License: LGPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ProtobufGuide

type ProtobufGuide struct {
	ProtoID string // ProtoID - determines 'class' of protofile (specified by user)

	ProtoGuide []byte // ProtoGuide - serialized proto file, used for reading of protobuf message
	GoGuide    []byte // GoGuide - serialized golang support file, used for reading of protobuf message
}

ProtobufGuide - container holding metadata/supporting proto file

func NewProtobufGuide

func NewProtobufGuide(protofilePath string, protoID string) (*ProtobufGuide, error)

NewProtobufGuide - initialize and register protobuf message guide

func ReadGuideFromMemory

func ReadGuideFromMemory(path string) (*ProtobufGuide, error)

ReadGuideFromMemory - read protobufGuide from memory

func (*ProtobufGuide) WriteToMemory

func (protoGuide *ProtobufGuide) WriteToMemory(path string) error

WriteToMemory - write protobufGuide to memory

type ProtobufMessage

type ProtobufMessage struct {
	Message []byte // Message - serialized protobuf message

	Guide *ProtobufGuide // Guide - messag protobuf guide
}

ProtobufMessage - container holding protobuf message, metadata/supporting proto file

func FromBytes

func FromBytes(b []byte) (*ProtobufMessage, error)

FromBytes - attempt to decode byte array to protobufMessage

func NewProtobufMessage

func NewProtobufMessage(guidePath string, data []byte) (*ProtobufMessage, error)

NewProtobufMessage - initialize protobuf message

func (*ProtobufMessage) SendToAddress

func (protoMessage *ProtobufMessage) SendToAddress(address string) error

SendToAddress - common.SendBytes() wrapper

func (*ProtobufMessage) SendToAddressResult

func (protoMessage *ProtobufMessage) SendToAddressResult(address string) ([]byte, error)

SendToAddressResult - common.SendBytesResult() wrapper

func (*ProtobufMessage) SendToShard

func (protoMessage *ProtobufMessage) SendToShard(shardAddress string, port int) error

SendToShard - shard.SendBytesShard() wrapper

func (*ProtobufMessage) SendToShardResult

func (protoMessage *ProtobufMessage) SendToShardResult(shardAddress string, port int) ([]byte, error)

SendToShardResult - shard.SendBytesShardResult() wrapper

func (*ProtobufMessage) String

func (protoMessage *ProtobufMessage) String() string

String - convert message to string

func (*ProtobufMessage) ToBytes

func (protoMessage *ProtobufMessage) ToBytes() ([]byte, error)

ToBytes - common.SerializeToBytes() protobufMessage wrapper

type Test

type Test struct {
	Test                 string   `protobuf:"bytes,1,opt,name=test,proto3" json:"test,omitempty"`
	Test2                string   `protobuf:"bytes,2,opt,name=test2,proto3" json:"test2,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Test) Descriptor

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

func (*Test) GetTest

func (m *Test) GetTest() string

func (*Test) GetTest2

func (m *Test) GetTest2() string

func (*Test) ProtoMessage

func (*Test) ProtoMessage()

func (*Test) Reset

func (m *Test) Reset()

func (*Test) String

func (m *Test) String() string

func (*Test) XXX_DiscardUnknown

func (m *Test) XXX_DiscardUnknown()

func (*Test) XXX_Marshal

func (m *Test) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Test) XXX_Merge

func (m *Test) XXX_Merge(src proto.Message)

func (*Test) XXX_Size

func (m *Test) XXX_Size() int

func (*Test) XXX_Unmarshal

func (m *Test) XXX_Unmarshal(b []byte) error

Jump to

Keyboard shortcuts

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