lens @ 6e84441dab0a2b89869e33d7e89d14189d9b67c0

 1package repository
 2
 3import "context"
 4
 5type (
 6	User struct {
 7		ID       uint
 8		Username string
 9		Name     string
10		IsAdmin  bool
11		Path     string
12	}
13
14	UpdateUser struct {
15		Username string
16		Name     string
17		Password string
18	}
19
20	CreateUser struct {
21		Username string
22		Name     string
23		Password []byte
24		IsAdmin  bool
25		Path     string
26	}
27
28	UserRepository interface {
29		Get(ctx context.Context, id uint) (*User, error)
30		List(ctx context.Context) ([]*User, error)
31		Create(ctx context.Context, createUser *CreateUser) (uint, error)
32		Update(ctx context.Context, id uint, updateUser *UpdateUser) error
33		Any(ctx context.Context) (bool, error)
34	}
35)