application

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2017 License: BSD-3-Clause Imports: 22 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 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

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 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.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 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 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

func IsAttached(db database.Querier, projectID, appID int64, pipelineName string) (bool, error)

IsAttached checks if an application is attach to a pipeline given its name

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, 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

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 LoadGroupByApplication

func LoadGroupByApplication(db database.Querier, application *sdk.Application) error

LoadGroupByApplication loads all the groups on 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 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

Jump to

Keyboard shortcuts

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