goggles

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2017 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Doc

type Doc struct {
	Type DocType `json:"type"`

	Name        string `json:"name"`
	Repository  string `json:"repository"`
	Header      string `json:"header"`
	Import      string `json:"import"`
	Declaration string `json:"declaration"`
	Usage       string `json:"usage"`

	Constants string `json:"constants"`
	Variables string `json:"variables"`
	Content   []Doc  `json:"content"`

	HasTravis bool `json:"hasTravis"`
}

Doc represents documentation for a function, type, or package.

type DocType

type DocType string

DocType defines a type of documentation.

const (
	// PackageDoc indicates package-level documentation.
	PackageDoc DocType = "PACKAGE"
	// FunctionDoc indicates function-level documentation.
	FunctionDoc DocType = "FUNCTION"
	// TypeDoc indicates type-level documentation.
	TypeDoc DocType = "TYPE"
)

type Package

type Package struct {
	depth.Pkg

	Docs *Doc `json:"docs"`
	// contains filtered or unexported fields
}

Package represents a go source package.

func NewPackage

func NewPackage(path string) (*Package, error)

NewPackage attempts to resolve a go package from the path provided.

The path can be either the absolute path (ex. /foo/bar/package) or the import path (ex. github.com/foo/bar).

type Service

type Service struct{}

Service is a pkg service that can access go packages.

func (Service) Details

func (Service) Details(name string) (*Package, error)

Details returns the full details of a Package.

func (Service) List

func (s Service) List() ([]*Package, error)

List returns a list of all packages in the $GOPATH.

Jump to

Keyboard shortcuts

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