Versions in this module Expand all Collapse all v1 v1.2.2 Jun 28, 2016 v1.2.1 Aug 28, 2015 Changes in this version + type AuthGuard struct + func New(o Options) (*AuthGuard, error) + func (ag *AuthGuard) Check(username string, req *http.Request) bool + func (ag *AuthGuard) ClearUntrackedVisitors() + func (ag *AuthGuard) Complaint(username string, req *http.Request) + func (ag *AuthGuard) GetAllVisitors() []*Visitor + func (ag *AuthGuard) GetVisitor(username string, req *http.Request) (*Visitor, bool) + func (ag *AuthGuard) Sync() error + type BindType int + const BindToIP + const BindToNothing + const BindToUsernameAndIP + type LogHandlerFunc func(message string, lvl LogLevelType) + type LogLevelType int + const LogLevelError + const LogLevelErrorOnly + const LogLevelInfo + const LogLevelNone + type Options struct + Attempts int + AttemptsResetDuration int + BanDuration int + BindMethod BindType + Exceptions []string + LockoutDuration int + LockoutsResetDuration int + LogDestination io.Writer + LogHandler LogHandlerFunc + LogLevel LogLevelType + MaxLockouts int + ProxyIPHeaderName string + Store string + SyncAfter int + type Visitor struct + Attempts int + Ban bool + Host string + LockUntil time.Time + Lockouts int + ResetAttemptsAfter time.Time + ResetLockoutsAfter time.Time + UserAgent string + Username string + func (v *Visitor) LockDate() time.Time + func (v *Visitor) LockRemainingTime() int + func (v *Visitor) Reset()