wrapper

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DataField    = "data"
	TraceIDField = "trace_id"
	SuccessField = "success"
	// CodeField     = "code"
	MessageField  = "message"
	TotalField    = "total"
	MetadataField = "metadata"
)

Variables

This section is empty.

Functions

func Translate

func Translate(c echo.Context, res Response) error

Translate response

func Wrap

Wrap return new gin.HandlerFunc by GinHandlerFn

Types

type EchoHandlerFunc

type EchoHandlerFunc func(c echo.Context) Response

type Response

type Response struct {
	Error        error
	Data         interface{}
	Status       int
	Total        int64
	IncludeTotal bool
}

Response body

Jump to

Keyboard shortcuts

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