git

package
v0.0.0-...-900fa13 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2015 License: Apache-2.0 Imports: 16 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

View Source
const (
	GetProjectCmdName = "get_project"
	ApplyPatchCmdName = "apply_patch"
	GitPluginName     = "git"

	GitPatchPath = "patch"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type GitApplyPatchCommand

type GitApplyPatchCommand struct {
	//The root directory (locally) that the code should be checked out into.
	//Must be a valid non-blank directory name.
	Directory string
}

GitApplyPatchCommand is a command to pull a patch from the api server and apply it to the given directory using `git apply`. If there are module patch sets included in the patch, those are applied to their proper directory as well.

func (*GitApplyPatchCommand) Execute

func (self *GitApplyPatchCommand) Execute(pluginLogger plugin.Logger,
	pluginCom plugin.PluginCommunicator, conf *model.TaskConfig, stop chan bool) error

Execute pulls the task's patch and then applies it

func (GitApplyPatchCommand) GetPatch

func (self GitApplyPatchCommand) GetPatch(conf *model.TaskConfig,
	pluginCom plugin.PluginCommunicator, pluginLogger plugin.Logger) (*patch.Patch, error)

GetPatch tries to get the patch data from the server in json format, and unmarhals it into a patch struct. The GET request is attempted multiple times upon failure.

func (*GitApplyPatchCommand) Name

func (self *GitApplyPatchCommand) Name() string

func (*GitApplyPatchCommand) ParseParams

func (self *GitApplyPatchCommand) ParseParams(params map[string]interface{}) error

ParseParams reads the command's configuration and returns any errors that occur.

func (*GitApplyPatchCommand) Plugin

func (self *GitApplyPatchCommand) Plugin() string

type GitGetProjectCommand

type GitGetProjectCommand struct {
	// The root directory (locally) that the code should be checked out into.
	// Must be a valid non-blank directory name.
	Directory string
}

GitGetProjectCommand is a command that fetches source code from git for the project associated with the current task

func (*GitGetProjectCommand) Execute

func (self *GitGetProjectCommand) Execute(pluginLogger plugin.Logger,
	pluginCom plugin.PluginCommunicator,
	conf *model.TaskConfig,
	stop chan bool) error

Execute gets the source code required by the project

func (*GitGetProjectCommand) Name

func (self *GitGetProjectCommand) Name() string

func (*GitGetProjectCommand) ParseParams

func (self *GitGetProjectCommand) ParseParams(params map[string]interface{}) error

ParseParams parses the command's configuration. Fulfills the Command interface.

func (*GitGetProjectCommand) Plugin

func (self *GitGetProjectCommand) Plugin() string

type GitPlugin

type GitPlugin struct{}

GitPlugin handles fetching source code and applying patches using the git version control system.

func (*GitPlugin) Configure

func (self *GitPlugin) Configure(map[string]interface{}) error

func (*GitPlugin) GetAPIHandler

func (self *GitPlugin) GetAPIHandler() http.Handler

func (*GitPlugin) GetPanelConfig

func (self *GitPlugin) GetPanelConfig() (*plugin.PanelConfig, error)

GetPanelConfig is required to fulfill the Plugin interface. This plugin does not have any UI hooks.

func (*GitPlugin) GetUIHandler

func (self *GitPlugin) GetUIHandler() http.Handler

func (*GitPlugin) Name

func (self *GitPlugin) Name() string

Name implements Plugin Interface.

func (*GitPlugin) NewCommand

func (self *GitPlugin) NewCommand(cmdName string) (plugin.Command, error)

NewCommand returns requested commands by name. Fulfills the Plugin interface.

Jump to

Keyboard shortcuts

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