lens @ 4d930c0c8cb585979798fac2bb254f991faa62fb

 1package user
 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	Repository interface {
29		List(ctx context.Context) ([]*User, error)
30		Create(ctx context.Context, createUser *CreateUser) error
31		Update(ctx context.Context, id uint, updateUser *UpdateUser) error
32		Any(ctx context.Context) (bool, error)
33	}
34)