Documentation ¶
Index ¶
- func DeleteAllEnvironment(db gorp.SqlExecutor, projectID int64) error
- func DeleteAllEnvironmentKeys(db gorp.SqlExecutor, envID int64) error
- func DeleteAllVariables(db gorp.SqlExecutor, environmentID int64) error
- func DeleteEnvironment(db gorp.SqlExecutor, environmentID int64) error
- func DeleteEnvironmentKey(db gorp.SqlExecutor, envID int64, keyName string) error
- func DeleteVariable(db gorp.SqlExecutor, envID int64, variable *sdk.EnvironmentVariable, ...) error
- func Exists(db gorp.SqlExecutor, projectKey, envName string) (bool, error)
- func Export(ctx context.Context, db gorp.SqlExecutor, key string, envName string, ...) (exportentities.Environment, error)
- func ExportEnvironment(ctx context.Context, db gorp.SqlExecutor, env sdk.Environment, ...) (exportentities.Environment, error)
- func Import(db gorpmapper.SqlExecutorWithTx, proj sdk.Project, env *sdk.Environment, ...) error
- func ImportInto(ctx context.Context, db gorpmapper.SqlExecutorWithTx, env *sdk.Environment, ...) error
- func InsertEnvironment(db gorp.SqlExecutor, env *sdk.Environment) error
- func InsertKey(db gorpmapper.SqlExecutorWithTx, key *sdk.EnvironmentKey) error
- func InsertVariable(db gorpmapper.SqlExecutorWithTx, envID int64, v *sdk.EnvironmentVariable, ...) error
- func LoadAllByIDs(db gorp.SqlExecutor, ids []int64) ([]sdk.Environment, error)
- func LoadAllKeys(db gorp.SqlExecutor, envID int64) ([]sdk.EnvironmentKey, error)
- func LoadAllKeysForEnvsWithDecryption(ctx context.Context, db gorp.SqlExecutor, envIDS []int64) (map[int64][]sdk.EnvironmentKey, error)
- func LoadAllKeysWithPrivateContent(db gorp.SqlExecutor, envID int64) ([]sdk.EnvironmentKey, error)
- func LoadAllNames(db gorp.SqlExecutor, projID int64) (sdk.IDNames, error)
- func LoadAllNamesByFromRepository(db gorp.SqlExecutor, projID int64, fromRepository string) (sdk.IDNames, error)
- func LoadAllVariables(db gorp.SqlExecutor, envID int64) ([]sdk.EnvironmentVariable, error)
- func LoadAllVariablesForEnvsWithDecryption(ctx context.Context, db gorp.SqlExecutor, envIDS []int64) (map[int64][]sdk.EnvironmentVariable, error)
- func LoadAllVariablesWithDecrytion(db gorp.SqlExecutor, envID int64) ([]sdk.EnvironmentVariable, error)
- func LoadByWorkflowID(db gorp.SqlExecutor, workflowID int64) ([]sdk.Environment, error)
- func LoadEnvironmentByID(db gorp.SqlExecutor, ID int64) (*sdk.Environment, error)
- func LoadEnvironmentByName(db gorp.SqlExecutor, projectKey, envName string) (*sdk.Environment, error)
- func LoadEnvironments(db gorp.SqlExecutor, projectKey string) ([]sdk.Environment, error)
- func LoadKey(db gorp.SqlExecutor, id int64, keyName string) (*sdk.EnvironmentKey, error)
- func LoadVariable(db gorp.SqlExecutor, envID int64, varName string) (*sdk.EnvironmentVariable, error)
- func LoadVariableAudits(db gorp.SqlExecutor, envID, varID int64) ([]sdk.EnvironmentVariableAudit, error)
- func LoadVariableWithDecryption(db gorp.SqlExecutor, envID int64, varID int64, varName string) (*sdk.EnvironmentVariable, error)
- func Lock(db gorp.SqlExecutor, projectKey, envName string) error
- func ParseAndImport(ctx context.Context, db gorpmapper.SqlExecutorWithTx, proj sdk.Project, ...) (*sdk.Environment, []sdk.Variable, []sdk.Message, error)
- func ResetFromRepository(db gorp.SqlExecutor, projID int64, fromRepository string) error
- func UpdateEnvironment(db gorp.SqlExecutor, env *sdk.Environment) error
- func UpdateVariable(db gorpmapper.SqlExecutorWithTx, envID int64, ...) error
- type ImportOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeleteAllEnvironment ¶
func DeleteAllEnvironment(db gorp.SqlExecutor, projectID int64) error
DeleteAllEnvironment Delete all environment attached to the given project
func DeleteAllEnvironmentKeys ¶ added in v0.53.0
func DeleteAllEnvironmentKeys(db gorp.SqlExecutor, envID int64) error
DeleteAllEnvironmentKeys Delete all environment keys for the given env
func DeleteAllVariables ¶
func DeleteAllVariables(db gorp.SqlExecutor, environmentID int64) error
DeleteAllVariables Delete all variables from the given environment.
func DeleteEnvironment ¶
func DeleteEnvironment(db gorp.SqlExecutor, environmentID int64) error
DeleteEnvironment Delete the given environment
func DeleteEnvironmentKey ¶
func DeleteEnvironmentKey(db gorp.SqlExecutor, envID int64, keyName string) error
DeleteEnvironmentKey Delete the given key from the given project
func DeleteVariable ¶
func DeleteVariable(db gorp.SqlExecutor, envID int64, variable *sdk.EnvironmentVariable, u sdk.Identifiable) error
DeleteVariable Delete a variable from the given pipeline
func Exists ¶
func Exists(db gorp.SqlExecutor, projectKey, envName string) (bool, error)
Exists checks if an environment already exists on the project
func Export ¶
func Export(ctx context.Context, db gorp.SqlExecutor, key string, envName string, encryptFunc sdk.EncryptFunc) (exportentities.Environment, error)
Export an environment
func ExportEnvironment ¶
func ExportEnvironment(ctx context.Context, db gorp.SqlExecutor, env sdk.Environment, encryptFunc sdk.EncryptFunc, encryptPrefix string) (exportentities.Environment, error)
ExportEnvironment encrypt and export
func Import ¶
func Import(db gorpmapper.SqlExecutorWithTx, proj sdk.Project, env *sdk.Environment, msgChan chan<- sdk.Message, u sdk.Identifiable) error
Import import or reuser the provided environment
func ImportInto ¶
func ImportInto(ctx context.Context, db gorpmapper.SqlExecutorWithTx, env *sdk.Environment, into *sdk.Environment, msgChan chan<- sdk.Message, u sdk.Identifiable) error
ImportInto import variables and groups on an existing environment
func InsertEnvironment ¶
func InsertEnvironment(db gorp.SqlExecutor, env *sdk.Environment) error
InsertEnvironment Insert new environment
func InsertKey ¶
func InsertKey(db gorpmapper.SqlExecutorWithTx, key *sdk.EnvironmentKey) error
InsertKey a new environment key in database
func InsertVariable ¶
func InsertVariable(db gorpmapper.SqlExecutorWithTx, envID int64, v *sdk.EnvironmentVariable, u sdk.Identifiable) error
InsertVariable Insert a new variable in the given environment
func LoadAllByIDs ¶
func LoadAllByIDs(db gorp.SqlExecutor, ids []int64) ([]sdk.Environment, error)
LoadAllByIDs load all environment
func LoadAllKeys ¶
func LoadAllKeys(db gorp.SqlExecutor, envID int64) ([]sdk.EnvironmentKey, error)
LoadAllKeys load all keys for the given environment
func LoadAllKeysForEnvsWithDecryption ¶
func LoadAllKeysForEnvsWithDecryption(ctx context.Context, db gorp.SqlExecutor, envIDS []int64) (map[int64][]sdk.EnvironmentKey, error)
LoadAllKeysForEnvsWithDecryption load all keys for all given environments, with description
func LoadAllKeysWithPrivateContent ¶
func LoadAllKeysWithPrivateContent(db gorp.SqlExecutor, envID int64) ([]sdk.EnvironmentKey, error)
LoadAllKeysWithPrivateContent load all keys for the given environment
func LoadAllNames ¶
LoadAllNames returns all environment names
func LoadAllNamesByFromRepository ¶
func LoadAllNamesByFromRepository(db gorp.SqlExecutor, projID int64, fromRepository string) (sdk.IDNames, error)
LoadAllNamesByFromRepository returns all environment names for a repository
func LoadAllVariables ¶
func LoadAllVariables(db gorp.SqlExecutor, envID int64) ([]sdk.EnvironmentVariable, error)
LoadAllVariables Get all variable for the given environment
func LoadAllVariablesForEnvsWithDecryption ¶
func LoadAllVariablesForEnvsWithDecryption(ctx context.Context, db gorp.SqlExecutor, envIDS []int64) (map[int64][]sdk.EnvironmentVariable, error)
LoadAllVariablesForEnvsWithDecryption load all variables for all given environments
func LoadAllVariablesWithDecrytion ¶
func LoadAllVariablesWithDecrytion(db gorp.SqlExecutor, envID int64) ([]sdk.EnvironmentVariable, error)
LoadAllVariablesWithDecrytion Get all variable for the given environment, it also decrypt all the secure content
func LoadByWorkflowID ¶
func LoadByWorkflowID(db gorp.SqlExecutor, workflowID int64) ([]sdk.Environment, error)
LoadByWorkflowID loads environments from database for a given workflow id
func LoadEnvironmentByID ¶
func LoadEnvironmentByID(db gorp.SqlExecutor, ID int64) (*sdk.Environment, error)
LoadEnvironmentByID load the given environment
func LoadEnvironmentByName ¶
func LoadEnvironmentByName(db gorp.SqlExecutor, projectKey, envName string) (*sdk.Environment, error)
LoadEnvironmentByName load the given environment
func LoadEnvironments ¶
func LoadEnvironments(db gorp.SqlExecutor, projectKey string) ([]sdk.Environment, error)
LoadEnvironments load all environment from the given project
func LoadKey ¶
func LoadKey(db gorp.SqlExecutor, id int64, keyName string) (*sdk.EnvironmentKey, error)
func LoadVariable ¶
func LoadVariable(db gorp.SqlExecutor, envID int64, varName string) (*sdk.EnvironmentVariable, error)
LoadVariable retrieve a specific variable
func LoadVariableAudits ¶
func LoadVariableAudits(db gorp.SqlExecutor, envID, varID int64) ([]sdk.EnvironmentVariableAudit, error)
LoadVariableAudits Load audits for the given variable
func LoadVariableWithDecryption ¶
func LoadVariableWithDecryption(db gorp.SqlExecutor, envID int64, varID int64, varName string) (*sdk.EnvironmentVariable, error)
LoadVariableWithDecryption retrieve a specific variable with decrypted content
func Lock ¶
func Lock(db gorp.SqlExecutor, projectKey, envName string) error
Lock locks an environment given its ID
func ParseAndImport ¶
func ParseAndImport(ctx context.Context, db gorpmapper.SqlExecutorWithTx, proj sdk.Project, eenv exportentities.Environment, opts ImportOptions, decryptFunc keys.DecryptFunc, u sdk.Identifiable, emailFunc keys.EmailFunc) (*sdk.Environment, []sdk.Variable, []sdk.Message, error)
ParseAndImport parse an exportentities.Environment and insert or update the environment in database
func ResetFromRepository ¶
func ResetFromRepository(db gorp.SqlExecutor, projID int64, fromRepository string) error
ResetFromRepository reset fromRepository for all environments using the same fromRepository in a given project
func UpdateEnvironment ¶
func UpdateEnvironment(db gorp.SqlExecutor, env *sdk.Environment) error
UpdateEnvironment Update an environment
func UpdateVariable ¶
func UpdateVariable(db gorpmapper.SqlExecutorWithTx, envID int64, variable *sdk.EnvironmentVariable, variableBefore *sdk.EnvironmentVariable, u sdk.Identifiable) error
UpdateVariable Update a variable in the given environment
Types ¶
type ImportOptions ¶
ImportOptions are options to import environment