interceptor

package
v0.0.0-...-9058691 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IInterceptor

type IInterceptor interface {
	Data(c echo.Context, code int, data interface{}) error

	Error(c echo.Context, code int, msg error, err error) error
}

func NewInterceptor

func NewInterceptor() IInterceptor

type InterceptorErrorProps

type InterceptorErrorProps struct {
	Status  int    `json:"status"`
	Message string `json:"message,omitempty"`
	Error   string `json:"error,omitempty"`
}

type InterceptorSuccessProps

type InterceptorSuccessProps struct {
	Status int         `json:"status"`
	Data   interface{} `json:"data"`
}

Jump to

Keyboard shortcuts

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