Documentation
¶
Index ¶
- func CloseGrpcConns()
- func CreateMD5(str string) string
- func Decimal(num float64) float64
- func DecryptPassword(encryptedPassword string, privateKeyPath string) (string, error)
- func ExtractSuffix2Int(delayStr string, suffix string) int
- func FileExists(path string) bool
- func Float642String(f64 float64) string
- func GenerateId() int64
- func GenerateRandomCode(length int) (code string)
- func GetByHttp(url string) (string, error)
- func GetByHttpWithParams(apiUrl string, headers map[string]string, params map[string]string, ...) (string, error)
- func GetByHttpWithParamsBackDoc(apiUrl string, headers map[string]string, params map[string]string, ...) (*goquery.Document, error)
- func GetDateFormatStr(format string, date time.Time) string
- func GetDigitNow() int
- func GetGrpcClientConn(serviceName string, creds *credentials.TransportCredentials) (newConn *grpc.ClientConn, err error)
- func GetIP(c *fiber.Ctx) string
- func GetStrNow() string
- func In[T comparable](target T, aimList []T) bool
- func Int2String(i int) string
- func Int642String(i64 int64) string
- func IsIP(ip string) (net.IP, error)
- func IsIPv6LinkLocal(ip net.IP) bool
- func IsNumber(str string) bool
- func MergeAndDeduplicate(arr1, arr2 []int64) []int64
- func NewToken(userId string, userName string) (string, error)
- func ParseIPv6ToIPv4(ip string) (string, error)
- func ParseToken(authorization string) (*cm.GFClaims, error)
- func PostByHttp(url, contentType string, params map[string]any) (string, error)
- func PostByHttpWithParams(apiUrl string, headers map[string]string, params map[string]string, ...) (string, error)
- func Secret() jwt.Keyfunc
- func String2Float64(str string) (float64, error)
- func String2Int(numString string) (int, error)
- func String2Int64(numString string) (int64, error)
- func StringUnicode2Float64(str string) []float64
- func UnixToTime(num int64) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecryptPassword ¶
func FileExists ¶
func GetByHttpWithParams ¶
func GetByHttpWithParams(apiUrl string, headers map[string]string, params map[string]string, timeout time.Duration, proxy *string) (string, error)
GetByHttpWithParams 带请求头、参数和超时的GET请求
func GetByHttpWithParamsBackDoc ¶
func GetByHttpWithParamsBackDoc(apiUrl string, headers map[string]string, params map[string]string, timeout time.Duration, proxy *string) (*goquery.Document, error)
GetByHttpWithParamsBackDoc 带参数的GET请求,返回goquery.Document
func GetGrpcClientConn ¶
func GetGrpcClientConn(serviceName string, creds *credentials.TransportCredentials) (newConn *grpc.ClientConn, err error)
GetGrpcClientConn 获取指定服务的 gRPC 连接
func IsIPv6LinkLocal ¶
func NewToken ¶
iss (issuer): 签发人 exp (expiration time): 过期时间 sub (subject): 主题 aud (audience): 受众 nbf (Not Before): 生效时间 iat (Issued At): 签发时间 jti (JWT ID): 编号
func PostByHttp ¶
PostByHttp 基础POST请求
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.