ginx

package
v0.0.0-...-18c9354 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DirHandler

func DirHandler(fileSystem http.FileSystem, options DirOptions) gin.HandlerFunc

func HandleSPA

func HandleSPA(engine *gin.Engine, options SPAOptions) gin.HandlerFunc

func NewSPAHandler

func NewSPAHandler(root string, embeddedFS fs.FS, embeddedRoot string, options DirOptions) gin.HandlerFunc

func StaticFiles

func StaticFiles(root string) http.FileSystem

Types

type DirOptions

type DirOptions struct {
	ShowList  bool
	SPA       bool
	IndexName string
}

type SPAOptions

type SPAOptions struct {
	Root             string
	EmbeddedFS       fs.FS
	EmbeddedRoot     string
	DirOptions       DirOptions
	NotFoundPrefixes []string
	NotFoundHandler  gin.HandlerFunc
}

Jump to

Keyboard shortcuts

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