bitbrew

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2020 License: MIT Imports: 15 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrPluginNotFound  = errors.New("plugin not found")
	ErrPluginInstalled = errors.New("plugin already installed")
)
View Source
var (
	ErrFormulaNotExist = errors.New("formula does not exist")
)

Functions

This section is empty.

Types

type Bitbrew

type Bitbrew interface {
	Plugins() plugin.Plugins
	Search(ctx context.Context, q string) (plugin.Plugins, error)
	SearchByFilename(ctx context.Context, filename string) (plugin.Plugins, error)
	Load() error
	Save() error
	Install(p *plugin.Plugin) error
	Uninstall(p *plugin.Plugin) error
	Sync() (installed plugin.Plugins, uninstalled plugin.Plugins, err error)
}

Bitbrew is an interface handling BitBar plugins

func New

func New(gh github.Service, formulaPath, pluginFolder string) Bitbrew

New instantiate Bitbrew

type Client

type Client interface {
	Search(ctx context.Context, q string) (plugin.Plugins, error)
	Browse(ctx context.Context, filename string) error
	List() (plugin.Plugins, error)
	Install(filename string) (*plugin.Plugin, error)
	Uninstall(filename string) (*plugin.Plugin, error)
	Sync() (installed plugin.Plugins, uninstalled plugin.Plugins, err error)
}

Client is a client for Bitbrew

func InitClient

func InitClient(token, formulaPath, pluginFolder string) (Client, error)

func NewClient

func NewClient(b Bitbrew) Client

Jump to

Keyboard shortcuts

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