summary refs log tree commit diff stats
path: root/user
diff options
context:
space:
mode:
authorAndinus <andinus@nand.sh>2020-03-26 23:29:48 +0530
committerAndinus <andinus@nand.sh>2020-03-26 23:29:48 +0530
commit7a3e2f9552a063ac99f87e47b38e3fd14919fdf0 (patch)
tree878f2714107bdfc5231a7ef7f06a1f02d4940838 /user
parent288d04779e881cb4738ea469e4c93b841a5b42e2 (diff)
downloadperseus-7a3e2f9552a063ac99f87e47b38e3fd14919fdf0.tar.gz
Add auth and user package
Diffstat (limited to 'user')
-rw-r--r--user/user.go38
1 files changed, 38 insertions, 0 deletions
diff --git a/user/user.go b/user/user.go
new file mode 100644
index 0000000..a15d625
--- /dev/null
+++ b/user/user.go
@@ -0,0 +1,38 @@
+package user
+
+// User holds information about the user.
+type User struct {
+	id       string
+	username string
+	password string
+}
+
+// SetUsername will set the username.
+func (u *User) SetUsername(username string) {
+	u.username = username
+}
+
+// Username returns the username.
+func (u *User) Username() string {
+	return u.username
+}
+
+// SetPassword will set the password.
+func (u *User) SetPassword(password string) {
+	u.password = password
+}
+
+// Password returns the password.
+func (u *User) Password() string {
+	return u.password
+}
+
+// SetID will set the id.
+func (u *User) SetID(id string) {
+	u.id = id
+}
+
+// ID returns the id.
+func (u *User) ID() string {
+	return u.id
+}