Go API Documentation

github.com/semaphoreui/semaphore/api/projects

No package summary is available.

Package

Files: 18. Third party imports: 3. Imports from organisation: 0. Tests: 0. Benchmarks: 0.

Types

projUser

This type doesn't have documentation.

Field name Field type Comment
ID

int

No comment on field.
Username

string

No comment on field.
Name

string

No comment on field.
Role

db.ProjectUserRole

No comment on field.

publicAlias

This type doesn't have documentation.

Field name Field type Comment
ID

int

No comment on field.
URL

string

No comment on field.

Functions

func AddEnvironment

AddEnvironment creates an environment in the database

Uses: context.Get, db.Environment, db.EnvironmentSecret, db.EventEnvironment, db.Project, fmt.Sprintf, helpers.Bind, helpers.EventLog, helpers.EventLogCreate, helpers.EventLogItem, helpers.Store, helpers.UserFromContext, helpers.WriteError, helpers.WriteJSON, http.StatusBadRequest, http.StatusCreated.

func AddIntegration

Uses: context.Get, db.Integration, db.Project, fmt.Sprintf, helpers.Bind, helpers.Store, helpers.WriteError, helpers.WriteJSON, http.StatusBadRequest, http.StatusCreated, log.Error, log.Info.

func AddIntegrationAlias

Uses: context.Get, db.Integration, db.IntegrationAlias, db.Project, helpers.Store, helpers.WriteError, helpers.WriteJSON, http.StatusOK, random.String.

func AddIntegrationExtractValue

Uses: context.Get, db.Integration, db.IntegrationExtractValue, db.Project, helpers.Bind, helpers.Store, helpers.WriteError, helpers.WriteJSON, http.StatusBadRequest, http.StatusCreated.

func AddIntegrationMatcher

Uses: context.Get, db.Integration, db.IntegrationMatcher, db.Project, helpers.Bind, helpers.Store, helpers.WriteError, helpers.WriteJSON, http.StatusBadRequest, http.StatusOK.

func AddInventory

AddInventory creates an inventory in the database

Uses: context.Get, db.EventInventory, db.Inventory, db.InventoryFile, db.InventoryStatic, db.InventoryStaticYaml, db.InventoryTerraformWorkspace, db.InventoryTofuWorkspace, db.Project, db.ValidateInventory, fmt.Sprintf, helpers.Bind, helpers.EventLog, helpers.EventLogCreate, helpers.EventLogItem, helpers.Store, helpers.UserFromContext, helpers.WriteError, helpers.WriteJSON, http.StatusBadRequest, http.StatusCreated.

func AddKey

AddKey adds a new key to the database

Uses: context.Get, db.AccessKey, db.EventKey, db.Project, fmt.Sprintf, helpers.Bind, helpers.EventLog, helpers.EventLogCreate, helpers.EventLogItem, helpers.Store, helpers.UserFromContext, helpers.WriteError, helpers.WriteJSON, http.StatusBadRequest, http.StatusCreated.

func AddProject

AddProject adds a new project to the database

Uses: context.Get, db.AccessKey, db.AccessKeyNone, db.Environment, db.EventProject, db.Project, db.ProjectOwner, db.ProjectUser, db.User, helpers.Bind, helpers.EventLog, helpers.EventLogCreate, helpers.EventLogItem, helpers.Store, helpers.UserFromContext, helpers.WriteError, helpers.WriteJSON, http.StatusCreated, http.StatusUnauthorized, log.Warn, util.Config.

func AddRepository

AddRepository creates a new repository in the database

Uses: context.Get, db.EventRepository, db.Project, db.Repository, db.ValidateRepository, fmt.Sprintf, helpers.Bind, helpers.EventLog, helpers.EventLogCreate, helpers.EventLogItem, helpers.Store, helpers.UserFromContext, helpers.WriteError, helpers.WriteJSON, http.StatusBadRequest, http.StatusCreated.

func AddRunner

Uses: http.StatusNotFound.

func AddSchedule

AddSchedule adds a template to the database

