From 71f9290fdae7551f3d3ada2179ece4084304d734 Mon Sep 17 00:00:00 2001 From: Michael Muré Date: Tue, 19 Feb 2019 00:19:27 +0100 Subject: identity: store the times properly --- identity/bare.go | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'identity/bare.go') diff --git a/identity/bare.go b/identity/bare.go index c54277a0..d3f7655a 100644 --- a/identity/bare.go +++ b/identity/bare.go @@ -65,6 +65,7 @@ func (i *Bare) UnmarshalJSON(data []byte) error { return nil } +// Id return the Identity identifier func (i *Bare) Id() string { // We don't have a proper ID at hand, so let's hash all the data to get one. // Hopefully the @@ -84,18 +85,22 @@ func (i *Bare) Id() string { return i.id } +// Name return the last version of the name func (i *Bare) Name() string { return i.name } +// Email return the last version of the email func (i *Bare) Email() string { return i.email } +// Login return the last version of the login func (i *Bare) Login() string { return i.login } +// AvatarUrl return the last version of the Avatar URL func (i *Bare) AvatarUrl() string { return i.avatarUrl } @@ -164,12 +169,14 @@ func (i *Bare) Validate() error { // Write the identity into the Repository. In particular, this ensure that // the Id is properly set. -func (i *Bare) Commit(repo repository.Repo) error { +func (i *Bare) Commit(repo repository.ClockedRepo) error { // Nothing to do, everything is directly embedded return nil } -func (i *Bare) CommitAsNeeded(repo repository.Repo) error { +// If needed, write the identity into the Repository. In particular, this +// ensure that the Id is properly set. +func (i *Bare) CommitAsNeeded(repo repository.ClockedRepo) error { // Nothing to do, everything is directly embedded return nil } -- cgit