apierrors

package
v0.9.3 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2020 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaulAPIError = New(0, "Ok", "success")

DefaulAPIError default error for success.

Functions

This section is empty.

Types

type APIError

type APIError struct {
	Code int    `json:"err_code"`
	Msg  string `json:"err_msg,omitempty"`
	Desc string `json:"err_desc,omitempty"`
}

APIError custom http error

func New

func New(code int, msg, desc string) *APIError

New new api error

Jump to

Keyboard shortcuts

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