in isshub.domain.contexts.code_repository.entities View Git history
“namespace” package
namespace¶
Package defining the Namespace entity.
-
class
NamespaceKind(value)[source]¶ Bases:
enum.EnumAll the available kinds of namespace.
-
ORGANIZATION= 'Organization'¶
-
TEAM= 'Team'¶
-
GROUP= 'Group'¶
-
-
class
Namespace(*, identifier, name, kind, namespace=None, description=None)[source]¶ Bases:
isshub.domain.utils.entity.BaseEntityWithIdentifierA namespace can contain namespaces and repositories.
- Variables
identifier (UUID) – The unique identifier of the namespace
name (str) – The name of the namespace. Unique in its parent namespace.
namespace (Optional[Namespace]) – Where the namespace can be found.
kind (NamespaceKind) – The kind of namespace.
description (Optional[str]) – The description of the namespace.
-
name: str¶
-
namespace: Optional[isshub.domain.contexts.code_repository.entities.namespace.Namespace]¶
-
description: Optional[str]¶
-
validate_namespace_is_not_in_a_loop(field, value)[source]¶ Validate that the
Namespace.namespacefield is not in a loop.Being in a loop means that one of the descendants is the parent of one of the ascendants.
- Parameters
field (Any) – The field to validate.
value (Any) – The value to validate for the field.
- Raises
ValueError – If the given namespace (value) is in a loop
- Return type
None