workspace

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateWorkspaceCommand

type CreateWorkspaceCommand struct {
	Workspace restworkspacesv1alpha1.Workspace
}

CreateWorkspaceCommand contains the information needed to create a new workspace

type CreateWorkspaceHandler

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

func NewCreateWorkspaceHandler

func NewCreateWorkspaceHandler(creator WorkspaceCreator) *CreateWorkspaceHandler

func (*CreateWorkspaceHandler) Handle

type CreateWorkspaceResponse

type CreateWorkspaceResponse struct {
	Workspace *restworkspacesv1alpha1.Workspace
}

CreateWorkspaceResponse contains the newly-created workspace

type ListWorkspaceHandler

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

ListWorkspaceHandler process ListWorkspaceQuery and returns a ListWorkspaceResponse fetching data from a WorkspaceLister

func NewListWorkspaceHandler

func NewListWorkspaceHandler(lister WorkspaceLister) *ListWorkspaceHandler

NewListWorkspaceHandler creates a new ListWorkspaceHandler that uses a specified WorkspaceLister

func (*ListWorkspaceHandler) Handle

Handle handles a ListWorkspaceQuery abd returns a ListWorkspaceResponse or an error

type ListWorkspaceQuery

type ListWorkspaceQuery struct {
	Namespace string
}

ListWorkspaceQuery contains the information needed to retrieve all the workspaces the user has access to from the data source

type ListWorkspaceResponse

type ListWorkspaceResponse struct {
	Workspaces restworkspacesv1alpha1.WorkspaceList
}

ListWorkspaceResponse contains all the workspaces the user can access

type PatchWorkspaceCommand

type PatchWorkspaceCommand struct {
	Owner     string
	Workspace string
	Patch     []byte
	PatchType types.PatchType
}

PatchWorkspaceCommand contains the information needed to retrieve a Workspace the user has access to from the data source

type PatchWorkspaceHandler

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

PatchWorkspaceHandler processes PatchWorkspaceCommand and returns PatchWorkspaceResponse fetching data from a WorkspacePatcher

func NewPatchWorkspaceHandler

func NewPatchWorkspaceHandler(reader WorkspaceReader, updater WorkspaceUpdater) *PatchWorkspaceHandler

NewPatchWorkspaceHandler creates a new PatchWorkspaceHandler that uses a specified WorkspacePatcher

func (*PatchWorkspaceHandler) Handle

Handle handles a PatchWorkspaceCommand and returns a PatchWorkspaceResponse or an error

type PatchWorkspaceResponse

type PatchWorkspaceResponse struct {
	Workspace *restworkspacesv1alpha1.Workspace
}

PatchWorkspaceResponse contains the workspace the user requested

type ReadWorkspaceHandler

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

ReadWorkspaceHandler processes ReadWorkspaceQuery and returns ReadWorkspaceResponse fetching data from a WorkspaceReader

func NewReadWorkspaceHandler

func NewReadWorkspaceHandler(reader WorkspaceReader) *ReadWorkspaceHandler

NewReadWorkspaceHandler creates a new ReadWorkspaceHandler that uses a specified WorkspaceReader

func (*ReadWorkspaceHandler) Handle

Handle handles a ReadWorkspaceQuery and returns a ReadWorkspaceResponse or an error

type ReadWorkspaceQuery

type ReadWorkspaceQuery struct {
	Name  string
	Owner string
}

ReadWorkspaceQuery contains the information needed to retrieve a Workspace the user has access to from the data source

type ReadWorkspaceResponse

type ReadWorkspaceResponse struct {
	Workspace *workspacesv1alpha1.Workspace
}

ReadWorkspaceResponse contains the workspace the user requested

type UpdateWorkspaceCommand

type UpdateWorkspaceCommand struct {
	Owner     string
	Workspace restworkspacesv1alpha1.Workspace
}

UpdateWorkspaceCommand contains the information needed to retrieve a Workspace the user has access to from the data source

type UpdateWorkspaceHandler

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

UpdateWorkspaceHandler processes UpdateWorkspaceCommand and returns UpdateWorkspaceResponse fetching data from a WorkspaceUpdater

func NewUpdateWorkspaceHandler

func NewUpdateWorkspaceHandler(updater WorkspaceUpdater) *UpdateWorkspaceHandler

NewUpdateWorkspaceHandler creates a new UpdateWorkspaceHandler that uses a specified WorkspaceUpdater

func (*UpdateWorkspaceHandler) Handle

Handle handles a UpdateWorkspaceCommand and returns a UpdateWorkspaceResponse or an error

type UpdateWorkspaceResponse

type UpdateWorkspaceResponse struct {
	Workspace *restworkspacesv1alpha1.Workspace
}

UpdateWorkspaceResponse contains the workspace the user requested

type WorkspaceCreator

type WorkspaceCreator interface {
	CreateUserWorkspace(ctx context.Context, user string, workspace *restworkspacesv1alpha1.Workspace, opts ...client.CreateOption) error
}

type WorkspaceLister

type WorkspaceLister interface {
	ListUserWorkspaces(ctx context.Context, user string, objs *restworkspacesv1alpha1.WorkspaceList, opts ...client.ListOption) error
}

WorkspaceLister is the interface the data source needs to implement to allow the ListWorkspaceHandler to fetch data from it

type WorkspaceReader

type WorkspaceReader interface {
	ReadUserWorkspace(ctx context.Context, user, owner, space string, obj *workspacesv1alpha1.Workspace, opts ...client.GetOption) error
}

WorkspaceReader is the interface the data source needs to implement to allow the ReadWorkspaceHandler to fetch data from it

type WorkspaceUpdater

type WorkspaceUpdater interface {
	UpdateUserWorkspace(ctx context.Context, user string, obj *restworkspacesv1alpha1.Workspace, opts ...client.UpdateOption) error
}

WorkspaceUpdater is the interface the data source needs to implement to allow the UpdateWorkspaceHandler to fetch data from it

Jump to

Keyboard shortcuts

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