package
0.16.0
Repository: https://github.com/bitmark-inc/bitmarkd.git
Documentation: pkg.go.dev

# Functions

ClippedVarint64 - return a positive clipped value as an int any value outside the range minimum..maximum is an error.
ConnectionFromIPandPort - convert an IP and port to a connection.
CopyVarint64 - make a copy of a Varint64 from the beginning of a buffer.
EnsureAbsolute - ensure the path is absolute if not, prepend the directory to make absolute path.
EnsureFileExists - check if file exists.
FetchJSON - fetch a JSON response from an HTTP request and decode it.
FormatBytes - for dumping the expected hex used by some test routines.
FromBase58 decodes a modified base58 string to a byte slice.
FromVarint64 - convert an array of up to Varint64MaximumBytes to a uint64 also return the number of bytes used as second value returns 0, 0 if varint64 buffer is truncated.
NewConnection - create a connection from an Host:Port string.
NewConnections - convert an array of connections.
ToBase58 encodes a byte slice to a modified base58 string.
ToVarint64 - convert a 64 bit unsigned integer to Varint64 Structure of the result byte 1: ext | B06 | B05 | B04 | B03 | B02 | B01 | B00 byte 2: ext | B13 | B12 | B11 | B10 | B09 | B08 | B07 byte 3: ext | B20 | B19 | B18 | B17 | B16 | B15 | B14 byte 4: ext | B27 | B26 | B25 | B24 | B23 | B22 | B21 byte 5: ext | B34 | B33 | B32 | B31 | B30 | B29 | B28 byte 6: ext | B41 | B40 | B39 | B38 | B37 | B36 | B35 byte 7: ext | B48 | B47 | B46 | B45 | B44 | B43 | B42 byte 8: ext | B55 | B54 | B53 | B52 | B51 | B50 | B49 byte 9: B63 | B62 | B61 | B60 | B59 | B58 | B57 | B56.

# Constants

Varint64MaximumBytes - maximum possible number of bytes in Varint64.

# Structs

Connection - type to hold an IP and Port.

# Type aliases

PackedConnection - type for packed byte buffer IP and Port.