environment

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddKeyPairToEnvironment

func AddKeyPairToEnvironment(db database.QueryExecuter, envID int64, keyname string) error

AddKeyPairToEnvironment generate a ssh key pair and add them as env variables

func CheckDefaultEnv

func CheckDefaultEnv(db database.Querier) error

CheckDefaultEnv create default env if not exists

func CreateAudit

func CreateAudit(db database.QueryExecuter, key string, env *sdk.Environment, u *sdk.User) error

CreateAudit Create environment variable audit for the given project

func DeleteAllEnvironment

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

DeleteAllEnvironment Delete all environment attached to the given project

func DeleteAllVariable

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

DeleteAllVariable Delete all variables from the given pipeline

func DeleteEnvironment

func DeleteEnvironment(db *sql.Tx, environmentID int64) error

DeleteEnvironment Delete the given environment

func DeleteVariable

func DeleteVariable(db database.Executer, envID int64, variableName string) error

DeleteVariable Delete a variable from the given pipeline

func Exists

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

Exists checks if an environment already exists on the project

func GetAllVariable

func GetAllVariable(db database.Querier, key, envName string, args ...GetAllVariableFuncArg) ([]sdk.Variable, error)

GetAllVariable Get all variable for the given environment

func GetAllVariableByID

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

GetAllVariableByID Get all variable for the given environment

func GetAllVariableNameByProject

func GetAllVariableNameByProject(db database.Querier, key string) ([]string, error)

GetAllVariableNameByProject Get all variable from all environment

func GetAudit

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

GetAudit retrieve the current environment variable audit

func GetEnvironmentAudit

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

GetEnvironmentAudit Get environment audit for the given project

func GetVariable

func GetVariable(db database.Querier, key, envName string, varName string, args ...GetAllVariableFuncArg) (sdk.Variable, error)

GetVariable Get a variable for the given environment

func Import

func Import(db database.QueryExecuter, proj *sdk.Project, env *sdk.Environment, msgChan chan<- msg.Message) error

Import import or reuser the provided environment

func InsertEnvironment

func InsertEnvironment(db database.Querier, env *sdk.Environment) error

InsertEnvironment Insert new environment

func InsertVariable

func InsertVariable(db database.QueryExecuter, environmentID int64, variable *sdk.Variable) error

InsertVariable Insert a new variable in the given environment

func LoadEnvironmentByGroup

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

LoadEnvironmentByGroup loads all environments where group has access

func LoadEnvironmentByID

func LoadEnvironmentByID(db database.Querier, ID int64) (*sdk.Environment, error)

LoadEnvironmentByID load the given environment

func LoadEnvironmentByName

func LoadEnvironmentByName(db database.Querier, projectKey, envName string) (*sdk.Environment, error)

LoadEnvironmentByName load the given environment

func LoadEnvironments

func LoadEnvironments(db database.Querier, projectKey string, loadDeps bool, user *sdk.User) ([]sdk.Environment, error)

LoadEnvironments load all environment from the given project

func UpdateEnvironment

func UpdateEnvironment(db database.QueryExecuter, environment *sdk.Environment) error

UpdateEnvironment Update an environment

func UpdateVariable

func UpdateVariable(db database.Executer, envID int64, variable sdk.Variable) error

UpdateVariable Update a variable in the given environment

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 GetAllVariable

func WithEncryptPassword

func WithEncryptPassword() GetAllVariableFuncArg

WithEncryptPassword is a function argument to GetAllVariable

Jump to

Keyboard shortcuts

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