From ca720f165cb286d4372ad48595e532a2423f2f07 Mon Sep 17 00:00:00 2001 From: Michael Muré Date: Wed, 16 Sep 2020 16:22:02 +0200 Subject: cache,bug,identity: structural change - bug doesn't commit identities anymore, only make sure they are commit - cache use an IdentityResolver to load bugs with identities from the cache (deps injection) - IdentityCache now are identity.Interface --- identity/identity.go | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'identity/identity.go') diff --git a/identity/identity.go b/identity/identity.go index c43cfd97..c960a1af 100644 --- a/identity/identity.go +++ b/identity/identity.go @@ -180,19 +180,19 @@ type StreamedIdentity struct { Err error } -// ReadAllLocalIdentities read and parse all local Identity -func ReadAllLocalIdentities(repo repository.ClockedRepo) <-chan StreamedIdentity { - return readAllIdentities(repo, identityRefPattern) +// ReadAllLocal read and parse all local Identity +func ReadAllLocal(repo repository.ClockedRepo) <-chan StreamedIdentity { + return readAll(repo, identityRefPattern) } -// ReadAllRemoteIdentities read and parse all remote Identity for a given remote -func ReadAllRemoteIdentities(repo repository.ClockedRepo, remote string) <-chan StreamedIdentity { +// ReadAllRemote read and parse all remote Identity for a given remote +func ReadAllRemote(repo repository.ClockedRepo, remote string) <-chan StreamedIdentity { refPrefix := fmt.Sprintf(identityRemoteRefPattern, remote) - return readAllIdentities(repo, refPrefix) + return readAll(repo, refPrefix) } -// Read and parse all available bug with a given ref prefix -func readAllIdentities(repo repository.ClockedRepo, refPrefix string) <-chan StreamedIdentity { +// readAll read and parse all available bug with a given ref prefix +func readAll(repo repository.ClockedRepo, refPrefix string) <-chan StreamedIdentity { out := make(chan StreamedIdentity) go func() { -- cgit