aboutsummaryrefslogtreecommitdiffstats
path: root/cache/resolvers.go
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2022-11-29 13:01:53 +0100
committerMichael Muré <batolettre@gmail.com>2022-11-29 13:01:53 +0100
commit4a341b5e1714a6a36ec7f5839a6a1b73571d4851 (patch)
tree261e108d1c9bd78e15e19379f611cfecb900fef5 /cache/resolvers.go
parent0ac39a7ab5db077fcf0df827e32bf6e625e980da (diff)
downloadgit-bug-4a341b5e1714a6a36ec7f5839a6a1b73571d4851.tar.gz
WIP
Diffstat (limited to 'cache/resolvers.go')
-rw-r--r--cache/resolvers.go42
1 files changed, 0 insertions, 42 deletions
diff --git a/cache/resolvers.go b/cache/resolvers.go
deleted file mode 100644
index 9ed2fa4c..00000000
--- a/cache/resolvers.go
+++ /dev/null
@@ -1,42 +0,0 @@
-package cache
-
-import (
- "github.com/MichaelMure/git-bug/entity"
-)
-
-func makeResolvers(cache *RepoCache) entity.Resolvers {
- return entity.Resolvers{
- &IdentityCache{}: newIdentityCacheResolver(cache),
- &BugCache{}: newBugCacheResolver(cache),
- }
-}
-
-var _ entity.Resolver = &identityCacheResolver{}
-
-// identityCacheResolver is an identity Resolver that retrieve identities from
-// the cache
-type identityCacheResolver struct {
- cache *RepoCache
-}
-
-func newIdentityCacheResolver(cache *RepoCache) *identityCacheResolver {
- return &identityCacheResolver{cache: cache}
-}
-
-func (i *identityCacheResolver) Resolve(id entity.Id) (entity.Interface, error) {
- return i.cache.ResolveIdentity(id)
-}
-
-var _ entity.Resolver = &bugCacheResolver{}
-
-type bugCacheResolver struct {
- cache *RepoCache
-}
-
-func newBugCacheResolver(cache *RepoCache) *bugCacheResolver {
- return &bugCacheResolver{cache: cache}
-}
-
-func (b *bugCacheResolver) Resolve(id entity.Id) (entity.Interface, error) {
- return b.cache.ResolveBug(id)
-}