new sessions struct
This commit is contained in:
parent
d645cbc860
commit
672d491e60
@ -13,6 +13,10 @@ type Session struct {
|
|||||||
Expires time.Time
|
Expires time.Time
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type Sessions struct {
|
||||||
|
Sessions []Session
|
||||||
|
}
|
||||||
|
|
||||||
type JSSessionInterface struct {
|
type JSSessionInterface struct {
|
||||||
GameID string `json:"gameId"`
|
GameID string `json:"gameId"`
|
||||||
Icon string `json:"icon"`
|
Icon string `json:"icon"`
|
||||||
|
@ -11,24 +11,26 @@ func ConvertServerSessionsToJSON(s Session) []byte {
|
|||||||
return s_json
|
return s_json
|
||||||
}
|
}
|
||||||
|
|
||||||
var FakeSessions = []Session{
|
var FakeSessions = Sessions{
|
||||||
{
|
Sessions: []Session{
|
||||||
GameId: "garrysmod",
|
{
|
||||||
Title: "Test 1",
|
GameId: "garrysmod",
|
||||||
Status: "Super fake session",
|
Title: "Test 1",
|
||||||
Expires: time.Time{},
|
Status: "Super fake session",
|
||||||
},
|
Expires: time.Time{},
|
||||||
{
|
},
|
||||||
GameId: "beamng",
|
{
|
||||||
Title: "Test 2",
|
GameId: "beamng",
|
||||||
Status: "Super fake session 2",
|
Title: "Test 2",
|
||||||
Expires: time.Time{},
|
Status: "Super fake session 2",
|
||||||
},
|
Expires: time.Time{},
|
||||||
{
|
},
|
||||||
GameId: "minecraft",
|
{
|
||||||
Title: "Test 3",
|
GameId: "minecraft",
|
||||||
Status: "Testing session",
|
Title: "Test 3",
|
||||||
Version: "1.54.7",
|
Status: "Testing session",
|
||||||
Expires: time.Time{},
|
Version: "1.54.7",
|
||||||
|
Expires: time.Time{},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user