go-captiveportal/identifier.go

18 lines
335 B
Go
Raw Normal View History

2020-10-16 17:27:44 +02:00
package captiveportal
import "net/http"
type Identifier interface {
Identify(r *http.Request) (string, error)
}
type IdentifierFunc func(r *http.Request) (string, error)
func (f IdentifierFunc) Identify(r *http.Request) (string, error) {
return f(r)
}
func DefaultIdentifier(r *http.Request) (string, error) {
return "", nil
}