in isshub.domain.contexts.code_repository.repositories View Git history

“repository” package

repository

Package defining the repository for the Repository entity.

class AbstractRepositoryRepository(*args, **kwds)[source]

Bases: isshub.domain.utils.repository.AbstractRepository

Base repository for the Repository entity.

abstract for_namespace(namespace)[source]

Iterate on repositories found in the given namespace.

Parameters

namespace (Namespace) – The namespace for which we want to find the repositories

Returns

An iterable of the repositories found in the namespace

Return type

Iterable[Repository]

exception NotFoundError(message, repository=None)

Bases: isshub.domain.utils.repository.NotFoundError

repository

alias of isshub.domain.contexts.code_repository.repositories.repository.AbstractRepositoryRepository

exception UniquenessError(message, repository=None)

Bases: isshub.domain.utils.repository.UniquenessError

repository

alias of isshub.domain.contexts.code_repository.repositories.repository.AbstractRepositoryRepository

entity_class

alias of isshub.domain.contexts.code_repository.entities.repository.Repository

class InMemoryRepositoryRepository[source]

Bases: isshub.domain.utils.repository.AbstractInMemoryRepository, isshub.domain.contexts.code_repository.repositories.repository.AbstractRepositoryRepository

Repository to handle Repository entities in memory.

add(entity)[source]

Add the given Repository entity in the repository.

For the parameters, see AbstractRepository.add.

Returns

The added Repository

Return type

Repository

Raises

self.UniquenessError

  • If a repository with the same identifier as the given one already exists. - If a repository with the same name and namespace as the given one already exists.

for_namespace(namespace)[source]

Iterate on repositories found in the given namespace.

For the parameters, see AbstractRepositoryRepository.for_namespace

Returns

An iterable of the repositories found in the namespace

Return type

Iterable[Repository]

exception NotFoundError(message, repository=None)

Bases: isshub.domain.utils.repository.NotFoundError

repository

alias of isshub.domain.contexts.code_repository.repositories.repository.InMemoryRepositoryRepository

exception UniquenessError(message, repository=None)

Bases: isshub.domain.utils.repository.UniquenessError

repository

alias of isshub.domain.contexts.code_repository.repositories.repository.InMemoryRepositoryRepository

entity_class

alias of isshub.domain.contexts.code_repository.entities.repository.Repository