handlers

package
v0.0.0-...-d71fd26 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	// UpdateBindingAction specifies that the current binding can be updated by providing a different Space Role.
	UpdateBindingAction = "update"
	// DeleteBindingAction specifies that the current binding can be deleted in order to revoke user access to the Space.
	DeleteBindingAction = "delete"
	// OverrideBindingAction specifies that the current binding can be overridden by creating a SpaceBindingRequest containing the same MUR but different Space Role.
	OverrideBindingAction = "override"
)

Variables

This section is empty.

Functions

func GetUserWorkspace

func GetUserWorkspace(ctx echo.Context, spaceLister *SpaceLister, workspaceName string) (*toolchainv1alpha1.Workspace, error)

GetUserWorkspace returns a workspace object with the required fields used by the proxy

func GetUserWorkspaceWithBindings

func GetUserWorkspaceWithBindings(ctx echo.Context, spaceLister *SpaceLister, workspaceName string, GetMembersFunc cluster.GetMemberClustersFunc) (*toolchainv1alpha1.Workspace, error)

GetUserWorkspaceWithBindings returns a workspace object with the required fields+bindings (the list with all the users access details)

func HandleSpaceGetRequest

func HandleSpaceGetRequest(spaceLister *SpaceLister, GetMembersFunc cluster.GetMemberClustersFunc) echo.HandlerFunc

func HandleSpaceListRequest

func HandleSpaceListRequest(spaceLister *SpaceLister) echo.HandlerFunc

func ListUserWorkspaces

func ListUserWorkspaces(ctx echo.Context, spaceLister *SpaceLister) ([]toolchainv1alpha1.Workspace, error)

ListUserWorkspaces returns a list of Workspaces for the current user. The function lists all SpaceBindings for the user and return all the workspaces found from this list.

Types

type SpaceLister

type SpaceLister struct {
	GetSignupFunc          func(ctx *gin.Context, userID, username string, checkUserSignupCompleted bool) (*signup.Signup, error)
	GetInformerServiceFunc func() service.InformerService
	ProxyMetrics           *metrics.ProxyMetrics
}

func NewSpaceLister

func NewSpaceLister(app application.Application, proxyMetrics *metrics.ProxyMetrics) *SpaceLister

func (*SpaceLister) GetProvisionedUserSignup

func (s *SpaceLister) GetProvisionedUserSignup(ctx echo.Context) (*signup.Signup, error)

Jump to

Keyboard shortcuts

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