From 390b13c9ff69f3d42860b5f8109eb134459c40b1 Mon Sep 17 00:00:00 2001 From: Michael Muré Date: Tue, 14 Jan 2020 22:01:44 +0100 Subject: identity: rework mutation --- cache/identity_cache.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'cache/identity_cache.go') diff --git a/cache/identity_cache.go b/cache/identity_cache.go index 2ae55f2d..f9c928fe 100644 --- a/cache/identity_cache.go +++ b/cache/identity_cache.go @@ -21,8 +21,8 @@ func (i *IdentityCache) notifyUpdated() error { return i.repoCache.identityUpdated(i.Identity.Id()) } -func (i *IdentityCache) AddVersion(version *identity.Version) error { - i.Identity.AddVersion(version) +func (i *IdentityCache) Mutate(f func(identity.VersionMutator) identity.VersionMutator) error { + i.Identity.Mutate(f) return i.notifyUpdated() } -- cgit From 8da522d97af3dcaca8a8424e3541705c69779d6f Mon Sep 17 00:00:00 2001 From: Michael Muré Date: Tue, 21 Jan 2020 18:49:33 +0100 Subject: wip --- cache/identity_cache.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cache/identity_cache.go') diff --git a/cache/identity_cache.go b/cache/identity_cache.go index f9c928fe..e2129f84 100644 --- a/cache/identity_cache.go +++ b/cache/identity_cache.go @@ -21,7 +21,7 @@ func (i *IdentityCache) notifyUpdated() error { return i.repoCache.identityUpdated(i.Identity.Id()) } -func (i *IdentityCache) Mutate(f func(identity.VersionMutator) identity.VersionMutator) error { +func (i *IdentityCache) Mutate(f func(identity.IdentityMutator) identity.IdentityMutator) error { i.Identity.Mutate(f) return i.notifyUpdated() } -- cgit From 74e91144105790cc997c1d79a7f638e1e3a1f3f8 Mon Sep 17 00:00:00 2001 From: Michael Muré Date: Fri, 24 Jan 2020 00:30:13 +0100 Subject: more more wip --- cache/identity_cache.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cache/identity_cache.go') diff --git a/cache/identity_cache.go b/cache/identity_cache.go index e2129f84..eb5ee183 100644 --- a/cache/identity_cache.go +++ b/cache/identity_cache.go @@ -21,7 +21,7 @@ func (i *IdentityCache) notifyUpdated() error { return i.repoCache.identityUpdated(i.Identity.Id()) } -func (i *IdentityCache) Mutate(f func(identity.IdentityMutator) identity.IdentityMutator) error { +func (i *IdentityCache) Mutate(f func(identity.Mutator) identity.Mutator) error { i.Identity.Mutate(f) return i.notifyUpdated() } -- cgit