middleware

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CORSMiddleware

func CORSMiddleware() gin.HandlerFunc

CORSMiddleware は、CORSの設定を行う

func Logger

func Logger() gin.HandlerFunc

Logger は、ロギング処理

func Recovery

func Recovery(ctx *gin.Context)

Recovery は、リクエストのパニックを回復する

Types

type Log

type Log struct {
	// contains filtered or unexported fields
}

func NewLog

func NewLog() *Log

ログに保存する構造体の作成 最後に登録するにはLoggingを呼ぶ必要あり

func (*Log) Err

func (l *Log) Err(e error) *Log

func (*Log) ErrCode

func (l *Log) ErrCode(code int) *Log

func (*Log) Logging

func (l *Log) Logging(ctx *gin.Context)

ログ情報を登録

func (*Log) Rsp

func (l *Log) Rsp(r []byte) *Log

Jump to

Keyboard shortcuts

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