Uses: context.Get, db.EventSchedule, db.Project, db.Schedule, fmt.Sprintf, helpers.Bind, helpers.EventLog, helpers.EventLogCreate, helpers.EventLogItem, helpers.Store, helpers.UserFromContext, helpers.WriteError, helpers.WriteJSON, http.StatusCreated.

func AddTask

AddTask inserts a task into the database and returns a header or returns error

Uses: context.Get, db.Project, db.Task, db.User, errors.Is, helpers.Bind, helpers.Store, helpers.TaskPool, helpers.WriteError, helpers.WriteErrorStatus, helpers.WriteJSON, http.StatusCreated, http.StatusForbidden, http.StatusInternalServerError, log.Fields, tasks.ErrInvalidSubscription, util.LogErrorF.

func AddTemplate

AddTemplate adds a template to the database

Uses: context.Get, db.EventSchedule, db.Inventory, db.InventoryType, db.Project, db.Template, fmt.Sprintf, helpers.Bind, helpers.EventLog, helpers.EventLogCreate, helpers.EventLogItem, helpers.Store, helpers.UserFromContext, helpers.WriteError, helpers.WriteErrorStatus, helpers.WriteJSON, http.StatusBadRequest, http.StatusCreated, util.Config.

func AddTerraformInventoryAlias

Uses: http.StatusNotFound.

func AddUser

AddUser adds a user to a projects team in the database

Uses: context.Get, db.EventUser, db.Project, db.ProjectUser, db.ProjectUserRole, fmt.Sprintf, helpers.Bind, helpers.EventLog, helpers.EventLogCreate, helpers.EventLogItem, helpers.Store, helpers.UserFromContext, http.StatusBadRequest, http.StatusConflict, http.StatusNoContent.

func AddView

AddView adds a new key to the database

Uses: context.Get, db.EventView, db.Project, db.View, fmt.Sprintf, helpers.Bind, helpers.EventLog, helpers.EventLogCreate, helpers.EventLogItem, helpers.Store, helpers.UserFromContext, helpers.WriteError, helpers.WriteJSON, http.StatusBadRequest, http.StatusCreated.

func AttachInventory

Uses: context.Get, db.Inventory, db.Template, helpers.Store, helpers.WriteError, helpers.WriteErrorStatus, http.StatusBadRequest, http.StatusNoContent.

func ClearCache

Uses: context.Get, db.Project, helpers.WriteError, http.StatusNoContent, util.Config.

func ClearRunnerCache

Uses: http.StatusNotFound.

func ConfirmTask

Uses: context.Get, db.Project, db.Task, helpers.TaskPool, helpers.WriteError, http.StatusBadRequest, http.StatusNoContent.

func DeleteIntegration

Uses: context.Get, db.ErrInvalidOperation, db.Project, helpers.GetIntParam, helpers.Store, helpers.WriteError, helpers.WriteJSON, http.StatusBadRequest, http.StatusNoContent.

func DeleteIntegrationExtractValue

Uses: context.Get, db.ErrInvalidOperation, db.Integration, db.Project, helpers.GetIntParam, helpers.Store, helpers.WriteJSON, http.StatusBadRequest, http.StatusNoContent, log.Error.

func DeleteIntegrationMatcher

Uses: context.Get, db.ErrInvalidOperation, db.Integration, db.IntegrationMatcher, db.Project, helpers.GetIntParam, helpers.Store, helpers.WriteError, helpers.WriteJSON, http.StatusBadRequest, http.StatusNoContent.

func DeleteProject

DeleteProject removes a project from the database

Uses: context.Get, db.Project, helpers.Store, helpers.WriteError, http.StatusNoContent, log.Error, util.Config.

func DeleteRunner

Uses: http.StatusNotFound.

func DeleteTerraformInventoryAlias

Uses: http.StatusNotFound.

func DeleteTerraformInventoryState

Uses: http.StatusNotFound.

func DetachInventory

Uses: context.Get, db.Inventory, db.Template, helpers.Store, helpers.WriteError, helpers.WriteErrorStatus, http.StatusBadRequest, http.StatusNoContent.

func EnvironmentMiddleware

