fasthttpClient

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func JSON

func JSON(client *fasthttp.Client, url string, met Method, req interface{}, res interface{}, trace ...tracehandler.Trace) (err error)

JSON : 自定義 Client的方式JSON Requset/Respone

func JSONRequest

func JSONRequest(client *fasthttp.Client, url, method string, reqData, resData interface{}, trace ...tracehandler.Trace) error

JSONRequest : 自定義 Client的方式JSON Requset/Respone

func ThirdPartyCypressRequest

func ThirdPartyCypressRequest(client *fasthttp.Client, url, method, gsToken string, reqData, resData interface{}, trace ...tracehandler.Trace) error

ThirdPartyCypressRequest : 第三方 Cypress API 請求

Types

type CypressAPIResponse

type CypressAPIResponse struct {
	Data   interface{} `json:"data"`
	Status struct {
		Code       string `json:"code"`
		Message    string `json:"message"`
		Datetime   string `json:"datetime"`
		TraceCode  string `json:"traceCode"`
		WalletType string `json:"wallettype"`
	} `json:"status"`
}

CypressAPIResponse 定义API响应的通用结构

type Method

type Method string

Method :

const (
	// POST :
	POST Method = "POST"
	//GET :
	GET Method = "GET"
	// PUT :
	PUT Method = "PUT"
	// DELETE :
	DELETE Method = "DELETE"
	// PATCH :
	PATCH Method = "PATCH"
)

Jump to

Keyboard shortcuts

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