sdk.v3: gopkg.in/bblfsh/sdk.v3/driver/manifest/discovery Index | Files

package discovery

import "gopkg.in/bblfsh/sdk.v3/driver/manifest/discovery"

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

The drivers discovery process uses Github API under the hood to get the most up-to-date information. This process may fail in case of Github rate limiting, and the discovery will fallback to a drivers list hosted by Babelfish project, which must be reasonably up-to-date.

It is also possible to provide Github API token by setting the GITHUB_TOKEN environment variable to prevent the rate limiting.

Index

Package Files

discovery.go

Constants

const (
    GithubOrg = "bblfsh"
)

type Driver Uses

type Driver struct {
    manifest.Manifest
    // contains filtered or unexported fields
}

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

func OfficialDrivers Uses

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

OfficialDrivers lists all available language drivers for Babelfish.

func (*Driver) LatestVersion Uses

func (d *Driver) LatestVersion(ctx context.Context) (Version, error)

LatestVersion returns a latest version of the driver. It returns an empty version if there are no releases of the driver.

func (Driver) RepositoryURL Uses

func (d Driver) RepositoryURL() string

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

func (*Driver) Versions Uses

func (d *Driver) Versions(ctx context.Context) ([]Version, error)

Versions returns a list of available driver versions sorted in descending order (first element is the latest version).

type Options Uses

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
    NoSDKVersion  bool   // do not check SDK version
    NoBuildInfo   bool   // do not load build info
    NoStatic      bool   // do not use a static manifest - discover drivers
}

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

type Version Uses

type Version = semver.Version

Version is a semantic version.

Package discovery imports 13 packages (graph). Updated 2019-08-29. Refresh now. Tools for package owners.