http

package
v1.3.6 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2020 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateEtag

func GenerateEtag() string

GenerateEtag generates an etag.

func GetEtag

func GetEtag(webDir string) string

GetEtag returns the etag for the given web directory.

Types

type Manifest

type Manifest struct {
	BackgroundColor string
	Name            string
	Orientation     string
	ShortName       string
	Scope           string
	StartURL        string
	ThemeColor      string
	// contains filtered or unexported fields
}

Manifest is a handler that serves a manifest file for progressive webapp support.

func (*Manifest) CanHandle

func (m *Manifest) CanHandle(r *http.Request) bool

CanHandle returns whether it can handle the given request.

func (*Manifest) ServeHTTP

func (m *Manifest) ServeHTTP(w http.ResponseWriter, r *http.Request)

type Page

type Page struct {
	Author       string
	Description  string
	Headers      []string
	Icon         string
	Keywords     []string
	LoadingLabel string
	Name         string
	ThemeColor   string
	WebDir       string
	// contains filtered or unexported fields
}

Page is a handler that serves the page that works with the wasm app.

func (*Page) CanHandle

func (p *Page) CanHandle(r *http.Request) bool

CanHandle returns whether it can handle the given request.

func (*Page) ServeHTTP

func (p *Page) ServeHTTP(w http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

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