diff options
Diffstat (limited to 'identity/resolver.go')
-rw-r--r-- | identity/resolver.go | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/identity/resolver.go b/identity/resolver.go index 7facfc0c..70fac74c 100644 --- a/identity/resolver.go +++ b/identity/resolver.go @@ -1,11 +1,14 @@ package identity -import "github.com/MichaelMure/git-bug/repository" +import ( + "github.com/MichaelMure/git-bug/entity" + "github.com/MichaelMure/git-bug/repository" +) // Resolver define the interface of an Identity resolver, able to load // an identity from, for example, a repo or a cache. type Resolver interface { - ResolveIdentity(id string) (Interface, error) + ResolveIdentity(id entity.Id) (Interface, error) } // DefaultResolver is a Resolver loading Identities directly from a Repo @@ -17,6 +20,6 @@ func NewSimpleResolver(repo repository.Repo) *SimpleResolver { return &SimpleResolver{repo: repo} } -func (r *SimpleResolver) ResolveIdentity(id string) (Interface, error) { +func (r *SimpleResolver) ResolveIdentity(id entity.Id) (Interface, error) { return ReadLocal(r.repo, id) } |