projects

package
v0.2.54 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 20, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddEnvironment

func AddEnvironment(w http.ResponseWriter, r *http.Request)

AddEnvironment creates an environment in the database

func AddInventory

func AddInventory(w http.ResponseWriter, r *http.Request)

AddInventory creates an inventory in the database

func AddKey

func AddKey(w http.ResponseWriter, r *http.Request)

AddKey adds a new key to the database

func AddProject

func AddProject(w http.ResponseWriter, r *http.Request)

AddProject adds a new project to the database

func AddRepository

func AddRepository(w http.ResponseWriter, r *http.Request)

AddRepository creates a new repository in the database

func AddSchedule

func AddSchedule(w http.ResponseWriter, r *http.Request)

AddSchedule adds a template to the database

func AddTask

func AddTask(w http.ResponseWriter, r *http.Request)

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

func AddTemplate

func AddTemplate(w http.ResponseWriter, r *http.Request)

AddTemplate adds a template to the database

func AddUser

func AddUser(w http.ResponseWriter, r *http.Request)

AddUser adds a user to a projects team in the database

func AddView

func AddView(w http.ResponseWriter, r *http.Request)

AddView adds a new key to the database

func DeleteProject

func DeleteProject(w http.ResponseWriter, r *http.Request)

DeleteProject removes a project from the database

func EnvironmentMiddleware

func EnvironmentMiddleware(next http.Handler) http.Handler

EnvironmentMiddleware ensures an environment exists and loads it to the context

func GetAllTasks

func GetAllTasks(w http.ResponseWriter, r *http.Request)

GetAllTasks returns all tasks for the current project

func GetEnvironment

func GetEnvironment(w http.ResponseWriter, r *http.Request)

GetEnvironment retrieves sorted environments from the database

func GetEnvironmentRefs

func GetEnvironmentRefs(w http.ResponseWriter, r *http.Request)

func GetInventory

func GetInventory(w http.ResponseWriter, r *http.Request)

GetInventory returns an inventory from the database

func GetInventoryRefs

func GetInventoryRefs(w http.ResponseWriter, r *http.Request)

func GetKeyRefs

func GetKeyRefs(w http.ResponseWriter, r *http.Request)

func GetKeys

func GetKeys(w http.ResponseWriter, r *http.Request)

GetKeys retrieves sorted keys from the database

func GetLastTasks

func GetLastTasks(w http.ResponseWriter, r *http.Request)

GetLastTasks returns the hundred most recent tasks

func GetMustCanMiddleware

func GetMustCanMiddleware(permissions db.ProjectUserPermission) mux.MiddlewareFunc

GetMustCanMiddleware ensures that the user has administrator rights

func GetProject

func GetProject(w http.ResponseWriter, r *http.Request)

GetProject returns a project details

func GetProjects

func GetProjects(w http.ResponseWriter, r *http.Request)

GetProjects returns all projects in this users context

func GetRepositories

func GetRepositories(w http.ResponseWriter, r *http.Request)

GetRepositories returns all repositories in a project sorted by type

func GetRepositoryRefs

func GetRepositoryRefs(w http.ResponseWriter, r *http.Request)

func GetSchedule

func GetSchedule(w http.ResponseWriter, r *http.Request)

GetSchedule returns single template by ID

func GetTask

func GetTask(w http.ResponseWriter, r *http.Request)

GetTask returns a task based on its id

func GetTaskMiddleware

func GetTaskMiddleware(next http.Handler) http.Handler

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

func GetTaskOutput

func GetTaskOutput(w http.ResponseWriter, r *http.Request)

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

func GetTasksList

func GetTasksList(w http.ResponseWriter, r *http.Request, limit uint64)

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

func GetTemplate

func GetTemplate(w http.ResponseWriter, r *http.Request)

GetTemplate returns single template by ID

func GetTemplateRefs

func GetTemplateRefs(w http.ResponseWriter, r *http.Request)

func GetTemplateSchedules

func GetTemplateSchedules(w http.ResponseWriter, r *http.Request)

func GetTemplates

func GetTemplates(w http.ResponseWriter, r *http.Request)

GetTemplates returns all templates for a project in a sort order

func GetUserRole

func GetUserRole(w http.ResponseWriter, r *http.Request)

func GetUsers

func GetUsers(w http.ResponseWriter, r *http.Request)

GetUsers returns all users in a project

func GetViewTemplates

