Documentation
¶
Index ¶
- func BytesToInt64(buf []byte) int64
- func CopyFile(dst, src string) error
- func DirDirs(path string, count uint32) ([]string, error)
- func DirFiles(path string, count uint32) ([]string, error)
- func FildIpv4(data []byte) (string, bool)
- func FindFile(dir, name string) string
- func GetDirFreeSpace(dir string) (uint64, error)
- func GetDirUsedSpace(dir string) (uint64, error)
- func GetFileType(fSrc string) (string, error)
- func GetPublicIP() (string, error)
- func GetSysMemAvailable() (uint64, error)
- func Int64ToBytes(i int64) []byte
- func InterfaceIsNIL(i interface{}) bool
- func IsIntranetIpv4(ipv4 string) (bool, error)
- func PasswdWithMask(hint string, defaultVal string, mask string) (string, error)
- func RandSlice(slice interface{})
- func RecoverError(err interface{}) string
- func RemoveRepeatedAddr(arr []multiaddr.Multiaddr) (newArr []multiaddr.Multiaddr)
- func RenameDir(oldDir, newDir string) error
- func StringBuilder(cap int, p ...string) string
- func Ternary(a, b int64) int64
- func VerifyPolkadotjsHexSign(account, msg, signature string) ([]byte, bool, error)
- func VerifySR25519WithPubkey(account, msg, signature string) ([]byte, bool, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BytesToInt64 ¶
func GetDirFreeSpace ¶
func GetDirUsedSpace ¶ added in v0.4.2
func GetFileType ¶
func GetPublicIP ¶
func GetSysMemAvailable ¶
func Int64ToBytes ¶
func InterfaceIsNIL ¶
func InterfaceIsNIL(i interface{}) bool
InterfaceIsNIL returns the comparison between i and nil
func IsIntranetIpv4 ¶
func PasswdWithMask ¶
func RecoverError ¶
func RecoverError(err interface{}) string
RecoverError is used to record the stack information of panic
func RemoveRepeatedAddr ¶
func RemoveRepeatedAddr(arr []multiaddr.Multiaddr) (newArr []multiaddr.Multiaddr)
func StringBuilder ¶
func VerifyPolkadotjsHexSign ¶
VerifyPolkadotjsHexSign verify signature signed with polkadot.js
- account: polkadot account
- msg: message
- sign: signature
Return:
- []byte: public key of account
- bool: verification result
- error: error message
Tip:
func VerifySR25519WithPubkey ¶
VerifySR25519WithPubkey verify sr25519 signature with account public key
- account: polkadot account
- msg: message
- signature: sr25519 signature
Return:
- []byte: public key of account
- bool: verification result
- error: error message
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.