readclient

package
v0.0.0-...-cb42e1a Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ReadClient

type ReadClient struct {
	// contains filtered or unexported fields
}

ReadClient implements the WorkspaceLister and WorkspaceReader interfaces using a client.Reader as backend

func New

New creates a new KubeReadClient with the provided backend and a custom InternalWorkspaces/Workspaces mapper

func NewDefaultWithCache

func NewDefaultWithCache(ctx context.Context, cfg *rest.Config, workspacesNamespace, kubesawNamespace string) (*ReadClient, cache.Cache, error)

NewDefaultWithCache creates a controller-runtime cache and use it as KubeReadClient's backend. It also uses the default InternalWorkspaces/Workspaces mapper.

func NewDefaultWithInternalClient

func NewDefaultWithInternalClient(internalClient clientinterface.InternalWorkspacesReadClient) *ReadClient

NewDefaultWithInternalClient creates a new KubeReadClient with the provided backend and default InternalWorkspaces/Workspaces mapper

func (*ReadClient) ListUserWorkspaces

func (c *ReadClient) ListUserWorkspaces(
	ctx context.Context,
	user string,
	objs *restworkspacesv1alpha1.WorkspaceList,
	opts ...client.ListOption,
) error

ListUserWorkspaces Returns all the workspaces the user has access to

func (*ReadClient) ReadUserWorkspace

func (c *ReadClient) ReadUserWorkspace(
	ctx context.Context,
	user string,
	owner string,
	space string,
	obj *restworkspacesv1alpha1.Workspace,
	_ ...client.GetOption,
) error

ReadUserWorkspace returns the Workspace details only if the user has access to it

Directories

Path Synopsis
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

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