Documentation ¶
Index ¶
- Constants
- Variables
- func BytesEqual(a, b []byte) bool
- func FillTypeMeta(obj GVKSetter, gv schema.GroupVersion)
- func LooseDeepEqual(x, y Comparable, opts ...deepEqualOption) bool
- func PodStatusReason(pod corev1.Pod) string
- func WithPrintDiff() deepEqualOption
- type Client
- func (c *Client) Apply(ctx context.Context, obj *unstructured.Unstructured, fieldManager string, ...) (patched *unstructured.Unstructured, err error)
- func (c *Client) CreateUser(ctx context.Context, user *wsv1alpha1.User) (*wsv1alpha1.User, error)
- func (c *Client) DeleteUser(ctx context.Context, userid string, opts ...client.DeleteOption) (*wsv1alpha1.User, error)
- func (c *Client) GetDefaultPassword(ctx context.Context, userid string) (*string, error)
- func (c *Client) GetInstance(ctx context.Context, name, namespace string) (*cosmov1alpha1.Instance, error)
- func (c *Client) GetTemplate(ctx context.Context, tmplName string) (*cosmov1alpha1.Template, error)
- func (c *Client) GetUnstructured(ctx context.Context, gvk schema.GroupVersionKind, name, namespace string) (*unstructured.Unstructured, error)
- func (c *Client) GetUser(ctx context.Context, userid string) (*wsv1alpha1.User, error)
- func (c *Client) GetUserNamespace(ctx context.Context, userid string) (*corev1.Namespace, 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) GetWorkspaceServicesAndIngress(ctx context.Context, ws wsv1alpha1.Workspace) (svc corev1.Service, ing netv1.Ingress, err error)
- func (c *Client) IsDefaultPassword(ctx context.Context, userid string) (bool, error)
- func (c *Client) ListInstances(ctx context.Context, namespace string) ([]cosmov1alpha1.Instance, error)
- func (c *Client) ListInstancesByType(ctx context.Context, namespace string, types []string) ([]cosmov1alpha1.Instance, error)
- func (c *Client) ListTemplates(ctx context.Context) ([]cosmov1alpha1.Template, error)
- func (c *Client) ListTemplatesByType(ctx context.Context, tmplTypes []string) ([]cosmov1alpha1.Template, error)
- func (c *Client) ListUsers(ctx context.Context) ([]wsv1alpha1.User, error)
- func (c *Client) ListWorkspacePods(ctx context.Context, ws wsv1alpha1.Workspace) ([]corev1.Pod, 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, password []byte) error
- func (c *Client) ResetPassword(ctx context.Context, userid string) error
- func (c *Client) UpdateUser(ctx context.Context, user *wsv1alpha1.User, opts ...client.UpdateOption) (*wsv1alpha1.User, error)
- func (c *Client) VerifyPassword(ctx context.Context, userid string, pass []byte) (verified bool, isDefault bool, err error)
- type Comparable
- type GVKSetter
Constants ¶
View Source
const (
DefaultServiceAccount = "default"
)
Variables ¶
View Source
var ( DeploymentGVK = schema.GroupVersionKind{ Group: appsv1.GroupName, Version: "v1", Kind: "Deployment", } ServiceGVK = schema.GroupVersionKind{ Group: corev1.GroupName, Version: "v1", Kind: "Service", } IngressGVK = schema.GroupVersionKind{ Group: netv1.GroupName, Version: "v1", Kind: "Ingress", } )
View Source
var (
ErrNoItems = errors.New("no items")
)
Functions ¶
func BytesEqual ¶
func FillTypeMeta ¶
func FillTypeMeta(obj GVKSetter, gv schema.GroupVersion)
FillTypeMeta fills typemeta to marshall yaml
func LooseDeepEqual ¶
func LooseDeepEqual(x, y Comparable, opts ...deepEqualOption) bool
LooseDeepEqual deep equal objects without dynamic values This function removes some fields, so you should give deep-copied objects.
func PodStatusReason ¶
func WithPrintDiff ¶
func WithPrintDiff() deepEqualOption
Types ¶
type Client ¶
func NewClientByRestConfig ¶
func (*Client) Apply ¶
func (c *Client) Apply(ctx context.Context, obj *unstructured.Unstructured, fieldManager string, dryrun, force bool) (patched *unstructured.Unstructured, err error)
func (*Client) CreateUser ¶
func (c *Client) CreateUser(ctx context.Context, user *wsv1alpha1.User) (*wsv1alpha1.User, error)
func (*Client) DeleteUser ¶
func (c *Client) DeleteUser(ctx context.Context, userid string, opts ...client.DeleteOption) (*wsv1alpha1.User, error)
func (*Client) GetDefaultPassword ¶
func (*Client) GetInstance ¶
func (*Client) GetTemplate ¶
func (*Client) GetUnstructured ¶
func (c *Client) GetUnstructured(ctx context.Context, gvk schema.GroupVersionKind, name, namespace string) (*unstructured.Unstructured, error)
func (*Client) GetUserNamespace ¶
func (*Client) GetWorkspace ¶
func (*Client) GetWorkspaceByUserID ¶
func (*Client) GetWorkspaceConfig ¶
func (*Client) GetWorkspaceServicesAndIngress ¶
func (*Client) IsDefaultPassword ¶
func (*Client) ListInstances ¶
func (*Client) ListInstancesByType ¶
func (*Client) ListTemplates ¶
func (*Client) ListTemplatesByType ¶
func (*Client) ListWorkspacePods ¶
func (*Client) ListWorkspaces ¶
func (*Client) ListWorkspacesByUserID ¶
func (*Client) RegisterPassword ¶
func (*Client) ResetPassword ¶
func (*Client) UpdateUser ¶
func (c *Client) UpdateUser(ctx context.Context, user *wsv1alpha1.User, opts ...client.UpdateOption) (*wsv1alpha1.User, error)
type Comparable ¶
type Comparable interface { GetManagedFields() []metav1.ManagedFieldsEntry SetManagedFields(managedFields []metav1.ManagedFieldsEntry) SetResourceVersion(resourceVersion string) }
type GVKSetter ¶
type GVKSetter interface {
SetGroupVersionKind(gvk schema.GroupVersionKind)
}
Click to show internal directories.
Click to hide internal directories.