blob: e46ef4979fc10a82e1822ab6a692c19774093525 (
plain)
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
|
package auth
import "context"
type (
// TODO: move to user later
User struct {
ID uint
Username string
Name string
}
// TODO: move to user later
UpdateUser struct {
Username string
Name string
}
// TODO: move to user later
CreateUser struct {
Username string
Name string
Password []byte
}
Repository interface {
GetIDByUsername(ctx context.Context, username string) (uint, error)
GetPassword(ctx context.Context, id uint) ([]byte, error)
// TODO: move to user later
Create(ctx context.Context, createUser *CreateUser) (uint, error)
}
)
|