netpb

package
v0.0.0-...-84d53aa Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2019 License: GPL-3.0 Imports: 5 Imported by: 4

Documentation

Overview

Package netpb is a generated protocol buffer package.

It is generated from these files:

message.proto

It has these top-level messages:

Hello
OK
Peers
PeerInfo
Message

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Hello

type Hello struct {
	NodeId        string `protobuf:"bytes,1,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty"`
	ClientVersion string `protobuf:"bytes,2,opt,name=client_version,json=clientVersion,proto3" json:"client_version,omitempty"`
}

func HelloMessageFromProto

func HelloMessageFromProto(data []byte) (*Hello, error)

HelloMessageFromProto parse the data into Hello message

func (*Hello) Descriptor

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

func (*Hello) GetClientVersion

func (m *Hello) GetClientVersion() string

func (*Hello) GetNodeId

func (m *Hello) GetNodeId() string

func (*Hello) ProtoMessage

func (*Hello) ProtoMessage()

func (*Hello) Reset

func (m *Hello) Reset()

func (*Hello) String

func (m *Hello) String() string

type Message

type Message struct {
	ChainId uint32 `protobuf:"varint,1,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"`
	Type    string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"`
	Data    []byte `protobuf:"bytes,10,opt,name=data,proto3" json:"data,omitempty"`
}

func (*Message) Descriptor

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

func (*Message) GetChainId

func (m *Message) GetChainId() uint32

func (*Message) GetData

func (m *Message) GetData() []byte

func (*Message) GetType

func (m *Message) GetType() string

func (*Message) ProtoMessage

func (*Message) ProtoMessage()

func (*Message) Reset

func (m *Message) Reset()

func (*Message) String

func (m *Message) String() string

type OK

type OK struct {
	NodeId        string `protobuf:"bytes,1,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty"`
	ClientVersion string `protobuf:"bytes,2,opt,name=client_version,json=clientVersion,proto3" json:"client_version,omitempty"`
}

func OKMessageFromProto

func OKMessageFromProto(data []byte) (*OK, error)

OKMessageFromProto parse the data into OK message

func (*OK) Descriptor

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

func (*OK) GetClientVersion

func (m *OK) GetClientVersion() string

func (*OK) GetNodeId

func (m *OK) GetNodeId() string

func (*OK) ProtoMessage

func (*OK) ProtoMessage()

func (*OK) Reset

func (m *OK) Reset()

func (*OK) String

func (m *OK) String() string

type PeerInfo

type PeerInfo struct {
	Id    string   `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Addrs []string `protobuf:"bytes,2,rep,name=addrs" json:"addrs,omitempty"`
}

func (*PeerInfo) Descriptor

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

func (*PeerInfo) GetAddrs

func (m *PeerInfo) GetAddrs() []string

func (*PeerInfo) GetId

func (m *PeerInfo) GetId() string

func (*PeerInfo) ProtoMessage

func (*PeerInfo) ProtoMessage()

func (*PeerInfo) Reset

func (m *PeerInfo) Reset()

func (*PeerInfo) String

func (m *PeerInfo) String() string

type Peers

type Peers struct {
	Peers []*PeerInfo `protobuf:"bytes,1,rep,name=peers" json:"peers,omitempty"`
}

func (*Peers) Descriptor

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

func (*Peers) GetPeers

func (m *Peers) GetPeers() []*PeerInfo

func (*Peers) ProtoMessage

func (*Peers) ProtoMessage()

func (*Peers) Reset

func (m *Peers) Reset()

func (*Peers) String

func (m *Peers) String() string

Jump to

Keyboard shortcuts

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