Documentation
¶
Overview ¶
* @Author: robert@yeastar.com * @Date: 2024-09-23 02:03:56 * @LastEditors: robert@yeastar.com * @LastEditTime: 2025-02-11 15:35:00 * @FilePath: \v2\util\string.go * @Description: * * Copyright (c) 2022 by robert@yeastar.com, All Rights Reserved.
Index ¶
- func FlateUnCompress(data []byte) ([]byte, error)
- func FloatToString(v float64, n int) string
- func GenerateOrderClientId(size int) string
- func GenerateRandomString(length int) string
- func GzipUnCompress(data []byte) ([]byte, error)
- func HmacMD5Sign(secret, params string) (string, error)
- func HmacSHA1Sign(secret, params string) (string, error)
- func HmacSHA256Base64Sign(secret, params string) (string, error)
- func HmacSHA256Sign(secret, params string) (string, error)
- func HmacSHA512Base64Sign(hmacKey string, data string) string
- func HmacSHA512Sign(secret, params string) (string, error)
- func HmacSha384Sign(secret, params string) (string, error)
- func MD5Sign(secret, params string) (string, error)
- func MergeOptionParams(params *url.Values, opts ...model.OptionParameter)
- func ValuesToJson(v url.Values) ([]byte, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FlateUnCompress ¶
func FloatToString ¶
FloatToString 保留的小数点位数,去除末尾多余的0(StripTrailingZeros)
func GenerateOrderClientId ¶
func GenerateRandomString ¶ added in v2.0.8
func GzipUnCompress ¶
func HmacMD5Sign ¶
func HmacSHA1Sign ¶
func HmacSHA256Base64Sign ¶
func HmacSHA256Sign ¶
func HmacSHA512Base64Sign ¶
func HmacSHA512Sign ¶
func HmacSha384Sign ¶
func MergeOptionParams ¶
func MergeOptionParams(params *url.Values, opts ...model.OptionParameter)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.