Documentation ¶
Index ¶
- Variables
- func FormatStringers(separator string, stringers ...interface{}) string
- func ParseStringLoaders(csv, separator string, stringLoaders ...interface{}) (err error)
- type BytesLoader
- type CoinOutput
- type CoinOutputLock
- type CoinOutputState
- func (cos CoinOutputState) Byte() byte
- func (z *CoinOutputState) DecodeMsg(dc *msgp.Reader) (err error)
- func (z CoinOutputState) EncodeMsg(en *msgp.Writer) (err error)
- func (cos *CoinOutputState) LoadString(str string) error
- func (cos CoinOutputState) MarshalSia(w io.Writer) error
- func (z CoinOutputState) Msgsize() (s int)
- func (cos CoinOutputState) String() string
- func (cos *CoinOutputState) UnmarshalSia(r io.Reader) error
- type ExplorerState
- func (z *ExplorerState) DecodeMsg(dc *msgp.Reader) (err error)
- func (z *ExplorerState) EncodeMsg(en *msgp.Writer) (err error)
- func (z *ExplorerState) Msgsize() (s int)
- func (state ExplorerState) ProtocolBufferMarshal(w encoding.ProtocolBufferWriter) error
- func (state *ExplorerState) ProtocolBufferUnmarshal(r encoding.ProtocolBufferReader) error
- type LockType
- func (z *LockType) DecodeMsg(dc *msgp.Reader) (err error)
- func (z LockType) EncodeMsg(en *msgp.Writer) (err error)
- func (lt *LockType) LoadString(str string) error
- func (lt LockType) MarshalSia(w io.Writer) error
- func (z LockType) Msgsize() (s int)
- func (lt LockType) String() string
- func (lt *LockType) UnmarshalSia(r io.Reader) error
- type NetworkInfo
- func (z *NetworkInfo) DecodeMsg(dc *msgp.Reader) (err error)
- func (z NetworkInfo) EncodeMsg(en *msgp.Writer) (err error)
- func (z NetworkInfo) Msgsize() (s int)
- func (info NetworkInfo) ProtocolBufferMarshal(w encoding.ProtocolBufferWriter) error
- func (info *NetworkInfo) ProtocolBufferUnmarshal(r encoding.ProtocolBufferReader) error
- type PBExplorerState
- func (*PBExplorerState) Descriptor() ([]byte, []int)
- func (m *PBExplorerState) GetCurrentConsensusChangeId() []byte
- func (m *PBExplorerState) GetNextThreebotId() uint32
- func (m *PBExplorerState) Marshal() (dAtA []byte, err error)
- func (m *PBExplorerState) MarshalTo(dAtA []byte) (int, error)
- func (*PBExplorerState) ProtoMessage()
- func (m *PBExplorerState) Reset()
- func (m *PBExplorerState) Size() (n int)
- func (m *PBExplorerState) String() string
- func (m *PBExplorerState) Unmarshal(dAtA []byte) error
- func (m *PBExplorerState) XXX_DiscardUnknown()
- func (m *PBExplorerState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *PBExplorerState) XXX_Merge(src proto.Message)
- func (m *PBExplorerState) XXX_Size() int
- func (m *PBExplorerState) XXX_Unmarshal(b []byte) error
- type PBNetworkInfo
- func (*PBNetworkInfo) Descriptor() ([]byte, []int)
- func (m *PBNetworkInfo) GetChainName() string
- func (m *PBNetworkInfo) GetNetworkName() string
- func (m *PBNetworkInfo) Marshal() (dAtA []byte, err error)
- func (m *PBNetworkInfo) MarshalTo(dAtA []byte) (int, error)
- func (*PBNetworkInfo) ProtoMessage()
- func (m *PBNetworkInfo) Reset()
- func (m *PBNetworkInfo) Size() (n int)
- func (m *PBNetworkInfo) String() string
- func (m *PBNetworkInfo) Unmarshal(dAtA []byte) error
- func (m *PBNetworkInfo) XXX_DiscardUnknown()
- func (m *PBNetworkInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *PBNetworkInfo) XXX_Merge(src proto.Message)
- func (m *PBNetworkInfo) XXX_Size() int
- func (m *PBNetworkInfo) XXX_Unmarshal(b []byte) error
- type StringLoader
Constants ¶
This section is empty.
Variables ¶
var ( ErrInvalidLengthTypes = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowTypes = fmt.Errorf("proto: integer overflow") )
Functions ¶
func FormatStringers ¶
FormatStringers formats the given stringers into one string using the given separator
func ParseStringLoaders ¶
ParseStringLoaders splits the given string into the given separator and loads each part into a given string loader.
Types ¶
type BytesLoader ¶
BytesLoader loads a byte slice and uses it as the (parsed) value.
type CoinOutput ¶
type CoinOutput struct { State CoinOutputState UnlockHash types.UnlockHash CoinValue types.Currency LockType LockType LockValue types.LockValue Description string }
CoinOutput is used to store all spent/unspent coin outputs in the custom CSV format (used internally only)
func (CoinOutput) Bytes ¶
func (co CoinOutput) Bytes() []byte
Bytes returns a binary representation of a CoinOutput, using Rivine's binary encoding package (github.com/threefoldtech/rivine/pkg/encoding/siabin).
func (*CoinOutput) LoadBytes ¶
func (co *CoinOutput) LoadBytes(b []byte) error
LoadBytes decodes the given bytes using the binary representation of a CoinOutput, making use of Rivine's binary encoding package (github.com/threefoldtech/rivine/pkg/encoding/siabin) to decode, the previously encoded CoinOutput.
func (*CoinOutput) LoadString ¶
func (co *CoinOutput) LoadString(str string) error
LoadString implements StringLoader.LoadString
type CoinOutputLock ¶
type CoinOutputLock struct { CoinOutputID types.CoinOutputID LockValue types.LockValue }
CoinOutputLock is used to store the lock value and a reference to its parent CoinOutput, as to store the lock in a scoped bucket.
func (*CoinOutputLock) LoadString ¶
func (col *CoinOutputLock) LoadString(str string) error
LoadString implements StringLoader.LoadString
func (CoinOutputLock) String ¶
func (col CoinOutputLock) String() string
String implements Stringer.String
type CoinOutputState ¶
type CoinOutputState uint8
CoinOutputState represents the state of a coin output.
const ( CoinOutputStateNil CoinOutputState = iota CoinOutputStateLiquid CoinOutputStateLocked CoinOutputStateSpent )
The different states a coin output can be in.
func (CoinOutputState) Byte ¶
func (cos CoinOutputState) Byte() byte
Byte returns this CoinOutputState as a byte
func (*CoinOutputState) DecodeMsg ¶
func (z *CoinOutputState) DecodeMsg(dc *msgp.Reader) (err error)
DecodeMsg implements msgp.Decodable
func (CoinOutputState) EncodeMsg ¶
func (z CoinOutputState) EncodeMsg(en *msgp.Writer) (err error)
EncodeMsg implements msgp.Encodable
func (*CoinOutputState) LoadString ¶
func (cos *CoinOutputState) LoadString(str string) error
LoadString implements StringLoader.LoadString
func (CoinOutputState) MarshalSia ¶
func (cos CoinOutputState) MarshalSia(w io.Writer) error
MarshalSia implements rivine/encoding.MarshalSia
func (CoinOutputState) Msgsize ¶
func (z CoinOutputState) Msgsize() (s int)
Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (CoinOutputState) String ¶
func (cos CoinOutputState) String() string
String implements Stringer.String
func (*CoinOutputState) UnmarshalSia ¶
func (cos *CoinOutputState) UnmarshalSia(r io.Reader) error
UnmarshalSia implements rivine/encoding.UnmarshalSia
type ExplorerState ¶
type ExplorerState struct { CurrentChangeID types.ConsensusChangeID `json:"currentchangeid" msg:"ccid"` NextThreeBotID types.BotID `json:"nextthreebotid" msg:"nbid"` }
ExplorerState collects the (internal) state for the explorer.
func NewExplorerState ¶
func NewExplorerState() ExplorerState
NewExplorerState creates a nil (fresh) explorer state.
func (*ExplorerState) DecodeMsg ¶
func (z *ExplorerState) DecodeMsg(dc *msgp.Reader) (err error)
DecodeMsg implements msgp.Decodable
func (*ExplorerState) EncodeMsg ¶
func (z *ExplorerState) EncodeMsg(en *msgp.Writer) (err error)
EncodeMsg implements msgp.Encodable
func (*ExplorerState) Msgsize ¶
func (z *ExplorerState) Msgsize() (s int)
Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (ExplorerState) ProtocolBufferMarshal ¶
func (state ExplorerState) ProtocolBufferMarshal(w encoding.ProtocolBufferWriter) error
ProtocolBufferMarshal implements encoding.ProtocolBufferMarshaler.ProtocolBufferMarshal using the generated code based on the PBExplorerState Message defined in ./types.proto
func (*ExplorerState) ProtocolBufferUnmarshal ¶
func (state *ExplorerState) ProtocolBufferUnmarshal(r encoding.ProtocolBufferReader) error
ProtocolBufferUnmarshal implements encoding.ProtocolBufferUnmarshaler.ProtocolBufferUnmarshal using the generated code based on the PBExplorerState Message defined in ./types.proto
type LockType ¶
type LockType uint8
LockType represents the type of a lock, used to lock a (coin) output.
The different types of locks used to lock (coin) outputs.
func (*LockType) LoadString ¶
LoadString implements StringLoader.LoadString
func (LockType) MarshalSia ¶
MarshalSia implements rivine/encoding.MarshalSia
type NetworkInfo ¶
type NetworkInfo struct { ChainName string `json:"chainName" msg:"cn"` NetworkName string `json:"networkName" msg:"nn"` }
NetworkInfo defines the info of the chain network data is dumped from, used as to prevent name colissions.
func (*NetworkInfo) DecodeMsg ¶
func (z *NetworkInfo) DecodeMsg(dc *msgp.Reader) (err error)
DecodeMsg implements msgp.Decodable
func (NetworkInfo) EncodeMsg ¶
func (z NetworkInfo) EncodeMsg(en *msgp.Writer) (err error)
EncodeMsg implements msgp.Encodable
func (NetworkInfo) Msgsize ¶
func (z NetworkInfo) Msgsize() (s int)
Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (NetworkInfo) ProtocolBufferMarshal ¶
func (info NetworkInfo) ProtocolBufferMarshal(w encoding.ProtocolBufferWriter) error
ProtocolBufferMarshal implements encoding.ProtocolBufferMarshaler.ProtocolBufferMarshal using the generated code based on the PBExplorerState Message defined in ./types.proto
func (*NetworkInfo) ProtocolBufferUnmarshal ¶
func (info *NetworkInfo) ProtocolBufferUnmarshal(r encoding.ProtocolBufferReader) error
ProtocolBufferUnmarshal implements encoding.ProtocolBufferUnmarshaler.ProtocolBufferUnmarshal using the generated code based on the PBExplorerState Message defined in ./types.proto
type PBExplorerState ¶
type PBExplorerState struct { CurrentConsensusChangeId []byte `protobuf:"bytes,1,req,name=current_consensus_change_id,json=currentConsensusChangeId" json:"current_consensus_change_id"` NextThreebotId uint32 `protobuf:"varint,2,opt,name=next_threebot_id,json=nextThreebotId" json:"next_threebot_id"` }
ExplorerState collects the (internal) state for the explorer.
func (*PBExplorerState) Descriptor ¶
func (*PBExplorerState) Descriptor() ([]byte, []int)
func (*PBExplorerState) GetCurrentConsensusChangeId ¶
func (m *PBExplorerState) GetCurrentConsensusChangeId() []byte
func (*PBExplorerState) GetNextThreebotId ¶ added in v0.3.0
func (m *PBExplorerState) GetNextThreebotId() uint32
func (*PBExplorerState) Marshal ¶
func (m *PBExplorerState) Marshal() (dAtA []byte, err error)
func (*PBExplorerState) ProtoMessage ¶
func (*PBExplorerState) ProtoMessage()
func (*PBExplorerState) Reset ¶
func (m *PBExplorerState) Reset()
func (*PBExplorerState) Size ¶
func (m *PBExplorerState) Size() (n int)
func (*PBExplorerState) String ¶
func (m *PBExplorerState) String() string
func (*PBExplorerState) Unmarshal ¶
func (m *PBExplorerState) Unmarshal(dAtA []byte) error
func (*PBExplorerState) XXX_DiscardUnknown ¶
func (m *PBExplorerState) XXX_DiscardUnknown()
func (*PBExplorerState) XXX_Marshal ¶
func (m *PBExplorerState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*PBExplorerState) XXX_Merge ¶
func (dst *PBExplorerState) XXX_Merge(src proto.Message)
func (*PBExplorerState) XXX_Size ¶
func (m *PBExplorerState) XXX_Size() int
func (*PBExplorerState) XXX_Unmarshal ¶
func (m *PBExplorerState) XXX_Unmarshal(b []byte) error
type PBNetworkInfo ¶
type PBNetworkInfo struct { ChainName string `protobuf:"bytes,1,req,name=chain_name,json=chainName" json:"chain_name"` NetworkName string `protobuf:"bytes,2,req,name=network_name,json=networkName" json:"network_name"` }
NetworkInfo defines the info of the chain network data is dumped from, used as to prevent name colissions.
func (*PBNetworkInfo) Descriptor ¶
func (*PBNetworkInfo) Descriptor() ([]byte, []int)
func (*PBNetworkInfo) GetChainName ¶
func (m *PBNetworkInfo) GetChainName() string
func (*PBNetworkInfo) GetNetworkName ¶
func (m *PBNetworkInfo) GetNetworkName() string
func (*PBNetworkInfo) Marshal ¶
func (m *PBNetworkInfo) Marshal() (dAtA []byte, err error)
func (*PBNetworkInfo) ProtoMessage ¶
func (*PBNetworkInfo) ProtoMessage()
func (*PBNetworkInfo) Reset ¶
func (m *PBNetworkInfo) Reset()
func (*PBNetworkInfo) Size ¶
func (m *PBNetworkInfo) Size() (n int)
func (*PBNetworkInfo) String ¶
func (m *PBNetworkInfo) String() string
func (*PBNetworkInfo) Unmarshal ¶
func (m *PBNetworkInfo) Unmarshal(dAtA []byte) error
func (*PBNetworkInfo) XXX_DiscardUnknown ¶
func (m *PBNetworkInfo) XXX_DiscardUnknown()
func (*PBNetworkInfo) XXX_Marshal ¶
func (m *PBNetworkInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*PBNetworkInfo) XXX_Merge ¶
func (dst *PBNetworkInfo) XXX_Merge(src proto.Message)
func (*PBNetworkInfo) XXX_Size ¶
func (m *PBNetworkInfo) XXX_Size() int
func (*PBNetworkInfo) XXX_Unmarshal ¶
func (m *PBNetworkInfo) XXX_Unmarshal(b []byte) error
type StringLoader ¶
StringLoader loads a string and uses it as the (parsed) value.