aboutsummaryrefslogtreecommitdiff
path: root/pkg/database/repository
diff options
context:
space:
mode:
authorGabriel Arakaki Giovanini <mail@gabrielgio.me>2023-07-22 18:45:59 +0200
committerGabriel Arakaki Giovanini <mail@gabrielgio.me>2023-07-22 19:35:33 +0200
commit3b9d27649a31e5af3fb137ff5b3378e7b8f7b9ae (patch)
tree0f43f30d824b8b805e4a72b66a0ee1bee7397803 /pkg/database/repository
parent1e4613aa1113b373a8d841c28e222599237a33c5 (diff)
downloadlens-3b9d27649a31e5af3fb137ff5b3378e7b8f7b9ae.tar.gz
lens-3b9d27649a31e5af3fb137ff5b3378e7b8f7b9ae.tar.bz2
lens-3b9d27649a31e5af3fb137ff5b3378e7b8f7b9ae.zip
feat: Add user management
As many things it is on crude state. The settings.go has become a big mess, but I have achieve MVP, so from now one things shall improve as I'll spent more time on refactoring.
Diffstat (limited to 'pkg/database/repository')
-rw-r--r--pkg/database/repository/user.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/pkg/database/repository/user.go b/pkg/database/repository/user.go
index 3589007..5b2e386 100644
--- a/pkg/database/repository/user.go
+++ b/pkg/database/repository/user.go
@@ -14,7 +14,8 @@ type (
UpdateUser struct {
Username string
Name string
- Password string
+ IsAdmin bool
+ Path string
}
CreateUser struct {
@@ -31,6 +32,8 @@ type (
List(ctx context.Context) ([]*User, error)
Create(ctx context.Context, createUser *CreateUser) (uint, error)
Update(ctx context.Context, id uint, updateUser *UpdateUser) error
+ Delete(ctx context.Context, id uint) error
+ UpdatePassword(ctx context.Context, id uint, password []byte) error
Any(ctx context.Context) (bool, error)
}
)