application

package
v0.0.0-...-a57a29f Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2016 License: BSD-3-Clause Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const LoadApplicationsRequestAdmin = `` /* 652-byte string literal not displayed */

LoadApplicationsRequestAdmin defines the query to load all applications in a project with its activity

View Source
const LoadApplicationsRequestNormalUser = `` /* 833-byte string literal not displayed */

LoadApplicationsRequestNormalUser defines the query to load all applications in a project with its activity

Variables

View Source
var (
	// ErrNoVariable when request requires specific variable in the applicatoin
	ErrNoVariable = fmt.Errorf("variable not in the application")
)

Functions

func AttachPipeline

func AttachPipeline(db database.Executer, appID, pipelineID int64) error

AttachPipeline Attach a pipeline to an application

func CountApplicationByProject

func CountApplicationByProject(db database.Querier, projectID int64) (int, error)

CountApplicationByProject Count the number of applications in the given project

func CountPipeline

func CountPipeline(db database.Querier, pipelineID int64) (bool, error)

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

func DeleteAllApplicationPipeline(db database.Executer, applicationID int64) error

DeleteAllApplicationPipeline Detach all pipeline

func DeleteAllVariable

func DeleteAllVariable(db database.Executer, applicationID int64) error

DeleteAllVariable Delete all variables from the given pipeline

func DeleteApplication

func DeleteApplication(db *sql.Tx, applicationID int64) error

DeleteApplication Delete the given application

func DeleteVariable

func DeleteVariable(db database.Executer, applicationID int64, 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 GetAudit

func GetAudit(db database.Querier, key, appName string, auditID int64) ([]sdk.Variable, error)

GetAudit retrieve the current application variable audit

func GetVariableAudit

func GetVariableAudit(db database.Querier, key, appName string) ([]sdk.VariableAudit, error)

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

func InsertVariable(db database.Executer, applicationID int64, variable sdk.Variable) error

InsertVariable Insert a new variable in the given application

func LoadApplicationByGroup

func LoadApplicationByGroup(db database.Querier, group *sdk.Group) error

LoadApplicationByGroup loads all applications where group has access

func LoadApplicationByID

func LoadApplicationByID(db database.Querier, applicationID int64) (*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

func LoadApplicationByPipeline(db database.Querier, pipelineID int64) ([]sdk.Application, error)

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

func LoadCDTree(db *sql.DB, projectkey, appName string, user *sdk.User) (*[]sdk.CDPipeline, error)

LoadCDTree Load the continuous delivery pipeline tree for the given application

func LoadVariable

func LoadVariable(db database.Querier, appID int64, varName string) (sdk.Variable, error)

LoadVariable retrieve a specific variable

func PipelineAttached

func PipelineAttached(db *sql.DB, appID, pipID int64) (bool, error)

PipelineAttached checks wether a pipeline is attached to given application

func RemovePipeline

func RemovePipeline(db *sql.Tx, key, appName, pipelineName string) error

RemovePipeline Remove a pipeline from the application

func UpdateApplication

func UpdateApplication(db database.Executer, application *sdk.Application) error

UpdateApplication Update an application

func UpdateLastModified

func UpdateLastModified(db database.Executer, applicationID int64) error

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

func UpdatePipelineApplicationString

func UpdatePipelineApplicationString(db database.Executer, applicationID, pipelineID int64, data string) error

UpdatePipelineApplicationString Update application pipeline parameters

func UpdateVariable

func UpdateVariable(db database.Executer, applicationID int64, 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

Jump to

Keyboard shortcuts

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