Documentation ¶
Index ¶
- Constants
- Variables
- func Btoi16(val []byte) uint16
- func Btoi32(val []byte) uint32
- func Btoi64(val []byte) uint64
- func I16tob(val uint16) []byte
- func I32tob(val uint32) []byte
- func I64tob(val uint64) []byte
- func MarshalBase32(a []byte) string
- func UnmarshalBase32(encoded string) ([]byte, error)
- type Base64
Constants ¶
View Source
const ( ByteSize = 8 // Encoding follows Croford's Base 32 https://www.crockford.com/base32.html Encoding = "0123456789ABCDEFGHJKMNPQRSTVWXYZ" )
Variables ¶
View Source
var ErrInvalidString = errors.New("String contains invalid characters")
Functions ¶
func MarshalBase32 ¶ added in v0.16.0
func UnmarshalBase32 ¶ added in v0.16.0
Types ¶
type Base64 ¶
type Base64 []byte
Base64 is a []byte base64 encoded value.
func ParseBase64 ¶ added in v0.34.0
func (Base64) MarshalJSON ¶
MarshalJSON returns m as a base64 encoding of m.
func (*Base64) UnmarshalJSON ¶
UnmarshalJSON sets *m to a decoded base64.
Click to show internal directories.
Click to hide internal directories.