validate

package
v1.8.101 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2024 License: Zlib Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Empty = Data{}

Functions

This section is empty.

Types

type Data

type Data struct {
	Key    string `form:"key" binding:"required" json:"key"`
	Data   string `form:"data" binding:"required" json:"data"`
	At     int64  `form:"at" binding:"-" json:"at"`
	Expire int64  `form:"expireIn" binding:"-" json:"expireIn"`
}

func New

func New(key string, data string, expire int64) *Data

New *

@param expire Nanoseconds 纳秒

func (*Data) IsExpired

func (v *Data) IsExpired() bool

func (*Data) IsValid

func (v *Data) IsValid() bool

func (*Data) RemainExpired added in v1.8.62

func (v *Data) RemainExpired() int64

func (*Data) String added in v1.2.3

func (v *Data) String() string

Jump to

Keyboard shortcuts

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