EnvironmentMiddleware ensures an environment exists and loads it to the context

Uses: context.Get, context.Set, db.FillEnvironmentSecrets, db.Project, helpers.GetIntParam, helpers.Store, helpers.WriteError, http.HandlerFunc, http.Request, http.ResponseWriter, http.StatusBadRequest.

func GetAllTasks

GetAllTasks returns all tasks for the current project

func GetAnsibleTaskErrors

Uses: context.Get, db.Project, db.Task, helpers.Store, helpers.WriteError, helpers.WriteJSON, http.StatusOK.

func GetAnsibleTaskHosts

Uses: context.Get, db.Project, db.Task, helpers.Store, helpers.WriteError, helpers.WriteJSON, http.StatusOK.

func GetBackup

Uses: context.Get, db.Project, helpers.Store, helpers.WriteError, http.StatusOK, projectService.GetBackup.

func GetEnvironment

GetEnvironment retrieves sorted environments from the database

Uses: context.Get, db.Environment, db.Project, helpers.QueryParams, helpers.Store, helpers.WriteError, helpers.WriteJSON, http.StatusOK.

func GetEnvironmentRefs

Uses: context.Get, db.Environment, helpers.Store, helpers.WriteError, helpers.WriteJSON, http.StatusOK.

func GetIntegration

Uses: context.Get, db.Integration, helpers.WriteJSON, http.StatusOK.

func GetIntegrationAlias

Uses: context.Get, db.Integration, db.Project, helpers.Store, helpers.WriteError, helpers.WriteJSON, http.StatusOK.

func GetIntegrationExtractValue

Uses: context.Get, db.Integration, db.IntegrationExtractValue, db.Project, fmt.Sprintf, helpers.GetIntParam, helpers.Store, helpers.WriteJSON, http.StatusBadRequest, http.StatusOK.

func GetIntegrationExtractValueRefs

Uses: context.Get, db.Integration, db.IntegrationExtractValue, db.Project, helpers.GetIntParam, helpers.Store, helpers.WriteError, helpers.WriteJSON, http.StatusBadRequest, http.StatusOK.

func GetIntegrationExtractValues

Uses: context.Get, db.Integration, db.Project, helpers.QueryParams, helpers.Store, helpers.WriteError, helpers.WriteJSON, http.StatusOK.

func GetIntegrationMatcher

Uses: context.Get, db.Integration, db.IntegrationMatcher, db.Project, helpers.GetIntParam, helpers.Store, helpers.WriteError, helpers.WriteJSON, http.StatusBadRequest, http.StatusOK.

func GetIntegrationMatcherRefs

Uses: context.Get, db.Integration, db.IntegrationMatcher, db.Project, helpers.GetIntParam, helpers.Store, helpers.WriteError, helpers.WriteJSON, http.StatusBadRequest, http.StatusOK.

func GetIntegrationMatchers

Uses: context.Get, db.Integration, db.Project, helpers.QueryParams, helpers.Store, helpers.WriteError, helpers.WriteJSON, http.StatusOK.

func GetIntegrationRefs

Uses: context.Get, db.Project, helpers.GetIntParam, helpers.Store, helpers.WriteError, helpers.WriteJSON, http.StatusBadRequest, http.StatusOK.

func GetIntegrations

Uses: context.Get, db.Project, helpers.QueryParams, helpers.Store, helpers.WriteError, helpers.WriteJSON, http.StatusOK.

func GetInventory

GetInventory returns an inventory from the database

Uses: context.Get, db.Inventory, db.InventoryProps, db.InventoryType, db.Project, db.TemplateApp, helpers.QueryParamsWithOwner, helpers.Store, helpers.WriteError, helpers.WriteJSON, http.StatusOK.

func GetInventoryRefs

Uses: context.Get, db.Inventory, helpers.Store, helpers.WriteError, helpers.WriteJSON, http.StatusOK.

func GetKeyRefs

Uses: context.Get, db.AccessKey, helpers.Store, helpers.WriteError, helpers.WriteJSON, http.StatusOK.

func GetKeys

