server

package
v0.0.0-...-ee1aec3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 3, 2023 License: LGPL-3.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddBasicAuth

type AddBasicAuth struct {
	User     string
	Password string
}

AddBasicAuth adds basic auth to the request

func (AddBasicAuth) Apply

func (m AddBasicAuth) Apply(req *http.Request)

type AddUserAgent

type AddUserAgent struct {
	UserAgent string
}

AddUserAgent adds user agent to the request

func (AddUserAgent) Apply

func (m AddUserAgent) Apply(req *http.Request)

type Server

type Server interface {
	Start() error
	AddRoutes(handler func(router *mux.Router))
	AddAuthoriser(auth authoriser.Authoriser)
	Handle404(handlerFunc http.HandlerFunc)
	Handle401(handlerFunc http.HandlerFunc)
	Handle403(handlerFunc http.HandlerFunc)
	ShutterHandler(handlerFunc http.HandlerFunc)
	AddPublicURL(url string)
	GetHTTPProxy(id string) *turnstile.HTTPProxy
	GetTCPProxy(id string) *turnstile.TCPProxy
}

Server returns a generic interface of turnstile server

func New

func New(config turnstile.Config, certProvider turnstile.CertProvider) Server

New is a constructor for turnstile

func NewPublic

func NewPublic(config turnstile.Config, certProvider turnstile.CertProvider) Server

NewPublic is a constructor which returns turnstile with disabled top level authorizers

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL