Documentation
¶
Overview ¶
Package coder is a generated protocol buffer package.
It is generated from these files:
models.proto
It has these top-level messages:
MinedBlock MerkleTree MainchainBlock MinerSig StatechainBlock TxSig Transaction Diff
Index ¶
- Constants
- Variables
- func AppendCode(bytes []byte) []byte
- func ExtractCode(bytes []byte) (byte, error)
- func StripCode(bytes []byte) (byte, []byte, error)
- type Diff
- func (*Diff) Descriptor() ([]byte, []int)
- func (m *Diff) GetData() string
- func (m *Diff) GetDiffHash() string
- func (m *Diff) Marshal() (dAtA []byte, err error)
- func (m *Diff) MarshalTo(dAtA []byte) (int, error)
- func (*Diff) ProtoMessage()
- func (m *Diff) Reset()
- func (m *Diff) Size() (n int)
- func (m *Diff) String() string
- func (m *Diff) Unmarshal(dAtA []byte) error
- type MainchainBlock
- func (*MainchainBlock) Descriptor() ([]byte, []int)
- func (m *MainchainBlock) GetBlockHash() string
- func (m *MainchainBlock) GetBlockNumber() string
- func (m *MainchainBlock) GetBlockTime() string
- func (m *MainchainBlock) GetDifficulty() string
- func (m *MainchainBlock) GetImageHash() string
- func (m *MainchainBlock) GetMinerAddress() string
- func (m *MainchainBlock) GetMinerSig() *MinerSig
- func (m *MainchainBlock) GetNonce() string
- func (m *MainchainBlock) GetPrevBlockHash() string
- func (m *MainchainBlock) GetStateBlocksMerkleHash() string
- func (m *MainchainBlock) Marshal() (dAtA []byte, err error)
- func (m *MainchainBlock) MarshalTo(dAtA []byte) (int, error)
- func (*MainchainBlock) ProtoMessage()
- func (m *MainchainBlock) Reset()
- func (m *MainchainBlock) Size() (n int)
- func (m *MainchainBlock) String() string
- func (m *MainchainBlock) Unmarshal(dAtA []byte) error
- type MerkleTree
- func (*MerkleTree) Descriptor() ([]byte, []int)
- func (m *MerkleTree) GetHashes() []string
- func (m *MerkleTree) GetKind() string
- func (m *MerkleTree) GetMerkleTreeRootHash() string
- func (m *MerkleTree) Marshal() (dAtA []byte, err error)
- func (m *MerkleTree) MarshalTo(dAtA []byte) (int, error)
- func (*MerkleTree) ProtoMessage()
- func (m *MerkleTree) Reset()
- func (m *MerkleTree) Size() (n int)
- func (m *MerkleTree) String() string
- func (m *MerkleTree) Unmarshal(dAtA []byte) error
- type MinedBlock
- func (*MinedBlock) Descriptor() ([]byte, []int)
- func (m *MinedBlock) GetDiffsMap() map[string]*Diff
- func (m *MinedBlock) GetMerkleTreesMap() map[string]*MerkleTree
- func (m *MinedBlock) GetNextBlock() *MainchainBlock
- func (m *MinedBlock) GetPreviousBlock() *MainchainBlock
- func (m *MinedBlock) GetStatechainBlocksMap() map[string]*StatechainBlock
- func (m *MinedBlock) GetTransactionsMap() map[string]*Transaction
- func (m *MinedBlock) Marshal() (dAtA []byte, err error)
- func (m *MinedBlock) MarshalTo(dAtA []byte) (int, error)
- func (*MinedBlock) ProtoMessage()
- func (m *MinedBlock) Reset()
- func (m *MinedBlock) Size() (n int)
- func (m *MinedBlock) String() string
- func (m *MinedBlock) Unmarshal(dAtA []byte) error
- type MinerSig
- func (*MinerSig) Descriptor() ([]byte, []int)
- func (m *MinerSig) GetR() string
- func (m *MinerSig) GetS() string
- func (m *MinerSig) Marshal() (dAtA []byte, err error)
- func (m *MinerSig) MarshalTo(dAtA []byte) (int, error)
- func (*MinerSig) ProtoMessage()
- func (m *MinerSig) Reset()
- func (m *MinerSig) Size() (n int)
- func (m *MinerSig) String() string
- func (m *MinerSig) Unmarshal(dAtA []byte) error
- type StatechainBlock
- func (*StatechainBlock) Descriptor() ([]byte, []int)
- func (m *StatechainBlock) GetBlockHash() string
- func (m *StatechainBlock) GetBlockNumber() string
- func (m *StatechainBlock) GetBlockTime() string
- func (m *StatechainBlock) GetImageHash() string
- func (m *StatechainBlock) GetPrevBlockHash() string
- func (m *StatechainBlock) GetStateCurrentHash() string
- func (m *StatechainBlock) GetStatePrevDiffHash() string
- func (m *StatechainBlock) GetTxHash() string
- func (m *StatechainBlock) Marshal() (dAtA []byte, err error)
- func (m *StatechainBlock) MarshalTo(dAtA []byte) (int, error)
- func (*StatechainBlock) ProtoMessage()
- func (m *StatechainBlock) Reset()
- func (m *StatechainBlock) Size() (n int)
- func (m *StatechainBlock) String() string
- func (m *StatechainBlock) Unmarshal(dAtA []byte) error
- type Transaction
- func (*Transaction) Descriptor() ([]byte, []int)
- func (m *Transaction) GetFrom() string
- func (m *Transaction) GetImageHash() string
- func (m *Transaction) GetMethod() string
- func (m *Transaction) GetPayload() []byte
- func (m *Transaction) GetSig() *TxSig
- func (m *Transaction) GetTxHash() string
- func (m *Transaction) Marshal() (dAtA []byte, err error)
- func (m *Transaction) MarshalTo(dAtA []byte) (int, error)
- func (*Transaction) ProtoMessage()
- func (m *Transaction) Reset()
- func (m *Transaction) Size() (n int)
- func (m *Transaction) String() string
- func (m *Transaction) Unmarshal(dAtA []byte) error
- type TxSig
- func (*TxSig) Descriptor() ([]byte, []int)
- func (m *TxSig) GetR() string
- func (m *TxSig) GetS() string
- func (m *TxSig) Marshal() (dAtA []byte, err error)
- func (m *TxSig) MarshalTo(dAtA []byte) (int, error)
- func (*TxSig) ProtoMessage()
- func (m *TxSig) Reset()
- func (m *TxSig) Size() (n int)
- func (m *TxSig) String() string
- func (m *TxSig) Unmarshal(dAtA []byte) error
Constants ¶
View Source
const CurrentCode = Proto3
CurrentCode is the code currently used by this package
View Source
const ( // Proto3 is the protobuf syntax=3; https://developers.google.com/protocol-buffers/docs/proto3 Proto3 byte = iota )
Variables ¶
View Source
var ( ErrInvalidLengthModels = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowModels = fmt.Errorf("proto: integer overflow") )
View Source
var ( // ErrNilBytes ... ErrNilBytes = errors.New("nil bytes") )
Functions ¶
Types ¶
type Diff ¶
type Diff struct { DiffHash string `protobuf:"bytes,1,opt,name=diffHash,proto3" json:"diffHash,omitempty"` Data string `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` }
func (*Diff) Descriptor ¶
func (*Diff) GetDiffHash ¶
func (*Diff) ProtoMessage ¶
func (*Diff) ProtoMessage()
type MainchainBlock ¶
type MainchainBlock struct { BlockHash string `protobuf:"bytes,1,opt,name=blockHash,proto3" json:"blockHash,omitempty"` BlockNumber string `protobuf:"bytes,2,opt,name=blockNumber,proto3" json:"blockNumber,omitempty"` BlockTime string `protobuf:"bytes,3,opt,name=blockTime,proto3" json:"blockTime,omitempty"` ImageHash string `protobuf:"bytes,4,opt,name=imageHash,proto3" json:"imageHash,omitempty"` StateBlocksMerkleHash string `protobuf:"bytes,5,opt,name=stateBlocksMerkleHash,proto3" json:"stateBlocksMerkleHash,omitempty"` PrevBlockHash string `protobuf:"bytes,6,opt,name=prevBlockHash,proto3" json:"prevBlockHash,omitempty"` Nonce string `protobuf:"bytes,7,opt,name=nonce,proto3" json:"nonce,omitempty"` Difficulty string `protobuf:"bytes,8,opt,name=difficulty,proto3" json:"difficulty,omitempty"` MinerAddress string `protobuf:"bytes,9,opt,name=minerAddress,proto3" json:"minerAddress,omitempty"` MinerSig *MinerSig `protobuf:"bytes,10,opt,name=minerSig" json:"minerSig,omitempty"` }
func (*MainchainBlock) Descriptor ¶
func (*MainchainBlock) Descriptor() ([]byte, []int)
func (*MainchainBlock) GetBlockHash ¶
func (m *MainchainBlock) GetBlockHash() string
func (*MainchainBlock) GetBlockNumber ¶
func (m *MainchainBlock) GetBlockNumber() string
func (*MainchainBlock) GetBlockTime ¶
func (m *MainchainBlock) GetBlockTime() string
func (*MainchainBlock) GetDifficulty ¶
func (m *MainchainBlock) GetDifficulty() string
func (*MainchainBlock) GetImageHash ¶
func (m *MainchainBlock) GetImageHash() string
func (*MainchainBlock) GetMinerAddress ¶
func (m *MainchainBlock) GetMinerAddress() string
func (*MainchainBlock) GetMinerSig ¶
func (m *MainchainBlock) GetMinerSig() *MinerSig
func (*MainchainBlock) GetNonce ¶
func (m *MainchainBlock) GetNonce() string
func (*MainchainBlock) GetPrevBlockHash ¶
func (m *MainchainBlock) GetPrevBlockHash() string
func (*MainchainBlock) GetStateBlocksMerkleHash ¶
func (m *MainchainBlock) GetStateBlocksMerkleHash() string
func (*MainchainBlock) Marshal ¶
func (m *MainchainBlock) Marshal() (dAtA []byte, err error)
func (*MainchainBlock) ProtoMessage ¶
func (*MainchainBlock) ProtoMessage()
func (*MainchainBlock) Reset ¶
func (m *MainchainBlock) Reset()
func (*MainchainBlock) Size ¶
func (m *MainchainBlock) Size() (n int)
func (*MainchainBlock) String ¶
func (m *MainchainBlock) String() string
func (*MainchainBlock) Unmarshal ¶
func (m *MainchainBlock) Unmarshal(dAtA []byte) error
type MerkleTree ¶
type MerkleTree struct { MerkleTreeRootHash string `protobuf:"bytes,1,opt,name=merkleTreeRootHash,proto3" json:"merkleTreeRootHash,omitempty"` Kind string `protobuf:"bytes,2,opt,name=kind,proto3" json:"kind,omitempty"` Hashes []string `protobuf:"bytes,3,rep,name=hashes" json:"hashes,omitempty"` }
func (*MerkleTree) Descriptor ¶
func (*MerkleTree) Descriptor() ([]byte, []int)
func (*MerkleTree) GetHashes ¶
func (m *MerkleTree) GetHashes() []string
func (*MerkleTree) GetKind ¶
func (m *MerkleTree) GetKind() string
func (*MerkleTree) GetMerkleTreeRootHash ¶
func (m *MerkleTree) GetMerkleTreeRootHash() string
func (*MerkleTree) Marshal ¶
func (m *MerkleTree) Marshal() (dAtA []byte, err error)
func (*MerkleTree) ProtoMessage ¶
func (*MerkleTree) ProtoMessage()
func (*MerkleTree) Reset ¶
func (m *MerkleTree) Reset()
func (*MerkleTree) Size ¶
func (m *MerkleTree) Size() (n int)
func (*MerkleTree) String ¶
func (m *MerkleTree) String() string
func (*MerkleTree) Unmarshal ¶
func (m *MerkleTree) Unmarshal(dAtA []byte) error
type MinedBlock ¶
type MinedBlock struct { NextBlock *MainchainBlock `protobuf:"bytes,1,opt,name=nextBlock" json:"nextBlock,omitempty"` PreviousBlock *MainchainBlock `protobuf:"bytes,2,opt,name=previousBlock" json:"previousBlock,omitempty"` StatechainBlocksMap map[string]*StatechainBlock `` /* 165-byte string literal not displayed */ TransactionsMap map[string]*Transaction `` /* 157-byte string literal not displayed */ DiffsMap map[string]*Diff `` /* 143-byte string literal not displayed */ MerkleTreesMap map[string]*MerkleTree `` /* 155-byte string literal not displayed */ }
func (*MinedBlock) Descriptor ¶
func (*MinedBlock) Descriptor() ([]byte, []int)
func (*MinedBlock) GetDiffsMap ¶
func (m *MinedBlock) GetDiffsMap() map[string]*Diff
func (*MinedBlock) GetMerkleTreesMap ¶
func (m *MinedBlock) GetMerkleTreesMap() map[string]*MerkleTree
func (*MinedBlock) GetNextBlock ¶
func (m *MinedBlock) GetNextBlock() *MainchainBlock
func (*MinedBlock) GetPreviousBlock ¶
func (m *MinedBlock) GetPreviousBlock() *MainchainBlock
func (*MinedBlock) GetStatechainBlocksMap ¶
func (m *MinedBlock) GetStatechainBlocksMap() map[string]*StatechainBlock
func (*MinedBlock) GetTransactionsMap ¶
func (m *MinedBlock) GetTransactionsMap() map[string]*Transaction
func (*MinedBlock) Marshal ¶
func (m *MinedBlock) Marshal() (dAtA []byte, err error)
func (*MinedBlock) ProtoMessage ¶
func (*MinedBlock) ProtoMessage()
func (*MinedBlock) Reset ¶
func (m *MinedBlock) Reset()
func (*MinedBlock) Size ¶
func (m *MinedBlock) Size() (n int)
func (*MinedBlock) String ¶
func (m *MinedBlock) String() string
func (*MinedBlock) Unmarshal ¶
func (m *MinedBlock) Unmarshal(dAtA []byte) error
type MinerSig ¶
type MinerSig struct { R string `protobuf:"bytes,1,opt,name=r,proto3" json:"r,omitempty"` S string `protobuf:"bytes,2,opt,name=s,proto3" json:"s,omitempty"` }
func (*MinerSig) Descriptor ¶
func (*MinerSig) ProtoMessage ¶
func (*MinerSig) ProtoMessage()
type StatechainBlock ¶
type StatechainBlock struct { BlockHash string `protobuf:"bytes,1,opt,name=blockHash,proto3" json:"blockHash,omitempty"` BlockNumber string `protobuf:"bytes,2,opt,name=blockNumber,proto3" json:"blockNumber,omitempty"` BlockTime string `protobuf:"bytes,3,opt,name=blockTime,proto3" json:"blockTime,omitempty"` ImageHash string `protobuf:"bytes,4,opt,name=imageHash,proto3" json:"imageHash,omitempty"` TxHash string `protobuf:"bytes,5,opt,name=txHash,proto3" json:"txHash,omitempty"` PrevBlockHash string `protobuf:"bytes,6,opt,name=prevBlockHash,proto3" json:"prevBlockHash,omitempty"` StatePrevDiffHash string `protobuf:"bytes,7,opt,name=statePrevDiffHash,proto3" json:"statePrevDiffHash,omitempty"` StateCurrentHash string `protobuf:"bytes,8,opt,name=stateCurrentHash,proto3" json:"stateCurrentHash,omitempty"` }
func (*StatechainBlock) Descriptor ¶
func (*StatechainBlock) Descriptor() ([]byte, []int)
func (*StatechainBlock) GetBlockHash ¶
func (m *StatechainBlock) GetBlockHash() string
func (*StatechainBlock) GetBlockNumber ¶
func (m *StatechainBlock) GetBlockNumber() string
func (*StatechainBlock) GetBlockTime ¶
func (m *StatechainBlock) GetBlockTime() string
func (*StatechainBlock) GetImageHash ¶
func (m *StatechainBlock) GetImageHash() string
func (*StatechainBlock) GetPrevBlockHash ¶
func (m *StatechainBlock) GetPrevBlockHash() string
func (*StatechainBlock) GetStateCurrentHash ¶
func (m *StatechainBlock) GetStateCurrentHash() string
func (*StatechainBlock) GetStatePrevDiffHash ¶
func (m *StatechainBlock) GetStatePrevDiffHash() string
func (*StatechainBlock) GetTxHash ¶
func (m *StatechainBlock) GetTxHash() string
func (*StatechainBlock) Marshal ¶
func (m *StatechainBlock) Marshal() (dAtA []byte, err error)
func (*StatechainBlock) ProtoMessage ¶
func (*StatechainBlock) ProtoMessage()
func (*StatechainBlock) Reset ¶
func (m *StatechainBlock) Reset()
func (*StatechainBlock) Size ¶
func (m *StatechainBlock) Size() (n int)
func (*StatechainBlock) String ¶
func (m *StatechainBlock) String() string
func (*StatechainBlock) Unmarshal ¶
func (m *StatechainBlock) Unmarshal(dAtA []byte) error
type Transaction ¶
type Transaction struct { TxHash string `protobuf:"bytes,1,opt,name=txHash,proto3" json:"txHash,omitempty"` ImageHash string `protobuf:"bytes,2,opt,name=imageHash,proto3" json:"imageHash,omitempty"` Method string `protobuf:"bytes,3,opt,name=method,proto3" json:"method,omitempty"` // google.protobuf.Any payload = 4; Payload []byte `protobuf:"bytes,4,opt,name=payload,proto3" json:"payload,omitempty"` From string `protobuf:"bytes,5,opt,name=from,proto3" json:"from,omitempty"` Sig *TxSig `protobuf:"bytes,6,opt,name=sig" json:"sig,omitempty"` }
func (*Transaction) Descriptor ¶
func (*Transaction) Descriptor() ([]byte, []int)
func (*Transaction) GetFrom ¶
func (m *Transaction) GetFrom() string
func (*Transaction) GetImageHash ¶
func (m *Transaction) GetImageHash() string
func (*Transaction) GetMethod ¶
func (m *Transaction) GetMethod() string
func (*Transaction) GetPayload ¶
func (m *Transaction) GetPayload() []byte
func (*Transaction) GetSig ¶
func (m *Transaction) GetSig() *TxSig
func (*Transaction) GetTxHash ¶
func (m *Transaction) GetTxHash() string
func (*Transaction) Marshal ¶
func (m *Transaction) Marshal() (dAtA []byte, err error)
func (*Transaction) ProtoMessage ¶
func (*Transaction) ProtoMessage()
func (*Transaction) Reset ¶
func (m *Transaction) Reset()
func (*Transaction) Size ¶
func (m *Transaction) Size() (n int)
func (*Transaction) String ¶
func (m *Transaction) String() string
func (*Transaction) Unmarshal ¶
func (m *Transaction) Unmarshal(dAtA []byte) error
type TxSig ¶
type TxSig struct { R string `protobuf:"bytes,1,opt,name=r,proto3" json:"r,omitempty"` S string `protobuf:"bytes,2,opt,name=s,proto3" json:"s,omitempty"` }
func (*TxSig) Descriptor ¶
func (*TxSig) ProtoMessage ¶
func (*TxSig) ProtoMessage()
Click to show internal directories.
Click to hide internal directories.