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 DocsApp.Groups.
This application can also automatically fetch and update the packages listed in the index. See StartUpdatingPackages and StopUpdatingPackages.
Index ¶
- Constants
- Variables
- func ListHandler(ctx *app.Context)
- func PackageHandler(ctx *app.Context)
- func SourceHandler(ctx *app.Context)
- func StartUpdatingPackages(ctx *doc.Environment, interval time.Duration)
- func StdListHandler(ctx *app.Context)
- func StopUpdatingPackages()
- type App
- type Group
- type Options
Constants ¶
const ( ListHandlerName = "docs-list" StdListHandlerName = "docs-std-list" PackageHandlerName = "docs-package" SourceHandlerName = "docs-source" )
Variables ¶
var ( PackageTemplateName = "package.html" PackagesTemplateName = "packages.html" SourceTemplateName = "source.html" )
Functions ¶
func ListHandler ¶
func PackageHandler ¶
func SourceHandler ¶
func StartUpdatingPackages ¶
func StartUpdatingPackages(ctx *doc.Environment, 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 StdListHandler ¶
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 App ¶
type App struct {
reusableapp.App
}
func (*App) Environment ¶
func (a *App) Environment() *doc.Environment