assetserver

package
v2.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2022 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HeaderHost          = "Host"
	HeaderContentType   = "Content-Type"
	HeaderContentLength = "Content-Length"
	HeaderUserAgent     = "User-Agent"
	HeaderCacheControl  = "Cache-Control"
	HeaderUpgrade       = "Upgrade"

	WailsUserAgentValue = "wails.io"
)

Variables

This section is empty.

Functions

func BuildAssetServerConfig

func BuildAssetServerConfig(options *options.App) assetserver.Options

func GetMimetype

func GetMimetype(filename string, data []byte) string

func NewAssetHandler

func NewAssetHandler(ctx context.Context, options assetserver.Options) (http.Handler, error)

Types

type AssetServer

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

func NewAssetServer

func NewAssetServer(ctx context.Context, bindingsJSON string, options assetserver.Options) (*AssetServer, error)

func NewAssetServerMainPage

func NewAssetServerMainPage(ctx context.Context, bindingsJSON string, options *options.App) (*AssetServer, error)

func NewAssetServerWithHandler

func NewAssetServerWithHandler(ctx context.Context, handler http.Handler, bindingsJSON string) (*AssetServer, error)

func (*AssetServer) ProcessHTTPRequest

func (d *AssetServer) ProcessHTTPRequest(logInfo string, rw http.ResponseWriter, reqGetter func() (*http.Request, error))

ProcessHTTPRequest processes the HTTP Request by faking a golang HTTP Server. The request will be finished with a StatusNotImplemented code if no handler has written to the response.

func (*AssetServer) ServeHTTP

func (d *AssetServer) ServeHTTP(rw http.ResponseWriter, req *http.Request)

Jump to

Keyboard shortcuts

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