in isshub.domain.contexts.code_repository.repositories View Git history
“namespace” package
namespace¶
Package defining the repository for the Namespace entity.
-
class
AbstractNamespaceRepository(*args, **kwds)[source]¶ Bases:
isshub.domain.utils.repository.AbstractRepositoryBase repository for the
Namespaceentity.-
abstract
for_namespace(namespace)[source]¶ Iterate on namespaces found in the given namespace, or with no namespace if
None.- Parameters
namespace (Union[Namespace, None]) – The namespace for which we want to find the namespaces. If
None, will look for namespaces having no parent namespace.- Returns
An iterable of the namespaces found in the namespace (or that have no namespace if namespace is
None)- Return type
Iterable[Namespace]
-
exception
NotFoundError(message, repository=None)¶
-
exception
UniquenessError(message, repository=None)¶
-
entity_class¶ alias of
isshub.domain.contexts.code_repository.entities.namespace.Namespace
-
abstract
-
class
InMemoryNamespaceRepository[source]¶ Bases:
isshub.domain.utils.repository.AbstractInMemoryRepository,isshub.domain.contexts.code_repository.repositories.namespace.AbstractNamespaceRepositoryRepository to handle
Namespaceentities in memory.-
add(entity)[source]¶ Add the given Namespace entity in the repository.
For the parameters, see
AbstractRepository.add.- Returns
The added Namespace
- Return type
- Raises
self.UniquenessError –
If a namespace with the same identifier as the given one already exists. - If a namespace with the same name and parent namespace (including no namespace) as the given one already exists.
-
for_namespace(namespace)[source]¶ Iterate on namespaces found in the given namespace, or with no namespace if
None.For the parameters, see
AbstractNamespaceRepository.for_namespace- Returns
An iterable of the namespaces found in the namespace
- Return type
Iterable[Namespace]
-
exception
NotFoundError(message, repository=None)¶
-
exception
UniquenessError(message, repository=None)¶
-
entity_class¶ alias of
isshub.domain.contexts.code_repository.entities.namespace.Namespace
-