Documentation
¶
Index ¶
- Constants
- Variables
- 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 CreateFromWizard(db database.QueryExecuter, app *sdk.Application, p *sdk.Project) 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.Executer, applicationID int64, 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 InsertApplication(db database.QueryExecuter, project *sdk.Project, app *sdk.Application) error
- func InsertVariable(db database.Executer, applicationID int64, variable sdk.Variable) error
- func LoadApplicationByGroup(db database.Querier, group *sdk.Group) error
- func LoadApplicationByID(db database.Querier, applicationID int64) (*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 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 UpdateApplication(db database.Executer, application *sdk.Application) error
- func UpdateLastModified(db database.Executer, applicationID int64) error
- func UpdatePipelineApplication(db database.Executer, applicationID, pipelineID int64, params []sdk.Parameter) error
- func UpdatePipelineApplicationString(db database.Executer, applicationID, pipelineID int64, data string) error
- func UpdateVariable(db database.Executer, applicationID int64, 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 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 CreateFromWizard ¶
func CreateFromWizard(db database.QueryExecuter, app *sdk.Application, p *sdk.Project) error
CreateFromWizard Create an application, add its variables and add project's groups access
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 ¶
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 InsertApplication ¶
func InsertApplication(db database.QueryExecuter, project *sdk.Project, app *sdk.Application) error
InsertApplication Insert new application
func InsertVariable ¶
InsertVariable Insert a new variable in the given application
func LoadApplicationByGroup ¶
LoadApplicationByGroup loads all applications where group has access
func LoadApplicationByID ¶
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 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 UpdateApplication ¶
func UpdateApplication(db database.Executer, application *sdk.Application) error
UpdateApplication Update an application
func UpdateLastModified ¶
UpdateLastModified Update last_modified column in application table
func UpdatePipelineApplication ¶
func UpdatePipelineApplication(db database.Executer, applicationID, pipelineID int64, params []sdk.Parameter) error
UpdatePipelineApplication Update arguments passed to pipeline
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