static

package
v0.2.34 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2026 License: Apache-2.0 Imports: 21 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileServer

type FileServer struct {
	PublishDir afero.Fs
	// contains filtered or unexported fields
}

func NewFileServer

func NewFileServer(dest afero.Fs) *FileServer

func (*FileServer) Serve

func (s *FileServer) Serve() error

type Headers

type Headers struct {
	For    string
	Values map[string]any
}

type Redirect

type Redirect struct {
	From string
	To   string

	// HTTP status code to use for the redirect.
	// A status code of 200 will trigger a URL rewrite.
	Status int

	// Forcode redirect, even if original request path exists.
	Force bool
}

func (Redirect) IsZero

func (r Redirect) IsZero() bool

type Server

type Server struct {
	Headers   []Headers
	Redirects []Redirect
	// contains filtered or unexported fields
}

func (*Server) CompileConfig

func (s *Server) CompileConfig(logger loggers.Logger) error

func (*Server) MatchHeaders

func (s *Server) MatchHeaders(pattern string) []types.KeyValueStr

func (*Server) MatchRedirect

func (s *Server) MatchRedirect(pattern string) Redirect

Jump to

Keyboard shortcuts

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