lens @ 64603aa1e13ba82b9393b9eb91b6332237f45821

 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		GetPathFromUserID(ctx context.Context, id uint) (string, error)
31		List(ctx context.Context) ([]*User, error)
32		Create(ctx context.Context, createUser *CreateUser) (uint, error)
33		Update(ctx context.Context, id uint, updateUser *UpdateUser) error
34		Any(ctx context.Context) (bool, error)
35	}
36)