server

package
v0.0.11 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2024 License: MIT Imports: 18 Imported by: 0

Documentation

Overview

Code generated by fassify DO NOT EDIT

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Validate added in v0.0.10

func Validate[IN any, OUT any](fn http.HandlerFunc, name string, req IN, cfg *config.Config) (res OUT, err error)

Validate is a generic function to test a handler function.

func WithAuthentication

func WithAuthentication(cfg *config.Config, next http.HandlerFunc) http.HandlerFunc

WithAuthentication checks for a valid token

func WithEmbeddedFiles added in v0.0.2

func WithEmbeddedFiles(efs embed.FS, prefix string) http.HandlerFunc

WithEmbeddedFiles serves files from the embedded file system

func WithLogging

func WithLogging(next http.HandlerFunc) http.HandlerFunc

WithLogging logs the current request to the terminal

Types

type Manager added in v0.0.8

type Manager struct {
	// contains filtered or unexported fields
}

func NewManager added in v0.0.8

func NewManager(cfg *config.Config) *Manager

func (*Manager) Error added in v0.0.8

func (a *Manager) Error() error

func (*Manager) ListenAndServe added in v0.0.8

func (a *Manager) ListenAndServe()

Directories

Path Synopsis
functions
app

Jump to

Keyboard shortcuts

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