GetKeys retrieves sorted keys from the database

Uses: context.Get, db.AccessKey, db.Project, helpers.QueryParams, helpers.Store, helpers.WriteError, helpers.WriteJSON, http.StatusOK.

func GetLastTasks

GetLastTasks returns the hundred most recent tasks

Uses: strconv.Atoi.

func GetMustCanMiddleware

GetMustCanMiddleware ensures that the user has administrator rights

Uses: context.Get, db.ProjectUserRole, db.User, http.Handler, http.HandlerFunc, http.Request, http.ResponseWriter, http.StatusForbidden.

func GetProject

GetProject returns a project details

Uses: context.Get, helpers.WriteJSON, http.StatusOK.

func GetProjectSchedules

Uses: context.Get, db.Project, helpers.Store, helpers.WriteError, helpers.WriteJSON, http.StatusOK.

func GetProjects

GetProjects returns all projects in this users context

Uses: context.Get, db.Project, db.User, helpers.Store, helpers.WriteError, helpers.WriteJSON, http.StatusOK.

func GetRepositories

GetRepositories returns all repositories in a project sorted by type

Uses: context.Get, db.Project, db.Repository, db.RepositoryProps, helpers.QueryParamsForProps, helpers.Store, helpers.WriteError, helpers.WriteJSON, http.StatusOK.

func GetRepositoryBranches

Uses: context.Get, db.Repository, db.RepositoryFile, db.RepositoryLocal, helpers.WriteError, helpers.WriteJSON, http.StatusBadRequest, http.StatusOK.

func GetRepositoryRefs

Uses: context.Get, db.Repository, helpers.Store, helpers.WriteError, helpers.WriteJSON, http.StatusOK.

func GetRunner

Uses: http.StatusNotFound.

func GetRunnerTags

Uses: context.Get, db.Project, helpers.Store, helpers.WriteJSON, http.StatusInternalServerError, http.StatusOK.

func GetRunners

Uses: context.Get, db.Project, helpers.Store, helpers.WriteJSON, http.StatusOK.

func GetSchedule

GetSchedule returns single template by ID

Uses: context.Get, db.Schedule, helpers.WriteJSON, http.StatusOK.

func GetTask

GetTask returns a task based on its id

Uses: context.Get, db.Task, helpers.WriteJSON, http.StatusOK.

func GetTaskMiddleware

GetTaskMiddleware is middleware that gets a task by id and sets the context to it or panics

Uses: context.Get, context.Set, db.Project, helpers.GetIntParam, helpers.Store, http.HandlerFunc, http.Request, http.ResponseWriter, http.StatusBadRequest, log.Fields, util.LogErrorF.

func GetTaskOutput

GetTaskOutput returns the logged task output by id and writes it as json or returns error

Uses: context.Get, db.Project, db.RetrieveQueryParams, db.Task, db.TaskOutput, helpers.Store, helpers.WriteJSON, http.StatusBadRequest, http.StatusOK, log.Fields, util.LogErrorF.

func GetTaskRawOutput

Uses: context.Get, db.Project, db.RetrieveQueryParams, db.Task, db.TaskOutput, helpers.Store, http.StatusBadRequest, http.StatusOK, log.Fields, util.LogErrorF.

func GetTaskStages

GetTaskStages returns the logged task stages by id and writes it as json or returns error

Uses: context.Get, db.Project, db.Task, helpers.Store, helpers.WriteError, helpers.WriteJSON, http.StatusOK, json.Unmarshal.

func GetTaskStats

Uses: context.Get, db.Project, db.TaskFilter, db.TaskStatUnitDay, db.Template, helpers.Store, helpers.WriteErrorStatus, helpers.WriteJSON, http.StatusBadRequest, http.StatusOK, log.Fields, strconv.Atoi, time.Parse, util.LogErrorF.

func GetTasksList

GetTasksList returns a list of tasks for the current project in desc order to limit or error

Uses: context.Get, db.Project, db.RetrieveQueryParams, db.TaskWithTpl, db.Template, helpers.Store, helpers.WriteJSON, http.StatusBadRequest, http.StatusOK, log.Fields, util.LogErrorF.

