workspace

package
v0.0.0-...-837e63c Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: Apache-2.0 Imports: 6 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 workspacesv1alpha1.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 *workspacesv1alpha1.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 workspacesv1alpha1.WorkspaceList
}

ListWorkspaceResponse contains all the workspaces the user can access

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 workspacesv1alpha1.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(reader 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 *workspacesv1alpha1.Workspace
}

UpdateWorkspaceResponse contains the workspace the user requested

type WorkspaceCreator

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

type WorkspaceLister

type WorkspaceLister interface {
	ListUserWorkspaces(ctx context.Context, user string, objs *workspacesv1alpha1.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 *workspacesv1alpha1.Workspace, opts ...client.UpdateOption) error
}

WorkspaceUpdater is the interface the data source needs to implement to allow the UpdateWorkspaceHandler to fetch data from 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