Documentation
¶
Index ¶
Constants ¶
View Source
const CACHE_TIMEOUT = 20 * time.Second
View Source
const MAX_CACHE_SIZE_MB = 10
Do not store over this amount of MBs in the cache
View Source
const RECAPTCHA_VERIFY_URL string = "https://www.google.com/recaptcha/api/siteverify"
Change this in case Google decides to deprecate the reCAPTCHA validation endpoint
Variables ¶
This section is empty.
Functions ¶
func SetupRoutes ¶
Types ¶
type Cache ¶
type CacheValidator ¶
type CacheValidator interface {
IsValid(cache *EndpointCache) bool
}
type RecaptchaResponse ¶
type TimeValidator ¶
type TimeValidator struct{}
func (*TimeValidator) IsValid ¶
func (validator *TimeValidator) IsValid(cache *EndpointCache) bool
type TimedCache ¶
type TimedCache struct {
// contains filtered or unexported fields
}
func (*TimedCache) Get ¶
func (cache *TimedCache) Get(name string) (EndpointCache, error)
func (*TimedCache) Size ¶
func (cache *TimedCache) Size() uint64
Click to show internal directories.
Click to hide internal directories.