xrespnse

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2024 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Overview

*

  • @copyright 像衍科技-idr.ai
  • @author 牛牛-研发部-www.ruomm.com
  • @create 2024/1/23 10:01
  • @version 1.0

Index

Constants

View Source
const (
	// Http请求头
	CONTEXT_KEY_TRACE         = "KEY_TRACE"
	HEADER_NAME_TRACEID       = "X-IDR-TraceId"
	HEADER_NAME_TS            = "X-IDR-Ts"
	HEADER_NAME_AUTHORIZATION = "Authorization"
	HEADER_NAME_AUTH_USER_ID  = "__auth_user_id"
	HEADER_NAME_AUTH_CLEAR    = "__auth_clear"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ParamError

type ParamError struct {
	Field   string `json:"field"`
	Message string `json:"message"`
}

type XResponse

type XResponse struct {
	MessageMap map[int]string
	// contains filtered or unexported fields
}

func GenXResponse

func GenXResponse(messageMap map[int]string) *XResponse

func (*XResponse) ConstructResult added in v0.0.3

func (t *XResponse) ConstructResult(respCode int, datas ...interface{}) (int, string, []ParamError, interface{}, interface{})

Jump to

Keyboard shortcuts

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