-
Notifications
You must be signed in to change notification settings - Fork 49
Expand file tree
/
Copy pathuser.go
More file actions
37 lines (27 loc) · 901 Bytes
/
Copy pathuser.go
File metadata and controls
37 lines (27 loc) · 901 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
package common
import (
"github.com/stretchr/objx"
)
const (
UserKeyAuthCode string = "authCode"
UserKeyProviderCredentials string = "creds"
)
type User interface {
// Email gets the users email address.
Email() string
// Name gets the users full name.
Name() string
// Nickname gets the users nickname or username.
Nickname() string
// AvatarURL gets the URL of an image representing the user.
AvatarURL() string
// ProviderCredentials gets a map of Credentials (by provider name).
ProviderCredentials() map[string]*Credentials
// IDForProvider gets the ID value for the specified provider name for
// this user from the ProviderCredentials data.
IDForProvider(provider string) string
// AuthCode gets this user's globally unique ID (generated by the host program)
AuthCode() string
// Data gets the underlying data that makes up this User.
Data() objx.Map
}