Documentation ¶
Index ¶
- Constants
- Variables
- func DefaultLiar(os OS, w http.ResponseWriter, r *http.Request)
- func HandleAndroid(w http.ResponseWriter, r *http.Request)
- func HandleApple(w http.ResponseWriter, r *http.Request)
- func HandleWindows(w http.ResponseWriter, r *http.Request)
- func MatchAndroid(r *http.Request) (bool, error)
- func MatchApple(r *http.Request) (bool, error)
- func MatchLinux(r *http.Request) (bool, error)
- func MatchWindows(r *http.Request) (bool, error)
- func ServiceProvider(redirectURL string, identifier Identifier, opts ...OptionsFunc) service.Provider
- type Client
- type Identifier
- type Liar
- type LiarFunc
- type MatchFunc
- type Matcher
- type OS
- type Options
- type OptionsFunc
- type Registry
- func (r *Registry) ClientOS(id string) OS
- func (r *Registry) Clients() []Client
- func (r *Registry) Delete(id string)
- func (r *Registry) IsCaptive(id string) bool
- func (r *Registry) IsLying(id string) bool
- func (r *Registry) Lie(id string)
- func (r *Registry) Release(id string)
- func (r *Registry) Touch(id string, os OS)
- type Service
- func (s *Service) ClientID(r *http.Request) (string, error)
- func (s *Service) ClientOS(r *http.Request) (OS, error)
- func (s *Service) IsCaptive(r *http.Request) (bool, error)
- func (s *Service) Lie(r *http.Request) error
- func (s *Service) Middleware() func(next http.Handler) http.Handler
- func (s *Service) Release(r *http.Request) error
Constants ¶
View Source
const (
ServiceName service.Name = "captiveportal"
)
Variables ¶
View Source
var (
ErrClientIdentificationFailed = errors.New("client identification failed")
)
Functions ¶
func DefaultLiar ¶
func DefaultLiar(os OS, w http.ResponseWriter, r *http.Request)
func HandleAndroid ¶
func HandleAndroid(w http.ResponseWriter, r *http.Request)
func HandleApple ¶
func HandleApple(w http.ResponseWriter, r *http.Request)
func HandleWindows ¶
func HandleWindows(w http.ResponseWriter, r *http.Request)
func ServiceProvider ¶
func ServiceProvider(redirectURL string, identifier Identifier, opts ...OptionsFunc) service.Provider
Types ¶
type Identifier ¶
type Options ¶
func DefaultOptions ¶
func DefaultOptions() *Options
type OptionsFunc ¶
type OptionsFunc func(*Options)
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
func NewRegistry ¶
func NewRegistry() *Registry
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func New ¶
func New(redirectURL string, identifier Identifier, opts ...OptionsFunc) *Service
Source Files ¶
Click to show internal directories.
Click to hide internal directories.