Documentation ¶
Index ¶
- Constants
- func CWD() string
- func Compress(b []byte) []byte
- func Copy(src, dest string) error
- func Decompress(data []byte) []byte
- func DeepCopy(dst, src interface{}) error
- func EnsureDir(dir string) (err error)
- func ExpandHomeDir(path string) string
- func FileMove(src, dst string) error
- func GetBytesChecksum(bs []byte, m ModeChecksum) string
- func GetChecksum(i interface{}, mode ModeChecksum) string
- func GetFileChecksum(path string, m ModeChecksum) (string, error)
- func GetStringChecksum(str string, mode ModeChecksum) string
- func GzipToBase64(bs []byte) (b64 string, err error)
- func HomeDir() string
- func InterfaceExpand(msg []interface{}) string
- func IsPortInUse(port int) bool
- func LineBuilder(width int, char string) string
- func LoadYaml(path string, i interface{}) error
- func LocalIP() string
- func MediaSorter(m map[int]interface{}) mapSorter
- func PauseExit()
- func RandString0f(len int) string
- func RandStringFromAlphabet(length int, alphabet string) string
- func RemoveDuplicateInt(a []int) []int
- func RemoveElementInt(a []int, ele int) []int
- func RsaGenKeypair() (priKey string, pubKey string)
- func RsaGetPublicKey() string
- func RsaLoadPrivateKey(path string) error
- func RsaSavePrivateKey(priKey *rsa.PrivateKey, filepath string) error
- func RsaSha256Sign(i interface{}) (signature, pubKey string, err error)
- func RsaSha256SignHash(hash string) (signature, pubKey string, err error)
- func RsaSha256Verify(i interface{}, signature, pubKey string) bool
- func RsaSha256VerifyHash(hash, signature, pubKey string) bool
- func SaveYaml(path string, i interface{}) error
- func ScreenClear()
- func StringsCompress(strs []string) (str string, err error)
- func StringsDecompress(str string) (strs []string, err error)
- func StringsDedup(slice []string) []string
- func StringsDedupWithSort(a []string) (ret []string)
- func StringsExcept(a []string, b []string) (ret []string)
- type ClientPool
- type ConnectData
- type MapItem
- type ModeChecksum
Constants ¶
View Source
const ALPHABET = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
Variables ¶
This section is empty.
Functions ¶
func Decompress ¶
func ExpandHomeDir ¶
func GetBytesChecksum ¶
func GetBytesChecksum(bs []byte, m ModeChecksum) string
func GetChecksum ¶ added in v1.0.2
func GetChecksum(i interface{}, mode ModeChecksum) string
func GetFileChecksum ¶ added in v1.0.2
func GetFileChecksum(path string, m ModeChecksum) (string, error)
func GetStringChecksum ¶
func GetStringChecksum(str string, mode ModeChecksum) string
func GzipToBase64 ¶
func InterfaceExpand ¶
func InterfaceExpand(msg []interface{}) string
func IsPortInUse ¶
func LineBuilder ¶
LineBuilder Build a string line with char given
func MediaSorter ¶
func MediaSorter(m map[int]interface{}) mapSorter
func RandString0f ¶
func RandStringFromAlphabet ¶
func RemoveDuplicateInt ¶
func RemoveElementInt ¶
func RsaGenKeypair ¶
func RsaGetPublicKey ¶
func RsaGetPublicKey() string
func RsaLoadPrivateKey ¶
func RsaSavePrivateKey ¶
func RsaSavePrivateKey(priKey *rsa.PrivateKey, filepath string) error
func RsaSha256Sign ¶
func RsaSha256SignHash ¶
func RsaSha256Verify ¶
func RsaSha256VerifyHash ¶
func ScreenClear ¶
func ScreenClear()
func StringsCompress ¶
StringsCompress Strings to json string
func StringsDecompress ¶
StringsDecompress Json string to strings
func StringsDedup ¶
func StringsDedupWithSort ¶
func StringsExcept ¶
StringsExcept sort(a-b)
Types ¶
type ClientPool ¶
type ClientPool struct {
// contains filtered or unexported fields
}
func NewClientPool ¶
func NewClientPool(maxClients int) *ClientPool
func (*ClientPool) GetClient ¶
func (p *ClientPool) GetClient() (client *http.Client)
func (*ClientPool) Init ¶
func (p *ClientPool) Init(maxClients int)
func (*ClientPool) Recycle ¶
func (p *ClientPool) Recycle(client *http.Client)
type ConnectData ¶
type ModeChecksum ¶ added in v1.0.2
type ModeChecksum uint
const ( ModeChecksumMD5 ModeChecksum = iota ModeChecksumSHA256 ModeChecksum = iota )
Click to show internal directories.
Click to hide internal directories.