Documentation
¶
Index ¶
- Constants
- func AddPluginRoute(route PluginRoute) error
- func CheckForNewVersion(plugin Plugin) (string, error)
- func CreateAndAddPluginRoute(name, source, executable, version, commitHash, triggerEvent string) error
- func DeletePlugin(name string) error
- func DeletePluginRoute(name string) error
- func GetPluginBinDir(name string) string
- func GetPluginDataDir(name string) string
- func GetPluginDir(name string) string
- func GetPluginExecutablePath(name string) (string, bool, error)
- func GetPluginSrcDir(name string) string
- func GetPluginVersion(name string) (*ver.Version, error)
- func GetPluginYMLPath(name string) string
- func GitCloneAndCheckoutVersion(cloneIntoDir, repositoryURL, checkoutVersion string) (*ver.Version, string, error)
- func GitVersionTags(gitRepoDir string) ([]ver.Version, error)
- func InitPaths() error
- func ParseArgs(args []string) (string, []string, bool)
- func RunPluginByCommand(plugin Plugin, args []string) error
- func RunPluginByEvent(plugin Plugin, pluginInput PluginInput) error
- func SortByName(plugins []Plugin)
- func TriggerEvent(name TriggerEventName, payload interface{}) error
- type Plugin
- func InstallPlugin(srcURL, binURL, versionTag string) (Plugin, string, error)
- func InstalledPluginList() ([]Plugin, error)
- func LoadPlugin(name string) (Plugin, bool, error)
- func LoadPlugins(eventName string) ([]Plugin, error)
- func NewPluginFromBytes(bytes []byte) (plugin Plugin, err error)
- func NewPluginFromYML(ymlPth string) (Plugin, error)
- type PluginInput
- type PluginMode
- type PluginRoute
- type PluginRouting
- type Requirement
- type TriggerEventName
Constants ¶
View Source
const ( // TypeGeneric ... TypeGeneric = "_" // TypeInit ... TypeInit = "init" // TypeRun .... TypeRun = "run" )
Variables ¶
This section is empty.
Functions ¶
func CheckForNewVersion ¶
CheckForNewVersion ...
func CreateAndAddPluginRoute ¶
func CreateAndAddPluginRoute(name, source, executable, version, commitHash, triggerEvent string) error
CreateAndAddPluginRoute ...
func GetPluginExecutablePath ¶
GetPluginExecutablePath ...
func GetPluginVersion ¶
GetPluginVersion ...
func GitCloneAndCheckoutVersion ¶
func GitCloneAndCheckoutVersion(cloneIntoDir, repositoryURL, checkoutVersion string) (*ver.Version, string, error)
GitCloneAndCheckoutVersion ...
func GitVersionTags ¶
GitVersionTags ...
func RunPluginByCommand ¶
RunPluginByCommand ...
func RunPluginByEvent ¶
func RunPluginByEvent(plugin Plugin, pluginInput PluginInput) error
RunPluginByEvent ...
func TriggerEvent ¶
func TriggerEvent(name TriggerEventName, payload interface{}) error
TriggerEvent ...
Types ¶
type Plugin ¶
type Plugin struct { Name string `yaml:"name"` Description string `yaml:"description"` Executable struct { OSX string `yaml:"osx"` Linux string `yaml:"linux"` } TriggerEvent string `yaml:"trigger"` Requirements []Requirement `yaml:"requirements"` }
Plugin ...
func InstallPlugin ¶
InstallPlugin ...
func NewPluginFromBytes ¶
NewPluginFromBytes ...
type PluginRoute ¶
type PluginRoute struct { Name string `yaml:"name"` Source string `yaml:"source"` Version string `yaml:"version"` CommitHash string `yaml:"commit_hash"` Executable string `yaml:"executable"` TriggerEvent string `yaml:"trigger"` LatestAvailableVersion string `yaml:"latest_available_version"` }
PluginRoute ...
func NewPluginRoute ¶
func NewPluginRoute(name, source, executable, version, commitHash, triggerEvent string) (PluginRoute, error)
NewPluginRoute ...
func ReadPluginRoute ¶
func ReadPluginRoute(name string) (PluginRoute, bool, error)
ReadPluginRoute ...
type PluginRouting ¶
type PluginRouting struct {
RouteMap map[string]PluginRoute `yaml:"route_map"`
}
PluginRouting ...
func NewPluginRoutingFromBytes ¶
func NewPluginRoutingFromBytes(bytes []byte) (PluginRouting, error)
NewPluginRoutingFromBytes ...
func NewPluginRoutingFromYMLOrEmpty ¶
func NewPluginRoutingFromYMLOrEmpty(ymlPth string) (PluginRouting, error)
NewPluginRoutingFromYMLOrEmpty ...
func (*PluginRouting) AddRoute ¶
func (routing *PluginRouting) AddRoute(route PluginRoute)
AddRoute ...
func (*PluginRouting) DeleteRoute ¶
func (routing *PluginRouting) DeleteRoute(routeName string)
DeleteRoute ...
type Requirement ¶
type Requirement struct { Tool string `yaml:"tool"` MinVersion string `yaml:"min_version"` MaxVersion string `yaml:"max_version"` }
Requirement ...
type TriggerEventName ¶
type TriggerEventName string
TriggerEventName ...
const ( // DidFinishRun ... DidFinishRun TriggerEventName = "DidFinishRun" )
Click to show internal directories.
Click to hide internal directories.