ecode

package
v1.3.4 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Success     = value(200, "成功")
	ServerError = value(500, "服务器错误")
	ParamError  = value(501, "参数错误")
)

Functions

func Error

func Error(ctx echo.Context, err error) error

func ErrorWithHttpCode

func ErrorWithHttpCode(ctx echo.Context, httpCode int, err error) error

func OK

func OK(ctx echo.Context, data interface{}) error

Types

type Ecode

type Ecode struct {
	Code int64
	Msg  string
}

func (Ecode) Error

func (this Ecode) Error() string

Status implement error interface

Jump to

Keyboard shortcuts

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