aboutsummaryrefslogtreecommitdiffhomepage
path: root/model
diff options
context:
space:
mode:
authorGravatar Frédéric Guillot <fred@miniflux.net>2017-12-16 12:15:33 -0800
committerGravatar Frédéric Guillot <fred@miniflux.net>2017-12-16 12:15:33 -0800
commit58acd1d5e3a997d27f60549b51bdf41df900c6c6 (patch)
treee0d137512be0683a0dc206ef54643dd440090d46 /model
parent27196589fbd36f5f840e51b59bd6253d0f865db3 (diff)
Rename sessions table to user_sessions
Diffstat (limited to 'model')
-rw-r--r--model/user_session.go (renamed from model/session.go)12
1 files changed, 6 insertions, 6 deletions
diff --git a/model/session.go b/model/user_session.go
index 96e445d..7112159 100644
--- a/model/session.go
+++ b/model/user_session.go
@@ -7,8 +7,8 @@ package model
import "time"
import "fmt"
-// Session represents a user session in the system.
-type Session struct {
+// UserSession represents a user session in the system.
+type UserSession struct {
ID int64
UserID int64
Token string
@@ -17,9 +17,9 @@ type Session struct {
IP string
}
-func (s *Session) String() string {
- return fmt.Sprintf("ID=%d, UserID=%d, IP=%s", s.ID, s.UserID, s.IP)
+func (s *UserSession) String() string {
+ return fmt.Sprintf(`ID="%d", UserID="%d", IP="%s", Token="%s"`, s.ID, s.UserID, s.IP, s.Token)
}
-// Sessions represents a list of sessions.
-type Sessions []*Session
+// UserSessions represents a list of sessions.
+type UserSessions []*UserSession