Merge remote-tracking branch 'origin/main'
# Conflicts: # sessionUtils/sessionTypes.go
This commit is contained in:
commit
bd4d86a2df
@ -3,12 +3,7 @@ package gameUtils
|
|||||||
var garrysmodGame = SteamGame{
|
var garrysmodGame = SteamGame{
|
||||||
GameId: "garrysmod",
|
GameId: "garrysmod",
|
||||||
SteamId: "4000",
|
SteamId: "4000",
|
||||||
Args: []Argument{
|
Args: []Argument{},
|
||||||
Argument{
|
|
||||||
Body: "+connect",
|
|
||||||
Value: "127.0.0.1:27015",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
Platforms: map[string]bool{
|
Platforms: map[string]bool{
|
||||||
"linux": true,
|
"linux": true,
|
||||||
"windows": true,
|
"windows": true,
|
||||||
@ -21,10 +16,9 @@ var garrysmodGame = SteamGame{
|
|||||||
}
|
}
|
||||||
|
|
||||||
var openarena = SteamGame{
|
var openarena = SteamGame{
|
||||||
GameId: "openarena",
|
GameId: "half-life-1",
|
||||||
SteamId: "",
|
SteamId: "70",
|
||||||
//Executable: "/usr/games/openarena",
|
Args: []Argument{},
|
||||||
//Args: []string{},
|
|
||||||
Assets: GameInterfaceAssets{
|
Assets: GameInterfaceAssets{
|
||||||
Title: "Open Arena",
|
Title: "Open Arena",
|
||||||
Icon: "icon.png",
|
Icon: "icon.png",
|
||||||
@ -32,16 +26,4 @@ var openarena = SteamGame{
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
var minecraft = SteamGame{
|
var SteamFakeGamesList = []SteamGame{garrysmodGame, openarena}
|
||||||
GameId: "minecraft",
|
|
||||||
SteamId: "",
|
|
||||||
//Args: []string{},
|
|
||||||
Assets: GameInterfaceAssets{
|
|
||||||
Title: "Minecraft",
|
|
||||||
Icon: "icon.png",
|
|
||||||
Description: "Minecraft Game",
|
|
||||||
},
|
|
||||||
Platforms: map[string]bool{},
|
|
||||||
}
|
|
||||||
|
|
||||||
var SteamFakeGamesList = []SteamGame{garrysmodGame, openarena, minecraft}
|
|
||||||
|
@ -2,6 +2,8 @@ package sessionUtils
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"git.gregbrzezinski.com/Skirda/skirdaGoBackend/skirdagoutils/gameUtils"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Session struct {
|
type Session struct {
|
||||||
@ -12,6 +14,7 @@ type Session struct {
|
|||||||
Status string
|
Status string
|
||||||
Version string
|
Version string
|
||||||
Expires time.Time
|
Expires time.Time
|
||||||
|
Arguments []gameUtils.Argument
|
||||||
}
|
}
|
||||||
|
|
||||||
type Sessions struct {
|
type Sessions 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 {
|
||||||
@ -15,14 +17,22 @@ var FakeSessions = Sessions{
|
|||||||
Sessions: []Session{
|
Sessions: []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