server

package
v0.0.0-...-35b7011 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2020 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var StaticPostfix = map[string]string{
	".js":    "application/javascript; charset=utf-8",
	".css":   "text/css; charset=utf-8",
	".svg":   "image/svg+xml",
	".json":  "text/json",
	".ico":   "image/x-icon",
	".cur":   "image/x-icon",
	".png":   "image/png",
	".bmp":   "image/bmp",
	".jpg":   "image/jpeg",
	".jpeg":  "image/jpeg",
	".jfif":  "image/jpeg",
	".pjpeg": "image/jpeg",
	".pjp":   "image/jpeg",
	".gif":   "image/gif",
	".tif":   "image/tiff",
	".tiff":  "image/tiff",
	".webp":  "image/webp",
}

def MIME types

Functions

func DefaultProxyHandler

func DefaultProxyHandler(ctx *fasthttp.RequestCtx)

func DisableImageLoad

func DisableImageLoad(ctx context.Context) func(event interface{})

func GetOptionalPaths

func GetOptionalPaths(path string) []string

func PreloadOnStart

func PreloadOnStart()

func SsrHandler

func SsrHandler(ctx *fasthttp.RequestCtx)

Types

type Parser

type Parser struct {
}

func NewParser

func NewParser() *Parser

func (*Parser) Run

func (s *Parser) Run(dir string) error

type Static

type Static struct {
}

func NewStatic

func NewStatic() *Static

func (*Static) Run

func (s *Static) Run(dir string) error

Jump to

Keyboard shortcuts

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