aboutsummaryrefslogtreecommitdiff
path: root/pkg/model
diff options
context:
space:
mode:
authorJulien Dessaux2021-04-12 12:19:37 +0200
committerJulien Dessaux2021-04-12 12:19:37 +0200
commit77904f19c6f29659d5adcf569336735b3b651912 (patch)
tree3470a507c17fa828d9a037125535d127c9fffab6 /pkg/model
parentImplemented a user table and the CreateUser function (diff)
downloadtrains-77904f19c6f29659d5adcf569336735b3b651912.tar.gz
trains-77904f19c6f29659d5adcf569336735b3b651912.tar.bz2
trains-77904f19c6f29659d5adcf569336735b3b651912.zip
Implemented the user login database function
Diffstat (limited to 'pkg/model')
-rw-r--r--pkg/model/users.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/pkg/model/users.go b/pkg/model/users.go
index dfef67b..e4b4bf0 100644
--- a/pkg/model/users.go
+++ b/pkg/model/users.go
@@ -10,6 +10,11 @@ type User struct {
Last_login_at *time.Time `json:"last_login_at"`
}
+type UserLogin struct {
+ Username string `json:"username"`
+ Password string `json:"password"`
+}
+
type UserRegistration struct {
Username string `json:"username"`
Password string `json:"password"`