1package identity
2
3import (
4 "github.com/MichaelMure/git-bug/util/lamport"
5)
6
7type Interface interface {
8 Id() string
9
10 Name() string
11 Email() string
12 Login() string
13 AvatarUrl() string
14
15 // Keys return the last version of the valid keys
16 Keys() []Key
17
18 // ValidKeysAtTime return the set of keys valid at a given lamport time
19 ValidKeysAtTime(time lamport.Time) []Key
20
21 // DisplayName return a non-empty string to display, representing the
22 // identity, based on the non-empty values.
23 DisplayName() string
24
25 // Match tell is the Person match the given query string
26 Match(query string) bool
27
28 // Validate check if the Identity data is valid
29 Validate() error
30
31 // IsProtected return true if the chain of git commits started to be signed.
32 // If that's the case, only signed commit with a valid key for this identity can be added.
33 IsProtected() bool
34}