writeclient

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: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BuildClientFunc

type BuildClientFunc func(user string) (client.Client, error)

BuildClientFunc defines a function that builds a controller-runtime client that impersonates the given user

func BuildBuildClientFuncForConfig

func BuildBuildClientFuncForConfig(config *rest.Config) BuildClientFunc

BuildBuildClientFuncForConfig provides a configured BuildClientFunc for building a controller-runtime client for a given cluster and impersonating an user

type WriteClient

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

WriteClient implements Write primitives on Workspaces. Creates or updates InternalWorkspaces starting from a request on Workspaces.

func New

func New(buildClient BuildClientFunc, workspacesNamespace string, workspacesReader *iwclient.Client) *WriteClient

New creates a new WriteClient

func NewWithConfig

func NewWithConfig(config *rest.Config, workspacesNamespace string, workspacesReader *iwclient.Client) *WriteClient

NewWithConfig creates a new WriteClient initialized with the given configuration

func (*WriteClient) CreateUserWorkspace

func (c *WriteClient) CreateUserWorkspace(ctx context.Context, user string, workspace *restworkspacesv1alpha1.Workspace, opts ...client.CreateOption) error

CreateUserWorkspace creates as `user` the InternalWorkspace representing the provided Workspace

func (*WriteClient) UpdateUserWorkspace

func (c *WriteClient) UpdateUserWorkspace(ctx context.Context, user string, workspace *restworkspacesv1alpha1.Workspace, opts ...client.UpdateOption) error

UpdateUserWorkspace updates as `user` the InternalWorkspace representing the provided Workspace

Jump to

Keyboard shortcuts

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