diff options
Diffstat (limited to 'identity/interface.go')
-rw-r--r-- | identity/interface.go | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/identity/interface.go b/identity/interface.go index bbb94be7..a7174962 100644 --- a/identity/interface.go +++ b/identity/interface.go @@ -2,14 +2,12 @@ package identity import ( "github.com/MichaelMure/git-bug/entity" - "github.com/MichaelMure/git-bug/repository" "github.com/MichaelMure/git-bug/util/lamport" "github.com/MichaelMure/git-bug/util/timestamp" ) type Interface interface { - // Id return the Identity identifier - Id() entity.Id + entity.Interface // Name return the last version of the name // Can be empty. @@ -45,14 +43,6 @@ type Interface interface { // Validate check if the Identity data is valid Validate() error - // Write the identity into the Repository. In particular, this ensure that - // the Id is properly set. - Commit(repo repository.ClockedRepo) error - - // If needed, write the identity into the Repository. In particular, this - // ensure that the Id is properly set. - CommitAsNeeded(repo repository.ClockedRepo) error - // IsProtected return true if the chain of git commits started to be signed. // If that's the case, only signed commit with a valid key for this identity can be added. IsProtected() bool @@ -62,4 +52,7 @@ type Interface interface { // LastModification return the timestamp at which the last version of the identity became valid. LastModification() timestamp.Timestamp + + // Indicate that the in-memory state changed and need to be commit in the repository + NeedCommit() bool } |