Compare commits
2 Commits
dfb6be1fba
...
d873fce12a
Author | SHA1 | Date | |
---|---|---|---|
d873fce12a | |||
4b073d2cd5 |
@ -7,7 +7,7 @@ var garrysmodGame = SteamGame{
|
|||||||
Platforms: map[string]bool{"linux": true},
|
Platforms: map[string]bool{"linux": true},
|
||||||
Assets: GameInterfaceAssets{
|
Assets: GameInterfaceAssets{
|
||||||
Title: "Garry's Mod",
|
Title: "Garry's Mod",
|
||||||
Image: "gmod.png",
|
Icon: "icon.png",
|
||||||
Description: "",
|
Description: "",
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
@ -19,7 +19,7 @@ var openarena = SteamGame{
|
|||||||
Args: []string{},
|
Args: []string{},
|
||||||
Assets: GameInterfaceAssets{
|
Assets: GameInterfaceAssets{
|
||||||
Title: "Open Arena",
|
Title: "Open Arena",
|
||||||
Image: "openarena.jpg",
|
Icon: "icon.jpg",
|
||||||
Description: "asdadasd",
|
Description: "asdadasd",
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
@ -10,7 +10,7 @@ type SteamGame struct {
|
|||||||
|
|
||||||
type GameInterfaceAssets struct {
|
type GameInterfaceAssets struct {
|
||||||
Title string
|
Title string
|
||||||
Image string
|
Icon string
|
||||||
Description string
|
Description string
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -21,6 +21,6 @@ type Games struct {
|
|||||||
type JSGameInterface struct {
|
type JSGameInterface struct {
|
||||||
GameID string `json:"gameId"`
|
GameID string `json:"gameId"`
|
||||||
Title string `json:"title"`
|
Title string `json:"title"`
|
||||||
Image string `json:"image"`
|
Icon string `json:"icon"`
|
||||||
Description string `json:"description"`
|
Description string `json:"description"`
|
||||||
}
|
}
|
||||||
|
@ -28,7 +28,7 @@ func GetJSGameInterface(game SteamGame) JSGameInterface {
|
|||||||
newInterface := JSGameInterface{
|
newInterface := JSGameInterface{
|
||||||
GameID: game.GameId,
|
GameID: game.GameId,
|
||||||
Title: game.Assets.Title,
|
Title: game.Assets.Title,
|
||||||
Image: game.Assets.Image,
|
Icon: game.Assets.Icon,
|
||||||
Description: game.Assets.Description,
|
Description: game.Assets.Description,
|
||||||
}
|
}
|
||||||
return newInterface
|
return newInterface
|
||||||
|
@ -5,8 +5,12 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
type Session struct {
|
type Session struct {
|
||||||
Expires time.Time
|
|
||||||
GameId string
|
GameId string
|
||||||
|
Icon string
|
||||||
|
Title string
|
||||||
|
Status string
|
||||||
|
Version string
|
||||||
|
Expires time.Time
|
||||||
}
|
}
|
||||||
|
|
||||||
type JSSessionInterface struct {
|
type JSSessionInterface struct {
|
||||||
|
@ -1,13 +1,11 @@
|
|||||||
package sessionUtils
|
package sessionUtils
|
||||||
|
|
||||||
import "encoding/json"
|
import (
|
||||||
|
"encoding/json"
|
||||||
|
)
|
||||||
|
|
||||||
func ConvertServerSessionsToJSON(s Session) []byte {
|
func ConvertServerSessionsToJSON(s Session) []byte {
|
||||||
s_json, err := json.Marshal(s)
|
s_json, err := json.Marshal(s)
|
||||||
_ = err //TODO: Check Errors
|
_ = err //TODO: Check Errors
|
||||||
return s_json
|
return s_json
|
||||||
}
|
}
|
||||||
|
|
||||||
func GetJSSessionInterface(s Session) JSSessionInterface {
|
|
||||||
return JSSessionInterface{}
|
|
||||||
}
|
|
||||||
|
Loading…
Reference in New Issue
Block a user