Compare commits
3 Commits
5491d667c2
...
ceb5cac7ea
Author | SHA1 | Date | |
---|---|---|---|
ceb5cac7ea | |||
5d36467946 | |||
2a62f1f8c7 |
@ -1,4 +1,4 @@
|
|||||||
package game
|
package gameUtils
|
||||||
|
|
||||||
var garrysmodGame = SteamGame{
|
var garrysmodGame = SteamGame{
|
||||||
GameId: "garrysmod",
|
GameId: "garrysmod",
|
||||||
@ -24,4 +24,4 @@ var openarena = SteamGame{
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
var FakeGamesList = []SteamGame{garrysmodGame, openarena}
|
var SteamFakeGamesList = []SteamGame{garrysmodGame, openarena}
|
@ -1,4 +1,4 @@
|
|||||||
package game
|
package gameUtils
|
||||||
|
|
||||||
type SteamGame struct {
|
type SteamGame struct {
|
||||||
GameId string
|
GameId string
|
@ -1,14 +1,14 @@
|
|||||||
package game
|
package gameUtils
|
||||||
|
|
||||||
// func findGameByID(id string) SteamGame {
|
func FindGameByID(id string, list Games) SteamGame {
|
||||||
// for _, game := range GamesList {
|
for _, game := range list.SteamGames {
|
||||||
// if game.GameId == id {
|
if game.GameId == id {
|
||||||
// return game
|
return game
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
// var temp SteamGame = SteamGame{}
|
var temp SteamGame = SteamGame{}
|
||||||
// return temp
|
return temp
|
||||||
// }
|
}
|
||||||
|
|
||||||
// func findSteamGameByID(id string) SteamGame {
|
// func findSteamGameByID(id string) SteamGame {
|
||||||
// for _, game := range localGames.St {
|
// for _, game := range localGames.St {
|
||||||
@ -20,8 +20,6 @@ package game
|
|||||||
// return game
|
// return game
|
||||||
// }
|
// }
|
||||||
|
|
||||||
func FindGameByID() {}
|
|
||||||
|
|
||||||
func GetJSGameInterface(game SteamGame) JSGameInterface {
|
func GetJSGameInterface(game SteamGame) JSGameInterface {
|
||||||
newInterface := JSGameInterface{
|
newInterface := JSGameInterface{
|
||||||
GameID: game.GameId,
|
GameID: game.GameId,
|
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{}
|
||||||
|
}
|
17
sessionUtils/sessionTypes.go
Normal file
17
sessionUtils/sessionTypes.go
Normal file
@ -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"`
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user