Compare commits
No commits in common. "6f3f3e1d8f2e5da187a7c27136a782fec0669954" and "ceb5cac7eafabc5d06c09a76ccf669451a1c07ab" have entirely different histories.
6f3f3e1d8f
...
ceb5cac7ea
@ -1,9 +1,5 @@
|
|||||||
package gameUtils
|
package gameUtils
|
||||||
|
|
||||||
import (
|
|
||||||
"encoding/json"
|
|
||||||
)
|
|
||||||
|
|
||||||
func FindGameByID(id string, list Games) SteamGame {
|
func FindGameByID(id string, list Games) SteamGame {
|
||||||
for _, game := range list.SteamGames {
|
for _, game := range list.SteamGames {
|
||||||
if game.GameId == id {
|
if game.GameId == id {
|
||||||
@ -33,9 +29,3 @@ func GetJSGameInterface(game SteamGame) JSGameInterface {
|
|||||||
}
|
}
|
||||||
return newInterface
|
return newInterface
|
||||||
}
|
}
|
||||||
|
|
||||||
func ConvertServerGamesToJSON(g Games) []byte {
|
|
||||||
g_json, err := json.Marshal(g)
|
|
||||||
_ = err //TODO: Check Errors
|
|
||||||
return g_json
|
|
||||||
}
|
|
||||||
|
5
sessionUtils/session.go
Normal file
5
sessionUtils/session.go
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
package sessionUtils
|
||||||
|
|
||||||
|
func GetJSSessionInterface(s Session) JSSessionInterface {
|
||||||
|
return JSSessionInterface{}
|
||||||
|
}
|
@ -5,8 +5,8 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
type Session struct {
|
type Session struct {
|
||||||
ExpirateAt time.Time
|
expirateAt time.Time
|
||||||
GameId string
|
gameId string
|
||||||
}
|
}
|
||||||
|
|
||||||
type JSSessionInterface struct {
|
type JSSessionInterface struct {
|
||||||
|
@ -1,13 +0,0 @@
|
|||||||
package sessionUtils
|
|
||||||
|
|
||||||
import "encoding/json"
|
|
||||||
|
|
||||||
func ConvertServerSessionsToJSON(s Session) []byte {
|
|
||||||
s_json, err := json.Marshal(s)
|
|
||||||
_ = err //TODO: Check Errors
|
|
||||||
return s_json
|
|
||||||
}
|
|
||||||
|
|
||||||
func GetJSSessionInterface(s Session) JSSessionInterface {
|
|
||||||
return JSSessionInterface{}
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user