From 5d364679469dccbdad05f3a2cb5236db7538fdb2 Mon Sep 17 00:00:00 2001 From: cyber-dream Date: Thu, 27 Oct 2022 23:31:46 +0300 Subject: [PATCH] create sessions --- sessionUtils/session.go | 5 +++++ sessionUtils/sessionTypes.go | 17 +++++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 sessionUtils/session.go create mode 100644 sessionUtils/sessionTypes.go diff --git a/sessionUtils/session.go b/sessionUtils/session.go new file mode 100644 index 0000000..65df353 --- /dev/null +++ b/sessionUtils/session.go @@ -0,0 +1,5 @@ +package sessionUtils + +func GetJSSessionInterface(s Session) JSSessionInterface { + return JSSessionInterface{} +} diff --git a/sessionUtils/sessionTypes.go b/sessionUtils/sessionTypes.go new file mode 100644 index 0000000..1305176 --- /dev/null +++ b/sessionUtils/sessionTypes.go @@ -0,0 +1,17 @@ +package sessionUtils + +import ( + "time" +) + +type Session struct { + expirateAt time.Time + gameId string +} + +type JSSessionInterface struct { + GameID string `json:"gameId"` + Title string `json:"title"` + Image string `json:"image"` + Description string `json:"description"` +}