Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrDateNotInRange = newPublicError("Date submit is not in aceptable range")
ErrDateNotInRange error when date not in aceptable range
View Source
var ErrInvalidDigest = &gin.Error{ Err: errors.New("sha256 of body is not match with digest"), Type: gin.ErrorTypePublic, }
ErrInvalidDigest error when sha256 of body do not match with submitted digest
Functions ¶
This section is empty.
Types ¶
type DateValidator ¶
type DateValidator struct { // TimeGap is max time different between client submit timestamp // and webserve time that considered valid. The time precision is millisecond. TimeGap time.Duration }
DateValidator checking validate by time range
func NewDateValidator ¶
func NewDateValidator() *DateValidator
NewDateValidator return DateValidator with default value (30 second)
type DigestValidator ¶
type DigestValidator struct{}
DigestValidator checking digest in header match body
func NewDigestValidator ¶
func NewDigestValidator() *DigestValidator
NewDigestValidator return pointer of new DigestValidator
Click to show internal directories.
Click to hide internal directories.