community: github.com/documize/community/server/web Index | Files

package web

import "github.com/documize/community/server/web"

Package web contains the Documize static web data.

Package web contains the Documize static web data.

Index

Package Files

embed.go serve.go

Variables

var SiteInfo struct {
    DBname, DBhash, Issue, Edition string
}

SiteInfo describes set-up information about the site

func Asset Uses

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

Asset fetch.

func AssetDir Uses

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

AssetDir returns web app "assets" folder.

func ReadFile Uses

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

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

func StaticAssetsFileSystem Uses

func StaticAssetsFileSystem() http.FileSystem

StaticAssetsFileSystem data encoded in the go:generate above.

type EmbedHandler Uses

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 Uses

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

Handler contains the runtime information such as logging and database.

func (*Handler) EmberHandler Uses

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

EmberHandler serves HTML web pages

Package web imports 5 packages (graph) and is imported by 6 packages. Updated 2019-07-01. Refresh now. Tools for package owners.