func GetTemplate

GetTemplate returns single template by ID

Uses: context.Get, db.Template, helpers.WriteJSON, http.StatusOK.

func GetTemplateRefs

Uses: context.Get, db.Template, helpers.Store, helpers.WriteError, helpers.WriteJSON, http.StatusOK.

func GetTemplateSchedules

Uses: context.Get, db.Project, helpers.GetIntParam, helpers.Store, helpers.WriteError, helpers.WriteJSON, http.StatusBadRequest, http.StatusOK.

func GetTemplates

GetTemplates returns all templates for a project in a sort order

Uses: context.Get, db.Project, db.TemplateApp, db.TemplateFilter, helpers.QueryParams, helpers.Store, helpers.WriteError, helpers.WriteJSON, http.StatusOK.

func GetTerraformInventoryAlias

Uses: http.StatusNotFound.

func GetTerraformInventoryAliases

Uses: helpers.WriteJSON, http.StatusOK.

func GetTerraformInventoryLatestState

Uses: helpers.WriteErrorStatus, http.StatusNotFound.

func GetTerraformInventoryState

Uses: http.StatusNotFound.

func GetTerraformInventoryStates

Uses: helpers.WriteJSON, http.StatusOK.

func GetUserRole

Uses: context.Get, db.ProjectUserPermission, db.ProjectUserRole, helpers.WriteJSON, http.StatusOK.

func GetUsers

GetUsers returns all users in a project

Uses: context.Get, db.Project, db.User, helpers.QueryParams, helpers.Store, helpers.WriteError, helpers.WriteJSON, http.StatusOK.

func GetViewTemplates

Uses: context.Get, db.Project, db.TemplateFilter, db.View, helpers.QueryParams, helpers.Store, helpers.WriteError, helpers.WriteJSON, http.StatusOK.

func GetViews

GetViews retrieves sorted keys from the database

Uses: context.Get, db.Project, db.View, helpers.Store, helpers.WriteError, helpers.WriteJSON, http.StatusOK.

func IntegrationMiddleware

Uses: context.Set, helpers.GetIntParam, helpers.Store, helpers.WriteError, helpers.WriteJSON, http.HandlerFunc, http.Request, http.ResponseWriter, http.StatusBadRequest.

func InventoryMiddleware

InventoryMiddleware ensures an inventory exists and loads it to the context

Uses: context.Get, context.Set, db.Project, helpers.GetIntParam, helpers.Store, helpers.WriteError, http.HandlerFunc, http.Request, http.ResponseWriter.

func IsValidInventoryPath

IsValidInventoryPath tests a path to ensure it is below the cwd

Uses: filepath.Abs, filepath.Rel, os.Getwd, strings.HasPrefix.

func KeyMiddleware

KeyMiddleware ensures a key exists and loads it to the context

Uses: context.Get, context.Set, db.Project, helpers.GetIntParam, helpers.Store, helpers.WriteError, http.HandlerFunc, http.Request, http.ResponseWriter.

func LeftProject

LeftProject removes a user from a project team

Uses: context.Get, db.User.

func ProjectMiddleware

ProjectMiddleware ensures a project exists and loads it to the context

Uses: context.Get, context.Set, db.User, helpers.GetIntParam, helpers.Store, helpers.WriteError, helpers.WriteJSON, http.HandlerFunc, http.Request, http.ResponseWriter, http.StatusBadRequest.

func RejectTask

Uses: context.Get, db.Project, db.Task, helpers.TaskPool, helpers.WriteError, http.StatusBadRequest, http.StatusNoContent.

func RemoveEnvironment

RemoveEnvironment deletes an environment from the database

Uses: context.Get, db.Environment, db.ErrInvalidOperation, db.EventEnvironment, fmt.Sprintf, helpers.EventLog, helpers.EventLogDelete, helpers.EventLogItem, helpers.Store, helpers.UserFromContext, helpers.WriteError, helpers.WriteJSON, http.StatusBadRequest, http.StatusNoContent.

func RemoveIntegrationAlias

