response

package
v0.9.10 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

r 基于gin的Context,实现响应数据结构体 集成全局traceID

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WrapContext

func WrapContext(ctx *gin.Context) *wrapper

WrapContext

Types

type Data

type Data map[string]interface{}

数据对象

type Meta

type Meta struct {
	Trace      Trace                 `json:"trace"`
	Pagination *pagination.Paginator `json:"pagination"` // 分页信息
}

Meta 元数据

type Trace

type Trace struct {
	TraceId   string `json:"trace_id"`   // 全局唯一Code
	RequestId string `json:"request_id"` // 当前请求code
}

Trace 跟踪信息

Jump to

Keyboard shortcuts

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