discovery

package
v1.15.0 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2018 License: GPL-3.0 Imports: 11 Imported by: 1

Documentation

Overview

Package discovery package implements helpers for clients to discover language drivers supported by Babelfish.

Index

Constants

View Source
const (
	GithubOrg = "bblfsh"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Driver

type Driver struct {
	manifest.Manifest

	Maintainers []Maintainer `json:",omitempty"`
	// contains filtered or unexported fields
}

Driver is an object describing language driver and it's repository-related information.

func OfficialDrivers

func OfficialDrivers(ctx context.Context, opt *Options) ([]Driver, error)

OfficialDrivers lists all available language drivers for Babelfish.

func (Driver) InDevelopment

func (d Driver) InDevelopment() bool

InDevelopment indicates that driver is incomplete and should only be used for development purposes.

func (Driver) IsRecommended

func (d Driver) IsRecommended() bool

IsRecommended indicates that driver is stable enough to be used in production.

func (Driver) RepositoryURL

func (d Driver) RepositoryURL() string

RepositoryURL returns Github repository URL for browsers (not git).

type Maintainer

type Maintainer struct {
	Name   string `json:",omitempty"`
	Email  string `json:",omitempty"`
	Github string `json:",omitempty"` // github handle
}

Maintainer is an information about project maintainer.

func (Maintainer) GithubURL

func (m Maintainer) GithubURL() string

GithubURL returns github profile URL.

func (Maintainer) URL

func (m Maintainer) URL() string

URL returns a contact of the maintainer (either Github profile or email link).

type Options

type Options struct {
	Organization  string // Github organization name
	NamesOnly     bool   // driver manifest will only have Language field populated
	NoMaintainers bool   // do not load maintainers list
}

Options controls how drivers are being discovered and what information is fetched for them.

Jump to

Keyboard shortcuts

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