project

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: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddKeyPairToProject

func AddKeyPairToProject(db database.QueryExecuter, proj *sdk.Project, keyname string) error

AddKeyPairToProject generate a ssh key pair and add them as project variables

func CheckVariableInProject

func CheckVariableInProject(db database.Querier, projectID int64, varName string) (bool, error)

CheckVariableInProject check if the variable is already in the project or not

func CreateAudit

func CreateAudit(db database.QueryExecuter, proj *sdk.Project, u *sdk.User) error

CreateAudit Create variable audit for the given project

func DeleteAllVariableFromProject

func DeleteAllVariableFromProject(db database.Executer, projectID int64) error

DeleteAllVariableFromProject Delete all variables from the given project

func DeleteProject

func DeleteProject(db database.QueryExecuter, key string) error

DeleteProject removes given project from database (project and project_group table) DeleteProject also removes all pipelines inside project (pipeline and pipeline_group table).

func DeleteVariableFromProject

func DeleteVariableFromProject(db database.QueryExecuter, proj *sdk.Project, variableName string) error

DeleteVariableFromProject Delete a variable from the given project

func Exist

func Exist(db database.Querier, projectKey string) (bool, error)

Exist checks whether a project exists or not

func GetAllVariableInProject

func GetAllVariableInProject(db database.Querier, projectID int64, args ...GetAllVariableFuncArg) ([]sdk.Variable, error)

GetAllVariableInProject Get all variable for the given project

func GetAllVariableNameInProjectByKey

func GetAllVariableNameInProjectByKey(db database.Querier, projectKey string) ([]string, error)

GetAllVariableNameInProjectByKey Get all variable for the given project

func GetAudit

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

GetAudit retrieve the current project variable audit

func GetVariableAudit

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

GetVariableAudit Get variable audit for the given project

func GetVariableInProject

func GetVariableInProject(db database.Querier, projectID int64, variableName string) (*sdk.Variable, error)

GetVariableInProject get the variable information for the given project

func InsertProject

func InsertProject(db database.QueryExecuter, p *sdk.Project) error

InsertProject insert given project into given database

func InsertVariableInProject

func InsertVariableInProject(db database.QueryExecuter, proj *sdk.Project, variable sdk.Variable) error

InsertVariableInProject Insert a new variable in the given project

func LastUpdates

func LastUpdates(db database.Querier, user *sdk.User, since time.Time) ([]sdk.ProjectLastUpdates, error)

LastUpdates returns projects and application last update

func LoadAllProjects

func LoadAllProjects(db database.Querier) ([]*sdk.Project, error)

LoadAllProjects load all projects from database

func LoadProject

func LoadProject(db database.Querier, key string, user *sdk.User, mods ...Mod) (*sdk.Project, error)

LoadProject loads an project from database

func LoadProjectAndPipelineByPipelineActionID

func LoadProjectAndPipelineByPipelineActionID(db database.Querier, pipelineActionID int64) (sdk.Project, sdk.Pipeline, error)

LoadProjectAndPipelineByPipelineActionID load project and pipeline by pipeline_action_id

func LoadProjectByGroup

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

LoadProjectByGroup loads all projects where group has access

func LoadProjectByPipelineID

func LoadProjectByPipelineID(db database.Querier, pipelineID int64) (*sdk.Project, error)

LoadProjectByPipelineID loads an project from pipeline iD

func LoadProjects

func LoadProjects(db database.Querier, user *sdk.User) ([]*sdk.Project, error)

LoadProjects load all projects from database

func UpdateProjectDB

func UpdateProjectDB(db database.Querier, projectKey, projectName string) (time.Time, error)

UpdateProjectDB set new project name in database

func UpdateVariableInProject

func UpdateVariableInProject(db database.QueryExecuter, proj *sdk.Project, variable sdk.Variable) error

UpdateVariableInProject Update a variable in the given project

Types

type GetAllVariableFuncArg

type GetAllVariableFuncArg func(args *structarg)

GetAllVariableFuncArg defines the base type for functional argument of GetAllVariable

func WithClearPassword

func WithClearPassword() GetAllVariableFuncArg

WithClearPassword is a function argument to GetAllVariableInProject

func WithEncryptPassword

func WithEncryptPassword() GetAllVariableFuncArg

WithEncryptPassword is a function argument to GetAllVariableInProject.

type Mod

type Mod func(c *funcpar)

Mod is the type of all functionnal parameters

func WithApplications

func WithApplications(historylength int) Mod

WithApplications is a functionnal parameter usable in LoadProject

func WithVariables

func WithVariables() Mod

WithVariables is a functionnal parameter usable in LoadProject

Jump to

Keyboard shortcuts

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