aboutsummaryrefslogtreecommitdiff
path: root/pkg/components/user/model.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/components/user/model.go')
-rw-r--r--pkg/components/user/model.go33
1 files changed, 33 insertions, 0 deletions
diff --git a/pkg/components/user/model.go b/pkg/components/user/model.go
new file mode 100644
index 0000000..f957c39
--- /dev/null
+++ b/pkg/components/user/model.go
@@ -0,0 +1,33 @@
+package user
+
+import "context"
+
+type (
+ User struct {
+ ID uint
+ Username string
+ Name string
+ IsAdmin bool
+ Path string
+ }
+
+ UpdateUser struct {
+ Username string
+ Name string
+ Password *string
+ }
+
+ CreateUser struct {
+ Username string
+ Name string
+ Password string
+ IsAdmin bool
+ Path string
+ }
+
+ Repository interface {
+ List(ctx context.Context) ([]*User, error)
+ Create(ctx context.Context, createUser *CreateUser) error
+ Update(ctx context.Context, id uint, updateUser *UpdateUser) error
+ }
+)