util

package
v0.1.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 11, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Delete

func Delete(token, endpoint, url string, pathParams *map[string]string, body *string, resultData interface{}) (*resty.Response, error)

Delete 方法

func Get

func Get(token, endpoint, url string, pathParams *map[string]string, queryParams *map[string]string, resultData interface{}) (*resty.Response, error)

Get 方法

func GetCallFunc

func GetCallFunc() string

获取调用方法

func NewRequest

func NewRequest(token string, endpoint string, cli *resty.Client) (*resty.Request, error)

NewRequest 构造一个请求

func Post

func Post(token, endpoint, url string, contentType string,
	pathParams *map[string]string, fileParams *map[string]string, queryParams *map[string]string,
	body *string, formData *map[string]string, resultData interface{}) (*resty.Response, error)

Post

func ResponseWithLog

func ResponseWithLog(ctx *context.Context, funcName string, req *resty.Request, result *resty.Response, err error) (*resty.Response, error)

提取错误信息并记录日志

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL