Documentation ¶
Overview ¶
Package ombwire is a generated protocol buffer package.
The package output for go is wirerecord ¶
It is generated from these files:
types.proto
It has these top-level messages:
Bulletin Location Endorsement
Index ¶
- Variables
- func DecodeWireType(b []byte) (proto.Message, error)
- func EncodeWireType(m proto.Message) ([]byte, error)
- func HasMagic(tx *wire.MsgTx) bool
- func ParseTx(tx *wire.MsgTx) (interface{}, error)
- type Bulletin
- func (m *Bulletin) GetLocation() *Location
- func (m *Bulletin) GetMessage() string
- func (m *Bulletin) GetTimestamp() uint64
- func (*Bulletin) ProtoMessage()
- func (m *Bulletin) Reset()
- func (m *Bulletin) String() string
- func (bltn *Bulletin) TxOuts(toBurn int64, net *chaincfg.Params) ([]*wire.TxOut, error)
- type Endorsement
- type Location
Constants ¶
This section is empty.
Variables ¶
View Source
var ( MaxRecordLength uint64 = 75000 // Records can be up to 75KB in size. // The delimiter that sits at the front of every bulletin. Magic = [6]byte{ 0x4f, 0x4d, 0x42, 0x55, 0x44, 0x53, } // The magic bytes that determine the type of the recorded when it is // encoded or decoded. BulletinMagic byte = 0x01 EndorsementMagic byte = 0x02 ErrRecordTooBig error = errors.New("record size too big") ErrBadWireType error = errors.New("No such record type") )
Functions ¶
Types ¶
type Bulletin ¶
type Bulletin struct { Message *string `protobuf:"bytes,1,req,name=message" json:"message,omitempty"` Timestamp *uint64 `protobuf:"varint,2,req,name=timestamp" json:"timestamp,omitempty"` Location *Location `protobuf:"bytes,3,opt,name=location" json:"location,omitempty"` XXX_unrecognized []byte `json:"-"` }
A simple message with a timestamp and an optional location tag.
func NewBulletin ¶
Passed location can be nil.
func NewBulletinFromStr ¶
func (*Bulletin) GetLocation ¶
func (*Bulletin) GetMessage ¶
func (*Bulletin) GetTimestamp ¶
func (*Bulletin) ProtoMessage ¶
func (*Bulletin) ProtoMessage()
type Endorsement ¶
type Endorsement struct { Bid []byte `protobuf:"bytes,1,req,name=bid" json:"bid,omitempty"` Timestamp *uint64 `protobuf:"varint,2,req,name=timestamp" json:"timestamp,omitempty"` XXX_unrecognized []byte `json:"-"` }
A record indicating approval, support of, or interest in a specific bulletin.
func (*Endorsement) GetBid ¶
func (m *Endorsement) GetBid() []byte
func (*Endorsement) GetTimestamp ¶
func (m *Endorsement) GetTimestamp() uint64
func (*Endorsement) ProtoMessage ¶
func (*Endorsement) ProtoMessage()
func (*Endorsement) Reset ¶
func (m *Endorsement) Reset()
func (*Endorsement) String ¶
func (m *Endorsement) String() string
type Location ¶
type Location struct { Lat *float64 `protobuf:"fixed64,1,req,name=lat" json:"lat,omitempty"` Lon *float64 `protobuf:"fixed64,2,req,name=lon" json:"lon,omitempty"` H *float64 `protobuf:"fixed64,3,req,name=h" json:"h,omitempty"` XXX_unrecognized []byte `json:"-"` }
A single WGS84 Datum
func NewLocation ¶
func (*Location) ProtoMessage ¶
func (*Location) ProtoMessage()
Click to show internal directories.
Click to hide internal directories.