handlers

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsAPIError

func IsAPIError(e error) bool

IsAPIError check if e is an API error

func ValidateParams

func ValidateParams(params map[string]interface{}) error

Types

type APIError

type APIError struct {
	Code    int64  `json:"retCode"`
	Message string `json:"retMsg"`
}

APIError define API error when response status is 4xx or 5xx

func (APIError) Error

func (e APIError) Error() string

Error return error code and message

Jump to

Keyboard shortcuts

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