Versions in this module Expand all Collapse all v0 v0.0.2 Jul 12, 2024 Changes in this version + func CharSet(content []byte, contentType string) ([]byte, string, error) v0.0.0 May 31, 2023 Changes in this version + var CrtFile = []byte(...) + var JsonConfig = ...() + var KeyFile = []byte(...) + var Rand = rand.New(rand.NewSource(time.Now().UnixMilli())) + func AesDecode(val string, key []byte) ([]byte, error) + func AesEncode(val []byte, key []byte) (string, error) + func Any2json(data any, path ...string) gjson.Result + func Any2struct(data any, stru any) error + func Base64Decode(val string) ([]byte, error) + func Base64Encode(val T) string + func BytesToString(b []byte) string + func Charset(content []byte, content_type string) ([]byte, string, error) + func CopySlices(value []T) []T + func CopySlicess(value [][]T) [][]T + func CopyWitchContext(ctx context.Context, writer io.Writer, reader io.Reader) (err error) + func Decode(txt T, code string) T + func DecodeRead(txt io.Reader, code string) io.Reader + func DelSliceIndex(val []T, indexs ...int) []T + func FreePort() (int, error) + func GetCertData(cert *x509.Certificate) []byte + func GetCertKey() (*ecdsa.PrivateKey, error) + func GetCertKeyData(key *ecdsa.PrivateKey) ([]byte, error) + func GetCertWithCN(rootCert *x509.Certificate, key *ecdsa.PrivateKey, commonName string) (*x509.Certificate, error) + func GetCertWithCert(rootCert *x509.Certificate, key *ecdsa.PrivateKey, preCert *x509.Certificate) (*x509.Certificate, error) + func GetContentTypeWithBytes(content []byte) string + func GetDefaultDir() (string, error) + func GetHost(addrTypes ...int) net.IP + func GetHosts(addrTypes ...int) []net.IP + func GetProxyCertWithCert(preCert *x509.Certificate) (tlsCert tls.Certificate, err error) + func GetProxyCertWithName(serverName string) (tlsCert tls.Certificate, err error) + func GetRootCert(key *ecdsa.PrivateKey) (*x509.Certificate, error) + func GetServerName(addr string) string + func GetTime(txt string, desc ...bool) string + func GetTlsCert(cert *x509.Certificate, key *ecdsa.PrivateKey) (tls.Certificate, error) + func GetTrack(point0, point1 [2]float64, point_nums float64) [][2]float64 + func Hex(val any) string + func HmacSha1(val, key T) []byte + func ImgDiffer(c, c2 []byte) (float64, error) + func LoadCertData(data []byte) (*x509.Certificate, error) + func LoadCertKeyData(data []byte) (*ecdsa.PrivateKey, error) + func Md5(val T) [16]byte + func Merge(c1 any, c2 any) + func MkDir(path string) error + func NaoId(l ...int) string + func NaoIdWithStr(val string, l ...int) string + func ParseHost(host string) (net.IP, int) + func ParseIp(ip net.IP) int + func PathEscape(txt string) string + func PathExist(path string) bool + func PathJoin(elem ...string) string + func PathUnescape(txt string) (string, error) + func QueryEscape(txt string) string + func QueryUnescape(txt string) (string, error) + func RanFloat64(val, val2 int64) float64 + func RanInt(val, val2 int) int + func RanInt64(val, val2 int64) int64 + func SetUnExportedField(source T, fieldName string, newFieldVal any) T + func Sha1(val T) []byte + func Signal(preCtx context.Context, fun func()) + func SplitHostPort(address string) (string, int, error) + func StringToBytes(s string) []byte + func UrlJoin(base, href string) (string, error) + func Uuid() uuid.UUID + func WrapError(err error, val ...any) error + func ZipDecode(ctx context.Context, r *bytes.Buffer, encoding string) (*bytes.Buffer, error) + type BonId struct + Count int64 + String string + Timestamp int64 + func BonIdFromString(val string) (BonId, error) + func NewBonId() BonId