code

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewBadRequestError

func NewBadRequestError(v any) error

NewBadRequestError 请求参数错误

func NewCodeError

func NewCodeError(code int, msg string, args ...any) error

func NewForbiddenError

func NewForbiddenError(v any) error

NewForbiddenError 拒绝访问 即使通过了身份验证 (权限,未授权IP等)

func NewNotfoundError

func NewNotfoundError(v any) error

NewNotfoundError 服务器上没有请求的资源。路径错误等。

func NewUnauthorizedError

func NewUnauthorizedError(v any) error

NewUnauthorizedError 请求需要通过身份验证

Types

type CodeError

type CodeError struct {
	Code    int
	Message string
}

func (*CodeError) Error

func (e *CodeError) Error() string

Jump to

Keyboard shortcuts

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