Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
func NewHandler ¶
func NewHandler( projectManager *projectmanager.ProjectManager, ) (*Handler, error)
func (*Handler) CreateProject ¶
func (h *Handler) CreateProject() http.HandlerFunc
@Id createProject @Summary Create project @Description Create a new project @Tags project @Accept json @Produce json @Param project body request.CreateProjectRequest true "Created project" @Success 200 {object} entity.Project "Success" @Failure 400 {object} error "Bad Request" @Failure 401 {object} error "Unauthorized" @Failure 429 {object} error "Too Many Requests" @Failure 404 {object} error "Not Found" @Failure 500 {object} error "Internal Server Error" @Router /api/v1/projects [post]
func (*Handler) DeleteProject ¶
func (h *Handler) DeleteProject() http.HandlerFunc
@Id deleteProject @Summary Delete project @Description Delete specified project by ID @Tags project @Produce json @Param project_id path int true "Project ID" @Success 200 {object} string "Success" @Failure 400 {object} error "Bad Request" @Failure 401 {object} error "Unauthorized" @Failure 429 {object} error "Too Many Requests" @Failure 404 {object} error "Not Found" @Failure 500 {object} error "Internal Server Error" @Router /api/v1/projects/{project_id} [delete]
func (*Handler) GetProject ¶
func (h *Handler) GetProject() http.HandlerFunc
@Id getProject @Summary Get project @Description Get project information by project ID @Tags project @Produce json @Param project_id path uint true "Project ID" @Success 200 {object} entity.Project "Success" @Failure 400 {object} error "Bad Request" @Failure 401 {object} error "Unauthorized" @Failure 429 {object} error "Too Many Requests" @Failure 404 {object} error "Not Found" @Failure 500 {object} error "Internal Server Error" @Router /api/v1/projects/{project_id} [get]
func (*Handler) ListProjects ¶
func (h *Handler) ListProjects() http.HandlerFunc
@Id listProject @Summary List projects @Description List all or a subset of the projects @Tags project @Produce json @Param orgID query uint false "OrganizationID to filter project list by. Default to all projects." @Param name query string false "Project name to filter project list by. This should only return one result if set." @Success 200 {object} []entity.Project "Success" @Failure 400 {object} error "Bad Request" @Failure 401 {object} error "Unauthorized" @Failure 429 {object} error "Too Many Requests" @Failure 404 {object} error "Not Found" @Failure 500 {object} error "Internal Server Error" @Router /api/v1/projects [get]
func (*Handler) UpdateProject ¶
func (h *Handler) UpdateProject() http.HandlerFunc
@Id updateProject @Summary Update project @Description Update the specified project @Tags project @Accept json @Produce json @Param project_id path uint true "Project ID" @Param project body request.UpdateProjectRequest true "Updated project" @Success 200 {object} entity.Project "Success" @Failure 400 {object} error "Bad Request" @Failure 401 {object} error "Unauthorized" @Failure 429 {object} error "Too Many Requests" @Failure 404 {object} error "Not Found" @Failure 500 {object} error "Internal Server Error" @Router /api/v1/projects/{project_id} [put]
type ProjectRequestParams ¶
type ProjectRequestParams struct {
ProjectID uint
}