web

package
v2.4.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2019 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Overview

Package web contains the Documize static web data.

Package web contains the Documize static web data.

Index

Constants

This section is empty.

Variables

View Source
var SiteInfo struct {
	DBname, DBhash, Issue string
}

SiteInfo describes set-up information about the site

Functions

func Asset

func Asset(location string) ([]byte, error)

Asset fetch.

func AssetDir

func AssetDir(dir string) ([]string, error)

AssetDir returns web app "assets" folder.

func ReadFile

func ReadFile(filename string) ([]byte, error)

ReadFile is intended to substitute for ioutil.ReadFile().

func StaticAssetsFileSystem

func StaticAssetsFileSystem() http.FileSystem

StaticAssetsFileSystem data encoded in the go:generate above.

Types

type EmbedHandler

type EmbedHandler interface {
	Asset(string) ([]byte, error)
	AssetDir(string) ([]string, error)
	StaticAssetsFileSystem() http.FileSystem
}

EmbedHandler is defined in each embed directory

var Embed EmbedHandler

Embed allows access to the embedded data

type Handler

type Handler struct {
	Runtime *env.Runtime
	Store   *store.Store
}

Handler contains the runtime information such as logging and database.

func (*Handler) EmberHandler

func (h *Handler) EmberHandler(w http.ResponseWriter, r *http.Request)

EmberHandler serves HTML web pages

Jump to

Keyboard shortcuts

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