func GetViewTemplates(w http.ResponseWriter, r *http.Request)

func GetViews

func GetViews(w http.ResponseWriter, r *http.Request)

GetViews retrieves sorted keys from the database

func InventoryMiddleware

func InventoryMiddleware(next http.Handler) http.Handler

InventoryMiddleware ensures an inventory exists and loads it to the context

func IsValidInventoryPath

func IsValidInventoryPath(path string) bool

IsValidInventoryPath tests a path to ensure it is below the cwd

func KeyMiddleware

func KeyMiddleware(next http.Handler) http.Handler

KeyMiddleware ensures a key exists and loads it to the context

func LeftProject

func LeftProject(w http.ResponseWriter, r *http.Request)

LeftProject removes a user from a project team

func ProjectMiddleware

func ProjectMiddleware(next http.Handler) http.Handler

ProjectMiddleware ensures a project exists and loads it to the context

func RemoveEnvironment

func RemoveEnvironment(w http.ResponseWriter, r *http.Request)

RemoveEnvironment deletes an environment from the database

func RemoveInventory

func RemoveInventory(w http.ResponseWriter, r *http.Request)

RemoveInventory deletes an inventory from the database

func RemoveKey

func RemoveKey(w http.ResponseWriter, r *http.Request)

RemoveKey deletes a key from the database

func RemoveRepository

func RemoveRepository(w http.ResponseWriter, r *http.Request)

RemoveRepository deletes a repository from a project in the database

func RemoveSchedule

func RemoveSchedule(w http.ResponseWriter, r *http.Request)

RemoveSchedule deletes a schedule from the database

func RemoveTask

func RemoveTask(w http.ResponseWriter, r *http.Request)

RemoveTask removes a task from the database

func RemoveTemplate

func RemoveTemplate(w http.ResponseWriter, r *http.Request)

RemoveTemplate deletes a template from the database

func RemoveUser

func RemoveUser(w http.ResponseWriter, r *http.Request)

RemoveUser removes a user from a project team

func RemoveView

func RemoveView(w http.ResponseWriter, r *http.Request)

RemoveView deletes a view from the database

func RepositoryMiddleware

func RepositoryMiddleware(next http.Handler) http.Handler

RepositoryMiddleware ensures a repository exists and loads it to the context

func SchedulesMiddleware

func SchedulesMiddleware(next http.Handler) http.Handler

SchedulesMiddleware ensures a template exists and loads it to the context

func SetViewPositions

func SetViewPositions(w http.ResponseWriter, r *http.Request)

func StopTask

func StopTask(w http.ResponseWriter, r *http.Request)

func TemplatesMiddleware

func TemplatesMiddleware(next http.Handler) http.Handler

TemplatesMiddleware ensures a template exists and loads it to the context

func UpdateEnvironment

func UpdateEnvironment(w http.ResponseWriter, r *http.Request)

UpdateEnvironment updates an existing environment in the database

func UpdateInventory

func UpdateInventory(w http.ResponseWriter, r *http.Request)

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

func UpdateKey

func UpdateKey(w http.ResponseWriter, r *http.Request)

UpdateKey updates key in database nolint: gocyclo

func UpdateProject

func UpdateProject(w http.ResponseWriter, r *http.Request)

UpdateProject saves updated project details to the database

func UpdateRepository

func UpdateRepository(w http.ResponseWriter, r *http.Request)

UpdateRepository updates the values of a repository in the database

func UpdateSchedule

func UpdateSchedule(w http.ResponseWriter, r *http.Request)

UpdateSchedule writes a schedule to an existing key in the database

func UpdateTemplate

func UpdateTemplate(w http.ResponseWriter, r *http.Request)

UpdateTemplate writes a template to an existing key in the database

func UpdateUser

func UpdateUser(w http.ResponseWriter, r *http.Request)

func UpdateView

func UpdateView(w http.ResponseWriter, r *http.Request)

UpdateView updates key in database nolint: gocyclo

func UserMiddleware

func UserMiddleware(next http.Handler) http.Handler

UserMiddleware ensures a user exists and loads it to the context

func ValidateScheduleCronFormat

func ValidateScheduleCronFormat(w http.ResponseWriter, r *http.Request)

func ViewMiddleware

func ViewMiddleware(next http.Handler) http.Handler

ViewMiddleware ensures a key exists and loads it to the context

Types

This section is empty.

Jump to

Keyboard shortcuts

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