auth
auth/profile.go
Allow executing tests in parallel. Add t.Parallel() to tests so they can execute in parallel.
1 package auth
3 import (
4 "time"
6 "secondbit.org/uuid"
7 )
9 type Profile struct {
10 ID uuid.ID
11 Name string
12 Passphrase string
13 Email string
14 Created time.Time
15 LastSeen time.Time
16 }
18 type Login struct {
19 Type string
20 Value string
21 ProfileID uuid.ID
22 Created time.Time
23 LastUsed time.Time
24 }
26 type ProfileStore interface {
27 GetProfileByID(id uuid.ID) (Profile, error)
28 GetProfileByLogin(loginType, value, passphrase string) (Profile, error)
29 SaveProfile(user Profile) error
30 UpdateProfile(id uuid.ID, name, passphrase, email *string) error
31 DeleteProfile(id uuid.ID) error
33 SaveLogin(login Login) error
34 DeleteLogin(login Login) error
35 UpdateLogin(id uuid.ID, lastUsed time.Time) error
36 }