package plugdeps
import "github.com/gobuffalo/buffalo/plugins/plugdeps"
Index ¶
- Variables
- func ConfigPath(app meta.App) string
- func On(app meta.App) bool
- type Command
- type Plugin
- type Plugins
Variables ¶
var ErrMissingConfig = fmt.Errorf("could not find a buffalo-plugins config file at %s", ConfigPath(meta.New(".")))
ErrMissingConfig is if config/buffalo-plugins.toml file is not found. Use plugdeps#On(app) to test if plugdeps are being used
Functions ¶
func ConfigPath ¶
ConfigPath returns the path to the config/buffalo-plugins.toml file relative to the app
func On ¶
On checks for the existence of config/buffalo-plugins.toml if this file exists its contents will be used to list plugins. If the file is not found, then the BUFFALO_PLUGIN_PATH and ./plugins folders are consulted.
Types ¶
type Command ¶
type Command struct { Name string `toml:"name" json:"name"` Flags []string `toml:"flags,omitempty" json:"flags,omitempty"` Commands []Command `toml:"command,omitempty" json:"commands,omitempty"` }
Command is the plugin command you want to control further
func (Command) String ¶
String implementation of fmt.Stringer
type Plugin ¶
type Plugin struct { Binary string `toml:"binary" json:"binary"` GoGet string `toml:"go_get,omitempty" json:"go_get,omitempty"` Local string `toml:"local,omitempty" json:"local,omitempty"` Commands []Command `toml:"command,omitempty" json:"commands,omitempty"` Tags meta.BuildTags `toml:"tags,omitempty" json:"tags,omitempty"` }
Plugin represents a Go plugin for Buffalo applications
func (Plugin) String ¶
String implementation of fmt.Stringer
type Plugins ¶
type Plugins struct {
// contains filtered or unexported fields
}
Plugins manages the config/buffalo-plugins.toml file as well as the plugins available from the file.
func List ¶
List all of the plugins the application depends on. Will return ErrMissingConfig if the app is not using config/buffalo-plugins.toml to manage their plugins. Use plugdeps#On(app) to test if plugdeps are being used.
func New ¶
func New() *Plugins
New returns a configured *Plugins value
func (*Plugins) Add ¶
Add plugin(s) to the list of dependencies
func (*Plugins) Decode ¶
Decode the list of plugins, in TOML format, from the reader
func (*Plugins) Encode ¶
Encode the list of plugins, in TOML format, to the reader
func (*Plugins) List ¶
List of dependent plugins listed in order of Plugin.String()
func (*Plugins) Remove ¶
Remove plugin(s) from the list of dependencies
Source Files ¶
command.go plugdeps.go plugin.go plugins.go pop.go
- Version
- v1.1.2 (latest)
- Published
- May 17, 2025
- Platform
- linux/amd64
- Imports
- 11 packages
- Last checked
- 1 week ago –
Tools for package owners.