Documentation ¶
Index ¶
- Variables
- func API(ctx context.Context) *ristretto.Cache
- func AllowAPI(ctx context.Context, aid uint64, by rate.Limit, burst int) bool
- func AllowRemoteIPLogin(ctx context.Context, ip string) bool
- func AllowSite(ctx context.Context, domain string) (uid, sid uint64, ok bool)
- func AllowUseIDToLogin(ctx context.Context, uid uint64) bool
- func Close(ctx context.Context) error
- func IP(ctx context.Context) *ristretto.Cache
- func Open(ctx context.Context, onSession func(context.Context, *entry.Entry)) (context.Context, error)
- func Session(ctx context.Context) *ristretto.Cache
- func SetSite(ctx context.Context, ttl time.Duration) func(*models.CachedSite)
- func Site(ctx context.Context) *ristretto.Cache
- func User(ctx context.Context) *ristretto.Cache
- type SiteRate
Constants ¶
This section is empty.
Variables ¶
View Source
var LoginRate = rate.Limit(2.0)
LoginRate limit to 2 login attempts per second.
Functions ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.