Documentation ¶
Index ¶
- Variables
- func BasicAuth(username, password string) func(next http.Handler) http.Handler
- func CanAccept(r *http.Request, values ...string) bool
- func Lifecycle(lifecycle fx.Lifecycle, listener net.Listener, server *http.Server)
- func NewHandler(params HandlerParams) http.Handler
- func NewListener(config Config) (net.Listener, error)
- func NewServer(handler http.Handler) *http.Server
- func NewTLSConfig(cfg TLSConfig) (*tls.Config, error)
- func WriteError(w http.ResponseWriter, metadata *types.Metadata, statusCode int, status string, ...)
- type Config
- type Handler
- type HandlerParams
- type TLSConfig
Constants ¶
This section is empty.
Variables ¶
View Source
var Module = fx.Module("server", handler.Module, fx.Provide( NewConfig, NewListener, NewServer, NewHandler, ), fx.Invoke( Lifecycle, ), )
Functions ¶
func NewHandler ¶
func NewHandler(params HandlerParams) http.Handler
func NewListener ¶
NewListener returns a net.Listener for the given config
func NewTLSConfig ¶
NewTLSConfig returns a tls.Config for the given Config
func WriteError ¶
Types ¶
type HandlerParams ¶
type HandlerParams struct { fx.In Config Config Access types.AccessHandler `optional:"true"` Delete types.DeleteHandler `optional:"true"` Correction types.CorrectionHandler `optional:"true"` RestrictProcessing types.RestrictProcessingHandler `optional:"true"` }
Click to show internal directories.
Click to hide internal directories.