Documentation ¶
Index ¶
- Constants
- type BaseStruct
- func (e BaseStruct) String() string
- func (e BaseStruct) ToBase32Bytes() []byte
- func (e BaseStruct) ToBase32String() string
- func (e BaseStruct) ToBase64Bytes() []byte
- func (e BaseStruct) ToBase64String() string
- func (e BaseStruct) ToBytes() []byte
- func (e BaseStruct) ToHexBytes() []byte
- func (e BaseStruct) ToHexString() string
- func (e BaseStruct) ToString() string
- type Decode
- func (d Decode) ByBase32() Decode
- func (d Decode) ByBase45() Decode
- func (d Decode) ByBase58() Decode
- func (d Decode) ByBase64() Decode
- func (d Decode) ByBase64URL() Decode
- func (d Decode) ByHex() Decode
- func (d Decode) FromBytes(b []byte) Decode
- func (d Decode) FromFile(f interface{}) Decode
- func (d Decode) FromString(s string) Decode
- type Encode
- func (e Encode) ByBase32() Encode
- func (e Encode) ByBase45() Encode
- func (e Encode) ByBase58() Encode
- func (e Encode) ByBase64() Encode
- func (e Encode) ByBase64URL() Encode
- func (e Encode) ByHex() Encode
- func (e Encode) FromBytes(b []byte) Encode
- func (e Encode) FromFile(f interface{}) Encode
- func (e Encode) FromString(s string) Encode
Constants ¶
const (
MaxFileBlock = 1 * 1024 * 1024
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseStruct ¶
type BaseStruct struct { Err error // contains filtered or unexported fields }
func (BaseStruct) String ¶
func (e BaseStruct) String() string
String implements the interface Stringer for encode struct. 实现 Stringer 接口
func (BaseStruct) ToBase32Bytes ¶
func (e BaseStruct) ToBase32Bytes() []byte
ToBase32Bytes outputs as byte slice with base32 encoding. 输出经过 base32 编码的字节切片
func (BaseStruct) ToBase32String ¶
func (e BaseStruct) ToBase32String() string
ToBase32String outputs as string with base32 encoding. 输出经过 base32 编码的字符串
func (BaseStruct) ToBase64Bytes ¶
func (e BaseStruct) ToBase64Bytes() []byte
ToBase64Bytes outputs as byte slice with base64 encoding. 输出经过 base64 编码的字节切片
func (BaseStruct) ToBase64String ¶
func (e BaseStruct) ToBase64String() string
ToBase64String outputs as string with base64 encoding. 输出经过 base64 编码的字符串
func (BaseStruct) ToBytes ¶
func (e BaseStruct) ToBytes() []byte
ToBytes outputs as byte slice. 输出字节切片
func (BaseStruct) ToHexBytes ¶
func (e BaseStruct) ToHexBytes() []byte
ToHexBytes outputs as byte with hex encoding. 输出经过 hex 编码的字节切片
func (BaseStruct) ToHexString ¶
func (e BaseStruct) ToHexString() string
ToHexString outputs as string with hex encoding. 输出经过 hex 编码的字符串
func (BaseStruct) ToString ¶
func (e BaseStruct) ToString() string
ToString outputs as string. 输出字符串
type Decode ¶
type Decode struct {
BaseStruct
}
func (Decode) ByBase64URL ¶
ByBase64URL decodes by base64 for url. 通过 base64 对 url 解码
func (Decode) FromString ¶
FromString hash from string. 对字符串进行编码
type Encode ¶
type Encode struct {
BaseStruct
}
func (Encode) ByBase64URL ¶
ByBase64URL encodes by base64 for url. 通过 base64 对 url 编码
func (Encode) FromString ¶
FromString hash from string. 对字符串进行编码