lens @ 249ee195ce52ee4a4defeb67a33ef353919d3a11

 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 string
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	}
33)