From c8e1328164e9ffbd681c3c0e449f1e6b9856b896 Mon Sep 17 00:00:00 2001 From: Gabriel Arakaki Giovanini Date: Sun, 26 Feb 2023 19:54:48 +0100 Subject: feat: Inicial commit It contains rough template for the server and runners. It contains rough template for the server and runners. --- pkg/components/auth/model.go | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 pkg/components/auth/model.go (limited to 'pkg/components/auth/model.go') 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) + } +) -- cgit v1.2.3