Documentation ¶
Index ¶
- Variables
- func BlockNum(blockID string) uint32
- func BoolToByte(value bool) byte
- func ByteToBool(value []byte) bool
- func FromHexUint16(input string) (uint16, error)
- func FromHexUint64(input string) (uint64, error)
- func FromRevBlockNum64(input string) (uint64, error)
- func HexName(name uint64) string
- func HexRevBlockNum(blockNum uint32) string
- func HexRevBlockNum64(blockNum uint64) string
- func HexUint16(input uint16) string
- func HexUint32(input uint32) string
- func HexUint64(input uint64) string
- func IncreaseBlockIDSuffix(blockID string) string
- func MustProtoMarshal(obj proto.Message) []byte
- func ReversedBlockID(blockID string) string
- func ReversedUint16(input uint16) uint16
- func StringListToBytes(value []string, separator string) []byte
- func Uint64ToBytes(value uint64) []byte
Constants ¶
This section is empty.
Variables ¶
View Source
var B = func(s string) []byte { out, err := hex.DecodeString(s) if err != nil { panic(err) } return out }
B is a shortcut for (must) hex.DecodeString
View Source
var (
ErrNotFound = errors.New("not found")
)
View Source
var H = hex.EncodeToString
H is a shortcut for hex.EncodeToString
Functions ¶
func BoolToByte ¶
func ByteToBool ¶
func FromHexUint16 ¶
func FromHexUint64 ¶
func FromRevBlockNum64 ¶
func HexRevBlockNum ¶
func HexRevBlockNum64 ¶
func IncreaseBlockIDSuffix ¶
increaseBlockIDSuffix increases the last bits of the blockID, to make it to the next block in an InfiniteRange search. WARN: if the last characters are: "ffffffff", then it will overflow, and return a *lower* key.
func MustProtoMarshal ¶
func ReversedBlockID ¶
func ReversedUint16 ¶
func StringListToBytes ¶
func Uint64ToBytes ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.