Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Encoding ¶
type Encoding int
Encoding represents the different encoding types for protobuf bytes fields
const ( // EncodingRaw keeps bytes as raw binary data (default) EncodingRaw Encoding = iota // EncodingHex encodes bytes as hexadecimal string EncodingHex // EncodingHexWith0x encodes bytes as hexadecimal string with 0x prefix EncodingHexWith0x // EncodingBase64 encodes bytes as base64 string EncodingBase64 // EncodingBase58 encodes bytes as base58 string EncodingBase58 )
func ParseEncoding ¶
ParseEncoding parses a string into an Encoding type
func (Encoding) DecodeBytes ¶
DecodeBytes decodes the given string back to bytes using the specified encoding
func (Encoding) EncodeBytes ¶
EncodeBytes encodes the given bytes using the specified encoding
func (Encoding) IsStringType ¶
IsStringType returns true if the encoding converts bytes to string database type
Click to show internal directories.
Click to hide internal directories.