Documentation
¶
Index ¶
- Constants
- func GetHelperUtils() map[string]interface{}
- type Convert
- func (ll *Convert) HexStringToBytes(data string) []byte
- func (ll *Convert) HexStringToString(data string) string
- func (ll *Convert) ToBytes(data string) []byte
- func (ll *Convert) ToHexString(data interface{}) string
- func (ll *Convert) ToInt16BE(bytes []byte) int16
- func (ll *Convert) ToInt16LE(bytes []byte) int16
- func (ll *Convert) ToInt32BE(bytes []byte) int32
- func (ll *Convert) ToInt32LE(bytes []byte) int32
- func (ll *Convert) ToInt64BE(bytes []byte) int64
- func (ll *Convert) ToInt64LE(bytes []byte) int64
- func (ll *Convert) ToString(data interface{}) string
- func (ll *Convert) ToStringFromBase64(data interface{}) string
- func (ll *Convert) ToUInt16BE(bytes []byte) uint16
- func (ll *Convert) ToUInt16LE(bytes []byte) uint16
- func (ll *Convert) ToUInt32BE(bytes []byte) uint32
- func (ll *Convert) ToUInt32LE(bytes []byte) uint32
- func (ll *Convert) ToUInt64BE(bytes []byte) uint64
- func (ll *Convert) ToUInt64LE(bytes []byte) uint64
- type Crypto
- func (c *Crypto) MD5Bytes(data string) [16]byte
- func (c *Crypto) MD5HexString(data string) string
- func (c *Crypto) Sha1Bytes(data string) [20]byte
- func (c *Crypto) Sha1HexString(data string) string
- func (c *Crypto) Sha256Bytes(data string) [32]byte
- func (c *Crypto) Sha256HexString(data string) string
- func (c *Crypto) Sha512Bytes(data string) [64]byte
- func (c *Crypto) Sha512HexString(data string) string
- type HttpClient
Constants ¶
const ( KeyCryptoMD5 = "md5" KeyCryptoSHA1 = "sha1" KeyCryptoSHA256 = "sha256" KeyCryptoSHA512 = "sha512" )
const (
KeyMcUtils = "mcUtils"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Convert ¶
type Convert struct {
}
func (*Convert) HexStringToBytes ¶
returns bytes from hex string
func (*Convert) HexStringToString ¶
returns string from hex string
func (*Convert) ToHexString ¶
returns anything to hex string
func (*Convert) ToInt16BE ¶ added in v2.1.1
ToInt16BE converts a 2-byte big-endian slice to an int16, preserving the sign using two's complement representation.
func (*Convert) ToInt16LE ¶
ToInt16LE converts a 2-byte little-endian slice to an int16, preserving the sign using two's complement representation.
func (*Convert) ToInt32BE ¶ added in v2.1.1
ToInt32BE converts a 4-byte big-endian slice to an int32, preserving the sign using two's complement representation.
func (*Convert) ToInt32LE ¶ added in v2.1.1
ToInt32LE converts a 4-byte little-endian slice to an int32, preserving the sign using two's complement representation.
func (*Convert) ToInt64BE ¶ added in v2.1.1
ToInt64BE converts an 8-byte big-endian slice to an int64, preserving the sign using two's complement representation.
func (*Convert) ToInt64LE ¶ added in v2.1.1
ToInt64LE converts an 8-byte little-endian slice to an int64, preserving the sign using two's complement representation.
func (*Convert) ToStringFromBase64 ¶
returns string from base64
func (*Convert) ToUInt16BE ¶
ToUInt16BE converts a 2-byte big-endian slice to a uint16.
func (*Convert) ToUInt16LE ¶
ToUInt16LE converts a 2-byte little-endian slice to a uint16.
func (*Convert) ToUInt32BE ¶ added in v2.1.1
ToUInt32BE converts a 4-byte big-endian slice to a uint32.
func (*Convert) ToUInt32LE ¶ added in v2.1.1
ToUInt32LE converts a 4-byte little-endian slice to a uint32.
func (*Convert) ToUInt64BE ¶ added in v2.1.1
ToUInt64BE converts an 8-byte big-endian slice to a uint64.
func (*Convert) ToUInt64LE ¶ added in v2.1.1
ToUInt64LE converts an 8-byte little-endian slice to a uint64.
type Crypto ¶
type Crypto struct {
}
func (*Crypto) MD5HexString ¶
func (*Crypto) Sha1HexString ¶
func (*Crypto) Sha256Bytes ¶
func (*Crypto) Sha256HexString ¶
func (*Crypto) Sha512Bytes ¶
func (*Crypto) Sha512HexString ¶
type HttpClient ¶
type HttpClient struct {
}
func (*HttpClient) New ¶
func (hc *HttpClient) New(insecure bool, timeout string) *httpclient.Client