Documentation ¶
Index ¶
- func AddKeyPairToProject(db database.QueryExecuter, proj *sdk.Project, keyname string) error
- func CheckVariableInProject(db database.Querier, projectID int64, varName string) (bool, error)
- func CreateAudit(db database.QueryExecuter, proj *sdk.Project, u *sdk.User) error
- func DeleteAllVariableFromProject(db database.Executer, projectID int64) error
- func DeleteProject(db database.QueryExecuter, key string) error
- func DeleteVariableFromProject(db database.QueryExecuter, proj *sdk.Project, variableName string) error
- func Exist(db database.Querier, projectKey string) (bool, error)
- func GetAllVariableInProject(db database.Querier, projectID int64, args ...GetAllVariableFuncArg) ([]sdk.Variable, error)
- func GetAllVariableNameInProjectByKey(db database.Querier, projectKey string) ([]string, error)
- func GetAudit(db database.Querier, key string, auditID int64) ([]sdk.Variable, error)
- func GetVariableAudit(db database.Querier, key string) ([]sdk.VariableAudit, error)
- func GetVariableInProject(db database.Querier, projectID int64, variableName string) (*sdk.Variable, error)
- func InsertProject(db database.QueryExecuter, p *sdk.Project) error
- func InsertVariableInProject(db database.QueryExecuter, proj *sdk.Project, variable sdk.Variable) error
- func LastUpdates(db database.Querier, user *sdk.User, since time.Time) ([]sdk.ProjectLastUpdates, error)
- func LoadAllProjects(db database.Querier) ([]*sdk.Project, error)
- func LoadProject(db database.Querier, key string, user *sdk.User, mods ...Mod) (*sdk.Project, error)
- func LoadProjectAndPipelineByPipelineActionID(db database.Querier, pipelineActionID int64) (sdk.Project, sdk.Pipeline, error)
- func LoadProjectByGroup(db database.Querier, group *sdk.Group) error
- func LoadProjectByPipelineID(db database.Querier, pipelineID int64) (*sdk.Project, error)
- func LoadProjects(db database.Querier, user *sdk.User) ([]*sdk.Project, error)
- func UpdateProjectDB(db database.Querier, projectKey, projectName string) (time.Time, error)
- func UpdateVariableInProject(db database.QueryExecuter, proj *sdk.Project, variable sdk.Variable) error
- type GetAllVariableFuncArg
- type Mod
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddKeyPairToProject ¶
AddKeyPairToProject generate a ssh key pair and add them as project variables
func CheckVariableInProject ¶
CheckVariableInProject check if the variable is already in the project or not
func CreateAudit ¶
CreateAudit Create variable audit for the given project
func DeleteAllVariableFromProject ¶
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 GetAllVariableInProject ¶
func GetAllVariableInProject(db database.Querier, projectID int64, args ...GetAllVariableFuncArg) ([]sdk.Variable, error)
GetAllVariableInProject Get all variable for the given project
func GetAllVariableNameInProjectByKey ¶
GetAllVariableNameInProjectByKey Get all variable for the given project
func GetVariableAudit ¶
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 ¶
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 ¶
LoadProjectByGroup loads all projects where group has access
func LoadProjectByPipelineID ¶
LoadProjectByPipelineID loads an project from pipeline iD
func LoadProjects ¶
LoadProjects load all projects from database
func UpdateProjectDB ¶
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 ¶
WithApplications is a functionnal parameter usable in LoadProject
func WithVariables ¶
func WithVariables() Mod
WithVariables is a functionnal parameter usable in LoadProject