types

package
v0.0.0-...-3839eb7 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2024 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LogIpKey               = "ip"
	LogHttpMethodKey       = "method"
	LogRequestPathKey      = "path"
	LogRequestUrlKey       = "url"
	LogRequestQuery        = "query"
	LogRequestHeader       = "header"
	LogRequestBody         = "body"
	LogHttpStatusKey       = "status"
	LogRequestIdKey        = "requestId"
	LogRequestContentType  = "content-type"
	LogResponseContentType = "response-type"
	LogHttpContentLength   = "content-length"
	LogHttpResponseLength  = "response-length"
	LogRequestCostKey      = "cost"

	LogRecoverRequestKey = "request"
	LogRecoverStackKey   = "stack"
	LogRecoverErrorKey   = "error"
)
View Source
const (
	DateTimeFormat = "2006-01-02 15:04:05.999 -07:00"
	DateFormat     = "2006-01-02"
	TimeFormat     = "15:04:05.999"
)
View Source
const (
	QueryOk    = "op.query.ok"
	QueryFail  = "op.query.fail"
	CreateOk   = "op.create.ok"
	CreateFail = "op.create.fail"
	UpdateOk   = "op.update.ok"
	UpdateFail = "op.update.fail"
	DeleteOk   = "op.delete.ok"
	DeleteFail = "op.delete.fail"
)

Variables

View Source
var (
	NopObj = NopType{}
)

Functions

This section is empty.

Types

type H

type H = map[string]any

type NopType

type NopType = struct{}

type Response

type Response struct {
	Code int    `json:"code" example:"2000"`
	Msg  string `json:"msg" example:"operation success"`
	Err  string `json:"err"`
	Data any    `json:"data"`
}

Response just used to generate swagger api doc, you should use resp.Response instead

type S

type S = []any

type Strings

type Strings = []string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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