Documentation ¶
Index ¶
- Constants
- func BuildAssetServerConfig(options *options.App) assetserver.Options
- func GetMimetype(filename string, data []byte) string
- func NewAssetHandler(ctx context.Context, options assetserver.Options) (http.Handler, error)
- type AssetServer
- func NewAssetServer(ctx context.Context, bindingsJSON string, options assetserver.Options) (*AssetServer, error)
- func NewAssetServerMainPage(ctx context.Context, bindingsJSON string, options *options.App) (*AssetServer, error)
- func NewAssetServerWithHandler(ctx context.Context, handler http.Handler, bindingsJSON string) (*AssetServer, error)
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 NewAssetHandler ¶
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 (*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)
Click to show internal directories.
Click to hide internal directories.