Documentation ¶
Index ¶
- Variables
- func NewBadRequestError(message string, err error) error
- func NewForbiddenError(message string, err error) error
- func NewInternalServerError(message string, err error) error
- func NewIsAlreadyExistsError(message string, err error) error
- func NewNotFoundError(message string, err error) error
- func NewServiceUnavailableError(message string, err error) error
- func NewUnauthorizedError(message string, err error) error
- type Client
- func (c *Client) AddNetworkRule(ctx context.Context, name, userId, networkRuleName string, portNumber int, ...) (*wsv1alpha1.NetworkRule, error)
- func (c *Client) CreateUser(ctx context.Context, userId string, displayName string, role string, ...) (*wsv1alpha1.User, error)
- func (c *Client) CreateWorkspace(ctx context.Context, userId, wsName, tmplName string, vars map[string]string, ...) (*wsv1alpha1.Workspace, error)
- func (c *Client) DeleteNetworkRule(ctx context.Context, name, userId, networkRuleName string) (*wsv1alpha1.NetworkRule, error)
- func (c *Client) DeleteUser(ctx context.Context, userId string) (*wsv1alpha1.User, error)
- func (c *Client) DeleteWorkspace(ctx context.Context, name, userId string, opts ...client.DeleteOption) (*wsv1alpha1.Workspace, error)
- func (c *Client) GetDefaultPassword(ctx context.Context, userid string) (*string, error)
- func (c *Client) GetDefaultPasswordAwait(ctx context.Context, userId string) (*string, error)
- func (c *Client) GetTemplate(ctx context.Context, tmplName string) (*cosmov1alpha1.Template, error)
- func (c *Client) GetUser(ctx context.Context, name string) (*wsv1alpha1.User, error)
- func (c *Client) GetWorkspace(ctx context.Context, name, namespace string) (*wsv1alpha1.Workspace, error)
- func (c *Client) GetWorkspaceByUserID(ctx context.Context, name, userid string) (*wsv1alpha1.Workspace, error)
- func (c *Client) GetWorkspaceConfig(ctx context.Context, tmplName string) (cfg wsv1alpha1.Config, err error)
- func (c *Client) IsDefaultPassword(ctx context.Context, userid string) (bool, error)
- func (c *Client) ListTemplates(ctx context.Context) ([]cosmov1alpha1.Template, error)
- func (c *Client) ListUserAddonTemplates(ctx context.Context) ([]cosmov1alpha1.Template, error)
- func (c *Client) ListUsers(ctx context.Context) ([]wsv1alpha1.User, error)
- func (c *Client) ListWorkspaceTemplates(ctx context.Context) ([]cosmov1alpha1.Template, error)
- func (c *Client) ListWorkspaces(ctx context.Context, namespace string) ([]wsv1alpha1.Workspace, error)
- func (c *Client) ListWorkspacesByUserID(ctx context.Context, userId string) ([]wsv1alpha1.Workspace, error)
- func (c *Client) RegisterPassword(ctx context.Context, userid string, passwd []byte) error
- func (c *Client) ResetPassword(ctx context.Context, userid string) error
- func (c *Client) UpdateUser(ctx context.Context, userId string, opts UpdateUserOpts) (*wsv1alpha1.User, error)
- func (c *Client) UpdateWorkspace(ctx context.Context, name, userId string, opts UpdateWorkspaceOpts) (*wsv1alpha1.Workspace, error)
- func (c *Client) VerifyPassword(ctx context.Context, userid string, pass []byte) (verified bool, isDefault bool, err error)
- type ClientMock
- func (c *ClientMock) Clear()
- func (c *ClientMock) Create(ctx context.Context, obj client.Object, opts ...client.CreateOption) error
- func (c *ClientMock) Delete(ctx context.Context, obj client.Object, opts ...client.DeleteOption) error
- func (c *ClientMock) DeleteAllOf(ctx context.Context, obj client.Object, opts ...client.DeleteAllOfOption) error
- func (c *ClientMock) Get(ctx context.Context, key client.ObjectKey, obj client.Object) error
- func (c *ClientMock) IsCallingFrom(f interface{}) bool
- func (c *ClientMock) List(ctx context.Context, list client.ObjectList, opts ...client.ListOption) error
- func (c *ClientMock) Patch(ctx context.Context, obj client.Object, patch client.Patch, ...) error
- func (c *ClientMock) SetCreateError(caller interface{}, retErr error)
- func (c *ClientMock) SetDeleteAllOfError(caller interface{}, retErr error)
- func (c *ClientMock) SetDeleteError(caller interface{}, retErr error)
- func (c *ClientMock) SetGetError(caller interface{}, retErr error)
- func (c *ClientMock) SetListError(caller interface{}, retErr error)
- func (c *ClientMock) SetPatchError(caller interface{}, retErr error)
- func (c *ClientMock) SetUpdateError(caller interface{}, retErr error)
- func (c *ClientMock) Update(ctx context.Context, obj client.Object, opts ...client.UpdateOption) error
- type KosmoError
- type UpdateUserOpts
- type UpdateWorkspaceOpts
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrIsAlreadyExists = &KosmoError{} ErrNotFound = &KosmoError{} ErrBadRequest = &KosmoError{} ErrForbidden = &KosmoError{} ErrInternalServerError = &KosmoError{} )
View Source
var (
ErrNoItems = errors.New("no items")
)
Functions ¶
func NewBadRequestError ¶ added in v0.5.0
func NewForbiddenError ¶ added in v0.5.0
func NewInternalServerError ¶ added in v0.5.0
func NewIsAlreadyExistsError ¶ added in v0.5.0
func NewNotFoundError ¶ added in v0.5.0
func NewServiceUnavailableError ¶ added in v0.5.0
func NewUnauthorizedError ¶ added in v0.5.0
Types ¶
type Client ¶
func NewClientByRestConfig ¶
func (*Client) AddNetworkRule ¶ added in v0.5.0
func (*Client) CreateUser ¶
func (*Client) CreateWorkspace ¶ added in v0.5.0
func (*Client) DeleteNetworkRule ¶ added in v0.5.0
func (c *Client) DeleteNetworkRule(ctx context.Context, name, userId, networkRuleName string) (*wsv1alpha1.NetworkRule, error)
func (*Client) DeleteUser ¶
func (*Client) DeleteWorkspace ¶ added in v0.5.0
func (c *Client) DeleteWorkspace(ctx context.Context, name, userId string, opts ...client.DeleteOption) (*wsv1alpha1.Workspace, error)
func (*Client) GetDefaultPassword ¶
func (*Client) GetDefaultPasswordAwait ¶ added in v0.5.0
func (*Client) GetTemplate ¶
func (*Client) GetWorkspace ¶
func (*Client) GetWorkspaceByUserID ¶
func (*Client) GetWorkspaceConfig ¶
func (*Client) IsDefaultPassword ¶
func (*Client) ListTemplates ¶
func (*Client) ListUserAddonTemplates ¶ added in v0.5.0
func (*Client) ListWorkspaceTemplates ¶ added in v0.5.0
func (*Client) ListWorkspaces ¶
func (*Client) ListWorkspacesByUserID ¶
func (*Client) RegisterPassword ¶
func (*Client) ResetPassword ¶
func (*Client) UpdateUser ¶
func (c *Client) UpdateUser(ctx context.Context, userId string, opts UpdateUserOpts) (*wsv1alpha1.User, error)
func (*Client) UpdateWorkspace ¶ added in v0.5.0
func (c *Client) UpdateWorkspace(ctx context.Context, name, userId string, opts UpdateWorkspaceOpts) (*wsv1alpha1.Workspace, error)
type ClientMock ¶ added in v0.5.0
type ClientMock struct { client.Client GetMock func(ctx context.Context, key client.ObjectKey, obj client.Object) (mocked bool, err error) ListMock func(ctx context.Context, list client.ObjectList, opts ...client.ListOption) (mocked bool, err error) CreateMock func(ctx context.Context, obj client.Object, opts ...client.CreateOption) (mocked bool, err error) DeleteMock func(ctx context.Context, obj client.Object, opts ...client.DeleteOption) (mocked bool, err error) UpdateMock func(ctx context.Context, obj client.Object, opts ...client.UpdateOption) (mocked bool, err error) PatchMock func(ctx context.Context, obj client.Object, patch client.Patch, opts ...client.PatchOption) (mocked bool, err error) DeleteAllOfMock func(ctx context.Context, obj client.Object, opts ...client.DeleteAllOfOption) (mocked bool, err error) }
func NewClientMock ¶ added in v0.5.0
func NewClientMock(c client.Client) ClientMock
func (*ClientMock) Clear ¶ added in v0.5.0
func (c *ClientMock) Clear()
func (*ClientMock) Create ¶ added in v0.5.0
func (c *ClientMock) Create(ctx context.Context, obj client.Object, opts ...client.CreateOption) error
func (*ClientMock) Delete ¶ added in v0.5.0
func (c *ClientMock) Delete(ctx context.Context, obj client.Object, opts ...client.DeleteOption) error
func (*ClientMock) DeleteAllOf ¶ added in v0.5.0
func (c *ClientMock) DeleteAllOf(ctx context.Context, obj client.Object, opts ...client.DeleteAllOfOption) error
func (*ClientMock) IsCallingFrom ¶ added in v0.5.0
func (c *ClientMock) IsCallingFrom(f interface{}) bool
func (*ClientMock) List ¶ added in v0.5.0
func (c *ClientMock) List(ctx context.Context, list client.ObjectList, opts ...client.ListOption) error
func (*ClientMock) Patch ¶ added in v0.5.0
func (c *ClientMock) Patch(ctx context.Context, obj client.Object, patch client.Patch, opts ...client.PatchOption) error
func (*ClientMock) SetCreateError ¶ added in v0.5.0
func (c *ClientMock) SetCreateError(caller interface{}, retErr error)
func (*ClientMock) SetDeleteAllOfError ¶ added in v0.5.0
func (c *ClientMock) SetDeleteAllOfError(caller interface{}, retErr error)
func (*ClientMock) SetDeleteError ¶ added in v0.5.0
func (c *ClientMock) SetDeleteError(caller interface{}, retErr error)
func (*ClientMock) SetGetError ¶ added in v0.5.0
func (c *ClientMock) SetGetError(caller interface{}, retErr error)
func (*ClientMock) SetListError ¶ added in v0.5.0
func (c *ClientMock) SetListError(caller interface{}, retErr error)
func (*ClientMock) SetPatchError ¶ added in v0.5.0
func (c *ClientMock) SetPatchError(caller interface{}, retErr error)
func (*ClientMock) SetUpdateError ¶ added in v0.5.0
func (c *ClientMock) SetUpdateError(caller interface{}, retErr error)
func (*ClientMock) Update ¶ added in v0.5.0
func (c *ClientMock) Update(ctx context.Context, obj client.Object, opts ...client.UpdateOption) error
type KosmoError ¶ added in v0.5.0
type KosmoError struct {
// contains filtered or unexported fields
}
func (*KosmoError) Error ¶ added in v0.5.0
func (e *KosmoError) Error() string
func (*KosmoError) Is ¶ added in v0.5.0
func (e *KosmoError) Is(target error) bool
func (*KosmoError) Unwrap ¶ added in v0.5.0
func (e *KosmoError) Unwrap() error
type UpdateUserOpts ¶ added in v0.5.0
type UpdateWorkspaceOpts ¶ added in v0.5.0
type UpdateWorkspaceOpts struct {
Replicas *int64
}
Click to show internal directories.
Click to hide internal directories.