Documentation ¶
Index ¶
- Constants
- func GetUserWorkspace(ctx echo.Context, spaceLister *SpaceLister, workspaceName string) (*toolchainv1alpha1.Workspace, error)
- func GetUserWorkspaceWithBindings(ctx echo.Context, spaceLister *SpaceLister, workspaceName string, ...) (*toolchainv1alpha1.Workspace, error)
- func HandleSpaceGetRequest(spaceLister *SpaceLister, GetMembersFunc cluster.GetMemberClustersFunc) echo.HandlerFunc
- func HandleSpaceListRequest(spaceLister *SpaceLister) echo.HandlerFunc
- func ListUserWorkspaces(ctx echo.Context, spaceLister *SpaceLister) ([]toolchainv1alpha1.Workspace, error)
- type SpaceLister
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)
Click to show internal directories.
Click to hide internal directories.