gddo

module
v0.0.0-...-625df2a Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2014 License: BSD-3-Clause

README

This project is the source for http://godoc.org/

GoDoc

The code in this project is designed to be used by godoc.org. Send mail to golang-dev@googlegroups.com if you want to discuss other uses of the code.

Feedback

Send ideas and questions to golang-dev@googlegroups.com. Request features and report bugs using the GitHub Issue Tracker.

Contributions

Contributions to this project are welcome, though please send mail before starting work on anything major. Contributors retain their copyright, so we need you to fill out a short form before we can accept your contribution: https://developers.google.com/open-source/cla/individual

Development Environment Setup

  • Install and run Redis 2.8.x. The redis.conf file included in the Redis distribution is suitable for development.

  • Install Go 1.2.

  • Install and run the server:

      $ go get github.com/golang/gddo/gddo-server
      $ gddo-server
    
  • Go to http://localhost:8080/ in your browser

  • Enter an import path to have the server retrieve & display a package's documentation

Optional:

API

The GoDoc API is comprised of these endpoints:

api.godoc.org/search?q=Query—Returns search results for Query, in JSON format.

{
	"results": [
		{
			"path": "import/path/one",
			"synopsis": "Package synopsis is here, if present."
		},
		{
			"path": "import/path/two",
			"synopsis": "Package synopsis is here, if present."
		}
	]
}

api.godoc.org/packages—Returns all indexed packages, in JSON format.

{
	"results": [
		{
			"path": "import/path/one"
		},
		{
			"path": "import/path/two"
		},
		{
			"path": "import/path/three"
		}
	]
}

api.godoc.org/importers/ImportPath—Returns packages that import ImportPath, in JSON format. Not recursive, direct imports only.

{
	"results": [
		{
			"path": "import/path/one",
			"synopsis": "Package synopsis is here, if present."
		},
		{
			"path": "import/path/two",
			"synopsis": "Package synopsis is here, if present."
		}
	]
}

api.godoc.org/imports/ImportPath—Returns packages that ImportPath imports, in JSON format. Not recursive, direct imports only.

{
	"imports": [
		{
			"path": "import/path/one",
			"synopsis": "Package synopsis is here, if present."
		},
		{
			"path": "import/path/two",
			"synopsis": "Package synopsis is here, if present."
		}
	],
	"testImports": [
		{
			"path": "import/path/three",
			"synopsis": "Package synopsis is here, if present."
		}
	]
}

A plain text interface is documented at http://godoc.org/-/about.

Directories

Path Synopsis
Package database manages storage for GoPkgDoc.
Package database manages storage for GoPkgDoc.
Package doc fetches Go package documentation from version control services.
Package doc fetches Go package documentation from version control services.
Command gddo-admin is the GoDoc.org command line administration tool.
Command gddo-admin is the GoDoc.org command line administration tool.
Command gddo-server is the GoPkgDoc server.
Command gddo-server is the GoPkgDoc server.
Package gosrc fetches Go package source code from version control services.
Package gosrc fetches Go package source code from version control services.
Package htputil is a toolkit for the Go net/http package.
Package htputil is a toolkit for the Go net/http package.
header
Package header provides functions for parsing HTTP headers.
Package header provides functions for parsing HTTP headers.

Jump to

Keyboard shortcuts

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