handlers

package
v0.3.13 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// SKIP_QA_QUERY_PARAM is the name of the query parameter used for skipping QA
	SKIP_QA_QUERY_PARAM = "skip-qa"
	// REMOTE_SOURCE_QUERY_PARAM is the URL of the git remote to be used as source
	REMOTE_SOURCE_QUERY_PARAM = "remote-source"
	// DEBUG_QUERY_PARAM is the name of the query parameter used for debug mode
	DEBUG_QUERY_PARAM = "debug"
	// WORKSPACE_ID_ROUTE_VAR is the route variable that contains the workspace Id
	WORKSPACE_ID_ROUTE_VAR = "work-id"
	// PROJECT_ID_ROUTE_VAR is the route variable that contains the project Id
	PROJECT_ID_ROUTE_VAR = "proj-id"
	// PROJECT_INPUT_ID_ROUTE_VAR is the route variable that contains the project input Id
	PROJECT_INPUT_ID_ROUTE_VAR = "input-id"
	// PROJECT_OUTPUT_ID_ROUTE_VAR is the route variable that contains the project output Id
	PROJECT_OUTPUT_ID_ROUTE_VAR = "output-id"
	// ROLE_ID_ROUTE_VAR is the route variable that contains the role Id
	ROLE_ID_ROUTE_VAR = "role-id"
	// IDP_USER_ID_ROUTE_VAR is the route variable for the user id
	IDP_USER_ID_ROUTE_VAR = "user-id"
)

Variables

This section is empty.

Functions

func GetAuthServerIdGivenUserId

func GetAuthServerIdGivenUserId(accessToken string, userId string) (string, error)

GetAuthServerIdGivenUserId returns the authz server Id of the user given the user id used in the Move2Kube API URL endpoints

func GetAuthorizationMiddleWare

func GetAuthorizationMiddleWare(next http.Handler) http.Handler

GetAuthorizationMiddleWare returns the middleware that checks for authorization

func GetLogger

func GetLogger(r *http.Request) *_logrus.Entry

GetLogger returns the logger from the request's context

func GetLoggingMiddleWare

func GetLoggingMiddleWare(next http.Handler) http.Handler

GetLoggingMiddleWare returns the middleware that logs each request method and URL

func GetRemoveTrailingSlashMiddleWare

func GetRemoveTrailingSlashMiddleWare(next http.Handler) http.Handler

GetRemoveTrailingSlashMiddleWare returns the middleware that removes trailing slashes from the request URL

func GetRequestId

func GetRequestId(r *http.Request) string

GetRequestId returns the request id from the request's context

func HandleCreateProject

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

HandleCreateProject handles creating a new project

func HandleCreateProjectInput

func HandleCreateProjectInput(w http.ResponseWriter, r *http.Request, isCommon bool)

HandleCreateProjectInput is the handler for creating a project input isCommon: if true the input will be available for all the projects in the workspace

func HandleCreateRole

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

HandleCreateRole handles creating a new role

func HandleCreateRoleBinding

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

HandleCreateRoleBinding handles assigning a role to a particular user

func HandleCreateWorkspace

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

HandleCreateWorkspace handles creating a new workspace

func HandleDeletePlan

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

HandleDeletePlan handles deleting the plan for a project

func HandleDeleteProject

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

HandleDeleteProject handles deleting an existing project

func HandleDeleteProjectInput

func HandleDeleteProjectInput(w http.ResponseWriter, r *http.Request, isCommon bool)

HandleDeleteProjectInput is the handler for deleting a project input

func HandleDeleteProjectOutput

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

HandleDeleteProjectOutput handles deleting the output of a transformation

func HandleDeleteRole

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

HandleDeleteRole handles deleting an existing role

func HandleDeleteRoleBinding

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

HandleDeleteRoleBinding handles removing a role from a particular user

func HandleDeleteWorkspace

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

HandleDeleteWorkspace handles deleting an existing workspace

func HandleGetAccessToken

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

HandleGetAccessToken handles access token requests

func HandleGetQuestion

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

HandleGetQuestion handles getting the next question of an ongoing transformation

func HandleListProjects

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

HandleListProjects handles listing projects

func HandleListRoleBindings

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

HandleListRoleBindings handles list all the roles of a particular user

func HandleListRoles

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

HandleListRoles handles listing all the roles

func HandleListWorkspaces

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

HandleListWorkspaces handles listing all the workspaces a user has access to

func HandleLogin

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

HandleLogin logs the user in and gets the authorization code.

func HandleLoginCallback

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

HandleLoginCallback gets the access and refresh tokens for the user given the authorization code.

func HandleLogout

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

HandleLogout logs out the user.

func HandlePatchRoleBindings

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

HandlePatchRoleBindings handles patching the roles of a particular user

func HandlePostSolution

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

HandlePostSolution handles posting the solution to the current question of an ongoing transformation

func HandleReadPlan

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

HandleReadPlan handles reading the plan for a project

func HandleReadProject

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

HandleReadProject handles reading an existing project

func HandleReadProjectInput

func HandleReadProjectInput(w http.ResponseWriter, r *http.Request, isCommon bool)

HandleReadProjectInput is the handler for reading a project input

func HandleReadProjectOutput

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

HandleReadProjectOutput handles reading the output of a transformation

func HandleReadProjectOutputGraph added in v0.3.3

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

HandleReadProjectOutputGraph handles reading the graph file from the output of a transformation

func HandleReadRole

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

HandleReadRole handles reading an existing role

func HandleReadWorkspace

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

HandleReadWorkspace handles reading an existing workspace

func HandleStartPlanning

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

HandleStartPlanning handles starting the planning for a project

func HandleStartTransformation

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

HandleStartTransformation handles starting a new transformation

func HandleSupport

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

HandleSupport is the handler for getting support information

func HandleUpdatePlan

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

HandleUpdatePlan handles updating the plan for a project

func HandleUpdateProject added in v0.3.6

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

HandleUpdateProject handles updating an existing project

func HandleUpdateRole

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

HandleUpdateRole handles updating an existing role

func HandleUpdateWorkspace

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

HandleUpdateWorkspace handles updating an existing workspace

func HandleUserProfile

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

HandleUserProfile is the handler for getting the user profile

func Setup

func Setup() error

Setup handlers

Types

This section is empty.

Jump to

Keyboard shortcuts

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