Documentation ¶
Index ¶
- func CopyCtx(ctx context.Context) context.Context
- func CopyGinCtx(ctx *gin.Context) context.Context
- func FileHash(reader io.Reader, tp string) string
- func FormatDate(date time.Time) string
- func FormatDateTime(dateTime time.Time) string
- func Get(ctx context.Context, url string, queries map[string]string, result interface{}, ...) error
- func GetHttpClient(ctx context.Context) *resty.Client
- func GetNanoId() string
- func GetUuid() string
- func GetUuidV4() string
- func GetWithHeader(ctx context.Context, headers map[string]string, queries map[string]string, ...) error
- func GoInPool(task func()) error
- func HmacSha1WithBase64(secret, value string) string
- func HmacSha256WithHex(secret, value string) string
- func InitGoPool(max int)
- func MD5(str []byte) string
- func ParseDate(date string) time.Time
- func ParseDateTime(dateTime string) time.Time
- func Post(ctx context.Context, url string, req interface{}, result interface{}, ...) error
- func PostWithHeader(ctx context.Context, headers map[string]string, url string, req interface{}, ...) error
- func Sha1(str []byte) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatDateTime ¶
FormatDateTime 转时间格式 yyyy-MM-dd HH:mm:ss
func Get ¶
func Get(ctx context.Context, url string, queries map[string]string, result interface{}, respErr interface{}) error
Get 快速发起get请求
func GetHttpClient ¶
GetHttpClient 获取http client 实例
func GetWithHeader ¶ added in v0.5.4
func GetWithHeader(ctx context.Context, headers map[string]string, queries map[string]string, url string, result interface{}, respErr interface{}) error
GetWithHeader 快速发起get请求,带headers
func HmacSha1WithBase64 ¶ added in v0.6.5
func HmacSha256WithHex ¶ added in v0.7.0
func InitGoPool ¶ added in v0.8.1
func InitGoPool(max int)
func ParseDateTime ¶
ParseDateTime 转时间格式 yyyy-MM-dd HH:mm:ss
func Post ¶
func Post(ctx context.Context, url string, req interface{}, result interface{}, respErr interface{}) error
Post 快速发起post请求
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.