Documentation ¶
Index ¶
- func AddQuery(rawUrl string, key string, value string) (string, error)
- func Decompress(option Option, resp []byte) ([]byte, error)
- func Get(u string, options ...Option) ([]byte, error)
- func GetToMap(u string, options ...Option) (map[string]interface{}, error)
- func GetToStruct[T any](u string, options ...Option) (T, error)
- func PostForm(u string, form url.Values, options ...Option) ([]byte, error)
- func PostJSON(u string, jsonByte []byte, options ...Option) ([]byte, error)
- func PostToMap(u string, jsonByte []byte, option ...Option) (map[string]interface{}, error)
- func PostToStruct[T any](u string, jsonByte []byte, option ...Option) (T, error)
- func QueryUrl(rawUrl string, key string) (string, error)
- func ResponseFail[T any](c *gin.Context, httpCode int, code int, msg string, data T)
- func ResponseFailDefault(c *gin.Context, msg string)
- func ResponseSuccess[T any](c *gin.Context, code int, msg string, data T)
- func ResponseSuccessDefault[T any](c *gin.Context, data T)
- type Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetToStruct ¶
GetToStruct 请求资源,以struct形式返回结果
func PostToStruct ¶
func ResponseFail ¶
func ResponseFailDefault ¶
func ResponseSuccessDefault ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.