view

package
v0.0.0-...-7342f7f Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2023 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Overview

Package view provides the user interface.

Index

Constants

This section is empty.

Variables

View Source
var Favicon faviconHandler

Favicon serves a favicon.ico.

View Source
var Static = staticHandler{
	"fonts/GoMedium-Italic.ttf":   gomediumitalic.TTF,
	"fonts/Go-Italic.ttf":         goitalic.TTF,
	"fonts/Go-Bold.ttf":           gobold.TTF,
	"fonts/GoMedium.ttf":          gomedium.TTF,
	"fonts/Go-BoldItalic.ttf":     gobolditalic.TTF,
	"fonts/GoRegular.ttf":         goregular.TTF,
	"fonts/GoMono-Bold.ttf":       gomonobold.TTF,
	"fonts/GoMono.ttf":            gomono.TTF,
	"fonts/GoMono-Italic.ttf":     gomonoitalic.TTF,
	"fonts/GoMono-BoldItalic.ttf": gomonobolditalic.TTF,
}

Static serves "static resources".

Functions

func Browse

func Browse(w http.ResponseWriter, base string, dir []DirectoryEntry, params *Params)

Browse writes a filesystem browser to the response writer.

func Graph

func Graph(w http.ResponseWriter, g *model.Graph, params *Params)

Graph displays a graph.

Types

type DirectoryEntry

type DirectoryEntry struct {
	IsDir bool
	Path  string
	Name  string
}

DirectoryEntry represents a file or directory in a filesystem.

type Params

type Params struct {
	AceTheme string
	CSSTheme string
}

Params are common parameters needed to stye the UI.

Jump to

Keyboard shortcuts

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