service

package
v0.0.0-...-0eed87a Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ERROR_PARAMETER = 100
)

Variables

View Source
var ERROR_DATA_NOT_FOUND = NewServiceError("数据不存在")

Functions

func ErrorHandler

func ErrorHandler(c *fiber.Ctx, err error) error

func NewServiceError

func NewServiceError(message interface{}, code ...int) error

Types

type ServiceError

type ServiceError struct {
	Code    int         `json:"code"`
	Message interface{} `json:"message"`
}

func (*ServiceError) Error

func (e *ServiceError) Error() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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