Documentation
¶
Index ¶
- Variables
- func FilterTemplates(ctx context.Context, tmpls []cosmov1alpha1.TemplateObject, ...) []cosmov1alpha1.TemplateObject
- func HasRequiredAddons(ctx context.Context, u *cosmov1alpha1.User, tmpl cosmov1alpha1.TemplateObject) bool
- func InstanceEventf(rec record.EventRecorder, inst cosmov1alpha1.InstanceObject, ...)
- func IsAllowedToUseTemplate(ctx context.Context, u *cosmov1alpha1.User, tmpl cosmov1alpha1.TemplateObject) bool
- func UserEventf(rec record.EventRecorder, user *cosmov1alpha1.User, ...)
- func WorkspaceEventf(rec record.EventRecorder, ws *cosmov1alpha1.Workspace, ...)
- type Client
- func (c *Client) AddNetworkRule(ctx context.Context, name, username string, r cosmov1alpha1.NetworkRule, ...) (*cosmov1alpha1.NetworkRule, error)
- func (c *Client) CreateUser(ctx context.Context, username string, displayName string, roles []string, ...) (*cosmov1alpha1.User, error)
- func (c *Client) CreateWorkspace(ctx context.Context, username, wsName, tmplName string, vars map[string]string, ...) (*cosmov1alpha1.Workspace, error)
- func (c *Client) DeleteNetworkRule(ctx context.Context, name, username string, index int) (*cosmov1alpha1.NetworkRule, error)
- func (c *Client) DeleteUser(ctx context.Context, username string) (*cosmov1alpha1.User, error)
- func (c *Client) DeleteWorkspace(ctx context.Context, name, username string, opts ...client.DeleteOption) (*cosmov1alpha1.Workspace, error)
- func (c *Client) GetDefaultPassword(ctx context.Context, username string) (*string, error)
- func (c *Client) GetDefaultPasswordAwait(ctx context.Context, username string) (*string, error)
- func (c *Client) GetUser(ctx context.Context, name string) (*cosmov1alpha1.User, error)
- func (c *Client) GetWorkspace(ctx context.Context, name, namespace string) (*cosmov1alpha1.Workspace, error)
- func (c *Client) GetWorkspaceByUserName(ctx context.Context, name, username string) (*cosmov1alpha1.Workspace, error)
- func (c *Client) GetWorkspaceConfig(ctx context.Context, tmplName string) (cfg cosmov1alpha1.Config, err error)
- func (c *Client) IsDefaultPassword(ctx context.Context, username string) (bool, error)
- func (c *Client) ListEvents(ctx context.Context, namespace string) ([]eventsv1.Event, error)
- func (c *Client) ListUserAddonTemplates(ctx context.Context) ([]cosmov1alpha1.TemplateObject, error)
- func (c *Client) ListUsers(ctx context.Context) ([]cosmov1alpha1.User, error)
- func (c *Client) ListWorkspaceTemplates(ctx context.Context) ([]cosmov1alpha1.TemplateObject, error)
- func (c *Client) ListWorkspacesByUserName(ctx context.Context, username string, optFunc ...func(*ListWorkspacesOptions)) ([]cosmov1alpha1.Workspace, error)
- func (c *Client) RegisterPassword(ctx context.Context, username string, passwd []byte) error
- func (c *Client) ResetPassword(ctx context.Context, username string) error
- func (c *Client) UpdateEventAnnotations(ctx context.Context, event *eventsv1.Event) error
- func (c *Client) UpdateUser(ctx context.Context, username string, opts UpdateUserOpts) (*cosmov1alpha1.User, error)
- func (c *Client) UpdateWorkspace(ctx context.Context, name, username string, opts UpdateWorkspaceOpts) (*cosmov1alpha1.Workspace, error)
- func (c *Client) VerifyPassword(ctx context.Context, username string, pass []byte) (verified bool, isDefault bool, err error)
- type ListWorkspacesOptions
- type UpdateUserOpts
- type UpdateWorkspaceOpts
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrNoItems = errors.New("no items")
)
Functions ¶
func FilterTemplates ¶
func FilterTemplates(ctx context.Context, tmpls []cosmov1alpha1.TemplateObject, u *cosmov1alpha1.User) []cosmov1alpha1.TemplateObject
func HasRequiredAddons ¶
func HasRequiredAddons(ctx context.Context, u *cosmov1alpha1.User, tmpl cosmov1alpha1.TemplateObject) bool
func InstanceEventf ¶
func InstanceEventf(rec record.EventRecorder, inst cosmov1alpha1.InstanceObject, eventType, reason, messageFmt string, args ...interface{})
func IsAllowedToUseTemplate ¶
func IsAllowedToUseTemplate(ctx context.Context, u *cosmov1alpha1.User, tmpl cosmov1alpha1.TemplateObject) bool
func UserEventf ¶
func UserEventf(rec record.EventRecorder, user *cosmov1alpha1.User, eventType, reason, messageFmt string, args ...interface{})
func WorkspaceEventf ¶
func WorkspaceEventf(rec record.EventRecorder, ws *cosmov1alpha1.Workspace, eventType, reason, messageFmt string, args ...interface{})
Types ¶
type Client ¶
func NewClientByRestConfig ¶
func (*Client) AddNetworkRule ¶ added in v0.5.0
func (c *Client) AddNetworkRule(ctx context.Context, name, username string, r cosmov1alpha1.NetworkRule, index int) (*cosmov1alpha1.NetworkRule, error)
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, username string, index int) (*cosmov1alpha1.NetworkRule, error)
func (*Client) DeleteUser ¶
func (*Client) DeleteWorkspace ¶ added in v0.5.0
func (c *Client) DeleteWorkspace(ctx context.Context, name, username string, opts ...client.DeleteOption) (*cosmov1alpha1.Workspace, error)
func (*Client) GetDefaultPassword ¶
func (*Client) GetDefaultPasswordAwait ¶ added in v0.5.0
func (*Client) GetWorkspace ¶
func (*Client) GetWorkspaceByUserName ¶ added in v0.8.0
func (*Client) GetWorkspaceConfig ¶
func (*Client) IsDefaultPassword ¶
func (*Client) ListEvents ¶
func (*Client) ListUserAddonTemplates ¶ added in v0.5.0
func (c *Client) ListUserAddonTemplates(ctx context.Context) ([]cosmov1alpha1.TemplateObject, error)
func (*Client) ListWorkspaceTemplates ¶ added in v0.5.0
func (c *Client) ListWorkspaceTemplates(ctx context.Context) ([]cosmov1alpha1.TemplateObject, error)
func (*Client) ListWorkspacesByUserName ¶ added in v0.8.0
func (c *Client) ListWorkspacesByUserName(ctx context.Context, username string, optFunc ...func(*ListWorkspacesOptions)) ([]cosmov1alpha1.Workspace, error)
func (*Client) RegisterPassword ¶
func (*Client) ResetPassword ¶
func (*Client) UpdateEventAnnotations ¶
func (*Client) UpdateUser ¶
func (c *Client) UpdateUser(ctx context.Context, username string, opts UpdateUserOpts) (*cosmov1alpha1.User, error)
func (*Client) UpdateWorkspace ¶ added in v0.5.0
func (c *Client) UpdateWorkspace(ctx context.Context, name, username string, opts UpdateWorkspaceOpts) (*cosmov1alpha1.Workspace, error)
type ListWorkspacesOptions ¶
type ListWorkspacesOptions struct {
}type UpdateUserOpts ¶ added in v0.5.0
type UpdateUserOpts struct { DisplayName *string UserRoles []cosmov1alpha1.UserRole UserAddons []cosmov1alpha1.UserAddon DeletePolicy *string }
Source Files
¶
Click to show internal directories.
Click to hide internal directories.