app: github.com/maxence-charriere/app/internal/http Index | Files

package http

import "github.com/maxence-charriere/app/internal/http"

Index

Package Files

manifest.go page.go templates.go version.go

func GenerateEtag Uses

func GenerateEtag() string

GenerateEtag generates an etag.

func GetEtag Uses

func GetEtag(webDir string) string

GetEtag returns the etag for the given web directory.

type Manifest Uses

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 Uses

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

CanHandle returns whether it can handle the given request.

func (*Manifest) ServeHTTP Uses

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

type Page Uses

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 Uses

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

CanHandle returns whether it can handle the given request.

func (*Page) ServeHTTP Uses

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

Package http imports 14 packages (graph) and is imported by 2 packages. Updated 2019-10-15. Refresh now. Tools for package owners.