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 ¶
func New(internalClient clientinterface.InternalWorkspacesReadClient, mapper clientinterface.InternalWorkspacesMapper) *ReadClient
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