aboutsummaryrefslogtreecommitdiff
path: root/pkg/components/auth/model.go
diff options
context:
space:
mode:
authorGabriel Arakaki Giovanini <mail@gabrielgio.me>2023-02-26 19:54:48 +0100
committerGabriel Arakaki Giovanini <mail@gabrielgio.me>2023-06-18 16:30:36 +0200
commitc8e1328164e9ffbd681c3c0e449f1e6b9856b896 (patch)
treefaee639a4c55c5dc3bfc59a5400026822c40221d /pkg/components/auth/model.go
downloadlens-c8e1328164e9ffbd681c3c0e449f1e6b9856b896.tar.gz
lens-c8e1328164e9ffbd681c3c0e449f1e6b9856b896.tar.bz2
lens-c8e1328164e9ffbd681c3c0e449f1e6b9856b896.zip
feat: Inicial commit
It contains rough template for the server and runners. It contains rough template for the server and runners.
Diffstat (limited to 'pkg/components/auth/model.go')
-rw-r--r--pkg/components/auth/model.go32
1 files changed, 32 insertions, 0 deletions
diff --git a/pkg/components/auth/model.go b/pkg/components/auth/model.go
new file mode 100644
index 0000000..e46ef49
--- /dev/null
+++ b/pkg/components/auth/model.go
@@ -0,0 +1,32 @@
+package auth
+
+import "context"
+
+type (
+ // TODO: move to user later
+ User struct {
+ ID uint
+ Username string
+ Name string
+ }
+
+ // TODO: move to user later
+ UpdateUser struct {
+ Username string
+ Name string
+ }
+
+ // TODO: move to user later
+ CreateUser struct {
+ Username string
+ Name string
+ Password []byte
+ }
+
+ Repository interface {
+ GetIDByUsername(ctx context.Context, username string) (uint, error)
+ GetPassword(ctx context.Context, id uint) ([]byte, error)
+ // TODO: move to user later
+ Create(ctx context.Context, createUser *CreateUser) (uint, error)
+ }
+)