fake sessions and arguments in sessions
This commit is contained in:
parent
a8dbeb6865
commit
948e31d4e3
@ -2,6 +2,8 @@ package sessionUtils
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"git.gregbrzezinski.com/Skirda/skirdaGoBackend/skirdagoutils/gameUtils"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Session struct {
|
type Session struct {
|
||||||
@ -11,6 +13,7 @@ type Session struct {
|
|||||||
Status string
|
Status string
|
||||||
Version string
|
Version string
|
||||||
Expires time.Time
|
Expires time.Time
|
||||||
|
Arguments []gameUtils.Argument
|
||||||
}
|
}
|
||||||
|
|
||||||
type JSSessionInterface struct {
|
type JSSessionInterface struct {
|
||||||
|
@ -3,6 +3,8 @@ package sessionUtils
|
|||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"git.gregbrzezinski.com/Skirda/skirdaGoBackend/skirdagoutils/gameUtils"
|
||||||
)
|
)
|
||||||
|
|
||||||
func ConvertServerSessionsToJSON(s Session) []byte {
|
func ConvertServerSessionsToJSON(s Session) []byte {
|
||||||
@ -14,14 +16,22 @@ func ConvertServerSessionsToJSON(s Session) []byte {
|
|||||||
var FakeSessions = []Session{
|
var FakeSessions = []Session{
|
||||||
{
|
{
|
||||||
GameId: "garrysmod",
|
GameId: "garrysmod",
|
||||||
Title: "Test 1",
|
Icon: "",
|
||||||
|
Title: "Regular Skirda Gmod server",
|
||||||
Status: "Super fake session",
|
Status: "Super fake session",
|
||||||
|
Version: "",
|
||||||
Expires: time.Time{},
|
Expires: time.Time{},
|
||||||
|
Arguments: []gameUtils.Argument{
|
||||||
|
{
|
||||||
|
Body: "+connect",
|
||||||
|
Value: "127.0.0.1:27015",
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
GameId: "beamng",
|
GameId: "half-lide-1",
|
||||||
Title: "Test 2",
|
Title: "Half-Life 1 МЯСО",
|
||||||
Status: "Super fake session 2",
|
Status: "Retro shit",
|
||||||
Expires: time.Time{},
|
Expires: time.Time{},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user