Documentation ¶
Index ¶
- type CreateWorkspaceCommand
- type CreateWorkspaceHandler
- type CreateWorkspaceResponse
- type ListWorkspaceHandler
- type ListWorkspaceQuery
- type ListWorkspaceResponse
- type PatchWorkspaceCommand
- type PatchWorkspaceHandler
- type PatchWorkspaceResponse
- type ReadWorkspaceHandler
- type ReadWorkspaceQuery
- type ReadWorkspaceResponse
- type UpdateWorkspaceCommand
- type UpdateWorkspaceHandler
- type UpdateWorkspaceResponse
- type WorkspaceCreator
- type WorkspaceLister
- type WorkspaceReader
- type WorkspaceUpdater
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 ¶
func (h *CreateWorkspaceHandler) Handle(ctx context.Context, request CreateWorkspaceCommand) (*CreateWorkspaceResponse, error)
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 ¶
func (h *ListWorkspaceHandler) Handle(ctx context.Context, query ListWorkspaceQuery) (*ListWorkspaceResponse, error)
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 ¶
func (h *PatchWorkspaceHandler) Handle(ctx context.Context, command PatchWorkspaceCommand) (*PatchWorkspaceResponse, error)
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 ¶
func (h *ReadWorkspaceHandler) Handle(ctx context.Context, query ReadWorkspaceQuery) (*ReadWorkspaceResponse, error)
Handle handles a ReadWorkspaceQuery and returns a ReadWorkspaceResponse or an error
type ReadWorkspaceQuery ¶
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 ¶
func (h *UpdateWorkspaceHandler) Handle(ctx context.Context, query UpdateWorkspaceCommand) (*UpdateWorkspaceResponse, error)
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