package
3.0.2+incompatible
Repository: https://github.com/codyguo/semaphore.git
Documentation: pkg.go.dev
# Functions
AddEnvironment creates an environment in the database.
AddInventory creates an inventory in the database.
AddKey adds a new key to the database.
AddProject adds a new project to the database.
AddRepository creates a new repository in the database.
AddTemplate adds a template to the database.
AddUser adds a user to a projects team in the database.
DeleteProject removes a project from the database.
EnvironmentMiddleware ensures an environment exists and loads it to the context.
No description provided by the author
GetEnvironments retrieves sorted environments from the database.
GetInventory returns an inventory from the database.
GetKeys retrieves sorted keys from the database.
GetProject returns a project details.
GetProjects returns all projects in this users context.
GetRepositories returns all repositories in a project sorted by type.
No description provided by the author
GetTemplates returns all templates for a project in a sort order.
GetUsers returns all users in a project.
InventoryMiddleware ensures an inventory exists and loads it to the context.
IsValidInventoryPath tests a path to ensure it is below the cwd.
KeyMiddleware ensures a key exists and loads it to the context.
MakeUserAdmin writes the admin flag to the users account.
MustBeAdmin ensures that the user has administrator rights.
ProjectMiddleware ensures a project exists and loads it to the context.
RemoveEnvironment deletes an environment from the database.
RemoveInventory deletes an inventory from the database.
RemoveKey deletes a key from the database.
RemoveRepository deletes a repository from a project in the database.
RemoveTemplate deletes a template from the database.
RemoveUser removes a user from a project team.
RepositoryMiddleware ensures a repository exists and loads it to the context.
TemplatesMiddleware ensures a template exists and loads it to the context.
UpdateEnvironment updates an existing environment in the database.
UpdateInventory writes updated values to an existing inventory item in the database.
UpdateKey updates key in database nolint: gocyclo.
UpdateProject saves updated project details to the database.
UpdateRepository updates the values of a repository in the database.
UpdateTemplate writes a template to an existing key in the database.
UserMiddleware ensures a user exists and loads it to the context.