Documentation ¶
Index ¶
- Constants
- func CreateHook(tx *sql.Tx, projectKey string, rm *sdk.RepositoriesManager, ...) (*sdk.Hook, error)
- func DeleteBranchBuilds(db *sql.DB, hooks []sdk.Hook, branch string) error
- func DeleteHook(db database.QueryExecuter, id int64) error
- func FindHook(db database.Querier, applicationID, pipelineID int64, ...) (sdk.Hook, error)
- func InsertHook(db database.QueryExecuter, h *sdk.Hook) error
- func InsertReceivedHook(db *sql.DB, link string, data string) error
- func LoadApplicationHooks(db database.Querier, applicationID int64) ([]sdk.Hook, error)
- func LoadHook(db *sql.DB, id int64) (sdk.Hook, error)
- func LoadHooks(db *sql.DB, project string, repository string) ([]sdk.Hook, error)
- func LoadPipelineHooks(db *sql.DB, pipelineID int64, applicationID int64) ([]sdk.Hook, error)
- func Recovery(h ReceivedHook, err error)
- func TriggerPipeline(tx *sql.Tx, h sdk.Hook, branch string, hash string, author string, ...) (bool, error)
- func UpdateHook(db *sql.DB, h sdk.Hook) error
- type ReceivedHook
Constants ¶
View Source
const HookLink = "" /* 127-byte string literal not displayed */
HookLink format in stash/bitbucket
Variables ¶
This section is empty.
Functions ¶
func CreateHook ¶
func CreateHook(tx *sql.Tx, projectKey string, rm *sdk.RepositoriesManager, repoFullName string, application *sdk.Application, pipeline *sdk.Pipeline) (*sdk.Hook, error)
CreateHook in CDS db + repo manager webhook
func DeleteBranchBuilds ¶
DeleteBranchBuilds deletes all builds related to given branch in given applications in pipeline_build and pipeline_history
func DeleteHook ¶
func DeleteHook(db database.QueryExecuter, id int64) error
DeleteHook removes hook from database
func FindHook ¶
func FindHook(db database.Querier, applicationID, pipelineID int64, kind, host, project, repository string) (sdk.Hook, error)
FindHook loads a hook from its attributes
func InsertHook ¶
func InsertHook(db database.QueryExecuter, h *sdk.Hook) error
InsertHook add link between git repository and pipeline in database
func InsertReceivedHook ¶
InsertReceivedHook insert raw data received from public handler in database
func LoadApplicationHooks ¶
LoadApplicationHooks will load all hooks related to given application
func LoadPipelineHooks ¶
LoadPipelineHooks will load all hooks related to given pipeline
func Recovery ¶
func Recovery(h ReceivedHook, err error)
Recovery try to recovers hook in case of error
Types ¶
Click to show internal directories.
Click to hide internal directories.