Uses: context.Get, db.Project, helpers.GetIntParam, helpers.Store, helpers.WriteError, http.StatusNoContent.

func RemoveInventory

RemoveInventory deletes an inventory from the database

Uses: context.Get, db.ErrInvalidOperation, db.EventInventory, db.Inventory, errors.Is, fmt.Sprintf, helpers.EventLog, helpers.EventLogDelete, helpers.EventLogItem, helpers.Store, helpers.UserFromContext, helpers.WriteError, helpers.WriteJSON, http.StatusBadRequest, http.StatusNoContent.

func RemoveKey

RemoveKey deletes a key from the database

Uses: context.Get, db.AccessKey, db.ErrInvalidOperation, db.EventKey, fmt.Sprintf, helpers.EventLog, helpers.EventLogDelete, helpers.EventLogItem, helpers.Store, helpers.UserFromContext, helpers.WriteError, helpers.WriteJSON, http.StatusBadRequest, http.StatusNoContent.

func RemoveRepository

RemoveRepository deletes a repository from a project in the database

Uses: context.Get, db.ErrInvalidOperation, db.EventRepository, db.Repository, errors.Is, fmt.Sprintf, helpers.EventLog, helpers.EventLogDelete, helpers.EventLogItem, helpers.Store, helpers.UserFromContext, helpers.WriteError, helpers.WriteJSON, http.StatusBadRequest, http.StatusNoContent, util.LogWarning.

func RemoveSchedule

RemoveSchedule deletes a schedule from the database

Uses: context.Get, db.EventSchedule, db.Schedule, fmt.Sprintf, helpers.EventLog, helpers.EventLogDelete, helpers.EventLogItem, helpers.Store, helpers.UserFromContext, helpers.WriteError, http.StatusNoContent.

func RemoveTask

RemoveTask removes a task from the database

Uses: context.Get, db.Project, db.Task, db.User, helpers.Store, helpers.TaskPool, http.StatusBadRequest, http.StatusNoContent, http.StatusUnauthorized, log.Fields, log.Warn, util.LogErrorF.

func RemoveTemplate

RemoveTemplate deletes a template from the database

Uses: context.Get, db.EventTemplate, db.Template, fmt.Sprintf, helpers.EventLog, helpers.EventLogDelete, helpers.EventLogItem, helpers.Store, helpers.UserFromContext, helpers.WriteError, http.StatusNoContent.

func RemoveUser

RemoveUser removes a user from a project team

Uses: context.Get, db.User.

func RemoveView

RemoveView deletes a view from the database

Uses: context.Get, db.EventView, db.View, fmt.Sprintf, helpers.EventLog, helpers.EventLogDelete, helpers.EventLogItem, helpers.Store, helpers.UserFromContext, helpers.WriteError, http.StatusNoContent.

func RepositoryMiddleware

RepositoryMiddleware ensures a repository exists and loads it to the context

Uses: context.Get, context.Set, db.Project, helpers.GetIntParam, helpers.Store, helpers.WriteError, http.HandlerFunc, http.Request, http.ResponseWriter.

func Restore

Uses: context.Get, db.Project, db.User, helpers.Store, helpers.WriteError, helpers.WriteJSON, http.StatusOK, io.Copy, log.Error, projectService.BackupFormat, strings.Builder.

func RunnerMiddleware

Uses: http.HandlerFunc, http.Request, http.ResponseWriter.

func SchedulesMiddleware

SchedulesMiddleware ensures a template exists and loads it to the context

Uses: context.Get, context.Set, db.Project, helpers.GetIntParam, helpers.Store, helpers.WriteError, http.HandlerFunc, http.Request, http.ResponseWriter.

func SetRunnerActive

Uses: http.StatusNotFound.

func SetScheduleActive

Uses: context.Get, db.EventSchedule, db.Schedule, fmt.Sprintf, helpers.Bind, helpers.EventLog, helpers.EventLogItem, helpers.EventLogUpdate, helpers.Store, helpers.UserFromContext, helpers.WriteError, http.StatusNoContent.

func SetTemplateInventory

