mirror of
https://github.com/lightninglabs/aperture.git
synced 2025-12-17 00:54:20 +01:00
16 lines
344 B
Go
16 lines
344 B
Go
package freebie
|
|
|
|
import (
|
|
"net"
|
|
"net/http"
|
|
)
|
|
|
|
// DB is the main interface of the package freebie. It represents a store that
|
|
// keeps track of how many free requests a certain IP address can make to a
|
|
// certain resource.
|
|
type DB interface {
|
|
CanPass(*http.Request, net.IP) (bool, error)
|
|
|
|
TallyFreebie(*http.Request, net.IP) (bool, error)
|
|
}
|