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( workspaceManager *workspacemanager.WorkspaceManager, ) (*Handler, error)
func (*Handler) CreateWorkspace ¶
func (h *Handler) CreateWorkspace() http.HandlerFunc
@Summary Create workspace @Description Create a new workspace @Accept json @Produce json @Param workspace body CreateWorkspaceRequest true "Created workspace" @Success 200 {object} entity.Workspace "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/workspace/{workspaceName} [post]
func (*Handler) DeleteWorkspace ¶
func (h *Handler) DeleteWorkspace() http.HandlerFunc
@Summary Delete workspace @Description Delete specified workspace by ID @Produce json @Param id path int true "Workspace ID" @Success 200 {object} entity.Workspace "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/workspace/{workspaceName} [delete] @Router /api/v1/workspace/{workspaceID} [delete]
func (*Handler) GetWorkspace ¶
func (h *Handler) GetWorkspace() http.HandlerFunc
@Summary Get workspace @Description Get workspace information by workspace ID @Produce json @Param id path int true "Workspace ID" @Success 200 {object} entity.Workspace "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/workspace/{workspaceID} [get]
func (*Handler) ListWorkspaces ¶
func (h *Handler) ListWorkspaces() http.HandlerFunc
@Summary List workspaces @Description List all workspaces @Produce json @Success 200 {object} entity.Workspace "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/workspace [get]
func (*Handler) UpdateWorkspace ¶
func (h *Handler) UpdateWorkspace() http.HandlerFunc
@Summary Update workspace @Description Update the specified workspace @Accept json @Produce json @Param workspace body UpdateWorkspaceRequest true "Updated workspace" @Success 200 {object} entity.Workspace "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/workspace/{workspaceID} [put]
type WorkspaceRequestParams ¶
type WorkspaceRequestParams struct {
WorkspaceID uint
}