Uses: context.Get, db.Inventory, db.Template, helpers.Store, helpers.WriteError, helpers.WriteErrorStatus, http.StatusBadRequest, http.StatusNoContent.

func SetTerraformInventoryAliasAccessKey

Uses: http.StatusNotFound.

func SetViewPositions

Uses: context.Get, db.Project, helpers.Bind, helpers.Store, helpers.WriteError, http.StatusNoContent.

func StopTask

Uses: context.Get, db.Project, db.Task, helpers.Bind, helpers.TaskPool, helpers.WriteError, http.StatusBadRequest, http.StatusNoContent.

func TemplatesMiddleware

TemplatesMiddleware ensures a template exists and loads it to the context

Uses: context.Get, context.Set, db.Project, helpers.GetIntParam, helpers.Store, helpers.WriteError, http.HandlerFunc, http.Request, http.ResponseWriter.

func UpdateEnvironment

UpdateEnvironment updates an existing environment in the database

Uses: context.Get, db.Environment, db.EventEnvironment, fmt.Sprintf, helpers.Bind, helpers.EventLog, helpers.EventLogItem, helpers.EventLogUpdate, helpers.Store, helpers.UserFromContext, helpers.WriteError, helpers.WriteJSON, http.StatusBadRequest, http.StatusNoContent.

func UpdateIntegration

Uses: context.Get, db.Integration, helpers.Bind, helpers.Store, helpers.WriteError, helpers.WriteJSON, http.StatusBadRequest, http.StatusNoContent.

func UpdateIntegrationExtractValue

Uses: context.Get, db.Integration, db.IntegrationExtractValue, db.Project, helpers.Bind, helpers.GetIntParam, helpers.Store, helpers.WriteError, helpers.WriteJSON, http.StatusBadRequest, http.StatusNoContent.

func UpdateIntegrationMatcher

Uses: context.Get, db.Integration, db.IntegrationMatcher, db.Project, fmt.Sprintf, helpers.Bind, helpers.GetIntParam, helpers.Store, helpers.WriteError, helpers.WriteJSON, http.StatusBadRequest, http.StatusNoContent, log.Info.

func UpdateInventory

UpdateInventory writes updated values to an existing inventory item in the database

Uses: context.Get, db.EventInventory, db.Inventory, db.InventoryFile, db.InventoryStatic, db.InventoryStaticYaml, db.InventoryTerraformWorkspace, db.InventoryTofuWorkspace, db.ValidateInventory, fmt.Sprintf, helpers.Bind, helpers.EventLog, helpers.EventLogItem, helpers.EventLogUpdate, helpers.Store, helpers.UserFromContext, helpers.WriteError, helpers.WriteErrorStatus, http.StatusBadRequest, http.StatusNoContent.

func UpdateKey

UpdateKey updates key in database nolint: gocyclo

Uses: context.Get, db.AccessKey, db.EventKey, db.RetrieveQueryParams, fmt.Sprintf, helpers.Bind, helpers.EventLog, helpers.EventLogItem, helpers.EventLogUpdate, helpers.Store, helpers.UserFromContext, helpers.WriteError, http.StatusNoContent.

func UpdateProject

UpdateProject saves updated project details to the database

Uses: context.Get, db.Project, helpers.Bind, helpers.Store, helpers.WriteError, helpers.WriteJSON, http.StatusBadRequest, http.StatusNoContent.

func UpdateRepository

UpdateRepository updates the values of a repository in the database

Uses: context.Get, db.EventRepository, db.Repository, db.ValidateRepository, fmt.Sprintf, helpers.Bind, helpers.EventLog, helpers.EventLogItem, helpers.EventLogUpdate, helpers.Store, helpers.UserFromContext, helpers.WriteError, helpers.WriteJSON, http.StatusBadRequest, http.StatusNoContent, util.LogWarning.

func UpdateRunner

Uses: http.StatusNotFound.

func UpdateSchedule

UpdateSchedule writes a schedule to an existing key in the database

