Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrDateNotInRange = errors.New("Date submit is not in aceptable range")
ErrDateNotInRange error when date not in aceptable range
View Source
var ErrInvalidDigest = errors.New("Sha256 of body is not match with digest")
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 server 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.