timestamp

package
v0.12.6 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(opts ...Option) zeroapi.Handler

New 验证请求中的时间戳与服务端相比,是否相差太大 由插件 middleware/must-param 确保 Field 存在

Types

type Option

type Option struct {
	// Field 时间戳字段名称,默认为 timestamp
	Field string
	// Diff 相差的时间,单位 秒,默认 10 秒
	Diff int64
	// Enable 是否开启检测,默认 true
	Enable bool
}

Option ..

Jump to

Keyboard shortcuts

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