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