Documentation ¶
Index ¶
- Constants
- Variables
- func AddKeyPairToApplication(db database.QueryExecuter, app *sdk.Application, keyname string) error
- func AttachPipeline(db database.Executer, appID, pipelineID int64) error
- func CountApplicationByProject(db database.Querier, projectID int64) (int, error)
- func CountPipeline(db database.Querier, pipelineID int64) (bool, error)
- func CreateAudit(db database.QueryExecuter, key string, app *sdk.Application, u *sdk.User) error
- func DeleteAllApplicationPipeline(db database.Executer, applicationID int64) error
- func DeleteAllVariable(db database.Executer, applicationID int64) error
- func DeleteApplication(db *sql.Tx, applicationID int64) error
- func DeleteVariable(db database.QueryExecuter, app *sdk.Application, variableName string) error
- func GetAllPipelineParam(db database.Querier, applicationID, pipelineID int64) ([]sdk.Parameter, error)
- func GetAllPipelines(db database.Querier, projectKey, applicationName string) ([]sdk.Pipeline, error)
- func GetAllPipelinesByID(db database.Querier, applicationID int64) ([]sdk.ApplicationPipeline, error)
- func GetAllVariable(db database.Querier, key, appName string, args ...FuncArg) ([]sdk.Variable, error)
- func GetAllVariableByID(db database.Querier, applicationID int64, fargs ...FuncArg) ([]sdk.Variable, error)
- func GetAudit(db database.Querier, key, appName string, auditID int64) ([]sdk.Variable, error)
- func GetVariableAudit(db database.Querier, key, appName string) ([]sdk.VariableAudit, error)
- func Import(db database.QueryExecuter, proj *sdk.Project, app *sdk.Application, ...) error
- func ImportPipelines(db database.QueryExecuter, proj *sdk.Project, app *sdk.Application, ...) error
- func InsertApplication(db database.QueryExecuter, project *sdk.Project, app *sdk.Application) error
- func InsertVariable(db database.QueryExecuter, app *sdk.Application, variable sdk.Variable) error
- func IsAttached(db database.Querier, projectID, appID int64, pipelineName string) (bool, error)
- func LoadApplicationByGroup(db database.Querier, group *sdk.Group) error
- func LoadApplicationByID(db database.Querier, applicationID int64, fargs ...FuncArg) (*sdk.Application, error)
- func LoadApplicationByName(db database.Querier, projectKey, appName string, fargs ...FuncArg) (*sdk.Application, error)
- func LoadApplicationByPipeline(db database.Querier, pipelineID int64) ([]sdk.Application, error)
- func LoadApplications(db database.Querier, projectKey string, allpipelines bool, user *sdk.User) ([]sdk.Application, error)
- func LoadCDTree(db *sql.DB, projectkey, appName string, user *sdk.User) ([]sdk.CDPipeline, error)
- func LoadGroupByApplication(db database.Querier, application *sdk.Application) error
- func LoadVariable(db database.Querier, appID int64, varName string) (sdk.Variable, error)
- func PipelineAttached(db *sql.DB, appID, pipID int64) (bool, error)
- func RemovePipeline(db *sql.Tx, key, appName, pipelineName string) error
- func TriggerPipeline(tx *sql.Tx, h sdk.Hook, branch string, hash string, author string, ...) (bool, error)
- func UpdateApplication(db database.QueryExecuter, application *sdk.Application) error
- func UpdateLastModified(db database.QueryExecuter, app *sdk.Application) error
- func UpdatePipelineApplication(db database.QueryExecuter, app *sdk.Application, pipelineID int64, ...) error
- func UpdatePipelineApplicationString(db database.QueryExecuter, app *sdk.Application, pipelineID int64, data string) error
- func UpdateVariable(db database.QueryExecuter, app *sdk.Application, variable sdk.Variable) error
- type FuncArg
Constants ¶
const LoadApplicationsRequestAdmin = `` /* 652-byte string literal not displayed */
LoadApplicationsRequestAdmin defines the query to load all applications in a project with its activity
const LoadApplicationsRequestNormalUser = `` /* 833-byte string literal not displayed */
LoadApplicationsRequestNormalUser defines the query to load all applications in a project with its activity
Variables ¶
var ( // ErrNoVariable when request requires specific variable in the applicatoin ErrNoVariable = fmt.Errorf("variable not in the application") )
Functions ¶
func AddKeyPairToApplication ¶
func AddKeyPairToApplication(db database.QueryExecuter, app *sdk.Application, keyname string) error
AddKeyPairToApplication generate a ssh key pair and add them as application variables
func AttachPipeline ¶
AttachPipeline Attach a pipeline to an application
func CountApplicationByProject ¶
CountApplicationByProject Count the number of applications in the given project
func CountPipeline ¶
CountPipeline Count the number of application that use the given pipeline
func CreateAudit ¶
func CreateAudit(db database.QueryExecuter, key string, app *sdk.Application, u *sdk.User) error
CreateAudit Create variable audit for the given application
func DeleteAllApplicationPipeline ¶
DeleteAllApplicationPipeline Detach all pipeline
func DeleteAllVariable ¶
DeleteAllVariable Delete all variables from the given pipeline
func DeleteApplication ¶
DeleteApplication Delete the given application
func DeleteVariable ¶
func DeleteVariable(db database.QueryExecuter, app *sdk.Application, variableName string) error
DeleteVariable Delete a variable from the given pipeline
func GetAllPipelineParam ¶
func GetAllPipelineParam(db database.Querier, applicationID, pipelineID int64) ([]sdk.Parameter, error)
GetAllPipelineParam Get all the pipeline parameters func GetAllPipelineParam(db database.Querier, applicationID, pipelineID int64, fargs ...FuncArg) ([]sdk.Parameter, error) {
func GetAllPipelines ¶
func GetAllPipelines(db database.Querier, projectKey, applicationName string) ([]sdk.Pipeline, error)
GetAllPipelines Get all pipelines for the given application
func GetAllPipelinesByID ¶
func GetAllPipelinesByID(db database.Querier, applicationID int64) ([]sdk.ApplicationPipeline, error)
GetAllPipelinesByID Get all pipelines for the given application
func GetAllVariable ¶
func GetAllVariable(db database.Querier, key, appName string, args ...FuncArg) ([]sdk.Variable, error)
GetAllVariable Get all variable for the given application
func GetAllVariableByID ¶
func GetAllVariableByID(db database.Querier, applicationID int64, fargs ...FuncArg) ([]sdk.Variable, error)
GetAllVariableByID Get all variable for the given application
func GetVariableAudit ¶
GetVariableAudit Get variable audit for the given application
func Import ¶
func Import(db database.QueryExecuter, proj *sdk.Project, app *sdk.Application, repomanager *sdk.RepositoriesManager, user *sdk.User, msgChan chan<- msg.Message) error
Import is able to create a new application and all its components
func ImportPipelines ¶
func ImportPipelines(db database.QueryExecuter, proj *sdk.Project, app *sdk.Application, msgChan chan<- msg.Message) error
ImportPipelines is able to create pipelines on an existing application
func InsertApplication ¶
func InsertApplication(db database.QueryExecuter, project *sdk.Project, app *sdk.Application) error
InsertApplication Insert new application
func InsertVariable ¶
func InsertVariable(db database.QueryExecuter, app *sdk.Application, variable sdk.Variable) error
InsertVariable Insert a new variable in the given application
func IsAttached ¶
IsAttached checks if an application is attach to a pipeline given its name
func LoadApplicationByGroup ¶
LoadApplicationByGroup loads all applications where group has access
func LoadApplicationByID ¶
func LoadApplicationByID(db database.Querier, applicationID int64, fargs ...FuncArg) (*sdk.Application, error)
LoadApplicationByID load the given application
func LoadApplicationByName ¶
func LoadApplicationByName(db database.Querier, projectKey, appName string, fargs ...FuncArg) (*sdk.Application, error)
LoadApplicationByName load the given application
func LoadApplicationByPipeline ¶
LoadApplicationByPipeline Load application where pipeline is attached
func LoadApplications ¶
func LoadApplications(db database.Querier, projectKey string, allpipelines bool, user *sdk.User) ([]sdk.Application, error)
LoadApplications load all application from the given project
func LoadCDTree ¶
LoadCDTree Load the continuous delivery pipeline tree for the given application
func LoadGroupByApplication ¶
func LoadGroupByApplication(db database.Querier, application *sdk.Application) error
LoadGroupByApplication loads all the groups on the given application
func LoadVariable ¶
LoadVariable retrieve a specific variable
func PipelineAttached ¶
PipelineAttached checks wether a pipeline is attached to given application
func RemovePipeline ¶
RemovePipeline Remove a pipeline from the application
func TriggerPipeline ¶
func TriggerPipeline(tx *sql.Tx, h sdk.Hook, branch string, hash string, author string, p *sdk.Pipeline, projectData *sdk.Project) (bool, error)
TriggerPipeline linked to received hook
func UpdateApplication ¶
func UpdateApplication(db database.QueryExecuter, application *sdk.Application) error
UpdateApplication Update an application
func UpdateLastModified ¶
func UpdateLastModified(db database.QueryExecuter, app *sdk.Application) error
UpdateLastModified Update last_modified column in application table
func UpdatePipelineApplication ¶
func UpdatePipelineApplication(db database.QueryExecuter, app *sdk.Application, pipelineID int64, params []sdk.Parameter) error
UpdatePipelineApplication Update arguments passed to pipeline
func UpdatePipelineApplicationString ¶
func UpdatePipelineApplicationString(db database.QueryExecuter, app *sdk.Application, pipelineID int64, data string) error
UpdatePipelineApplicationString Update application pipeline parameters
func UpdateVariable ¶
func UpdateVariable(db database.QueryExecuter, app *sdk.Application, variable sdk.Variable) error
UpdateVariable Update a variable in the given application
Types ¶
type FuncArg ¶
type FuncArg func(args *structarg)
FuncArg defines the base type for functional argument of application helpers
func WithClearPassword ¶
func WithClearPassword() FuncArg
WithClearPassword is a function argument to GetAllVariable
func WithEncryptPassword ¶
func WithEncryptPassword() FuncArg
WithEncryptPassword is a function argument to GetAllVariable to get secret encrypted