workspace

package
v0.0.0-...-46e61fc Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2022 License: Apache-2.0 Imports: 21 Imported by: 0

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 NewWorkspaceHandler

func NewWorkspaceHandler(controller workspaceController.IController, useCases workspaceUseCases.IUseCases,
	authGRPC proto.AuthServiceClient, appConfig app.IConfig, useCasesRole roleUseCases.IUseCases,
	useCasesToken tokenUseCases.IUseCases) *Handler

func (*Handler) Create

func (h *Handler) Create(w http.ResponseWriter, r *http.Request)

@Tags Workspace @Description Create a new workspace @ID create-workspace @Accept json @Produce json @Param Workspace body workspaceEntities.Data true "create workspace data" @Success 201 {object} entities.Response @Failure 400 {object} entities.Response @Failure 401 {object} entities.Response @Failure 500 {object} entities.Response @Router /core/workspaces [post] @Security ApiKeyAuth

func (*Handler) CreateToken

func (h *Handler) CreateToken(w http.ResponseWriter, r *http.Request)

@Tags Workspace @Description Create a new workspace token @ID create-workspace-token @Accept json @Produce json @Param workspaceID path string true "ID of the workspace" @Param Token body tokenEntities.Data true "create workspace token data" @Success 201 {object} entities.Response @Failure 400 {object} entities.Response @Failure 401 {object} entities.Response @Failure 500 {object} entities.Response @Router /core/workspaces/{workspaceID}/tokens [post] @Security ApiKeyAuth

func (*Handler) Delete

func (h *Handler) Delete(w http.ResponseWriter, r *http.Request)

@Tags Workspace @Description Delete a workspace by id @ID delete-workspace @Accept json @Produce json @Param workspaceID path string true "ID of the workspace" @Success 204 {object} entities.Response @Failure 400 {object} entities.Response @Failure 401 {object} entities.Response @Failure 404 {object} entities.Response @Failure 500 {object} entities.Response @Router /core/workspaces/{workspaceID} [delete] @Security ApiKeyAuth

func (*Handler) DeleteToken

func (h *Handler) DeleteToken(w http.ResponseWriter, r *http.Request)

@Tags Workspace @Description Delete a workspace token @ID delete-workspace-token @Accept json @Produce json @Param workspaceID path string true "ID of the workspace" @Param tokenID path string true "ID of the token" @Success 204 {object} entities.Response @Failure 400 {object} entities.Response @Failure 401 {object} entities.Response @Failure 500 {object} entities.Response @Router /core/workspaces/{workspaceID}/tokens/{tokenID} [delete] @Security ApiKeyAuth

func (*Handler) Get

func (h *Handler) Get(w http.ResponseWriter, r *http.Request)

@Tags Workspace @Description Search for a existing workspace by id @ID get-workspace @Accept json @Produce json @Param workspaceID path string true "ID of the workspace" @Success 200 {object} entities.Response @Failure 400 {object} entities.Response @Failure 401 {object} entities.Response @Failure 404 {object} entities.Response @Failure 500 {object} entities.Response @Router /core/workspaces/{workspaceID} [get] @Security ApiKeyAuth

func (*Handler) GetUsers

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

@Tags Workspace @Description Get all users of a workspace @ID get-workspace-users @Accept json @Produce json @Param workspaceID path string true "ID of the workspace" @Success 200 {object} entities.Response @Failure 400 {object} entities.Response @Failure 401 {object} entities.Response @Failure 404 {object} entities.Response @Failure 500 {object} entities.Response @Router /core/workspaces/{workspaceID}/roles [get] @Security ApiKeyAuth

func (*Handler) InviteUser

func (h *Handler) InviteUser(w http.ResponseWriter, r *http.Request)

@Tags Workspace @Description Invite a user to a workspace @ID invite-user-workspace @Accept json @Produce json @Param workspaceID path string true "ID of the workspace" @Param Workspace body roleEntities.UserData true "user account data" @Success 200 {object} entities.Response @Failure 400 {object} entities.Response @Failure 401 {object} entities.Response @Failure 404 {object} entities.Response @Failure 500 {object} entities.Response @Router /core/workspaces/{workspaceID}/roles [post] @Security ApiKeyAuth

func (*Handler) List

func (h *Handler) List(w http.ResponseWriter, r *http.Request)

@Tags Workspace @Description List all workspaces of an account @ID list-workspace @Accept json @Produce json @Success 200 {object} entities.Response @Failure 400 {object} entities.Response @Failure 401 {object} entities.Response @Failure 500 {object} entities.Response @Router /core/workspaces [get] @Security ApiKeyAuth

func (*Handler) ListTokens

func (h *Handler) ListTokens(w http.ResponseWriter, r *http.Request)

@Tags Workspace @Description List all workspace tokens @ID list-workspace-tokens @Accept json @Produce json @Param workspaceID path string true "ID of the workspace" @Success 201 {object} entities.Response @Failure 400 {object} entities.Response @Failure 401 {object} entities.Response @Failure 500 {object} entities.Response @Router /core/workspaces/{workspaceID}/tokens [get] @Security ApiKeyAuth

func (*Handler) Options

func (h *Handler) Options(w http.ResponseWriter, _ *http.Request)

func (*Handler) RemoveUser

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

@Tags Workspace @Description Remove a user from a workspace @ID remove-workspace-user @Accept json @Produce json @Param workspaceID path string true "ID of the workspace" @Param accountID path string true "ID of the account" @Success 200 {object} entities.Response @Failure 400 {object} entities.Response @Failure 401 {object} entities.Response @Failure 404 {object} entities.Response @Failure 500 {object} entities.Response @Router /core/workspaces/{workspaceID}/roles/{accountID} [delete] @Security ApiKeyAuth

func (*Handler) Update

func (h *Handler) Update(w http.ResponseWriter, r *http.Request)

@Tags Workspace @Description Updates a existing workspace by id @ID update-workspace @Accept json @Produce json @Param workspaceID path string true "ID of the workspace" @Param Workspace body workspaceEntities.Data true "update workspace data" @Success 200 {object} entities.Response @Failure 400 {object} entities.Response @Failure 401 {object} entities.Response @Failure 404 {object} entities.Response @Failure 500 {object} entities.Response @Router /core/workspaces/{workspaceID} [patch] @Security ApiKeyAuth

func (*Handler) UpdateRole

func (h *Handler) UpdateRole(w http.ResponseWriter, r *http.Request)

@Tags Workspace @Description Update an account role of a workspace @ID update-workspace-role @Accept json @Produce json @Param workspaceID path string true "ID of the workspace" @Param accountID path string true "ID of the account" @Param Workspace body roleEntities.Data true "update role of a account in a specific workspace" @Success 200 {object} entities.Response @Failure 400 {object} entities.Response @Failure 401 {object} entities.Response @Failure 404 {object} entities.Response @Failure 500 {object} entities.Response @Router /core/workspaces/{workspaceID}/roles/{accountID} [patch] @Security ApiKeyAuth

Jump to

Keyboard shortcuts

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