Documentation
¶
Index ¶
- Variables
- func Base64Decode(v string) string
- func Base64Encode(v string) string
- func CheckDependencies(deps ...string) error
- func CheckDependenciesWithWarning(deps ...string)
- func CopyDir(src, dst string) error
- func CopyFile(src, dst string) error
- func CopyPath(src, dst string) error
- func Diff(oldDatas, newDatas []map[string]interface{}, key string) (newData, updateData, delData []map[string]interface{})
- func EnsureDir(dir string) error
- func ExtractTarGz(targzPath, targetDir string) error
- func FormatDuration(d stdtime.Duration) string
- func FormatTime(value interface{}, layout string) string
- func FormatTimeE(value interface{}, layout string) (string, error)
- func FromJsonE[T any](b string) (*T, error)
- func GenHMAC(data string, key string) string
- func GetBool(m map[string]interface{}, key string, igoreCase ...bool) bool
- func GetBoolE(m map[string]interface{}, key string, igoreCase ...bool) (bool, error)
- func GetExeDir() (string, error)
- func GetFloat(m map[string]interface{}, key string, igoreCase ...bool) float64
- func GetFloatE(m map[string]interface{}, key string, igoreCase ...bool) (float64, error)
- func GetInt(m map[string]interface{}, key string, igoreCase ...bool) int
- func GetInt64(m map[string]interface{}, key string, igoreCase ...bool) int64
- func GetInt64E(m map[string]interface{}, key string, igoreCase ...bool) (int64, error)
- func GetIntE(m map[string]interface{}, key string, igoreCase ...bool) (int, error)
- func GetJwtVal(token string) (*cycrypto.JwtData, error)
- func GetParentDirName(path string) (string, error)
- func GetSignature(method, key string, queryParam map[string]string) string
- func GetSignatureFromURL(method, key, url string) (string, error)
- func GetStr(m map[string]interface{}, key string, igoreCase ...bool) string
- func GetStrE(m map[string]interface{}, key string, igoreCase ...bool) (string, error)
- func GetStructFieldTags[T any](tagName string, tagKey ...string) ([]string, error)
- func GetVal[T any](m map[string]interface{}, key string, igoreCase ...bool) T
- func GetValue(m map[string]interface{}, keys []string, ignoreCase ...bool) (interface{}, error)
- func GraphSort(names []string, depGraph map[string]map[string]struct{}) ([]string, error)
- func HasCommand(cmd string) bool
- func HasSudoAccess() bool
- func HashInt(input string) uint32
- func IsDigits(s string) bool
- func IsDir(path string) bool
- func IsRoot() bool
- func JwtSign(data *cycrypto.JwtData) (string, error)
- func JwtSignWithTTL(data *cycrypto.JwtData, ttl stdtime.Duration) (string, error)
- func MD5(params ...interface{}) string
- func MatchFiles(dir, rule string) ([]string, error)
- func MatchSingleFile(dir, rule string) (string, error)
- func MatchSingleFileOrEmpty(dir, rule string) (string, error)
- func Md5Concat(params ...interface{}) string
- func MergeMaps(m1 ...map[string]interface{}) map[string]interface{}
- func MovePath(src, dst string) error
- func NanoID(l ...int) string
- func NewObj[T any]() (T, bool)
- func PadStart(s string, length int, pad string) string
- func ParseQueryToMap(queryString string) (map[string]string, error)
- func ParseURLParams(url string) (string, map[string]string, error)
- func ParseUserAgent(ua string) string
- func PathExists(path string) bool
- func Ptr[T any](v T) *T
- func ReadFileFromZip(zipPath string, filePath string) ([]byte, error)
- func RealVal(encodeVal string) string
- func RemovePath(path string) error
- func RemoveSqlComments(line string, inMultiLineComment bool) (processedLine string, stillInComment bool)
- func ReplaceSqlStringContent(line string, expectedEnd string, vPlaceholder ...string) (processedLine string, nextExpectedEnd string)
- func RequireRootOrSudo() error
- func SM4Decode2(v string) string
- func SetValue(m map[string]interface{}, keys []string, value interface{}) (bool, error)
- func SliceContains(slice []string, item string, ignoreCase ...bool) bool
- func SliceToAny[T any](s []T) []any
- func SnowflakeID() string
- func SortParam(method string, params map[string]string) string
- func SplitFilePath(filePath string) (string, string, string)
- func ToBool(value interface{}) bool
- func ToBoolE(value interface{}) (bool, error)
- func ToFloat64(value interface{}) float64
- func ToFloat64E(value interface{}) (float64, error)
- func ToInt(value interface{}) int
- func ToInt64(value interface{}) int64
- func ToInt64E(value interface{}) (int64, error)
- func ToIntE(value interface{}) (int, error)
- func ToJsonE[T any](d T) (string, error)
- func ToStr(value any) string
- func ToStrE(value interface{}) (string, error)
- func ToTime(value interface{}) stdtime.Time
- func ToTimeE(value interface{}) (stdtime.Time, error)
- func ToTimestamp(tm stdtime.Time) int64
- func TravelMap(m map[string]any, f func(k string, v any) error) error
- func TravelMapEx(m map[string]any, parentKey []any, f func(k []any, v any) error) error
- func TraverseString(s string, separatorChars string, callback cyalgorithm.CallbackFunc) error
- func UUID() string
- func UnzipFile(zipfile, target string) error
- func WalkMapLeaves(root map[string]any, f func(path string, v any) error) error
- func WalkZip(zipfile string, ext string, proc func(path string, r io.Reader) error) error
- func WalkZipOrdered(zipfile string, ext string, proc func(path string, r io.Reader) error, ...) error
- func WalkerZip(zipfile string, ext string, proc func(path string, r io.Reader) error) error
- func XID() string
- func ZipFolder(folder string) (string, error)
- type CallbackFunc
- type DelimiterInfo
- type JwtData
- type WordInfo
Constants ¶
This section is empty.
Variables ¶
View Source
var ToString = cytype.ToString
Functions ¶
func Base64Decode ¶
func Base64Encode ¶
func CheckDependencies ¶ added in v1.0.0
func CheckDependenciesWithWarning ¶ added in v1.0.0
func CheckDependenciesWithWarning(deps ...string)
func ExtractTarGz ¶ added in v1.0.0
func FormatDuration ¶
func FormatTime ¶ added in v1.0.0
func FormatTimeE ¶ added in v1.0.0
func GetParentDirName ¶ added in v1.0.0
func GetSignatureFromURL ¶
func GetStructFieldTags ¶ added in v1.0.0
func HasCommand ¶ added in v1.0.0
func HasSudoAccess ¶ added in v1.0.0
func HasSudoAccess() bool
func JwtSignWithTTL ¶ added in v1.0.0
func MatchFiles ¶ added in v1.0.0
func MatchSingleFile ¶ added in v1.0.0
func MatchSingleFileOrEmpty ¶ added in v1.0.0
func ParseUserAgent ¶
func PathExists ¶ added in v1.0.0
func ReadFileFromZip ¶ added in v1.0.0
func RemovePath ¶ added in v1.0.0
func RemoveSqlComments ¶
func ReplaceSqlStringContent ¶
func RequireRootOrSudo ¶ added in v1.0.0
func RequireRootOrSudo() error
func SM4Decode2 ¶
func SliceContains ¶ added in v1.0.0
func SliceToAny ¶
func SnowflakeID ¶
func SnowflakeID() string
func ToFloat64E ¶ added in v1.0.0
func ToTimestamp ¶
func TravelMapEx ¶ added in v1.0.0
func TraverseString ¶
func TraverseString(s string, separatorChars string, callback cyalgorithm.CallbackFunc) error
func WalkMapLeaves ¶
func WalkZipOrdered ¶ added in v1.0.0
Types ¶
type CallbackFunc ¶
type CallbackFunc = cyalgorithm.CallbackFunc
type DelimiterInfo ¶
type DelimiterInfo = stringutil.DelimiterInfo
func FindDelimiters ¶
func FindDelimiters(str, sep string) []DelimiterInfo
type WordInfo ¶
type WordInfo = cyalgorithm.WordInfo
Click to show internal directories.
Click to hide internal directories.