Documentation
¶
Index ¶
- Constants
- func AddPluginRoute(route PluginRoute) error
- func CheckForNewVersion(plugin Plugin) (string, error)
- func CreateAndAddPluginRoute(plugin Plugin, source, version string) error
- func DeletePlugin(name string) error
- func DeletePluginRoute(name string) error
- func GetPluginBinDir(name string) string
- func GetPluginDataDir(name string) string
- func GetPluginDefinitionPath(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 GitCloneAndCheckoutVersionOrLatestVersion(cloneIntoDir, repositoryURL, checkoutVersion string) (string, error)
- func GitVersionTags(gitRepoDir string) ([]*ver.Version, error)
- func InitPaths() error
- func ParseArgs(args []string) (string, []string, bool)
- func PrintPluginUpdateInfos(newVersion string, plugin Plugin)
- 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 ByVersion
- type ExecutableModel
- type Plugin
- type PluginInfoModel
- type PluginInfos
- type PluginInput
- type PluginMode
- type PluginRoute
- type PluginRouting
- type Requirement
- type TriggerEventName
Constants ¶
View Source
const ( // TypeGeneric ... TypeGeneric = "_" // TypeInit ... TypeInit = "init" // TypeRun .... TypeRun = "run" )
View Source
const ( // PluginInputPayloadKey ... PluginInputPayloadKey = "BITRISE_PLUGIN_INPUT_PAYLOAD" // PluginInputBitriseVersionKey ... PluginInputBitriseVersionKey = "BITRISE_PLUGIN_INPUT_BITRISE_VERSION" // PluginInputTriggerEventKey ... PluginInputTriggerEventKey = "BITRISE_PLUGIN_INPUT_TRIGGER" // PluginInputPluginModeKey ... PluginInputPluginModeKey = "BITRISE_PLUGIN_INPUT_PLUGIN_MODE" // PluginInputDataDirKey ... PluginInputDataDirKey = "BITRISE_PLUGIN_INPUT_DATA_DIR" // PluginInputFormatVersionKey ... PluginInputFormatVersionKey = "BITRISE_PLUGIN_INPUT_FORMAT_VERSION" // PluginOutputEnvKey ... PluginOutputEnvKey = "BITRISE_PLUGIN_OUTPUT" )
Variables ¶
This section is empty.
Functions ¶
func CheckForNewVersion ¶
CheckForNewVersion ...
func CreateAndAddPluginRoute ¶
CreateAndAddPluginRoute ...
func GetPluginDefinitionPath ¶
GetPluginDefinitionPath ...
func GetPluginExecutablePath ¶
GetPluginExecutablePath ...
func GetPluginVersion ¶
GetPluginVersion ...
func GitCloneAndCheckoutVersionOrLatestVersion ¶
func GitCloneAndCheckoutVersionOrLatestVersion(cloneIntoDir, repositoryURL, checkoutVersion string) (string, error)
GitCloneAndCheckoutVersionOrLatestVersion ...
func GitVersionTags ¶
GitVersionTags ...
func PrintPluginUpdateInfos ¶
PrintPluginUpdateInfos ...
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 ExecutableModel ¶
type ExecutableModel struct { OSX string `yaml:"osx,omitempty"` Linux string `yaml:"linux,omitempty"` }
ExecutableModel ...
type Plugin ¶
type Plugin struct { Name string `yaml:"name,omitempty"` Description string `yaml:"description,omitempty"` Executable ExecutableModel `yaml:"executable,omitempty"` TriggerEvent string `yaml:"trigger,omitempty"` Requirements []Requirement `yaml:"requirements,omitempty"` }
Plugin ...
func InstallPlugin ¶
InstallPlugin ...
func ParsePluginFromYML ¶
ParsePluginFromYML ...
type PluginInfoModel ¶
type PluginInfoModel struct { Name string `json:"name,omitempty"` Version string `json:"version,omitempty"` Source string `json:"source,omitempty"` Plugin Plugin `json:"plugin,omitempty"` DefinitionPth string `json:"definition_pth,omitempty"` }
PluginInfoModel ...
type PluginMode ¶
type PluginMode string
PluginMode ...
const ( // TriggerMode ... TriggerMode PluginMode = "trigger" // CommandMode ... CommandMode PluginMode = "command" )
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, 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.