response

package
v0.1.1-beta.2 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ErrorEncoder

func ErrorEncoder(w nethttp.ResponseWriter, r *nethttp.Request, err error)

Types

type ErrorResponse

type ErrorResponse struct {
	Code       int             `json:"code"`
	Reason     string          `json:"reason"`
	Message    interface{}     `json:"message"`
	TraceId    string          `json:"traceId"`
	ServerTime int64           `json:"serverTime"`
	MetaData   json.RawMessage `json:"metaData,omitempty"`
}

type Response

type Response struct {
	Code       int         `json:"code,omitempty"`
	Reason     string      `json:"reason,omitempty"`
	Message    interface{} `json:"message,omitempty"`
	Result     interface{} `json:"result,omitempty"`
	TraceId    string      `json:"traceId"`
	ServerTime int64       `json:"serverTime"`
}

Jump to

Keyboard shortcuts

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