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
@Summary Create project @Description Create a new project @Accept json @Produce json @Param project body CreateProjectRequest true "Created project" @Success 200 {object} entity.Project "Success" @Failure 400 {object} errors.DetailError "Bad Request" @Failure 401 {object} errors.DetailError "Unauthorized" @Failure 429 {object} errors.DetailError "Too Many Requests" @Failure 404 {object} errors.DetailError "Not Found" @Failure 500 {object} errors.DetailError "Internal Server Error" @Router /api/v1/project/{projectName} [post]
func (*Handler) DeleteProject ¶
func (h *Handler) DeleteProject() http.HandlerFunc
@Summary Delete project @Description Delete specified project by ID @Produce json @Param id path int true "Project ID" @Success 200 {object} entity.Project "Success" @Failure 400 {object} errors.DetailError "Bad Request" @Failure 401 {object} errors.DetailError "Unauthorized" @Failure 429 {object} errors.DetailError "Too Many Requests" @Failure 404 {object} errors.DetailError "Not Found" @Failure 500 {object} errors.DetailError "Internal Server Error" @Router /api/v1/project/{projectName} [delete] @Router /api/v1/project/{projectID} [delete]
func (*Handler) GetProject ¶
func (h *Handler) GetProject() http.HandlerFunc
@Summary Get project @Description Get project information by project ID @Produce json @Param id path int true "Project ID" @Success 200 {object} entity.Project "Success" @Failure 400 {object} errors.DetailError "Bad Request" @Failure 401 {object} errors.DetailError "Unauthorized" @Failure 429 {object} errors.DetailError "Too Many Requests" @Failure 404 {object} errors.DetailError "Not Found" @Failure 500 {object} errors.DetailError "Internal Server Error" @Router /api/v1/project/{projectID} [get]
func (*Handler) ListProjects ¶
func (h *Handler) ListProjects() http.HandlerFunc
@Summary List projects @Description List all projects @Produce json @Success 200 {object} entity.Project "Success" @Failure 400 {object} errors.DetailError "Bad Request" @Failure 401 {object} errors.DetailError "Unauthorized" @Failure 429 {object} errors.DetailError "Too Many Requests" @Failure 404 {object} errors.DetailError "Not Found" @Failure 500 {object} errors.DetailError "Internal Server Error" @Router /api/v1/project [get]
func (*Handler) UpdateProject ¶
func (h *Handler) UpdateProject() http.HandlerFunc
@Summary Update project @Description Update the specified project @Accept json @Produce json @Param project body UpdateProjectRequest true "Updated project" @Success 200 {object} entity.Project "Success" @Failure 400 {object} errors.DetailError "Bad Request" @Failure 401 {object} errors.DetailError "Unauthorized" @Failure 429 {object} errors.DetailError "Too Many Requests" @Failure 404 {object} errors.DetailError "Not Found" @Failure 500 {object} errors.DetailError "Internal Server Error" @Router /api/v1/project/{projectID} [put]
type ProjectRequestParams ¶
type ProjectRequestParams struct {
ProjectID uint
}