access

package
v6.0.0-beta.4 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2022 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package access 记录接口访问记录

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Access

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

Access 生成用于打印访问记录的中间件

func New

func New(l web.Logger, format string) *Access

New 声明 Access 中间件

l 表示记录输出的通道; format 表示记录的格式,接受三个参数,分别为状态码、请求方法和请求地址, 默认使用 "[%d] %s\t%s\n",可以使用 fmt.Sprintf 的顺序标记作调整;

func (*Access) Middleware

func (a *Access) Middleware(next web.HandlerFunc) web.HandlerFunc

Jump to

Keyboard shortcuts

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