Uses: context.Get, db.EventSchedule, db.Schedule, fmt.Sprintf, helpers.Bind, helpers.EventLog, helpers.EventLogItem, helpers.EventLogUpdate, helpers.Store, helpers.UserFromContext, helpers.WriteError, helpers.WriteJSON, http.StatusBadRequest, http.StatusNoContent.

func UpdateTemplate

UpdateTemplate writes a template to an existing key in the database

Uses: context.Get, db.EventTemplate, db.Template, db.TemplateBuild, db.TemplateDeploy, fmt.Sprintf, helpers.Bind, helpers.EventLog, helpers.EventLogItem, helpers.EventLogUpdate, helpers.Store, helpers.UserFromContext, helpers.WriteError, helpers.WriteErrorStatus, helpers.WriteJSON, http.StatusBadRequest, http.StatusNoContent, util.Config.

func UpdateTemplateDescription

Uses: context.Get, db.EventTemplate, db.Template, fmt.Sprintf, helpers.Bind, helpers.EventLog, helpers.EventLogItem, helpers.EventLogUpdate, helpers.Store, helpers.UserFromContext, helpers.WriteError, http.StatusNoContent.

func UpdateUser

Uses: context.Get, db.EventUser, db.Project, db.ProjectOwner, db.ProjectUser, db.ProjectUserRole, db.User, fmt.Errorf, fmt.Sprintf, helpers.Bind, helpers.EventLog, helpers.EventLogItem, helpers.EventLogUpdate, helpers.Store, helpers.UserFromContext, helpers.WriteError, http.StatusBadRequest, http.StatusNoContent.

func UpdateView

UpdateView updates key in database nolint: gocyclo

Uses: context.Get, db.EventView, db.View, fmt.Sprintf, helpers.Bind, helpers.EventLog, helpers.EventLogItem, helpers.EventLogUpdate, helpers.Store, helpers.UserFromContext, helpers.WriteError, helpers.WriteJSON, http.StatusBadRequest, http.StatusNoContent.

func UserMiddleware

UserMiddleware ensures a user exists and loads it to the context

Uses: context.Get, context.Set, db.Project, helpers.GetIntParam, helpers.Store, helpers.WriteError, http.HandlerFunc, http.Request, http.ResponseWriter.

func ValidateScheduleCronFormat

Uses: db.Schedule, helpers.Bind.

func ViewMiddleware

ViewMiddleware ensures a key exists and loads it to the context

Uses: context.Get, context.Set, db.Project, helpers.GetIntParam, helpers.Store, helpers.WriteError, http.HandlerFunc, http.Request, http.ResponseWriter.

Private functions

func createDemoProject

References: db.AccessKey, db.AccessKeyLoginPassword, db.AppAnsible, db.AppBash, db.AppPowerShell, db.AppTerragrunt, db.AppTofu, db.Inventory, db.LoginPassword, db.Repository, db.Template, db.TemplateBuild, db.TemplateDeploy, db.TemplateTask, db.TemplateVault, db.View.

func getPublicAlias

References: util.GetPublicAliasURL.

func getPublicAliases

func outputToBytes

References: bytes.Buffer, util.ClearFromAnsiCodes.

func refreshSchedulePool

References: context.Get, schedules.SchedulePool.

func removeUser

removeUser removes a user from a project team

References: context.Get, db.EventUser, db.Project, db.ProjectOwner, db.ProjectUserRole, db.User, fmt.Errorf, fmt.Sprintf, helpers.EventLog, helpers.EventLogDelete, helpers.EventLogItem, helpers.Store, helpers.UserFromContext, helpers.WriteError, http.StatusNoContent.

func updateEnvironmentSecrets

References: db.AccessKey, db.AccessKeyString, db.EnvironmentSecretCreate, db.EnvironmentSecretDelete, db.EnvironmentSecretUpdate.

func validateCronFormat

References: helpers.WriteJSON, http.StatusBadRequest, schedules.ValidateCronFormat.


Tests

Files: 1. Third party imports: 0. Imports from organisation: 0. Tests: 1. Benchmarks: 0.

Test functions

TestIsValidInventoryPath

References: runtime.GOOS.