Documentation
¶
Index ¶
Constants ¶
View Source
const ( XRequestID = "X-Request-ID" RequestIDKey = "request_id" TraceIDKey = "trace_id" )
Variables ¶
This section is empty.
Functions ¶
func FromHTTPResponse ¶
func FromHTTPResponse[T any](response *HTTPResponse) *T
func GinParamError ¶
func GinSuccess ¶
Types ¶
type HTTPResponse ¶
type HTTPResponse struct {
Code int `json:"code"`
Message string `json:"message"`
RequestID string `json:"request_id"`
TraceID string `json:"trace_id"`
Data any `json:"data"`
}
func NewHTTPResponse ¶
func NewHTTPResponse(bs []byte) *HTTPResponse
Click to show internal directories.
Click to hide internal directories.