docs

package
v0.0.0-...-ba7cdbd Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2014 License: MPL-2.0 Imports: 19 Imported by: 0

Documentation

Overview

Package docs implements a Gondola application for browsing package documentation.

This application requires a Go source code checkout to be present on the server as well as GOROOT and GOPATH properly configured. Additionaly, a working Go installation is required to automatically download and update packages.

To configure the packages to list in the index, use the Groups variable.

This application can also automatically fetch and update the packages listed in the index. See StartUpdatingPackages and StopUpdatingPackages.

Index

Constants

View Source
const (
	ListHandlerName    = "docs-list"
	StdListHandlerName = "docs-std-list"
	PackageHandlerName = "docs-package"
	SourceHandlerName  = "docs-source"
)

Variables

View Source
var (
	PackageTemplateName  = "package.html"
	PackagesTemplateName = "packages.html"
	SourceTemplateName   = "source.html"

	ListHandler    = app.NamedHandler(ListHandlerName, listHandler)
	StdListHandler = app.NamedHandler(StdListHandlerName, stdListHandler)
	PackageHandler = app.NamedHandler(PackageHandlerName, packageHandler)
	SourceHandler  = app.NamedHandler(SourceHandlerName, sourceHandler)
)
View Source
var (
	App = app.New()
)
View Source
var (
	DefaultContext = &doc.DefaultContext
)
View Source
var (
	// Groups includes the packages to list in the package index.
	// See the Group struct for further information.
	Groups []*Group
)

Functions

func StartUpdatingPackages

func StartUpdatingPackages(interval time.Duration)

StartUpdatingPackages starts regularly updating the packages listed in Groups at the given interval. Note that for updating packages, the system should have installed the client for the SCM systems used by them (e.g. git, hg, etc...). A working Go installation on the host is also required, since go get will be used to download them.

func StopUpdatingPackages

func StopUpdatingPackages()

StopUpdatingPackages stops updating packages. Note that an in-flight update won't be stopped, but no more updates will be scheduled.

Types

type Group

type Group struct {
	Title    string
	Packages []string
}

Group represents a group of packages to be displayed under the same title. Note that all subpackages of any included package will also be listed. Packages must be referred by their import path (e.g. example.com/pkg).

Directories

Path Synopsis
doc
printer
Package printer implements printing of AST nodes.
Package printer implements printing of AST nodes.

Jump to

Keyboard shortcuts

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