aboutsummaryrefslogtreecommitdiff
path: root/pkg/components/user
diff options
context:
space:
mode:
authorGabriel Arakaki Giovanini <mail@gabrielgio.me>2023-06-25 19:09:54 +0200
committerGabriel Arakaki Giovanini <mail@gabrielgio.me>2023-06-25 19:51:55 +0200
commit249ee195ce52ee4a4defeb67a33ef353919d3a11 (patch)
tree24ffcfa3a852b0464fc0344cfc79bc5efb272a3e /pkg/components/user
parent91d413b3a15a15fd8b710d8f5a1532d2e3de6f05 (diff)
downloadlens-249ee195ce52ee4a4defeb67a33ef353919d3a11.tar.gz
lens-249ee195ce52ee4a4defeb67a33ef353919d3a11.tar.bz2
lens-249ee195ce52ee4a4defeb67a33ef353919d3a11.zip
feat: Add user list UI
Fill user settings UI with actual data.
Diffstat (limited to 'pkg/components/user')
-rw-r--r--pkg/components/user/controller.go1
-rw-r--r--pkg/components/user/model.go33
2 files changed, 34 insertions, 0 deletions
diff --git a/pkg/components/user/controller.go b/pkg/components/user/controller.go
new file mode 100644
index 0000000..a00006b
--- /dev/null
+++ b/pkg/components/user/controller.go
@@ -0,0 +1 @@
+package user
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
+ }
+)