api

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2015 License: Apache-2.0 Imports: 18 Imported by: 4

Documentation

Overview

Package api provides a union of the filetree, xrefs, and search interfaces and a command-line flag parser.

Index

Constants

View Source
const (
	// CommonDefault is the common Kythe default API specification for Flag
	CommonDefault = "https://xrefs-dot-kythe-repo.appspot.com"

	// CommonFlagUsage is the common Kythe usage description used for Flag
	CommonFlagUsage = "" /* 170-byte string literal not displayed */
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Interface

type Interface interface {
	io.Closer
	xrefs.Service
	search.Service
	filetree.Service
}

Interface is a union of the xrefs, search, and filetree interfaces.

func Flag

func Flag(name, value, usage string) *Interface

Flag defines an api Interface flag with specified name, default value, and usage description. The return value is the address of an Interface variable that stores the value of the flag.

func ParseSpec

func ParseSpec(apiSpec string) (Interface, error)

ParseSpec parses the given specification and returns an opened handle to an API Interface. The following formats are currently supported:

  • http:// URL pointed at a JSON web API
  • https:// URL pointed at a JSON web API
  • host:port pointed at a GRPC API
  • local path to a LevelDB serving table

Jump to

Keyboard shortcuts

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