spa

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

The spa package is experimental. The API will most likely change

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FsReader

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

func (*FsReader) Read

func (r *FsReader) Read(filename string) (b []byte, ok bool, err error)

type Handler

type Handler struct {
	IndexFile        string
	IndexRoute       string
	IndexCacheHeader string
	AssetFS          fs.FS
	AssetFSPrefix    string
	AssetPrefixes    []string
	AssetCacheHeader string

	NotFoundPrefixes []string
	// contains filtered or unexported fields
}

func NewHandler

func NewHandler(opts *HandlerOpts) *Handler

func (*Handler) ServeHTTP

func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type HandlerOpts

type HandlerOpts struct {
	IndexFile        string
	IndexRoute       string
	IndexCacheHeader string
	AssetFS          fs.FS
	AssetFSPrefix    string
	AssetPrefixes    []string
	AssetCacheHeader string
	NotFoundPrefixes []string
}

type Reader

type Reader interface {
	Read(filename string) (b []byte, ok bool, err error)
}

Jump to

Keyboard shortcuts

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